8000 GitHub - fakubwoy/C-Compiler: A C-Compiler Visualizer that shows outputs from each compilation phase: preprocessing, lexical analysis, syntax analysis, semantic analysis, TAC generation, optimization, and x86 assembly generation. It produces a final .exe and includes a chatbot to assist with phase-related queries.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

A C-Compiler Visualizer that shows outputs from each compilation phase: preprocessing, lexical analysis, syntax analysis, semantic analysis, TAC generation, optimization, and x86 assembly generation. It produces a final .exe and includes a chatbot to assist with phase-related queries.

Notifications You must be signed in to change notification settings

fakubwoy/C-Compiler

Repository files navigation

C-Compiler

Steps to Run the Project

  1. Clone the repository:

    git clone https://github.com/fakubwoy/C-Compiler.git
  2. Change directory into the project:

    cd C-Compiler
  3. Install the dependencies:

    npm install
    cd server
    npm install
    cd ..
  4. Start the development server:

    npm run dev

To-Do List

1. Documentation

  • Create comprehensive code documentation
  • Add usage examples and installation steps

2. Lexical Analysis

  • Preprocessing
  • Tokenization
    • Add support for more data types
    • Handle additional print/output statements

3. Syntax Analysis (Parse Tree Generation)

  • Parse Tree Generation

  • Rule Assignments:

    • Ensure every statement ends with ;
    • Enclose the code inside int main()
    • Validate variable declarations follow:
      type name = value (where value can be an expression)
    • Define and implement additional syntax rules
  • Parse Tree Validation:

    • Enforce rule compliance during parsing
    • Stop compilation and display an error on rule violation

4. Semantic Analysis

  • Perform semantic checks
  • Generate symbol table

5. Intermediate Code Generation

  • Generate Three-Address Code (TAC)
  • Optimize TAC

6. Assembly and Compilation

  • Generate x86 Assembly code
  • Compile ASM to executable (.exe)

7. Chatbot Integration

  • Build chatbot framework
  • Choose an appropriate NLP/AI model
  • Integrate model into the chatbot for interaction
  • Test for natural responses and error handling

About

A C-Compiler Visualizer that shows outputs from each compilation phase: preprocessing, lexical analysis, syntax analysis, semantic analysis, TAC generation, optimization, and x86 assembly generation. It produces a final .exe and includes a chatbot to assist with phase-related queries.

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  
0