Commit Graph
14 Commits
Author SHA1 Message Date
glm94 c95d739e16 Updated the parser to handle treating variables as expressions. Updated the symbols table to handle computing the values of variables. 2023-09-07 21:29:58 -05:00
glm94 9e178ca3da Build a quick draft of how the symbol value should be computed. 2023-08-25 01:27:22 -05:00
glm94 82b2136a69 Started to work on setting up Symbol value resolution which will be based on an abstract syntax tree that can handle undefined values if unknown symbols are used in an expression. 2023-08-25 00:21:19 -05:00
glm94 4af2527806 Updated the structure of symbols and tokens to hopefully help make computing symbol values easier. 2023-08-07 01:18:01 -05:00
glm94 65383cded2 Updated the way symbols are represented and how they are marked as resolved. 2023-07-09 22:04:55 -05:00
glm94 9c8fe17c8f Minor code cleanup and added an extra flag to the compiler. If a symbol is a label it will now hold a reference to the opcode and by extension the offset into the file it points to. 2023-07-06 19:39:03 -05:00
glm94 5e9e1bdec4 Massive refactoring to simplify this whole setup. The Token List will be modified in place and reused in the Parser to normalize the list and generate a symbols table. Normalizing the token list will make sure the syntax is valid and the symbols table will have the relative offsets and length of symbol values. At least this is all the plan but one step at a time. 2023-03-06 21:51:36 -06:00
glm94 48a77950be Updated the way string symbols are handled, allowing the programmer to terminate a string with any byte or none at all. 2022-10-08 16:35:05 -05:00
glm94 c142d2c6d0 Cleaned up the Symbol struct and updated code accordingly. 2022-10-08 14:43:00 -05:00
glm94 bdb4d2b241 Updated the way Instructions keep track of symbols. Only their name is important but we need the Symbols to be able to track which Instruction they point to (if they do that is, i.e. a label symbol). 2022-10-06 21:11:22 -05:00
glm94 f7cd87f13f Started reworking the Parser to simplify how instructions will be represented. It will act like a 'first pass' that will do grammar checks but not verify the parameters of the opcodes. 2022-10-02 22:54:18 -05:00
glm94 0b58e0124f Some refactoring to update everything to use the new structures and some new considerations for how Symbols and Instructions shoudl be represented. 2022-09-15 22:14:38 -05:00
glm94 2ae60a607c Incomplete, but I want to make sure the ideas I have here don't get wiped. Sadly this commit won't compile. 2022-09-15 21:29:27 +00:00
glm94 6d17dffcdf Added a SymbolTable object (untested at the moment) and redefined the Symbol object. I think when a Symbol is made only the size of it should matter to the code that will assemble the final binary. 2022-09-08 20:56:02 +00:00