5.7. Data Language Parser Summary

You should find that you can write a data language parser in a few days, if not a few hours. To create the parser, write a grammar that describes the language you want to match. Write assemblers that will build your target object, and generate the parser from the grammar, plugging in your assemblers.

Although parsers for data languages are among the simplest practical parsers, there is an even simpler approach: Do not write a parser at all. XML makes this possible by standardizing a way to write grammars and elements for data-oriented languages.

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.