Sha256: b0c9a11b3e9ed9267dee575a9808b3555d11a7131f634f1ecb1cc5ff035523f5

Contents?: true

Size: 710 Bytes

Versions: 2

Compression:

Stored size: 710 Bytes

Contents

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 <Fonte::Nodes::RconCommandNode>
      end

      rule rcon_failure
        "Bad Rcon:" SPACE rcon_challenge <Fonte::Nodes::RconCommandNode>
      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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fonte-0.1.0 lib/fonte/parsers/rcon.treetop
fonte-0.0.1 lib/fonte/parsers/rcon.treetop