/*
  * Constructor.
  *
  *  The grammar.
  *  If given, the parser doesn"t have to analyze the grammar.
  */
 public Parser(Grammar grammar, ActionAndGoTo parseTable = null)
 {
     this.Grammar = grammar;
     if (parseTable != null)
     {
         this.ParseTable = parseTable;
     }
     else
     {
         Analyzer analyzer = new Analyzer();
         this.ParseTable = analyzer.Analyze(grammar).ParseTable;
     }
 }
Ejemplo n.º 2
0
 public SyntaxErrorCleanParser(Grammar grammar, ActionAndGoTo parseTable = null)
     : base(grammar, parseTable)
 {
 }