feat: rework symbols regex.

This commit is contained in:
NunoSempere 2023-05-02 10:12:46 -04:00
parent 2b8d8b89cf
commit 14113fb636
2 changed files with 1 additions and 3 deletions

BIN
mumble

Binary file not shown.

View File

@ -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>; \