lua-users home
lua-l archive

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




On Wed, 9 Mar 2011, Leo Razoumov 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.

Implementing this in a hand-written parser such as the one used by Lua is left as an exercise for the reader :-)

Ge'