Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
August 04, 2004 D Parser | ||||
---|---|---|---|---|
| ||||
Hello all, I am looking for: 1) A grammar for D, which I suppose it's available. 2) A tool for generting a D AST (Abstract Syntax Tree). I assume the second one is available thru the compiler, but not necessarily in D or in a digestable way. Thanks for any info, Andres |
August 04, 2004 Re: D Parser | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andres C. Rodriguez | Andres C. Rodriguez wrote: > > Hello all, > > I am looking for: > > 1) A grammar for D, which I suppose it's available. > 2) A tool for generting a D AST (Abstract Syntax Tree). > > I assume the second one is available thru the compiler, but not necessarily in D or in a digestable way. > > Thanks for any info, > > Andres The D docs provide the only publicly available (BNF) grammar parts I am aware of: http://www.digitalmars.com/d/index.html The source for the whole front end of the compiler is in the dmd/src directory if you download it: http://www.digitalmars.com/d/dcompiler.html |
August 04, 2004 Re: D Parser | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andres C. Rodriguez | Andres C. Rodriguez wrote:
>
> Hello all,
>
> I am looking for:
>
> 1) A grammar for D, which I suppose it's available.
> 2) A tool for generting a D AST (Abstract Syntax Tree).
>
> I assume the second one is available thru the compiler, but not necessarily in D or in a digestable way.
>
> Thanks for any info,
>
> Andres
There has been somebody on this newsgroup who, released a grammar for antlr. I don't exactly know which post it was, but maybe sombody else remembers...
Stephan
|
August 04, 2004 Re: D Parser | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stephan Wienczny | In article <ceq922$252e$1@digitaldaemon.com>, Stephan Wienczny says... > >Andres C. Rodriguez wrote: >> >> Hello all, >> >> I am looking for: >> >> 1) A grammar for D, which I suppose it's available. >> 2) A tool for generting a D AST (Abstract Syntax Tree). >> >> I assume the second one is available thru the compiler, but not necessarily in D or in a digestable way. >> >> Thanks for any info, >> >> Andres > >There has been somebody on this newsgroup who, released a grammar for antlr. I don't exactly know which post it was, but maybe sombody else remembers... > >Stephan I'm sure someone released some sort of grammar a while ago, but I think that the last time antlr was discussed, no one released anything. Here's the thread I found: http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/4953 jcc7 |
August 04, 2004 Re: D Parser | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andres C. Rodriguez | Andres C. Rodriguez wrote: > > Hello all, > > I am looking for: > > 1) A grammar for D, which I suppose it's available. > 2) A tool for generting a D AST (Abstract Syntax Tree). > > I assume the second one is available thru the compiler, but not necessarily in D or in a digestable way. > > Thanks for any info, Walter hasn't written a complete, formal grammar. There is this, though: <http://dsource.org/forums/viewtopic.php?t=258> -- andy |
August 04, 2004 Re: D Parser | ||||
---|---|---|---|---|
| ||||
Posted in reply to J C Calvarese | J C Calvarese wrote:
> In article <ceq922$252e$1@digitaldaemon.com>, Stephan Wienczny says...
>
> I'm sure someone released some sort of grammar a while ago, but I think that the
> last time antlr was discussed, no one released anything. Here's the thread I
> found: http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/4953
>
> jcc7
I think I saw the grammar, but it wasn't not (yet) finished.
Stephan
|
Copyright © 1999-2021 by the D Language Foundation