Example #1
0
        protected override ITokenSourceWithState <ClassifierLexerState> CreateLexer(ICharStream input, int startLine, ClassifierLexerState startState)
        {
            var lexer = new ClassifierLexer(input);

            lexer.Line   = startLine;
            lexer.Column = 0;
            startState.Apply(lexer);
            return(lexer);
        }
 internal InsideClassifierLexer(ICharStream input, ClassifierLexer lexer)
     : this(input)
 {
     Contract.Requires <ArgumentNullException>(lexer != null, "lexer");
     AggregateLexer = lexer;
 }
Example #3
0
 public void Apply(ClassifierLexer lexer)
 {
     _simpleLexerState.Apply(lexer);
     lexer.SetDelimiters(_openDelimiter, _closeDelimiter);
 }
Example #4
0
 public ClassifierLexerState(ClassifierLexer lexer)
 {
     _simpleLexerState = new SimpleLexerState(lexer);
     _openDelimiter    = lexer.OpenDelimiter;
     _closeDelimiter   = lexer.CloseDelimiter;
 }