Example #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));
        }
Example #2
0
 public LexerNoViableAltException(Lexer lexer, ICharStream input, int startIndex, ATNConfigSet deadEndConfigs)
     : base(lexer, input)
 {
     this.startIndex     = startIndex;
     this.deadEndConfigs = deadEndConfigs;
 }
 public RecognitionException([Nullable] Lexer lexer, ICharStream input)
 {
     this.recognizer = lexer;
     this.input      = input;
     this.ctx        = null;
 }
Example #4
0
 public ErrorHandler(Antlr4.Runtime.Lexer lexer, SiBtyVirtualMachine vm)
 {
     this.vm    = vm;
     this.lines = lexer.InputStream.ToString().Split('\n');
 }