Ejemplo n.º 1
0
        /// <summary>
        /// The same as
        /// <see cref="CompileParseTreePattern(string, int)"/>
        /// but specify a
        /// <see cref="Lexer"/>
        /// rather than trying to deduce it from this parser.
        /// </summary>
        public virtual ParseTreePattern CompileParseTreePattern(string pattern, int patternRuleIndex, Lexer lexer)
        {
            ParseTreePatternMatcher m = new ParseTreePatternMatcher(lexer, this);

            return(m.Compile(pattern, patternRuleIndex));
        }
Ejemplo n.º 2
0
 public LexerNoViableAltException(Lexer lexer, ICharStream input, int startIndex, ATNConfigSet deadEndConfigs)
     : base(lexer, input)
 {
     this.startIndex     = startIndex;
     this.deadEndConfigs = deadEndConfigs;
 }
Ejemplo n.º 3
0
 public RecognitionException([Nullable] Lexer lexer, ICharStream input)
 {
     this.recognizer = lexer;
     this.input      = input;
     this.ctx        = null;
 }
Ejemplo n.º 4
0
 public ErrorHandler(Antlr4.Runtime.Lexer lexer, SiBtyVirtualMachine vm)
 {
     this.vm    = vm;
     this.lines = lexer.InputStream.ToString().Split('\n');
 }