Commit Graph

217 Commits

Author SHA1 Message Date
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
a37131cc63 getargs: fix the locations of command-line input
* src/getargs.c (command_line_location): Here.
* tests/input.at: Adjust.
2012-12-03 17:21: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
68ac70bc7b scanner: issue a single error for groups of invalid characters
* src/scan-gram.l: Scan groups of invalid characters together.
* tests/input.at, tests/named-refs.at: Adjust.
2012-11-23 11:36:42 +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
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
baf0bd6145 tests: sort
* tests/regression.at (Invalid inputs, Invalid inputs with {}): Move to...
* tests/input.at: here, for consistency.
2012-11-01 16:14:14 +01:00
Theophile Ranquet
ed91d427fe tests: make deprecation tests more specific
* tests/input.at (Deprecated directives): Here, don't generate unrelated errors
or warnings.
2012-10-26 18:28:37 +00:00
Theophile Ranquet
0f92546f47 deprecation: add tests
* tests/input.at (Deprecated directives warn, Non-deprecated
directives don't, Unput doesn't mess up locations): New tests.
2012-10-26 11:50:13 +02:00
Akim Demaille
c955769a75 tests: use $PERL instead of perl
* tests/atlocal.in (PERL): New.
Sort.
* tests/calc.at, tests/input.at, tests/local.at, tests/regression.at,
* tests/skeletons.at, tests/synclines.at, tests/torture.at: here.
2012-10-22 12:16:33 +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
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
ff020c3061 tests: use $PERL instead of perl
* tests/atlocal.in (PERL): New.
Sort.
* tests/calc.at, tests/input.at, tests/local.at, tests/regression.at,
* tests/skeletons.at, tests/synclines.at, tests/torture.at: here.
2012-10-05 09:34:53 +02:00
Theophile Ranquet
c6c8de1609 errors: support indented context info in m4 macros
* TODO: Address the issue, so remove it.
* data/bison.m4: Use b4_error with [[note]] rather than a complain_at
for context information.
* src/complain.c (complain_args): Take an additional argument, an
indentation pointer, to allow the dispatching of context information.
* src/complain.h (complain_args): Adjust prototype.
* src/scan-skel.l (at_directive_perform): Recognize the new @note mark.
* tests/input.at: Adjust.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-10-04 17:13:38 +02:00
Akim Demaille
595284e9d0 Merge remote-tracking branch 'origin/maint'
* origin/maint:
  gnulib: update
  errors: indent "user token number redeclaration" context

Conflicts:
	src/symtab.c
2012-10-01 12:12:38 +02:00
Theophile Ranquet
b506d9bfcb errors: indent "user token number redeclaration" context
This is the continuation of the work on the readability of errors
context.

* src/symtab.c (user_token_number_redeclaration): Use
complain_at_indent to output with increased indentation level.
* tests/input:at: Apply this change.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-09-28 14:00:09 +02:00
Theophile Ranquet
46bdb8ec59 errors: don't display "warnings treated as errors"
This line doesn't add any meaningful information anymore, the appended
[-Werror=CATEGORY] is enough.  It is actually more insightful, as it
allows to distinguish warnings treated as errors from those that
aren't.  This line is also removed by gcc 4.8.

* src/complain.c (set_warnings_issued): The only action left was
checking if the error bit corresponding to the warning issued was set,
and that function was only called once. Therefore, remove it, and do
its job directly in the caller...
(complains): here.
* src/complains.h: Adjust.
* tests/input.at: Adjust.
* NEWS: Document this change.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-09-27 12:26:05 +02:00
Akim Demaille
1048a1c901 errors: change output, and improve -y coherence
The prefix of warnings treated as errors is now "error: ". Also, their
suffix now reflects the changes in the Werror option format.

An output for -Werror=other used to be:
  bison: warnings being treated as errors
  input.y:1.1: warning: stray ',' treated as white space [-Wother]

