Re: Dscience

2012-03-10 Thread george
On Friday, 2 March 2012 at 12:27:06 UTC, bioinfornatics wrote: Dear, I have do a D 2 port to my dscience project: https://gitorious.org/dscience/dscience Any help are welcome It would be interesting if you would hook up with the guys at Open Bioinformatics Foundation

Pegged, a Parsing Expression Grammar (PEG) generator in D

2012-03-10 Thread Philippe Sigaud
Hello, I created a new Github project, Pegged, a Parsing Expression Grammar (PEG) generator in D. https://github.com/PhilippeSigaud/Pegged docs: https://github.com/PhilippeSigaud/Pegged/wiki PEG: http://en.wikipedia.org/wiki/Parsing_expression_grammar The idea is to give the generator a

Re: Pegged, a Parsing Expression Grammar (PEG) generator in D

2012-03-10 Thread Alex Rønne Petersen
On 11-03-2012 00:28, Philippe Sigaud wrote: Hello, I created a new Github project, Pegged, a Parsing Expression Grammar (PEG) generator in D. https://github.com/PhilippeSigaud/Pegged docs: https://github.com/PhilippeSigaud/Pegged/wiki PEG:

Re: Pegged, a Parsing Expression Grammar (PEG) generator in D

2012-03-10 Thread Andrej Mitrovic
I see you are not the only one who started writing string array literals like this: enum PEGCode = grammarCode!( Grammar - S Definition+ EOI ,Definition - RuleName Arrow Expression ,RuleName - Identifier(ParamList?) ,Expression - Sequence (OR Sequence)* ); IOW comma on the

Re: Pegged, a Parsing Expression Grammar (PEG) generator in D

2012-03-10 Thread bearophile
Andrej Mitrovic: IOW comma on the left side. I know it's not a style preference but actually a (unfortunate but needed) technique for avoiding bugs. :) To avoid that bug: http://d.puremagic.com/issues/show_bug.cgi?id=3827 Bye, bearophile

Re: Pegged, a Parsing Expression Grammar (PEG) generator in D

2012-03-10 Thread Philippe Sigaud
On Sun, Mar 11, 2012 at 00:34, Alex Rønne Petersen xtzgzo...@gmail.com wrote: Admittedly I have not heard of PEGs before, so I'm curious: Is this powerful enough to parse a language such as C? I think so. But you'd have to do add some semantic action to deal with typedefs and macros. People

Re: Pegged, a Parsing Expression Grammar (PEG) generator in D

2012-03-10 Thread Philippe Sigaud
On Sun, Mar 11, 2012 at 00:56, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: I see you are not the only one who started writing string array literals like this: enum PEGCode = grammarCode!(     Grammar - S Definition+ EOI    ,Definition - RuleName Arrow Expression    ,RuleName   -

Re: Pegged, a Parsing Expression Grammar (PEG) generator in D

2012-03-10 Thread Andrei Alexandrescu
On 3/11/12 1:22 AM, Philippe Sigaud wrote: On Sun, Mar 11, 2012 at 00:34, Alex Rønne Petersenxtzgzo...@gmail.com wrote: Admittedly I have not heard of PEGs before, so I'm curious: Is this powerful enough to parse a language such as C? I think so. But you'd have to do add some semantic

Re: Pegged, a Parsing Expression Grammar (PEG) generator in D

2012-03-10 Thread Jonathan M Davis
On Sunday, March 11, 2012 00:28:42 Philippe Sigaud wrote: Hello, I created a new Github project, Pegged, a Parsing Expression Grammar (PEG) generator in D. Cool! PEGs aren't used all that much for language grammars - primarily because BNF and EBNF are more traditional I think - but they're

Re: Pegged, a Parsing Expression Grammar (PEG) generator in D

2012-03-10 Thread Philippe Sigaud
On Sun, Mar 11, 2012 at 08:26, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I, too, think this is very significant work! Suggestion for Philippe: instead of this: enum PEGCode = grammarCode!(     Grammar - S Definition+ EOI    ,Definition - RuleName Arrow Expression    

Re: Pegged, a Parsing Expression Grammar (PEG) generator in D

2012-03-10 Thread Philippe Sigaud
On Sun, Mar 11, 2012 at 08:26, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Any chance you consider adding AST generator actions as discussed in the main forum a while ago? The AST is automatically produced, and there are already AST actions to simplify / guide its creation. There

Re: Pegged, a Parsing Expression Grammar (PEG) generator in D

2012-03-10 Thread Philippe Sigaud
On Sun, Mar 11, 2012 at 08:30, Jonathan M Davis jmdavisp...@gmx.com wrote: On Sunday, March 11, 2012 00:28:42 Philippe Sigaud wrote: Hello, I created a new Github project, Pegged, a Parsing Expression Grammar (PEG) generator in D. Cool! PEGs aren't used all that much for language grammars -

Re: Pegged, a Parsing Expression Grammar (PEG) generator in D

2012-03-10 Thread Jonathan M Davis
On Sunday, March 11, 2012 08:39:47 Philippe Sigaud wrote: On Sun, Mar 11, 2012 at 08:30, Jonathan M Davis jmdavisp...@gmx.com wrote: On Sunday, March 11, 2012 00:28:42 Philippe Sigaud wrote: Hello, I created a new Github project, Pegged, a Parsing Expression Grammar (PEG) generator in

Re: Pegged, a Parsing Expression Grammar (PEG) generator in D

2012-03-10 Thread Andrei Alexandrescu
On 3/11/12 1:35 AM, Philippe Sigaud wrote: On Sun, Mar 11, 2012 at 08:26, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Splitting on ; is trivial and makes client code considerably easier to play with. It's already implemented! No need for ';' Great! I think you'd be wise to add

Re: Pegged, a Parsing Expression Grammar (PEG) generator in D

2012-03-10 Thread Philippe Sigaud
On Sun, Mar 11, 2012 at 08:46, Jonathan M Davis jmdavisp...@gmx.com wrote: Is there an EBNF grammar for D somewhere, I mean outside the dlang docs? Someone may have been trying to write one, but I don't believe that there's an official one, and I recall someone complaining the the BNF grammar

Re: Pegged, a Parsing Expression Grammar (PEG) generator in D

2012-03-10 Thread Philippe Sigaud
On Sun, Mar 11, 2012 at 08:53, Philippe Sigaud philippe.sig...@gmail.com wrote: Anyway, the separating if done on the rule definitions  (Identifier - ...) Aw, I meant, the separation is done on rule definitions. Damn children climbing on me to get more breakfast :-)