summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/accum1.lm5
-rw-r--r--test/accumbt2.lm4
-rw-r--r--test/accumbt3.lm4
-rw-r--r--test/ambig1.lm3
-rw-r--r--test/backtrack1.lm3
-rw-r--r--test/context1.lm3
-rw-r--r--test/context2.lm3
-rw-r--r--test/context3.lm3
-rw-r--r--test/func.lm3
-rw-r--r--test/multiregion1.lm3
-rw-r--r--test/nestedcomm.lm3
-rw-r--r--test/order1.lm3
-rw-r--r--test/ragelambig1.lm2
-rw-r--r--test/ragelambig2.lm2
-rw-r--r--test/ragelambig3.lm2
-rw-r--r--test/ragelambig4.lm2
-rw-r--r--test/rediv.lm3
-rw-r--r--test/rubyhere.lm4
-rw-r--r--test/tags1.lm2
-rw-r--r--test/til.lm3
-rw-r--r--test/translate2.lm3
-rw-r--r--test/travs1.lm3
-rw-r--r--test/treecmp1.lm4
-rw-r--r--test/undofrag1.lm3
-rw-r--r--test/undofrag2.lm3
-rw-r--r--test/undofrag3.lm5
26 files changed, 50 insertions, 31 deletions
diff --git a/test/accum1.lm b/test/accum1.lm
index 186125a3..98d56786 100644
--- a/test/accum1.lm
+++ b/test/accum1.lm
@@ -12,11 +12,12 @@ def item
def start
[item*]
-Input: start = parse start( stdin )
+parse Input: start[ stdin ]
+InputTree: start = Input.tree
cons Output: accum<start> []
-for Id: id in Input {
+for Id: id in InputTree {
send Output
"( [^Id] )
}
diff --git a/test/accumbt2.lm b/test/accumbt2.lm
index 9ad872f7..0758d378 100644
--- a/test/accumbt2.lm
+++ b/test/accumbt2.lm
@@ -33,8 +33,8 @@ lex two
| [A2 item2* ';' '\n']
}
-Two: two =
- parse two( stdin )
+parse TwoP: two[ stdin ]
+Two: two = TwoP.tree
send OneParser ['\n']
diff --git a/test/accumbt3.lm b/test/accumbt3.lm
index 7e43da05..7a709f2f 100644
--- a/test/accumbt3.lm
+++ b/test/accumbt3.lm
@@ -74,8 +74,8 @@ lex two
[A2 item* ';' '\n']
}
-Two: two =
- parse two( stdin )
+parse TwoP: two[ stdin ]
+Two: two = TwoP.tree
Nested: nested = NestedParser.finish()
diff --git a/test/ambig1.lm b/test/ambig1.lm
index ef31d900..562b155f 100644
--- a/test/ambig1.lm
+++ b/test/ambig1.lm
@@ -598,7 +598,8 @@ def paren_args
# Grammar finished
#
-parse R: ruby(stdin)
+parse RP: ruby[stdin]
+R: ruby = RP.tree
print_xml( R )
diff --git a/test/backtrack1.lm b/test/backtrack1.lm
index 2ad62ad8..7fccebd8 100644
--- a/test/backtrack1.lm
+++ b/test/backtrack1.lm
@@ -19,6 +19,7 @@ def E
def start
[E]
-parse S: start( stdin )
+parse SP: start[ stdin ]
+S: start = SP.tree
R: start = match S ~ 9 + 9
print_xml( R )
diff --git a/test/context1.lm b/test/context1.lm
index 6f703956..3f77f38d 100644
--- a/test/context1.lm
+++ b/test/context1.lm
@@ -29,5 +29,6 @@ context ctx
}
CTX: ctx = cons ctx[]
-Input: ctx::start = parse ctx::start( CTX stdin )
+parse InputP: ctx::start( CTX ) [ stdin ]
+Input: ctx::start = InputP.tree
print( Input '\n' )
diff --git a/test/context2.lm b/test/context2.lm
index 8dd8bb25..09a150eb 100644
--- a/test/context2.lm
+++ b/test/context2.lm
@@ -93,6 +93,7 @@ context ruby_here
CTX: ruby_here = cons ruby_here []
-S: ruby_here::start = parse ruby_here::start( CTX stdin )
+parse SP: ruby_here::start( CTX ) [ stdin ]
+S: ruby_here::start = SP.tree
print_xml(S)
print('\n')
diff --git a/test/context3.lm b/test/context3.lm
index 8a6e8f57..09baeb5b 100644
--- a/test/context3.lm
+++ b/test/context3.lm
@@ -36,7 +36,8 @@ context ctx
}
CTX: ctx = cons ctx []
-Input: ctx::start = parse ctx::start( CTX stdin )
+parse InputP: ctx::start( CTX ) [stdin]
+Input: ctx::start = InputP.tree
print( Input '\n' )
diff --git a/test/func.lm b/test/func.lm
index 61665140..9ae8485c 100644
--- a/test/func.lm
+++ b/test/func.lm
@@ -25,7 +25,8 @@ int func( P: program )
int main()
{
InputFile: stream = open( 'func.in' "r" )
- P: program = parse program( InputFile )
+ parse PP: program[ InputFile ]
+ P: program = PP.tree
func( P )
print( P '\n' )
}
diff --git a/test/multiregion1.lm b/test/multiregion1.lm
index 7a75fd9b..226c7e86 100644
--- a/test/multiregion1.lm
+++ b/test/multiregion1.lm
@@ -48,7 +48,8 @@ def file_diff
def start
[file_diff*]
-parse S: start( stdin )
+parse SP: start[ stdin ]
+P: start = SP.tree
for OF: old_file in S {
# Get the first word and check if it is
diff --git a/test/nestedcomm.lm b/test/nestedcomm.lm
index e01be456..d0e9f32b 100644
--- a/test/nestedcomm.lm
+++ b/test/nestedcomm.lm
@@ -38,7 +38,8 @@ def nested_comment
def nested [id*]
-P: nested = parse nested( stdin )
+parse NP: nested[ stdin ]
+P: nested = NP.tree
print( ^P '\n' )
print_xml( ^P )
diff --git a/test/order1.lm b/test/order1.lm
index 8c025d31..635c6429 100644
--- a/test/order1.lm
+++ b/test/order1.lm
@@ -82,7 +82,8 @@ def port
[]
# Parse the input.
-P: program = parse program( stdin )
+program = parse PP: program[ stdin ]
+P: program = PP.tree
Output: output Output = construct output []
diff --git a/test/ragelambig1.lm b/test/ragelambig1.lm
index 3c94a569..17418958 100644
--- a/test/ragelambig1.lm
+++ b/test/ragelambig1.lm
@@ -63,6 +63,6 @@ def alphabet_num
[uint]
| ['-' uint]
-parse start( stdin )
+parse start[ stdin ]
print( '\n' )
diff --git a/test/ragelambig2.lm b/test/ragelambig2.lm
index aa5945e6..adbbba0a 100644
--- a/test/ragelambig2.lm
+++ b/test/ragelambig2.lm
@@ -64,5 +64,5 @@ def alphabet_num
[uint]
| ['-' uint]
-parse start( stdin )
+parse start[ stdin ]
print( '\n' )
diff --git a/test/ragelambig3.lm b/test/ragelambig3.lm
index db5c4561..3749e428 100644
--- a/test/ragelambig3.lm
+++ b/test/ragelambig3.lm
@@ -64,5 +64,5 @@ def alphabet_num
[uint]
| ['-' uint]
-parse start( stdin )
+parse start[ stdin ]
print( '\n' )
diff --git a/test/ragelambig4.lm b/test/ragelambig4.lm
index f98200ed..6778eddc 100644
--- a/test/ragelambig4.lm
+++ b/test/ragelambig4.lm
@@ -68,5 +68,5 @@ def alphabet_num
[uint]
| ['-' uint]
-parse start( stdin )
+parse start[ stdin ]
print( '\n' )
diff --git a/test/rediv.lm b/test/rediv.lm
index 423d8e01..7c8b40ac 100644
--- a/test/rediv.lm
+++ b/test/rediv.lm
@@ -84,7 +84,8 @@ def start
[statement*]
-S: start = parse start( stdin )
+parse SP: start[ stdin ]
+S: start = SP.tree
for I:orlit_item in S {
if match I [orlit_chr] {
diff --git a/test/rubyhere.lm b/test/rubyhere.lm
index 0ce0c54e..ea5425cf 100644
--- a/test/rubyhere.lm
+++ b/test/rubyhere.lm
@@ -88,6 +88,8 @@ def item
def start
[item*]
-S: start = parse start( stdin )
+parse SP: start[ stdin ]
+S: start = SP.tree
+
print_xml(S)
print('\n')
diff --git a/test/tags1.lm b/test/tags1.lm
index 1dcf387d..e96d4b8c 100644
--- a/test/tags1.lm
+++ b/test/tags1.lm
@@ -80,4 +80,4 @@ def start
print( 'failed\n' )
}
-parse start(stdin)
+parse start[stdin]
diff --git a/test/til.lm b/test/til.lm
index dba96c1d..d5bc7d28 100644
--- a/test/til.lm
+++ b/test/til.lm
@@ -87,7 +87,8 @@ def labelled_statement
def goto_statement
['goto' id ';']
-P: program = parse program(stdin)
+parse PP: program[stdin]
+P: program = PP.tree
#for S:statement* in P
#{
diff --git a/test/translate2.lm b/test/translate2.lm
index c5baa396..61630757 100644
--- a/test/translate2.lm
+++ b/test/translate2.lm
@@ -49,6 +49,7 @@ context ctx
}
CTX: ctx = cons ctx []
-Input: ctx::start = parse ctx::start( CTX stdin )
+parse InputP: ctx::start( CTX ) [ stdin ]
+Input: ctx::start = InputP.tree
print( Input )
diff --git a/test/travs1.lm b/test/travs1.lm
index c02ac0ec..88986629 100644
--- a/test/travs1.lm
+++ b/test/travs1.lm
@@ -63,7 +63,8 @@ def factor
def alphabet_num
[uint]
-S: start = parse start(stdin)
+parse SP: start[stdin]
+S: start = SP.tree
#
# Top-Down, Left-Right
diff --git a/test/treecmp1.lm b/test/treecmp1.lm
index debdf6b2..2fd40cb5 100644
--- a/test/treecmp1.lm
+++ b/test/treecmp1.lm
@@ -12,7 +12,9 @@ def four_ids
[id id id id]
B: id = construct id "b"
-Input: four_ids = parse four_ids( stdin )
+
+parse InputP: four_ids[ stdin ]
+Input: four_ids = InputP.tree
for Id: id in Input {
if ( Id == B )
diff --git a/test/undofrag1.lm b/test/undofrag1.lm
index 2f2d4d04..0ad51643 100644
--- a/test/undofrag1.lm
+++ b/test/undofrag1.lm
@@ -47,7 +47,8 @@ context ctx
send SP "a b{c}"
CTX: ctx = cons ctx []
-Input: ctx::start = parse ctx::start( CTX stdin )
+parse InputP: ctx::start( CTX )[stdin]
+Input: ctx::start = InputP.tree
send SP "{e}f g"
diff --git a/test/undofrag2.lm b/test/undofrag2.lm
index 82a9a104..7804dfe3 100644
--- a/test/undofrag2.lm
+++ b/test/undofrag2.lm
@@ -34,5 +34,6 @@ def start
[A1 item* '^']
| [A2 item* ';' '\n']
-Input: start = parse start( stdin )
+parse InputP: start[ stdin ]
+Input: start = InputP.tree
print( Input )
diff --git a/test/undofrag3.lm b/test/undofrag3.lm
index 3fbd7d2b..eca2b509 100644
--- a/test/undofrag3.lm
+++ b/test/undofrag3.lm
@@ -35,10 +35,9 @@ def F
print_xml( Out() )
}
-
def start
[A1 item* F '.' '^']
| [A2 item* F '.' ';' '\n']
-Input: start = parse start( stdin )
-print( Input )
+parse Input: start[ stdin ]
+print( Input.tree )