-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing to run c2go on kilo.c #25
Comments
Hi @yml that is a really good example to play with (I will definitely keep this in mind in the future), but unfortunately c2go does not have enough features to be able to process that codebase... at least not yet! The AST (the structure that describes the C code) is ingested from the
...that it cannot yet understand. Here are the test cases for FieldDecl. Once a new test case is added, and this regex is updated it should be able to understand this input. Like I said, we are still far away from being able to compile kilo.c, but one step at a time... |
I believe this is fixed with #31 |
There has been some progress on this front: yml@kodi$ c2go transpile kilo.c
~/Devs/kilo master
yml@kodi$ ll
total 188
-rw-r--r-- 1 yml yml 40314 avril 14 2017 kilo.c
-rw-r--r-- 1 yml yml 57703 nov. 17 09:38 kilo.go
-rw-r--r-- 1 yml yml 1330 avril 14 2017 LICENSE
-rw-r--r-- 1 yml yml 91 avril 14 2017 Makefile
-rw-r--r-- 1 yml yml 828 avril 14 2017 README.md
-rw-r--r-- 1 yml yml 204 avril 14 2017 TODO
yml@kodi$ go run kilo.
kilo.c kilo.go
~/Devs/kilo master
yml@kodi$ go run kilo.go
# command-line-arguments
./kilo.go:1006:79: cannot use 0 (type int) as type []byte in array or slice literal
./kilo.go:1007: cannot use 0 (type int) as type []byte in array or slice literal
./kilo.go:1013:3: undefined: tcsetattr
./kilo.go:1025:19: undefined: isatty
./kilo.go:1028:2: undefined: atexit
./kilo.go:1029:5: undefined: tcgetattr
./kilo.go:1033:14: invalid operation: raw.c_iflag &= ^(2 | 256 | 16 | 32 | 1024) (mismatched types tcflag_t and int)
./kilo.go:1034:14: invalid operation: raw.c_oflag &= ^1 (mismatched types tcflag_t and int)
./kilo.go:1035:14: invalid operation: raw.c_cflag |= 48 (mismatched types tcflag_t and int)
./kilo.go:1036:14: invalid operation: raw.c_lflag &= ^(8 | 2 | 32768 | 1) (mismatched types tcflag_t and int)
./kilo.go:1036:14: too many errors |
Thanks for the update @yml. There is still a lot of work to get kilo.c working, but we definitely are making progress 👍 |
Warnings for present version:
|
After #469:
|
result of
Warning maybe from user source:
So, now problem of |
While trying out this project I tried and fail to run it against kilo.c
I have close to no idea what I am doing and running
c2go
on this kind of project is may be out of scope. Thank you for opening up this project.TODO:
The text was updated successfully, but these errors were encountered: