[luatex] Hash tokens meaning
luigi scarso
luigi.scarso at gmail.com
Tue May 28 17:53:12 CEST 2013
On Tue, May 28, 2013 at 3:04 PM, Sensei <senseiwa at gmail.com> wrote:
>
>
> 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.
>
> Another option is to download the source of luatex, compile it with the
--debug switch
and then run luatex with gdb.
Probably (not evidently nor obviously) you need a format: you can install
a context standalone which has a plain fmt easy to build.
TeX is a procedural markup language where everything, even a character,
is a procedure (or macro ),
luatex, pdftex,xetex,etex are interpreters of TeX with some differences on
the languages accepted,
but basically they all are Syntax-Directed Interpreters: a big switch/case
inside a while that dispatches the tokens from the lexer
to the right subroutines (iirc it's called main_control in maincontrol.w,
the cweb file).
The main difference from others similar languages probably is the fact that
the user can modify the meaning of the tokens,
more or less as if were able to modify the keywords of C --- so TeX is a
kind of meta SDI ;
also it's carefully designed to be platform independent (but as say
previously you should see
http://www.tug.org/texinfohtml/web2c.html#Memory-dumps)
With a debugged version of luatex , the plain format from standalone and
test.tex like
Hello\bye
you can see TeX in action running gdb with
luatex --fmt=luatex-plain.fmt test.tex
--
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/luatex/attachments/20130528/13b4f337/attachment.html>
More information about the luatex
mailing list