All Projects → mistermboy → pyCompiler

mistermboy / pyCompiler

Licence: MIT license
Python Compiler

Programming Languages

java
68154 projects - #9 most used programming language
Yacc
648 projects
Lex
420 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to pyCompiler

compiler-course-unipi
Lab of the course Languages, Compilers and Interpreters (Cod. 653AA) @ UNIPI
Stars: ✭ 18 (+38.46%)
Mutual labels:  compilers, compiler-design
Revisited
🧑‍🤝‍🧑 The visitor pattern revisited. An inheritance-aware acyclic visitor template, any and any-function templates.
Stars: ✭ 14 (+7.69%)
Mutual labels:  visitor, visitor-pattern
tiny-lang
tiny-lang — A different programming language. Supports a bunch of spoken languages.
Stars: ✭ 26 (+100%)
Mutual labels:  compilers, compiler-design
jet
A Fast C and Python like Programming Language that puts the Developer first. WIP
Stars: ✭ 41 (+215.38%)
Mutual labels:  compilers, compiler-design
librxvm
non-backtracking NFA-based regular expression library, for C and Python
Stars: ✭ 57 (+338.46%)
Mutual labels:  compilers, compiler-design
AwesomeCompiler
The Big list of the github, open-source compilers.
Stars: ✭ 27 (+107.69%)
Mutual labels:  compilers, compiler-design
site
Course materials for the Geo-Python course at the University of Helsinki, Finland
Stars: ✭ 166 (+1176.92%)
Mutual labels:  university
Extensive-C0-Compiler
北航计算机学院 编译原理最高难度课程设计 BUAA SCSE - Extensive C0 Compiler Design
Stars: ✭ 34 (+161.54%)
Mutual labels:  compiler-design
TFG-TFM EPS
Plantilla LaTeX para la elaboración de TFG y TFM en la Escuela Politécnica Superior de la Universidad de Alicante
Stars: ✭ 45 (+246.15%)
Mutual labels:  university
Fortran-Tools
Fortran compilers, preprocessors, static analyzers, transpilers, IDEs, build systems, etc.
Stars: ✭ 31 (+138.46%)
Mutual labels:  compilers
compiler-course-project
华中科技大学编译原理实验2019
Stars: ✭ 61 (+369.23%)
Mutual labels:  compiler-design
awesome-uva
A curated list of UVa projects
Stars: ✭ 11 (-15.38%)
Mutual labels:  university
build-anywhere
Scripts for building compilers that run anywhere, which build things that run anywhere
Stars: ✭ 72 (+453.85%)
Mutual labels:  compilers
nyc-infosec
Mapping the NYC Infosec Community
Stars: ✭ 41 (+215.38%)
Mutual labels:  university
450-free-courses
📚 Here are 450 Ivy League courses you can take online right now for free
Stars: ✭ 95 (+630.77%)
Mutual labels:  university
NatLang
NatLang is an English parser with an extensible grammar
Stars: ✭ 20 (+53.85%)
Mutual labels:  visitor-pattern
SoftUni-Software-Engineering
SoftUni- Software Engineering
Stars: ✭ 47 (+261.54%)
Mutual labels:  university
university-site-cms
University site and CMS implemented with Spring Boot.
Stars: ✭ 25 (+92.31%)
Mutual labels:  university
memalloy
Memory consistency modelling using Alloy
Stars: ✭ 23 (+76.92%)
Mutual labels:  compiler-design
klas-helper
🎠 광운대학교 KLAS 사이트에 편리한 기능을 추가할 수 있는 유저 스크립트
Stars: ✭ 60 (+361.54%)
Mutual labels:  university

PYCompiler 👀

PYCompiler is a compiler for a simple version of python that was develop in the subject "Programming Languaje Design" at Univeristy of Oviedo (uniovi)

Getting Started 🚀

To begin with the project, clone the repository in your own computer. To do so, you can use this command:

git clone https://github.com/mistermboy/PYCompiler.git;

Alternative, you can download the repository as a zip file from the repository main page.

Once you have the repository, import the project in eclipse.

-> File 
  -> Import
    -> General 
      -> Existing Projects into Workspace...

Using PYCompyler 🏁

To use PYCompyler there are two alternatives, you can write your own program (View the syntax) (Ver la sintaxis) or use an example one. I recommend you the second option, if it´s your first time. There are a few example programs in the folder called "program4Test".

Once you've chosen an option, you only have to run the main class, that is located in the "py" package, passing the name of the input and the output file as a parameters. Here is a example with the program "big.input.txt", that calculates the Fibonacci sequence.

-> Run as 
  -> Run configurations
    -> Java Application  
      -> Arguments 
        -> programs4Test/big.input.txt output.txt

Now you'll see the instrospector window, that shows a general view of the AST (Abstract Syntax Tree) built by the compiler. You can take a look if you want but it´s not necesary.

Close the introspector window and check the output file. You should see the instructions of the program you passed written in a language like assembler.

MAPL 🔧

At this point we need to use some tool that is able to interpret the instructions. That tool is MAPL.

Execute "MAPL.cmd".

Location -> PYCompiler\MAPL.cmd

By default, MAPL load the "output.txt" file but you can chose other in "File -> Open..."

Using MAPL is very simple. At the left of the window we have the instructions of the program loaded and the buttons to run, debugg, reload... In the middle the static memory and finally in the rigth, the stack memory. Also there is an small terminal at bottom left.

To end with the example, run the program by clicking in the green arrow and look what happends. You should see the Fibonacci sequence calculated in the terminal. 💻

Development 🚧 ⚙️

Now you will learn how the project is composed:

Built With 🛠️

License 📋

This project is licensed under the MIT License - see the LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].