NB: cercare differenza tra compiler and transpiller
Tema Multipli
In general compilers parse file to produce tokens and using a lexer could check if file is well-formed.
tokens
lexer
That’s not trivial, so I limit to share some interesting links: