From c9aded4b888b9bd699c083357a143b7ae5b46c28 Mon Sep 17 00:00:00 2001 From: "Joel E. Denny" Date: Wed, 29 Apr 2009 20:05:32 -0400 Subject: [PATCH] Document how `%define "var" "value"' is not M4-friendly. * src/parse-gram.y (variable): In comments here. (cherry picked from commit 904ea1bca411d4d5f4f729e7f2982841a858f5ea) Conflicts: src/parse-gram.c --- ChangeLog | 5 +++++ src/parse-gram.c | 26 +++++++++++++------------- src/parse-gram.h | 2 +- src/parse-gram.y | 2 ++ 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index e784f9c1..20d57d86 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-24 Joel E. Denny + + Document how `%define "var" "value"' is not M4-friendly. + * src/parse-gram.y (variable): In comments here. + 2009-04-24 Joel E. Denny Clean up recent patches a little. diff --git a/src/parse-gram.c b/src/parse-gram.c index 7ccd4669..2b806f54 100644 --- a/src/parse-gram.c +++ b/src/parse-gram.c @@ -1,4 +1,4 @@ -/* A Bison parser, made by GNU Bison 2.4.305-d937. */ +/* A Bison parser, made by GNU Bison 2.4.307-8f0d-dirty. */ /* Implementation for Bison's Yacc-like parsers in C @@ -45,7 +45,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.305-d937" +#define YYBISON_VERSION "2.4.307-8f0d-dirty" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -615,8 +615,8 @@ static const yytype_uint16 yyrline[] = 428, 430, 435, 436, 440, 441, 442, 443, 448, 453, 458, 464, 470, 481, 482, 491, 492, 498, 499, 500, 507, 507, 511, 512, 513, 518, 519, 521, 523, 525, - 527, 537, 538, 543, 544, 553, 573, 575, 584, 589, - 590, 595, 602, 604 + 527, 539, 540, 545, 546, 555, 575, 577, 586, 591, + 592, 597, 604, 606 }; #endif @@ -2546,7 +2546,7 @@ yyreduce: case 92: /* Line 1380 of yacc.c */ -#line 538 "parse-gram.y" +#line 540 "parse-gram.y" { (yyval.uniqstr) = uniqstr_new ((yyvsp[0].chars)); } /* Line 1380 of yacc.c */ #line 2553 "src/parse-gram.c" @@ -2554,7 +2554,7 @@ yyreduce: case 93: /* Line 1380 of yacc.c */ -#line 543 "parse-gram.y" +#line 545 "parse-gram.y" { (yyval.chars) = ""; } /* Line 1380 of yacc.c */ #line 2561 "src/parse-gram.c" @@ -2562,7 +2562,7 @@ yyreduce: case 95: /* Line 1380 of yacc.c */ -#line 554 "parse-gram.y" +#line 556 "parse-gram.y" { code_props plain_code; (yyvsp[0].code)[strlen ((yyvsp[0].code)) - 1] = '\n'; @@ -2577,7 +2577,7 @@ yyreduce: case 96: /* Line 1380 of yacc.c */ -#line 574 "parse-gram.y" +#line 576 "parse-gram.y" { (yyval.symbol) = symbol_from_uniqstr ((yyvsp[0].uniqstr), (yylsp[0])); } /* Line 1380 of yacc.c */ #line 2584 "src/parse-gram.c" @@ -2585,7 +2585,7 @@ yyreduce: case 97: /* Line 1380 of yacc.c */ -#line 576 "parse-gram.y" +#line 578 "parse-gram.y" { (yyval.symbol) = symbol_get (char_name ((yyvsp[0].character)), (yylsp[0])); symbol_class_set ((yyval.symbol), token_sym, (yylsp[0]), false); @@ -2597,7 +2597,7 @@ yyreduce: case 98: /* Line 1380 of yacc.c */ -#line 584 "parse-gram.y" +#line 586 "parse-gram.y" { (yyval.symbol) = symbol_from_uniqstr ((yyvsp[0].uniqstr), (yylsp[0])); } /* Line 1380 of yacc.c */ #line 2604 "src/parse-gram.c" @@ -2605,7 +2605,7 @@ yyreduce: case 101: /* Line 1380 of yacc.c */ -#line 596 "parse-gram.y" +#line 598 "parse-gram.y" { (yyval.symbol) = symbol_get (quotearg_style (c_quoting_style, (yyvsp[0].chars)), (yylsp[0])); symbol_class_set ((yyval.symbol), token_sym, (yylsp[0]), false); @@ -2616,7 +2616,7 @@ yyreduce: case 103: /* Line 1380 of yacc.c */ -#line 605 "parse-gram.y" +#line 607 "parse-gram.y" { code_props plain_code; code_props_plain_init (&plain_code, (yyvsp[0].chars), (yylsp[0])); @@ -2848,7 +2848,7 @@ yyreturn: } /* Line 1599 of yacc.c */ -#line 615 "parse-gram.y" +#line 617 "parse-gram.y" diff --git a/src/parse-gram.h b/src/parse-gram.h index 7a64824b..1163bbdc 100644 --- a/src/parse-gram.h +++ b/src/parse-gram.h @@ -1,4 +1,4 @@ -/* A Bison parser, made by GNU Bison 2.4.305-d937. */ +/* A Bison parser, made by GNU Bison 2.4.307-8f0d-dirty. */ /* Interface for Bison's Yacc-like parsers in C diff --git a/src/parse-gram.y b/src/parse-gram.y index caa3d309..f5015e24 100644 --- a/src/parse-gram.y +++ b/src/parse-gram.y @@ -533,6 +533,8 @@ rhs: | variable and content.opt. | `---------------------------*/ +/* The STRING form of variable is deprecated and is not M4-friendly. + For example, M4 fails for `%define "[" "value"'. */ variable: ID | STRING { $$ = uniqstr_new ($1); } -- 2.45.2