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); } }
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; }
public override RuleExpression Create(AssembliesAccessWrapper assemblies) { return(new Variable(Id)); }
public abstract RuleExpression Create(AssembliesAccessWrapper assemblies);
internal GrammarCreator(RuleExpressionEvaluator evaluator, AssembliesAccessWrapper assemblies) : this() { ExpressionEvaluator = evaluator ?? throw new ArgumentNullException("Evaluator is null"); Assemblies = assemblies ?? throw new ArgumentNullException("Assemblies wrapper is null"); }