public EnhancedLR1Parser(EnhancedGrammar g, string terminateSymbol, EnhancedParsingTable table, SemanticRule r) : base(g, terminateSymbol, r, true, false) { this.table = table; baseToken = new Token <string>(TerminateSymbol, TerminateSymbol, TerminateSymbol.Length); stateStack = new Stack <object>(); initial = new LookaheadRule(TerminateSymbol, TargetGrammar[0]); }
public EnhancedLR1ParsableLanguage( Language l, TypedShakeSelector <string> selector, EnhancedGrammar g, string terminateSymbol, EnhancedParsingTable table, SemanticRule onAccept, Func <Token <string>, bool> shouldKeep) : this(l, selector, new EnhancedLR1Parser(g, terminateSymbol, table, onAccept), shouldKeep) { }
public EnhancedLR1ParsableLanguage( string name, string version, string idType, IEnumerable <Comment> comments, IEnumerable <Symbol> symbols, IEnumerable <RegexSymbol> regexSymbols, IEnumerable <Keyword> keywords, TypedShakeSelector <string> selector, EnhancedGrammar g, string terminateSymbol, EnhancedParsingTable table, SemanticRule onAccept, Func <Token <string>, bool> shouldKeep) : this(new Language(name, version, idType, comments, symbols, regexSymbols, keywords), selector, g, terminateSymbol, table, onAccept, shouldKeep) { }
protected override void PreTableConstruction() { base.PreTableConstruction(); table = new EnhancedParsingTable(TargetGrammar.SymbolTable.Concat( new string[] { TerminateSymbol }), 0); }
public EnhancedLR1Parser(EnhancedGrammar g, EnhancedParsingTable table, SemanticRule r) : this(g, DEFAULT_TERMINATE_SYMBOL, table, r) { }