Changeset 27


Ignore:
Timestamp:
May 5, 2008, 11:25:07 AM (10 years ago)
Author:
KOBAYASHI, Shinji
Message:

worked on ADLParser

File:
1 edited

Legend:

Unmodified
Added
Removed
  • haskell/trunk/ADLParser.hs

    r2 r27  
    2424                 return ontology
    2525
    26 
    27 adlVersion :: Parser String
     26adlVersion :: Parser Version
    2827adlVersion = do dec1 <- string "archetype (adl_version="
    2928                ver <- many anyChar
     
    5251
    5352adlLanguage :: Parser Language
     53adlLanguage = do spaces
     54                 head <- string "language"
     55                 
    5456
     57
     58parseAtoms :: Parser [Atom]
     59parseAtoms = many atom
     60    where
     61      atom :: Parser Atom
     62      atom = do spaces
     63                name <- string
     64                spaces
     65                equal <- char '='
     66                spaces
     67      <|> return []
     68
     69
     70data Language = Original_Laguage String
     71              | Translaions [Transpation]
     72                deriving Show
     73
     74data Translation = Symbol String
     75                 | Language String
     76                 | Author Author
     77
     78data Author = Name String
     79            | Organisation String
     80
     81data Atom = Name String
     82          | Description String
     83
     84type Version :: String
Note: See TracChangeset for help on using the changeset viewer.