mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
glr.cc: support syntax_error exceptions
Kindly requested by Аскар Сафин (Askar Safin). http://lists.gnu.org/archive/html/bug-bison/2018-12/msg00033.html * data/skeletons/glr.c (b4_glr_cc_if): New. Use it. (yygetToken): Catch syntax_errors. * data/skeletons/glr.cc (YY_EXCEPTIONS): New. * tests/c++.at: Check it.
This commit is contained in:
@@ -163,8 +163,7 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
|
||||
}
|
||||
|
||||
]b4_parser_class_name::~b4_parser_class_name[ ()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
int
|
||||
]b4_parser_class_name[::operator() ()
|
||||
@@ -257,6 +256,15 @@ b4_percent_code_get([[requires]])[
|
||||
|
||||
]b4_null_define[
|
||||
|
||||
// Whether we are compiled with exception support.
|
||||
#ifndef YY_EXCEPTIONS
|
||||
# if defined __GNUC__ && !defined __EXCEPTIONS
|
||||
# define YY_EXCEPTIONS 0
|
||||
# else
|
||||
# define YY_EXCEPTIONS 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
]b4_YYDEBUG_define[
|
||||
|
||||
]b4_namespace_open[
|
||||
|
||||
Reference in New Issue
Block a user