def p_string(self, p): """ string : STRING_LITERAL """ p[0] = Constant("string", p[1], coord=self._token_coord(p, 1))
def p_character_constant(self, p): """ char_const : CHAR_CONST """ p[0] = Constant("char", p[1], coord=self._token_coord(p, 1))
def p_floating_constant(self, p): """ float_const : FLOAT_CONST """ p[0] = Constant("float", p[1], coord=self._token_coord(p, 1))
def p_int_constant(self, p): """ int_const : INT_CONST """ p[0] = Constant("int", p[1], coord=self._token_coord(p, 1))