tools/pas2c/PascalParser.hs
branchsdl2transition
changeset 11357 f1b5f1dc61a3
parent 10924 ed1b6914cac5
child 11361 210f12d36822
equal deleted inserted replaced
11356:b8b208501475 11357:f1b5f1dc61a3
   196         comments
   196         comments
   197         u <- parens pas $ varsDecl True
   197         u <- parens pas $ varsDecl True
   198         char' ';'
   198         char' ';'
   199         comments
   199         comments
   200         return u
   200         return u
   201     sequenceDecl = (parens pas) $ (commaSep pas) (iD >>= \i -> optional (spaces >> char' '=' >> spaces >> integer pas) >> return i)
   201     sequenceDecl = (parens pas) $ (commaSep pas) (iD >>= \i -> optional (spaces >> string' ":=" >> spaces >> integer pas) >> return i)
   202     functionType = do
   202     functionType = do
   203         fp <- try (string "function") <|> try (string "procedure")
   203         fp <- try (string "function") <|> try (string "procedure")
   204         comments
   204         comments
   205         vs <- option [] $ parens pas $ varsDecl False
   205         vs <- option [] $ parens pas $ varsDecl False
   206         comments
   206         comments