first of all, i love this. these are each a piece of poetry, beautiful in their simplicity.
the tcl.py uses a function `op` which appears to be a builtin, but i can't find it listed in Python's list of builtin functions, nor in the operator module. is this function documented?
I don't love the "simple" lexer for PL/0. Specifically, I don't think this
> m = re.match(r"(?P<num>[0-9]+)|(?P<op>[-+*/()<>=])|(?P<ws>\s+)|(?P<kw>begin|end\.|end|if|then|while|do|var|!|\?|call|procedure)|(?P<id>[a-zA-Z]+)|(?P<semi>;)|(?P<asgn>:=)|(?P<comma>,)", code)
can be called simple. APL's is similar but less complex.
Notably, however, the BASIC and LISP interpreters are* delightfully simple throughout.
God I love Python
first of all, i love this. these are each a piece of poetry, beautiful in their simplicity.
the tcl.py uses a function `op` which appears to be a builtin, but i can't find it listed in Python's list of builtin functions, nor in the operator module. is this function documented?
I don't love the "simple" lexer for PL/0. Specifically, I don't think this
> m = re.match(r"(?P<num>[0-9]+)|(?P<op>[-+*/()<>=])|(?P<ws>\s+)|(?P<kw>begin|end\.|end|if|then|while|do|var|!|\?|call|procedure)|(?P<id>[a-zA-Z]+)|(?P<semi>;)|(?P<asgn>:=)|(?P<comma>,)", code)
can be called simple. APL's is similar but less complex.
Notably, however, the BASIC and LISP interpreters are* delightfully simple throughout.
No, that's definitely simple. It's downright elegant, in fact.
It's a parameter passed to the tcl_m function it's enclosed in.
oh derp, i missed that. thanks. >.<