]> git.saurik.com Git - bison.git/log
bison.git
12 years agoc++: coding style fixes
Akim Demaille [Thu, 20 Sep 2012 15:16:36 +0000 (17:16 +0200)] 
c++: coding style fixes

* data/lalr1.cc, tests/c++.at: Formatting changes.

12 years agoRevert "introduced a GCC-like -Werror=type"
Akim Demaille [Fri, 21 Sep 2012 07:15:45 +0000 (09:15 +0200)] 
Revert "introduced a GCC-like -Werror=type"

This reverts commit 981c53e257f1974854edc4f6ad0e88c7f18e2bea.

12 years agoRevert "made previous commit less hairy"
Akim Demaille [Fri, 21 Sep 2012 07:15:37 +0000 (09:15 +0200)] 
Revert "made previous commit less hairy"

This reverts commit fd01e1d05ea3e627033d148b5400b99a18ac7ba3.

12 years agoRevert "new Werror report format fixed in a test"
Akim Demaille [Fri, 21 Sep 2012 07:15:25 +0000 (09:15 +0200)] 
Revert "new Werror report format fixed in a test"

This reverts commit 41511178a71ebaf81bde7ffc682c575537af45cb.

12 years agonew Werror report format fixed in a test
Theophile Ranquet [Fri, 21 Sep 2012 03:04:43 +0000 (05:04 +0200)] 
new Werror report format fixed in a test

* tests/input.at : replaced [-Wyacc] with [-Werror=yacc]

todo: fix the other failed test of the suite, tests/conflicts.at:1554

12 years agomade previous commit less hairy
Theophile Ranquet [Fri, 21 Sep 2012 03:00:32 +0000 (05:00 +0200)] 
made previous commit less hairy

* src/getargs.c : here

12 years agointroduced a GCC-like -Werror=type
Theophile Ranquet [Thu, 20 Sep 2012 10:21:28 +0000 (12:21 +0200)] 
introduced a GCC-like -Werror=type

* src/complain.h : errors_flag variable
* src/complain.c : actual stuff happens here
* src/conflits.c : differentiated SR and RR conflicts
* src/getargs.c : flags_argmatch recognizes the new -Werror format

12 years agoregen
Akim Demaille [Tue, 4 Sep 2012 16:53:45 +0000 (18:53 +0200)] 
regen

12 years agoMerge remote-tracking branch 'origin/maint'
Akim Demaille [Tue, 4 Sep 2012 16:51:55 +0000 (18:51 +0200)] 
Merge remote-tracking branch 'origin/maint'

* origin/maint:
  maint: remove useless file
  update files to ignore
  remove useless include
  use locale-indep. c_is* functions for parsing, not isspace, isprint etc
  gnulib: update
  --help: include a place to report translation issues
  tests: style changes
  tests: fix push-pull test
  yacc.c: style changes

Conflicts:
src/system.h

12 years agomaint: remove useless file
Akim Demaille [Tue, 4 Sep 2012 08:58:23 +0000 (10:58 +0200)] 
maint: remove useless file

* externals/bootstrap.cfg: Remove.
This file was used by a specific build system.
It was added to the master repository by accident.

12 years agoupdate files to ignore
Akim Demaille [Tue, 4 Sep 2012 08:48:26 +0000 (10:48 +0200)] 
update files to ignore

* doc/.gitignore: Don't ignore split info files as we don't split our
info file.
See <http://lists.gnu.org/archive/html/bug-bison/2012-08/msg00006.html>.

12 years agoremove useless include
Akim Demaille [Tue, 4 Sep 2012 07:49:17 +0000 (09:49 +0200)] 
remove useless include

* src/system.h: Don't include sys/types.h.
Reported by Eric Blake,
<http://lists.gnu.org/archive/html/bug-bison/2012-09/msg00002.html>.
(FUNCTION_PRINT): Remove, unused.

12 years agouse locale-indep. c_is* functions for parsing, not isspace, isprint etc
Jim Meyering [Sun, 5 Aug 2012 11:28:01 +0000 (13:28 +0200)] 
use locale-indep. c_is* functions for parsing, not isspace, isprint etc

* src/parse-gram.y: Include "c-ctype.h".
(add_param): Parse with c_isspace, not isspace.
* src/parse-gram.c: Likewise.
* src/scan-gram.l: Include c-ctype.h, not ctype.h.
(SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER): Use c_isspace and c_isprint,
not ctype.h's locale-dependent functions.

