業務連絡だお
ここのトピックがAgeってたらチェックした方がいいって話なんだが
2006-02-14 (火) 10:25:21
yacc.y
//変数宣言 Variable_declation : Type Ident { printf("変数「%s」を作成します.\n",$2); if(add($2,$1) != 0) { printf("Error!何らかの問題によって変数は 作成できませんでした(ErrNo,001)\n"); } } | Type Ident Substitute_par Expression | Type Ident Connect_par Variable_declation | Type Ident Substitute_par Expression Connect_par Variable_declation ;
を次のように変更。
Variable_declation : Type Ident{
printf("変数「%s」を作成します.\n",$2); if(add($2,$1) != 0) { printf("Error!何らかの問題によって変数は作成できませんでした(ErrNo,001)\n"); } } | Type Ident Substitute_par Expression { if(add($2,$1) != 0) { printf("Error!何らかの問題によって変数は作成できませんでした(ErrNo,001a)\n"); exit(1); } if (typeback($2) == 0) { insert_func_i($2,$4); } else { printf("Error!何らかの問題によって変数は作成できませんでした(ErrNo,001b)\n"); } } | Type Ident Substitute_par Ident { if(add($2,$1) != 0) { printf("Error!\n"); exit(1); } if(typeback($2) == 1) { insert_func_c($2,$4); } else { printf("Error!\n"); } } | Type Ident Connect_par Variable_declation | Type Ident Substitute_par Expression Connect_par Variable_declation ;
2006-02-10 (金) 11:42:18
CHECK IT -> http://www.hpcs.cs.tsukuba.ac.jp/~msato/lecture-note/comp2005//
よさげ
教科書(pdf版)
2006-02-06 (月) 11:15:54
業務連絡だお
yacc.yの370行目あたり
C_Factor : Ident // | Ident Return | Ident Array_expression ;
これを
C_Factor : Ident | Ident LK Return RK | Ident Array_expression ;
に変更しておいてほしいお(;^ω^)
2006-01-27 (金) 10:22:39
業務連絡です。yacc.yの構文が足りませんでした(;^ω^)
//関数定義 Function_define : FUNC Ident LS RS | FUNC Ident LS Return RS ;
これを
//関数定義 Function_define : FUNC Ident LS RS | FUNC Ident LS Return RS | Function_define FUNC Ident LS RS | Function_define FUNC Ident LS Return RS ;
このように修正してください。