diff options
Diffstat (limited to 'test')
94 files changed, 529 insertions, 429 deletions
diff --git a/test/accum1.exp b/test/accum1.exp deleted file mode 100644 index 8fc764d1..00000000 --- a/test/accum1.exp +++ /dev/null @@ -1,7 +0,0 @@ -( a ) -( b ) -( c ) -( chocolate ) -( fudge ) -( d ) -( e ) diff --git a/test/accum1.in b/test/accum1.in deleted file mode 100644 index 678337aa..00000000 --- a/test/accum1.in +++ /dev/null @@ -1 +0,0 @@ -a b c ( chocolate fudge ) d e diff --git a/test/accum1.lm b/test/accum1.lm index b3beb821..4c5ea960 100644 --- a/test/accum1.lm +++ b/test/accum1.lm @@ -1,3 +1,4 @@ +##### LM ##### lex ignore /space+/ literal '*', '(', ')' @@ -24,3 +25,13 @@ for Id: id in InputTree { S: start = Output() print( S '\n' ) +##### IN ##### +a b c ( chocolate fudge ) d e +##### EXP ##### +( a ) +( b ) +( c ) +( chocolate ) +( fudge ) +( d ) +( e ) diff --git a/test/accum2.exp b/test/accum2.exp deleted file mode 100644 index 3130281a..00000000 --- a/test/accum2.exp +++ /dev/null @@ -1 +0,0 @@ -a b c ( d e f ) diff --git a/test/accum2.in b/test/accum2.in deleted file mode 100644 index 3130281a..00000000 --- a/test/accum2.in +++ /dev/null @@ -1 +0,0 @@ -a b c ( d e f ) diff --git a/test/accum2.lm b/test/accum2.lm index 6f640b3a..c276e1f6 100644 --- a/test/accum2.lm +++ b/test/accum2.lm @@ -1,3 +1,4 @@ +##### LM ##### context ctx i: int @@ -31,3 +32,7 @@ SP.ctx = cons ctx [] send SP [stdin] Input: ctx::start = SP() print( Input '\n' ) +##### IN ##### +a b c ( d e f ) +##### EXP ##### +a b c ( d e f ) diff --git a/test/accum3.args b/test/accum3.args deleted file mode 100644 index 60188194..00000000 --- a/test/accum3.args +++ /dev/null @@ -1 +0,0 @@ --qv -h -o output sdf -i eth0 file diff --git a/test/accum3.exp b/test/accum3.exp deleted file mode 100644 index 23d6422f..00000000 --- a/test/accum3.exp +++ /dev/null @@ -1 +0,0 @@ -<args><word>./accum3.bin</word><zero>�</zero><_repeat_item><item><_literal_0001>-</_literal_0001><_repeat_single><single>q</single><single>v</single></_repeat_single><zero>�</zero></item><item><_literal_0001>-</_literal_0001><_repeat_single><single>h</single></_repeat_single><zero>�</zero></item><item><_literal_0001>-</_literal_0001><with_opt>o</with_opt><_opt_zero><zero>�</zero></_opt_zero><word>output</word><zero>�</zero></item><item><file>sdf</file><zero>�</zero></item><item><_literal_0001>-</_literal_0001><with_opt>i</with_opt><_opt_zero><zero>�</zero></_opt_zero><word>eth0</word><zero>�</zero></item><item><file>file</file><zero>�</zero></item></_repeat_item></args>
\ No newline at end of file diff --git a/test/accum3.lm b/test/accum3.lm index 54c1c3b4..b86f5635 100644 --- a/test/accum3.lm +++ b/test/accum3.lm @@ -1,3 +1,4 @@ +##### LM ##### lex literal '-' token file /^('-'|0)(^0)*/ @@ -28,5 +29,8 @@ for A: str in ArgV Args: args = ArgParser() print_xml( Args ) - - +print( '\n' ) +##### ARGS ##### +-qv -h -o output sdf -i eth0 file +##### EXP ##### +<args><word>./working/accum3.bin</word><zero>�</zero><_repeat_item><item><_literal_0001>-</_literal_0001><_repeat_single><single>q</single><single>v</single></_repeat_single><zero>�</zero></item><item><_literal_0001>-</_literal_0001><_repeat_single><single>h</single></_repeat_single><zero>�</zero></item><item><_literal_0001>-</_literal_0001><with_opt>o</with_opt><_opt_zero><zero>�</zero></_opt_zero><word>output</word><zero>�</zero></item><item><file>sdf</file><zero>�</zero></item><item><_literal_0001>-</_literal_0001><with_opt>i</with_opt><_opt_zero><zero>�</zero></_opt_zero><word>eth0</word><zero>�</zero></item><item><file>file</file><zero>�</zero></item></_repeat_item></args> diff --git a/test/accumbt2.exp b/test/accumbt2.exp deleted file mode 100644 index 121ed23c..00000000 --- a/test/accumbt2.exp +++ /dev/null @@ -1,4 +0,0 @@ -A1 -A2 -a b c d e ; -extra a extra b extra c extra d extra e diff --git a/test/accumbt2.in b/test/accumbt2.in deleted file mode 100644 index 12626d93..00000000 --- a/test/accumbt2.in +++ /dev/null @@ -1 +0,0 @@ -a b c d e ; diff --git a/test/accumbt2.lm b/test/accumbt2.lm index ad41b285..53f91dcd 100644 --- a/test/accumbt2.lm +++ b/test/accumbt2.lm @@ -1,3 +1,4 @@ +##### LM ##### context accum_bt lex @@ -44,3 +45,10 @@ send AccumBt.OneParser ['\n'] print( Two ) print( ^( AccumBt.OneParser.finish() ) '\n' ) +##### IN ##### +a b c d e ; +##### EXP ##### +A1 +A2 +a b c d e ; +extra a extra b extra c extra d extra e diff --git a/test/accumbt3.exp b/test/accumbt3.exp deleted file mode 100644 index 74c54485..00000000 --- a/test/accumbt3.exp +++ /dev/null @@ -1,9 +0,0 @@ -A1 -discarding: ( (this is a nested comment /*sdf asd_++_stuff) ) -A2 -discarding: ( (this is a nested comment /*sdf asd_++_stuff) ) - ------------- -hello there and this is not -hello there ( (this is a nested comment /*sdf asd_++_stuff) ) and this is not ; - diff --git a/test/accumbt3.in b/test/accumbt3.in deleted file mode 100644 index febc57b1..00000000 --- a/test/accumbt3.in +++ /dev/null @@ -1 +0,0 @@ -hello there ( (this is a nested comment /*sdf asd_++_stuff) ) and this is not ; diff --git a/test/accumbt3.lm b/test/accumbt3.lm index 28a7fd16..c34758ab 100644 --- a/test/accumbt3.lm +++ b/test/accumbt3.lm @@ -1,3 +1,4 @@ +##### LM ##### # # Tokens # @@ -90,3 +91,15 @@ print( '\n------------\n' ) print( ^Nested '\n' ) print( ^Two '\n' ) +##### IN ##### +hello there ( (this is a nested comment /*sdf asd_++_stuff) ) and this is not ; +##### EXP ##### +A1 +discarding: ( (this is a nested comment /*sdf asd_++_stuff) ) +A2 +discarding: ( (this is a nested comment /*sdf asd_++_stuff) ) + +------------ +hello there and this is not +hello there ( (this is a nested comment /*sdf asd_++_stuff) ) and this is not ; + diff --git a/test/backtrack2.exp b/test/backtrack2.exp deleted file mode 100644 index 09055ecb..00000000 --- a/test/backtrack2.exp +++ /dev/null @@ -1 +0,0 @@ -<start><prods><two><bang2>!</bang2><id>aa</id><id>bb</id><id>cc</id><id>dd</id></two></prods></start>
\ No newline at end of file diff --git a/test/backtrack2.in b/test/backtrack2.in deleted file mode 100644 index 9f821562..00000000 --- a/test/backtrack2.in +++ /dev/null @@ -1 +0,0 @@ -!aa bb cc dd
\ No newline at end of file diff --git a/test/backtrack2.lm b/test/backtrack2.lm index 6bd67a41..3cdbbbda 100644 --- a/test/backtrack2.lm +++ b/test/backtrack2.lm @@ -1,3 +1,4 @@ +##### LM ##### # Token names. lex @@ -21,3 +22,8 @@ def start parse S: start[ stdin ] print_xml( match S.tree "!aa bb cc dd" ) +print( '\n' ) +##### IN ##### +!aa bb cc dd +##### EXP ##### +<start><prods><two><bang2>!</bang2><id>aa</id><id>bb</id><id>cc</id><id>dd</id></two></prods></start> diff --git a/test/backtrack3.exp b/test/backtrack3.exp deleted file mode 100644 index c315ba6d..00000000 --- a/test/backtrack3.exp +++ /dev/null @@ -1 +0,0 @@ -<start><prefix><id>id</id></prefix><choice1><number>77</number></choice1><choice2><number>88</number></choice2><string>"hello"</string><id>dude</id><id>dude</id></start>
\ No newline at end of file diff --git a/test/backtrack3.in b/test/backtrack3.in deleted file mode 100644 index 40242aeb..00000000 --- a/test/backtrack3.in +++ /dev/null @@ -1 +0,0 @@ -id 77 88 "hello" dude dude diff --git a/test/backtrack3.lm b/test/backtrack3.lm index 6aca30dd..8c6dfc36 100644 --- a/test/backtrack3.lm +++ b/test/backtrack3.lm @@ -1,3 +1,4 @@ +##### LM ##### # Token names. lex @@ -26,3 +27,8 @@ def start } parse start[stdin] +print( '\n' ) +##### IN ##### +id 77 88 "hello" dude dude +##### EXP ##### +<start><prefix><id>id</id></prefix><choice1><number>77</number></choice1><choice2><number>88</number></choice2><string>"hello"</string><id>dude</id><id>dude</id></start> diff --git a/test/btscan1.exp b/test/btscan1.exp deleted file mode 100644 index 09c7af65..00000000 --- a/test/btscan1.exp +++ /dev/null @@ -1 +0,0 @@ -<btscan><_repeat_item><item><r2::line><r2::_literal_0009>!</r2::_literal_0009><r2::id>abb</r2::id></r2::line></item><item><r1::line><r1::_literal_0001>!</r1::_literal_0001><r1::_literal_0003>a</r1::_literal_0003><r1::_literal_0005>b</r1::_literal_0005><r1::_literal_0005>b</r1::_literal_0005><r1::_literal_0003>a</r1::_literal_0003></r1::line></item><item><r2::line><r2::_literal_0009>!</r2::_literal_0009><r2::id>aab</r2::id></r2::line></item></_repeat_item></btscan> diff --git a/test/btscan1.in b/test/btscan1.in deleted file mode 100644 index 88cec9d5..00000000 --- a/test/btscan1.in +++ /dev/null @@ -1,2 +0,0 @@ -!abb !abba !aab - diff --git a/test/btscan1.lm b/test/btscan1.lm index c123bec7..f5240cdc 100644 --- a/test/btscan1.lm +++ b/test/btscan1.lm @@ -1,3 +1,4 @@ +##### LM ##### # # R1 # @@ -39,3 +40,8 @@ parse P: btscan[ stdin ] match P.tree ~!abb !abba !aab print_xml(P.tree) print( '\n' ) +##### IN ##### +!abb !abba !aab + +##### EXP ##### +<btscan><_repeat_item><item><r2::line><r2::_literal_0009>!</r2::_literal_0009><r2::id>abb</r2::id></r2::line></item><item><r1::line><r1::_literal_0001>!</r1::_literal_0001><r1::_literal_0003>a</r1::_literal_0003><r1::_literal_0005>b</r1::_literal_0005><r1::_literal_0005>b</r1::_literal_0005><r1::_literal_0003>a</r1::_literal_0003></r1::line></item><item><r2::line><r2::_literal_0009>!</r2::_literal_0009><r2::id>aab</r2::id></r2::line></item></_repeat_item></btscan> diff --git a/test/btscan2.exp b/test/btscan2.exp deleted file mode 100644 index d16fbbde..00000000 --- a/test/btscan2.exp +++ /dev/null @@ -1 +0,0 @@ -<btscan><_repeat_item><item><r2::line><r2::_literal_0009>!</r2::_literal_0009><r2::id>abb</r2::id></r2::line></item><item><r1::line><r1::_literal_0001>!</r1::_literal_0001><r1::_literal_0003>a</r1::_literal_0003><r1::_literal_0005>b</r1::_literal_0005><r1::_literal_0005>b</r1::_literal_0005><r1::_literal_0003>a</r1::_literal_0003></r1::line></item><item><r2::line><r2::_literal_0009>!</r2::_literal_0009><r2::id>aab</r2::id></r2::line></item></_repeat_item></btscan>
\ No newline at end of file diff --git a/test/btscan2.lm b/test/btscan2.lm index 095f550d..04a023a6 100644 --- a/test/btscan2.lm +++ b/test/btscan2.lm @@ -1,3 +1,4 @@ +##### LM ##### namespace r1 lex @@ -36,3 +37,6 @@ send Parser "!ab" send Parser "ba !aab\n" print_xml( Parser() ) +print( '\n' ) +##### EXP ##### +<btscan><_repeat_item><item><r2::line><r2::_literal_0009>!</r2::_literal_0009><r2::id>abb</r2::id></r2::line></item><item><r1::line><r1::_literal_0001>!</r1::_literal_0001><r1::_literal_0003>a</r1::_literal_0003><r1::_literal_0005>b</r1::_literal_0005><r1::_literal_0005>b</r1::_literal_0005><r1::_literal_0003>a</r1::_literal_0003></r1::line></item><item><r2::line><r2::_literal_0009>!</r2::_literal_0009><r2::id>aab</r2::id></r2::line></item></_repeat_item></btscan> diff --git a/test/call1.exp b/test/call1.exp deleted file mode 100644 index 45a4fb75..00000000 --- a/test/call1.exp +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/test/call1.lm b/test/call1.lm index f0d1d2e2..82f6c761 100644 --- a/test/call1.lm +++ b/test/call1.lm @@ -1,3 +1,4 @@ +##### LM ##### int f1( i: int j: int ) { return i + j @@ -12,3 +13,5 @@ int main() } main() +##### EXP ##### +8 diff --git a/test/commitbt.exp b/test/commitbt.exp deleted file mode 100644 index 373661d3..00000000 --- a/test/commitbt.exp +++ /dev/null @@ -1 +0,0 @@ -<stuff><_repeat_item><item>1</item></_repeat_item><_literal_000d>!</_literal_000d></stuff> diff --git a/test/commitbt.in b/test/commitbt.in deleted file mode 100644 index d9371754..00000000 --- a/test/commitbt.in +++ /dev/null @@ -1 +0,0 @@ -1 2 3 * ! diff --git a/test/commitbt.lm b/test/commitbt.lm index e409fe1c..542ffcf4 100644 --- a/test/commitbt.lm +++ b/test/commitbt.lm @@ -1,3 +1,4 @@ +##### LM ##### # 2010: I'm not sure what the following means. # @@ -102,3 +103,7 @@ def stuff parse S: stuff[ stdin ] print_xml( S.tree ) print( '\n' ) +##### IN ##### +1 2 3 * ! +##### EXP ##### +<stuff><_repeat_item><item>1</item></_repeat_item><_literal_000d>!</_literal_000d></stuff> diff --git a/test/concat1.exp b/test/concat1.exp deleted file mode 100644 index e69de29b..00000000 --- a/test/concat1.exp +++ /dev/null diff --git a/test/concat1.in b/test/concat1.in deleted file mode 100644 index 9d02b37e..00000000 --- a/test/concat1.in +++ /dev/null @@ -1,6 +0,0 @@ - -%% - -type foo - -include smtp.vpt diff --git a/test/concat1.lm b/test/concat1.lm index e8453939..4a549a8f 100644 --- a/test/concat1.lm +++ b/test/concat1.lm @@ -1,3 +1,4 @@ +##### LM ##### lex literal 'type', 'include' @@ -91,3 +92,11 @@ int main() } main() +##### IN ##### + +%% + +type foo + +include smtp.vpt +##### EXP ##### diff --git a/test/concat2.exp b/test/concat2.exp deleted file mode 100644 index e69de29b..00000000 --- a/test/concat2.exp +++ /dev/null diff --git a/test/concat2.in b/test/concat2.in deleted file mode 100644 index 32195f5d..00000000 --- a/test/concat2.in +++ /dev/null @@ -1,4 +0,0 @@ - -%% - -include smtp.vpt diff --git a/test/concat2.lm b/test/concat2.lm index e8edfd82..35aa478c 100644 --- a/test/concat2.lm +++ b/test/concat2.lm @@ -1,3 +1,4 @@ +##### LM ##### lex @@ -92,3 +93,9 @@ int main() } main() +##### IN ##### + +%% + +include smtp.vpt +##### EXP ##### diff --git a/test/construct1.exp b/test/construct1.exp deleted file mode 100644 index 24217b4d..00000000 --- a/test/construct1.exp +++ /dev/null @@ -1 +0,0 @@ -<four_ids><id>a</id><id>b</id><id>c</id><id>d</id></four_ids>
\ No newline at end of file diff --git a/test/construct1.lm b/test/construct1.lm index 9813bc33..ee9b36b3 100644 --- a/test/construct1.lm +++ b/test/construct1.lm @@ -1,3 +1,4 @@ +##### LM ##### rl ident_pattern /[a-zA-Z_][a-zA-Z_0-9]*/ rl number_pattern /[0-9]+/ @@ -12,4 +13,7 @@ def four_ids Constructed: four_ids = construct four_ids "a b c d" print_xml( Constructed ) +print( '\n' ) +##### EXP ##### +<four_ids><id>a</id><id>b</id><id>c</id><id>d</id></four_ids> diff --git a/test/construct2.exp b/test/construct2.exp deleted file mode 100644 index 3774da60..00000000 --- a/test/construct2.exp +++ /dev/null @@ -1 +0,0 @@ -a b c diff --git a/test/construct2.lm b/test/construct2.lm index 2f9af821..a2549b34 100644 --- a/test/construct2.lm +++ b/test/construct2.lm @@ -1,3 +1,4 @@ +##### LM ##### lex ignore /[ \t\n]+/ @@ -8,3 +9,5 @@ end def lang [id*] print( construct lang "a b c" '\n' ) +##### EXP ##### +a b c diff --git a/test/construct3.exp b/test/construct3.exp deleted file mode 100644 index d1d36017..00000000 --- a/test/construct3.exp +++ /dev/null @@ -1 +0,0 @@ -a ( b1 b2 ) c diff --git a/test/construct3.lm b/test/construct3.lm index a6977d96..bccda0de 100644 --- a/test/construct3.lm +++ b/test/construct3.lm @@ -1,3 +1,4 @@ +##### LM ##### lex ignore /[ \t\n]+/ @@ -13,3 +14,5 @@ def lang [item*] B: bigger = construct bigger "( b1 b2 )" print( construct lang "a [B] c" '\n' ) +##### EXP ##### +a ( b1 b2 ) c diff --git a/test/constructex.exp b/test/constructex.exp deleted file mode 100644 index ea4af716..00000000 --- a/test/constructex.exp +++ /dev/null @@ -1,2 +0,0 @@ -<name type=person>adrian</name> -<name type=person>adrian</name> diff --git a/test/constructex.in b/test/constructex.in deleted file mode 100644 index f458f2ad..00000000 --- a/test/constructex.in +++ /dev/null @@ -1,3 +0,0 @@ -<person name=adrian hometown=kingston> - <t1 foo=bar2 e=f></t2> -</person>
\ No newline at end of file diff --git a/test/constructex.lm b/test/constructex.lm index f41cb5c1..f21e36b9 100644 --- a/test/constructex.lm +++ b/test/constructex.lm @@ -1,3 +1,4 @@ +##### LM ##### lex token id /[a-zA-Z_][a-zA-Z0-9_]*/ literal '=', '<', '>', '/' @@ -34,3 +35,10 @@ NameTag2: tag = construct tag print( NameTag1 '\n' ) print( NameTag2 '\n' ) +##### IN ##### +<person name=adrian hometown=kingston> + <t1 foo=bar2 e=f></t2> +</person> +##### EXP ##### +<name type=person>adrian</name> +<name type=person>adrian</name> diff --git a/test/context1.exp b/test/context1.exp deleted file mode 100644 index 03c53bf2..00000000 --- a/test/context1.exp +++ /dev/null @@ -1,2 +0,0 @@ -2 -a b c ( d e f ) diff --git a/test/context1.in b/test/context1.in deleted file mode 100644 index 3130281a..00000000 --- a/test/context1.in +++ /dev/null @@ -1 +0,0 @@ -a b c ( d e f ) diff --git a/test/context1.lm b/test/context1.lm index b652ed3a..dda54b69 100644 --- a/test/context1.lm +++ b/test/context1.lm @@ -1,3 +1,4 @@ +##### LM ##### context ctx i: int j: int @@ -30,3 +31,8 @@ CTX: ctx = cons ctx[] parse InputP: ctx::start( CTX ) [ stdin ] Input: ctx::start = InputP.tree print( Input '\n' ) +##### IN ##### +a b c ( d e f ) +##### EXP ##### +2 +a b c ( d e f ) diff --git a/test/context2.exp b/test/context2.exp deleted file mode 100644 index 20f1a117..00000000 --- a/test/context2.exp +++ /dev/null @@ -1,9 +0,0 @@ -<ruby_here::start><ruby_here::_repeat_item><ruby_here::item><ruby_here::statement><ruby_here::call><ruby_here::id>print</ruby_here::id><ruby_here::_literal_000d>(</ruby_here::_literal_000d><ruby_here::_opt_arglist><ruby_here::arglist><ruby_here::primary><ruby_here::heredoc><ruby_here::_literal_0007><<</ruby_here::_literal_0007><ruby_here::here_id>DATA1</ruby_here::here_id></ruby_here::heredoc></ruby_here::primary><ruby_here::_repeat_arglist_more><ruby_here::arglist_more><ruby_here::_literal_000b>,</ruby_here::_literal_000b><ruby_here::primary><ruby_here::id>more</ruby_here::id></ruby_here::primary></ruby_here::arglist_more><ruby_here::arglist_more><ruby_here::_literal_000b>,</ruby_here::_literal_000b><ruby_here::primary><ruby_here::heredoc><ruby_here::_literal_0007><<</ruby_here::_literal_0007><ruby_here::here_id>DATA2</ruby_here::here_id></ruby_here::heredoc></ruby_here::primary></ruby_here::arglist_more><ruby_here::arglist_more><ruby_here::_literal_000b>,</ruby_here::_literal_000b><ruby_here::primary><ruby_here::number>99</ruby_here::number></ruby_here::primary></ruby_here::arglist_more></ruby_here::_repeat_arglist_more></ruby_here::arglist></ruby_here::_opt_arglist><ruby_here::_literal_000f>)</ruby_here::_literal_000f></ruby_here::call></ruby_here::statement><ruby_here::_literal_0011>!</ruby_here::_literal_0011></ruby_here::item><ruby_here::item><ruby_here::foobar>print( <<DATA1, more, <<DATA2, 99 ) -"&^#(@ almost -!arbitrary text! -DATA1 -hello -world -DATA2 -# error here -</ruby_here::foobar></ruby_here::item></ruby_here::_repeat_item></ruby_here::start> diff --git a/test/context2.in b/test/context2.in deleted file mode 100644 index 0ce5becb..00000000 --- a/test/context2.in +++ /dev/null @@ -1,16 +0,0 @@ -print( <<DATA1, more, <<DATA2, 99 ) -"&^#(@ almost -!arbitrary text! -DATA1 -hello -world -DATA2 -! -print( <<DATA1, more, <<DATA2, 99 ) -"&^#(@ almost -!arbitrary text! -DATA1 -hello -world -DATA2 -# error here diff --git a/test/context2.lm b/test/context2.lm index 1a8ebe96..e222e1df 100644 --- a/test/context2.lm +++ b/test/context2.lm @@ -1,3 +1,4 @@ +##### LM ##### context ruby_here rl ident_pattern /[a-zA-Z_][a-zA-Z_0-9]*/ @@ -95,3 +96,30 @@ parse SP: ruby_here::start( CTX ) [ stdin ] S: ruby_here::start = SP.tree print_xml(S) print('\n') +##### IN ##### +print( <<DATA1, more, <<DATA2, 99 ) +"&^#(@ almost +!arbitrary text! +DATA1 +hello +world +DATA2 +! +print( <<DATA1, more, <<DATA2, 99 ) +"&^#(@ almost +!arbitrary text! +DATA1 +hello +world +DATA2 +# error here +##### EXP ##### +<ruby_here::start><ruby_here::_repeat_item><ruby_here::item><ruby_here::statement><ruby_here::call><ruby_here::id>print</ruby_here::id><ruby_here::_literal_000d>(</ruby_here::_literal_000d><ruby_here::_opt_arglist><ruby_here::arglist><ruby_here::primary><ruby_here::heredoc><ruby_here::_literal_0007><<</ruby_here::_literal_0007><ruby_here::here_id>DATA1</ruby_here::here_id></ruby_here::heredoc></ruby_here::primary><ruby_here::_repeat_arglist_more><ruby_here::arglist_more><ruby_here::_literal_000b>,</ruby_here::_literal_000b><ruby_here::primary><ruby_here::id>more</ruby_here::id></ruby_here::primary></ruby_here::arglist_more><ruby_here::arglist_more><ruby_here::_literal_000b>,</ruby_here::_literal_000b><ruby_here::primary><ruby_here::heredoc><ruby_here::_literal_0007><<</ruby_here::_literal_0007><ruby_here::here_id>DATA2</ruby_here::here_id></ruby_here::heredoc></ruby_here::primary></ruby_here::arglist_more><ruby_here::arglist_more><ruby_here::_literal_000b>,</ruby_here::_literal_000b><ruby_here::primary><ruby_here::number>99</ruby_here::number></ruby_here::primary></ruby_here::arglist_more></ruby_here::_repeat_arglist_more></ruby_here::arglist></ruby_here::_opt_arglist><ruby_here::_literal_000f>)</ruby_here::_literal_000f></ruby_here::call></ruby_here::statement><ruby_here::_literal_0011>!</ruby_here::_literal_0011></ruby_here::item><ruby_here::item><ruby_here::foobar>print( <<DATA1, more, <<DATA2, 99 ) +"&^#(@ almost +!arbitrary text! +DATA1 +hello +world +DATA2 +# error here +</ruby_here::foobar></ruby_here::item></ruby_here::_repeat_item></ruby_here::start> diff --git a/test/context3.exp b/test/context3.exp deleted file mode 100644 index bcdb3cef..00000000 --- a/test/context3.exp +++ /dev/null @@ -1,2 +0,0 @@ -3 -a b c ( d ) e f diff --git a/test/context3.in b/test/context3.in deleted file mode 100644 index a2ffca71..00000000 --- a/test/context3.in +++ /dev/null @@ -1 +0,0 @@ -a b c ( d ) e f
\ No newline at end of file diff --git a/test/context3.lm b/test/context3.lm index 3b04e9ae..f7486c78 100644 --- a/test/context3.lm +++ b/test/context3.lm @@ -1,3 +1,4 @@ +##### LM ##### context ctx i: int @@ -41,3 +42,8 @@ Input: ctx::start = InputP.tree print( Input '\n' ) +##### IN ##### +a b c ( d ) e f +##### EXP ##### +3 +a b c ( d ) e f diff --git a/test/counting1.exp b/test/counting1.exp deleted file mode 100644 index 6533151b..00000000 --- a/test/counting1.exp +++ /dev/null @@ -1,11 +0,0 @@ -num items: 3 - item 1: 1 - item 2: b - item 3: c -num items: 1 - item 1: 1 -num items: 0 -num items: 3 - item 1: a - item 2: b - item 3: c diff --git a/test/counting1.in b/test/counting1.in deleted file mode 100644 index 45eeecde..00000000 --- a/test/counting1.in +++ /dev/null @@ -1 +0,0 @@ -3 1 b c 1 1 0 3 a b c diff --git a/test/counting1.lm b/test/counting1.lm index ef35603e..83e70d5c 100644 --- a/test/counting1.lm +++ b/test/counting1.lm @@ -1,3 +1,4 @@ +##### LM ##### context counting # @@ -92,3 +93,17 @@ end # counting cons Counting: counting[] parse counting::start(Counting)[ stdin ] +##### IN ##### +3 1 b c 1 1 0 3 a b c +##### EXP ##### +num items: 3 + item 1: 1 + item 2: b + item 3: c +num items: 1 + item 1: 1 +num items: 0 +num items: 3 + item 1: a + item 2: b + item 3: c diff --git a/test/counting2.exp b/test/counting2.exp deleted file mode 100644 index 6533151b..00000000 --- a/test/counting2.exp +++ /dev/null @@ -1,11 +0,0 @@ -num items: 3 - item 1: 1 - item 2: b - item 3: c -num items: 1 - item 1: 1 -num items: 0 -num items: 3 - item 1: a - item 2: b - item 3: c diff --git a/test/counting2.in b/test/counting2.in deleted file mode 100644 index 45eeecde..00000000 --- a/test/counting2.in +++ /dev/null @@ -1 +0,0 @@ -3 1 b c 1 1 0 3 a b c diff --git a/test/counting2.lm b/test/counting2.lm index 9dacf083..0ca75bed 100644 --- a/test/counting2.lm +++ b/test/counting2.lm @@ -1,3 +1,4 @@ +##### LM ##### # # Regular Definitions @@ -81,3 +82,17 @@ def start } parse start[ stdin ] +##### IN ##### +3 1 b c 1 1 0 3 a b c +##### EXP ##### +num items: 3 + item 1: 1 + item 2: b + item 3: c +num items: 1 + item 1: 1 +num items: 0 +num items: 3 + item 1: a + item 2: b + item 3: c diff --git a/test/counting3.exp b/test/counting3.exp deleted file mode 100644 index ab4c5d1e..00000000 --- a/test/counting3.exp +++ /dev/null @@ -1,30 +0,0 @@ -target: 3 -ITEM -ITEM -ITEM -ITEM -trying: 3 for: 3 -target: 1 -ITEM -ITEM -trying: 1 for: 1 -target: 0 -ITEM -trying: 0 for: 0 -target: 3 -ITEM -ITEM -ITEM -trying: 3 for: 3 -num items: 3 - item 1: 1 - item 2: b - item 3: c -num items: 1 - item 1: 1 -num items: 0 -num items: 3 - item 1: a - item 2: b - item 3: c -*** SUCCESS *** diff --git a/test/counting3.in b/test/counting3.in deleted file mode 100644 index 45eeecde..00000000 --- a/test/counting3.in +++ /dev/null @@ -1 +0,0 @@ -3 1 b c 1 1 0 3 a b c diff --git a/test/counting3.lm b/test/counting3.lm index a8b77863..64c26042 100644 --- a/test/counting3.lm +++ b/test/counting3.lm @@ -1,3 +1,4 @@ +##### LM ##### context counting # @@ -94,3 +95,36 @@ end # counting cons Counting: counting[] parse counting::start(Counting)[ stdin ] +##### IN ##### +3 1 b c 1 1 0 3 a b c +##### EXP ##### +target: 3 +ITEM +ITEM +ITEM +ITEM +trying: 3 for: 3 +target: 1 +ITEM +ITEM +trying: 1 for: 1 +target: 0 +ITEM +trying: 0 for: 0 +target: 3 +ITEM +ITEM +ITEM +trying: 3 for: 3 +num items: 3 + item 1: 1 + item 2: b + item 3: c +num items: 1 + item 1: 1 +num items: 0 +num items: 3 + item 1: a + item 2: b + item 3: c +*** SUCCESS *** diff --git a/test/counting4.exp b/test/counting4.exp deleted file mode 100644 index 38c1bf0b..00000000 --- a/test/counting4.exp +++ /dev/null @@ -1,16 +0,0 @@ -target: 3 -target: 1 -target: 0 -target: 3 -num items: 3 - item 1: 1 - item 2: b - item 3: c -num items: 1 - item 1: 1 -num items: 0 -num items: 3 - item 1: a - item 2: b - item 3: c -*** SUCCESS *** diff --git a/test/counting4.in b/test/counting4.in deleted file mode 100644 index 45eeecde..00000000 --- a/test/counting4.in +++ /dev/null @@ -1 +0,0 @@ -3 1 b c 1 1 0 3 a b c diff --git a/test/counting4.lm b/test/counting4.lm index 74e733b9..2fc863f1 100644 --- a/test/counting4.lm +++ b/test/counting4.lm @@ -1,3 +1,4 @@ +##### LM ##### context counting # @@ -89,3 +90,22 @@ end # counting cons Counting: counting[] parse counting::start(Counting)[stdin] +##### IN ##### +3 1 b c 1 1 0 3 a b c +##### EXP ##### +target: 3 +target: 1 +target: 0 +target: 3 +num items: 3 + item 1: 1 + item 2: b + item 3: c +num items: 1 + item 1: 1 +num items: 0 +num items: 3 + item 1: a + item 2: b + item 3: c +*** SUCCESS *** diff --git a/test/generate1.exp b/test/generate1.exp deleted file mode 100644 index 8376e747..00000000 --- a/test/generate1.exp +++ /dev/null @@ -1,136 +0,0 @@ -*** SUCCESS *** - -hello -def dude(): - yes - awesome; - - # Here we have a comment - def realy_awesome(): # hi there - in_more - - same_level - def one_liner(): first; second # both inside one_liner - - back_down - -last_statement - -# dude, this is a comment - # some more -hello -if 1: - yes - awesome; - - # Here we have a comment - if ('hello'): # hi there - in_more - - same_level - if ['dude', 'dudess'].horsie(): first; second # both inside one_liner - 1 - - back_down - -last_statement - -hello = 1.1(20); - -# subscription -a[1] = b[2]; - -# simple slicing -c[1:1] = d[2:2]; - -# simple slicing -e[1:1, 2:2] = f[3:3, 4:4]; -*** -STMT: hello -STMT: def dude(): - yes - awesome; - - # Here we have a comment - def realy_awesome(): # hi there - in_more - - same_level - def one_liner(): first; second # both inside one_liner - - back_down - -STMT: yes -STMT: awesome; - - # Here we have a comment -STMT: def realy_awesome(): # hi there - in_more - - same_level - def one_liner(): first; second # both inside one_liner - -STMT: in_more - -STMT: same_level -STMT: def one_liner(): first; second # both inside one_liner - -STMT: back_down - -STMT: last_statement - -# dude, this is a comment - # some more -STMT: hello -STMT: if 1: - yes - awesome; - - # Here we have a comment - if ('hello'): # hi there - in_more - - same_level - if ['dude', 'dudess'].horsie(): first; second # both inside one_liner - 1 - - back_down - -STMT: yes -STMT: awesome; - - # Here we have a comment -STMT: if ('hello'): # hi there - in_more - - same_level - if ['dude', 'dudess'].horsie(): first; second # both inside one_liner - 1 - -STMT: in_more - -STMT: same_level -STMT: if ['dude', 'dudess'].horsie(): first; second # both inside one_liner -STMT: 1 - -STMT: back_down - -STMT: last_statement - -STMT: hello = 1.1(20); - -# subscription -STMT: a[1] = b[2]; - -# simple slicing -STMT: c[1:1] = d[2:2]; - -# simple slicing -STMT: e[1:1, 2:2] = f[3:3, 4:4]; -TARGET SUBSCRIPTION: [1] -TARGET SIMPLE SLICING: [1:1] -TARGET EXTENDED SLICING: [1:1, 2:2] -PRIMARY SUBSCRIPTION: [2] -PRIMARY SIMPLE SLICING: [2:2] -PRIMARY EXTENDED SLICING: [3:3, 4:4] -*** SUCCESS *** diff --git a/test/generate1.in b/test/generate1.in deleted file mode 100644 index 0e5b920a..00000000 --- a/test/generate1.in +++ /dev/null @@ -1,48 +0,0 @@ - -# dude, this is a comment - # some more -hello -def dude(): - yes - awesome; - - # Here we have a comment - def realy_awesome(): # hi there - in_more - - same_level - def one_liner(): first; second # both inside one_liner - - back_down - -last_statement - -# dude, this is a comment - # some more -hello -if 1: - yes - awesome; - - # Here we have a comment - if ('hello'): # hi there - in_more - - same_level - if ['dude', 'dudess'].horsie(): first; second # both inside one_liner - 1 - - back_down - -last_statement - -hello = 1.1(20); - -# subscription -a[1] = b[2]; - -# simple slicing -c[1:1] = d[2:2]; - -# simple slicing -e[1:1, 2:2] = f[3:3, 4:4]; diff --git a/test/generate1.lm b/test/generate1.lm index 99890ba0..db47b76d 100644 --- a/test/generate1.lm +++ b/test/generate1.lm @@ -1,3 +1,4 @@ +##### LM ##### context generate # Regular definitions rl ident_char /[a-zA-Z_]/ @@ -743,3 +744,189 @@ print_stmts( S.tree ) print_target_subscriptions_and_slicings( S.tree ) print_primary_subscriptions_and_slicings( S.tree ) print( '*** SUCCESS ***\n' ) +##### IN ##### + +# dude, this is a comment + # some more +hello +def dude(): + yes + awesome; + + # Here we have a comment + def realy_awesome(): # hi there + in_more + + same_level + def one_liner(): first; second # both inside one_liner + + back_down + +last_statement + +# dude, this is a comment + # some more +hello +if 1: + yes + awesome; + + # Here we have a comment + if ('hello'): # hi there + in_more + + same_level + if ['dude', 'dudess'].horsie(): first; second # both inside one_liner + 1 + + back_down + +last_statement + +hello = 1.1(20); + +# subscription +a[1] = b[2]; + +# simple slicing +c[1:1] = d[2:2]; + +# simple slicing +e[1:1, 2:2] = f[3:3, 4:4]; +##### EXP ##### +*** SUCCESS *** + +hello +def dude(): + yes + awesome; + + # Here we have a comment + def realy_awesome(): # hi there + in_more + + same_level + def one_liner(): first; second # both inside one_liner + + back_down + +last_statement + +# dude, this is a comment + # some more +hello +if 1: + yes + awesome; + + # Here we have a comment + if ('hello'): # hi there + in_more + + same_level + if ['dude', 'dudess'].horsie(): first; second # both inside one_liner + 1 + + back_down + +last_statement + +hello = 1.1(20); + +# subscription +a[1] = b[2]; + +# simple slicing +c[1:1] = d[2:2]; + +# simple slicing +e[1:1, 2:2] = f[3:3, 4:4]; +*** +STMT: hello +STMT: def dude(): + yes + awesome; + + # Here we have a comment + def realy_awesome(): # hi there + in_more + + same_level + def one_liner(): first; second # both inside one_liner + + back_down + +STMT: yes +STMT: awesome; + + # Here we have a comment +STMT: def realy_awesome(): # hi there + in_more + + same_level + def one_liner(): first; second # both inside one_liner + +STMT: in_more + +STMT: same_level +STMT: def one_liner(): first; second # both inside one_liner + +STMT: back_down + +STMT: last_statement + +# dude, this is a comment + # some more +STMT: hello +STMT: if 1: + yes + awesome; + + # Here we have a comment + if ('hello'): # hi there + in_more + + same_level + if ['dude', 'dudess'].horsie(): first; second # both inside one_liner + 1 + + back_down + +STMT: yes +STMT: awesome; + + # Here we have a comment +STMT: if ('hello'): # hi there + in_more + + same_level + if ['dude', 'dudess'].horsie(): first; second # both inside one_liner + 1 + +STMT: in_more + +STMT: same_level +STMT: if ['dude', 'dudess'].horsie(): first; second # both inside one_liner +STMT: 1 + +STMT: back_down + +STMT: last_statement + +STMT: hello = 1.1(20); + +# subscription +STMT: a[1] = b[2]; + +# simple slicing +STMT: c[1:1] = d[2:2]; + +# simple slicing +STMT: e[1:1, 2:2] = f[3:3, 4:4]; +TARGET SUBSCRIPTION: [1] +TARGET SIMPLE SLICING: [1:1] +TARGET EXTENDED SLICING: [1:1, 2:2] +PRIMARY SUBSCRIPTION: [2] +PRIMARY SIMPLE SLICING: [2:2] +PRIMARY EXTENDED SLICING: [3:3, 4:4] +*** SUCCESS *** diff --git a/test/heredoc.exp b/test/heredoc.exp deleted file mode 100644 index 52cc6b7e..00000000 --- a/test/heredoc.exp +++ /dev/null @@ -1,4 +0,0 @@ -<heredoc::start><heredoc::here_name><heredoc::id>hello</heredoc::id></heredoc::here_name><heredoc::here_data><heredoc::_repeat_here_data_item><heredoc::here_data_item><heredoc::nl> -</heredoc::nl></heredoc::here_data_item><heredoc::here_data_item><heredoc::id>random</heredoc::id></heredoc::here_data_item><heredoc::here_data_item><heredoc::other> 9392</heredoc::other></heredoc::here_data_item><heredoc::here_data_item><heredoc::id>af</heredoc::id></heredoc::here_data_item><heredoc::here_data_item><heredoc::other> </heredoc::other></heredoc::here_data_item><heredoc::here_data_item><heredoc::id>j</heredoc::id></heredoc::here_data_item><heredoc::here_data_item><heredoc::other>9 </heredoc::other></heredoc::here_data_item><heredoc::here_data_item><heredoc::id>stuff</heredoc::id></heredoc::here_data_item><heredoc::here_data_item><heredoc::nl> -</heredoc::nl></heredoc::here_data_item></heredoc::_repeat_here_data_item></heredoc::here_data><heredoc::here_close>hell</heredoc::here_close><heredoc::id>o</heredoc::id><heredoc::nl> -</heredoc::nl></heredoc::start>
\ No newline at end of file diff --git a/test/heredoc.in b/test/heredoc.in deleted file mode 100644 index c9638ca9..00000000 --- a/test/heredoc.in +++ /dev/null @@ -1,3 +0,0 @@ -hello -random 9392af j9 stuff -hello diff --git a/test/heredoc.lm b/test/heredoc.lm index df509075..b773bf99 100644 --- a/test/heredoc.lm +++ b/test/heredoc.lm @@ -1,3 +1,4 @@ +##### LM ##### context heredoc rl ident_char /[a-zA-Z_]/ @@ -46,3 +47,13 @@ cons HereDoc: heredoc[] parse S: heredoc::start(HereDoc)[stdin] print_xml(S.tree) +print( '\n' ) +##### IN ##### +hello +random 9392af j9 stuff +hello +##### EXP ##### +<heredoc::start><heredoc::here_name><heredoc::id>hello</heredoc::id></heredoc::here_name><heredoc::here_data><heredoc::_repeat_here_data_item><heredoc::here_data_item><heredoc::nl> +</heredoc::nl></heredoc::here_data_item><heredoc::here_data_item><heredoc::id>random</heredoc::id></heredoc::here_data_item><heredoc::here_data_item><heredoc::other> 9392</heredoc::other></heredoc::here_data_item><heredoc::here_data_item><heredoc::id>af</heredoc::id></heredoc::here_data_item><heredoc::here_data_item><heredoc::other> </heredoc::other></heredoc::here_data_item><heredoc::here_data_item><heredoc::id>j</heredoc::id></heredoc::here_data_item><heredoc::here_data_item><heredoc::other>9 </heredoc::other></heredoc::here_data_item><heredoc::here_data_item><heredoc::id>stuff</heredoc::id></heredoc::here_data_item><heredoc::here_data_item><heredoc::nl> +</heredoc::nl></heredoc::here_data_item></heredoc::_repeat_here_data_item></heredoc::here_data><heredoc::here_close>hell</heredoc::here_close><heredoc::id>o</heredoc::id><heredoc::nl> +</heredoc::nl></heredoc::start> diff --git a/test/ignore1.exp b/test/ignore1.exp deleted file mode 100644 index c4310252..00000000 --- a/test/ignore1.exp +++ /dev/null @@ -1,2 +0,0 @@ -+ foo = asdf + -<wrapper .+ foo = asdf +. ></wrapper> diff --git a/test/ignore1.in b/test/ignore1.in deleted file mode 100644 index 03e140f7..00000000 --- a/test/ignore1.in +++ /dev/null @@ -1 +0,0 @@ -+ foo = asdf +
\ No newline at end of file diff --git a/test/ignore1.lm b/test/ignore1.lm index e74bda93..5795c2da 100644 --- a/test/ignore1.lm +++ b/test/ignore1.lm @@ -1,3 +1,4 @@ +##### LM ##### # # Regular Definitions @@ -50,3 +51,10 @@ construct IL: item_list ["<wrapper .[Attrs.tree]. ></wrapper>"] print( IL '\n' ) +##### IN ##### ++ foo = asdf + +##### EXP ##### ++ foo = asdf + + +<wrapper .+ foo = asdf + +. ></wrapper> diff --git a/test/ignore2.exp b/test/ignore2.exp deleted file mode 100644 index 8fc764d1..00000000 --- a/test/ignore2.exp +++ /dev/null @@ -1,7 +0,0 @@ -( a ) -( b ) -( c ) -( chocolate ) -( fudge ) -( d ) -( e ) diff --git a/test/ignore2.in b/test/ignore2.in deleted file mode 100644 index 678337aa..00000000 --- a/test/ignore2.in +++ /dev/null @@ -1 +0,0 @@ -a b c ( chocolate fudge ) d e diff --git a/test/ignore2.lm b/test/ignore2.lm index 5b3497d2..0dbe1c69 100644 --- a/test/ignore2.lm +++ b/test/ignore2.lm @@ -1,3 +1,4 @@ +##### LM ##### lex ignore /space+/ literal '*', '(', ')' @@ -24,3 +25,13 @@ for Id: id in Input { S: start = Output() print( S '\n' ) +##### IN ##### +a b c ( chocolate fudge ) d e +##### EXP ##### +( a ) +( b ) +( c ) +( chocolate ) +( fudge ) +( d ) +( e ) diff --git a/test/ignore3.exp b/test/ignore3.exp deleted file mode 100644 index 8eb7240b..00000000 --- a/test/ignore3.exp +++ /dev/null @@ -1,10 +0,0 @@ -item: .a . -item: .b . -item: .c . -item: .( d ) . -innr: .(. d .) . -item: .e . -item: .( ) . -innr: .(. .) . -item: .f . -item: .g. diff --git a/test/ignore3.in b/test/ignore3.in deleted file mode 100644 index 366294bf..00000000 --- a/test/ignore3.in +++ /dev/null @@ -1 +0,0 @@ -a b c ( d ) e ( ) f g; diff --git a/test/ignore3.lm b/test/ignore3.lm index e1003251..a0ed2319 100644 --- a/test/ignore3.lm +++ b/test/ignore3.lm @@ -1,3 +1,4 @@ +##### LM ##### lex ignore /space+/ literal '*', '(' ni, ni ')', '!', ';' @@ -35,3 +36,16 @@ for I: item in Start { print( 'innr: .' %O '.' %Inner '.' %C '.\n' ) } +##### IN ##### +a b c ( d ) e ( ) f g; +##### EXP ##### +item: .a . +item: .b . +item: .c . +item: .( d ) . +innr: .(. d .) . +item: .e . +item: .( ) . +innr: .(. .) . +item: .f . +item: .g. diff --git a/test/ignore4.exp b/test/ignore4.exp deleted file mode 100644 index 465082d2..00000000 --- a/test/ignore4.exp +++ /dev/null @@ -1,8 +0,0 @@ ---#include "input1" -== --- -#include "input2" -== --- -#include "input3" -== diff --git a/test/ignore4.in b/test/ignore4.in deleted file mode 100644 index 0858c068..00000000 --- a/test/ignore4.in +++ /dev/null @@ -1,10 +0,0 @@ - -hello; - -#include "input1" - -#include "input2" - -#include "input3" - -there; diff --git a/test/ignore4.lm b/test/ignore4.lm index b26d629e..3dc37a8e 100644 --- a/test/ignore4.lm +++ b/test/ignore4.lm @@ -1,3 +1,4 @@ +##### LM ##### namespace hash lex @@ -52,3 +53,23 @@ else { print( '--' %H '==\n' ) } } +##### IN ##### + +hello; + +#include "input1" + +#include "input2" + +#include "input3" + +there; +##### EXP ##### +--#include "input1" +== +-- +#include "input2" +== +-- +#include "input3" +== diff --git a/test/island.exp b/test/island.exp deleted file mode 100644 index c29e0cc1..00000000 --- a/test/island.exp +++ /dev/null @@ -1,7 +0,0 @@ -<start><_repeat_top_item><top_item><class><ident>class</ident><_literal_0017>{</_literal_0017><class_body><_repeat_class_item><class_item><number>1</number><_literal_0011>;</_literal_0011></class_item><class_item><string>"string"</string><_literal_0011>;</_literal_0011></class_item><class_item><ident>foo</ident><_literal_0011>;</_literal_0011></class_item><class_item><func><ident>func</ident><_literal_0013>(</_literal_0013><_literal_0015>)</_literal_0015><_literal_0017>{</_literal_0017><func_body><_repeat_func_item><func_item><func_chr>func() - </func_chr></func_item><func_item><func_open>{</func_open><func_body><_repeat_func_item><func_item><func_chr> - 1+</func_chr></func_item><func_item><func_open>{</func_open><func_body><_repeat_func_item><func_item><func_chr>2</func_chr></func_item></_repeat_func_item></func_body><func_close>}</func_close></func_item><func_item><func_chr> - </func_chr></func_item></_repeat_func_item></func_body><func_close>}</func_close></func_item><func_item><func_chr> - </func_chr></func_item></_repeat_func_item></func_body><func_close>}</func_close></func></class_item></_repeat_class_item></class_body><_literal_0019>}</_literal_0019></class></top_item><top_item><func><ident>func</ident><_literal_0013>(</_literal_0013><_literal_0015>)</_literal_0015><_literal_0017>{</_literal_0017><func_body><_repeat_func_item><func_item><func_chr>"data" - </func_chr></func_item><func_item><func_open>{</func_open><func_body><_repeat_func_item><func_item><func_chr>a</func_chr></func_item></_repeat_func_item></func_body><func_close>}</func_close></func_item><func_item><func_chr> -</func_chr></func_item></_repeat_func_item></func_body><func_close>}</func_close></func></top_item></_repeat_top_item></start> diff --git a/test/island.in b/test/island.in deleted file mode 100644 index d34467bb..00000000 --- a/test/island.in +++ /dev/null @@ -1,19 +0,0 @@ -class -{ - 1; - "string"; - foo; - func() - { - func() - { - 1+{2} - } - } -} - -func() -{ - "data" - {a} -} diff --git a/test/island.lm b/test/island.lm index a42e87aa..0639e0b6 100644 --- a/test/island.lm +++ b/test/island.lm @@ -1,3 +1,4 @@ +##### LM ##### lex token func_chr /[^{}]+/ @@ -54,3 +55,31 @@ print( '\n' ) #pattern start # ~class { func() { func() { 1+{2}} } } func() {{a}} +##### IN ##### +class +{ + 1; + "string"; + foo; + func() + { + func() + { + 1+{2} + } + } +} + +func() +{ + "data" + {a} +} +##### EXP ##### +<start><_repeat_top_item><top_item><class><ident>class</ident><_literal_0017>{</_literal_0017><class_body><_repeat_class_item><class_item><number>1</number><_literal_0011>;</_literal_0011></class_item><class_item><string>"string"</string><_literal_0011>;</_literal_0011></class_item><class_item><ident>foo</ident><_literal_0011>;</_literal_0011></class_item><class_item><func><ident>func</ident><_literal_0013>(</_literal_0013><_literal_0015>)</_literal_0015><_literal_0017>{</_literal_0017><func_body><_repeat_func_item><func_item><func_chr>func() + </func_chr></func_item><func_item><func_open>{</func_open><func_body><_repeat_func_item><func_item><func_chr> + 1+</func_chr></func_item><func_item><func_open>{</func_open><func_body><_repeat_func_item><func_item><func_chr>2</func_chr></func_item></_repeat_func_item></func_body><func_close>}</func_close></func_item><func_item><func_chr> + </func_chr></func_item></_repeat_func_item></func_body><func_close>}</func_close></func_item><func_item><func_chr> + </func_chr></func_item></_repeat_func_item></func_body><func_close>}</func_close></func></class_item></_repeat_class_item></class_body><_literal_0019>}</_literal_0019></class></top_item><top_item><func><ident>func</ident><_literal_0013>(</_literal_0013><_literal_0015>)</_literal_0015><_literal_0017>{</_literal_0017><func_body><_repeat_func_item><func_item><func_chr>"data" + </func_chr></func_item><func_item><func_open>{</func_open><func_body><_repeat_func_item><func_item><func_chr>a</func_chr></func_item></_repeat_func_item></func_body><func_close>}</func_close></func_item><func_item><func_chr> +</func_chr></func_item></_repeat_func_item></func_body><func_close>}</func_close></func></top_item></_repeat_top_item></start> diff --git a/test/lhs1.exp b/test/lhs1.exp deleted file mode 100644 index 3e6a6438..00000000 --- a/test/lhs1.exp +++ /dev/null @@ -1,4 +0,0 @@ -A -B -( a )( b )( c )( ( d1 )( d2 ) )( e )( f )( g ); - diff --git a/test/lhs1.in b/test/lhs1.in deleted file mode 100644 index 7f5f45cc..00000000 --- a/test/lhs1.in +++ /dev/null @@ -1 +0,0 @@ -a b c ( d1 d2 ) e f g ; diff --git a/test/lhs1.lm b/test/lhs1.lm index adcfcf99..bed3cb48 100644 --- a/test/lhs1.lm +++ b/test/lhs1.lm @@ -1,3 +1,4 @@ +##### LM ##### lex ignore /space+/ @@ -31,3 +32,10 @@ def start parse Start: start[ stdin ] print( Start.tree "\n" ) +##### IN ##### +a b c ( d1 d2 ) e f g ; +##### EXP ##### +A +B +( a )( b )( c )( ( d1 )( d2 ) )( e )( f )( g ); + diff --git a/test/liftattrs.exp b/test/liftattrs.exp deleted file mode 100644 index 1da4534a..00000000 --- a/test/liftattrs.exp +++ /dev/null @@ -1,3 +0,0 @@ -<wrapper foo=bar1 foo=bar2><t1 a=b c=d> - <t2 e=f></t2> -</t1></wrapper> diff --git a/test/liftattrs.in b/test/liftattrs.in deleted file mode 100644 index 5a50f377..00000000 --- a/test/liftattrs.in +++ /dev/null @@ -1,3 +0,0 @@ -<t1 a=b foo=bar1 c=d> - <t2 foo=bar2 e=f></t2> -</t1> diff --git a/test/liftattrs.lm b/test/liftattrs.lm index 9478acae..3f3d0d88 100644 --- a/test/liftattrs.lm +++ b/test/liftattrs.lm @@ -1,3 +1,4 @@ +##### LM ##### # # Regular Definitions @@ -72,3 +73,11 @@ IL = construct item_list ["<wrapper " ^CollectedAttrs ">" ^RootItemList "</wrapper>"] print( ^IL '\n' ) +##### IN ##### +<t1 a=b foo=bar1 c=d> + <t2 foo=bar2 e=f></t2> +</t1> +##### EXP ##### +<wrapper foo=bar1 foo=bar2><t1 a=b c=d> + <t2 e=f></t2> +</t1></wrapper> |