Waitrud Weber’s blog

things and reminders for memories

Code Analyzer: html : windows-make: we should create the schema on one demention.

We've created the code block.e've created the code block.When you'd like to use any other block of logic like you try to create trees as html has tree or itself, you should create on the same case code block on one demention like "case 70:".

html(itself: like table)

|- tbody

|- tr

|- td

case70: html <- (parameter: html)

break;

case71: html->childre[ index ] <- (parameters: tbody)

break;

 

#include 

int main () {

	char char_html[69][255] = { "html", "script", "body", "input", "font", "div", "span", "table", "td", "tr", "tbody", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " " };

	for ( int i = 0; i<45; i++ ) {
		printf("extern void baselootin_%03d (HTML *html, char* match=\"%s\");\r\n", i, char_html[i]  );
	}

	printf("\r\n\r\n");

	for ( int i = 0; i<45; i++ ) {
		printf("void baselootin_%03d (HTML *html, char* match=\"%s\");\r\n", i, char_html[i] );
	}

	printf("\r\n\r\n");

	for ( int i = 0; i<45; i++ ) {
		printf("case %d:\r\n", i );
		printf("	baselootin_%03d((HTML *)html, (char*)\"%s\");\r\n", i, char_html[i] );
		printf("	break;\r\n");
	}

	printf("\r\n\r\n");

	for ( int i = 0; i<45; i++ ) {
		printf("void baselootin_%03d (HTML *html, char* match=\"%s\") {\r\n", i, char_html[i] );
		printf("	printf(\"baselootin_%03d: starts.\\r\\n\");\r\n", i );
		printf("	dummy_html = (HTML*) new HTML((char*)\"%s\");\r\n", char_html[i] );
		printf("	printf(\"baselootin_%03d: ends.\\r\\n\");\r\n", i );
		printf("}\r\n\r\n");
	}
	return 0;
}

 

void baselootin_000 (HTML *html, char* match="html") {
	printf("baselootin_000: starts.\r\n");
	dummy_html = (HTML*) new HTML((char*)"html");
	printf("baselootin_000: ends.\r\n");
}