Releases: Vovan-VE/go-lr0-parser
Releases · Vovan-VE/go-lr0-parser
v0.1.0
- Add: A
Terminal
can now be defined with more trivial callbacks. The*TerminalFactory
now hasFuncByte()
andFuncRune()
:NewTerm(tInt, "int").FuncByte(isDigit, bytesToInt) NewWhitespace().FuncRune(unicode.IsSpace) func isDigit(b byte) bool { return b >= '0' && b <= '9' } func bytesToInt(b []byte) (int, error) { return strconv.Atoi(string(b)) }