The current error to fix: division returns the last number, and doesn't divide by it (e.g. 6/3/2 returns 2 instead of 1)
This commit is contained in:
parent
92a2235437
commit
72023962f5
3 changed files with 5 additions and 2 deletions
|
|
@ -112,12 +112,12 @@ namespace Compiler
|
||||||
{
|
{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
string file = "/home/clemens/repositorys/lcc/stage_3/valid/precedence_add_a_lot.c";
|
string file = "/home/clemens/repositorys/lcc/stage_3/valid/div_2.c";
|
||||||
|
|
||||||
Console.WriteLine("-------------");
|
Console.WriteLine("-------------");
|
||||||
List<Token> tokens = TestLexer(file, 0);
|
List<Token> tokens = TestLexer(file, 0);
|
||||||
Node programNode = TestParser(tokens, file, 1);
|
Node programNode = TestParser(tokens, file, 1);
|
||||||
//TestGenerator(programNode, 1);
|
TestGenerator(programNode, 1);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
BIN
stage_3/valid/div_2
Executable file
BIN
stage_3/valid/div_2
Executable file
Binary file not shown.
3
stage_3/valid/div_2.c
Normal file
3
stage_3/valid/div_2.c
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
int main(){
|
||||||
|
return 10 / 1 / 2 / 5;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue