better with object_stack but still not correct
This commit is contained in:
parent
a81c73dc23
commit
1e1bcf1236
|
@ -122,38 +122,41 @@ void tex_parse(const char *source, size_t len, struct tex_struct_s **tex_struct,
|
||||||
else if (!strcmp(tag, TEX_TAG_TABULARNEWLINE)) {
|
else if (!strcmp(tag, TEX_TAG_TABULARNEWLINE)) {
|
||||||
where_stack[tex_level] = IN_TAG_TABULARNEWLINE;
|
where_stack[tex_level] = IN_TAG_TABULARNEWLINE;
|
||||||
|
|
||||||
} else if (!strcmp(tag, TEX_TAG_ENDFIRSTHEAD)) {
|
} else {
|
||||||
// subtable is first header - some actions here...
|
if (!strcmp(tag, TEX_TAG_ENDFIRSTHEAD)) {
|
||||||
object_stack[obj_level] = OBJ_TABLE_SUBTABLE;
|
// subtable is first header - some actions here...
|
||||||
#ifdef __TEX_PARSER_DEBUG
|
object_stack[obj_level] = OBJ_TABLE_SUBTABLE;
|
||||||
puts("=OBJ_TABLE_SUBTABLE");
|
#ifdef __TEX_PARSER_DEBUG
|
||||||
#endif
|
puts("=OBJ_TABLE_SUBTABLE");
|
||||||
|
#endif
|
||||||
|
|
||||||
} else if (!strcmp(tag, TEX_TAG_ENDHEAD)) {
|
} else if (!strcmp(tag, TEX_TAG_ENDHEAD)) {
|
||||||
// subtable is header - some actions here...
|
// subtable is header - some actions here...
|
||||||
object_stack[obj_level] = OBJ_TABLE_SUBTABLE;
|
object_stack[obj_level] = OBJ_TABLE_SUBTABLE;
|
||||||
#ifdef __TEX_PARSER_DEBUG
|
#ifdef __TEX_PARSER_DEBUG
|
||||||
puts("=OBJ_TABLE_SUBTABLE");
|
puts("=OBJ_TABLE_SUBTABLE");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} else if (!strcmp(tag, TEX_TAG_ENDFIRSTFOOT)) {
|
} else if (!strcmp(tag, TEX_TAG_ENDFIRSTFOOT)) {
|
||||||
// subtable is first footer - some actions here...
|
// subtable is first footer - some actions here...
|
||||||
object_stack[obj_level] = OBJ_TABLE_SUBTABLE;
|
object_stack[obj_level] = OBJ_TABLE_SUBTABLE;
|
||||||
#ifdef __TEX_PARSER_DEBUG
|
#ifdef __TEX_PARSER_DEBUG
|
||||||
puts("=OBJ_TABLE_SUBTABLE");
|
puts("=OBJ_TABLE_SUBTABLE");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} else if (!strcmp(tag, TEX_TAG_ENDFOOT)) {
|
} else if (!strcmp(tag, TEX_TAG_ENDFOOT)) {
|
||||||
// subtable is footer - some actions here...
|
// subtable is footer - some actions here...
|
||||||
object_stack[obj_level] = OBJ_TABLE_SUBTABLE;
|
object_stack[obj_level] = OBJ_TABLE_SUBTABLE;
|
||||||
#ifdef __TEX_PARSER_DEBUG
|
#ifdef __TEX_PARSER_DEBUG
|
||||||
puts("=OBJ_TABLE_SUBTABLE");
|
puts("=OBJ_TABLE_SUBTABLE");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
} else
|
|
||||||
where_stack[tex_level] = IN_TAG_UNKNOWN;
|
where_stack[tex_level] = IN_TAG_UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __TEX_PARSER_DEBUG
|
#ifdef __TEX_PARSER_DEBUG
|
||||||
printf("\\%s\n", tag);
|
printf("\\%s\n", tag);
|
||||||
#endif
|
#endif
|
||||||
zclear(&tag);
|
zclear(&tag);
|
||||||
|
|
Loading…
Reference in New Issue