pike.git/
src/
language.yacc
Branch:
Tag:
Non-build tags
All tags
No tags
1998-08-01
1998-08-01 13:19:17 by Henrik Grubbström (Grubba) <grubba@grubba.org>
e67c860cf78258be2cbb85f94f9e819e266b8958 (
19
lines) (+
18
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
Added a few more productions with F_LEX_EOF.
Rev: src/language.yacc:1.100
179:
/* This is the grammar definition of Pike. */ #include "global.h"
-
RCSID("$Id: language.yacc,v 1.
99
1998/
07
/
31
21
:
51
:
31
hubbe
Exp $");
+
RCSID("$Id: language.yacc,v 1.
100
1998/
08
/
01
13
:
19
:
17
grubba
Exp $");
#ifdef HAVE_MEMORY_H #include <memory.h> #endif
953:
{ free_node($2); }
+
| optional_stars F_IDENTIFIER '=' F_LEX_EOF
+
{
+
yyerror("Unexpected end of file in variable definition.");
+
free_node($2);
+
}
| optional_stars bad_identifier '=' expr0 { free_node($4);
988:
/* No yyerok here since we aren't done yet. */ $$=0; }
+
| optional_stars F_IDENTIFIER '=' F_LEX_EOF
+
{
+
yyerror("Unexpected end of file in local variable definition.");
+
free_node($2);
+
/* No yyerok here since we aren't done yet. */
+
$$=0;
+
}
; new_local_name2: F_IDENTIFIER
1158:
failsafe_program: '{' program end_block | error { yyerrok; }
+
| F_LEX_EOF
+
{
+
yyerror("End of file where program definition expected.");
+
}
; class: modifiers F_CLASS optional_identifier