www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - synchronized keyword

reply "Carlos Smith" <carlos-smith sympatico.ca> writes:
I am working on a LALR grammar for D.
The grammar will be a complete grammar as per DMD 1.009.

I am almost done, and will publish it
sometimes tomorrow.

But the synchronize keyword is the cause of
a great (~ 40) number of shift-reduce conflicts.

And it's because synchronized is both defined
as a strorage class, ans used as the start of the
synchronized statement.

My questions are:

Is synchronized still a storage
class, or was it left there in the grammar, after
the synchronized statement has been created ?

Can i eliminate synchronized as a storage class ?

Mar 21 2007
parent "Carlos Smith" <carlos-smith sympatico.ca> writes:
: Can i eliminate synchronized as a storage class ?

Well, the token is processed by parse.c, and ther is a
function isSynchronized( ) which is used in declaration.c.

So, it looks like synchronize can be used both as
a storage class and as a keyword for the synchronize
Mar 21 2007