mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
Add SGML_TOKEN_INCOMPLETE and handle it in the parser
This commit is contained in:
parent
2d813f2cbf
commit
29279e71b7
@ -215,6 +215,9 @@ parse_sgml_attributes(struct dom_stack *stack, struct dom_scanner *scanner)
|
|||||||
skip_dom_scanner_token(scanner);
|
skip_dom_scanner_token(scanner);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SGML_TOKEN_INCOMPLETE:
|
||||||
|
return SGML_PARSER_CODE_INCOMPLETE;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
skip_dom_scanner_token(scanner);
|
skip_dom_scanner_token(scanner);
|
||||||
}
|
}
|
||||||
@ -344,6 +347,9 @@ parse_sgml_plain(struct dom_stack *stack, struct dom_scanner *scanner)
|
|||||||
skip_dom_scanner_token(scanner);
|
skip_dom_scanner_token(scanner);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SGML_TOKEN_INCOMPLETE:
|
||||||
|
return SGML_PARSER_CODE_INCOMPLETE;
|
||||||
|
|
||||||
case SGML_TOKEN_SPACE:
|
case SGML_TOKEN_SPACE:
|
||||||
case SGML_TOKEN_TEXT:
|
case SGML_TOKEN_TEXT:
|
||||||
default:
|
default:
|
||||||
|
@ -48,6 +48,10 @@ enum sgml_token_type {
|
|||||||
/* A special token for unrecognized strings */
|
/* A special token for unrecognized strings */
|
||||||
SGML_TOKEN_GARBAGE,
|
SGML_TOKEN_GARBAGE,
|
||||||
|
|
||||||
|
/* A special token for marking that it is assummed that the token is
|
||||||
|
* not complete. Only meaningful if scanner->complete is incomplete. */
|
||||||
|
SGML_TOKEN_INCOMPLETE,
|
||||||
|
|
||||||
/* Token type used internally when scanning to signal that the token
|
/* Token type used internally when scanning to signal that the token
|
||||||
* should not be recorded in the scanners token table. */
|
* should not be recorded in the scanners token table. */
|
||||||
SGML_TOKEN_SKIP,
|
SGML_TOKEN_SKIP,
|
||||||
|
Loading…
Reference in New Issue
Block a user