digitalmars.D - DMD FrontEnd
- Charles (19/19) Jan 02 2005 ( Posted from email )
- James Dunne (7/26) Jan 05 2005 Have you checked my posts about DLexer and DParse? I'm in the process o...
- Charles (16/53) Jan 06 2005 Yep I've kept up with those threads :). Looks very nice, unfortunately
( Posted from email ) I am using the DMD front end for code completion / navigation, and have gotten it to compile and can use it to succesfully parse code, and have been looking through the semantic phases to see how I can create and use a symbol table of sorts that I can then use to display all classes / functions / aliases ( etc ... ), and use it to search for code-completion. I don't have any compiler experience , and Im struggling with it a bit. Should I just take each Module and enumerate through their members, in a big if block and based on each symbols type take a specific action ? e.g. /*.. code ..*/ --- Walters Reply --- The way to do custom code for each symbol type is the same way semantic() is done for each symbol. Create a new virtual function for what you want to do, and override that function for each symbol. Then, loop through the members of each module, calling that function. Soon as the parser is done Ill release it in case others want to use it for code completion and stuff. ( its in C++ ) Thanks, Charlie
Jan 02 2005
Have you checked my posts about DLexer and DParse? I'm in the process of converting DMD's front end compiler's parsing code over to D. I'll post the final modules when I'm satisfied. This will help with code-completion support very much! In fact, that's my goal. In article <cr9nvg$9fc$1 digitaldaemon.com>, Charles says...( Posted from email ) I am using the DMD front end for code completion / navigation, and have gotten it to compile and can use it to succesfully parse code, and have been looking through the semantic phases to see how I can create and use a symbol table of sorts that I can then use to display all classes / functions / aliases ( etc ... ), and use it to search for code-completion. I don't have any compiler experience , and Im struggling with it a bit. Should I just take each Module and enumerate through their members, in a big if block and based on each symbols type take a specific action ? e.g. /*.. code ..*/ --- Walters Reply --- The way to do custom code for each symbol type is the same way semantic() is done for each symbol. Create a new virtual function for what you want to do, and override that function for each symbol. Then, loop through the members of each module, calling that function. Soon as the parser is done Ill release it in case others want to use it for code completion and stuff. ( its in C++ ) Thanks, CharlieRegards, James Dunne
Jan 05 2005
Yep I've kept up with those threads :). Looks very nice, unfortunately this project is in C++ , else I would definetly go with D. Keep up the good work ! Charlie "James Dunne" <jdunne4 bradley.edu> wrote in message news:crifrk$rer$1 digitaldaemon.com...Have you checked my posts about DLexer and DParse? I'm in the process of converting DMD's front end compiler's parsing code over to D. I'll postthefinal modules when I'm satisfied. This will help with code-completionsupportvery much! In fact, that's my goal. In article <cr9nvg$9fc$1 digitaldaemon.com>, Charles says...been( Posted from email ) I am using the DMD front end for code completion / navigation, and have gotten it to compile and can use it to succesfully parse code, and havesymbollooking through the semantic phases to see how I can create and use ahavetable of sorts that I can then use to display all classes / functions / aliases ( etc ... ), and use it to search for code-completion. I don'tbigany compiler experience , and Im struggling with it a bit. Should I just take each Module and enumerate through their members, in aisif block and based on each symbols type take a specific action ? e.g. /*.. code ..*/ --- Walters Reply --- The way to do custom code for each symbol type is the same way semantic()do,done for each symbol. Create a new virtual function for what you want tomembersand override that function for each symbol. Then, loop through theforof each module, calling that function. Soon as the parser is done Ill release it in case others want to use itcode completion and stuff. ( its in C++ ) Thanks, CharlieRegards, James Dunne
Jan 06 2005