Chapter 8.  Building a Parser and Interpreter for a Custom Language

Extensibility and adaptability are often the required features in enterprise applications. Often, it is useful and practical-or even an actual feature requirement by users-to change an application's behavior and business rules at runtime. Imagine, for example, an e-commerce application in which sales representatives can configure business rules themselves; for example, when the system should offer free shipping for a purchase or should apply a certain discount when some special conditions are met (offer free shipping when the purchase amount exceeds 150 Euros , and the customer has already made two or more purchases in the past or has been a customer for more than a year).

By ...

Get PHP 7 Programming Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.