/// <summary> /// Initializes a new instance of the LRkParser class with the given lexer /// </summary> /// <param name="automaton">The parser's automaton</param> /// <param name="variables">The parser's variables</param> /// <param name="virtuals">The parser's virtuals</param> /// <param name="actions">The parser's actions</param> /// <param name="lexer">The input lexer</param> public RNGLRParser(RNGLRAutomaton automaton, Symbol[] variables, Symbol[] virtuals, SemanticAction[] actions, Lexer.BaseLexer lexer) : base(variables, virtuals, actions, lexer) { parserAutomaton = automaton; gss = new GSS(); sppf = new SPPFBuilder(lexer.tokens, symVariables, symVirtuals); nullables = new int[variables.Length]; BuildNullables(variables.Length); sppf.ClearHistory(); }