rubyftable.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * 2007 Victor Hugo Borja <vic@rubyforge.org>
  3. * Copyright 2001-2007 Adrian Thurston <thurston@complang.org>
  4. */
  5. /* This file is part of Ragel.
  6. *
  7. * Ragel is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * Ragel is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with Ragel; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20. */
  21. #ifndef _RUBY_FTABCODEGEN_H
  22. #define _RUBY_FTABCODEGEN_H
  23. #include "rubytable.h"
  24. class RubyFTabCodeGen : public RubyTabCodeGen
  25. {
  26. public:
  27. RubyFTabCodeGen( ostream &out ): RubyTabCodeGen(out) {}
  28. protected:
  29. std::ostream &TO_STATE_ACTION_SWITCH();
  30. std::ostream &FROM_STATE_ACTION_SWITCH();
  31. std::ostream &EOF_ACTION_SWITCH();
  32. std::ostream &ACTION_SWITCH();
  33. void GOTO( ostream &out, int gotoDest, bool inFinish );
  34. void GOTO_EXPR( ostream &out, GenInlineItem *ilItem, bool inFinish );
  35. void CALL( ostream &out, int callDest, int targState, bool inFinish );
  36. void CALL_EXPR(ostream &out, GenInlineItem *ilItem, int targState, bool inFinish );
  37. void RET( ostream &out, bool inFinish );
  38. void BREAK( ostream &out, int targState );
  39. int TO_STATE_ACTION( RedStateAp *state );
  40. int FROM_STATE_ACTION( RedStateAp *state );
  41. int EOF_ACTION( RedStateAp *state );
  42. virtual int TRANS_ACTION( RedTransAp *trans );
  43. void writeData();
  44. void writeExec();
  45. void calcIndexSize();
  46. };
  47. /*
  48. * Local Variables:
  49. * mode: c++
  50. * indent-tabs-mode: 1
  51. * c-file-style: "bsd"
  52. * End:
  53. */
  54. #endif