lua-users home
lua-l archive

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


Hi everyone,
 
I have a really quick OT question for you guys. I really like Lua, I enjoy scripting in it, but being the curious fellow that I am, I force myself to learn how everything that I use works, thus, through my use of Lua I am attempting to learn how to write my own programming language, as sort of an "I knew I could actually do it" sort of situation. This language is not meant for distribution, and is simply to see if I can do it. I of course could just copy the entire Lua lexer/parser/generator/vm, but that would teach me nothing. Instead, I would like to know if any of you had any recommendations for good books to read to learn about writing a programming or scripting language.
 
I understand the lexing and parsing part of the process (I think at least, Lua is a LR(1) parser right? Left->right, one lookahead token? That is what I got from looking at the code and given my understanding of that kind of parser. Lua on the other hand doesn't seem to use the shift/reduce methodology, or I am just missing something entirely, but anyways, this is off on a tangent ;).
 
I really need a decent book on the parsing -> code generation -> VM part of it all, or at least some good resources on the net to read. Lua's style is fine, as is a register based VM setup. I am not out ot learn the way that EVERY language works, just why Lua works internally the way it does :) If there are any "Golden Books" of language creation (like The C++ Language is a "Golden Book" for any C++ programmer, because its kind of a de factor standard book to own), I would like to pick them up :)
 
Thanks in advance guys, and thanks for tolerating my odd ramblings :)
 
Matt "Kerion" Holmes