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 */
|
||||
mpca_lang(MPCA_LANG_DEFAULT, " \
|
||||
number : /-?[0-9]+\\.?([0-9]+)?/ ; \
|
||||
symbol : \"list\" | \"head\" | \"tail\" \
|
||||
| \"eval\" | \"join\" | \"len\" \
|
||||
| '+' | '-' | '*' | '/' ; \
|
||||
symbol : /[a-zA-Z0-9_+\\-*\\/\\\\=<>!&]+/ ; \
|
||||
sexpr : '(' <expr>* ')' ; \
|
||||
qexpr : '{' <expr>* '}' ; \
|
||||
expr : <number> | <symbol> | <sexpr> | <qexpr>; \
|
||||
|
|
Loading…
Reference in New Issue
Block a user