English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
OCaml && COCOA-Environment (Mac-OS-X/GUI)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-02-18 (23:05)
From: art yerkes <ayerkes@s...>
Subject: Re: [Caml-list] Re: OCaml && COCOA-Environment (Mac-OS-X/GUI)
Jeff Henrikson <jehenrik@yahoo.com> wrote (lines wrapped):
> I have been stuck lately in lexer hell.  Frontc has a good AST, but the
> parser is not designed to parse real-world nasty header files.  There
> are lots of pragmas such as __builtin_va_list which will crash when
> parsing the linux stdio.h and etc.  To my knowledge, the best work with
> this has been done by the Cil team at UC Berkeley.  Unfortunately, the
> Cil team chose to fork the frontc sources and not contribute a backport
> that I can tell.  The dependencies are very intertwined.

I wonder if the SWIG parser (which is very dirty, but quite permissive)
might be useful in helping to buildup frontc.  I like the idea of frontc
but am using SWIG for bindings mainly because it works on a remarkable
variety of input.  Even though I'm nearly finished with the static types
fork I've promised (now written in ocaml), it still relies on SWIG -xml
to generate the input.  A purer solution would be preferrable if it could
be tuned to accept more input than frontc does now.

I'd be willing to work with you to try to convert the SWIG parser, if 
you're interested in collaborating.  Maybe we can choose some unlanguaged
representation that can be built into both SWIG and frontc ... then it'd 
be possible for both to share bug fixes too (SWIG regularly gets new
hairy template expansion test cases).

Here's a simple experiment. Stand on a train track between two locomotives
which are pushing on you with equal force in opposite directions. You will
exhibit no net motion. None the less, you may soon begin to notice that
something important is happening.
-- Robert Stirniman