ES4 Grammar

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ES4 Grammar

Michael O'Brien-4
This is probably for Jeff, but I'll send to the list anyway.

I was doing a scrub through the latest posted grammar and may have a few
small edits.


1. QualifiedNameIdentifier includes the tokens "*" and
OverloadedOperator. However, overloaded operator includes "*" also. Is
the "*' token
    therefore multiply resolved?

2. AttributeIdentifier in PrimaryExpression (production 110) should be
AttributeName

3. The production on 414 under NamespaceAttribute has:

    Path . Identifier
    Identifier

    But Path already encompasses this. So you can replace these two
lines with just "Path"

    Same in productions on lines 417+418

Let me know if I have any of this wrong.


Cheers


Michael O'Brien
_______________________________________________
Es4-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es4-discuss
Reply | Threaded
Open this post in threaded view
|

Re: ES4 Grammar

Jeff Dyer
Hi Michael,

You might have an old cached copy of grammar.pdf. The first two issues were
resolved in a previous version. I had a pending fix to the third issue. I
made NamespaceAttribute a PrimaryName. That way you can use namespace
qualified references as a namespace attribute.

I've posted the latest and greatest, dated 14-oct-2007.

Thanks,

Jd

On 10/14/07 11:25 AM, Michael O'Brien wrote:

> This is probably for Jeff, but I'll send to the list anyway.
>
> I was doing a scrub through the latest posted grammar and may have a few
> small edits.
>
>
> 1. QualifiedNameIdentifier includes the tokens "*" and
> OverloadedOperator. However, overloaded operator includes "*" also. Is
> the "*' token
>     therefore multiply resolved?
>
> 2. AttributeIdentifier in PrimaryExpression (production 110) should be
> AttributeName
>
> 3. The production on 414 under NamespaceAttribute has:
>
>     Path . Identifier
>     Identifier
>
>     But Path already encompasses this. So you can replace these two
> lines with just "Path"
>
>     Same in productions on lines 417+418
>
> Let me know if I have any of this wrong.
>
>
> Cheers
>
>
> Michael O'Brien
> _______________________________________________
> Es4-discuss mailing list
> [hidden email]
> https://mail.mozilla.org/listinfo/es4-discuss

_______________________________________________
Es4-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es4-discuss
Reply | Threaded
Open this post in threaded view
|

Re: ES4 Grammar

Michael O'Brien-4
Jeff,

Thanks - that update seems like it has moved on in quite a few areas.

A follow on question: My question is what is the use case for a NamespaceAttribute being a PrimaryName. ie. Identifier "." Identifier ...

Given that Global NamespaceAttributes are defined to be:
    public
    internal
    intrinsic
    PrimaryName

This allows Paths in the namespace attribute. e.g. the following are legal where debug and release are suitably defined.

debug var x

a.b.c.release var x

My question is what is the use case for a NamespaceAttribute being a PrimaryName. ie. Identifier "." Identifier ...
And how does one create such a "a.b.c.release"?

Are namespaces scoped to packages and thus the "a.b.c" refers to a package like "org.mozilla.release"?
Or are these runtime namespaces where release is a property of "c" in the above example?

Or is the grammar incorrect?

Thanks

Michael



Jeff Dyer wrote:
Hi Michael,

You might have an old cached copy of grammar.pdf. The first two issues were
resolved in a previous version. I had a pending fix to the third issue. I
made NamespaceAttribute a PrimaryName. That way you can use namespace
qualified references as a namespace attribute.

I've posted the latest and greatest, dated 14-oct-2007.

Thanks,

Jd

On 10/14/07 11:25 AM, Michael O'Brien wrote:

  
This is probably for Jeff, but I'll send to the list anyway.

I was doing a scrub through the latest posted grammar and may have a few
small edits.


1. QualifiedNameIdentifier includes the tokens "*" and
OverloadedOperator. However, overloaded operator includes "*" also. Is
the "*' token
    therefore multiply resolved?

2. AttributeIdentifier in PrimaryExpression (production 110) should be
AttributeName

3. The production on 414 under NamespaceAttribute has:

    Path . Identifier
    Identifier

    But Path already encompasses this. So you can replace these two
lines with just "Path"

    Same in productions on lines 417+418

Let me know if I have any of this wrong.


Cheers


Michael O'Brien
_______________________________________________
Es4-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es4-discuss
    


  

_______________________________________________
Es4-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es4-discuss
Reply | Threaded
Open this post in threaded view
|

Re: ES4 Grammar

Jeff Dyer
Re: ES4 Grammar > Thanks - that update seems like it has moved on in quite a few areas.

Yes, but it should be stabilizing somewhat now. The latest update tries to bring the grammar in sync with the accepted proposals, which are now frozen.

Using PrimaryName as a NamespaceAttribute allows for the case you’ve identified — package and namespace qualified namespace identifiers. E.g.:

    import flash.utils.*;

    flash.utils.flash_proxy function helper ( ) { ... }

Or the analog using namespaces:

     namespace Utils;
     Utils namespace Proxy;

     Utils::Proxy function helper () { ... }

In both cases the qualified name must resolve to a namespace value during the definition phase (that is before verification or evaluation).

Jd

On 10/15/07 1:09 PM, Michael O'Brien wrote:

Jeff,

Thanks - that update seems like it has moved on in quite a few areas.

A follow on question: My question is what is the use case for a NamespaceAttribute being a PrimaryName. ie. Identifier "." Identifier ...

Given that Global NamespaceAttributes are defined to be:
    public
    internal
    intrinsic
    PrimaryName

This allows Paths in the namespace attribute. e.g. the following are legal where debug and release are suitably defined.

debug var x

a.b.c.release var x

My question is what is the use case for a NamespaceAttribute being a PrimaryName. ie. Identifier "." Identifier ...
And how does one create such a "a.b.c.release"?

Are namespaces scoped to packages and thus the "a.b.c" refers to a package like "org.mozilla.release"?
Or are these runtime namespaces where release is a property of "c" in the above example?

Or is the grammar incorrect?

Thanks

Michael



Jeff Dyer wrote:

Hi Michael,

You might have an old cached copy of grammar.pdf. The first two issues were
resolved in a previous version. I had a pending fix to the third issue. I
made NamespaceAttribute a PrimaryName. That way you can use namespace
qualified references as a namespace attribute.

I've posted the latest and greatest, dated 14-oct-2007.

Thanks,

Jd

On 10/14/07 11:25 AM, Michael O'Brien wrote:

  
 

This is probably for Jeff, but I'll send to the list anyway.

I was doing a scrub through the latest posted grammar and may have a few
small edits.


1. QualifiedNameIdentifier includes the tokens "*" and
OverloadedOperator. However, overloaded operator includes "*" also. Is
the "*' token
    therefore multiply resolved?

2. AttributeIdentifier in PrimaryExpression (production 110) should be
AttributeName

3. The production on 414 under NamespaceAttribute has:

    Path . Identifier
    Identifier

    But Path already encompasses this. So you can replace these two
lines with just "Path"

    Same in productions on lines 417+418

Let me know if I have any of this wrong.


Cheers


Michael O'Brien
_______________________________________________
Es4-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es4-discuss
    
 



  



_______________________________________________
Es4-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es4-discuss