cssplit.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright 2006 Adrian Thurston <thurston@complang.org>
  3. */
  4. /* This file is part of Ragel.
  5. *
  6. * Ragel is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * Ragel is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with Ragel; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. */
  20. #ifndef _SPLITCODEGEN_H
  21. #define _SPLITCODEGEN_H
  22. #include "csipgoto.h"
  23. class CSharpSplitCodeGen : public CSharpIpGotoCodeGen
  24. {
  25. public:
  26. CSharpSplitCodeGen( ostream &out ) : CSharpFsmCodeGen(out), CSharpIpGotoCodeGen(out) {}
  27. bool ptOutLabelUsed;
  28. std::ostream &PART_MAP();
  29. std::ostream &EXIT_STATES( int partition );
  30. std::ostream &PART_TRANS( int partition );
  31. std::ostream &TRANS_GOTO( RedTransAp *trans, int level );
  32. void GOTO_HEADER( RedStateAp *state, bool stateInPartition );
  33. std::ostream &STATE_GOTOS( int partition );
  34. std::ostream &PARTITION( int partition );
  35. std::ostream &ALL_PARTITIONS();
  36. void writeData();
  37. void writeExec();
  38. void writeParts();
  39. void setLabelsNeeded( RedStateAp *fromState, GenInlineList *inlineList );
  40. void setLabelsNeeded( RedStateAp *fromState, RedTransAp *trans );
  41. void setLabelsNeeded();
  42. int currentPartition;
  43. };
  44. #endif