tools/pas2c/PascalParser.hs
changeset 10120 b7f632c12784
parent 10113 b26c2772e754
child 10129 cd2a64a1f4aa
equal deleted inserted replaced
10119:7e05a397602f 10120:b7f632c12784
   136 typeDecl :: Parsec String u TypeDecl
   136 typeDecl :: Parsec String u TypeDecl
   137 typeDecl = choice [
   137 typeDecl = choice [
   138     char' '^' >> typeDecl >>= return . PointerTo
   138     char' '^' >> typeDecl >>= return . PointerTo
   139     , try (string' "shortstring") >> return String
   139     , try (string' "shortstring") >> return String
   140     , try (string' "string") >> optionMaybe (brackets pas $ integer pas) >> return String
   140     , try (string' "string") >> optionMaybe (brackets pas $ integer pas) >> return String
   141     , try (string' "ansistring") >> optionMaybe (brackets pas $ integer pas) >> return String
   141     , try (string' "ansistring") >> optionMaybe (brackets pas $ integer pas) >> return AString
   142     , arrayDecl
   142     , arrayDecl
   143     , recordDecl
   143     , recordDecl
   144     , setDecl
   144     , setDecl
   145     , functionType
   145     , functionType
   146     , sequenceDecl >>= return . Sequence
   146     , sequenceDecl >>= return . Sequence