12 years agognulib: update
Akim Demaille [Mon, 3 Sep 2012 08:56:54 +0000 (10:56 +0200)] 
gnulib: update

12 years ago--help: include a place to report translation issues
Akim Demaille [Fri, 31 Aug 2012 16:18:13 +0000 (18:18 +0200)] 
--help: include a place to report translation issues

http://lists.gnu.org/archive/html/bug-bison/2012-08/msg00007.html
shows that it is useful to help users report translation issues.
While at it, include other informative bits that the coreutils shows.

* src/getargs.c (usage): Report more URLs where the user can
refer to.
Mostly copied/pasted from coreutils' emit_ancillary_info function.

12 years agonews: style changes
Akim Demaille [Wed, 22 Aug 2012 10:31:41 +0000 (12:31 +0200)] 
news: style changes

* NEWS: Minor improvements.

12 years agouse -Wdeprecated for obsolete %define variable names
Akim Demaille [Mon, 20 Aug 2012 07:54:40 +0000 (09:54 +0200)] 
use -Wdeprecated for obsolete %define variable names

* src/muscle-tab.c (muscle_percent_variable_update): Here.
* tests/input.at (%define backward compatibility): Update expectations.

12 years agointroduce -Wdeprecated
Akim Demaille [Mon, 20 Aug 2012 07:29:05 +0000 (09:29 +0200)] 
introduce -Wdeprecated

GCC seems to be using "deprecated" consistently over "obsoleted", so
use -Wdeprecated rather than -Wobsolete.

* src/complain.h (warnings): Add Wdeprecated.
* src/complain.c (warnings_print_categories): Adjust.
* src/getargs.c: Likewise.
* doc/bison.texi: Document it.

* src/scan-code.l: Use this category for the trailing ';' support.
* tests/actions.at: Adjust expected output.

12 years agoundefined but unused is a warning
Akim Demaille [Wed, 15 Aug 2012 07:44:34 +0000 (09:44 +0200)] 
undefined but unused is a warning

* src/symtab.c (symbol_check_defined): Undeclared symbols are only
a warning.
* tests/input.at (Undeclared symbols used for a printer or destructor):
Rename as...
(Undefined symbols): this, and check this case.
* NEWS: Doc it.

12 years agoglr.cc: %defines is no longer mandatory
Akim Demaille [Wed, 15 Aug 2012 06:46:54 +0000 (08:46 +0200)] 
glr.cc: %defines is no longer mandatory

* data/glr.cc: No longer require %defines.
When it is not given, define the position and location classes instead
of including their headers.
(b4_shared_declarations): Use the original parse-params.
* data/glr.c (b4_shared_declarations): Define only if undefined.
* tests/actions.at, tests/calc.at: No longer force the use of %defines
for glr.cc.
* NEWS: Doc it.

12 years agotodo: check push parsers
Akim Demaille [Mon, 3 Sep 2012 14:19:00 +0000 (16:19 +0200)] 
todo: check push parsers

12 years agostyle: remove useless C++ provisio
Akim Demaille [Mon, 20 Aug 2012 07:15:01 +0000 (09:15 +0200)] 
style: remove useless C++ provisio

* src/complain.h: here.

12 years agoparser: style changes
Akim Demaille [Mon, 20 Aug 2012 07:09:43 +0000 (09:09 +0200)] 
parser: style changes

* src/parse-gram.y: Avoid deprecated directives.

12 years agodoc: address a fixme
Akim Demaille [Mon, 20 Aug 2012 07:09:04 +0000 (09:09 +0200)] 
doc: address a fixme

* doc/bison.texi (Calc++ Parser): Add a cross-reference.

12 years agostyle changes
Akim Demaille [Tue, 14 Aug 2012 08:04:27 +0000 (10:04 +0200)] 
style changes

* data/glr.cc, tests/actions.at: Fix comments.
* src/symtab.h, src/symtab.c: Fix indentation/comments.
* src/symlist.c: Fix indentation.

12 years agotests: style changes
Akim Demaille [Wed, 22 Aug 2012 12:26:26 +0000 (14:26 +0200)] 
tests: style changes

* tests/torture.at (AT_DATA_STACK_TORTURE): M4 style changes to
improve readability.
Fix an assertion which, because of a <= instead of ==, did not check
new_status as visibly meant.
(get_args): New.

12 years agotests: fix push-pull test
Akim Demaille [Wed, 22 Aug 2012 11:48:55 +0000 (13:48 +0200)] 
tests: fix push-pull test

* tests/torture.at: %push-pull-parser is no longer supported.

