Skip to content

Naindeep-Singh/code_format

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C Code Formatter and AST Visualizer

Welcome to the C Code Formatter and AST Visualizer repository! This project provides tools for formatting code and visualizing its Abstract Syntax Tree (AST). Follow the steps below to get started:

1) Cloning the Repository

You can clone this repository using the following command:

git clone https://github.com/Naindeep-Singh/code_format.git

2) Setting Up the React App

Navigate to the react-app directory. Run the following command to install dependencies:

npm install

Run the following commands to install dependencies:

npm install axios
npm install react-router-dom

3) Setting Up the Python Flask Server

Navigate to the flask-server directory. Install the required Python libraries using pip:

pip install flask flask-cors pycparser graphviz
pip install -q -U google-generativeai

4) Generate your own gemini api key

Obtain key from Gemini API

5) Install Graphviz

Install from Graphviz Download

6) Running the Application

Start the Flask server by running the following command in the flask-server directory

python app.py

Start the React app by running the following command in the react-app directory

npm start