O'Reilly logo

Building Parsers with Java™ by Steven John Metsker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required