Justine mastered 42 programming languages to develop a syntax highlighter for llamafile. Surprising insights include tackling C’s trigraphs, Haskell’s nested comments, and Tcl’s use of quotes in identifiers. Notable expectations subverted are JavaScript’s regex syntax, and FORTH’s simplicity that stumps humans. Delving into COBOL and FORTRAN, one can envision an AI interpreter writing punch card code. Lua’s innovative approach to multi-line strings stands out, as well as Swift’s unique handling of embedded strings. The methodical breakdown of syntax rules makes the highlighter a robust tool, showcasing Justine’s extensive expertise.
https://justine.lol/lex/