-# define YYSTACK_ALLOC malloc
-# define YYSTACK_FREE(Ptr) free (Ptr)
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
+# ifdef __cplusplus
+# include <cstdlib> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T std::size_t
+# define YYSTACK_ALLOC std::malloc
+# define YYSTACK_FREE std::free
+# else
+# ifdef __STDC__
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# endif
+# define YYSTACK_ALLOC malloc
+# define YYSTACK_FREE free