about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-07-05 12:13:28 -0700
committerKartik Agaram <vc@akkartik.com>2020-07-05 12:13:28 -0700
commitc09c91e185aad8e01b570c2569e13c1e429d2f99 (patch)
tree52a5ae1494ad5b7b2319411815dc45510e761c24
parentf2c5b05374186f9422cfdaf1ada096e39ac91a8b (diff)
downloadmu-c09c91e185aad8e01b570c2569e13c1e429d2f99.tar.gz
6612 - reorganize layers
-rw-r--r--100.txt11
-rw-r--r--101_write.subx (renamed from 050_write.subx)0
-rw-r--r--102test.subx (renamed from 051test.subx)0
-rw-r--r--103kernel-string-equal.subx (renamed from 052kernel-string-equal.subx)0
-rw-r--r--104new-segment.subx (renamed from 053new-segment.subx)0
-rw-r--r--105string-equal.subx (renamed from 054string-equal.subx)0
-rw-r--r--106stream.subx (renamed from 055stream.subx)0
-rw-r--r--107trace.subx (renamed from 056trace.subx)0
-rw-r--r--108write.subx (renamed from 057write.subx)0
-rw-r--r--109stream-equal.subx (renamed from 058stream-equal.subx)0
-rw-r--r--110stop.subx (renamed from 059stop.subx)0
-rw-r--r--111read.subx (renamed from 060read.subx)0
-rw-r--r--112read-byte.subx (renamed from 061read-byte.subx)0
-rw-r--r--113write-stream.subx (renamed from 062write-stream.subx)0
-rw-r--r--114error.subx (renamed from 063error.subx)0
-rw-r--r--115write-byte.subx (renamed from 064write-byte.subx)0
-rw-r--r--116write-buffered.subx (renamed from 065write-buffered.subx)0
-rw-r--r--117write-int-hex.subx (renamed from 066write-int-hex.subx)0
-rw-r--r--118parse-hex.subx (renamed from 067parse-hex.subx)0
-rw-r--r--119error-byte.subx (renamed from 068error-byte.subx)0
-rw-r--r--120allocate.subx (renamed from 069allocate.subx)0
-rw-r--r--121new-stream.subx (renamed from 070new-stream.subx)0
-rw-r--r--122read-line.subx (renamed from 071read-line.subx)0
-rw-r--r--123slice.subx (renamed from 072slice.subx)0
-rw-r--r--124next-token.subx (renamed from 073next-token.subx)0
-rw-r--r--125write-stream-data.subx (renamed from 074write-stream-data.subx)0
-rw-r--r--126write-int-decimal.subx (renamed from 075write-int-decimal.subx)0
-rw-r--r--127next-word.subx (renamed from 076next-word.subx)0
-rw-r--r--128subx-words.subx (renamed from 077subx-words.subx)0
-rw-r--r--129emit-hex.subx (renamed from 078emit-hex.subx)0
-rw-r--r--130emit.subx (renamed from 079emit.subx)0
-rw-r--r--131table.subx (renamed from 081table.subx)0
-rw-r--r--132slurp.subx (renamed from 082slurp.subx)0
-rw-r--r--133subx-widths.subx (renamed from 083subx-widths.subx)0
-rw-r--r--134emit-hex-array.subx (renamed from 084emit-hex-array.subx)0
-rw-r--r--135next-word-or-string.subx (renamed from 085next-word-or-string.subx)0
-rw-r--r--200.txt5
-rw-r--r--201register-names.subx (renamed from 090register-names.subx)0
-rw-r--r--202write-int.subx (renamed from 091write-int.subx)0
-rw-r--r--203stack.subx (renamed from 092stack.subx)0
-rw-r--r--300.txt3
-rw-r--r--301array-equal.subx (renamed from 100array-equal.subx)0
-rw-r--r--302stack_allocate.subx (renamed from 101stack_allocate.subx)0
-rw-r--r--303kernel-string.subx (renamed from 102kernel-string.subx)0
-rw-r--r--304screen.subx (renamed from 103screen.subx)0
-rw-r--r--305keyboard.subx (renamed from 104keyboard.subx)0
-rw-r--r--306files.subx (renamed from 105files.subx)0
-rw-r--r--307size.subx (renamed from 106size.subx)0
-rwxr-xr-xtest_apps20
49 files changed, 29 insertions, 10 deletions
diff --git a/100.txt b/100.txt
new file mode 100644
index 00000000..076b9919
--- /dev/null
+++ b/100.txt
@@ -0,0 +1,11 @@
+We're now past C++ bootstrap.
+
+Layers in the 1xx series are in bare SubX, without any syntax sugar. They are
+intended to be used by the phases of the self-hosted translator to replicate
+the functionality of the C++ bootstrap:
+  apps/hex.subx
+  apps/survey.subx
+  apps/pack.subx
+  apps/dquotes.subx
+  apps/assort.subx
+  apps/tests.subx
diff --git a/050_write.subx b/101_write.subx
index 2567f444..2567f444 100644
--- a/050_write.subx
+++ b/101_write.subx
diff --git a/051test.subx b/102test.subx
index 04fbea24..04fbea24 100644
--- a/051test.subx
+++ b/102test.subx
diff --git a/052kernel-string-equal.subx b/103kernel-string-equal.subx
index bcfd1848..bcfd1848 100644
--- a/052kernel-string-equal.subx
+++ b/103kernel-string-equal.subx
diff --git a/053new-segment.subx b/104new-segment.subx
index 4c249abe..4c249abe 100644
--- a/053new-segment.subx
+++ b/104new-segment.subx
diff --git a/054string-equal.subx b/105string-equal.subx
index d193bb2d..d193bb2d 100644
--- a/054string-equal.subx
+++ b/105string-equal.subx
diff --git a/055stream.subx b/106stream.subx
index 84d0580b..84d0580b 100644
--- a/055stream.subx
+++ b/106stream.subx
diff --git a/056trace.subx b/107trace.subx
index cc6a7b43..cc6a7b43 100644
--- a/056trace.subx
+++ b/107trace.subx
diff --git a/057write.subx b/108write.subx
index 988e21db..988e21db 100644
--- a/057write.subx
+++ b/108write.subx
diff --git a/058stream-equal.subx b/109stream-equal.subx
index b3bd9b95..b3bd9b95 100644
--- a/058stream-equal.subx
+++ b/109stream-equal.subx
diff --git a/059stop.subx b/110stop.subx
index f6cb6fae..f6cb6fae 100644
--- a/059stop.subx
+++ b/110stop.subx
diff --git a/060read.subx b/111read.subx
index 1f5a557d..1f5a557d 100644
--- a/060read.subx
+++ b/111read.subx
diff --git a/061read-byte.subx b/112read-byte.subx
index 78b8a7b9..78b8a7b9 100644
--- a/061read-byte.subx
+++ b/112read-byte.subx
diff --git a/062write-stream.subx b/113write-stream.subx
index d7e975c0..d7e975c0 100644
--- a/062write-stream.subx
+++ b/113write-stream.subx
diff --git a/063error.subx b/114error.subx
index c3d8ca68..c3d8ca68 100644
--- a/063error.subx
+++ b/114error.subx
diff --git a/064write-byte.subx b/115write-byte.subx
index 889439f6..889439f6 100644
--- a/064write-byte.subx
+++ b/115write-byte.subx
diff --git a/065write-buffered.subx b/116write-buffered.subx
index 19df446e..19df446e 100644
--- a/065write-buffered.subx
+++ b/116write-buffered.subx
diff --git a/066write-int-hex.subx b/117write-int-hex.subx
index 27753e50..27753e50 100644
--- a/066write-int-hex.subx
+++ b/117write-int-hex.subx
diff --git a/067parse-hex.subx b/118parse-hex.subx
index 83fcabe3..83fcabe3 100644
--- a/067parse-hex.subx
+++ b/118parse-hex.subx
diff --git a/068error-byte.subx b/119error-byte.subx
index 1ce0a3d6..1ce0a3d6 100644
--- a/068error-byte.subx
+++ b/119error-byte.subx
diff --git a/069allocate.subx b/120allocate.subx
index 4778b3ed..4778b3ed 100644
--- a/069allocate.subx
+++ b/120allocate.subx
diff --git a/070new-stream.subx b/121new-stream.subx
index e781ecd6..e781ecd6 100644
--- a/070new-stream.subx
+++ b/121new-stream.subx
diff --git a/071read-line.subx b/122read-line.subx
index 02dcc0fd..02dcc0fd 100644
--- a/071read-line.subx
+++ b/122read-line.subx
diff --git a/072slice.subx b/123slice.subx
index 3809f34e..3809f34e 100644
--- a/072slice.subx
+++ b/123slice.subx
diff --git a/073next-token.subx b/124next-token.subx
index 4fc13322..4fc13322 100644
--- a/073next-token.subx
+++ b/124next-token.subx
diff --git a/074write-stream-data.subx b/125write-stream-data.subx
index 0cc8ba65..0cc8ba65 100644
--- a/074write-stream-data.subx
+++ b/125write-stream-data.subx
diff --git a/075write-int-decimal.subx b/126write-int-decimal.subx
index 0b980f54..0b980f54 100644
--- a/075write-int-decimal.subx
+++ b/126write-int-decimal.subx
diff --git a/076next-word.subx b/127next-word.subx
index c3e9762d..c3e9762d 100644
--- a/076next-word.subx
+++ b/127next-word.subx
diff --git a/077subx-words.subx b/128subx-words.subx
index 6f93e421..6f93e421 100644
--- a/077subx-words.subx
+++ b/128subx-words.subx
diff --git a/078emit-hex.subx b/129emit-hex.subx
index d8869956..d8869956 100644
--- a/078emit-hex.subx
+++ b/129emit-hex.subx
diff --git a/079emit.subx b/130emit.subx
index 154b1bea..154b1bea 100644
--- a/079emit.subx
+++ b/130emit.subx
diff --git a/081table.subx b/131table.subx
index 4507b10d..4507b10d 100644
--- a/081table.subx
+++ b/131table.subx
diff --git a/082slurp.subx b/132slurp.subx
index ed590fa0..ed590fa0 100644
--- a/082slurp.subx
+++ b/132slurp.subx
diff --git a/083subx-widths.subx b/133subx-widths.subx
index 8a3142b3..8a3142b3 100644
--- a/083subx-widths.subx
+++ b/133subx-widths.subx
diff --git a/084emit-hex-array.subx b/134emit-hex-array.subx
index c3f74cd6..c3f74cd6 100644
--- a/084emit-hex-array.subx
+++ b/134emit-hex-array.subx
diff --git a/085next-word-or-string.subx b/135next-word-or-string.subx
index 31456e18..31456e18 100644
--- a/085next-word-or-string.subx
+++ b/135next-word-or-string.subx
diff --git a/200.txt b/200.txt
new file mode 100644
index 00000000..5dd57840
--- /dev/null
+++ b/200.txt
@@ -0,0 +1,5 @@
+Layers in the 2xx series are in bare SubX, without any syntax sugar. They are
+intended to be used by various syntax-sugar phases:
+  apps/sigils.subx
+  apps/calls.subx
+  apps/braces.subx
diff --git a/090register-names.subx b/201register-names.subx
index 21c151a9..21c151a9 100644
--- a/090register-names.subx
+++ b/201register-names.subx
diff --git a/091write-int.subx b/202write-int.subx
index 97e681c7..97e681c7 100644
--- a/091write-int.subx
+++ b/202write-int.subx
diff --git a/092stack.subx b/203stack.subx
index 0ab80b99..0ab80b99 100644
--- a/092stack.subx
+++ b/203stack.subx
diff --git a/300.txt b/300.txt
new file mode 100644
index 00000000..1544081b
--- /dev/null
+++ b/300.txt
@@ -0,0 +1,3 @@
+Layers in the 3xx series use all the available syntax sugar for SubX programs.
+For the most part they're intended to be used by the Mu translator:
+  apps/mu.subx
diff --git a/100array-equal.subx b/301array-equal.subx
index fea70997..fea70997 100644
--- a/100array-equal.subx
+++ b/301array-equal.subx
diff --git a/101stack_allocate.subx b/302stack_allocate.subx
index 02ad84f2..02ad84f2 100644
--- a/101stack_allocate.subx
+++ b/302stack_allocate.subx
diff --git a/102kernel-string.subx b/303kernel-string.subx
index 13472cb0..13472cb0 100644
--- a/102kernel-string.subx
+++ b/303kernel-string.subx
diff --git a/103screen.subx b/304screen.subx
index 116d0320..116d0320 100644
--- a/103screen.subx
+++ b/304screen.subx
diff --git a/104keyboard.subx b/305keyboard.subx
index 04c49784..04c49784 100644
--- a/104keyboard.subx
+++ b/305keyboard.subx
diff --git a/105files.subx b/306files.subx
index ee1a2d6b..ee1a2d6b 100644
--- a/105files.subx
+++ b/306files.subx
diff --git a/106size.subx b/307size.subx
index 9d2be695..9d2be695 100644
--- a/106size.subx
+++ b/307size.subx
diff --git a/test_apps b/test_apps
index 3552971b..325266e1 100755
--- a/test_apps
+++ b/test_apps
@@ -185,7 +185,7 @@ test $NATIVE  &&  {
 # Larger apps that use the standard library.
 
 echo factorial
-./bootstrap translate init.$OS 0[0-8]*.subx apps/factorial.subx  -o apps/factorial
+./bootstrap translate init.$OS [01]*.subx apps/factorial.subx  -o apps/factorial
 test "$1" = 'record'  ||  git diff --exit-code apps/factorial
 test $EMULATED  &&  {
   ./bootstrap run apps/factorial  ||  ret=$?
@@ -201,7 +201,7 @@ test $NATIVE  &&  {
 }
 
 echo crenshaw2-1
-./bootstrap translate init.$OS 0[0-8]*.subx apps/crenshaw2-1.subx  -o apps/crenshaw2-1
+./bootstrap translate init.$OS [01]*.subx apps/crenshaw2-1.subx  -o apps/crenshaw2-1
 test "$1" = 'record'  ||  git diff --exit-code apps/crenshaw2-1
 test $EMULATED  &&  {
   ./bootstrap run apps/crenshaw2-1 test
@@ -213,7 +213,7 @@ test $NATIVE  &&  {
 }
 
 echo crenshaw2-1b
-./bootstrap translate init.$OS 0[0-8]*.subx apps/crenshaw2-1b.subx  -o apps/crenshaw2-1b
+./bootstrap translate init.$OS [01]*.subx apps/crenshaw2-1b.subx  -o apps/crenshaw2-1b
 test "$1" = 'record'  ||  git diff --exit-code apps/crenshaw2-1b
 test $EMULATED  &&  {
   ./bootstrap run apps/crenshaw2-1b test
@@ -229,7 +229,7 @@ test $NATIVE  &&  {
 for phase in hex survey pack assort dquotes tests
 do
   echo $phase
-  ./bootstrap translate init.$OS 0[0-8]*.subx apps/subx-params.subx apps/$phase.subx -o apps/$phase
+  ./bootstrap translate init.$OS [01]*.subx apps/subx-params.subx apps/$phase.subx -o apps/$phase
   test "$1" = 'record'  ||  git diff --exit-code apps/$phase
   test $EMULATED  &&  {
     ./bootstrap run apps/$phase test
@@ -247,7 +247,7 @@ done
 # to go beyond functionality of the C++ bootstrap.
 
 echo sigils
-./bootstrap translate init.$OS 0*.subx apps/subx-params.subx apps/sigils.subx  -o apps/sigils
+./bootstrap translate init.$OS [012]*.subx apps/subx-params.subx apps/sigils.subx  -o apps/sigils
 test "$1" = 'record'  ||  git diff --exit-code apps/sigils
 test $EMULATED  &&  {
   ./bootstrap run apps/sigils test
@@ -261,7 +261,7 @@ test $NATIVE  &&  {
 test $NATIVE  ||  { echo 'there are more tests, but you need Linux to run them'; exit 0; }
 
 echo calls
-cat init.$OS 0*.subx apps/subx-params.subx apps/calls.subx  |  apps/sigils  > a.sigils
+cat init.$OS [012]*.subx apps/subx-params.subx apps/calls.subx  |  apps/sigils  > a.sigils
 ./bootstrap translate a.sigils -o apps/calls
 test "$1" = 'record'  ||  git diff --exit-code apps/calls
 test $EMULATED  &&  {
@@ -274,7 +274,7 @@ test $NATIVE  &&  {
 }
 
 echo braces
-cat init.$OS 0*.subx apps/subx-params.subx apps/braces.subx  |  apps/calls  |  apps/sigils  > a.sigils
+cat init.$OS [012]*.subx apps/subx-params.subx apps/braces.subx  |  apps/calls  |  apps/sigils  > a.sigils
 ./bootstrap translate a.sigils -o apps/braces
 test "$1" = 'record'  ||  git diff --exit-code apps/braces
 test $EMULATED  &&  {
@@ -316,7 +316,7 @@ done
 for app in factorial crenshaw2-1 crenshaw2-1b
 do
   echo $app
-  ./translate_subx init.$OS 0[0-8]*.subx apps/$app.subx
+  ./translate_subx init.$OS [01]*.subx apps/$app.subx
   diff apps/$app a.elf
 done
 
@@ -325,14 +325,14 @@ done
 for app in hex survey pack assort dquotes tests
 do
   echo $app
-  ./translate_subx init.$OS 0[0-8]*.subx apps/subx-params.subx apps/$app.subx
+  ./translate_subx init.$OS [01]*.subx apps/subx-params.subx apps/$app.subx
   diff apps/$app a.elf
 done
 
 for app in sigils calls braces
 do
   echo $app
-  ./translate_subx init.$OS 0*.subx apps/subx-params.subx apps/$app.subx
+  ./translate_subx init.$OS [012]*.subx apps/subx-params.subx apps/$app.subx
   diff apps/$app a.elf
 done