www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Dessert waxes and floor toppings

reply Brian Schott <briancschott gmail.com> writes:
I have an idea to simplify the grammar:

Attribute:
	  Pragma
	| ProtectionAttribute
	| FloorWaxOrDessertTopping
	;

StorageClass:
	  "enum"
	| FloorWaxOrDessertTopping
	;

FloorWaxOrDessertTopping:
	  "abstract"
	| AlignAttribute
	| "auto"
	| "const"
	| DeprecatedAttribute
	| "enum"
	| "extern"
	| "final"
	| "__gshared"
	| "immutable"
	| "inout"
	| LinkageAttribute
	| "nothrow"
	| "override"
	| Property
	| "pure"
	| "ref"
	| "scope"
	| "shared"
	| "static"
	| "synchronized"
	;

I'm only half joking.
Jan 11 2016
parent reply Basile B. <b2.temp gmx.com> writes:
On Monday, 11 January 2016 at 10:27:59 UTC, Brian Schott wrote:
 I have an idea to simplify the grammar:

 Attribute:
 	  Pragma
 	| ProtectionAttribute
 	| FloorWaxOrDessertTopping
 	;

 StorageClass:
 	  "enum"
 	| FloorWaxOrDessertTopping
 	;

 FloorWaxOrDessertTopping:
 	  "abstract"
 	| AlignAttribute
 	| "auto"
 	| "const"
 	| DeprecatedAttribute
 	| "enum"
 	| "extern"
 	| "final"
 	| "__gshared"
 	| "immutable"
 	| "inout"
 	| LinkageAttribute
 	| "nothrow"
 	| "override"
 	| Property
 	| "pure"
 	| "ref"
 	| "scope"
 	| "shared"
 	| "static"
 	| "synchronized"
 	;

 I'm only half joking.
Grammar is a bit over me but are you talking about this: http://dpaste.dzfl.pl/bfc71e865596 --- enum A{A0,A1} enum B = 1; enum {C,D} void main() { static assert(is(A==enum)); static assert(!is(B==enum)); static assert(!is(C==enum)); } --- by any chance ?
Jan 11 2016
parent Basile B. <b2.temp gmx.com> writes:
On Monday, 11 January 2016 at 11:09:11 UTC, Basile B. wrote:
 On Monday, 11 January 2016 at 10:27:59 UTC, Brian Schott wrote:
 I have an idea to simplify the grammar:

 Attribute:
 	  Pragma
 	| ProtectionAttribute
 	| FloorWaxOrDessertTopping
 	;

 StorageClass:
 	  "enum"
 	| FloorWaxOrDessertTopping
 	;

 FloorWaxOrDessertTopping:
 	  "abstract"
 	| AlignAttribute
 	| "auto"
 	| "const"
 	| DeprecatedAttribute
 	| "enum"
 	| "extern"
 	| "final"
 	| "__gshared"
 	| "immutable"
 	| "inout"
 	| LinkageAttribute
 	| "nothrow"
 	| "override"
 	| Property
 	| "pure"
 	| "ref"
 	| "scope"
 	| "shared"
 	| "static"
 	| "synchronized"
 	;

 I'm only half joking.
Grammar is a bit over me but are you talking about this: ?
Sorry for the noise, I've just get why you posted this: https://github.com/Hackerpilot/libdparse/issues/69
Jan 11 2016