The SID users' guide
- i. Introduction
- 1. Grammars
- 1.1. Parsing
- 1.2. Context free grammars
- 1.3. sid grammars
- 2. Overview
- 2.1. Left recursion elimination
- 2.2. Factoring
- 2.3. Optimisations
- 3. The sid grammar file
- 3.1. Lexical conventions
- 3.2. The type declaration section
- 3.3. The terminal declaration section
- 3.4. The rule definition section
- 3.5. The grammar entry points section
- 4. The C information file
- 4.1. Lexical conventions
- 4.2. The prefixes section
- 4.3. The persistent section
- 4.4. The maps section
- 4.5. The header section
- 4.6. The assignments section
- 4.7. The parameter assignments section
- 4.8. The result assignments section
- 4.9. The terminal result extraction section
- 4.10. The action definition section
- 4.11. The trailer section
- 5. Features
- 5.1. Predicates
- 5.2. Error handling
- 5.3. Call by reference
- 5.4. Calling entry points
- A. Understanding error messages
- A.1. Left recursion elimination errors
- A.2. First set computation errors
- A.3. Factoring errors
- A.4. Checking errors
- B. Advice on writing parsers with sid
- B.1. Handling EOF
- B.2. Adding common mistakes to the grammar
- B.3. Throwing exceptions inside exception handlers
- B.4. Continuing from an exception handler
- B.5. Manifesting semantic checks as syntax errors
- B.6. Implementing “panic mode”
- B.7. Duplicating token values