September 03, 2005
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?


September 04, 2005
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.
September 04, 2005
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...


September 05, 2005
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...
> 
> 
A lexer parses the actual text of the source code, creating a list of 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!
September 05, 2005
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...
>> 
>> 
>A lexer parses the actual text of the source code, creating a list of 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.


Top | Discussion index | About this forum | D home