C# Class Loyc.LLParserGenerator.LLParserGenerator.PrematchAnalysisVisitor

Figures out which terminals and and-predicates are "prematched". A prematched "Match()" call can be replaced with "Skip()" or "MatchAny()" in the generated code, a prematched Check() can be eliminated, to improve performance of the generated code.
Inheritance: Loyc.LLParserGenerator.RecursivePredVisitor
显示文件 Open project: qwertie/ecsharp

Public Methods

Method Description
Analyze ( Rule rule ) : void
PrematchAnalysisVisitor ( LLParserGenerator llpg ) : System
Visit ( Alts alts ) : void
Visit ( Gate pred ) : void

Private Methods

Method Description
ScanTree ( PredictionTree tree, Alts alts, DList path ) : void

Method Details

Analyze() public method

public Analyze ( Rule rule ) : void
rule Rule
return void

PrematchAnalysisVisitor() public method

public PrematchAnalysisVisitor ( LLParserGenerator llpg ) : System
llpg LLParserGenerator
return System

Visit() public method

public Visit ( Alts alts ) : void
alts Alts
return void

Visit() public method

public Visit ( Gate pred ) : void
pred Gate
return void