Parsing/RPN to infix conversion: Difference between revisions

m
Line 152:
 
Slavishly (mostly) follows TCL example, but instead of lists it uses strings. Except for the stack, which uses an array, of course.
 
The kludge is prepending the precedence on the front of the expressions stored on the stack. This shows up when the tail() function is used, and when 'x' is prepended as a placeholder when adding parenthesis.
 
<lang awk>#!/usr/bin/awk -f