Run begins the Parser state machine It requires a start state
(start parseState)
| 38 | // Run begins the Parser state machine |
| 39 | // It requires a start state |
| 40 | func (p *Parser) Run(start parseState) error { |
| 41 | for state := start; state != nil; { |
| 42 | state = state(p) |
| 43 | } |
| 44 | |
| 45 | return p.err |
| 46 | } |
| 47 | |
| 48 | func (p *Parser) errorUnexpectedLex(f LexItem, e ...lexItemType) { |
| 49 | s := "" |