I want to write a LaTeX-TeX parser to manipulate .tex
files for a program. I found this question here How does a TeX engine read and render the input stream? which explains how everything works under the hood for TeX.
How is this process implemented in a LaTeX/TeX engine (for instance PDFTeX) ?
I want to know where I could find the source code for this particular part of a tex engine (LuaTeX or XeTeX would do the job too).
[UPDATE] I found some answer here too : Four TeX processors (as described in TeX by Topic)
texdoc tex
which is the documentation of the original TeX engine's source code, but it's still difficult to parse. The most accessible one would be TeXbook. (or TeX by Topic which covers the primitives.) See also package writing - Where do I start LaTeX programming? - TeX - LaTeX Stack Exchange