system command pipes (sp)

This commit is contained in:
aarne
2008-06-18 16:26:12 +00:00
parent 8e5b78f886
commit 944eea8de9
4 changed files with 39 additions and 7 deletions

View File

@@ -32,9 +32,11 @@ pOption = do
RP.option (OOpt flg) (fmap (OFlag flg) (RP.char '=' >> pValue))
pValue = do
fmap VId pFilename
RP.<++
fmap (VInt . read) (RP.munch1 isDigit)
RP.<++
fmap VStr pStr
RP.<++
fmap VId pFilename
pFilename = liftM2 (:) (RP.satisfy isFileFirst) (RP.munch (not . isSpace)) where
isFileFirst c = not (isSpace c) && not (isDigit c)