Coder Social home page Coder Social logo

longjohncoder / c2nim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nim-lang/c2nim

0.0 1.0 0.0 669 KB

c2nim is a tool to translate Ansi C code to Nim. The output is human-readable Nim code that is meant to be tweaked by hand before and after the translation process.

License: MIT License

Nim 91.21% C 4.05% C++ 4.74%

c2nim's Introduction

c2nim

c2nim is a tool to translate Ansi C code to Nim. The output is human-readable Nim code that is meant to be tweaked by hand after the translation process. c2nim is no real compiler!

Please see the manual here.

Installing

Install https://github.com/nim-lang/nimble#installation, clone this repository and run nimble build in your checkout.

Translating

c2nim is preliminary meant to translate C header files. Because of this, the preprocessor is part of the parser. For example:

  #define abc 123
  #define xyz 789

Is translated into:

  const
    abc* = 123
    xyz* = 789

c2nim is meant to translate fragments of C code and thus does not follow include files. c2nim cannot parse all of Ansi C and many constructs cannot be represented in Nim: for example duff's device cannot be translated to Nim.

c2nim's People

Contributors

araq avatar tmm1 avatar andreaferretti avatar dom96 avatar bigepsilon avatar ratiotile avatar foldl avatar nc-x avatar cdunn2001 avatar data-man avatar gmpreussner avatar yglukhov avatar genotrance avatar reactormonk avatar flaviut avatar fowlmouth avatar bumblingcoder avatar julienaubert avatar zielmicha avatar varriount avatar def- avatar amselchen avatar

Watchers

James Cloos 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.