Пример #1
0
 internal GrammarCreator(RuleExpressionEvaluator ev, AssembliesAccessWrapper wrapper, Dictionary <string, IToken> name_token_table)
     : this(ev, wrapper)
 {
     ExpressionEvaluator = ev ?? throw new ArgumentNullException($"Rule expression evaluator is not able to be null");
     foreach (var kvp in name_token_table)
     {
         RegisterTerminal(kvp.Key, kvp.Value);
     }
 }
Пример #2
0
 internal GrammarCreator(RuleExpressionEvaluator ev, AssembliesAccessWrapper wrapper, Dictionary <string, Terminal> name_terminal_table, Dictionary <IToken, Terminal> token_terminal_table)
     : this(ev, wrapper)
 {
     if ((name_terminal_table ?? throw new ArgumentNullException($"Table of name/terminal is null")).Count
         != (token_terminal_table ?? throw new ArgumentNullException($"Table token/terminal is null")).Count)
     {
         throw new GrammarException($"Problem with terminal registration");
     }
     NameTerminalTable  = name_terminal_table;
     TokenTerminalTable = token_terminal_table;
 }
Пример #3
0
 public override RuleExpression Create(AssembliesAccessWrapper assemblies)
 {
     return(new Variable(Id));
 }
Пример #4
0
 public abstract RuleExpression Create(AssembliesAccessWrapper assemblies);
Пример #5
0
 internal GrammarCreator(RuleExpressionEvaluator evaluator, AssembliesAccessWrapper assemblies)
     : this()
 {
     ExpressionEvaluator = evaluator ?? throw new ArgumentNullException("Evaluator is null");
     Assemblies          = assemblies ?? throw new ArgumentNullException("Assemblies wrapper is null");
 }