diff options
-rw-r--r-- | test/accumbt2.lm | 4 | ||||
-rw-r--r-- | test/accumbt3.lm | 3 | ||||
-rw-r--r-- | test/concat1.lm | 7 | ||||
-rw-r--r-- | test/concat2.lm | 5 | ||||
-rw-r--r-- | test/context1.lm | 7 |
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 ##### |