Go - How to create a parser

后端 未结 6 927
醉话见心
醉话见心 2020-12-22 23:16

I want to build a parser but have some problems understanding how to do this.

Sample string I would like to parse

{key1 = value1 | key2 = {key3 = val         


        
6条回答
  •  鱼传尺愫
    2020-12-22 23:43

    Be advised that, with Go 1.8 (currently in beta in Q4 2016, released in Q1 2017)

    The yacc tool (previously available by running “go tool yacc”) has been removed.
    As of Go 1.7 it was no longer used by the Go compiler.

    It has moved to the “tools” repository and is now available at golang.org/x/tools/cmd/goyacc.

提交回复
热议问题