The Artima Developer Community
Sponsored Link

Heron-Centric: Ruminations of a Language Designer
Cat Source Code at CodeProject.com
by Christopher Diggins
November 4, 2006
Summary
I've recently posted the Cat source code to CodeProject.com with a reasonably detailed description of the design and implementation.

Advertisement

Even though the Cat language has relatively simple syntax and semantics, the type system is not trivial. To help people who are interested in using or modifying the source code I decided to write an article which supplements the internal documentation, and could aid people in understanding the design and implementation of the interpreter. The article is available on CodeProject.com at http://www.codeproject.com/useritems/cat.asp

Cat is implemented in C# and the source code is public domain, which means it easily used in commercial or open-source projects, and is compatible with any kind of license you desire. To download the source code through CodeProject.com you have to register, but you can also download the source code from my site at http://www.cat-language.com/download.html.

The article should prove to be interesting for those of you interested in the implementation of interpreters and compilers. Also for those of you interested in using the Cat interpreter (or some variant of Cat) as a scripting add-on to an existing application. Cat of course is also interesting as a stand alone package, and could be used with wrapper applications. Some of the ideas I for projects I'd like to develop are:

Cat is an extremely easy to implement language, if you disregard type inference. I would estimate that it shouldn't take more than one or two person weeks to implement in a modern language, assuming you leave out all type checking and type inference code and you use the pre-existing code as a model.

This means that Cat is also easy to port, translate to, and translate from. I expect over the next year to see various implementation of Cat pop up all over the place This is based on the interest expressed by various people over the internet.

Cat can also be easily used as a scripting language to extend applications. If you don't like the Cat postfix notation, it is a relatively easy task to implement a prefix notation front-end. In fact this one of the projects on my to-do list.

I'd love to hear whether the Cat source code comes in useful to you, or finds its way into any of your projects, or if you decide to extend Cat to make your pet language.

Talk Back!

Have an opinion? Readers have already posted 4 comments about this weblog entry. Why not add yours?

RSS Feed

If you'd like to be notified whenever Christopher Diggins adds a new entry to his weblog, subscribe to his RSS feed.

About the Blogger

Christopher Diggins is a software developer and freelance writer. Christopher loves programming, but is eternally frustrated by the shortcomings of modern programming languages. As would any reasonable person in his shoes, he decided to quit his day job to write his own ( www.heron-language.com ). Christopher is the co-author of the C++ Cookbook from O'Reilly. Christopher can be reached through his home page at www.cdiggins.com.

This weblog entry is Copyright © 2006 Christopher Diggins. All rights reserved.

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use