]> Cypherpunks repositories - gostls13.git/commit
Change goyacc to be reentrant.
authorRoger Peppe <rogpeppe@gmail.com>
Tue, 6 Apr 2010 20:29:27 +0000 (13:29 -0700)
committerKen Thompson <ken@golang.org>
Tue, 6 Apr 2010 20:29:27 +0000 (13:29 -0700)
commit6c3befc824ce9980666aea5e3a2783a0e4872999
tree81f79a734ece1d00b5b934523034074db85cd05e
parent29c6c09f71eca92e96c87d909ef0c09535b76a0e
Change goyacc to be reentrant.
Instead of calling the package scope Lex function,
Parse now takes an argument which is used to
do the lexing.
I reverted to having the generated switch
code inside Parse rather than a separate function because
the function needs 7 arguments or a context structure,
which seems unnecessary.
I used yyrun(), not the original $A so that
it's possible to run the backquoted code through gofmt.

R=rsc, ken2, ken3
CC=golang-dev
https://golang.org/cl/879041
src/cmd/goyacc/doc.go
src/cmd/goyacc/goyacc.go
src/cmd/goyacc/units.y