/*
  defines the bod_cut_parser - class that can parse bod format and create 
  bob_dom_cut object
*/

#ifndef BOD_CUT_PARSER_INCLUDED
#define BOD_CUT_PARSER_INCLUDED

#include "bod_bob_parser.h"
#include "bob_dom_cut.h"
#include "settings.h"

class bod_cut_parser : public bod_bob_parser
{
	private:
		bob_dom_path * loadPath(bob_dom_cut *cut, token_stream& is);
		bool loadNote(bob_dom_path *path, token_stream& is);
		bool loadFrame(bob_dom_path *path, token_stream& is);
		
		bob_dom_cut * loadCUT(token_stream& is, bob_dom_obinaryfilestream *os, bool bDirectOutput);
		bool loadTCBInfo(token_stream& is, bob_dom_frame::tcb_info *info);

	public:
		bod_cut_parser(const Settings *settings) : bod_bob_parser(settings) {}
		
		bob_dom_cut * loadCUT(token_stream& is);
		bool compile(token_stream& is, bob_dom_obinaryfilestream& os);
};

#endif // !defined(BOD_CUT_PARSER_INCLUDED)