module Fonte module Parsers grammar Rcon include Word include Address rule rcon_command rcon_failure / rcon_success end rule rcon_success "Rcon:" SPACE rcon_challenge { def value "successfully rcon" end } end rule rcon_failure "Bad Rcon:" SPACE rcon_challenge { def value "bad rcon" end } end rule rcon_challenge QUOTE "rcon challenge" SPACE rcon_password SPACE "command" QUOTE SPACE rcon_origin end rule rcon_password quoted_word end rule rcon_origin "from" SPACE QUOTE ip QUOTE { def value ip.value end } end end end end