4.5 Error Handling in LL (1)Parsing

Much work has been done in error handling for parser generators. Some perform a recovery process so that parsing may continue; a few try to repair the error. Topdown parsers detect the erroneous token when it is shifted onto the stack. An error report might be

with the parser driver attempting a recovery based upon the choices that would have been valid instead of the errorneous token. The attempted recovery, adding or deleting tokens, may be made to either the stack or the input. Error handling similar to that used for recursive descent parsing is described in Lemone (1992). The method was developed by Niklaus Wirth in 1976. It requires that a set of firsts and followers be maintained or computed for each production.

Send questions and comments to: Karen Lemone