[antlr-interest] antlr3, no class such as ANTLRInputStream...

David CROSSON david.crosson at wanadoo.fr
Thu May 11 09:15:36 PDT 2006


Hello,

  why not adding a new class to ANTLR3 in order to help
using any kind of input stream.
I'd like to be able to write such java code :

InputStream is = new GZIPInputStream(new FileInputStream(file));
CharStream in = new ANTLRInputStream(is);
Lexer lexer = new BeaStackDumpParserLexer(in);
CommonTokenStream tokens = new CommonTokenStream(lexer);
Parser parser = new MyParser(tokens);
...

I was also wondering why the ANTLRFileStream class, which is a CharStream,
doesn't take a charset parameter ?

Best Regards,
David.



More information about the antlr-interest mailing list