Skip to content

rifqi2320/Python-Grammar-Checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Grammar Checker

General Information

This project is a syntax checker module for Python programming language that is developed for second major assignment of IF2124 Theory of Formal Language and Automata.

Table of Contents

Features

  • Checking the grammar of your code! (and showing what's wrong)
  • Accessible as a module and as a program
  • Custom Keyword and grammar
  • Verbose option
  • Indentation check option

Directory Structure

The project directory structure depicted with this tree

└──tbfo
   ├───examples
   │   ├───python.cfg
   │   └───tokens.txt
   ├───parser
   │   ├───cyk.py
   │   └───fa.py
   ├───grammar.py
   └───lexer.py

Setup

Setting up the environment

We recommend using virtual environment (venv) on installing the package.

pip install venv

Then, initialize the virtual environment using

venv

Installing the module

On the main directory folder install the module using pip by running the command

pip install -e .

And you're good to go ;)

Usage

There are two ways on accessing the module

  1. Using the module on your python script
from tbfo import *
  1. Using the main program on the module
py -m tbfo {Your_python_script.py} {args}

List of Args

  • Verbose (-v)
  • No Indentation (-ni)

Screenshots

Room for Improvements

Because of the time constraints of the assignment, we skipped some values on the grammar checker like:

  • Async/Await keyword
  • Multiline continuation parenthesis
  • Multiline strings

Reference

Developed by

  • Rifqi Naufal Abdjul / 13520062
  • Saul Sayers / 13520094
  • Amar Fadil / 13520103

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages