lua-users home
lua-l archive

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


> "Luiz Henrique de Figueiredo" wrote:

> > "Markus Huber" wrote:

> > > "Gavin Wraith" wrote:

> > I have tested and found that also possible are the characters ?!$@

> Really? You tested it?

Yes.

> What version and what platform?

RISC OS

> If this is right, it seems to me that it's a bug in locale...

> > > The possibility of using @!?$ is a feature of RiscLua, not Lua
> > > proper.

> > Whoops! The discussion group doesn't understand my question :-)

> > > RiscLua deviates from Lua both in this particular

> > I should read the difference manual again.

> > > and also in allowing hexadecimal literal numbers.

> > I have read this...

> > >  As I think I stated in the documentation, you must avoid 
> > > these features if you want your Lua script to be portable.

> > Yes. I will avoid that. Sometimes with @!?$ sometimes without is a
> > little bit confusing.

> > > As Lua does not at present have any special syntactic use
> > > for these extra symbols

> > I think it would be better to use a special char for Luas special
> > variables but only if comptaible with all versions. The authors
> > doesn't think not so and now its done. _<uppercase> seems not very Lua
> > clever. Instead @<A-Z a-z 0-9 _> for special vars to be stringent
> > with the identifier definition. Then the next possible step is that
> > all identifiers with @... are case insensitive. So I can use @Error
> > and @error without any difference and everyone can write special
> > variables/identifiers in his/her prefered style.

> > > I decided it would do no harm to modify the parser to allow them,
> > > but of course it is NOT Lua, and users are advised to stick with
> > > the Lua constraints on identifiers.

> > Thank you for your explanation.

> Accented chars are allowed if the locale says they are letters. The
> lexer simply uses isalnum.

> Anyway. If you want your Lua programs to be portable, then you cannot
> use those characters, and have to stick to _ 0-9 A-Z a-z.

I will do that. Thank you for your help.


Markus