summaryrefslogtreecommitdiff
path: root/lisp.y
diff options
context:
space:
mode:
authorFelix Perktold <Felix.Perktold@student.uibk.ac.at>2025-12-21 00:24:12 +0100
committerFelix Perktold <Felix.Perktold@student.uibk.ac.at>2025-12-21 00:24:12 +0100
commit41d98bd3fde6fdc4d1550108f8528f8dfcc97206 (patch)
tree50bf72a33f51b13cd4bd20f5649c0d161237d56b /lisp.y
parent6e416e831fc968b6db5721a4806bdcf34cf2e87f (diff)
add symbols, code cleanup
Diffstat (limited to 'lisp.y')
-rw-r--r--lisp.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp.y b/lisp.y
index a15b451..dd6eddf 100644
--- a/lisp.y
+++ b/lisp.y
@@ -19,7 +19,7 @@ static int is_integer(double x) {
value *val;
}
%token <dval> NUMBER
-%token <strval> STRING
+%token <strval> STRING SYMBOL
%token <ival> LPAREN RPAREN DOT WHITESPACE
%token <ival> PLUS MINUS MULT DIV
@@ -59,6 +59,7 @@ atom: NUMBER
}
}
| STRING { $$ = make_string($1); };
+ | SYMBOL { $$ = make_symbol($1); };
%%
int yyerror(const char *s) {