|
Enhanced C#
Language of your choice: library documentation
|
Directs code generation using the visitor pattern to visit the predicates in a rule. The process starts with Generate(Rule). More...
Directs code generation using the visitor pattern to visit the predicates in a rule. The process starts with Generate(Rule).
This class is in charge of high-level code generation. It relies on IPGCodeGenHelper for most low-level code generation tasks.
Public fields | |
| LLParserGenerator | LLPG |
| LNodeFactory | F |
Public Member Functions | |
| GenerateCodeVisitor (LLParserGenerator llpg) | |
| void | Generate (Rule rule) |
| new void | Visit (Pred pred) |
| override void | Visit (Alts alts) |
| Visit(Alts) is the most important method in this class. It generates all prediction code, which is the majority of the code in a parser. More... | |
| override void | Visit (Seq pred) |
| override void | Visit (Gate pred) |
| override void | Visit (AndPred andp) |
| override void | Visit (RuleRef rref) |
| override void | Visit (TerminalPred term) |
Public Member Functions inherited from Loyc.LLParserGenerator.PredVisitor | |
| void | Visit (Pred pred) |
| virtual void | Visit (EndOfRule end) |
| virtual void | VisitOther (Pred pred) |
| void | VisitChildrenOf (Seq pred) |
| void | VisitChildrenOf (AndPred pred) |
| void | VisitChildrenOf (Gate pred) |
| void | VisitChildrenOf (Alts pred, bool includeError) |
Protected Member Functions | |
| LNode | GetPredictionSubtreeCode (PredictionBranch branch, Pair< LNode, string >[] matchingCode, ref Symbol haveLoop) |
| LNode | GeneratePredictionTreeCode (PredictionTree tree, Pair< LNode, string >[] matchingCode, ref Symbol haveLoop) |
|
inlinevirtual |
Visit(Alts) is the most important method in this class. It generates all prediction code, which is the majority of the code in a parser.
Reimplemented from Loyc.LLParserGenerator.PredVisitor.
1.8.7