Commit Graph
21 Commits
Author SHA1 Message Date
glm94 fcd0076891 Updated the tokenizer to use a deque object instead of a list. The old calc_engine should still work, not tested. New parser code works with this change. 2020-07-01 19:28:09 -05:00
glm94 6ba3414367 Added comments in the code to provide a little bit more insight into what's happening. 2020-04-27 11:01:27 -05:00
glm94 5a585cf6f8 Improved negative variable handling in the tokenizer. Updated the tolerance checking in the main program. 2020-04-26 19:11:01 -05:00
glm94 917b58ee87 Fixed a visual bug in the tokenizer's print_token_list function. Updated the user interface in the main program demo. 2020-04-26 18:45:36 -05:00
glm94 dcf8a50f34 Added support for negative variables in the tokenizer and ptoken object. 2020-04-26 18:17:40 -05:00
glm94 350021a42b Added a function to the Tokenizer to return a string of the tokens. 2020-04-25 22:31:11 -05:00
glm94 00bd817a99 Re-fixed an oversight in the tokenizer dealing with closed parentheses. Minor code clean up on the Calc Engine. 2020-04-24 04:00:58 -05:00
glm94 6a5de8b3e2 Fixed negative number bug in the tokenizer related to open parenthesises. 2020-04-24 02:45:12 -05:00
glm94 d93de4d3d6 Fixed a bug in the calc_engine where an expression '(a)^(b), where 'a' and 'b' are any float, would cause a crash and patched the tokenizer to better handle negative numbers. 2020-04-24 02:22:05 -05:00
glm94 4750bed929 Fixed a negative number bug in the tokenizer; started work on a new calc_engine. Mostly working as of this commit. 2020-04-23 14:12:17 -05:00
glm94 f3ed00e5f2 Added negative number support in the tokenizer. 2020-04-22 02:52:52 -05:00
glm94 53f3058194 Merged interactive code to the main program for an upcoming demo, will be reverted back after all that. 2020-04-20 02:13:01 -05:00
glm94 08bb51d68e First version with all variables calculated in a token list. 'Factor Engine' starts here. 2020-04-20 00:19:49 -05:00
glm94 58bd836ee2 Changed the token.py to ptoken.py (for Placeholder Token) to avoid naming conflicts with jsonpickle. 2020-04-18 00:31:50 -05:00
glm94 0a79cdba54 Fixed a grammar check bug in the tokenizer. 2020-04-16 14:19:59 -05:00
glm94 20e114e33d Fixed a bug in the tokenizer's 'replace_variables' method that would cause the new token list to hold references to objects in the provided token list. 2020-04-14 11:26:38 -05:00
glm94 c75905d13c Updated the tokenizer to include a method to replace variable tokens with the values provided in a list. 2020-04-13 09:10:14 -05:00
glm94 ee9ba528c6 Fixed a bug in the tokenizer to make sure it reverses the list before returning. Fixed up the calc engine, however addition/subtraction bugs still exist. 2020-04-08 15:05:34 -05:00
glm94 c42c8471c0 Finished porting the calc engine from C# to Python. 2020-04-08 12:29:26 -05:00
glm94 528098d913 Updated exceptions to be more fitting, fixed a parse bug in the tokenizer and added the start of the calc engine. 2020-04-08 00:08:20 -05:00
glm94 c760dc04b5 Ported Lahiru's tokneizer code over. Appears to work fine. Also did some house keeping. 2020-04-07 23:54:55 -05:00