def p_ordinary_symbols(p):
    """expression : PLUS
                  | MINUS
                  | DIVIDE
                  | TIMES
                  | DTIMES
                  | ID
                  | NUMBER
                  | COMMA
                  | EXCL
                  | MOD
                  | EQ
                  | UP LBRACE expression RBRACE
                  """
    translate = {'\\infty': 'infty', '\\times': '*'}
    if p[1] == '\\%':
        p[0] = '% '
    elif p[1] == '^':
        p[0] = '^(%s) ' % p[3]
    else:
        p[0] = '%s ' % translate.get(p[1], p[1])
