5.0 Introduction

5.1 Metalanguage

5.2 LR-Family Parsing

5.3 Error Handling

5.4 Compaction of Tables

5.5 Yacc

5.6 Summary

Web References

Exercises

5.3 Error Handling in LR-Family Parsing

As in LL(1) parsing, the driver discovers that something is wrong when a token which cannot be used in a reduction is pushed onto the stack. Error repair consists of adding or deleting tokens to restore the parse to a state where parsing may continue. Since this may involve skipping input, skipping to the next "fiducial" symbol (symbols that begin or end a construct, such as begin, end, semicolon, etc.) is often done.

Better Error Handling

Generator Errors

Send questions and comments to: Karen Lemone