Commit Graph

509 Commits

Author SHA1 Message Date
Akim Demaille
597afd73d7 news: prepare for 2.8
* NEWS: Restructure.
Name contributors.
2013-01-25 16:35:35 +01:00
Theophile Ranquet
8b4499ad04 news: typos
* NEWS: Fix a typo, use YYSTYPE rather than semantic_type.
2013-01-14 11:02:12 +01:00
Akim Demaille
7d6bad1959 maint: update copyright years
Suggested by Stefano Lattarini.
Run "make update-copyright".
2013-01-12 16:14:16 +01:00
Theophile Ranquet
016426c195 carets: document default activation
* NEWS: Announce it.
* doc/bison.texi: Adjust.
2013-01-11 19:11:21 +01:00
Theophile Ranquet
99d795e8f2 skel: better aliasing of identifiers
* data/glr.c, data/yacc.c: Avoid emitting useless defines.
* data/glr.cc: Restore prefixes for epilogue.
2013-01-11 18:57:09 +01:00
Akim Demaille
4119d1ea60 java: stype is obsoleted by api.value.type
This is consistent with the other %define variable names.

* data/java.m4: Use api.value.type instead of stype.
* doc/bison.texi, NEWS: Document that change.
* src/muscle-tab.c (muscle_percent_variable_update): Provide backward
compatibility.
* tests/java.at: Adjust.
2012-12-31 16:32:12 +01:00
Akim Demaille
40bb6f78f8 YYLEX_PARAM: drop support
* data/yacc.c, doc/bison.texi: Remove YYLEX_PARAM support.
* NEWS: Document it.
2012-12-26 10:38:59 +01:00
Akim Demaille
b9278c7d17 Merge branch 'origin/maint'
* origin/maint:
  maint: credit Wojciech Polak
  maint: post-release administrivia
  version 2.7
  yacc.c: scope reduction
  tests: C90 compliance
  fix C90 compliance
  glr.c: scope reduction
  gnulib: update

Conflicts:
	NEWS
	gnulib
	src/scan-gram.l
	src/system.h
2012-12-14 13:58:04 +01:00
Akim Demaille
2bd435c36c maint: credit Wojciech Polak
* NEWS, THANKS: He is the author of XML support (including XSLTs).
2012-12-13 09:29:18 +01:00
Akim Demaille
0a7b855930 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2012-12-12 16:23:44 +01:00
Akim Demaille
c13bb3484c version 2.7
* NEWS: Record release date.
2012-12-12 16:07:46 +01:00
Akim Demaille
1127a75a72 fix C90 compliance
* data/glr.c, src/graphviz.h, src/ielr.c, src/scan-gram.l,
* src/system.h, tests/actions.at, tests/glr-regression.at: Do not
use // comments.
Do not introduce variables after statements.
Provide "main" with a return value.
2012-12-12 11:44:39 +01:00
Theophile Ranquet
0906b12cd5 Merge remote-tracking branch 'origin/maint'
* origin/maint:
  news: prepare for forthcoming release
  doc: explain how mid-rule actions are translated
  error: use better locations for unused midrule values
  doc: various minor improvements and fixes
  tests: ignore more useless compiler warnings
  tests: be robust to C being compiled with a C++11 compiler
  build: beware of Clang++ not supporting POSIXLY_CORRECT
  maint: post-release administrivia
  version 2.6.90
  build: fix syntax-check error.
  cpp: simplify the Flex version checking macro
  news: improve the carets example and fix a typo
  cpp: improve the Flex version checking macro
  carets: improve the code
  maint: update news
  build: keep -Wmissing-declarations and -Wmissing-prototypes for modern GCCs
  build: drop -Wcast-qual
  gnulib: update

Conflicts:
	NEWS
	doc/Makefile.am
	doc/bison.texi
	gnulib
	src/reader.c
	tests/actions.at
	tests/atlocal.in
	tests/input.at
2012-12-10 17:01:55 +01:00
Akim Demaille
d4fe9e88f3 news: prepare for forthcoming release
* NEWS: Fill paragraph.
Reorder.
Update examples.
Remove line for 2.6.90.
2012-12-09 17:12:55 +01:00
Akim Demaille
be22823e78 doc: explain how mid-rule actions are translated
* doc/bison.texi (Actions in Mid-Rule): Mention and use named references.
Split into three subsections, among which...
(Mid-Rule Action Translation): this new section.
2012-12-09 16:49:58 +01:00
Akim Demaille
09a1cd5e58 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2012-12-07 11:49:12 +01:00
Akim Demaille
a24e6b0d21 version 2.6.90
* NEWS: Record release date.
2012-12-07 11:37:14 +01:00
Theophile Ranquet
fb6040f0a8 news: improve the carets example and fix a typo
* NEWS: Here.
2012-12-07 12:02:00 +01:00
Akim Demaille
edf9a06f27 maint: update news
* NEWS: There is no 2.6.6, remove its stub.
2012-12-07 10:40:31 +01:00
Theophile Ranquet
f3ead217b8 Merge remote-tracking branch 'origin/maint'
* origin/maint:
  misc: pacify the Tiny C Compiler
  cpp: make the check of Flex version portable
  misc: require getline
  c++: support wide strings for file names
  doc: document carets
  tests: enhance existing tests with carets
  errors: show carets
  getargs: add support for --flags/-f

