[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Doc for lua.c interpreter
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 16 Jun 2006 21:37:39 -0300
> However, I don't really understand how the interpreter works. All I need is
> a good documentation. Does anyone know where to get the info if available?
No, the source is the only doc. lua.c is really pretty straighforward,
except that it is very careful with error handling, in many ways:
- It makes sure that the whole thing is run inside a cpcall, which means
that all errors get caught.
- When run interactively, it tests whether the user has entered a complete
statement and issues a secondary prompt if not. It does that by trying
to compile the lines entered by the user and checking for a <eof> error.
- It handles control-C interrupts by setting a signal handler.
Since a signal handler cannot do much, it just sets a hook on all
possible events so that it can interrupt the execution.
If you have any specific questions, please post.
--lhf