pike.git/
src/
language.yacc
Branch:
Tag:
Non-build tags
All tags
No tags
1996-11-25
1996-11-25 21:34:23 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
3301d2bd759aa819a495fb866e696190629c30e4 (
38
lines) (+
22
/-
16
)
[
Show
|
Annotate
]
Branch:
7.9
extra semicolons allowed, crash bug removed, foreach(foo, int bar)
Rev: src/language.yacc:1.9
156:
/* This is the grammar definition of Pike. */ #include "global.h"
-
RCSID("$Id: language.yacc,v 1.
8
1996/11/
17
03
:
45
:
15
hubbe Exp $");
+
RCSID("$Id: language.yacc,v 1.
9
1996/11/
25
21
:
34
:
23
hubbe Exp $");
#ifdef HAVE_MEMORY_H #include <memory.h> #endif
329:
; optional_semi_colon: /* empty */
-
| ';'
{ yyerror("Extra ';'. Ignored."); }
+
| ';'
; string_constant: low_string
360:
| idents { push_string(make_shared_string(""));
+
if(!$1)
+
{
+
push_int(0);
+
}else{
switch($1->token) { case F_CONSTANT:
391:
} free_node($1); }
+
}
; inheritance: modifiers F_INHERIT program_ref optional_rename_inherit ';'
928:
| F_ELSE statement { $$=$2; } ;
-
foreach: F_FOREACH '(' expr0 ','
expr4
')' statement
+
foreach: F_FOREACH '(' expr0 ','
lvalue
')' statement
{ $$=mknode(F_FOREACH,mknode(F_VAL_LVAL,$3,$5),$7); $$->line_number=$1;