Have parser syntax error on non-MOV, non-comment lines.
Chris Pressey
1 year, 18 days ago
2 | 2 | import Data.Maybe (catMaybes) |
3 | 3 | import Text.ParserCombinators.Parsec |
4 | 4 | ( |
5 | many, string, satisfy, Parser, (<|>), digit, newline, optional, try, parse | |
5 | many, many1, string, satisfy, Parser, (<|>), digit, newline, optional, try, parse | |
6 | 6 | ) |
7 | 7 | |
8 | 8 | import Language.ZOWIE.State |
21 | 21 | -- Comment ::= ";" anything. |
22 | 22 | -- |
23 | 23 | |
24 | zowie = many zowieLine | |
25 | ||
26 | zowieLine = (try commentLine) <|> instrLine | |
24 | zowie = many1 (commentLine <|> instrLine) | |
27 | 25 | |
28 | 26 | comment = do |
29 | 27 | spaces |