[antlr-interest] Re: Passing OutputStream to Lexer
bob mcwhirter
bob at werken.com
Fri Jun 7 15:18:51 PDT 2002
I personally think having antlr adopt either log4j or the
jakarta-commons-logging API would be a good thing.
log4j would allow us to do just about anything we want
with the output.
-bob
On Fri, 7 Jun 2002, spenserkao wrote:
> Empirically, I think I've found the alternative for the same goal.
> In the Lexer part of the grammar, create a method something like
> Public String getOutputMsg() {
} to return the outgoing message,
> then in the main program, where Parser and Lexer will be
> instantiated, call the public method to pass the outgoing message to
> PrintWriter.println().
>
> I am answering my own question here:o)
>
> Regards, Spenser
> --- In antlr-interest at y..., "Spenser Kao" <spenserkao at o...> wrote:
> > Question on Java version antlr 2.7.1:
> > Is there any to pass OutputStream to Lexer constructor?
> >
> > I can pass an InputStream instance to the Lexer constructor; can I
> do
> > the same with OutputStream?
> > So far I can only redirect the o/p message to a file on the command
> > line, but passing an OutputStream onto Lexer on the fly will be
> more
> > flexible and it seems none of current Lexer constructors allows me
> to do
> > that.
> >
> > Any clue will be much appreciated!
> >
> > Regards,
> >
> > Spenser
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
--
Bob McWhirter bob at werken.com
The Werken Company http://werken.com/
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list