private void init()
			throws FileNotFoundException, 
				IllegalStateException,
				IOException
	{
		if(this.filename == null && 
				this.scalarref == null &&
				this.arrayref == null &&
				this.filehandle == null)
			throw new FileNotFoundException("template filename required");
		
		Util.debug = this.debug;

		params.put("__template__", "true");

		String [] parser_params = {
			"case_sensitive", 	stringify(case_sensitive),
			"strict", 		stringify(strict),
			"loop_context_vars", 	stringify(loop_context_vars),
			"global_vars", 		stringify(global_vars)
		};

		parser = new Parser(parser_params);

		if(this.filename != null)
			read_file(filename);
		else if(this.arrayref != null)
			read_line_array(this.arrayref);
		else if(this.scalarref != null)
			read_line(this.scalarref);
		else if(this.filehandle != null)
			read_fh(this.filehandle);

		if(!elements.empty())
			System.err.println("stack not empty");
	}