示例#1
0
 public LrConfig(int count, Stack <int> stack, LrAction action, string input)
 {
     this.count  = count;
     this.stack  = stack;
     this.action = action;
     this.input  = input;
 }
示例#2
0
        /**
         * Construct a parser with a given table and input
         */
        public LrParser(LrTable table, string input)
        {
            this.table = table;
            LrAction action = table.Action(0, input.Length > 0 ? input[0] : table.Empty());

            this.config = new LrConfig(0, new Stack <int>(), action, input);
            this.config.stack.Push(0);
            this.ast = new LrAst();
        }