Am Donnerstag, 5. Februar 2004 09:45 schrieb Leopold Toetsch:
> Uri Guttman <u...@stemsystems.com> wrote:I'am currently writing a simple C-parser in imc. My plan is to extract all
> > printf( "%d event.type\n", (char *)&kbevent.type ) - (char *)&kbevent ;
> offsetof(struct, item)
> is used inside parrot/jit/*
> > want me to hack up this little script and c generation stuff? the hard
> Very much appreciated.
> I thought of that too. A Perl script that takes a C struct and emits an
structs, enums, unions and typedefs in order to create ManagedStructs
If one goes even a step further, it should even be possible to create pasm/imc
wrapper for C functions automatically.
The tokeniser is already working, but the token processing is of course not
very simple, but I think I will have a first working alpha version within the
next few days.
> But as a last resort this script could regenerate the offsets for ajens
> particular machine.
> ## &gen_struct()
> ## autogenerated from above template
> gen_struct --force-align file.imc
> could fill in the correct offset in the last line.
> For PASM only, it could look like:
> ## &gen_struct(P23)
> You might have a look at F<runtime/parrot/include/datatypes.pasm> which
> > uri
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.