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)) {
|
||||
where_stack[tex_level] = IN_TAG_TABULARNEWLINE;
|
||||
|
||||
} else if (!strcmp(tag, TEX_TAG_ENDFIRSTHEAD)) {
|
||||
// subtable is first header - some actions here...
|
||||
object_stack[obj_level] = OBJ_TABLE_SUBTABLE;
|
||||
#ifdef __TEX_PARSER_DEBUG
|
||||
puts("=OBJ_TABLE_SUBTABLE");
|
||||
#endif
|
||||
} else {
|
||||
if (!strcmp(tag, TEX_TAG_ENDFIRSTHEAD)) {
|
||||
// subtable is first header - some actions here...
|
||||
object_stack[obj_level] = OBJ_TABLE_SUBTABLE;
|
||||
#ifdef __TEX_PARSER_DEBUG
|
||||
puts("=OBJ_TABLE_SUBTABLE");
|
||||
#endif
|
||||
|
||||
} else if (!strcmp(tag, TEX_TAG_ENDHEAD)) {
|
||||
// subtable is header - some actions here...
|
||||
object_stack[obj_level] = OBJ_TABLE_SUBTABLE;
|
||||
#ifdef __TEX_PARSER_DEBUG
|
||||
puts("=OBJ_TABLE_SUBTABLE");
|
||||
#endif
|
||||
} else if (!strcmp(tag, TEX_TAG_ENDHEAD)) {
|
||||
// subtable is header - some actions here...
|
||||
object_stack[obj_level] = OBJ_TABLE_SUBTABLE;
|
||||
#ifdef __TEX_PARSER_DEBUG
|
||||
puts("=OBJ_TABLE_SUBTABLE");
|
||||
#endif
|
||||
|
||||
} else if (!strcmp(tag, TEX_TAG_ENDFIRSTFOOT)) {
|
||||
// subtable is first footer - some actions here...
|
||||
object_stack[obj_level] = OBJ_TABLE_SUBTABLE;
|
||||
#ifdef __TEX_PARSER_DEBUG
|
||||
puts("=OBJ_TABLE_SUBTABLE");
|
||||
#endif
|
||||
} else if (!strcmp(tag, TEX_TAG_ENDFIRSTFOOT)) {
|
||||
// subtable is first footer - some actions here...
|
||||
object_stack[obj_level] = OBJ_TABLE_SUBTABLE;
|
||||
#ifdef __TEX_PARSER_DEBUG
|
||||
puts("=OBJ_TABLE_SUBTABLE");
|
||||
#endif
|
||||
|
||||
} else if (!strcmp(tag, TEX_TAG_ENDFOOT)) {
|
||||
// subtable is footer - some actions here...
|
||||
object_stack[obj_level] = OBJ_TABLE_SUBTABLE;
|
||||
#ifdef __TEX_PARSER_DEBUG
|
||||
puts("=OBJ_TABLE_SUBTABLE");
|
||||
#endif
|
||||
} else if (!strcmp(tag, TEX_TAG_ENDFOOT)) {
|
||||
// subtable is footer - some actions here...
|
||||
object_stack[obj_level] = OBJ_TABLE_SUBTABLE;
|
||||
#ifdef __TEX_PARSER_DEBUG
|
||||
puts("=OBJ_TABLE_SUBTABLE");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
} else
|
||||
where_stack[tex_level] = IN_TAG_UNKNOWN;
|
||||
}
|
||||
|
||||
#ifdef __TEX_PARSER_DEBUG
|
||||
#ifdef __TEX_PARSER_DEBUG
|
||||
printf("\\%s\n", tag);
|
||||
#endif
|
||||
zclear(&tag);
|
||||
|
|
Loading…
Reference in New Issue