pike.git/
src/
language.yacc
Branch:
Tag:
Non-build tags
All tags
No tags
1998-11-05
1998-11-05 17:56:08 by Henrik Grubbström (Grubba) <grubba@grubba.org>
07f33e5a565b5a9b56342414e31fdddefbe3be9b (
27
lines) (+
20
/-
7
)
[
Show
|
Annotate
]
Branch:
7.9
Hopefully fixed an infinite loop.
Rev: src/language.yacc:1.104
179:
/* This is the grammar definition of Pike. */ #include "global.h"
-
RCSID("$Id: language.yacc,v 1.
103
1998/
08
/
29
22
:
22
:
49
grubba Exp $");
+
RCSID("$Id: language.yacc,v 1.
104
1998/
11
/
05
17
:
56
:
08
grubba Exp $");
#ifdef HAVE_MEMORY_H #include <memory.h> #endif
651:
| import {} | constant {} | class { free_node($1); }
-
| error ';'
-
{
-
reset_type_stack();
-
yyerrok;
-
/* if(num_parse_error>5) YYACCEPT; */
-
}
+
| error F_LEX_EOF { reset_type_stack(); yyerror("Missing ';'."); yyerror("Unexpected end of file"); }
-
+
| error ';'
+
{
+
reset_type_stack();
+
yyerrok;
+
/* if(num_parse_error>5) YYACCEPT; */
+
}
| error '}' { reset_type_stack();
1318:
$$=mknode(F_DO,$2,$5); $$->line_number=$1; }
+
| F_DO statement F_WHILE F_LEX_EOF
+
{
+
$$=0;
+
yyerror("Missing '(' in do-while loop.");
+
yyerror("Unexpected end of file.");
+
}
+
| F_DO statement F_LEX_EOF
+
{
+
$$=0;
+
yyerror("Missing 'while' in do-while loop.");
+
yyerror("Unexpected end of file.");
+
}
; expected_semicolon: ';'