[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
No yy::parser::syntax_error if GLR
From: |
Askar Safin |
Subject: |
No yy::parser::syntax_error if GLR |
Date: |
Sat, 15 Dec 2018 23:38:45 +0300 |
Hi. I attempted to throw yy::parser::syntax_error from flex input file
scanner.lpp and failed. I used GLR bison parser. Here is test code:
https://paste.gg/p/anonymous/1d2fc78e88f444b0b8203bb3c20f8a53 . It seems
yy::parser::syntax_error doesn't work GLR. It seems there is no definition for
constructor and there is no code in parser for catching such exception.
So, please, fix. Or at least write in docs, that this is not supported. Of
course, manual should document all features not supported in GLR.
And please give some workaround. What should I call in scanner file in case of
error if I want GLR parser to exit gracefully and return non-zero from p.parse
()? The only way I see is to define some special token, say, _ERROR, and return
it from scanner in case of error.
==
Askar Safin
http://vk.com/safinaskar
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- No yy::parser::syntax_error if GLR,
Askar Safin <=