On 25/05/2019 07:24, Vlad Khorsun wrote:
>>
>> Do you see any problem to stop backtracking on these places?
> 
>   Usage of YYVALID seems as correct way to fix the problem, but... first
> explain
> please - why do you mark both rules as valid and why it solves the issue ?
> 
> Note, in test\t2.y above just one rule is marked and it looks logical
> for me.
> Probably i missed something. Could you point me ?
> 

As I understand, backtrack happens due to reduce/reduce conflicts and we
have 17 of then in the rules.

Problematic source is huge and error point is far from the start.

So as soon first error is detected, it starts to backtracking to a
previous point where a reduce/reduce conflict was choose and choose
another path. This leads to exponential tries going up to the first
reduce/reduce point (probably near of the statement start).

BTYACC has brackets rules than run in the first ("try") phase.

So [ YYVALID; ] run in this phase and marks that backtracking should not
goes back from this point. Generally speaking a statement end (the
places I put it) is a good point, as conflicts generally happens inside
of a statement.

Anyway, I think the fix should better be done for v4 first and only
latter backported to v3.


Adriano


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

Reply via email to