tools/PascalParser.hs
changeset 6895 31def088a870
parent 6891 ab9843957664
child 6897 a9126661f613
--- a/tools/PascalParser.hs	Fri Apr 20 01:50:47 2012 +0400
+++ b/tools/PascalParser.hs	Fri Apr 20 22:03:35 2012 +0400
@@ -408,6 +408,7 @@
         , withBlock
         , forCycle
         , (try $ reference >>= \r -> string ":=" >> return r) >>= \r -> expression >>= return . Assignment r
+        , builtInFunction expression >>= \(n, e) -> return $ BuiltInFunctionCall e (SimpleReference (Identifier n BTUnknown))
         , procCall
         , char ';' >> comments >> return NOP
         ]
@@ -597,7 +598,7 @@
 builtInFunction e = do
     name <- choice $ map (\s -> try $ caseInsensitiveString s >>= \i -> notFollowedBy alphaNum >> return i) builtin
     spaces
-    exprs <- parens pas $ commaSep1 pas $ e
+    exprs <- option [] $ parens pas $ commaSep1 pas $ e
     spaces
     return (name, exprs)