pike.git / src / language.y

version» Context lines:

pike.git/src/language.y:197:    unsigned short type;    struct node_s *n;    struct efun *efun;   }      %type <fnum> F_FLOAT   %type <number> modifiers modifier optional_dot_dot_dot   %type <number> assign F_NUMBER F_LOCAL arguments arguments2   %type <number> optional_stars modifier_list   %type <string> F_IDENTIFIER F_STRING string_constant low_string - %type <string> type_or_error optional_identifier cast simple_type + %type <string> optional_identifier cast simple_type   %type <string> optional_rename_inherit      %type <number> F_ARRAY_ID F_BREAK F_CASE F_CATCH F_CONTINUE F_DEFAULT F_DO   %type <number> F_EFUN F_ELSE F_FLOAT_ID F_FOR F_FOREACH F_FUNCTION_ID F_GAUGE   %type <number> F_IF F_INHERIT F_INLINE F_INT_ID F_LAMBDA F_LIST_ID F_MAPPING_ID   %type <number> F_MIXED_ID F_NO_MASK F_OBJECT_ID F_PRIVATE F_PROGRAM_ID   %type <number> F_PROTECTED F_PUBLIC F_RETURN F_SSCANF F_STATIC   %type <number> F_STRING_ID F_SWITCH F_VARARGS F_VOID_ID F_WHILE      /* The following symbos return type information */      %type <n> string expr01 expr00 comma_expr   %type <n> expr2 expr1 expr3 expr0 expr4 catch lvalue_list   %type <n> lambda for_expr block assoc_pair new_local_name   %type <n> expr_list2 m_expr_list m_expr_list2 statement gauge sscanf   %type <n> for do cond optional_else_part while statements - %type <n> local_name_list class + %type <n> local_name_list class catch_arg   %type <n> unused2 foreach unused switch case return expr_list default   %type <n> continue break block_or_semi   %%      all: program;      program: program def optional_semi_colon    | /* empty */ ;      optional_semi_colon: /* empty */
pike.git/src/language.y:258:         type_or_error: simple_type    {    if(local_variables->current_type) free_string(local_variables->current_type);    local_variables->current_type=$1;    }    | /* empty */    {    yyerror("Missing type."); -  copy_shared_string($$, mixed_type_string); +  copy_shared_string(local_variables->current_type, +  mixed_type_string);    }         def: modifiers type_or_error optional_stars F_IDENTIFIER '(' arguments ')'    {    int e;    /* construct the function type */    push_finished_type(local_variables->current_type);    while($3--) push_type(T_ARRAY);   
pike.git/src/language.y:925:    | F_IDENTIFIER    {    int i;    struct efun *f;    if((i=islocal($1))>=0)    {    $$=mklocalnode(i);    }else if((i=isidentifier($1))>=0){    $$=mkidentifiernode(i);    }else if((f=lookup_efun($1))){ -  $$=mksvaluenode(&f->function); +  $$=mkconstantsvaluenode(&f->function);    }else{    my_yyerror("'%s' undefined.",$1->str);    $$=0;    }    free_string($1);    }    | F_EFUN F_COLON_COLON F_IDENTIFIER    {    struct efun *f;    f=lookup_efun($3);
pike.git/src/language.y:1021:    {    $$=mknode(F_NEGATE,    mknode(F_SUBTRACT,    mknode(F_INDEX,mkefuncallnode("rusage",0),    mkintnode(GAUGE_RUSAGE_INDEX)),    mknode(F_ARG_LIST,$3,    mknode(F_INDEX,mkefuncallnode("rusage",0),    mkintnode(GAUGE_RUSAGE_INDEX)))),0);    } ;    - catch: F_CATCH '(' unused ')' +  + catch_arg: '(' unused ')' { $$=$2; } +  | block +  ; +  + catch: F_CATCH catch_arg    { -  $$=mknode(F_CATCH,$3,NULL); +  $$=mknode(F_CATCH,$2,NULL);    } ;      sscanf: F_SSCANF '(' expr0 ',' expr0 lvalue_list ')'    {    $$=mknode(F_SSCANF,mknode(F_ARG_LIST,$3,$5),$6);    }         lvalue_list: /* empty */ { $$ = 0; }    | ',' expr4 lvalue_list