Skip to content

Instantly share code, notes, and snippets.

@okomok
Created February 10, 2009 18:22
Show Gist options
  • Save okomok/61515 to your computer and use it in GitHub Desktop.
Save okomok/61515 to your computer and use it in GitHub Desktop.
old opt
private[mada] class OptPeg[A](p: Peg[A]) extends PegProxy[A] with Reluctant[A] {
override val self = p | Peg.eps[A]
override def before(that: Peg[A]) = (p >> ~that) | ~that
override def until(that: Peg[A]) = (p >> that) | that
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment