www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - bindings project/dparser,dlexer

reply bobef <bobef_member pathlink.com> writes:
I've seen these files in the dsource/bindings project. dparser.d dlexer.d... I
am wondering (because I plan to start writing intellisense support for akIDE
soon) has anyone used these and are there any examples?
Sep 03 2005
parent reply James Dunne <james.jdunne gmail.com> writes:
bobef wrote:
 I've seen these files in the dsource/bindings project. dparser.d dlexer.d... I
 am wondering (because I plan to start writing intellisense support for akIDE
 soon) has anyone used these and are there any examples?
 
 

latest compiler revision, but could probably easily be updated to the latest code. Some very small changes in converting the front-end's C++ code to D. Anyway, that's the reason I wrote them - for some sort of intellisense support. I don't think dparser.d is complete, but dlexer.d should be fine (albeit slightly out of date). I'll check em out this weekend and see what I can hack up for you.
Sep 04 2005
parent reply bobef <bobef_member pathlink.com> writes:
In article <dffet0$2ln4$1 digitaldaemon.com>, James Dunne says...
bobef wrote:
 I've seen these files in the dsource/bindings project. dparser.d dlexer.d... I
 am wondering (because I plan to start writing intellisense support for akIDE
 soon) has anyone used these and are there any examples?
 
 

latest compiler revision, but could probably easily be updated to the latest code. Some very small changes in converting the front-end's C++ code to D. Anyway, that's the reason I wrote them - for some sort of intellisense support. I don't think dparser.d is complete, but dlexer.d should be fine (albeit slightly out of date). I'll check em out this weekend and see what I can hack up for you.

If it is only for me better dont ;] 'soon' for me usualy is not very soon ;] Anyway. What about an example how to use them? I am not even sure what is the difference between lexer and parser (I don't even know the meaning of these words (2lazy 2 look in the dictionary:)) but I know I need one (or both) of them to make intellisence...
Sep 04 2005
parent reply James Dunne <james.jdunne gmail.com> writes:
bobef wrote:
 In article <dffet0$2ln4$1 digitaldaemon.com>, James Dunne says...
 
bobef wrote:

I've seen these files in the dsource/bindings project. dparser.d dlexer.d... I
am wondering (because I plan to start writing intellisense support for akIDE
soon) has anyone used these and are there any examples?

I wrote them. They're slightly out of date in parsing D code as of the latest compiler revision, but could probably easily be updated to the latest code. Some very small changes in converting the front-end's C++ code to D. Anyway, that's the reason I wrote them - for some sort of intellisense support. I don't think dparser.d is complete, but dlexer.d should be fine (albeit slightly out of date). I'll check em out this weekend and see what I can hack up for you.

If it is only for me better dont ;] 'soon' for me usualy is not very soon ;] Anyway. What about an example how to use them? I am not even sure what is the difference between lexer and parser (I don't even know the meaning of these words (2lazy 2 look in the dictionary:)) but I know I need one (or both) of them to make intellisence...

tokens, such as identifier, left-shift, double-equals, etc. It filters out the white-space and reads in numeric literals (responsible for interpreting binary numbers, octal numbers, decimal numbers, hex numbers, etc.), among other things (counting lines, skipping comments). The parser's job is to take the lexer's raw token stream and convert it into valid language elements: such as expressions, statements, declarations, etc. It is from here that you probably want to start with intellisense, since you'll have the full tree of all classes, functions, interfaces, structs, typedefs, aliases, variables, expressions, etc. from the module, including all their relevant attributes and properties. Hope this helped!
Sep 05 2005
parent bobef <bobef_member pathlink.com> writes:
In article <dfgv9m$pr2$1 digitaldaemon.com>, James Dunne says...
bobef wrote:
 In article <dffet0$2ln4$1 digitaldaemon.com>, James Dunne says...
 
bobef wrote:

I've seen these files in the dsource/bindings project. dparser.d dlexer.d... I
am wondering (because I plan to start writing intellisense support for akIDE
soon) has anyone used these and are there any examples?

I wrote them. They're slightly out of date in parsing D code as of the latest compiler revision, but could probably easily be updated to the latest code. Some very small changes in converting the front-end's C++ code to D. Anyway, that's the reason I wrote them - for some sort of intellisense support. I don't think dparser.d is complete, but dlexer.d should be fine (albeit slightly out of date). I'll check em out this weekend and see what I can hack up for you.

If it is only for me better dont ;] 'soon' for me usualy is not very soon ;] Anyway. What about an example how to use them? I am not even sure what is the difference between lexer and parser (I don't even know the meaning of these words (2lazy 2 look in the dictionary:)) but I know I need one (or both) of them to make intellisence...

tokens, such as identifier, left-shift, double-equals, etc. It filters out the white-space and reads in numeric literals (responsible for interpreting binary numbers, octal numbers, decimal numbers, hex numbers, etc.), among other things (counting lines, skipping comments). The parser's job is to take the lexer's raw token stream and convert it into valid language elements: such as expressions, statements, declarations, etc. It is from here that you probably want to start with intellisense, since you'll have the full tree of all classes, functions, interfaces, structs, typedefs, aliases, variables, expressions, etc. from the module, including all their relevant attributes and properties. Hope this helped!

Yes. Very much. Thank you.
Sep 05 2005