mlfgoto.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright 2001-2006 Adrian Thurston <thurston@complang.org>
  3. * 2004 Erich Ocean <eric.ocean@ampede.com>
  4. * 2005 Alan West <alan@alanz.com>
  5. */
  6. /* This file is part of Ragel.
  7. *
  8. * Ragel is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * Ragel is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with Ragel; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  21. */
  22. #ifndef _MLFGOTO_H
  23. #define _MLFGOTO_H
  24. #include <iostream>
  25. #include "mlgoto.h"
  26. /*
  27. * class OCamlFGotoCodeGen
  28. */
  29. class OCamlFGotoCodeGen : virtual public OCamlGotoCodeGen
  30. {
  31. public:
  32. OCamlFGotoCodeGen( ostream &out ) : OCamlCodeGen(out), OCamlGotoCodeGen(out) {}
  33. std::ostream &EXEC_ACTIONS();
  34. std::ostream &TO_STATE_ACTION_SWITCH();
  35. std::ostream &FROM_STATE_ACTION_SWITCH();
  36. std::ostream &FINISH_CASES();
  37. std::ostream &EOF_ACTION_SWITCH();
  38. unsigned int TO_STATE_ACTION( RedStateAp *state );
  39. unsigned int FROM_STATE_ACTION( RedStateAp *state );
  40. unsigned int EOF_ACTION( RedStateAp *state );
  41. virtual void writeData();
  42. virtual void writeExec();
  43. };
  44. #endif