Issue 1312: Keyword Identifiers(03) (obv-rtf) Source: (, ) Nature: Uncategorized Issue Severity: Summary: Summary: The Objects By Value (OBV) Specification (orbos/98-01-18) introduced the concept of "keyword identifiers" in an effort to avoid breaking existing IDL specifications. It specifies that a keyword identifier is a word that is treated as a keyword only when used in a keyword context, and is otherwise treated as a regular identifier. 3) It allows IDL specifications that, while not unparseable, are highly ambiguous, especially to a human reader. For example, Jeff recently posted answers on how the following is to be parsed, but there is no way that someone reading the OBV spec would be able to figure out the rules he gave: interface public { ... }; interface custom { ... }; value safe { ... }; value foo : safe { ... }; // Is this legal or an error? value foo2 : safe safe { ... }; // What about this? value foo3 { public x; // Is this legal or an error? public public y; // What about this? custom value(); // Is this a valid operation or a syntax error? }; While all of these constructs can all be parsed using the appropriate number of look-ahead tokens (by the way, the grammar is *not* LALR(1) as the OBV Spec suggests), it is hard to read and even harder to parse correctly. Many IDL compilers still fail to properly implement the name lookup rules in the existing CORBA specification, and adding keyword identifiers will only make that situation much worse. Resolution: Revised Text: Actions taken: May 8, 1998: received issue July 30, 1998: closed issue Discussion: End of Annotations:===== Return-Path: X-Sender: vinoski@mail.boston.iona.ie Date: Thu, 07 May 1998 17:44:17 -0400 To: obv-rtf@omg.org, issues@omg.org From: Steve Vinoski Subject: let's lose keyword identifiers The Objects By Value (OBV) Specification (orbos/98-01-18) introduced the concept of "keyword identifiers" in an effort to avoid breaking existing IDL specifications. It specifies that a keyword identifier is a word that is treated as a keyword only when used in a keyword context, and is otherwise treated as a regular identifier. As a solution, keyword identifiers create a significant long-term penalty in order to correct a short-term problem. They raise more issues than they solve: 3) It allows IDL specifications that, while not unparseable, are highly ambiguous, especially to a human reader. For example, Jeff recently posted answers on how the following is to be parsed, but there is no way that someone reading the OBV spec would be able to figure out the rules he gave: interface public { ... }; interface custom { ... }; value safe { ... }; value foo : safe { ... }; // Is this legal or an error? value foo2 : safe safe { ... }; // What about this? value foo3 { public x; // Is this legal or an error? public public y; // What about this? custom value(); // Is this a valid operation or a syntax error? }; While all of these constructs can all be parsed using the appropriate number of look-ahead tokens (by the way, the grammar is *not* LALR(1) as the OBV Spec suggests), it is hard to read and even harder to parse correctly. Many IDL compilers still fail to properly implement the name lookup rules in the existing CORBA specification, and adding keyword identifiers will only make that situation much worse.