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.
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