It is now:
  bison: warnings being treated as errors
  input.y:1.1: error: stray ',' treated as white space [-Werror=other]

The line "warnings being treated as errors" no longer adds any info,
it will be removed in a forthcoming change.

* NEWS: Add entry "Enhancement of the -Werror"
* doc/bison.texi: Move the warnings-as-error to a new bullet.
* src/complain.c (complains): Refactor, change the prefix of warnings
that are treated as errors.
(warnings_print_categories): Support for [-Werror=CATEGORY] display
* src/getargc.c (getargs): -y implies -Werror=yacc
* tests/input.at: Update expected --yacc output for coherence.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-09-27 12:19:09 +02:00
Akim Demaille
11b192127c Merge branch 'maint'
* maint:
  warnings: introduce -Wdeprecated in the usage info
  errors: prefix the output with "error: "
  errors: indent "invalid value for %define" context
  errors: indent "%define var" redefinition context
  errors: indent "symbol redeclaration" context
  errors: indent "result type clash" error context

Conflicts:
	src/complain.c
	src/muscle-tab.c
	src/reader.c
	src/symtab.c
	tests/conflicts.at
	tests/input.at
	tests/named-refs.at
	tests/output.at
	tests/skeletons.at
2012-09-26 14:51:11 +02:00
Theophile Ranquet
b8e7ad5887 errors: prefix the output with "error: "
This improves readability. This is also what gcc does.

* NEWS: Document this change.
* src/complain.c (complain_at): Prefix all errors with "error: ".
(complain_at_indent, warn_at_indent): Do not prefix the context
information of errors, which are basically just indented errors.
* tests/conflicts.at, tests/glr-regression.at, tests/input.at,
tests/named-refs.at, tests/output.at, tests/push.at,
tests/regression.at, tests/skeletons.at: Apply this change.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-09-26 12:11:51 +02:00
Theophile Ranquet
a974c1ec26 errors: indent "invalid value for %define" context
This is the continuation of the work on the readability of errors
    context.

For example, what used to be:
  input.y:1.9-29: invalid value for %define variable 'foo' : 'bar'
  input.y:1.9-29: accepted value: 'most'

is now:
  input.y:1.9-29: invalid value for %define variable 'foo' : 'bar'
  input.y:1.9-29:     accepted value: 'most'

* src/muscle-tab.c (muscle_percent_define_check_values): Use
complain_at_indent to output with increased indentation level.
* tests/input:at: Apply this change.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-09-26 12:08:55 +02:00
Theophile Ranquet
6b1e1872d4 errors: indent "%define var" redefinition context
This is the continuation of the work on the readability of errors
context.

For example, what used to be:
  input.y:2.9-11: %define variable 'var' redefined
  input.y:1.9-11: previous definition

is now:
  input.y:2.9-11: %define variable 'var' redefined
  input.y:1.9-11:     previous definition

* src/muscle-tab.c (muscle_percent_define_insert): Use
complain_at_indent to output with increased indentation level.
* tests/input.at: Apply this change.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-09-26 12:06:03 +02:00
Theophile Ranquet
cbaea0106d errors: indent "symbol redeclaration" context
This is the continuation of the work on the readability of errors
context.

For example, what used to be:
  input.y:5.10-24: %printer redeclaration for <field2>
  input.y:3.11-25: previous declaration

is now:
  input.y:5.10-24: %printer redeclaration for <field2>
  input.y:3.11-25:     previous declaration

