summaryrefslogtreecommitdiff
path: root/test/rlhc.d/case/any1_go.go-Z-G0--goto-backend.in
diff options
context:
space:
mode:
Diffstat (limited to 'test/rlhc.d/case/any1_go.go-Z-G0--goto-backend.in')
-rw-r--r--test/rlhc.d/case/any1_go.go-Z-G0--goto-backend.in102
1 files changed, 102 insertions, 0 deletions
diff --git a/test/rlhc.d/case/any1_go.go-Z-G0--goto-backend.in b/test/rlhc.d/case/any1_go.go-Z-G0--goto-backend.in
new file mode 100644
index 00000000..cdd79b56
--- /dev/null
+++ b/test/rlhc.d/case/any1_go.go-Z-G0--goto-backend.in
@@ -0,0 +1,102 @@
+host( "working/any1_go.rl", 1 ) @{/*
+ * @@LANG: go
+ * @@GENERATED: true
+ */
+
+ package main
+ import "fmt"
+
+
+
+
+
+
+
+ var cs int;
+ var blen int;
+ var buffer [1024] byte;
+
+}@
+array s8 _any1_nfa_targs( 0, 0 ) = { 0, 0 };
+
+array s8 _any1_nfa_offsets( 0, 0 ) = { 0, 0, 0, 0 };
+
+array s8 _any1_nfa_push_actions( 0, 0 ) = { 0, 0 };
+
+array s8 _any1_nfa_pop_trans( 0, 0 ) = { 0, 0 };
+
+value int any1_start = 1;
+value int any1_first_final = 2;
+value int any1_error = 0;
+
+value int any1_en_main = 1;
+
+host( "working/any1_go.rl", 23 ) @{
+
+ func prepare() {
+ }@
+ {
+ cs = cast(int)any1_start;
+ }
+ host( "working/any1_go.rl", 26 ) @{
+ }
+
+ func exec(data string) {
+ var p int = 0
+ var pe int = len(data)
+ }@
+ {
+
+ if ( p == pe )
+ goto _test_eof;
+ if ( cs == 0 )
+ goto _out;
+ _resume:
+ switch ( cs ) {
+ case 1:
+ {
+ goto ctr0;
+ }
+ case 2:
+ {
+ goto ctr1;
+ }
+ case 0:
+ goto _out;
+ }
+
+ ctr1: cs = 0; goto _again;
+ ctr0: cs = 2; goto _again;
+
+ _again:
+ if ( cs == 0 )
+ goto _out;
+ p += 1;
+ if ( p != pe )
+ goto _resume;
+ _test_eof: {}
+ _out: {}
+ }
+ host( "working/any1_go.rl", 32 ) @{
+ }
+ func finish() {
+ if cs >= any1_first_final {
+ fmt.Println("ACCEPT")
+ } else {
+ fmt.Println("FAIL")
+ }
+ }
+ var inp []string = []string {
+ "",
+ "x",
+ "xx",
+ };
+
+ func main() {
+ for _, data := range inp {
+ prepare()
+ exec(data)
+ finish()
+ }
+ }
+}@ \ No newline at end of file