pike.git/
src/
language.yacc
Branch:
Tag:
Non-build tags
All tags
No tags
2000-07-10
2000-07-10 14:32:06 by Henrik Grubbström (Grubba) <grubba@grubba.org>
c3cfe97991705cc21114fa6e6313b71a92a97cb7 (
24
lines) (+
12
/-
12
)
[
Show
|
Annotate
]
Branch:
7.9
Moved varargs to the program_state.
Rev: src/compilation.h:1.17
Rev: src/language.yacc:1.198
109:
/* This is the grammar definition of Pike. */ #include "global.h"
-
RCSID("$Id: language.yacc,v 1.
197
2000/07/
09
17
:
54
:
08
grubba Exp $");
+
RCSID("$Id: language.yacc,v 1.
198
2000/07/
10
14
:
32
:
06
grubba Exp $");
#ifdef HAVE_MEMORY_H #include <memory.h> #endif
145:
struct pike_string *,struct pike_string *,node *); static node *lexical_islocal(struct pike_string *);
-
static int varargs;
+
static struct pike_string *last_identifier=0; static int inherit_depth; static struct program_state *inherit_state = NULL;
614:
push_finished_type(Pike_compiler->compiler_frame->current_return_type); e=$7-1;
-
if(varargs)
+
if(
Pike_compiler->
varargs)
{ push_finished_type(Pike_compiler->compiler_frame->variable[e].type); e--;
-
varargs=0;
+
Pike_compiler->
varargs=0;
pop_type_stack(); }else{ push_type(T_VOID);
786:
new_arg_name: type7 optional_dot_dot_dot optional_identifier {
-
if(varargs) yyerror("Can't define more arguments after ...");
+
if(
Pike_compiler->
varargs) yyerror("Can't define more arguments after ...");
if($2) { push_type(T_ARRAY);
-
varargs=1;
+
Pike_compiler->
varargs=1;
} if(!$3)
1494:
push_type(T_MIXED); e=$4-1;
-
if(varargs)
+
if(
Pike_compiler->
varargs)
{ push_finished_type(Pike_compiler->compiler_frame->variable[e].type); e--;
-
varargs=0;
+
Pike_compiler->
varargs=0;
pop_type_stack(); }else{ push_type(T_VOID);
1560:
push_finished_type(Pike_compiler->compiler_frame->current_return_type); e=$3-1;
-
if(varargs)
+
if(
Pike_compiler->
varargs)
{ push_finished_type(Pike_compiler->compiler_frame->variable[e].type); e--;
-
varargs=0;
+
Pike_compiler->
varargs=0;
pop_type_stack(); }else{ push_type(T_VOID);
1677:
push_finished_type(Pike_compiler->compiler_frame->current_return_type); e=$4-1;
-
if(varargs)
+
if(
Pike_compiler->
varargs)
{ push_finished_type(Pike_compiler->compiler_frame->variable[e].type); e--;
-
varargs=0;
+
Pike_compiler->
varargs=0;
pop_type_stack(); }else{ push_type(T_VOID);