* NEWS: Document this change.
* src/symtab.c (symbol_redeclaration, semantic_type_redeclaration,
user_token_number_redeclaration, default_tagged_destructor_set,
default_tagless_destructor_set, default_tagged_printer_set,
default_tagless_printer_set): Use complain_at_indent to
output with increased indentation level.
* tests/input.at: Apply this change.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-09-26 12:03:57 +02:00
Akim Demaille
fcd7e48cb6 Revert "new Werror report format fixed in a test"
This reverts commit 41511178a7.
2012-09-21 09:16:11 +02:00
Theophile Ranquet
41511178a7 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
2012-09-21 05:08:47 +02:00
Akim Demaille
2a8be426c3 use -Wdeprecated for obsolete %define variable names
* src/muscle-tab.c (muscle_percent_variable_update): Here.
* tests/input.at (%define backward compatibility): Update expectations.
2012-09-03 16:23:15 +02:00
Akim Demaille
31557b9ead 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.
2012-09-03 16:23:15 +02:00
Akim Demaille
84271837f6 tests: comment changes
* tests/actions.at, tests/input.at: here.
2012-07-31 11:33:47 +02:00
Akim Demaille
4323e0dac3 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
2012-07-27 16:35:49 +02:00
Akim Demaille
1c292035e1 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.
2012-07-27 12:54:31 +02:00
Akim Demaille
263137264f 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.
2012-07-27 12:54:31 +02:00
Akim Demaille
9a86ee6058 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.
2012-07-26 17:03:54 +02:00
Akim Demaille
8617d87e24 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.
2012-07-26 14:20:47 +02:00
Akim Demaille
9534d2be80 simplify the handling of <> and <*>'s code_props.
Currently they are treated in separated variables, contrary to other
<TYPE> code_props.  This duplicates code (and messages for translators)
uselessly, as demonstrated by the fact that thanks to this patch, now
useless <*> and <> code_props are reported like the others.

* src/parse-gram.y (generic_symlist_item): Treat "<*>" and "<>" as regular
type tags.
* src/symlist.h, src/symlist.c (symbol_list_default_tagged_new)
(symbol_list_default_tagless_new,SYMLIST_DEFAULT_TAGGED)
(SYMLIST_DEFAULT_TAGLESS): Remove.
* src/symtab.h, src/symtab.c (default_tagged_code_props)
(default_tagless_code_props, default_tagged_code_props_set)
(default_tagless_code_props_set): Remove.
(symbol_code_props_get): Default to <*> or <>'s code_props.

* tests/actions.at: Complete expected errors: there are new warnings.
* tests/input.at: Likewise.
(Useless printers or destructors): Extend.
2012-07-22 20:19:51 +02:00
Akim Demaille
60aa04a236 Merge remote-tracking branch 'origin/maint'
* origin/maint:
  maint: update release instructions
  maint: post-release administrivia
  version 2.5.90
  build: fix gen-ChangeLog call.
  gnulib: update.
  tests: fix SKIP_IF for Java.
  api.prefix: incompatible with %name-prefix.
  api.prefix: strengthen the tests and fix push-parsers.
  skeletons: style changes.
  NEWS: minor changes.
  api.prefix: improve the documentation for YYDEBUG.
  gnulib: update.

Conflicts:
	NEWS
	cfg.mk
	data/bison.m4
	doc/bison.texi
	m4/.gitignore
	tests/calc.at
	tests/headers.at
2012-07-06 11:00:57 +02:00
Akim Demaille
32ae07efde api.prefix: incompatible with %name-prefix.
* data/bison.m4: Make it incompatible.
* tests/input.at: Check that it is.
2012-07-05 12:41:16 +02:00
Victor Santet
73370a9daa warnings: display warnings categories
* src/complain.c (error_message): Call 'warnings_print_categories'.
* src/gram.c (grammar_rules_useless_report): Display itself warning
category.
* tests/actions.at, tests/conflicts.at, tests/existing.at,
tests/input.at, tests/named-refs.at, tests/output.at, tests/reduce.at,
tests/regression.at, tests/skeletons.at: Adjust.
* NEWS: Document this.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-06-29 16:35:34 +02:00
Akim Demaille
297e263a00 Merge remote-tracking branch 'origin/maint'
* origin/maint:
  tests: do not output m4 set up.
  tests: use the generic yyerror function.
  tests: use assert instead of plain abort.
  tests: improve the generic yylex implementation.
  tests: generalize the compilation macros.
  tests: fix confusion between api.prefix and name-prefix.
  maint: gitignores.
  yacc: work around the ylwrap limitation.