12 years agoyacc.c: style changes
Akim Demaille [Fri, 31 Aug 2012 15:50:31 +0000 (17:50 +0200)] 
yacc.c: style changes

* data/yacc.c: (yytoken): Define with initial value.

12 years agorefactoring: define variables with a value
Akim Demaille [Sat, 11 Aug 2012 07:44:17 +0000 (09:44 +0200)] 
refactoring: define variables with a value

* src/muscle-tab.c: Where possible, fuse definition and initial assignment.

12 years agominor refactoring: shorten variable names
Akim Demaille [Sat, 11 Aug 2012 07:16:08 +0000 (09:16 +0200)] 
minor refactoring: shorten variable names

* src/scan-skel.l (at_directive_argc, at_directive_argv)
(AT_DIRECTIVE_ARGC_MAX): Rename as...
(argc, argv, ARGC_MAX): these, as there is no possible confusion.
(flags): New.
(QPUTS): Remove, inline its only use.

12 years agoobstacks: simplifications
Akim Demaille [Sat, 11 Aug 2012 07:02:19 +0000 (09:02 +0200)] 
obstacks: simplifications

* src/system.h (obstack_finish0): New.
Use it to simplify several uses.
* src/muscle-tab.h (MUSCLE_INSERTF): New.
* src/muscle-tab.c: Use obstack_printf where simpler.

12 years agominor refactoring in user code scanning
Akim Demaille [Fri, 10 Aug 2012 08:11:32 +0000 (10:11 +0200)] 
minor refactoring in user code scanning

* src/scan-code.l (show_sub_message, show_sub_messages): Instead of a
Boolean, take a "warnings" argument.
Avoid storing printf-like format strings in a variable, so that GCC
can check them.

12 years agominor refactoring in user code scanning
Akim Demaille [Fri, 10 Aug 2012 08:02:16 +0000 (10:02 +0200)] 
minor refactoring in user code scanning

* src/scan-code.l (show_sub_message): New, extracted from...
(show_sub_messages): here.

12 years agotests: strengthen the trailing spaces check
Akim Demaille [Fri, 3 Aug 2012 09:16:03 +0000 (11:16 +0200)] 
tests: strengthen the trailing spaces check

* tests/calc.at: here.
* data/glr.c: Fix accordingly.

12 years agoregen
Akim Demaille [Fri, 3 Aug 2012 09:09:22 +0000 (11:09 +0200)] 
regen

12 years agoMerge branch 'maint'
Akim Demaille [Fri, 3 Aug 2012 08:52:55 +0000 (10:52 +0200)] 
Merge branch 'maint'

* origin/maint:
  maint: post-release administrivia
  version 2.6.2
  NEWS: update.
  yacc: remove trailing end of line at end of file
  thanks: fix a contributor name
  gnulib: update
  tests: synch line -> syncline, for consistency
  tests: synclines: style changes
  tests: synclines: fix perl invocation
  regen
  c++: trailing end-of-lines in %parse-param
  tests: simplify

Conflicts:
cfg.mk
data/glr.cc
data/yacc.c
src/parse-gram.c
src/parse-gram.h
src/parse-gram.y

12 years agoregen
Akim Demaille [Fri, 3 Aug 2012 06:13:11 +0000 (08:13 +0200)] 
regen

12 years agoremove support for lint
Akim Demaille [Fri, 3 Aug 2012 06:03:03 +0000 (08:03 +0200)] 
remove support for lint

Basically revert commit 12ce2df60d16961eaa03a5aa009eeaa645e4e1cb.
http://lists.gnu.org/archive/html/bison-patches/2012-08/msg00004.html

* data/c.m4, data/glr.c, data/yacc.c (YYID): Remove.
No longer use ARGSUSED.
* src/getargs.c: Restore simpler inclusion of getopt.h (anyway, since
then we now use gnulib which certainly protects us from such issues).

12 years agoskeletons: renamings after knr removal
Akim Demaille [Thu, 2 Aug 2012 13:13:00 +0000 (15:13 +0200)] 
skeletons: renamings after knr removal

* data/c.m4 (b4_yydestruct_generate, b4_yy_symbol_print_generate):
Rename as...
(b4_yydestruct_define, b4_yy_symbol_print_define): these, for consistency.
* data/glr.c, data/glr.cc, data/yacc.c: Adjust.

12 years agomaint: post-release administrivia
Akim Demaille [Fri, 3 Aug 2012 07:52:05 +0000 (09:52 +0200)] 
maint: post-release administrivia

* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.

12 years agoversion 2.6.2 v2.6.2
Akim Demaille [Fri, 3 Aug 2012 07:43:02 +0000 (09:43 +0200)] 
version 2.6.2

* NEWS: Record release date.

12 years agoc++: fix a comment
Akim Demaille [Thu, 2 Aug 2012 12:19:40 +0000 (14:19 +0200)] 
c++: fix a comment

* data/c++.m4: Be sure to attach a ';' to its declaration, otherwise
it appears in the preceding comment.

12 years agoskeletons: simplify after knr removal
Akim Demaille [Thu, 2 Aug 2012 12:11:07 +0000 (14:11 +0200)] 
skeletons: simplify after knr removal

* data/c.m4 (b4_yydestruct_generate, b4_yy_symbol_print_generate):
They no longer need an argument, it has a single possible value.
* data/glr.c, data/yacc.c: Adjust.

12 years agoskeletons: renamings after knr removal
Akim Demaille [Thu, 2 Aug 2012 12:11:04 +0000 (14:11 +0200)] 
skeletons: renamings after knr removal

* data/c.m4 (b4_c_comment_, b4_c_args, b4_c_function_def)
(b4_c_function_decl, b4_c_formals, b4_c_call, b4_c_arg): Rename as...
(b4_comment, b4_args, b4_function_define, b4_function_declare,
b4_formals, b4_function_call, b4_arg): these.
* data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c: Adjust.

12 years agoskeletons: b4_args -> b4_join to prepare forthcoming changes
Akim Demaille [Thu, 2 Aug 2012 12:24:15 +0000 (14:24 +0200)] 
skeletons: b4_args -> b4_join to prepare forthcoming changes

* data/bison.m4 (b4_args, _b4_args): Rename as...
(b4_join, _b4_join): these.
* data/c++.m4, data/lalr1.cc, data/variant.hh: Adjust.

12 years agoregen
Akim Demaille [Thu, 2 Aug 2012 11:55:39 +0000 (13:55 +0200)] 
regen

12 years agoYYPARSE_PARAM: drop support
Akim Demaille [Thu, 2 Aug 2012 09:59:12 +0000 (11:59 +0200)] 
YYPARSE_PARAM: drop support

* data/yacc.c: No longer support it.
* doc/bison.texi, tests/headers.at: Adjust.
* NEWS: Document.

12 years agoskeletons: remove K&R C support
Akim Demaille [Thu, 2 Aug 2012 06:49:21 +0000 (08:49 +0200)] 
skeletons: remove K&R C support

* data/c.m4 (b4_c_modern, b4_c_knr_formal_names, b4_c_knr_formal_decls)
(b4_c_knr_formal_decl, b4_c_formal_names, b4_c_formal_decls)
(b4_c_formal_decl): Remove.
(b4_c_ansi_formal_names, b4_c_ansi_formal_decls, b4_c_ansi_formal_decl):
Rename as...
(b4_c_formal_names, b4_c_formal_decls, b4_c_formal_decl):
these.
* data/glr.c, data/glr.cc, data/yacc.c: Adjust.

12 years agoNEWS: update.
Akim Demaille [Thu, 2 Aug 2012 11:51:17 +0000 (13:51 +0200)] 
NEWS: update.

* NEWS: Catch up with the other changes from 2.6.1.

12 years agoyacc: remove trailing end of line at end of file
Akim Demaille [Thu, 2 Aug 2012 10:01:54 +0000 (12:01 +0200)] 
yacc: remove trailing end of line at end of file

There are still spurious spaces at the end of some lines.  But this is
addressed in the master branch, and I am reluctant to try to backport
this.

* data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: here.
* tests/calc.at (AT_CHECK_SPACES): New.
Use it.
Be sure not to introduce trailing empty lines in the *.y files.
* NEWS: Doc it.
* cfg.mk (syntax-check): Remove the exception.

12 years agothanks: fix a contributor name
Akim Demaille [Thu, 2 Aug 2012 06:29:18 +0000 (08:29 +0200)] 
thanks: fix a contributor name

* THANKS: On his request.

12 years agognulib: update
Akim Demaille [Wed, 1 Aug 2012 07:59:49 +0000 (09:59 +0200)] 
gnulib: update

12 years agotests: synch line -> syncline, for consistency
Akim Demaille [Wed, 1 Aug 2012 06:27:28 +0000 (08:27 +0200)] 
tests: synch line -> syncline, for consistency

* tests/synclines.at: Do it, as "syncline" is used consistently
everywhere else in Bison.

12 years agotests: synclines: style changes
Akim Demaille [Wed, 1 Aug 2012 07:30:27 +0000 (09:30 +0200)] 
tests: synclines: style changes

* tests/synclines.at (AT_TEST_SYNCLINE): Rename as...
(AT_TEST): this.
Use pushdef/popdef.
Formatting changes.
Use '+' instead of '*' where appropriate.

12 years agotests: synclines: fix perl invocation
Akim Demaille [Wed, 1 Aug 2012 07:30:23 +0000 (09:30 +0200)] 
tests: synclines: fix perl invocation

Reported by Summum Bonum.

* tests/synclines.at: Fix Perl invocation: its -f is not like sed's.

12 years agoregen
Akim Demaille [Tue, 31 Jul 2012 12:18:43 +0000 (14:18 +0200)] 
regen

12 years agoc++: trailing end-of-lines in %parse-param
Akim Demaille [Tue, 31 Jul 2012 12:18:39 +0000 (14:18 +0200)] 
c++: trailing end-of-lines in %parse-param

* src/parse-gram.y (add_param): No only skip ' ' and '\t', skip all
leading and trailing spaces.
* tests/regression.at (Lex and parse params): Check it.
* NEWS: Document it.

12 years agotests: simplify
Akim Demaille [Tue, 31 Jul 2012 12:29:39 +0000 (14:29 +0200)] 
tests: simplify

* tests/regression.at: Remove useless compilations: AT_FULL_COMPILE
includes the compilation by bison.

12 years agotodo: more items
Akim Demaille [Tue, 31 Jul 2012 11:19:45 +0000 (13:19 +0200)] 
todo: more items

* TODO: $ in the epilogue, and obstack_copy.

12 years agoMerge branch 'maint'
Akim Demaille [Tue, 31 Jul 2012 09:50:18 +0000 (11:50 +0200)] 
Merge branch 'maint'

* maint:
  use obstack_printf
  scanner: restore a missing start condition
  gnulib: update
  maint: post-release administrivia
  version 2.6.1
  gnulib: update
  maint: fix some syntax-check issues
  tests: do not depend on __cplusplus to decide for C++ or C output

Conflicts:
NEWS
bootstrap.conf
cfg.mk
lib/.gitignore

12 years agotests: comment changes
Akim Demaille [Tue, 31 Jul 2012 09:14:23 +0000 (11:14 +0200)] 
tests: comment changes

* tests/actions.at, tests/input.at: here.

12 years agotests: really check the set of generated files
Akim Demaille [Mon, 30 Jul 2012 15:24:14 +0000 (17:24 +0200)] 
tests: really check the set of generated files

* tests/output.at (AT_CHECK_OUTPUT): It used to check that the
expected files are indeed generated, but it did not check that
there are no additional ones.
Do that, and adjust expectations (in particular alphabetical order).

12 years agolalr1.cc: do not create stack.hh without %defines
Akim Demaille [Mon, 30 Jul 2012 14:51:29 +0000 (16:51 +0200)] 
lalr1.cc: do not create stack.hh without %defines

* data/stack.hh (b4_stack_define): New.
* data/lalr1.cc: Use it when %defines is not passed.
* tests/output.at: Adjust expected output.

12 years agolalr1.cc: location.hh and position.hh are not generated without %defines
Akim Demaille [Mon, 30 Jul 2012 14:37:02 +0000 (16:37 +0200)] 
lalr1.cc: location.hh and position.hh are not generated without %defines

* data/location.cc (b4_position_define, b4_location_define): New.
(location.hh, position.hh): Generate only if %defines.
* data/lalr1.cc: therefore, define these classes when locations are
needed, but headers are not generated.
* tests/output.at: Check that these files are not generated.
* NEWS: Document.

12 years agolalr1.cc: no longer require %defines.
Akim Demaille [Mon, 30 Jul 2012 13:49:28 +0000 (15:49 +0200)] 
lalr1.cc: no longer require %defines.

* data/lalr1.cc: Generate the parser header only when %defines is
passed.
* tests/calc.at: Check it.

12 years agoskeletons: style changes
Akim Demaille [Mon, 30 Jul 2012 13:32:29 +0000 (15:32 +0200)] 
skeletons: style changes

* data/glr.c, data/lalr1.cc: Use more consistent comments,
and YY_NULL declaration.

12 years agoglr.cc, lalr1.cc: define b4_shared_declarations
Akim Demaille [Mon, 30 Jul 2012 13:30:31 +0000 (15:30 +0200)] 
glr.cc, lalr1.cc: define b4_shared_declarations