Conflicts:
	doc/bison.texi
	m4/.gitignore
	src/complain.c
	src/flex-scanner.h
	src/getargs.c
	src/getargs.h
	src/gram.c
	src/main.c
	tests/headers.at
2012-12-06 13:38:43 +01:00
Theophile Ranquet
7bada5355e doc: document carets
* NEWS: Announce it.
* doc/bison.texi (Bison Options):  Here.
2012-12-05 13:46:01 +01:00
Akim Demaille
d6dc4d36d1 Merge remote-tracking branch 'origin/maint'
* origin/maint:
  getargs: don't label --language/-l as experimental
  getargs: fix the locations of command-line input
  errors: indent missing action code semicolon warning

Conflicts:
	NEWS
	src/scan-code.l
	tests/actions.at
2012-12-05 11:03:08 +01:00
Theophile Ranquet
effd30c08d getargs: don't label --language/-l as experimental
* NEWS: Announce it.
* doc/bison.texi, src/getargs.c (usage): Here.
2012-12-04 15:54:43 +01:00
Akim Demaille
5807bb9156 Merge remote-tracking branch 'origin/maint'
* origin/maint:
  doc: minor fixes
  doc: improve the index
  doc: introduce api.pure full, rearrange some examples
  yacc.c: support "%define api.pure full"
  local.at: improvements

Conflicts:
	NEWS
	data/yacc.c
	doc/bison.texi
	tests/calc.at
2012-11-29 15:20:03 +01:00
Theophile Ranquet
1f1bd57297 doc: introduce api.pure full, rearrange some examples
* NEWS: Add entry.
* doc/bison.texi (%define Summary): Show the old Yacc behaviour.
(Parser Function): Move parse-param examples here.
(Pure Calling): Remove parse-param examples.
(Error Reporting): Don't show the old behavior, stick to 'full'.
2012-11-29 11:08:58 +01:00
Akim Demaille
c6b1772473 Merge remote-tracking branch 'origin/maint'
* origin/maint:
  yacc.c: always initialize yylloc
  scanner: issue a single error for groups of invalid characters
  tests: formatting changes
  doc: one of the fixes for an ambiguous grammar was ambiguous too
  doc: fix the dangling else with precedence directives
  doc: prefer "token" to TOKEN
  doc: formatting changes
  scanner: use explicit "ignore" statements

Conflicts:
	src/scan-gram.l
2012-11-26 09:41:35 +01:00
Akim Demaille
c6bf97ccb4 Merge remote-tracking branch 'origin/branch-2.6' into maint
* origin/branch-2.6:
  yacc.c: always initialize yylloc
  doc: one of the fixes for an ambiguous grammar was ambiguous too
  doc: fix the dangling else with precedence directives
  doc: prefer "token" to TOKEN
  doc: formatting changes

Conflicts:
	NEWS
	doc/bison.texi
2012-11-26 09:05:28 +01:00
Theophile Ranquet
fb4c8a7cb9 yacc.c: always initialize yylloc
The initial location might be used if the parser starts by an empty
reduction, so really ensure proper initialization of the initial
location.  The previous approach fails for PostgreSQL, which uses
Reported by Peter Eisentraut.
http://lists.gnu.org/archive/html/bug-bison/2012-11/msg00023.html
With help from Théophile Ranquet.

* data/yacc.c (b4_declare_scanner_communication_variables): Be sure
to initialize yylloc, even when its structure is unknown.
(yyparse): Simplify the call to b4_dollar_pushdef.
* tests/actions.at (Initial location): Check of similar pattern
as in the case of PostgreSQL.
2012-11-23 15:44:19 +01:00
Akim Demaille
53e2cd1ebd doc: one of the fixes for an ambiguous grammar was ambiguous too
Reported by Аскар Сафин.
http://lists.gnu.org/archive/html/bug-bison/2012-11/msg00024.html

