version 1.54.2.2, 2014/08/20 00:05:06 |
version 1.55, 2013/04/19 17:43:05 |
Line 107 static inline void RESTORE(const char *f |
|
Line 107 static inline void RESTORE(const char *f |
|
#endif |
#endif |
%} |
%} |
|
|
%expect 75 |
%expect 5 |
|
|
%union { |
%union { |
int y_int; |
int y_int; |
Line 130 static inline void RESTORE(const char *f |
|
Line 130 static inline void RESTORE(const char *f |
|
%token <y_op> T_UNOP |
%token <y_op> T_UNOP |
%token <y_op> T_INCDEC |
%token <y_op> T_INCDEC |
%token T_SIZEOF |
%token T_SIZEOF |
%token T_TYPEOF |
|
%token T_EXTENSION |
|
%token T_ALIGNOF |
%token T_ALIGNOF |
%token <y_op> T_MULT |
%token <y_op> T_MULT |
%token <y_op> T_DIVOP |
%token <y_op> T_DIVOP |
Line 189 static inline void RESTORE(const char *f |
|
Line 187 static inline void RESTORE(const char *f |
|
%token <y_type> T_ATTRIBUTE |
%token <y_type> T_ATTRIBUTE |
%token <y_type> T_AT_ALIGNED |
%token <y_type> T_AT_ALIGNED |
%token <y_type> T_AT_DEPRECATED |
%token <y_type> T_AT_DEPRECATED |
%token <y_type> T_AT_NORETURN |
|
%token <y_type> T_AT_MAY_ALIAS |
%token <y_type> T_AT_MAY_ALIAS |
%token <y_type> T_AT_PACKED |
%token <y_type> T_AT_PACKED |
%token <y_type> T_AT_PURE |
|
%token <y_type> T_AT_TUINION |
%token <y_type> T_AT_TUINION |
%token <y_type> T_AT_TUNION |
%token <y_type> T_AT_TUNION |
%token <y_type> T_AT_UNUSED |
%token <y_type> T_AT_UNUSED |
%token <y_type> T_AT_FORMAT |
|
%token <y_type> T_AT_FORMAT_PRINTF |
|
%token <y_type> T_AT_FORMAT_SCANF |
|
%token <y_type> T_AT_FORMAT_STRFTIME |
|
%token <y_type> T_AT_FORMAT_ARG |
|
%token <y_type> T_AT_SENTINEL |
|
%token <y_type> T_AT_RETURNS_TWICE |
|
%token <y_type> T_AT_COLD |
|
|
|
%left T_COMMA |
%left T_COMMA |
%right T_ASSIGN T_OPASS |
%right T_ASSIGN T_OPASS |
|
|
| error T_SEMI |
| error T_SEMI |
; |
; |
|
|
type_attribute_format_type: |
|
T_AT_FORMAT_PRINTF |
|
| T_AT_FORMAT_SCANF |
|
| T_AT_FORMAT_STRFTIME |
|
; |
|
|
|
type_attribute_spec: |
type_attribute_spec: |
T_AT_DEPRECATED |
T_AT_DEPRECATED |
| T_AT_ALIGNED T_LPARN constant T_RPARN |
| T_AT_ALIGNED T_LPARN constant T_RPARN |
| T_AT_SENTINEL T_LPARN constant T_RPARN |
|
| T_AT_FORMAT_ARG T_LPARN constant T_RPARN |
|
| T_AT_MAY_ALIAS |
| T_AT_MAY_ALIAS |
| T_AT_NORETURN |
|
| T_AT_COLD |
|
| T_AT_RETURNS_TWICE |
|
| T_AT_PACKED { |
| T_AT_PACKED { |
addpacked(); |
addpacked(); |
} |
} |
| T_AT_PURE |
|
| T_AT_TUNION |
| T_AT_TUNION |
| T_AT_FORMAT T_LPARN type_attribute_format_type T_COMMA |
|
constant T_COMMA constant T_RPARN |
|
| T_AT_UNUSED |
| T_AT_UNUSED |
| T_QUAL { |
|
if ($1 != CONST) |
|
yyerror("Bad attribute"); |
|
} |
|
; |
; |
|
|
type_attribute: |
type_attribute: |
T_ATTRIBUTE T_LPARN T_LPARN { |
T_ATTRIBUTE T_LPARN T_LPARN type_attribute_spec T_RPARN T_RPARN |
attron = 1; |
|
} type_attribute_spec { |
|
attron = 0; |
|
} T_RPARN T_RPARN |
|
| T_PACKED { |
| T_PACKED { |
addpacked(); |
addpacked(); |
} |
} |
|
|
| declmods typespec { |
| declmods typespec { |
addtype($2); |
addtype($2); |
} |
} |
| type_attribute declspecs |
|
| declspecs type_attribute |
| declspecs type_attribute |
| declspecs declmod |
| declspecs declmod |
| declspecs notype_typespec { |
| declspecs notype_typespec { |
Line 586 notype_typespec: |
|
Line 553 notype_typespec: |
|
T_TYPE { |
T_TYPE { |
$$ = gettyp($1); |
$$ = gettyp($1); |
} |
} |
| T_TYPEOF term { |
|
$$ = $2->tn_type; |
|
} |
|
| struct_spec { |
| struct_spec { |
popdecl(); |
popdecl(); |
$$ = $1; |
$$ = $1; |
|
|
* a new tag if "a" is not declared at current level |
* a new tag if "a" is not declared at current level |
* |
* |
* yychar is valid because otherwise the parser would |
* yychar is valid because otherwise the parser would |
* not been able to decide if he must shift or reduce |
* not been able to deceide if he must shift or reduce |
*/ |
*/ |
$$ = mktag($2, $1, 0, yychar == T_SEMI); |
$$ = mktag($2, $1, 0, yychar == T_SEMI); |
} |
} |
Line 717 noclass_declspecs: |
|
Line 681 noclass_declspecs: |
|
clrtyp_typespec { |
clrtyp_typespec { |
addtype($1); |
addtype($1); |
} |
} |
| type_attribute noclass_declspecs |
|
| noclass_declmods typespec { |
| noclass_declmods typespec { |
addtype($2); |
addtype($2); |
} |
} |
Line 929 notype_direct_decl: |
|
Line 892 notype_direct_decl: |
|
| T_LPARN type_decl T_RPARN { |
| T_LPARN type_decl T_RPARN { |
$$ = $2; |
$$ = $2; |
} |
} |
| type_attribute notype_direct_decl { |
|
$$ = $2; |
|
} |
|
| notype_direct_decl T_LBRACK T_RBRACK { |
| notype_direct_decl T_LBRACK T_RBRACK { |
$$ = addarray($1, 0, 0); |
$$ = addarray($1, 0, 0); |
} |
} |
| notype_direct_decl T_LBRACK constant T_RBRACK { |
| notype_direct_decl T_LBRACK constant T_RBRACK { |
$$ = addarray($1, 1, toicon($3, 0)); |
$$ = addarray($1, 1, toicon($3, 0)); |
} |
} |
| notype_direct_decl param_list opt_asm_or_symbolrename { |
| notype_direct_decl param_list { |
$$ = addfunc($1, $2); |
$$ = addfunc($1, $2); |
popdecl(); |
popdecl(); |
blklev--; |
blklev--; |
Line 962 type_direct_decl: |
|
Line 922 type_direct_decl: |
|
| T_LPARN type_decl T_RPARN { |
| T_LPARN type_decl T_RPARN { |
$$ = $2; |
$$ = $2; |
} |
} |
| type_attribute type_direct_decl { |
|
$$ = $2; |
|
} |
|
| type_direct_decl T_LBRACK T_RBRACK { |
| type_direct_decl T_LBRACK T_RBRACK { |
$$ = addarray($1, 0, 0); |
$$ = addarray($1, 0, 0); |
} |
} |
| type_direct_decl T_LBRACK constant T_RBRACK { |
| type_direct_decl T_LBRACK constant T_RBRACK { |
$$ = addarray($1, 1, toicon($3, 0)); |
$$ = addarray($1, 1, toicon($3, 0)); |
} |
} |
| type_direct_decl param_list opt_asm_or_symbolrename { |
| type_direct_decl param_list { |
$$ = addfunc($1, $2); |
$$ = addfunc($1, $2); |
popdecl(); |
popdecl(); |
blklev--; |
blklev--; |
Line 1008 direct_param_decl: |
|
Line 965 direct_param_decl: |
|
| direct_param_decl T_LBRACK constant T_RBRACK { |
| direct_param_decl T_LBRACK constant T_RBRACK { |
$$ = addarray($1, 1, toicon($3, 0)); |
$$ = addarray($1, 1, toicon($3, 0)); |
} |
} |
| direct_param_decl param_list opt_asm_or_symbolrename { |
| direct_param_decl param_list { |
$$ = addfunc($1, $2); |
$$ = addfunc($1, $2); |
popdecl(); |
popdecl(); |
blklev--; |
blklev--; |
Line 1037 direct_notype_param_decl: |
|
Line 994 direct_notype_param_decl: |
|
| direct_notype_param_decl T_LBRACK constant T_RBRACK { |
| direct_notype_param_decl T_LBRACK constant T_RBRACK { |
$$ = addarray($1, 1, toicon($3, 0)); |
$$ = addarray($1, 1, toicon($3, 0)); |
} |
} |
| direct_notype_param_decl param_list opt_asm_or_symbolrename { |
| direct_notype_param_decl param_list { |
$$ = addfunc($1, $2); |
$$ = addfunc($1, $2); |
popdecl(); |
popdecl(); |
blklev--; |
blklev--; |
|
|
mkinit($1); |
mkinit($1); |
} |
} |
| init_by_name init_expr %prec T_COMMA |
| init_by_name init_expr %prec T_COMMA |
| init_lbrace init_rbrace |
|
| init_lbrace init_expr_list init_rbrace |
| init_lbrace init_expr_list init_rbrace |
| init_lbrace init_expr_list T_COMMA init_rbrace |
| init_lbrace init_expr_list T_COMMA init_rbrace |
| error |
| error |
Line 1315 direct_abs_decl: |
|
Line 1271 direct_abs_decl: |
|
| T_LBRACK constant T_RBRACK { |
| T_LBRACK constant T_RBRACK { |
$$ = addarray(aname(), 1, toicon($2, 0)); |
$$ = addarray(aname(), 1, toicon($2, 0)); |
} |
} |
| type_attribute direct_abs_decl { |
|
$$ = $2; |
|
} |
|
| direct_abs_decl T_LBRACK T_RBRACK { |
| direct_abs_decl T_LBRACK T_RBRACK { |
$$ = addarray($1, 0, 0); |
$$ = addarray($1, 0, 0); |
} |
} |
| direct_abs_decl T_LBRACK constant T_RBRACK { |
| direct_abs_decl T_LBRACK constant T_RBRACK { |
$$ = addarray($1, 1, toicon($3, 0)); |
$$ = addarray($1, 1, toicon($3, 0)); |
} |
} |
| abs_decl_param_list opt_asm_or_symbolrename { |
| abs_decl_param_list { |
$$ = addfunc(aname(), $1); |
$$ = addfunc(aname(), $1); |
popdecl(); |
popdecl(); |
blklev--; |
blklev--; |
} |
} |
| direct_abs_decl abs_decl_param_list opt_asm_or_symbolrename { |
| direct_abs_decl abs_decl_param_list { |
$$ = addfunc($1, $2); |
$$ = addfunc($1, $2); |
popdecl(); |
popdecl(); |
blklev--; |
blklev--; |
|
|
|
|
comp_stmnt: |
comp_stmnt: |
comp_stmnt_lbrace comp_stmnt_rbrace |
comp_stmnt_lbrace comp_stmnt_rbrace |
| comp_stmnt_lbrace stmnt_d_list comp_stmnt_rbrace |
| comp_stmnt_lbrace stmnt_list comp_stmnt_rbrace |
| comp_stmnt_lbrace declaration_list comp_stmnt_rbrace |
| comp_stmnt_lbrace declaration_list comp_stmnt_rbrace |
| comp_stmnt_lbrace declaration_list stmnt_d_list comp_stmnt_rbrace |
| comp_stmnt_lbrace declaration_list stmnt_d_list comp_stmnt_rbrace |
; |
; |
|
|
| T_IMAG term { |
| T_IMAG term { |
$$ = build(IMAG, $2, NULL); |
$$ = build(IMAG, $2, NULL); |
} |
} |
| T_EXTENSION term { |
|
$$ = $2; |
|
} |
|
| T_REAL T_LPARN term T_RPARN { |
| T_REAL T_LPARN term T_RPARN { |
$$ = build(REAL, $3, NULL); |
$$ = build(REAL, $3, NULL); |
} |
} |