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

Delta Between Two Patch Sets: src/pkg/ebnf/parser.go

Issue 3050041: code review 3050041: go/ast: use token.Pos instead of token.Position; adjus... (Closed)
Left Patch Set: code review 3050041: use token.Pos instead of token.Position Created 14 years, 3 months ago
Right Patch Set: code review 3050041: go/ast: use token.Pos instead of token.Position; adjus... 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:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/ebnf/ebnf_test.go ('k') | src/pkg/exp/datafmt/datafmt_test.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 package ebnf 5 package ebnf
6 6
7 import ( 7 import (
8 "go/scanner" 8 "go/scanner"
9 "go/token" 9 "go/token"
10 "os" 10 "os"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 } 191 }
192 } 192 }
193 193
194 return grammar 194 return grammar
195 } 195 }
196 196
197 197
198 // Parse parses a set of EBNF productions from source src. 198 // Parse parses a set of EBNF productions from source src.
199 // It returns a set of productions. Errors are reported 199 // It returns a set of productions. Errors are reported
200 // for incorrect syntax and if a production is declared 200 // for incorrect syntax and if a production is declared
201 // more than once. 201 // more than once. Position information is recorded relative
202 // to the file set fset.
202 // 203 //
203 func Parse(fset *token.FileSet, filename string, src []byte) (Grammar, os.Error) { 204 func Parse(fset *token.FileSet, filename string, src []byte) (Grammar, os.Error) {
204 var p parser 205 var p parser
205 grammar := p.parse(fset, filename, src) 206 grammar := p.parse(fset, filename, src)
206 return grammar, p.GetError(scanner.Sorted) 207 return grammar, p.GetError(scanner.Sorted)
207 } 208 }
LEFTRIGHT

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