Re: occ -p -s
Stefan Seefeld <[email protected]>
| Newsgroups | gmane.comp.documentation.synopsis |
|---|---|
| Message-ID | <[email protected]> |
Gilles J. Seguin wrote:
> Allo Stefan,
>
> How can I have the equivalent of cli
> $ occ -p -s tata.cc
erm, you can't. That's precisely one of my goals: to
provide similar functionality via python (synopsis) scripting.
the 'occ' executable does quite a number of things:
1) running a preprocessor (already possible in synopsis)
2) parsing an input file (already possible in synopsis)
3) manipulating the generated parse tree based on special tokens
embedded into the input file (not possible in synopsis)
4) generating code from this modified parse tree (not possible in synopsis)
5) running a compiler on the code (not done in synopsis)
6) rerun itself with plugins loaded that had been compiled by a previous run
(not possible in synopsis)
Point 3 is the interesting bit here, and there are multiple
ways to do it. Point 4 is trivially done given the existing API.
Point 5 is also quite simple (even portably) in python.
I don't know what to do about point 6...I believe this can be
done in a simpler way with a different approach.
Again, this is all on my todo list. I have ideas how to get there,
and I welcome everybody who wants to get involved.
Regards,
Stefan