Re: BNF grammar for D?

2015-01-08 Thread Bruno Medeiros via Digitalmars-d
On 17/12/2014 17:19, Kingsley wrote: Secondly - how active it the development of DDT - does it keep up with the D2 releases. Yes, it keeps up, and I plan to keep that up for the foreseeable future. (Since language grammar changes are fairly uncommon, and easy to implement when they happen).

Re: BNF grammar for D?

2015-01-08 Thread Bruno Medeiros via Digitalmars-d
On 21/12/2014 00:34, Kingsley wrote: On Friday, 19 December 2014 at 02:53:02 UTC, Rikki Cattermole wrote: On 19/12/2014 10:19 a.m., Kingsley wrote: On Wednesday, 17 December 2014 at 21:05:05 UTC, Kingsley wrote: Hi Bruno, Thanks very much. I do have a couple of questions about DDT in

Re: BNF grammar for D?

2015-01-08 Thread Bruno Medeiros via Digitalmars-d
On 22/12/2014 11:44, Kingsley wrote: Hi Bruno - would be easy to return the list of tokens included for each node in the DeeParser? You can create an utility method that does that, if you have a DeeParseResult. The DeeParseResult has a 'tokenList' member, ordered by the source range. With

Re: BNF grammar for D?

2014-12-22 Thread Kingsley via Digitalmars-d
On Sunday, 21 December 2014 at 00:34:06 UTC, Kingsley wrote: On Friday, 19 December 2014 at 02:53:02 UTC, Rikki Cattermole wrote: On 19/12/2014 10:19 a.m., Kingsley wrote: On Wednesday, 17 December 2014 at 21:05:05 UTC, Kingsley wrote: Hi Bruno, Thanks very much. I do have a couple of

Re: BNF grammar for D?

2014-12-20 Thread Kingsley via Digitalmars-d
On Friday, 19 December 2014 at 02:53:02 UTC, Rikki Cattermole wrote: On 19/12/2014 10:19 a.m., Kingsley wrote: On Wednesday, 17 December 2014 at 21:05:05 UTC, Kingsley wrote: Hi Bruno, Thanks very much. I do have a couple of questions about DDT in relation to my plugin. Firstly - I'm not

Re: BNF grammar for D?

2014-12-18 Thread Kingsley via Digitalmars-d
On Wednesday, 17 December 2014 at 21:05:05 UTC, Kingsley wrote: Hi Bruno, Thanks very much. I do have a couple of questions about DDT in relation to my plugin. Firstly - I'm not too familiar with parsing/lexing but at the moment the Psi Structure I have implemented that comes from the

Re: BNF grammar for D?

2014-12-18 Thread Rikki Cattermole via Digitalmars-d
On 19/12/2014 10:19 a.m., Kingsley wrote: On Wednesday, 17 December 2014 at 21:05:05 UTC, Kingsley wrote: Hi Bruno, Thanks very much. I do have a couple of questions about DDT in relation to my plugin. Firstly - I'm not too familiar with parsing/lexing but at the moment the Psi Structure I

Re: BNF grammar for D?

2014-12-17 Thread Kingsley via Digitalmars-d
On Wednesday, 17 December 2014 at 03:03:59 UTC, Rikki Cattermole wrote: On 17/12/2014 1:35 p.m., Kingsley wrote: On Tuesday, 16 December 2014 at 23:25:02 UTC, Kingsley wrote: On Monday, 27 October 2014 at 22:40:20 UTC, landaire wrote: On Monday, 27 October 2014 at 22:35:16 UTC, Jeremy Powers

Re: BNF grammar for D?

2014-12-17 Thread Bruno Medeiros via Digitalmars-d
On 17/12/2014 09:13, Kingsley wrote: On Wednesday, 17 December 2014 at 03:03:59 UTC, Rikki Cattermole wrote: On 17/12/2014 1:35 p.m., Kingsley wrote: On Tuesday, 16 December 2014 at 23:25:02 UTC, Kingsley wrote: On Monday, 27 October 2014 at 22:40:20 UTC, landaire wrote: On Monday, 27

Re: BNF grammar for D?

2014-12-17 Thread Kingsley via Digitalmars-d
On Wednesday, 17 December 2014 at 12:31:32 UTC, Bruno Medeiros wrote: On 17/12/2014 09:13, Kingsley wrote: On Wednesday, 17 December 2014 at 03:03:59 UTC, Rikki Cattermole wrote: On 17/12/2014 1:35 p.m., Kingsley wrote: On Tuesday, 16 December 2014 at 23:25:02 UTC, Kingsley wrote: On Monday,

