Context-Free Grammars? What about arrays?

Nick Sabalausky a at a.a
Mon Feb 14 14:53:49 PST 2011


"%u" <wfunction at hotmail.com> wrote in message 
news:ij3la9$t53$1 at digitalmars.com...
>
> Again, just because the AST's _happen_ to _look_ the same for static and
> associative arrays, does that mean that this makes D context-free?

Grammar is *just* about how it *looks*, not what it means.

> The meaning of
> the expression is still ambiguous, whether or not it fits well within the 
> tree.
>

"Meaning" is semanitcs, not syntax. Therefore, whether or not the *meaning* 
is ambiguous is irrelevent to the grammar. The parser/grammar does *not* 
deal with meaning, just structure.




More information about the Digitalmars-d-learn mailing list