C# 클래스 Loyc.LLParserGenerator.AutoValueSaverVisitor

Helper class invoked just after StageTwoParser. Its job is to create variables referenced by labels (label:item) and by code blocks ($RuleName), to modify the code blocks to remove the $ operator, and to update the ResultSaver of each labeled predicate. Also supports $result.
Labels and $substitutions can also be used with Preds constructed by hand, except that referencing tokens directly from code blocks (e.g. $'#') won't work unless the corresponding grammar Pred has a Pred.Basis is an equal syntax tree.
상속: Loyc.LLParserGenerator.RecursivePredVisitor
파일 보기 프로젝트 열기: qwertie/ecsharp 1 사용 예제들

공개 메소드들

메소드 설명
Run ( Rule rule, IMessageSink sink, Rule>.IDictionary rules, IPGCodeGenHelper codeGen ) : void
Visit ( RuleRef pred ) : void
VisitOther ( Pred pred ) : void

비공개 메소드들

메소드 설명
AutoValueSaverVisitor ( DataGatheringVisitor data, IMessageSink sink, Rule>.IDictionary rules, IPGCodeGenHelper codeGen ) : System
LiteralToIdent ( object literal ) : string
LiteralToVarName ( object literal ) : Symbol
MaybeCreateVariableFor ( Pred pred, Symbol varName, LNode primType ) : void
PickVarNameForLNode ( LNode label ) : Symbol
PickVarNameForRuleName ( Symbol name ) : Symbol
Process ( Rule rule ) : void
ReplaceSubstitutionsIn ( LNode code ) : LNode
ReplaceSubstitutionsInCodeBlocks ( ) : void

메소드 상세

Run() 공개 정적인 메소드

public static Run ( Rule rule, IMessageSink sink, Rule>.IDictionary rules, IPGCodeGenHelper codeGen ) : void
rule Rule
sink IMessageSink
rules Rule>.IDictionary
codeGen IPGCodeGenHelper
리턴 void

Visit() 공개 메소드

public Visit ( RuleRef pred ) : void
pred RuleRef
리턴 void

VisitOther() 공개 메소드

public VisitOther ( Pred pred ) : void
pred Pred
리턴 void