feat: rework symbols regex.
This commit is contained in:
parent
2b8d8b89cf
commit
14113fb636
|
@ -587,9 +587,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]+\\.?([0-9]+)?/ ; \
|
||||||
symbol : \"list\" | \"head\" | \"tail\" \
|
symbol : /[a-zA-Z0-9_+\\-*\\/\\\\=<>!&]+/ ; \
|
||||||
| \"eval\" | \"join\" | \"len\" \
|
|
||||||
| '+' | '-' | '*' | '/' ; \
|
|
||||||
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