Inheritance: PegBaseParser
Ejemplo n.º 1
0
 internal SampleInfo(ESampleId grammarId,PegCharParser.Matcher startRule,
     string grammarName,
     string grammarDescription,
     string samplesDirectory,
     List<IParserPostProcessor> postProcessors)
 {
     this.grammarId = grammarId;
     this.startRule = startRule;
     grammarName_ = grammarName;
     grammarDescription_ = grammarDescription;
     this.samplesDirectory = samplesDirectory;
     postProcessors_ = postProcessors;
 }
Ejemplo n.º 2
0
 void GetGrammarFileNameAndSource(PegCharParser parser, int ruleId, out string grammarFileName, out string src)
 {
     grammarFileName = parser.GetRuleNameFromId(ruleId) + ".cs";
     src = parser.GetSource();
 }
Ejemplo n.º 3
0
 bool Exec(PegCharParser.Matcher startRule, out PegNode tree)
 {
     bool bMatches = startRule();
     tree = ((PegCharParser)startRule.Target).GetRoot();
     return bMatches;
 }