inukshuk/anystyle-parser — Issue #2: Dies on certain input texts
Author: houshuang
Created: 2012-02-22 18:41:33+00:00
State: open

I inadvertently fed anystyle-parse some weird input text, and it choked. Granted, it's not supposed to be able to parse this properly, but it probably shouldn't choke either?

Input text "@misc{70213094902020,\n doi = {DOI:10.1503/jpn.100140}\n}\n"

result:
/Users/Stian/.rbenv/versions/1.9.3-rc1/lib/ruby/gems/1.9.1/gems/wapiti-0.0.5/lib/wapiti/model.rb:47:in `label': missing tokens, cannot apply pattern (Wapiti::NativeError)
from /Users/Stian/.rbenv/versions/1.9.3-rc1/lib/ruby/gems/1.9.1/gems/wapiti-0.0.5/lib/wapiti/model.rb:47:in `label'
from /Users/Stian/.rbenv/versions/1.9.3-rc1/lib/ruby/gems/1.9.1/gems/anystyle-parser-0.0.9/lib/anystyle/parser/parser.rb:59:in `label'
from /Users/Stian/.rbenv/versions/1.9.3-rc1/lib/ruby/gems/1.9.1/gems/anystyle-parser-0.0.9/lib/anystyle/parser/parser.rb:50:in `parse'
from /Users/Stian/.rbenv/versions/1.9.3-rc1/lib/ruby/gems/1.9.1/gems/anystyle-parser-0.0.9/lib/anystyle/parser/utility.rb:4:in `parse'
from anystyle-import.rb:34:in `

'