[antlr-interest] Lexer
Henry Butowsky
henryb at ntlworld.com
Tue Apr 18 05:36:09 PDT 2006
Hi Guys,
Im using Antlr 2.7.5 in C++.
How do I get the lexer to read from a string rather than a file ?
I've been looking at CharScanner class but nothing immediatly springs
to mind. Im a bit of a newbie when it comes to C++ things
I use the following code to initialize the lexer & parser.
char *filename;
ifstream *in;
ncoLexer lexer(*in);
lexer.setFilename(filename);
ncoParser parser(lexer);
parser.setFilename(filename);
More information about the antlr-interest
mailing list