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