summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2012-05-21 10:45:28 -0400
committerAdrian Thurston <thurston@complang.org>2012-05-21 10:45:28 -0400
commitc50b00ab3df74ed589036919baffd4c6edc4a7de (patch)
tree0352c653397e682abcaf9966ed1759eb1ba4d154
parent25981f4c11a04383a88dbba3e02f613c7976e73e (diff)
downloadcolm-c50b00ab3df74ed589036919baffd4c6edc4a7de.tar.gz
test cases updated for no-kid-flags and no-dup-ignors
Whitespace is shifting. Most of the updates involve triming whitespace where it was previously trimmed automatically.
-rw-r--r--test/accum1.lm2
-rw-r--r--test/accum2.lm2
-rw-r--r--test/accumbt2.lm6
-rw-r--r--test/accumbt3.lm4
-rw-r--r--test/constructex.lm4
-rw-r--r--test/context1.lm2
-rw-r--r--test/counting1.lm2
-rw-r--r--test/counting2.lm2
-rw-r--r--test/counting3.lm2
-rw-r--r--test/counting4.lm2
-rw-r--r--test/func.exp2
-rw-r--r--test/generate1.lm16
-rw-r--r--test/liftattrs.lm6
-rw-r--r--test/matchex.lm4
-rw-r--r--test/nestedcomm.exp5
-rw-r--r--test/nestedcomm.lm10
-rw-r--r--test/reparse.lm2
-rw-r--r--test/repeat.lm4
-rw-r--r--test/til.exp1
-rw-r--r--test/til.lm8
-rw-r--r--test/travs1.lm8
21 files changed, 51 insertions, 43 deletions
diff --git a/test/accum1.lm b/test/accum1.lm
index 186125a3..716bb20a 100644
--- a/test/accum1.lm
+++ b/test/accum1.lm
@@ -23,4 +23,4 @@ for Id: id in Input {
S: start = Output()
-print( S '\n' )
+print( S )
diff --git a/test/accum2.lm b/test/accum2.lm
index e1eac4d3..b17b8557 100644
--- a/test/accum2.lm
+++ b/test/accum2.lm
@@ -30,4 +30,4 @@ cons SP: parser<ctx::start> []
SP.ctx = cons ctx []
send SP stdin
Input: ctx::start = SP()
-print( Input '\n' )
+print( Input )
diff --git a/test/accumbt2.lm b/test/accumbt2.lm
index 168517bd..710ed551 100644
--- a/test/accumbt2.lm
+++ b/test/accumbt2.lm
@@ -25,7 +25,7 @@ lex two
[id2]
{
send OneParser [' extra ']
- send OneParser [$r1]
+ send OneParser [$(^r1)]
}
def two
@@ -36,5 +36,7 @@ lex two
Two: two =
parse two( stdin )
+send OneParser ['\n']
+
print( Two )
-print( OneParser.finish() '\n' )
+print( ^( OneParser.finish() ) '\n' )
diff --git a/test/accumbt3.lm b/test/accumbt3.lm
index 559b2d82..7e43da05 100644
--- a/test/accumbt3.lm
+++ b/test/accumbt3.lm
@@ -80,6 +80,6 @@ Two: two =
Nested: nested = NestedParser.finish()
print( '\n------------\n' )
-print( Nested '\n' )
-print( Two '\n' )
+print( ^Nested '\n' )
+print( ^Two '\n' )
diff --git a/test/constructex.lm b/test/constructex.lm
index 441f490e..a92ca977 100644
--- a/test/constructex.lm
+++ b/test/constructex.lm
@@ -27,10 +27,10 @@ match PersonTag
["<person name=" Val:id attr*">" item* "</person>"]
NameTag1: tag = construct tag
- ["<name type=person>" Val "</name>"]
+ ["<name type=person>" ^Val "</name>"]
NameTag2: tag = construct tag
- "<name type=person>[Val]</name>"
+ "<name type=person>[^Val]</name>"
print( NameTag1 '\n' )
print( NameTag2 '\n' )
diff --git a/test/context1.lm b/test/context1.lm
index 6f703956..6f585031 100644
--- a/test/context1.lm
+++ b/test/context1.lm
@@ -30,4 +30,4 @@ context ctx
CTX: ctx = cons ctx[]
Input: ctx::start = parse ctx::start( CTX stdin )
-print( Input '\n' )
+print( Input )
diff --git a/test/counting1.lm b/test/counting1.lm
index c5a98d54..d7511a8e 100644
--- a/test/counting1.lm
+++ b/test/counting1.lm
@@ -84,7 +84,7 @@ def start
i: int = 1
for Item:item in Items {
- print( ' item ' i ': ' Item '\n' )
+ print( ' item ' i ': ' ^Item '\n' )
i = i + 1
}
}
diff --git a/test/counting2.lm b/test/counting2.lm
index 2b3f880c..ad92f591 100644
--- a/test/counting2.lm
+++ b/test/counting2.lm
@@ -75,7 +75,7 @@ def start
i: int = 1
for Item:item in CountItems {
- print( ' item ' i ': ' Item '\n' )
+ print( ' item ' i ': ' ^Item '\n' )
i = i + 1
}
}
diff --git a/test/counting3.lm b/test/counting3.lm
index 2a497122..7ae3d960 100644
--- a/test/counting3.lm
+++ b/test/counting3.lm
@@ -84,7 +84,7 @@ def start
i: int = 1
for Item: item in Items {
- print( ' item ' i ': ' Item '\n' )
+ print( ' item ' i ': ' ^Item '\n' )
i = i + 1
}
}
diff --git a/test/counting4.lm b/test/counting4.lm
index db77b7fc..61822db2 100644
--- a/test/counting4.lm
+++ b/test/counting4.lm
@@ -79,7 +79,7 @@ def start
i: int = 1
for Item: item in Items {
- print( ' item ' i ': ' Item '\n' )
+ print( ' item ' i ': ' ^Item '\n' )
i = i + 1
}
}
diff --git a/test/func.exp b/test/func.exp
index 08cd1944..bd6af7bf 100644
--- a/test/func.exp
+++ b/test/func.exp
@@ -1,4 +1,4 @@
struct S
{
type T
-} \ No newline at end of file
+}
diff --git a/test/generate1.lm b/test/generate1.lm
index e5e13f93..ea60ae0b 100644
--- a/test/generate1.lm
+++ b/test/generate1.lm
@@ -138,15 +138,15 @@ int print_target_subscriptions_and_slicings( Start: start )
{
for TI: target_ext in Start {
if match TI [subscription] {
- print( 'TARGET SUBSCRIPTION: ' TI '\n' )
+ print( 'TARGET SUBSCRIPTION: ' ^TI '\n' )
}
if match TI [simple_slicing] {
- print( 'TARGET SIMPLE SLICING: ' TI '\n' )
+ print( 'TARGET SIMPLE SLICING: ' ^TI '\n' )
}
if match TI [extended_slicing] {
- print( 'TARGET EXTENDED SLICING: ' TI '\n' )
+ print( 'TARGET EXTENDED SLICING: ' ^TI '\n' )
}
}
@@ -156,15 +156,15 @@ int print_primary_subscriptions_and_slicings( Start: start )
{
for PI: primary_ext in Start {
if match PI [subscription] {
- print( 'PRIMARY SUBSCRIPTION: ' PI '\n' )
+ print( 'PRIMARY SUBSCRIPTION: ' ^PI '\n' )
}
if match PI [simple_slicing] {
- print( 'PRIMARY SIMPLE SLICING: ' PI '\n' )
+ print( 'PRIMARY SIMPLE SLICING: ' ^PI '\n' )
}
if match PI [extended_slicing] {
- print( 'PRIMARY EXTENDED SLICING: ' PI '\n' )
+ print( 'PRIMARY EXTENDED SLICING: ' ^PI '\n' )
}
}
}
@@ -721,12 +721,12 @@ def keyword_item
int print_stmts( S: start )
{
for Stmt: statement in S
- print( 'STMT: ' Stmt '\n' )
+ print( 'STMT: ' ^Stmt '\n' )
}
S: start = parse start( stdin )
print( '*** SUCCESS ***\n' )
-print( S '\n' )
+print( ^S '\n' )
print( '***\n' )
print_stmts( S )
print_target_subscriptions_and_slicings( S )
diff --git a/test/liftattrs.lm b/test/liftattrs.lm
index 3415dac4..5e1fda24 100644
--- a/test/liftattrs.lm
+++ b/test/liftattrs.lm
@@ -63,12 +63,12 @@ for AttrListIter:attr_list in RootItemList {
# Add it to the colection
CollectedAttrs = construct attr_list
- [CollectedAttrs " foo=" Val]
+ [CollectedAttrs " foo=" ^Val]
}
}
# Reconstruct the left hand side with the
IL = construct item_list
- ["<wrapper " CollectedAttrs ">" RootItemList "</wrapper>"]
+ ["<wrapper " ^CollectedAttrs ">" ^RootItemList "</wrapper>"]
-print( IL '\n' )
+print( ^IL '\n' )
diff --git a/test/matchex.lm b/test/matchex.lm
index 2212f4bc..e3274968 100644
--- a/test/matchex.lm
+++ b/test/matchex.lm
@@ -29,6 +29,6 @@ match Tag ["<person name=" Val1:id attr*">" item* "</person>"]
# Style: Literal text with embedded lists of types.
match Tag "<person name=[Val2:id attr*]>[item*]</person>"
-print( Val1 '\n' )
-print( Val2 '\n' )
+print( ^Val1 '\n' )
+print( ^Val2 '\n' )
diff --git a/test/nestedcomm.exp b/test/nestedcomm.exp
index 53edf5fb..9ba98c34 100644
--- a/test/nestedcomm.exp
+++ b/test/nestedcomm.exp
@@ -1 +1,4 @@
-hello there ( (this is a nested comment /*sdf;asd_++_stuff) ) and this is not<nested><_repeat_id><id>hello</id><id>there</id><id>and</id><id>this</id><id>is</id><id>not</id></_repeat_id></nested><nested><_repeat_id><id>hello</id><_ignore_0001_ign> </_ignore_0001_ign><id>there</id><_ignore_0001_ign> </_ignore_0001_ign><nested_comment><_literal_0005>(</_literal_0005><_repeat_nc_item><nc_item><nc_data> </nc_data></nc_item><nc_item><nested_comment><_literal_0005>(</_literal_0005><_repeat_nc_item><nc_item><nc_data>this is a nested comment /*sdf;asd_++_stuff</nc_data></nc_item></_repeat_nc_item><_literal_0006>)</_literal_0006></nested_comment></nc_item><nc_item><nc_data> </nc_data></nc_item></_repeat_nc_item><_literal_0006>)</_literal_0006></nested_comment><_ignore_0001_ign> </_ignore_0001_ign><id>and</id><_ignore_0001_ign> </_ignore_0001_ign><id>this</id><_ignore_0001_ign> </_ignore_0001_ign><id>is</id><_ignore_0001_ign> </_ignore_0001_ign><id>not</id></_repeat_id></nested>hello there ( (this is a nested comment /*sdf;asd_++_stuff) ) and this is not
+hello there ( (this is a nested comment /*sdf;asd_++_stuff) ) and this is not
+<nested><_repeat_id><id>hello</id><id>there</id><id>and</id><id>this</id><id>is</id><id>not</id></_repeat_id></nested>
+<nested><_repeat_id><id>hello</id><_ignore_0001_ign> </_ignore_0001_ign><id>there</id><_ignore_0001_ign> </_ignore_0001_ign><nested_comment><_literal_0005>(</_literal_0005><_repeat_nc_item><nc_item><nc_data> </nc_data></nc_item><nc_item><nested_comment><_literal_0005>(</_literal_0005><_repeat_nc_item><nc_item><nc_data>this is a nested comment /*sdf;asd_++_stuff</nc_data></nc_item></_repeat_nc_item><_literal_0006>)</_literal_0006></nested_comment></nc_item><nc_item><nc_data> </nc_data></nc_item></_repeat_nc_item><_literal_0006>)</_literal_0006></nested_comment><_ignore_0001_ign> </_ignore_0001_ign><id>and</id><_ignore_0001_ign> </_ignore_0001_ign><id>this</id><_ignore_0001_ign> </_ignore_0001_ign><id>is</id><_ignore_0001_ign> </_ignore_0001_ign><id>not</id></_repeat_id></nested>
+hello there ( (this is a nested comment /*sdf;asd_++_stuff) ) and this is not
diff --git a/test/nestedcomm.lm b/test/nestedcomm.lm
index b1e6b2d9..f5ed3609 100644
--- a/test/nestedcomm.lm
+++ b/test/nestedcomm.lm
@@ -38,7 +38,9 @@ def nested [id*]
P: nested = parse nested( stdin )
-print( P )
-print_xml( P )
-print_xml_ac( P )
-print( P '\n' )
+print( ^P '\n' )
+print_xml( ^P )
+print( '\n' )
+print_xml_ac( ^P )
+print( '\n' )
+print( ^P '\n' )
diff --git a/test/reparse.lm b/test/reparse.lm
index 454bc4e7..c6b6a95b 100644
--- a/test/reparse.lm
+++ b/test/reparse.lm
@@ -18,5 +18,5 @@ S: start = cons start[ Input ]
Again: start = parse start( Input )
-print( Again '\n' )
+print( Again )
diff --git a/test/repeat.lm b/test/repeat.lm
index 20838ea4..bc418dee 100644
--- a/test/repeat.lm
+++ b/test/repeat.lm
@@ -17,7 +17,7 @@ Input: start = parse start( stdin )
match Input [ItemList: item*]
for I: item* in repeat( ItemList )
- print( I '\n' )
+ print( ^I '\n' )
for I: item* in rev_repeat( ItemList )
- print( I '\n' )
+ print( ^I '\n' )
diff --git a/test/til.exp b/test/til.exp
index 2f302789..ba455c25 100644
--- a/test/til.exp
+++ b/test/til.exp
@@ -1,3 +1,4 @@
+
var a;
a := 1;
diff --git a/test/til.lm b/test/til.lm
index 63b5ef86..3dfe8e5b 100644
--- a/test/til.lm
+++ b/test/til.lm
@@ -157,10 +157,10 @@ for S: statement* in P
# with a do ... while.
S = construct statement* [
"do
- " [First]
- " [Rest]
- "while [Expr];
- Following]
+ " [^First]
+ " [^Rest]
+ "while [^Expr];
+ ^Following]
}
}
}
diff --git a/test/travs1.lm b/test/travs1.lm
index bae33e1b..c02ac0ec 100644
--- a/test/travs1.lm
+++ b/test/travs1.lm
@@ -141,23 +141,23 @@ iter bottomup_rightleft( T: ref any )
print( 'bottomup_leftright\n' )
for T1: any in bottomup_leftright( S )
{
- print( T1 '\n' )
+ print( ^T1 '\n' )
}
print( 'bottomup_rightleft\n' )
for T2: any in bottomup_rightleft( S )
{
- print( T2 '\n' )
+ print( ^T2 '\n' )
}
print( 'topdown_leftright\n' )
for T3: any in topdown_leftright( S )
{
- print( T3 '\n' )
+ print( ^T3 '\n' )
}
print( 'topdown_rightleft\n' )
for T4: any in topdown_rightleft( S )
{
- print( T4 '\n' )
+ print( ^T4 '\n' )
}