digitalmars.D - bindings project/dparser,dlexer
- bobef (3/3) Sep 03 2005 I've seen these files in the dsource/bindings project. dparser.d dlexer....
- James Dunne (9/14) Sep 04 2005 I wrote them. They're slightly out of date in parsing D code as of the
- bobef (6/20) Sep 04 2005 If it is only for me better dont ;] 'soon' for me usualy is not very soo...
- James Dunne (13/41) Sep 05 2005 A lexer parses the actual text of the source code, creating a list of
- bobef (2/43) Sep 05 2005 Yes. Very much. Thank you.
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
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.
Sep 04 2005
In article <dffet0$2ln4$1 digitaldaemon.com>, James Dunne says...bobef wrote: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...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.
Sep 04 2005
bobef wrote:In article <dffet0$2ln4$1 digitaldaemon.com>, James Dunne says...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!bobef wrote: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...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.
Sep 05 2005
In article <dfgv9m$pr2$1 digitaldaemon.com>, James Dunne says...bobef wrote:Yes. Very much. Thank you.In article <dffet0$2ln4$1 digitaldaemon.com>, James Dunne says...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!bobef wrote: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...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.
Sep 05 2005