diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -7,3 +7,24 @@ The goal is to have a good enough parser generator for use in my other personal # The type of parsers Parsers are lambdas that receive some *input* and return either a *parsing* or a *failure*. + +A *parsing* denotes a successful execution of the parser on the given input. + +Failures can be either *normal-failure* or *critical-failure*. + +The distinction of failure types allows to discern between an input that needs to be +parsed with another parser, and a syntax error. + +## Interaction with parser control flow + +### Choice (either) + +- parsing -> exit +- normal-failure -> continue +- critical-failure -> exit + +### Sequence (comp) + +- parsing -> continue +- normal-failure -> exit +- critical-failure -> exit |