Merge branch 'maint'

* origin/maint:
  NEWS: warnings with clang
  warnings: avoid warnings from clang
  tests: no longer disable -O compiler options
  yacc.c: initialize yylval in pure-parser mode
  skeletons: style changes
  lalr1.cc: document exception safety
  lalr1.cc: check exception safety of error handling
  lalr1.cc: check (and fix) %printer exception safety
  lalr1.cc: check (and fix) %initial-action exception safety
  lalr1.cc: fix exception safety
  lalr1.cc: check exception safety.
  lalr1.cc: indentation fixes.
  lalr1.cc: don't leave macros define to nothing
  tests: minor improvements
  tests: use $PERL instead of perl
  build: look for Perl in configure.
  tests: fix sed portability issues
  tests: diff -u is not portable

Conflicts:
	data/c.m4
	data/glr.c
	data/lalr1.cc
	data/yacc.c
	doc/Makefile.am
	tests/atlocal.in
	tests/calc.at
This commit is contained in:
Akim Demaille
2012-10-10 17:31:25 +02:00
18 changed files with 388 additions and 71 deletions

View File

@@ -4783,6 +4783,10 @@ incoming terminals during the second phase of error recovery,
the current lookahead and the entire stack (except the current
right-hand side symbols) when the parser returns immediately, and
@item
the current lookahead and the entire stack (including the current right-hand
side symbols) when the C++ parser (@file{lalr1.cc}) catches an exception in
@code{parse},
@item
the start symbol, when the parser succeeds.
@end itemize
@@ -9888,6 +9892,11 @@ Instantiate a syntax-error exception.
@deftypemethod {parser} {int} parse ()
Run the syntactic analysis, and return 0 on success, 1 otherwise.
@cindex exceptions
The whole function is wrapped in a @code{try}/@code{catch} block, so that
when an exception is thrown, the @code{%destructor}s are called to release
the lookahead symbol, and the symbols pushed on the stack.
@end deftypemethod
@deftypemethod {parser} {std::ostream&} debug_stream ()