Commit 27cb23ce authored by Jamie Wilkinson's avatar Jamie Wilkinson Committed by Rob Pike

goyacc: Fix debug printing of the lexed token's ID and name, and add...

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
parent 3714d69b
...@@ -3281,7 +3281,7 @@ out: ...@@ -3281,7 +3281,7 @@ out:
c = $$Tok2[1] /* unknown char */ c = $$Tok2[1] /* unknown char */
} }
if $$Debug >= 3 { 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 return c
} }
...@@ -3378,7 +3378,7 @@ $$default: ...@@ -3378,7 +3378,7 @@ $$default:
Nerrs++ Nerrs++
if $$Debug >= 1 { if $$Debug >= 1 {
__yyfmt__.Printf("%s", $$Statname($$state)) __yyfmt__.Printf("%s", $$Statname($$state))
__yyfmt__.Printf("saw %s\n", $$Tokname($$char)) __yyfmt__.Printf(" saw %s\n", $$Tokname($$char))
} }
fallthrough fallthrough
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment