Merge remote-tracking branch 'origin/maint'

* origin/maint:
  parser: accept #line NUM
  m4: use a safer pattern to enable/disable output
  tests: beware of gnulib's need for config.h
  gnulib: update
  yacc.c, glr.c: check and fix the display of locations
  formatting changes
  glr.c: remove stray macro

Conflicts:
	data/c.m4
	data/glr.cc
	data/lalr1.cc
	data/lalr1.java
	data/location.cc
	data/stack.hh
	data/yacc.c
	src/scan-gram.l
This commit is contained in:
Akim Demaille
2012-12-03 16:27:23 +01:00
18 changed files with 198 additions and 73 deletions

View File

@@ -188,13 +188,10 @@ m4_if(b4_skeleton, ["glr.c"],
## Output files. ##
## -------------- ##
# We do want M4 expansion after # for CPP macros.
m4_changecom()
m4_divert_push(0)dnl
@output(b4_parser_file_name@)@
b4_output_begin([b4_parser_file_name])
b4_copyright([Skeleton implementation for Bison GLR parsers in C],
[2002-2012])
[
[2002-2012])[
/* C GLR parser skeleton written by Paul Hilfinger. */
]b4_identification
@@ -305,13 +302,6 @@ b4_percent_code_get[]dnl
# endif
#endif
]b4_locations_if([#define YYOPTIONAL_LOC(Name) Name],[
#ifdef __cplusplus
# define YYOPTIONAL_LOC(Name) /* empty */
#else
# define YYOPTIONAL_LOC(Name) Name __attribute__ ((__unused__))
#endif])[
#ifndef YYASSERT
# define YYASSERT(Condition) ((void) ((Condition) || (abort (), 0)))
#endif
@@ -2560,17 +2550,17 @@ yypdumpstack (yyGLRStack* yystackp)
}
#endif
]b4_epilogue[]dnl
dnl
dnl glr.cc produces its own header.
dnl
b4_output_end()
# glr.cc produces its own header.
m4_if(b4_skeleton, ["glr.c"],
[b4_defines_if(
[@output(b4_spec_defines_file@)@
[b4_output_begin([b4_spec_defines_file])
b4_copyright([Skeleton interface for Bison GLR parsers in C],
[2002-2012])[
]b4_cpp_guard_open([b4_spec_defines_file])[
]b4_shared_declarations[
]b4_cpp_guard_close([b4_spec_defines_file])[
]])])dnl
m4_divert_pop(0)
]b4_output_end()
])])