Nástroj na generování programů pro čtení textových vstupů
A tool for generating code supporting reading of text files
bachelor thesis (DEFENDED)
View/ Open
Permanent link
http://hdl.handle.net/20.500.11956/15866Identifiers
Study Information System: 48266
Collections
- Kvalifikační práce [11264]
Author
Advisor
Referee
Týnovský, Miroslav
Faculty / Institute
Faculty of Mathematics and Physics
Discipline
Programming
Department
Institute of Formal and Applied Linguistics
Date of defense
23. 6. 2008
Publisher
Univerzita Karlova, Matematicko-fyzikální fakultaLanguage
Czech
Grade
Very good
V předložené práci se zabýváme návrhem a implementací nástroje AutoComp na generování programů pro zpracování strukturovaných texotvých dat. Vstupem nástroje je popis textových dat vyžívající regulárních výrazů a stavových strojů. Výstupem je zdrojový kód v programovacím jazyce, který poskytuje rozhraní pro začlenění do programu. Ve vstupním popisu je možno definovat body volání specifikovaných funkcí a návrat řízení volajícímu kódu. Generované programy mohou sloužit pro tokenizaci textu nebo pro parsování jednodušších gramatik. Nástroj podporuje dva programovací jazyky a několik druhů kódování znaků, návrh byl zaměřen na rozšiřitelnost na další jazyky a kódování.
In the present work we deal with the concept and implementation of tool AutoComp for generating programs for processing structured text files. The tool accepts description of the text whith making use of regular expressions and state machines. The output of the tool is a code in a programming language which gives interface for integrating code to a final program. It is possible to define points for calling specified functions and returning controll to the caller program in the input description. The use of generated code is to tokenize text or parse elementary gramatics. The tool provides two target programming languages and few character encodings. The concept was focused on extensibility to more languages and character encodings.