Re: Pegged: Syntax Highlighting

2012-03-17 Thread Andrei Alexandrescu
On 3/17/12 3:53 PM, Philippe Sigaud wrote: On Sat, Mar 17, 2012 at 18:11, Andrei Alexandrescu wrote: The D grammar is a 1000-line / hundreds of rules monster. I finished writing it and am now crushing bugs. God, that generates a 10_000 line module to parse it. I should simplify the code gener

Re: D to Javascript converter (a hacked up dmd)

2012-03-17 Thread Adam D. Ruppe
This is still alive: https://github.com/adamdruppe/dmd/tree/dtojs Merging in DMD changes as they happen has been fairly easy, so we have things like UFCS in there. I'm pretty happy with the core setup, though it still isn't finished. Enough of the D language works like you expect that you can d

Re: Pegged: Syntax Highlighting

2012-03-17 Thread bls
On 03/17/2012 01:53 PM, Philippe Sigaud wrote: Does anyone have experience with other languages similar to D and that offer AST-walking? Doesn't C# have something like this? (I'll have a look at Scala macros) Hi Philippe. Of course the visitor pattern comes in mind. Eclipse (Java) uses a spec

Re: Pegged: Syntax Highlighting

2012-03-17 Thread Philippe Sigaud
On Sat, Mar 17, 2012 at 18:11, Andrei Alexandrescu wrote: >> The D grammar is a 1000-line / hundreds of rules monster. I finished >> writing it and am now crushing bugs. >> God, that generates a 10_000 line module to parse it. I should >> simplify the code generator somewhat. > > > Science is don

mysql tool

2012-03-17 Thread dnewbie
Hi D friends. I'd like to share with you a little tool. It allows you to execute SQL statements in your MySQL database. It displays the data in a nice data grid widget written by David Hillard. I hope you like it. Link http://my.opera.com/run3/blog/2012/03/17/mysql-tool

Re: Pegged: Syntax Highlighting

2012-03-17 Thread Philippe Sigaud
On Sat, Mar 17, 2012 at 15:44, Extrawurst wrote: > On 17.03.2012 15:13, Philippe Sigaud wrote: >> >> The D grammar is a 1000-line / hundreds of rules monster. I finished >> writing it and am now crushing bugs. > > > Any ETA when u gonna commit it for the public ? Wouldn't mind getting my > hands d

Re: Pegged, From EBNF to PEG

2012-03-17 Thread Philippe Sigaud
On Sat, Mar 17, 2012 at 15:48, Dmitry Olshansky wrote: >> PEG sequences don't backtrack. > > > I'd argue they do. As I see it as: > Expr <- As B C D / B C D > As <- A / A As That's what people doing Regex-to-PEG translations do, yes. But it's not the spontaneous behavior of A* B C D in PEG. But

Re: Pegged: Syntax Highlighting

2012-03-17 Thread Andrei Alexandrescu
On 3/17/12 9:13 AM, Philippe Sigaud wrote: I want to use Pegged for that purpose. So go ahead an commit the D grammar ;) Would be so awesome if Pegged would be able to parse D. ~Extrawurst The D grammar is a 1000-line / hundreds of rules monster. I finished writing it and am now crushing bugs.

Re: It's official: The D Programming Language will participate to GSoC 2012!

2012-03-17 Thread Jacob Carlborg
On 2012-03-16 19:32, Steven Schveighoffer wrote: On Fri, 16 Mar 2012 14:24:38 -0400, Andrei Alexandrescu wrote: Just got the acceptance message. This is great news! If you consider being a mentor, please apply as described in http://dlang.org/gsoc2012.html. Thanks! You really think Google s

Re: Pegged, From EBNF to PEG

2012-03-17 Thread Dmitry Olshansky
On 17.03.2012 18:11, Philippe Sigaud wrote: On Sat, Mar 17, 2012 at 10:09, Dmitry Olshansky wrote: Ok, let's agree on fact that semantically a* is : As<- a As / a and a*? is this: As<- a / a As Now that's local ;) It's local, yes. But the pb is with Expr<- A* B C D, when D fails. PEG seq

Re: Pegged: Syntax Highlighting

2012-03-17 Thread Extrawurst
On 17.03.2012 15:13, Philippe Sigaud wrote: The D grammar is a 1000-line / hundreds of rules monster. I finished writing it and am now crushing bugs. Any ETA when u gonna commit it for the public ? Wouldn't mind getting my hands dirty on it and looking for bugs too ;)

Re: Pegged: Syntax Highlighting

2012-03-17 Thread Philippe Sigaud
> I want to use Pegged for that purpose. So go ahead an commit the D grammar > ;) > Would be so awesome if Pegged would be able to parse D. > > ~Extrawurst The D grammar is a 1000-line / hundreds of rules monster. I finished writing it and am now crushing bugs. God, that generates a 10_000 line mo

Re: Pegged, From EBNF to PEG

2012-03-17 Thread Philippe Sigaud
On Sat, Mar 17, 2012 at 10:09, Dmitry Olshansky wrote: > Ok, let's agree on fact that semantically > a* is : > As <- a As / a > > and a*? is this: > As <- a / a As > > Now that's local ;) It's local, yes. But the pb is with Expr <- A* B C D, when D fails. PEG sequences don't backtrack. >> I

Re: Pegged: Syntax Highlighting

2012-03-17 Thread Extrawurst
On 17.03.2012 08:01, Philippe Sigaud wrote: On Wed, Mar 14, 2012 at 21:03, Andrej Mitrovic wrote: how would one use a parser like Pegged for syntax highlighting? Ok, typically one would use a lexer and not a parser. But using a parser might be more interesting for creating more complex synt

Re: DUnit - class MyTest { mixin TestMixin; void testMethod1() {} void testMethod2() {}}

2012-03-17 Thread Marc P. Michel
On Monday, 20 February 2012 at 01:49:04 UTC, Juan Manuel Cabo wrote: I thought I could do a better effort to describe why DUnit is so extraordinary, for a native language, especially for those unfamiliar with xUnit frameworks This is great stuff, thanks ! Anyway, I'm not fond of your examples

Re: Pegged, From EBNF to PEG

2012-03-17 Thread Dmitry Olshansky
On 17.03.2012 10:59, Philippe Sigaud wrote: On Wed, Mar 14, 2012 at 10:48, Dmitry Olshansky wrote: That's one of the caveats on PEG. That and greedy operators. 'a*a' never succeeds because 'a*' consumes all the available a's. Hey, wait, I thought there has to be backtrack here, i.e. when s

Re: Pegged: Syntax Highlighting

2012-03-17 Thread Philippe Sigaud
On Wed, Mar 14, 2012 at 21:03, Andrej Mitrovic wrote: >>> how would one use a parser like Pegged for syntax >>> highlighting? >> >> Ok, typically one would use a lexer and not a parser. But using a >> parser might be more interesting for creating more complex syntax >> highlighting. :) >> > > Act