From: Stefan S. <se...@sy...> - 2004-04-04 19:08:11
|
hi there, there are some valid C++ expressions openC++ doesn't yet understand. I'v just run into a fairly simple one: namespace Foo = Bar; that creates a namespace alias. Is there any chance that the parser gets fixed to recognize this ? (I'm also getting a couple of failures in the test suite run on my RH9 machine where the parser has problems with GNU extensions (I believe), in this case the line is extern "C" __typeof(uselocale) __uselocale; ) Thanks, Stefan |
From: Grzegorz J. <ja...@he...> - 2004-04-05 21:36:44
|
Hi Stefan, On Sun, 4 Apr 2004, Stefan Seefeld wrote: > there are some valid C++ expressions openC++ doesn't > yet understand. > > I'v just run into a fairly simple one: > > namespace Foo = Bar; > > that creates a namespace alias. Is there any chance > that the parser gets fixed to recognize this ? Yes, however parser is not self-healing system. AFAIK I am the only person doing anything to the code at the moment. I don't have resources to fix it now. You hacked OpenC++ already, perhaps you could invest some time in this fix. Please contact me for arrangements if you decide to do so. > (I'm also getting a couple of failures in the test suite > run on my RH9 machine where the parser has problems with > GNU extensions (I believe), in this case the line is > > extern "C" __typeof(uselocale) __uselocale; > ) This is high priority, however before I get down to it I need to separate parser, because testing the whole monolith adds huge burden and slows down anything I do to parser. I am working on the separation now. Thanks GJ ################################################################## # Grzegorz Jakacki Huada Electronic Design # # Senior Engineer, CAD Dept. 1 Gaojiayuan, Chaoyang # # tel. +86-10-64365577 x2074 Beijing 100015, China # # Copyright (C) 2004 Grzegorz Jakacki, HED. All Rights Reserved. # ################################################################## |
From: Stefan S. <se...@sy...> - 2004-04-06 05:28:48
Attachments:
patch
|
Grzegorz Jakacki wrote: > Hi Stefan, > > On Sun, 4 Apr 2004, Stefan Seefeld wrote: > > >>there are some valid C++ expressions openC++ doesn't >>yet understand. >> >>I'v just run into a fairly simple one: >> >>namespace Foo = Bar; >> >>that creates a namespace alias. Is there any chance >>that the parser gets fixed to recognize this ? > > > Yes, however parser is not self-healing system. AFAIK I am the only person heh :-) > doing anything to the code at the moment. I don't have resources to fix it > now. > > You hacked OpenC++ already, perhaps you could invest some time in this > fix. Please contact me for arrangements if you decide to do so. Fair enough. Attached is a patch that: * adds a new token ('ntNamespaceAlias'...luckily there are still some slots available ;-) * adds a new Ptree subclass 'PtreeNamespaceAlias' * adds a 'rNamespaceAlias' method to the parser that generates such a ptree * adds a dummy 'TranslateNamespaceAlias' to the Walker base class What should the parse tree for this declaration look like ? As I don't know any better, I just generate a simple list [ 'namespace' <alias> '=' <scoped.name> ';' ] (where scoped.name can be a list if it's not a simple identifier) The Walker::TranslateNamespaceAlias() method does nothing (yet), but should probably register the new alias to the environment. I'll let others fill that out :-) Regards, Stefan |
From: Stefan S. <se...@sy...> - 2004-04-15 12:13:21
|
Stefan Seefeld wrote: > Grzegorz Jakacki wrote: >> You hacked OpenC++ already, perhaps you could invest some time in this >> fix. Please contact me for arrangements if you decide to do so. > > > Fair enough. Attached is a patch that: Grzegorz, did you have the time to have a look into the patch ? I'm willing to do further work with some guidance, as I understand you are quite busy. I still have write permissions to the opencxx repository, though I'd prefer to have somebody with better opencxx understanding review my patches first. May be at some point I'm also able to help with other issues on your todo list, such as the refactoring / modularization. Kind regards, Stefan |
From: Grzegorz J. <ja...@he...> - 2004-04-16 01:46:07
|
On Thu, 15 Apr 2004, Stefan Seefeld wrote: > Stefan Seefeld wrote: > > Grzegorz Jakacki wrote: > > >> You hacked OpenC++ already, perhaps you could invest some time in this > >> fix. Please contact me for arrangements if you decide to do so. > > > > > > Fair enough. Attached is a patch that: > > Grzegorz, > > did you have the time to have a look into the patch ? Yes, looks very good, but I had no time to apply it yet, sorry. > I'm willing to do > further work with some guidance, as I understand you are quite busy. > I still have write permissions to the opencxx repository, though I'd > prefer to have somebody with better opencxx understanding review my > patches first. That's great, Stefan. I have just mailed you privately with more info on that. > May be at some point I'm also able to help with other issues on your > todo list, such as the refactoring / modularization. Fantastic. BR Grzegorz > > Kind regards, > Stefan > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Opencxx-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencxx-users > > ################################################################## # Grzegorz Jakacki Huada Electronic Design # # Senior Engineer, CAD Dept. 1 Gaojiayuan, Chaoyang # # tel. +86-10-64365577 x2074 Beijing 100015, China # # Copyright (C) 2004 Grzegorz Jakacki, HED. All Rights Reserved. # ################################################################## |
From: Stefan S. <se...@sy...> - 2004-04-07 02:35:06
|
Hi Grzegorz, Grzegorz Jakacki wrote: >>(I'm also getting a couple of failures in the test suite >> run on my RH9 machine where the parser has problems with >> GNU extensions (I believe), in this case the line is >> >> extern "C" __typeof(uselocale) __uselocale; >>) > > > This is high priority, however before I get down to it I need to separate > parser, because testing the whole monolith adds huge burden and slows down > anything I do to parser. I am working on the separation now. I just realize that the synopsis port of opencxx already contains a change to deal with this GNU extension. May be we should try to merge the appropriate parts back into 'mainline' ? Let me know if I can help... On an unrelated note: as you know I'm quite interested into the efford to separate the different opencxx layers. As I don't have any theoretical background in compiler / parser techniques, I'm wondering about the nature of all the ptree related business: As far as I understand only the very first steps are related to a parse tree proper. Already the construction of things like 'PtreeNamespaceAlias' nodes belongs into the 'syntax tree' domain, right ? I'm asking because I have some difficulties drawing a clear line as to what the AST I use in synopsis should look like. Right now I only manipulate declarations, but I can imagine at some point to be more flexible and provide scripting access to the parsed source code and thus similar to opencxx's goals provide some means to do meta programming. Any thoughts ? Regards, Stefan PS: for those who don't know what I'm talking about: http://synopsis.fresco.org |