Sha256: 1ff34ae2de2ff8a13192b09eeb6265965095af7ff6004bc7eb22fc9aca6c773c

Contents?: true

Size: 460 Bytes

Versions: 1

Compression:

Stored size: 460 Bytes

Contents

module Fonte
  module Parsers
    grammar Word
      rule quoted_word
        QUOTE word:word? QUOTE {
          def value
            word.value
          end
        }
      end

      rule word
        (ESCAPED_QUOTE / !QUOTE .)* {
          def value
            text_value
          end
        }
      end

      rule SPACE
        " "+
      end

      rule QUOTE
        '"'
      end

      rule ESCAPED_QUOTE
        '\"'
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fonte-0.0.1 lib/fonte/parsers/word.treetop