Example #1
0
        /**
         * Construct a parser with a given table and input
         */
        public LrParser(LrTable table, List <Token> input)
        {
            this.table = table;
            LrAction action = table.Action(0, input.Count > 0 ? input[0] : table.Empty());

            this.config = new LrConfig(0, new Stack <int>(), action, input);
            this.config.stack.Push(0);
            this.ast = new LrAst();
        }
Example #2
0
 /**
  * Constructor
  */
 public LrEvaluate(LrAst ast)
 {
     this.ast       = ast;
     this.delegates = new Dictionary <Tuple <string, LrAst.Node.Type>, Func <LrAst.Node, LrAst.Node> >();
 }