[antlr-interest] Using NON_ISTREAM object for lexer

Albert Huh albert.huh at embarcadero-ca.com
Wed Apr 9 11:05:13 PDT 2003


in general, to do lexing, you need to be able to iterate sequentially through an array of characters a.k.a. your input.  istreams already do this for you.  doesn't really make a whole lot of sense to use something else and then "re-invent the wheel".

that, and i think antlr is coded to use istreams anyways (and methods associated with istreams), so i doubt it.

if you wanted to use a string, you could use a stringstream.

-----Original Message-----
From: rmsanjivp [mailto:rmsanjivp at yahoo.com]
Sent: Wednesday, April 09, 2003 1:48 PM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] Using NON_ISTREAM object for lexer


Hi!

Can anyone tell me if I can use non-istream objects for input to the 
lexer of antlr? Is there any option in ANTLR that turns off the use 
of istream derived objects for the lexter creation? Can't we just 
pass string or some other thing but not istream to the lexer?

Any help would be greatly appreciated.
Thanks,
Sanjiv


 

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



 

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




More information about the antlr-interest mailing list