Conflicts:
	NEWS
	tests/local.at
2012-06-26 16:44:59 +02:00
Victor Santet
ea9a35c605 warnings: raise warning for useless printers or destructors
* src/scan-code.h (code_props): Add field 'is_used'.
(CODE_PROPS_NONE_INIT): Adjust.
* src/scan-code.l (code_props_plain_init, code_props_symbol_action_init)
(code_props_rule_action_init): Instead of implementing several
times the initialization of the code_props structures,
use code_props_none_init.
* src/symtab.c (symbol_check_defined): If a symbol does not have a
destructor (resp. printer) but has a type which has a destructor (resp.
printer), then set field 'is_used' to true.
(semantic_type_check_defined): If a type has a destructor (resp. printer)
but all symbols of this type have already a destructor (resp. printer),
then raise a warning.
* tests/input.at (Useless printers or destructors): New.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2012-06-26 15:57:46 +02:00
Akim Demaille
77519a7d18 tests: use assert instead of plain abort.
* tests/actions.at, tests/calc.at, tests/conflicts.at,
* tests/cxx-type.at, tests/glr-regression.at, tests/input.at,
* tests/named-refs.at, tests/regression.at, tests/torture.at,
* tests/local.at:
Prefer assert to abort.
2012-06-26 13:55:50 +02:00
Akim Demaille
91ce0b3a66 tests: generalize the compilation macros.
* tests/local.at (AT_COMPILE, AT_COMPILE_CXX): If OUTPUT ends with ".o",
then append the "natural" extension for the input file (.c or .cc).
If there is no source, pass -c.
* tests/headers.at, tests/input.at, tests/regression.at: Adjust.
2012-06-26 13:55:49 +02:00
Victor Santet
9641b918ba warnings: useless semantic types
* src/symtab.h (symbol_list): Represent semantic types as structure
'semantic_type'.
* src/symlist.c (symbol_list_type_new): Allocate this structure.
(symbol_list_code_props_set): Set this semantic type's status to used if it
was not declared.
* src/symtab.c (semantic_types_sorted): New.
(semantic_type_new): Set the new semantic type's location appropriately.
(symbol_check_defined): If a symbol has a type, then set this type's status
to "declared".
(semantic_type_check_defined, semantic_type_check_defined_processor): Same
as symbol_check_defined and symbol_check_defined_processor, but for semantic
types.
(symbol_check_defined): Check semantic types usefulness.
* src/symtab.h (semantic_type): New fields 'location' and 'status'.
* src/symtab.h, src/symtab.c (semantic_type_new)
(semantic_type_from_uniqstr, semantic_type_get): Accept a location as a
supplementary argument.
* tests/input.at (Unassociated types used for printer of destructor): New.
* tests/c++.at (AT_CHECK_VARIANTS): Fix an error caught by this commit.
2012-06-25 11:29:14 +02:00
Akim Demaille
3b0b682fd6 fix warnings for useless %printer/%destructor
The previous commit, which turns into a warning what used to be an
error:

    %printer {} foo;
    %%
    exp: '0';

has two shortcomings: the warning is way too long (foo is reported
to be useless later), and besides, it also turns into a warning much
more serious errors:

   %printer {} foo;
   %%
   exp: foo;

Reduce the amount to warnings in the first case, restore the error in
the second.

