mirror of https://github.com/golang/go.git
goyacc: Fix debug printing of the lexed token's ID and name, and add whitespace in the 'stateX saw' message.
R=golang-dev, r CC=golang-dev https://golang.org/cl/13352048
This commit is contained in:
parent
3714d69b15
commit
27cb23ceb1
|
|
@ -3281,7 +3281,7 @@ out:
|
|||
c = $$Tok2[1] /* unknown char */
|
||||
}
|
||||
if $$Debug >= 3 {
|
||||
__yyfmt__.Printf("lex %U %s\n", uint(char), $$Tokname(c))
|
||||
__yyfmt__.Printf("lex %s(%d)\n", $$Tokname(c), uint(char))
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
|
@ -3378,7 +3378,7 @@ $$default:
|
|||
Nerrs++
|
||||
if $$Debug >= 1 {
|
||||
__yyfmt__.Printf("%s", $$Statname($$state))
|
||||
__yyfmt__.Printf("saw %s\n", $$Tokname($$char))
|
||||
__yyfmt__.Printf(" saw %s\n", $$Tokname($$char))
|
||||
}
|
||||
fallthrough
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue