 		var category = null;
 		var ifdefs = [];
 		var ifndefs = [];
+		var prefix = [];
 		var decls = [];
 		var methods = [];
 		var prologue = null;

			s.push(st.ifndef_text);
		s.push("namespace avmplus {");

		s.push("class " + classname + " : public Selftest {");
        s.push("public:");
		s.push(classname + "(AvmCore* core);");

				state = 1;
				st.ifndefs.push(res[1]);
			}
			else if (line.match(/^\s*%%prefix/)) {
				if (state > 2)
					throw "Too late to define prefix";
			    state = 2;
				st.prefix = text();
				state = 3;
			}
			else if (line.match(/^\s*%%decls/)) {
				state = 3;
				pushMultiple(st.decls, text());
			}
			else if (line.match(/^\s*%%methods/)) {
				state = 3;
				pushMultiple(st.methods, text());
			}
			else if (line.match(/^\s*%%prologue/)) {
				state = 3;
				if (st.prologue != null)
					throw "Prologue already defined";
				st.prologue = text();
			}
			else if (line.match(/^\s*%%epilogue/)) {
				state = 3;
				if (st.epilogue != null)
					throw "Epilogue already defined";
				st.epilogue = text();
			}
			else if (res = /^\s*%%test\s+([a-zA-Z_][a-zA-Z0-9_]+)\s*$/.exec(line)) {
				state = 3;
				var loc = i;
				var t = [];
				var vs = 0;
