<div dir="ltr"><div><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 28, 2013 at 3:04 PM, Sensei <span dir="ltr"><<a href="mailto:senseiwa@gmail.com" target="_blank">senseiwa@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br><div class="im">
<br></div>
Pardon me, but I'm used to write code in C, assembly, C++, or whatever other programming language (mainly those three, in that order). TeX is very, very different.<br>
<br>
</blockquote></div>Another option is to download the source of luatex, compile it with the --debug switch<br></div><div class="gmail_extra">and then run luatex with gdb.  <br></div><div class="gmail_extra">Probably (not evidently nor obviously)  you need a format: you can install a context standalone which has a plain fmt easy to build.<br>
</div><div class="gmail_extra">TeX is a procedural markup  language where everything, even a character,   is a procedure (or macro ), <br></div><div class="gmail_extra">luatex, pdftex,xetex,etex are interpreters of TeX with some differences on the languages accepted, <br>
but basically they all are Syntax-Directed Interpreters: a big switch/case inside a while that dispatches the tokens from the lexer <br>to the right subroutines (iirc it's called main_control in maincontrol.w, the cweb file).<br>
</div><div class="gmail_extra">The main difference from others similar languages probably is the fact that the user can modify the meaning of the tokens,<br></div><div class="gmail_extra">more or less as if  were able to modify the keywords of C --- so  TeX is a kind of meta SDI ; <br>
also it's carefully designed to be platform independent (but as  say previously you should see<br></div><div class="gmail_extra"></div><div class="gmail_extra"><a href="http://www.tug.org/texinfohtml/web2c.html#Memory-dumps">http://www.tug.org/texinfohtml/web2c.html#Memory-dumps</a>) <br>
</div><div class="gmail_extra">With  a debugged version of luatex , the plain format from standalone and test.tex like<br>Hello\bye<br>you can see TeX in action running gdb with<br clear="all"></div><div class="gmail_extra">
luatex --fmt=luatex-plain.fmt test.tex<br></div><br></div><br><div>-- <br><div class="gmail_extra">luigi<br>
</div></div></div>