Exemple #1
0
 protected Automata(AutomataManager manager)
 {
     if (manager == null)
     {
         throw new ArgumentNullException(nameof(manager));
     }
 }
Exemple #2
0
            public ParserAutomata(AutomataManager manager) : base(manager)
            {
                //_parser = parser;

                var grammar = Grammar.Get <TGrammar, TToken>();

                foreach (var parserRule in grammar.ParserRules)
                {
                    RegisterParserRule(parserRule);
                }
            }
Exemple #3
0
            public LexerAutomata(AutomataManager manager) : base(manager)
            {
                var grammar = Grammar.Get <TGrammar, TToken>();

                foreach (var tokenFragment in grammar.TokenFragments)
                {
                    RegisterLexerFragment(tokenFragment);
                }

                foreach (var tokenRule in grammar.TokenRules.OrderByDescending(r => r.TokenCode))
                {
                    RegisterLexerRule(tokenRule);
                }

                BuildStates();
            }
Exemple #4
0
 protected ParserAutomataBase(AutomataManager manager) : base(manager)
 {
 }