Formula Recognition Stack