:like: tanks you. so go.y is for go compiler and cc.y is for go-c compiler.
all `.go` files require go compiler. and what files require go-c compiler? may tell some example file then is go-c? On Monday, February 19, 2018 at 2:32:02 AM UTC+3:30, Dave Cheney wrote: > > In Go 1.4 the project contained both .go files and .c files. It shipped > with two compilers, a go compiler, called gc, and a c compiler called cc. > > > /go/src/cmd/gc/go.y > > This is the input file for the yacc grammar for the Go 1.4 go compiler > > > /go/src/cmd/cc/cc.y > > This is the input file for the yacc grammar for the Go 1.4 c compiler > > The same advice applies to the other two files you mentioned. > > On Monday, 19 February 2018 09:57:21 UTC+11, Compiler wrote: >> >> yeah , in go1.4 version,i want know difference between files. >> ?! >> >> On Monday, February 19, 2018 at 2:04:09 AM UTC+3:30, Ian Lance Taylor >> wrote: >>> >>> On Sun, Feb 18, 2018 at 9:23 AM, Compiler <erfang...@gmail.com> wrote: >>> > #Question >>> > >>> > What is the difference between using the following two files? >>> > >>> > /go/src/cmd/gc/go.y >>> > /go/src/cmd/cc/cc.y >>> > >>> > ------------- >>> > #Question >>> > >>> > What is the difference between using the following two files? >>> > >>> > /go/src/cmd/gc/lex.c >>> > /go/src/cmd/cc/lex.c >>> >>> You must be looking at a very old version of Go, as current versions >>> of Go do not contain either file. >>> >>> Old versions of Go shipped with a C compiler that was used to build >>> parts of the runtime that were written in C. Those parts were >>> rewritten into Go, and Go no longer ships a C compiler. Back then, >>> the Go compiler was in cmd/gc and the C compiler was in cmd/cc. >>> >>> Ian >>> >> -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.