From 3817688851fae07b1d6a13ba2ce1906fc9811f8f Mon Sep 17 00:00:00 2001 From: Mustafa Quraish Date: Mon, 7 Feb 2022 03:02:39 -0500 Subject: [cup] Self-hosting is now possible! Make some tweaks to match C output A bit of a chonky commit, but this ports over the remaining (well, almost) everything from the C implementation to the self-hosted compiler. The only things that really remain right now are (1) defer support and (2) support for constants in local scopes. There were used barely enough so for now their uses have been removed, but I'll implement them back later. Not sure how useful (2) is though. --- run.sh2 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'run.sh2') diff --git a/run.sh2 b/run.sh2 index 20ba136..72317e6 100755 --- a/run.sh2 +++ b/run.sh2 @@ -12,16 +12,15 @@ then exit 1 fi -set -xe +set -e build/cupcc compiler/main.cup -o build/cup.nasm -make build/cup.out +make build/cup.out -s build/cup.out "$@" -make build/host.out +make build/host.out -s set +e +set -x build/host.out - -echo "Exit status: $?" \ No newline at end of file -- cgit v1.2.3