Archived
1
0
Fork 0

Added mpc parser

This commit is contained in:
Brandon Rozek 2018-06-03 12:48:53 -04:00
parent 4d86d79a2f
commit 794ff166db
2 changed files with 3960 additions and 1 deletions

3959
mpc.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -70,7 +70,7 @@ int main (int argc, char** argv) {
// Define them with the following language
mpca_lang(MPCA_LANG_DEFAULT,
"\
number : /-?[0-9]+/; \
number : /-?[0-9]+\.?[0-9]*/; \
operator : '+' | '-' | '*' | '/' | '%' \
| '^' | \"min\" | \"max\"; \
expr : <number> | '(' <operator> <expr>+ ')'; \