code: def p_sgn(p):
      
      sgn = lambda x: x < 0 and -1 or x > 0 and 1 or 0  # noqa
  
      if p[2].type_ == TYPE.string:
          syntax_error(p.lineno(1), "Expected a numeric expression, got TYPE.string instead")
          p[0] = None
      else:
          if is_unsigned(p[2]) and not is_number(p[2]):
              warning(p.lineno(1), "Sign of unsigned value is always 0 or 1")
  
          p[0] = make_builtin(p.lineno(1), 'SGN', p[2], lambda x: sgn(x), type_=TYPE.byte_)
docs: bexpr : SGN bexpr %prec UMINUS