summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2013-04-14 14:00:16 -0400
committerAdrian Thurston <thurston@complang.org>2013-04-14 14:00:16 -0400
commit6cf5147ad5e296e85281a8e333a96802246adb3c (patch)
tree33d5dc91aba7c9fa45c3a3b7b7375599691f723c
parentf62577ebc86ee021f773c766c462e865bc86dc2d (diff)
downloadcolm-6cf5147ad5e296e85281a8e333a96802246adb3c.tar.gz
replaced calls to finish with send .. eos
-rw-r--r--test/accumbt2.lm4
-rw-r--r--test/accumbt3.lm3
-rw-r--r--test/concat1.lm7
-rw-r--r--test/concat2.lm5
-rw-r--r--test/context1.lm7
5 files changed, 15 insertions, 11 deletions
diff --git a/test/accumbt2.lm b/test/accumbt2.lm
index 724f0a9d..a77142c0 100644
--- a/test/accumbt2.lm
+++ b/test/accumbt2.lm
@@ -40,10 +40,10 @@ AccumBt.OneParser = cons parser<accum_bt::one>[]
parse Two: accum_bt::two(AccumBt)[ stdin ]
-send AccumBt.OneParser ['\n']
+send AccumBt.OneParser ['\n'] eos
print( Two )
-print( ^( AccumBt.OneParser.finish() ) '\n' )
+print( ^( AccumBt.OneParser.tree ) '\n' )
##### IN #####
a b c d e ;
##### EXP #####
diff --git a/test/accumbt3.lm b/test/accumbt3.lm
index 7edce31a..e6cb25fa 100644
--- a/test/accumbt3.lm
+++ b/test/accumbt3.lm
@@ -84,7 +84,8 @@ AccumBt.NestedParser = cons parser<nested>[]
parse Two: accum_bt::two(AccumBt)[ stdin ]
-Nested: nested = AccumBt.NestedParser.finish()
+send AccumBt.NestedParser [] eos
+Nested: nested = AccumBt.NestedParser.tree
print( '\n------------\n' )
print( ^Nested '\n' )
diff --git a/test/concat1.lm b/test/concat1.lm
index c43ab0d2..d7812465 100644
--- a/test/concat1.lm
+++ b/test/concat1.lm
@@ -47,10 +47,9 @@ start parseStart( InputFile: stream )
start parseTxt( T: str )
{
- cons a: accum<start>[]
- send a [T
- ]
- return a.finish()
+ cons a: parser<start>[]
+ send a [T] eos
+ return a.tree
}
item* concatItems( IL1: item* IL2: item* )
diff --git a/test/concat2.lm b/test/concat2.lm
index d7d1da9e..741d17a5 100644
--- a/test/concat2.lm
+++ b/test/concat2.lm
@@ -49,9 +49,8 @@ start parseStart( InputFile: stream )
start parseTxt( T: str )
{
cons a: accum<start>[]
- send a [T
- ]
- return a.finish()
+ send a [T] eos
+ return a.tree
}
item* concatItems( IL1: item* IL2: item* )
diff --git a/test/context1.lm b/test/context1.lm
index a112ca12..e0caf7ef 100644
--- a/test/context1.lm
+++ b/test/context1.lm
@@ -27,9 +27,14 @@ context ctx
[item*]
end # ctx
-CTX: ctx = cons ctx[]
+CTX: ctx = cons CTX: ctx[]
+
+send
+
parse Input: ctx::start( CTX ) [ stdin ]
print( Input '\n' )
+
+
##### IN #####
a b c ( d e f )
##### EXP #####