oflOperandTypes = ["Real", "Function", "Integer"]
oflKeywords = oflIndexTypes ++
oflOperandTypes ++
- ["^", "+", "-", "*", "/", "laplacian", "inner", "sum", "derivative", "component"]
+ ["^", "+", "-", "*", "/", "laplacian", "inner", "sum", "derivative", "component", "target"]
oflDef = emptyDef{ commentStart = ""
, commentEnd = ""
indices <- option [] (oflBrackets $ oflCommaSep parseIdentifier);
return $ IndexedIdentifier identifier indices
} <?> "indexed identifier"
-
+
+parseTarget = oflSymbol "target" >> oflIdentifier
+
parseOFL :: Parsec String OFL OFL
parseOFL = do { oflWhiteSpace;
many1 parseDeclaration;
many1 parseAssignment;
+ target <- parseTarget;
+ many1 anyChar;
+ eof;
getState
}
parseAsOFL string = runParser parseOFL emptyOFL "(unknown)" string