Commit Graph

614 Commits

Author SHA1 Message Date
Akim Demaille
d42e695e53 doc: fix dependencies
* doc/local.mk: here.
2012-12-15 08:19:59 +01:00
Akim Demaille
a73aa764a1 doc: style fixes
* doc/bison.texi: Add a couple of missing @var and @code.
2012-12-14 17:37:54 +01:00
Theophile Ranquet
f039b51805 doc: fix build dependencies
Suggested by Nick Bowler
<http://lists.gnu.org/archive/html/bug-automake/2012-12/msg00001.html>

* doc/local.mk: Avoid overwriting Automake's rules.
2012-12-14 18:11:11 +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
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
c949ada3da doc: various minor improvements and fixes
* doc/figs/example.dot, doc/figs/example.y: New.
* doc/bison.texi: Prefer "token" to TOKEN.
Use @group where appropriate.
Adjust with style changes in the output (State 0, not state 0).
Fix some @ref that were missing the third argument.
Fix some incorrect line numbers.
Use "nonterminal", not "non-terminal".
Fix overfull and underfull TeX hboxes.
Put the comments in the index.
Remove duplicate index entries.
Fuse glossary entries where appropriate.
(Understanding): Improve the continuity between sections.
Use example.dot to show the whole graph.
* doc/Makefile.am: Adjust.
2012-12-09 16:24:19 +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
Akim Demaille
511dd971ba doc: minor fixes
* doc/bison.texi: Use stderr for error messages.
Meta-variables are usually spelled in lower case.
Use @code for function names.
2012-11-29 14:35:48 +01:00
Akim Demaille
371f1b2b7b doc: improve the index
* doc/bison.texi: Fix uses of "deffn" so that the arguments of the
directives do not show in the index.
Remove a duplicate entry for api.pure.
2012-11-29 14:09:34 +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
589149dccf doc: use %precedence instead of nonassoc when associativity is not wanted
* doc/bison.texi: here.
Formatting changes in some grammars.
Fix a %prec into %precedence.
2012-11-26 09:56:15 +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
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
c28cd5dc5a doc: fix the dangling else with precedence directives
* doc/bison.texi (Non Operators): New node.
(Shift/Reduce): Point to it.
Don't promote "%expect n" too much.
2012-11-22 15:58:44 +01:00
Akim Demaille
534cee7ae8 doc: prefer "token" to TOKEN
This is more readable in short examples.

* doc/bison.texi (Shift/Reduce): here.
Make "win" and "lose" action more alike.
2012-11-22 15:58:43 +01:00
Akim Demaille
51356dd2ad doc: formatting changes
* doc/bison.texi: Use @group.
2012-11-22 14:24:54 +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
be3517b007 xml: match DOT output and xml2dot.xsl processing
Make the DOT produced by XSLT processing equivalent to the one made with the
--graph option.

* data/xslt/xml2dot.xsl: Stylistic changes, and add support for reductions.
* doc/bison.texi (Xml): Update.
* src/graphviz.c (conclude_red): Minor stylistic changes to DOT internals.
(output_red): Swap enabled and disabled reductions output, for coherence
with XSLT output.
* src/print_graph.c (print_core): Minor stylistic change to States' output.
(print_actions): Swap order of output for reductions and transitions.
* tests/local.at (AT_BISON_CHECK_XML): Ignore differences in order.
* tests/output.at: Adjust to changes in DOT internals.
2012-11-12 16:46: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
fbca394ee1 Merge remote-tracking branch 'origin/maint'
* origin/maint:
  maint: address syntax-check errors.
  tests: use valgrind where appropriate
  tests: use valgrind where appropriate
  tests: don't expect $EGREP to support -w
  tests: more possible error compiler messages for "#error"

Conflicts:
	cfg.mk
	tests/headers.at
