--- a/tools/PascalParser.hs Tue Oct 16 13:41:23 2012 -0400
+++ b/tools/PascalParser.hs Tue Oct 16 22:35:01 2012 +0400
@@ -369,7 +369,7 @@
, char '$' >> many hexDigit >>= \h -> comments >> return (HexNumber h)
--, char '-' >> expression >>= return . PrefixOp "-"
, char '-' >> reference >>= return . PrefixOp "-" . Reference
- , try $ string "not" >> error "unexpected not in term"
+ , (try $ string "not" >> notFollowedBy comments) >> unexpected "'not'"
, try $ string "nil" >> return Null
, reference >>= return . Reference
] <?> "simple expression"
--- a/tools/PascalPreprocessor.hs Tue Oct 16 13:41:23 2012 -0400
+++ b/tools/PascalPreprocessor.hs Tue Oct 16 22:35:01 2012 +0400
@@ -121,7 +121,7 @@
try $ string "DEFINE"
spaces
i <- identifier
- d <- ((string ":=" >> return ())<|> spaces) >> many (noneOf "}")
+ d <- ((string ":=" >> return ()) <|> spaces) >> many (noneOf "}")
char '}'
updateState $ \(m, b) -> (if (and b) && (head i /= '_') then Map.insert i d m else m, b)
return ""