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

2012-03-11 Thread Philippe Sigaud
On Sun, Mar 11, 2012 at 08:51, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I was thinking of ANTLR-style operators in which you say where the root should be and you get to drop unnecessary nodes. (Post on 2012/02/29 10:19AM GMT-0600.) Get it, thanks for the ref! There is an

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

2012-03-11 Thread Alex Rønne Petersen
On 11-03-2012 08:22, 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-11 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-11 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-11 Thread Alex Rønne Petersen
On 11-03-2012 16:02, Alex Rønne Petersen wrote: 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-11 Thread Philippe Sigaud
On Sun, Mar 11, 2012 at 00:34, Alex Rønne Petersenxtzgzo...@gmail.com wrote: [Parsing C?] I think so. But you'd have to do add some semantic action to deal with typedefs and macros. Oh, I should have mentioned I only meant the actual language (ignoring the preprocessor). OK. I admit I

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

2012-03-11 Thread Philippe Sigaud
Quick question, you mention the ability to opt-out of the space-insensitivity, where might one find this? Yes, undocumented. Use the '' operator. You know, I introduced space-insensitivity recently, to simplify some rules and it keeps biting me back. For example Line - (!EOL .)* EOL The

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

2012-03-11 Thread Philippe Sigaud
Also, I have sent a pull request to fix the build on 64-bit: https://github.com/PhilippeSigaud/Pegged/pull/1 Merged, thanks!

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

2012-03-11 Thread Alex Rønne Petersen
On 11-03-2012 18:06, Philippe Sigaud wrote: On Sun, Mar 11, 2012 at 00:34, Alex Rønne Petersenxtzgzo...@gmail.com mailto:xtzgzo...@gmail.com wrote: [Parsing C?] I think so. But you'd have to do add some semantic action to deal with typedefs and macros. Oh, I should have mentioned I

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

2012-03-11 Thread Philippe Sigaud
By the way, bootstrap.d seems to fail to build at the moment: ../pegged/utils/bootstrap.d(1433): found ':' when expecting ')' following template argument list ../pegged/utils/bootstrap.d(1433): members expected ../pegged/utils/bootstrap.d(1433): { } expected following aggregate declaration

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

2012-03-11 Thread Philippe Sigaud
Hm, I don't *think* C has such ambiguities but I could well be wrong. In any case, if it can handle the non-ambiguous case, that's enough for me. I wanted to tackle D this week, but I might as well begin with C :) Do you happen to have any handy and readable EBNF grammar for C? At least for D,

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

2012-03-11 Thread Alex Rønne Petersen
On 11-03-2012 18:19, Philippe Sigaud wrote: Hm, I don't *think* C has such ambiguities but I could well be wrong. In any case, if it can handle the non-ambiguous case, that's enough for me. I wanted to tackle D this week, but I might as well begin with C :) Do you happen to have any handy

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

2012-03-11 Thread Alex Rønne Petersen
On 11-03-2012 18:17, Philippe Sigaud wrote: By the way, bootstrap.d seems to fail to build at the moment: ../pegged/utils/bootstrap.d(1433): found ':' when expecting ')' following template argument list ../pegged/utils/bootstrap.d(1433): members expected

Low feature GNUPlot controller for D2

2012-03-11 Thread SiegeLord
I have been using a GNUPlot controller for my scientific work with D for some time now, so I just wanted to announce that such a thing exists if anybody is interested in using it or whatnot. It supports very some basic features (hence being low feature) which you can view in the example file:

Re: Low feature GNUPlot controller for D2

2012-03-11 Thread SiegeLord
On Sunday, 11 March 2012 at 21:45:02 UTC, SiegeLord wrote: I have been using a GNUPlot controller for my scientific work with D for some time now, so I just wanted to announce that such a thing exists if anybody is interested in using it or whatnot. It supports very some basic features (hence

Re: Low feature GNUPlot controller for D2

2012-03-11 Thread Walter Bright
On 3/11/2012 2:45 PM, SiegeLord wrote: Anyway, the repository for it is here: https://github.com/SiegeLord/DGnuplot It requires TangoD2 to build and gnuplot 4.4.3 to run (unless you're saving commands to a file as described above). It works on Linux, and maybe on Windows (untested). Great!

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

2012-03-11 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: Low feature GNUPlot controller for D2

2012-03-11 Thread SiegeLord
On Monday, 12 March 2012 at 01:02:06 UTC, Walter Bright wrote: Are any parts of it suitable for inclusion in https://github.com/D-Programming-Deimos ? Doubt it, as it literally simply opens up a gnuplot process and pipes commands into it. There is no such thing as a libgnuplot or anything.