internal static CompiledGrammar GetGrammar(SemanticActions <T> actions) { if (actions == null) { throw new ArgumentNullException("actions"); } return(actions.Grammar); }
public SemanticProcessor(ITokenizer <T> tokenizer, SemanticActions <T> actions) : base(tokenizer) { if (actions == null) { throw new ArgumentNullException("actions"); } if (tokenizer.Grammar != actions.Grammar) { throw new ArgumentException("Mismatch of tokenizer and action grammars"); } this.actions = actions; }
internal SemanticTrimFactory(SemanticActions <TBase> owner, Rule rule, int handleIndex) { if (owner == null) { throw new ArgumentNullException("owner"); } if (rule == null) { throw new ArgumentNullException("rule"); } if ((handleIndex < 0) || (handleIndex >= rule.SymbolCount)) { throw new ArgumentOutOfRangeException("handleIndex"); } this.owner = owner; this.handleIndex = handleIndex; this.rule = rule; }
public SemanticTokenizer(TextReader textReader, SemanticActions <T> actions) : base(textReader, actions.Grammar) { this.actions = actions; }
public SemanticProcessor(TextReader reader, SemanticActions <T> actions) : this(actions.CreateTokenizer(reader), actions) { }