Skip to content

ppl-call-me-tima/cpp-to-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic C++ to Python Code Convertor

Uses regex based tokenization patterns and simple parsing to convert a basic C++ code to Python.

Exceptions:

  1. First 4 line should be in format: [#include, using namespace, , int main()]
  2. Increment / Decrement operators should be used independently and exclusively in a line.
  3. Use very simple lines of code only.

Covered:

  1. Variables : Initialization or Declaration
  2. Assignment
  3. While Loop
  4. Printing
  5. endl
  6. Input : both integer and strings
  7. Comments
  8. Functions : with no arguments

Not Covered:

  1. Continuous assignment
  2. Pointers
  3. Arrays
  4. Mulitple Declaration / Initialization

Concepts Used:

  1. Lexical Analyser
  2. Identifier Table