bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: merge maint in master


From: Akim Demaille
Subject: FYI: merge maint in master
Date: Tue, 16 Oct 2012 15:29:01 +0200

commit 8ea6525e3a092b76256fbed7d6edbb0a1861aee1
Merge: f3bc338 7287be8
Author: Akim Demaille <address@hidden>
Date:   Tue Oct 16 15:26:55 2012 +0200

    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

diff --git a/NEWS b/NEWS
index 8cc3602..4b7caff 100644
--- a/NEWS
+++ b/NEWS
@@ -283,7 +283,7 @@ GNU Bison NEWS
 
   The parse function now catches exceptions, uses the %destructors to
   release memory (the lookahead symbol and the symbols pushed on the stack)
-  before rethrowing the exception.
+  before re-throwing the exception.
 
   This feature is somewhat experimental.  User feedback would be
   appreciated.
@@ -305,7 +305,7 @@ GNU Bison NEWS
   "function declared 'noreturn' should not return") have also been
   addressed.
 
-** New %define variable: api.location.type (glr.cc, lalr1.cc)
+** New %define variable: api.location.type (glr.cc, lalr1.cc, lalr1.java)
 
   The %define variable api.location.type defines the name of the type to use
   for locations.  When defined, Bison no longer generates the position.hh
@@ -320,6 +320,10 @@ GNU Bison NEWS
   under the name "location_type" (which is maintained for backward
   compatibility).
 
+  For consistency, lalr1.java's %define variables location_type and
+  position_type are deprecated in favor of api.location.type and
+  api.position.type.
+
 * Noteworthy changes in release 2.6.2 (2012-08-03) [stable]
 
 ** Bug fixes
diff --git a/data/java.m4 b/data/java.m4
index c16ab0b..2bbd09a 100644
--- a/data/java.m4
+++ b/data/java.m4
@@ -200,8 +200,8 @@ m4_define([b4_init_throws], 
[b4_percent_define_get([[init_throws]])])
 b4_percent_define_default([[api.location.type]], [Location])
 m4_define([b4_location_type], [b4_percent_define_get([[api.location.type]])])
 
-b4_percent_define_default([[position_type]], [Position])
-m4_define([b4_position_type], [b4_percent_define_get([[position_type]])])
+b4_percent_define_default([[api.position.type]], [Position])])
+m4_define([b4_position_type], [b4_percent_define_get([[api.position.type]])])
 
 
 ## ----------------- ##
diff --git a/doc/bison.texi b/doc/bison.texi
index 674aef7..84ec16d 100644
--- a/doc/bison.texi
+++ b/doc/bison.texi
@@ -5479,7 +5479,7 @@ The parser namespace is @code{foo} and @code{yylex} is 
referenced as
 @findex %define api.location.type
 
 @itemize @bullet
address@hidden Language(s): C++
address@hidden Language(s): C++, Java
 
 @item Purpose: Define the location type.
 @xref{User Defined Location Type}.
@@ -9923,7 +9923,7 @@ to generate the @file{master/position.hh} and 
@file{master/location.hh}
 files, reused by other parsers as follows:
 
 @example
