Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected token kEND (Parser::SyntaxError) #8

Open
mslinn opened this issue Sep 27, 2018 · 1 comment
Open

unexpected token kEND (Parser::SyntaxError) #8

mslinn opened this issue Sep 27, 2018 · 1 comment

Comments

@mslinn
Copy link

mslinn commented Sep 27, 2018

First time I tried to use zombie_scout, on a large program written by someone else, I got this:

$ zombie_scout scout
(string):544:1: error: unexpected token kEND
(string):544: end
(string):544: ^~~
Traceback (most recent call last):
        20: from /usr/local/bin/zombie_scout:23:in `<main>'
        19: from /usr/local/bin/zombie_scout:23:in `load'
        18: from /var/lib/gems/2.5.0/gems/zombie_scout-0.0.6/bin/zombie_scout:5:in `<top (required)>'
        17: from /var/lib/gems/2.5.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
        16: from /var/lib/gems/2.5.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
        15: from /var/lib/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
        14: from /var/lib/gems/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
        13: from /var/lib/gems/2.5.0/gems/zombie_scout-0.0.6/lib/zombie_scout/app.rb:11:in `scout'
        12: from /var/lib/gems/2.5.0/gems/zombie_scout-0.0.6/lib/zombie_scout/mission.rb:18:in `scout'
        11: from /var/lib/gems/2.5.0/gems/zombie_scout-0.0.6/lib/zombie_scout/mission.rb:55:in `zombies'
        10: from /var/lib/gems/2.5.0/gems/zombie_scout-0.0.6/lib/zombie_scout/mission.rb:64:in `scout!'
         9: from /var/lib/gems/2.5.0/gems/zombie_scout-0.0.6/lib/zombie_scout/mission.rb:64:in `each'
         8: from /var/lib/gems/2.5.0/gems/zombie_scout-0.0.6/lib/zombie_scout/mission.rb:65:in `block in scout!'
         7: from /var/lib/gems/2.5.0/gems/zombie_scout-0.0.6/lib/zombie_scout/mission.rb:65:in `new'
         6: from /var/lib/gems/2.5.0/gems/zombie_scout-0.0.6/lib/zombie_scout/parser.rb:13:in `initialize'
         5: from /var/lib/gems/2.5.0/gems/parser-2.5.1.2/lib/parser/base.rb:33:in `parse'
         4: from /var/lib/gems/2.5.0/gems/parser-2.5.1.2/lib/parser/base.rb:167:in `parse'
         3: from /usr/lib/ruby/2.5.0/racc/parser.rb:259:in `do_parse'
         2: from /usr/lib/ruby/2.5.0/racc/parser.rb:259:in `_racc_do_parse_c'
         1: from /var/lib/gems/2.5.0/gems/parser-2.5.1.2/lib/parser/base.rb:262:in `on_error'
/var/lib/gems/2.5.0/gems/parser-2.5.1.2/lib/parser/diagnostic/engine.rb:73:in `process': unexpected token kEND (Parser::SyntaxError)
@danbernier
Copy link
Owner

I'm guessing this is a side-effect of #6 - if there's a parse error in the source, zombie_scout just falls over. Iirr, I didn't fix this quickly, because I ran into trouble reproducing it reliably. Maybe the best solution is to remove the flog scores - though it's nice to see which methods are expensive. But maybe it's best to let it go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants