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

Side by Side Diff: src/cmd/goyacc/goyacc.go

Issue 3483041: code review 3483041: use the new %U format for runes (Closed)
Patch Set: code review 3483041: use the new %U format for runes Created 14 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/pkg/bytes/buffer_test.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 Derived from Inferno's utils/iyacc/yacc.c 2 Derived from Inferno's utils/iyacc/yacc.c
3 http://code.google.com/p/inferno-os/source/browse/utils/iyacc/yacc.c 3 http://code.google.com/p/inferno-os/source/browse/utils/iyacc/yacc.c
4 4
5 This copyright NOTICE applies to all files in this directory and 5 This copyright NOTICE applies to all files in this directory and
6 subdirectories, unless another copyright notice appears in a given 6 subdirectories, unless another copyright notice appears in a given
7 file or subdirectory. If you take substantial code from this software to use in 7 file or subdirectory. If you take substantial code from this software to use in
8 other programs, you must somehow include with it an appropriate 8 other programs, you must somehow include with it an appropriate
9 copyright notice that includes the copyright notice and the other 9 copyright notice that includes the copyright notice and the other
10 notices below. It is fine (and often tidier) to do that in a separate 10 notices below. It is fine (and often tidier) to do that in a separate
(...skipping 3121 matching lines...) Expand 10 before | Expand all | Expand 10 after
3132 goto out 3132 goto out
3133 } 3133 }
3134 } 3134 }
3135 c = 0 3135 c = 0
3136 3136
3137 out: 3137 out:
3138 if c == 0 { 3138 if c == 0 {
3139 c = yyTok2[1] /* unknown char */ 3139 c = yyTok2[1] /* unknown char */
3140 } 3140 }
3141 if yyDebug >= 3 { 3141 if yyDebug >= 3 {
3142 » » fmt.Printf("lex %.4x %s\n", uint(yychar), yyTokname(c)) 3142 » » fmt.Printf("lex %U %s\n", uint(yychar), yyTokname(c))
3143 } 3143 }
3144 return c 3144 return c
3145 } 3145 }
3146 3146
3147 func yyParse(yylex yyLexer) int { 3147 func yyParse(yylex yyLexer) int {
3148 var yyn int 3148 var yyn int
3149 var yylval yySymType 3149 var yylval yySymType
3150 var YYVAL yySymType 3150 var YYVAL yySymType
3151 YYS := make([]yySymType, yyMaxDepth) 3151 YYS := make([]yySymType, yyMaxDepth)
3152 3152
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
3298 yystate = yyAct[yyj] 3298 yystate = yyAct[yyj]
3299 if yyChk[yystate] != -yyn { 3299 if yyChk[yystate] != -yyn {
3300 yystate = yyAct[yyg] 3300 yystate = yyAct[yyg]
3301 } 3301 }
3302 } 3302 }
3303 // dummy call; replaced with literal code 3303 // dummy call; replaced with literal code
3304 yyrun() 3304 yyrun()
3305 goto yystack /* stack new state and value */ 3305 goto yystack /* stack new state and value */
3306 } 3306 }
3307 ` 3307 `
OLDNEW
« no previous file with comments | « no previous file | src/pkg/bytes/buffer_test.go » ('j') | no next file with comments »

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