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 (
commit 4633a89a7df7090e5568719ac9a0006a2e8d103d
tree 48191fff071572574b2d64ae80f854588c0f920b
parent 09626055ffc7885511040682fc00b0f11bf98403
tree 48191fff071572574b2d64ae80f854588c0f920b
parent 09626055ffc7885511040682fc00b0f11bf98403
| 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' }









