summaryrefslogtreecommitdiff
path: root/test/trans.d/case/scan4_julia.rl
diff options
context:
space:
mode:
Diffstat (limited to 'test/trans.d/case/scan4_julia.rl')
-rw-r--r--test/trans.d/case/scan4_julia.rl48
1 files changed, 48 insertions, 0 deletions
diff --git a/test/trans.d/case/scan4_julia.rl b/test/trans.d/case/scan4_julia.rl
new file mode 100644
index 00000000..f23b5efa
--- /dev/null
+++ b/test/trans.d/case/scan4_julia.rl
@@ -0,0 +1,48 @@
+//
+// @LANG: julia
+// @GENERATED: true
+//
+
+
+%%{
+ machine scanner;
+
+ # Warning: changing the patterns or the input string will affect the
+ # coverage of the scanner action types.
+ main := |*
+ 'a' => {print( "pat1\n" );
+};
+
+ [ab]+ . 'c' => {print( "pat2\n" );
+};
+
+ any;
+ *|;
+}%%
+
+
+
+%% write data;
+
+function m( data::AbstractString )
+ p = 0
+ pe = length(data)
+ eof = length(data)
+ cs = 0
+ buffer = ""
+ts = 0;
+te = 0;
+act = 0;
+token = 0;
+
+ %% write init;
+ %% write exec;
+
+ if ( cs >= scanner_first_final )
+ println( "ACCEPT" );
+ else
+ println( "FAIL" );
+ end
+end
+
+ m( "ba a" );