In build_parse_table, switch recursion to explicit iteration