pike.git/
src/
language.yacc
Branch:
Tag:
Non-build tags
All tags
No tags
1998-04-09
1998-04-09 20:37:20 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
4943aa758b52d09f09f255941be60ba246e64385 (
16
lines) (+
6
/-
10
)
[
Show
|
Annotate
]
Branch:
7.9
bugfix
Rev: src/language.yacc:1.70
169:
/* This is the grammar definition of Pike. */ #include "global.h"
-
RCSID("$Id: language.yacc,v 1.
69
1998/04/
06
04
:
06
:
41
hubbe Exp $");
+
RCSID("$Id: language.yacc,v 1.
70
1998/04/
09
20
:
37
:
20
hubbe Exp $");
#ifdef HAVE_MEMORY_H #include <memory.h> #endif
818:
new_local_name: optional_stars F_IDENTIFIER {
-
push_finished_type(
compiler_frame
->
current_type
);
+
push_finished_type(
$<n>0
->
u.sval.u.string
);
while($1--) push_type(T_ARRAY); add_local_name($2->u.sval.u.string, pop_type()); $$=mknode(F_ASSIGN,mkintnode(0), mklocalnode(islocal($2->u.sval.u.string)));
826:
} | optional_stars F_IDENTIFIER '=' expr0 {
-
push_finished_type(
compiler_frame
->
current_type
);
+
push_finished_type(
$<n>0
->
u.sval.u.string
);
while($1--) push_type(T_ARRAY); add_local_name($2->u.sval.u.string, pop_type()); $$=mknode(F_ASSIGN,$4,mklocalnode(islocal($2->u.sval.u.string)));
852:
local_name_list: new_local_name
-
| local_name_list ',' new_local_name { $$=mknode(F_ARG_LIST,$1,
$3
); }
+
| local_name_list ','
{ $<n>$=$<n>0; }
new_local_name { $$=mknode(F_ARG_LIST,$1,
$4
); }
; statements: { $$=0; }
1135:
; comma_expr: comma_expr2
-
|
type2
-
{
-
if(compiler
_
frame->current_
type
)
-
free_string(compiler_frame->current_type);
-
compiler_frame->current_type=pop_type();
-
}
local_name_list { $$=
$3
; }
+
|
simple
_type local_name_list { $$=
$2
;
free_node($1);
}
;