Enhanced C#
Language of your choice: library documentation

Documentation moved to ecsharp.net

GitHub doesn't support HTTP redirects, so you'll be redirected in 3 seconds.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Public fields | Public Member Functions | Protected Member Functions | List of all members
Loyc.LLParserGenerator.LLParserGenerator.GenerateCodeVisitor Class Reference

Directs code generation using the visitor pattern to visit the predicates in a rule. The process starts with Generate(Rule). More...


Source file:
Inheritance diagram for Loyc.LLParserGenerator.LLParserGenerator.GenerateCodeVisitor:
Loyc.LLParserGenerator.PredVisitor

Remarks

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)
 

Member Function Documentation

override void Loyc.LLParserGenerator.LLParserGenerator.GenerateCodeVisitor.Visit ( Alts  alts)
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.