Sha256: 4966af8f0c9be17cd1bd98088b744a6a9c163658edc17504c910328770bb84d3

Contents?: true

Size: 358 Bytes

Versions: 3

Compression:

Stored size: 358 Bytes

Contents

module Fonte
  module Parsers
    grammar Address
      include Number

      rule ip
        octet "." octet "." octet "." octet port:port? <Fonte::Nodes::IpNode>
      end

      rule octet
        [0-9] 1..3
      end

      rule port
        ":" integer {
          def value
            integer.value
          end
        }
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fonte-0.2.0 lib/fonte/parsers/address.treetop
fonte-0.1.0 lib/fonte/parsers/address.treetop
fonte-0.0.1 lib/fonte/parsers/address.treetop