summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2013-04-13 10:44:45 -0400
committerAdrian Thurston <thurston@complang.org>2013-04-13 10:44:45 -0400
commitf34149a3990b06f647fcba9664471dfa6957a844 (patch)
tree8c72994004ffd3e79eeb42e51586aaa386c0f590
parente0cc080f94de6764b2eae8ef3815882316ebb922 (diff)
downloadcolm-f34149a3990b06f647fcba9664471dfa6957a844.tar.gz
updated tests for parent commit (parse returns tree)
-rw-r--r--test/accum1.lm3
-rw-r--r--test/accumbt2.lm3
-rw-r--r--test/accumbt3.lm5
-rw-r--r--test/ambig1.lm3
-rw-r--r--test/backtrack1.lm3
-rw-r--r--test/backtrack2.lm2
-rw-r--r--test/binary1.lm2
-rw-r--r--test/btscan1.lm4
-rw-r--r--test/commitbt.lm4
-rw-r--r--test/concat1.lm3
-rw-r--r--test/concat2.lm3
-rw-r--r--test/constructex.lm2
-rw-r--r--test/context1.lm3
-rw-r--r--test/context2.lm7
-rw-r--r--test/context3.lm3
-rw-r--r--test/export1.lm2
-rw-r--r--test/forloop1.lm2
-rw-r--r--test/forloop2.lm2
-rw-r--r--test/forloop3.lm2
-rw-r--r--test/func3.lm3
-rw-r--r--test/generate1.lm8
-rw-r--r--test/generate2.lm3
-rw-r--r--test/heredoc.lm2
-rw-r--r--test/ignore1.lm4
-rw-r--r--test/ignore2.lm3
-rw-r--r--test/ignore3.lm3
-rw-r--r--test/ignore4.lm7
-rw-r--r--test/ignore5.lm3
-rw-r--r--test/inpush1.lm20
-rw-r--r--test/island.lm2
-rw-r--r--test/lhs1.lm2
-rw-r--r--test/liftattrs.lm2
-rw-r--r--test/lookup1.lm5
-rw-r--r--test/mailbox.lm2
-rw-r--r--test/matchex.lm4
-rw-r--r--test/maxlen.lm2
-rw-r--r--test/multiregion1.lm3
-rw-r--r--test/multiregion2.lm5
-rw-r--r--test/namespace1.lm2
-rw-r--r--test/nestedcomm.lm7
-rw-r--r--test/order1.lm3
-rw-r--r--test/order2.lm2
-rw-r--r--test/parse1.lm2
-rw-r--r--test/prints.lm4
-rw-r--r--test/rediv.lm3
-rw-r--r--test/reor1.lm2
-rw-r--r--test/reor2.lm2
-rw-r--r--test/reparse.lm6
-rw-r--r--test/repeat1.lm2
-rw-r--r--test/repeat2.lm6
-rw-r--r--test/rhsref1.lm3
-rw-r--r--test/rubyhere.lm7
-rw-r--r--test/string.lm2
-rw-r--r--test/superid.lm2
-rw-r--r--test/tags2.lm3
-rw-r--r--test/tags3.lm4
-rw-r--r--test/tags4.lm4
-rw-r--r--test/til.lm3
-rw-r--r--test/translate1.lm2
-rw-r--r--test/translate2.lm5
-rw-r--r--test/travs1.lm3
-rw-r--r--test/treecmp1.lm3
-rw-r--r--test/typeref1.lm2
-rw-r--r--test/typeref2.lm2
-rw-r--r--test/typeref3.lm2
-rw-r--r--test/undofrag1.lm3
-rw-r--r--test/undofrag2.lm4
-rw-r--r--test/undofrag3.lm3
68 files changed, 104 insertions, 135 deletions
diff --git a/test/accum1.lm b/test/accum1.lm
index 4c5ea960..bf708185 100644
--- a/test/accum1.lm
+++ b/test/accum1.lm
@@ -13,11 +13,10 @@ def start
[item*]
parse Input: start[ stdin ]
-InputTree: start = Input.tree
cons Output: accum<start> []
-for Id: id in InputTree {
+for Id: id in Input {
send Output
"( [^Id] )
}
diff --git a/test/accumbt2.lm b/test/accumbt2.lm
index 53f91dcd..724f0a9d 100644
--- a/test/accumbt2.lm
+++ b/test/accumbt2.lm
@@ -38,8 +38,7 @@ end # accum_bt
AccumBt: accum_bt = cons accum_bt[]
AccumBt.OneParser = cons parser<accum_bt::one>[]
-parse TwoParser: accum_bt::two(AccumBt)[ stdin ]
-Two: accum_bt::two = TwoParser.tree
+parse Two: accum_bt::two(AccumBt)[ stdin ]
send AccumBt.OneParser ['\n']
diff --git a/test/accumbt3.lm b/test/accumbt3.lm
index c34758ab..7edce31a 100644
--- a/test/accumbt3.lm
+++ b/test/accumbt3.lm
@@ -15,7 +15,7 @@ lex
token open_paren /'('/
{
parse_stop NC: nested_comment[ input ]
- print( 'discarding: ' NC.tree '\n' )
+ print( 'discarding: ' NC '\n' )
}
end
@@ -82,8 +82,7 @@ end # accum_bt
cons AccumBt: accum_bt[]
AccumBt.NestedParser = cons parser<nested>[]
-parse TwoParser: accum_bt::two(AccumBt)[ stdin ]
-Two: accum_bt::two = TwoParser.tree
+parse Two: accum_bt::two(AccumBt)[ stdin ]
Nested: nested = AccumBt.NestedParser.finish()
diff --git a/test/ambig1.lm b/test/ambig1.lm
index 74df41bb..91195593 100644
--- a/test/ambig1.lm
+++ b/test/ambig1.lm
@@ -594,8 +594,7 @@ def paren_args
# Grammar finished
#
-parse RP: ruby[stdin]
-R: ruby = RP.tree
+parse R: ruby[stdin]
print_xml( R )
print( '\n' )
diff --git a/test/backtrack1.lm b/test/backtrack1.lm
index 2cf91598..acf54674 100644
--- a/test/backtrack1.lm
+++ b/test/backtrack1.lm
@@ -19,8 +19,7 @@ def E
def start
[E]
-parse SP: start[ stdin ]
-S: start = SP.tree
+parse S: start[ stdin ]
R: start = match S ~ 9 + 9
print_xml( R )
print( '\n' )
diff --git a/test/backtrack2.lm b/test/backtrack2.lm
index 3cdbbbda..fa3cdfc9 100644
--- a/test/backtrack2.lm
+++ b/test/backtrack2.lm
@@ -21,7 +21,7 @@ def start
[prods]
parse S: start[ stdin ]
-print_xml( match S.tree "!aa bb cc dd" )
+print_xml( match S "!aa bb cc dd" )
print( '\n' )
##### IN #####
!aa bb cc dd
diff --git a/test/binary1.lm b/test/binary1.lm
index 9e052950..7fc8337f 100644
--- a/test/binary1.lm
+++ b/test/binary1.lm
@@ -489,7 +489,7 @@ cons Binary: binary[]
Binary.CL = cons list<int> []
parse S: binary::start(Binary) [ stdin ]
-print_all_names( S.tree )
+print_all_names( S )
print( '*** SUCCESS ***\n' )
##### EXP #####
www.google.ca.
diff --git a/test/btscan1.lm b/test/btscan1.lm
index f5240cdc..a67da43d 100644
--- a/test/btscan1.lm
+++ b/test/btscan1.lm
@@ -37,8 +37,8 @@ def btscan
parse P: btscan[ stdin ]
-match P.tree ~!abb !abba !aab
-print_xml(P.tree)
+match P ~!abb !abba !aab
+print_xml(P)
print( '\n' )
##### IN #####
!abb !abba !aab
diff --git a/test/commitbt.lm b/test/commitbt.lm
index 542ffcf4..fcbb22ab 100644
--- a/test/commitbt.lm
+++ b/test/commitbt.lm
@@ -93,7 +93,7 @@ token item
{
M: str = input.pull(match_length)
parse_stop S: sub[input]
- input.push( make_token( typeid<item> M S.tree ) )
+ input.push( make_token( typeid<item> M S ) )
}
def stuff
@@ -101,7 +101,7 @@ def stuff
| [sub]
parse S: stuff[ stdin ]
-print_xml( S.tree )
+print_xml( S )
print( '\n' )
##### IN #####
1 2 3 * !
diff --git a/test/concat1.lm b/test/concat1.lm
index 4a549a8f..c43ab0d2 100644
--- a/test/concat1.lm
+++ b/test/concat1.lm
@@ -42,8 +42,7 @@ def start
start parseStart( InputFile: stream )
{
- parse P: start[ InputFile ]
- return P.tree
+ return parse start[ InputFile ]
}
start parseTxt( T: str )
diff --git a/test/concat2.lm b/test/concat2.lm
index 35aa478c..d7d1da9e 100644
--- a/test/concat2.lm
+++ b/test/concat2.lm
@@ -43,8 +43,7 @@ def start
start parseStart( InputFile: stream )
{
- parse P: start[ InputFile ]
- return P.tree
+ return parse start[ InputFile ]
}
start parseTxt( T: str )
diff --git a/test/constructex.lm b/test/constructex.lm
index f21e36b9..b372e473 100644
--- a/test/constructex.lm
+++ b/test/constructex.lm
@@ -23,7 +23,7 @@ def item
parse PersonTag: tag[ stdin ]
-match PersonTag.tree
+match PersonTag
["<person name=" Val:id attr*">" item* "</person>"]
NameTag1: tag = construct tag
diff --git a/test/context1.lm b/test/context1.lm
index dda54b69..a112ca12 100644
--- a/test/context1.lm
+++ b/test/context1.lm
@@ -28,8 +28,7 @@ context ctx
end # ctx
CTX: ctx = cons ctx[]
-parse InputP: ctx::start( CTX ) [ stdin ]
-Input: ctx::start = InputP.tree
+parse Input: ctx::start( CTX ) [ stdin ]
print( Input '\n' )
##### IN #####
a b c ( d e f )
diff --git a/test/context2.lm b/test/context2.lm
index e222e1df..e0c59efa 100644
--- a/test/context2.lm
+++ b/test/context2.lm
@@ -31,10 +31,10 @@ context ruby_here
parse_stop HereData: here_data(ctx)[ input ]
# Push the rest-of-line data back to the input stream.
- input.push( $ROL.tree )
+ input.push( $ROL )
# Send the here_id token. Attach the heredoc data as an attribute.
- input.push( make_token( typeid<here_id> HereId HereData.tree ) )
+ input.push( make_token( typeid<here_id> HereId HereData ) )
}
end
@@ -92,8 +92,7 @@ end # ruby_here
CTX: ruby_here = cons ruby_here []
-parse SP: ruby_here::start( CTX ) [ stdin ]
-S: ruby_here::start = SP.tree
+parse S: ruby_here::start( CTX ) [ stdin ]
print_xml(S)
print('\n')
##### IN #####
diff --git a/test/context3.lm b/test/context3.lm
index f7486c78..795e9347 100644
--- a/test/context3.lm
+++ b/test/context3.lm
@@ -37,8 +37,7 @@ context ctx
end # ctx
CTX: ctx = cons ctx []
-parse InputP: ctx::start( CTX ) [stdin]
-Input: ctx::start = InputP.tree
+parse Input: ctx::start( CTX ) [stdin]
print( Input '\n' )
diff --git a/test/export1.lm b/test/export1.lm
index 8f42cec3..253b688d 100644
--- a/test/export1.lm
+++ b/test/export1.lm
@@ -11,6 +11,6 @@ export Start: start
export Error: str
parse P: start[ stdin ]
-Error = P.error
+Error = error
##### IN #####
##### EXP #####
diff --git a/test/forloop1.lm b/test/forloop1.lm
index 777cf703..3ed07489 100644
--- a/test/forloop1.lm
+++ b/test/forloop1.lm
@@ -8,7 +8,7 @@ def start
[id*]
parse P: start[stdin]
-Start: start = P.tree
+Start: start = P
for Id: id in Start
print( Id '\n' )
##### IN #####
diff --git a/test/forloop2.lm b/test/forloop2.lm
index da6ad5d6..bf25f42a 100644
--- a/test/forloop2.lm
+++ b/test/forloop2.lm
@@ -8,7 +8,7 @@ def start
[id*]
parse P: start[stdin]
-Start: start = P.tree
+Start: start = P
for Id: id in triter(Start)
print( Id '\n' )
##### IN #####
diff --git a/test/forloop3.lm b/test/forloop3.lm
index e1a1fa3e..bccc1399 100644
--- a/test/forloop3.lm
+++ b/test/forloop3.lm
@@ -8,7 +8,7 @@ def start
[id*]
parse P: start[stdin]
-Start: start = P.tree
+Start: start = P
for Id: id in triter(Start) {
print( Id )
print( '\n' )
diff --git a/test/func3.lm b/test/func3.lm
index a4eaaf52..59198e30 100644
--- a/test/func3.lm
+++ b/test/func3.lm
@@ -22,8 +22,7 @@ int func( P: program )
int main()
{
- parse PP: program[ stdin ]
- P: program = PP.tree
+ parse P: program[ stdin ]
func( P )
}
diff --git a/test/generate1.lm b/test/generate1.lm
index db47b76d..8d965f3c 100644
--- a/test/generate1.lm
+++ b/test/generate1.lm
@@ -738,11 +738,11 @@ Generate.newline_sent = 0
parse S: generate::start(Generate)[ stdin ]
print( '*** SUCCESS ***\n' )
-print( ^S.tree '\n' )
+print( ^S '\n' )
print( '***\n' )
-print_stmts( S.tree )
-print_target_subscriptions_and_slicings( S.tree )
-print_primary_subscriptions_and_slicings( S.tree )
+print_stmts( S )
+print_target_subscriptions_and_slicings( S )
+print_primary_subscriptions_and_slicings( S )
print( '*** SUCCESS ***\n' )
##### IN #####
diff --git a/test/generate2.lm b/test/generate2.lm
index a1694a27..6c7f3e12 100644
--- a/test/generate2.lm
+++ b/test/generate2.lm
@@ -197,8 +197,7 @@ Generate.OpenStack = construct list<generate::open_item> []
Sentinal: generate::open_item = construct generate::open_item( '** SENTINAL **' 1 ) []
Generate.OpenStack.push( Sentinal )
-parse SP: generate::start(Generate)[stdin]
-S: generate::start = SP.tree
+parse S: generate::start(Generate)[stdin]
if S {
for I: generate::external_link in S
diff --git a/test/heredoc.lm b/test/heredoc.lm
index b773bf99..05bf3008 100644
--- a/test/heredoc.lm
+++ b/test/heredoc.lm
@@ -46,7 +46,7 @@ end # heredoc
cons HereDoc: heredoc[]
parse S: heredoc::start(HereDoc)[stdin]
-print_xml(S.tree)
+print_xml(S)
print( '\n' )
##### IN #####
hello
diff --git a/test/ignore1.lm b/test/ignore1.lm
index 5795c2da..5843d871 100644
--- a/test/ignore1.lm
+++ b/test/ignore1.lm
@@ -45,10 +45,10 @@ def item_list
parse Attrs: attr_list[ stdin ]
-print( %Attrs.tree '\n' )
+print( %Attrs '\n' )
construct IL: item_list
- ["<wrapper .[Attrs.tree]. ></wrapper>"]
+ ["<wrapper .[Attrs]. ></wrapper>"]
print( IL '\n' )
##### IN #####
diff --git a/test/ignore2.lm b/test/ignore2.lm
index 0dbe1c69..bf708185 100644
--- a/test/ignore2.lm
+++ b/test/ignore2.lm
@@ -12,8 +12,7 @@ def item
def start
[item*]
-parse InputP: start[ stdin ]
-Input: start = InputP.tree
+parse Input: start[ stdin ]
cons Output: accum<start> []
diff --git a/test/ignore3.lm b/test/ignore3.lm
index a0ed2319..8f0e2cf1 100644
--- a/test/ignore3.lm
+++ b/test/ignore3.lm
@@ -22,8 +22,7 @@ def item
def start
[item* ';']
-parse StartP: start[ stdin ]
-Start: start = StartP.tree
+parse Start: start[ stdin ]
if ( ! Start ) {
print( 'parse error\n' )
diff --git a/test/ignore4.lm b/test/ignore4.lm
index 3dc37a8e..9f0b2567 100644
--- a/test/ignore4.lm
+++ b/test/ignore4.lm
@@ -43,12 +43,11 @@ end # lang
parse Input: lang::start[ stdin ]
-if ! Input.tree
- print( Input.error '\n' )
+if ! Input
+ print( error '\n' )
else {
#print( Input.tree '\n' )
- S: lang::start = Input.tree
- for H: lang::statement in S {
+ for H: lang::statement in Input {
require H [ lang::'#' hash::hash ]
print( '--' %H '==\n' )
}
diff --git a/test/ignore5.lm b/test/ignore5.lm
index d49464d4..0b6ce916 100644
--- a/test/ignore5.lm
+++ b/test/ignore5.lm
@@ -24,8 +24,7 @@ def item
def start
[item* ';']
-parse StartP: start[ stdin ]
-Start: start = StartP.tree
+parse Start: start[ stdin ]
if ( ! Start ) {
print( 'parse error\n' )
diff --git a/test/inpush1.lm b/test/inpush1.lm
index 9db49490..d48b0987 100644
--- a/test/inpush1.lm
+++ b/test/inpush1.lm
@@ -53,9 +53,9 @@ namespace lang
token hash /'#'/ {
parse_stop H: hash::hash[ input ]
- if ( H.tree ) {
- if ( H.tree.Inc ) {
- FN: str = unquote( H.tree.Inc )
+ if ( H ) {
+ if ( H.Inc ) {
+ FN: str = unquote( H.Inc )
print( 'opening ' FN '\n' )
IS: stream = open( FN 'r' )
if ( ! IS ) {
@@ -67,11 +67,11 @@ namespace lang
}
else {
parse_stop L: rest_of_line[ input ]
- if ! L.tree {
- print( "ERROR: stuck: " L.error )
+ if ! L {
+ print( "ERROR: stuck: " error )
exit(1)
}
- print( "ERROR: failed to parse # directive: " L.tree )
+ print( "ERROR: failed to parse # directive: " L )
}
}
end
@@ -90,12 +90,10 @@ end # lang
parse Input: lang::start[ stdin ]
-if ! Input.tree
- print( Input.error '\n' )
+if ! Input
+ print( error '\n' )
else {
- #print( Input.tree '\n' )
- S: lang::start = Input.tree
- print( Input.tree '\n' )
+ print( Input '\n' )
}
##### IN #####
diff --git a/test/island.lm b/test/island.lm
index 0639e0b6..2f5f8dd8 100644
--- a/test/island.lm
+++ b/test/island.lm
@@ -50,7 +50,7 @@ def start
[top_item*]
parse S: start[ stdin ]
-print_xml( S.tree )
+print_xml( S )
print( '\n' )
#pattern start
diff --git a/test/lhs1.lm b/test/lhs1.lm
index bed3cb48..99499abe 100644
--- a/test/lhs1.lm
+++ b/test/lhs1.lm
@@ -31,7 +31,7 @@ def start
| [B item* ';\n']
parse Start: start[ stdin ]
-print( Start.tree "\n" )
+print( Start "\n" )
##### IN #####
a b c ( d1 d2 ) e f g ;
##### EXP #####
diff --git a/test/liftattrs.lm b/test/liftattrs.lm
index 3f3d0d88..8931e045 100644
--- a/test/liftattrs.lm
+++ b/test/liftattrs.lm
@@ -44,7 +44,7 @@ def item_list
| []
parse ILP: item_list[stdin]
-IL: item_list = ILP.tree
+IL: item_list = ILP
# Get the item list
match IL [RootItemList: item_list]
diff --git a/test/lookup1.lm b/test/lookup1.lm
index ad72385d..88768639 100644
--- a/test/lookup1.lm
+++ b/test/lookup1.lm
@@ -2185,10 +2185,9 @@ Lookup.qualNs.push( nil )
Lookup.templDecl.push( 0 )
Lookup.declarationData.push( construct lookup::declaration_data( 0 0 0 ) [] )
-parse SP: lookup::start( Lookup )[ stdin ]
-S: lookup::start = SP.tree
+parse S: lookup::start( Lookup )[ stdin ]
if ! S {
- print( SP.error )
+ print( error )
exit( 1 )
}
diff --git a/test/mailbox.lm b/test/mailbox.lm
index 4cf5fb11..ca3b9a9c 100644
--- a/test/mailbox.lm
+++ b/test/mailbox.lm
@@ -41,7 +41,7 @@ def start
[message*]
parse S: start[ stdin ]
-print_xml( S.tree )
+print_xml( S )
print( '\n' )
##### IN #####
From thurston Tue Jan 2 21:16:50 2007
diff --git a/test/matchex.lm b/test/matchex.lm
index 9542f809..7bdacd30 100644
--- a/test/matchex.lm
+++ b/test/matchex.lm
@@ -24,10 +24,10 @@ def item
parse Tag: tag[ stdin ]
# Style: List of literal text and types.
-match Tag.tree ["<person name=" Val1:id attr*">" item* "</person>"]
+match Tag ["<person name=" Val1:id attr*">" item* "</person>"]
# Style: Literal text with embedded lists of types.
-match Tag.tree "<person name=[Val2:id attr*]>[item*]</person>"
+match Tag "<person name=[Val2:id attr*]>[item*]</person>"
print( ^Val1 '\n' )
print( ^Val2 '\n' )
diff --git a/test/maxlen.lm b/test/maxlen.lm
index 481a3fac..2d220d18 100644
--- a/test/maxlen.lm
+++ b/test/maxlen.lm
@@ -49,7 +49,7 @@ cons MaxLen: maxlen[]
MaxLen.allow = 3
parse S: maxlen::start(MaxLen)[stdin]
-print_xml( S.tree )
+print_xml( S )
print('\n')
##### IN #####
a b c d e f g
diff --git a/test/multiregion1.lm b/test/multiregion1.lm
index c80f612c..5c8bdea4 100644
--- a/test/multiregion1.lm
+++ b/test/multiregion1.lm
@@ -48,8 +48,7 @@ def file_diff
def start
[file_diff*]
-parse SP: start[ stdin ]
-S: start = SP.tree
+parse S: start[ stdin ]
for OF: old_file in S {
# Get the first word and check if it is
diff --git a/test/multiregion2.lm b/test/multiregion2.lm
index 61455ba8..2d5a99b7 100644
--- a/test/multiregion2.lm
+++ b/test/multiregion2.lm
@@ -69,11 +69,10 @@ def header
def request
[request_line header* CRLF]
-parse RP: request*[ stdin ]
-R: request* = RP.tree
+parse R: request*[ stdin ]
if !R {
- print( RP.error )
+ print( error )
exit( 1 )
}
diff --git a/test/namespace1.lm b/test/namespace1.lm
index eadaba14..a608fe11 100644
--- a/test/namespace1.lm
+++ b/test/namespace1.lm
@@ -11,7 +11,7 @@ namespace n1
end
parse P: n1::start[stdin]
-print( P.tree '\n' )
+print( P '\n' )
##### IN #####
a
b
diff --git a/test/nestedcomm.lm b/test/nestedcomm.lm
index 381c5c22..405a5198 100644
--- a/test/nestedcomm.lm
+++ b/test/nestedcomm.lm
@@ -14,8 +14,8 @@ lex
token open_paren /'('/
{
parse_stop NC: nested_comment[ stdin ]
- print( %NC.tree '\n' )
- input.push_ignore( NC.tree )
+ print( %NC '\n' )
+ input.push_ignore( NC )
}
end
@@ -37,8 +37,7 @@ def nested_comment
def nested [id*]
-parse NP: nested[ stdin ]
-P: nested = NP.tree
+parse P: nested[ stdin ]
print( ^P '\n' )
print_xml( ^P )
diff --git a/test/order1.lm b/test/order1.lm
index f4a6998f..eb3c7859 100644
--- a/test/order1.lm
+++ b/test/order1.lm
@@ -81,8 +81,7 @@ def port
[]
# Parse the input.
-parse PP: program[ stdin ]
-P: program = PP.tree
+parse P: program[ stdin ]
Output: output Output = construct output []
diff --git a/test/order2.lm b/test/order2.lm
index e057bbca..9a8da921 100644
--- a/test/order2.lm
+++ b/test/order2.lm
@@ -88,7 +88,7 @@ parse P: program[ stdin ]
Output: output Output = construct output []
# Take off the leading C from the input file and send it out.
-match P.tree [C: c '%%' protocol*]
+match P [C: c '%%' protocol*]
Output << [$C]
Output <<
diff --git a/test/parse1.lm b/test/parse1.lm
index ec3ebd1c..d6abd79c 100644
--- a/test/parse1.lm
+++ b/test/parse1.lm
@@ -7,7 +7,7 @@ end
def start [id*]
parse S: start[stdin]
-print( S.tree '\n' )
+print( S '\n' )
##### IN #####
ab cd ef
##### EXP #####
diff --git a/test/prints.lm b/test/prints.lm
index 1a72d216..bcfc4026 100644
--- a/test/prints.lm
+++ b/test/prints.lm
@@ -9,8 +9,8 @@ def start
parse Start: start[stdin]
-prints( stderr 'fd stderr: ' Start.tree '\n' )
-prints( stdout 'fd stdout: ' Start.tree '\n' )
+prints( stderr 'fd stderr: ' Start '\n' )
+prints( stdout 'fd stdout: ' Start '\n' )
##### IN #####
a b c
##### EXP #####
diff --git a/test/rediv.lm b/test/rediv.lm
index 8a0a139c..a4a0b88a 100644
--- a/test/rediv.lm
+++ b/test/rediv.lm
@@ -82,8 +82,7 @@ def start
[statement*]
-parse SP: start[ stdin ]
-S: start = SP.tree
+parse S: start[ stdin ]
for I:orlit_item in S {
if match I [orlit_chr] {
diff --git a/test/reor1.lm b/test/reor1.lm
index 94576af2..87a7525a 100644
--- a/test/reor1.lm
+++ b/test/reor1.lm
@@ -10,7 +10,7 @@ def item [id] | [number]
def start [item*]
parse P: start[stdin]
-print( P.tree '\n' )
+print( P '\n' )
##### IN #####
ab cd ef
##### EXP #####
diff --git a/test/reor2.lm b/test/reor2.lm
index fe839f11..4b3c1207 100644
--- a/test/reor2.lm
+++ b/test/reor2.lm
@@ -17,7 +17,7 @@ end
cons Undo: undo[]
parse Input: undo::start( Undo )[ stdin ]
-print( Input.tree )
+print( Input )
##### IN #####
a b;
##### EXP #####
diff --git a/test/reparse.lm b/test/reparse.lm
index 32ed191e..2308b764 100644
--- a/test/reparse.lm
+++ b/test/reparse.lm
@@ -14,11 +14,11 @@ def start
parse Input: item*[ stdin ]
-S: start = cons start[ Input.tree ]
+S: start = cons start[ Input ]
-parse Again: start[ %Input.tree ]
+parse Again: start[ %Input ]
-print( %Again.tree )
+print( %Again )
##### IN #####
a b c ( chocolate fudge ) d e
diff --git a/test/repeat1.lm b/test/repeat1.lm
index af6374d8..45e9750c 100644
--- a/test/repeat1.lm
+++ b/test/repeat1.lm
@@ -14,7 +14,7 @@ def start
parse Input: start[ stdin ]
-match Input.tree [ItemList: item*]
+match Input [ItemList: item*]
for I: item* in repeat( ItemList )
print( ^I '\n' )
diff --git a/test/repeat2.lm b/test/repeat2.lm
index 39ffe53b..e001d8fb 100644
--- a/test/repeat2.lm
+++ b/test/repeat2.lm
@@ -236,8 +236,8 @@ def start
[preamble chapter*]
parse Start: start[ stdin ]
-if ( ! Start.tree ) {
- print( Start.error '\n' )
+if ( ! Start ) {
+ print( error '\n' )
exit( 1 )
}
@@ -396,7 +396,7 @@ int printLines( Lines: line* )
}
}
-match Start.tree
+match Start
[Preamble: preamble Chapters: chapter*]
Title: title = title in Preamble
diff --git a/test/rhsref1.lm b/test/rhsref1.lm
index 445116be..4ea15a0d 100644
--- a/test/rhsref1.lm
+++ b/test/rhsref1.lm
@@ -87,8 +87,7 @@ def labelled_statement
def goto_statement
['goto' id ';']
-parse PP: program[stdin]
-P: program = PP.tree
+parse P: program[stdin]
for E: expression in P {
print( ^(E.Term.Factor.Primary) '\n' )
diff --git a/test/rubyhere.lm b/test/rubyhere.lm
index 1ead1f6e..7d5113e4 100644
--- a/test/rubyhere.lm
+++ b/test/rubyhere.lm
@@ -30,10 +30,10 @@ context rubyhere
parse_stop HereData: here_data(ctx)[ input ]
# Push the rest-of-line data back to the input stream.
- input.push( $ROL.tree )
+ input.push( $ROL )
# Send the here_id token. Attach the heredoc data as an attribute.
- input.push( make_token( typeid<here_id> HereId HereData.tree ) )
+ input.push( make_token( typeid<here_id> HereId HereData ) )
}
end
@@ -90,8 +90,7 @@ end # rubyhere
cons RubyHere: rubyhere[]
-parse SP: rubyhere::start(RubyHere)[ stdin ]
-S: rubyhere::start = SP.tree
+parse S: rubyhere::start(RubyHere)[ stdin ]
print_xml(S)
print('\n')
diff --git a/test/string.lm b/test/string.lm
index fa2b8173..4cc5e86a 100644
--- a/test/string.lm
+++ b/test/string.lm
@@ -50,7 +50,7 @@ def start
}
parse S: start[stdin]
-print_xml( S.tree )
+print_xml( S )
print( '\n' )
##### IN #####
a + "%{{"; 1 * 2;
diff --git a/test/superid.lm b/test/superid.lm
index 2736c66d..2e707492 100644
--- a/test/superid.lm
+++ b/test/superid.lm
@@ -60,7 +60,7 @@ end # si
cons SuperId: si[]
parse S: si::start(SuperId)[stdin]
-print_xml( S.tree )
+print_xml( S )
print( '\n' )
##### IN #####
!a b b a;
diff --git a/test/tags2.lm b/test/tags2.lm
index 9a5c132e..2c22f326 100644
--- a/test/tags2.lm
+++ b/test/tags2.lm
@@ -149,8 +149,7 @@ def document
def start
[document]
-parse SP: start[stdin]
-S: start = SP.tree
+parse S: start[stdin]
for Switch:tag in S {
if match Switch
diff --git a/test/tags3.lm b/test/tags3.lm
index 651598a9..c2082e21 100644
--- a/test/tags3.lm
+++ b/test/tags3.lm
@@ -288,7 +288,7 @@ context tags
# parse CloseId: close_id[ TagId.data ]
#
# CloseTag: opt_close_tag =
-# construct opt_close_tag ['</' CloseId.tree '>']
+# construct opt_close_tag ['</' CloseId '>']
#
# # Close the tag and put inside after it.
# TL = construct item
@@ -302,7 +302,7 @@ cons Tags: tags[]
Tags.TagStack = construct tags::tag_stack []
parse HTML_P: tags::start(Tags)[ stdin ]
-HTML: tags::start = HTML_P.tree
+HTML: tags::start = HTML_P
flatten( HTML )
print_xml( HTML )
printLinks( HTML )
diff --git a/test/tags4.lm b/test/tags4.lm
index 15655a10..491be4f1 100644
--- a/test/tags4.lm
+++ b/test/tags4.lm
@@ -324,8 +324,8 @@ end # tags
cons Tags: tags[]
Tags.TagStack = construct tags::tag_stack []
-HTML: parser<tags::start> = parse tags::start(Tags)[ stdin ]
-print( HTML.tree )
+parse HTML: tags::start(Tags)[ stdin ]
+print( HTML )
#print_xml( HTML )
#for C: close_tag in HTML
diff --git a/test/til.lm b/test/til.lm
index 0f00f692..92257f33 100644
--- a/test/til.lm
+++ b/test/til.lm
@@ -87,8 +87,7 @@ def labelled_statement
def goto_statement
['goto' id ';']
-parse PP: program[stdin]
-P: program = PP.tree
+parse P: program[stdin]
#for S:statement* in P
#{
diff --git a/test/translate1.lm b/test/translate1.lm
index b3c88e2c..555f2328 100644
--- a/test/translate1.lm
+++ b/test/translate1.lm
@@ -20,7 +20,7 @@ def start
[item*]
parse Input: start[ stdin ]
-print( %Input.tree )
+print( %Input )
##### IN #####
a b ( c d ) e f
diff --git a/test/translate2.lm b/test/translate2.lm
index 4ccaacf0..8412eafa 100644
--- a/test/translate2.lm
+++ b/test/translate2.lm
@@ -48,10 +48,9 @@ context ctx
end # ctx
CTX: ctx = cons ctx []
-parse InputP: ctx::start( CTX ) [ stdin ]
-Input: ctx::start = InputP.tree
-
+parse Input: ctx::start( CTX ) [ stdin ]
print( Input )
+
##### IN #####
a b c ( d1 ... d2 ) e f g ;
##### EXP #####
diff --git a/test/travs1.lm b/test/travs1.lm
index b753a3c5..83240ba8 100644
--- a/test/travs1.lm
+++ b/test/travs1.lm
@@ -63,8 +63,7 @@ def factor
def alphabet_num
[uint]
-parse SP: start[stdin]
-S: start = SP.tree
+parse S: start[stdin]
#
# Top-Down, Left-Right
diff --git a/test/treecmp1.lm b/test/treecmp1.lm
index 178f10d7..3bd5b23f 100644
--- a/test/treecmp1.lm
+++ b/test/treecmp1.lm
@@ -13,8 +13,7 @@ def four_ids
B: id = construct id "b"
-parse InputP: four_ids[ stdin ]
-Input: four_ids = InputP.tree
+parse Input: four_ids[ stdin ]
for Id: id in Input {
if ( Id == B )
diff --git a/test/typeref1.lm b/test/typeref1.lm
index 789f48c2..df49abfe 100644
--- a/test/typeref1.lm
+++ b/test/typeref1.lm
@@ -13,7 +13,7 @@ namespace n1
end
parse P: n1::n2::id*[stdin]
-print( P.tree '\n' )
+print( P '\n' )
##### IN #####
##### EXP #####
diff --git a/test/typeref2.lm b/test/typeref2.lm
index 0a5f053b..99dfc190 100644
--- a/test/typeref2.lm
+++ b/test/typeref2.lm
@@ -13,7 +13,7 @@ namespace n1
end
parse P: n1::n2::id+[stdin]
-print( P.tree '\n' )
+print( P '\n' )
##### IN #####
##### EXP #####
diff --git a/test/typeref3.lm b/test/typeref3.lm
index caa90480..638e8ac8 100644
--- a/test/typeref3.lm
+++ b/test/typeref3.lm
@@ -13,7 +13,7 @@ namespace n1
end
parse P: n1::n2::id?[stdin]
-print( P.tree '\n' )
+print( P '\n' )
##### IN #####
##### EXP #####
diff --git a/test/undofrag1.lm b/test/undofrag1.lm
index cdf1d539..4cd23a7e 100644
--- a/test/undofrag1.lm
+++ b/test/undofrag1.lm
@@ -49,8 +49,7 @@ CTX: ctx = cons ctx []
CTX.SP = cons parser<start2> []
send CTX.SP "a b{c}"
-parse InputParser: ctx::start1( CTX )[stdin]
-Input: ctx::start1 = InputParser.tree
+parse Input: ctx::start1( CTX )[stdin]
send CTX.SP "{e}f g"
diff --git a/test/undofrag2.lm b/test/undofrag2.lm
index cb25b444..35e5f5c5 100644
--- a/test/undofrag2.lm
+++ b/test/undofrag2.lm
@@ -41,9 +41,9 @@ end # undo
cons Undo: undo[]
Undo.Out = construct parser<undo::out> []
-parse InputP: undo::start(Undo)[ stdin ]
-Input: undo::start = InputP.tree
+parse Input: undo::start(Undo)[ stdin ]
print( Input )
+
##### IN #####
a b c;
##### EXP #####
diff --git a/test/undofrag3.lm b/test/undofrag3.lm
index 75ffd3c5..b8ca8fb7 100644
--- a/test/undofrag3.lm
+++ b/test/undofrag3.lm
@@ -47,7 +47,8 @@ cons Undo: undo[]
Undo.Out = construct parser<undo::out> []
parse Input: undo::start(Undo)[ stdin ]
-print( Input.tree )
+print( Input )
+
##### IN #####
a . ;
##### EXP #####