fix `non-terminal without a type is expected` error