]> git.saurik.com Git - bison.git/commit - ChangeLog-2012
lalr1.cc: syntax_error as exceptions.
authorAkim Demaille <demaille@gostai.com>
Tue, 8 Sep 2009 20:00:13 +0000 (22:00 +0200)
committerAkim Demaille <demaille@gostai.com>
Wed, 9 Sep 2009 14:38:40 +0000 (16:38 +0200)
commitff601366544d2cb2218c80e37083a88c6102061c
treed09bf675061c21908fd507fa554978e90c65329d
parent2966006237cce1132f8fb4eca2ac9933b431eb51
lalr1.cc: syntax_error as exceptions.

It is common to use sort of factories in the user actions.  These
factories may check some "syntactic" constraints that are not
enforced by the grammar itself.  This is possible using YYERROR
within the action itself.  Provide the user with a means to throw
a syntax_error exception.

* data/c++.m4 (b4_public_types_declare, b4_public_types_define):
Declare and define yy::parser::syntax_error.
* data/lalr1.cc: Include stdexcept.
(yy::parser::parse): Wrap the user action within a try/catch.
* data/glr.cc: Include stdexcept.
ChangeLog
data/c++.m4
data/glr.cc
data/lalr1.cc