projects
/
calu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
3a_asm: FIX: tabs/blanks only zeilen werden akzeptiert
[calu.git]
/
3a_asm
/
Main.hs
diff --git
a/3a_asm/Main.hs
b/3a_asm/Main.hs
index 3470e0d2777c2d5fa3258f579bf8ad7e9708ad8b..b894fa16da6fca0ef049139d813cc024ea31fba2 100644
(file)
--- a/
3a_asm/Main.hs
+++ b/
3a_asm/Main.hs
@@
-165,7
+165,7
@@
testDTF input =
parseDTFLine :: [DictElem] -> Parser DTF
parseDTFLine dict = foldl1 (<|>) (fmap (\x -> try (x dict)) lineFormats) <* char '\n'
parseDTFLine :: [DictElem] -> Parser DTF
parseDTFLine dict = foldl1 (<|>) (fmap (\x -> try (x dict)) lineFormats) <* char '\n'
-lineFormats = [lf_define, lf_sdata, lf_stext, lf_org, lf_data, lf_ifill, lf_ascii, lf_comment, lf_toparse, lf_label]
+lineFormats = [lf_define, lf_sdata, lf_stext, lf_org, lf_data, lf_ifill, lf_ascii, lf_comment, lf_toparse, lf_label
, lf_nothing
]
-- helper
parseIdent :: Parser String
-- helper
parseIdent :: Parser String
@@
-232,6
+232,10
@@
lf_comment _ = do
comment <- parseComment
return $ DTF_Comment comment
comment <- parseComment
return $ DTF_Comment comment
+lf_nothing _ = do
+ wtf <- parseMySpaces
+ return $ DTF_Comment wtf
+
lf_label _ = do
l <- parseLabel
comment <- try(parseComment) <|> parseMySpaces
lf_label _ = do
l <- parseLabel
comment <- try(parseComment) <|> parseMySpaces