Less code - less bugs (fix pas2c build)
authorunc0rr
Mon, 04 May 2015 18:39:00 +0300
changeset 10924 ed1b6914cac5
parent 10921 05e6f3b02612
child 10926 43612076e989
Less code - less bugs (fix pas2c build)
tools/pas2c/PascalParser.hs
--- a/tools/pas2c/PascalParser.hs	Fri May 01 00:17:38 2015 +0200
+++ b/tools/pas2c/PascalParser.hs	Mon May 04 18:39:00 2015 +0300
@@ -48,7 +48,7 @@
 
 
 reference :: Parsec String u Reference
-reference = buildExpressionParser table term <?> "reference"
+reference = term <?> "reference"
     where
     term = comments >> choice [
         parens pas (liftM RefExpression expression >>= postfixes) >>= postfixes
@@ -57,9 +57,6 @@
         , liftM SimpleReference iD >>= postfixes
         ] <?> "simple reference"
 
-    table = [
-        ]
-
     postfixes r = many postfix >>= return . foldl (flip ($)) r
     postfix = choice [
             parens pas (option [] parameters) >>= return . FunCall
@@ -401,7 +398,7 @@
     where
     term = comments >> choice [
         builtInFunction expression >>= \(n, e) -> return $ BuiltInFunCall e (SimpleReference (Identifier n BTUnknown))
-        , try (parens pas $ expression >>= \e -> notFollowedBy (comments >> char' '.') >> return e)
+        , try (parens pas expression >>= \e -> notFollowedBy (comments >> char' '.') >> return e)
         , brackets pas (commaSep pas iD) >>= return . SetExpression
         , try $ integer pas >>= \i -> notFollowedBy (char' '.') >> (return . NumberLiteral . show) i
         , float pas >>= return . FloatLiteral . show