lua-users home
lua-l archive

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


Hi,
is there somewhere some list of the error messages used by Lua?

In luac.c there is a function named "incomplete" which contains the following code:

#define EOFMARK "<eof>"
#define marklen (sizeof(EOFMARK)/sizeof(char) - 1)
...
if (lmsg >= marklen && strcmp(msg + lmsg - marklen, EOFMARK) == 0) {
...

... so this seems to check, whether the last error message seems to terminate with the characters "<eof>"... Is there some "reasonable" way for me to find out, where in source code this error mesage with <eof> at the end is produced by Lua?

I looked for "<eof>" in the lua source code c/h files, but it only seems to appear in llex.c as reserved token in the string list luaX_tokens... so I am a bit mixed up how I should I find this error message.

(it is not VERY urgent, but I would anyway be curious to find this out).

(anyway this luaX_tokens list of reserved workds is a bit longer than the reserved word list int he reference manual, chapter 3.1: It further contains the following 5 strings as reserved words: "<eof>", "<number>", "<integer>", "<name>", "<string>" ... but I do not really see in the reference manual where those are really used... . (Looking of "<eof>" in the reference manual gives no result...).