A toy translator C to ATS

122 views
Skip to first unread message

Kiwamu Okabe

unread,
Jul 19, 2019, 12:06:19 AM7/19/19
to ats-lang-users
Dear all,

I just create a toy translator C to ATS.

http://metasepi.org/en/posts/2019-07-19-toy-translator-c-to-ats.html

Today, it only translates a simple for and while loop in C language
into a recursive function in ATS language,

In future, it may support more complex features such as:

* Support break, continue, and goto. (Should use some kind of CFG?)
* Support pointers using at-view.
* Support C headers using .sats files.
* Use val instead of var.
* Simplify ATS code. Example: reduce multiple let.
* Support ATS3.

Best regards,
--
Kiwamu Okabe at METASEPI DESIGN

Artyom Shalkhakov

unread,
Jul 19, 2019, 2:30:10 AM7/19/19
to ats-lang-users
Hi Kiwamu,

On Friday, July 19, 2019 at 7:06:19 AM UTC+3, Kiwamu Okabe wrote:
Dear all,

I just create a toy translator C to ATS.

http://metasepi.org/en/posts/2019-07-19-toy-translator-c-to-ats.html

Today, it only translates a simple for and while loop in C language
into a recursive function in ATS language,

This is awesome. Thank you!

I'll have a go at translating some simple C code with this!

Kiwamu Okabe

unread,
Jul 19, 2019, 4:41:20 AM7/19/19
to ats-lang-users
Dear Artyom,

On Fri, Jul 19, 2019 at 3:30 PM Artyom Shalkhakov
<artyom.s...@gmail.com> wrote:
> I'll have a go at translating some simple C code with this!

Thanks. But I believe you will face many errors on your trying.

Please feel free to post the errors at following, or just send e-mail them.
I will support your issues with best-effort.

https://github.com/metasepi/idiomaticca/issues
Reply all
Reply to author
Forward
0 new messages