pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:1831:    $<number>$=Pike_compiler->compiler_frame->last_block_level;       if($<number>$ == -1) /* if 'first block' */    Pike_compiler->compiler_frame->last_block_level=0; /* all variables */    else    Pike_compiler->compiler_frame->last_block_level=$<number>2;    }    statements end_block    {    unuse_modules(Pike_compiler->num_used_modules - $<number>1); -  pop_local_variables($<number>2); +  $5 = pop_local_variables($<number>2, $5);    Pike_compiler->compiler_frame->last_block_level=$<number>4;    if ($5) COPY_LINE_NUMBER_INFO($5, $3);    free_node ($3);    $$=$5;    }    ;      /* Node with line number info at $0. */   end_block: '}'    | TOK_LEX_EOF
pike.git/src/language.yacc:2976:    '(' safe_comma_expr end_cond statement optional_else_part    {    $$ = mknode('?', $6,    mknode(':',    mkcastnode(void_type_string, $8),    mkcastnode(void_type_string, $9)));    COPY_LINE_NUMBER_INFO($$, $3);    $$ = mkcastnode(void_type_string, $$);    COPY_LINE_NUMBER_INFO($$, $3);    free_node ($3); -  pop_local_variables($<number>2); +  $$ = pop_local_variables($<number>2, $$);    Pike_compiler->compiler_frame->last_block_level=$<number>4;    }    ;      end_cond: ')'    | '}' { yyerror("Missing ')'."); }    | TOK_LEX_EOF    {    yyerror("Missing ')'.");    yyerror("Unexpected end of file.");
pike.git/src/language.yacc:3045:    if ($7) {    $$=mknode(F_FOREACH,    mknode(F_VAL_LVAL,$6,$7),    $9);    } else {    /* Error in lvalue */    $$=mknode(F_COMMA_EXPR, mkcastnode(void_type_string, $6), $9);    }    COPY_LINE_NUMBER_INFO($$, $3);    free_node ($3); -  pop_local_variables($<number>2); +  $$ = pop_local_variables($<number>2, $$);    Pike_compiler->compiler_frame->last_block_level=$<number>4;    Pike_compiler->compiler_frame->opt_flags |= OPT_CUSTOM_LABELS;    }    ;      do: TOK_DO line_number_info statement    TOK_WHILE '(' safe_comma_expr end_cond expected_semicolon    {    $$=mknode(F_DO,$3,$6);    COPY_LINE_NUMBER_INFO($$, $2);
pike.git/src/language.yacc:3100:    $<number>$=Pike_compiler->compiler_frame->last_block_level;    Pike_compiler->compiler_frame->last_block_level=$<number>2;    }    '(' unused expected_semicolon for_expr expected_semicolon unused end_cond    statement    {    $$=mknode(F_COMMA_EXPR, mkcastnode(void_type_string, $6),    mknode(F_FOR,$8,mknode(':',$12,$10)));    COPY_LINE_NUMBER_INFO($$, $3);    free_node ($3); -  pop_local_variables($<number>2); +  $$ = pop_local_variables($<number>2, $$);    Pike_compiler->compiler_frame->last_block_level=$<number>4;    Pike_compiler->compiler_frame->opt_flags |= OPT_CUSTOM_LABELS;    }    ;         while: TOK_WHILE    {    $<number>$=Pike_compiler->compiler_frame->current_number_of_locals;    }
pike.git/src/language.yacc:3122:    {    /* Trick to store more than one number on compiler stack - Hubbe */    $<number>$=Pike_compiler->compiler_frame->last_block_level;    Pike_compiler->compiler_frame->last_block_level=$<number>2;    }    '(' safe_comma_expr end_cond statement    {    $$=mknode(F_FOR,$6,mknode(':',$8,NULL));    COPY_LINE_NUMBER_INFO($$, $3);    free_node ($3); -  pop_local_variables($<number>2); +  $$ = pop_local_variables($<number>2, $$);    Pike_compiler->compiler_frame->last_block_level=$<number>4;    Pike_compiler->compiler_frame->opt_flags |= OPT_CUSTOM_LABELS;    }    ;      for_expr: /* EMPTY */ { $$=mkintnode(1); }    | safe_comma_expr    ;      switch: TOK_SWITCH
pike.git/src/language.yacc:3147:    {    /* Trick to store more than one number on compiler stack - Hubbe */    $<number>$=Pike_compiler->compiler_frame->last_block_level;    Pike_compiler->compiler_frame->last_block_level=$<number>2;    }    '(' safe_comma_expr end_cond statement    {    $$=mknode(F_SWITCH,$6,$8);    COPY_LINE_NUMBER_INFO($$, $3);    free_node ($3); -  pop_local_variables($<number>2); +  $$ = pop_local_variables($<number>2, $$);    Pike_compiler->compiler_frame->last_block_level=$<number>4;    }    ;      case: TOK_CASE safe_comma_expr expected_colon    {    $$=mknode(F_CASE,$2,0);    }    | TOK_CASE safe_comma_expr expected_dot_dot optional_comma_expr expected_colon    {
pike.git/src/language.yacc:3420:    int f/*, e */;    struct pike_string *name;    struct compilation *c = THIS_COMPILATION;    struct pike_string *save_file = c->lex.current_file;    int save_line = c->lex.current_line;    c->lex.current_file = $2->current_file;    c->lex.current_line = $2->line_number;       /* block code */    unuse_modules(Pike_compiler->num_used_modules - $<number>1); -  pop_local_variables($<number>4); +  $5 = pop_local_variables($<number>4, $5);       debug_malloc_touch($5);    $5=mknode(F_COMMA_EXPR,$5,mknode(F_RETURN,mkintnode(0),0));    if (Pike_compiler->compiler_pass == 2) {    /* Doing this in pass 1 might induce too strict checks on types    * in cases where we got placeholders. */    type=find_return_type($5);    if (type) {    push_finished_type(type);    free_type(type);