October 03, 2006
Stewart Gordon wrote:
> Walter Bright wrote:
> 
>> Better array literals.
>>
>> http://www.digitalmars.com/d/changelog.html
> 
> 
> Could I please have your feedback on this sometime soon?
> 
> http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=41978 

The following questions are possibly way-noobs, but I hope I'm not the only one who's understanding might benefit from some info. :-)

Oh, and this is not at all directed towards the proposal: for all I know, what I ask here is "the usual way to do it".

On the above refferd page, a couple of things stuck in the eye:

 - Why is Statement split between BasicStatement and the other three, and only then the rest of the statements (the subs of BasicStatement)? I mean, the reason for this is not immediately obvious.

 - (This probably is a real stupid question:) in IfCondition it says

         'auto' Identifier '=' Expression
         Declarator '=' Expression

one would think that the "auto" line would be sort-of included in the Declarator line. In other words, isn't "auto" just a case of declaration? (In D overall, not specifically here.)

 - DoStatement has an explicit ';' at the end, the others don't. What am I missing here?

 - In what circumstances would a Pragma statement create or need to create a new scope? (Yes, I'm ignorant on this...)

---

Stewart, I wish I could say that all the suggestions seemed valid and good, but since I just declared myself ignorant, I can't. ;-)

Oh, the existence of both LabelledStatement and LabeledStatement, and so on -- does give the impression that this BNF never actually has been used as input to a parser generator? I seem to remember that Walter doesn't use any of this because his parser is hand-written.

Still, I think it is imperative that we have a valid and usable BNF spec! And this spec should be the Canonical authority, should DMD, GDC or other compilers or people find issues in D syntax.

Of course we now have the front-end to use for such, but that is IMHO not a viable solution for studying the language, for writing third-party D compilers, or for automatic tools.
October 03, 2006
>Walter Bright wrote:
>> Better array literals.
>>
>> http://www.digitalmars.com/d/changelog.html

>Yay! Thank you very much, now users of Derelict Free Type and my little
>library can generate some debug info :)
>~ Clay

Double yay! :)
Thanks Walter!

- Jeremy
October 03, 2006
On Tue, 03 Oct 2006 14:20:49 +0300, Stewart Gordon <smjg_1998@yahoo.com> wrote:

> Walter Bright wrote:
>> Better array literals.
>>  http://www.digitalmars.com/d/changelog.html
>
> Could I please have your feedback on this sometime soon?
>
> http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=41978
>
> Stewart.
>


I quickly glanced through it, and noticed that some of the reserved words are missing enclosing characters ''. That is, 'else' (in 'IfStatement' and 'CCStatement'), 'while' (in 'DoStatement'), 'try', 'catch', and 'finally'.

(Just thought that mentioning this could be helpful.)
October 03, 2006
Stewart Gordon wrote:
> Walter Bright wrote:
> 
>> Better array literals.
>>
>> http://www.digitalmars.com/d/changelog.html
> 
> 
> Could I please have your feedback on this sometime soon?
> 
> http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=41978 
> 
> 
> Stewart.
> 

Interesting that you should bring this up. I am working on a program that  attempts to parse out the BNF sections from the docs and emit them in a single file (either HTML without the rest of the stuff or as a BNF file for Enki)

When I did it by hand a number of the reductions were named differently in different places. I was planing on making a list of these when the program get closer to done. Looks like you might have beet me to it. I still plan to finish the program as it will make for a good consistency check.

This is vary low down on the list of things for Walter to do, but...

