On Sep 3, 2008, at 2:31 PM, Brisard, Fred D wrote:

> 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 job.
>
> 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.
>

that is used for output=template and such.  turn that off for starters  
I think.
>
> When I run the lexer I get a null token stream from  
> TokenRewriteStream.toString().
>

Weird...are you using CommonToken?

Ter

List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to