# Error production in parser-tools/yacc

**URL:** <https://racket.discourse.group/t/error-production-in-parser-tools-yacc/2432>\
**Category:** Questions & Answers\
**Tags:** question\
**Created:** [October 27, 2023, 11:26am UTC](https://racket.discourse.group/t/error-production-in-parser-tools-yacc/2432 "2023-10-27T11:26:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidelettieri](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/davidelettieri/32/1454_2.png) [@davidelettieri](https://racket.discourse.group/u/davidelettieri)\
**Post date:** [October 27, 2023, 11:26am UTC](https://racket.discourse.group/t/error-production-in-parser-tools-yacc/2432/1 "2023-10-27T11:26:52Z")

</div>

I'm trying to learn how to use the package [parser-tools-lib](https://pkgs.racket-lang.org/package/parser-tools-lib).

There is one thing which I would like to understand but I'm not able to figure it out.

These point in the docs

> An error production can be defined by providing a production of the form (error α), where α is a string of grammar symbols, possibly empty.

I'm not sure how to use this error production, if possible at all. I suspect it is not the same thing as

> (error expr)  
> The expr should evaluate to a function which will be executed for its side-effect whenever the parser encounters an error.

Is there any tutorial, additional documentation, examples that I can check out?
