Re: Implementing a Programming Language in D: Lexical Analysis

2015-12-30 Thread Basile B. via Digitalmars-d-announce
On Wednesday, 30 December 2015 at 14:41:38 UTC, burjui wrote: On Tuesday, 29 December 2015 at 05:57:34 UTC, Ali Çehreli wrote: [...] Even more than that, I would also suggest to remove anonymous auto-typed enums without an initial value from which type can be inferred, e.g.: [...] Again,

Re: Implementing a Programming Language in D: Lexical Analysis

2015-12-30 Thread burjui via Digitalmars-d-announce
On Tuesday, 29 December 2015 at 05:57:34 UTC, Ali Çehreli wrote: I've realized that with a nested anonymous enum, there is no need to (and no way of) mentioning the enum type inside a user-defined type. This can simplify the implementation: Only if you intend to use enum members as manifest

Re: Implementing a Programming Language in D: Lexical Analysis

2015-12-28 Thread Ali Çehreli via Digitalmars-d-announce
On 12/28/2015 04:28 PM, Walter Bright wrote: > https://www.reddit.com/r/programming/comments/3ykko7/implementing_a_programming_language_in_d_lexical/ Although the author does not use many D idioms, I've just learned (re-learned?) anonymous enums from that code. I've realized that with a

Implementing a Programming Language in D: Lexical Analysis

2015-12-28 Thread Walter Bright via Digitalmars-d-announce
http://blog.felixangell.com/implementing-a-programming-language-in-d-part-1/ https://www.reddit.com/r/programming/comments/3ykko7/implementing_a_programming_language_in_d_lexical/ https://news.ycombinator.com/item?id=10802610 (Go through the front page, not this link, or your votes won't

Re: Implementing a Programming Language in D: Lexical Analysis

2015-12-28 Thread Ali Çehreli via Digitalmars-d-announce
On 12/28/2015 09:57 PM, Ali Çehreli wrote: > anonymous enums Wow! They are pretty weird: 1) The second form of the AnonymousEnumDeclaration spec is redundant, right? http://dlang.org/spec/enum.html#AnonymousEnumDeclaration enum : EnumBaseType { EnumMembers } enum { EnumMembers }