char *
hashline_number(void)
{ /* do not print line numbers if we are in debug mode */ if (input_filename #ifdef YYDEBUG
&& !base_yydebug #endif
)
{ /* "* 2" here is for escaping '\' and '"' below */ char *line = loc_alloc(strlen("\n#line %d \"%s\"\n") + sizeof(int) * CHAR_BIT * 10 / 3 + strlen(input_filename) * 2); char *src,
*dest;
sprintf(line, "\n#line %d \"", base_yylineno);
src = input_filename;
dest = line + strlen(line); while (*src)
{ if (*src == '\\' || *src == '"')
*dest++ = '\\';
*dest++ = *src++;
}
*dest = '\0';
strcat(dest, "\"\n");
staticvoid
output_escaped_str(constchar *str, bool quoted)
{ int i = 0; int len = strlen(str);
if (quoted && str[0] == '"' && str[len - 1] == '"') /* do not escape quotes *atbeginningandend
* if quoted string */
{
i = 1;
len--;
fputs("\"", base_yyout);
}
/* output this char by char as we have to filter " and \n */ for (; i < len; i++)
{ if (str[i] == '"')
fputs("\\\"", base_yyout); elseif (str[i] == '\n')
fputs("\\\n", base_yyout); elseif (str[i] == '\\')
{ int j = i;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.