cznic / goyacc

github.com/cznic/goyacc has moved to modernc.org/goyacc
https://godoc.org/modernc.org/goyacc
BSD 3-Clause "New" or "Revised" License
208 stars 24 forks source link

same *.y file has different output in different system. #28

Closed LPX-E5BD8 closed 6 years ago

LPX-E5BD8 commented 6 years ago

I have a *.y file to generate a parser for sql, but I found there was different output between MacOS(10.13) and Linux(CentOS 6.3). Ant the output parser from MacOS not working good. I had to generate the parser on linux and send the parser file to mac to continue my work. There are lost of different between to parser.

I use the command like this:

goyacc -o sql.go sql.y
gofmt -w sql.go
cznic commented 6 years ago

Please ensure that you have the same version of goyacc on both systems by issuing

$ rm $(which goyacc)
$ go get -u github.com/cznic/goyacc

on each machine.

If you still get different results, please attach here the source .y and both result .go files, thank you.

LPX-E5BD8 commented 6 years ago

:(
I do update the goyacc but there is still getting different resuts. yacc.zip

cznic commented 6 years ago

It seems you have not performed the commands in https://github.com/cznic/goyacc/issues/28#issuecomment-399324313, becacuse the sql.go.linux file was definitely not produced by github.com/cznic/goyacc. It is probably produced by golang.org/x/tools/cmd/goyacc instead.

LPX-E5BD8 commented 6 years ago

ops... It's all my fault. golang.org/x/tools/cmd/goyacc working good. but .. github.com/cznic/goyacc is not working well with my project. so thanks for your time. : )

cznic commented 6 years ago

but .. github.com/cznic/goyacc is not working well with my project.

Please fill an issue with the description of why it's not working well, thank you.