Skip to content
This repository has been archived by the owner on Nov 22, 2018. It is now read-only.

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

Closed
LPX-E5BD8 opened this issue Jun 22, 2018 · 5 comments
Closed

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

LPX-E5BD8 opened this issue Jun 22, 2018 · 5 comments
Assignees

Comments

@LPX-E5BD8
Copy link

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 cznic self-assigned this Jun 22, 2018
@cznic
Copy link
Owner

cznic commented Jun 22, 2018

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
Copy link
Author

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

@cznic
Copy link
Owner

cznic commented Jun 22, 2018

It seems you have not performed the commands in #28 (comment), 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
Copy link
Author

LPX-E5BD8 commented Jun 22, 2018

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
Copy link
Owner

cznic commented Jun 22, 2018

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants