1
0
mirror of https://github.com/golang/go synced 2024-09-25 15:20:13 -06:00

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:
Jamie Wilkinson 2013-09-13 13:18:02 +10:00 committed by Rob Pike
parent 3714d69b15
commit 27cb23ceb1

View File

@ -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