Commit Graph

  • fbef044905 Added some simple symbol handling to the Parser. glm94 2022-05-06 18:55:22 +00:00
  • fc47bf2143 Fixed up the code a bit and fixed a memory leak bug (of course, there's still no good way to free Tokens but that'll be sorted out later). glm94 2022-05-05 20:10:10 +00:00
  • 8ec0b9b216 Code cleanup. Converting a number lexeme to a proper integer setup but not done yet. So number tokens don't have a valid value. glm94 2022-05-05 16:12:33 +00:00
  • 9fa48520c7 Added support for 'labels' in the Scanner. glm94 2022-05-04 22:58:06 -05:00
  • caeaaefbf0 Fixed a bug where numbers weren't being added to the token list (I'm very dumb it seems) and added hexadecimal support to the scanner. glm94 2022-05-04 22:37:49 -05:00
  • 101f206dce Hooked up punctuation detection. glm94 2022-05-04 21:50:42 +00:00
  • 859035da2a Updated the scanner to parse registers, assembly keywords and identifiers. glm94 2022-05-04 20:07:47 +00:00
  • 2c9478d311 Attempting to declutter the lexer and tokenizer by rereolling them into the 'Scanner' object. glm94 2022-05-03 21:20:38 +00:00
  • 1900b504e7 Setup the assembler to use the new file reading code. glm94 2022-04-28 22:24:10 -05:00
  • 1968590654 Add a file utility to allow me to read in an entire file instead of doing so line by line. glm94 2022-02-23 21:15:40 +00:00
  • 1fd5c3af57 Fixed a bug with the opcode and register types not being set correctly. glm94 2022-02-22 21:09:04 -06:00
  • 19021ff782 Modified how registers and opcodes are represented. This commit is a bit buggy but doesn't crash and burn at least. I just wanted the new structs push out before making a bigger mess of things as I try to organize this all. glm94 2022-02-17 21:35:57 -06:00
  • 3d4ab57f05 Created the skeleton for the parser. glm94 2022-02-07 15:33:58 +00:00
  • 7c6e5e1541 Last bit of clean up before building the parser. glm94 2022-02-02 20:43:25 +00:00
  • d39e37b078 Updated the lexer to pick out some more language specific grammar. glm94 2022-02-02 19:18:27 +00:00
  • 7a88d6e34d Added code to detect assembler directives and did some minor code clean up. glm94 2022-02-01 22:07:00 -06:00
  • ebc1d30c1c Added a peek function to the tokenizer. glm94 2022-01-31 22:06:52 +00:00
  • f88cfda90a Added a dedicated function to the tokenizer for getting string literals. glm94 2022-01-31 19:15:27 +00:00
  • 375fd46045 Split up some code to more in line with what its actually doing. glm94 2022-01-27 18:20:09 +00:00
  • f88613a160 Expanded the tokenizer to recognize some opcodes and registers. glm94 2022-01-24 17:09:02 +00:00
  • 2570c5cac0 Made some chanegs to the tokenizer to understand hexadecimal formatted numbers, along with some more language grammar primitives. glm94 2022-01-23 21:54:06 -06:00
  • 019a7f44a8 Cleaned up the tokenizer and setting the stage for more granular token types. glm94 2022-01-21 21:17:37 +00:00
  • 0636315166 Starting to get a basic structure for tokenizing. Currently TK_Number tokens are being generated successfully. glm94 2022-01-21 19:35:32 +00:00
  • 72f6ec12e0 Tokenizing now strips the double quotes from strings, leaving only the intended value. glm94 2022-01-20 22:10:48 +00:00
  • b32e1bad7c Fixed some bugs in the string tokenizer. glm94 2022-01-20 21:21:18 +00:00
  • 23d4bd8089 Included a check for commas in the whitespace splitter. Might rename that function but this is all just testing before refactoring so I won't rename things just yet. glm94 2022-01-20 19:48:24 +00:00
  • 99ebd82996 Experimenting with tokenizing strings. This commit just focuses on splitting strings up by whitespace. glm94 2022-01-20 18:17:58 +00:00
  • 479dc57ea8 Code cleanup in the List code. Possibly saved myself some headache in the future by using the right pointer type in the struct definition. glm94 2022-01-18 16:28:49 +00:00
  • 929f2a7f4b Made the List generic, though more care needs to be taken when using it since memory leaks can happen when structs are used with it. glm94 2022-01-17 17:21:40 +00:00
  • 2c18b593ab Expanded the assembly test code partially, and added some ideas on how to encode instructions. glm94 2022-01-07 21:37:32 +00:00
  • 8656ba7d0c Fixed a bug where the last character of a line would be lost when generating a list of string tokens. glm94 2022-01-05 22:51:56 +00:00
  • 0b46ac2f54 Added some error handling in the List functions. Just trying to get a feel for how to handle memory allocation failures in C. glm94 2022-01-05 16:51:26 +00:00
  • 2d3b6f1858 Changed the signatures of some of the List functions to have the 'const' contract. I feel this makes more sense to have since these functions are to not modify all or some of their parameters. Plus it just feels right to have them defined this way. glm94 2022-01-05 16:02:06 +00:00
  • 08acc6af22 First stage of splitting up a source line complete. Next is tokenizing the list of string being generated. glm94 2021-12-30 15:21:09 -06:00
  • 4be3a4a7ea Changed the 'AddListItem' function to make a copy of the char array that its sent to make the caller's life a bit easier. glm94 2021-12-30 14:56:36 -06:00
  • 168d8e1548 Created a list structure for strings. Should work for splitting lines of text up just before they're tokenized. glm94 2021-12-30 14:28:02 -06:00
  • 9c6b1d9057 Added very simple parsing logic. glm94 2021-12-28 20:48:09 +00:00
  • 5162804270 Initial commit, can read from a list of files passed. glm94 2021-12-28 20:09:33 +00:00