bison-patches
[Top][All Lists]
Advanced

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

Re: 002-gary-error-msg-quoting-test


From: Akim Demaille
Subject: Re: 002-gary-error-msg-quoting-test
Date: 10 Sep 2002 15:46:52 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter)

| | 10-09-2002  Gary V. Vaughan  <address@hidden>
| |         * tests/regression.at (Invalid inputs): Fix quotation marks in
| |         expected output.
| | 
| | --- tests/regression.at.orig    Tue Sep 10 14:06:57 2002
| | +++ tests/regression.at Tue Sep 10 14:11:25 2002
| | @@ -298,7 +298,7 @@
| |  input.y:6.1: invalid character: `%'
| |  input.y:6.2: invalid character: `-'
| |  input.y:7.1-8.0: unexpected end of file in a prologue
| | -input.y:7.1-8.0: parse error, unexpected PROLOGUE, expecting ";" or "|"
| | +input.y:7.1-8.0: parse error, unexpected `PROLOGUE', expecting `";"' or 
`"|"'
| |  ]])
| |  
| |  AT_CLEANUP
| 
| Hi Gary,
| 
| This patch is wrong: the quotes are no longer there.  How come you
| have them?

You were probably using an older Bison to bootstrap.  Anyway, I'm
installing the following.

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * src/parse-gram.y: Associate a human readable string to each
        token type.
        * tests/regression.at (Invalid inputs): Adjust.

Index: src/parse-gram.y
===================================================================
RCS file: /cvsroot/bison/bison/src/parse-gram.y,v
retrieving revision 1.22
diff -u -u -r1.22 parse-gram.y
--- src/parse-gram.y 12 Aug 2002 14:49:45 -0000 1.22
+++ src/parse-gram.y 10 Sep 2002 13:49:08 -0000
@@ -95,9 +95,10 @@
 };
 
 /* Define the tokens together with their human representation.  */
-%token GRAM_EOF 0 "end of string"
-%token STRING CHARACTER
-%token INT
+%token GRAM_EOF 0 "end of file"
+%token STRING     "string"
+%token CHARACTER  "character"
+%token INT        "integer"
 
 %token PERCENT_TOKEN       "%token"
 %token PERCENT_NTERM       "%nterm"
@@ -112,41 +113,43 @@
 %token PERCENT_RIGHT       "%right"
 %token PERCENT_NONASSOC    "%nonassoc"
 
-%token PERCENT_EXPECT "%expect"
-%token PERCENT_START "%start"
-%token PERCENT_PREC     "%prec"
-%token PERCENT_DPREC    "%dprec"
-%token PERCENT_MERGE    "%merge"
-%token PERCENT_VERBOSE  "%verbose"
+%token PERCENT_EXPECT        "%expect"
+%token PERCENT_START         "%start"
+%token PERCENT_PREC          "%prec"
+%token PERCENT_DPREC         "%dprec"
+%token PERCENT_MERGE         "%merge"
+%token PERCENT_VERBOSE       "%verbose"
 %token PERCENT_ERROR_VERBOSE "%error-verbose"
 
-%token PERCENT_OUTPUT "%output"
+%token PERCENT_OUTPUT      "%output"
 %token PERCENT_FILE_PREFIX "%file-prefix"
 %token PERCENT_NAME_PREFIX "%name-prefix"
 
-%token PERCENT_DEFINE "%define"
+%token PERCENT_DEFINE      "%define"
 %token PERCENT_PURE_PARSER "%pure-parser"
-%token PERCENT_GLR_PARSER "%glr-parser"
+%token PERCENT_GLR_PARSER  "%glr-parser"
 
 %token PERCENT_DEFINES "%defines"
 
 %token PERCENT_YACC "%yacc"
 
-%token PERCENT_DEBUG "%debug"
-%token PERCENT_LOCATIONS "%locations"
-%token PERCENT_NO_LINES "%no-lines"
-%token PERCENT_SKELETON "%skeleton"
+%token PERCENT_DEBUG       "%debug"
+%token PERCENT_LOCATIONS   "%locations"
+%token PERCENT_NO_LINES    "%no-lines"
+%token PERCENT_SKELETON    "%skeleton"
 %token PERCENT_TOKEN_TABLE "%token-table"
 
-%token TYPE
-%token EQUAL "="
-%token SEMICOLON ";"
-%token COLON ":"
-%token PIPE "|"
-%token ID "identifier"
+%token TYPE            "type"
+%token EQUAL           "="
+%token SEMICOLON       ";"
+%token COLON           ":"
+%token PIPE            "|"
+%token ID              "identifier"
 %token PERCENT_PERCENT "%%"
-%token PROLOGUE EPILOGUE
-%token BRACED_CODE
+%token PROLOGUE        "%{...%}"
+%token EPILOGUE        "epilogue"
+%token BRACED_CODE     "{...}"
+
 
 %type <string> CHARACTER TYPE STRING string_content
                BRACED_CODE PROLOGUE EPILOGUE epilogue.opt action
Index: tests/regression.at
===================================================================
RCS file: /cvsroot/bison/bison/tests/regression.at,v
retrieving revision 1.65
diff -u -u -r1.65 regression.at
--- tests/regression.at 12 Aug 2002 14:58:16 -0000 1.65
+++ tests/regression.at 10 Sep 2002 13:49:08 -0000
@@ -298,7 +298,7 @@
 input.y:6.1: invalid character: `%'
 input.y:6.2: invalid character: `-'
 input.y:7.1-8.0: unexpected end of file in a prologue
-input.y:7.1-8.0: parse error, unexpected PROLOGUE, expecting ";" or "|"
+input.y:7.1-8.0: parse error, unexpected "%{...}%", expecting ";" or "|"
 ]])
 
 AT_CLEANUP





reply via email to

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