diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-10-27 22:46:11 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-10-27 22:46:23 -0700 |
commit | 5f21a5e788402345f97e8bc934259e960ba0f334 (patch) | |
tree | 686ce7ef76e90775903d33916017a6cdc9a80e91 /subx | |
parent | 5e5f569c1777e4062b2d4379ed4b17b9d0b18281 (diff) | |
download | mu-5f21a5e788402345f97e8bc934259e960ba0f334.tar.gz |
4726
Diffstat (limited to 'subx')
-rwxr-xr-x | subx/c | 4 | ||||
-rwxr-xr-x | subx/cb | 4 | ||||
-rwxr-xr-x | subx/cr | 4 | ||||
-rwxr-xr-x | subx/dcr | 4 | ||||
-rwxr-xr-x | subx/dgen | 11 | ||||
-rwxr-xr-x | subx/drun | 17 | ||||
-rwxr-xr-x | subx/gen | 4 | ||||
-rwxr-xr-x | subx/run | 4 |
8 files changed, 46 insertions, 6 deletions
diff --git a/subx/c b/subx/c index 9583b78e..ddfde99a 100755 --- a/subx/c +++ b/subx/c @@ -1,4 +1,4 @@ #!/usr/bin/env zsh -# Make opening various versions of the Crenshaw compiler even more convenient. +# Make editing various versions of the Crenshaw compiler even more convenient. -edit crenshaw$1 +./edit crenshaw$1 diff --git a/subx/cb b/subx/cb new file mode 100755 index 00000000..924d9c9e --- /dev/null +++ b/subx/cb @@ -0,0 +1,4 @@ +#!/usr/bin/env zsh +# Make building various versions of the Crenshaw compiler even more convenient. + +gen crenshaw$1 diff --git a/subx/cr b/subx/cr new file mode 100755 index 00000000..e8ccb420 --- /dev/null +++ b/subx/cr @@ -0,0 +1,4 @@ +#!/usr/bin/env zsh +# Make running various versions of the Crenshaw compiler even more convenient. + +run crenshaw$1 diff --git a/subx/dcr b/subx/dcr new file mode 100755 index 00000000..938dbb56 --- /dev/null +++ b/subx/dcr @@ -0,0 +1,4 @@ +#!/usr/bin/env zsh +# Make opening various versions of the Crenshaw compiler even more convenient. + +./dgen crenshaw$1 && ./drun crenshaw$1 diff --git a/subx/dgen b/subx/dgen new file mode 100755 index 00000000..c4afbfb2 --- /dev/null +++ b/subx/dgen @@ -0,0 +1,11 @@ +#!/usr/bin/env zsh +# Build commonly-used SubX programs in 'debug mode'. + +if [[ $1 == 'ex'* ]] +then + CFLAGS=-g ./subx --map translate examples/$1.subx -o examples/`echo $1 |sed 's/\..*//'` + exit $? +fi + +CFLAGS=-g ./subx --map translate *.subx apps/$1.subx -o apps/`echo $1 |sed 's/\..*//'` +exit $? diff --git a/subx/drun b/subx/drun new file mode 100755 index 00000000..9e802c31 --- /dev/null +++ b/subx/drun @@ -0,0 +1,17 @@ +#!/usr/bin/env zsh +# Run commonly-used SubX programs using the SubX VM in 'debug mode'. + +if [ $# -eq 0 ] +then + echo "drun <binary> <args>" + exit 1 +fi + +if [[ $1 == 'ex'* ]] +then + CFLAGS=-g ./subx --map --dump run examples/$* 2>x + exit $? +fi + +CFLAGS=-g ./subx --map --dump run apps/$* 2>x +exit $? diff --git a/subx/gen b/subx/gen index 846d4186..91370ea4 100755 --- a/subx/gen +++ b/subx/gen @@ -3,9 +3,9 @@ if [[ $1 == 'ex'* ]] then - CFLAGS=-g subx translate examples/$1.subx -o examples/`echo $1 |sed 's/\..*//'` + CFLAGS=-g ./subx translate examples/$1.subx -o examples/`echo $1 |sed 's/\..*//'` exit $? fi -CFLAGS=-g subx translate *.subx apps/$1.subx -o apps/`echo $1 |sed 's/\..*//'` +CFLAGS=-g ./subx translate *.subx apps/$1.subx -o apps/`echo $1 |sed 's/\..*//'` exit $? diff --git a/subx/run b/subx/run index 8c13a3d8..87fa5569 100755 --- a/subx/run +++ b/subx/run @@ -9,9 +9,9 @@ fi if [[ $1 == 'ex'* ]] then - CFLAGS=-g subx run examples/$* + CFLAGS=-g ./subx run examples/$* exit $? fi -CFLAGS=-g subx run apps/$* +CFLAGS=-g ./subx run apps/$* exit $? |