Skip to content

Commit

Permalink
Compiler Finished V1
Browse files Browse the repository at this point in the history
  • Loading branch information
FdezAriasSara committed Jun 17, 2023
1 parent 7276f22 commit 4c4faef
Show file tree
Hide file tree
Showing 27 changed files with 819 additions and 455 deletions.
9 changes: 9 additions & 0 deletions .idea/libraries/introspector_1_2.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

251 changes: 77 additions & 174 deletions AST.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Metalenguajes/GramaticaAbstracta.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ Cast:expression -> type expression;
ArrayAccess:expression -> array:expression position:expression;
StructFieldAccess:expression -> struct:expression field:string;
VariableReference:expression -> name:string;
LiteralInt:expression -> value:string;
LiteralFloat:expression -> value:string;
LiteralChar:expression -> value:string;
LiteralInt:expression -> value:int;
LiteralFloat:expression -> value:double;
LiteralChar:expression -> value:character;
6 changes: 3 additions & 3 deletions Tests/CodeSelection/Test 1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ main() {
local = 2;

if (global < 2.0) {
print 1;
println 1;
} else {
print local;
println local;
}

print doble(2);
println doble(2);
}
8 changes: 4 additions & 4 deletions Tests/CodeSelection/Test 2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ busca(i:int) {
if (i < 0 || i >= 4) {
return;
}
print empresa[i].inicial;
print empresa[i].sueldo;
printsp empresa[i].inicial;
println empresa[i].sueldo;
}

imprime():int {
Expand All @@ -59,8 +59,8 @@ imprime():int {
aux.inicial = empresa[i].inicial;
aux.sueldo = empresa[i].sueldo;

print aux.inicial;
print aux.sueldo;
printsp aux.inicial;
println aux.sueldo;

i = i + 1;
}
Expand Down
4 changes: 2 additions & 2 deletions Tests/CodeSelection/Test 3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ imprimeElMejor() {
i = i + 1;
}

print F1[mejorPiloto].inicial;
println F1[mejorPiloto].inicial;
i = 0;
while (i < 3) {
print F1[mejorPiloto].crono[i];
println F1[mejorPiloto].crono[i];
i = i + 1;
}
}
Expand Down
Empty file.
Loading

0 comments on commit 4c4faef

Please sign in to comment.