Re: ML-style pattern matching in C-like languages



Russ Cox <rsc@xxxxxxxxx> writes:

> I am working on a C compiler written in a malleable dialect of C and
> have no qualms about adding new syntax to the language to make
> writing the compiler easier. I am toying with the idea of adding
> some form of pattern-matching syntax but am not sure exactly what it
> should look like. If these are previously-charted waters, I figured
> I'd look around for maps.

How about looking at cyclone?

http://www.eecs.harvard.edu/~greg/cyclone/

Pattern matching as imlemented in it can be found here:
http://www.research.att.com/projects/cyclone/online-manual/main-screen005.html


Regards
Friedrich

.