|
Top-down parsing - Wikipedia, the free encyclopedia
Top-down parsing is a strategy of analyzing unknown data relationships by hypothesizing general parse tree structures and then considering whether the known fundamental structures are compatible with...
en.wikipedia.org/wiki/Top-down_parsing |
|
|
|||
|
|||
|
|||
|
To introduce two naive top down parsing/recognition algorithms, one depth-first, the other breadth-first. ... To give the top-down depth-first recognition algorithm an efficient implementation in Prolog. ... To extend this recognizer to a parser.
|
|||
|
ANTLR v3 has a sophisticated debug event mechanism that allows ANTLRWorks to follow along as a parser processes input. ANTLR v3 includes a well-defined protocol for communicating with remote parsers so ANTLRWorks can actually connect to a parser generated in any language with a socket library.
|
|||
|
JavaCC - Wikipedia, the free encyclopedia
JavaCC (Java Compiler Compiler) is an open source parser generator for the Java programming language. JavaCC is similar to Yacc in that it generates a parser for a formal grammar provided in EBNF not...
en.wikipedia.org/wiki/JavaCC |
|||
|
Top-down rules in Prolog ... For a parser, we need to be able to build a representation of the structure of sentences. In DCGs this is easy: we simply add an extra argument that is instantiated to the syntactic structure.
|
|||
|
Example 2 shows the the parser generator converting this BNF into tables (or a Case statement). The form of the tables depends upon whether the generated parser is a top-down parser or bottom-up parser. Top-down parsers are easy to generate;
|
|||
|
One example is a JSON parser, the first version of which took about an hour to write, and which resulted in about 60 lines of JSON-specific code (30 lines for the parser definitions, 30 lines for the tokenizer), and 120 lines in total (including the parser framework, that is).
|
Copyright © 2009, Dictionary.com, LLC. All rights reserved.