2006-16-04 Marco Gerards <marco@gnu.org>

* normal/command.c (grub_command_init): Remove the title command.

	* normal/lexer.c (grub_script_yylex): Renamed from this...
	(grub_script_yylex2): ... to this.
	(grub_script_yylex): New function.  Temporary
	introduced to filter some tokens.
	(grub_script_yyerror): Print a newline.

	* normal/main.c (read_config_file): Output information about the
	lines that contain errors.  Wait for a key after all lines have
	been processed.  Don't return an empty menu.

	* normal/parser.y (func_mem): Don't initialize.
	(menu_entry): Likewise.
	(err): New variable.
	(script): Don't return anything when an error was encountered.
	(ws, returns): Removed rules.
	(argument): Disabled concatenated variable support.
	(arguments): Remove explicit separators.
	(grubcmd): Likewise.
	(function): Likewise.
	(menuentry): Likewise.
	(if): Likewise.
	(commands): Likewise.  Add error handling.

	* normal/script.c (grub_script_create_cmdline): If
	`grub_script_parsed' is 0, assume the parser encountered an error.
This commit is contained in:
marco_g 2006-04-16 18:02:42 +00:00
parent b7d9f5fdea
commit 6de2ee9903
6 changed files with 113 additions and 60 deletions

View file

@ -140,8 +140,25 @@ nextchar (void)
script++;
}
int
grub_script_yylex2 (void);
int
grub_script_yylex (void)
{
int r = -1;
while (r == -1)
{
r = grub_script_yylex2 ();
if (r == ' ' || r == '\n')
r = -1;
}
return r;
}
int
grub_script_yylex2 (void)
{
grub_parser_state_t newstate;
char use;
@ -345,5 +362,5 @@ grub_script_yylex (void)
void
grub_script_yyerror (char const *err)
{
grub_printf (err);
grub_printf ("%s\n", err);
}