[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03-fyi-fix-sr.patch
From: |
Akim Demaille |
Subject: |
03-fyi-fix-sr.patch |
Date: |
Sun, 30 Dec 2001 22:05:14 +0100 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* src/parse-skel.y: Get rid of the shift/reduce conflict:
replace `gb' with BLANKS.
* src/scan-skel.l: Adjust.
Index: src/parse-skel.y
--- src/parse-skel.y Sun, 30 Dec 2001 21:39:12 +0100 akim
+++ src/parse-skel.y Sun, 30 Dec 2001 22:02:33 +0100 akim
@@ -50,12 +50,20 @@
{
char *muscle;
char *string;
+ char *literal;
char character;
int yacc;
}
+/* Name of a muscle. */
%token <muscle> MUSCLE
+/* A string dedicated to Bison (%%"foo"). */
%token <string> STRING
+/* Raw data, to output directly. */
+%token <literal> RAW
+/* Spaces. */
+%token <literal> BLANKS
+/* Raw data, but char by char. */
%token <character> CHARACTER
%token LINE
@@ -81,7 +89,7 @@
section : section.header section.body { }
;
-section.header : SECTION gb MUSCLE gb STRING gb section.yacc gb '\n'
+section.header : SECTION BLANKS MUSCLE BLANKS STRING BLANKS section.yacc '\n'
{
char *name = 0;
char *limit = 0;
@@ -140,6 +148,8 @@
| section.body TOKENS { token_definitions_output (parser, &output_line); }
| section.body ACTIONS { actions_output (parser, &output_line); }
| section.body CHARACTER { fputc ($2, parser); }
+| section.body RAW { fputs ($2, parser); }
+| section.body BLANKS { fputs ($2, parser); }
| section.body MUSCLE {
const char* value = muscle_find ($2);
if (value)
@@ -154,11 +164,6 @@
}
}
;
-
-gb : /* Empty. */ { }
- | gb CHARACTER { /* Do not echo garbage characters. */ }
-;
-
%%
static int
Index: src/scan-skel.l
--- src/scan-skel.l Sun, 30 Dec 2001 21:39:12 +0100 akim
+++ src/scan-skel.l Sun, 30 Dec 2001 22:01:25 +0100 akim
@@ -64,6 +64,12 @@
return '\n';
}
+ /* White spaces. */
+[\t ]+ {
+ yylval.literal = yytext;
+ return BLANKS;
+}
+
/* Plain Character. */
. {
yylval.character = *yytext;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 03-fyi-fix-sr.patch,
Akim Demaille <=