Commit 5ab96f44 authored by Roman Zippel's avatar Roman Zippel Committed by Linus Torvalds

[PATCH] kconfig: fix T_STRING usage

T_STRING token was used twice, so quoted strings use now T_WORD_QUOTE.
parent 8a41374c
...@@ -2148,7 +2148,7 @@ YY_RULE_SETUP ...@@ -2148,7 +2148,7 @@ YY_RULE_SETUP
{ {
append_string(yytext, yyleng); append_string(yytext, yyleng);
zconflval.string = text; zconflval.string = text;
return T_STRING; return T_WORD_QUOTE;
} }
YY_BREAK YY_BREAK
case 47: case 47:
...@@ -2165,7 +2165,7 @@ YY_RULE_SETUP ...@@ -2165,7 +2165,7 @@ YY_RULE_SETUP
{ {
append_string(yytext + 1, yyleng - 1); append_string(yytext + 1, yyleng - 1);
zconflval.string = text; zconflval.string = text;
return T_STRING; return T_WORD_QUOTE;
} }
YY_BREAK YY_BREAK
case 49: case 49:
...@@ -2180,7 +2180,7 @@ YY_RULE_SETUP ...@@ -2180,7 +2180,7 @@ YY_RULE_SETUP
if (str == yytext[0]) { if (str == yytext[0]) {
BEGIN(PARAM); BEGIN(PARAM);
zconflval.string = text; zconflval.string = text;
return T_STRING; return T_WORD_QUOTE;
} else } else
append_string(yytext, 1); append_string(yytext, 1);
} }
......
...@@ -152,7 +152,7 @@ n [A-Za-z0-9_] ...@@ -152,7 +152,7 @@ n [A-Za-z0-9_]
[^'"\\\n]+/\n { [^'"\\\n]+/\n {
append_string(yytext, yyleng); append_string(yytext, yyleng);
zconflval.string = text; zconflval.string = text;
return T_STRING; return T_WORD_QUOTE;
} }
[^'"\\\n]+ { [^'"\\\n]+ {
append_string(yytext, yyleng); append_string(yytext, yyleng);
...@@ -160,7 +160,7 @@ n [A-Za-z0-9_] ...@@ -160,7 +160,7 @@ n [A-Za-z0-9_]
\\.?/\n { \\.?/\n {
append_string(yytext + 1, yyleng - 1); append_string(yytext + 1, yyleng - 1);
zconflval.string = text; zconflval.string = text;
return T_STRING; return T_WORD_QUOTE;
} }
\\.? { \\.? {
append_string(yytext + 1, yyleng - 1); append_string(yytext + 1, yyleng - 1);
...@@ -169,7 +169,7 @@ n [A-Za-z0-9_] ...@@ -169,7 +169,7 @@ n [A-Za-z0-9_]
if (str == yytext[0]) { if (str == yytext[0]) {
BEGIN(PARAM); BEGIN(PARAM);
zconflval.string = text; zconflval.string = text;
return T_STRING; return T_WORD_QUOTE;
} else } else
append_string(yytext, 1); append_string(yytext, 1);
} }
......
...@@ -78,20 +78,21 @@ ...@@ -78,20 +78,21 @@
T_DEFAULT = 274, T_DEFAULT = 274,
T_TRISTATE = 275, T_TRISTATE = 275,
T_BOOLEAN = 276, T_BOOLEAN = 276,
T_INT = 277, T_STRING = 277,
T_HEX = 278, T_INT = 278,
T_WORD = 279, T_HEX = 279,
T_STRING = 280, T_WORD = 280,
T_UNEQUAL = 281, T_WORD_QUOTE = 281,
T_EOF = 282, T_UNEQUAL = 282,
T_EOL = 283, T_EOF = 283,
T_CLOSE_PAREN = 284, T_EOL = 284,
T_OPEN_PAREN = 285, T_CLOSE_PAREN = 285,
T_ON = 286, T_OPEN_PAREN = 286,
T_OR = 287, T_ON = 287,
T_AND = 288, T_OR = 288,
T_EQUAL = 289, T_AND = 289,
T_NOT = 290 T_EQUAL = 290,
T_NOT = 291
}; };
#endif #endif
#define T_MAINMENU 258 #define T_MAINMENU 258
...@@ -113,20 +114,21 @@ ...@@ -113,20 +114,21 @@
#define T_DEFAULT 274 #define T_DEFAULT 274
#define T_TRISTATE 275 #define T_TRISTATE 275
#define T_BOOLEAN 276 #define T_BOOLEAN 276
#define T_INT 277 #define T_STRING 277
#define T_HEX 278 #define T_INT 278
#define T_WORD 279 #define T_HEX 279
#define T_STRING 280 #define T_WORD 280
#define T_UNEQUAL 281 #define T_WORD_QUOTE 281
#define T_EOF 282 #define T_UNEQUAL 282
#define T_EOL 283 #define T_EOF 283
#define T_CLOSE_PAREN 284 #define T_EOL 284
#define T_OPEN_PAREN 285 #define T_CLOSE_PAREN 285
#define T_ON 286 #define T_OPEN_PAREN 286
#define T_OR 287 #define T_ON 287
#define T_AND 288 #define T_OR 288
#define T_EQUAL 289 #define T_AND 289
#define T_NOT 290 #define T_EQUAL 290
#define T_NOT 291
...@@ -185,7 +187,7 @@ typedef union { ...@@ -185,7 +187,7 @@ typedef union {
struct menu *menu; struct menu *menu;
} yystype; } yystype;
/* Line 193 of /usr/share/bison/yacc.c. */ /* Line 193 of /usr/share/bison/yacc.c. */
#line 189 "zconf.tab.c" #line 191 "zconf.tab.c"
# define YYSTYPE yystype # define YYSTYPE yystype
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
#endif #endif
...@@ -209,7 +211,7 @@ typedef struct yyltype ...@@ -209,7 +211,7 @@ typedef struct yyltype
/* Line 213 of /usr/share/bison/yacc.c. */ /* Line 213 of /usr/share/bison/yacc.c. */
#line 213 "zconf.tab.c" #line 215 "zconf.tab.c"
#if ! defined (yyoverflow) || YYERROR_VERBOSE #if ! defined (yyoverflow) || YYERROR_VERBOSE
...@@ -310,7 +312,7 @@ union yyalloc ...@@ -310,7 +312,7 @@ union yyalloc
#define YYLAST 154 #define YYLAST 154
/* YYNTOKENS -- Number of terminals. */ /* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 36 #define YYNTOKENS 37
/* YYNNTS -- Number of nonterminals. */ /* YYNNTS -- Number of nonterminals. */
#define YYNNTS 39 #define YYNNTS 39
/* YYNRULES -- Number of rules. */ /* YYNRULES -- Number of rules. */
...@@ -320,7 +322,7 @@ union yyalloc ...@@ -320,7 +322,7 @@ union yyalloc
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2 #define YYUNDEFTOK 2
#define YYMAXUTOK 290 #define YYMAXUTOK 291
#define YYTRANSLATE(X) \ #define YYTRANSLATE(X) \
((unsigned)(X) <= YYMAXUTOK ? yytranslate[X] : YYUNDEFTOK) ((unsigned)(X) <= YYMAXUTOK ? yytranslate[X] : YYUNDEFTOK)
...@@ -357,7 +359,7 @@ static const unsigned char yytranslate[] = ...@@ -357,7 +359,7 @@ static const unsigned char yytranslate[] =
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35 35, 36
}; };
#if YYDEBUG #if YYDEBUG
...@@ -380,49 +382,49 @@ static const unsigned short yyprhs[] = ...@@ -380,49 +382,49 @@ static const unsigned short yyprhs[] =
/* YYRHS -- A `-1'-separated list of the rules' RHS. */ /* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yysigned_char yyrhs[] = static const yysigned_char yyrhs[] =
{ {
37, 0, -1, -1, 37, 38, -1, 39, -1, 47, 38, 0, -1, -1, 38, 39, -1, 40, -1, 48,
-1, 58, -1, 3, 69, 71, -1, 5, -1, 14, -1, 59, -1, 3, 70, 72, -1, 5, -1, 14,
-1, 8, -1, 1, 71, -1, 53, -1, 63, -1, -1, 8, -1, 1, 72, -1, 54, -1, 64, -1,
41, -1, 61, -1, 71, -1, 10, 24, -1, 40, 42, -1, 62, -1, 72, -1, 10, 25, -1, 41,
28, 42, -1, -1, 42, 43, 28, -1, 42, 67, 29, 43, -1, -1, 43, 44, 29, -1, 43, 68,
28, -1, 42, 65, -1, 42, 28, -1, 20, 68, 29, -1, 43, 66, -1, 43, 29, -1, 20, 69,
-1, 21, 68, -1, 22, 68, -1, 23, 68, -1, -1, 21, 69, -1, 23, 69, -1, 24, 69, -1,
25, 68, -1, 18, 69, 72, -1, 19, 74, 72, 22, 69, -1, 18, 70, 73, -1, 19, 75, 73,
-1, 7, -1, 44, 28, 48, -1, 70, -1, 45, -1, 7, -1, 45, 29, 49, -1, 71, -1, 46,
50, 46, 28, -1, 45, 50, -1, -1, 48, 49, 51, 47, 29, -1, 46, 51, -1, -1, 49, 50,
28, -1, 48, 67, 28, -1, 48, 65, -1, 48, 29, -1, 49, 68, 29, -1, 49, 66, -1, 49,
28, -1, 18, 69, 72, -1, 17, -1, 19, 74, 29, -1, 18, 70, 73, -1, 17, -1, 19, 75,
72, -1, -1, 50, 39, -1, 13, 73, -1, 70, 73, -1, -1, 51, 40, -1, 13, 74, -1, 71,
-1, 51, 28, 54, 52, 28, -1, 51, 28, 54, -1, 52, 29, 55, 53, 29, -1, 52, 29, 55,
-1, -1, 54, 39, -1, 54, 58, -1, 54, 47, -1, -1, 55, 40, -1, 55, 59, -1, 55, 48,
-1, 4, 69, -1, 55, 28, 66, -1, 70, -1, -1, 4, 70, -1, 56, 29, 67, -1, 71, -1,
56, 59, 57, 28, -1, 56, 59, -1, -1, 59, 57, 60, 58, 29, -1, 57, 60, -1, -1, 60,
39, -1, 59, 58, -1, 59, 47, -1, 59, 1, 40, -1, 60, 59, -1, 60, 48, -1, 60, 1,
28, -1, 6, 69, -1, 60, 28, -1, 9, 69, 29, -1, 6, 70, -1, 61, 29, -1, 9, 70,
-1, 62, 28, 66, -1, 11, 28, -1, 64, 12, -1, 63, 29, 67, -1, 11, 29, -1, 65, 12,
-1, -1, 66, 67, 28, -1, 66, 28, -1, 15, -1, -1, 67, 68, 29, -1, 67, 29, -1, 15,
31, 73, -1, 15, 73, -1, 16, 73, -1, -1, 32, 74, -1, 15, 74, -1, 16, 74, -1, -1,
69, -1, 69, 13, 73, -1, 24, -1, 25, -1, 70, -1, 70, 13, 74, -1, 25, -1, 26, -1,
5, -1, 8, -1, 14, -1, 28, -1, 27, -1, 5, -1, 8, -1, 14, -1, 29, -1, 28, -1,
-1, 13, 73, -1, 74, -1, 74, 34, 74, -1, -1, 13, 74, -1, 75, -1, 75, 35, 75, -1,
74, 26, 74, -1, 30, 73, 29, -1, 35, 73, 75, 27, 75, -1, 31, 74, 30, -1, 36, 74,
-1, 73, 32, 73, -1, 73, 33, 73, -1, 24, -1, 74, 33, 74, -1, 74, 34, 74, -1, 25,
-1, 25, -1 -1, 26, -1
}; };
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const unsigned short yyrline[] = static const unsigned short yyrline[] =
{ {
0, 88, 88, 89, 92, 93, 94, 95, 96, 97, 0, 89, 89, 90, 93, 94, 95, 96, 97, 98,
98, 99, 102, 104, 105, 106, 107, 113, 121, 127, 99, 100, 103, 105, 106, 107, 108, 114, 122, 128,
129, 130, 131, 132, 135, 141, 147, 153, 159, 165, 130, 131, 132, 133, 136, 142, 148, 154, 160, 166,
171, 179, 188, 194, 202, 204, 210, 212, 213, 214, 172, 180, 189, 195, 203, 205, 211, 213, 214, 215,
215, 218, 224, 230, 236, 238, 243, 252, 260, 262, 216, 219, 225, 231, 237, 239, 244, 253, 261, 263,
268, 270, 271, 272, 277, 284, 290, 298, 300, 306, 269, 271, 272, 273, 278, 285, 291, 299, 301, 307,
308, 309, 310, 311, 314, 320, 327, 334, 341, 347, 309, 310, 311, 312, 315, 321, 328, 335, 342, 348,
354, 355, 356, 359, 364, 369, 377, 379, 383, 388, 355, 356, 357, 360, 365, 370, 378, 380, 384, 389,
389, 392, 393, 394, 397, 398, 400, 401, 404, 405, 390, 393, 394, 395, 398, 399, 401, 402, 405, 406,
406, 407, 408, 409, 410, 413, 414 407, 408, 409, 410, 411, 414, 415
}; };
#endif #endif
...@@ -435,16 +437,17 @@ static const char *const yytname[] = ...@@ -435,16 +437,17 @@ static const char *const yytname[] =
"T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG",
"T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", "T_REQUIRES", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", "T_REQUIRES",
"T_OPTIONAL", "T_PROMPT", "T_DEFAULT", "T_TRISTATE", "T_BOOLEAN", "T_OPTIONAL", "T_PROMPT", "T_DEFAULT", "T_TRISTATE", "T_BOOLEAN",
"T_INT", "T_HEX", "T_WORD", "T_STRING", "T_UNEQUAL", "T_EOF", "T_EOL", "T_STRING", "T_INT", "T_HEX", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL",
"T_CLOSE_PAREN", "T_OPEN_PAREN", "T_ON", "T_OR", "T_AND", "T_EQUAL", "T_EOF", "T_EOL", "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_ON", "T_OR",
"T_NOT", "$accept", "input", "block", "common_block", "T_AND", "T_EQUAL", "T_NOT", "$accept", "input", "block",
"config_entry_start", "config_stmt", "config_option_list", "common_block", "config_entry_start", "config_stmt",
"config_option", "choice", "choice_entry", "choice_end", "choice_stmt", "config_option_list", "config_option", "choice", "choice_entry",
"choice_option_list", "choice_option", "choice_block", "if", "if_end", "choice_end", "choice_stmt", "choice_option_list", "choice_option",
"if_stmt", "if_block", "menu", "menu_entry", "menu_end", "menu_stmt", "choice_block", "if", "if_end", "if_stmt", "if_block", "menu",
"menu_block", "source", "source_stmt", "comment", "comment_stmt", "menu_entry", "menu_end", "menu_stmt", "menu_block", "source",
"help_start", "help", "depends_list", "depends", "prompt_stmt_opt", "source_stmt", "comment", "comment_stmt", "help_start", "help",
"prompt", "end", "nl_or_eof", "if_expr", "expr", "symbol", 0 "depends_list", "depends", "prompt_stmt_opt", "prompt", "end",
"nl_or_eof", "if_expr", "expr", "symbol", 0
}; };
#endif #endif
...@@ -456,23 +459,23 @@ static const unsigned short yytoknum[] = ...@@ -456,23 +459,23 @@ static const unsigned short yytoknum[] =
0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
285, 286, 287, 288, 289, 290 285, 286, 287, 288, 289, 290, 291
}; };
# endif # endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const unsigned char yyr1[] = static const unsigned char yyr1[] =
{ {
0, 36, 37, 37, 38, 38, 38, 38, 38, 38, 0, 37, 38, 38, 39, 39, 39, 39, 39, 39,
38, 38, 39, 39, 39, 39, 39, 40, 41, 42, 39, 39, 40, 40, 40, 40, 40, 41, 42, 43,
42, 42, 42, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 44, 44, 44, 44, 44, 44,
43, 44, 45, 46, 47, 47, 48, 48, 48, 48, 44, 45, 46, 47, 48, 48, 49, 49, 49, 49,
48, 49, 49, 49, 50, 50, 51, 52, 53, 53, 49, 50, 50, 50, 51, 51, 52, 53, 54, 54,
54, 54, 54, 54, 55, 56, 57, 58, 58, 59, 55, 55, 55, 55, 56, 57, 58, 59, 59, 60,
59, 59, 59, 59, 60, 61, 62, 63, 64, 65, 60, 60, 60, 60, 61, 62, 63, 64, 65, 66,
66, 66, 66, 67, 67, 67, 68, 68, 68, 69, 67, 67, 67, 68, 68, 68, 69, 69, 69, 70,
69, 70, 70, 70, 71, 71, 72, 72, 73, 73, 70, 71, 71, 71, 72, 72, 73, 73, 74, 74,
73, 73, 73, 73, 73, 74, 74 74, 74, 74, 74, 74, 75, 75
}; };
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
...@@ -507,7 +510,7 @@ static const unsigned char yydefact[] = ...@@ -507,7 +510,7 @@ static const unsigned char yydefact[] =
76, 76, 76, 76, 23, 0, 0, 22, 0, 42, 76, 76, 76, 76, 23, 0, 0, 22, 0, 42,
0, 0, 40, 0, 39, 0, 34, 51, 53, 0, 0, 0, 40, 0, 39, 0, 34, 51, 53, 0,
52, 47, 72, 0, 63, 57, 68, 0, 74, 75, 52, 47, 72, 0, 63, 57, 68, 0, 74, 75,
86, 86, 24, 77, 25, 26, 27, 28, 20, 69, 86, 86, 24, 77, 25, 28, 26, 27, 20, 69,
21, 86, 86, 37, 38, 48, 71, 73, 0, 29, 21, 86, 86, 37, 38, 48, 71, 73, 0, 29,
30, 0, 41, 43, 87, 78 30, 0, 41, 43, 87, 78
}; };
...@@ -526,21 +529,21 @@ static const short yydefgoto[] = ...@@ -526,21 +529,21 @@ static const short yydefgoto[] =
#define YYPACT_NINF -120 #define YYPACT_NINF -120
static const short yypact[] = static const short yypact[] =
{ {
-120, 17, -120, 41, 48, 48, -120, 48, -120, -120, -120, 17, -120, 32, 71, 71, -120, 71, -120, -120,
48, 27, 40, -120, -120, -120, -120, -120, 13, -120, 71, 11, 99, -120, -120, -120, -120, -120, 12, -120,
66, -120, -120, 72, -120, 77, -120, -120, 81, -120, 22, -120, -120, 35, -120, 52, -120, -120, 56, -120,
85, -120, -120, -120, -120, -120, 41, -120, -120, -120, 60, -120, -120, -120, -120, -120, 32, -120, -120, -120,
-120, -120, -120, 40, 40, 57, 59, -120, -120, 98, -120, -120, -120, 99, 99, 83, 38, -120, -120, 74,
-120, -120, 49, -120, -120, -120, 7, -120, 40, 40, -120, -120, 49, -120, -120, -120, 98, -120, 99, 99,
67, 67, 99, 117, -120, -120, -120, -120, 88, -120, 101, 101, 89, 104, -120, -120, -120, -120, 65, -120,
74, 18, 95, -120, -120, 101, -120, -120, 18, -120, 62, 77, 72, -120, -120, 85, -120, -120, 77, -120,
97, -120, -120, -120, 103, 36, 40, 48, 67, 48, 95, -120, -120, -120, 105, 8, 99, 71, 101, 71,
48, 48, 48, 48, -120, 113, 130, -120, 115, -120, 71, 71, 71, 71, -120, 113, 131, -120, 115, -120,
48, 67, -120, 116, -120, 118, -120, -120, -120, 119, 71, 101, -120, 116, -120, 117, -120, -120, -120, 118,
-120, -120, -120, 120, -120, -120, -120, 40, 57, 57, -120, -120, -120, 119, -120, -120, -120, 99, 83, 83,
136, 136, -120, 137, -120, -120, -120, -120, -120, -120, 136, 136, -120, 137, -120, -120, -120, -120, -120, -120,
-120, 136, 136, -120, -120, -120, -120, 57, 40, -120, -120, 136, 136, -120, -120, -120, -120, 83, 99, -120,
-120, 40, -120, -120, 57, 57 -120, 99, -120, -120, 83, 83
}; };
/* YYPGOTO[NTERM-NUM]. */ /* YYPGOTO[NTERM-NUM]. */
...@@ -548,8 +551,8 @@ static const yysigned_char yypgoto[] = ...@@ -548,8 +551,8 @@ static const yysigned_char yypgoto[] =
{ {
-120, -120, -120, -38, -120, -120, -120, -120, -120, -120, -120, -120, -120, -38, -120, -120, -120, -120, -120, -120,
-120, -42, -120, -120, -120, -120, -120, -120, -120, -120, -120, -42, -120, -120, -120, -120, -120, -120, -120, -120,
-120, -120, -33, -120, -120, -120, -120, -120, -120, 89, -120, -120, -33, -120, -120, -120, -120, -120, -120, 88,
100, 34, 47, -1, -23, 2, -119, -43, -53 100, 78, 46, -1, -23, 2, -119, -43, -53
}; };
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
...@@ -562,19 +565,19 @@ static const short yytable[] = ...@@ -562,19 +565,19 @@ static const short yytable[] =
56, 57, 140, 36, 37, 33, 38, 82, 83, 39, 56, 57, 140, 36, 37, 33, 38, 82, 83, 39,
74, 67, 142, 143, 73, 80, 81, 2, 3, 76, 74, 67, 142, 143, 73, 80, 81, 2, 3, 76,
4, 5, 6, 7, 8, 9, 10, 11, 108, 77, 4, 5, 6, 7, 8, 9, 10, 11, 108, 77,
12, 13, 107, 85, 86, 121, 79, 110, 55, 58, 12, 13, 107, 41, 42, 121, 40, 110, 55, 43,
59, 47, 118, 119, 14, 15, 112, 111, 132, -58, 117, 47, 118, 119, 44, 14, 15, 111, 132, -58,
72, 40, -58, 5, 64, 7, 8, 65, 10, 11, 72, 48, -58, 5, 64, 7, 8, 65, 10, 11,
41, 42, 12, 66, 41, 42, 43, 117, 14, 15, 14, 15, 12, 66, 50, 60, 5, 64, 7, 8,
43, 44, 34, 35, 137, 44, 14, 15, 5, 64, 65, 10, 11, 61, 137, 12, 66, 14, 15, 64,
7, 8, 65, 10, 11, 60, 120, 12, 66, 58, 7, 51, 65, 10, 11, 53, 120, 12, 66, 54,
59, 41, 42, 61, 48, 144, 98, 105, 145, 131, 14, 15, 85, 86, 106, 144, 34, 35, 145, 131,
50, 14, 15, 64, 7, 51, 65, 10, 11, 53, 84, 114, 14, 15, 85, 86, 112, 87, 88, 89,
84, 12, 66, 54, 85, 86, 106, 87, 88, 89, 90, 91, 92, 93, 115, 84, 58, 59, 94, 85,
90, 91, 92, 114, 93, 14, 15, 94, 84, 115, 86, 99, 100, 101, 41, 42, 41, 42, 79, 59,
59, 116, 85, 86, 99, 100, 101, 124, 125, 126, 43, 58, 59, 102, 116, 44, 124, 125, 126, 127,
127, 128, 129, 130, 133, 102, 134, 135, 136, 138, 98, 105, 128, 129, 130, 133, 134, 135, 136, 138,
141, 0, 104, 0, 78 141, 104, 0, 0, 78
}; };
static const short yycheck[] = static const short yycheck[] =
...@@ -582,40 +585,40 @@ static const short yycheck[] = ...@@ -582,40 +585,40 @@ static const short yycheck[] =
43, 44, 121, 4, 5, 3, 7, 60, 61, 10, 43, 44, 121, 4, 5, 3, 7, 60, 61, 10,
52, 49, 131, 132, 52, 58, 59, 0, 1, 52, 52, 49, 131, 132, 52, 58, 59, 0, 1, 52,
3, 4, 5, 6, 7, 8, 9, 10, 70, 52, 3, 4, 5, 6, 7, 8, 9, 10, 70, 52,
13, 14, 70, 15, 16, 88, 29, 70, 36, 32, 13, 14, 70, 25, 26, 88, 25, 70, 36, 31,
33, 28, 85, 86, 27, 28, 28, 70, 101, 0, 32, 29, 85, 86, 36, 28, 29, 70, 101, 0,
1, 24, 3, 4, 5, 6, 7, 8, 9, 10, 1, 29, 3, 4, 5, 6, 7, 8, 9, 10,
24, 25, 13, 14, 24, 25, 30, 31, 27, 28, 28, 29, 13, 14, 29, 27, 4, 5, 6, 7,
30, 35, 24, 25, 117, 35, 27, 28, 4, 5, 8, 9, 10, 35, 117, 13, 14, 28, 29, 5,
6, 7, 8, 9, 10, 26, 87, 13, 14, 32, 6, 29, 8, 9, 10, 29, 87, 13, 14, 29,
33, 24, 25, 34, 28, 138, 62, 63, 141, 100, 28, 29, 15, 16, 29, 138, 25, 26, 141, 100,
28, 27, 28, 5, 6, 28, 8, 9, 10, 28, 11, 29, 28, 29, 15, 16, 29, 18, 19, 20,
11, 13, 14, 28, 15, 16, 28, 18, 19, 20, 21, 22, 23, 24, 29, 11, 33, 34, 29, 15,
21, 22, 23, 28, 25, 27, 28, 28, 11, 28, 16, 17, 18, 19, 25, 26, 25, 26, 30, 34,
33, 28, 15, 16, 17, 18, 19, 90, 91, 92, 31, 33, 34, 29, 29, 36, 90, 91, 92, 93,
93, 28, 12, 28, 28, 28, 28, 28, 28, 13, 62, 63, 29, 12, 29, 29, 29, 29, 29, 13,
13, -1, 63, -1, 54 13, 63, -1, -1, 54
}; };
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */ symbol of state STATE-NUM. */
static const unsigned char yystos[] = static const unsigned char yystos[] =
{ {
0, 37, 0, 1, 3, 4, 5, 6, 7, 8, 0, 38, 0, 1, 3, 4, 5, 6, 7, 8,
9, 10, 13, 14, 27, 28, 38, 39, 40, 41, 9, 10, 13, 14, 28, 29, 39, 40, 41, 42,
44, 45, 47, 51, 53, 55, 56, 58, 60, 61, 45, 46, 48, 52, 54, 56, 57, 59, 61, 62,
62, 63, 71, 71, 24, 25, 69, 69, 69, 69, 63, 64, 72, 72, 25, 26, 70, 70, 70, 70,
24, 24, 25, 30, 35, 73, 74, 28, 28, 50, 25, 25, 26, 31, 36, 74, 75, 29, 29, 51,
28, 28, 59, 28, 28, 71, 73, 73, 32, 33, 29, 29, 60, 29, 29, 72, 74, 74, 33, 34,
26, 34, 42, 48, 5, 8, 14, 39, 46, 70, 27, 35, 43, 49, 5, 8, 14, 40, 47, 71,
54, 66, 1, 39, 47, 57, 58, 70, 66, 29, 55, 67, 1, 40, 48, 58, 59, 71, 67, 30,
73, 73, 74, 74, 11, 15, 16, 18, 19, 20, 74, 74, 75, 75, 11, 15, 16, 18, 19, 20,
21, 22, 23, 25, 28, 43, 64, 65, 67, 17, 21, 22, 23, 24, 29, 44, 65, 66, 68, 17,
18, 19, 28, 49, 65, 67, 28, 39, 47, 52, 18, 19, 29, 50, 66, 68, 29, 40, 48, 53,
58, 70, 28, 67, 28, 28, 28, 31, 73, 73, 59, 71, 29, 68, 29, 29, 29, 32, 74, 74,
69, 74, 68, 69, 68, 68, 68, 68, 28, 12, 70, 75, 69, 70, 69, 69, 69, 69, 29, 12,
28, 69, 74, 28, 28, 28, 28, 73, 13, 72, 29, 70, 75, 29, 29, 29, 29, 74, 13, 73,
72, 13, 72, 72, 73, 73 73, 13, 73, 73, 74, 74
}; };
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
...@@ -1502,7 +1505,7 @@ yyreduce: ...@@ -1502,7 +1505,7 @@ yyreduce:
} }
/* Line 1016 of /usr/share/bison/yacc.c. */ /* Line 1016 of /usr/share/bison/yacc.c. */
#line 1506 "zconf.tab.c" #line 1509 "zconf.tab.c"
yyvsp -= yylen; yyvsp -= yylen;
yyssp -= yylen; yyssp -= yylen;
......
...@@ -57,10 +57,11 @@ struct symbol *symbol_hash[257]; ...@@ -57,10 +57,11 @@ struct symbol *symbol_hash[257];
%token T_DEFAULT %token T_DEFAULT
%token T_TRISTATE %token T_TRISTATE
%token T_BOOLEAN %token T_BOOLEAN
%token T_STRING
%token T_INT %token T_INT
%token T_HEX %token T_HEX
%token <string> T_WORD %token <string> T_WORD
%token <string> T_STRING %token <string> T_WORD_QUOTE
%token T_UNEQUAL %token T_UNEQUAL
%token T_EOF %token T_EOF
%token T_EOL %token T_EOL
...@@ -386,7 +387,7 @@ prompt_stmt_opt: ...@@ -386,7 +387,7 @@ prompt_stmt_opt:
}; };
prompt: T_WORD prompt: T_WORD
| T_STRING | T_WORD_QUOTE
; ;
end: T_ENDMENU { $$ = T_ENDMENU; } end: T_ENDMENU { $$ = T_ENDMENU; }
...@@ -411,7 +412,7 @@ expr: symbol { $$ = expr_alloc_symbol($1); } ...@@ -411,7 +412,7 @@ expr: symbol { $$ = expr_alloc_symbol($1); }
; ;
symbol: T_WORD { $$ = sym_lookup($1, 0); free($1); } symbol: T_WORD { $$ = sym_lookup($1, 0); free($1); }
| T_STRING { $$ = sym_lookup($1, 1); free($1); } | T_WORD_QUOTE { $$ = sym_lookup($1, 1); free($1); }
; ;
%% %%
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment