public LR1Parser(Cortex.Grammar.Grammar g, string terminateSymbol, LR1ParsingTable table, LR1GotoTable gotoTable, SemanticRule r) : base(g, terminateSymbol, r, true, false) { this.actionTable = table; this.gotoTable = gotoTable; this.onAccept = r; baseToken = new Token <string>(TerminateSymbol, TerminateSymbol, TerminateSymbol.Length); stateStack = new Stack <object>(); initial = new LookaheadRule(TerminateSymbol, TargetGrammar[0]); }
public LR1ParsableLanguage( Language l, TypedShakeSelector <string> selector, Cortex.Grammar.Grammar g, string terminateSymbol, SemanticRule onAccept, bool supressMessages, Func <Token <string>, bool> shouldKeep) : this(l, selector, new LR1Parser(g, terminateSymbol, onAccept, supressMessages), shouldKeep) { }
public LR1ParsableLanguage( Language l, TypedShakeSelector <string> selector, Cortex.Grammar.Grammar g, string terminateSymbol, LR1ParsingTable table, LR1GotoTable gotoTable, SemanticRule onAccept, Func <Token <string>, bool> shouldKeep) : this(l, selector, new LR1Parser(g, terminateSymbol, table, gotoTable, onAccept), shouldKeep) { }
public LR1ParsableLanguage( string name, string version, string idType, IEnumerable <Comment> comments, IEnumerable <Symbol> symbols, IEnumerable <RegexSymbol> regexSymbols, IEnumerable <Keyword> keywords, TypedShakeSelector <string> selector, Cortex.Grammar.Grammar g, string terminateSymbol, SemanticRule onAccept, bool supressMessages, Func <Token <string>, bool> shouldKeep) : this(new Language(name, version, idType, comments, symbols, regexSymbols, keywords), selector, g, terminateSymbol, onAccept, supressMessages, shouldKeep) { }
public LR1Parser(Cortex.Grammar.Grammar g, LR1ParsingTable table, LR1GotoTable gotoTable, SemanticRule r) : this(g, DEFAULT_TERMINATE_SYMBOL, table, gotoTable, r) { }
public LR1Parser(Cortex.Grammar.Grammar g) : this(g, DEFAULT_TERMINATE_SYMBOL) { }
public LR1Parser(Cortex.Grammar.Grammar g, string terminateSymbol) : this(g, terminateSymbol, (x) => x[0]) { }
public LR1Parser(Cortex.Grammar.Grammar g, string terminateSymbol, SemanticRule r) : this(g, terminateSymbol, r, false) { }
public LR1Parser(Cortex.Grammar.Grammar g, string terminateSymbol, SemanticRule r, bool supressMessages) : base(g, terminateSymbol, r, supressMessages, true) { }