Hello, Neil,
now I found time to have a closer look to the fine grained API you
mentioned. Thanks for this list!
>> My point here is that I had to duplicate Inline::C code in
>> Inline::Yacc. It basically worked, but for future releases (and more
>> subclassing Inline:: modules) I ask for an interface which allows to
>> include additional "preparation" steps as described, without having to
>> copy parts from the parent module (which might be(come) subject to
>> changes).
>
>It isn't documented, but we've definitely broken down the API inside
>Inline::C quite a lot, so that Inline::CPP can use it. Here's a tree view of
>the methods in Inline::C:
>
>build
> |__ parse
> | |__ get_maps
> | |__ get_types
> | |__ filter
> | \__ get_parser
> |...
>
>Inline::CPP overloads only 3 of these build steps:
> - Inline::CPP::get_parser() creates a C++ parser, not a C parser.
> - [2 more]
>All the other parts of the build process are inherited from Inline::C.
This new API knowledge and a fresh look into the current Inline and
Inline::CPP releases made my code really simpler. Nevertheless,
possibly we're still in need of this additional "preparation hook" I
mentioned before. The current model uses exactly one parser, but with
Inline::Jacc (for example) we need two of them. One is parsing Jacc
code, one the intermediate C produced by it. The second one is
Inline::C's parser.
On the other hand we already have filters doing preprocessing. But the
Inline::Filters doc introduces FILTERS as an option to be used by
inlining programmers, not ILSM authors. Should these filters be used
for internal ILSM purposes as well? If so, I would not even have to
overload get_parser().
So I wrote two new versions of Inline::Jacc, one overloading parse()
and one using a filter. Both of them work similarly well until
bootstrapping which still fails with an error (like the previous
release). I'll send both versions with private mail to the yacc people,
could you please have a look? I suppose it has something to do with
Inline internals I'm not aware of.
Greetings
Jochen