public void Build(ParseMethod method) {
   if (_grammar.Root == null) {
     Language.Errors.Add("Root property of the grammar is not set.");
     return;
   }
   var gbld = new GrammarDataBuilder(Language);
   gbld.Build();
   //Just in case grammar author wants to customize something...
   _grammar.OnGrammarDataConstructed(Language);
   var sbld = new ScannerDataBuilder(Language);
   sbld.Build();
   var pbld = new ParserDataBuilder(Language);
   pbld.Build(method);
   Validate(); 
   //call grammar method, a chance to tweak the automaton
   _grammar.OnParserDataConstructed(Language); 
 }
예제 #2
0
        public void Build(ParseMethod method)
        {
            if (_grammar.Root == null)
            {
                Language.Errors.Add("Root property of the grammar is not set.");
                return;
            }
            var gbld = new GrammarDataBuilder(Language);

            gbld.Build();
            //Just in case grammar author wants to customize something...
            _grammar.OnGrammarDataConstructed(Language);
            var sbld = new ScannerDataBuilder(Language);

            sbld.Build();
            var pbld = new ParserDataBuilder(Language);

            pbld.Build(method);
            Validate();
            //call grammar method, a chance to tweak the automaton
            _grammar.OnParserDataConstructed(Language);
        }