Tagged Questions
1
vote
1answer
243 views
Language parser in haskell
This is a recursive descent parser for simple language with following grammar:
PROGRAM <- {STATEMENT ';'}* RETURN_STMT ';'
STATEMENT <- NAME_BINDING | TYPE_DECLARATION
TYPE_DECLARATION <- ...
4
votes
1answer
215 views
Using Parsec for lexing&parsing
I'm creating list of Tokens from input [Char] stream using Parsec v3. The definition of Token looks like this:
data Token = CharKeyword | OpeningBracket | Identifier String | Natural Int
As result ...