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

Matt matt at unformatt.com
Wed Nov 10 08:49:29 PST 2010


One last cry for help here - Anyone have *any* idea why a generator would be
inserting 2 try statements?

On Wed, Oct 27, 2010 at 2:25 PM, Matt <dopelogik at gmail.com> wrote:

> Any ideas on how I can debug this?
>
>
> On Tue, Oct 19, 2010 at 11:54 PM, Matt <matt at unformatt.com> wrote:
>
>> 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