--- a/tools/pas2c/PascalParser.hs Tue Feb 11 22:05:03 2014 +0400
+++ b/tools/pas2c/PascalParser.hs Wed Feb 12 00:50:15 2014 +0400
@@ -629,7 +629,7 @@
, char' '$' >> many hexDigit >>= \h -> comments >> return (InitHexNumber h)
, char' '@' >> initExpression >>= \c -> comments >> return (InitAddress c)
, try $ string' "nil" >> return InitNull
- , itypeCast
+ , try itypeCast
, iD >>= return . InitReference
]
@@ -681,10 +681,11 @@
]
itypeCast = do
- t <- choice $ map (\s -> try $ caseInsensitiveString s >>= \i -> notFollowedBy alphaNum >> return i) knownTypes
+ --t <- choice $ map (\s -> try $ caseInsensitiveString s >>= \i -> notFollowedBy alphaNum >> return i) knownTypes
+ t <- iD
i <- parens pas initExpression
comments
- return $ InitTypeCast (Identifier t BTUnknown) i
+ return $ InitTypeCast t i
builtInFunction :: Parsec String u a -> Parsec String u (String, [a])
builtInFunction e = do