Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(781)

Issue 879041: code review 879041: Change goyacc to be reentrant. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 12 months ago by rog
Modified:
14 years, 11 months ago
Reviewers:
CC:
rsc, ken2, ken3, golang-dev
Visibility:
Public.

Description

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.

Patch Set 1 #

Patch Set 2 : code review 879041: Change goyacc to be reentrant. #

Patch Set 3 : code review 879041: Change goyacc to be reentrant. #

Patch Set 4 : code review 879041: Change goyacc to be reentrant. #

Patch Set 5 : code review 879041: Change goyacc to be reentrant. #

Patch Set 6 : code review 879041: Change goyacc to be reentrant. #

Patch Set 7 : code review 879041: Change goyacc to be reentrant. #

Total comments: 1

Patch Set 8 : code review 879041: Change goyacc to be reentrant. #

Patch Set 9 : code review 879041: Change goyacc to be reentrant. #

Patch Set 10 : code review 879041: Change goyacc to be reentrant. #

Patch Set 11 : code review 879041: Change goyacc to be reentrant. #

Total comments: 4

Patch Set 12 : code review 879041: Change goyacc to be reentrant. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+535 lines, -608 lines) Patch
M src/cmd/goyacc/doc.go View 1 2 3 4 5 6 7 8 9 10 1 chunk +13 lines, -0 lines 0 comments Download
M src/cmd/goyacc/goyacc.go View 1 2 3 4 5 6 7 8 9 10 11 38 chunks +199 lines, -263 lines 0 comments Download
M src/cmd/goyacc/units.y View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +323 lines, -345 lines 0 comments Download

Messages

Total messages: 7
rog
Hello gri, rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change.
14 years, 12 months ago (2010-04-01 14:31:05 UTC) #1
rog
to make it behave sensibly when used in a non-main package, i've also renamed all ...
14 years, 12 months ago (2010-04-01 15:32:50 UTC) #2
rsc1
-gri, +ken2
14 years, 12 months ago (2010-04-01 15:57:23 UTC) #3
rsc1
LGTM but i'll wait for ken before submitting. http://codereview.appspot.com/879041/diff/13001/14003 File src/cmd/goyacc/units.y (right): http://codereview.appspot.com/879041/diff/13001/14003#newcode218 src/cmd/goyacc/units.y:218: func ...
14 years, 12 months ago (2010-04-01 16:00:51 UTC) #4
ken3
LGTM some nits - in the conversion from Error() to fmt.Print(), newlines were removed from ...
14 years, 12 months ago (2010-04-05 21:47:35 UTC) #5
rog
On 5 April 2010 22:47, <ken@google.com> wrote: > LGTM > > some nits - in ...
14 years, 12 months ago (2010-04-06 11:09:22 UTC) #6
ken3
14 years, 11 months ago (2010-04-06 20:29:31 UTC) #7
*** Submitted as http://code.google.com/p/go/source/detail?r=df523f06e5c7 ***

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
http://codereview.appspot.com/879041

Committer: Ken Thompson <ken@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b