Sha256: f35f75c0799a429e8c88b8841b0d066aaa5d387660517ec03bce3edcec957742

Contents?: true

Size: 428 Bytes

Versions: 9

Compression:

Stored size: 428 Bytes

Contents

module Music
module Transcription
module Parsing

grammar Segment
  include NonnegativeInteger
  include NonnegativeFloat
  include NonnegativeRational
  
  rule range
    first:nonnegative_number ([.] 2..3) last:nonnegative_number {
      def to_range
        first.to_num...last.to_num
      end
    }
  end
  
  rule nonnegative_number
    nonnegative_float / nonnegative_rational / nonnegative_integer
  end
end

end
end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
music-transcription-0.21.0 lib/music-transcription/parsing/segment_parsing.treetop
music-transcription-0.20.0 lib/music-transcription/parsing/segment_parsing.treetop
music-transcription-0.19.0 lib/music-transcription/parsing/segment_parsing.treetop
music-transcription-0.17.1 lib/music-transcription/parsing/segment_parsing.treetop
music-transcription-0.17.0 lib/music-transcription/parsing/segment_parsing.treetop
music-transcription-0.16.0 lib/music-transcription/parsing/segment_parsing.treetop
music-transcription-0.15.0 lib/music-transcription/parsing/segment_parsing.treetop
music-transcription-0.14.0 lib/music-transcription/parsing/segment_parsing.treetop
music-transcription-0.13.0 lib/music-transcription/parsing/segment_parsing.treetop