step: add some q-expression functions, part 1 of many.
This commit is contained in:
parent
cf61eb6e98
commit
f66aa8738f
|
@ -377,7 +377,8 @@ 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]+\\.?([0-9]+)?/ ; \
|
||||||
symbol : '+' | '-' | '*' | '/' ; \
|
symbol : \"list\" \"head\" \"tail\" \"eval\" \
|
||||||
|
| '+' | '-' | '*' | '/' ; \
|
||||||
sexpr : '(' <expr>* ')' ; \
|
sexpr : '(' <expr>* ')' ; \
|
||||||
qexpr : '{' <expr>* '}' ; \
|
qexpr : '{' <expr>* '}' ; \
|
||||||
expr : <number> | <symbol> | <sexpr> | <qexpr>; \
|
expr : <number> | <symbol> | <sexpr> | <qexpr>; \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user