diff options
Diffstat (limited to 'test/rlhc.d/case/clang4_go.go-Z-G2--goto-backend.in')
-rw-r--r-- | test/rlhc.d/case/clang4_go.go-Z-G2--goto-backend.in | 1291 |
1 files changed, 1291 insertions, 0 deletions
diff --git a/test/rlhc.d/case/clang4_go.go-Z-G2--goto-backend.in b/test/rlhc.d/case/clang4_go.go-Z-G2--goto-backend.in new file mode 100644 index 00000000..444b4a6b --- /dev/null +++ b/test/rlhc.d/case/clang4_go.go-Z-G2--goto-backend.in @@ -0,0 +1,1291 @@ +host( "working/clang4_go.rl", 1 ) @{/* + * @@LANG: go + * @@GENERATED: true + */ + + package main + import "fmt" + + var pos int ; + var line int ; + + + + + var cs int; + var blen int; + var buffer [1024] byte; + +}@ +value int clang_start = 10; +value int clang_first_final = 10; +value int clang_error = 0; + +value int clang_en_main = 10; + +array s8 _clang_nfa_targs( 0, 0 ) = { 0, 0 }; + +array s8 _clang_nfa_offsets( 0, 0 ) = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + +array s8 _clang_nfa_push_actions( 0, 0 ) = { 0, 0 }; + +array s8 _clang_nfa_pop_trans( 0, 0 ) = { 0, 0 }; + +host( "working/clang4_go.rl", 120 ) @{ + + func prepare() { + pos = 0; + line = 1; + }@ + { + cs = cast(int)clang_start; + } + host( "working/clang4_go.rl", 125 ) @{ + } + + func exec(data string) { + var p int = 0 + var pe int = len(data) + var eof int = pe + }@ + { + if ( p == pe ) + goto _test_eof; + switch ( cs ) + { + case 10: + goto st_case_10; + case 11: + goto st_case_11; + case 1: + goto st_case_1; + case 12: + goto st_case_12; + case 2: + goto st_case_2; + case 3: + goto st_case_3; + case 13: + goto st_case_13; + case 4: + goto st_case_4; + case 5: + goto st_case_5; + case 6: + goto st_case_6; + case 14: + goto st_case_14; + case 7: + goto st_case_7; + case 0: + goto st_case_0; + case 15: + goto st_case_15; + case 16: + goto st_case_16; + case 17: + goto st_case_17; + case 8: + goto st_case_8; + case 18: + goto st_case_18; + case 9: + goto st_case_9; + } + goto st_out; + ctr12: + host( "working/clang4_go.rl", 25 ) ${line = line + 1; + }$ + + goto st10; + ctr23: + host( "working/clang4_go.rl", 34 ) ${fmt.Print( "symbol(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + + goto st10; + ctr24: + host( "working/clang4_go.rl", 34 ) ${fmt.Print( "symbol(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 25 ) ${line = line + 1; + }$ + + goto st10; + ctr32: + host( "working/clang4_go.rl", 30 ) ${fmt.Print( "literal(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + + goto st10; + ctr33: + host( "working/clang4_go.rl", 30 ) ${fmt.Print( "literal(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 25 ) ${line = line + 1; + }$ + + goto st10; + ctr41: + host( "working/clang4_go.rl", 32 ) ${fmt.Print( "int(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + + goto st10; + ctr42: + host( "working/clang4_go.rl", 32 ) ${fmt.Print( "int(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 25 ) ${line = line + 1; + }$ + + goto st10; + ctr51: + host( "working/clang4_go.rl", 31 ) ${fmt.Print( "float(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + + goto st10; + ctr52: + host( "working/clang4_go.rl", 31 ) ${fmt.Print( "float(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 25 ) ${line = line + 1; + }$ + + goto st10; + ctr58: + host( "working/clang4_go.rl", 29 ) ${fmt.Print( "ident(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + + goto st10; + ctr59: + host( "working/clang4_go.rl", 29 ) ${fmt.Print( "ident(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 25 ) ${line = line + 1; + }$ + + goto st10; + ctr65: + host( "working/clang4_go.rl", 33 ) ${fmt.Print( "hex(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + + goto st10; + ctr66: + host( "working/clang4_go.rl", 33 ) ${fmt.Print( "hex(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 25 ) ${line = line + 1; + }$ + + goto st10; + st10: + p+= 1; + if ( p == pe ) + goto _test_eof10; + st_case_10: + switch( ( deref( data, p )) ) { + case 10: { + goto ctr12; + } + case 34: { + goto ctr17; + } + case 39: { + goto ctr18; + } + case 47: { + goto ctr19; + } + case 48: { + goto ctr20; + } + case 95: { + goto ctr22; + } + } + if ( ( deref( data, p )) < 65 ) { + if ( ( deref( data, p )) < 49 ) { + if ( 33 <= ( deref( data, p )) && ( deref( data, p )) <= 46 ) { + goto ctr16; + } + } else if ( ( deref( data, p )) > 57 ) { + { + goto ctr16; + } + } else { + goto ctr21; + } + } else if ( ( deref( data, p )) > 90 ) { + if ( ( deref( data, p )) < 97 ) { + { + goto ctr16; + } + } else if ( ( deref( data, p )) > 122 ) { + if ( ( deref( data, p )) <= 126 ) { + goto ctr16; + } + } else { + goto ctr22; + } + } else { + goto ctr22; + } + { + goto st10; + } + ctr16: + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st11; + ctr25: + host( "working/clang4_go.rl", 34 ) ${fmt.Print( "symbol(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st11; + ctr34: + host( "working/clang4_go.rl", 30 ) ${fmt.Print( "literal(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st11; + ctr43: + host( "working/clang4_go.rl", 32 ) ${fmt.Print( "int(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st11; + ctr53: + host( "working/clang4_go.rl", 31 ) ${fmt.Print( "float(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st11; + ctr60: + host( "working/clang4_go.rl", 29 ) ${fmt.Print( "ident(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st11; + ctr67: + host( "working/clang4_go.rl", 33 ) ${fmt.Print( "hex(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st11; + st11: + p+= 1; + if ( p == pe ) + goto _test_eof11; + st_case_11: + switch( ( deref( data, p )) ) { + case 10: { + goto ctr24; + } + case 34: { + goto ctr26; + } + case 39: { + goto ctr27; + } + case 47: { + goto ctr28; + } + case 48: { + goto ctr29; + } + case 95: { + goto ctr31; + } + } + if ( ( deref( data, p )) < 65 ) { + if ( ( deref( data, p )) < 49 ) { + if ( 33 <= ( deref( data, p )) && ( deref( data, p )) <= 46 ) { + goto ctr25; + } + } else if ( ( deref( data, p )) > 57 ) { + { + goto ctr25; + } + } else { + goto ctr30; + } + } else if ( ( deref( data, p )) > 90 ) { + if ( ( deref( data, p )) < 97 ) { + { + goto ctr25; + } + } else if ( ( deref( data, p )) > 122 ) { + if ( ( deref( data, p )) <= 126 ) { + goto ctr25; + } + } else { + goto ctr31; + } + } else { + goto ctr31; + } + { + goto ctr23; + } + ctr0: + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st1; + ctr1: + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + host( "working/clang4_go.rl", 25 ) ${line = line + 1; + }$ + + goto st1; + ctr17: + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + + goto st1; + ctr26: + host( "working/clang4_go.rl", 34 ) ${fmt.Print( "symbol(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + + goto st1; + ctr35: + host( "working/clang4_go.rl", 30 ) ${fmt.Print( "literal(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + + goto st1; + ctr44: + host( "working/clang4_go.rl", 32 ) ${fmt.Print( "int(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + + goto st1; + ctr54: + host( "working/clang4_go.rl", 31 ) ${fmt.Print( "float(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + + goto st1; + ctr61: + host( "working/clang4_go.rl", 29 ) ${fmt.Print( "ident(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + + goto st1; + ctr68: + host( "working/clang4_go.rl", 33 ) ${fmt.Print( "hex(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + + goto st1; + st1: + p+= 1; + if ( p == pe ) + goto _test_eof1; + st_case_1: + switch( ( deref( data, p )) ) { + case 10: { + goto ctr1; + } + case 34: { + goto st12; + } + case 92: { + goto st9; + } + } + { + goto ctr0; + } + st12: + p+= 1; + if ( p == pe ) + goto _test_eof12; + st_case_12: + switch( ( deref( data, p )) ) { + case 10: { + goto ctr33; + } + case 34: { + goto ctr35; + } + case 39: { + goto ctr36; + } + case 47: { + goto ctr37; + } + case 48: { + goto ctr38; + } + case 95: { + goto ctr40; + } + } + if ( ( deref( data, p )) < 65 ) { + if ( ( deref( data, p )) < 49 ) { + if ( 33 <= ( deref( data, p )) && ( deref( data, p )) <= 46 ) { + goto ctr34; + } + } else if ( ( deref( data, p )) > 57 ) { + { + goto ctr34; + } + } else { + goto ctr39; + } + } else if ( ( deref( data, p )) > 90 ) { + if ( ( deref( data, p )) < 97 ) { + { + goto ctr34; + } + } else if ( ( deref( data, p )) > 122 ) { + if ( ( deref( data, p )) <= 126 ) { + goto ctr34; + } + } else { + goto ctr40; + } + } else { + goto ctr40; + } + { + goto ctr32; + } + ctr4: + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st2; + ctr5: + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + host( "working/clang4_go.rl", 25 ) ${line = line + 1; + }$ + + goto st2; + ctr18: + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + + goto st2; + ctr27: + host( "working/clang4_go.rl", 34 ) ${fmt.Print( "symbol(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + + goto st2; + ctr36: + host( "working/clang4_go.rl", 30 ) ${fmt.Print( "literal(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + + goto st2; + ctr45: + host( "working/clang4_go.rl", 32 ) ${fmt.Print( "int(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + + goto st2; + ctr55: + host( "working/clang4_go.rl", 31 ) ${fmt.Print( "float(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + + goto st2; + ctr62: + host( "working/clang4_go.rl", 29 ) ${fmt.Print( "ident(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + + goto st2; + ctr69: + host( "working/clang4_go.rl", 33 ) ${fmt.Print( "hex(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + + goto st2; + st2: + p+= 1; + if ( p == pe ) + goto _test_eof2; + st_case_2: + switch( ( deref( data, p )) ) { + case 10: { + goto ctr5; + } + case 39: { + goto st12; + } + case 92: { + goto st3; + } + } + { + goto ctr4; + } + st3: + p+= 1; + if ( p == pe ) + goto _test_eof3; + st_case_3: + if ( ( deref( data, p )) == 10 ) { + goto ctr5; + } + { + goto ctr4; + } + ctr19: + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st13; + ctr28: + host( "working/clang4_go.rl", 34 ) ${fmt.Print( "symbol(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st13; + ctr37: + host( "working/clang4_go.rl", 30 ) ${fmt.Print( "literal(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st13; + ctr47: + host( "working/clang4_go.rl", 32 ) ${fmt.Print( "int(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st13; + ctr56: + host( "working/clang4_go.rl", 31 ) ${fmt.Print( "float(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st13; + ctr63: + host( "working/clang4_go.rl", 29 ) ${fmt.Print( "ident(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st13; + ctr70: + host( "working/clang4_go.rl", 33 ) ${fmt.Print( "hex(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st13; + st13: + p+= 1; + if ( p == pe ) + goto _test_eof13; + st_case_13: + switch( ( deref( data, p )) ) { + case 10: { + goto ctr24; + } + case 33: { + goto st4; + } + case 34: { + goto ctr26; + } + case 39: { + goto ctr27; + } + case 47: { + goto st6; + } + case 48: { + goto ctr29; + } + case 95: { + goto ctr31; + } + } + if ( ( deref( data, p )) < 65 ) { + if ( ( deref( data, p )) < 49 ) { + if ( 35 <= ( deref( data, p )) && ( deref( data, p )) <= 46 ) { + goto ctr25; + } + } else if ( ( deref( data, p )) > 57 ) { + { + goto ctr25; + } + } else { + goto ctr30; + } + } else if ( ( deref( data, p )) > 90 ) { + if ( ( deref( data, p )) < 97 ) { + { + goto ctr25; + } + } else if ( ( deref( data, p )) > 122 ) { + if ( ( deref( data, p )) <= 126 ) { + goto ctr25; + } + } else { + goto ctr31; + } + } else { + goto ctr31; + } + { + goto ctr23; + } + ctr8: + host( "working/clang4_go.rl", 25 ) ${line = line + 1; + }$ + + goto st4; + st4: + p+= 1; + if ( p == pe ) + goto _test_eof4; + st_case_4: + switch( ( deref( data, p )) ) { + case 10: { + goto ctr8; + } + case 33: { + goto st5; + } + } + { + goto st4; + } + st5: + p+= 1; + if ( p == pe ) + goto _test_eof5; + st_case_5: + switch( ( deref( data, p )) ) { + case 10: { + goto ctr8; + } + case 33: { + goto st5; + } + case 47: { + goto st10; + } + } + { + goto st4; + } + st6: + p+= 1; + if ( p == pe ) + goto _test_eof6; + st_case_6: + if ( ( deref( data, p )) == 10 ) { + goto ctr12; + } + { + goto st6; + } + ctr20: + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st14; + ctr29: + host( "working/clang4_go.rl", 34 ) ${fmt.Print( "symbol(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st14; + ctr38: + host( "working/clang4_go.rl", 30 ) ${fmt.Print( "literal(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st14; + st14: + p+= 1; + if ( p == pe ) + goto _test_eof14; + st_case_14: + switch( ( deref( data, p )) ) { + case 10: { + goto ctr42; + } + case 34: { + goto ctr44; + } + case 39: { + goto ctr45; + } + case 46: { + goto ctr46; + } + case 47: { + goto ctr47; + } + case 95: { + goto ctr49; + } + case 120: { + goto st8; + } + } + if ( ( deref( data, p )) < 65 ) { + if ( ( deref( data, p )) < 48 ) { + if ( 33 <= ( deref( data, p )) && ( deref( data, p )) <= 45 ) { + goto ctr43; + } + } else if ( ( deref( data, p )) > 57 ) { + { + goto ctr43; + } + } else { + goto ctr48; + } + } else if ( ( deref( data, p )) > 90 ) { + if ( ( deref( data, p )) < 97 ) { + { + goto ctr43; + } + } else if ( ( deref( data, p )) > 122 ) { + if ( ( deref( data, p )) <= 126 ) { + goto ctr43; + } + } else { + goto ctr49; + } + } else { + goto ctr49; + } + { + goto ctr41; + } + ctr46: + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st7; + st7: + p+= 1; + if ( p == pe ) + goto _test_eof7; + st_case_7: + if ( 48 <= ( deref( data, p )) && ( deref( data, p )) <= 57 ) { + goto ctr13; + } + { + goto st0; + } + st_case_0: + st0: + cs = 0; + goto _out; + ctr13: + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st15; + st15: + p+= 1; + if ( p == pe ) + goto _test_eof15; + st_case_15: + switch( ( deref( data, p )) ) { + case 10: { + goto ctr52; + } + case 34: { + goto ctr54; + } + case 39: { + goto ctr55; + } + case 47: { + goto ctr56; + } + case 95: { + goto ctr57; + } + } + if ( ( deref( data, p )) < 65 ) { + if ( ( deref( data, p )) < 48 ) { + if ( 33 <= ( deref( data, p )) && ( deref( data, p )) <= 46 ) { + goto ctr53; + } + } else if ( ( deref( data, p )) > 57 ) { + { + goto ctr53; + } + } else { + goto ctr13; + } + } else if ( ( deref( data, p )) > 90 ) { + if ( ( deref( data, p )) < 97 ) { + { + goto ctr53; + } + } else if ( ( deref( data, p )) > 122 ) { + if ( ( deref( data, p )) <= 126 ) { + goto ctr53; + } + } else { + goto ctr57; + } + } else { + goto ctr57; + } + { + goto ctr51; + } + ctr64: + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st16; + ctr22: + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st16; + ctr31: + host( "working/clang4_go.rl", 34 ) ${fmt.Print( "symbol(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st16; + ctr40: + host( "working/clang4_go.rl", 30 ) ${fmt.Print( "literal(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st16; + ctr49: + host( "working/clang4_go.rl", 32 ) ${fmt.Print( "int(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st16; + ctr57: + host( "working/clang4_go.rl", 31 ) ${fmt.Print( "float(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st16; + ctr72: + host( "working/clang4_go.rl", 33 ) ${fmt.Print( "hex(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st16; + st16: + p+= 1; + if ( p == pe ) + goto _test_eof16; + st_case_16: + switch( ( deref( data, p )) ) { + case 10: { + goto ctr59; + } + case 34: { + goto ctr61; + } + case 39: { + goto ctr62; + } + case 47: { + goto ctr63; + } + case 95: { + goto ctr64; + } + } + if ( ( deref( data, p )) < 65 ) { + if ( ( deref( data, p )) < 48 ) { + if ( 33 <= ( deref( data, p )) && ( deref( data, p )) <= 46 ) { + goto ctr60; + } + } else if ( ( deref( data, p )) > 57 ) { + { + goto ctr60; + } + } else { + goto ctr64; + } + } else if ( ( deref( data, p )) > 90 ) { + if ( ( deref( data, p )) < 97 ) { + { + goto ctr60; + } + } else if ( ( deref( data, p )) > 122 ) { + if ( ( deref( data, p )) <= 126 ) { + goto ctr60; + } + } else { + goto ctr64; + } + } else { + goto ctr64; + } + { + goto ctr58; + } + ctr48: + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st17; + ctr21: + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st17; + ctr30: + host( "working/clang4_go.rl", 34 ) ${fmt.Print( "symbol(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st17; + ctr39: + host( "working/clang4_go.rl", 30 ) ${fmt.Print( "literal(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st17; + st17: + p+= 1; + if ( p == pe ) + goto _test_eof17; + st_case_17: + switch( ( deref( data, p )) ) { + case 10: { + goto ctr42; + } + case 34: { + goto ctr44; + } + case 39: { + goto ctr45; + } + case 46: { + goto ctr46; + } + case 47: { + goto ctr47; + } + case 95: { + goto ctr49; + } + } + if ( ( deref( data, p )) < 65 ) { + if ( ( deref( data, p )) < 48 ) { + if ( 33 <= ( deref( data, p )) && ( deref( data, p )) <= 45 ) { + goto ctr43; + } + } else if ( ( deref( data, p )) > 57 ) { + { + goto ctr43; + } + } else { + goto ctr48; + } + } else if ( ( deref( data, p )) > 90 ) { + if ( ( deref( data, p )) < 97 ) { + { + goto ctr43; + } + } else if ( ( deref( data, p )) > 122 ) { + if ( ( deref( data, p )) <= 126 ) { + goto ctr43; + } + } else { + goto ctr49; + } + } else { + goto ctr49; + } + { + goto ctr41; + } + st8: + p+= 1; + if ( p == pe ) + goto _test_eof8; + st_case_8: + if ( ( deref( data, p )) < 65 ) { + if ( 48 <= ( deref( data, p )) && ( deref( data, p )) <= 57 ) { + goto ctr15; + } + } else if ( ( deref( data, p )) > 70 ) { + if ( 97 <= ( deref( data, p )) && ( deref( data, p )) <= 102 ) { + goto ctr15; + } + } else { + goto ctr15; + } + { + goto st0; + } + ctr71: + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st18; + ctr15: + host( "working/clang4_go.rl", 22 ) ${ blen = 0; + }$ + host( "working/clang4_go.rl", 16 ) ${ buffer[blen] = ={( deref( data, p ))}=; + blen += 1; + buffer[blen] = 0; + }$ + + goto st18; + st18: + p+= 1; + if ( p == pe ) + goto _test_eof18; + st_case_18: + switch( ( deref( data, p )) ) { + case 10: { + goto ctr66; + } + case 34: { + goto ctr68; + } + case 39: { + goto ctr69; + } + case 47: { + goto ctr70; + } + case 95: { + goto ctr72; + } + } + if ( ( deref( data, p )) < 71 ) { + if ( ( deref( data, p )) < 48 ) { + if ( 33 <= ( deref( data, p )) && ( deref( data, p )) <= 46 ) { + goto ctr67; + } + } else if ( ( deref( data, p )) > 57 ) { + if ( ( deref( data, p )) > 64 ) { + { + goto ctr71; + } + } else { + goto ctr67; + } + } else { + goto ctr71; + } + } else if ( ( deref( data, p )) > 90 ) { + if ( ( deref( data, p )) < 97 ) { + { + goto ctr67; + } + } else if ( ( deref( data, p )) > 102 ) { + if ( ( deref( data, p )) > 122 ) { + if ( ( deref( data, p )) <= 126 ) { + goto ctr67; + } + } else { + goto ctr72; + } + } else { + goto ctr71; + } + } else { + goto ctr72; + } + { + goto ctr65; + } + st9: + p+= 1; + if ( p == pe ) + goto _test_eof9; + st_case_9: + if ( ( deref( data, p )) == 10 ) { + goto ctr1; + } + { + goto ctr0; + } + st_out: + _test_eof10: cs = 10; goto _test_eof; + _test_eof11: cs = 11; goto _test_eof; + _test_eof1: cs = 1; goto _test_eof; + _test_eof12: cs = 12; goto _test_eof; + _test_eof2: cs = 2; goto _test_eof; + _test_eof3: cs = 3; goto _test_eof; + _test_eof13: cs = 13; goto _test_eof; + _test_eof4: cs = 4; goto _test_eof; + _test_eof5: cs = 5; goto _test_eof; + _test_eof6: cs = 6; goto _test_eof; + _test_eof14: cs = 14; goto _test_eof; + _test_eof7: cs = 7; goto _test_eof; + _test_eof15: cs = 15; goto _test_eof; + _test_eof16: cs = 16; goto _test_eof; + _test_eof17: cs = 17; goto _test_eof; + _test_eof8: cs = 8; goto _test_eof; + _test_eof18: cs = 18; goto _test_eof; + _test_eof9: cs = 9; goto _test_eof; + + _test_eof: {} + if ( p == eof ) + { + switch ( cs ) { + case 16: + host( "working/clang4_go.rl", 29 ) ${fmt.Print( "ident(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + break; + case 12: + host( "working/clang4_go.rl", 30 ) ${fmt.Print( "literal(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + break; + case 15: + host( "working/clang4_go.rl", 31 ) ${fmt.Print( "float(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + break; + case 14: + fallthrough; + case 17: + host( "working/clang4_go.rl", 32 ) ${fmt.Print( "int(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + break; + case 18: + host( "working/clang4_go.rl", 33 ) ${fmt.Print( "hex(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + break; + case 11: + fallthrough; + case 13: + host( "working/clang4_go.rl", 34 ) ${fmt.Print( "symbol(" );fmt.Print( line );fmt.Print( "," );fmt.Print( blen );fmt.Print( "): " );fmt.Print( string ( buffer[:blen] ) );fmt.Print( "\n" );}$ + break; + } + } + + _out: {} + } + host( "working/clang4_go.rl", 132 ) @{ + } + func finish() { + if cs >= clang_first_final { + fmt.Println("ACCEPT") + } else { + fmt.Println("FAIL") + } + } + var inp []string = []string { + "999 0xaAFF99 99.99 /!\n!/ 'lksdj' //\n\"\n\nliteral\n\n\n\"0x00aba foobardd.ddsf 0x0.9\n", + "wordwithnum00asdf\n000wordfollowsnum,makes new symbol\n\nfinishing early /! unfinished ...\n", + }; + + func main() { + for _, data := range inp { + prepare() + exec(data) + finish() + } + } +}@
\ No newline at end of file |