Git Product home page Git Product logo

sim-c's Introduction

sim-C

GitHub GitHub stars GitHub contributors PRs Welcome GitHub last commit GitHub issues GitHub closed issues GitHub closed pull requests

What is sim-C?

Often people have trouble programming in C (especially beginners) due to its low level syntax and unavailability of stable third party libraries. We present sim-C a high-level front end for C which creates a dynamically typed syntax for C. User can write code in this high level syntax and then compile it to optimized C code. sim-C does not process the code and simply translates it to C thus, there is no possibility of the code running slowly. So, with sim-C users can write code faster using the high level syntax and at the same time be able to harness the power and speed of a C program. Let us make C cool again.

Pipeline

Discussion

For doubts related to implementation of a feature or to know more about future releases join the official subreddit - r/cimplec.

New Developers

New developers can join simC New Devs slack channel where they can get help from core developers on their issues, link to the slack channel - simC New Devs Slack

Start Contributing

sim-C which has a highly intuitive codebase, you'll be ready to contribute in no time! While adding any functionality to sim-C you need to make changes in the following files only:

1. lexical_analyzer.py Lexical analysis is the first phase of a compiler. It takes the modified source code from language preprocessors that are written in the form of sentences. The lexical analyzer breaks these syntaxes into a series of tokens, by removing any whitespace or comments in the source code. Depending on the type of functionality add it to the respective function: is_keyword, numeric_val, string_val, keyword_identifier and/or lexical_analyze.

2. op_code.py It is responsible for creating opcodes. If need be you need to change the opcode2dig function only which returns the integer representation of opcode type.

3. simc_parser.py Parser is an interpreter component that is used to break the data into smaller elements coming from lexical analysis phase. A parser takes input in the form of sequence of tokens and produces output. Here you may need to create a separate function which defines the grammar and checks for the syntax. The function should return the OpCode. Also, if need be you have to append the functionality to the parse function which parses the tokens, calls the particular function and returns opcodes.

4. compiler.py Finally you need to define the opcode type in the compiler and write the expected C syntax for the functonality.

You can write a test in test.simc and verify whether it's producing results in the test.c file.

Contributing

To get started with simC follow the official documentation:- https://cimplec.github.io/docs/

The following resources are a good place to get to know more about simC:-

  1. Writing code in C? Simplify your life with sim-C Dev.to, Medium.
  2. Getting Started with sim-C Dev.to, Medium.

Apart from these blog posts, you can also checkout the official docs.

License

sim-C is licensed under GNU General Public License (GPL) v3.0. LICENSE

The Team

sim-c's People

Contributors

frankhart2018 avatar dhairyaj avatar math-o5 avatar kunal1197 avatar aayush-99 avatar laddhashreya2000 avatar martianmellow12 avatar roysti10 avatar pranshuldobriyal avatar devlokcodes avatar vsawal avatar agnibhasinha avatar siddharthaml avatar gursimranheer avatar yjdoc2 avatar bruhbs avatar rahulhambarde300 avatar nanoy42 avatar vnksnkr avatar shobhit10058 avatar himanshisinghal09 avatar shaheer-rossoneri14 avatar saptashrungi avatar puranjaymohan avatar priyanshu-official avatar darshit-sopho avatar chasmiccoder avatar asmitraj05 avatar nishitjain1204 avatar vincent-vimard avatar

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.