Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Attempts to convert C to Go. Works on several simple examples, but not complex applications.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 doesnotworkyet
Octocat-spinner-32 wiptxt
Octocat-spinner-32 works
Octocat-spinner-32 .gitignore Minor changes March 15, 2014
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 c2go.py
Octocat-spinner-32 clean.sh
Octocat-spinner-32 compile.sh
Octocat-spinner-32 try.sh
README.md

C2Go 0.1

C2Go is based on the c-to-c.py example from pycparser by Eli Bendersky, and uses pycparser extensively.

C examples are from: http://www.cis.temple.edu/~ingargio/cis71/code/, except for "test.c"

Requirements

  • pycparser
  • ply

Required packages if you're on Arch Linux

  • python-pycparser from [extra]

Improvements

If you wish to help out, here is one way:

  1. Enter the "doesnotworkyet" directory
  2. Select a c file
  3. Type ../try.sh name, where name is the filename before ".c"
  4. Observe the error messages when the generated Go file doesn't compile
  5. Edit the Go file to make it compile again
  6. Edit c2go.py to make it generate a Go file that does compile for the given test case
  7. Create a pull request

Pull requests are appreciated.

Changes

  • April 2013 - Updated to use Go 1
Something went wrong with that request. Please try again.