I'm looking for a good explanation of the definitions of the FIRST, FOLLOW, and PREDICT sets of a RDP when given a grammar.
相关问题
- Correctly parse PDF paragraphs with Python
- R: eval(parse()) error message: cannot ope
- How do I parse a .pls file using PHP? Having troub
-
Create array from the contents of 相关文章
- How do I get from a type to the TryParse method?
- Slow ANTLR4 generated Parser in Python, but fast i
- Parsing JSON in QML [duplicate]
- How do I generate an AST from a string of C++ usin
- JSoup will not fetch all items?
- Content is not allowed in prolog
- How to manage parsing an null object for DateTime
- Make Gson throw exception on parsing JSON with dup
Try Programming Language Pragmatics, by Michael L. Scott (Morgan Kaufmann). Parsing is covered in chapter 2. Recursive-descent parsing is described in section 2.2.3; first and follow sets in 2.2.5.
You can automatically calculate first, follow, and predict sets using Calculate Predict, First, and Follow Sets from BNF (Backus Naur Form) Grammar Specification without having to download anything. It's a good way to verify answers or automate the tedium.
If you want to do it manually, the Dragon Book (2nd ed) covers it on pages 221-222.