Brandon Amos a28552dfd4 Remove tabs.
2013-06-07 21:31:16 -07:00
2013-06-07 21:31:16 -07:00
2013-06-07 21:31:16 -07:00
2013-06-07 21:31:16 -07:00

Dijkstra's Shunting-yard algorithm.

Object-oriented string expression parsing in C++ with Dijkstra's Shunting-yard algorithm.

Original version by Jessee Brown.

Improvements and additions.

  • Split into header and cpp files.
  • Support for bitshifts.

Minimal example.

#include <stdio>
#include "shunting-yard.h"

int main() {
  calculator c;
  std::cout << c.calculate ("(20+10)*3/2-3") << std::endl;
  return 0;
}

TODO

  • Unary operators.
  • Suggestions from post.
Description
A C++ configurable Expression Parser. Useful as a Calculator or for helping you write your own Programming Language
Readme 696 KiB
Languages
C++ 99.8%
Makefile 0.2%