projects
/
henge
/
webcc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tokens now print their number if they are UNKNOWN
[henge/webcc.git]
/
src
/
bin
/
tools
/
testapc.c
diff --git
a/src/bin/tools/testapc.c
b/src/bin/tools/testapc.c
index
c51ba41
..
4db0b86
100644
(file)
--- a/
src/bin/tools/testapc.c
+++ b/
src/bin/tools/testapc.c
@@
-113,13
+113,20
@@
int test_yyparse
TOK_CASE(CLOPEN,'i');
TOK_CASE(CLCLOSE,'i');
default:
TOK_CASE(CLOPEN,'i');
TOK_CASE(CLCLOSE,'i');
default:
- tok_string =
"UNKNOWN"
;
+ tok_string =
0
;
tok_pattern[LOFFS] = 'i';
break;
case 0:
goto done;
}
tok_pattern[LOFFS] = 'i';
break;
case 0:
goto done;
}
- printf(tok_pattern, tok_string, yylval.val);
+ if (tok_string == NULL)
+ { tok_pattern[TOFFS] = 'i';
+ printf(tok_pattern, tok, yylval.val);
+ }
+ else
+ { tok_pattern[TOFFS] = 's';
+ printf(tok_pattern, tok_string, yylval.val);
+ }
if (i % 4 == 0 || yylval.val == 0)
printf(";\n");
}
if (i % 4 == 0 || yylval.val == 0)
printf(";\n");
}