This module exports the functions that will be useful to parse the DSL. They should be able to parse everything you throw at them. The Puppet language is extremely irregular, and most valid constructs are not documented in the official language guide. This parser has been created by parsing the author's own large manifests and the public Wikimedia ones.
Things that are known to not to be properly supported are :
- "plussignement" such as foo +> bar. How to handle this is far from being obvious, as its actual behaviour is not documented.
parse p filePath input runs a parser
p over Identity without user
filePath is only used in error messages and may be the
empty string. Returns either a
or a value of type
main = case (parse numbers "" "11, 2, 43") of Left err -> print err Right xs -> print (sum xs) numbers = commaSep integer