Parsing/RPN calculator algorithm: Difference between revisions

(Added Quackery.)
Line 4,207:
<code>[ build do ] is quackery ( $ --> [ )</code>, which neatly sums up the language.
 
Here we dointerpret therather samethan thingcompile the explicitlycode, using a <code>switch</code> statement (not actually defined in Quackery, so the code to define it is included), and using the provided ancillary stack <code>temp</code> to make the stack activity explicit.
 
(If the gentle gatekeepers will permit a moment of shameless self-promotion… If you are interested in stack processors or concatenative languages, you may wish to consider that Quackery was designed with the intent of being an entry level language suitable for educational and hobbyist use, accessible at the code level by virtue of being coded in (mostly) non-idiomatic Python (24k source) and Quackery (another 24k of course) with the Python code emphasising a straightforward approach and the use of simple algorithms for the sake of legibility in preference to efficiency.)
1,462

edits