2 ms·
Unless you need to for speed or compat reasons, I don't like writing parsers in C. Remember, a compiler is a translator from text to (often)text. You're going
by Locke1689 14y ago
Unless you need to for speed or compat reasons, I don't like writing parsers in C.
Remember, a compiler is a translator from text to (often)text. You're going to be dealing with a lot of strings and probably allocations for your AST. You should think about using a language which doesn't make string manipulation and memory management like pulling teeth.
In general, I'd say the ML family is best for writing a general-purpose compiler. SML even gives your compiler a formal semantics for free.