* data/glr.cc, data/lalr1.cc: here.
The name is no longer right, but at least it is consistent with
the other skeletons.

12 years agoglr.cc: no longer require location support
Akim Demaille [Mon, 30 Jul 2012 12:40:18 +0000 (14:40 +0200)] 
glr.cc: no longer require location support

* data/glr.cc: Use b4_locations_if where appropriate.
* data/lalr1.cc: M4 quotation changes to highlight code duplication
with glr.cc.
* tests/calc.at: Check glr.cc with and without %location.
While at it, fuse multiple %parse-params into one.
* tests/actions.at: Simplify.
* NEWS: Doc this.
Some other wording changes.

12 years agouse obstack_printf
Akim Demaille [Mon, 30 Jul 2012 16:05:10 +0000 (18:05 +0200)] 
use obstack_printf

This is not just nicer, it is also much safer, since we were
using sprintf...

* bootstrap.conf: Require it.
* src/system.h (obstack_fgrow1, obstack_fgrow2, obstack_fgrow3)
(obstack_fgrow4): Remove.
Adjust dependencies.

12 years agoscanner: restore a missing start condition
Akim Demaille [Mon, 30 Jul 2012 12:54:27 +0000 (14:54 +0200)] 
scanner: restore a missing start condition

$ flex src/scan-skel.l
src/scan-skel.l:145: multiple <<EOF>> rules for start condition SC_AT_DIRECTIVE_ARGS
src/scan-skel.l:145: multiple <<EOF>> rules for start condition SC_AT_DIRECTIVE_SKIP_WS
This is warning, and it seems there are no means to make it an error.

* src/scan-skel.l: Restore the start-condition INITIAL for an <<EOF>>
clause.

12 years agognulib: update
Akim Demaille [Mon, 30 Jul 2012 12:53:58 +0000 (14:53 +0200)] 
gnulib: update

12 years agomaint: post-release administrivia
Akim Demaille [Mon, 30 Jul 2012 09:47:29 +0000 (11:47 +0200)] 
maint: post-release administrivia

* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.

12 years agoversion 2.6.1 v2.6.1
Akim Demaille [Mon, 30 Jul 2012 09:18:23 +0000 (11:18 +0200)] 
version 2.6.1

* NEWS: Record release date.

12 years agognulib: update
Akim Demaille [Mon, 30 Jul 2012 09:10:36 +0000 (11:10 +0200)] 
gnulib: update

12 years agomaint: fix some syntax-check issues
Akim Demaille [Fri, 27 Jul 2012 15:00:28 +0000 (17:00 +0200)] 
maint: fix some syntax-check issues

* cfg.mk: Nuke the following warnings which are confused by our
text reports (that state that the error token is number 256).
  prohibit_magic_number_exit
  ../../doc/bison.texi:8170:error (256)
  ../../tests/conflicts.at:570:error (256)
  ../../tests/conflicts.at:673:error (256)
  ../../tests/conflicts.at:811:error (256)
  ../../tests/conflicts.at:1154:error (256)
  ../../tests/regression.at:281:error (256)
  ../../tests/regression.at:582:error (256)
  maint.mk: use EXIT_* values rather than magic number

12 years agoregen
Akim Demaille [Fri, 27 Jul 2012 14:46:15 +0000 (16:46 +0200)] 
regen

12 years agotests: do not depend on __cplusplus to decide for C++ or C output
Akim Demaille [Fri, 27 Jul 2012 14:36:07 +0000 (16:36 +0200)] 
tests: do not depend on __cplusplus to decide for C++ or C output

Since we do support compiling C code with a C++ compiler.

* tests/actions.at (Qualified $$ in actions): Use AT_SKEL_CC_IF.

12 years agoMerge remote-tracking branch 'origin/maint'
Akim Demaille [Fri, 27 Jul 2012 14:22:45 +0000 (16:22 +0200)] 
Merge remote-tracking branch 'origin/maint'

