I checked in some major changes that allow all keywords (types and if, null, etc.) as identifiers. Cleanup and maybe a refactor will follow later. kjs
On Wed, Sep 3, 2008 at 10:35 AM, Allison Randal <[EMAIL PROTECTED]> wrote: > Klaas-Jan Stol wrote: > >> On Tue, Sep 2, 2008 at 2:28 PM, Allison Randal <[EMAIL PROTECTED]> wrote: >> >>> >>> I'm not clear on why we need to reserve 'if', 'unless' and 'null' either, >>> since they never appear in locations that could be confused with >>> variables. >>> >> >> there's not a strict reason, no. In fact, it would be possible to allow >> them, although the implementation of that will require a number of special >> cases in the grammar (but doable, as far as my experiments showed me). >> > > We're marking them as a special case now to treat them as reserved words. > > The >> only concern would be (as Andrew indicated as well), that you could write: >> >> if null null goto goto >> >> if you had declared null and goto as .locals. >> > > That's more of a stylistic custom than something to enforce in the parser. > > But, like I said, this definitely isn't an urgent modification, just a > general matter of clarity and consistency in PIR. > > Allison >