views:

36

answers:

1
A: 

It appears as though you are not returning anything on this line:

[ \t]+     { context = strdup(yytext); fwrite(context, sizeof(char), strlen(context), yyout); }

Without returning anything, it doesn't seem as though it would be recognized as a token, and thus would be ignored.

I'm not 100% sure however. I'm a little confused by your use of the variable "context" (which also seems to be a valid token?), but at any rate that may be your problem.

Stargazer712
@Stargazer712 context is just a local const char that i use to temp store the value so i can write it back to the file to maintain the file structure for space, tabs and html. Also thanx for the response, the reason I didn't return anything is because I still want to ignore the white space, but should i be returning something like *yytext?
Wattz