From 458478747011493391
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,a96d3826c7356af2
X-Google-Attributes: gidf78e5,public
From: Steve Clamage <stephen.clamage@Eng.Sun.COM>
Subject: Re: Semantic-context keywords (was Re: Global "if" statement?)
Date: 1997/05/06
Message-ID: <336F6D40.74E6@Eng.Sun.COM>#1/1
X-Deja-AN: 239911858
References: <3366E8FF.3E38@ix.netcom.com> <5kb7if$b6q@fs7.ece.cmu.edu> <5kfha7$1s9@mulga.cs.mu.OZ.AU> <5kl75e$mbn@fs7.ece.cmu.edu>
X-Original-Date: Tue, 06 May 1997 10:41:20 -0700
Organization: Sun Microsystems, Inc.
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUBM2+Nkky4NqrwXLNJAQF3VgH/cXgsYlEA7busoHEKCGH4zgmgg0I2oBPA WosTqMVabGM6n0s2UD8ByK/KHu5QTp5vkvANT4oid3x/lGM0KTpkqQ== =zBB4
Newsgroups: comp.std.c++
Originator: austern@isolde.mti.sgi.com


David A. Cuthbert wrote:
> 
>
> Which brings me to another question:  what are the guidelines that the
> C++ committee followed concering syntax parsers?  Would it have
> complicated compilers much if certain keywords were reserved only in
> specific contexts?  Consider an alternate form of declaring a const
> virtual method:
> 
> int  myMethod(int, char)  is(const, virtual);
> 
> That is, create a new keyword, "is," and allow virtual to be used like
> any other variable outside of the is() directive.
> 
> No, I'm not proposing this for C++; just curious as to the issues
> involved.

As best I remember, no one ever seriously considered keywords that
weren't always reserved. Parsing C++ is already difficult, and adding
unnecessary complications isn't going to win any votes. Error reporting
is also better when the program context does not affect which words
are keywords.

-- 
Steve Clamage, stephen.clamage@eng.sun.com
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu 
]



