there are two ways to handle errors in nom. The first one,
activated by default, uses the
in the error branch of
IResult. This enum can hold either
a parser specific error code, or a custom error type you
If you need more advanced error management, you can activate the "verbose-errors" compilation feature, which will give you the error system available in nom 1.0. The verbose errors accumulate error codes and positions as you backtrack through the parser tree. From there, you can precisely identify which parts of the input triggered the error case.
Please note that the verbose error management is a bit slower than the simple one.
Contains the error that a parser can return