[antlr-interest] ANTLR 2.7.5 release candidate 1 available
(nowwith python code gen!)
Kaleb Pederson
kibab at icehouse.net
Wed Dec 22 22:06:06 PST 2004
On Wednesday 22 December 2004 2:35 pm, wolfgang haefelinger wrote:
> Here's how to build, make, test and install:
[snip]
> Here I'm using a new build directory named "foobar". Any other
> name will do as well of course.
Thanks for the heads up.
I *had* to try the Python one as it will be very useful at work !! :) I
noticed the following, but won't have time to look into it much until after
the holidays. Nevertheless, here's what I found:
$ /usr/local/bin/antlr -traceLexer tinyc_l.g
ANTLR Parser Generator Version 2.7.5rc1 (20041222) 1989-2004 jGuru.com
tinyc_l.g:41: warning:lexical nondeterminism upon
tinyc_l.g:41: k==1:'*'
tinyc_l.g:41: k==2:'/'
tinyc_l.g:41: between alt 1 and exit branch of block
$ /usr/local/bin/antlr -traceParser tinyc_p.g
ANTLR Parser Generator Version 2.7.5rc1 (20041222) 1989-2004 jGuru.com
tinyc_p.g:99:17: warning:nondeterminism between alts 1 and 2 of block upon
tinyc_p.g:99:17: k==1:"else"
$ python tinyc_p.py < tinyc.in
Traceback (most recent call last):
File "tinyc_p.py", line 676, in ?
P.program()
File "/home/kibab/antlr-2.7.5rc1/examples/python/tinyc/tinyc_p.py", line 55,
in program
self.traceIn("program")
File "/usr/lib/python2.3/site-packages/antlr/antlr.py", line 1606, in
traceIn
self.trace("> ", rname)
File "/usr/lib/python2.3/site-packages/antlr/antlr.py", line 1590, in trace
self.traceIndent()
AttributeError: 'Parser' object has no attribute 'traceIndent'
And, when I don't build with -traceLexer or -traceParser:
$ python tinyc_p.py < tinyc.in
stop - no AST generated.
Hence, that's why I turned on traceLexer and traceParser. It's possible it's
in the docs and I missed it as I won't have time to read them until after the
holidays ;)
Finally, thank you for your work on this! I want[ed?] to be a part of the
antlr-3 Python port, but was waiting to hear that Terence was ready to get
started on it more.
Thanks.
--Kaleb
More information about the antlr-interest
mailing list