Commit Graph

  • 30176c7b49 Fix unary evaluation for cases like: a+(-b) Vinícius Garcia 2016-07-09 13:15:40 -03:00
  • f24fe12737 Fix catch statement on calculator::calculate Vinícius Garcia 2016-07-09 13:11:56 -03:00
  • 7b7e541d43 Add builtin function support Vinícius Garcia 2016-07-09 13:04:47 -03:00
  • 1ee61ce997 Add asign function to Scope Vinícius Garcia 2016-07-08 22:16:55 -03:00
  • b47ec33d95 Move catch main to separated file so tests compile a lot faster Vinícius Garcia 2016-07-08 20:41:37 -03:00
  • 2d437c3b28 Change return type of Scope::find() to packToken* Vinícius Garcia 2016-07-08 20:24:39 -03:00
  • 5a7ccd20ed Remove internal scope attribute from calculator Vinícius Garcia 2016-07-06 18:19:57 -03:00
  • fc18d4bd22 Update example in README. Brandon Amos 2016-06-27 16:22:28 -04:00
  • 4a67af72b8 Formatting. Brandon Amos 2016-06-27 15:17:39 -04:00
  • d0a35c81f3 Formatting. Brandon Amos 2016-06-27 15:15:53 -04:00
  • 922dc7f10f Remove future work from README. Brandon Amos 2016-06-27 15:13:15 -04:00
  • 501a83b129 Correct link. Brandon Amos 2016-06-27 15:12:05 -04:00
  • 8c214ea43b Formatting. Brandon Amos 2016-06-27 15:11:37 -04:00
  • bb5c41cbd7 Formatting. Brandon Amos 2016-06-27 15:11:23 -04:00
  • ec5051f250 Move acknowledgements and authors from the code to the README. Brandon Amos 2016-06-27 15:11:01 -04:00
  • 9d84f72b04 Use Google code style. Add cpplint and cppcheck to Travis. Brandon Amos 2016-06-27 15:01:44 -04:00
  • 07130ffff0 Update tests to use catch. Brandon Amos 2016-06-27 13:44:25 -04:00
  • 49c71d92d5 Remove trailing whitespace. Brandon Amos 2016-06-27 13:13:56 -04:00
  • a8532334cb Merge pull request #19 from VinGarcia/master Brandon Amos 2016-06-27 12:31:47 -04:00
  • 16193fcf4f Fix all memory leaks =] Vinícius Garcia 2016-06-26 11:11:34 -03:00
  • 512dd1a946 Modularize exception management tests Vinícius Garcia 2016-06-26 11:08:53 -03:00
  • c62bfa945a Fix a memory leak on Scope::find() Vinícius Garcia 2016-06-26 10:22:50 -03:00
  • 9ea1e5d3c8 Improve some comments Vinícius Garcia 2016-06-26 10:05:54 -03:00
  • 4b40f1b6cb Make packToken(TokenBase*) less error prone Vinícius Garcia 2016-06-26 04:34:13 -03:00
  • 63030b2aeb Add undefined_operation exception Vinícius Garcia 2016-06-15 23:00:01 -03:00
  • 865e5e5cdd Fix error message for invalid operands Vinícius Garcia 2016-06-15 13:27:29 -03:00
  • 8c99ff6222 Fix memory leaking bug on calculator::calculate() Vinícius Garcia 2016-06-15 13:12:28 -03:00
  • 87cd920682 Add error check for invalid operands Vinícius Garcia 2016-06-14 18:29:10 -03:00
  • 21565f44cb Add static str() function to packToken Vinícius Garcia 2016-06-05 12:50:54 -03:00
  • 0d16c842fd Minor fix on error message thrown from toRPN() Vinícius Garcia 2016-06-03 21:07:28 -03:00
  • 1d8dd499ff Refactor Scope passing for cleanness and efficience Vinícius Garcia 2016-06-03 21:04:07 -03:00
  • 33ee3450d7 Add check for operator existence on handle_op() Vinícius Garcia 2016-06-03 19:46:17 -03:00
  • e8edb28fd8 Add syntax error check on calcultor::toRPN() Vinícius Garcia 2016-06-03 19:13:01 -03:00
  • e24a6651fc Update calculator::str() to use packToken::str() Vinícius Garcia 2016-06-03 14:05:05 -03:00
  • 99abdb9967 Merge pull request #18 from VinGarcia/simplify Brandon Amos 2016-06-02 17:45:25 -04:00
  • ef15c667a1 Fix assignment/copy segmentation fault Vinícius Garcia 2016-06-02 11:20:12 -03:00
  • 8bc48c01e0 Add 2 utility functions to packToken Vinícius Garcia 2016-06-02 01:20:27 -03:00
  • 9f6971d0f1 Add default Scope argument to calculators constructor Vinícius Garcia 2016-06-02 01:16:09 -03:00
  • 60583c22fe Fix memory leak problem Vinícius Garcia 2016-05-30 22:54:54 -03:00
  • 90ba6bd0ff Add the Scope concept and the Scope Class Vinícius Garcia 2016-05-30 22:27:08 -03:00
  • 529fcbe94c Merge pull request #17 from VinGarcia/simplify Brandon Amos 2016-04-26 13:09:55 -04:00
  • 7e178895be Add operator "." for the MAP type Vinícius Garcia 2016-04-25 16:07:57 -03:00
  • 3d302ae01b Fix opPrecedence to follow C++ standart Vinícius Garcia 2016-04-25 15:36:42 -03:00
  • 4605387411 Add subscript operator to packToken to simplify MAP access Vinícius Garcia 2016-04-25 12:24:54 -03:00
  • 36866d0af6 Adapt packToken to work with the MAP type Vinícius Garcia 2016-04-25 11:50:49 -03:00
  • 95ee8f23ba Add the MAP type and the subscript operator: [] Vinícius Garcia 2016-04-25 11:43:59 -03:00
  • 03b4e17adc Update packToken to fit strings Vinícius Garcia 2016-04-20 14:28:35 -03:00
  • 16f220fb32 Update assert function to work with any type of Token Vinícius Garcia 2016-04-20 14:21:05 -03:00
  • ebdaaa13a7 Add quoted string literals, e.g.: "str" or 'str' Vinícius Garcia 2016-04-20 13:05:05 -03:00
  • 229420f205 Fix bug on string == and != operators Vinícius Garcia 2016-04-20 13:04:17 -03:00
  • 07b9bf086f Merge pull request #16 from VinGarcia/simplify Brandon Amos 2016-04-18 15:00:47 -04:00
  • dac07bc163 Add string and numeral operations Vinícius Garcia 2016-04-18 03:15:34 -03:00
  • 030cd2b859 Add string type and string operations Vinícius Garcia 2016-04-18 02:58:50 -03:00
  • 976ef66292 Add copy assignment operator to packToken Vinícius Garcia 2016-04-18 15:36:17 -03:00
  • 7a345c341a Add Vinícius Garcia as co-author on shunting-yard.h Vinícius Garcia 2016-04-18 15:19:53 -03:00
  • 0bb17555b7 Replace the token map value class for the packToken type Vinícius Garcia 2016-04-18 14:58:33 -03:00
  • ccf4a52d4b Merge pull request #14 from VinGarcia/simplify Brandon Amos 2016-04-18 08:13:56 -04:00
  • e88858c1b9 Add first version of the TokenBase* facade: packToken Vinícius Garcia 2016-04-18 05:20:18 -03:00
  • a9bb8ccad3 Merge master with multiple types operations support branch Vinícius Garcia 2016-04-18 03:56:23 -03:00
  • e60c156eae Change calculate and eval return types to TokenBase* Vinícius Garcia 2016-04-18 02:30:18 -03:00
  • f739417c70 Remove DEBUG prints, since TokenBase* can't be printed Vinícius Garcia 2016-04-18 02:14:27 -03:00
  • 139fd06ae3 Change TokenMap_t to map TokenBase* instead of doubles Vinícius Garcia 2016-04-18 02:11:03 -03:00
  • b805d46114 Add typedef OppMap_t for the OpPrecedence map Vinícius Garcia 2016-04-18 01:24:37 -03:00
  • 79de668225 Add typedef TokenMap_t for the variable map Vinícius Garcia 2016-04-18 01:16:46 -03:00
  • a83a25067a Prepare calculate function to work with non double types Vinícius Garcia 2016-04-18 01:01:10 -03:00
  • a8007bafa6 Fix opPrecedence argument and parameter name conflicts. Brandon Amos 2016-03-22 15:57:53 -04:00
  • 4481a234a2 README: Link to @awsteiner's o2scl. Brandon Amos 2016-03-22 15:57:26 -04:00
  • 032ae759ff Add assert_throws and assert_not_throw to test-*.cpp Vinícius Garcia 2016-03-10 17:17:05 -03:00
  • bfd60ff166 Force Makefile to recompile all *.o on any .h change Vinícius Garcia 2016-03-08 00:37:05 -03:00
  • 5639d9ebf2 Merge pull request #13 from VinGarcia/master Brandon Amos 2016-02-29 10:59:27 -05:00
  • 3f1adf454b Update README.md Vinícius Garcia 2016-02-29 05:44:19 -03:00
  • 913e6725d8 Add boolean operators Vinícius Garcia 2016-02-29 05:13:47 -03:00
  • 3ef8c0a0ef Adapt opPrecedence to match C++ reference Vinícius Garcia 2016-02-29 04:51:42 -03:00
  • ec0029e343 Merge pull request #12 from VinGarcia/master Brandon Amos 2016-02-27 16:14:58 -05:00
  • cfd5808e36 Replace dynamic_cast for static_cast for speed Vinícius Garcia 2016-02-27 17:04:39 -03:00
  • 22b3e71623 Add stdexcept for domain_error. Brandon Amos 2016-02-26 20:51:28 -05:00
  • 19b56e6629 Add Travis badge to the README. Brandon Amos 2016-02-26 17:57:37 -05:00
  • d905c2f172 Makefile: run->test Brandon Amos 2016-02-26 17:56:04 -05:00
  • e0322417f8 Update .travis.yml Brandon Amos 2016-02-26 17:55:59 -05:00
  • a6216ecf5d Remove trailing newlines and spaces. Brandon Amos 2016-02-26 17:50:20 -05:00
  • f01336fa5a Remove unused CMakeLists. Brandon Amos 2016-02-26 17:49:49 -05:00
  • 63de713776 Merge pull request #10 from VinGarcia/master Brandon Amos 2016-02-26 17:48:47 -05:00
  • 3f80b27bdc Make it accept variable names with numbers, e.g. a1 Vinícius Garcia 2016-02-26 01:59:21 -03:00
  • 1d0cfc0d60 Improve Makefile with a make run command Vinícius Garcia 2016-02-26 01:26:25 -03:00
  • 9750682c9c Modify calculate() for lazy variable evaluation Vinícius Garcia 2016-02-26 01:24:57 -03:00
  • ef5b5d2f22 Add non static functions: compile() and eval() Vinícius Garcia 2016-02-25 23:42:10 -03:00
  • af9cc8b07e Define opPrecedence as static class member Vinícius Garcia 2016-02-24 18:30:06 -03:00
  • 0faa25ea56 Remove biicode and CI. Brandon Amos 2016-02-09 11:39:15 -05:00
  • 813a6b24c2 Move badge to the top of the README. Brandon Amos 2015-09-30 16:35:00 -05:00
  • cadce05e0d Merge pull request #9 from redpois0n/master Brandon Amos 2015-07-23 15:13:19 -04:00
  • 1e30ea140e Update shunting-yard.cpp redpois0n 2015-07-23 21:10:36 +02:00
  • 36ff7f8fef Update shunting-yard.cpp redpois0n 2015-07-23 21:04:51 +02:00
  • f3e9bd8b54 Merge pull request #7 from MariadeAnton/biicodizer Brandon Amos 2015-02-16 11:16:37 -05:00
  • a606f18161 added CI files mariadeanton 2015-02-16 15:01:24 +01:00
  • 5af36331e7 Merge pull request #6 from MariadeAnton/biicodizer Brandon Amos 2015-02-09 10:52:23 -05:00
  • 8196b7424f added unobtrusive changes to work with biicode mariadeanton 2015-02-09 15:32:43 +01:00
  • 271d435078 Formatting and header. Brandon Amos 2015-01-28 18:51:31 -05:00
  • 900395c489 Merge pull request #5 from veroight/patch-1 Brandon Amos 2015-01-28 18:50:15 -05:00
  • 369c1b588d add "^" op veroight 2015-01-28 23:06:50 +00:00
  • 1aff34f526 Add link to biicode. Brandon Amos 2014-12-30 11:16:03 -05:00