Skip to content

Spurious initial \n in error messages #156

@akimd

Description

@akimd

Error messages start with a spurious empty line, as demonstrated by the example below.

class ArrayParser

rule

exp   : 'x'
  
---- inner

  def next_token
    ['y', 'y']
  end

---- footer

begin
  ArrayParser.new.do_parse
rescue => e
  puts "error: '#{e}'"
end
$ racc array.y && ruby array.tab.rb
error: '
parse error on value "y" (error)'

It may be connected to some feature I'm unaware of, in which case please point me to the appropriate documentation.

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions