aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.y
diff options
context:
space:
mode:
Diffstat (limited to 'awkgram.y')
-rw-r--r--awkgram.y14
1 files changed, 8 insertions, 6 deletions
diff --git a/awkgram.y b/awkgram.y
index cee18459..56f60b17 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -151,6 +151,8 @@ static inline INSTRUCTION *list_merge(INSTRUCTION *l1, INSTRUCTION *l2);
extern double fmod(double x, double y);
#define YYSTYPE INSTRUCTION *
+
+#define is_identchar(c) (isalnum(c) || (c) == '_')
%}
%token FUNC_CALL NAME REGEXP FILENAME
@@ -3603,28 +3605,28 @@ retry:
goto out;
if (do_lint) {
- if ((tokentab[mid].flags & GAWKX) && ! (warntab[mid] & GAWKX)) {
+ if ((tokentab[mid].flags & GAWKX) != 0 && (warntab[mid] & GAWKX) == 0) {
lintwarn(_("`%s' is a gawk extension"),
tokentab[mid].operator);
warntab[mid] |= GAWKX;
}
- if ((tokentab[mid].flags & NOT_POSIX) && ! (warntab[mid] & NOT_POSIX)) {
+ if ((tokentab[mid].flags & NOT_POSIX) != 0 && (warntab[mid] & NOT_POSIX) == 0) {
lintwarn(_("POSIX does not allow `%s'"),
tokentab[mid].operator);
warntab[mid] |= NOT_POSIX;
}
}
- if (do_lint_old && (tokentab[mid].flags & NOT_OLD)
- && ! (warntab[mid] & NOT_OLD)
+ if (do_lint_old && (tokentab[mid].flags & NOT_OLD) != 0
+ && (warntab[mid] & NOT_OLD) == 0
) {
warning(_("`%s' is not supported in old awk"),
tokentab[mid].operator);
warntab[mid] |= NOT_OLD;
}
- if (tokentab[mid].flags & BREAK)
+ if ((tokentab[mid].flags & BREAK) != 0)
break_allowed++;
- if (tokentab[mid].flags & CONTINUE)
+ if ((tokentab[mid].flags & CONTINUE) != 0)
continue_allowed++;
switch (class) {