[antlr-interest] Pushing Characters onto the InputBuffer

Jason jasonriz at yahoo.com
Mon Mar 1 08:13:56 PST 2004


Hello,

I'm trying to convert a yacc grammar which makes heavy
use of yacc's yyless/unput facilities.  Does ANTLR
provide a means from within an action to push an
arbitrary set of characters onto the input stream? 
I've poked around the code a bit but it seems that the
InputBuffer's queue is protected.  It would be easy
enough for me to expose the queue and rebuild ANTLR
but I'd rather not do this if I don't have to.  It's
possible that in general the use of syntactic
predicates eliminates the need for this kind of
behavior but I'm trying to keep my ANTLR grammar as
close to its yacc counterpart as possible.  So, is
there some way to add characters to the stream or do I
have to roll my own ANTLR?  Thanks in advance for any
replies.

-jason  

__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list