[antlr-interest] Generated Python Parser produces double try:

Matt matt at unformatt.com
Tue Oct 19 20:54:28 PDT 2010


I'm using antlr 3.1.2 jar on Windows.
The generated Parser.py has a double "try:" generated, but only one
"finally:".
This seems to happen for every "try" in the Parser.
This is not a problem of indents, but a problem of having unmatched
try/finally.

e.g.:

try:
    try:
        # some code

finally:
    pass


SHOULD BE:

try:
      # some code

finally:
    pass


OR:

try:
    try:
        # some code

    finally:
        pass
finally:
    pass


More information about the antlr-interest mailing list