[Haskell-cafe] Parsec without data declarations/AST

Sean Cormican seancormican1 at gmail.com
Wed Feb 20 00:02:12 CET 2013


I have been trying to create a parser for a functional programming
language, but there is no need to create an AST but merely check that the
code is valid according to the grammar.

In the following tutorial I have been trying to take some pointers from,
data declarations are used to create an AST for the language, There is, as
I understand a way to parse the language without an AST.

http://www.haskell.org/haskellwiki/Parsing_a_simple_imperative_language

My question is what should the type signatures for example parseFile
function instead of "Stmt" accept as input if the parser is to accept
Strings and numerical expressions alike ?

Thanks for any help,
Seán
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130219/c4d37af0/attachment.htm>


More information about the Haskell-Cafe mailing list