From 51ef69dee6dd500991fa816b5b88a33a6f1e04e1 Mon Sep 17 00:00:00 2001 From: h2so5 Date: Fri, 5 Apr 2013 14:59:11 +0900 Subject: Add syntax error for incomplete global variables --- src/parse.y | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/parse.y b/src/parse.y index 3b69601b1..35bc18cd5 100644 --- a/src/parse.y +++ b/src/parse.y @@ -4726,6 +4726,10 @@ parser_yylex(parser_state *p) p->lstate = EXPR_END; token_column = newtok(p); c = nextc(p); + if (c == -1) { + yyerror(p, "incomplete global variable syntax"); + return 0; + } switch (c) { case '_': /* $_: last read line string */ c = nextc(p); -- cgit v1.2.3