Possibilities of generation and usage of AST in PHP programming language

Thesis title: Možnosti generování a využití AST v  programovacím jazyce PHP
Author: Kočárek, Michal
Thesis type: Bakalářská práce
Supervisor: Kosek, Jiří
Opponents: Tichý, Jan
Thesis language: Česky
Abstract:
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í.
Keywords: Statická analýza; Technická dokumentace; Parsování; PHP; Syntaktický strom
Thesis title: Possibilities of generation and usage of AST in PHP programming language
Author: Kočárek, Michal
Thesis type: Bachelor thesis
Supervisor: Kosek, Jiří
Opponents: Tichý, Jan
Thesis language: Česky
Abstract:
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: Static Analysis; Technical Documentation; Syntax Tree; PHP; Parsing

Information about study

Study programme: Aplikovaná informatika/Informatika
Type of study programme: Bakalářský studijní program
Assigned degree: Bc.
Institutions assigning academic degree: Vysoká škola ekonomická v Praze
Faculty: Faculty of Informatics and Statistics
Department: Department of Information and Knowledge Engineering

Information on submission and defense

Date of assignment: 23. 10. 2009
Date of submission: 30. 6. 2010
Date of defense: 21. 1. 2011
Identifier in the InSIS system: https://insis.vse.cz/zp/22420/podrobnosti

Files for download

    Last update: