lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 09/03/11 18:53, Gé Weijers wrote:
[...]
>> Implementing such behavior might be possible but it will make
>> parser/lexer more complicated and could alter Lua grammar.
>> Out of curiosity, are there languages around that allow keyword tokens
>> to be used as variables, strings, etc ?
> 
> PL/I was mentioned. I believe SQL also allows the use of keywords as
> identifiers.

Algol-68, of course; one of its transcription modes effectively
distinguishes keywords from identifiers by font.

Smalltalk, but that's slightly cheating as it doesn't have any keywords
(all syntactical elements are non-alphanumeric symbols).

-- 
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│
│ "I have a mind like a steel trap. It's rusty and full of dead mice."
│ --- Anonymous, on rasfc

Attachment: signature.asc
Description: OpenPGP digital signature