There is a reference for the CnC grammar in the repository for the .NET implementation.
http://github.com/dmpots/CnC.NET/blob/master/CnC.NET/CnC.NET/Parser.fsy
The textual representation is still in flux a bit, but this grammar should be enough of a guide for implementing a parser in Haskell. The grammar is left recursive, so using a parser generator like Happy would be a good choice.
The textual representation will actually be a bit different depending on the underlying language since the types of items stored in a collection is part of the description. For example in C, an item collection that stores an array of ints would be declared like:
[int* A];
but in Haskell we would want to write something like
[Array Int Int A];
I think dealing with type declarations would in the textual representation would be the main difference in implementing the parser in Haskell. Once the textual representation has been parsed to an AST it should be possible to generate the Haskell code that builds the graph using the haskell-cnc package.
-David
On Jun 23, 2010, at 3:56 PM, Vasili I. Galchin wrote:
On Wed, Jun 23, 2010 at 3:47 PM, Don Stewart
<dons@galois.com> wrote:
vigalchin:
> Hello,
>
> I have been reading work done at Rice University: http://
>
habanero.rice.edu/cnc. Some work has been done by
http://www.cs.rice.edu/
> ~dmp4866/ on CnC for .Net. One component that David wrote a CnC translator that
> translates CnC textual form to the underlying language, e.g. F#. Is anybody
> working on a CnC textual form translator for Haskell so a Haskell user of CnC
> Haskell can write in a higher level??
Ah, so by a translator from high level CnC form to this:
http://hackage.haskell.org/packages/archive/haskell-cnc/latest/doc/hml/Intel-Cnc.html
^^ exactly what I mean
? Do you have a reference for the "CnC textual form"?
^^ if you mean something like a context-free grammatical definition of the "CnC textual form" ,,, the answer is I haven't seen such a reference.
V.
-- Don
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe