Cat to C++ Translator written in C++

7 views
Skip to first unread message

Christopher Diggins

unread,
Jun 3, 2007, 6:53:48 PM6/3/07
to concatenative, catla...@googlegroups.com, langs...@yahoogroups.com
I've just released version 0.1 of a public domain Level-1 Cat to C++
compiler (written in C++) at
http://code.google.com/p/cat-language/downloads/list. This
implementation bootstraps a Level-1 implementation of Cat from a
Level-0 implementation. There are a hundred unit tests and only a
handful of predefined functions so this is a very stable release.

The translation is done without static type-checking instead the
resulting code is implemented using optimized polymorphic variant
types (see http://www.ddj.com/dept/cpp/184402027 and
http://www.codeproject.com/cpp/dynamic_typing.asp ) and stable
fast-growing stacks (see http://www.codeproject.com/cpp/fast-stack.asp
).

For an updated list of primitives that now contains unit tests for all
of the level-0 and level-1 primitives and better definitions see
http://www.cat-language.com/primitives.html.

This release is primarily intended to help people who are interested
in possibly using Cat as a back-end for other programming languages
but who prefer to work with C++ than C#. However, the code base is
should be useful to any language implementer. Using Cat as a back-end
now gets you the following for free:

- an interactive interpreter (written in C#)
- a Cat to MSIL compiler (this is built in to the interpreter)
- a Cat to C++ translator (written in C++)

These are all projects which I have been developing single-handedly.
As more people get involved, you can expect to see the number of
compilers and translators to and from Cat increase quickly.

Other Cat projects by other people that I am aware of are:

- a statically typed Cat to C++ translator
- a Cat to assembly translator
- a Cat to Omega (a dialect of Haskell) translator

Cheers,
Christopher Diggins
http://www.cdiggins.com

latte

unread,
Jun 4, 2007, 6:42:47 AM6/4/07
to Cat Language

On Jun 4, 10:53 am, "Christopher Diggins" <cdigg...@gmail.com> wrote:
> I've just released version 0.1 of a public domain Level-1 Cat to C++

> compiler (written in C++) athttp://code.google.com/p/cat-language/downloads/list. This


> implementation bootstraps a Level-1 implementation of Cat from a
> Level-0 implementation. There are a hundred unit tests and only a
> handful of predefined functions so this is a very stable release.
>
> The translation is done without static type-checking instead the
> resulting code is implemented using optimized polymorphic variant
> types (seehttp://www.ddj.com/dept/cpp/184402027andhttp://www.codeproject.com/cpp/dynamic_typing.asp) and stable

> fast-growing stacks (seehttp://www.codeproject.com/cpp/fast-stack.asp


> ).
>
> For an updated list of primitives that now contains unit tests for all

> of the level-0 and level-1 primitives and better definitions seehttp://www.cat-language.com/primitives.html.


>
> This release is primarily intended to help people who are interested
> in possibly using Cat as a back-end for other programming languages
> but who prefer to work with C++ than C#. However, the code base is
> should be useful to any language implementer. Using Cat as a back-end
> now gets you the following for free:
>
> - an interactive interpreter (written in C#)
> - a Cat to MSIL compiler (this is built in to the interpreter)
> - a Cat to C++ translator (written in C++)
>
> These are all projects which I have been developing single-handedly.
> As more people get involved, you can expect to see the number of
> compilers and translators to and from Cat increase quickly.
>
> Other Cat projects by other people that I am aware of are:
>
> - a statically typed Cat to C++ translator
> - a Cat to assembly translator
> - a Cat to Omega (a dialect of Haskell) translator
>
> Cheers,
> Christopher Digginshttp://www.cdiggins.com

Wow! That sounds great, Chris! Can't wait to have a look at
that! :-)
I'm used to C++ myself (rather than C#) but that's really only because
I
haven't tried C# yet. I'd have to use the Mono version since I'm
running
Linux. Anyway, thank you very much for doing that (and releasing it
as
public-domain too!).
Bye for now -
- Andy ( latte )


Christopher Diggins

unread,
Jun 4, 2007, 8:06:30 PM6/4/07
to catla...@googlegroups.com
> . Anyway, thank you very much for doing that (and releasing it
> as public-domain too!).
> Bye for now -

Thanks a lot for the encouragement Andy, I hope you find the code useful!

- Christopher

latte

unread,
Jun 5, 2007, 2:32:05 AM6/5/07
to Cat Language

Hi -
I'm sure I will! :-) Bye for now -
- Andy

Reply all
Reply to author
Forward
0 new messages