Merge pull request #7 from wendal/master

ignore small parse error
This commit is contained in:
knieriem 2013-01-08 11:07:45 -08:00
commit 75aa87b55f

View File

@ -106,8 +106,9 @@ L:
} }
func (p *Parser) parseRule(rule int, s string) (tree *element) { func (p *Parser) parseRule(rule int, s string) (tree *element) {
if p.yy.ResetBuffer(s) != "" { _old := p.yy.ResetBuffer(s)
log.Fatalf("Buffer not empty") if _old != "" && if strings.Trim(_old, "\t\r\n ") != "" {
log.Fatalln("Buffer not empty", "["+_old+"]")
} }
err := p.yy.Parse(rule) err := p.yy.Parse(rule)
switch rule { switch rule {