digitalmars.D - D Parser in D
- NMS (2/2) Nov 25 2011 Is there a D parser written in D? - C strings kill me.
- Bernard Helyer (4/6) Nov 25 2011 SDC[1] has one, but it's being lazy loaded in -- that is, it's not
- Trass3r (2/3) Nov 26 2011 https://github.com/azizk/dil
- Martin Nowak (3/5) Nov 26 2011 It's annoying to write one as long as the buffered input range with
- Trass3r (1/4) Nov 26 2011 What do you need infinite lookahead for?
- Timon Gehr (20/24) Nov 26 2011 There are a few places in the grammar where it is useful, for example:
- Martin Nowak (10/14) Nov 26 2011 No need to discuss this in detail, but IMHO the main benefit of infinite...
- Timon Gehr (2/8) Nov 26 2011 Have you filed an enhancement request?
Is there a D parser written in D? - C strings kill me. Thanks, NMS
Nov 25 2011
On Sat, 26 Nov 2011 07:58:19 +1300, NMS <nathanmswan gmail.com> wrote:Is there a D parser written in D? - C strings kill me. Thanks, NMSSDC[1] has one, but it's being lazy loaded in -- that is, it's not complete. [1]:http://github.com/bhelyer/SDC
Nov 25 2011
Is there a D parser written in D? - C strings kill me.https://github.com/azizk/dil Most complete one I think.
Nov 26 2011
On Fri, 25 Nov 2011 19:58:19 +0100, NMS <nathanmswan gmail.com> wrote:Is there a D parser written in D? - C strings kill me. Thanks, NMSIt's annoying to write one as long as the buffered input range with infinite lookahead problem is not solved by the std library.
Nov 26 2011
What do you need infinite lookahead for?Is there a D parser written in D? - C strings kill me.It's annoying to write one as long as the buffered input range with infinite lookahead problem is not solved by the std library.
Nov 26 2011
On 11/27/2011 12:05 AM, Trass3r wrote:There are a few places in the grammar where it is useful, for example: void foo(A,B,C,...)(A,B,C,...){} vs void foo(A,B,C,...){} Without looking behind the first set of parentheses, it is harder to figure out whether or not foo is a function template. Another example: void main(){ a[][][][][]...[][][] b; } vs void main(){ a[][][][][]...[][][] = b[]; } Both of them could in theory be parsed without infinite lookahead, but that is more complicated than the solution using infinite lookahead. Also, if eg. you want to build a distinct AST representation for template parameters and function parameters, infinite lookahead is the only sensible option.What do you need infinite lookahead for?Is there a D parser written in D? - C strings kill me.It's annoying to write one as long as the buffered input range with infinite lookahead problem is not solved by the std library.
Nov 26 2011
On Sun, 27 Nov 2011 00:05:31 +0100, Trass3r <un known.com> wrote:No need to discuss this in detail, but IMHO the main benefit of infinite lookahead is that it allows to build a generic parser for forward ranges. If you have only input ranges you need to handle buffering within the parser. Of course it's opportune to simply read in a complete source file as string given their typically limited size. It also has the benefit of avoiding additional string copying.What do you need infinite lookahead for?Is there a D parser written in D? - C strings kill me.It's annoying to write one as long as the buffered input range with infinite lookahead problem is not solved by the std library.
Nov 26 2011
On 11/26/2011 09:09 PM, Martin Nowak wrote:On Fri, 25 Nov 2011 19:58:19 +0100, NMS <nathanmswan gmail.com> wrote:Have you filed an enhancement request?Is there a D parser written in D? - C strings kill me. Thanks, NMSIt's annoying to write one as long as the buffered input range with infinite lookahead problem is not solved by the std library.
Nov 26 2011