Skip to content

Instantly share code, notes, and snippets.

@Derekokich
Created August 18, 2014 20:52
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 Derekokich/956565af0ade05a5515b to your computer and use it in GitHub Desktop.
Save Derekokich/956565af0ade05a5515b to your computer and use it in GitHub Desktop.
regexblog4
def repeat: Parser[RegexExpr] = lit <~ "*"
^^ { case l => Repeat(l) }
def plus: Parser[RegexExpr] = lit <~ "+"
^^ { case p => Plus(p) }
def lowExpr: Parser[RegexExpr] = repeat | plus | lit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment