November 2005
Intermediate to advanced
304 pages
6h 14m
English
Sometimes you will be lucky enough to work with data that uses a well-known syntax, such as XML or HTML, as we have done so far in this chapter. In those cases, you can use an existing parser. For other structures, you may need to write your own parser. This is essentially what we did in Chapter 2, in the section "Scan-Do Attitude: Parsing Complex Syntax with the Scanner Class." We encoded the knowledge of our grammar, the relationship between all the parts of the data, into the program itself. If there are no errors in converting the grammar into program logic, this ...
Read now
Unlock full access