Using a single double and different int's for various types of parentheses, without stack how to check for balanced parentheses with mod? E.g.,
in: {[(a])c}; reads only parenthetical chars, uses double stack=0 as stack emulator; int correspondence: []: 4; {}: 5; (): 3; read each char, if opening parenthesis, push (i.e., use corresponding int value to alter stack: I'm not sure how exactly, could be simply by adding its value); if closing, pop (i.e., use % to determine last pushed parenthetical type, and if it matches, do something like subtract its value from stack). if stack==0 out: balanced.
Somebody showed this, but I'm not clear on details.