Code Monkey home page Code Monkey logo

compiler's Introduction

Hi there ๐Ÿ‘‹

I'm Alon Regev, and I like working on projects in my free time!

I especially like programming in Assembly, C and C++.

Another cool repository on GitLab I made (with a partner) while studying in "Magshimim":
TOR Project - Trying to make a TOR Network including Hidden Services, Bridge Nodes and many cool Features!

Anurag's GitHub stats Top Langs

compiler's People

Contributors

alon-regev avatar

Stargazers

 avatar  avatar

Watchers

 avatar

compiler's Issues

Primitive types

Add Various types and support for operators

  • string: "hello"
  • float: 3.35
  • bool: true false

With support for casting.

Comparison Chaining

Python-like operator chaining.
Example:
1 < 2 < 3 which is equivalent to 1 < 2 and 2 < 3

Warnings

Add warnings and print them to the screen.

  • Unnecessary Casts

Batch Assignment

multiple assignments in one operation.
Examples:

int a = 1, b = 2;
a, b = 3, 4;
int a, b, c, d;
a, c, b, d = 1, 2, 3, 4;
int a = 1, b = 2;
a, b = b, a;

Unary operators

Operators to implement:
negation: -x
bitwise not: ~x
factorial: x!

Advanced input

Get input from places other than the console.

  • Console program input.
  • Console program multiline input.
  • File input
  • Command line arguments.
    • Default main menu
    • Help command
    • File input
    • Console input

Boolean operators

support for boolean operators

  • Relational: <, >, <=, >=, ==, !=
  • Logical: &&, ||, !

More Operators

List of operators:

  • bitwise operators: And &, Or |, Xor ^.
  • Other operators: Exponentiation **, Modulo: %,

Rework argument Parsing and options

  • add argument parser
  • improve current options
  • improve menu
    • add quit option
  • prepare for future additions:
    • add -o or --output option for specifying output file
    • detailed compilation file -D or --detailed
    • multiple files for --file option

Variable Testing

  • Edge cases (empty statements, empty blocks...)
  • different types
  • wierd syntax (example: int 5 = 3;...)

AST Improvements

  • Remove Line number from node's constructor
  • Primitive constructor from string with TryParse

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.