-%define location_type "master::location"
+%define api.location.type "master::location"
 %code requires @{ #include <master/location.hh> @}
 @end example
 
@@ -10812,11 +10812,11 @@ class defines a @dfn{position}, a single point in a 
file; Bison itself
 defines a class representing a @dfn{location}, a range composed of a pair of
 positions (possibly spanning several files).  The location class is an inner
 class of the parser; the name is @code{Location} by default, and may also be
-renamed using @samp{%define location_type "@var{class-name}"}.
+renamed using @code{%define api.location.type "@var{class-name}"}.
 
 The location class treats the position as a completely opaque value.
 By default, the class name is @code{Position}, but this can be changed
-with @samp{%define position_type "@var{class-name}"}.  This class must
+with @code{%define api.position.type "@var{class-name}"}.  This class must
 be supplied by the user.
 
 
@@ -10978,7 +10978,7 @@ In both cases, the scanner has to implement the 
following methods.
 @deftypemethod {Lexer} {void} yyerror (Location @var{loc}, String @var{msg})
 This method is defined by the user to emit an error message.  The first
 parameter is omitted if location tracking is not active.  Its type can be
-changed using @samp{%define location_type "@var{class-name}".}
+changed using @code{%define api.location.type "@var{class-name}".}
 @end deftypemethod
 
 @deftypemethod {Lexer} {int} yylex ()
@@ -10996,7 +10996,7 @@ Return respectively the first position of the last 
token that
 @code{yylex} returned, and the first position beyond it.  These
 methods are not needed unless location tracking is active.
 
-The return type can be changed using @samp{%define position_type
+The return type can be changed using @code{%define api.position.type
 "@var{class-name}".}
 @end deftypemethod
 
@@ -11258,10 +11258,11 @@ comma-separated list.  Default is 
@code{java.io.IOException}.
 @xref{Java Scanner Interface}.
 @end deffn
 
address@hidden {Directive} {%define location_type} "@var{class}"
address@hidden {Directive} {%define api.location.type} "@var{class}"
 The name of the class used for locations (a range between two
 positions).  This class is generated as an inner class of the parser
 class by @command{bison}.  Default is @code{Location}.
+Formerly named @code{location_type}.
 @xref{Java Location Values}.
 @end deffn
 
@@ -11276,9 +11277,10 @@ The name of the parser class.  Default is 
@code{YYParser} or
 @xref{Java Bison Interface}.
 @end deffn
 
address@hidden {Directive} {%define position_type} "@var{class}"
address@hidden {Directive} {%define api.position.type} "@var{class}"
 The name of the class used for positions. This class must be supplied by
 the user.  Default is @code{Position}.
+Formerly named @code{position_type}.
 @xref{Java Location Values}.
 @end deffn
 
@@ -12577,9 +12579,10 @@ London, Department of Computer Science, TR-00-12 
(December 2000).
 @c LocalWords: getLVal defvar deftypefn deftypefnx gotos msgfmt Corbett LALR's
 @c LocalWords: subdirectory Solaris nonassociativity perror schemas Malloy ints
 @c LocalWords: Scannerless ispell american ChangeLog smallexample CSTYPE CLTYPE
address@hidden LocalWords: clval CDEBUG cdebug deftypeopx yyterminate
address@hidden LocalWords: clval CDEBUG cdebug deftypeopx yyterminate 
LocationType
 
 @c Local Variables:
 @c ispell-dictionary: "american"
 @c fill-column: 76
 @c End:
address@hidden  LocalWords:  errorVerbose
diff --git a/gnulib b/gnulib
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit dcf27bef48c9800d5a2be8349226f73f1b8ff2e5
+Subproject commit dcf27bef48c9800d5a2be8349226f73f1b8ff2e5-dirty
diff --git a/tests/java.at b/tests/java.at
index 5b0c152..1c9bd50 100644
--- a/tests/java.at
+++ b/tests/java.at
@@ -752,7 +752,7 @@ AT_CHECK_JAVA_MINIMAL([[
 %define stype "java.awt.Color"
 %type<java.awt.Color> start;
 %define api.location.type "MyLoc"
-%define position_type "MyPos"
+%define api.position.type "MyPos"
 %code { class MyPos {} }]], [[$$ = $<java.awt.Color>1;]], [[MyPos]])
 AT_CHECK([[grep 'java.awt.Color' YYParser.java]], [0], [ignore])
 AT_CHECK([[$EGREP -v ' */?\*' YYParser.java | grep 'Position']], [1], [ignore])
@@ -762,7 +762,7 @@ AT_CHECK_JAVA_MINIMAL_W_LEXER([[
 %define stype "java.awt.Color"
 %type<java.awt.Color> start;
 %define api.location.type "MyLoc"
-%define position_type "MyPos"
+%define api.position.type "MyPos"
 %code { class MyPos {} }]], [], [[return EOF;]], [],
 [[$$ = $<java.awt.Color>1;]],
 [[java.awt.Color]], [[MyPos]], [[MyLoc]])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]