gotablish.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 _GOTABLISH_H
  23. #define _GOTABLISH_H
  24. #include "gocodegen.h"
  25. class GoTablishCodeGen
  26. : public GoCodeGen
  27. {
  28. public:
  29. GoTablishCodeGen( ostream &out )
  30. : GoCodeGen(out) {}
  31. protected:
  32. virtual void GOTO( ostream &ret, int gotoDest, bool inFinish );
  33. virtual void CALL( ostream &ret, int callDest, int targState, bool inFinish );
  34. virtual void NEXT( ostream &ret, int nextDest, bool inFinish );
  35. virtual void GOTO_EXPR( ostream &ret, GenInlineItem *ilItem, bool inFinish );
  36. virtual void NEXT_EXPR( ostream &ret, GenInlineItem *ilItem, bool inFinish );
  37. virtual void CALL_EXPR( ostream &ret, GenInlineItem *ilItem, int targState, bool inFinish );
  38. virtual void CURS( ostream &ret, bool inFinish );
  39. virtual void TARGS( ostream &ret, bool inFinish, int targState );
  40. virtual void RET( ostream &ret, bool inFinish );
  41. virtual void BREAK( ostream &ret, int targState, bool csForced );
  42. };
  43. #endif