* doc/bison.texi (Reduce/Reduce): Fix the resulting ambiguity using
precedence/associativity directives.
2012-11-23 09:47:20 +01:00
Akim Demaille
06ec0105b1 Merge remote-tracking branch 'origin/maint'
* origin/maint:
  tests: close files in glr-regression
  xml: match DOT output and xml2dot.xsl processing
  xml: factor xslt space template
  graph: fix a memory leak
  xml: documentation
  output: capitalize State
2012-11-13 10:59:55 +01:00
Theophile Ranquet
9c16d39944 xml: documentation
The XML output combined with the XSL Transformations provided in data/ are
incredibly useful, they should be documented.

* doc/bison.texi (Xml): New node.
2012-11-12 16:44:54 +01:00
Akim Demaille
6d58c63202 Merge branch 'maint'
* origin/maint:
  regen
  maint: post-release administrivia
  version 2.6.5
  regen
  tests: syntax-check
  tests: beware of compilers that do not support POSIXLY_CORRECT
  gnulib: update

Conflicts:
	src/parse-gram.c
	src/parse-gram.h
	tests/atlocal.in
2012-11-08 09:26:44 +01:00
Akim Demaille
3ada393894 Merge branch 'branch-2.6' into maint
* origin/branch-2.6:
  maint: post-release administrivia
  version 2.6.5
  regen
  tests: syntax-check
  tests: beware of compilers that do not support POSIXLY_CORRECT
  gnulib: update

Conflicts:
	NEWS
	src/parse-gram.c
	src/parse-gram.h
2012-11-08 09:20:48 +01:00
Akim Demaille
9d2423f55d maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2012-11-07 18:35:36 +01:00
Akim Demaille
9d3f7eaf1d version 2.6.5
* NEWS: Record release date.
2012-11-07 18:09:46 +01:00
Akim Demaille
e42906f790 Merge remote-tracking branch 'origin/maint'
* origin/maint: (24 commits)
  tests: calc: modernize the use of locations
  tests: remove useless location initializations
  lalr1.cc: always initialize yylval.
  tests: check that C and C++ objects can be linked together.
  yacc.c: also disable -Wuninitialized.
  glr.cc, yacc.c: initialize yylloc properly
  yacc.c, glr.c: a better YY_LOCATION_PRINT
  yacc.c: simplify initialization
  doc: formatting changes
  c++: fix position operator signatures
  tests: remove useless location initialization.
  tests: fix locations in C
  tests: handle %parse-param in the generated yyerror
  tests: simplifications
  grammars: fix display of nul character in error message
  tests: sort
  tests: cosmetic changes
  comment changes
  autoconf: update
  gnulib: update
  ...

Conflicts:
	data/lalr1.cc
	gnulib
	src/scan-gram.l
	submodules/autoconf
	tests/calc.at
2012-11-06 18:30:16 +01:00
Akim Demaille
049016237e Merge branch 'branch-2.6' into maint
* origin/branch-2.6: (24 commits)
  tests: calc: modernize the use of locations
  tests: remove useless location initializations
  lalr1.cc: always initialize yylval.
  tests: check that C and C++ objects can be linked together.
  yacc.c: also disable -Wuninitialized.
  glr.cc, yacc.c: initialize yylloc properly
  yacc.c, glr.c: a better YY_LOCATION_PRINT
  yacc.c: simplify initialization
  doc: formatting changes
  c++: fix position operator signatures
  tests: remove useless location initialization.
  tests: fix locations in C
  tests: handle %parse-param in the generated yyerror
  tests: simplifications
  grammars: fix display of nul character in error message
  tests: sort
  tests: cosmetic changes
  comment changes
  autoconf: update
  gnulib: update
  ...

Conflicts:
	NEWS
	gnulib
	tests/named-refs.at
	tests/regression.at
2012-11-06 18:12:05 +01:00
Akim Demaille
a1d1ab50a0 glr.cc, yacc.c: initialize yylloc properly
There are several issues to address here.  One is that yylloc should
be initialized when possible.  Another is that the push parser needs
to update yypushed_loc when the user modified it.  And if the parser
starts by a reduction of an empty, it uses the first location on the
stack, which, therefore, must also be initialized to this initial
location.

This is getting complex, especially since because initializing a
global (impure interface) is different from initializing a local
variable.  To simplify, the local yylloc is not initialized during its
definition.

* data/c.m4 (b4_yyloc_default_define): Replace by...
(b4_yyloc_default): this.
Adjust dependencies.
* data/glr.cc: Initialize yylloc.
* data/yacc.c (b4_declare_scanner_communication_variables):
Initialize yylloc during its definition.
Don't define yyloc_default.
(yypush_parse): The location formal is not const, as we might
initialize it.
(yyparse): Define yyloc_default.
Use it before running the user initial action.
Possibly update the first location on the stack, and the pushed
location after the user initial action.
* tests/actions.at (Initial locations): Check that the initial
location is correct.
2012-11-06 17:35:38 +01:00
Akim Demaille
95066e9208 grammars: fix display of nul character in error message
Reported by Marc Mendiola.
http://lists.gnu.org/archive/html/help-bison/2012-10/msg00017.html

