Re: Does the grammar allow an alias statement without a semicolon?
On Sat, 18 Oct 2014 00:52:22 + Solomon E via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: The line alias StorageClassesopt BasicType Declarator in http://dlang.org/grammar#AliasDeclaration is apparently missing a semicolon after Declarator. this line should be removed altogether to stop people using this syntax. ;-) 'alias a = int;' is much better and clearer. and yes, this is a bug, semicolon is not optional there. signature.asc Description: PGP signature
Re: Does the grammar allow an alias statement without a semicolon?
On Saturday, 18 October 2014 at 00:52:23 UTC, Solomon E wrote: Hi, everyone, first post here. I'm trying to learn to parse D code. Just in case, I'll remind these two projects that might be helpful: https://github.com/Hackerpilot/libdparse https://github.com/Hackerpilot/DGrammar
Re: Does the grammar allow an alias statement without a semicolon?
Thank you both. That DGrammar project has some different names for the nonterminals in its grammar, and a different arrangement, but it confirms there should be a semicolon with any alias statement. I'm just trying to parse D when I read it myself so far, and figure out how the grammar works a little. I'm not trying to write a parser for it, at least not yet.
Re: Does the grammar allow an alias statement without a semicolon?
On Sat, 18 Oct 2014 02:54:21 + Solomon E via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Thank you both. That DGrammar project has some different names for the nonterminals in its grammar, and a different arrangement, but it confirms there should be a semicolon with any alias statement. I'm just trying to parse D when I read it myself so far, and figure out how the grammar works a little. I'm not trying to write a parser for it, at least not yet. btw, you can fill a bug report for this. signature.asc Description: PGP signature