[antlr-interest] Lexer/Parser invocation
Bharath Sundararaman
Bharath.Sundararaman at starthis.com
Mon Jan 31 13:29:54 PST 2005
Hi all,
I am using ANTLR as my CC tool and I have a routine that passes source
code as a string to my compiler. The question is, if I did not want to
create instances of the lexer/parser every single time I pass a string,
how would I do it?
In other words, I want to avoid doing this every time:
Lexer l = new lexer("source code goes here");
Parser p = new Parser(l); // l is the Lexer object
Parser.topRule(); // top most rule
I use ANTLR in a Java based environment and I saw the following post on
the grp:
http://www.antlr.org/pipermail/antlr-interest/2004-June/008230.html
I could not find the method signatures listed in this post. For example,
the parser constructor seems to have a pointer (in C++) to a lexer and
symbol_information? (Slightly lost here)
Any ideas?
Thanks!
B.
-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Loring Craymer
Sent: Monday, January 31, 2005 1:45 AM
To: 'ANTLR Interest'
Subject: RE: [antlr-interest] ANTLR 3.0 is going to have Lexer as fast
as FLEX?
Ruslan--
Vern Paxson put many years into making flex as fast as humanly possible.
Doing as well would be difficult, especially since one of the design
goals
for ANTLR 3 is to maintain the human readability of generated code.
That said, ANTLR 3 lexers will be much faster than ANTLR 2 lexers; Ter
has
some data on that that I believe he posted to the list.
Ter has said "May" for early availability; however, that could change.
--Loring
> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Ruslan Zasukhin
> Sent: Sunday, January 30, 2005 10:58 PM
> To: 'ANTLR Interest'
> Subject: [antlr-interest] ANTLR 3.0 is going to have Lexer as fast as
FLEX
> ?
>
> Hi All,
>
> Anybody can confirm this ?
>
> It seems I have read talk about automates for Lexer 3.0
> This give a hope. :-)
>
> Any news when 3.0 should be ready ?
> When is expected its beta testing ?
>
>
> --
> Best regards,
> Ruslan Zasukhin [ I feel the need...the need for speed ]
> -------------------------------------------------------------
> e-mail: ruslan at paradigmasoft.com
> web: http://www.paradigmasoft.com
>
> To subscribe to the Valentina mail list go to:
> http://lists.macserve.net/mailman/listinfo/valentina
> -------------------------------------------------------------
More information about the antlr-interest
mailing list