We have chosen Haskell to implement the lexing and parsing of the language, as functional languages like Haskell make it particularly easy to express, abstract, and combine parsers. This allows the Franc C to be very verbose, which was definitely needed.
As we wanted to speed things up and release a first version as quickly as possible, we decided to use a pre-existing parsing library ‘Megaparsec’. The library offers fast parsing performance, is an improved successor of ‘Parsec’, and provides high-quality error messages that greatly simplify debugging and development.
The ‘Lexer’ and ‘Parser’ both refers to two different parts:
The ‘Parser’ is only executed if the ‘Lexer’ did not fail to lex the targetted source code.