Je ze vredu. Mi je uspelo popravit, pozabil opisat & in |. Zdej mi delata tudi
queens in merge. No upam da dela prav. Prilagam svoj output za vse testcases.
Ln,
Domen
----- Original Message ----
From: Rok <[EMAIL PROTECTED]>
To: FRIClist <[email protected]>
Sent: Wednesday, March 21, 2007 9:52:28 PM
Subject: Re: [Friclist] Prevajalniki 2007 - 3.domaca
Sta ti pri 2. dom. nal. primera queens in merge delovala?
Če nista, potem imaš napako že v gramatiki...
Drugače pa tisti 49 primer ne sme delovati, ker je sintaksno
napačen.
Lp,
Rok
----- Original Message -----
From: "Domen Konda" <[EMAIL PROTECTED]>
To: "FRIClist" <[email protected]>
Sent: Wednesday, March 21, 2007 6:45 PM
Subject: Re: [Friclist] Prevajalniki 2007 - 3.domaca
Živjo,
zanima me, ali vam delajo vsi testni primeri v testcases? Ali je tako kot
pri 2. DN, ko zadnji primer ni delal? Pri meni poleg zadnjega ne delata se
queens.tig in merge.tig...
Sicer pa bi lahko primerjali izpise? Samo toliko da vem ali sem na pravi
poti :)
Moj izpis za test1.tig:
LetExp(
DecList(
TypeDec(arrtype,
ArrayTy(int)),
DecList(
VarDec(arr1,
arrtype,
ArrayExp(arrtype,
IntExp(10),
IntExp(0)),
true),
DecList())),
SeqExp(
ExpList(
varExp(
SimpleVar(arr1)))))
Lp,
Domen
____________________________________________________________________________________
Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097
____________________________________________________________________________________
Don't get soaked. Take a quick peek at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather
java Parse.Main ..\testcases\merge.tig
LetExp(
DecList(
TypeDec(any,
RecordTy(
Fieldlist(
any
int,
true,
Fieldlist()))),
DecList(
VarDec(buffer,
CallExp(getchar,
ExpList()),
true),
DecList(
FunctionDec(readint
Fieldlist(
any
any,
true,
Fieldlist()),
int
LetExp(
DecList(
VarDec(i,
IntExp(0),
true),
DecList(
FunctionDec(isdigit
Fieldlist(
s
string,
true,
Fieldlist()),
int
IfExp(
OpExp(
GE,
CallExp(ord,
ExpList(
varExp(
SimpleVar(buffer)))),
CallExp(ord,
ExpList(
StringExp(0)))),
OpExp(
LE,
CallExp(ord,
ExpList(
varExp(
SimpleVar(buffer)))),
CallExp(ord,
ExpList(
StringExp(9)))),
IntExp(0)),
FunctionDec()),
DecList(
FunctionDec(skipto
Fieldlist(),
WhileExp(
IfExp(
OpExp(
EQ,
varExp(
SimpleVar(buffer)),
StringExp( )),
IntExp(1),
OpExp(
EQ,
varExp(
SimpleVar(buffer)),
StringExp(
))),
AssignExp(
SimpleVar(buffer),
CallExp(getchar,
ExpList())))
,
FunctionDec()),
DecList()))),
SeqExp(
ExpList(
CallExp(skipto,
ExpList()),
ExpList(
AssignExp(
FieldVar(
SimpleVar(any),
any),
CallExp(isdigit,
ExpList(
varExp(
SimpleVar(buffer))))),
ExpList(
WhileExp(
CallExp(isdigit,
ExpList(
varExp(
SimpleVar(buffer)))),
SeqExp(
ExpList(
AssignExp(
SimpleVar(i),
OpExp(
MINUS,
OpExp(
PLUS,
OpExp(
MUL,
varExp(
SimpleVar(i)),
IntExp(10)),
CallExp(ord,
ExpList(
varExp(
SimpleVar(buffer))))),
CallExp(ord,
ExpList(
StringExp(0))))),
ExpList(
AssignExp(
SimpleVar(buffer),
CallExp(getchar,
ExpList()))))))
,
ExpList(
varExp(
SimpleVar(i)))))))),
FunctionDec()),
DecList(
TypeDec(list,
RecordTy(
Fieldlist(
first
int,
true,
Fieldlist(
rest
list,
true,
Fieldlist())))),
DecList(
FunctionDec(readlist
Fieldlist(),
list
LetExp(
DecList(
VarDec(any,
RecordExp(any,
FieldExpList(
any,
IntExp(0),
FieldExpList())),
true),
DecList(
VarDec(i,
CallExp(readint,
ExpList(
varExp(
SimpleVar(any)))),
true),
DecList())),
SeqExp(
ExpList(
IfExp(
varExp(
FieldVar(
SimpleVar(any),
any)),
RecordExp(list,
FieldExpList(
first,
varExp(
SimpleVar(i)),
FieldExpList(
rest,
CallExp(readlist,
ExpList()),
FieldExpList()))),
NilExp())))),
FunctionDec()),
DecList(
FunctionDec(merge
Fieldlist(
a
list,
true,
Fieldlist(
b
list,
true,
Fieldlist())),
list
IfExp(
OpExp(
EQ,
varExp(
SimpleVar(a)),
NilExp()),
varExp(
SimpleVar(b)),
IfExp(
OpExp(
EQ,
varExp(
SimpleVar(b)),
NilExp()),
varExp(
SimpleVar(a)),
IfExp(
OpExp(
LT,
varExp(
FieldVar(
SimpleVar(a),
first)),
varExp(
FieldVar(
SimpleVar(b),
first))),
RecordExp(list,
FieldExpList(
first,
varExp(
FieldVar(
SimpleVar(a),
first)),
FieldExpList(
rest,
CallExp(merge,
ExpList(
varExp(
FieldVar(
SimpleVar(a),
rest)),
ExpList(
varExp(
SimpleVar(b))))),
FieldExpList()))),
RecordExp(list,
FieldExpList(
first,
varExp(
FieldVar(
SimpleVar(b),
first)),
FieldExpList(
rest,
CallExp(merge,
ExpList(
varExp(
SimpleVar(a)),
ExpList(
varExp(
FieldVar(
SimpleVar(b),
rest))))),
FieldExpList())))))),
FunctionDec()),
DecList(
FunctionDec(printint
Fieldlist(
i
int,
true,
Fieldlist()),
LetExp(
DecList(
FunctionDec(f
Fieldlist(
i
int,
true,
Fieldlist()),
IfExp(
OpExp(
GT,
varExp(
SimpleVar(i)),
IntExp(0)),
SeqExp(
ExpList(
CallExp(f,
ExpList(
OpExp(
DIV,
varExp(
SimpleVar(i)),
IntExp(10)))),
ExpList(
CallExp(print,
ExpList(
CallExp(chr,
ExpList(
OpExp(
PLUS,
OpExp(
MINUS,
varExp(
SimpleVar(i)),
OpExp(
MUL,
OpExp(
DIV,
varExp(
SimpleVar(i)),
IntExp(10)),
IntExp(10))),
CallExp(ord,
ExpList(
StringExp(0)))))))))))),
FunctionDec()),
DecList()),
SeqExp(
ExpList(
IfExp(
OpExp(
LT,
varExp(
SimpleVar(i)),
IntExp(0)),
SeqExp(
ExpList(
CallExp(print,
ExpList(
StringExp(-))),
ExpList(
CallExp(f,
ExpList(
OpExp(
MINUS,
IntExp(0),
varExp(
SimpleVar(i)))))))),
IfExp(
OpExp(
GT,
varExp(
SimpleVar(i)),
IntExp(0)),
CallExp(f,
ExpList(
varExp(
SimpleVar(i)))),
CallExp(print,
ExpList(
StringExp(0)))))))),
FunctionDec()),
DecList(
FunctionDec(printlist
Fieldlist(
l
list,
true,
Fieldlist()),
IfExp(
OpExp(
EQ,
varExp(
SimpleVar(l)),
NilExp()),
CallExp(print,
ExpList(
StringExp(
))),
SeqExp(
ExpList(
CallExp(printint,
ExpList(
varExp(
FieldVar(
SimpleVar(l),
first)))),
ExpList(
CallExp(print,
ExpList(
StringExp( ))),
ExpList(
CallExp(printlist,
ExpList(
varExp(
FieldVar(
SimpleVar(l),
rest))))))))),
FunctionDec()),
DecList(
VarDec(list1,
CallExp(readlist,
ExpList()),
true),
DecList(
VarDec(list2,
SeqExp(
ExpList(
AssignExp(
SimpleVar(buffer),
CallExp(getchar,
ExpList())),
ExpList(
CallExp(readlist,
ExpList())))),
true),
DecList())))))))))),
SeqExp(
ExpList(
CallExp(printlist,
ExpList(
CallExp(merge,
ExpList(
varExp(
SimpleVar(list1)),
ExpList(
varExp(
SimpleVar(list2))))))))))
java Parse.Main ..\testcases\queens.tig
LetExp(
DecList(
VarDec(N,
IntExp(8),
true),
DecList(
TypeDec(intArray,
ArrayTy(int)),
DecList(
VarDec(row,
ArrayExp(intArray,
varExp(
SimpleVar(N)),
IntExp(0)),
true),
DecList(
VarDec(col,
ArrayExp(intArray,
varExp(
SimpleVar(N)),
IntExp(0)),
true),
DecList(
VarDec(diag1,
ArrayExp(intArray,
OpExp(
MINUS,
OpExp(
PLUS,
varExp(
SimpleVar(N)),
varExp(
SimpleVar(N))),
IntExp(1)),
IntExp(0)),
true),
DecList(
VarDec(diag2,
ArrayExp(intArray,
OpExp(
MINUS,
OpExp(
PLUS,
varExp(
SimpleVar(N)),
varExp(
SimpleVar(N))),
IntExp(1)),
IntExp(0)),
true),
DecList(
FunctionDec(printboard
Fieldlist(),
SeqExp(
ExpList(
ForExp(
VarDec(i,
IntExp(0),
true),
OpExp(
MINUS,
varExp(
SimpleVar(N)),
IntExp(1)),
SeqExp(
ExpList(
ForExp(
VarDec(j,
IntExp(0),
true),
OpExp(
MINUS,
varExp(
SimpleVar(N)),
IntExp(1)),
CallExp(print,
ExpList(
IfExp(
OpExp(
EQ,
varExp(
SubscriptVar(
SimpleVar(col),
varExp(
SimpleVar(i)))),
varExp(
SimpleVar(j))),
StringExp( O),
StringExp( .))))),
ExpList(
CallExp(print,
ExpList(
StringExp(
))))))),
ExpList(
CallExp(print,
ExpList(
StringExp(
)))))),
FunctionDec()),
DecList(
FunctionDec(try
Fieldlist(
c
int,
true,
Fieldlist()),
SeqExp(
ExpList(
IfExp(
OpExp(
EQ,
varExp(
SimpleVar(c)),
varExp(
SimpleVar(N))),
CallExp(printboard,
ExpList()),
ForExp(
VarDec(r,
IntExp(0),
true),
OpExp(
MINUS,
varExp(
SimpleVar(N)),
IntExp(1)),
IfExp(
IfExp(
IfExp(
OpExp(
EQ,
varExp(
SubscriptVar(
SimpleVar(row),
varExp(
SimpleVar(r)))),
IntExp(0)),
OpExp(
EQ,
varExp(
SubscriptVar(
SimpleVar(diag1),
OpExp(
PLUS,
varExp(
SimpleVar(r)),
varExp(
SimpleVar(c))))),
IntExp(0)),
IntExp(0)),
OpExp(
EQ,
varExp(
SubscriptVar(
SimpleVar(diag2),
OpExp(
MINUS,
OpExp(
PLUS,
varExp(
SimpleVar(r)),
IntExp(7)),
varExp(
SimpleVar(c))))),
IntExp(0)),
IntExp(0)),
SeqExp(
ExpList(
AssignExp(
SubscriptVar(
SimpleVar(row),
varExp(
SimpleVar(r))),
IntExp(1)),
ExpList(
AssignExp(
SubscriptVar(
SimpleVar(diag1),
OpExp(
PLUS,
varExp(
SimpleVar(r)),
varExp(
SimpleVar(c)))),
IntExp(1)),
ExpList(
AssignExp(
SubscriptVar(
SimpleVar(diag2),
OpExp(
MINUS,
OpExp(
PLUS,
varExp(
SimpleVar(r)),
IntExp(7)),
varExp(
SimpleVar(c)))),
IntExp(1)),
ExpList(
AssignExp(
SubscriptVar(
SimpleVar(col),
varExp(
SimpleVar(c))),
varExp(
SimpleVar(r))),
ExpList(
CallExp(try,
ExpList(
OpExp(
PLUS,
varExp(
SimpleVar(c)),
IntExp(1)))),
ExpList(
AssignExp(
SubscriptVar(
SimpleVar(row),
varExp(
SimpleVar(r))),
IntExp(0)),
ExpList(
AssignExp(
SubscriptVar(
SimpleVar(diag1),
OpExp(
PLUS,
varExp(
SimpleVar(r)),
varExp(
SimpleVar(c)))),
IntExp(0)),
ExpList(
AssignExp(
SubscriptVar(
SimpleVar(diag2),
OpExp(
MINUS,
OpExp(
PLUS,
varExp(
SimpleVar(r)),
IntExp(7)),
varExp(
SimpleVar(c)))),
IntExp(0)))))))))))))))),
FunctionDec()),
DecList())))))))),
SeqExp(
ExpList(
CallExp(try,
ExpList(
IntExp(0))))))
java Parse.Main ..\testcases\test1.tig
LetExp(
DecList(
TypeDec(arrtype,
ArrayTy(int)),
DecList(
VarDec(arr1,
arrtype,
ArrayExp(arrtype,
IntExp(10),
IntExp(0)),
true),
DecList())),
SeqExp(
ExpList(
varExp(
SimpleVar(arr1)))))
java Parse.Main ..\testcases\test2.tig
LetExp(
DecList(
TypeDec(myint,
NameTy(int)),
DecList(
TypeDec(arrtype,
ArrayTy(myint)),
DecList(
VarDec(arr1,
arrtype,
ArrayExp(arrtype,
IntExp(10),
IntExp(0)),
true),
DecList()))),
SeqExp(
ExpList(
varExp(
SimpleVar(arr1)))))
java Parse.Main ..\testcases\test3.tig
LetExp(
DecList(
TypeDec(rectype,
RecordTy(
Fieldlist(
name
string,
true,
Fieldlist(
age
int,
true,
Fieldlist())))),
DecList(
VarDec(rec1,
rectype,
RecordExp(rectype,
FieldExpList(
name,
StringExp(Nobody),
FieldExpList(
age,
IntExp(1000),
FieldExpList()))),
true),
DecList())),
SeqExp(
ExpList(
AssignExp(
FieldVar(
SimpleVar(rec1),
name),
StringExp(Somebody)),
ExpList(
varExp(
SimpleVar(rec1))))))
java Parse.Main ..\testcases\test4.tig
LetExp(
DecList(
FunctionDec(nfactor
Fieldlist(
n
int,
true,
Fieldlist()),
int
IfExp(
OpExp(
EQ,
varExp(
SimpleVar(n)),
IntExp(0)),
IntExp(1),
OpExp(
MUL,
varExp(
SimpleVar(n)),
CallExp(nfactor,
ExpList(
OpExp(
MINUS,
varExp(
SimpleVar(n)),
IntExp(1)))))),
FunctionDec()),
DecList()),
SeqExp(
ExpList(
CallExp(nfactor,
ExpList(
IntExp(10))))))
java Parse.Main ..\testcases\test5.tig
LetExp(
DecList(
TypeDec(intlist,
RecordTy(
Fieldlist(
hd
int,
true,
Fieldlist(
tl
intlist,
true,
Fieldlist())))),
DecList(
TypeDec(tree,
RecordTy(
Fieldlist(
key
int,
true,
Fieldlist(
children
treelist,
true,
Fieldlist())))),
DecList(
TypeDec(treelist,
RecordTy(
Fieldlist(
hd
tree,
true,
Fieldlist(
tl
treelist,
true,
Fieldlist())))),
DecList(
VarDec(lis,
intlist,
RecordExp(intlist,
FieldExpList(
hd,
IntExp(0),
FieldExpList(
tl,
NilExp(),
FieldExpList()))),
true),
DecList())))),
SeqExp(
ExpList(
varExp(
SimpleVar(lis)))))
java Parse.Main ..\testcases\test6.tig
LetExp(
DecList(
FunctionDec(do_nothing1
Fieldlist(
a
int,
true,
Fieldlist(
b
string,
true,
Fieldlist())),
CallExp(do_nothing2,
ExpList(
OpExp(
PLUS,
varExp(
SimpleVar(a)),
IntExp(1)))),
FunctionDec()),
DecList(
FunctionDec(do_nothing2
Fieldlist(
d
int,
true,
Fieldlist()),
CallExp(do_nothing1,
ExpList(
varExp(
SimpleVar(d)),
ExpList(
StringExp(str)))),
FunctionDec()),
DecList())),
SeqExp(
ExpList(
CallExp(do_nothing1,
ExpList(
IntExp(0),
ExpList(
StringExp(str2)))))))
java Parse.Main ..\testcases\test7.tig
LetExp(
DecList(
FunctionDec(do_nothing1
Fieldlist(
a
int,
true,
Fieldlist(
b
string,
true,
Fieldlist())),
int
SeqExp(
ExpList(
CallExp(do_nothing2,
ExpList(
OpExp(
PLUS,
varExp(
SimpleVar(a)),
IntExp(1)))),
ExpList(
IntExp(0)))),
FunctionDec()),
DecList(
FunctionDec(do_nothing2
Fieldlist(
d
int,
true,
Fieldlist()),
string
SeqExp(
ExpList(
CallExp(do_nothing1,
ExpList(
varExp(
SimpleVar(d)),
ExpList(
StringExp(str)))),
ExpList(
StringExp( )))),
FunctionDec()),
DecList())),
SeqExp(
ExpList(
CallExp(do_nothing1,
ExpList(
IntExp(0),
ExpList(
StringExp(str2)))))))
java Parse.Main ..\testcases\test8.tig
IfExp(
SeqExp(
ExpList(
OpExp(
GT,
IntExp(10),
IntExp(20)))),
IntExp(30),
IntExp(40))
java Parse.Main ..\testcases\test9.tig
IfExp(
SeqExp(
ExpList(
OpExp(
GT,
IntExp(5),
IntExp(4)))),
IntExp(13),
StringExp( ))
java Parse.Main ..\testcases\test10.tig
WhileExp(
SeqExp(
ExpList(
OpExp(
GT,
IntExp(10),
IntExp(5)))),
OpExp(
PLUS,
IntExp(5),
IntExp(6)))
java Parse.Main ..\testcases\test11.tig
ForExp(
VarDec(i,
IntExp(10),
true),
StringExp( ),
AssignExp(
SimpleVar(i),
OpExp(
MINUS,
varExp(
SimpleVar(i)),
IntExp(1))))
java Parse.Main ..\testcases\test12.tig
LetExp(
DecList(
VarDec(a,
IntExp(0),
true),
DecList()),
SeqExp(
ExpList(
ForExp(
VarDec(i,
IntExp(0),
true),
IntExp(100),
SeqExp(
ExpList(
AssignExp(
SimpleVar(a),
OpExp(
PLUS,
varExp(
SimpleVar(a)),
IntExp(1))),
ExpList(
SeqExp(
ExpList()))))))))
java Parse.Main ..\testcases\test13.tig
OpExp(
GT,
IntExp(3),
StringExp(df))
java Parse.Main ..\testcases\test14.tig
LetExp(
DecList(
TypeDec(arrtype,
ArrayTy(int)),
DecList(
TypeDec(rectype,
RecordTy(
Fieldlist(
name
string,
true,
Fieldlist(
id
int,
true,
Fieldlist())))),
DecList(
VarDec(rec,
RecordExp(rectype,
FieldExpList(
name,
StringExp(aname),
FieldExpList(
id,
IntExp(0),
FieldExpList()))),
true),
DecList(
VarDec(arr,
ArrayExp(arrtype,
IntExp(3),
IntExp(0)),
true),
DecList())))),
SeqExp(
ExpList(
IfExp(
OpExp(
NE,
varExp(
SimpleVar(rec)),
varExp(
SimpleVar(arr))),
IntExp(3),
IntExp(4)))))
java Parse.Main ..\testcases\test15.tig
IfExp(
IntExp(20),
IntExp(3))
java Parse.Main ..\testcases\test16.tig
LetExp(
DecList(
TypeDec(a,
NameTy(c)),
DecList(
TypeDec(b,
NameTy(a)),
DecList(
TypeDec(c,
NameTy(d)),
DecList(
TypeDec(d,
NameTy(a)),
DecList())))),
SeqExp(
ExpList(
StringExp())))
java Parse.Main ..\testcases\test17.tig
LetExp(
DecList(
TypeDec(tree,
RecordTy(
Fieldlist(
key
int,
true,
Fieldlist(
children
treelist,
true,
Fieldlist())))),
DecList(
VarDec(d,
int,
IntExp(0),
true),
DecList(
TypeDec(treelist,
RecordTy(
Fieldlist(
hd
tree,
true,
Fieldlist(
tl
treelist,
true,
Fieldlist())))),
DecList()))),
SeqExp(
ExpList(
varExp(
SimpleVar(d)))))
java Parse.Main ..\testcases\test18.tig
LetExp(
DecList(
FunctionDec(do_nothing1
Fieldlist(
a
int,
true,
Fieldlist(
b
string,
true,
Fieldlist())),
int
SeqExp(
ExpList(
CallExp(do_nothing2,
ExpList(
OpExp(
PLUS,
varExp(
SimpleVar(a)),
IntExp(1)))),
ExpList(
IntExp(0)))),
FunctionDec()),
DecList(
VarDec(d,
IntExp(0),
true),
DecList(
FunctionDec(do_nothing2
Fieldlist(
d
int,
true,
Fieldlist()),
string
SeqExp(
ExpList(
CallExp(do_nothing1,
ExpList(
varExp(
SimpleVar(d)),
ExpList(
StringExp(str)))),
ExpList(
StringExp( )))),
FunctionDec()),
DecList()))),
SeqExp(
ExpList(
CallExp(do_nothing1,
ExpList(
IntExp(0),
ExpList(
StringExp(str2)))))))
java Parse.Main ..\testcases\test19.tig
LetExp(
DecList(
FunctionDec(do_nothing1
Fieldlist(
a
int,
true,
Fieldlist(
b
string,
true,
Fieldlist())),
int
SeqExp(
ExpList(
CallExp(do_nothing2,
ExpList(
OpExp(
PLUS,
varExp(
SimpleVar(a)),
IntExp(1)))),
ExpList(
IntExp(0)))),
FunctionDec()),
DecList(
FunctionDec(do_nothing2
Fieldlist(
d
int,
true,
Fieldlist()),
string
SeqExp(
ExpList(
CallExp(do_nothing1,
ExpList(
varExp(
SimpleVar(a)),
ExpList(
StringExp(str)))),
ExpList(
StringExp( )))),
FunctionDec()),
DecList())),
SeqExp(
ExpList(
CallExp(do_nothing1,
ExpList(
IntExp(0),
ExpList(
StringExp(str2)))))))
java Parse.Main ..\testcases\test20.tig
WhileExp(
OpExp(
GT,
IntExp(10),
IntExp(5)),
SeqExp(
ExpList(
OpExp(
PLUS,
varExp(
SimpleVar(i)),
IntExp(1)),
ExpList(
SeqExp(
ExpList())))))
java Parse.Main ..\testcases\test21.tig
LetExp(
DecList(
FunctionDec(nfactor
Fieldlist(
n
int,
true,
Fieldlist()),
IfExp(
OpExp(
EQ,
varExp(
SimpleVar(n)),
IntExp(0)),
IntExp(1),
OpExp(
MUL,
varExp(
SimpleVar(n)),
CallExp(nfactor,
ExpList(
OpExp(
MINUS,
varExp(
SimpleVar(n)),
IntExp(1)))))),
FunctionDec()),
DecList()),
SeqExp(
ExpList(
CallExp(nfactor,
ExpList(
IntExp(10))))))
java Parse.Main ..\testcases\test22.tig
LetExp(
DecList(
TypeDec(rectype,
RecordTy(
Fieldlist(
name
string,
true,
Fieldlist(
id
int,
true,
Fieldlist())))),
DecList(
VarDec(rec1,
RecordExp(rectype,
FieldExpList(
name,
StringExp(Name),
FieldExpList(
id,
IntExp(0),
FieldExpList()))),
true),
DecList())),
SeqExp(
ExpList(
AssignExp(
FieldVar(
SimpleVar(rec1),
nam),
StringExp(asd)))))
java Parse.Main ..\testcases\test23.tig
LetExp(
DecList(
TypeDec(rectype,
RecordTy(
Fieldlist(
name
string,
true,
Fieldlist(
id
int,
true,
Fieldlist())))),
DecList(
VarDec(rec1,
RecordExp(rectype,
FieldExpList(
name,
StringExp(aname),
FieldExpList(
id,
IntExp(0),
FieldExpList()))),
true),
DecList())),
SeqExp(
ExpList(
AssignExp(
FieldVar(
SimpleVar(rec1),
name),
IntExp(3)),
ExpList(
AssignExp(
FieldVar(
SimpleVar(rec1),
id),
StringExp())))))
java Parse.Main ..\testcases\test24.tig
LetExp(
DecList(
VarDec(d,
IntExp(0),
true),
DecList()),
SeqExp(
ExpList(
varExp(
SubscriptVar(
SimpleVar(d),
IntExp(3))))))
java Parse.Main ..\testcases\test25.tig
LetExp(
DecList(
VarDec(d,
IntExp(0),
true),
DecList()),
SeqExp(
ExpList(
varExp(
FieldVar(
SimpleVar(d),
f)))))
java Parse.Main ..\testcases\test26.tig
OpExp(
PLUS,
IntExp(3),
StringExp(var))
java Parse.Main ..\testcases\test27.tig
LetExp(
DecList(
VarDec(a,
IntExp(0),
true),
DecList(
FunctionDec(g
Fieldlist(
a
int,
true,
Fieldlist()),
int
varExp(
SimpleVar(a)),
FunctionDec()),
DecList())),
SeqExp(
ExpList(
CallExp(g,
ExpList(
IntExp(2))))))
java Parse.Main ..\testcases\test28.tig
LetExp(
DecList(
TypeDec(rectype1,
RecordTy(
Fieldlist(
name
string,
true,
Fieldlist(
id
int,
true,
Fieldlist())))),
DecList(
TypeDec(rectype2,
RecordTy(
Fieldlist(
name
string,
true,
Fieldlist(
id
int,
true,
Fieldlist())))),
DecList(
VarDec(rec1,
rectype1,
RecordExp(rectype2,
FieldExpList(
name,
StringExp(Name),
FieldExpList(
id,
IntExp(0),
FieldExpList()))),
true),
DecList()))),
SeqExp(
ExpList(
varExp(
SimpleVar(rec1)))))
java Parse.Main ..\testcases\test29.tig
LetExp(
DecList(
TypeDec(arrtype1,
ArrayTy(int)),
DecList(
TypeDec(arrtype2,
ArrayTy(int)),
DecList(
VarDec(arr1,
arrtype1,
ArrayExp(arrtype2,
IntExp(10),
IntExp(0)),
true),
DecList()))),
SeqExp(
ExpList(
varExp(
SimpleVar(arr1)))))
java Parse.Main ..\testcases\test30.tig
LetExp(
DecList(
TypeDec(a,
ArrayTy(int)),
DecList(
TypeDec(b,
NameTy(a)),
DecList(
VarDec(arr1,
a,
ArrayExp(b,
IntExp(10),
IntExp(0)),
true),
DecList()))),
SeqExp(
ExpList(
varExp(
SubscriptVar(
SimpleVar(arr1),
IntExp(2))))))
java Parse.Main ..\testcases\test31.tig
LetExp(
DecList(
VarDec(a,
int,
StringExp( ),
true),
DecList()),
SeqExp(
ExpList(
varExp(
SimpleVar(a)))))
java Parse.Main ..\testcases\test32.tig
LetExp(
DecList(
TypeDec(arrayty,
ArrayTy(int)),
DecList(
VarDec(a,
ArrayExp(arrayty,
IntExp(10),
StringExp( )),
true),
DecList())),
SeqExp(
ExpList(
IntExp(0))))
java Parse.Main ..\testcases\test33.tig
LetExp(
DecList(
VarDec(a,
RecordExp(rectype,
FieldExpList()),
true),
DecList()),
SeqExp(
ExpList(
IntExp(0))))
java Parse.Main ..\testcases\test34.tig
LetExp(
DecList(
FunctionDec(g
Fieldlist(
a
int,
true,
Fieldlist(
b
string,
true,
Fieldlist())),
int
varExp(
SimpleVar(a)),
FunctionDec()),
DecList()),
SeqExp(
ExpList(
CallExp(g,
ExpList(
StringExp(one),
ExpList(
StringExp(two)))))))
java Parse.Main ..\testcases\test35.tig
LetExp(
DecList(
FunctionDec(g
Fieldlist(
a
int,
true,
Fieldlist(
b
string,
true,
Fieldlist())),
int
varExp(
SimpleVar(a)),
FunctionDec()),
DecList()),
SeqExp(
ExpList(
CallExp(g,
ExpList(
StringExp(one))))))
java Parse.Main ..\testcases\test36.tig
LetExp(
DecList(
FunctionDec(g
Fieldlist(
a
int,
true,
Fieldlist(
b
string,
true,
Fieldlist())),
int
varExp(
SimpleVar(a)),
FunctionDec()),
DecList()),
SeqExp(
ExpList(
CallExp(g,
ExpList(
IntExp(3),
ExpList(
StringExp(one),
ExpList(
IntExp(5))))))))
java Parse.Main ..\testcases\test37.tig
LetExp(
DecList(
VarDec(a,
IntExp(0),
true),
DecList(
VarDec(a,
StringExp( ),
true),
DecList())),
SeqExp(
ExpList(
IntExp(0))))
java Parse.Main ..\testcases\test38.tig
LetExp(
DecList(
TypeDec(a,
NameTy(int)),
DecList(
TypeDec(a,
NameTy(string)),
DecList())),
SeqExp(
ExpList(
IntExp(0))))
java Parse.Main ..\testcases\test39.tig
LetExp(
DecList(
FunctionDec(g
Fieldlist(
a
int,
true,
Fieldlist()),
int
varExp(
SimpleVar(a)),
FunctionDec()),
DecList(
FunctionDec(g
Fieldlist(
a
int,
true,
Fieldlist()),
int
varExp(
SimpleVar(a)),
FunctionDec()),
DecList())),
SeqExp(
ExpList(
IntExp(0))))
java Parse.Main ..\testcases\test40.tig
LetExp(
DecList(
FunctionDec(g
Fieldlist(
a
int,
true,
Fieldlist()),
varExp(
SimpleVar(a)),
FunctionDec()),
DecList()),
SeqExp(
ExpList(
CallExp(g,
ExpList(
IntExp(2))))))
java Parse.Main ..\testcases\test41.tig
LetExp(
DecList(
TypeDec(a,
NameTy(int)),
DecList()),
SeqExp(
ExpList(
LetExp(
DecList(
TypeDec(a,
NameTy(string)),
DecList()),
SeqExp(
ExpList(
IntExp(0)))))))
java Parse.Main ..\testcases\test42.tig
LetExp(
DecList(
TypeDec(arrtype1,
ArrayTy(int)),
DecList(
TypeDec(rectype1,
RecordTy(
Fieldlist(
name
string,
true,
Fieldlist(
address
string,
true,
Fieldlist(
id
int,
true,
Fieldlist(
age
int,
true,
Fieldlist())))))),
DecList(
TypeDec(arrtype2,
ArrayTy(rectype1)),
DecList(
TypeDec(rectype2,
RecordTy(
Fieldlist(
name
string,
true,
Fieldlist(
dates
arrtype1,
true,
Fieldlist())))),
DecList(
TypeDec(arrtype3,
ArrayTy(string)),
DecList(
VarDec(arr1,
ArrayExp(arrtype1,
IntExp(10),
IntExp(0)),
true),
DecList(
VarDec(arr2,
ArrayExp(arrtype2,
IntExp(5),
RecordExp(rectype1,
FieldExpList(
name,
StringExp(aname),
FieldExpList(
address,
StringExp(somewhere),
FieldExpList(
id,
IntExp(0),
FieldExpList(
age,
IntExp(0),
FieldExpList())))))),
true),
DecList(
VarDec(arr3,
arrtype3,
ArrayExp(arrtype3,
IntExp(100),
StringExp()),
true),
DecList(
VarDec(rec1,
RecordExp(rectype1,
FieldExpList(
name,
StringExp(Kapoios),
FieldExpList(
address,
StringExp(Kapou),
FieldExpList(
id,
IntExp(2432),
FieldExpList(
age,
IntExp(44),
FieldExpList()))))),
true),
DecList(
VarDec(rec2,
RecordExp(rectype2,
FieldExpList(
name,
StringExp(Allos),
FieldExpList(
dates,
ArrayExp(arrtype1,
IntExp(3),
IntExp(1900)),
FieldExpList()))),
true),
DecList())))))))))),
SeqExp(
ExpList(
AssignExp(
SubscriptVar(
SimpleVar(arr1),
IntExp(0)),
IntExp(1)),
ExpList(
AssignExp(
SubscriptVar(
SimpleVar(arr1),
IntExp(9)),
IntExp(3)),
ExpList(
AssignExp(
FieldVar(
SubscriptVar(
SimpleVar(arr2),
IntExp(3)),
name),
StringExp(kati)),
ExpList(
AssignExp(
FieldVar(
SubscriptVar(
SimpleVar(arr2),
IntExp(1)),
age),
IntExp(23)),
ExpList(
AssignExp(
SubscriptVar(
SimpleVar(arr3),
IntExp(34)),
StringExp(sfd)),
ExpList(
AssignExp(
FieldVar(
SimpleVar(rec1),
name),
StringExp(sdf)),
ExpList(
AssignExp(
SubscriptVar(
FieldVar(
SimpleVar(rec2),
dates),
IntExp(0)),
IntExp(2323)),
ExpList(
AssignExp(
SubscriptVar(
FieldVar(
SimpleVar(rec2),
dates),
IntExp(2)),
IntExp(2323))))))))))))
java Parse.Main ..\testcases\test43.tig
LetExp(
DecList(
VarDec(a,
SeqExp(
ExpList()),
true),
DecList()),
SeqExp(
ExpList(
OpExp(
PLUS,
varExp(
SimpleVar(a)),
IntExp(3)))))
java Parse.Main ..\testcases\test44.tig
LetExp(
DecList(
TypeDec(rectype,
RecordTy(
Fieldlist(
name
string,
true,
Fieldlist(
id
int,
true,
Fieldlist())))),
DecList(
VarDec(b,
rectype,
NilExp(),
true),
DecList())),
SeqExp(
ExpList(
AssignExp(
SimpleVar(b),
NilExp()))))
java Parse.Main ..\testcases\test45.tig
LetExp(
DecList(
TypeDec(rectype,
RecordTy(
Fieldlist(
name
string,
true,
Fieldlist(
id
int,
true,
Fieldlist())))),
DecList(
VarDec(a,
NilExp(),
true),
DecList())),
SeqExp(
ExpList(
varExp(
SimpleVar(a)))))
java Parse.Main ..\testcases\test46.tig
LetExp(
DecList(
TypeDec(rectype,
RecordTy(
Fieldlist(
name
string,
true,
Fieldlist(
id
int,
true,
Fieldlist())))),
DecList(
VarDec(b,
rectype,
NilExp(),
true),
DecList())),
SeqExp(
ExpList(
OpExp(
EQ,
varExp(
SimpleVar(b)),
NilExp()),
ExpList(
OpExp(
NE,
varExp(
SimpleVar(b)),
NilExp())))))
java Parse.Main ..\testcases\test47.tig
LetExp(
DecList(
TypeDec(a,
NameTy(int)),
DecList(
VarDec(b,
IntExp(4),
true),
DecList(
TypeDec(a,
NameTy(string)),
DecList()))),
SeqExp(
ExpList(
IntExp(0))))
java Parse.Main ..\testcases\test48.tig
LetExp(
DecList(
FunctionDec(g
Fieldlist(
a
int,
true,
Fieldlist()),
int
varExp(
SimpleVar(a)),
FunctionDec()),
DecList(
TypeDec(t,
NameTy(int)),
DecList(
FunctionDec(g
Fieldlist(
a
int,
true,
Fieldlist()),
int
varExp(
SimpleVar(a)),
FunctionDec()),
DecList()))),
SeqExp(
ExpList(
IntExp(0))))
java Parse.Main ..\testcases\test49.tig
..\testcases\test49.tig::5.19: Syntax error (41)