This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
David Dollar (author)
Thu Aug 07 12:38:35 -0700 2008
commit 9c851aaa04a629300a77e0761598a3a510e7cbcb
tree 36b42a7f7f1d8f042b30ef8a9ee2e984a91e2d69
parent 4633a89a7df7090e5568719ac9a0006a2e8d103d
tree 36b42a7f7f1d8f042b30ef8a9ee2e984a91e2d69
parent 4633a89a7df7090e5568719ac9a0006a2e8d103d
| name | age | message | |
|---|---|---|---|
| |
.gitignore | ||
| |
README.markdown | ||
| |
Rakefile | ||
| |
bin/ | ||
| |
config/ | ||
| |
doc/ | ||
| |
lib/ | ||
| |
simple-parser.gemspec | ||
| |
spec/ |
README.markdown
simple-parser
A library to parse simple strings into named tokens
Installation
$ sudo gem install ddollar-simple-parser --source http://gems.github.com
Usage
As a library
>> require 'simple-parser'
>> SimpleParser::String.parse(
'this is "a test" string',
':word1 :: ":phrase1" :word2'
)
=> { :word1 => 'this',
:phrase1 => 'a test',
:word2 => 'string' }
As a mixin
>> require 'simple-parser'
>> class String; include SimpleParser::String; end
>> 'test now'.parse(':word1 :word2')
=> { :word1 => 'test', :word2 => 'now' }









