YY_PERSER_SKELETON.syntax_error
Thomas Beale <thomas-JBqMug/[email protected]>
| Newsgroups | gmane.comp.lang.eiffel.gobo.general |
|---|---|
| Message-ID | <[email protected]> |
Sorry if this has been asked before or fixed; I am currently offline and
cannot check any archives....
in YY_PERSER_SKELETON, the definition of syntax_error is as follows:
syntax_error: BOOLEAN is
-- Has last parsing been unsuccesful?
do
Result := yy_parsing_status /= yyaccepted
end
However, this means that syntax_error returns True even if no parsing
has yet been done, since just after creation, yy_parsing_status = 0, not
yyAccepted (I just tested this, to be sure). The solution would seem to
be to change the above routine to allow for either value. The problem
cause is that even if you do a reset (and recover) on the parser after a
syntax error, syntax_error always returns True, and the parser won't run
any more.
The version I am looking at is the 3.4 version shipped with EiffelStudio
5.6 for Windows.
- thomas beale
--
___________________________________________________________________________________
CTO Ocean Informatics (http://www.OceanInformatics.biz)
Research Fellow, University College London (http://www.chime.ucl.ac.uk)
Chair Architectural Review Board, openEHR (http://www.openEHR.org)