đź“ťUser-programmable language parser

Some languages allow the user to program the language parser itself.

Examples

  • Common Lisp has *readtable* (Common Lisp: readtable) that allows to specify a parser function for any character.

  • Racket allow allows using different parsers (“languages”) with #lang.

  • Forth allows adding new “compiling words” to the dictionary that execute behavior at compile-time, which may include reading from input stream.