December 1999
Intermediate to advanced
992 pages
22h 3m
English
The approach to parsing that I have described so far involves building a parse tree, which is the approach that is used in nearly all validating parsers. As you have seen, this method approaches the document as a series of interrelated objects that just happen to have textual content. In the second approach, the parser just treats the document as a flat structure or a text document.
Let's parse the same document by using both methods, and then compare the two.
This section shows how a parser that creates a document tree might proceed. Pseudocode has been used. (Of course, the process will be a little more complex than this, but this illustrates the general principles employed.) ...
Read now
Unlock full access