2012-11-12 09:45:30 +01:00
Akim Demaille
bfdcc3a0b2 maint: address syntax-check errors.
* cfg.mk: Ignore the "error" call in tests/c++.at, it is not to be
translated.
* doc/bison.texi: Fix incorrect @pxref use.
* po/POTFILES.in: Add missing file.
* src/print_graph.c: Remove useless include.
2012-11-12 09:39:41 +01:00
Akim Demaille
8b49e6bfc5 doc: formatting changes
* doc/bison.texi: In a pointer type.
2012-11-05 13:13:19 +01:00
Akim Demaille
e36ec1f41f lalr1.cc: rename lex_symbol as api.token.constructor
* data/bison.m4 (b4_lex_symbol_if): Rename as...
(b4_token_ctor_if): this.
Depend upon api.token.constructor.
* data/c++.m4, data/lalr1.cc: Adjust.
* doc/bison.texi: Fix all the occurrences of lex_symbol.
* etc/bench.pl.in: Adjust.
* examples/variant.yy: Likewise.

* tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
Handle AT_TOKEN_CTOR_IF.
* tests/c++.at: Adjust to using api.token.constructor and AT_TOKEN_CTOR_IF.
Simplify the test of both build call styles.
(AT_CHECK_VARIANTS): Rename as...
(AT_TEST): this.
And undef when done.
2012-11-01 18:26:04 +01:00
Akim Demaille
19fdeb9b7e build: fix Texinfo compilation
* doc/local.mk: fix dependencies.
2012-10-26 17:04:55 +02: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
ead713a176 doc: minor style change
* doc/figs/example-reduce.txt: here.
2012-10-26 16:32:51 +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
82443642d2 build: look for Perl in configure.
Bison uses "/usr/bin/perl" or "perl" in several places, and it does
not appear to be a problem.  But, at least to make it simpler to
change PERL on the make command line, check for perl in configure.

* configure.ac (PERL): New.
* doc/Doxyfile.in, doc/Makefile.am, tests/bison.in: Use it.
2012-10-22 12:16:33 +02:00
Akim Demaille
c473e022d9 doc: add missing documentation for --report
* doc/bison.texi (Bison Options): Document --report's "solved", "all",
and "none".
2012-10-22 12:16:08 +02:00
Akim Demaille
6192d2c6de headers: move CPP guards into YY_*_INCLUDED to avoid collisions
See <http://lists.gnu.org/archive/html/bug-bison/2012-09/msg00016.html>.

* data/c.m4 (b4_cpp_guard): Prepend YY_ and append _INCLUDED.
* tests/headers.at: Adjust.
* NEWS, doc/bison.texi: Document.
2012-10-22 12:16:04 +02:00
Akim Demaille
3746fc33c4 minor changes.
* NEWS: Word changes.
* doc/bison.texi: Spell check.
Fix minor issues.
* tests/headers.at: Comment and formatting changes.
2012-10-22 12:14:57 +02:00
Akim Demaille
a029e56f5c maint: check for dot before using it
* configure.ac: here.
* doc/Makefile.am: Use $(DOT).
Ship the generated files, to spare the user the need for Graphviz.
2012-10-19 12:56:48 +02:00
Theophile Ranquet
fc4fdd623e graphs: documentation
Note that 'make web-manual' fails.

* NEWS: Document these changes.
* doc/Makefile.am: Adjust to generate example files.
* doc/bison.texi: Add a Graphviz section after "Understanding::", the section
describing the .output file, because these are similar.
* doc/figs/example-reduce.dot, doc/figs/example-reduce.txt,
doc/figs/example-shift.dot, doc/figs/example-shift.txt: New, minimal
examples to illustrate the documentation.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-10-18 17:03:30 +02:00
Akim Demaille
8ea6525e3a Merge branch 'maint'
* origin/maint:
  java: use api.location.type and api.position.type

Conflicts:
	NEWS
	data/java.m4
	doc/bison.texi
	tests/java.at
2012-10-16 15:26:55 +02:00
Akim Demaille
f3bc338643 variables: use singular in %define variable names
See http://lists.gnu.org/archive/html/bison-patches/2012-02/msg00045.html

