mame/quine-relay · error · RuntimeError

Unrecognised input

Error message

Unrecognised input

What it means

Error "Unrecognised input" thrown in mame/quine-relay.

Source

Thrown at vendor/whitespace.rb:37

  | 200 (?<mark>)\g<label>2
  | 201 (?<call>)\g<label>2
  | 202 (?<jump>)\g<label>2
  | 210 (?<jz>)\g<label>2
  | 211 (?<jn>)\g<label>2
  | 212 (?<ret>)
  | 222 (?<end>)
  |     (?<eof>)\z
  |     (?<error>)
  )/x

names = RE.names.map {|n| n.to_sym } - [:num, :label]
code, labels = [], {}
File.read($*[0]).gsub(/[^ \t\n]/m, "").tr(" \t\n", "012").scan(RE) do
  insn = names.find {|n| $~[n] }
  arg = $~[:num]
  arg = arg[1..-1].to_i(2) * (arg[0] == ?0 ? 1 : -1) if arg
  arg = $~[:label] if $~[:label]
  raise "Unrecognised input" if insn == :error
  insn == :mark ? labels[arg] = code.size : code << [insn, arg]
end

def read_int
  s = ""
  while true
    ch = $stdin.getc
    case ch
    when /\d+/ then s << ch
    when /\s+/ then break
    else raise "Integer expected"
    end
  end
  s.to_i
end

pc, call, stack, heap = 0, [], [], Hash.new(0)
loop do

View on GitHub (pinned to c2aa5098d3)

When it happens

Trigger: Thrown at vendor/whitespace.rb:37 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of mame/quine-relay@c2aa5098d3 (2026-08-21). Data as JSON: /api/errors/08d435d947584d13. Report an issue: GitHub.