3 ms·
If you use something like Lisp's syntax, then writing a parser is pretty simple: http://blog.fogus.me/2008/07/22/broccoli-v022-bellwitch/ http://blog.fogus.me/
by stcredzero 18y ago
If you use something like Lisp's syntax, then writing a parser is pretty simple:
http://blog.fogus.me/2008/07/22/broccoli-v022-bellwitch/ http://blog.fogus.me/2008/07/22/broccoli-v022-bellwitch/
Smalltalk has only about 8 terminals and nonterminals in its grammar. You can hand code a top-down parser for it in an afternoon.
Then there's always Forth.
- nostrademons 18y agoLexing/parsing is one of the easiest parts of writing a compiler these days. With a parser generator, it shouldn't take you more than a couple days to write the lexer and parser for a moderately-complex language. I second the comments up-thread about error-reporting being the hardest part of a real compiler.