[M3devel] UI, Trestle, native... Cocoa??

Jay K jay.krell at cornell.edu
Wed Sep 29 10:00:55 CEST 2010


There are several obvious approaches, with several obvious tradeoffs.
I've used regexps surprisingly successfully.
Manual from documentation is very voluminous/tedious.
Headers are generally such a subset of C that writing a parser is not too impossible.

 - Jay

----------------------------------------
> From: dragisha at m3w.org
> To: mika at async.async.caltech.edu
> Date: Wed, 29 Sep 2010 09:55:03 +0200
> CC: m3devel at elegosoft.com; darko at darko.org
> Subject: Re: [M3devel] UI, Trestle, native... Cocoa??
>
> Why don't use swig?
>
> Ref manual route is sanest, escaping all .h mumbo jumbo, but it's also
> with most work involved...
>
> On Wed, 2010-09-29 at 00:50 -0700, Mika Nystrom wrote:
> > My advice would be not to parse C at all. Just translate the
> > reference manual's
> > specs into some specification language (I use Scheme or Modula-3 but
> > you could
> > use XML) and generate glue code in both C and Modula-3. It's a lot
> > saner...
> > you can use your regex translation machine the first time of course,
> > but then
> > maintain the linkage in a language that actually specifies things
> > properly.
> >
> >
> --
> Dragiša Durić 
>
 		 	   		  


More information about the M3devel mailing list