digitalmars.D - Complete D grammar
- Trass3r <un known.com> Mar 28 2011
- Kagamin <spam here.lot> Mar 28 2011
- David Nadlinger <see klickverbot.at> Mar 28 2011
- Trass3r <un known.com> Mar 28 2011
- Bruno Medeiros <brunodomedeiros+spam com.gmail> Mar 29 2011
- Ellery Newcomer <ellery-newcomer utulsa.edu> Apr 06 2011
- Bruno Medeiros <brunodomedeiros+spam com.gmail> Apr 13 2011
- Walter Bright <newshound2 digitalmars.com> Mar 28 2011
- Rainer Schuetze <r.sagitario gmx.de> Mar 28 2011
- Walter Bright <newshound2 digitalmars.com> Mar 29 2011
- Rainer Schuetze <r.sagitario gmx.de> Mar 29 2011
- Walter Bright <newshound2 digitalmars.com> Mar 30 2011
- Rainer Schuetze <r.sagitario gmx.de> Mar 30 2011
- Trass3r <un known.com> Mar 29 2011
- Trass3r <un known.com> Mar 29 2011
- Rainer Schuetze <r.sagitario gmx.de> Mar 29 2011
- Trass3r <un known.com> Mar 29 2011
- Rainer Schuetze <r.sagitario gmx.de> Mar 29 2011
- Trass3r <un known.com> Mar 30 2011
- Bruno Medeiros <brunodomedeiros+spam com.gmail> Apr 04 2011
- Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> Apr 04 2011
- Bruno Medeiros <brunodomedeiros+spam com.gmail> Apr 20 2011
- Jacob Carlborg <doob me.com> Apr 20 2011
- "Nick Sabalausky" <a a.a> Mar 28 2011
- Luca Boasso <luke.boasso gmail.com> Mar 28 2011
- Trass3r <un known.com> Mar 28 2011
- Luca Boasso <luke.boasso gmail.com> Mar 28 2011
- Luca Boasso <luke.boasso gmail.com> Mar 28 2011
- Jason <j.e.aten gmail.com> Apr 03 2011
- =?UTF-8?B?QWxla3NhbmRhciBSdcW+acSNacSH?= <ruzicic.aleksandar gmail.com> Apr 04 2011
- "Steven Schveighoffer" <schveiguy yahoo.com> Apr 04 2011
- =?UTF-8?B?QWxla3NhbmRhciBSdcW+acSNacSH?= <ruzicic.aleksandar gmail.com> Apr 04 2011
- =?UTF-8?B?QWxla3NhbmRhciBSdcW+acSNacSH?= <ruzicic.aleksandar gmail.com> Apr 04 2011
- Luca Boasso <luke.boasso gmail.com> Apr 06 2011
- "Steven Schveighoffer" <schveiguy yahoo.com> Apr 20 2011
- spir <denis.spir gmail.com> Mar 29 2011
- spir <denis.spir gmail.com> Mar 30 2011
Didn't someone here have a complete D grammar? I vaguely remember that there is at least a D1 one buried somewhere.
Mar 28 2011
Trass3r Wrote:Didn't someone here have a complete D grammar? I vaguely remember that there is at least a D1 one buried somewhere.
huh? http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.announce&article_id=20299
Mar 28 2011
On 3/28/11 5:17 PM, Kagamin wrote:Trass3r Wrote:Didn't someone here have a complete D grammar? I vaguely remember that there is at least a D1 one buried somewhere.
huh? http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.announce&article_id=20299
Nope, Trass3r is talking about a grammar for the D language itself, whereas Goldie is a parser generator for D (which generates parsers for a given grammar). Unfortunately, I only remember someone working on one (and filing some related bugs), I lost the details as well… David
Mar 28 2011
David Nadlinger Wrote:Nope, Trass3r is talking about a grammar for the D language itself,
Exactly, I'm pretty sure that some guy once stated on IRC or somewhere he had a complete D1 grammar.
Mar 28 2011
On 28/03/2011 18:19, Luca Boasso wrote:You can find an ANTLR grammar for D v1 at http://www.dsource.org/projects/antlrd/browser/toys/v3d/parsed.g (by Ellery Newcomer) The syntax is similar to EBNF, check the ANTLR documentation for details. I hope this might help you. Luca Boasso
Indeed, Ellery is (AFAIK) the only one who has worked on ANLTR-based D parser recently and possibly got any significant work done in that. It's definitely worth looking at his work and see if anything can be reused. However, according to his most recent message on the subject: " Been pretty busy this semester, so I haven't been doing much. But the bottom line is, yes I have working antlr grammars for D1 and D2 if you don't mind 1) they're slow 2) they're tied to a hacked-out version of the netbeans fork of ANTLR2 3) they're tied to some custom java code 4) I haven't been keeping the tree grammars so up to date " http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=122803 ...it may not provide much of head-start. -- Bruno Medeiros - Software Engineer
Mar 29 2011
On 03/29/2011 07:53 AM, Bruno Medeiros wrote:On 28/03/2011 18:19, Luca Boasso wrote:You can find an ANTLR grammar for D v1 at http://www.dsource.org/projects/antlrd/browser/toys/v3d/parsed.g (by Ellery Newcomer)
I never should have uploaded that file.Indeed, Ellery is (AFAIK) the only one who has worked on ANLTR-based D parser recently and possibly got any significant work done in that. It's definitely worth looking at his work and see if anything can be reused. However, according to his most recent message on the subject: ...it may not provide much of head-start.
Been working on them for 3 years now. I should hope it would. As it is, I think I'm done with D and I probably won't be continuing that project, so if anyone wants to do anything further with it, they're welcome to it. https://bitbucket.org/ariovistus/d-jvm-cc I also have some netbeans plugin code somewhere. If memory serves, it can do syntax highlighting. If anyone wants it.
Apr 06 2011
On 06/04/2011 19:05, Ellery Newcomer wrote:On 03/29/2011 07:53 AM, Bruno Medeiros wrote:On 28/03/2011 18:19, Luca Boasso wrote:You can find an ANTLR grammar for D v1 at http://www.dsource.org/projects/antlrd/browser/toys/v3d/parsed.g (by Ellery Newcomer)
I never should have uploaded that file.Indeed, Ellery is (AFAIK) the only one who has worked on ANLTR-based D parser recently and possibly got any significant work done in that. It's definitely worth looking at his work and see if anything can be reused. However, according to his most recent message on the subject: ...it may not provide much of head-start.
Been working on them for 3 years now. I should hope it would. As it is, I think I'm done with D and I probably won't be continuing that project, so if anyone wants to do anything further with it, they're welcome to it. https://bitbucket.org/ariovistus/d-jvm-cc I also have some netbeans plugin code somewhere. If memory serves, it can do syntax highlighting. If anyone wants it.
Thanks, it's worth taking a look for sure. BTW, what is that Netbeans fork of antlr2, why was it created? I tried googling but couldn't find any info quickly. -- Bruno Medeiros - Software Engineer
Apr 13 2011
On 3/28/2011 9:02 AM, Luca Boasso wrote:A complete D grammar is one of the objectives of my GSOC 2011 ANTLR proposal, if I got accepted you will have one :)
The complete grammar should be part of the D spec. Please post any errors/fixes to the existing one to bugzilla!
Mar 28 2011
Having written a D2 parser a few month ago in the hope it will be helpful to Visual D (just finds it way into the plugin right now), I've noticed quite some inaccuracies in the "official" grammar on the website. Some of these are probably already in bugzilla, some of them might be personal taste and should be discussed, though. I've set up a comparison with some notes here: http://www.dsource.org/projects/visuald/wiki/GrammarComparison The parser was written manually, so the proposed grammar was not directly used to generate the parser and might still contain errors. I've extracted the website grammar using some combination of scripts from the ddoc sources, so if there is interest, I can dig them up... Rainer Walter Bright wrote:On 3/28/2011 9:02 AM, Luca Boasso wrote:A complete D grammar is one of the objectives of my GSOC 2011 ANTLR proposal, if I got accepted you will have one :)
The complete grammar should be part of the D spec. Please post any errors/fixes to the existing one to bugzilla!
Mar 28 2011
On 3/28/2011 11:46 PM, Rainer Schuetze wrote:Having written a D2 parser a few month ago in the hope it will be helpful to Visual D (just finds it way into the plugin right now), I've noticed quite some inaccuracies in the "official" grammar on the website. Some of these are probably already in bugzilla, some of them might be personal taste and should be discussed, though. I've set up a comparison with some notes here: http://www.dsource.org/projects/visuald/wiki/GrammarComparison The parser was written manually, so the proposed grammar was not directly used to generate the parser and might still contain errors. I've extracted the website grammar using some combination of scripts from the ddoc sources, so if there is interest, I can dig them up...
I thought I fixed the grammar issues listed in Bugzilla. Could you please add a bugzilla entry for your wiki notes?
Mar 29 2011
Walter Bright wrote:On 3/28/2011 11:46 PM, Rainer Schuetze wrote:I've set up a comparison with some notes here: http://www.dsource.org/projects/visuald/wiki/GrammarComparison
I thought I fixed the grammar issues listed in Bugzilla.
The comparison is from the time I wrote the parser, so it is a few month old. Checking the latest docs, there are already quite a number of issues fixed, but also some new have crept in. I'll redo the comparison with the latest extracted grammar...Could you please add a bugzilla entry for your wiki notes?
I hope you mean an entry with a link to the wiki. The comparison itself might a bit too large itself for bugzilla (html is larger than 800kB) ;-)
Mar 29 2011
On 3/29/2011 2:48 PM, Rainer Schuetze wrote:Could you please add a bugzilla entry for your wiki notes?
I hope you mean an entry with a link to the wiki. The comparison itself might a bit too large itself for bugzilla (html is larger than 800kB) ;-)
A link is fine.
Mar 30 2011
Walter Bright wrote:On 3/29/2011 2:48 PM, Rainer Schuetze wrote:Could you please add a bugzilla entry for your wiki notes?
I hope you mean an entry with a link to the wiki. The comparison itself might a bit too large itself for bugzilla (html is larger than 800kB) ;-)
A link is fine.
Done now: http://d.puremagic.com/issues/show_bug.cgi?id=5803 An update of the chart involves a lot of manual editing to keep comments, but the size of the tables makes every editor so slow, it is really painful. So I'm not sure I'll find the time to update it soon, I think I need an alternative way to do it first.
Mar 30 2011
Rainer Schuetze wrote:I've extracted the website grammar using some combination of scripts from the ddoc sources, so if there is interest, I can dig them up...
Yep, please make them publicly available so they don't get lost. Though I think we should have an extra official page with the complete grammar in addition to the widespread snippets anyway.
Mar 29 2011
spir Wrote:Sure, and this grammar should be the actual startpoint of actual parsers, so that we know it's correct ;-) (else, it's just some more blowing in the wind)
Exactly!
Mar 29 2011
Trass3r wrote:Rainer Schuetze wrote:I've extracted the website grammar using some combination of scripts from the ddoc sources, so if there is interest, I can dig them up...
Yep, please make them publicly available so they don't get lost. Though I think we should have an extra official page with the complete grammar in addition to the widespread snippets anyway.
I've uploaded the script and the grammar used for the comparison (a few month old) and the grammar from the current doc sources to http://www.dsource.org/projects/visuald/browser/grammar See the header of gen_grammar.sh for a very short description what to do to run the generation.
Mar 29 2011
Rainer Schuetze Wrote:I've set up a comparison with some notes here: http://www.dsource.org/projects/visuald/wiki/GrammarComparison
Very nice comparison style. What would be an appropriate way to discuss grammar changes? I think many things should be simplified/clarified. For example, isn't AutoDeclaration already covered by Decl -> StorageClasses Decl and so on? Also there are 3 different instances of mixin: MixinExpression, MixinStatement and MixinDeclaration. Even though they all come down to the same thing. Modifiers like shared are repeated, e.g. in BasicType, Attribute, TypeSpecialization. Also your proposed TypeWithModifier somewhat replicates parts of BasicType (just without the parentheses)
Mar 29 2011
Trass3r wrote:Rainer Schuetze Wrote:I've set up a comparison with some notes here: http://www.dsource.org/projects/visuald/wiki/GrammarComparison
Very nice comparison style. What would be an appropriate way to discuss grammar changes? I think many things should be simplified/clarified.
I'd welcome this. I see a few options, but none is currently perfect: - in a wiki. both dsource and wiki4d don't seem to have discussion pages, though. I'm not sure the comparison tables can be converted to something maintainable - it's currently very verbose html. - here on the newsgroup. this would probably have the widest audience, but also might easily get lost. maybe with keeping track of ideas/results in wiki4d. - in bugzilla. this might get spread into multiple entries causing loss of the overview of the overall grammar.For example, isn't AutoDeclaration already covered by Decl -> StorageClasses Decl and so on? Also there are 3 different instances of mixin: MixinExpression, MixinStatement and MixinDeclaration. Even though they all come down to the same thing. Modifiers like shared are repeated, e.g. in BasicType, Attribute, TypeSpecialization. Also your proposed TypeWithModifier somewhat replicates parts of BasicType (just without the parentheses)
I think, the different mixin variants are ok, because you might want to generate different AST for these. But the confusion of const/shared/immutable etc in Attribute,StorageClass,Types,etc causes a lot of headaches.
Mar 29 2011
I just forked the d-programming-language.org repo on github to fix some grammar errors as a start. I think results should directly go into such a fork so a pull request can be issued later and everything might be merged in at once. Will open a new thread for it.
Mar 30 2011
On 29/03/2011 07:46, Rainer Schuetze wrote:Having written a D2 parser a few month ago in the hope it will be helpful to Visual D (just finds it way into the plugin right now), I've noticed quite some inaccuracies in the "official" grammar on the website. Some of these are probably already in bugzilla, some of them might be personal taste and should be discussed, though. I've set up a comparison with some notes here: http://www.dsource.org/projects/visuald/wiki/GrammarComparison The parser was written manually, so the proposed grammar was not directly used to generate the parser and might still contain errors. I've extracted the website grammar using some combination of scripts from the ddoc sources, so if there is interest, I can dig them up... Rainer
BTW, I wanna thank for this work (current and upcoming), it is likely useful for other IDE projects as well ;) -- Bruno Medeiros - Software Engineer
Apr 04 2011
On 4/4/11 1:51 PM, Aleksandar Ružičić wrote:On Mon, Apr 4, 2011 at 8:11 PM, Bruno Medeiros <brunodomedeiros+spam com.gmail> wrote:BTW, I wanna thank for this work (current and upcoming), it is likely useful for other IDE projects as well ;)
Ditto. I have started work on D language support for NetBeans (IMHO it's MUCH better editor than Eclipse) and started to write grammar for javaCC, but since there is ongoing work on ANTLR parser I'll wait for that to be done and integrate it into plugin I'm working on. :)
Aleksandar, would you be willing to work with the student working on ANTLR as a mentor? Please let me know and I'll send details about applying as a mentor. Andrei
Apr 04 2011
On 04/04/2011 20:19, Aleksandar Ružičić wrote:On Mon, Apr 4, 2011 at 9:05 PM, Steven Schveighoffer <schveiguy yahoo.com> wrote:On Mon, 04 Apr 2011 14:51:02 -0400, Aleksandar Ružičić <ruzicic.aleksandar gmail.com> wrote:On Mon, Apr 4, 2011 at 8:11 PM, Bruno Medeiros <brunodomedeiros+spam com.gmail> wrote:BTW, I wanna thank for this work (current and upcoming), it is likely useful for other IDE projects as well ;)
Ditto. I have started work on D language support for NetBeans (IMHO it's MUCH better editor than Eclipse) and started to write grammar for javaCC, but since there is ongoing work on ANTLR parser I'll wait for that to be done and integrate it into plugin I'm working on. :)
I would absolutely love NetBeans support for D. -Steve
On my side I'm surprised NetBeans hasn't faded into obscurity, but I haven't tried it for a long, long time, so this isn't really an informed opinion. So why is NetBeans much better editor than Eclipse? (I'm not just looking for a discussion, I'm curious about these issues as it might be something that can be taken into consideration for DDT development)Me too, so when I realized that no such project exists I've decided to write it my self (after all I write Java for few year now so I feel comfortable with it) but I knew that writing parser will take me most time and effort so it's great to see someone decided to write parser/grammar for ANTLR which can be used by other projects (in that way few IDEs could share same parser and focus on other parts of an IDE).
You can get started right away, no? The Descent parser has been isolated into its own bundle, which has no dependencies on Eclipse code or other third-party libraries (other than perhaps some assertion code, but all superficial dependencies that can be easily replaced). The DDT DTool bundle (http://code.google.com/a/eclipselabs.org/p/ddt/source/browse/#hg%2Forg dsource.ddt.dtool), which adds its own AST and semantic functionality like find-ref, code completion, etc., is also designed to be independent of Eclipse code, so you could use that as well, integrate it to NetBeans. In practice there is a non-trivial dependency here, but I plan to remove it soon, hopefully. -- Bruno Medeiros - Software Engineer
Apr 20 2011
On 2011-04-20 17:32, Steven Schveighoffer wrote:My biggest pet-peeve with netbeans is when I want to change a value to a string literal, I highlight what I want to change, then type a quote to start typing the literal, the freaking thing instead just puts quotes around the highlighted text (which means I now have to re-highlight the text and press delete first). I've never once *used* this feature, but it gets in my way all the time (anyone know how to disable that?). -Steve
I use that feature all the time in other text editors. -- /Jacob Carlborg
Apr 20 2011
"David Nadlinger" <see klickverbot.at> wrote in message news:imq92m$1ru0$1 digitalmars.com...On 3/28/11 5:17 PM, Kagamin wrote:Trass3r Wrote:Didn't someone here have a complete D grammar? I vaguely remember that there is at least a D1 one buried somewhere.
huh? http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.announce&article_id=20299
Like Trass3r said, that's lexing-only right now.Nope, Trass3r is talking about a grammar for the D language itself, whereas Goldie is a parser generator for D (which generates parsers for a given grammar).
Technically speaking, Goldie doesn't actually generate parsers, it has one grammar-independent parser that it uses for all grammars (fairly characteristic for LALR(1), AIUI). Although, in the static-style it does make a slight custom modification to the parser and lexer so that each token emitted is properly typed. Which I suppose amounts to six-of-one, half-dozen-of-the-other...Unfortunately, I only remember someone working on one (and filing some related bugs), I lost the details as well.
Yea, I remember that too. Someone took all the BNF sections from D's docs on digitalmars.com, put them together, and filled in some missing/erroneous parts. Maybe it's on wiki4d?
Mar 28 2011
Nick Sabalausky wrote: ...Yea, I remember that too. Someone took all the BNF sections from D's docs on digitalmars.com, put them together, and filled in some missing/erroneous parts. Maybe it's on wiki4d?
Not sure if this is what you meant, but Jascha Wetzel had made a D grammar used by seatd / APaGeD: http://seatd.mainia.de/grammar.html
Mar 29 2011
A complete D grammar is one of the objectives of my GSOC 2011 ANTLR proposal, if I got accepted you will have one :) On 3/28/11, David Nadlinger <see klickverbot.at> wrote:On 3/28/11 5:17 PM, Kagamin wrote:Trass3r Wrote:Didn't someone here have a complete D grammar? I vaguely remember that there is at least a D1 one buried somewhere.
huh? http://www.digitalmars.com/webnews/newsgroups.php?art_group=3Ddigitalmar=
Nope, Trass3r is talking about a grammar for the D language itself, whereas Goldie is a parser generator for D (which generates parsers for a given grammar). Unfortunately, I only remember someone working on one (and filing some related bugs), I lost the details as well=85 David
Mar 28 2011
huh? http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.announce&article_id=20299
The grammar offered there is lexing-only.
Mar 28 2011
You can find an ANTLR grammar for D v1 at http://www.dsource.org/projects/antlrd/browser/toys/v3d/parsed.g (by Ellery Newcomer) The syntax is similar to EBNF, check the ANTLR documentation for details. I hope this might help you. Luca Boasso On 3/28/11, Trass3r <un known.com> wrote:David Nadlinger Wrote:Nope, Trass3r is talking about a grammar for the D language itself,
Exactly, I'm pretty sure that some guy once stated on IRC or somewhere he had a complete D1 grammar.
Mar 28 2011
On 3/28/11, Walter Bright <newshound2 digitalmars.com> wrote:On 3/28/2011 9:02 AM, Luca Boasso wrote:A complete D grammar is one of the objectives of my GSOC 2011 ANTLR proposal, if I got accepted you will have one :)
The complete grammar should be part of the D spec. Please post any errors/fixes to the existing one to bugzilla!
Sorry for the inaccuracy, I meant a complete grammar up-to-date with the current D spec. that can be used by the ANTLR parser generator.
Mar 28 2011
On Mon, 28 Mar 2011 09:02:45 -0700, Luca Boasso wrote:A complete D grammar is one of the objectives of my GSOC 2011 ANTLR proposal, if I got accepted you will have one :)
Luca - You might want to be aware that it appears that the dmd2 front end uses Pratt parsing rather than being based on EBNF. That being the case, it might be much easier (not to say more useful) to specify the language semantics in a more compatible format than EBNF. If you've had sophmore level CS theory, then Pratt's original paper is very readable, and highly recommended. Best, Jason http://hall.org.ua/halls/wizzard/pdf/Vaughan.Pratt.TDOP.pdf ;;; Pratt, Vaughan R., ``Top Down Operator Precedence,'' ;;; ACM Symposium on Principles of Programming Languages ;;; Boston, MA; October, 1973.
Apr 03 2011
On Mon, Apr 4, 2011 at 8:11 PM, Bruno Medeiros <brunodomedeiros+spam com.gmail> wrote:BTW, I wanna thank for this work (current and upcoming), it is likely useful for other IDE projects as well ;)
Ditto. I have started work on D language support for NetBeans (IMHO it's MUCH better editor than Eclipse) and started to write grammar for javaCC, but since there is ongoing work on ANTLR parser I'll wait for that to be done and integrate it into plugin I'm working on. :)
Apr 04 2011
On Mon, 04 Apr 2011 14:51:02 -0400, Aleksandar Ružičić <ruzicic.aleksandar gmail.com> wrote:On Mon, Apr 4, 2011 at 8:11 PM, Bruno Medeiros <brunodomedeiros+spam com.gmail> wrote:BTW, I wanna thank for this work (current and upcoming), it is likely useful for other IDE projects as well ;)
Ditto. I have started work on D language support for NetBeans (IMHO it's MUCH better editor than Eclipse) and started to write grammar for javaCC, but since there is ongoing work on ANTLR parser I'll wait for that to be done and integrate it into plugin I'm working on. :)
I would absolutely love NetBeans support for D. -Steve
Apr 04 2011
On Mon, Apr 4, 2011 at 9:05 PM, Steven Schveighoffer <schveiguy yahoo.com> wrote:On Mon, 04 Apr 2011 14:51:02 -0400, Aleksandar Ru=C5=BEi=C4=8Di=C4=87 <ruzicic.aleksandar gmail.com> wrote:On Mon, Apr 4, 2011 at 8:11 PM, Bruno Medeiros <brunodomedeiros+spam com.gmail> wrote:BTW, I wanna thank for this work (current and upcoming), it is likely useful for other IDE projects as well ;)
Ditto. I have started work on D language support for NetBeans (IMHO it's MUCH better editor than Eclipse) and started to write grammar for javaCC, but since there is ongoing work on ANTLR parser I'll wait for that to be done and integrate it into plugin I'm working on. :)
I would absolutely love NetBeans support for D. -Steve
Me too, so when I realized that no such project exists I've decided to write it my self (after all I write Java for few year now so I feel comfortable with it) but I knew that writing parser will take me most time and effort so it's great to see someone decided to write parser/grammar for ANTLR which can be used by other projects (in that way few IDEs could share same parser and focus on other parts of an IDE).
Apr 04 2011
On Mon, Apr 4, 2011 at 8:58 PM, Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote:Aleksandar, would you be willing to work with the student working on ANTLR as a mentor? Please let me know and I'll send details about applying as a mentor.
Well, I'm also a student :) So I'm not sure if I really can be a mentor (23yrs old), and I have never worked with ANTLR before but language theory (grammars, parsers and all that stuff) was always my favorite subject so I know a bit about all that. I'm willing to help in any way I can..
Apr 04 2011
Great! It can be a good start for my Google Summer of Code Proposal [ANTLR and Java based D parser for IDE usage]. I was looking for this code Thank you On 4/6/11, Ellery Newcomer <ellery-newcomer utulsa.edu> wrote:On 03/29/2011 07:53 AM, Bruno Medeiros wrote:On 28/03/2011 18:19, Luca Boasso wrote:You can find an ANTLR grammar for D v1 at http://www.dsource.org/projects/antlrd/browser/toys/v3d/parsed.g (by Ellery Newcomer)
I never should have uploaded that file.Indeed, Ellery is (AFAIK) the only one who has worked on ANLTR-based D parser recently and possibly got any significant work done in that. It's definitely worth looking at his work and see if anything can be reused. However, according to his most recent message on the subject: ...it may not provide much of head-start.
Been working on them for 3 years now. I should hope it would. As it is, I think I'm done with D and I probably won't be continuing that project, so if anyone wants to do anything further with it, they're welcome to it. https://bitbucket.org/ariovistus/d-jvm-cc I also have some netbeans plugin code somewhere. If memory serves, it can do syntax highlighting. If anyone wants it.
Apr 06 2011
On Wed, 20 Apr 2011 10:40:22 -0400, Bruno Medeiros <brunodomedeiros+spam com.gmail> wrote:On 04/04/2011 20:19, Aleksandar Ružičić wrote:On Mon, Apr 4, 2011 at 9:05 PM, Steven Schveighoffer <schveiguy yahoo.com> wrote:On Mon, 04 Apr 2011 14:51:02 -0400, Aleksandar Ružičić <ruzicic.aleksandar gmail.com> wrote:On Mon, Apr 4, 2011 at 8:11 PM, Bruno Medeiros <brunodomedeiros+spam com.gmail> wrote:BTW, I wanna thank for this work (current and upcoming), it is
useful for other IDE projects as well ;)
Ditto. I have started work on D language support for NetBeans (IMHO it's
better editor than Eclipse) and started to write grammar for
but since there is ongoing work on ANTLR parser I'll wait for
be done and integrate it into plugin I'm working on. :)
I would absolutely love NetBeans support for D. -Steve
On my side I'm surprised NetBeans hasn't faded into obscurity, but I haven't tried it for a long, long time, so this isn't really an informed opinion. So why is NetBeans much better editor than Eclipse? (I'm not just looking for a discussion, I'm curious about these issues as it might be something that can be taken into consideration for DDT development)
I don't use eclipse. I use netbeans. For me, it's installing a additional language support vs. installing another IDE. Otherwise, I'd be neutral on the subject. I'm not a huge IDE guy, I just have netbeans installed because they support PHP w/ server-side debugging. But I've gotten used to netbeans and their editor. So I would probably feel more comfortable with a netbeans version of D than an eclipse version. As for "why is it better"? I have no clue, I don't use eclipse. (I realize this wasn't addressed at me, but I thought I'd just state my opinion or lack thereof) Don't know if eclipse has this or not, but probably the coolest feature in netbeans' editor is the ability to highlight a block of text and "move" it around using the keyboard (shift-alt-arrow) and copy it using the keyboard (shift-ctrl-arrow). I find myself trying to do this with other editors all the time now. My biggest pet-peeve with netbeans is when I want to change a value to a string literal, I highlight what I want to change, then type a quote to start typing the literal, the freaking thing instead just puts quotes around the highlighted text (which means I now have to re-highlight the text and press delete first). I've never once *used* this feature, but it gets in my way all the time (anyone know how to disable that?). -Steve
Apr 20 2011
On 03/29/2011 01:02 PM, Trass3r wrote:Rainer Schuetze wrote:I've extracted the website grammar using some combination of scripts from the ddoc sources, so if there is interest, I can dig them up...
Yep, please make them publicly available so they don't get lost. Though I think we should have an extra official page with the complete grammar in addition to the widespread snippets anyway.
Sure, and this grammar should be the actual startpoint of actual parsers, so that we know it's correct ;-) (else, it's just some more blowing in the wind) Denis -- _________________ vita es estrany spir.wikidot.com
Mar 29 2011
On 03/30/2011 08:40 AM, Rainer Schuetze wrote:What would be an appropriate way to discuss grammar changes? I think many things should be simplified/clarified.
I'd welcome this. I see a few options, but none is currently perfect: - in a wiki. both dsource and wiki4d don't seem to have discussion pages, though. I'm not sure the comparison tables can be converted to something maintainable - it's currently very verbose html. - here on the newsgroup. this would probably have the widest audience, but also might easily get lost. maybe with keeping track of ideas/results in wiki4d. - in bugzilla. this might get spread into multiple entries causing loss of the overview of the overall grammar.
I'd vote for wiki + newsgroup. Anyway, if you just put it on a wiki page and announce it here, this would probably launch thread that would feed the page back, hopefully. Denis -- _________________ vita es estrany spir.wikidot.com
Mar 30 2011









Bruno Medeiros <brunodomedeiros+spam com.gmail> 