3 comments

[ 1.9 ms ] story [ 7.3 ms ] thread
> yacc: generating .go files from yacc grammar (.y) files

Go has its own parser already[1], and who still uses yacc? Don't people use Flex/Bison?

[1] http://golang.org/pkg/go/parser/

First of all, Go's parser only parses Go. Yacc parses a lot of things. Other than that :

- you can find yacc files for pretty much anything.

- yacc prides itself on language support. Go shouldn't feel to flattered here, there's brainfuck support too.

- lots of tools are basically yacc + a tiny bit of code, you may want to translate these to go

- Go's parsing sucks (or how you say it : who still writes parsers like this ? Parser combinators are the baseline these days. There's just no way to make a parser easier to change. Who still separates parsing and lexing ?) (this boils down, again, to Go essentially at best being a 1980s programming language)

> > yacc: generating .go files from yacc grammar (.y) files

> First of all, Go's parser only parses Go.

You want to generate go files from something other than Go?

Edit: Now that I've written and read what I've written I realized I was confused. Nevermind! I still prefer Flex and Bison over Lex and Yacc.