Sha256: 86a35b637b479e310332331a99ac4c94d9fdda2058daafbdd4c9567d579376ac

Contents?: true

Size: 775 Bytes

Versions: 3

Compression:

Stored size: 775 Bytes

Contents

module Fonte
  module Parsers
    grammar Temporal
      include Word

      rule date_time
        date SPACE "-" SPACE time <Fonte::Nodes::DateTimeNode>
      end

      rule date
        month "/" day "/" year
      end

      rule day
        [0-3] [0-9] <Fonte::Nodes::IntegerNode>
      end

      rule month
        [0-1] [0-9] <Fonte::Nodes::IntegerNode>
      end

      rule year
        [0-9] [0-9] [0-9] [0-9] <Fonte::Nodes::IntegerNode>
      end

      rule time
        hours ":" minutes ":" seconds
      end

      rule hours
        [0-9] [0-9] <Fonte::Nodes::IntegerNode>
      end

      rule minutes
        [0-9] [0-9] <Fonte::Nodes::IntegerNode>
      end

      rule seconds
        [0-9] [0-9] <Fonte::Nodes::IntegerNode>
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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