summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2017-02-22 16:28:57 +0800
committerAdrian Thurston <thurston@colm.net>2017-02-22 16:28:57 +0800
commitd503447cc85fdd11357d26f87f729eee00eb4a3e (patch)
tree3a5831ef148ea29ce846af7905543f78a8855ac1
parentbf4c32ff73537111b7c381f8764cca6fc246b4ba (diff)
downloadcolm-d503447cc85fdd11357d26f87f729eee00eb4a3e.tar.gz
test cases updated for auto-trim
-rw-r--r--test/rlhc.d/rlhc-c.lm2
-rw-r--r--test/rlhc.d/rlhc-crack.lm2
-rw-r--r--test/rlhc.d/rlhc-csharp.lm2
-rw-r--r--test/rlhc.d/rlhc-go.lm2
-rw-r--r--test/rlhc.d/rlhc-java.lm2
-rw-r--r--test/rlhc.d/rlhc-js.lm2
-rw-r--r--test/rlhc.d/rlhc-julia.lm2
-rw-r--r--test/rlhc.d/rlhc-ocaml.lm2
-rw-r--r--test/rlhc.d/rlhc-ruby.lm2
-rw-r--r--test/rlhc.d/rlhc-rust.lm2
-rw-r--r--test/trans.d/Makefile4
-rw-r--r--test/trans.d/case/atoi1_ocaml.rl6
-rw-r--r--test/trans.d/case/atoi2_ocaml.rl6
-rw-r--r--test/trans.d/case/cond1_ocaml.rl6
-rw-r--r--test/trans.d/case/gotocallret3_ocaml.rl2
-rw-r--r--test/trans.d/case/next2_ocaml.rl2
-rw-r--r--test/trans.d/case/scan1_ocaml.rl10
-rw-r--r--test/trans.d/trans-asm.lm2
-rw-r--r--test/trans.d/trans-c.lm2
-rw-r--r--test/trans.d/trans-crack.lm2
-rw-r--r--test/trans.d/trans-csharp.lm2
-rw-r--r--test/trans.d/trans-d.lm2
-rw-r--r--test/trans.d/trans-go.lm2
-rw-r--r--test/trans.d/trans-java.lm2
-rw-r--r--test/trans.d/trans-julia.lm2
-rw-r--r--test/trans.d/trans-ocaml.lm2
-rw-r--r--test/trans.d/trans-ruby.lm2
-rw-r--r--test/trans.d/trans-rust.lm2
-rw-r--r--test/trans.d/trans.lm6
29 files changed, 43 insertions, 41 deletions
diff --git a/test/rlhc.d/rlhc-c.lm b/test/rlhc.d/rlhc-c.lm
index 71c9772d..d6cf3136 100644
--- a/test/rlhc.d/rlhc-c.lm
+++ b/test/rlhc.d/rlhc-c.lm
@@ -494,7 +494,7 @@ namespace c_gen
if CO {
send Output
- [CO]
+ [@CO]
}
else {
send stderr
diff --git a/test/rlhc.d/rlhc-crack.lm b/test/rlhc.d/rlhc-crack.lm
index 6111576c..b7902a46 100644
--- a/test/rlhc.d/rlhc-crack.lm
+++ b/test/rlhc.d/rlhc-crack.lm
@@ -506,7 +506,7 @@ namespace crack_gen
if CO {
send Output
- [CO]
+ [@CO]
}
else {
send stderr
diff --git a/test/rlhc.d/rlhc-csharp.lm b/test/rlhc.d/rlhc-csharp.lm
index 49335ff1..1ae36af2 100644
--- a/test/rlhc.d/rlhc-csharp.lm
+++ b/test/rlhc.d/rlhc-csharp.lm
@@ -463,7 +463,7 @@ namespace csharp_gen
if CSO {
send Output
- [CSO]
+ [@CSO]
}
else {
send stderr
diff --git a/test/rlhc.d/rlhc-go.lm b/test/rlhc.d/rlhc-go.lm
index 809dd2fd..4d782998 100644
--- a/test/rlhc.d/rlhc-go.lm
+++ b/test/rlhc.d/rlhc-go.lm
@@ -481,7 +481,7 @@ namespace go_gen
if GO {
send Output
- [GO]
+ [@GO]
}
else {
send stderr
diff --git a/test/rlhc.d/rlhc-java.lm b/test/rlhc.d/rlhc-java.lm
index 47792064..c1f97c7f 100644
--- a/test/rlhc.d/rlhc-java.lm
+++ b/test/rlhc.d/rlhc-java.lm
@@ -488,7 +488,7 @@ namespace java_gen
if JO {
send Output
- [JO]
+ [@JO]
}
else {
send stderr
diff --git a/test/rlhc.d/rlhc-js.lm b/test/rlhc.d/rlhc-js.lm
index 79e4f110..f0d9c32b 100644
--- a/test/rlhc.d/rlhc-js.lm
+++ b/test/rlhc.d/rlhc-js.lm
@@ -503,7 +503,7 @@ namespace js_gen
if CO {
send Output
- [CO]
+ [@CO]
}
else {
send stderr
diff --git a/test/rlhc.d/rlhc-julia.lm b/test/rlhc.d/rlhc-julia.lm
index a9b53e90..c13fb460 100644
--- a/test/rlhc.d/rlhc-julia.lm
+++ b/test/rlhc.d/rlhc-julia.lm
@@ -542,7 +542,7 @@ namespace julia_gen
if CO {
send Output
- [CO]
+ [@CO]
}
else {
send stderr
diff --git a/test/rlhc.d/rlhc-ocaml.lm b/test/rlhc.d/rlhc-ocaml.lm
index de8c512e..1ab33ba7 100644
--- a/test/rlhc.d/rlhc-ocaml.lm
+++ b/test/rlhc.d/rlhc-ocaml.lm
@@ -563,7 +563,7 @@ namespace ml_gen
if MO {
send Output
- [MO]
+ [@MO]
}
else {
send stderr
diff --git a/test/rlhc.d/rlhc-ruby.lm b/test/rlhc.d/rlhc-ruby.lm
index 2c9d5513..fda37638 100644
--- a/test/rlhc.d/rlhc-ruby.lm
+++ b/test/rlhc.d/rlhc-ruby.lm
@@ -486,7 +486,7 @@ namespace ruby_gen
if RO {
send Output
- [RO]
+ [@RO]
}
else {
send stderr
diff --git a/test/rlhc.d/rlhc-rust.lm b/test/rlhc.d/rlhc-rust.lm
index fb4e5a2d..e7b28fd6 100644
--- a/test/rlhc.d/rlhc-rust.lm
+++ b/test/rlhc.d/rlhc-rust.lm
@@ -491,7 +491,7 @@ namespace rust_gen
if CO {
send Output
- [CO]
+ [@CO]
}
else {
send stderr
diff --git a/test/trans.d/Makefile b/test/trans.d/Makefile
index 6fe93336..3a1e977a 100644
--- a/test/trans.d/Makefile
+++ b/test/trans.d/Makefile
@@ -7,6 +7,8 @@ COLM = $(SUBJECT_BIN)
COLM_INC = $(SUBJECT_CPPFLAGS)
COLM_LIB = $(SUBJECT_LDFLAGS)
+TRANS_DEPS = $(wildcard *-*.lm)
+
OBJ = actparams.o trans.o main.o
trans: $(OBJ)
@@ -21,5 +23,5 @@ main.o: main.c
trans.o: trans.c
gcc -c $(COLM_INC) -o $@ $<
-trans.c: trans.lm $(TRANS_DEPS)
+trans.c: trans.lm $(TRANS_DEPS)
$(COLM) -b trans_object -c -o $@ $<
diff --git a/test/trans.d/case/atoi1_ocaml.rl b/test/trans.d/case/atoi1_ocaml.rl
index d84f8813..b0bc8c9f 100644
--- a/test/trans.d/case/atoi1_ocaml.rl
+++ b/test/trans.d/case/atoi1_ocaml.rl
@@ -16,13 +16,13 @@ value := 0;
action see_neg {neg := 1;
}
- action add_digit {value := value .contents * 10 + ( fc - 48 )
+ action add_digit {value := value .contents * 10 + ( fc - 48 )
;
}
- action finish {if neg .contents != 0 then
+ action finish {if neg .contents != 0 then
begin
- value := -1 * value.contents;
+ value := -1 * value.contents;
end
;
diff --git a/test/trans.d/case/atoi2_ocaml.rl b/test/trans.d/case/atoi2_ocaml.rl
index ad40d865..45dc1f6e 100644
--- a/test/trans.d/case/atoi2_ocaml.rl
+++ b/test/trans.d/case/atoi2_ocaml.rl
@@ -16,13 +16,13 @@ value := 0;
action see_neg {neg := 1;
}
- action add_digit {value := value .contents * 10 + ( fc - 48 )
+ action add_digit {value := value .contents * 10 + ( fc - 48 )
;
}
- action finish {if neg .contents != 0 then
+ action finish {if neg .contents != 0 then
begin
- value := -1 * value.contents;
+ value := -1 * value.contents;
end
;
diff --git a/test/trans.d/case/cond1_ocaml.rl b/test/trans.d/case/cond1_ocaml.rl
index 5cf840db..4c01cd53 100644
--- a/test/trans.d/case/cond1_ocaml.rl
+++ b/test/trans.d/case/cond1_ocaml.rl
@@ -20,7 +20,7 @@ let k = ref 0
action three {print_string( " three\n" );
}
- action seti {if fc == 48 then
+ action seti {if fc == 48 then
begin
i := 0;
@@ -32,7 +32,7 @@ begin
end
;
}
- action setj {if fc == 48 then
+ action setj {if fc == 48 then
begin
j := 0;
@@ -44,7 +44,7 @@ begin
end
;
}
- action setk {if fc == 48 then
+ action setk {if fc == 48 then
begin
k := 0;
diff --git a/test/trans.d/case/gotocallret3_ocaml.rl b/test/trans.d/case/gotocallret3_ocaml.rl
index 8784e83e..d4d243cc 100644
--- a/test/trans.d/case/gotocallret3_ocaml.rl
+++ b/test/trans.d/case/gotocallret3_ocaml.rl
@@ -35,7 +35,7 @@ let stack = Array.make 32 0
dig_comm := digit+ $!hold_and_return;
# Choose which to machine to call into based on the command.
- action comm_arg {if comm .contents >= 97 then
+ action comm_arg {if comm .contents >= 97 then
begin
fncall alp_comm;
diff --git a/test/trans.d/case/next2_ocaml.rl b/test/trans.d/case/next2_ocaml.rl
index 2eb127f3..6357296d 100644
--- a/test/trans.d/case/next2_ocaml.rl
+++ b/test/trans.d/case/next2_ocaml.rl
@@ -38,7 +38,7 @@ last := 2;
} |
# This one is conditional based on the last.
- '3' @{if last .contents == 2 then
+ '3' @{if last .contents == 2 then
begin
target := fentry( three );
fnext *target.contents;
diff --git a/test/trans.d/case/scan1_ocaml.rl b/test/trans.d/case/scan1_ocaml.rl
index 74984262..d3a156e6 100644
--- a/test/trans.d/case/scan1_ocaml.rl
+++ b/test/trans.d/case/scan1_ocaml.rl
@@ -15,7 +15,7 @@ let token = ref 0
# coverage of the scanner action types.
main := |*
'a' => {print_string( "on last " );
-if p.contents + 1 == te .contents then
+if p.contents + 1 == te .contents then
begin
print_string( "yes" );
@@ -25,7 +25,7 @@ print_string( "\n" );
};
'b'+ => {print_string( "on next " );
-if p.contents + 1 == te .contents then
+if p.contents + 1 == te .contents then
begin
print_string( "yes" );
@@ -35,7 +35,7 @@ print_string( "\n" );
};
'c1' 'dxxx'? => {print_string( "on lag " );
-if p.contents + 1 == te .contents then
+if p.contents + 1 == te .contents then
begin
print_string( "yes" );
@@ -45,7 +45,7 @@ print_string( "\n" );
};
'd1' => {print_string( "lm switch1 " );
-if p.contents + 1 == te .contents then
+if p.contents + 1 == te .contents then
begin
print_string( "yes" );
@@ -54,7 +54,7 @@ end
print_string( "\n" );
};
'd2' => {print_string( "lm switch2 " );
-if p.contents + 1 == te .contents then
+if p.contents + 1 == te .contents then
begin
print_string( "yes" );
diff --git a/test/trans.d/trans-asm.lm b/test/trans.d/trans-asm.lm
index 1563e85e..1adcb6af 100644
--- a/test/trans.d/trans-asm.lm
+++ b/test/trans.d/trans-asm.lm
@@ -457,7 +457,7 @@ void rw_asm( Output: stream )
send Output
"
- "[Section]
+ "[@Section]
"
" .text
" .comm buf, 1024, 32
diff --git a/test/trans.d/trans-c.lm b/test/trans.d/trans-c.lm
index f93d7b34..563e1eec 100644
--- a/test/trans.d/trans-c.lm
+++ b/test/trans.d/trans-c.lm
@@ -261,7 +261,7 @@ void rw_c( Output: stream )
send Output
"
- "[Section]
+ "[@Section]
"
"%% write data;
"int cs;
diff --git a/test/trans.d/trans-crack.lm b/test/trans.d/trans-crack.lm
index c6ef9fb0..f9506cb6 100644
--- a/test/trans.d/trans-crack.lm
+++ b/test/trans.d/trans-crack.lm
@@ -288,7 +288,7 @@ void crack( Output: stream )
send Output
"
- "[Section]
+ "[@Section]
"
"%% write data;
"
diff --git a/test/trans.d/trans-csharp.lm b/test/trans.d/trans-csharp.lm
index 7fd895e2..5cd31085 100644
--- a/test/trans.d/trans-csharp.lm
+++ b/test/trans.d/trans-csharp.lm
@@ -272,7 +272,7 @@ void rw_csharp( Output: stream )
}
send Output
- ["\n" Section "\n"]
+ ["\n" @Section "\n"]
send Output
"%% write data;
diff --git a/test/trans.d/trans-d.lm b/test/trans.d/trans-d.lm
index d3f86d58..674b0555 100644
--- a/test/trans.d/trans-d.lm
+++ b/test/trans.d/trans-d.lm
@@ -252,7 +252,7 @@ void rw_d( Output: stream )
send Output
"
- "[Section]
+ "[@Section]
"
"%% write data;
"int cs;
diff --git a/test/trans.d/trans-go.lm b/test/trans.d/trans-go.lm
index 506f6a32..30a5600f 100644
--- a/test/trans.d/trans-go.lm
+++ b/test/trans.d/trans-go.lm
@@ -256,7 +256,7 @@ void rw_go( Output: stream )
Action = parse ragel::action_block[$Out->tree]
}
- prints( Output, '\n', Section, '\n' )
+ send Output ['\n' @Section '\n']
send Output
"var cs int;
diff --git a/test/trans.d/trans-java.lm b/test/trans.d/trans-java.lm
index 7503ba97..99c1b486 100644
--- a/test/trans.d/trans-java.lm
+++ b/test/trans.d/trans-java.lm
@@ -266,7 +266,7 @@ void rw_java( Output: stream )
send Output
"
- "[Section]
+ "[@Section]
"
"%% write data;
"int cs;
diff --git a/test/trans.d/trans-julia.lm b/test/trans.d/trans-julia.lm
index 9a0659fa..ed918dbb 100644
--- a/test/trans.d/trans-julia.lm
+++ b/test/trans.d/trans-julia.lm
@@ -275,7 +275,7 @@ void julia( Output: stream )
send Output
"
- "[Section]
+ "[@Section]
"
"%% write data;
"
diff --git a/test/trans.d/trans-ocaml.lm b/test/trans.d/trans-ocaml.lm
index 39bffb74..4298637f 100644
--- a/test/trans.d/trans-ocaml.lm
+++ b/test/trans.d/trans-ocaml.lm
@@ -310,7 +310,7 @@ void rw_ocaml( Output: stream )
send Output
"
- "[Section]
+ "[@Section]
"
"
"%% write data;
diff --git a/test/trans.d/trans-ruby.lm b/test/trans.d/trans-ruby.lm
index 22bbaea7..df0f346c 100644
--- a/test/trans.d/trans-ruby.lm
+++ b/test/trans.d/trans-ruby.lm
@@ -268,7 +268,7 @@ void rw_ruby( Output: stream )
send Output
"
- "[Section]
+ "[@Section]
"
"%% write data;
"
diff --git a/test/trans.d/trans-rust.lm b/test/trans.d/trans-rust.lm
index e9254bc9..b75f672b 100644
--- a/test/trans.d/trans-rust.lm
+++ b/test/trans.d/trans-rust.lm
@@ -289,7 +289,7 @@ void rust( Output: stream )
send Output
"
- "[Section]
+ "[@Section]
"
"%% write data;
"
diff --git a/test/trans.d/trans.lm b/test/trans.d/trans.lm
index 5ccca1d5..b9fa5870 100644
--- a/test/trans.d/trans.lm
+++ b/test/trans.d/trans.lm
@@ -135,7 +135,7 @@ namespace indep
else {
return cons abs_expr [
abs_multiplicative( Expr._multiplicative )
- Expr.Op
+ @Expr.Op
Expr.factor
]
}
@@ -151,7 +151,7 @@ namespace indep
else {
return cons abs_expr [
abs_additive( Expr._additive )
- Expr.Op
+ @Expr.Op
abs_multiplicative( Expr.multiplicative )
]
}
@@ -167,7 +167,7 @@ namespace indep
else {
return cons abs_expr [
abs_comparative( Expr._comparative )
- Expr.Op
+ @Expr.Op
abs_additive( Expr.additive )
]
}