* src/symtab.h (status): Add a new inital state: undeclared.
* src/symtab.c (symbol_new): Initialize to undeclared.
(symbol_class_set): Simplify the logic of the code that neutralize
the "redeclared" warning after the "redefined" one.
(symbol_check_defined): "undeclared" is also an error.
* src/reader.c (grammar_current_rule_symbol_append): Symbols appearing
in a rule are "needed".
* src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
An unknown symbol appearing in a %printer/%destructor is "used".
* src/reduce.c (nonterminals_reduce): Do not report as "useless" symbols
that are not used (e.g., those that for instance appeared only in a
%printer).
* tests/input.at (Undeclared symbols used for a printer or destructor):
Improve the cover the cases described above.
2012-06-20 21:53:27 +02:00
Victor Santet
b921d92fcb warnings: used but undeclared symbols are warnings
We used to raise an error if a symbol appears only in a %printer or
%destructor.  Make it a warning.

* src/symtab.h (status): New enum.
(symbol): Replace the binary "declared" with the three-state "status".
Adjust dependencies.
* src/symtab.c (symbol_check_defined): Needed symbols are an error,
whereas "used" are simply warnings.
* src/symlist.c (symbol_list_destructor_set, symbol_list_printer): Set
symbol status to 'used' when associated to destructors or printers.
* input.at (Undeclared symbols used for a printer or destructor): New.
2012-06-20 10:30:26 +02:00
Akim Demaille
e436fa677c Merge remote-tracking branch 'origin/maint'
* origin/maint:
  maint: formatting changes.
  tests: support api.prefix.
  tests: pacify font-lock-mode.
  tests: remove test covered elsewhere.
  tests: factor the declaration/definition of yyerror and yylex.
  regen.
  tests: portability issues.
  tests: call the parser from another compilation unit.
  glr.c, yacc.c: declare yydebug in the header.
  skeletons: use header guards.
  tests: improve AT_FULL_COMPILE.
  tests: reorder.
  tests: strengthen the test on generated headers inclusion
  yacc.c: instead of duplicating y.tab.h inside y.tac.c, include it.
  yacc.c: factor.

Conflicts:
	NEWS
	data/glr.c
	data/yacc.c
	src/parse-gram.c
	src/parse-gram.h
	tests/conflicts.at
	tests/regression.at
2012-06-19 18:17:09 +02:00
Akim Demaille
71c7e24f2e tests: support api.prefix.
* tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
Define AT_API_PREFIX.
(AT_YYERROR_DEFINE, AT_YYERROR_DECLARE_EXTERN, AT_YYLEX_DECLARE_EXTERN)
(AT_YYLEX_DEFINE): Use it.
* tests/input.at, tests/regression.at, tests/torture.at: Add
AT_BISON_OPTION_PUSHDEFS/POPDEFS.
2012-06-17 19:37:07 +02:00
Akim Demaille
55f48c4831 tests: factor the declaration/definition of yyerror and yylex.
* tests/local.at (AT_YYERROR_DECLARE, AT_YYERROR_DECLARE_EXTERN)
(AT_YYERROR_DEFINE, AT_YYLEX_DECLARE, AT_YYLEX_DECLARE_EXTERN)
(AT_YYLEX_DEFINE): New.
Must be used inside AT_BISON_OPTION_PUSHDEFS/POPDEFS pair.
* tests/actions.at, tests/conflicts.at, tests/glr-regression.at,
* tests/headers.at, tests/input.at, tests/named-refs.at,
* tests/regression.at, tests/skeletons.at, tests/synclines.at,
* tests/torture.at: Use them.
2012-06-17 19:37:07 +02:00
Akim Demaille
a703b669b4 tests: style changes.
* tests/input.at: Use "print" in %printer instead of "destroy".
It is unused, so we don't care, yet it is less surprising.
* tests/actions.at: Comment changes.

(cherry picked from commit abcd36ca1b)
2012-04-16 17:18:31 +02:00
Akim Demaille
abcd36ca1b tests: style changes.
* tests/input.at: Use "print" in %printer instead of "destroy".
It is unused, so we don't care, yet it is less surprising.
* tests/actions.at: Comment changes.
2012-04-16 17:04:13 +02:00