summaryrefslogtreecommitdiff
path: root/test/trans.d/case/empty1_crack.rl
diff options
context:
space:
mode:
Diffstat (limited to 'test/trans.d/case/empty1_crack.rl')
-rw-r--r--test/trans.d/case/empty1_crack.rl46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/trans.d/case/empty1_crack.rl b/test/trans.d/case/empty1_crack.rl
new file mode 100644
index 00000000..f9ef6600
--- /dev/null
+++ b/test/trans.d/case/empty1_crack.rl
@@ -0,0 +1,46 @@
+//
+// @LANG: crack
+// @GENERATED: true
+//
+
+import crack.io cout;
+import crack.lang Buffer;
+
+
+
+
+%%{
+ machine empty1;
+ main := empty;
+}%%
+
+
+
+%% write data;
+
+void m( String s )
+{
+ byteptr data = s.buffer;
+ int p = 0;
+ int pe = s.size;
+ int cs;
+ String buffer;
+
+ %% write init;
+ %% write exec;
+
+ if ( cs >= empty1_first_final ) {
+ cout `ACCEPT\n`;
+ }
+ else {
+ cout `FAIL\n`;
+ }
+}
+
+void main()
+{
+ m( "" );
+ m( "x" );
+}
+
+main();