* origin/maint: (29 commits)
  regen
  synclines: remove spurious empty line
  also support $<foo>$ in the %initial-action
  skeletons: b4_dollar_pushdef and popdef to simpify complex definitions
  regen
  printer/destructor: translate only once
  factor the handling of m4 escaping
  news: schedule the removal of the ";" hack
  style changes in the scanners
  regen
  support $<tag>$ in printers and destructors
  scan-code: factor the handling of the type in $<TYPE>$
  muscles: fix another occurrence of unescaped type name
  glr.cc: fix the handling of yydebug
  gnulib: update
  formatting changes
  tests: fix an assertion
  tests: adjust to GCC 4.8, which displays caret errors
  be sure to properly escape type names
  obstack_quote: escape and quote for M4
  muscles: shuffle responsabilities
  muscles: make private functions static
  muscles: rename private functions/macros
  obstack_escape: escape M4 characters
  remove dead macro
  maint: style changes
  doc: avoid problems with case insensitive file systems
  configure: fix botched quoting
  news: fix typo.

Conflicts:
NEWS
data/c.m4
data/glr.cc
data/lalr1.cc
examples/rpcalc/local.mk
src/muscle-tab.h
src/output.c
src/parse-gram.c
src/parse-gram.h
src/parse-gram.y
src/scan-code.l
src/symlist.c
src/symlist.h
src/symtab.h
tests/calc.at

12 years agoregen
Akim Demaille [Fri, 27 Jul 2012 12:52:55 +0000 (14:52 +0200)] 
regen

12 years agosynclines: remove spurious empty line
Akim Demaille [Fri, 27 Jul 2012 12:52:23 +0000 (14:52 +0200)] 
synclines: remove spurious empty line

* data/bison.m4 (b4_syncline): Do not start with an empty line.

12 years agoalso support $<foo>$ in the %initial-action
Akim Demaille [Fri, 27 Jul 2012 12:20:00 +0000 (14:20 +0200)] 
also support $<foo>$ in the %initial-action

scan-code.l is already passing argument to b4_dollar_dollar for the
initial acton, but its definition (of b4_dollar_dollar) does not use
this argument.

Generalize this definition, and use it for the %initial-action too.

* data/c.m4 (b4_dollar_dollar_, b4_dollar_pushdef, b4_dollar_popdef):
Instead of expecting a pointer, require a value, and use ".".
Since they are now generic enough, move to...
* data/c-like.m4: this new file.
* data/c.m4, data/java.m4: Load it.
* data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Use
b4_dollar_pushdef for the %initial-action.
* tests/actions.at: Check that.
* data/Makefile.am: Adjust.
* NEWS, doc/bison.texi: Document.

12 years agoskeletons: b4_dollar_pushdef and popdef to simpify complex definitions
Akim Demaille [Fri, 27 Jul 2012 11:47:24 +0000 (13:47 +0200)] 
skeletons: b4_dollar_pushdef and popdef to simpify complex definitions

M4 is really making it uselessly hard to define macros that define
macros.
* data/c.m4 (b4_dollar_pushdef, b4_dollar_popdef): New.
Use it.

12 years agoregen
Akim Demaille [Fri, 27 Jul 2012 10:53:46 +0000 (12:53 +0200)] 
regen

12 years agoprinter/destructor: translate only once
Akim Demaille [Fri, 27 Jul 2012 10:47:02 +0000 (12:47 +0200)] 
printer/destructor: translate only once

Currently "%printer {...} a b c d e f" translates the {...} six times.
Not only is this bad for time and space, it also issues six times the
same warnings.

* src/symlist.h, src/symlist.c (symbol_list_destructor_set)
(symbol_list_printer_set): Take the action as code_props instead of
const char *.
* src/parse-gram.y: Translate these actions here.
* src/scan-code.h: Comment change.
* tests/input.at: Check that warnings are issued only once.

12 years agofactor the handling of m4 escaping
Akim Demaille [Fri, 27 Jul 2012 09:22:22 +0000 (11:22 +0200)] 
factor the handling of m4 escaping

The conversion from @ to @@ and so forth is coded is too many
different places.  Factor, a bit.

* src/scan-code.l: Instead of duplicating the logic of obstack_escape,
use it.
It sure is less efficient, but the cost is negligible.
This allows to factor rules that are alike.
And to factor some start-condition clauses.
* tests/input.at (Stray $ or @): New.
* NEWS: Document it.

12 years agonews: schedule the removal of the ";" hack
Akim Demaille [Fri, 27 Jul 2012 10:19:01 +0000 (12:19 +0200)] 
news: schedule the removal of the ";" hack

scan-code.l is significantly more complex because of this.

* NEWS: Doc it.

12 years agostyle changes in the scanners
Akim Demaille [Fri, 27 Jul 2012 09:11:19 +0000 (11:11 +0200)] 
style changes in the scanners

* src/scan-code.l, src/scan-skel.l: Use a more traditional indentation
style for start-conditions.
Prefer "continue" to a comment, for empty actions.
Strip useless {}.
Remove useless start-condition clauses.

