Skip to content

Instantly share code, notes, and snippets.

@andyl
Created March 7, 2011 05:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andyl/858109 to your computer and use it in GitHub Desktop.
Save andyl/858109 to your computer and use it in GitHub Desktop.
simple parsing test
#!/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