diff options
author | Jed Barber <jjbarber@y7mail.com> | 2012-05-14 22:13:30 +1000 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2012-05-14 22:13:30 +1000 |
commit | 8e9f71bbec90d74390cae13db6f091bc5609f79e (patch) | |
tree | 838cf32c9742151d095c0903cfe2e34f9bdea52e /Syntactic.hs | |
parent | ca22154af94bb260c812af4e11441b5a79790575 (diff) |
Moved a number of article format parsing functions to a separate file
Diffstat (limited to 'Syntactic.hs')
-rw-r--r-- | Syntactic.hs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/Syntactic.hs b/Syntactic.hs index 45eedda..6502c43 100644 --- a/Syntactic.hs +++ b/Syntactic.hs @@ -1,30 +1,5 @@ -import Control.Monad( liftM ) import System( getArgs ) import Text.Printf -import qualified Data.Char as Char - - -getLines :: FilePath -> IO [String] -getLines = liftM lines . readFile - - -stripReturn :: String -> String -stripReturn s = if (last s == '\r') then init s else s - - -isComment :: String -> Bool -isComment = (==) '#' . head - - -isNumber :: String -> Bool -isNumber ('0':[]) = True -isNumber ('-':ns) - | (ns /= [] && head ns /= '0') = isNumber ns -isNumber n = all (Char.isNumber) n - - -isName :: String -> Bool -isName s = all ((==) '"') [head s, last s] scan :: String -> String |