Chapter 5. Parsing Data Languages

This chapter explores data languages, whose elements are textual representations of objects. Data languages are common and relatively simple, and they provide good examples of how to apply the techniques this book has covered to this point. This chapter focuses on a sample application that parses a file that describes types of coffee. Sections in this chapter show how to build the assemblers and the grammar for a coffee language and how to generate a parser from the grammar. This chapter also includes a brief introduction to XML, which provides an alternative and potentially simpler approach to defining and parsing a data language.

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.