Created
March 7, 2011 05:17
-
-
Save andyl/858109 to your computer and use it in GitHub Desktop.
simple parsing test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems'; require 'parslet' | |
class Xp < Parslet::Parser | |
rule(:b) { str("\n").absnt? } | |
root(:b) | |
end | |
# this generates an error - I think it should just return "a"... | |
p Xp.new.parse("a").inspect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment