summaryrefslogtreecommitdiff
path: root/src/parser.cpp (follow)
AgeCommit message (Collapse)Author
2016-12-19It actually sorta' works again!newparserMike Buland
2016-12-19Parser updates, it's having trouble with command parameters.Mike Buland
should be an easy fix.
2016-12-13Corrected negation and single value parse bugs.Mike Buland
Discovered arithmetic bug in the Number class, -4 + 5 is coming back as -1, not 1. It's getting the sign wrong somehow. I'll have to hunt that down.
2016-12-01Signals solve many problems.Mike Buland
The command structures will be changed, I think. I want the lexer to actually lex the command names into tokens, then the parser and the engine can both use them to update their state when necesarry. It will be less ambiguous and easier for both sides to stay synchronized.
2016-12-01Terrible parsing issues are behind us now.Mike Buland
At least...those issues are behind us. We'll see what happens next. Also, added some macros to make debugging easily optional.
2016-12-01Found a big problem with order of operations.Mike Buland
I believe this is because I'm using right tail recursion, but I'm not really sure how I could change it for this program. order of operations is being observed perfectly, but then operations are being performed from right to left, not left to right. I think I may be reducing too frequently, honestly.
2016-12-01Scripts are executable now!Mike Buland
The main interactive interface doesn't work, and there's a lot left to do with the unit tests, other command line options, etc. but it's pretty exciting. I also still have to figure out how commands will work. I'm thinking they'll be stored in an Expression and executed by the engine as normal.
2016-12-01Forgot assignment and negation. They both work now.Mike Buland
That was actually really cool. Now to clean up the debugging code and write the execution engine.
2016-12-01The parser works.Mike Buland
There's still more to do, however. It doesn't do math anymore, it produces a script that can then be executed. Now we have to capture that script and execute it.
2016-12-01New layout for the parser, it doesn't parse yet.Mike Buland
2016-11-30I managed to confuse myself pretty well.Mike Buland
I'm doing some reading up on LR(n) parsers, I just sort of started without thinking about it this time, not a great approach. I feel like it can't hurt to have an update on how this works anyway. I think the idea was solid, but I was trying to do too much at once. One question is what my goal should be for this. I could just solve the equation as we go, or I could generate code that will let us solve the equation. The later is obviously attractive in that it will let us run an expression more than once, and maybe even define functions. I like that.
2016-11-30Working on the parser, some issues.Mike Buland
2015-01-07Fixed parsing bug, added unit tests, debug cleanup.0.12Mike Buland
There was an issue with order of operations outside of parenthesies, easily solved.
2014-11-28Division fixes, better config, more tests.0.11Mike Buland
Other minor fixes and options such as --version being added.
2014-11-28Switched to using bin2cpp for the help.Mike Buland
I think that's a better practice, it'll be a lot easier to expand it and format it in general, plus it could be compressed if it got too much bigger.
2014-11-24Fixed an annoying parsing bug.0.10Mike Buland
2014-10-30The new division works great!Mike Buland
Other minor bug fixes including scale issues, digit() access stopped a digit before the final possible digit in the scale, >, >=, <, <= all work correctly with mixed scale numbers now, probably other fixes.
2014-09-17Issues with small decimal numbers were in toString.Mike Buland
It was bailing on very small numbers with only one decimal point of precision, which is silly. This has been fixed.
2013-11-14Fixed (?) parsing order of operations bug, added unit tests.Mike Buland
2013-11-13Added debugging to parser, and disabled debug flag.0.08Mike Buland
2013-11-13Corrected silly bug in variable assignment.Mike Buland
2013-05-22Some compilers need an extra header.Mike Buland
Should probably include that extra header.
2013-05-09Added better filtering in Number::set, and cli options.Mike Buland
The command line options let you set the initial radix/scale, and there's a function te test if any number is prime, that's fun.
2013-05-08Command parameters are taken as strings & decimal.0.06Mike Buland
You no longer need to set the radix in the current radix.
2013-04-24Fixed order of operations bug.Mike Buland
2013-04-23Now supports modulus (strange for fractions).Mike Buland
2013-04-23Variables work.Mike Buland
2013-04-22There is now a parser & calculator interface.Mike Buland