Bug reports for Python ANTLR 4.4.1

41 views
Skip to first unread message

Harry Terzian

unread,
Sep 23, 2014, 5:41:50 AM9/23/14
to antlr-di...@googlegroups.com
Hello,

I sometimes get problems with the generated Python 2.7 code version of ANTLR 4.4.1, where can I post bug reports for these?

When inheriting from the Parser class the generated python code does not add a self. when calling parent methods,
it simply tries to call the method which doesnt exist in Python but that calling convention would have worked in Java.

i.e.:
                    localctx.filename = matchWildcard()
had to be changed to
                    localctx.filename = self.matchWildcard()

The second issue I see is that there is a method called setState(statenumber) which gets generated however there is no public setter for state therefore
the following:

                     setState(41);
was changed to:
                     self.state = 41 (without the semicolon ; at the end)

Terence Parr

unread,
Sep 23, 2014, 11:36:09 AM9/23/14
to antlr-di...@googlegroups.com

On Sep 23, 2014, at 2:41 AM, Harry Terzian <terzia...@gmail.com> wrote:

> Hello,
>
> I sometimes get problems with the generated Python 2.7 code version of ANTLR 4.4.1, where can I post bug reports for these?

https://github.com/antlr/antlr4-python2

Ter
Reply all
Reply to author
Forward
0 new messages