Tristan B. Kildaire
2d46eb4458
Removed unused (old) type
2021-11-02 13:58:36 +02:00
Tristan B. Velloza Kildaire
3dba481260
Refactored code emitter sub-system
2021-11-02 10:41:03 +02:00
Tristan B. Velloza Kildaire
3d79531978
Removed emitter code from data.d
2021-11-02 10:38:09 +02:00
Tristan B. Kildaire
ad5e26602f
Removed unused method
2021-11-02 09:43:02 +02:00
Tristan B. Kildaire
7a78a4e5b1
Removed old cruft
2021-11-02 09:42:50 +02:00
Tristan B. Kildaire
12087b8fdf
Removed old VTReeNode commented-out code
2021-11-02 09:42:21 +02:00
Tristan B. Kildaire
60b97f90aa
Removed unused commented code
2021-11-02 09:41:30 +02:00
Tristan B. Kildaire
9987c46497
Re-enabled a unit test for the type checker
2021-11-02 09:36:15 +02:00
Tristan B. Kildaire
1731ae3299
Re-enabled a unit test for the type checker
2021-11-02 09:35:48 +02:00
Tristan B. Kildaire
c8ccc71244
Re-enabled a unit test for the type checker
2021-11-02 09:35:27 +02:00
Tristan B. Kildaire
bbd34a951a
Re-enabled unit test for type checker
2021-11-02 09:34:57 +02:00
Tristan B. Kildaire
36f073fbff
Re-enabled two unit tests for the type checker
2021-11-02 09:34:40 +02:00
Tristan B. Kildaire
71be300582
Disabled a lot of old typechecking code that we either don't need or I am not working with right now
2021-11-02 09:32:52 +02:00
Tristan B. Velloza Kildaire
cf03601eec
Removed unused field
2021-11-01 18:28:19 +02:00
Tristan B. Velloza Kildaire
8fed8fa4fb
Removed unused methods for Statement
2021-11-01 18:25:53 +02:00
Tristan B. Velloza Kildaire
396ccdbc60
Moved token I/O statements toghether
2021-11-01 18:25:43 +02:00
Tristan B. Velloza Kildaire
7f29828081
Added negative test case
2021-10-27 21:30:22 +02:00
Tristan B. Velloza Kildaire
0081277fb1
Cleaned up typechecking (codegen)
2021-10-27 21:12:00 +02:00
Tristan B. Velloza Kildaire
bbf174b757
Added weighting such that `getStatements()` can be ordered more easily. Many weights are still missing but the things I am testing with now are atleast here.
...
Added check for standalone variable assignments to error (crash) the compiler when the variable has not yet been declared.
I still need to clean up the codegen and add back in typechecking, the thing has become weird with many weird function calls, but I can do it in one function call to be honest (and that makes most sense)
Standalone variable assignments are now in the dependency tree and therefore make it into the typechecking/codegen phase (of which code to handle them has also been added)
2021-10-27 20:57:30 +02:00
Tristan B. Velloza Kildaire
47375cbec4
Beginning to work on weighting system
2021-10-27 15:52:43 +02:00
Tristan B. Velloza Kildaire
0bceb16373
Added toString for VariableAssignment
2021-10-27 15:33:24 +02:00
Tristan B. Velloza Kildaire
a14f2a682d
Added `getCodeQueue()` which will be used when code generation is complete (after typechecking) and we can then emit code from it
2021-10-27 09:51:13 +02:00
Tristan B. Velloza Kildaire
7ffbd6f50e
Corrected instruction counter for printCodeQueue()
2021-10-27 09:25:11 +02:00
Tristan B. Velloza Kildaire
9613fcf81d
Set the Operator type
2021-10-26 22:03:48 +02:00
Tristan B. Velloza Kildaire
975acc05a2
Added the following new SymbolTypes
...
SymbolType.ADD, SymbolType.MINUS, SymbolType.DIVIDE, SymbolType.STAR
2021-10-26 21:35:39 +02:00
Tristan B. Velloza Kildaire
fcfde58b98
Fixed order of execution for AddInstr construction
2021-10-26 21:15:26 +02:00
Tristan B. Velloza Kildaire
5b70175de4
Added note TODO
2021-10-26 21:04:47 +02:00
Tristan B. Velloza Kildaire
6ac0f5fed7
AddInstr now shows both toString()'s of its LHS Value Instruction and its RHS Value Instruction
2021-10-26 20:58:42 +02:00
Tristan B. Velloza Kildaire
2b29a18328
FetchValueVar now shows information (in its toString) about what variable is being fetched and the length of it to read
2021-10-26 20:44:10 +02:00
Tristan B. Velloza Kildaire
86ee064af5
VariableAssignmentInstr now prints out the nested Instruction for obtaining its value of which will be assigned to the variable it specifies
2021-10-26 20:36:39 +02:00
Tristan B. Velloza Kildaire
569e53f803
This seems to work
2021-10-26 20:32:47 +02:00
Tristan B. Velloza Kildaire
129860fc37
WIP
2021-10-26 17:17:53 +02:00
Tristan B. Velloza Kildaire
b9adbc6663
Yo, so I think I got this down
2021-10-25 22:31:07 +02:00
Tristan B. Velloza Kildaire
8bf3270de7
NumberLiteral now has its own custom toString
2021-10-25 20:49:58 +02:00
Tristan B. Velloza Kildaire
a58c90d6cb
Added some ideas for typechecking the action-list and then furthermore emitting code from it
2021-10-25 17:03:36 +02:00
Tristan B. Velloza Kildaire
ceac4f0eaa
Print out action-list items in initialization order
2021-10-25 16:55:43 +02:00
Tristan B. Velloza Kildaire
8833a14da9
Generate linearized action-list for code generation (and type-checking)
2021-10-25 16:54:06 +02:00
Tristan B. Velloza Kildaire
d4ec91dc94
Added TODO to make the graph acyclic and THEN print it
2021-08-15 22:33:22 +02:00
Tristan B. Velloza Kildaire
0cd1812fa6
Removed comment
2021-08-15 22:23:31 +02:00
Tristan B. Velloza Kildaire
6e7bb365ed
The generation of the tree is now called externally along with printing of the acyclic tree
2021-08-15 22:23:17 +02:00
Tristan B. Kildaire
6ceff9e54a
Removed comment as it no longer applies (I have a working method for what I want to do already, just using visitations :))
2021-08-12 15:45:42 +02:00
Tristan B. Kildaire
19119bbff6
Removed uneeded variables
2021-08-12 15:42:39 +02:00
Tristan B. Kildaire
2606764f84
Updated ExpressionDNode (dependency node) to use the Expression's toString to make indicating the TYPE of Expressionit contains
2021-08-12 15:42:22 +02:00
Tristan B. Kildaire
67b9fd1504
Added override for VariableExpression's toString method
2021-08-12 15:41:56 +02:00
Tristan B. Kildaire
1fb2b05826
Confirmed more intricate ones work
2021-08-12 15:32:09 +02:00
Tristan B. Kildaire
b264ad2371
Fixed cast, which caused segfault later
2021-08-12 15:26:26 +02:00
Tristan B. Kildaire
7729ae6f94
Or not
2021-08-12 15:23:05 +02:00
Tristan B. Kildaire
f71ad99b9c
Seems to work
2021-08-12 15:22:50 +02:00
Tristan B. Kildaire
0cfcf2a5e6
Pretty sure that needs to be there
2021-08-12 15:21:59 +02:00
Tristan B. Kildaire
51b62fe89f
Made error message specific such that whena variable is refercned that EXISTS but has not yet been declared and we can tell the clear difference between that and an entity completely not existing in the program (regardless of declaration order)
2021-08-12 15:18:52 +02:00