Sha256: 60c2c4c58f79c9d22dd92466913ce2395ba045c8b857de7809c2c84179179be3

Contents?: true

Size: 510 Bytes

Versions: 2

Compression:

Stored size: 510 Bytes

Contents

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

      rule word
        character* {
          def value
            text_value
          end
        }
      end

      rule character
        (ESCAPED_QUOTE / !QUOTE .)
      end

      rule SPACE
        " "+
      end

      rule QUOTE
        '"'
      end

      rule ESCAPED_QUOTE
        '\"'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fonte-0.2.0 lib/fonte/parsers/word.treetop
fonte-0.1.0 lib/fonte/parsers/word.treetop