This repository contains a complete implementation of a lexer and parser using Flex and Bison tools for a subset of the XML notation used in Android application development, specifically focusing on elements related to the User Interface (UI). The lexer and parser analyze input files which are written in this subset of XML and determine if the program is syntactically correct.
Clone the repository:
git clone https://github.com/akispapapanagiotou/flex-and-bison-parser.git
Compile the source code using the following commands:
flex lexer.l
bison -d syntax.y
gcc -o myParser lex.yy.c syntax.tab.c -lfl
Execute the program by running the following command but first replace file_name with the name of the input file written in the XML subset:
./myParser file_name
- Flex: A fast lexical analyzer generator.
- Bison: A general-purpose parser generator.
- C programming language: Used for implementing the main program logic.