Summary
In this chapter, you learned how to use the PHP-PEG library to implement a parser, interpreter, and compiler for a custom expression language. You also learned how to define grammars for such languages and how you can use them to develop domain-specific languages. These can be used to offer end-user development features in large software systems, which allow users to customize their software's business rules to a large extent.
Dynamically modifying a program using domain-specific languages can be a strong selling point, especially in enterprise systems. They allow users to modify a program's behavior by themselves, without having to wait for a developer to change a business rule and trigger a lengthy release process. This way, new business ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access