[NTG-context] Grammar to parse TeX input?

Joseph Canedo josephcanedo at gmail.com
Mon Nov 26 15:19:21 CET 2018

Dear list,

I use a buffer to make some text processing. That text contains TeX macros etc… and I’d like to know if there is some feature in lua to parse the text to extract bits which macros, normal text etc… ? 

Best regards


Example of pseudo MWE follows.


function zzz_function(text)
- How to process ‘text’ to get bits which are macros, groups etc… ? Eventually expanded ?




\input knuth

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20181126/265fa725/attachment.html>

More information about the ntg-context mailing list