public static SymbolString Concat(SymbolString symbolString, TerminalSymbol symbol) { List <Symbol> symbols = new List <Symbol>(symbolString); if (symbol != null) { symbols.Add(symbol); } return(new SymbolString(symbols)); }
public LalrItem(GrammarProduction production, int parsingPoint, TerminalSymbol lookahead) { if (this.ParsingPoint > production.Body.Count || ParsingPoint < 0) { throw new ArgumentOutOfRangeException(nameof(parsingPoint)); } this.Production = production; this.ParsingPoint = parsingPoint; this.Lookahead = lookahead; }