[antlr-interest] Visual Studio syntax highlighting for
an Antlrgrammar
Micheal J
open.zone at virgin.net
Tue Dec 6 20:16:12 PST 2005
> Micheal J wrote:
> > An ANTLR v2 lexer's state is encapsulated in the
> > LexerShareInputState(+ the InputBuffer). You also need to track the
> > Stream's state of course. Assuming you can seek forwards
> and backwards
> > at will in your stream, won't copying the state object(s)
> and storing
> > in an array give you a single state integer (the array index)?.
>
> I don't see how this is possible. For example, the Antlr
> lexer contains
> loops that read all the characters in a comment, with no way
> to exit or
> resume the loop.
My mistake. I just re-read your post(s) and noticed you mentioned
stopping/resuming in the middle of a rule too (multi-line comment).
> > Is this an open-source editor?. Id like to see the code you
> refer to.
>
> Sure, take a look at the LexCPP.cxx here:
> http://cvs.sourceforge.net/viewcvs.py/scintilla/scintilla/src/
>
> The state is called "initStyle".
Thanks,
Micheal
More information about the antlr-interest
mailing list