aboutsummaryrefslogtreecommitdiffstats
path: root/awk.y
diff options
context:
space:
mode:
Diffstat (limited to 'awk.y')
-rw-r--r--awk.y10
1 files changed, 8 insertions, 2 deletions
diff --git a/awk.y b/awk.y
index f855f254..ef7f4407 100644
--- a/awk.y
+++ b/awk.y
@@ -1416,8 +1416,10 @@ retry:
if (nextc() == '\n') {
sourceline++;
goto retry;
- } else
+ } else {
yyerror("backslash not last character on line");
+ exit(1);
+ }
break;
case '$':
@@ -1584,6 +1586,7 @@ retry:
if (c == '\n') {
pushback();
yyerror("unterminated string");
+ exit(1);
}
if (c == '\\') {
c = nextc();
@@ -1597,6 +1600,7 @@ retry:
if (c == EOF) {
pushback();
yyerror("unterminated string");
+ exit(1);
}
tokadd(c);
}
@@ -1708,8 +1712,10 @@ retry:
return lasttok = '|';
}
- if (c != '_' && ! isalpha(c))
+ if (c != '_' && ! isalpha(c)) {
yyerror("Invalid char '%c' in expression\n", c);
+ exit(1);
+ }
/* it's some type of name-type-thing. Find its length. */
tok = tokstart;