дошли до 1052-го символа symb=|

This commit is contained in:
Kolan Sh 2011-06-27 16:24:09 +04:00
parent 5ab84349b7
commit 64c18d6652
1 changed files with 29 additions and 7 deletions

View File

@ -273,27 +273,27 @@ int parse_table(const char *table_source, size_t len, struct table_s *table, str
break; break;
case IN_TAG_BEGIN: case IN_TAG_BEGIN:
if (isspace(c)) { if (c == '{' || c == '[') { // tag params
} else if (c == '{' || c == '[') { // tag params
where_stack[++tex_level] = IN_TAGPARM; where_stack[++tex_level] = IN_TAGPARM;
} else if (c == '\\') { // new tag } else if (c == '\\') { // new tag
tag = zfree_null(tag); tag = zfree_null(tag);
where_stack[tex_level] = IN_TAG; where_stack[tex_level] = IN_TAG;
if (FALSE) { // longtable
}
} else if (c == '%') { } else if (c == '%') {
where_stack[++tex_level] = IN_COMMENT; where_stack[++tex_level] = IN_COMMENT;
} else if (isspace(c)) { } else if (isspace(c)) {
where_stack[++tex_level] = IN_SPACE; where_stack[++tex_level] = IN_SPACE;
} else if (c == '}') {
where_stack[tex_level--] = IN_UNDEF;
} else if (isalnum(c) || c == '#') {
} else { } else {
error->code = (int)i; error->code = (int)i;
error->message = "unexpected symbol (IN_TAG_BEGIN)"; error->message = "unexpected symbol (IN_TAG_UNKNOWN)";
return error->code; return error->code;
} }
break; break;
@ -331,7 +331,29 @@ int parse_table(const char *table_source, size_t len, struct table_s *table, str
break; break;
case IN_TAG_TABULARNEWLINE: case IN_TAG_TABULARNEWLINE:
if (c == '{' || c == '[') { // tag params
where_stack[++tex_level] = IN_TAGPARM;
} else if (c == '\\') { // new tag
tag = zfree_null(tag);
where_stack[tex_level] = IN_TAG;
} else if (c == '%') {
where_stack[++tex_level] = IN_COMMENT;
} else if (isspace(c)) {
where_stack[++tex_level] = IN_SPACE;
} else if (c == '}') {
where_stack[tex_level--] = IN_UNDEF;
} else if (isalnum(c) || c == '#') {
} else {
error->code = (int)i;
error->message = "unexpected symbol (IN_TAG_UNKNOWN)";
return error->code;
}
break; break;
case IN_TAG_SLASH: case IN_TAG_SLASH: