Replace lex/bison parser with hand-written parser
commit4acb11b9692e01d40bee2d3c31d582d5de485b31
authorPioneerAxon <arth.svnit@gmail.com>
Fri, 3 Aug 2012 12:56:28 +0000 (3 18:26 +0530)
committerRobert Ancell <robert.ancell@canonical.com>
Fri, 17 Aug 2012 08:34:56 +0000 (17 20:34 +1200)
treefcbc95e7ba3b4553ae7a0c350065eb3fdacee8d7
parent10906f03c72b0da43bc3fd3a1c85b90c79e1eed8
Replace lex/bison parser with hand-written parser

Fixed .gitignore file entry.
Removed dependency of lex/bison.
Add back test case in test-mp-equation.c.
Added new parser code.
-prelexer.[ch] deals with unichar manipulation.
-lexer.[ch] generates tokens from input.
-parser.[ch] deals with grammar, and generates parse-tree.
-parserfunc.[ch] binds mp code and parser to evaluate parse-tree.

This patch is result of 33 commits.
The repository with complete commit history is hosted at https://bitbucket.org/PioneerAxon/math-parser
16 files changed:
.gitignore
configure.ac
src/Makefile.am
src/lexer.c [new file with mode: 0644]
src/lexer.h [new file with mode: 0644]
src/mp-equation-lexer.l [deleted file]
src/mp-equation-parser.y [deleted file]
src/mp-equation-private.h [deleted file]
src/mp-equation.c
src/parser.c [new file with mode: 0644]
src/parser.h [new file with mode: 0644]
src/parserfunc.c [new file with mode: 0644]
src/parserfunc.h [new file with mode: 0644]
src/prelexer.c [new file with mode: 0644]
src/prelexer.h [new file with mode: 0644]
src/test-mp-equation.c