Imagine a language that always allows the programmer to declare a identifier to be a reserved keyword; the syntactic feature using that reserved word becomes unavailable in the static scope of the identifier. On one hand, this is an elegant solution to the problem of future versions of a language making a currently valid identifier into a future reserved word (for example with "enum" in Java). On the other hand, the grammar is no longer context-free.
No comments :
Post a Comment