Skip to content

A complete implementation of a lexer and parser using Flex and Bison for a subset of the XML notation used in Android application development.

Notifications You must be signed in to change notification settings

akispapapanagiotou/flex-and-bison-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔎 Flex and Bison Parser for Android XML Subset

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.

📸 Screenshots:

Success: Program Executed Successfully

success

Failure: Program Execution Error

failure

Failure: Duplicate ID Error

failure - duplicate ID

▶️ How to run:

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

🛠️ Built with:

  • Flex: A fast lexical analyzer generator.
  • Bison: A general-purpose parser generator.
  • C programming language: Used for implementing the main program logic.

About

A complete implementation of a lexer and parser using Flex and Bison for a subset of the XML notation used in Android application development.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published