Changeset 21790 for src/Pugs/Lexer.hs

Show
Ignore:
Timestamp:
08/05/08 11:10:00 (4 months ago)
Author:
audreyt
Message:

* Pugs.Lexer: "\d123" must now be written as "\c123" according to S02 v133.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Lexer.hs

    r21673 r21790  
    299299            -- "\08..." and "\09..." are treated as "\0" and then "8..." or "9...". 
    300300            ('0':xs@(x:_)) | x == '8' || x == '9' -> return (0:map (toInteger . ord) xs) 
    301             _   -> error ("Error: Invalid escape sequence \\" ++ ds ++ "; write as decimal \\d" ++ ds ++ " or octal \\o" ++ ds ++ " instead") -- return [read ds] 
     301            _   -> error ("Error: Invalid escape sequence \\" ++ ds ++ "; write as decimal \\c" ++ ds ++ " or octal \\o" ++ ds ++ " instead") -- return [read ds] 
    302302        , based 'o'  8 octDigit 
    303303        , based 'x' 16 hexDigit 
    304         , based 'd' 10 digit 
     304        , based 'c' 10 digit 
    305305        ] 
    306306    return $ map (toEnum . fromInteger) codes