summaryrefslogtreecommitdiff
path: root/test/scan4.rl
diff options
context:
space:
mode:
Diffstat (limited to 'test/scan4.rl')
-rw-r--r--test/scan4.rl33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/scan4.rl b/test/scan4.rl
new file mode 100644
index 0000000..12d4d4c
--- /dev/null
+++ b/test/scan4.rl
@@ -0,0 +1,33 @@
+/*
+ * @LANG: indep
+ */
+ptr ts;
+ptr te;
+int act;
+int token;
+%%
+%%{
+ machine scanner;
+
+ # Warning: changing the patterns or the input string will affect the
+ # coverage of the scanner action types.
+ main := |*
+ 'a' => {
+ prints "pat1\n";
+ };
+
+ [ab]+ . 'c' => {
+ prints "pat2\n";
+ };
+
+ any;
+ *|;
+}%%
+/* _____INPUT_____
+"ba a"
+_____INPUT_____ */
+/* _____OUTPUT_____
+pat1
+pat1
+ACCEPT
+_____OUTPUT_____ */