View mode: basic / threaded / horizontal-split · Log in · Help
February 16, 2011
Re: Context-Free Grammars? What about arrays?
> Yes, they just happen to look identical: but that's the crux: How it
"looks" is the *only* thing that parser/grammar are concerned with.

> If it worked like this:
> <Array Decl> ::= <Type> '[' <Ident> ']' <Ident> ';'
> <Assoc Array Decl> ::= <Type> '[' <Ident> ']' <Ident> ';'
> ...*Then* it would no longer be context-free because the parser
would have to rely on the semantics of 'U' to determine how to parse
it.

Ahh that makes sense. Thank you for the great explanation! :)
Next ›   Last »
1 2
Top | Discussion index | About this forum | D home