* gnulib: Update to get quote_mem.
* src/scan-gram.l: Use it.
* tests/input.at (Invalid inputs): Additional checks.
* tests/named-refs.at: Likewise.
2012-11-01 16:14:14 +01:00
Akim Demaille
a68b1f237e yacc.c: initialize yylval and yylloc.
When generating a pure push parser, the initialization of yylval and
yylloc may not be visible to the compiler.  With warnings enabled, GCC
4.3.6, 4.4.7, 4.5.4, and 4.6.3 report uninitialized uses of
yylval/yylloc.  Using local pragmas to disable these warnings is not
supported before 4.6, and 4.6 does not support it properly.  So
initialize yylval and yylloc at their definition.  Reported by Peter
Simons.  See
http://lists.gnu.org/archive/html/bison-patches/2012-10/msg00133.html

* data/c.m4 (b4_yyloc_default_define): New.
* data/yacc.c: Use it when locations are requested.
(YYLVAL_INITIALIZE): Replace by...
(YY_INITIAL_VALUE): this.
(yyparse): Initialize yylloc and yylval.
Therefore, remove the initialization of yylloc's field.
* data/glr.c: Likewise.
2012-10-28 16:53:18 +01:00
Akim Demaille
d0a304384f Merge remote-tracking branch 'origin/maint'
* origin/maint: (46 commits)
  doc: minor style change
  maint: use gendocs's new -I option
  regen
  yacc.c: do not define location support when not using locations
  maint: be compilable with GCC 4.0
  tests: address a warning from GCC 4.4
  tests: don't use options that Clang does not support
  tests: restore the tests on -Werror
  regen
  parse-gram: update the Bison interface
  fix comment
  maint: post-release administrivia
  version 2.6.4
  regen
  2.6.4: botched 2.6.3
  maint: post-release administrivia
  version 2.6.3
  gnulib: update
  tests: check %no-lines
  NEWS: warnings with clang
  ...

Conflicts:
	NEWS
	TODO
	data/c.m4
	data/java.m4
	doc/Makefile.am
	src/getargs.c
	src/getargs.h
	src/output.c
	src/parse-gram.c
	src/parse-gram.h
	src/parse-gram.y
	src/reader.h
2012-10-26 16:58:55 +02:00
Akim Demaille
df04a68ab5 Merge branch 'branch-2.6' into maint
* origin/branch-2.6:
  maint: post-release administrivia
  version 2.6.4
  regen
  2.6.4: botched 2.6.3
2012-10-23 14:03:11 +02:00
Akim Demaille
6f1360bd89 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2012-10-23 13:58:51 +02:00
Akim Demaille
0ac1584946 version 2.6.4
* NEWS: Record release date.
2012-10-23 13:46:28 +02:00
Akim Demaille
468455e12b 2.6.4: botched 2.6.3
* NEWS: here.
2012-10-22 18:32:19 +02:00
Akim Demaille
b7226022b0 Merge branch '2.6.3' into maint
* 2.6.3: (22 commits)
  maint: post-release administrivia
  version 2.6.3
  gnulib: update
  tests: check %no-lines
  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
  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
  maint: word changes
  lalr1.cc: fix test suite portability
  maint: fix an erroneous include
  tests: check that headers are self contained
  doc: add missing documentation for --report
  headers: move CPP guards into YY_*_INCLUDED to avoid collisions
  ...

Conflicts:
	NEWS
	doc/bison.texi
	tests/headers.at
2012-10-22 16:04:12 +02:00
Akim Demaille
a4eb820f17 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2012-10-22 15:28:10 +02:00
Akim Demaille
6eb8f74f8f version 2.6.3
* NEWS: Record release date.
2012-10-22 15:16:12 +02:00
Akim Demaille
7b70847e58 NEWS: warnings with clang
* NEWS: here.
2012-10-22 12:17:35 +02:00
Akim Demaille
8f8439cee1 tests: no longer disable -O compiler options
Tests are running without -O since
f377f69fec because some warnings (about
yylval not being initialized) show only when GCC is given -O2.  The
previous patch fixes the warnings. Run the test suite with compiler
options unmodified.

* tests/atlocal.in (O0CFLAGS, O0CXXFLAGS): Remove, use CFLAGS and
CXXFLAGS.
2012-10-22 12:17:14 +02:00