Open Matthewar opened 6 years ago
Example test code:
import Parser.Alex.Functions (alexError)
import Parser.Alex.BaseTypes (AlexPosn(..))
import Parser.ErrorTypes
...
design_file :: { DesignFile }
: design_unit_list {DesignFile $1}
| error {% alexError $ PosnWrapper { getPos = AlexPn 0 1 0, unPos = TestParseError }}
TestParserError
Currently parser messages are not implemented (aside from GenericParserError, which provides no helpful information).
A first stage solution for this is to implement a fail-on-error system using the current monadic parser.
{% ... }
(typeAlex a
){%^ ... }
(typeToken -> Alex a
)