Re: BNF grammar for D?

2014-12-17 Thread Kingsley via Digitalmars-d
Hi Bruno, Thanks very much. I do have a couple of questions about DDT in relation to my plugin. Firstly - I'm not too familiar with parsing/lexing but at the moment the Psi Structure I have implemented that comes from the DDT parser/lexer is not in any kind of hierarchy. All the

Re: BNF grammar for D?

2014-12-16 Thread Kingsley via Digitalmars-d
On Monday, 27 October 2014 at 22:40:20 UTC, landaire wrote: On Monday, 27 October 2014 at 22:35:16 UTC, Jeremy Powers via Digitalmars-d wrote: This looks eerily familiar... I took a stab at an Intellij plugin a long time ago, and happened to pick the same name:

Re: BNF grammar for D?

2014-12-16 Thread Kingsley via Digitalmars-d
On Tuesday, 16 December 2014 at 23:25:02 UTC, Kingsley wrote: On Monday, 27 October 2014 at 22:40:20 UTC, landaire wrote: On Monday, 27 October 2014 at 22:35:16 UTC, Jeremy Powers via Digitalmars-d wrote: This looks eerily familiar... I took a stab at an Intellij plugin a long time ago, and

Re: BNF grammar for D?

2014-12-16 Thread Rikki Cattermole via Digitalmars-d
On 17/12/2014 1:35 p.m., Kingsley wrote: On Tuesday, 16 December 2014 at 23:25:02 UTC, Kingsley wrote: On Monday, 27 October 2014 at 22:40:20 UTC, landaire wrote: On Monday, 27 October 2014 at 22:35:16 UTC, Jeremy Powers via Digitalmars-d wrote: This looks eerily familiar... I took a stab at

Re: BNF grammar for D?

2014-11-07 Thread Bruno Medeiros via Digitalmars-d
On 31/10/2014 12:02, Daniel Kozák via Digitalmars-d wrote: You can write intellij idea plugins with JDK 7 or even JDK 8, but that plugins will only work with IDEA running on same version of JDK. You must use same version for IDEA SDK and for IDEA itself. Currently IDEA and all plugins are

Re: BNF grammar for D?

2014-11-07 Thread Bruno Medeiros via Digitalmars-d
On 31/10/2014 12:16, Rikki Cattermole wrote: On 1/11/2014 12:35 a.m., Bruno Medeiros wrote: On 27/10/2014 22:35, Jeremy Powers via Digitalmars-d wrote: An interesting path to take for an intellij plugin would be to use his DCD/libdparse for all the heavy lifting, with the plugin just farming

Re: BNF grammar for D?

2014-11-07 Thread Rikki Cattermole via Digitalmars-d
On 8/11/2014 4:16 a.m., Bruno Medeiros wrote: On 31/10/2014 12:16, Rikki Cattermole wrote: On 1/11/2014 12:35 a.m., Bruno Medeiros wrote: On 27/10/2014 22:35, Jeremy Powers via Digitalmars-d wrote: An interesting path to take for an intellij plugin would be to use his DCD/libdparse for all

Re: BNF grammar for D?

2014-10-31 Thread Bruno Medeiros via Digitalmars-d
On 27/10/2014 22:53, landaire wrote: On Monday, 27 October 2014 at 22:43:55 UTC, Jeremy Powers via Digitalmars-d wrote: From my mucking about before, I think you'll get more mileage from using libdparse directly than trying to (re)implement a parser for the plugin. For one, you save yourself

Re: BNF grammar for D?

2014-10-31 Thread Bruno Medeiros via Digitalmars-d
On 27/10/2014 22:35, Jeremy Powers via Digitalmars-d wrote: An interesting path to take for an intellij plugin would be to use his DCD/libdparse for all the heavy lifting, with the plugin just farming out the work to external daemon process(es). That would avoid having yet another lexer/parser

Re: BNF grammar for D?

2014-10-31 Thread Bruno Medeiros via Digitalmars-d
On 27/10/2014 22:06, landaire wrote: I'm trying to make a plugin for IntelliJ IDEA to support D (https://github.com/landaire/intelliD is what I have now utilizing DDT's lexer) but a lot of what's required to add advanced features like code folding, code completion, etc. is generally

Re: BNF grammar for D?

2014-10-31 Thread Daniel Kozák via Digitalmars-d
V Fri, 31 Oct 2014 11:41:58 + Bruno Medeiros via Digitalmars-d digitalmars-d@puremagic.com napsáno: On 27/10/2014 22:06, landaire wrote: I'm trying to make a plugin for IntelliJ IDEA to support D (https://github.com/landaire/intelliD is what I have now utilizing DDT's lexer) but a lot

Re: BNF grammar for D?

2014-10-31 Thread Rikki Cattermole via Digitalmars-d
On 1/11/2014 12:35 a.m., Bruno Medeiros wrote: On 27/10/2014 22:35, Jeremy Powers via Digitalmars-d wrote: An interesting path to take for an intellij plugin would be to use his DCD/libdparse for all the heavy lifting, with the plugin just farming out the work to external daemon process(es).

BNF grammar for D?

2014-10-27 Thread landaire via Digitalmars-d
There have been similar questions asked on this forum before (most recent one in June with no result: http://forum.dlang.org/thread/cafmgiz8fyv2a+scqpqteyesfsybznfy--nsxl5rqnowwna4...@mail.gmail.com?page=1), but I was curious if anyone happens to have a BNF grammar for D laying around. I've

Re: BNF grammar for D?

2014-10-27 Thread Brian Schott via Digitalmars-d
On Monday, 27 October 2014 at 22:06:28 UTC, landaire wrote: I've searched all over and can't seem to find anything. There are links to my projects in that thread. https://github.com/Hackerpilot/libdparse should help. The doc comments for the parser tell you the grammar that they implement.

Re: BNF grammar for D?

2014-10-27 Thread Jeremy Powers via Digitalmars-d
(most recent one in June with no result: http://forum.dlang.org/thread/CAFMGiz8Fyv2A+ scqpqteyesfsybznfy--nsxl5rqnowwna4...@mail.gmail.com?page=1), but I was curious if anyone happens to have a BNF grammar for D laying around. I've searched all over and can't seem to find anything. I'm trying

Re: BNF grammar for D?

2014-10-27 Thread landaire via Digitalmars-d
On Monday, 27 October 2014 at 22:30:15 UTC, Brian Schott wrote: On Monday, 27 October 2014 at 22:06:28 UTC, landaire wrote: I've searched all over and can't seem to find anything. There are links to my projects in that thread. Sorry, what I meant was I couldn't find a BNF grammar :) I must

Re: BNF grammar for D?

2014-10-27 Thread Jeremy Powers via Digitalmars-d
There are links to my projects in that thread. https://github.com/ Hackerpilot/libdparse should help. The doc comments for the parser tell you the grammar that they implement. (The DGrammar project is based on these ddoc comments. This reminds me that I need to update it.) The official

Re: BNF grammar for D?

2014-10-27 Thread landaire via Digitalmars-d
On Monday, 27 October 2014 at 22:35:16 UTC, Jeremy Powers via Digitalmars-d wrote: This looks eerily familiar... I took a stab at an Intellij plugin a long time ago, and happened to pick the same name: https://github.com/elendel-/intelliD Been meaning to pick back up again, but haven't had

Re: BNF grammar for D?

2014-10-27 Thread landaire via Digitalmars-d
On Monday, 27 October 2014 at 22:43:55 UTC, Jeremy Powers via Digitalmars-d wrote: From my mucking about before, I think you'll get more mileage from using libdparse directly than trying to (re)implement a parser for the plugin. For one, you save yourself all the pain of fixing weird edge

Re: BNF grammar for D?

2014-10-27 Thread Jeremy Powers via Digitalmars-d
Glad to see you turned up here. I'm usually lurking around... I agree, but integrating something external with IntelliJ's platform seems like kind of a PITA. It looks like a lot of stuff makes heavy use of PSI trees (see: https://confluence.jetbrains.com/display/IDEADEV/

Re: BNF grammar for D?

2014-10-27 Thread Rikki Cattermole via Digitalmars-d
if anyone happens to have a BNF grammar for D laying around. I've searched all over and can't seem to find anything. I'm trying to make a plugin for IntelliJ IDEA to support D (https://github.com/landaire/intelliD is what I have now utilizing DDT's lexer) but a lot of what's required to add advanced

Re: BNF grammar for D?

2014-10-27 Thread landaire via Digitalmars-d
On Monday, 27 October 2014 at 23:17:14 UTC, Rikki Cattermole wrote: On Monday, 27 October 2014 at 22:06:28 UTC, landaire wrote: I've also been playing with getting a Intellij IDEA plugin up but it utilises DScanner. The only issue I'm having right now is for some reason its adding two elements

Re: BNF grammar for D?

2014-10-27 Thread Brian Schott via Digitalmars-d
On Monday, 27 October 2014 at 23:17:14 UTC, Rikki Cattermole wrote: Not to mention getting dscanner to output the correct line number/index ext. Fun times. If the lexer is giving the wrong line numbers for tokens, I want to know about it. Do you have a file that reproduces this issue?

Re: BNF grammar for D?

2014-10-27 Thread Rikki Cattermole via Digitalmars-d
On Monday, 27 October 2014 at 23:50:22 UTC, Brian Schott wrote: On Monday, 27 October 2014 at 23:17:14 UTC, Rikki Cattermole wrote: Not to mention getting dscanner to output the correct line number/index ext. Fun times. If the lexer is giving the wrong line numbers for tokens, I want to know

Re: BNF grammar for D?

2014-10-27 Thread Rikki Cattermole via Digitalmars-d
On Monday, 27 October 2014 at 23:27:20 UTC, landaire wrote: On Monday, 27 October 2014 at 23:17:14 UTC, Rikki Cattermole wrote: On Monday, 27 October 2014 at 22:06:28 UTC, landaire wrote: I've also been playing with getting a Intellij IDEA plugin up but it utilises DScanner. The only issue I'm

Re: BNF grammar for D?

2012-10-13 Thread Mehrdad
http://www.dsource.org/projects/visuald/wiki/GrammarComparison

Re: BNF grammar for D?

2012-10-13 Thread Manfred Nowak
Nick Sabalausky wrote: I'm pretty sure a correct D grammar is impossible in LALR(1) a^n b^n c^n is not LALR(1). But a^n b^n c^m is---if n and m are not dependent. I.e.: without specifying the restrictions for the allowed semantic checks there is no sureness for impossibilities. -manfred

Re: BNF grammar for D?

2012-10-13 Thread Rainer Schuetze
On 10/13/2012 8:02 AM, Mehrdad wrote: http://www.dsource.org/projects/visuald/wiki/GrammarComparison I haven't tried it for some time, but you can generate the text files from the current documentation with the script in http://www.dsource.org/projects/visuald/browser/grammar

BNF grammar for D?

2012-10-12 Thread Thomas Koch
Hi, cedet is a collection of emacs dev tools. I understand that it should be relatively easy to enhance the emacs support of D if one just provides cedet with a BNF grammar in a Bison like format, I cite: You should choose to use the Semantic lexer/grammer format for your language if it has

Re: BNF grammar for D?

2012-10-12 Thread Aziz K.
Hi, I can give you three options to choose from. There's the official grammar (don't know what the form is called): http://dlang.org/declaration.html A Parser Expression Grammar (PEG): https://github.com/PhilippeSigaud/Pegged/blob/master/pegged/examples/dparser.d The source code comments in

Re: BNF grammar for D?

2012-10-12 Thread Russel Winder
On Fri, 2012-10-12 at 15:11 +0200, Aziz K. wrote: Hi, I can give you three options to choose from. There's the official grammar (don't know what the form is called): http://dlang.org/declaration.html A Parser Expression Grammar (PEG):

Re: BNF grammar for D?

2012-10-12 Thread Paulo Pinto
On Friday, 12 October 2012 at 14:41:12 UTC, Russel Winder wrote: On Fri, 2012-10-12 at 15:11 +0200, Aziz K. wrote: Hi, I can give you three options to choose from. There's the official grammar (don't know what the form is called): http://dlang.org/declaration.html A Parser Expression

Re: BNF grammar for D?

2012-10-12 Thread Russel Winder
On Fri, 2012-10-12 at 16:59 +0200, Paulo Pinto wrote: […] My grammar knowledge is a bit rusty, but isn't EBNF only possible for LR(K) languages? Mentioning EBNF turns out to be a red herring. Indeed mention of BNF is a red herring also. What is actually needed is a Wisent grammar file.

Re: BNF grammar for D?

2012-10-12 Thread Nick Sabalausky
On Fri, 12 Oct 2012 16:16:10 +0100 Russel Winder rus...@winder.org.uk wrote: On Fri, 2012-10-12 at 16:59 +0200, Paulo Pinto wrote: […] My grammar knowledge is a bit rusty, but isn't EBNF only possible for LR(K) languages? Mentioning EBNF turns out to be a red herring. Indeed mention