From 6cf5147ad5e296e85281a8e333a96802246adb3c Mon Sep 17 00:00:00 2001 From: Adrian Thurston Date: Sun, 14 Apr 2013 14:00:16 -0400 Subject: replaced calls to finish with send .. eos --- test/accumbt2.lm | 4 ++-- test/accumbt3.lm | 3 ++- test/concat1.lm | 7 +++---- test/concat2.lm | 5 ++--- test/context1.lm | 7 ++++++- 5 files changed, 15 insertions(+), 11 deletions(-) (limited to 'test') 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[] 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[] 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[] - send a [T - ] - return a.finish() + cons a: parser[] + 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[] - 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 ##### -- cgit v1.2.1