diff --git a/lib/imbecile/grammar.rb b/lib/imbecile/grammar.rb index b1c4fbe..11b1d2d 100644 --- a/lib/imbecile/grammar.rb +++ b/lib/imbecile/grammar.rb @@ -27,8 +27,12 @@ module Imbecile return false end @tokens[name] = expr + else + $stderr.puts "Unexpected input on line #{line_number}: #{line}" + return false end end + true end end