Commit 4b3282c5 authored by Wilke Pierre's avatar Wilke Pierre
Browse files

Mise à jour des tests funcall.

parent a51088ad
int main(int argc,char* argv[]){
main(){
return f(8,3);
}
int f(int a,int b){
f(a, b){
return a + 2 * b;
}
{"output": "", "error": null, "retval": 14}
\ No newline at end of file
{"output": "", "error": null, "retval": 14}
\ No newline at end of file
SYM_IDENTIFIER(main)
SYM_LPARENTHESIS
SYM_RPARENTHESIS
SYM_LBRACE
SYM_RETURN
SYM_IDENTIFIER(f)
SYM_LPARENTHESIS
SYM_INTEGER(8)
SYM_COMMA
SYM_INTEGER(3)
SYM_RPARENTHESIS
SYM_SEMICOLON
SYM_RBRACE
SYM_IDENTIFIER(f)
SYM_LPARENTHESIS
SYM_IDENTIFIER(a)
SYM_COMMA
SYM_IDENTIFIER(b)
SYM_RPARENTHESIS
SYM_LBRACE
SYM_RETURN
SYM_IDENTIFIER(a)
SYM_PLUS
SYM_INTEGER(2)
SYM_ASTERISK
SYM_IDENTIFIER(b)
SYM_SEMICOLON
SYM_RBRACE
SYM_EOF
int main(int argc,char* argv[]){
int x = atoi(argv[1]);
int y = atoi(argv[2]);
main(x, y){
return f(x,x,y,y,x*2);
}
int f(int x,int y,int z,int t,int u){
f(x, y, z, t, u){
return x + y + z + t + u;
}
{"output": "", "error": null, "retval": 80}
\ No newline at end of file
{"output": "", "error": null, "retval": 8}
\ No newline at end of file
SYM_IDENTIFIER(main)
SYM_LPARENTHESIS
SYM_IDENTIFIER(x)
SYM_COMMA
SYM_IDENTIFIER(y)
SYM_RPARENTHESIS
SYM_LBRACE
SYM_RETURN
SYM_IDENTIFIER(f)
SYM_LPARENTHESIS
SYM_IDENTIFIER(x)
SYM_COMMA
SYM_IDENTIFIER(x)
SYM_COMMA
SYM_IDENTIFIER(y)
SYM_COMMA
SYM_IDENTIFIER(y)
SYM_COMMA
SYM_IDENTIFIER(x)
SYM_ASTERISK
SYM_INTEGER(2)
SYM_RPARENTHESIS
SYM_SEMICOLON
SYM_RBRACE
SYM_IDENTIFIER(f)
SYM_LPARENTHESIS
SYM_IDENTIFIER(x)
SYM_COMMA
SYM_IDENTIFIER(y)
SYM_COMMA
SYM_IDENTIFIER(z)
SYM_COMMA
SYM_IDENTIFIER(t)
SYM_COMMA
SYM_IDENTIFIER(u)
SYM_RPARENTHESIS
SYM_LBRACE
SYM_RETURN
SYM_IDENTIFIER(x)
SYM_PLUS
SYM_IDENTIFIER(y)
SYM_PLUS
SYM_IDENTIFIER(z)
SYM_PLUS
SYM_IDENTIFIER(t)
SYM_PLUS
SYM_IDENTIFIER(u)
SYM_SEMICOLON
SYM_RBRACE
SYM_EOF
int g(int a, int b){
g(a,b){
print(a);
print(b);
return (b - a);
}
int f(int a, int b){
f(a,b){
print(a);
print(b);
return g(b, a);
}
int main(int argc, char* argv[]){
return f(atoi(argv[1]),
atoi(argv[2]));
main(x, y){
return f(x, y);
}
{"output": "14\n12\n12\n14\n", "error": null, "retval": 2}
\ No newline at end of file
{"output": "1\n2\n2\n1\n", "error": null, "retval": -1}
\ No newline at end of file
SYM_IDENTIFIER(g)
SYM_LPARENTHESIS
SYM_IDENTIFIER(a)
SYM_COMMA
SYM_IDENTIFIER(b)
SYM_RPARENTHESIS
SYM_LBRACE
SYM_IDENTIFIER(print)
SYM_LPARENTHESIS
SYM_IDENTIFIER(a)
SYM_RPARENTHESIS
SYM_SEMICOLON
SYM_IDENTIFIER(print)
SYM_LPARENTHESIS
SYM_IDENTIFIER(b)
SYM_RPARENTHESIS
SYM_SEMICOLON
SYM_RETURN
SYM_LPARENTHESIS
SYM_IDENTIFIER(b)
SYM_MINUS
SYM_IDENTIFIER(a)
SYM_RPARENTHESIS
SYM_SEMICOLON
SYM_RBRACE
SYM_IDENTIFIER(f)
SYM_LPARENTHESIS
SYM_IDENTIFIER(a)
SYM_COMMA
SYM_IDENTIFIER(b)
SYM_RPARENTHESIS
SYM_LBRACE
SYM_IDENTIFIER(print)
SYM_LPARENTHESIS
SYM_IDENTIFIER(a)
SYM_RPARENTHESIS
SYM_SEMICOLON
SYM_IDENTIFIER(print)
SYM_LPARENTHESIS
SYM_IDENTIFIER(b)
SYM_RPARENTHESIS
SYM_SEMICOLON
SYM_RETURN
SYM_IDENTIFIER(g)
SYM_LPARENTHESIS
SYM_IDENTIFIER(b)
SYM_COMMA
SYM_IDENTIFIER(a)
SYM_RPARENTHESIS
SYM_SEMICOLON
SYM_RBRACE
SYM_IDENTIFIER(main)
SYM_LPARENTHESIS
SYM_IDENTIFIER(x)
SYM_COMMA
SYM_IDENTIFIER(y)
SYM_RPARENTHESIS
SYM_LBRACE
SYM_RETURN
SYM_IDENTIFIER(f)
SYM_LPARENTHESIS
SYM_IDENTIFIER(x)
SYM_COMMA
SYM_IDENTIFIER(y)
SYM_RPARENTHESIS
SYM_SEMICOLON
SYM_RBRACE
SYM_EOF
int f(int a,
int b,
int c,
int d,
int e,
int f,
int g,
int h,
int i,
int j,
int k,
int l,
int m,
int n,
int o,
int p,
int q,
int r,
int s,
int t
){
f(a,
b,
c,
d,
e,
f,
g,
h,
i,
j,
k,
l,
m,
n,
o,
p,
q,
r,
s,
t
){
return (k * (a + b * c + d * e * f + g * h * i * j) + (l + m * n) * o + p * q) * (r + s * t);
}
int main(int argc, char* argv[]){
main(){
return f(1,2,3,4,5,6,7,8,9,10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20);
}
{"output": "", "error": null, "retval": 23887562}
\ No newline at end of file
{"output": "", "error": null, "retval": 23887562}
\ No newline at end of file
SYM_IDENTIFIER(f)
SYM_LPARENTHESIS
SYM_IDENTIFIER(a)
SYM_COMMA
SYM_IDENTIFIER(b)
SYM_COMMA
SYM_IDENTIFIER(c)
SYM_COMMA
SYM_IDENTIFIER(d)
SYM_COMMA
SYM_IDENTIFIER(e)
SYM_COMMA
SYM_IDENTIFIER(f)
SYM_COMMA
SYM_IDENTIFIER(g)
SYM_COMMA
SYM_IDENTIFIER(h)
SYM_COMMA
SYM_IDENTIFIER(i)
SYM_COMMA
SYM_IDENTIFIER(j)
SYM_COMMA
SYM_IDENTIFIER(k)
SYM_COMMA
SYM_IDENTIFIER(l)
SYM_COMMA
SYM_IDENTIFIER(m)
SYM_COMMA
SYM_IDENTIFIER(n)
SYM_COMMA
SYM_IDENTIFIER(o)
SYM_COMMA
SYM_IDENTIFIER(p)
SYM_COMMA
SYM_IDENTIFIER(q)
SYM_COMMA
SYM_IDENTIFIER(r)
SYM_COMMA
SYM_IDENTIFIER(s)
SYM_COMMA
SYM_IDENTIFIER(t)
SYM_RPARENTHESIS
SYM_LBRACE
SYM_RETURN
SYM_LPARENTHESIS
SYM_IDENTIFIER(k)
SYM_ASTERISK
SYM_LPARENTHESIS
SYM_IDENTIFIER(a)
SYM_PLUS
SYM_IDENTIFIER(b)
SYM_ASTERISK
SYM_IDENTIFIER(c)
SYM_PLUS
SYM_IDENTIFIER(d)
SYM_ASTERISK
SYM_IDENTIFIER(e)
SYM_ASTERISK
SYM_IDENTIFIER(f)
SYM_PLUS
SYM_IDENTIFIER(g)
SYM_ASTERISK
SYM_IDENTIFIER(h)
SYM_ASTERISK
SYM_IDENTIFIER(i)
SYM_ASTERISK
SYM_IDENTIFIER(j)
SYM_RPARENTHESIS
SYM_PLUS
SYM_LPARENTHESIS
SYM_IDENTIFIER(l)
SYM_PLUS
SYM_IDENTIFIER(m)
SYM_ASTERISK
SYM_IDENTIFIER(n)
SYM_RPARENTHESIS
SYM_ASTERISK
SYM_IDENTIFIER(o)
SYM_PLUS
SYM_IDENTIFIER(p)
SYM_ASTERISK
SYM_IDENTIFIER(q)
SYM_RPARENTHESIS
SYM_ASTERISK
SYM_LPARENTHESIS
SYM_IDENTIFIER(r)
SYM_PLUS
SYM_IDENTIFIER(s)
SYM_ASTERISK
SYM_IDENTIFIER(t)
SYM_RPARENTHESIS
SYM_SEMICOLON
SYM_RBRACE
SYM_IDENTIFIER(main)
SYM_LPARENTHESIS
SYM_RPARENTHESIS
SYM_LBRACE
SYM_RETURN
SYM_IDENTIFIER(f)
SYM_LPARENTHESIS
SYM_INTEGER(1)
SYM_COMMA
SYM_INTEGER(2)
SYM_COMMA
SYM_INTEGER(3)
SYM_COMMA
SYM_INTEGER(4)
SYM_COMMA
SYM_INTEGER(5)
SYM_COMMA
SYM_INTEGER(6)
SYM_COMMA
SYM_INTEGER(7)
SYM_COMMA
SYM_INTEGER(8)
SYM_COMMA
SYM_INTEGER(9)
SYM_COMMA
SYM_INTEGER(10)
SYM_COMMA
SYM_INTEGER(11)
SYM_COMMA
SYM_INTEGER(12)
SYM_COMMA
SYM_INTEGER(13)
SYM_COMMA
SYM_INTEGER(14)
SYM_COMMA
SYM_INTEGER(15)
SYM_COMMA
SYM_INTEGER(16)
SYM_COMMA
SYM_INTEGER(17)
SYM_COMMA
SYM_INTEGER(18)
SYM_COMMA
SYM_INTEGER(19)
SYM_COMMA
SYM_INTEGER(20)
SYM_RPARENTHESIS
SYM_SEMICOLON
SYM_RBRACE
SYM_EOF
int f(int x){
f(x){
return x + 2;
}
int g(int y){
g(y){
return y * 3;
}
int main(int argc,char* argv[]){
main(){
return f(8) + g(5);
}
{"output": "", "error": null, "retval": 25}
\ No newline at end of file
{"output": "", "error": null, "retval": 25}
\ No newline at end of file
SYM_IDENTIFIER(f)
SYM_LPARENTHESIS
SYM_IDENTIFIER(x)
SYM_RPARENTHESIS
SYM_LBRACE
SYM_RETURN
SYM_IDENTIFIER(x)
SYM_PLUS
SYM_INTEGER(2)
SYM_SEMICOLON
SYM_RBRACE
SYM_IDENTIFIER(g)
SYM_LPARENTHESIS
SYM_IDENTIFIER(y)
SYM_RPARENTHESIS
SYM_LBRACE
SYM_RETURN
SYM_IDENTIFIER(y)
SYM_ASTERISK
SYM_INTEGER(3)
SYM_SEMICOLON
SYM_RBRACE
SYM_IDENTIFIER(main)
SYM_LPARENTHESIS
SYM_RPARENTHESIS
SYM_LBRACE
SYM_RETURN
SYM_IDENTIFIER(f)
SYM_LPARENTHESIS
SYM_INTEGER(8)
SYM_RPARENTHESIS
SYM_PLUS
SYM_IDENTIFIER(g)
SYM_LPARENTHESIS
SYM_INTEGER(5)
SYM_RPARENTHESIS
SYM_SEMICOLON
SYM_RBRACE
SYM_EOF
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment