tpdb 0.0 → 0.1
raw patch · 2 files changed
+14/−4 lines, 2 files
Files
- TPDB/Plain/Read.hs +9/−3
- tpdb.cabal +5/−1
TPDB/Plain/Read.hs view
@@ -31,8 +31,8 @@ -- | warning: by definition, {}[] may appear in identifiers lexer = makeTokenParser $ emptyDef- { identStart = alphaNum <|> oneOf "_:!#$%&*+./<=>?@\\^|-~{}[]"- , identLetter = alphaNum <|> oneOf "_:!#$%&*+./<=>?@\\^|-~{}[]"+ { identStart = alphaNum <|> oneOf "_:!#$%&*+./<=>?@\\^|-~{}[]'"+ , identLetter = alphaNum <|> oneOf "_:!#$%&*+./<=>?@\\^|-~{}[]'" , commentLine = "" , commentStart = "" , commentEnd = "" , reservedNames = [ "VAR", "THEORY", "STRATEGY", "RULES", "->", "->=" ] }@@ -81,7 +81,13 @@ <|> do reserved lexer "STRATEGY" error "TPDB.Plain.Read: parser for THEORY decl. missing" <|> do reserved lexer "RULES" - us <- ( if sep then commaSep lexer else many ) reader+ us <- if sep then do + many $ do + u <- reader ; optional $ comma lexer+ return u+ -- yes, TPDB contains some trailing commas, e.g., z008+ -- ( RULES a b -> b a , )+ else many reader return $ Rules_Declaration us <|> do anylist ; return Unknown_Declaration
tpdb.cabal view
@@ -1,5 +1,5 @@ Name: tpdb-Version: 0.0+Version: 0.1 Author: Johannes Waldmann Maintainer: Johannes Waldmann Category: Science@@ -21,6 +21,9 @@ Type: git Location: git://dfa.imn.htwk-leipzig.de/srv/git/tpdb/ +-- Extra-Source-Files:+-- test/3.15.xml, test/33.trs , test/z001.srs+ Library Build-Depends: base==4.*, hxt, pretty, parsec @@ -28,6 +31,7 @@ TPDB.Data, TPDB.Plain.Write, TPDB.Plain.Read, TPDB.XTC, TPDB.XTC.Read+ Test-Suite XML Type: exitcode-stdio-1.0