scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit f646f6bb23a5a5c66c0ea91885aacef841f7f7ab
parent 9e4dc8bf34a6c59f7073d95dc7df06d91168d833
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 19 Jul 2015 09:39:57 +0200

Mark clearly what is output debug

Diffstat:
Mcc1/cpp.c | 4++--
Mcc1/lex.c | 2+-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cc1/cpp.c b/cc1/cpp.c @@ -207,12 +207,12 @@ expand(char *begin, Symbol *sym) if (!parsepars(arguments, arglist, atoi(s))) return 0; for (n = 0; n < atoi(s); ++n) - fprintf(stderr, "PAR%d:%s\n", n, arglist[n]); + fprintf(stderr, "MACRO par%d:%s\n", n, arglist[n]); elen = copymacro(buffer, s+3, INPUTSIZ-1, arglist); substitute: - fprintf(stderr, "macro '%s' expanded to :'%s'\n", macroname, buffer); + fprintf(stderr, "MACRO '%s' expanded to :'%s'\n", macroname, buffer); rlen = strlen(input->p); /* rigth length */ llen = begin - input->line; /* left length */ ilen = input->p - begin; /* invocation length */ diff --git a/cc1/lex.c b/cc1/lex.c @@ -532,7 +532,7 @@ next(void) yytoken = operator(); exit: - fprintf(stderr, "%s\n", yytext); + fprintf(stderr, "TOKEN %s\n", yytext); lex_ns = NS_IDEN; return yytoken; }