2006-05-20 Marco Gerards <marco@gnu.org>
* normal/lexer.c (grub_script_yylex): Don't filter out newlines. * normal/parser.y (commandblock): Defined as <cmd>. A subroutine for `menuentry'. (script): Accept leading newlines. (newlines): New rule to describe 0 or more newlines. (commands): Accept `command' with trailing newline. Fixed the order in which arguments were passed to `grub_script_add_cmd'. Accept commands separated by newlines. (function): Changed to accept newlines. (menuentry) Rewritten. * normal/script.c (grub_script_create_cmdmenu): Add new entries in front of the list, instead of to the end.
This commit is contained in:
parent
577b405042
commit
7dc4f874a6
3 changed files with 51 additions and 30 deletions
|
@ -1,7 +1,7 @@
|
|||
/* lexer.c - The scripting lexer. */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -147,7 +147,7 @@ grub_script_yylex (YYSTYPE *yylval, struct grub_parser_param *parsestate)
|
|||
while (r == -1)
|
||||
{
|
||||
r = grub_script_yylex2 (yylval, parsestate);
|
||||
if (r == ' ' || r == '\n')
|
||||
if (r == ' ')
|
||||
r = -1;
|
||||
}
|
||||
return r;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue