Example #1
0
 def p_constant_2(self, p):
     """ constant    :  EMPTY
                     |  WALL
                     |  BOX
                     |  EXIT
     """
     p[0] = tree.Constant('cell', p[1], self._token_coord(p, 1))
Example #2
0
 def p_constant_5(self, p):
     """ constant    : UNDEF
     """
     p[0] = tree.Constant('extra_bool', p[1], self._token_coord(p, 1))
Example #3
0
 def p_constant_4(self, p):
     """ constant    : TRUE
                     | FALSE
     """
     p[0] = tree.Constant('bool', p[1], self._token_coord(p, 1))
Example #4
0
 def p_constant_3(self, p):
     """ constant    : INF
                     | MINUS INF
                     | NAN
     """
     p[0] = tree.Constant('extra_int', p[1], self._token_coord(p, 1))
Example #5
0
 def p_constant_1(self, p):
     """ constant    : INT_CONST
     """
     p[0] = tree.Constant('int', p[1], self._token_coord(p, 1))