Hi!

We always let btyacc nicely handle parser backtracking alone but seems
in some cases we should not let it.

CORE-6068 is such a case. Parser enters in near-infinite loop allocating
and freeing memory trying new paths.

Based on the short btyacc documentation, YYVALID should be used to fix
these cases.

I've put it here and the problem is gone:

-----
%type <stmtNode> proc_statement
proc_statement
        : simple_proc_statement ';' [YYVALID;]
                { $$ = newNode<LineColumnNode>(YYPOSNARG(1).firstLine,
YYPOSNARG(1).firstColumn, $1); }
        | complex_proc_statement [YYVALID;]
                { $$ = newNode<LineColumnNode>(YYPOSNARG(1).firstLine,
YYPOSNARG(1).firstColumn, $1); }
        ;
-----

Do you see any problem to stop backtracking on these places?


Adriano


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to