scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit 344825fbb21140229625e78462b7e22280e3deb7
parent a5ece0d283cc43d8119e3d45dd1edbf5723d2479
Author: FRIGN <dev@frign.de>
Date:   Tue, 17 May 2016 21:35:49 +0200

Rename generror to generror.awk and change file mode

Now it's clear what it is. The executable bit was not necessary,
as we execute it using awk -f.

Diffstat:
cc2/Makefile | 2+-
cc2/generror | 12------------
cc2/generror.awk | 12++++++++++++
3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/cc2/Makefile b/cc2/Makefile @@ -18,7 +18,7 @@ main.o: error.h error.h: cc2.h rm -f $@; trap 'rm -f $$$$.h' EXIT INT QUIT ;\ - awk -f generror cc2.h > $$$$.h && mv $$$$.h $@ + awk -f generror.awk cc2.h > $$$$.h && mv $$$$.h $@ cc2: $(OBJS) ../lib/libcc.a $(CC) $(SCC_LDFLAGS) $(OBJS) ../lib/libcc.a -o $@ diff --git a/cc2/generror b/cc2/generror @@ -1,12 +0,0 @@ -# See LICENSE file for copyright and license details. -BEGIN { - print "char *errlist[] = {" -} -/^enum nerrors \{/ {inhome = 1} -inhome && /E[A-Z]*, / {sub(/,/, "", $1) - printf("\t[%s] = \"", $1) - for (i = 3; i < NF-1; ++i) - printf("%s ", $i) - printf("%s\",\n", $(NF-1));} -inhome && /^}/ {print "};" ; inhome = 0} - diff --git a/cc2/generror.awk b/cc2/generror.awk @@ -0,0 +1,12 @@ +# See LICENSE file for copyright and license details. +BEGIN { + print "char *errlist[] = {" +} +/^enum nerrors \{/ {inhome = 1} +inhome && /E[A-Z]*, / {sub(/,/, "", $1) + printf("\t[%s] = \"", $1) + for (i = 3; i < NF-1; ++i) + printf("%s ", $i) + printf("%s\",\n", $(NF-1));} +inhome && /^}/ {print "};" ; inhome = 0} +