fix maketab non-bug
This commit is contained in:
parent
2dc7e5ff1a
commit
e8c280034f
5
FIXES
5
FIXES
@ -25,6 +25,11 @@ THIS SOFTWARE.
|
||||
This file lists all bug fixes, changes, etc., made since the AWK book
|
||||
was sent to the printers in August, 1987.
|
||||
|
||||
Oct 25, 2018:
|
||||
Added test in maketab.c to prevent generating a proctab entry
|
||||
for YYSTYPE_IS_DEFINED. It was harmless but some gcc settings
|
||||
generated a warning message. Thanks to Nan Xiao for report.
|
||||
|
||||
Aug 27, 2018:
|
||||
Disallow '$' in printf formats; arguments evaluated in order
|
||||
and printed in order.
|
||||
|
4
makefile
4
makefile
@ -34,8 +34,8 @@ CC = gcc -g -Wall -pedantic
|
||||
|
||||
# yacc options. pick one; this varies a lot by system.
|
||||
#YFLAGS = -d -S
|
||||
#YACC = bison -d -y
|
||||
YACC = yacc -d
|
||||
YACC = bison -d -y
|
||||
#YACC = yacc -d
|
||||
# -S uses sprintf in yacc parser instead of sprint
|
||||
|
||||
OFILES = b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o
|
||||
|
@ -135,6 +135,8 @@ int main(int argc, char *argv[])
|
||||
n = sscanf(buf, "%1c %s %s %d", &c, def, name, &tok);
|
||||
if (c != '#' || (n != 4 && strcmp(def,"define") != 0)) /* not a valid #define */
|
||||
continue;
|
||||
if (strcmp(name, "YYSTYPE_IS_DECLARED") == 0)
|
||||
continue;
|
||||
if (tok < FIRSTTOKEN || tok > LASTTOKEN) {
|
||||
/* fprintf(stderr, "maketab funny token %d %s ignored\n", tok, buf); */
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user