From bdb98719d90223f1a3ca551538c74de4f534796a Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 4 Sep 2024 02:14:47 +0200 Subject: Allow an EOF-terminated line --- src/parser.y | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)); -- cgit v1.2.3