This page is WIP! - KrzesimirNowak

Overview

gmmproc is a tool used for creating c++ source codes from templates. The whole process has two stages:

  1. Generating defs files and xml documentation of a wrapped C library - done by user.
  2. Generating source code using template, defs and xml documentation - done by gmmproc.

I'm using two names on this page:

  • gmmproc - current generator.
  • mm-proc - rewritten generator.

Comments?

Problems with gmmproc

These are not written in order of importance.

  1. The second stage of generation is run per file. That means that defs and xml are parsed again and again, when they could be parsed once.
  2. Gmmproc now uses perl and m4. Their interdependence causes adding features to be a hard task.
  3. Defs file are not perfect - they are not always correct and does not contain all needed information.
  4. To generate defs file several third-party tools need to be used and some have to be written by hand.
  5. Docs parser sometimes has problems with converting xml documentation to doxygen comments.
  6. ...?

Comments?

  • Because I didn't studied gmmproc internals very very deep, I suppose that some points could be written yet. - krnowak

What we want from mm-proc

  1. Easy extensibility.
  2. Use information gir files gives.
  3. Instead of generating defs (.gir) it would be better to maybe download it?
  4. ...?

Rewrite

Two stage process:

  1. Rework defs and xml parser to use gir files. Xml documentation file would stay, because gir contains all information about C API, but not all documentation.
  2. Rewrite gmmproc itself to use only one language - perl or python.

Comments?

  • I suppose that moving to gir files should be the first step, so new gmmproc could utilize some information from gir. - krnowak
  • I would use perl. - krnowak

Loose thoughts

  • I think that new gmmproc (or mm-proc) should be placed in mm-common. - krnowak
  • Should mm-proc's workflow differ much from original? I mean - first parsing defs (.gir) and xml, then parsing templates and them outputting source code. - krnowak
  • Working on all templates would allow us to analyze them to find what is wrapped into what, so for example docs could be properly transformed. - krnowak

TODO

  1. Find out what else is wrong with current gmmproc, so we could have that in mind while designing new generator.
  2. Find out what else we want from rewritten mm-proc, which gmmproc does not have.

Projects/gtkmm/mmproc (last edited 2013-11-23 00:07:01 by WilliamJonMcCann)