[antlr-interest] TokenRewriteStream usage
Brisard, Fred D
Fred.Brisard at ca.com
Wed Sep 3 14:31:49 PDT 2008
I am developing an editor that uses an Antlr-based parser to analyze the
source, display it in various forms, allow the user to make
modifications and then regenerate the source with those modifications.
>From what I read it seems like the TokenRewriteStream is perfect for the
Right now I have a working parser that operates correctly when using
CommonTokenString. I'm able to parse the source dump an AST based on
CommonTree that I built during the parsing. I figured my first step
into rewriting would be to just replace the CommonTokenString object
with a TokenRewriteStream object as the result of the lex. I also added
a grammar option of rewrite=true.
When I run the lexer I get a null token stream from
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the antlr-interest