tools/pas2c/PascalParser.hs
branchwebgl
changeset 9166 3774ac58e65e
parent 8444 75db7bb8dce8
child 9954 bf51bc7e2808
equal deleted inserted replaced
9164:d923ba9d1145 9166:3774ac58e65e
    22     u <- choice [program, unit, systemUnit, redoUnit]
    22     u <- choice [program, unit, systemUnit, redoUnit]
    23     comments
    23     comments
    24     return u
    24     return u
    25 
    25 
    26 iD = do
    26 iD = do
    27     i <- liftM (flip Identifier BTUnknown) (identifier pas)
    27     i <- identifier pas
    28     comments
    28     comments
    29     return i
    29     when (i == "not") $ unexpected "'not' used as an identifier"
       
    30     return $ Identifier i BTUnknown
    30 
    31 
    31 unit = do
    32 unit = do
    32     string "unit" >> comments
    33     string "unit" >> comments
    33     name <- iD
    34     name <- iD
    34     semi pas
    35     semi pas