From 37effddaf3687c8099669b38d9d2fbaa79076bac Mon Sep 17 00:00:00 2001 From: BVK Chaitanya Date: Mon, 25 Jan 2010 22:01:14 +0530 Subject: [PATCH] make parenthesis as valid word characters --- ChangeLog.lexer-rewrite | 5 +++++ script/parser.y | 2 -- script/yylex.l | 4 +--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ChangeLog.lexer-rewrite b/ChangeLog.lexer-rewrite index 56c637976..9b2ab9e2f 100644 --- a/ChangeLog.lexer-rewrite +++ b/ChangeLog.lexer-rewrite @@ -1,3 +1,8 @@ +2010-01-25 BVK Chaitanya + + * script/yylex.l: Accept parenthesis as part of word. + * script/parser.y: Remove GRUB_PARSER_TOKEN_{LPAR,RPAR} tokens. + 2010-01-10 BVK Chaitanya * conf/any-emu.rmk: Build rule updates. diff --git a/script/parser.y b/script/parser.y index b8d981866..baf1fd9b5 100644 --- a/script/parser.y +++ b/script/parser.y @@ -45,8 +45,6 @@ %token GRUB_PARSER_TOKEN_PIPE "|" %token GRUB_PARSER_TOKEN_AMP "&" %token GRUB_PARSER_TOKEN_SEMI ";" -%token GRUB_PARSER_TOKEN_LPAR "(" -%token GRUB_PARSER_TOKEN_RPAR ")" %token GRUB_PARSER_TOKEN_LBR "{" %token GRUB_PARSER_TOKEN_RBR "}" %token GRUB_PARSER_TOKEN_NOT "!" diff --git a/script/yylex.l b/script/yylex.l index 7cef8496b..db276ef61 100644 --- a/script/yylex.l +++ b/script/yylex.l @@ -128,7 +128,7 @@ typedef grub_size_t yy_size_t; BLANK [ \t] COMMENT ^[ \t]*#.*$ -CHAR [^|&$;()<> \t\n\'\"\\] +CHAR [^|&$;<> \t\n\'\"\\] DIGITS [[:digit:]]+ NAME [[:alpha:]_][[:alnum:][:digit:]_]* @@ -157,8 +157,6 @@ WORD ({CHAR}|{DQSTR}|{SQSTR}|{ESC}|{VARIABLE})+ "|" { RECORD; return GRUB_PARSER_TOKEN_PIPE; } "&" { RECORD; return GRUB_PARSER_TOKEN_AMP; } ";" { RECORD; return GRUB_PARSER_TOKEN_SEMI; } -"(" { RECORD; return GRUB_PARSER_TOKEN_LPAR; } -")" { RECORD; return GRUB_PARSER_TOKEN_RPAR; } "<" { RECORD; return GRUB_PARSER_TOKEN_LT; } ">" { RECORD; return GRUB_PARSER_TOKEN_GT; }