zmendes / compiler Goto Github PK
View Code? Open in Web Editor NEWCompilador desenvolvido para a matéria Lógica Computacional
Compilador desenvolvido para a matéria Lógica Computacional
zMendes/compiler
teste61: falha
input do teste:
int main()int a;
a = 1 + "a";
não recebi nada de output!(stderr e stdout estão vazios e não deveriam)
teste90: falha, não deu erro mais deveria (algo deveria ter saido no stderr)
input do teste:
int qualquer(){
int x;
x = 8;
return x;
}
/*Erro: ja foi declarada funcao com este identificador*/
int qualquer(){
int x;
x = 10;
return x;
}
int main(){
int y;
y = qualquer();
println(y);
}
teste92: falha
input do teste:
/*Ok: para eval quando encontra return*/
int qualquer(){
int x;
x = 10;
println(x);
return x;
println(x*2);
}
int main(){
int y;
y = qualquer();
}
output esperado:
10
output recebido:
10
20
zMendes/compiler
teste1: falha
input do teste:
int main(){
println(1+1);
println(21+21);
println(83-41);
}
output esperado:
2
42
42
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste2: falha
input do teste:
int main(){
println(5*5);
println(5/5);
println(0/5);
println(1/2);
println(50*50);
}
output esperado:
25
1
0
0
2500
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste3: falha
input do teste:
int main(){int x1;
x1 = 3;
int y2;
y2 = 4;
int z_final;
z_final = x1 + y2;
println(z_final);}
output esperado:
7
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste4: falha
input do teste:
int main(){
int x1;
int y2;
int z_final;
x1 = 3; /* bla bla x1 = 9999998 */
y2 = 4;
z_final = x1 + y2 *33;
println(z_final);
}
output esperado:
135
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste5: falha
input do teste:
int main(){
int x1;
int y2;
int z_final;
x1 = 3;
y2 = 4;
z_final = (x1 + y2) *33;
println(z_final);
}
output esperado:
231
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste6: falha
input do teste:
int main(){
int x1;
x1 = 3;
x1 = x1 +1;
println(x1);
}
output esperado:
4
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste7: falha
input do teste:
int main(){
int x1;
x1 = 3;
x1 = x1 +1;
println(x1);
int y1;
y1 = x1 *100;
println(y1);
}
output esperado:
4
400
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste10: falha
input do teste:
int main(){
int y2;
int x1;
int z_final;
x1 =3;
y2=4;
z_final = (x1 + y2) *33;
println(z_final);
}
output esperado:
231
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste11: falha
input do teste:
int main(){
println(42);
}
output esperado:
42
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste15: falha
input do teste:
int main(){
println(1);
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste16: falha
input do teste:
int main(){
int x_1x;
x_1x = 13;
println(x_1x);
}
output esperado:
13
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste19: falha
input do teste:
int main(){
int x1;
int y2;
int z_final;
x1 = 8;
y2 = 5;
z_final = (x1 + y2) * ---37;
println(z_final);}
output esperado:
-481
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste20: falha
input do teste:
int main(){
int x1;
int y2;
int z_final;
x1 = 8;
y2 = 5;
z_final = (x1 + y2) * ---37;;;;;
println(z_final);
}
output esperado:
-481
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste22: falha
input do teste:
int main()
{
if ((1==1) || (1==0)){
println(1);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste23: falha
input do teste:
int main()
{
int f;
f = 5;
if (f == 5){
println(f);
}
}
output esperado:
5
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste24: falha
input do teste:
int main()
{
if ((1==1) && (1==0)){
println(0);
}
else{
println(1);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste25: falha
input do teste:
int main()
{
if ((1<2) || (0>2)){
println(1);
}
else{
println(0);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste26: falha
input do teste:
int main()
{
if (! (1==0)) {
println(1);
}
else{
println(0);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste27: falha
input do teste:
int main()
{
if (! (((1>0) || (1==0)) && (0==9))){
println(1);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste28: falha
input do teste:
int main()
{
int a;
a = 0;
while (a < 3){
a = a +1;
println(a);
}
}
output esperado:
1
2
3
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste29: falha
input do teste:
int main()
{
int a;
a = 1;
while (a < 3){
a = a +1;
println(a);
}
}
output esperado:
2
3
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste30: falha
input do teste:
int main()
{
int a;
int b;
a = 0;
b = 1;
while ((a < 99999) && (b ==1)){
a = a +1;
println(a);
if (a == 5){
b = 0;
}
}
println(a);
}
output esperado:
1
2
3
4
5
5
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste33: falha
input do teste:
int main()
{
if (((1==1) || (1==1) || (1==1)) || ((1==0) && (1==0) && (1==0))){
println(1);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste34: falha
input do teste:
int main()
{
if (-5 < 4){
println(1);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste35: falha
input do teste:
int main(){
int x;
x = readln();
println(x);
}
stdin do teste:
42
output esperado:
42
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste36: falha
input do teste:
int main(){
int x;
x = readln();
x = readln();
println(x);
}
stdin do teste:
2
8
output esperado:
8
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste37: falha
input do teste:
int main(){
int x;
int y;
x = readln();
y = x*2;
println(y);
}
stdin do teste:
42
output esperado:
84
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste38: falha
input do teste:
int main(){
int x;
int y;
x = readln();
y = readln();
println(x+y);
}
stdin do teste:
5
4
output esperado:
9
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste39: falha
input do teste:
int main()
{
println(1);
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste40: falha
input do teste:
int main()
{
if (10 < 20) {
println(1);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste41: falha
input do teste:
int main()
{
if (30 < 20) {
println(0);
}
else{
println(1);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste43: falha
input do teste:
int main()
{
if (0 >1)
println(1);
println(0);
}
output esperado:
0
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste44: falha
input do teste:
int main(){
int x;
x = true;
if (x){
println(42);
}
}
output esperado:
42
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste45: falha
input do teste:
int main(){
bool x;
x = true;
if (x){
println(42);
}
}
output esperado:
42
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste46: falha
input do teste:
int main(){
if (((true) || (true) || (true)) || ((false) && (false) && (false))){
println(42);
}
}
output esperado:
42
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste47: falha
input do teste:
int main(){
bool a;
bool b;
bool c;
bool d;
bool e;
bool f;
a = true;
b = true;
c = true;
d = false;
e = true;
f = true;
if (((a) || (b) || (c)) || ((d) && (e) && (f))){
println(42);
}
}
output esperado:
42
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste48: falha
input do teste:
int main(){
int y;
y = true+1;
println(y);
}
output esperado:
2
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste49: falha
input do teste:
int main(){
bool x;
int y;
x = false+1;
y = x;
println(y);
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste50: falha
input do teste:
int main(){
if(1){
println(42);
}
}
output esperado:
42
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste51: falha
input do teste:
int main(){
if(2){
println(42);
}
}
output esperado:
42
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste52: falha
input do teste:
int main(){
if(2 || false){
println(42);
}
}
output esperado:
42
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste53: falha
input do teste:
int main(){
if(0 || false){
println(1);
}
else{
println(42);
}
}
output esperado:
42
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste54: falha
input do teste:
int main(){
if(1 || false){
println(1);
}
else{
println(42);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste55: falha
input do teste:
int main(){
string a;
a = "hello";
println(a);
}
output esperado:
hello
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste56: falha
input do teste:
int main(){
string a;
a = "hello world";
println(a);
}
output esperado:
hello world
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste58: falha
input do teste:
int main(){
string msg;
msg = "oi";
if (msg == "oi") {
println("sim");
} else {
println("nao");
}
}
output esperado:
sim
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste64: falha
input do teste:
int main(){
if (true){
println(1);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste65: falha
input do teste:
int main(){
if (true || false){
println(1);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste66: falha
input do teste:
int main(){
if (true && (1==1)){
println(1);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste67: falha
input do teste:
int main(){
if (!(false)){
println(1);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste68: falha
input do teste:
int main(){
if (true && (!(1==1))){
println(1);
}
else{
println(2);
}
}
output esperado:
2
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste69: falha
input do teste:
int main(){
string msg;
msg = "tchau";
if (msg == "oi") {
println("sim");
} else {
println("nao");
}
}
output esperado:
nao
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste70: falha
input do teste:
int main(){
bool a;
int b;
int c;
b = 789;
c = 689;
a = (b && c) + 1;
c = a;
println(c);
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste71: falha
input do teste:
int main(){
bool a;
int b;
int c;
b = 789;
c = 689;
a = (b && c) + 1;
c = a + 1;
println(c);
}
output esperado:
2
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste72: falha
input do teste:
int main(){
bool a;
int b;
int c;
b = 32;
c = 32;
a = true;
if ((b && c) == a){
println(1);
}else{
println(2);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste75: falha
input do teste:
/*Ok, pode nao ter return*/
int exibe(){
int x;
x = 5;
println(x);
}
int main(){
exibe();
}
output esperado:
5
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste76: falha
input do teste:
/*Passagem parametro*/
int exibe(int x){
println(x);
}
int main(){
exibe(8);
}
output esperado:
8
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste77: falha
input do teste:
int exibe(bool flag){
if (flag){
println(1);
}else{
println(0);
}
}
/*OK: Parametro por variavel*/
int main(){
bool f;
f = true;
exibe(f);
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste81: falha
input do teste:
/*Ok: Dois parametros*/
int exibe(int x, int y){
println(x*y);
}
int main(){
exibe(5, 3);
}
output esperado:
15
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste82: falha
input do teste:
/*Ok: Dois parametros*/
int exibe(int x, int y){
int z;
z = x*y;
println(z);
}
int main(){
exibe(5, 3);
}
output esperado:
15
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste83: falha
input do teste:
/*Ok: Tres parametros*/
int exibe(int x, int y, int z){
println(x+y+z);
}
int main(){
exibe(2, 3, 4);
}
output esperado:
9
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste85: falha
input do teste:
/*Ok: return orexp*/
int soma(int x, int y){
return x + y;
}
int main(){
int x;
x = soma(2,3);
println(x);
}
output esperado:
5
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 874, in run
result = self.parseFuncDefBlock()
File "main.py", line 558, in parseFuncDefBlock
func.children[1] = self.parseCommand()
File "main.py", line 677, in parseCommand
tree = self.parseBlock()
File "main.py", line 573, in parseBlock
head.children.append(self.parseCommand())
File "main.py", line 591, in parseCommand
tree.children[1] = self.parseOrExpression()
File "main.py", line 689, in parseOrExpression
tree = self.parseAndExpression()
File "main.py", line 702, in parseAndExpression
tree = self.parseEqualExpression()
File "main.py", line 715, in parseEqualExpression
tree = self.parseRelativeExpression()
File "main.py", line 728, in parseRelativeExpression
tree = self.parseExpression()
File "main.py", line 749, in parseExpression
tree = self.parseTerm()
File "main.py", line 771, in parseTerm
tree = self.parseFactor()
File "main.py", line 845, in parseFactor
raise ValueError("Expecting a missing ") in reference.")
ValueError: Expecting a missing ") in reference.
teste89: falha
input do teste:
int qualquer(){
int x;
x = 8;
return x;
}
int main(){
int x;
x = 3;
println(x);
int y;
y = qualquer();
println(y);
println(x);
}
output esperado:
3
8
3
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste92: falha
input do teste:
/*Ok: para eval quando encontra return*/
int qualquer(){
int x;
x = 10;
println(x);
return x;
println(x*2);
}
int main(){
int y;
y = qualquer();
}
output esperado:
10
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste93: falha
input do teste:
/*Ok*/
int soma(int x, int y)
{
int res;
res = x + y;
return res;
}
bool comparaSoma()
{
bool res;
int x;
x = 3;
res = soma(x,2) == 8;
return res;
}
int main()
{
int x;
bool z;
z = comparaSoma();
x = z;
println(x);
}
output esperado:
0
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
teste95: falha
input do teste:
int soma(int x, int y)
{
int res;
res = x + y;
return res;
}
int main()
{
int x;
soma(3,5);/*Ok fazer isso*/
x = soma(3,5);
println(x);
}
output esperado:
8
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 874, in run
result = self.parseFuncDefBlock()
File "main.py", line 558, in parseFuncDefBlock
func.children[1] = self.parseCommand()
File "main.py", line 677, in parseCommand
tree = self.parseBlock()
File "main.py", line 573, in parseBlock
head.children.append(self.parseCommand())
File "main.py", line 591, in parseCommand
tree.children[1] = self.parseOrExpression()
File "main.py", line 689, in parseOrExpression
tree = self.parseAndExpression()
File "main.py", line 702, in parseAndExpression
tree = self.parseEqualExpression()
File "main.py", line 715, in parseEqualExpression
tree = self.parseRelativeExpression()
File "main.py", line 728, in parseRelativeExpression
tree = self.parseExpression()
File "main.py", line 749, in parseExpression
tree = self.parseTerm()
File "main.py", line 771, in parseTerm
tree = self.parseFactor()
File "main.py", line 845, in parseFactor
raise ValueError("Expecting a missing ") in reference.")
ValueError: Expecting a missing ") in reference.
teste97: falha
input do teste:
int serie(int x)
{
if (x == 1) {
return x;
}else{
return x + serie(x-1);
}
}
int main()
{
int x;
x = 5;
println(serie(x));
}
output esperado:
15
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 258, in Evaluate
raise ValueError("Expecting a missing "return" statement.")
ValueError: Expecting a missing "return" statement.
zMendes/compiler
teste85: falha
input do teste:
/*Ok: return orexp*/
int soma(int x, int y){
return x + y;
}
int main(){
int x;
x = soma(2,3);
println(x);
}
output esperado:
5
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 874, in run
result = self.parseFuncDefBlock()
File "main.py", line 558, in parseFuncDefBlock
func.children[1] = self.parseCommand()
File "main.py", line 677, in parseCommand
tree = self.parseBlock()
File "main.py", line 573, in parseBlock
head.children.append(self.parseCommand())
File "main.py", line 591, in parseCommand
tree.children[1] = self.parseOrExpression()
File "main.py", line 689, in parseOrExpression
tree = self.parseAndExpression()
File "main.py", line 702, in parseAndExpression
tree = self.parseEqualExpression()
File "main.py", line 715, in parseEqualExpression
tree = self.parseRelativeExpression()
File "main.py", line 728, in parseRelativeExpression
tree = self.parseExpression()
File "main.py", line 749, in parseExpression
tree = self.parseTerm()
File "main.py", line 771, in parseTerm
tree = self.parseFactor()
File "main.py", line 845, in parseFactor
raise ValueError("Expecting a missing ") in reference.")
ValueError: Expecting a missing ") in reference.
teste95: falha
input do teste:
int soma(int x, int y)
{
int res;
res = x + y;
return res;
}
int main()
{
int x;
soma(3,5);/*Ok fazer isso*/
x = soma(3,5);
println(x);
}
output esperado:
8
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 874, in run
result = self.parseFuncDefBlock()
File "main.py", line 558, in parseFuncDefBlock
func.children[1] = self.parseCommand()
File "main.py", line 677, in parseCommand
tree = self.parseBlock()
File "main.py", line 573, in parseBlock
head.children.append(self.parseCommand())
File "main.py", line 591, in parseCommand
tree.children[1] = self.parseOrExpression()
File "main.py", line 689, in parseOrExpression
tree = self.parseAndExpression()
File "main.py", line 702, in parseAndExpression
tree = self.parseEqualExpression()
File "main.py", line 715, in parseEqualExpression
tree = self.parseRelativeExpression()
File "main.py", line 728, in parseRelativeExpression
tree = self.parseExpression()
File "main.py", line 749, in parseExpression
tree = self.parseTerm()
File "main.py", line 771, in parseTerm
tree = self.parseFactor()
File "main.py", line 845, in parseFactor
raise ValueError("Expecting a missing ") in reference.")
ValueError: Expecting a missing ") in reference.
teste97: falha
input do teste:
int serie(int x)
{
if (x == 1) {
return x;
}else{
return x + serie(x-1);
}
}
int main()
{
int x;
x = 5;
println(serie(x));
}
output esperado:
15
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 884, in
parser.run(content)
File "main.py", line 875, in run
result.Evaluate(globalSB)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 282, in Evaluate
ret = function.children[1].Evaluate(function_sb)
File "main.py", line 60, in Evaluate
child.Evaluate(sb)
File "main.py", line 208, in Evaluate
print(self.children[0].Evaluate(sb)[0])
File "main.py", line 284, in Evaluate
ret = ret.Evaluate(function_sb)
AttributeError: "NoneType" object has no attribute "Evaluate"
zMendes/compiler
teste35: falha
input do teste:
{
int x;
x = readln();
println(x);
}
stdin do teste:
42
output esperado:
42
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 696, in
parser.run(content)
File "main.py", line 688, in run
result.Evaluate()
File "main.py", line 56, in Evaluate
child.Evaluate()
File "main.py", line 75, in Evaluate
a = self.children[1].Evaluate()
File "main.py", line 204, in Evaluate
return int(input(), int)
TypeError: "type" object cannot be interpreted as an integer
teste36: falha
input do teste:
{
int x;
x = readln();
x = readln();
println(x);
}
stdin do teste:
2
8
output esperado:
8
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 696, in
parser.run(content)
File "main.py", line 688, in run
result.Evaluate()
File "main.py", line 56, in Evaluate
child.Evaluate()
File "main.py", line 75, in Evaluate
a = self.children[1].Evaluate()
File "main.py", line 204, in Evaluate
return int(input(), int)
TypeError: "type" object cannot be interpreted as an integer
teste37: falha
input do teste:
{
int x;
int y;
x = readln();
y = x*2;
println(y);
}
stdin do teste:
42
output esperado:
84
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 696, in
parser.run(content)
File "main.py", line 688, in run
result.Evaluate()
File "main.py", line 56, in Evaluate
child.Evaluate()
File "main.py", line 75, in Evaluate
a = self.children[1].Evaluate()
File "main.py", line 204, in Evaluate
return int(input(), int)
TypeError: "type" object cannot be interpreted as an integer
teste38: falha
input do teste:
{
int x;
int y;
x = readln();
y = readln();
println(x+y);
}
stdin do teste:
5
4
output esperado:
9
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 696, in
parser.run(content)
File "main.py", line 688, in run
result.Evaluate()
File "main.py", line 56, in Evaluate
child.Evaluate()
File "main.py", line 75, in Evaluate
a = self.children[1].Evaluate()
File "main.py", line 204, in Evaluate
return int(input(), int)
TypeError: "type" object cannot be interpreted as an integer
teste44: falha
input do teste:
{
int x;
x = true;
if (x){
println(42);
}
}
output esperado:
42
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 696, in
parser.run(content)
File "main.py", line 688, in run
result.Evaluate()
File "main.py", line 56, in Evaluate
child.Evaluate()
File "main.py", line 77, in Evaluate
raise ValueError("Types do not match.")
ValueError: Types do not match.
teste48: falha
input do teste:
{
int y;
y = true+1;
println(y);
}
output esperado:
2
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 696, in
parser.run(content)
File "main.py", line 688, in run
result.Evaluate()
File "main.py", line 56, in Evaluate
child.Evaluate()
File "main.py", line 77, in Evaluate
raise ValueError("Types do not match.")
ValueError: Types do not match.
teste49: falha
input do teste:
{
bool x;
int y;
x = false+1;
y = x;
println(y);
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 696, in
parser.run(content)
File "main.py", line 688, in run
result.Evaluate()
File "main.py", line 56, in Evaluate
child.Evaluate()
File "main.py", line 77, in Evaluate
raise ValueError("Types do not match.")
ValueError: Types do not match.
teste58: falha
input do teste:
{
string msg;
msg = "oi";
if (msg == "oi") {
println("sim");
} else {
println("nao");
}
}
output esperado:
sim
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 696, in
parser.run(content)
File "main.py", line 688, in run
result.Evaluate()
File "main.py", line 56, in Evaluate
child.Evaluate()
File "main.py", line 227, in Evaluate
if self.children[0].Evaluate()[0]:
File "main.py", line 84, in Evaluate
raise ValueError("Can"t resolve arithmetic operation with string.")
ValueError: Can"t resolve arithmetic operation with string.
teste60: falha, não deu erro mais deveria (algo deveria ter saido no stderr)
input do teste:
{
if("a"){
println(1);
}
}
teste69: falha
input do teste:
{
string msg;
msg = "tchau";
if (msg == "oi") {
println("sim");
} else {
println("nao");
}
}
output esperado:
nao
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 696, in
parser.run(content)
File "main.py", line 688, in run
result.Evaluate()
File "main.py", line 56, in Evaluate
child.Evaluate()
File "main.py", line 227, in Evaluate
if self.children[0].Evaluate()[0]:
File "main.py", line 84, in Evaluate
raise ValueError("Can"t resolve arithmetic operation with string.")
ValueError: Can"t resolve arithmetic operation with string.
teste70: falha
input do teste:
{
bool a;
int b;
int c;
b = 789;
c = 689;
a = (b && c) + 1;
c = a;
println(c);
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 696, in
parser.run(content)
File "main.py", line 688, in run
result.Evaluate()
File "main.py", line 56, in Evaluate
child.Evaluate()
File "main.py", line 77, in Evaluate
raise ValueError("Types do not match.")
ValueError: Types do not match.
teste71: falha
input do teste:
{
bool a;
int b;
int c;
b = 789;
c = 689;
a = (b && c) + 1;
c = a + 1;
println(c);
}
output esperado:
2
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 696, in
parser.run(content)
File "main.py", line 688, in run
result.Evaluate()
File "main.py", line 56, in Evaluate
child.Evaluate()
File "main.py", line 77, in Evaluate
raise ValueError("Types do not match.")
ValueError: Types do not match.
teste72: falha
input do teste:
{
bool a;
int b;
int c;
b = 32;
c = 32;
a = true;
if ((b && c) == a) {
println(1);
}else{
println(2);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 696, in
parser.run(content)
File "main.py", line 687, in run
result = self.parseBlock()
File "main.py", line 418, in parseBlock
head.children.append(self.parseCommand())
File "main.py", line 494, in parseCommand
tree.children[1] = self.parseCommand()
File "main.py", line 506, in parseCommand
tree = self.parseBlock()
File "main.py", line 418, in parseBlock
head.children.append(self.parseCommand())
File "main.py", line 433, in parseCommand
raise ValueError("Missing "=" in reference.")
ValueError: Missing "=" in reference.
teste5: falha, não deu erro mais deveria (algo deveria ter saido no stderr)
input do teste:
1 1
teste24: falha
input do teste:
{
if ((1==1) && (1==0)){
println(0);
}
else{
println(1);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 604, in
parser.run(content)
File "main.py", line 595, in run
result = self.parseBlock()
File "main.py", line 351, in parseBlock
head.children.append(self.parseCommand())
File "main.py", line 366, in parseCommand
raise ValueError("Missing '=' in reference.")
ValueError: Missing '=' in reference.
teste25: falha
input do teste:
{
if ((1<2) || (0>2)){
println(1);
}
else{
println(0);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 604, in
parser.run(content)
File "main.py", line 595, in run
result = self.parseBlock()
File "main.py", line 351, in parseBlock
head.children.append(self.parseCommand())
File "main.py", line 366, in parseCommand
raise ValueError("Missing '=' in reference.")
ValueError: Missing '=' in reference.
teste26: falha
input do teste:
{
if (! (1==0)) {
println(1);
}
else{
println(0);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 604, in
parser.run(content)
File "main.py", line 595, in run
result = self.parseBlock()
File "main.py", line 351, in parseBlock
head.children.append(self.parseCommand())
File "main.py", line 366, in parseCommand
raise ValueError("Missing '=' in reference.")
ValueError: Missing '=' in reference.
teste35: falha
input do teste:
{
x = readln();
println(x);
}
Timeout, teste demorou mais de 10.0 segundo para rodar, assumo que entrou em um loop infinito
teste36: falha
input do teste:
{
x = readln();
x = readln();
println(x);
}
Timeout, teste demorou mais de 10.0 segundo para rodar, assumo que entrou em um loop infinito
teste37: falha
input do teste:
{
x = readln();
y = x*2;
println(y);
}
Timeout, teste demorou mais de 10.0 segundo para rodar, assumo que entrou em um loop infinito
teste38: falha
input do teste:
{
x = readln();
y = readln();
println(x+y);
}
Timeout, teste demorou mais de 10.0 segundo para rodar, assumo que entrou em um loop infinito
teste41: falha
input do teste:
{
if (30 < 20) {
println(0);
}
else{
println(1);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 604, in
parser.run(content)
File "main.py", line 595, in run
result = self.parseBlock()
File "main.py", line 351, in parseBlock
head.children.append(self.parseCommand())
File "main.py", line 366, in parseCommand
raise ValueError("Missing '=' in reference.")
ValueError: Missing '=' in reference.
zMendes/compiler
teste3: falha
input do teste:
{int x1;
x1 = 3;
int y2;
y2 = 4;
int z_final;
z_final = x1 + y2;
println(z_final);}
output esperado:
7
output recebido:
x lskdjdj
"x1"
x lskdjdj
"x1"
y lskdjdj
"y2"
y lskdjdj
"y2"
z lskdjdj
"z_final"
z lskdjdj
"z_final"
x lskdjdj
"x1"
y lskdjdj
"y2"
z lskdjdj
"z_final"
7
teste4: falha
input do teste:
{
int x1;
int y2;
int z_final;
x1 = 3; /* bla bla x1 = 9999998 */
y2 = 4;
z_final = x1 + y2 *33;
println(z_final);
}
output esperado:
135
output recebido:
x lskdjdj
"x1"
y lskdjdj
"y2"
z lskdjdj
"z_final"
x lskdjdj
"x1"
y lskdjdj
"y2"
z lskdjdj
"z_final"
x lskdjdj
"x1"
y lskdjdj
"y2"
z lskdjdj
"z_final"
135
teste5: falha
input do teste:
{
int x1;
int y2;
int z_final;
x1 = 3;
y2 = 4;
z_final = (x1 + y2) *33;
println(z_final);
}
output esperado:
231
output recebido:
x lskdjdj
"x1"
y lskdjdj
"y2"
z lskdjdj
"z_final"
x lskdjdj
"x1"
y lskdjdj
"y2"
z lskdjdj
"z_final"
x lskdjdj
"x1"
y lskdjdj
"y2"
z lskdjdj
"z_final"
231
teste6: falha
input do teste:
{
int x1;
x1 = 3;
x1 = x1 +1;
println(x1);
}
output esperado:
4
output recebido:
x lskdjdj
"x1"
x lskdjdj
"x1"
x lskdjdj
"x1"
x lskdjdj
"x1"
x lskdjdj
"x1"
4
teste7: falha
input do teste:
{
int x1;
x1 = 3;
x1 = x1 +1;
println(x1);
int y1;
y1 = x1 *100;
println(y1);
}
output esperado:
4
400
output recebido:
x lskdjdj
"x1"
x lskdjdj
"x1"
x lskdjdj
"x1"
x lskdjdj
"x1"
x lskdjdj
"x1"
y lskdjdj
"y1"
y lskdjdj
"y1"
x lskdjdj
"x1"
y lskdjdj
"y1"
4
400
teste10: falha
input do teste:
{
int y2;
int x1;
int z_final;
x1 =3;
y2=4;
z_final = (x1 + y2) *33;
println(z_final);
}
output esperado:
231
output recebido:
y lskdjdj
"y2"
x lskdjdj
"x1"
z lskdjdj
"z_final"
x lskdjdj
"x1"
y lskdjdj
"y2"
z lskdjdj
"z_final"
x lskdjdj
"x1"
y lskdjdj
"y2"
z lskdjdj
"z_final"
231
teste16: falha
input do teste:
{
int x_1x;
x_1x = 13;
println(x_1x);
}
output esperado:
13
output recebido:
x lskdjdj
"x_1x"
x lskdjdj
"x_1x"
x lskdjdj
"x_1x"
13
teste19: falha
input do teste:
{
int x1;
int y2;
int z_final;
x1 = 8;
y2 = 5;
z_final = (x1 + y2) * ---37;
println(z_final);}
output esperado:
-481
output recebido:
x lskdjdj
"x1"
y lskdjdj
"y2"
z lskdjdj
"z_final"
x lskdjdj
"x1"
y lskdjdj
"y2"
z lskdjdj
"z_final"
x lskdjdj
"x1"
y lskdjdj
"y2"
z lskdjdj
"z_final"
-481
teste20: falha
input do teste:
{
int x1;
int y2;
int z_final;
x1 = 8;
y2 = 5;
z_final = (x1 + y2) * ---37;;;;;
println(z_final);
}
output esperado:
-481
output recebido:
x lskdjdj
"x1"
y lskdjdj
"y2"
z lskdjdj
"z_final"
x lskdjdj
"x1"
y lskdjdj
"y2"
z lskdjdj
"z_final"
x lskdjdj
"x1"
y lskdjdj
"y2"
z lskdjdj
"z_final"
-481
teste44: falha
input do teste:
{
int x;
x = true;
if (x){
println(42);
}
}
output esperado:
42
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 705, in
parser.run(content)
File "main.py", line 697, in run
result.Evaluate()
File "main.py", line 56, in Evaluate
child.Evaluate()
File "main.py", line 77, in Evaluate
raise ValueError("Types do not match.")
ValueError: Types do not match.
teste49: falha
input do teste:
{
bool x;
int y;
x = false+1;
y = x;
println(y);
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 705, in
parser.run(content)
File "main.py", line 697, in run
result.Evaluate()
File "main.py", line 56, in Evaluate
child.Evaluate()
File "main.py", line 77, in Evaluate
raise ValueError("Types do not match.")
ValueError: Types do not match.
teste58: falha
input do teste:
{
string msg;
msg = "oi";
if (msg == "oi") {
println("sim");
} else {
println("nao");
}
}
output esperado:
sim
output recebido:
m lskdjdj
"msg"
m lskdjdj
"msg"
m lskdjdj
"msg"
sim
teste69: falha
input do teste:
{
string msg;
msg = "tchau";
if (msg == "oi") {
println("sim");
} else {
println("nao");
}
}
output esperado:
nao
output recebido:
m lskdjdj
"msg"
m lskdjdj
"msg"
m lskdjdj
"msg"
nao
teste70: falha
input do teste:
{
bool a;
int b;
int c;
b = 789;
c = 689;
a = (b && c) + 1;
c = a;
println(c);
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 705, in
parser.run(content)
File "main.py", line 697, in run
result.Evaluate()
File "main.py", line 56, in Evaluate
child.Evaluate()
File "main.py", line 77, in Evaluate
raise ValueError("Types do not match.")
ValueError: Types do not match.
teste71: falha
input do teste:
{
bool a;
int b;
int c;
b = 789;
c = 689;
a = (b && c) + 1;
c = a + 1;
println(c);
}
output esperado:
2
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 705, in
parser.run(content)
File "main.py", line 697, in run
result.Evaluate()
File "main.py", line 56, in Evaluate
child.Evaluate()
File "main.py", line 77, in Evaluate
raise ValueError("Types do not match.")
ValueError: Types do not match.
teste5: falha, não deu erro mais deveria (algo deveria ter saido no stderr)
input do teste:
1 1
zMendes/compiler
teste89: falha
input do teste:
int qualquer(){
int x;
x = 8;
return x;
}
int main(){
int x;
x = 3;
println(x);
int y;
y = qualquer();
println(y);
println(x);
}
output esperado:
3
8
3
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 880, in
parser.run(content)
File "main.py", line 870, in run
result = self.parseFuncDefBlock()
File "main.py", line 553, in parseFuncDefBlock
func.children[1] = self.parseCommand()
File "main.py", line 672, in parseCommand
tree = self.parseBlock()
File "main.py", line 568, in parseBlock
head.children.append(self.parseCommand())
File "main.py", line 586, in parseCommand
tree.children[1] = self.parseOrExpression()
File "main.py", line 684, in parseOrExpression
tree = self.parseAndExpression()
File "main.py", line 697, in parseAndExpression
tree = self.parseEqualExpression()
File "main.py", line 710, in parseEqualExpression
tree = self.parseRelativeExpression()
File "main.py", line 723, in parseRelativeExpression
tree = self.parseExpression()
File "main.py", line 744, in parseExpression
tree = self.parseTerm()
File "main.py", line 766, in parseTerm
tree = self.parseFactor()
File "main.py", line 835, in parseFactor
tree.children.append(self.parseOrExpression())
File "main.py", line 684, in parseOrExpression
tree = self.parseAndExpression()
File "main.py", line 697, in parseAndExpression
tree = self.parseEqualExpression()
File "main.py", line 710, in parseEqualExpression
tree = self.parseRelativeExpression()
File "main.py", line 723, in parseRelativeExpression
tree = self.parseExpression()
File "main.py", line 744, in parseExpression
tree = self.parseTerm()
File "main.py", line 766, in parseTerm
tree = self.parseFactor()
File "main.py", line 861, in parseFactor
raise ValueError
ValueError
teste92: falha
input do teste:
/*Ok: para eval quando encontra return*/
int qualquer(){
int x;
x = 10;
println(x);
return x;
println(x*2);
}
int main(){
int y;
y = qualquer();
}
output esperado:
10
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 880, in
parser.run(content)
File "main.py", line 870, in run
result = self.parseFuncDefBlock()
File "main.py", line 553, in parseFuncDefBlock
func.children[1] = self.parseCommand()
File "main.py", line 672, in parseCommand
tree = self.parseBlock()
File "main.py", line 568, in parseBlock
head.children.append(self.parseCommand())
File "main.py", line 586, in parseCommand
tree.children[1] = self.parseOrExpression()
File "main.py", line 684, in parseOrExpression
tree = self.parseAndExpression()
File "main.py", line 697, in parseAndExpression
tree = self.parseEqualExpression()
File "main.py", line 710, in parseEqualExpression
tree = self.parseRelativeExpression()
File "main.py", line 723, in parseRelativeExpression
tree = self.parseExpression()
File "main.py", line 744, in parseExpression
tree = self.parseTerm()
File "main.py", line 766, in parseTerm
tree = self.parseFactor()
File "main.py", line 835, in parseFactor
tree.children.append(self.parseOrExpression())
File "main.py", line 684, in parseOrExpression
tree = self.parseAndExpression()
File "main.py", line 697, in parseAndExpression
tree = self.parseEqualExpression()
File "main.py", line 710, in parseEqualExpression
tree = self.parseRelativeExpression()
File "main.py", line 723, in parseRelativeExpression
tree = self.parseExpression()
File "main.py", line 744, in parseExpression
tree = self.parseTerm()
File "main.py", line 766, in parseTerm
tree = self.parseFactor()
File "main.py", line 861, in parseFactor
raise ValueError
ValueError
teste93: falha
input do teste:
/*Ok*/
int soma(int x, int y)
{
int res;
res = x + y;
return res;
}
bool comparaSoma()
{
bool res;
int x;
x = 3;
res = soma(x,2) == 8;
return res;
}
int main()
{
int x;
bool z;
z = comparaSoma();
x = z;
println(x);
}
output esperado:
0
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 880, in
parser.run(content)
File "main.py", line 870, in run
result = self.parseFuncDefBlock()
File "main.py", line 553, in parseFuncDefBlock
func.children[1] = self.parseCommand()
File "main.py", line 672, in parseCommand
tree = self.parseBlock()
File "main.py", line 568, in parseBlock
head.children.append(self.parseCommand())
File "main.py", line 586, in parseCommand
tree.children[1] = self.parseOrExpression()
File "main.py", line 684, in parseOrExpression
tree = self.parseAndExpression()
File "main.py", line 697, in parseAndExpression
tree = self.parseEqualExpression()
File "main.py", line 710, in parseEqualExpression
tree = self.parseRelativeExpression()
File "main.py", line 723, in parseRelativeExpression
tree = self.parseExpression()
File "main.py", line 744, in parseExpression
tree = self.parseTerm()
File "main.py", line 766, in parseTerm
tree = self.parseFactor()
File "main.py", line 835, in parseFactor
tree.children.append(self.parseOrExpression())
File "main.py", line 684, in parseOrExpression
tree = self.parseAndExpression()
File "main.py", line 697, in parseAndExpression
tree = self.parseEqualExpression()
File "main.py", line 710, in parseEqualExpression
tree = self.parseRelativeExpression()
File "main.py", line 723, in parseRelativeExpression
tree = self.parseExpression()
File "main.py", line 744, in parseExpression
tree = self.parseTerm()
File "main.py", line 766, in parseTerm
tree = self.parseFactor()
File "main.py", line 861, in parseFactor
raise ValueError
ValueError
teste94: falha, não deu erro mais deveria (algo deveria ter saido no stderr)
input do teste:
/*Error: tipo de retorno*/
int soma(int x, int y)
{
int res;
res = x + y;
return "somei";
}
int main()
{
string x;
x = soma(3,2);
println(x);
}
teste3: falha
input do teste:
1-1
output esperado:
0
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 276, in
print(parser.run(content).Evaluate())
File "main.py", line 265, in run
result = self.parseExpression()
File "main.py", line 254, in parseExpression
aux.children[1] = self.parseTerma()
AttributeError: 'Parser' object has no attribute 'parseTerma'
teste4: falha
input do teste:
50-150
output esperado:
-100
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 276, in
print(parser.run(content).Evaluate())
File "main.py", line 265, in run
result = self.parseExpression()
File "main.py", line 254, in parseExpression
aux.children[1] = self.parseTerma()
AttributeError: 'Parser' object has no attribute 'parseTerma'
teste9: falha
input do teste:
100 + 100 - 100+1
output esperado:
101
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 276, in
print(parser.run(content).Evaluate())
File "main.py", line 265, in run
result = self.parseExpression()
File "main.py", line 254, in parseExpression
aux.children[1] = self.parseTerma()
AttributeError: 'Parser' object has no attribute 'parseTerma'
teste10: falha
input do teste:
100 + 100 - 100+1 -101 - 900
output esperado:
-900
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 276, in
print(parser.run(content).Evaluate())
File "main.py", line 265, in run
result = self.parseExpression()
File "main.py", line 254, in parseExpression
aux.children[1] = self.parseTerma()
AttributeError: 'Parser' object has no attribute 'parseTerma'
teste23: falha
input do teste:
/* A /* 1 */ 2
output esperado:
2
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 276, in
print(parser.run(content).Evaluate())
File "main.py", line 265, in run
result = self.parseExpression()
File "main.py", line 239, in parseExpression
tree = self.parseTerm()
File "main.py", line 210, in parseTerm
tree = self.parseFactor()
File "main.py", line 201, in parseFactor
raise ValueError
ValueError
teste24: falha
input do teste:
/* A */ 1 /* A */
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 276, in
print(parser.run(content).Evaluate())
File "main.py", line 265, in run
result = self.parseExpression()
File "main.py", line 239, in parseExpression
tree = self.parseTerm()
File "main.py", line 210, in parseTerm
tree = self.parseFactor()
File "main.py", line 201, in parseFactor
raise ValueError
ValueError
teste25: falha
input do teste:
1 + /* 2 */ 3
output esperado:
4
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 276, in
print(parser.run(content).Evaluate())
File "main.py", line 265, in run
result = self.parseExpression()
File "main.py", line 247, in parseExpression
aux.children[1] = self.parseTerm()
File "main.py", line 210, in parseTerm
tree = self.parseFactor()
File "main.py", line 201, in parseFactor
raise ValueError
ValueError
teste30: falha
input do teste:
(1+/*A */1)*10
output esperado:
20
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 276, in
print(parser.run(content).Evaluate())
File "main.py", line 265, in run
result = self.parseExpression()
File "main.py", line 239, in parseExpression
tree = self.parseTerm()
File "main.py", line 210, in parseTerm
tree = self.parseFactor()
File "main.py", line 195, in parseFactor
tree = self.parseExpression()
File "main.py", line 247, in parseExpression
aux.children[1] = self.parseTerm()
File "main.py", line 210, in parseTerm
tree = self.parseFactor()
File "main.py", line 201, in parseFactor
raise ValueError
ValueError
teste42: falha
input do teste:
40--2
output esperado:
42
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 276, in
print(parser.run(content).Evaluate())
File "main.py", line 265, in run
result = self.parseExpression()
File "main.py", line 254, in parseExpression
aux.children[1] = self.parseTerma()
AttributeError: 'Parser' object has no attribute 'parseTerma'
teste43: falha
input do teste:
44---2
output esperado:
42
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 276, in
print(parser.run(content).Evaluate())
File "main.py", line 265, in run
result = self.parseExpression()
File "main.py", line 254, in parseExpression
aux.children[1] = self.parseTerma()
AttributeError: 'Parser' object has no attribute 'parseTerma'
teste24: falha
input do teste:
{
if ((1==1) && (1==0)){
println(0);
}
else{
println(1);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 604, in
parser.run(content)
File "main.py", line 595, in run
result = self.parseBlock()
File "main.py", line 351, in parseBlock
head.children.append(self.parseCommand())
File "main.py", line 366, in parseCommand
raise ValueError("Missing '=' in reference.")
ValueError: Missing '=' in reference.
teste25: falha
input do teste:
{
if ((1<2) || (0>2)){
println(1);
}
else{
println(0);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 604, in
parser.run(content)
File "main.py", line 595, in run
result = self.parseBlock()
File "main.py", line 351, in parseBlock
head.children.append(self.parseCommand())
File "main.py", line 366, in parseCommand
raise ValueError("Missing '=' in reference.")
ValueError: Missing '=' in reference.
teste26: falha
input do teste:
{
if (! (1==0)) {
println(1);
}
else{
println(0);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 604, in
parser.run(content)
File "main.py", line 595, in run
result = self.parseBlock()
File "main.py", line 351, in parseBlock
head.children.append(self.parseCommand())
File "main.py", line 366, in parseCommand
raise ValueError("Missing '=' in reference.")
ValueError: Missing '=' in reference.
teste41: falha
input do teste:
{
if (30 < 20) {
println(0);
}
else{
println(1);
}
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 604, in
parser.run(content)
File "main.py", line 595, in run
result = self.parseBlock()
File "main.py", line 351, in parseBlock
head.children.append(self.parseCommand())
File "main.py", line 366, in parseCommand
raise ValueError("Missing '=' in reference.")
ValueError: Missing '=' in reference.
Traceback (most recent call last):
File "main.py", line 705, in
with open("header.txt",'r') as header:
FileNotFoundError: [Errno 2] No such file or directory: 'header.txt'
zMendes/compiler
teste44: falha
input do teste:
{
int x;
x = true;
if (x){
println(42);
}
}
output esperado:
42
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 700, in
parser.run(content)
File "main.py", line 692, in run
result.Evaluate()
File "main.py", line 56, in Evaluate
child.Evaluate()
File "main.py", line 77, in Evaluate
raise ValueError("Types do not match.")
ValueError: Types do not match.
teste49: falha
input do teste:
{
bool x;
int y;
x = false+1;
y = x;
println(y);
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 700, in
parser.run(content)
File "main.py", line 692, in run
result.Evaluate()
File "main.py", line 56, in Evaluate
child.Evaluate()
File "main.py", line 77, in Evaluate
raise ValueError("Types do not match.")
ValueError: Types do not match.
teste70: falha
input do teste:
{
bool a;
int b;
int c;
b = 789;
c = 689;
a = (b && c) + 1;
c = a;
println(c);
}
output esperado:
1
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 700, in
parser.run(content)
File "main.py", line 692, in run
result.Evaluate()
File "main.py", line 56, in Evaluate
child.Evaluate()
File "main.py", line 77, in Evaluate
raise ValueError("Types do not match.")
ValueError: Types do not match.
teste71: falha
input do teste:
{
bool a;
int b;
int c;
b = 789;
c = 689;
a = (b && c) + 1;
c = a + 1;
println(c);
}
output esperado:
2
output recebido:
Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 700, in
parser.run(content)
File "main.py", line 692, in run
result.Evaluate()
File "main.py", line 56, in Evaluate
child.Evaluate()
File "main.py", line 77, in Evaluate
raise ValueError("Types do not match.")
ValueError: Types do not match.
teste13: falha
input do teste:
1/1
output esperado:
1
output recebido:
1.0
teste15: falha
input do teste:
3168/99
output esperado:
32
output recebido:
32.0
teste17: falha
input do teste:
2*4/2
output esperado:
4
output recebido:
4.0
teste18: falha
input do teste:
0/1
output esperado:
0
output recebido:
0.0
teste19: falha
input do teste:
8 * 9 / 2
output esperado:
36
output recebido:
36.0
teste23: falha
input do teste:
1/2
output esperado:
0
output recebido:
0.5
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.