tools/pas2c/PascalPreprocessor.hs
branchwebgl
changeset 9199 9ed29795d2a3
parent 9164 d923ba9d1145
child 9966 01e198990211
equal deleted inserted replaced
9197:e4e366013e9a 9199:9ed29795d2a3
     6 import Control.Monad
     6 import Control.Monad
     7 import System.IO
     7 import System.IO
     8 import qualified Data.Map as Map
     8 import qualified Data.Map as Map
     9 import Control.Exception(catch, IOException)
     9 import Control.Exception(catch, IOException)
    10 import Data.Char
    10 import Data.Char
    11 
    11 import Prelude hiding (catch)
    12 
    12 
    13 -- comments are removed
    13 -- comments are removed
    14 comment = choice [
    14 comment = choice [
    15         char '{' >> notFollowedBy (char '$') >> manyTill anyChar (try $ char '}') >> return ""
    15         char '{' >> notFollowedBy (char '$') >> manyTill anyChar (try $ char '}') >> return ""
    16         , (try $ string "(*") >> manyTill anyChar (try $ string "*)") >> return ""
    16         , (try $ string "(*") >> manyTill anyChar (try $ string "*)") >> return ""