Lines Matching refs:scanner

31 	Pos scanner.Position
53 p.accept(scanner.EOF)
61 scanner scanner.Scanner member
72 p.scanner.Init(r)
73 p.scanner.Error = func(sc *scanner.Scanner, msg string) {
76 p.scanner.Whitespace = 0
77 p.scanner.IsIdentRune = func(ch rune, i int) bool {
82 p.scanner.Mode = scanner.ScanIdents
83 p.scanner.Filename = filename
88 func (p *parser) Unpack(pos Pos) scanner.Position {
91 return scanner.Position{
92 Filename: p.scanner.Filename,
100 pos := p.scanner.Position
102 pos = p.scanner.Pos()
110 Pos: p.scanner.Position,
121 p.errorf("expected %s, found %s", scanner.TokenString(tok),
122 scanner.TokenString(p.tok))
131 if p.tok != scanner.EOF {
132 p.tok = p.scanner.Scan()
134 p.tok = p.scanner.Scan()
138 p.lines = append(p.lines, p.scanner.Position.Offset+1)
179 case '#', '\n', scanner.EOF:
187 case scanner.EOF:
196 p.scanner.TokenText())
203 if p.tok != scanner.Ident || !isDirective(p.scanner.TokenText()) {
207 d := p.scanner.TokenText()
209 p.accept(scanner.Ident)
220 d = p.scanner.TokenText()
221 p.accept(scanner.Ident)
252 case scanner.Ident:
253 value.appendString(p.scanner.TokenText())
254 if p.scanner.TokenText() == "endef" {
255 p.accept(scanner.Ident)
258 p.accept(scanner.Ident)
264 case scanner.EOF:
266 scanner.TokenString(p.tok))
277 case scanner.EOF:
281 value.appendString(p.scanner.TokenText())
290 p.scanner.Mode = 0
292 p.scanner.Mode = scanner.ScanIdents
324 case scanner.Ident:
325 value.appendString(p.scanner.TokenText())
326 p.accept(scanner.Ident)
332 case scanner.EOF:
334 scanner.TokenString(p.tok))
351 case scanner.EOF:
360 value.appendString(p.scanner.TokenText())
383 case scanner.EOF:
385 scanner.TokenString(p.tok))
436 case scanner.EOF:
439 recipe += p.scanner.TokenText()
482 case scanner.EOF:
485 p.errorf("unexpected token %s after rule prerequisites", scanner.TokenString(p.tok))
500 comment += "\\" + p.scanner.TokenText()
505 case scanner.EOF:
508 comment += p.scanner.TokenText()
637 return ch != scanner.Ident && ch != ':' && ch != '=' && ch != '#'