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

Timon Gehr timon.gehr at gmx.ch
Thu Mar 15 01:06:03 PDT 2012


On 03/15/2012 12:09 AM, Jay Norwood wrote:
> On Saturday, 10 March 2012 at 23:28:42 UTC, Philippe Sigaud wrote:
>> * Grammars can be dumped in a file to create a D module.
>>
>
>
> In reading the D spec I've seen a few instance where there are infered
> items such as auto for variables and various parameters in templates. I
> presume your D grammar will have to have some rules to be able to infer
> these as well.
>
> It seems like it would not be a big step to output what are the infered
> proper statements as the .capture output. Is that correct? I think that
> would be helpful in some cases to be able to view the fully expanded
> expression.

This is not what a parser does. Resolving symbols and assigning types to 
expressions is part of semantic analysis.


More information about the Digitalmars-d-announce mailing list