Original title:
Možnosti generování a využití AST v programovacím jazyce PHP
Translated title:
Possibilities of generation and usage of AST in PHP programming language
Authors:
Kočárek, Michal ; Kosek, Jiří (advisor) ; Tichý, Jan (referee) Document type: Bachelor's theses
Year:
2009
Language:
cze Publisher:
Vysoká škola ekonomická v Praze Abstract:
[cze][eng] Tato bakalářská práce poskytuje teoretický základ pro vývoj nástroje DoXRef určeného pro generování dokumentace vazeb v PHP kódu. Praktickou částí práce je vývoj tohoto nástroje. V úvodu je popsán důvod výběru tohoto tématu a argumenty pro vytvoření nástroje DoXRef. Teoretická část je věnována programové analýze a manipulaci se zdrojovým kódem. V kapito-lách jsou rozebrány způsoby reprezentace zdrojového kódu pro tyto účely. V práci rozšiřuji strukturu abstraktního syntaktického stromu tak, abych odstranil jeho nevýhody. V kapitolách o parsování je zmíněn jednoduchý a přitom velmi efektivní Prattův algoritmus, který je v projektu využit. V praktické části je popsána struktura a funkcionalita programu DoXRef, včetně názorných příkladů použití z tvorby dokumentace. Součástí práce je příloha s kompletními kódy progra-mu a názornými příklady. Přínosem této práce je program DoXRef, který může být rozšířen do použitelné podoby a jehož části mohou být použity v jiném softwaru. Zdrojové kódy programu jsou zveřejněny pod open-source licencí.The thesis provides theoretical base for development of the DoXRef. DoXRef is a tool for generating the "x-ref" documentation from PHP source codes. As part of the thesis the tool has been developed and shows the conclusions from this work in practice. There is described the reason of choosing this topic and the arguments for the development of the DoXRef in the introduction. Theoretical part describes structures for analysis and modification of the source code. Thesis extends the abstract syntax tree structure by removing some of its drawbacks. In the chapters about parsing, the Pratt's algorithm is noted, which itself is simple to understand but still very effective. This algorithm is used in the project's parser as well. The practical part describes structure and features of the DoXRef tool and includes screenshots from the generated documentation as well. The source code and usage examples are provided as a part of this thesis. The contribution from this thesis is primarily the DoXRef tool. The tool can be extended into usable form and its parts can be reused in other applications. The source code is published under open-source license.
Keywords:
Parsing; PHP; Static Analysis; Syntax Tree; Technical Documentation; Parsování; PHP; Statická analýza; Syntaktický strom; Technická dokumentace
Institution: University of Economics, Prague
(web)
Document availability information: Available in the digital repository of the University of Economics, Prague. Original record: http://www.vse.cz/vskp/eid/24111