symbol lookup in pattern production