stack example for parsing arithmetic expressions