Hacker News new | ask | show | jobs
by zweep 2306 days ago
What does context-free syntax mean? And what does “you cannot parse it” mean? Meaning you can’t stream it, you need the whole file first?
2 comments

Tex is like a programming language, you have to "run" the program to generate output, and that execution is tightly tied to producing output on paper pages. This means it is extremely difficult to produce good looking HTML, or accessible output.
Context free means that the language/program can be described using a "context free grammar": https://en.wikipedia.org/wiki/Context-free_grammar.

Context free grammars are more expressive than regular expressions, but less expressive than full-blown programming languages.

If you've got a spare 100 or so hours and you're interested in learning more, there's a good lecture series on YouTube about this stuff: https://www.youtube.com/watch?v=TOsMcgIK95k&list=PLbtzT1TYeo...