/usr/share/doc/re2c/examples/go
// Code generated by re2c, DO NOT EDIT. //go:generate re2go $INPUT -o $OUTPUT -i package main // // func lex(str string) { // Go code var cursor int // // { var yych byte yych = str[cursor] if (yych <= '0') { goto yy2 } if (yych <= '9') { goto yy4 } yy2: cursor += 1 { panic("error!"); } yy4: cursor += 1 yych = str[cursor] if (yych <= '/') { goto yy6 } if (yych <= '9') { goto yy4 } yy6: { return } } } // // func main() { // Go code lex("1234\x00") // } //
.
Edit
..
Edit
01_basic.go
Edit
01_basic.re
Edit
__run_all.sh
Edit
conditions
Edit
encodings
Edit
eof
Edit
fill
Edit
headers
Edit
includes
Edit
reuse
Edit
state
Edit
submatch
Edit