Hi again!

Once I say 'I did it that and that way', all are coming to answer me... Nice :)

On 21.03.2010 14:28, Paul Ishenin wrote:
21.03.2010 20:21, Sven Barth wrote:
3. How can I parse a not reserved identifier? Checking "idtoken" for
"_ID", using it with "token" and after usage calling "consume(_ID);"?


Usage is with "pattern" (all letters uppercase) or "orgpattern"
(original casing) instead of "token"... the rest works as expected.

Why do you need this at all? If you want to parse "namespace" word then
just add it to the token list as
(str:'NAMESPACE' ;special:false;keyword:m_all;op:NOTOKEN)

Best regards,
Paul Ishenin.


It's not the "namespace" keyword... that is done the way you suggested (besides using m_none instead of m_all as Jonas mentioned).

I'm talking about the namespace value itself.

E.g. the C++ code

namespace Foo::Bar {
        class FooBar {

        }
}

becomes to

FooBar = cppclass

end; namespace Foo.Bar;

in Pascal.

Or should I use a stringconst instead of point delimited identifiers? Like it's done for external...

On 21.03.2010 14:37, Florian Klaempfl wrote:
I think it's better to store just the name space string, it looks more
flexbile to me.

Hmm... ok... but would there be any problem with using another field in objectdef, that is not saved to ppu, to save the mangled name, so I don't need to mangle it every time a method of that class is mangled? (maybe wrapped with a getter function for "lazy mangling" :D)

Regards,
Sven
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to