3 ms·
Good point about "if you can do it in Java"... There's a "reprint" of Pratt's paper (of unclear copyright status) at <https://tdop.github.io/> https://tdop.git
by gnufx 9y ago
Good point about "if you can do it in Java"... There's a "reprint" of Pratt's paper (of unclear copyright status) at <https://tdop.github.io/> https://tdop.github.io/>. Classic examples are his CGOL syntax for Lisp <https://people.eecs.berkeley.edu/~fateman/cgol/cgol.1> https://people.eecs.berkeley.edu/~fateman/cgol/cgol.1> and Carrette's alternative reader for SIOD as a simpleer example <https://github.com/gjcarrette/siod/tree/master/winsiod> https://github.com/gjcarrette/siod/tree/master/winsiod>.
I used a variant long ago to implement a command line syntax for Scheme as an extension language. You can modify the dispatch so that juxtaposition acts as application (a pseudo operator with very low precedence) rather than raising an error. That allows mixfix or fully parenthesized forms interchangeably -- possibly with caveats I don't remember -- e.g.
foo 2*bar*i; baz
probably used at the REPL, reading as the form
(begin (foo (* 2 bar i)) (baz))
you'd probably use in scripts.