12 years agoregen
Akim Demaille [Thu, 26 Jul 2012 15:19:04 +0000 (17:19 +0200)] 
regen

12 years agosupport $<tag>$ in printers and destructors
Akim Demaille [Thu, 26 Jul 2012 14:52:35 +0000 (16:52 +0200)] 
support $<tag>$ in printers and destructors

* src/scan-code.l (SC_SYMBOL_ACTION): Accept $<tag>$, not just $$.
* data/c.m4 (b4_dollar_dollar_): New.
(b4_symbol_actions): Let b4_dollar_dollar use b4_dollar_dollar_.
* NEWS, doc/bison.texi: Document it.
* tests/actions.at: Check this for C and C++.

12 years agoscan-code: factor the handling of the type in $<TYPE>$
Akim Demaille [Thu, 26 Jul 2012 10:06:28 +0000 (12:06 +0200)] 
scan-code: factor the handling of the type in $<TYPE>$

* src/scan-code.l (fetch_type_name): New.
(handle_action_dollar): Use it.
(gt_ptr): Remove, useless.

12 years agomuscles: fix another occurrence of unescaped type name
Akim Demaille [Thu, 26 Jul 2012 12:41:55 +0000 (14:41 +0200)] 
muscles: fix another occurrence of unescaped type name

* src/output.c (quoted_output): Split into...
(quoted_output, string_output): these.
Use the former when outputting a type_name.
* tests/input.at: Check this case.
* src/symtab.h: Comment changes.

12 years agoglr.cc: fix the handling of yydebug
Akim Demaille [Thu, 26 Jul 2012 14:44:45 +0000 (16:44 +0200)] 
glr.cc: fix the handling of yydebug

* data/glr.cc (yydebug_): Remove, unused.
(set_debug_level, debug_level): Work on yydebug instead.
* doc/bison.texi, NEWS: Document this.

12 years agognulib: update
Akim Demaille [Thu, 26 Jul 2012 11:28:58 +0000 (13:28 +0200)] 
gnulib: update

12 years agoformatting changes
Akim Demaille [Thu, 26 Jul 2012 12:41:20 +0000 (14:41 +0200)] 
formatting changes

* src/symtab.h: here.

12 years agotests: fix an assertion
Akim Demaille [Thu, 26 Jul 2012 14:07:26 +0000 (16:07 +0200)] 
tests: fix an assertion

* tests/local.at (AT_YYLEX_DEFINE): Be sure to check the array
against its length, not its size in bytes.

12 years agotests: adjust to GCC 4.8, which displays caret errors
Akim Demaille [Thu, 26 Jul 2012 13:20:50 +0000 (15:20 +0200)] 
tests: adjust to GCC 4.8, which displays caret errors

With GCC 4.8, the tests on synclines are skipped.  Transform

  input.y:1:2: error: #error "1"
   #error "1"
    ^

into

  input.y:1: #error "1"

* tests/synclines.at (AT_SYNCLINES_COMPILE): Do it, using Perl instead of
sed.

12 years agobe sure to properly escape type names
Akim Demaille [Thu, 26 Jul 2012 10:14:50 +0000 (12:14 +0200)] 
be sure to properly escape type names

* src/scan-code.l: Use obstack_quote when passing type_name to m4.
* tests/input.at (Code injection): New.
* NEWS: Document it.
Thanks to Paul Eggert for the wording.

12 years agoobstack_quote: escape and quote for M4
Akim Demaille [Thu, 26 Jul 2012 10:12:38 +0000 (12:12 +0200)] 
obstack_quote: escape and quote for M4

* src/system.h (obstack_quote): New.
* src/muscle-tab.c: Use it instead of obstack_escape where applicable.
* src/scan-code.l: Since obstack_quote supports NULL, leave type_name
as NULL instead of defaulting to "".

12 years agomuscles: shuffle responsabilities
Akim Demaille [Thu, 26 Jul 2012 09:49:42 +0000 (11:49 +0200)] 
muscles: shuffle responsabilities

* src/muscle-tab.c (muscle_boundary_grow): Be in charge of quotation,
instead of leaving this to the caller.

12 years agomuscles: make private functions static
Akim Demaille [Thu, 26 Jul 2012 09:40:52 +0000 (11:40 +0200)] 
muscles: make private functions static

* src/muscle-tab.h, src/muscle-tab.c (muscle_boundary_grow)
(muscle_location_grow): Now static.