Implement time command.
* grub-core/Makefile.core.def (time): New module. * grub-core/commands/time.c: New file. * grub-core/script/parser.y: Remove "time" keyword. * grub-core/script/yylex.l: Likewise.
This commit is contained in:
parent
5ebaad7eec
commit
5ff1d945ed
5 changed files with 82 additions and 3 deletions
|
@ -74,7 +74,6 @@
|
|||
%token <arg> GRUB_PARSER_TOKEN_THEN "then"
|
||||
%token <arg> GRUB_PARSER_TOKEN_UNTIL "until"
|
||||
%token <arg> GRUB_PARSER_TOKEN_WHILE "while"
|
||||
%token <arg> GRUB_PARSER_TOKEN_TIME "time"
|
||||
%token <arg> GRUB_PARSER_TOKEN_FUNCTION "function"
|
||||
%token <arg> GRUB_PARSER_TOKEN_NAME "name"
|
||||
%token <arg> GRUB_PARSER_TOKEN_WORD "word"
|
||||
|
@ -147,7 +146,6 @@ argument : "case" { $$ = grub_script_add_arglist (state, 0, $1); }
|
|||
| "until" { $$ = grub_script_add_arglist (state, 0, $1); }
|
||||
| "while" { $$ = grub_script_add_arglist (state, 0, $1); }
|
||||
| "function" { $$ = grub_script_add_arglist (state, 0, $1); }
|
||||
| "time" { $$ = grub_script_add_arglist (state, 0, $1); }
|
||||
| word { $$ = $1; }
|
||||
;
|
||||
|
||||
|
|
|
@ -161,7 +161,6 @@ MULTILINE {WORD}?((\"{DQCHR}*)|(\'{SQCHR}*)|(\\\n))
|
|||
"}" { RECORD; return GRUB_PARSER_TOKEN_RBR; }
|
||||
"[[" { RECORD; return GRUB_PARSER_TOKEN_RSQBR2; }
|
||||
"]]" { RECORD; return GRUB_PARSER_TOKEN_LSQBR2; }
|
||||
"time" { RECORD; return GRUB_PARSER_TOKEN_TIME; }
|
||||
"case" { RECORD; return GRUB_PARSER_TOKEN_CASE; }
|
||||
"do" { RECORD; return GRUB_PARSER_TOKEN_DO; }
|
||||
"done" { RECORD; return GRUB_PARSER_TOKEN_DONE; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue