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; }
void GetGrammarFileNameAndSource(PegCharParser parser, int ruleId, out string grammarFileName, out string src) { grammarFileName = parser.GetRuleNameFromId(ruleId) + ".cs"; src = parser.GetSource(); }
bool Exec(PegCharParser.Matcher startRule, out PegNode tree) { bool bMatches = startRule(); tree = ((PegCharParser)startRule.Target).GetRoot(); return bMatches; }