Context: http://dlang.org/spec/grammar.html

The "Symbol" rule is used only by two other rules in the grammar, "TemplateArgument" and "WithStatement".

In the case of "WithStatement", the grammar looks like this:

WithStatement:
'with' '(' Expression | Symbol | TemplateInstance ')' ScopeStatement

Looking at the definition of the "Symbol" and "Expression" rules you can see that anything that can parse as "Symbol" can also parse as "Expression", so there's no point in this rule being here.

In the case of "TemplateArgument", the grammar looks like this:

TemplateArgument:
    Type | AssignExpression | Symbol

Again, reading the grammar for "Type" shows that it's a superset of the grammar of "Symbol" so "Symbol" does not justify its existence here either.

Am I missing something, or is this a good opportunity to simplify the spec and make IDE plugin development easier?

Reply via email to