summaryrefslogtreecommitdiff
path: root/src/GF/Command
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Command')
-rw-r--r--src/GF/Command/Parse.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/GF/Command/Parse.hs b/src/GF/Command/Parse.hs
index f48d0d444..3417baff9 100644
--- a/src/GF/Command/Parse.hs
+++ b/src/GF/Command/Parse.hs
@@ -14,9 +14,10 @@ readCommandLine s = case [x | (x,cs) <- RP.readP_to_S pCommandLine s, all isSpac
[x] -> Just x
_ -> Nothing
-test s = RP.readP_to_S pCommandLine s
-
-pCommandLine = RP.sepBy (RP.skipSpaces >> pPipe) (RP.skipSpaces >> RP.char ';')
+pCommandLine =
+ (RP.skipSpaces >> RP.char '-' >> RP.char '-' >> RP.skipMany (RP.satisfy (const True)) >> return []) -- comment
+ RP.<++
+ (RP.sepBy (RP.skipSpaces >> pPipe) (RP.skipSpaces >> RP.char ';'))
pPipe = RP.sepBy1 (RP.skipSpaces >> pCommand) (RP.skipSpaces >> RP.char '|')