about summary refs log tree commit diff
path: root/lr.c
diff options
context:
space:
mode:
Diffstat (limited to 'lr.c')
-rw-r--r--lr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lr.c b/lr.c
index bff6290..3b5f35f 100644
--- a/lr.c
+++ b/lr.c
@@ -484,7 +484,10 @@ static struct expr *
 parse_expr(char *s)
 {
 	pos = s;
-	return parse_or();
+	struct expr *e = parse_or();
+	if (*pos)
+		parse_error("trailing garbage");
+	return e;
 }
 
 static const char *