[antlr-interest] antlr v4 wish list

Sam Harwell sharwell at pixelminegames.com
Wed Mar 30 03:42:18 PDT 2011


Hi Martin,

For lexers you can implement CharStream (ICharStream in the C# target), and
for parsers you can implement TokenStream (ITokenStream in C# target). I've
successfully used the former for case-insensitive lexing, and the latter for
a preprocessor. ANTLRReaderStream is one of the included implementations of
CharStream, and at least for .NET offers support for "io pipes" (which
appear in the .NET framework as either TextReader (Console.In), or Stream
objects such as FileStream which can be passed as "new StreamReader(file)").

Sam

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Martin d'Anjou
Sent: Tuesday, March 29, 2011 11:45 PM
To: antlr-interest at antlr.org
Subject: Re: [antlr-interest] antlr v4 wish list

Also, how about support for io pipes to decouple the lexer from the parser,
such that each could be in its own thread? Also, the input to the lexer
could be an io pipe. Might be easier to place a pre-processor in front of
the lexer this way, and also to handle gigantic files.

Martin

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address



More information about the antlr-interest mailing list