aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-09-04 02:14:47 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-09-04 02:14:47 +0200
commitbdb98719d90223f1a3ca551538c74de4f534796a (patch)
tree3bae32df23f42e7e0873e756fee7bd382f132cc7 /src
parent042c54109ae45de4f7dcbb9b7eef6dfe95a9766e (diff)
Allow an EOF-terminated line
Diffstat (limited to 'src')
-rw-r--r--src/parser.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/parser.y b/src/parser.y
index c225b57..5a4c409 100644
--- a/src/parser.y
+++ b/src/parser.y
@@ -49,9 +49,11 @@ input
line
: EOL { $$.eqn = NULL; }
- | exp EOL { $$ = $1; }
+ | exp eol { $$ = $1; }
;
+eol: EOL | YYEOF;
+
exp
: IDENT {
$$.eqn = xmalloc(sizeof(eqn_t));