Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Syntax and Semantic Analyzer

This project implements a syntax and semantic analyzer for a custom programming language. It parses input source code to ensure it follows syntactic and semantic rules and outputs relevant data for debugging and analysis.

Features

  • Syntax Parsing: Verifies the structure of the code using a formal grammar.
  • Semantic Analysis: Ensures proper usage of identifiers, types, and operations.
  • Symbol Table Management: Tracks variables, functions, and their scopes.
  • Graphical User Interface (GUI):
    • A menu with examples of correct and incorrect code is available for testing.
    • Users can load these examples directly to evaluate the functionality of the analyzer.

Detailed Outputs:

  • Advertisements: Displays all the advertisements generated by the code.
  • Reduction Steps: Shows the sequence of grammar reductions.
  • Symbol Table Updates: Logs changes to the symbol table.

Setup and Execution

Requirements

Ensure you have the following installed:

  • Python 3.8

The following libraries:

  • tkinter
  • time
  • pathlib
  • math
  • ply

You can install ply using pip

Execution Steps

Navigate to the App Directory

Run the Main.py Script

Outputs

All outputs are saved in the outputs folder:

  • Advertisements: Details the advertisements generated by the code.
  • reductions_log.txt: Details the step-by-step grammar reductions.
  • symbol_table_updates.txt: Logs modifications made to the symbol table during analysis.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages