[antlr-interest] StringTemplate: Infinite Recursion in anonymous
conditional template.
Terence Parr
parrt at cs.usfca.edu
Thu Apr 27 09:58:02 PDT 2006
On Apr 21, 2006, at 3:18 PM, Swapnil Kashikar wrote:
> Hi,
>
> I am parsing PL/SQL code using antlr and transforming it using
> StringTemplate 2.3b6 .
> Could someone please help me with fixing the error below (Obtained
> with the setLintMode output from stringtemplate):
> ------------
> exception: java.lang.IllegalStateException: infinite recursion to
> <anonymous([s])@9> referenced in <plsql_block([type_declaration,
> functions, procedures, code, exception_handlers, into_clause, pb])
> @104>; stack trace:
> <anonymous([s])@9>, references=[s, s, LPAREN]>
> <plsql_block([type_declaration, functions, procedures, code,
> exception_handlers, into_clause, pb])@104>, attributes=
> [code=<statement()@105>, pb], references=[LPAREN, type_declaration,
> functions, procedures, code]>
> <else_subtemplate([])@138>, references=[s, LPAREN]>
> <anonymous([s])@9> (start of recursive cycle)
> ...
> ------------
This means that somehow an inner block contains itself. Mostly
likely a cycle in your data structure injected into the tempaltes.
Can u print them not using ST correctly (using a recursive routine)?
Ter
More information about the antlr-interest
mailing list