* doc/bison.texi, src/lalr.c, src/main.c, src/muscle-tab.c,
* src/print.c, src/reader.c, src/tables.c, tests/conflicts.at,
* tests/input.at, tests/reduce.at:
s/lr.default-reductions/lr.default-reduction/
s/lr.keep-unreachable-states/lr.keep-unreachable-state/.
* NEWS: Document.
2012-10-16 14:08:21 +02:00
Akim Demaille
2a6b66c5fd api.tokens.prefix -> api.token.prefix
See
http://lists.gnu.org/archive/html/bison-patches/2012-02/msg00045.html
Note that api.tokens.prefix has not been released, yet.

* NEWS, data/bison.m4, doc/bison.texi, tests/c++.at,
* tests/calc.at, tests/java.at, tests/local.at: Do it.
* src/muscle-tab.c (muscle_percent_variable_update): Ensure
backward compatibility.
2012-10-16 10:51:38 +02:00
Akim Demaille
7287be84f1 java: use api.location.type and api.position.type
* data/java.m4: here.
* NEWS, doc/bison.texi, tests/java.at: Adjust.
2012-10-12 13:00:59 +02:00
Akim Demaille
f6b561d9f9 Merge branch 'maint'
* origin/maint:
  tests: check %no-lines
  tests: minor simplification
  graphs: stylistic changes.
  graphs: minor style changes
  graphs: show reductions
  graphs: style: prefix state number with "state"
  graphs: style: use left justification for states
  graphs: style: prefix rules and change shapes
  obstack: import obstack_finish0 from master
  c++: api.location.type
  muscles: a function for backward compatibility
  maint: more macros

Conflicts:
	data/glr.cc
	data/java.m4
	data/lalr1.cc
	doc/bison.texi
	src/muscle-tab.c
	src/system.h
	tests/calc.at
2012-10-12 12:49:57 +02:00
Akim Demaille
23d13411c8 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
2012-10-11 09:12:43 +02:00
Akim Demaille
db8ab2be33 c++: api.location.type
This feature was introduced in 95a2de5695
(which is part of 2.5), but not documented.  Give it a proper name, and
make it public.

* data/c++.m4, data/lalr1.cc, data/glr.cc, data/java.m4: Use
api.location.type instead of location_type.
* src/muscle-tab.c (muscle_percent_variable_update): Map the latter to
the former.
* tests/local.at: Adjust.
* tests/calc.at: Use api.location.type.
Leave tests/java.at with location_type, at least for the time being,
to cover both names.
* doc/bison.texi: Document api.location.type.
(User Defined Location Type): New.
* NEWS: Update.
2012-10-09 15:59:18 +02:00
Akim Demaille
d3e4409ad1 lalr1.cc: document exception safety
* NEWS: here.
* doc/bison.texi (Destructor Decl, C++ Parser Interface): and there.
2012-10-06 19:53:45 +02:00
Akim Demaille
45fdfd8108 build: look for Perl in configure.
Bison uses "/usr/bin/perl" or "perl" in several places, and it does
not appear to be a problem.  But, at least to make it simpler to
change PERL on the make command line, check for perl in configure.

* configure.ac (PERL): New.
* doc/Doxyfile.in, doc/Makefile.am, tests/bison.in: Use it.
2012-10-05 09:34:52 +02:00
Akim Demaille
2b45240d6c Merge branch 'maint'
* origin/maint:
  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

Conflicts:
	NEWS
	data/location.cc
2012-10-04 17:16:00 +02:00
Akim Demaille
57f8bd8d18 doc: add missing documentation for --report
* doc/bison.texi (Bison Options): Document --report's "solved", "all",
and "none".
2012-10-03 08:47:37 +02:00
Akim Demaille
fa98bb3233 Merge remote-tracking branch 'origin/maint'
* origin/maint:
  headers: move CPP guards into YY_*_INCLUDED to avoid collisions
  minor changes.

Conflicts:
	doc/bison.texi
	tests/headers.at
2012-10-01 14:10:33 +02:00