15.4. Building a Query Language Environment

Figure 15.11 shows the elements of a query language.

Figure 15.11. The elements of a query language. A user interface for a query language passes a textual query to a parser, which translates the text into an engine query. The user interface asks the engine to prove the query, something it does by drawing on facts that come from an object model.

The motivation for a query language begins with an object model and a desire to let a user issue ad hoc questions about the data in the model.The engine expects queries to arrive as query objects, so you need a strategy for translating a select statement into ...

Get Building Parsers with Java™ 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.