merged with mainline

This commit is contained in:
BVK Chaitanya 2010-03-26 23:49:49 +05:30
commit dae0d05f2d
50 changed files with 1089 additions and 1503 deletions

View file

@ -74,7 +74,7 @@
%token <arg> GRUB_PARSER_TOKEN_WORD "word"
%type <arglist> word argument arguments0 arguments1
%type <cmd> script_init script grubcmd ifcmd command
%type <cmd> script_init script grubcmd ifcmd forcmd command
%type <cmd> commands1 menuentry statement
%pure-parser
@ -173,6 +173,7 @@ grubcmd: word arguments0
/* A single command. */
command: grubcmd { $$ = $1; }
| ifcmd { $$ = $1; }
| forcmd { $$ = $1; }
;
/* A list of commands. */
@ -236,3 +237,14 @@ ifcmd: if commands1 delimiters1 "then" commands1 delimiters1 "fi"
grub_script_lexer_deref (state->lexerstate);
}
;
forcmd: "for" "name"
{
grub_script_lexer_ref (state->lexerstate);
}
"in" arguments0 delimiters1 "do" commands1 delimiters1 "done"
{
$$ = grub_script_create_cmdfor (state, $2, $5, $8);
grub_script_lexer_deref (state->lexerstate);
}
;