Q:

why does go yacc parser panic while defining more types?

I wrote a test.y file with more types. After certain limit, when I compiled the file with command,
go tool yacc test
It panics,"Index out of range in yacc.go:891"
When I looked at the file https://golang.org/src/cmd/yacc/yacc.go, I saw this comment in defining the constants
"the following are adjustable according to memory size"
Is there a reason why they have limited the number of type definition to 63(NTYPES = 63) in line 74(in the file mentioned in the link above)

A:

"It panics,"Index out of range in yacc.go:891" "
I got into the same problem because I needed more types (non-term and term types) and what I did to remedy my situation was to change several values.
Please see my GitHub page documenting my change.
Or simply click on the URL below.
https://github.com/MagnusTiberius/go/commit/d4eeb860229867c76d99e67d69bdbd7cc729ce2c

