[antlr-interest] Using ANTLR parser with JFlex lexer
Jason
jasonriz at yahoo.com
Thu Apr 13 11:47:50 PDT 2006
Thanks Bryan (and everyone else who responded). It
actually turned out to be pretty easy to get things
working. I just created a dummy Lexer which
implemented TokenStream and held a reference to the
jflex lexer. From within nextToken( ), the 'dummy'
lexer calls yylex( ) and turns the result into an
antlr.Token. I just realized that my original email
indicated I was using flex and not jflex which implied
that my target language was c++ when it's actually
java. The cpp stuff is probably still worth looking
at though and I'll check it out as I start to clean
the code up.
-jason
--- Bryan Ewbank <ewbank at gmail.com> wrote:
> I am using flex; I started with the example in the
> cpp subdir, and it was
> pretty straightforward.
>
> > Hello,
> > >
> > > I'm interested in the possibility of using the
> antlr
> > > parser in conjunction with the Flex lexer. I'm
> pretty
> > > sure that this is possible. Has anyone ever
> done it?
> > > Is there some sample code anywhere? I spent
> some time
> > > poking around the antlr site and found a lot of
> > > helpful information but nothing about this use
> case
> > > specifically. Thanks in advance for any replies
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the antlr-interest
mailing list