[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 07/10] java: rename YYMORE as YYPUSH_MORE for consistency with C
From: |
Akim Demaille |
Subject: |
[PATCH 07/10] java: rename YYMORE as YYPUSH_MORE for consistency with C |
Date: |
Mon, 24 Jun 2013 10:50:04 +0200 |
http://lists.gnu.org/archive/html/bison-patches/2013-06/msg00008.html
* data/lalr1.java, doc/bison.texi, tests/javapush.at:
s/YYMORE/YYPUSH_MORE.
---
data/lalr1.java | 10 +++++-----
doc/bison.texi | 4 ++--
tests/javapush.at | 16 ++++++++--------
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/data/lalr1.java b/data/lalr1.java
index 1598823..d137ed8 100644
--- a/data/lalr1.java
+++ b/data/lalr1.java
@@ -419,7 +419,7 @@ b4_lexer_if([[
/**
* Returned by a Bison action in order to request a new token.
*/
- public static final int YYMORE = 4;])[
+ public static final int YYPUSH_MORE = 4;])[
/**
* Returned by a Bison action in order to start error recovery without
@@ -564,7 +564,7 @@ b4_define_state])[
* @@param yylexval current lval
]b4_locations_if([ * @@param yylexloc current position])[
*
- * @@return <tt>YYACCEPT, YYABORT, YYMORE</tt>
+ * @@return <tt>YYACCEPT, YYABORT, YYPUSH_MORE</tt>
*/
public int push_parse (int yylextoken, b4_yystype
yylexval[]b4_locations_if([, b4_location_type yylexloc]))
b4_maybe_throws([b4_list2([b4_lex_throws], [b4_throws])])])[
@@ -632,7 +632,7 @@ b4_dollar_popdef[]dnl
{
]b4_push_if([[
if (!push_token_consumed)
- return YYMORE;
+ return YYPUSH_MORE;
yycdebug ("Reading a token: ");
yychar = yylextoken;
yylval = yylexval;]b4_locations_if([
@@ -870,7 +870,7 @@ b4_dollar_popdef[]dnl
* @@param yylexval current lval
* @@param yyylexpos current position
*
- * @@return <tt>YYACCEPT, YYABORT, YYMORE</tt>
+ * @@return <tt>YYACCEPT, YYABORT, YYPUSH_MORE</tt>
*/
public int push_parse (int yylextoken, b4_yystype yylexval, b4_position_type
yylexpos)
b4_maybe_throws([b4_list2([b4_lex_throws], [b4_throws])])
@@ -901,7 +901,7 @@ b4_both_if([[
yylexer.getEndPos ());])[
]b4_locations_if([status = push_parse(token,lval,yyloc);],[
status = push_parse(token,lval);])[
- } while (status == YYMORE);
+ } while (status == YYPUSH_MORE);
return (status == YYACCEPT);
}
]])[
diff --git a/doc/bison.texi b/doc/bison.texi
index bd023ed..78d7d06 100644
--- a/doc/bison.texi
+++ b/doc/bison.texi
@@ -11927,8 +11927,8 @@ parameters are available only if location tracking is
active.
The value returned by the @code{push_parse} method is one of the following
four constants: @code{YYABORT}, @code{YYACCEPT}, @code{YYERROR}, or
address@hidden This new value, @code{YYMORE}, may be returned if more input
-is required to finish parsing the grammar.
address@hidden This new value, @code{YYPUSH_MORE}, may be returned if
+more input is required to finish parsing the grammar.
If api.push-pull is declared as @code{both}, then the generated parser class
will also implement the @code{parse} method. This method's body is a loop
diff --git a/tests/javapush.at b/tests/javapush.at
index 306b37d..2f71053 100644
--- a/tests/javapush.at
+++ b/tests/javapush.at
@@ -83,7 +83,7 @@ m4_define([AT_TRIVIAL_COMMON],[
}
static String[[]] teststatename
- = new String[[]]{"YYACCEPT","YYABORT","YYERROR","UNKNOWN","YYMORE"};
+ = new String[[]]{"YYACCEPT","YYABORT","YYERROR","UNKNOWN","YYPUSH_MORE"};
static void check(int teststate, int expected, String msg)
{
@@ -110,16 +110,16 @@ m4_define([AT_TRIVIAL_PARSER],[
setup();
teststate = parser.push_parse('a', null);
- check(teststate,YYParser.YYMORE,"push_parse('a', null)");
+ check(teststate,YYParser.YYPUSH_MORE,"push_parse('a', null)");
setup();
teststate = parser.push_parse('a', null);
- check(teststate,YYParser.YYMORE,"push_parse('a', null)");
+ check(teststate,YYParser.YYPUSH_MORE,"push_parse('a', null)");
teststate = parser.push_parse('b', null);
- check(teststate,YYParser.YYMORE,"push_parse('b', null)");
+ check(teststate,YYParser.YYPUSH_MORE,"push_parse('b', null)");
teststate = parser.push_parse('c', null);
- check(teststate,YYParser.YYMORE,"push_parse('c', null)");
+ check(teststate,YYParser.YYPUSH_MORE,"push_parse('c', null)");
teststate = parser.push_parse('\0', null);
check(teststate,YYParser.YYACCEPT,"push_parse('\\0', null)");
@@ -147,11 +147,11 @@ m4_define([AT_TRIVIAL_PARSER_INITIAL_ACTION],[
setup();
teststate = parser.push_parse('a', null);
- check(teststate,YYParser.YYMORE,"push_parse('a', null)");
+ check(teststate,YYParser.YYPUSH_MORE,"push_parse('a', null)");
teststate = parser.push_parse('b', null);
- check(teststate,YYParser.YYMORE,"push_parse('b', null)");
+ check(teststate,YYParser.YYPUSH_MORE,"push_parse('b', null)");
teststate = parser.push_parse('c', null);
- check(teststate,YYParser.YYMORE,"push_parse('c', null)");
+ check(teststate,YYParser.YYPUSH_MORE,"push_parse('c', null)");
teststate = parser.push_parse('\0', null);
check(teststate,YYParser.YYACCEPT,"push_parse('\\0', null)");
--
1.8.2.3
- [PATCH 00/10] Push parser support for Java, Akim Demaille, 2013/06/24
- [PATCH 04/10] java: push: do not reset the error counter, Akim Demaille, 2013/06/24
- [PATCH 01/10] build: ship all the files, even if the C++ compiler is broken, Akim Demaille, 2013/06/24
- [PATCH 03/10] build: add Valgrind suppression file for GNU/Linux, Akim Demaille, 2013/06/24
- [PATCH 10/10] maint: post-release administrivia, Akim Demaille, 2013/06/24
- [PATCH 05/10] style: minor changes in the Java tests, Akim Demaille, 2013/06/24
- [PATCH 07/10] java: rename YYMORE as YYPUSH_MORE for consistency with C,
Akim Demaille <=
- [PATCH 06/10] tests: fix Java push failure when running with BISON_USE_PUSH_FOR_PULL, Akim Demaille, 2013/06/24
- [PATCH 08/10] NEWS: prepare for 2.7.91, Akim Demaille, 2013/06/24
- [PATCH 09/10] version 2.7.91, Akim Demaille, 2013/06/24
- [PATCH 02/10] java: add push-parser support, Akim Demaille, 2013/06/24