There are some places that the same rule is stated twice, once at the top, once further down. It wold be nice if the second case was marked up differently (something like class="bnf2") to make it easier to discard.
October 03, 2006
Georg Wrede wrote:
> Stewart Gordon wrote:
>> Walter Bright wrote:
>>
>>> Better array literals.
>>>
>>> http://www.digitalmars.com/d/changelog.html
>>
>>
>> Could I please have your feedback on this sometime soon?
>>
>> http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=41978 
> 
> 
> The following questions are possibly way-noobs, but I hope I'm not the only one who's understanding might benefit from some info. :-)
> 
> Oh, and this is not at all directed towards the proposal: for all I know, what I ask here is "the usual way to do it".
> 
> On the above refferd page, a couple of things stuck in the eye:
> 
>  - Why is Statement split between BasicStatement and the other three, and only then the rest of the statements (the subs of BasicStatement)? I mean, the reason for this is not immediately obvious.

In order to make the distinction between statements that can be the body of a control statement and statements that can't.  Compare the definitions of ControlledStatement and CCedStatement.

>  - (This probably is a real stupid question:) in IfCondition it says
> 
>          'auto' Identifier '=' Expression
>          Declarator '=' Expression
> 
> one would think that the "auto" line would be sort-of included in the Declarator line. In other words, isn't "auto" just a case of declaration? (In D overall, not specifically here.)

The current declaration syntax treats AutoDeclaration separately from specific-type declarations.

>  - DoStatement has an explicit ';' at the end, the others don't. What am I missing here?

Clarity.

Suppose you saw

    }
    while (condition)
    doSomething();

in the middle of some code.  If DoStatement didn't have a terminating ';', then you would have to look up, possibly several pages, to find out for certain whether the while applies to what precedes or to what follows.

>  - In what circumstances would a Pragma statement create or need to create a new scope? (Yes, I'm ignorant on this...)

When the nature of the pragma dictates it.  I'm sure there's plenty of potential to invent pragmas with this characteristic.  They just haven't been invented yet, at least AFAIK.

> ---
> 
> Stewart, I wish I could say that all the suggestions seemed valid and good, but since I just declared myself ignorant, I can't. ;-)
> 
> Oh, the existence of both LabelledStatement and LabeledStatement, and so on -- does give the impression that this BNF never actually has been used as input to a parser generator? I seem to remember that Walter doesn't use any of this because his parser is hand-written.

That's my recollection too.

> Still, I think it is imperative that we have a valid and usable BNF spec! And this spec should be the Canonical authority, should DMD, GDC or other compilers or people find issues in D syntax.
> 
> Of course we now have the front-end to use for such, but that is IMHO not a viable solution for studying the language, for writing third-party D compilers, or for automatic tools.

I agree.

Stewart.

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d- s:-@ C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++++ h-- r-- !y
------END GEEK CODE BLOCK------

My e-mail is valid but not my primary mailbox.  Please keep replies on the 'group where everyone may benefit.
October 03, 2006
Stewart Gordon wrote:
> Walter Bright wrote:
>> Better array literals.
>>
>> http://www.digitalmars.com/d/changelog.html
> 
> Could I please have your feedback on this sometime soon?
> 
> http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=41978 

I agree it should be fixed, I just haven't invested the time needed to carefully go over it.
October 03, 2006
Walter Bright schrieb am 2006-10-03:
> Better array literals.
>
> http://www.digitalmars.com/d/changelog.html

Something is strange with XHTML support:

dmd/src/dmd/html* incorporates Bugzilla 363
dmd/bin/dmd seems to incorporate it only partially(filename: yes, decoding: no)

Test cases:
http://dstress.kuehne.cn/run/xhtml_tag_01.html
http://dstress.kuehne.cn/run/x/xhtml_tag_02.xhtml

Thomas


October 04, 2006
Walter Bright schrieb am 2006-10-03:
> Better array literals.
>
> http://www.digitalmars.com/d/changelog.html

The way issue 385 was fixed is buggy.
If executed, mars.c:194 causes an infinite loop.

Thomas


October 04, 2006
Thanks a lot for fixing bug #315. This makes threading finally usable on Linux. I'll test it and report my findings.


Walter Bright wrote:

> Better array literals.
> 
> http://www.digitalmars.com/d/changelog.html

1 2
Next ›   Last »