pike.git/
src/
language.yacc
Branch:
Tag:
Non-build tags
All tags
No tags
2000-02-17
2000-02-17 01:15:22 by Henrik Grubbström (Grubba) <grubba@grubba.org>
66f77157f599da195d8aece01fc1f7ae8f7d3208 (
33
lines) (+
30
/-
3
)
[
Show
|
Annotate
]
Branch:
7.9
Added warning about usage of * in types.
Rev: src/language.yacc:1.164
188:
/* This is the grammar definition of Pike. */ #include "global.h"
-
RCSID("$Id: language.yacc,v 1.
163
2000/02/
15
22
:
06
:
17
hubbe
Exp $");
+
RCSID("$Id: language.yacc,v 1.
164
2000/02/
17
01
:
15
:
22
grubba
Exp $");
#ifdef HAVE_MEMORY_H #include <memory.h> #endif
667:
int e; /* construct the function type */ push_finished_type(compiler_frame->current_type);
+
if ($3) {
+
yywarning("The *-syntax in types is obsolete. Use array instead.");
+
}
while(--$3>=0) push_type(T_ARRAY); if(compiler_frame->current_return_type)
995:
type6: type | identifier_type ;
-
type: type '*' { push_type(T_ARRAY); }
+
type: type '*'
+
{
+
yywarning("The *-syntax in types is obsolete. Use array instead.");
+
push_type(T_ARRAY);
+
}
| type2 ;
-
type7: type7 '*' { push_type(T_ARRAY); }
+
type7: type7 '*'
+
{
+
yywarning("The *-syntax in types is obsolete. Use array instead.");
+
push_type(T_ARRAY);
+
}
| type4 ;
1296:
{ struct pike_string *type; push_finished_type(compiler_frame->current_type);
+
if ($1) {
+
yywarning("The *-syntax in types is obsolete. Use array instead.");
+
}
while($1--) push_type(T_ARRAY); type=compiler_pop_type(); define_variable($2->u.sval.u.string, type, current_modifiers);
1307:
{ struct pike_string *type; push_finished_type(compiler_frame->current_type);
+
if ($1) {
+
yywarning("The *-syntax in types is obsolete. Use array instead.");
+
}
while($1--) push_type(T_ARRAY); type=compiler_pop_type(); if ((current_modifiers & ID_EXTERN) && (compiler_pass == 1)) {
1343:
new_local_name: optional_stars F_IDENTIFIER { push_finished_type($<n>0->u.sval.u.string);
+
if ($1) {
+
yywarning("The *-syntax in types is obsolete. Use array instead.");
+
}
while($1--) push_type(T_ARRAY); add_local_name($2->u.sval.u.string, compiler_pop_type(),0); $$=mknode(F_ASSIGN,mkintnode(0),mklocalnode(islocal($2->u.sval.u.string),0));
1352:
| optional_stars F_IDENTIFIER '=' expr0 { push_finished_type($<n>0->u.sval.u.string);
+
if ($1) {
+
yywarning("The *-syntax in types is obsolete. Use array instead.");
+
}
while($1--) push_type(T_ARRAY); add_local_name($2->u.sval.u.string, compiler_pop_type(),0); $$=mknode(F_ASSIGN,$4,mklocalnode(islocal($2->u.sval.u.string),0));
1632:
debug_malloc_touch(compiler_frame->current_return_type); push_finished_type($<n>0->u.sval.u.string);
+
if ($1) {
+
yywarning("The *-syntax in types is obsolete. Use array instead.");
+
}
while($1--) push_type(T_ARRAY); if(compiler_frame->current_return_type)