Original title:
Pokročilé zotavení z chyb během syntaktické analýzy shora dolů
Translated title:
Advanced Error Recovery during Top-Down Parsing
Authors:
Obluková, Alena ; Kolář, Dušan (referee) ; Meduna, Alexandr (advisor) Document type: Bachelor's theses
Year:
2015
Language:
cze Publisher:
Vysoké učení technické v Brně. Fakulta informačních technologií Abstract:
[cze][eng]
Syntaktický analyzátor je jednou z nejdůležitějších částí překladače při často používaném přístupu syntaxí řízený překlad. Při tomto přístupu řídí syntaktický analyzátor sémantické akce a generování abstraktního syntaktického stromu. Jestliže je na vstupu chyba, syntaktický analyzátor nemůže pokračovat a celý překlad musí skončit. Proto je nesmírně důležité, aby syntaktický analyzátor byl schopen se zotavit z chyb, tedy aby i po nalezení chyby byl schopen dále pokračovat. V této bakalářské práci jsou popsány metody zotavení z chyb, podrobně je popsána metoda Kontext zotavení z chyb pomocí pokračování, konkrétně pokračování u LL syntaktického analyzátoru. Přestože tato metoda není příliš známá, není příliš složitá na vysvětlení a na implementaci. Může tedy být snadno použita při výuce pro demonstraci zotavení z chyb při syntaktické analýze shora dolů.
Parser is one of the most important parts in compiler since Syntax-Directed Translation is often used. This approach means that parser controls semantic actions and generation of syntax tree. When the input contains an error, parser cannot continue and the whole compiler has to stop. Therefore, it is important to have parser with error recovery, so when error occurs parser is able to continue. There are several error-recovery strategies and methods. In this paper is described Acceptable-sets derived from continuations specifically continuation in LL parsers. However it is not so well known method it is easy to explain and to implement. It can be used in the lesson to demonstrate error recovery in top-down parser.
Keywords:
Context-free grammar; error recovery; LL grammar; syntax analysis; bezkontextové gramatiky; LL gramatika; syntaktická analýza; zotavení z chyb
Institution: Brno University of Technology
(web)
Document availability information: Fulltext is available in the Brno University of Technology Digital Library. Original record: http://hdl.handle.net/11012/52467