[fpc-devel] C++ linking questions
svenmauren at vr-web.de
Sun Mar 21 11:08:08 CET 2010
I've found some time (and inspiration) to work on the C++ linking
Currently I'm trying to implement namespace support, but I've got some
questions about implementation details.
My current idea is this:
end; namespace FirstPart.SecondPart;
Where FirstPart and SecondPart are identifiers.
1. What do you think about this syntax?
2. What about the order of namespace and external? Should it be
"namespace (...); external (...);" or "external (...); namespace
(...);"? Or shall both orders be accepted?
3. How can I parse a not reserved identifier? Checking "idtoken" for
"_ID", using it with "token" and after usage calling "consume(_ID);"?
4. What about reserved identifiers being used in the namespace which
might be valid in C++ (e.g. "location", "platform", "register", "object"
or even "begin")?
5. What's the best way to save the namespace in the tobjectdef class? As
a string containing 'FirstPart.SecondPart'? Or as C++ mangled string
'9FirstPart10SecondPart'? Or something else (e.g. a list containing the
6. If I add a field to e.g. tobjectdef that's written to and loaded from
ppu files, I need to increase the ppu version, right?
PS: Please CC me, because I'm using Digest Mode and I don't want to mess
up the thread view. :)
More information about the fpc-devel