parent
794ff166db
commit
79744f3f3a
2 changed files with 1 additions and 3960 deletions
2
prompt.c
2
prompt.c
|
@ -70,7 +70,7 @@ int main (int argc, char** argv) {
|
||||||
// Define them with the following language
|
// Define them with the following language
|
||||||
mpca_lang(MPCA_LANG_DEFAULT,
|
mpca_lang(MPCA_LANG_DEFAULT,
|
||||||
"\
|
"\
|
||||||
number : /-?[0-9]+\.?[0-9]*/; \
|
number : /-?[0-9]+/; \
|
||||||
operator : '+' | '-' | '*' | '/' | '%' \
|
operator : '+' | '-' | '*' | '/' | '%' \
|
||||||
| '^' | \"min\" | \"max\"; \
|
| '^' | \"min\" | \"max\"; \
|
||||||
expr : <number> | '(' <operator> <expr>+ ')'; \
|
expr : <number> | '(' <operator> <expr>+ ')'; \
|
||||||
|
|
Reference in a new issue