Skip to content

Instantly share code, notes, and snippets.

@billdozr
Created June 25, 2010 21:27
Show Gist options
  • Save billdozr/453468 to your computer and use it in GitHub Desktop.
Save billdozr/453468 to your computer and use it in GitHub Desktop.
lexer = T.makeTokenParser L.emptyDef
lexeme = T.lexeme lexer
parens = T.parens lexer
comma = T.comma lexer
colon = T.colon lexer
float = T.float lexer
symbol = T.symbol lexer
whiteSpace = T.whiteSpace lexer
-- Parser(s)
commandParser = Command
<$> (char '@' *> many alphaNum)
<*> optional (parens (many alphaNum `sepBy` comma))
<*> (colon *> (many (noneOf ":\n") `sepBy` symbol "::"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment