Skip to content
Snippets Groups Projects
Commit 5b6acd9b authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

fixed some error productions so they will not coredump

Rev: src/language.yacc:1.95
parent 8af52228
No related branches found
No related tags found
No related merge requests found
......@@ -177,7 +177,7 @@
/* This is the grammar definition of Pike. */
#include "global.h"
RCSID("$Id: language.yacc,v 1.94 1998/04/30 06:32:36 hubbe Exp $");
RCSID("$Id: language.yacc,v 1.95 1998/04/30 16:30:37 hubbe Exp $");
#ifdef HAVE_MEMORY_H
#include <memory.h>
#endif
......@@ -966,8 +966,8 @@ new_local_name: optional_stars F_IDENTIFIER
$$=mknode(F_ASSIGN,mkintnode(0),mklocalnode(islocal($2->u.sval.u.string)));
free_node($2);
}
| optional_stars bad_identifier {}
| optional_stars F_IDENTIFIER '=' expr0
| optional_stars bad_identifier { $$=0; }
| optional_stars F_IDENTIFIER '=' expr0
{
push_finished_type($<n>0->u.sval.u.string);
while($1--) push_type(T_ARRAY);
......@@ -978,11 +978,13 @@ new_local_name: optional_stars F_IDENTIFIER
| optional_stars bad_identifier '=' expr0
{
free_node($4);
$$=0;
}
| optional_stars F_IDENTIFIER '=' error
{
free_node($2);
/* No yyerok here since we aren't done yet. */
$$=0;
}
;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment