[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: page fault when YYFAIL explicitly called
From: |
Stanislav Lang |
Subject: |
Re: page fault when YYFAIL explicitly called |
Date: |
Fri, 15 Nov 2013 21:20:57 +0100 (CET) |
The problem was, that when YYFAIL was called, there was printed a default
message (if verbose option was set to 1) into console in form eg (
"unexpected token END_OF_LINE there was expected token ENDIF or ELSEIF",
etc.), but YYERROR did not support this default messages in version 2.4.
It would be good for me, to have an option to enable this default error
messages in YYERROR. Now I try to use Bison 3 int the next step, and I will
see. It will be better, when we will talk about the last version, I did not
try it yet.
The main purpose of my message was, that if you would make a revision for
version 2.4, that there was a small problem, that is easy to remove (only
set yylen=0 on the beginning of YYFAIL routine).
On the other side, it is not big problem for my code, I can solve it.
Thanks
Stanislav
"Hi Stanislav,
Please keep the list in CC, for the records.
Le 8 nov. 2013 à 20:04, Stanislav Lang <address@hidden> a écrit :
> Thanks for the answer...
> i know that it is recommended to use YYERROR, because it is more effective
and safe. But YYFAIL prints informations about that, which token appeared
and which token was expected.
How about calling yyerror yourself?
> When YYFAIL will be not more supported, it is not so big problem, I will
make some extension for yyerror function, to be able to print informations
about tokens. Or will be this functionality made for some next version of
Bison by Bison team?
Actually YYFAIL is already removed in Bison 3.0. Could you
describe what feature you'd like to see? Often when one wants
to raise a syntax error, one can forge better error messages
that the default ones. That's why, imho, YYFAIL was not so
much used."