summaryrefslogtreecommitdiff
path: root/test/trans.d/case/curs1_julia.rl
diff options
context:
space:
mode:
Diffstat (limited to 'test/trans.d/case/curs1_julia.rl')
-rw-r--r--test/trans.d/case/curs1_julia.rl48
1 files changed, 48 insertions, 0 deletions
diff --git a/test/trans.d/case/curs1_julia.rl b/test/trans.d/case/curs1_julia.rl
new file mode 100644
index 00000000..10972c82
--- /dev/null
+++ b/test/trans.d/case/curs1_julia.rl
@@ -0,0 +1,48 @@
+//
+// @LANG: julia
+// @GENERATED: true
+//
+
+
+%%{
+ machine curs1;
+
+ unused := 'unused';
+
+ one := 'one' @{print( "one\n" );
+fnext *return_to;};
+
+ two := 'two' @{print( "two\n" );
+fnext *return_to;};
+
+ main :=
+ '1' @{return_to = fcurs;
+fnext one;}
+ | '2' @{return_to = fcurs;
+fnext two;}
+ | '\n';
+}%%
+
+
+
+%% write data;
+
+function m( data::AbstractString )
+ p = 0
+ pe = length(data)
+ eof = length(data)
+ cs = 0
+ buffer = ""
+return_to = 0;
+
+ %% write init;
+ %% write exec;
+
+ if ( cs >= curs1_first_final )
+ println( "ACCEPT" );
+ else
+ println( "FAIL" );
+ end
+end
+
+ m( "1one2two1one\n" );