[antlr-interest] Input String for Lexer
Noel F Bryson
nfb at silistix.com
Tue May 25 08:07:27 PDT 2004
Use an istringstream:
#include <sstream>
#include <string>
using namespace std;
string source("Your input text");
istringstream str(source);
YourLexer lexer(str);
YourParser parser(lexer);
.....
On Tue, 2004-05-25 at 15:11, Bussolaro Luigi wrote:
>
> Does anybody know the way to give a String in input to my Lexer
> instead
> an InputStream?
> It's really necessary to rewrite the whole Lexer?
>
> Thanks
> Luigi
> --------------------------------------------------------------------
> CONFIDENTIALITY NOTICE
> This message and its attachments are addressed solely to the persons
> above and may contain confidential information. If you have received
> the message in error, be informed that any use of the content hereof
> is prohibited. Please return it immediately to the sender and delete
> the message. Should you have any questions, please contact us by
> replying to webmaster at telecomitalia.it.
> Thank you
> & nbsp; www.telecomitalia.it
> --------------------------------------------------------------------
>
> ______________________________________________________________________
> 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 the Yahoo! Terms of
> Service.
>
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