public ReduceEventArgs(Rule rule, NonterminalToken token, State newState) { this.rule = rule; this.token = token; this.newState = newState; this.contin = true; }
/// <summary> /// Creates a new LALR parser. /// </summary> /// <param name="tokenizer">A tokenizer.</param> /// <param name="states">The LALR states.</param> /// <param name="startState">The starting state.</param> /// <param name="symbols"></param> public LALRParser(IStringTokenizer tokenizer, StateCollection states, State startState, SymbolCollection symbols) { this.tokenizer = tokenizer; this.states = states; this.startState = startState; this.symbols = symbols; storeTokens = StoreTokensMode.NoUserObject; }
/// <summary> /// Creates a new LALR parser. /// </summary> /// <param name="tokenizer">A tokenizer.</param> /// <param name="states">The LALR states.</param> /// <param name="startState">The starting state.</param> public LALRParser(IStringTokenizer tokenizer, StateCollection states, State startState) { this.tokenizer = tokenizer; this.states = states; this.startState = startState; this.trimReductions = trimReductions; storeTokens = StoreTokensMode.NoUserObject; }
/// <summary> /// Creates a new goto action. /// </summary> /// <param name="symbol">The symbol that a reduction must be so that /// the goto action will be done.</param> /// <param name="state">The new current state for the LALR parser.</param> public GotoAction(SymbolNonterminal symbol, State state) { this.symbol = symbol; this.state = state; }
public void Add(State state) { list.Add(state); }
/// <summary> /// Pushes a state on top of the stack. /// </summary> /// <param name="state"></param> public virtual void Push(State state) { stack.Push(state); }
public ShiftEventArgs(TerminalToken token, State newState) { this.token = token; this.newState = newState; }
public GotoEventArgs(SymbolNonterminal symbol, State newState) { this.symbol = symbol; this.newState = newState; }
/// <summary> /// Creates a new shift action. /// </summary> /// <param name="symbol">The symbol that the token must be for this action to be done.</param> /// <param name="state">The new current state for the LALR parser.</param> public ShiftAction(SymbolTerminal symbol, State state) { this.symbol = symbol; this.state = state; }