From e44f22ce03e863b5ce42f248c7f8270196054504 Mon Sep 17 00:00:00 2001 From: Hong Minhee Date: Sat, 4 Mar 2023 22:37:49 +0900 Subject: [PATCH 1/9] Make build passes with text-2.0 together --- cmark.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmark.cabal b/cmark.cabal index fc51232..b88e463 100644 --- a/cmark.cabal +++ b/cmark.cabal @@ -54,7 +54,7 @@ flag pkgconfig library exposed-modules: CMark build-depends: base >=4.5 && < 5.0, - text >= 1.0 && < 1.3, + text >= 1.0 && < 2.1, bytestring if impl(ghc < 7.6) build-depends: ghc-prim >= 0.2 From f32f513948878e3c4798c302e65e6be233cb1517 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 8 Jul 2023 09:08:32 -0700 Subject: [PATCH 2/9] Add Github Actions CI. --- .github/workflows/ci.yml | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..913c1fb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,47 @@ +name: CI tests + +on: [push, pull_request] + +jobs: + linux: + + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + versions: + - ghc: '8.10' + cabal: '3.2' + - ghc: '9.0' + cabal: '3.4' + - ghc: '9.2' + cabal: '3.6' + - ghc: '9.4' + cabal: 'latest' + - ghc: '9.6' + cabal: 'latest' + steps: + - uses: actions/checkout@v1 + - name: Install cabal/ghc + run: | + ghcup install ghc --set ${{ matrix.versions.ghc }} + ghcup install cabal --set ${{ matrix.versions.cabal }} + + - name: Cache cabal global package db + id: cabal-global + uses: actions/cache@v3 + with: + path: | + ~/.cabal + key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-global-${{ secrets.CACHE_VERSION }} + + - name: Update + run: | + cabal v2-update + - name: Build + run: | + cabal v2-build --enable-tests --disable-optimization -fexecutable + - name: Test + run: | + cabal v2-test --disable-optimization + From b7468a7fd1274dc1de66d788ed6f7aa5ac48fc66 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 8 Jul 2023 09:14:51 -0700 Subject: [PATCH 3/9] Update C sources for v0.30.3. --- cbits/blocks.c | 106 +- cbits/buffer.h | 4 +- cbits/case_fold_switch.inc | 387 + cbits/chunk.h | 70 +- cbits/cmark.c | 9 +- cbits/cmark.h | 14 +- cbits/cmark_ctype.c | 2 +- cbits/cmark_export.h | 2 +- cbits/cmark_version.h | 4 +- cbits/commonmark.c | 138 +- cbits/houdini_href_e.c | 18 +- cbits/houdini_html_u.c | 6 +- cbits/html.c | 76 +- cbits/inlines.c | 383 +- cbits/inlines.h | 7 +- cbits/iterator.c | 11 +- cbits/latex.c | 10 +- cbits/man.c | 29 + cbits/node.c | 100 +- cbits/node.h | 30 +- cbits/parser.h | 2 + cbits/references.c | 125 +- cbits/references.h | 15 +- cbits/render.c | 29 +- cbits/render.h | 8 +- cbits/scanners.c | 13507 +++++++++++++++++------------------ cbits/scanners.h | 8 + cbits/xml.c | 95 +- 28 files changed, 7831 insertions(+), 7364 deletions(-) diff --git a/cbits/blocks.c b/cbits/blocks.c index b6077eb..3f262cb 100644 --- a/cbits/blocks.c +++ b/cbits/blocks.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "cmark_ctype.h" #include "config.h" @@ -20,6 +21,7 @@ #include "inlines.h" #include "houdini.h" #include "buffer.h" +#include "chunk.h" #define CODE_INDENT 4 #define TAB_STOP 4 @@ -72,7 +74,7 @@ static cmark_node *make_block(cmark_mem *mem, cmark_node_type tag, cmark_node *e; e = (cmark_node *)mem->calloc(1, sizeof(*e)); - cmark_strbuf_init(mem, &e->content, 32); + e->mem = mem; e->type = (uint16_t)tag; e->flags = CMARK_NODE__OPEN; e->start_line = start_line; @@ -96,6 +98,7 @@ cmark_parser *cmark_parser_new_with_mem(int options, cmark_mem *mem) { cmark_strbuf_init(mem, &parser->curline, 256); cmark_strbuf_init(mem, &parser->linebuf, 0); + cmark_strbuf_init(mem, &parser->content, 0); parser->refmap = cmark_reference_map_new(mem); parser->root = document; @@ -171,19 +174,18 @@ static CMARK_INLINE bool contains_inlines(cmark_node_type block_type) { block_type == CMARK_NODE_HEADING); } -static void add_line(cmark_node *node, cmark_chunk *ch, cmark_parser *parser) { +static void add_line(cmark_chunk *ch, cmark_parser *parser) { int chars_to_tab; int i; - assert(node->flags & CMARK_NODE__OPEN); if (parser->partially_consumed_tab) { parser->offset += 1; // skip over tab // add space characters: chars_to_tab = TAB_STOP - (parser->column % TAB_STOP); for (i = 0; i < chars_to_tab; i++) { - cmark_strbuf_putc(&node->content, ' '); + cmark_strbuf_putc(&parser->content, ' '); } } - cmark_strbuf_put(&node->content, ch->data + parser->offset, + cmark_strbuf_put(&parser->content, ch->data + parser->offset, ch->len - parser->offset); } @@ -230,21 +232,19 @@ static bool S_ends_with_blank_line(cmark_node *node) { } // returns true if content remains after link defs are resolved. -static bool resolve_reference_link_definitions( - cmark_parser *parser, - cmark_node *b) { +static bool resolve_reference_link_definitions(cmark_parser *parser) { bufsize_t pos; - cmark_strbuf *node_content = &b->content; - cmark_chunk chunk = {node_content->ptr, node_content->size, 0}; + cmark_strbuf *node_content = &parser->content; + cmark_chunk chunk = {node_content->ptr, node_content->size}; while (chunk.len && chunk.data[0] == '[' && (pos = cmark_parse_reference_inline(parser->mem, &chunk, - parser->refmap))) { + parser->refmap))) { chunk.data += pos; chunk.len -= pos; } cmark_strbuf_drop(node_content, (node_content->size - chunk.len)); - return !is_blank(&b->content, 0); + return !is_blank(node_content, 0); } static cmark_node *finalize(cmark_parser *parser, cmark_node *b) { @@ -277,15 +277,18 @@ static cmark_node *finalize(cmark_parser *parser, cmark_node *b) { b->end_column = parser->last_line_length; } - cmark_strbuf *node_content = &b->content; + cmark_strbuf *node_content = &parser->content; switch (S_type(b)) { case CMARK_NODE_PARAGRAPH: { - has_content = resolve_reference_link_definitions(parser, b); + has_content = resolve_reference_link_definitions(parser); if (!has_content) { // remove blank node (former reference def) cmark_node_free(b); + } else { + b->len = node_content->size; + b->data = cmark_strbuf_detach(node_content); } break; } @@ -302,11 +305,15 @@ static cmark_node *finalize(cmark_parser *parser, cmark_node *b) { } assert(pos < node_content->size); - cmark_strbuf tmp = CMARK_BUF_INIT(parser->mem); - houdini_unescape_html_f(&tmp, node_content->ptr, pos); - cmark_strbuf_trim(&tmp); - cmark_strbuf_unescape(&tmp); - b->as.code.info = cmark_chunk_buf_detach(&tmp); + if (pos == 0) { + b->as.code.info = NULL; + } else { + cmark_strbuf tmp = CMARK_BUF_INIT(parser->mem); + houdini_unescape_html_f(&tmp, node_content->ptr, pos); + cmark_strbuf_trim(&tmp); + cmark_strbuf_unescape(&tmp); + b->as.code.info = cmark_strbuf_detach(&tmp); + } if (node_content->ptr[pos] == '\r') pos += 1; @@ -314,11 +321,14 @@ static cmark_node *finalize(cmark_parser *parser, cmark_node *b) { pos += 1; cmark_strbuf_drop(node_content, pos); } - b->as.code.literal = cmark_chunk_buf_detach(node_content); + b->len = node_content->size; + b->data = cmark_strbuf_detach(node_content); break; + case CMARK_NODE_HEADING: case CMARK_NODE_HTML_BLOCK: - b->as.literal = cmark_chunk_buf_detach(node_content); + b->len = node_content->size; + b->data = cmark_strbuf_detach(node_content); break; case CMARK_NODE_LIST: // determine tight/loose status @@ -396,6 +406,9 @@ static void process_inlines(cmark_mem *mem, cmark_node *root, if (ev_type == CMARK_EVENT_ENTER) { if (contains_inlines(S_type(cur))) { cmark_parse_inlines(mem, cur, refmap, options); + mem->free(cur->data); + cur->data = NULL; + cur->len = 0; } } } @@ -506,8 +519,18 @@ static cmark_node *finalize_document(cmark_parser *parser) { } finalize(parser, parser->root); + + // Limit total size of extra content created from reference links to + // document size to avoid superlinear growth. Always allow 100KB. + if (parser->total_size > 100000) + parser->refmap->max_ref_size = parser->total_size; + else + parser->refmap->max_ref_size = 100000; + process_inlines(parser->mem, parser->root, parser->refmap, parser->options); + cmark_strbuf_free(&parser->content); + return parser->root; } @@ -550,10 +573,21 @@ static void S_parser_feed(cmark_parser *parser, const unsigned char *buffer, const unsigned char *end = buffer + len; static const uint8_t repl[] = {239, 191, 189}; - if (parser->last_buffer_ended_with_cr && *buffer == '\n') { + if (len > UINT_MAX - parser->total_size) + parser->total_size = UINT_MAX; + else + parser->total_size += len; + + // Skip UTF-8 BOM if present; see #334 + if (parser->line_number == 0 && parser->column == 0 && len >= 3 && + *buffer == 0xEF && *(buffer + 1) == 0xBB && + *(buffer + 2) == 0xBF) { + buffer += 3; + } else if (parser->last_buffer_ended_with_cr && *buffer == '\n') { // skip NL if last buffer ended with CR ; see #117 buffer++; } + parser->last_buffer_ended_with_cr = false; while (buffer < end) { const unsigned char *eol; @@ -961,7 +995,7 @@ static void open_new_blocks(cmark_parser *parser, cmark_node **container, (*container)->as.heading.level = level; (*container)->as.heading.setext = false; - (*container)->internal_offset = matched; + (*container)->as.heading.internal_offset = matched; } else if (!indented && (matched = scan_open_code_fence( input, parser->first_nonspace))) { @@ -972,7 +1006,7 @@ static void open_new_blocks(cmark_parser *parser, cmark_node **container, (*container)->as.code.fence_length = (matched > 255) ? 255 : matched; (*container)->as.code.fence_offset = (int8_t)(parser->first_nonspace - parser->offset); - (*container)->as.code.info = cmark_chunk_literal(""); + (*container)->as.code.info = NULL; S_advance_offset(parser, input, parser->first_nonspace + matched - parser->offset, false); @@ -980,6 +1014,7 @@ static void open_new_blocks(cmark_parser *parser, cmark_node **container, } else if (!indented && ((matched = scan_html_block_start( input, parser->first_nonspace)) || (cont_type != CMARK_NODE_PARAGRAPH && + !maybe_lazy && (matched = scan_html_block_start_7( input, parser->first_nonspace))))) { *container = add_child(parser, *container, CMARK_NODE_HTML_BLOCK, @@ -991,7 +1026,7 @@ static void open_new_blocks(cmark_parser *parser, cmark_node **container, (lev = scan_setext_heading_line(input, parser->first_nonspace))) { // finalize paragraph, resolving reference links - has_content = resolve_reference_link_definitions(parser, *container); + has_content = resolve_reference_link_definitions(parser); if (has_content) { @@ -1002,14 +1037,14 @@ static void open_new_blocks(cmark_parser *parser, cmark_node **container, } } else if (!indented && !(cont_type == CMARK_NODE_PARAGRAPH && !all_matched) && - (parser->thematic_break_kill_pos <= parser->first_nonspace) && - (matched = S_scan_thematic_break(parser, input, parser->first_nonspace))) { + (parser->thematic_break_kill_pos <= parser->first_nonspace) && + S_scan_thematic_break(parser, input, parser->first_nonspace)) { // it's only now that we know the line is not part of a setext heading: *container = add_child(parser, *container, CMARK_NODE_THEMATIC_BREAK, parser->first_nonspace + 1); S_advance_offset(parser, input, input->len - 1 - parser->offset, false); } else if ((!indented || cont_type == CMARK_NODE_LIST) && - parser->indent < 4 && + parser->indent < 4 && (matched = parse_list_marker( parser->mem, input, parser->first_nonspace, (*container)->type == CMARK_NODE_PARAGRAPH, &data))) { @@ -1074,7 +1109,7 @@ static void open_new_blocks(cmark_parser *parser, cmark_node **container, (*container)->as.code.fence_char = 0; (*container)->as.code.fence_length = 0; (*container)->as.code.fence_offset = 0; - (*container)->as.code.info = cmark_chunk_literal(""); + (*container)->as.code.info = NULL; } else { break; @@ -1131,7 +1166,7 @@ static void add_text_to_container(cmark_parser *parser, cmark_node *container, if (parser->current != last_matched_container && container == last_matched_container && !parser->blank && S_type(parser->current) == CMARK_NODE_PARAGRAPH) { - add_line(parser->current, input, parser); + add_line(input, parser); } else { // not a lazy continuation // Finalize any blocks that were not matched and set cur to container: while (parser->current != last_matched_container) { @@ -1140,14 +1175,14 @@ static void add_text_to_container(cmark_parser *parser, cmark_node *container, } if (S_type(container) == CMARK_NODE_CODE_BLOCK) { - add_line(container, input, parser); + add_line(input, parser); } else if (S_type(container) == CMARK_NODE_HTML_BLOCK) { - add_line(container, input, parser); + add_line(input, parser); int matches_end_condition; switch (container->as.html_block_type) { case 1: - // , , + // , , , matches_end_condition = scan_html_block_end_1(input, parser->first_nonspace); break; @@ -1189,14 +1224,14 @@ static void add_text_to_container(cmark_parser *parser, cmark_node *container, } S_advance_offset(parser, input, parser->first_nonspace - parser->offset, false); - add_line(container, input, parser); + add_line(input, parser); } else { // create paragraph container for line container = add_child(parser, container, CMARK_NODE_PARAGRAPH, parser->first_nonspace + 1); S_advance_offset(parser, input, parser->first_nonspace - parser->offset, false); - add_line(container, input, parser); + add_line(input, parser); } parser->current = container; @@ -1233,7 +1268,6 @@ static void S_process_line(cmark_parser *parser, const unsigned char *buffer, input.data = parser->curline.ptr; input.len = parser->curline.size; - input.alloc = 0; parser->line_number++; diff --git a/cbits/buffer.h b/cbits/buffer.h index e878075..55b552f 100644 --- a/cbits/buffer.h +++ b/cbits/buffer.h @@ -51,9 +51,11 @@ unsigned char *cmark_strbuf_detach(cmark_strbuf *buf); void cmark_strbuf_copy_cstr(char *data, bufsize_t datasize, const cmark_strbuf *buf); +/* static CMARK_INLINE const char *cmark_strbuf_cstr(const cmark_strbuf *buf) { - return (char *)buf->ptr; + return (char *)buf->ptr; } +*/ #define cmark_strbuf_at(buf, n) ((buf)->ptr[n]) diff --git a/cbits/case_fold_switch.inc b/cbits/case_fold_switch.inc index 28e223e..f8ad7eb 100644 --- a/cbits/case_fold_switch.inc +++ b/cbits/case_fold_switch.inc @@ -1631,6 +1631,144 @@ case 0x1C88: bufpush(0xA64B); break; + case 0x1C90: + bufpush(0x10D0); + break; + case 0x1C91: + bufpush(0x10D1); + break; + case 0x1C92: + bufpush(0x10D2); + break; + case 0x1C93: + bufpush(0x10D3); + break; + case 0x1C94: + bufpush(0x10D4); + break; + case 0x1C95: + bufpush(0x10D5); + break; + case 0x1C96: + bufpush(0x10D6); + break; + case 0x1C97: + bufpush(0x10D7); + break; + case 0x1C98: + bufpush(0x10D8); + break; + case 0x1C99: + bufpush(0x10D9); + break; + case 0x1C9A: + bufpush(0x10DA); + break; + case 0x1C9B: + bufpush(0x10DB); + break; + case 0x1C9C: + bufpush(0x10DC); + break; + case 0x1C9D: + bufpush(0x10DD); + break; + case 0x1C9E: + bufpush(0x10DE); + break; + case 0x1C9F: + bufpush(0x10DF); + break; + case 0x1CA0: + bufpush(0x10E0); + break; + case 0x1CA1: + bufpush(0x10E1); + break; + case 0x1CA2: + bufpush(0x10E2); + break; + case 0x1CA3: + bufpush(0x10E3); + break; + case 0x1CA4: + bufpush(0x10E4); + break; + case 0x1CA5: + bufpush(0x10E5); + break; + case 0x1CA6: + bufpush(0x10E6); + break; + case 0x1CA7: + bufpush(0x10E7); + break; + case 0x1CA8: + bufpush(0x10E8); + break; + case 0x1CA9: + bufpush(0x10E9); + break; + case 0x1CAA: + bufpush(0x10EA); + break; + case 0x1CAB: + bufpush(0x10EB); + break; + case 0x1CAC: + bufpush(0x10EC); + break; + case 0x1CAD: + bufpush(0x10ED); + break; + case 0x1CAE: + bufpush(0x10EE); + break; + case 0x1CAF: + bufpush(0x10EF); + break; + case 0x1CB0: + bufpush(0x10F0); + break; + case 0x1CB1: + bufpush(0x10F1); + break; + case 0x1CB2: + bufpush(0x10F2); + break; + case 0x1CB3: + bufpush(0x10F3); + break; + case 0x1CB4: + bufpush(0x10F4); + break; + case 0x1CB5: + bufpush(0x10F5); + break; + case 0x1CB6: + bufpush(0x10F6); + break; + case 0x1CB7: + bufpush(0x10F7); + break; + case 0x1CB8: + bufpush(0x10F8); + break; + case 0x1CB9: + bufpush(0x10F9); + break; + case 0x1CBA: + bufpush(0x10FA); + break; + case 0x1CBD: + bufpush(0x10FD); + break; + case 0x1CBE: + bufpush(0x10FE); + break; + case 0x1CBF: + bufpush(0x10FF); + break; case 0x1E00: bufpush(0x1E01); break; @@ -2847,6 +2985,9 @@ case 0x2C2E: bufpush(0x2C5E); break; + case 0x2C2F: + bufpush(0x2C5F); + break; case 0x2C60: bufpush(0x2C61); break; @@ -3375,6 +3516,51 @@ case 0xA7B6: bufpush(0xA7B7); break; + case 0xA7B8: + bufpush(0xA7B9); + break; + case 0xA7BA: + bufpush(0xA7BB); + break; + case 0xA7BC: + bufpush(0xA7BD); + break; + case 0xA7BE: + bufpush(0xA7BF); + break; + case 0xA7C0: + bufpush(0xA7C1); + break; + case 0xA7C2: + bufpush(0xA7C3); + break; + case 0xA7C4: + bufpush(0xA794); + break; + case 0xA7C5: + bufpush(0x0282); + break; + case 0xA7C6: + bufpush(0x1D8E); + break; + case 0xA7C7: + bufpush(0xA7C8); + break; + case 0xA7C9: + bufpush(0xA7CA); + break; + case 0xA7D0: + bufpush(0xA7D1); + break; + case 0xA7D6: + bufpush(0xA7D7); + break; + case 0xA7D8: + bufpush(0xA7D9); + break; + case 0xA7F5: + bufpush(0xA7F6); + break; case 0xAB70: bufpush(0x13A0); break; @@ -3971,6 +4157,111 @@ case 0x104D3: bufpush(0x104FB); break; + case 0x10570: + bufpush(0x10597); + break; + case 0x10571: + bufpush(0x10598); + break; + case 0x10572: + bufpush(0x10599); + break; + case 0x10573: + bufpush(0x1059A); + break; + case 0x10574: + bufpush(0x1059B); + break; + case 0x10575: + bufpush(0x1059C); + break; + case 0x10576: + bufpush(0x1059D); + break; + case 0x10577: + bufpush(0x1059E); + break; + case 0x10578: + bufpush(0x1059F); + break; + case 0x10579: + bufpush(0x105A0); + break; + case 0x1057A: + bufpush(0x105A1); + break; + case 0x1057C: + bufpush(0x105A3); + break; + case 0x1057D: + bufpush(0x105A4); + break; + case 0x1057E: + bufpush(0x105A5); + break; + case 0x1057F: + bufpush(0x105A6); + break; + case 0x10580: + bufpush(0x105A7); + break; + case 0x10581: + bufpush(0x105A8); + break; + case 0x10582: + bufpush(0x105A9); + break; + case 0x10583: + bufpush(0x105AA); + break; + case 0x10584: + bufpush(0x105AB); + break; + case 0x10585: + bufpush(0x105AC); + break; + case 0x10586: + bufpush(0x105AD); + break; + case 0x10587: + bufpush(0x105AE); + break; + case 0x10588: + bufpush(0x105AF); + break; + case 0x10589: + bufpush(0x105B0); + break; + case 0x1058A: + bufpush(0x105B1); + break; + case 0x1058C: + bufpush(0x105B3); + break; + case 0x1058D: + bufpush(0x105B4); + break; + case 0x1058E: + bufpush(0x105B5); + break; + case 0x1058F: + bufpush(0x105B6); + break; + case 0x10590: + bufpush(0x105B7); + break; + case 0x10591: + bufpush(0x105B8); + break; + case 0x10592: + bufpush(0x105B9); + break; + case 0x10594: + bufpush(0x105BB); + break; + case 0x10595: + bufpush(0x105BC); + break; case 0x10C80: bufpush(0x10CC0); break; @@ -4220,6 +4511,102 @@ case 0x118BF: bufpush(0x118DF); break; + case 0x16E40: + bufpush(0x16E60); + break; + case 0x16E41: + bufpush(0x16E61); + break; + case 0x16E42: + bufpush(0x16E62); + break; + case 0x16E43: + bufpush(0x16E63); + break; + case 0x16E44: + bufpush(0x16E64); + break; + case 0x16E45: + bufpush(0x16E65); + break; + case 0x16E46: + bufpush(0x16E66); + break; + case 0x16E47: + bufpush(0x16E67); + break; + case 0x16E48: + bufpush(0x16E68); + break; + case 0x16E49: + bufpush(0x16E69); + break; + case 0x16E4A: + bufpush(0x16E6A); + break; + case 0x16E4B: + bufpush(0x16E6B); + break; + case 0x16E4C: + bufpush(0x16E6C); + break; + case 0x16E4D: + bufpush(0x16E6D); + break; + case 0x16E4E: + bufpush(0x16E6E); + break; + case 0x16E4F: + bufpush(0x16E6F); + break; + case 0x16E50: + bufpush(0x16E70); + break; + case 0x16E51: + bufpush(0x16E71); + break; + case 0x16E52: + bufpush(0x16E72); + break; + case 0x16E53: + bufpush(0x16E73); + break; + case 0x16E54: + bufpush(0x16E74); + break; + case 0x16E55: + bufpush(0x16E75); + break; + case 0x16E56: + bufpush(0x16E76); + break; + case 0x16E57: + bufpush(0x16E77); + break; + case 0x16E58: + bufpush(0x16E78); + break; + case 0x16E59: + bufpush(0x16E79); + break; + case 0x16E5A: + bufpush(0x16E7A); + break; + case 0x16E5B: + bufpush(0x16E7B); + break; + case 0x16E5C: + bufpush(0x16E7C); + break; + case 0x16E5D: + bufpush(0x16E7D); + break; + case 0x16E5E: + bufpush(0x16E7E); + break; + case 0x16E5F: + bufpush(0x16E7F); + break; case 0x1E900: bufpush(0x1E922); break; diff --git a/cbits/chunk.h b/cbits/chunk.h index 6d1601d..bf3c42e 100644 --- a/cbits/chunk.h +++ b/cbits/chunk.h @@ -9,26 +9,20 @@ #include "cmark_ctype.h" #define CMARK_CHUNK_EMPTY \ - { NULL, 0, 0 } + { NULL, 0 } typedef struct { - unsigned char *data; + const unsigned char *data; bufsize_t len; - bufsize_t alloc; // also implies a NULL-terminated string } cmark_chunk; -static CMARK_INLINE void cmark_chunk_free(cmark_mem *mem, cmark_chunk *c) { - if (c->alloc) - mem->free(c->data); - +// NOLINTNEXTLINE(clang-diagnostic-unused-function) +static CMARK_INLINE void cmark_chunk_free(cmark_chunk *c) { c->data = NULL; - c->alloc = 0; c->len = 0; } static CMARK_INLINE void cmark_chunk_ltrim(cmark_chunk *c) { - assert(!c->alloc); - while (c->len && cmark_isspace(c->data[0])) { c->data++; c->len--; @@ -36,8 +30,6 @@ static CMARK_INLINE void cmark_chunk_ltrim(cmark_chunk *c) { } static CMARK_INLINE void cmark_chunk_rtrim(cmark_chunk *c) { - assert(!c->alloc); - while (c->len > 0) { if (!cmark_isspace(c->data[c->len - 1])) break; @@ -46,11 +38,13 @@ static CMARK_INLINE void cmark_chunk_rtrim(cmark_chunk *c) { } } +// NOLINTNEXTLINE(clang-diagnostic-unused-function) static CMARK_INLINE void cmark_chunk_trim(cmark_chunk *c) { cmark_chunk_ltrim(c); cmark_chunk_rtrim(c); } +// NOLINTNEXTLINE(clang-diagnostic-unused-function) static CMARK_INLINE bufsize_t cmark_chunk_strchr(cmark_chunk *ch, int c, bufsize_t offset) { const unsigned char *p = @@ -58,61 +52,17 @@ static CMARK_INLINE bufsize_t cmark_chunk_strchr(cmark_chunk *ch, int c, return p ? (bufsize_t)(p - ch->data) : ch->len; } -static CMARK_INLINE const char *cmark_chunk_to_cstr(cmark_mem *mem, - cmark_chunk *c) { - unsigned char *str; - - if (c->alloc) { - return (char *)c->data; - } - str = (unsigned char *)mem->calloc(c->len + 1, 1); - if (c->len > 0) { - memcpy(str, c->data, c->len); - } - str[c->len] = 0; - c->data = str; - c->alloc = 1; - - return (char *)str; -} - -static CMARK_INLINE void cmark_chunk_set_cstr(cmark_mem *mem, cmark_chunk *c, - const char *str) { - unsigned char *old = c->alloc ? c->data : NULL; - if (str == NULL) { - c->len = 0; - c->data = NULL; - c->alloc = 0; - } else { - c->len = (bufsize_t)strlen(str); - c->data = (unsigned char *)mem->calloc(c->len + 1, 1); - c->alloc = 1; - memcpy(c->data, str, c->len + 1); - } - if (old != NULL) { - mem->free(old); - } -} - +// NOLINTNEXTLINE(clang-diagnostic-unused-function) static CMARK_INLINE cmark_chunk cmark_chunk_literal(const char *data) { bufsize_t len = data ? (bufsize_t)strlen(data) : 0; - cmark_chunk c = {(unsigned char *)data, len, 0}; + cmark_chunk c = {(unsigned char *)data, len}; return c; } +// NOLINTNEXTLINE(clang-diagnostic-unused-function) static CMARK_INLINE cmark_chunk cmark_chunk_dup(const cmark_chunk *ch, bufsize_t pos, bufsize_t len) { - cmark_chunk c = {ch->data + pos, len, 0}; - return c; -} - -static CMARK_INLINE cmark_chunk cmark_chunk_buf_detach(cmark_strbuf *buf) { - cmark_chunk c; - - c.len = buf->size; - c.data = cmark_strbuf_detach(buf); - c.alloc = 1; - + cmark_chunk c = {ch->data + pos, len}; return c; } diff --git a/cbits/cmark.c b/cbits/cmark.c index d64237f..60aedbc 100644 --- a/cbits/cmark.c +++ b/cbits/cmark.c @@ -6,9 +6,9 @@ #include "cmark.h" #include "buffer.h" -int cmark_version() { return CMARK_VERSION; } +int cmark_version(void) { return CMARK_VERSION; } -const char *cmark_version_string() { return CMARK_VERSION_STRING; } +const char *cmark_version_string(void) { return CMARK_VERSION_STRING; } static void *xcalloc(size_t nmem, size_t size) { void *ptr = calloc(nmem, size); @@ -30,6 +30,11 @@ static void *xrealloc(void *ptr, size_t size) { cmark_mem DEFAULT_MEM_ALLOCATOR = {xcalloc, xrealloc, free}; +cmark_mem *cmark_get_default_mem_allocator(void) { + return &DEFAULT_MEM_ALLOCATOR; +} + + char *cmark_markdown_to_html(const char *text, size_t len, int options) { cmark_node *doc; char *result; diff --git a/cbits/cmark.h b/cbits/cmark.h index 102aa6f..d2021f0 100644 --- a/cbits/cmark.h +++ b/cbits/cmark.h @@ -62,7 +62,7 @@ typedef enum { CMARK_NODE_IMAGE, CMARK_NODE_FIRST_INLINE = CMARK_NODE_TEXT, - CMARK_NODE_LAST_INLINE = CMARK_NODE_IMAGE, + CMARK_NODE_LAST_INLINE = CMARK_NODE_IMAGE } cmark_node_type; /* For backwards compatibility: */ @@ -100,6 +100,10 @@ typedef struct cmark_mem { void (*free)(void *); } cmark_mem; +/** Returns a pointer to the default memory allocator. + */ +CMARK_EXPORT cmark_mem *cmark_get_default_mem_allocator(void); + /** * ## Creating and Destroying Nodes */ @@ -448,10 +452,10 @@ CMARK_EXPORT void cmark_consolidate_text_nodes(cmark_node *root); * cmark_parser *parser = cmark_parser_new(CMARK_OPT_DEFAULT); * FILE *fp = fopen("myfile.md", "rb"); * while ((bytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) { - * cmark_parser_feed(parser, buffer, bytes); - * if (bytes < sizeof(buffer)) { - * break; - * } + * cmark_parser_feed(parser, buffer, bytes); + * if (bytes < sizeof(buffer)) { + * break; + * } * } * document = cmark_parser_finish(parser); * cmark_parser_free(parser); diff --git a/cbits/cmark_ctype.c b/cbits/cmark_ctype.c index c0c4d5b..baa68e9 100644 --- a/cbits/cmark_ctype.c +++ b/cbits/cmark_ctype.c @@ -6,7 +6,7 @@ */ static const uint8_t cmark_ctype_class[256] = { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ - /* 0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, + /* 0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, /* 1 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 2 */ 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 3 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, diff --git a/cbits/cmark_export.h b/cbits/cmark_export.h index 9e5dd5d..3dc3165 100644 --- a/cbits/cmark_export.h +++ b/cbits/cmark_export.h @@ -7,7 +7,7 @@ # define CMARK_NO_EXPORT #else # ifndef CMARK_EXPORT -# ifdef libcmark_EXPORTS +# ifdef cmark_EXPORTS /* We are building this library */ # define CMARK_EXPORT __attribute__((visibility("default"))) # else diff --git a/cbits/cmark_version.h b/cbits/cmark_version.h index dcacd37..dc57b6c 100644 --- a/cbits/cmark_version.h +++ b/cbits/cmark_version.h @@ -1,7 +1,7 @@ #ifndef CMARK_VERSION_H #define CMARK_VERSION_H -#define CMARK_VERSION ((0 << 16) | (29 << 8) | 0) -#define CMARK_VERSION_STRING "0.29.0" +#define CMARK_VERSION ((0 << 16) | (30 << 8) | 3) +#define CMARK_VERSION_STRING "0.30.3" #endif diff --git a/cbits/commonmark.c b/cbits/commonmark.c index 404c290..0dde2ea 100644 --- a/cbits/commonmark.c +++ b/cbits/commonmark.c @@ -28,14 +28,19 @@ static CMARK_INLINE void outc(cmark_renderer *renderer, cmark_escaping escape, renderer->buffer->size > 0 && cmark_isdigit(renderer->buffer->ptr[renderer->buffer->size - 1]); char encoded[ENCODED_SIZE]; + int options = renderer->options; needs_escaping = c < 0x80 && escape != LITERAL && ((escape == NORMAL && (c < 0x20 || - c == '*' || c == '_' || c == '[' || c == ']' || c == '#' || c == '<' || + c == '*' || c == '_' || c == '[' || c == ']' || c == '#' || c == '<' || c == '>' || c == '\\' || c == '`' || c == '!' || (c == '&' && cmark_isalpha(nextc)) || (c == '!' && nextc == '[') || + ((CMARK_OPT_SMART & options) && + ((c == '-' && nextc == '-') || + (c == '.' && nextc == '.') || + c == '"' || c == '\'')) || (renderer->begin_content && (c == '-' || c == '+' || c == '=') && // begin_content doesn't get set to false til we've passed digits // at the beginning of line, so... @@ -114,24 +119,22 @@ static int shortest_unused_backtick_sequence(const char *code) { } static bool is_autolink(cmark_node *node) { - cmark_chunk *title; - cmark_chunk *url; + const unsigned char *title; + const unsigned char *url; cmark_node *link_text; - char *realurl; - int realurllen; if (node->type != CMARK_NODE_LINK) { return false; } - url = &node->as.link.url; - if (url->len == 0 || scan_scheme(url, 0) == 0) { + url = node->as.link.url; + if (url == NULL || _scan_scheme(url) == 0) { return false; } - title = &node->as.link.title; + title = node->as.link.title; // if it has a title, we can't treat it as an autolink: - if (title->len > 0) { + if (title && title[0]) { return false; } @@ -140,30 +143,11 @@ static bool is_autolink(cmark_node *node) { return false; } cmark_consolidate_text_nodes(link_text); - realurl = (char *)url->data; - realurllen = url->len; - if (strncmp(realurl, "mailto:", 7) == 0) { - realurl += 7; - realurllen -= 7; + if (strncmp((const char *)url, "mailto:", 7) == 0) { + url += 7; } - return (realurllen == link_text->as.literal.len && - strncmp(realurl, (char *)link_text->as.literal.data, - link_text->as.literal.len) == 0); -} - -// if node is a block node, returns node. -// otherwise returns first block-level node that is an ancestor of node. -// if there is no block-level ancestor, returns NULL. -static cmark_node *get_containing_block(cmark_node *node) { - while (node) { - if (node->type >= CMARK_NODE_FIRST_BLOCK && - node->type <= CMARK_NODE_LAST_BLOCK) { - return node; - } else { - node = node->parent; - } - } - return NULL; + return link_text->data != NULL && + strcmp((const char *)url, (char *)link_text->data) == 0; } static int S_render_node(cmark_renderer *renderer, cmark_node *node, @@ -171,31 +155,35 @@ static int S_render_node(cmark_renderer *renderer, cmark_node *node, cmark_node *tmp; int list_number; cmark_delim_type list_delim; - int numticks; + size_t numticks; bool extra_spaces; - int i; + size_t i; bool entering = (ev_type == CMARK_EVENT_ENTER); const char *info, *code, *title; char fencechar[2] = {'\0', '\0'}; - size_t info_len, code_len; + size_t code_len; char listmarker[LISTMARKER_SIZE]; - char *emph_delim; + const char *emph_delim; bool first_in_list_item; bufsize_t marker_width; + bool has_nonspace; bool allow_wrap = renderer->width > 0 && !(CMARK_OPT_NOBREAKS & options) && !(CMARK_OPT_HARDBREAKS & options); // Don't adjust tight list status til we've started the list. - // Otherwise we loose the blank line between a paragraph and + // Otherwise we lose the blank line between a paragraph and // a following list. - if (!(node->type == CMARK_NODE_ITEM && node->prev == NULL && entering)) { - tmp = get_containing_block(node); - renderer->in_tight_list_item = - tmp && // tmp might be NULL if there is no containing block - ((tmp->type == CMARK_NODE_ITEM && - cmark_node_get_list_tight(tmp->parent)) || - (tmp && tmp->parent && tmp->parent->type == CMARK_NODE_ITEM && - cmark_node_get_list_tight(tmp->parent->parent))); + if (entering) { + if (node->parent && node->parent->type == CMARK_NODE_ITEM) { + renderer->in_tight_list_item = node->parent->parent->as.list.tight; + } + } else { + if (node->type == CMARK_NODE_LIST) { + renderer->in_tight_list_item = + node->parent && + node->parent->type == CMARK_NODE_ITEM && + node->parent->parent->as.list.tight; + } } switch (node->type) { @@ -214,8 +202,7 @@ static int S_render_node(cmark_renderer *renderer, cmark_node *node, break; case CMARK_NODE_LIST: - if (!entering && node->next && (node->next->type == CMARK_NODE_CODE_BLOCK || - node->next->type == CMARK_NODE_LIST)) { + if (!entering && node->next && (node->next->type == CMARK_NODE_LIST)) { // this ensures that a following indented code block or list will be // inteprereted correctly. CR(); @@ -276,6 +263,7 @@ static int S_render_node(cmark_renderer *renderer, cmark_node *node, break; case CMARK_NODE_CODE_BLOCK: + first_in_list_item = node->prev == NULL && node->parent && node->parent->type == CMARK_NODE_ITEM; @@ -283,38 +271,25 @@ static int S_render_node(cmark_renderer *renderer, cmark_node *node, BLANKLINE(); } info = cmark_node_get_fence_info(node); - info_len = strlen(info); fencechar[0] = strchr(info, '`') == NULL ? '`' : '~'; code = cmark_node_get_literal(node); - code_len = strlen(code); - // use indented form if no info, and code doesn't - // begin or end with a blank line, and code isn't - // first thing in a list item - if (info_len == 0 && (code_len > 2 && !cmark_isspace(code[0]) && - !(cmark_isspace(code[code_len - 1]) && - cmark_isspace(code[code_len - 2]))) && - !first_in_list_item) { - LIT(" "); - cmark_strbuf_puts(renderer->prefix, " "); - OUT(cmark_node_get_literal(node), false, LITERAL); - cmark_strbuf_truncate(renderer->prefix, renderer->prefix->size - 4); - } else { - numticks = longest_backtick_sequence(code) + 1; - if (numticks < 3) { - numticks = 3; - } - for (i = 0; i < numticks; i++) { - LIT(fencechar); - } - LIT(" "); - OUT(info, false, LITERAL); - CR(); - OUT(cmark_node_get_literal(node), false, LITERAL); - CR(); - for (i = 0; i < numticks; i++) { - LIT(fencechar); - } + + numticks = longest_backtick_sequence(code) + 1; + if (numticks < 3) { + numticks = 3; + } + for (i = 0; i < numticks; i++) { + LIT(fencechar); + } + LIT(" "); + OUT(info, false, LITERAL); + CR(); + OUT(cmark_node_get_literal(node), false, LITERAL); + CR(); + for (i = 0; i < numticks; i++) { + LIT(fencechar); } + BLANKLINE(); break; @@ -371,9 +346,16 @@ static int S_render_node(cmark_renderer *renderer, cmark_node *node, code = cmark_node_get_literal(node); code_len = strlen(code); numticks = shortest_unused_backtick_sequence(code); + has_nonspace = false; + for (i=0; i < code_len; i++) { + if (code[i] != ' ') { + has_nonspace = true; + break; + } + } extra_spaces = code_len == 0 || - code[0] == '`' || code[code_len - 1] == '`' || - code[0] == ' ' || code[code_len - 1] == ' '; + code[0] == '`' || code[code_len - 1] == '`' || + (has_nonspace && code[0] == ' ' && code[code_len - 1] == ' '); for (i = 0; i < numticks; i++) { LIT("`"); } diff --git a/cbits/houdini_href_e.c b/cbits/houdini_href_e.c index bfa9704..959d4bb 100644 --- a/cbits/houdini_href_e.c +++ b/cbits/houdini_href_e.c @@ -7,20 +7,20 @@ /* * The following characters will not be escaped: * - * -_.+!*'(),%#@?=;:/,+&$ alphanum + * -_.+!*'(),%#@?=;:/,+&$~ alphanum * * Note that this character set is the addition of: * - * - The characters which are safe to be in an URL - * - The characters which are *not* safe to be in - * an URL because they are RESERVED characters. + * - The characters which are safe to be in an URL + * - The characters which are *not* safe to be in + * an URL because they are RESERVED characters. * * We assume (lazily) that any RESERVED char that * appears inside an URL is actually meant to * have its native function (i.e. as an URL * component/separator) and hence needs no escaping. * - * There are two exceptions: the chacters & (amp) + * There are two exceptions: the characters & (amp) * and ' (single quote) do not appear in the table. * They are meant to appear in the URL as components, * yet they require special HTML-entity escaping @@ -35,7 +35,7 @@ static const char HREF_SAFE[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -81,9 +81,9 @@ int houdini_escape_href(cmark_strbuf *ob, const uint8_t *src, bufsize_t size) { * for now. the plus thing is more commonly seen * when building GET strings */ #if 0 - case ' ': - cmark_strbuf_putc(ob, '+'); - break; + case ' ': + cmark_strbuf_putc(ob, '+'); + break; #endif /* every other character goes with a %XX escaping */ diff --git a/cbits/houdini_html_u.c b/cbits/houdini_html_u.c index 30d08aa..3b7466e 100644 --- a/cbits/houdini_html_u.c +++ b/cbits/houdini_html_u.c @@ -42,6 +42,7 @@ bufsize_t houdini_unescape_ent(cmark_strbuf *ob, const uint8_t *src, if (size >= 3 && src[0] == '#') { int codepoint = 0; int num_digits = 0; + int max_digits = 7; if (_isdigit(src[1])) { for (i = 1; i < size && _isdigit(src[i]); ++i) { @@ -55,6 +56,7 @@ bufsize_t houdini_unescape_ent(cmark_strbuf *ob, const uint8_t *src, } num_digits = i - 1; + max_digits = 7; } else if (src[1] == 'x' || src[1] == 'X') { @@ -69,9 +71,11 @@ bufsize_t houdini_unescape_ent(cmark_strbuf *ob, const uint8_t *src, } num_digits = i - 2; + max_digits = 6; } - if (num_digits >= 1 && num_digits <= 8 && i < size && src[i] == ';') { + if (num_digits >= 1 && num_digits <= max_digits && + i < size && src[i] == ';') { if (codepoint == 0 || (codepoint >= 0xD800 && codepoint < 0xE000) || codepoint >= 0x110000) { codepoint = 0xFFFD; diff --git a/cbits/html.c b/cbits/html.c index a13d016..962d795 100644 --- a/cbits/html.c +++ b/cbits/html.c @@ -61,7 +61,7 @@ static int S_render_node(cmark_node *node, cmark_event_type ev_type, case CMARK_NODE_TEXT: case CMARK_NODE_CODE: case CMARK_NODE_HTML_INLINE: - escape_html(html, node->as.literal.data, node->as.literal.len); + escape_html(html, node->data, node->len); break; case CMARK_NODE_LINEBREAK: @@ -92,7 +92,7 @@ static int S_render_node(cmark_node *node, cmark_event_type ev_type, break; case CMARK_NODE_LIST: { - cmark_list_type list_type = node->as.list.list_type; + cmark_list_type list_type = (cmark_list_type)node->as.list.list_type; int start = node->as.list.start; if (entering) { @@ -146,25 +146,25 @@ static int S_render_node(cmark_node *node, cmark_event_type ev_type, case CMARK_NODE_CODE_BLOCK: cr(html); - if (node->as.code.info.len == 0) { + if (node->as.code.info == NULL || node->as.code.info[0] == 0) { cmark_strbuf_puts(html, ""); } else { bufsize_t first_tag = 0; - while (first_tag < node->as.code.info.len && - !cmark_isspace(node->as.code.info.data[first_tag])) { + while (node->as.code.info[first_tag] && + !cmark_isspace(node->as.code.info[first_tag])) { first_tag += 1; } cmark_strbuf_puts(html, "as.code.info.data, first_tag); + escape_html(html, node->as.code.info, first_tag); cmark_strbuf_puts(html, "\">"); } - escape_html(html, node->as.code.literal.data, node->as.code.literal.len); + escape_html(html, node->data, node->len); cmark_strbuf_puts(html, "\n"); break; @@ -173,22 +173,21 @@ static int S_render_node(cmark_node *node, cmark_event_type ev_type, if (!(options & CMARK_OPT_UNSAFE)) { cmark_strbuf_puts(html, ""); } else { - cmark_strbuf_put(html, node->as.literal.data, node->as.literal.len); + cmark_strbuf_put(html, node->data, node->len); } cr(html); break; - case CMARK_NODE_CUSTOM_BLOCK: + case CMARK_NODE_CUSTOM_BLOCK: { + unsigned char *block = entering ? node->as.custom.on_enter : + node->as.custom.on_exit; cr(html); - if (entering) { - cmark_strbuf_put(html, node->as.custom.on_enter.data, - node->as.custom.on_enter.len); - } else { - cmark_strbuf_put(html, node->as.custom.on_exit.data, - node->as.custom.on_exit.len); + if (block) { + cmark_strbuf_puts(html, (char *)block); } cr(html); break; + } case CMARK_NODE_THEMATIC_BREAK: cr(html); @@ -218,7 +217,7 @@ static int S_render_node(cmark_node *node, cmark_event_type ev_type, break; case CMARK_NODE_TEXT: - escape_html(html, node->as.literal.data, node->as.literal.len); + escape_html(html, node->data, node->len); break; case CMARK_NODE_LINEBREAK: @@ -237,7 +236,7 @@ static int S_render_node(cmark_node *node, cmark_event_type ev_type, case CMARK_NODE_CODE: cmark_strbuf_puts(html, ""); - escape_html(html, node->as.literal.data, node->as.literal.len); + escape_html(html, node->data, node->len); cmark_strbuf_puts(html, ""); break; @@ -245,19 +244,18 @@ static int S_render_node(cmark_node *node, cmark_event_type ev_type, if (!(options & CMARK_OPT_UNSAFE)) { cmark_strbuf_puts(html, ""); } else { - cmark_strbuf_put(html, node->as.literal.data, node->as.literal.len); + cmark_strbuf_put(html, node->data, node->len); } break; - case CMARK_NODE_CUSTOM_INLINE: - if (entering) { - cmark_strbuf_put(html, node->as.custom.on_enter.data, - node->as.custom.on_enter.len); - } else { - cmark_strbuf_put(html, node->as.custom.on_exit.data, - node->as.custom.on_exit.len); + case CMARK_NODE_CUSTOM_INLINE: { + unsigned char *block = entering ? node->as.custom.on_enter : + node->as.custom.on_exit; + if (block) { + cmark_strbuf_puts(html, (char *)block); } break; + } case CMARK_NODE_STRONG: if (entering) { @@ -278,14 +276,15 @@ static int S_render_node(cmark_node *node, cmark_event_type ev_type, case CMARK_NODE_LINK: if (entering) { cmark_strbuf_puts(html, "as.link.url, 0))) { - houdini_escape_href(html, node->as.link.url.data, - node->as.link.url.len); + if (node->as.link.url && ((options & CMARK_OPT_UNSAFE) || + !(_scan_dangerous_url(node->as.link.url)))) { + houdini_escape_href(html, node->as.link.url, + strlen((char *)node->as.link.url)); } - if (node->as.link.title.len) { + if (node->as.link.title) { cmark_strbuf_puts(html, "\" title=\""); - escape_html(html, node->as.link.title.data, node->as.link.title.len); + escape_html(html, node->as.link.title, + strlen((char *)node->as.link.title)); } cmark_strbuf_puts(html, "\">"); } else { @@ -296,17 +295,18 @@ static int S_render_node(cmark_node *node, cmark_event_type ev_type, case CMARK_NODE_IMAGE: if (entering) { cmark_strbuf_puts(html, "as.link.url, 0))) { - houdini_escape_href(html, node->as.link.url.data, - node->as.link.url.len); + if (node->as.link.url && ((options & CMARK_OPT_UNSAFE) || + !(_scan_dangerous_url(node->as.link.url)))) { + houdini_escape_href(html, node->as.link.url, + strlen((char *)node->as.link.url)); } cmark_strbuf_puts(html, "\" alt=\""); state->plain = node; } else { - if (node->as.link.title.len) { + if (node->as.link.title) { cmark_strbuf_puts(html, "\" title=\""); - escape_html(html, node->as.link.title.data, node->as.link.title.len); + escape_html(html, node->as.link.title, + strlen((char *)node->as.link.title)); } cmark_strbuf_puts(html, "\" />"); @@ -324,7 +324,7 @@ static int S_render_node(cmark_node *node, cmark_event_type ev_type, char *cmark_render_html(cmark_node *root, int options) { char *result; - cmark_strbuf html = CMARK_BUF_INIT(cmark_node_mem(root)); + cmark_strbuf html = CMARK_BUF_INIT(root->mem); cmark_event_type ev_type; cmark_node *cur; struct render_state state = {&html, NULL}; diff --git a/cbits/inlines.c b/cbits/inlines.c index e6b491f..96f4d45 100644 --- a/cbits/inlines.c +++ b/cbits/inlines.c @@ -22,9 +22,6 @@ static const char *LEFTSINGLEQUOTE = "\xE2\x80\x98"; static const char *RIGHTSINGLEQUOTE = "\xE2\x80\x99"; // Macros for creating various kinds of simple. -#define make_str(subj, sc, ec, s) make_literal(subj, CMARK_NODE_TEXT, sc, ec, s) -#define make_code(subj, sc, ec, s) make_literal(subj, CMARK_NODE_CODE, sc, ec, s) -#define make_raw_html(subj, sc, ec, s) make_literal(subj, CMARK_NODE_HTML_INLINE, sc, ec, s) #define make_linebreak(mem) make_simple(mem, CMARK_NODE_LINEBREAK) #define make_softbreak(mem) make_simple(mem, CMARK_NODE_SOFTBREAK) #define make_emph(mem) make_simple(mem, CMARK_NODE_EMPH) @@ -36,6 +33,7 @@ typedef struct delimiter { struct delimiter *previous; struct delimiter *next; cmark_node *inl_text; + bufsize_t position; bufsize_t length; unsigned char delim_char; bool can_open; @@ -44,7 +42,6 @@ typedef struct delimiter { typedef struct bracket { struct bracket *previous; - struct delimiter *previous_delimiter; cmark_node *inl_text; bufsize_t position; bool image; @@ -52,9 +49,15 @@ typedef struct bracket { bool bracket_after; } bracket; +#define FLAG_SKIP_HTML_CDATA (1u << 0) +#define FLAG_SKIP_HTML_DECLARATION (1u << 1) +#define FLAG_SKIP_HTML_PI (1u << 2) +#define FLAG_SKIP_HTML_COMMENT (1u << 3) + typedef struct { cmark_mem *mem; cmark_chunk input; + unsigned flags; int line; bufsize_t pos; int block_offset; @@ -64,6 +67,7 @@ typedef struct { bracket *last_bracket; bufsize_t backticks[MAXBACKTICKS + 1]; bool scanned_for_backticks; + bool no_link_openers; } subject; static CMARK_INLINE bool S_is_line_end_char(char c) { @@ -81,12 +85,10 @@ static bufsize_t subject_find_special_char(subject *subj, int options); // Create an inline with a literal string value. static CMARK_INLINE cmark_node *make_literal(subject *subj, cmark_node_type t, - int start_column, int end_column, - cmark_chunk s) { + int start_column, int end_column) { cmark_node *e = (cmark_node *)subj->mem->calloc(1, sizeof(*e)); - cmark_strbuf_init(subj->mem, &e->content, 0); + e->mem = subj->mem; e->type = (uint16_t)t; - e->as.literal = s; e->start_line = e->end_line = subj->line; // columns are 1 based. e->start_column = start_column + 1 + subj->column_offset + subj->block_offset; @@ -97,11 +99,30 @@ static CMARK_INLINE cmark_node *make_literal(subject *subj, cmark_node_type t, // Create an inline with no value. static CMARK_INLINE cmark_node *make_simple(cmark_mem *mem, cmark_node_type t) { cmark_node *e = (cmark_node *)mem->calloc(1, sizeof(*e)); - cmark_strbuf_init(mem, &e->content, 0); + e->mem = mem; e->type = t; return e; } +static cmark_node *make_str(subject *subj, int sc, int ec, cmark_chunk s) { + cmark_node *e = make_literal(subj, CMARK_NODE_TEXT, sc, ec); + e->data = (unsigned char *)subj->mem->realloc(NULL, s.len + 1); + if (s.data != NULL) { + memcpy(e->data, s.data, s.len); + } + e->data[s.len] = 0; + e->len = s.len; + return e; +} + +static cmark_node *make_str_from_buf(subject *subj, int sc, int ec, + cmark_strbuf *buf) { + cmark_node *e = make_literal(subj, CMARK_NODE_TEXT, sc, ec); + e->len = buf->size; + e->data = cmark_strbuf_detach(buf); + return e; +} + // Like make_str, but parses entities. static cmark_node *make_str_with_entities(subject *subj, int start_column, int end_column, @@ -109,44 +130,53 @@ static cmark_node *make_str_with_entities(subject *subj, cmark_strbuf unescaped = CMARK_BUF_INIT(subj->mem); if (houdini_unescape_html(&unescaped, content->data, content->len)) { - return make_str(subj, start_column, end_column, cmark_chunk_buf_detach(&unescaped)); + return make_str_from_buf(subj, start_column, end_column, &unescaped); } else { return make_str(subj, start_column, end_column, *content); } } +// Like cmark_node_append_child but without costly sanity checks. +// Assumes that child was newly created. +static void append_child(cmark_node *node, cmark_node *child) { + cmark_node *old_last_child = node->last_child; + + child->next = NULL; + child->prev = old_last_child; + child->parent = node; + node->last_child = child; + + if (old_last_child) { + old_last_child->next = child; + } else { + // Also set first_child if node previously had no children. + node->first_child = child; + } +} + // Duplicate a chunk by creating a copy of the buffer not by reusing the // buffer like cmark_chunk_dup does. -static cmark_chunk chunk_clone(cmark_mem *mem, cmark_chunk *src) { - cmark_chunk c; - bufsize_t len = src->len; - - c.len = len; - c.data = (unsigned char *)mem->calloc(len + 1, 1); - c.alloc = 1; - if (len) - memcpy(c.data, src->data, len); - c.data[len] = '\0'; - - return c; +static unsigned char *cmark_strdup(cmark_mem *mem, unsigned char *src) { + if (src == NULL) { + return NULL; + } + size_t len = strlen((char *)src); + unsigned char *data = (unsigned char *)mem->realloc(NULL, len + 1); + memcpy(data, src, len + 1); + return data; } -static cmark_chunk cmark_clean_autolink(cmark_mem *mem, cmark_chunk *url, - int is_email) { +static unsigned char *cmark_clean_autolink(cmark_mem *mem, cmark_chunk *url, + int is_email) { cmark_strbuf buf = CMARK_BUF_INIT(mem); cmark_chunk_trim(url); - if (url->len == 0) { - cmark_chunk result = CMARK_CHUNK_EMPTY; - return result; - } - if (is_email) cmark_strbuf_puts(&buf, "mailto:"); houdini_unescape_html_f(&buf, url->data, url->len); - return cmark_chunk_buf_detach(&buf); + return cmark_strbuf_detach(&buf); } static CMARK_INLINE cmark_node *make_autolink(subject *subj, @@ -154,11 +184,11 @@ static CMARK_INLINE cmark_node *make_autolink(subject *subj, cmark_chunk url, int is_email) { cmark_node *link = make_simple(subj->mem, CMARK_NODE_LINK); link->as.link.url = cmark_clean_autolink(subj->mem, &url, is_email); - link->as.link.title = cmark_chunk_literal(""); + link->as.link.title = NULL; link->start_line = link->end_line = subj->line; link->start_column = start_column + 1; link->end_column = end_column + 1; - cmark_node_append_child(link, make_str_with_entities(subj, start_column + 1, end_column - 1, &url)); + append_child(link, make_str_with_entities(subj, start_column + 1, end_column - 1, &url)); return link; } @@ -167,6 +197,7 @@ static void subject_from_buf(cmark_mem *mem, int line_number, int block_offset, int i; e->mem = mem; e->input = *chunk; + e->flags = 0; e->line = line_number; e->pos = 0; e->block_offset = block_offset; @@ -178,6 +209,7 @@ static void subject_from_buf(cmark_mem *mem, int line_number, int block_offset, e->backticks[i] = 0; } e->scanned_for_backticks = false; + e->no_link_openers = true; } static CMARK_INLINE int isbacktick(int c) { return (c == '`'); } @@ -334,7 +366,7 @@ static void S_normalize_code(cmark_strbuf *s) { switch (s->ptr[r]) { case '\r': if (s->ptr[r + 1] != '\n') { - s->ptr[w++] = ' '; + s->ptr[w++] = ' '; } break; case '\n': @@ -363,13 +395,14 @@ static void S_normalize_code(cmark_strbuf *s) { // Parse backtick code section or raw backticks, return an inline. // Assumes that the subject has a backtick at the current position. static cmark_node *handle_backticks(subject *subj, int options) { + bufsize_t initpos = subj->pos; cmark_chunk openticks = take_while(subj, isbacktick); bufsize_t startpos = subj->pos; bufsize_t endpos = scan_to_closing_backticks(subj, openticks.len); if (endpos == 0) { // not found subj->pos = startpos; // rewind - return make_str(subj, subj->pos, subj->pos, openticks); + return make_str(subj, initpos, initpos + openticks.len - 1, openticks); } else { cmark_strbuf buf = CMARK_BUF_INIT(subj->mem); @@ -377,7 +410,10 @@ static cmark_node *handle_backticks(subject *subj, int options) { endpos - startpos - openticks.len); S_normalize_code(&buf); - cmark_node *node = make_code(subj, startpos, endpos - openticks.len - 1, cmark_chunk_buf_detach(&buf)); + cmark_node *node = make_literal(subj, CMARK_NODE_CODE, startpos, + endpos - openticks.len - 1); + node->len = buf.size; + node->data = cmark_strbuf_detach(&buf); adjust_subj_node_newlines(subj, node, endpos - startpos, openticks.len, options); return node; } @@ -439,8 +475,9 @@ static int scan_delims(subject *subj, unsigned char c, bool *can_open, *can_close = right_flanking && (!left_flanking || cmark_utf8proc_is_punctuation(after_char)); } else if (c == '\'' || c == '"') { - *can_open = left_flanking && !right_flanking && - before_char != ']' && before_char != ')'; + *can_open = left_flanking && + (!right_flanking || before_char == '(' || before_char == '[') && + before_char != ']' && before_char != ')'; *can_close = right_flanking; } else { *can_open = left_flanking; @@ -496,7 +533,8 @@ static void push_delimiter(subject *subj, unsigned char c, bool can_open, delim->can_open = can_open; delim->can_close = can_close; delim->inl_text = inl_text; - delim->length = inl_text->as.literal.len; + delim->position = subj->pos; + delim->length = inl_text->len; delim->previous = subj->last_delim; delim->next = NULL; if (delim->previous != NULL) { @@ -514,10 +552,12 @@ static void push_bracket(subject *subj, bool image, cmark_node *inl_text) { b->active = true; b->inl_text = inl_text; b->previous = subj->last_bracket; - b->previous_delimiter = subj->last_delim; b->position = subj->pos; b->bracket_after = false; subj->last_bracket = b; + if (!image) { + subj->no_link_openers = false; + } } // Assumes the subject has a c at the current position. @@ -587,7 +627,7 @@ static cmark_node *handle_hyphen(subject *subj, bool smart) { cmark_strbuf_puts(&buf, ENDASH); } - return make_str(subj, startpos, subj->pos - 1, cmark_chunk_buf_detach(&buf)); + return make_str_from_buf(subj, startpos, subj->pos - 1, &buf); } // Assumes we have a period at the current position. @@ -606,18 +646,22 @@ static cmark_node *handle_period(subject *subj, bool smart) { } } -static void process_emphasis(subject *subj, delimiter *stack_bottom) { - delimiter *closer = subj->last_delim; +static void process_emphasis(subject *subj, bufsize_t stack_bottom) { + delimiter *candidate; + delimiter *closer = NULL; delimiter *opener; delimiter *old_closer; bool opener_found; int openers_bottom_index = 0; - delimiter *openers_bottom[6] = {stack_bottom, stack_bottom, stack_bottom, - stack_bottom, stack_bottom, stack_bottom}; + bufsize_t openers_bottom[9] = {stack_bottom, stack_bottom, stack_bottom, + stack_bottom, stack_bottom, stack_bottom, + stack_bottom, stack_bottom, stack_bottom}; // move back to first relevant delim. - while (closer != NULL && closer->previous != stack_bottom) { - closer = closer->previous; + candidate = subj->last_delim; + while (candidate != NULL && candidate->position >= stack_bottom) { + closer = candidate; + candidate = candidate->previous; } // now move forward, looking for closers, and handling each @@ -634,7 +678,8 @@ static void process_emphasis(subject *subj, delimiter *stack_bottom) { openers_bottom_index = 2; break; case '*': - openers_bottom_index = 3 + (closer->length % 3); + openers_bottom_index = 3 + + (closer->can_open ? 3 : 0) + (closer->length % 3); break; default: assert(false); @@ -643,12 +688,13 @@ static void process_emphasis(subject *subj, delimiter *stack_bottom) { // Now look backwards for first matching opener: opener = closer->previous; opener_found = false; - while (opener != NULL && opener != openers_bottom[openers_bottom_index]) { + while (opener != NULL && + opener->position >= openers_bottom[openers_bottom_index]) { if (opener->can_open && opener->delim_char == closer->delim_char) { // interior closer of size 2 can't match opener of size 1 // or of size 1 can't match 2 if (!(closer->can_open || opener->can_close) || - closer->length % 3 == 0 || + closer->length % 3 == 0 || (opener->length + closer->length) % 3 != 0) { opener_found = true; break; @@ -663,26 +709,26 @@ static void process_emphasis(subject *subj, delimiter *stack_bottom) { } else { closer = closer->next; } - } else if (closer->delim_char == '\'') { - cmark_chunk_free(subj->mem, &closer->inl_text->as.literal); - closer->inl_text->as.literal = cmark_chunk_literal(RIGHTSINGLEQUOTE); - if (opener_found) { - cmark_chunk_free(subj->mem, &opener->inl_text->as.literal); - opener->inl_text->as.literal = cmark_chunk_literal(LEFTSINGLEQUOTE); + } else if (closer->delim_char == '\'' || closer->delim_char == '"') { + if (closer->delim_char == '\'') { + cmark_node_set_literal(closer->inl_text, RIGHTSINGLEQUOTE); + } else { + cmark_node_set_literal(closer->inl_text, RIGHTDOUBLEQUOTE); } closer = closer->next; - } else if (closer->delim_char == '"') { - cmark_chunk_free(subj->mem, &closer->inl_text->as.literal); - closer->inl_text->as.literal = cmark_chunk_literal(RIGHTDOUBLEQUOTE); if (opener_found) { - cmark_chunk_free(subj->mem, &opener->inl_text->as.literal); - opener->inl_text->as.literal = cmark_chunk_literal(LEFTDOUBLEQUOTE); + if (old_closer->delim_char == '\'') { + cmark_node_set_literal(opener->inl_text, LEFTSINGLEQUOTE); + } else { + cmark_node_set_literal(opener->inl_text, LEFTDOUBLEQUOTE); + } + remove_delimiter(subj, opener); + remove_delimiter(subj, old_closer); } - closer = closer->next; } if (!opener_found) { // set lower bound for future searches for openers - openers_bottom[openers_bottom_index] = old_closer->previous; + openers_bottom[openers_bottom_index] = old_closer->position; if (!old_closer->can_open) { // we can remove a closer that can't be an // opener, once we've seen there's no @@ -695,7 +741,8 @@ static void process_emphasis(subject *subj, delimiter *stack_bottom) { } } // free all delimiters in list until stack_bottom: - while (subj->last_delim != NULL && subj->last_delim != stack_bottom) { + while (subj->last_delim != NULL && + subj->last_delim->position >= stack_bottom) { remove_delimiter(subj, subj->last_delim); } } @@ -706,8 +753,8 @@ static delimiter *S_insert_emph(subject *subj, delimiter *opener, bufsize_t use_delims; cmark_node *opener_inl = opener->inl_text; cmark_node *closer_inl = closer->inl_text; - bufsize_t opener_num_chars = opener_inl->as.literal.len; - bufsize_t closer_num_chars = closer_inl->as.literal.len; + bufsize_t opener_num_chars = opener_inl->len; + bufsize_t closer_num_chars = closer_inl->len; cmark_node *tmp, *tmpnext, *emph; // calculate the actual number of characters used from this closer @@ -716,8 +763,10 @@ static delimiter *S_insert_emph(subject *subj, delimiter *opener, // remove used characters from associated inlines. opener_num_chars -= use_delims; closer_num_chars -= use_delims; - opener_inl->as.literal.len = opener_num_chars; - closer_inl->as.literal.len = closer_num_chars; + opener_inl->len = opener_num_chars; + opener_inl->data[opener_num_chars] = 0; + closer_inl->len = closer_num_chars; + closer_inl->data[closer_num_chars] = 0; // free delimiters between opener and closer delim = closer->previous; @@ -734,7 +783,8 @@ static delimiter *S_insert_emph(subject *subj, delimiter *opener, tmp = opener_inl->next; while (tmp && tmp != closer_inl) { tmpnext = tmp->next; - cmark_node_append_child(emph, tmp); + cmark_node_unlink(tmp); + append_child(emph, tmp); tmp = tmpnext; } cmark_node_insert_after(opener_inl, emph); @@ -789,38 +839,32 @@ static cmark_node *handle_entity(subject *subj) { len = houdini_unescape_ent(&ent, subj->input.data + subj->pos, subj->input.len - subj->pos); - if (len == 0) + if (len <= 0) return make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal("&")); subj->pos += len; - return make_str(subj, subj->pos - 1 - len, subj->pos - 1, cmark_chunk_buf_detach(&ent)); + return make_str_from_buf(subj, subj->pos - 1 - len, subj->pos - 1, &ent); } // Clean a URL: remove surrounding whitespace, and remove \ that escape // punctuation. -cmark_chunk cmark_clean_url(cmark_mem *mem, cmark_chunk *url) { +unsigned char *cmark_clean_url(cmark_mem *mem, cmark_chunk *url) { cmark_strbuf buf = CMARK_BUF_INIT(mem); cmark_chunk_trim(url); - if (url->len == 0) { - cmark_chunk result = CMARK_CHUNK_EMPTY; - return result; - } - - houdini_unescape_html_f(&buf, url->data, url->len); + houdini_unescape_html_f(&buf, url->data, url->len); cmark_strbuf_unescape(&buf); - return cmark_chunk_buf_detach(&buf); + return cmark_strbuf_detach(&buf); } -cmark_chunk cmark_clean_title(cmark_mem *mem, cmark_chunk *title) { +unsigned char *cmark_clean_title(cmark_mem *mem, cmark_chunk *title) { cmark_strbuf buf = CMARK_BUF_INIT(mem); unsigned char first, last; if (title->len == 0) { - cmark_chunk result = CMARK_CHUNK_EMPTY; - return result; + return NULL; } first = title->data[0]; @@ -835,7 +879,7 @@ cmark_chunk cmark_clean_title(cmark_mem *mem, cmark_chunk *title) { } cmark_strbuf_unescape(&buf); - return cmark_chunk_buf_detach(&buf); + return cmark_strbuf_detach(&buf); } // Parse an autolink or HTML tag. @@ -865,11 +909,73 @@ static cmark_node *handle_pointy_brace(subject *subj, int options) { } // finally, try to match an html tag - matchlen = scan_html_tag(&subj->input, subj->pos); + if (subj->pos + 2 <= subj->input.len) { + int c = subj->input.data[subj->pos]; + if (c == '!' && (subj->flags & FLAG_SKIP_HTML_COMMENT) == 0) { + c = subj->input.data[subj->pos+1]; + if (c == '-' && subj->input.data[subj->pos+2] == '-') { + if (subj->input.data[subj->pos+3] == '>') { + matchlen = 4; + } else if (subj->input.data[subj->pos+3] == '-' && + subj->input.data[subj->pos+4] == '>') { + matchlen = 5; + } else { + matchlen = scan_html_comment(&subj->input, subj->pos + 1); + if (matchlen > 0) { + matchlen += 1; // prefix "<" + } else { // no match through end of input: set a flag so + // we don't reparse looking for -->: + subj->flags |= FLAG_SKIP_HTML_COMMENT; + } + } + } else if (c == '[') { + if ((subj->flags & FLAG_SKIP_HTML_CDATA) == 0) { + matchlen = scan_html_cdata(&subj->input, subj->pos + 2); + if (matchlen > 0) { + // The regex doesn't require the final "]]>". But if we're not at + // the end of input, it must come after the match. Otherwise, + // disable subsequent scans to avoid quadratic behavior. + matchlen += 5; // prefix "![", suffix "]]>" + if (subj->pos + matchlen > subj->input.len) { + subj->flags |= FLAG_SKIP_HTML_CDATA; + matchlen = 0; + } + } + } + } else if ((subj->flags & FLAG_SKIP_HTML_DECLARATION) == 0) { + matchlen = scan_html_declaration(&subj->input, subj->pos + 1); + if (matchlen > 0) { + matchlen += 2; // prefix "!", suffix ">" + if (subj->pos + matchlen > subj->input.len) { + subj->flags |= FLAG_SKIP_HTML_DECLARATION; + matchlen = 0; + } + } + } + } else if (c == '?') { + if ((subj->flags & FLAG_SKIP_HTML_PI) == 0) { + // Note that we allow an empty match. + matchlen = scan_html_pi(&subj->input, subj->pos + 1); + matchlen += 3; // prefix "?", suffix "?>" + if (subj->pos + matchlen > subj->input.len) { + subj->flags |= FLAG_SKIP_HTML_PI; + matchlen = 0; + } + } + } else { + matchlen = scan_html_tag(&subj->input, subj->pos); + } + } if (matchlen > 0) { - contents = cmark_chunk_dup(&subj->input, subj->pos - 1, matchlen + 1); + const unsigned char *src = subj->input.data + subj->pos - 1; + bufsize_t len = matchlen + 1; subj->pos += matchlen; - cmark_node *node = make_raw_html(subj, subj->pos - matchlen - 1, subj->pos - 1, contents); + cmark_node *node = make_literal(subj, CMARK_NODE_HTML_INLINE, + subj->pos - matchlen - 1, subj->pos - 1); + node->data = (unsigned char *)subj->mem->realloc(NULL, len + 1); + memcpy(node->data, src, len); + node->data[len] = 0; + node->len = len; adjust_subj_node_newlines(subj, node, matchlen, 1, options); return node; } @@ -929,36 +1035,36 @@ static bufsize_t manual_scan_link_url_2(cmark_chunk *input, bufsize_t offset, bufsize_t i = offset; size_t nb_p = 0; - while (i < input->len) { - if (input->data[i] == '\\' && - i + 1 < input-> len && - cmark_ispunct(input->data[i+1])) - i += 2; - else if (input->data[i] == '(') { - ++nb_p; - ++i; - if (nb_p > 32) - return -1; - } else if (input->data[i] == ')') { - if (nb_p == 0) - break; - --nb_p; - ++i; - } else if (cmark_isspace(input->data[i])) { - if (i == offset) { - return -1; - } + while (i < input->len) { + if (input->data[i] == '\\' && + i + 1 < input-> len && + cmark_ispunct(input->data[i+1])) + i += 2; + else if (input->data[i] == '(') { + ++nb_p; + ++i; + if (nb_p > 32) + return -1; + } else if (input->data[i] == ')') { + if (nb_p == 0) break; - } else { - ++i; + --nb_p; + ++i; + } else if (cmark_isspace(input->data[i])) { + if (i == offset) { + return -1; } + break; + } else { + ++i; } + } - if (i >= input->len) + if (i >= input->len || nb_p != 0) return -1; { - cmark_chunk result = {input->data + offset, i - offset, 0}; + cmark_chunk result = {input->data + offset, i - offset}; *output = result; } return i - offset; @@ -989,7 +1095,7 @@ static bufsize_t manual_scan_link_url(cmark_chunk *input, bufsize_t offset, return -1; { - cmark_chunk result = {input->data + offset + 1, i - 2 - offset, 0}; + cmark_chunk result = {input->data + offset + 1, i - 2 - offset}; *output = result; } return i - offset; @@ -1002,7 +1108,7 @@ static cmark_node *handle_close_bracket(subject *subj) { bufsize_t sps, n; cmark_reference *ref = NULL; cmark_chunk url_chunk, title_chunk; - cmark_chunk url, title; + unsigned char *url, *title; bracket *opener; cmark_node *inl; cmark_chunk raw_label; @@ -1020,16 +1126,16 @@ static cmark_node *handle_close_bracket(subject *subj) { return make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal("]")); } - if (!opener->active) { + // If we got here, we matched a potential link/image text. + // Now we check to see if it's a link/image. + is_image = opener->image; + + if (!is_image && subj->no_link_openers) { // take delimiter off stack pop_bracket(subj); return make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal("]")); } - // If we got here, we matched a potential link/image text. - // Now we check to see if it's a link/image. - is_image = opener->image; - after_link_text_pos = subj->pos; // First, look for an inline link. @@ -1056,8 +1162,8 @@ static cmark_node *handle_close_bracket(subject *subj) { cmark_chunk_dup(&subj->input, starttitle, endtitle - starttitle); url = cmark_clean_url(subj->mem, &url_chunk); title = cmark_clean_title(subj->mem, &title_chunk); - cmark_chunk_free(subj->mem, &url_chunk); - cmark_chunk_free(subj->mem, &title_chunk); + cmark_chunk_free(&url_chunk); + cmark_chunk_free(&title_chunk); goto match; } else { @@ -1077,7 +1183,7 @@ static cmark_node *handle_close_bracket(subject *subj) { } if ((!found_label || raw_label.len == 0) && !opener->bracket_after) { - cmark_chunk_free(subj->mem, &raw_label); + cmark_chunk_free(&raw_label); raw_label = cmark_chunk_dup(&subj->input, opener->position, initial_pos - opener->position - 1); found_label = true; @@ -1085,12 +1191,12 @@ static cmark_node *handle_close_bracket(subject *subj) { if (found_label) { ref = cmark_reference_lookup(subj->refmap, &raw_label); - cmark_chunk_free(subj->mem, &raw_label); + cmark_chunk_free(&raw_label); } if (ref != NULL) { // found - url = chunk_clone(subj->mem, &ref->url); - title = chunk_clone(subj->mem, &ref->title); + url = cmark_strdup(subj->mem, ref->url); + title = cmark_strdup(subj->mem, ref->title); goto match; } else { goto noMatch; @@ -1114,31 +1220,22 @@ static cmark_node *handle_close_bracket(subject *subj) { tmp = opener->inl_text->next; while (tmp) { tmpnext = tmp->next; - cmark_node_append_child(inl, tmp); + cmark_node_unlink(tmp); + append_child(inl, tmp); tmp = tmpnext; } // Free the bracket [: cmark_node_free(opener->inl_text); - process_emphasis(subj, opener->previous_delimiter); + process_emphasis(subj, opener->position); pop_bracket(subj); - // Now, if we have a link, we also want to deactivate earlier link - // delimiters. (This code can be removed if we decide to allow links + // Now, if we have a link, we also want to deactivate links until + // we get a new opener. (This code can be removed if we decide to allow links // inside links.) if (!is_image) { - opener = subj->last_bracket; - while (opener != NULL) { - if (!opener->image) { - if (!opener->active) { - break; - } else { - opener->active = false; - } - } - opener = opener->previous; - } + subj->no_link_openers = true; } return NULL; @@ -1282,24 +1379,26 @@ static int parse_inline(subject *subj, cmark_node *parent, int options) { new_inl = make_str(subj, startpos, endpos - 1, contents); } if (new_inl != NULL) { - cmark_node_append_child(parent, new_inl); + append_child(parent, new_inl); } return 1; } // Parse inlines from parent's string_content, adding as children of parent. -extern void cmark_parse_inlines(cmark_mem *mem, cmark_node *parent, - cmark_reference_map *refmap, int options) { +void cmark_parse_inlines(cmark_mem *mem, cmark_node *parent, + cmark_reference_map *refmap, int options) { + int internal_offset = parent->type == CMARK_NODE_HEADING ? + parent->as.heading.internal_offset : 0; subject subj; - cmark_chunk content = {parent->content.ptr, parent->content.size, 0}; - subject_from_buf(mem, parent->start_line, parent->start_column - 1 + parent->internal_offset, &subj, &content, refmap); + cmark_chunk content = {parent->data, parent->len}; + subject_from_buf(mem, parent->start_line, parent->start_column - 1 + internal_offset, &subj, &content, refmap); cmark_chunk_rtrim(&subj.input); while (!is_eof(&subj) && parse_inline(&subj, parent, options)) ; - process_emphasis(&subj, NULL); + process_emphasis(&subj, 0); // free bracket and delim stack while (subj.last_delim) { remove_delimiter(&subj, subj.last_delim); diff --git a/cbits/inlines.h b/cbits/inlines.h index 39d3363..800ed0c 100644 --- a/cbits/inlines.h +++ b/cbits/inlines.h @@ -1,12 +1,15 @@ #ifndef CMARK_INLINES_H #define CMARK_INLINES_H +#include "chunk.h" +#include "references.h" + #ifdef __cplusplus extern "C" { #endif -cmark_chunk cmark_clean_url(cmark_mem *mem, cmark_chunk *url); -cmark_chunk cmark_clean_title(cmark_mem *mem, cmark_chunk *title); +unsigned char *cmark_clean_url(cmark_mem *mem, cmark_chunk *url); +unsigned char *cmark_clean_title(cmark_mem *mem, cmark_chunk *title); void cmark_parse_inlines(cmark_mem *mem, cmark_node *parent, cmark_reference_map *refmap, int options); diff --git a/cbits/iterator.c b/cbits/iterator.c index f5cd802..63cbf9e 100644 --- a/cbits/iterator.c +++ b/cbits/iterator.c @@ -16,7 +16,7 @@ cmark_iter *cmark_iter_new(cmark_node *root) { if (root == NULL) { return NULL; } - cmark_mem *mem = root->content.mem; + cmark_mem *mem = root->mem; cmark_iter *iter = (cmark_iter *)mem->calloc(1, sizeof(cmark_iter)); iter->mem = mem; iter->root = root; @@ -101,18 +101,19 @@ void cmark_consolidate_text_nodes(cmark_node *root) { if (ev_type == CMARK_EVENT_ENTER && cur->type == CMARK_NODE_TEXT && cur->next && cur->next->type == CMARK_NODE_TEXT) { cmark_strbuf_clear(&buf); - cmark_strbuf_put(&buf, cur->as.literal.data, cur->as.literal.len); + cmark_strbuf_put(&buf, cur->data, cur->len); tmp = cur->next; while (tmp && tmp->type == CMARK_NODE_TEXT) { cmark_iter_next(iter); // advance pointer - cmark_strbuf_put(&buf, tmp->as.literal.data, tmp->as.literal.len); + cmark_strbuf_put(&buf, tmp->data, tmp->len); cur->end_column = tmp->end_column; next = tmp->next; cmark_node_free(tmp); tmp = next; } - cmark_chunk_free(iter->mem, &cur->as.literal); - cur->as.literal = cmark_chunk_buf_detach(&buf); + iter->mem->free(cur->data); + cur->len = buf.size; + cur->data = cmark_strbuf_detach(&buf); } } diff --git a/cbits/latex.c b/cbits/latex.c index 0d9517d..2051ed3 100644 --- a/cbits/latex.c +++ b/cbits/latex.c @@ -190,9 +190,9 @@ static link_type get_link_type(cmark_node *node) { realurllen -= 7; isemail = true; } - if (realurllen == link_text->as.literal.len && - strncmp(realurl, (char *)link_text->as.literal.data, - link_text->as.literal.len) == 0) { + if (realurllen == link_text->len && + strncmp(realurl, (char *)link_text->data, + link_text->len) == 0) { if (isemail) { return EMAIL_AUTOLINK; } else { @@ -256,7 +256,7 @@ static int S_render_node(cmark_renderer *renderer, cmark_node *node, // latex normally supports only five levels if (enumlevel >= 1 && enumlevel <= 5) { snprintf(list_number_string, LIST_NUMBER_STRING_SIZE, "%d", - list_number); + list_number - 1); // the next item will increment this LIT("\\setcounter{enum"); switch (enumlevel) { case 1: LIT("i"); break; @@ -265,7 +265,7 @@ static int S_render_node(cmark_renderer *renderer, cmark_node *node, case 4: LIT("iv"); break; case 5: LIT("v"); break; default: LIT("i"); break; - } + } LIT("}{"); OUT(list_number_string, false, NORMAL); LIT("}"); diff --git a/cbits/man.c b/cbits/man.c index 1c76f68..65e5c79 100644 --- a/cbits/man.c +++ b/cbits/man.c @@ -76,10 +76,25 @@ static int S_render_node(cmark_renderer *renderer, cmark_node *node, int list_number; bool entering = (ev_type == CMARK_EVENT_ENTER); bool allow_wrap = renderer->width > 0 && !(CMARK_OPT_NOBREAKS & options); + struct block_number *new_block_number; + cmark_mem *allocator = cmark_get_default_mem_allocator(); // avoid unused parameter error: (void)(options); + // indent inside nested lists + if (renderer->block_number_in_list_item && + node->type < CMARK_NODE_FIRST_INLINE) { + if (entering) { + renderer->block_number_in_list_item->number += 1; + if (renderer->block_number_in_list_item->number == 2) { + CR(); + LIT(".RS"); // indent + CR(); + } + } + } + switch (node->type) { case CMARK_NODE_DOCUMENT: break; @@ -101,6 +116,10 @@ static int S_render_node(cmark_renderer *renderer, cmark_node *node, case CMARK_NODE_ITEM: if (entering) { + new_block_number = allocator->calloc(1, sizeof(struct block_number)); + new_block_number->number = 0; + new_block_number->parent = renderer->block_number_in_list_item; + renderer->block_number_in_list_item = new_block_number; CR(); LIT(".IP "); if (cmark_node_get_list_type(node->parent) == CMARK_BULLET_LIST) { @@ -118,6 +137,16 @@ static int S_render_node(cmark_renderer *renderer, cmark_node *node, } CR(); } else { + if (renderer->block_number_in_list_item) { + if (renderer->block_number_in_list_item->number >= 2) { + CR(); + LIT(".RE"); // de-indent + } + new_block_number = renderer->block_number_in_list_item; + renderer->block_number_in_list_item = + renderer->block_number_in_list_item->parent; + allocator->free(new_block_number); + } CR(); } break; diff --git a/cbits/node.c b/cbits/node.c index c6c2902..3b0cf13 100644 --- a/cbits/node.c +++ b/cbits/node.c @@ -6,8 +6,6 @@ static void S_node_unlink(cmark_node *node); -#define NODE_MEM(node) cmark_node_mem(node) - static CMARK_INLINE bool S_is_block(cmark_node *node) { if (node == NULL) { return false; @@ -25,20 +23,21 @@ static CMARK_INLINE bool S_is_inline(cmark_node *node) { } static bool S_can_contain(cmark_node *node, cmark_node *child) { - cmark_node *cur; - - if (node == NULL || child == NULL) { + if (node == NULL || child == NULL || node == child) { return false; } - // Verify that child is not an ancestor of node or equal to node. - cur = node; - do { - if (cur == child) { - return false; + // Verify that child is not an ancestor of node. + if (child->first_child != NULL) { + cmark_node *cur = node->parent; + + while (cur != NULL) { + if (cur == child) { + return false; + } + cur = cur->parent; } - cur = cur->parent; - } while (cur != NULL); + } if (child->type == CMARK_NODE_DOCUMENT) { return false; @@ -74,7 +73,7 @@ static bool S_can_contain(cmark_node *node, cmark_node *child) { cmark_node *cmark_node_new_with_mem(cmark_node_type type, cmark_mem *mem) { cmark_node *node = (cmark_node *)mem->calloc(1, sizeof(*node)); - cmark_strbuf_init(mem, &node->content, 0); + node->mem = mem; node->type = (uint16_t)type; switch (node->type) { @@ -104,29 +103,29 @@ cmark_node *cmark_node_new(cmark_node_type type) { // Free a cmark_node list and any children. static void S_free_nodes(cmark_node *e) { + cmark_mem *mem = e->mem; cmark_node *next; while (e != NULL) { - cmark_strbuf_free(&e->content); switch (e->type) { case CMARK_NODE_CODE_BLOCK: - cmark_chunk_free(NODE_MEM(e), &e->as.code.info); - cmark_chunk_free(NODE_MEM(e), &e->as.code.literal); + mem->free(e->data); + mem->free(e->as.code.info); break; case CMARK_NODE_TEXT: case CMARK_NODE_HTML_INLINE: case CMARK_NODE_CODE: case CMARK_NODE_HTML_BLOCK: - cmark_chunk_free(NODE_MEM(e), &e->as.literal); + mem->free(e->data); break; case CMARK_NODE_LINK: case CMARK_NODE_IMAGE: - cmark_chunk_free(NODE_MEM(e), &e->as.link.url); - cmark_chunk_free(NODE_MEM(e), &e->as.link.title); + mem->free(e->as.link.url); + mem->free(e->as.link.title); break; case CMARK_NODE_CUSTOM_BLOCK: case CMARK_NODE_CUSTOM_INLINE: - cmark_chunk_free(NODE_MEM(e), &e->as.custom.on_enter); - cmark_chunk_free(NODE_MEM(e), &e->as.custom.on_exit); + mem->free(e->as.custom.on_enter); + mem->free(e->as.custom.on_exit); break; default: break; @@ -137,7 +136,7 @@ static void S_free_nodes(cmark_node *e) { e->next = e->first_child; } next = e->next; - NODE_MEM(e)->free(e); + mem->free(e); e = next; } } @@ -249,6 +248,26 @@ cmark_node *cmark_node_last_child(cmark_node *node) { } } +static bufsize_t cmark_set_cstr(cmark_mem *mem, unsigned char **dst, + const char *src) { + unsigned char *old = *dst; + bufsize_t len; + + if (src && src[0]) { + len = (bufsize_t)strlen(src); + *dst = (unsigned char *)mem->realloc(NULL, len + 1); + memcpy(*dst, src, len + 1); + } else { + len = 0; + *dst = NULL; + } + if (old) { + mem->free(old); + } + + return len; +} + void *cmark_node_get_user_data(cmark_node *node) { if (node == NULL) { return NULL; @@ -275,10 +294,8 @@ const char *cmark_node_get_literal(cmark_node *node) { case CMARK_NODE_TEXT: case CMARK_NODE_HTML_INLINE: case CMARK_NODE_CODE: - return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.literal); - case CMARK_NODE_CODE_BLOCK: - return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.code.literal); + return node->data ? (char *)node->data : ""; default: break; @@ -297,11 +314,8 @@ int cmark_node_set_literal(cmark_node *node, const char *content) { case CMARK_NODE_TEXT: case CMARK_NODE_HTML_INLINE: case CMARK_NODE_CODE: - cmark_chunk_set_cstr(NODE_MEM(node), &node->as.literal, content); - return 1; - case CMARK_NODE_CODE_BLOCK: - cmark_chunk_set_cstr(NODE_MEM(node), &node->as.code.literal, content); + node->len = cmark_set_cstr(node->mem, &node->data, content); return 1; default: @@ -350,7 +364,7 @@ cmark_list_type cmark_node_get_list_type(cmark_node *node) { } if (node->type == CMARK_NODE_LIST) { - return node->as.list.list_type; + return (cmark_list_type)node->as.list.list_type; } else { return CMARK_NO_LIST; } @@ -366,7 +380,7 @@ int cmark_node_set_list_type(cmark_node *node, cmark_list_type type) { } if (node->type == CMARK_NODE_LIST) { - node->as.list.list_type = type; + node->as.list.list_type = (unsigned char)type; return 1; } else { return 0; @@ -379,7 +393,7 @@ cmark_delim_type cmark_node_get_list_delim(cmark_node *node) { } if (node->type == CMARK_NODE_LIST) { - return node->as.list.delimiter; + return (cmark_delim_type)node->as.list.delimiter; } else { return CMARK_NO_DELIM; } @@ -395,7 +409,7 @@ int cmark_node_set_list_delim(cmark_node *node, cmark_delim_type delim) { } if (node->type == CMARK_NODE_LIST) { - node->as.list.delimiter = delim; + node->as.list.delimiter = (unsigned char)delim; return 1; } else { return 0; @@ -458,7 +472,7 @@ const char *cmark_node_get_fence_info(cmark_node *node) { } if (node->type == CMARK_NODE_CODE_BLOCK) { - return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.code.info); + return node->as.code.info ? (char *)node->as.code.info : ""; } else { return NULL; } @@ -470,7 +484,7 @@ int cmark_node_set_fence_info(cmark_node *node, const char *info) { } if (node->type == CMARK_NODE_CODE_BLOCK) { - cmark_chunk_set_cstr(NODE_MEM(node), &node->as.code.info, info); + cmark_set_cstr(node->mem, &node->as.code.info, info); return 1; } else { return 0; @@ -485,7 +499,7 @@ const char *cmark_node_get_url(cmark_node *node) { switch (node->type) { case CMARK_NODE_LINK: case CMARK_NODE_IMAGE: - return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.link.url); + return node->as.link.url ? (char *)node->as.link.url : ""; default: break; } @@ -501,7 +515,7 @@ int cmark_node_set_url(cmark_node *node, const char *url) { switch (node->type) { case CMARK_NODE_LINK: case CMARK_NODE_IMAGE: - cmark_chunk_set_cstr(NODE_MEM(node), &node->as.link.url, url); + cmark_set_cstr(node->mem, &node->as.link.url, url); return 1; default: break; @@ -518,7 +532,7 @@ const char *cmark_node_get_title(cmark_node *node) { switch (node->type) { case CMARK_NODE_LINK: case CMARK_NODE_IMAGE: - return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.link.title); + return node->as.link.title ? (char *)node->as.link.title : ""; default: break; } @@ -534,7 +548,7 @@ int cmark_node_set_title(cmark_node *node, const char *title) { switch (node->type) { case CMARK_NODE_LINK: case CMARK_NODE_IMAGE: - cmark_chunk_set_cstr(NODE_MEM(node), &node->as.link.title, title); + cmark_set_cstr(node->mem, &node->as.link.title, title); return 1; default: break; @@ -551,7 +565,7 @@ const char *cmark_node_get_on_enter(cmark_node *node) { switch (node->type) { case CMARK_NODE_CUSTOM_INLINE: case CMARK_NODE_CUSTOM_BLOCK: - return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.custom.on_enter); + return node->as.custom.on_enter ? (char *)node->as.custom.on_enter : ""; default: break; } @@ -567,7 +581,7 @@ int cmark_node_set_on_enter(cmark_node *node, const char *on_enter) { switch (node->type) { case CMARK_NODE_CUSTOM_INLINE: case CMARK_NODE_CUSTOM_BLOCK: - cmark_chunk_set_cstr(NODE_MEM(node), &node->as.custom.on_enter, on_enter); + cmark_set_cstr(node->mem, &node->as.custom.on_enter, on_enter); return 1; default: break; @@ -584,7 +598,7 @@ const char *cmark_node_get_on_exit(cmark_node *node) { switch (node->type) { case CMARK_NODE_CUSTOM_INLINE: case CMARK_NODE_CUSTOM_BLOCK: - return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.custom.on_exit); + return node->as.custom.on_exit ? (char *)node->as.custom.on_exit : ""; default: break; } @@ -600,7 +614,7 @@ int cmark_node_set_on_exit(cmark_node *node, const char *on_exit) { switch (node->type) { case CMARK_NODE_CUSTOM_INLINE: case CMARK_NODE_CUSTOM_BLOCK: - cmark_chunk_set_cstr(NODE_MEM(node), &node->as.custom.on_exit, on_exit); + cmark_set_cstr(node->mem, &node->as.custom.on_exit, on_exit); return 1; default: break; diff --git a/cbits/node.h b/cbits/node.h index 2163230..1cae5d7 100644 --- a/cbits/node.h +++ b/cbits/node.h @@ -8,23 +8,22 @@ extern "C" { #include #include +#include "config.h" #include "cmark.h" #include "buffer.h" -#include "chunk.h" typedef struct { - cmark_list_type list_type; int marker_offset; int padding; int start; - cmark_delim_type delimiter; + unsigned char list_type; + unsigned char delimiter; unsigned char bullet_char; bool tight; } cmark_list; typedef struct { - cmark_chunk info; - cmark_chunk literal; + unsigned char *info; uint8_t fence_length; uint8_t fence_offset; unsigned char fence_char; @@ -32,18 +31,19 @@ typedef struct { } cmark_code; typedef struct { - int level; + int internal_offset; + int8_t level; bool setext; } cmark_heading; typedef struct { - cmark_chunk url; - cmark_chunk title; + unsigned char *url; + unsigned char *title; } cmark_link; typedef struct { - cmark_chunk on_enter; - cmark_chunk on_exit; + unsigned char *on_enter; + unsigned char *on_exit; } cmark_custom; enum cmark_node__internal_flags { @@ -53,7 +53,7 @@ enum cmark_node__internal_flags { }; struct cmark_node { - cmark_strbuf content; + cmark_mem *mem; struct cmark_node *next; struct cmark_node *prev; @@ -63,16 +63,17 @@ struct cmark_node { void *user_data; + unsigned char *data; + bufsize_t len; + int start_line; int start_column; int end_line; int end_column; - int internal_offset; uint16_t type; uint16_t flags; union { - cmark_chunk literal; cmark_list list; cmark_code code; cmark_heading heading; @@ -82,9 +83,6 @@ struct cmark_node { } as; }; -static CMARK_INLINE cmark_mem *cmark_node_mem(cmark_node *node) { - return node->content.mem; -} CMARK_EXPORT int cmark_node_check(cmark_node *node, FILE *out); #ifdef __cplusplus diff --git a/cbits/parser.h b/cbits/parser.h index f41f099..f546ace 100644 --- a/cbits/parser.h +++ b/cbits/parser.h @@ -29,8 +29,10 @@ struct cmark_parser { cmark_strbuf curline; bufsize_t last_line_length; cmark_strbuf linebuf; + cmark_strbuf content; int options; bool last_buffer_ended_with_cr; + unsigned int total_size; }; #ifdef __cplusplus diff --git a/cbits/references.c b/cbits/references.c index 89f2dc8..39b4f2b 100644 --- a/cbits/references.c +++ b/cbits/references.c @@ -5,21 +5,12 @@ #include "inlines.h" #include "chunk.h" -static unsigned int refhash(const unsigned char *link_ref) { - unsigned int hash = 0; - - while (*link_ref) - hash = (*link_ref++) + (hash << 6) + (hash << 16) - hash; - - return hash; -} - static void reference_free(cmark_reference_map *map, cmark_reference *ref) { cmark_mem *mem = map->mem; if (ref != NULL) { mem->free(ref->label); - cmark_chunk_free(mem, &ref->url); - cmark_chunk_free(mem, &ref->title); + mem->free(ref->url); + mem->free(ref->title); mem->free(ref); } } @@ -53,21 +44,6 @@ static unsigned char *normalize_reference(cmark_mem *mem, cmark_chunk *ref) { return result; } -static void add_reference(cmark_reference_map *map, cmark_reference *ref) { - cmark_reference *t = ref->next = map->table[ref->hash % REFMAP_SIZE]; - - while (t) { - if (t->hash == ref->hash && !strcmp((char *)t->label, (char *)ref->label)) { - reference_free(map, ref); - return; - } - - t = t->next; - } - - map->table[ref->hash % REFMAP_SIZE] = ref; -} - void cmark_reference_create(cmark_reference_map *map, cmark_chunk *label, cmark_chunk *url, cmark_chunk *title) { cmark_reference *ref; @@ -77,64 +53,113 @@ void cmark_reference_create(cmark_reference_map *map, cmark_chunk *label, if (reflabel == NULL) return; + assert(map->sorted == NULL); + ref = (cmark_reference *)map->mem->calloc(1, sizeof(*ref)); ref->label = reflabel; - ref->hash = refhash(ref->label); ref->url = cmark_clean_url(map->mem, url); ref->title = cmark_clean_title(map->mem, title); - ref->next = NULL; + ref->age = map->size; + ref->next = map->refs; + + if (ref->url != NULL) + ref->size += strlen((char*)ref->url); + if (ref->title != NULL) + ref->size += strlen((char*)ref->title); + + map->refs = ref; + map->size++; +} + +static int +labelcmp(const unsigned char *a, const unsigned char *b) { + return strcmp((const char *)a, (const char *)b); +} + +static int +refcmp(const void *p1, const void *p2) { + cmark_reference *r1 = *(cmark_reference **)p1; + cmark_reference *r2 = *(cmark_reference **)p2; + int res = labelcmp(r1->label, r2->label); + return res ? res : ((int)r1->age - (int)r2->age); +} - add_reference(map, ref); +static int +refsearch(const void *label, const void *p2) { + cmark_reference *ref = *(cmark_reference **)p2; + return labelcmp((const unsigned char *)label, ref->label); +} + +static void sort_references(cmark_reference_map *map) { + unsigned int i = 0, last = 0, size = map->size; + cmark_reference *r = map->refs, **sorted = NULL; + + sorted = (cmark_reference **)map->mem->calloc(size, sizeof(cmark_reference *)); + while (r) { + sorted[i++] = r; + r = r->next; + } + + qsort(sorted, size, sizeof(cmark_reference *), refcmp); + + for (i = 1; i < size; i++) { + if (labelcmp(sorted[i]->label, sorted[last]->label) != 0) + sorted[++last] = sorted[i]; + } + map->sorted = sorted; + map->size = last + 1; } // Returns reference if refmap contains a reference with matching // label, otherwise NULL. cmark_reference *cmark_reference_lookup(cmark_reference_map *map, cmark_chunk *label) { - cmark_reference *ref = NULL; + cmark_reference **ref = NULL; + cmark_reference *r = NULL; unsigned char *norm; - unsigned int hash; if (label->len < 1 || label->len > MAX_LINK_LABEL_LENGTH) return NULL; - if (map == NULL) + if (map == NULL || !map->size) return NULL; norm = normalize_reference(map->mem, label); if (norm == NULL) return NULL; - hash = refhash(norm); - ref = map->table[hash % REFMAP_SIZE]; + if (!map->sorted) + sort_references(map); - while (ref) { - if (ref->hash == hash && !strcmp((char *)ref->label, (char *)norm)) - break; - ref = ref->next; + ref = (cmark_reference **)bsearch(norm, map->sorted, map->size, sizeof(cmark_reference *), + refsearch); + map->mem->free(norm); + + if (ref != NULL) { + r = ref[0]; + /* Check for expansion limit */ + if (map->max_ref_size && r->size > map->max_ref_size - map->ref_size) + return NULL; + map->ref_size += r->size; } - map->mem->free(norm); - return ref; + return r; } void cmark_reference_map_free(cmark_reference_map *map) { - unsigned int i; + cmark_reference *ref; if (map == NULL) return; - for (i = 0; i < REFMAP_SIZE; ++i) { - cmark_reference *ref = map->table[i]; - cmark_reference *next; - - while (ref) { - next = ref->next; - reference_free(map, ref); - ref = next; - } + ref = map->refs; + while (ref) { + cmark_reference *next = ref->next; + reference_free(map, ref); + ref = next; } + map->mem->free(map->sorted); map->mem->free(map); } diff --git a/cbits/references.h b/cbits/references.h index 8d3631f..b069d92 100644 --- a/cbits/references.h +++ b/cbits/references.h @@ -7,21 +7,24 @@ extern "C" { #endif -#define REFMAP_SIZE 16 - struct cmark_reference { struct cmark_reference *next; unsigned char *label; - cmark_chunk url; - cmark_chunk title; - unsigned int hash; + unsigned char *url; + unsigned char *title; + unsigned int age; + unsigned int size; }; typedef struct cmark_reference cmark_reference; struct cmark_reference_map { cmark_mem *mem; - cmark_reference *table[REFMAP_SIZE]; + cmark_reference *refs; + cmark_reference **sorted; + unsigned int size; + unsigned int ref_size; + unsigned int max_ref_size; }; typedef struct cmark_reference_map cmark_reference_map; diff --git a/cbits/render.c b/cbits/render.c index fdd73df..f71b048 100644 --- a/cbits/render.c +++ b/cbits/render.c @@ -1,10 +1,10 @@ #include #include "buffer.h" -#include "chunk.h" #include "cmark.h" #include "utf8.h" #include "render.h" #include "node.h" +#include "cmark_ctype.h" static CMARK_INLINE void S_cr(cmark_renderer *renderer) { if (renderer->need_cr < 1) { @@ -26,7 +26,6 @@ static void S_out(cmark_renderer *renderer, const char *source, bool wrap, int i = 0; int last_nonspace; int len; - cmark_chunk remainder = cmark_chunk_literal(""); int k = renderer->buffer->size - 1; wrap = wrap && !renderer->no_linebreaks; @@ -112,18 +111,22 @@ static void S_out(cmark_renderer *renderer, const char *source, bool wrap, !renderer->begin_line && renderer->last_breakable > 0) { // copy from last_breakable to remainder - cmark_chunk_set_cstr(renderer->mem, &remainder, - (char *)renderer->buffer->ptr + - renderer->last_breakable + 1); + unsigned char *src = renderer->buffer->ptr + + renderer->last_breakable + 1; + bufsize_t remainder_len = renderer->buffer->size - + renderer->last_breakable - 1; + unsigned char *remainder = + (unsigned char *)renderer->mem->realloc(NULL, remainder_len); + memcpy(remainder, src, remainder_len); // truncate at last_breakable cmark_strbuf_truncate(renderer->buffer, renderer->last_breakable); // add newline, prefix, and remainder cmark_strbuf_putc(renderer->buffer, '\n'); cmark_strbuf_put(renderer->buffer, renderer->prefix->ptr, renderer->prefix->size); - cmark_strbuf_put(renderer->buffer, remainder.data, remainder.len); - renderer->column = renderer->prefix->size + remainder.len; - cmark_chunk_free(renderer->mem, &remainder); + cmark_strbuf_put(renderer->buffer, remainder, remainder_len); + renderer->column = renderer->prefix->size + remainder_len; + renderer->mem->free(remainder); renderer->last_breakable = 0; renderer->begin_line = false; renderer->begin_content = false; @@ -151,7 +154,7 @@ char *cmark_render(cmark_node *root, int options, int width, int (*render_node)(cmark_renderer *renderer, cmark_node *node, cmark_event_type ev_type, int options)) { - cmark_mem *mem = cmark_node_mem(root); + cmark_mem *mem = root->mem; cmark_strbuf pref = CMARK_BUF_INIT(mem); cmark_strbuf buf = CMARK_BUF_INIT(mem); cmark_node *cur; @@ -159,9 +162,11 @@ char *cmark_render(cmark_node *root, int options, int width, char *result; cmark_iter *iter = cmark_iter_new(root); - cmark_renderer renderer = {mem, &buf, &pref, 0, width, - 0, 0, true, true, false, - false, outc, S_cr, S_blankline, S_out}; + cmark_renderer renderer = {options, + mem, &buf, &pref, 0, width, + 0, 0, true, true, false, + false, NULL, + outc, S_cr, S_blankline, S_out}; while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) { cur = cmark_iter_get_node(iter); diff --git a/cbits/render.h b/cbits/render.h index ab11039..db60a5d 100644 --- a/cbits/render.h +++ b/cbits/render.h @@ -7,11 +7,16 @@ extern "C" { #include #include "buffer.h" -#include "chunk.h" typedef enum { LITERAL, NORMAL, TITLE, URL } cmark_escaping; +struct block_number { + int number; + struct block_number *parent; +}; + struct cmark_renderer { + int options; cmark_mem *mem; cmark_strbuf *buffer; cmark_strbuf *prefix; @@ -23,6 +28,7 @@ struct cmark_renderer { bool begin_content; bool no_linebreaks; bool in_tight_list_item; + struct block_number *block_number_in_list_item; void (*outc)(struct cmark_renderer *, cmark_escaping, int32_t, unsigned char); void (*cr)(struct cmark_renderer *); void (*blankline)(struct cmark_renderer *); diff --git a/cbits/scanners.c b/cbits/scanners.c index f8e6c15..5d8950f 100644 --- a/cbits/scanners.c +++ b/cbits/scanners.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.16 */ +/* Generated by re2c 3.0 */ #include #include "chunk.h" #include "scanners.h" @@ -30,718 +30,718 @@ bufsize_t _scan_scheme(const unsigned char *p) { unsigned char yych; yych = *p; if (yych <= '@') - goto yy2; + goto yy1; if (yych <= 'Z') - goto yy4; + goto yy3; if (yych <= '`') - goto yy2; + goto yy1; if (yych <= 'z') - goto yy4; - yy2: + goto yy3; + yy1: ++p; - yy3 : { return 0; } - yy4: + yy2 : { return 0; } + yy3: yych = *(marker = ++p); if (yych <= '/') { if (yych <= '+') { if (yych <= '*') - goto yy3; + goto yy2; } else { if (yych <= ',') - goto yy3; + goto yy2; if (yych >= '/') - goto yy3; + goto yy2; } } else { if (yych <= 'Z') { if (yych <= '9') - goto yy5; + goto yy4; if (yych <= '@') - goto yy3; + goto yy2; } else { if (yych <= '`') - goto yy3; + goto yy2; if (yych >= '{') - goto yy3; + goto yy2; } } - yy5: + yy4: yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych == '+') - goto yy7; + goto yy6; } else { if (yych != '/') - goto yy7; + goto yy6; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; - if (yych >= 'A') goto yy7; + if (yych >= 'A') + goto yy6; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych <= 'z') - goto yy7; + goto yy6; } } - yy6: + yy5: p = marker; - goto yy3; - yy7: + goto yy2; + yy6: yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych == '+') - goto yy10; - goto yy6; + goto yy8; + goto yy5; } else { if (yych == '/') - goto yy6; - goto yy10; + goto yy5; + goto yy8; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; - goto yy10; + goto yy5; + goto yy8; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych <= 'z') - goto yy10; - goto yy6; + goto yy8; + goto yy5; } } - yy8: + yy7: ++p; { return (bufsize_t)(p - start); } - yy10: + yy8: yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy6; + goto yy5; } else { if (yych == '/') - goto yy6; + goto yy5; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy8; + goto yy7; if (yych <= '@') - goto yy6; + goto yy5; } else { if (yych <= '`') - goto yy6; + goto yy5; if (yych >= '{') - goto yy6; + goto yy5; } } - ++p; - if ((yych = *p) == ':') - goto yy8; - goto yy6; + yych = *++p; + if (yych == ':') + goto yy7; + goto yy5; } } @@ -775,814 +775,806 @@ bufsize_t _scan_autolink_uri(const unsigned char *p) { }; yych = *p; if (yych <= '@') - goto yy41; + goto yy10; if (yych <= 'Z') - goto yy43; + goto yy12; if (yych <= '`') - goto yy41; + goto yy10; if (yych <= 'z') - goto yy43; - yy41: + goto yy12; + yy10: ++p; - yy42 : { return 0; } - yy43: + yy11 : { return 0; } + yy12: yych = *(marker = ++p); if (yych <= '/') { if (yych <= '+') { if (yych <= '*') - goto yy42; + goto yy11; } else { if (yych <= ',') - goto yy42; + goto yy11; if (yych >= '/') - goto yy42; + goto yy11; } } else { if (yych <= 'Z') { if (yych <= '9') - goto yy44; + goto yy13; if (yych <= '@') - goto yy42; + goto yy11; } else { if (yych <= '`') - goto yy42; + goto yy11; if (yych >= '{') - goto yy42; + goto yy11; } } - yy44: + yy13: yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych == '+') - goto yy46; + goto yy15; } else { if (yych != '/') - goto yy46; + goto yy15; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych >= 'A') - goto yy46; + goto yy15; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych <= 'z') - goto yy46; + goto yy15; } } - yy45: + yy14: p = marker; - goto yy42; - yy46: + goto yy11; + yy15: yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych == '+') - goto yy49; - goto yy45; + goto yy17; + goto yy14; } else { if (yych == '/') - goto yy45; - goto yy49; + goto yy14; + goto yy17; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; - goto yy49; + goto yy14; + goto yy17; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych <= 'z') - goto yy49; - goto yy45; + goto yy17; + goto yy14; } } - yy47: - ++p; - yych = *p; + yy16: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy47; + goto yy16; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= '<') - goto yy45; + goto yy14; if (yych <= '>') - goto yy50; - goto yy45; + goto yy18; + goto yy14; } else { if (yych <= 0xDF) - goto yy52; + goto yy19; if (yych <= 0xE0) - goto yy53; - goto yy54; + goto yy20; + goto yy21; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy55; + goto yy22; if (yych <= 0xEF) - goto yy54; - goto yy56; + goto yy21; + goto yy23; } else { if (yych <= 0xF3) - goto yy57; + goto yy24; if (yych <= 0xF4) - goto yy58; - goto yy45; + goto yy25; + goto yy14; } } - yy49: + yy17: yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych == '+') - goto yy59; - goto yy45; + goto yy26; + goto yy14; } else { if (yych == '/') - goto yy45; - goto yy59; + goto yy14; + goto yy26; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; - goto yy59; + goto yy14; + goto yy26; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych <= 'z') - goto yy59; - goto yy45; + goto yy26; + goto yy14; } } - yy50: + yy18: ++p; { return (bufsize_t)(p - start); } - yy52: - ++p; - yych = *p; + yy19: + yych = *++p; if (yych <= 0x7F) - goto yy45; + goto yy14; if (yych <= 0xBF) - goto yy47; - goto yy45; - yy53: - ++p; - yych = *p; + goto yy16; + goto yy14; + yy20: + yych = *++p; if (yych <= 0x9F) - goto yy45; + goto yy14; if (yych <= 0xBF) - goto yy52; - goto yy45; - yy54: - ++p; - yych = *p; + goto yy19; + goto yy14; + yy21: + yych = *++p; if (yych <= 0x7F) - goto yy45; + goto yy14; if (yych <= 0xBF) - goto yy52; - goto yy45; - yy55: - ++p; - yych = *p; + goto yy19; + goto yy14; + yy22: + yych = *++p; if (yych <= 0x7F) - goto yy45; + goto yy14; if (yych <= 0x9F) - goto yy52; - goto yy45; - yy56: - ++p; - yych = *p; + goto yy19; + goto yy14; + yy23: + yych = *++p; if (yych <= 0x8F) - goto yy45; + goto yy14; if (yych <= 0xBF) - goto yy54; - goto yy45; - yy57: - ++p; - yych = *p; + goto yy21; + goto yy14; + yy24: + yych = *++p; if (yych <= 0x7F) - goto yy45; + goto yy14; if (yych <= 0xBF) - goto yy54; - goto yy45; - yy58: - ++p; - yych = *p; + goto yy21; + goto yy14; + yy25: + yych = *++p; if (yych <= 0x7F) - goto yy45; + goto yy14; if (yych <= 0x8F) - goto yy54; - goto yy45; - yy59: + goto yy21; + goto yy14; + yy26: yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } yych = *++p; if (yych <= '9') { if (yych <= ',') { if (yych != '+') - goto yy45; + goto yy14; } else { if (yych == '/') - goto yy45; + goto yy14; } } else { if (yych <= 'Z') { if (yych <= ':') - goto yy47; + goto yy16; if (yych <= '@') - goto yy45; + goto yy14; } else { if (yych <= '`') - goto yy45; + goto yy14; if (yych >= '{') - goto yy45; + goto yy14; } } - ++p; - if ((yych = *p) == ':') - goto yy47; - goto yy45; + yych = *++p; + if (yych == ':') + goto yy16; + goto yy14; } } @@ -1618,3366 +1610,3240 @@ bufsize_t _scan_autolink_email(const unsigned char *p) { if (yych <= '9') { if (yych <= '\'') { if (yych == '!') - goto yy91; + goto yy30; if (yych >= '#') - goto yy91; + goto yy30; } else { if (yych <= ')') - goto yy89; + goto yy28; if (yych != ',') - goto yy91; + goto yy30; } } else { if (yych <= '?') { if (yych == '=') - goto yy91; + goto yy30; if (yych >= '?') - goto yy91; + goto yy30; } else { if (yych <= 'Z') { if (yych >= 'A') - goto yy91; + goto yy30; } else { if (yych <= ']') - goto yy89; + goto yy28; if (yych <= '~') - goto yy91; + goto yy30; } } } - yy89: + yy28: ++p; - yy90 : { return 0; } - yy91: + yy29 : { return 0; } + yy30: yych = *(marker = ++p); if (yych <= ',') { if (yych <= '"') { if (yych == '!') - goto yy93; - goto yy90; + goto yy32; + goto yy29; } else { if (yych <= '\'') - goto yy93; + goto yy32; if (yych <= ')') - goto yy90; + goto yy29; if (yych <= '+') - goto yy93; - goto yy90; + goto yy32; + goto yy29; } } else { if (yych <= '>') { if (yych <= '9') - goto yy93; + goto yy32; if (yych == '=') - goto yy93; - goto yy90; + goto yy32; + goto yy29; } else { if (yych <= 'Z') - goto yy93; + goto yy32; if (yych <= ']') - goto yy90; + goto yy29; if (yych <= '~') - goto yy93; - goto yy90; + goto yy32; + goto yy29; } } - yy92: - ++p; - yych = *p; - yy93: + yy31: + yych = *++p; + yy32: if (yybm[0 + yych] & 128) { - goto yy92; + goto yy31; } if (yych <= '>') - goto yy94; + goto yy33; if (yych <= '@') - goto yy95; - yy94: + goto yy34; + yy33: p = marker; - goto yy90; - yy95: - ++p; - yych = *p; + goto yy29; + yy34: + yych = *++p; if (yych <= '@') { if (yych <= '/') - goto yy94; + goto yy33; if (yych >= ':') - goto yy94; + goto yy33; } else { if (yych <= 'Z') - goto yy96; + goto yy35; if (yych <= '`') - goto yy94; + goto yy33; if (yych >= '{') - goto yy94; + goto yy33; } - yy96: - ++p; - yych = *p; + yy35: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy98; - goto yy94; + goto yy36; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy98; + goto yy33; + goto yy36; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy98; - goto yy94; + goto yy36; + goto yy33; } } - ++p; - yych = *p; + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy101; + goto yy38; if (yych <= '/') - goto yy94; - goto yy102; + goto yy33; + goto yy39; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy102; + goto yy33; + goto yy39; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy102; - goto yy94; + goto yy39; + goto yy33; } } - yy98: - ++p; - yych = *p; + yy36: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych <= '-') - goto yy101; - goto yy95; + goto yy38; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy102; - goto yy94; + goto yy39; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy102; + goto yy33; + goto yy39; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy102; - goto yy94; + goto yy39; + goto yy33; } } - yy99: + yy37: ++p; { return (bufsize_t)(p - start); } - yy101: - ++p; - yych = *p; + yy38: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy103; + goto yy40; if (yych <= '/') - goto yy94; - goto yy104; + goto yy33; + goto yy41; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy104; + goto yy33; + goto yy41; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy104; - goto yy94; + goto yy41; + goto yy33; } } - yy102: - ++p; - yych = *p; + yy39: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy104; - goto yy94; + goto yy41; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy104; + goto yy33; + goto yy41; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy104; - goto yy94; + goto yy41; + goto yy33; } } - yy103: - ++p; - yych = *p; + yy40: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy105; + goto yy42; if (yych <= '/') - goto yy94; - goto yy106; + goto yy33; + goto yy43; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy106; + goto yy33; + goto yy43; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy106; - goto yy94; + goto yy43; + goto yy33; } } - yy104: - ++p; - yych = *p; + yy41: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy106; - goto yy94; + goto yy43; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy106; + goto yy33; + goto yy43; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy106; - goto yy94; + goto yy43; + goto yy33; } } - yy105: - ++p; - yych = *p; + yy42: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy107; + goto yy44; if (yych <= '/') - goto yy94; - goto yy108; + goto yy33; + goto yy45; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy108; + goto yy33; + goto yy45; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy108; - goto yy94; + goto yy45; + goto yy33; } } - yy106: - ++p; - yych = *p; + yy43: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy108; - goto yy94; + goto yy45; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy108; + goto yy33; + goto yy45; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy108; - goto yy94; + goto yy45; + goto yy33; } } - yy107: - ++p; - yych = *p; + yy44: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy109; + goto yy46; if (yych <= '/') - goto yy94; - goto yy110; + goto yy33; + goto yy47; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy110; + goto yy33; + goto yy47; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy110; - goto yy94; + goto yy47; + goto yy33; } } - yy108: - ++p; - yych = *p; + yy45: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy110; - goto yy94; + goto yy47; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy110; + goto yy33; + goto yy47; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy110; - goto yy94; + goto yy47; + goto yy33; } } - yy109: - ++p; - yych = *p; + yy46: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy111; + goto yy48; if (yych <= '/') - goto yy94; - goto yy112; + goto yy33; + goto yy49; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy112; + goto yy33; + goto yy49; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy112; - goto yy94; + goto yy49; + goto yy33; } } - yy110: - ++p; - yych = *p; + yy47: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy112; - goto yy94; + goto yy49; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy112; + goto yy33; + goto yy49; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy112; - goto yy94; + goto yy49; + goto yy33; } } - yy111: - ++p; - yych = *p; + yy48: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy113; + goto yy50; if (yych <= '/') - goto yy94; - goto yy114; + goto yy33; + goto yy51; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy114; + goto yy33; + goto yy51; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy114; - goto yy94; + goto yy51; + goto yy33; } } - yy112: - ++p; - yych = *p; + yy49: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy114; - goto yy94; + goto yy51; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy114; + goto yy33; + goto yy51; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy114; - goto yy94; + goto yy51; + goto yy33; } } - yy113: - ++p; - yych = *p; + yy50: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy115; + goto yy52; if (yych <= '/') - goto yy94; - goto yy116; + goto yy33; + goto yy53; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy116; + goto yy33; + goto yy53; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy116; - goto yy94; + goto yy53; + goto yy33; } } - yy114: - ++p; - yych = *p; + yy51: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy116; - goto yy94; + goto yy53; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy116; + goto yy33; + goto yy53; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy116; - goto yy94; + goto yy53; + goto yy33; } } - yy115: - ++p; - yych = *p; + yy52: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy117; + goto yy54; if (yych <= '/') - goto yy94; - goto yy118; + goto yy33; + goto yy55; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy118; + goto yy33; + goto yy55; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy118; - goto yy94; + goto yy55; + goto yy33; } } - yy116: - ++p; - yych = *p; + yy53: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy118; - goto yy94; + goto yy55; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy118; + goto yy33; + goto yy55; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy118; - goto yy94; + goto yy55; + goto yy33; } } - yy117: - ++p; - yych = *p; + yy54: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy119; + goto yy56; if (yych <= '/') - goto yy94; - goto yy120; + goto yy33; + goto yy57; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy120; + goto yy33; + goto yy57; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy120; - goto yy94; + goto yy57; + goto yy33; } } - yy118: - ++p; - yych = *p; + yy55: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy120; - goto yy94; + goto yy57; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy120; + goto yy33; + goto yy57; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy120; - goto yy94; + goto yy57; + goto yy33; } } - yy119: - ++p; - yych = *p; + yy56: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy121; + goto yy58; if (yych <= '/') - goto yy94; - goto yy122; + goto yy33; + goto yy59; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy122; + goto yy33; + goto yy59; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy122; - goto yy94; + goto yy59; + goto yy33; } } - yy120: - ++p; - yych = *p; + yy57: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy122; - goto yy94; + goto yy59; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy122; + goto yy33; + goto yy59; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy122; - goto yy94; + goto yy59; + goto yy33; } } - yy121: - ++p; - yych = *p; + yy58: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy123; + goto yy60; if (yych <= '/') - goto yy94; - goto yy124; + goto yy33; + goto yy61; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy124; + goto yy33; + goto yy61; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy124; - goto yy94; + goto yy61; + goto yy33; } } - yy122: - ++p; - yych = *p; + yy59: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy124; - goto yy94; + goto yy61; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy124; + goto yy33; + goto yy61; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy124; - goto yy94; + goto yy61; + goto yy33; } } - yy123: - ++p; - yych = *p; + yy60: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy125; + goto yy62; if (yych <= '/') - goto yy94; - goto yy126; + goto yy33; + goto yy63; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy126; + goto yy33; + goto yy63; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy126; - goto yy94; + goto yy63; + goto yy33; } } - yy124: - ++p; - yych = *p; + yy61: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy126; - goto yy94; + goto yy63; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy126; + goto yy33; + goto yy63; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy126; - goto yy94; + goto yy63; + goto yy33; } } - yy125: - ++p; - yych = *p; + yy62: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy127; + goto yy64; if (yych <= '/') - goto yy94; - goto yy128; + goto yy33; + goto yy65; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy128; + goto yy33; + goto yy65; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy128; - goto yy94; + goto yy65; + goto yy33; } } - yy126: - ++p; - yych = *p; + yy63: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy128; - goto yy94; + goto yy65; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy128; + goto yy33; + goto yy65; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy128; - goto yy94; + goto yy65; + goto yy33; } } - yy127: - ++p; - yych = *p; + yy64: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy129; + goto yy66; if (yych <= '/') - goto yy94; - goto yy130; + goto yy33; + goto yy67; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy130; + goto yy33; + goto yy67; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy130; - goto yy94; + goto yy67; + goto yy33; } } - yy128: - ++p; - yych = *p; + yy65: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy130; - goto yy94; + goto yy67; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy130; + goto yy33; + goto yy67; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy130; - goto yy94; + goto yy67; + goto yy33; } } - yy129: - ++p; - yych = *p; + yy66: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy131; + goto yy68; if (yych <= '/') - goto yy94; - goto yy132; + goto yy33; + goto yy69; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy132; + goto yy33; + goto yy69; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy132; - goto yy94; + goto yy69; + goto yy33; } } - yy130: - ++p; - yych = *p; + yy67: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy132; - goto yy94; + goto yy69; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy132; + goto yy33; + goto yy69; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy132; - goto yy94; + goto yy69; + goto yy33; } } - yy131: - ++p; - yych = *p; + yy68: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy133; + goto yy70; if (yych <= '/') - goto yy94; - goto yy134; + goto yy33; + goto yy71; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy134; + goto yy33; + goto yy71; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy134; - goto yy94; + goto yy71; + goto yy33; } } - yy132: - ++p; - yych = *p; + yy69: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy134; - goto yy94; + goto yy71; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy134; + goto yy33; + goto yy71; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy134; - goto yy94; + goto yy71; + goto yy33; } } - yy133: - ++p; - yych = *p; + yy70: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy135; + goto yy72; if (yych <= '/') - goto yy94; - goto yy136; + goto yy33; + goto yy73; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy136; + goto yy33; + goto yy73; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy136; - goto yy94; + goto yy73; + goto yy33; } } - yy134: - ++p; - yych = *p; + yy71: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy136; - goto yy94; + goto yy73; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy136; + goto yy33; + goto yy73; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy136; - goto yy94; + goto yy73; + goto yy33; } } - yy135: - ++p; - yych = *p; + yy72: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy137; + goto yy74; if (yych <= '/') - goto yy94; - goto yy138; + goto yy33; + goto yy75; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy138; + goto yy33; + goto yy75; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy138; - goto yy94; + goto yy75; + goto yy33; } } - yy136: - ++p; - yych = *p; + yy73: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy138; - goto yy94; + goto yy75; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy138; + goto yy33; + goto yy75; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy138; - goto yy94; + goto yy75; + goto yy33; } } - yy137: - ++p; - yych = *p; + yy74: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy139; + goto yy76; if (yych <= '/') - goto yy94; - goto yy140; + goto yy33; + goto yy77; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy140; + goto yy33; + goto yy77; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy140; - goto yy94; + goto yy77; + goto yy33; } } - yy138: - ++p; - yych = *p; + yy75: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy140; - goto yy94; + goto yy77; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy140; + goto yy33; + goto yy77; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy140; - goto yy94; + goto yy77; + goto yy33; } } - yy139: - ++p; - yych = *p; + yy76: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy141; + goto yy78; if (yych <= '/') - goto yy94; - goto yy142; + goto yy33; + goto yy79; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy142; + goto yy33; + goto yy79; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy142; - goto yy94; + goto yy79; + goto yy33; } } - yy140: - ++p; - yych = *p; + yy77: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy142; - goto yy94; + goto yy79; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy142; + goto yy33; + goto yy79; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy142; - goto yy94; + goto yy79; + goto yy33; } } - yy141: - ++p; - yych = *p; + yy78: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy143; + goto yy80; if (yych <= '/') - goto yy94; - goto yy144; + goto yy33; + goto yy81; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy144; + goto yy33; + goto yy81; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy144; - goto yy94; + goto yy81; + goto yy33; } } - yy142: - ++p; - yych = *p; + yy79: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy144; - goto yy94; + goto yy81; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy144; + goto yy33; + goto yy81; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy144; - goto yy94; + goto yy81; + goto yy33; } } - yy143: - ++p; - yych = *p; + yy80: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy145; + goto yy82; if (yych <= '/') - goto yy94; - goto yy146; + goto yy33; + goto yy83; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy146; + goto yy33; + goto yy83; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy146; - goto yy94; + goto yy83; + goto yy33; } } - yy144: - ++p; - yych = *p; + yy81: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy146; - goto yy94; + goto yy83; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy146; + goto yy33; + goto yy83; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy146; - goto yy94; + goto yy83; + goto yy33; } } - yy145: - ++p; - yych = *p; + yy82: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy147; + goto yy84; if (yych <= '/') - goto yy94; - goto yy148; + goto yy33; + goto yy85; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy148; + goto yy33; + goto yy85; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy148; - goto yy94; + goto yy85; + goto yy33; } } - yy146: - ++p; - yych = *p; + yy83: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy148; - goto yy94; + goto yy85; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy148; + goto yy33; + goto yy85; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy148; - goto yy94; + goto yy85; + goto yy33; } } - yy147: - ++p; - yych = *p; + yy84: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy149; + goto yy86; if (yych <= '/') - goto yy94; - goto yy150; + goto yy33; + goto yy87; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy150; + goto yy33; + goto yy87; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy150; - goto yy94; + goto yy87; + goto yy33; } } - yy148: - ++p; - yych = *p; + yy85: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy150; - goto yy94; + goto yy87; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy150; + goto yy33; + goto yy87; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy150; - goto yy94; + goto yy87; + goto yy33; } } - yy149: - ++p; - yych = *p; + yy86: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy151; + goto yy88; if (yych <= '/') - goto yy94; - goto yy152; + goto yy33; + goto yy89; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy152; + goto yy33; + goto yy89; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy152; - goto yy94; + goto yy89; + goto yy33; } } - yy150: - ++p; - yych = *p; + yy87: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy152; - goto yy94; + goto yy89; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy152; + goto yy33; + goto yy89; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy152; - goto yy94; + goto yy89; + goto yy33; } } - yy151: - ++p; - yych = *p; + yy88: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy153; + goto yy90; if (yych <= '/') - goto yy94; - goto yy154; + goto yy33; + goto yy91; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy154; + goto yy33; + goto yy91; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy154; - goto yy94; + goto yy91; + goto yy33; } } - yy152: - ++p; - yych = *p; + yy89: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy154; - goto yy94; + goto yy91; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy154; + goto yy33; + goto yy91; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy154; - goto yy94; + goto yy91; + goto yy33; } } - yy153: - ++p; - yych = *p; + yy90: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy155; + goto yy92; if (yych <= '/') - goto yy94; - goto yy156; + goto yy33; + goto yy93; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy156; + goto yy33; + goto yy93; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy156; - goto yy94; + goto yy93; + goto yy33; } } - yy154: - ++p; - yych = *p; + yy91: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy156; - goto yy94; + goto yy93; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy156; + goto yy33; + goto yy93; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy156; - goto yy94; + goto yy93; + goto yy33; } } - yy155: - ++p; - yych = *p; + yy92: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy157; - if (yych <= '/') goto yy94; - goto yy158; + if (yych <= '/') + goto yy33; + goto yy95; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy158; + goto yy33; + goto yy95; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy158; - goto yy94; + goto yy95; + goto yy33; } } - yy156: - ++p; - yych = *p; + yy93: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy158; - goto yy94; + goto yy95; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy158; + goto yy33; + goto yy95; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy158; - goto yy94; + goto yy95; + goto yy33; } } - yy157: - ++p; - yych = *p; + yy94: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy159; + goto yy96; if (yych <= '/') - goto yy94; - goto yy160; + goto yy33; + goto yy97; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy160; + goto yy33; + goto yy97; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy160; - goto yy94; + goto yy97; + goto yy33; } } - yy158: - ++p; - yych = *p; + yy95: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy160; - goto yy94; + goto yy97; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy160; + goto yy33; + goto yy97; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy160; - goto yy94; + goto yy97; + goto yy33; } } - yy159: - ++p; - yych = *p; + yy96: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy161; + goto yy98; if (yych <= '/') - goto yy94; - goto yy162; + goto yy33; + goto yy99; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy162; + goto yy33; + goto yy99; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy162; - goto yy94; + goto yy99; + goto yy33; } } - yy160: - ++p; - yych = *p; + yy97: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy162; - goto yy94; + goto yy99; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy162; + goto yy33; + goto yy99; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy162; - goto yy94; + goto yy99; + goto yy33; } } - yy161: - ++p; - yych = *p; + yy98: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy163; + goto yy100; if (yych <= '/') - goto yy94; - goto yy164; + goto yy33; + goto yy101; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy164; + goto yy33; + goto yy101; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy164; - goto yy94; + goto yy101; + goto yy33; } } - yy162: - ++p; - yych = *p; + yy99: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy164; - goto yy94; + goto yy101; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy164; + goto yy33; + goto yy101; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy164; - goto yy94; + goto yy101; + goto yy33; } } - yy163: - ++p; - yych = *p; + yy100: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy165; + goto yy102; if (yych <= '/') - goto yy94; - goto yy166; + goto yy33; + goto yy103; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy166; + goto yy33; + goto yy103; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy166; - goto yy94; + goto yy103; + goto yy33; } } - yy164: - ++p; - yych = *p; + yy101: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy166; - goto yy94; + goto yy103; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy166; + goto yy33; + goto yy103; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy166; - goto yy94; + goto yy103; + goto yy33; } } - yy165: - ++p; - yych = *p; + yy102: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy167; + goto yy104; if (yych <= '/') - goto yy94; - goto yy168; + goto yy33; + goto yy105; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy168; + goto yy33; + goto yy105; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy168; - goto yy94; + goto yy105; + goto yy33; } } - yy166: - ++p; - yych = *p; + yy103: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy168; - goto yy94; + goto yy105; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy168; + goto yy33; + goto yy105; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy168; - goto yy94; + goto yy105; + goto yy33; } } - yy167: - ++p; - yych = *p; + yy104: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy169; + goto yy106; if (yych <= '/') - goto yy94; - goto yy170; + goto yy33; + goto yy107; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy170; + goto yy33; + goto yy107; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy170; - goto yy94; + goto yy107; + goto yy33; } } - yy168: - ++p; - yych = *p; + yy105: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy170; - goto yy94; + goto yy107; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy170; + goto yy33; + goto yy107; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy170; - goto yy94; + goto yy107; + goto yy33; } } - yy169: - ++p; - yych = *p; + yy106: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy171; + goto yy108; if (yych <= '/') - goto yy94; - goto yy172; + goto yy33; + goto yy109; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy172; + goto yy33; + goto yy109; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy172; - goto yy94; + goto yy109; + goto yy33; } } - yy170: - ++p; - yych = *p; + yy107: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy172; - goto yy94; + goto yy109; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy172; + goto yy33; + goto yy109; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy172; - goto yy94; + goto yy109; + goto yy33; } } - yy171: - ++p; - yych = *p; + yy108: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy173; + goto yy110; if (yych <= '/') - goto yy94; - goto yy174; + goto yy33; + goto yy111; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy174; + goto yy33; + goto yy111; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy174; - goto yy94; + goto yy111; + goto yy33; } } - yy172: - ++p; - yych = *p; + yy109: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy174; - goto yy94; + goto yy111; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy174; + goto yy33; + goto yy111; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy174; - goto yy94; + goto yy111; + goto yy33; } } - yy173: - ++p; - yych = *p; + yy110: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy175; + goto yy112; if (yych <= '/') - goto yy94; - goto yy176; + goto yy33; + goto yy113; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy176; + goto yy33; + goto yy113; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy176; - goto yy94; + goto yy113; + goto yy33; } } - yy174: - ++p; - yych = *p; + yy111: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy176; - goto yy94; + goto yy113; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy176; + goto yy33; + goto yy113; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy176; - goto yy94; + goto yy113; + goto yy33; } } - yy175: - ++p; - yych = *p; + yy112: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy177; + goto yy114; if (yych <= '/') - goto yy94; - goto yy178; + goto yy33; + goto yy115; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy178; + goto yy33; + goto yy115; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy178; - goto yy94; + goto yy115; + goto yy33; } } - yy176: - ++p; - yych = *p; + yy113: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy178; - goto yy94; + goto yy115; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy178; + goto yy33; + goto yy115; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy178; - goto yy94; + goto yy115; + goto yy33; } } - yy177: - ++p; - yych = *p; + yy114: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy179; + goto yy116; if (yych <= '/') - goto yy94; - goto yy180; + goto yy33; + goto yy117; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy180; + goto yy33; + goto yy117; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy180; - goto yy94; + goto yy117; + goto yy33; } } - yy178: - ++p; - yych = *p; + yy115: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy180; - goto yy94; + goto yy117; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy180; + goto yy33; + goto yy117; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy180; - goto yy94; + goto yy117; + goto yy33; } } - yy179: - ++p; - yych = *p; + yy116: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy181; + goto yy118; if (yych <= '/') - goto yy94; - goto yy182; + goto yy33; + goto yy119; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy182; + goto yy33; + goto yy119; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy182; - goto yy94; + goto yy119; + goto yy33; } } - yy180: - ++p; - yych = *p; + yy117: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy182; - goto yy94; + goto yy119; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy182; + goto yy33; + goto yy119; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy182; - goto yy94; + goto yy119; + goto yy33; } } - yy181: - ++p; - yych = *p; + yy118: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy183; + goto yy120; if (yych <= '/') - goto yy94; - goto yy184; + goto yy33; + goto yy121; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy184; + goto yy33; + goto yy121; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy184; - goto yy94; + goto yy121; + goto yy33; } } - yy182: - ++p; - yych = *p; + yy119: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy184; - goto yy94; + goto yy121; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy184; + goto yy33; + goto yy121; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy184; - goto yy94; + goto yy121; + goto yy33; } } - yy183: - ++p; - yych = *p; + yy120: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy185; + goto yy122; if (yych <= '/') - goto yy94; - goto yy186; + goto yy33; + goto yy123; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy186; + goto yy33; + goto yy123; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy186; - goto yy94; + goto yy123; + goto yy33; } } - yy184: - ++p; - yych = *p; + yy121: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy186; - goto yy94; + goto yy123; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy186; + goto yy33; + goto yy123; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy186; - goto yy94; + goto yy123; + goto yy33; } } - yy185: - ++p; - yych = *p; + yy122: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy187; + goto yy124; if (yych <= '/') - goto yy94; - goto yy188; + goto yy33; + goto yy125; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy188; + goto yy33; + goto yy125; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy188; - goto yy94; + goto yy125; + goto yy33; } } - yy186: - ++p; - yych = *p; + yy123: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy188; - goto yy94; + goto yy125; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy188; + goto yy33; + goto yy125; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy188; - goto yy94; + goto yy125; + goto yy33; } } - yy187: - ++p; - yych = *p; + yy124: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy189; + goto yy126; if (yych <= '/') - goto yy94; - goto yy190; + goto yy33; + goto yy127; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy190; + goto yy33; + goto yy127; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy190; - goto yy94; + goto yy127; + goto yy33; } } - yy188: - ++p; - yych = *p; + yy125: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy190; - goto yy94; + goto yy127; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy190; + goto yy33; + goto yy127; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy190; - goto yy94; + goto yy127; + goto yy33; } } - yy189: - ++p; - yych = *p; + yy126: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy191; + goto yy128; if (yych <= '/') - goto yy94; - goto yy192; + goto yy33; + goto yy129; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy192; + goto yy33; + goto yy129; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy192; - goto yy94; + goto yy129; + goto yy33; } } - yy190: - ++p; - yych = *p; + yy127: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy192; - goto yy94; + goto yy129; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy192; + goto yy33; + goto yy129; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy192; - goto yy94; + goto yy129; + goto yy33; } } - yy191: - ++p; - yych = *p; + yy128: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy193; + goto yy130; if (yych <= '/') - goto yy94; - goto yy194; + goto yy33; + goto yy131; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy194; + goto yy33; + goto yy131; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy194; - goto yy94; + goto yy131; + goto yy33; } } - yy192: - ++p; - yych = *p; + yy129: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy194; - goto yy94; + goto yy131; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy194; + goto yy33; + goto yy131; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy194; - goto yy94; + goto yy131; + goto yy33; } } - yy193: - ++p; - yych = *p; + yy130: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy195; + goto yy132; if (yych <= '/') - goto yy94; - goto yy196; + goto yy33; + goto yy133; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy196; + goto yy33; + goto yy133; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy196; - goto yy94; + goto yy133; + goto yy33; } } - yy194: - ++p; - yych = *p; + yy131: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy196; - goto yy94; + goto yy133; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy196; + goto yy33; + goto yy133; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy196; - goto yy94; + goto yy133; + goto yy33; } } - yy195: - ++p; - yych = *p; + yy132: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy197; + goto yy134; if (yych <= '/') - goto yy94; - goto yy198; + goto yy33; + goto yy135; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy198; + goto yy33; + goto yy135; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy198; - goto yy94; + goto yy135; + goto yy33; } } - yy196: - ++p; - yych = *p; + yy133: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy198; - goto yy94; + goto yy135; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy198; + goto yy33; + goto yy135; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy198; - goto yy94; + goto yy135; + goto yy33; } } - yy197: - ++p; - yych = *p; + yy134: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy199; + goto yy136; if (yych <= '/') - goto yy94; - goto yy200; + goto yy33; + goto yy137; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy200; + goto yy33; + goto yy137; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy200; - goto yy94; + goto yy137; + goto yy33; } } - yy198: - ++p; - yych = *p; + yy135: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy200; - goto yy94; + goto yy137; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy200; + goto yy33; + goto yy137; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy200; - goto yy94; + goto yy137; + goto yy33; } } - yy199: - ++p; - yych = *p; + yy136: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy201; + goto yy138; if (yych <= '/') - goto yy94; - goto yy202; + goto yy33; + goto yy139; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy202; + goto yy33; + goto yy139; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy202; - goto yy94; + goto yy139; + goto yy33; } } - yy200: - ++p; - yych = *p; + yy137: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy202; - goto yy94; + goto yy139; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy202; + goto yy33; + goto yy139; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy202; - goto yy94; + goto yy139; + goto yy33; } } - yy201: - ++p; - yych = *p; + yy138: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy203; + goto yy140; if (yych <= '/') - goto yy94; - goto yy204; + goto yy33; + goto yy141; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy204; + goto yy33; + goto yy141; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy204; - goto yy94; + goto yy141; + goto yy33; } } - yy202: - ++p; - yych = *p; + yy139: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy204; - goto yy94; + goto yy141; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy204; + goto yy33; + goto yy141; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy204; - goto yy94; + goto yy141; + goto yy33; } } - yy203: - ++p; - yych = *p; + yy140: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy205; + goto yy142; if (yych <= '/') - goto yy94; - goto yy206; + goto yy33; + goto yy143; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy206; + goto yy33; + goto yy143; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy206; - goto yy94; + goto yy143; + goto yy33; } } - yy204: - ++p; - yych = *p; + yy141: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy206; - goto yy94; + goto yy143; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy206; + goto yy33; + goto yy143; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy206; - goto yy94; + goto yy143; + goto yy33; } } - yy205: - ++p; - yych = *p; + yy142: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy207; + goto yy144; if (yych <= '/') - goto yy94; - goto yy208; + goto yy33; + goto yy145; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy208; + goto yy33; + goto yy145; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy208; - goto yy94; + goto yy145; + goto yy33; } } - yy206: - ++p; - yych = *p; + yy143: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy208; - goto yy94; + goto yy145; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy208; + goto yy33; + goto yy145; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy208; - goto yy94; + goto yy145; + goto yy33; } } - yy207: - ++p; - yych = *p; + yy144: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy209; + goto yy146; if (yych <= '/') - goto yy94; - goto yy210; + goto yy33; + goto yy147; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy210; + goto yy33; + goto yy147; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy210; - goto yy94; + goto yy147; + goto yy33; } } - yy208: - ++p; - yych = *p; + yy145: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy210; - goto yy94; + goto yy147; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy210; + goto yy33; + goto yy147; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy210; - goto yy94; + goto yy147; + goto yy33; } } - yy209: - ++p; - yych = *p; + yy146: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy211; + goto yy148; if (yych <= '/') - goto yy94; - goto yy212; + goto yy33; + goto yy149; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy212; + goto yy33; + goto yy149; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy212; - goto yy94; + goto yy149; + goto yy33; } } - yy210: - ++p; - yych = *p; + yy147: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy212; - goto yy94; + goto yy149; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy212; + goto yy33; + goto yy149; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy212; - goto yy94; + goto yy149; + goto yy33; } } - yy211: - ++p; - yych = *p; + yy148: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy213; + goto yy150; if (yych <= '/') - goto yy94; - goto yy214; + goto yy33; + goto yy151; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy214; + goto yy33; + goto yy151; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy214; - goto yy94; + goto yy151; + goto yy33; } } - yy212: - ++p; - yych = *p; + yy149: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy214; - goto yy94; + goto yy151; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy214; + goto yy33; + goto yy151; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy214; - goto yy94; + goto yy151; + goto yy33; } } - yy213: - ++p; - yych = *p; + yy150: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy215; + goto yy152; if (yych <= '/') - goto yy94; - goto yy216; + goto yy33; + goto yy153; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy216; + goto yy33; + goto yy153; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy216; - goto yy94; + goto yy153; + goto yy33; } } - yy214: - ++p; - yych = *p; + yy151: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy216; - goto yy94; + goto yy153; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy216; + goto yy33; + goto yy153; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy216; - goto yy94; + goto yy153; + goto yy33; } } - yy215: - ++p; - yych = *p; + yy152: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy217; + goto yy154; if (yych <= '/') - goto yy94; - goto yy218; + goto yy33; + goto yy155; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy218; + goto yy33; + goto yy155; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy218; - goto yy94; + goto yy155; + goto yy33; } } - yy216: - ++p; - yych = *p; + yy153: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy218; - goto yy94; + goto yy155; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy218; + goto yy33; + goto yy155; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy218; - goto yy94; + goto yy155; + goto yy33; } } - yy217: - ++p; - yych = *p; + yy154: + yych = *++p; if (yych <= '9') { if (yych == '-') - goto yy219; + goto yy156; if (yych <= '/') - goto yy94; - goto yy220; + goto yy33; + goto yy157; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy94; - goto yy220; + goto yy33; + goto yy157; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy220; - goto yy94; + goto yy157; + goto yy33; } } - yy218: - ++p; - yych = *p; + yy155: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= ',') - goto yy94; + goto yy33; if (yych >= '.') - goto yy95; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy220; - goto yy94; + goto yy157; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; - goto yy220; + goto yy33; + goto yy157; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy220; - goto yy94; + goto yy157; + goto yy33; } } - yy219: - ++p; - yych = *p; + yy156: + yych = *++p; if (yych <= '@') { if (yych <= '/') - goto yy94; + goto yy33; if (yych <= '9') - goto yy221; - goto yy94; + goto yy158; + goto yy33; } else { if (yych <= 'Z') - goto yy221; + goto yy158; if (yych <= '`') - goto yy94; + goto yy33; if (yych <= 'z') - goto yy221; - goto yy94; + goto yy158; + goto yy33; } - yy220: - ++p; - yych = *p; + yy157: + yych = *++p; if (yych <= '=') { if (yych <= '.') { if (yych <= '-') - goto yy94; - goto yy95; + goto yy33; + goto yy34; } else { if (yych <= '/') - goto yy94; + goto yy33; if (yych >= ':') - goto yy94; + goto yy33; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy99; + goto yy37; if (yych <= '@') - goto yy94; + goto yy33; } else { if (yych <= '`') - goto yy94; + goto yy33; if (yych >= '{') - goto yy94; + goto yy33; } } - yy221: - ++p; - yych = *p; + yy158: + yych = *++p; if (yych == '.') - goto yy95; + goto yy34; if (yych == '>') - goto yy99; - goto yy94; + goto yy37; + goto yy33; } } @@ -4989,1688 +4855,1352 @@ bufsize_t _scan_html_tag(const unsigned char *p) { { unsigned char yych; static const unsigned char yybm[] = { - /* table 1 .. 8: 0 */ - 0, - 250, - 250, - 250, - 250, - 250, - 250, - 250, - 250, - 235, - 235, - 235, - 235, - 235, - 250, - 250, - 250, - 250, - 250, - 250, - 250, - 250, - 250, - 250, - 250, - 250, - 250, - 250, - 250, - 250, - 250, - 250, - 235, - 250, - 202, - 250, - 250, - 250, - 250, - 170, - 250, - 250, - 250, - 250, - 250, - 246, - 254, - 250, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 250, - 234, - 234, - 232, - 250, - 250, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 250, - 250, - 122, - 250, - 254, - 234, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 254, - 250, - 250, - 250, - 250, - 250, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - /* table 9 .. 11: 256 */ - 0, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 128, - 192, - 128, - 128, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 128, - 128, - 128, - 128, - 128, - 0, - 128, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 224, - 128, - 128, - 128, - 128, - 128, - 128, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 192, - 128, - 128, - 128, - 128, - 128, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, + 0, 224, 224, 224, 224, 224, 224, 224, 224, 200, 200, 200, 200, 200, + 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 224, 224, 200, 224, 128, 224, 224, 224, 224, 64, 224, 224, + 224, 224, 224, 244, 240, 224, 244, 244, 244, 244, 244, 244, 244, 244, + 244, 244, 240, 224, 192, 192, 192, 224, 224, 244, 244, 244, 244, 244, + 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, + 244, 244, 244, 244, 244, 244, 244, 224, 224, 224, 224, 240, 192, 244, + 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, + 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 224, 224, 224, + 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, }; yych = *p; - if (yych <= '>') { - if (yych <= '!') { - if (yych >= '!') - goto yy226; - } else { - if (yych == '/') - goto yy227; - } + if (yych <= '@') { + if (yych == '/') + goto yy162; } else { - if (yych <= 'Z') { - if (yych <= '?') - goto yy228; - if (yych >= 'A') - goto yy229; - } else { - if (yych <= '`') - goto yy224; - if (yych <= 'z') - goto yy229; - } + if (yych <= 'Z') + goto yy163; + if (yych <= '`') + goto yy160; + if (yych <= 'z') + goto yy163; } - yy224: + yy160: ++p; - yy225 : { return 0; } - yy226: - yych = *(marker = ++p); - if (yybm[256 + yych] & 32) { - goto yy232; - } - if (yych == '-') - goto yy230; - if (yych <= '@') - goto yy225; - if (yych <= '[') - goto yy234; - goto yy225; - yy227: + yy161 : { return 0; } + yy162: yych = *(marker = ++p); if (yych <= '@') - goto yy225; + goto yy161; if (yych <= 'Z') - goto yy235; + goto yy164; if (yych <= '`') - goto yy225; + goto yy161; if (yych <= 'z') - goto yy235; - goto yy225; - yy228: - yych = *(marker = ++p); - if (yych <= 0x00) - goto yy225; - if (yych <= 0x7F) - goto yy238; - if (yych <= 0xC1) - goto yy225; - if (yych <= 0xF4) - goto yy238; - goto yy225; - yy229: + goto yy164; + goto yy161; + yy163: yych = *(marker = ++p); - if (yybm[0 + yych] & 1) { - goto yy247; - } - if (yych <= '=') { - if (yych <= '.') { - if (yych == '-') - goto yy249; - goto yy225; + if (yych <= '.') { + if (yych <= 0x1F) { + if (yych <= 0x08) + goto yy161; + if (yych <= '\r') + goto yy168; + goto yy161; } else { - if (yych <= '/') - goto yy251; - if (yych <= '9') - goto yy249; - goto yy225; + if (yych <= ' ') + goto yy168; + if (yych == '-') + goto yy168; + goto yy161; } } else { - if (yych <= 'Z') { - if (yych <= '>') - goto yy252; - if (yych <= '@') - goto yy225; - goto yy249; + if (yych <= '@') { + if (yych <= '9') + goto yy168; + if (yych == '>') + goto yy168; + goto yy161; } else { + if (yych <= 'Z') + goto yy168; if (yych <= '`') - goto yy225; + goto yy161; if (yych <= 'z') - goto yy249; - goto yy225; + goto yy168; + goto yy161; } } - yy230: + yy164: yych = *++p; - if (yych == '-') - goto yy254; - yy231: - p = marker; - goto yy225; - yy232: - ++p; - yych = *p; - if (yybm[256 + yych] & 32) { - goto yy232; - } - if (yych <= 0x08) - goto yy231; - if (yych <= '\r') - goto yy255; - if (yych == ' ') - goto yy255; - goto yy231; - yy234: - yych = *++p; - if (yych == 'C') - goto yy257; - if (yych == 'c') - goto yy257; - goto yy231; - yy235: - ++p; - yych = *p; - if (yybm[256 + yych] & 64) { - goto yy235; + if (yybm[0 + yych] & 4) { + goto yy164; } if (yych <= 0x1F) { if (yych <= 0x08) - goto yy231; + goto yy165; if (yych <= '\r') - goto yy258; - goto yy231; + goto yy171; } else { if (yych <= ' ') - goto yy258; + goto yy171; if (yych == '>') - goto yy252; - goto yy231; - } - yy237: - ++p; - yych = *p; - yy238: - if (yybm[256 + yych] & 128) { - goto yy237; - } - if (yych <= 0xEC) { - if (yych <= 0xC1) { - if (yych <= 0x00) - goto yy231; - if (yych >= '@') - goto yy231; - } else { - if (yych <= 0xDF) - goto yy240; - if (yych <= 0xE0) - goto yy241; - goto yy242; - } - } else { - if (yych <= 0xF0) { - if (yych <= 0xED) - goto yy243; - if (yych <= 0xEF) - goto yy242; - goto yy244; - } else { - if (yych <= 0xF3) - goto yy245; - if (yych <= 0xF4) - goto yy246; - goto yy231; - } - } - ++p; - yych = *p; - if (yych <= 0xE0) { - if (yych <= '>') { - if (yych <= 0x00) - goto yy231; - if (yych <= '=') - goto yy237; - goto yy252; - } else { - if (yych <= 0x7F) - goto yy237; - if (yych <= 0xC1) - goto yy231; - if (yych >= 0xE0) - goto yy241; - } - } else { - if (yych <= 0xEF) { - if (yych == 0xED) - goto yy243; - goto yy242; - } else { - if (yych <= 0xF0) - goto yy244; - if (yych <= 0xF3) - goto yy245; - if (yych <= 0xF4) - goto yy246; - goto yy231; - } + goto yy170; } - yy240: - ++p; - yych = *p; - if (yych <= 0x7F) - goto yy231; - if (yych <= 0xBF) - goto yy237; - goto yy231; - yy241: - ++p; - yych = *p; - if (yych <= 0x9F) - goto yy231; - if (yych <= 0xBF) - goto yy240; - goto yy231; - yy242: - ++p; - yych = *p; - if (yych <= 0x7F) - goto yy231; - if (yych <= 0xBF) - goto yy240; - goto yy231; - yy243: - ++p; - yych = *p; - if (yych <= 0x7F) - goto yy231; - if (yych <= 0x9F) - goto yy240; - goto yy231; - yy244: - ++p; - yych = *p; - if (yych <= 0x8F) - goto yy231; - if (yych <= 0xBF) - goto yy242; - goto yy231; - yy245: - ++p; - yych = *p; - if (yych <= 0x7F) - goto yy231; - if (yych <= 0xBF) - goto yy242; - goto yy231; - yy246: - ++p; - yych = *p; - if (yych <= 0x7F) - goto yy231; - if (yych <= 0x8F) - goto yy242; - goto yy231; - yy247: - ++p; - yych = *p; - if (yybm[0 + yych] & 1) { - goto yy247; + yy165: + p = marker; + goto yy161; + yy166: + yych = *++p; + if (yybm[0 + yych] & 8) { + goto yy166; } if (yych <= '>') { if (yych <= '9') { if (yych == '/') - goto yy251; - goto yy231; + goto yy169; + goto yy165; } else { if (yych <= ':') - goto yy260; + goto yy172; if (yych <= '=') - goto yy231; - goto yy252; + goto yy165; + goto yy170; } } else { if (yych <= '^') { if (yych <= '@') - goto yy231; + goto yy165; if (yych <= 'Z') - goto yy260; - goto yy231; + goto yy172; + goto yy165; } else { if (yych == '`') - goto yy231; + goto yy165; if (yych <= 'z') - goto yy260; - goto yy231; + goto yy172; + goto yy165; } } - yy249: - ++p; - yych = *p; - if (yybm[0 + yych] & 1) { - goto yy247; + yy167: + yych = *++p; + yy168: + if (yybm[0 + yych] & 8) { + goto yy166; } if (yych <= '=') { if (yych <= '.') { if (yych == '-') - goto yy249; - goto yy231; + goto yy167; + goto yy165; } else { if (yych <= '/') - goto yy251; + goto yy169; if (yych <= '9') - goto yy249; - goto yy231; + goto yy167; + goto yy165; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy252; + goto yy170; if (yych <= '@') - goto yy231; - goto yy249; + goto yy165; + goto yy167; } else { if (yych <= '`') - goto yy231; + goto yy165; if (yych <= 'z') - goto yy249; - goto yy231; + goto yy167; + goto yy165; } } - yy251: + yy169: yych = *++p; if (yych != '>') - goto yy231; - yy252: + goto yy165; + yy170: ++p; { return (bufsize_t)(p - start); } - yy254: - yych = *++p; - if (yych == '-') - goto yy264; - if (yych == '>') - goto yy231; - goto yy263; - yy255: - ++p; - yych = *p; - if (yybm[0 + yych] & 2) { - goto yy255; - } - if (yych <= 0xEC) { - if (yych <= 0xC1) { - if (yych <= 0x00) - goto yy231; - if (yych <= '>') - goto yy252; - goto yy231; - } else { - if (yych <= 0xDF) - goto yy272; - if (yych <= 0xE0) - goto yy273; - goto yy274; - } - } else { - if (yych <= 0xF0) { - if (yych <= 0xED) - goto yy275; - if (yych <= 0xEF) - goto yy274; - goto yy276; - } else { - if (yych <= 0xF3) - goto yy277; - if (yych <= 0xF4) - goto yy278; - goto yy231; - } - } - yy257: + yy171: yych = *++p; - if (yych == 'D') - goto yy279; - if (yych == 'd') - goto yy279; - goto yy231; - yy258: - ++p; - yych = *p; if (yych <= 0x1F) { if (yych <= 0x08) - goto yy231; + goto yy165; if (yych <= '\r') - goto yy258; - goto yy231; + goto yy171; + goto yy165; } else { if (yych <= ' ') - goto yy258; + goto yy171; if (yych == '>') - goto yy252; - goto yy231; + goto yy170; + goto yy165; } - yy260: - ++p; - yych = *p; - if (yybm[0 + yych] & 4) { - goto yy260; + yy172: + yych = *++p; + if (yybm[0 + yych] & 16) { + goto yy172; } if (yych <= ',') { if (yych <= '\r') { if (yych <= 0x08) - goto yy231; - goto yy280; + goto yy165; } else { - if (yych == ' ') - goto yy280; - goto yy231; + if (yych != ' ') + goto yy165; } } else { if (yych <= '<') { if (yych <= '/') - goto yy251; - goto yy231; + goto yy169; + goto yy165; } else { if (yych <= '=') - goto yy282; + goto yy174; if (yych <= '>') - goto yy252; - goto yy231; + goto yy170; + goto yy165; } } - yy262: - ++p; - yych = *p; - yy263: - if (yybm[0 + yych] & 8) { - goto yy262; - } - if (yych <= 0xEC) { - if (yych <= 0xC1) { - if (yych <= 0x00) - goto yy231; - if (yych <= '-') - goto yy284; - goto yy231; + yy173: + yych = *++p; + if (yych <= '<') { + if (yych <= ' ') { + if (yych <= 0x08) + goto yy165; + if (yych <= '\r') + goto yy173; + if (yych <= 0x1F) + goto yy165; + goto yy173; } else { - if (yych <= 0xDF) - goto yy265; - if (yych <= 0xE0) - goto yy266; - goto yy267; - } - } else { - if (yych <= 0xF0) { - if (yych <= 0xED) - goto yy268; - if (yych <= 0xEF) - goto yy267; - goto yy269; - } else { - if (yych <= 0xF3) - goto yy270; - if (yych <= 0xF4) - goto yy271; - goto yy231; - } - } - yy264: - yych = *++p; - if (yych == '-') - goto yy251; - if (yych == '>') - goto yy231; - goto yy263; - yy265: - ++p; - yych = *p; - if (yych <= 0x7F) - goto yy231; - if (yych <= 0xBF) - goto yy262; - goto yy231; - yy266: - ++p; - yych = *p; - if (yych <= 0x9F) - goto yy231; - if (yych <= 0xBF) - goto yy265; - goto yy231; - yy267: - ++p; - yych = *p; - if (yych <= 0x7F) - goto yy231; - if (yych <= 0xBF) - goto yy265; - goto yy231; - yy268: - ++p; - yych = *p; - if (yych <= 0x7F) - goto yy231; - if (yych <= 0x9F) - goto yy265; - goto yy231; - yy269: - ++p; - yych = *p; - if (yych <= 0x8F) - goto yy231; - if (yych <= 0xBF) - goto yy267; - goto yy231; - yy270: - ++p; - yych = *p; - if (yych <= 0x7F) - goto yy231; - if (yych <= 0xBF) - goto yy267; - goto yy231; - yy271: - ++p; - yych = *p; - if (yych <= 0x7F) - goto yy231; - if (yych <= 0x8F) - goto yy267; - goto yy231; - yy272: - ++p; - yych = *p; - if (yych <= 0x7F) - goto yy231; - if (yych <= 0xBF) - goto yy255; - goto yy231; - yy273: - ++p; - yych = *p; - if (yych <= 0x9F) - goto yy231; - if (yych <= 0xBF) - goto yy272; - goto yy231; - yy274: - ++p; - yych = *p; - if (yych <= 0x7F) - goto yy231; - if (yych <= 0xBF) - goto yy272; - goto yy231; - yy275: - ++p; - yych = *p; - if (yych <= 0x7F) - goto yy231; - if (yych <= 0x9F) - goto yy272; - goto yy231; - yy276: - ++p; - yych = *p; - if (yych <= 0x8F) - goto yy231; - if (yych <= 0xBF) - goto yy274; - goto yy231; - yy277: - ++p; - yych = *p; - if (yych <= 0x7F) - goto yy231; - if (yych <= 0xBF) - goto yy274; - goto yy231; - yy278: - ++p; - yych = *p; - if (yych <= 0x7F) - goto yy231; - if (yych <= 0x8F) - goto yy274; - goto yy231; - yy279: - yych = *++p; - if (yych == 'A') - goto yy285; - if (yych == 'a') - goto yy285; - goto yy231; - yy280: - ++p; - yych = *p; - if (yych <= '<') { - if (yych <= ' ') { - if (yych <= 0x08) - goto yy231; - if (yych <= '\r') - goto yy280; - if (yych <= 0x1F) - goto yy231; - goto yy280; - } else { - if (yych <= '/') { - if (yych <= '.') - goto yy231; - goto yy251; - } else { - if (yych == ':') - goto yy260; - goto yy231; - } + if (yych <= '/') { + if (yych <= '.') + goto yy165; + goto yy169; + } else { + if (yych == ':') + goto yy172; + goto yy165; + } } } else { if (yych <= 'Z') { if (yych <= '=') - goto yy282; + goto yy174; if (yych <= '>') - goto yy252; + goto yy170; if (yych <= '@') - goto yy231; - goto yy260; + goto yy165; + goto yy172; } else { if (yych <= '_') { if (yych <= '^') - goto yy231; - goto yy260; + goto yy165; + goto yy172; } else { if (yych <= '`') - goto yy231; + goto yy165; if (yych <= 'z') - goto yy260; - goto yy231; + goto yy172; + goto yy165; } } } - yy282: - ++p; - yych = *p; - if (yybm[0 + yych] & 16) { - goto yy286; + yy174: + yych = *++p; + if (yybm[0 + yych] & 32) { + goto yy175; } if (yych <= 0xE0) { if (yych <= '"') { if (yych <= 0x00) - goto yy231; + goto yy165; if (yych <= ' ') - goto yy282; - goto yy288; + goto yy174; + goto yy176; } else { if (yych <= '\'') - goto yy290; + goto yy177; if (yych <= 0xC1) - goto yy231; + goto yy165; if (yych <= 0xDF) - goto yy292; - goto yy293; + goto yy178; + goto yy179; } } else { if (yych <= 0xEF) { if (yych == 0xED) - goto yy295; - goto yy294; + goto yy181; + goto yy180; } else { if (yych <= 0xF0) - goto yy296; - if (yych <= 0xF3) - goto yy297; - if (yych <= 0xF4) - goto yy298; - goto yy231; - } - } - yy284: - ++p; - yych = *p; - if (yybm[0 + yych] & 8) { - goto yy262; - } - if (yych <= 0xEC) { - if (yych <= 0xC1) { - if (yych <= 0x00) - goto yy231; - if (yych <= '-') - goto yy251; - goto yy231; - } else { - if (yych <= 0xDF) - goto yy265; - if (yych <= 0xE0) - goto yy266; - goto yy267; - } - } else { - if (yych <= 0xF0) { - if (yych <= 0xED) - goto yy268; - if (yych <= 0xEF) - goto yy267; - goto yy269; - } else { + goto yy182; if (yych <= 0xF3) - goto yy270; + goto yy183; if (yych <= 0xF4) - goto yy271; - goto yy231; + goto yy184; + goto yy165; } } - yy285: + yy175: yych = *++p; - if (yych == 'T') - goto yy299; - if (yych == 't') - goto yy299; - goto yy231; - yy286: - ++p; - yych = *p; - if (yybm[0 + yych] & 16) { - goto yy286; + if (yybm[0 + yych] & 32) { + goto yy175; } if (yych <= 0xE0) { if (yych <= '=') { if (yych <= 0x00) - goto yy231; + goto yy165; if (yych <= ' ') - goto yy247; - goto yy231; + goto yy166; + goto yy165; } else { if (yych <= '>') - goto yy252; + goto yy170; if (yych <= 0xC1) - goto yy231; + goto yy165; if (yych <= 0xDF) - goto yy292; - goto yy293; + goto yy178; + goto yy179; } } else { if (yych <= 0xEF) { if (yych == 0xED) - goto yy295; - goto yy294; + goto yy181; + goto yy180; } else { if (yych <= 0xF0) - goto yy296; + goto yy182; if (yych <= 0xF3) - goto yy297; + goto yy183; if (yych <= 0xF4) - goto yy298; - goto yy231; + goto yy184; + goto yy165; } } - yy288: - ++p; - yych = *p; - if (yybm[0 + yych] & 32) { - goto yy288; + yy176: + yych = *++p; + if (yybm[0 + yych] & 64) { + goto yy176; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= 0x00) - goto yy231; + goto yy165; if (yych <= '"') - goto yy300; - goto yy231; + goto yy185; + goto yy165; } else { if (yych <= 0xDF) - goto yy301; + goto yy186; if (yych <= 0xE0) - goto yy302; - goto yy303; + goto yy187; + goto yy188; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy304; + goto yy189; if (yych <= 0xEF) - goto yy303; - goto yy305; + goto yy188; + goto yy190; } else { if (yych <= 0xF3) - goto yy306; + goto yy191; if (yych <= 0xF4) - goto yy307; - goto yy231; + goto yy192; + goto yy165; } } - yy290: - ++p; - yych = *p; - if (yybm[0 + yych] & 64) { - goto yy290; + yy177: + yych = *++p; + if (yybm[0 + yych] & 128) { + goto yy177; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= 0x00) - goto yy231; + goto yy165; if (yych <= '\'') - goto yy300; - goto yy231; + goto yy185; + goto yy165; } else { if (yych <= 0xDF) - goto yy308; + goto yy193; if (yych <= 0xE0) - goto yy309; - goto yy310; + goto yy194; + goto yy195; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy311; + goto yy196; if (yych <= 0xEF) - goto yy310; - goto yy312; + goto yy195; + goto yy197; } else { if (yych <= 0xF3) - goto yy313; + goto yy198; if (yych <= 0xF4) - goto yy314; - goto yy231; + goto yy199; + goto yy165; } } - yy292: - ++p; - yych = *p; + yy178: + yych = *++p; if (yych <= 0x7F) - goto yy231; + goto yy165; if (yych <= 0xBF) - goto yy286; - goto yy231; - yy293: - ++p; - yych = *p; + goto yy175; + goto yy165; + yy179: + yych = *++p; if (yych <= 0x9F) - goto yy231; + goto yy165; if (yych <= 0xBF) - goto yy292; - goto yy231; - yy294: - ++p; - yych = *p; - if (yych <= 0x7F) - goto yy231; + goto yy178; + goto yy165; + yy180: + yych = *++p; + if (yych <= 0x7F) + goto yy165; if (yych <= 0xBF) - goto yy292; - goto yy231; - yy295: - ++p; - yych = *p; + goto yy178; + goto yy165; + yy181: + yych = *++p; if (yych <= 0x7F) - goto yy231; + goto yy165; if (yych <= 0x9F) - goto yy292; - goto yy231; - yy296: - ++p; - yych = *p; + goto yy178; + goto yy165; + yy182: + yych = *++p; if (yych <= 0x8F) - goto yy231; + goto yy165; if (yych <= 0xBF) - goto yy294; - goto yy231; - yy297: - ++p; - yych = *p; + goto yy180; + goto yy165; + yy183: + yych = *++p; if (yych <= 0x7F) - goto yy231; + goto yy165; if (yych <= 0xBF) - goto yy294; - goto yy231; - yy298: - ++p; - yych = *p; + goto yy180; + goto yy165; + yy184: + yych = *++p; if (yych <= 0x7F) - goto yy231; + goto yy165; if (yych <= 0x8F) - goto yy294; - goto yy231; - yy299: + goto yy180; + goto yy165; + yy185: yych = *++p; - if (yych == 'A') - goto yy315; - if (yych == 'a') - goto yy315; - goto yy231; - yy300: - ++p; - yych = *p; - if (yybm[0 + yych] & 1) { - goto yy247; + if (yybm[0 + yych] & 8) { + goto yy166; } if (yych == '/') - goto yy251; + goto yy169; if (yych == '>') - goto yy252; - goto yy231; - yy301: - ++p; - yych = *p; + goto yy170; + goto yy165; + yy186: + yych = *++p; if (yych <= 0x7F) - goto yy231; + goto yy165; if (yych <= 0xBF) - goto yy288; - goto yy231; - yy302: - ++p; - yych = *p; + goto yy176; + goto yy165; + yy187: + yych = *++p; if (yych <= 0x9F) - goto yy231; + goto yy165; if (yych <= 0xBF) - goto yy301; - goto yy231; - yy303: - ++p; - yych = *p; + goto yy186; + goto yy165; + yy188: + yych = *++p; if (yych <= 0x7F) - goto yy231; + goto yy165; if (yych <= 0xBF) - goto yy301; - goto yy231; - yy304: - ++p; - yych = *p; + goto yy186; + goto yy165; + yy189: + yych = *++p; if (yych <= 0x7F) - goto yy231; + goto yy165; if (yych <= 0x9F) - goto yy301; - goto yy231; - yy305: - ++p; - yych = *p; + goto yy186; + goto yy165; + yy190: + yych = *++p; if (yych <= 0x8F) - goto yy231; + goto yy165; if (yych <= 0xBF) - goto yy303; - goto yy231; - yy306: - ++p; + goto yy188; + goto yy165; + yy191: + yych = *++p; + if (yych <= 0x7F) + goto yy165; + if (yych <= 0xBF) + goto yy188; + goto yy165; + yy192: + yych = *++p; + if (yych <= 0x7F) + goto yy165; + if (yych <= 0x8F) + goto yy188; + goto yy165; + yy193: + yych = *++p; + if (yych <= 0x7F) + goto yy165; + if (yych <= 0xBF) + goto yy177; + goto yy165; + yy194: + yych = *++p; + if (yych <= 0x9F) + goto yy165; + if (yych <= 0xBF) + goto yy193; + goto yy165; + yy195: + yych = *++p; + if (yych <= 0x7F) + goto yy165; + if (yych <= 0xBF) + goto yy193; + goto yy165; + yy196: + yych = *++p; + if (yych <= 0x7F) + goto yy165; + if (yych <= 0x9F) + goto yy193; + goto yy165; + yy197: + yych = *++p; + if (yych <= 0x8F) + goto yy165; + if (yych <= 0xBF) + goto yy195; + goto yy165; + yy198: + yych = *++p; + if (yych <= 0x7F) + goto yy165; + if (yych <= 0xBF) + goto yy195; + goto yy165; + yy199: + yych = *++p; + if (yych <= 0x7F) + goto yy165; + if (yych <= 0x8F) + goto yy195; + goto yy165; + } +} + +bufsize_t _scan_html_comment(const unsigned char *p) { + const unsigned char *marker = NULL; + const unsigned char *start = p; + + { + unsigned char yych; + static const unsigned char yybm[] = { + 0, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 0, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }; yych = *p; + if (yych == '-') + goto yy202; + ++p; + yy201 : { return 0; } + yy202: + yych = *(marker = ++p); + if (yych != '-') + goto yy201; + yy203: + yych = *++p; + if (yybm[0 + yych] & 128) { + goto yy203; + } + if (yych <= 0xEC) { + if (yych <= 0xC1) { + if (yych <= 0x00) + goto yy204; + if (yych <= '-') + goto yy205; + } else { + if (yych <= 0xDF) + goto yy206; + if (yych <= 0xE0) + goto yy207; + goto yy208; + } + } else { + if (yych <= 0xF0) { + if (yych <= 0xED) + goto yy209; + if (yych <= 0xEF) + goto yy208; + goto yy210; + } else { + if (yych <= 0xF3) + goto yy211; + if (yych <= 0xF4) + goto yy212; + } + } + yy204: + p = marker; + goto yy201; + yy205: + yych = *++p; + if (yybm[0 + yych] & 128) { + goto yy203; + } + if (yych <= 0xEC) { + if (yych <= 0xC1) { + if (yych <= 0x00) + goto yy204; + if (yych <= '-') + goto yy213; + goto yy204; + } else { + if (yych <= 0xDF) + goto yy206; + if (yych <= 0xE0) + goto yy207; + goto yy208; + } + } else { + if (yych <= 0xF0) { + if (yych <= 0xED) + goto yy209; + if (yych <= 0xEF) + goto yy208; + goto yy210; + } else { + if (yych <= 0xF3) + goto yy211; + if (yych <= 0xF4) + goto yy212; + goto yy204; + } + } + yy206: + yych = *++p; if (yych <= 0x7F) - goto yy231; + goto yy204; if (yych <= 0xBF) - goto yy303; - goto yy231; - yy307: + goto yy203; + goto yy204; + yy207: + yych = *++p; + if (yych <= 0x9F) + goto yy204; + if (yych <= 0xBF) + goto yy206; + goto yy204; + yy208: + yych = *++p; + if (yych <= 0x7F) + goto yy204; + if (yych <= 0xBF) + goto yy206; + goto yy204; + yy209: + yych = *++p; + if (yych <= 0x7F) + goto yy204; + if (yych <= 0x9F) + goto yy206; + goto yy204; + yy210: + yych = *++p; + if (yych <= 0x8F) + goto yy204; + if (yych <= 0xBF) + goto yy208; + goto yy204; + yy211: + yych = *++p; + if (yych <= 0x7F) + goto yy204; + if (yych <= 0xBF) + goto yy208; + goto yy204; + yy212: + yych = *++p; + if (yych <= 0x7F) + goto yy204; + if (yych <= 0x8F) + goto yy208; + goto yy204; + yy213: + yych = *++p; + if (yych <= 0xE0) { + if (yych <= '>') { + if (yych <= 0x00) + goto yy204; + if (yych <= '=') + goto yy203; + } else { + if (yych <= 0x7F) + goto yy203; + if (yych <= 0xC1) + goto yy204; + if (yych <= 0xDF) + goto yy206; + goto yy207; + } + } else { + if (yych <= 0xEF) { + if (yych == 0xED) + goto yy209; + goto yy208; + } else { + if (yych <= 0xF0) + goto yy210; + if (yych <= 0xF3) + goto yy211; + if (yych <= 0xF4) + goto yy212; + goto yy204; + } + } ++p; + { return (bufsize_t)(p - start); } + } +} + +bufsize_t _scan_html_pi(const unsigned char *p) { + const unsigned char *marker = NULL; + const unsigned char *start = p; + + { + unsigned char yych; + unsigned int yyaccept = 0; + static const unsigned char yybm[] = { + 0, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 0, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }; yych = *p; + if (yybm[0 + yych] & 128) { + goto yy217; + } + if (yych <= 0xEC) { + if (yych <= 0xC1) { + if (yych <= 0x00) + goto yy215; + if (yych <= '?') + goto yy220; + } else { + if (yych <= 0xDF) + goto yy221; + if (yych <= 0xE0) + goto yy222; + goto yy223; + } + } else { + if (yych <= 0xF0) { + if (yych <= 0xED) + goto yy224; + if (yych <= 0xEF) + goto yy223; + goto yy225; + } else { + if (yych <= 0xF3) + goto yy226; + if (yych <= 0xF4) + goto yy227; + } + } + yy215: + ++p; + yy216 : { return 0; } + yy217: + yyaccept = 0; + yych = *(marker = ++p); + yy218: + if (yybm[0 + yych] & 128) { + goto yy217; + } + if (yych <= 0xEC) { + if (yych <= 0xC1) { + if (yych <= 0x00) + goto yy219; + if (yych <= '?') + goto yy228; + } else { + if (yych <= 0xDF) + goto yy230; + if (yych <= 0xE0) + goto yy231; + goto yy232; + } + } else { + if (yych <= 0xF0) { + if (yych <= 0xED) + goto yy233; + if (yych <= 0xEF) + goto yy232; + goto yy234; + } else { + if (yych <= 0xF3) + goto yy235; + if (yych <= 0xF4) + goto yy236; + } + } + yy219 : { return (bufsize_t)(p - start); } + yy220: + yyaccept = 1; + yych = *(marker = ++p); + if (yych <= '?') { + if (yych <= 0x00) + goto yy216; + if (yych <= '=') + goto yy218; + if (yych <= '>') + goto yy216; + goto yy217; + } else { + if (yych <= 0x7F) + goto yy218; + if (yych <= 0xC1) + goto yy216; + if (yych <= 0xF4) + goto yy218; + goto yy216; + } + yy221: + yych = *++p; if (yych <= 0x7F) - goto yy231; + goto yy216; + if (yych <= 0xBF) + goto yy217; + goto yy216; + yy222: + yyaccept = 1; + yych = *(marker = ++p); + if (yych <= 0x9F) + goto yy216; + if (yych <= 0xBF) + goto yy230; + goto yy216; + yy223: + yyaccept = 1; + yych = *(marker = ++p); + if (yych <= 0x7F) + goto yy216; + if (yych <= 0xBF) + goto yy230; + goto yy216; + yy224: + yyaccept = 1; + yych = *(marker = ++p); + if (yych <= 0x7F) + goto yy216; + if (yych <= 0x9F) + goto yy230; + goto yy216; + yy225: + yyaccept = 1; + yych = *(marker = ++p); if (yych <= 0x8F) - goto yy303; - goto yy231; - yy308: + goto yy216; + if (yych <= 0xBF) + goto yy232; + goto yy216; + yy226: + yyaccept = 1; + yych = *(marker = ++p); + if (yych <= 0x7F) + goto yy216; + if (yych <= 0xBF) + goto yy232; + goto yy216; + yy227: + yyaccept = 1; + yych = *(marker = ++p); + if (yych <= 0x7F) + goto yy216; + if (yych <= 0x8F) + goto yy232; + goto yy216; + yy228: + yych = *++p; + if (yych <= 0xE0) { + if (yych <= '>') { + if (yych <= 0x00) + goto yy229; + if (yych <= '=') + goto yy217; + } else { + if (yych <= 0x7F) + goto yy217; + if (yych <= 0xC1) + goto yy229; + if (yych <= 0xDF) + goto yy230; + goto yy231; + } + } else { + if (yych <= 0xEF) { + if (yych == 0xED) + goto yy233; + goto yy232; + } else { + if (yych <= 0xF0) + goto yy234; + if (yych <= 0xF3) + goto yy235; + if (yych <= 0xF4) + goto yy236; + } + } + yy229: + p = marker; + if (yyaccept == 0) { + goto yy219; + } else { + goto yy216; + } + yy230: + yych = *++p; + if (yych <= 0x7F) + goto yy229; + if (yych <= 0xBF) + goto yy217; + goto yy229; + yy231: + yych = *++p; + if (yych <= 0x9F) + goto yy229; + if (yych <= 0xBF) + goto yy230; + goto yy229; + yy232: + yych = *++p; + if (yych <= 0x7F) + goto yy229; + if (yych <= 0xBF) + goto yy230; + goto yy229; + yy233: + yych = *++p; + if (yych <= 0x7F) + goto yy229; + if (yych <= 0x9F) + goto yy230; + goto yy229; + yy234: + yych = *++p; + if (yych <= 0x8F) + goto yy229; + if (yych <= 0xBF) + goto yy232; + goto yy229; + yy235: + yych = *++p; + if (yych <= 0x7F) + goto yy229; + if (yych <= 0xBF) + goto yy232; + goto yy229; + yy236: + yych = *++p; + if (yych <= 0x7F) + goto yy229; + if (yych <= 0x8F) + goto yy232; + goto yy229; + } +} + +bufsize_t _scan_html_declaration(const unsigned char *p) { + const unsigned char *marker = NULL; + const unsigned char *start = p; + + { + unsigned char yych; + static const unsigned char yybm[] = { + 0, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 0, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }; + yych = *p; + if (yych <= '@') + goto yy238; + if (yych <= 'Z') + goto yy239; + yy238: ++p; - yych = *p; + { return 0; } + yy239: + yych = *(marker = ++p); + if (yybm[0 + yych] & 128) { + goto yy239; + } + if (yych <= 0xED) { + if (yych <= 0xDF) { + if (yych >= 0xC2) + goto yy241; + } else { + if (yych <= 0xE0) + goto yy243; + if (yych <= 0xEC) + goto yy244; + goto yy245; + } + } else { + if (yych <= 0xF0) { + if (yych <= 0xEF) + goto yy244; + goto yy246; + } else { + if (yych <= 0xF3) + goto yy247; + if (yych <= 0xF4) + goto yy248; + } + } + yy240 : { return (bufsize_t)(p - start); } + yy241: + yych = *++p; if (yych <= 0x7F) - goto yy231; + goto yy242; if (yych <= 0xBF) - goto yy290; - goto yy231; - yy309: - ++p; - yych = *p; + goto yy239; + yy242: + p = marker; + goto yy240; + yy243: + yych = *++p; if (yych <= 0x9F) - goto yy231; + goto yy242; if (yych <= 0xBF) - goto yy308; - goto yy231; - yy310: - ++p; - yych = *p; + goto yy241; + goto yy242; + yy244: + yych = *++p; if (yych <= 0x7F) - goto yy231; + goto yy242; if (yych <= 0xBF) - goto yy308; - goto yy231; - yy311: - ++p; - yych = *p; + goto yy241; + goto yy242; + yy245: + yych = *++p; if (yych <= 0x7F) - goto yy231; + goto yy242; if (yych <= 0x9F) - goto yy308; - goto yy231; - yy312: - ++p; - yych = *p; + goto yy241; + goto yy242; + yy246: + yych = *++p; if (yych <= 0x8F) - goto yy231; + goto yy242; if (yych <= 0xBF) - goto yy310; - goto yy231; - yy313: - ++p; - yych = *p; + goto yy244; + goto yy242; + yy247: + yych = *++p; if (yych <= 0x7F) - goto yy231; + goto yy242; if (yych <= 0xBF) - goto yy310; - goto yy231; - yy314: - ++p; - yych = *p; + goto yy244; + goto yy242; + yy248: + yych = *++p; if (yych <= 0x7F) - goto yy231; + goto yy242; if (yych <= 0x8F) - goto yy310; - goto yy231; - yy315: + goto yy244; + goto yy242; + } +} + +bufsize_t _scan_html_cdata(const unsigned char *p) { + const unsigned char *marker = NULL; + const unsigned char *start = p; + + { + unsigned char yych; + unsigned int yyaccept = 0; + static const unsigned char yybm[] = { + 0, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 0, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }; + yych = *p; + if (yych == 'C') + goto yy251; + if (yych == 'c') + goto yy251; + ++p; + yy250 : { return 0; } + yy251: + yyaccept = 0; + yych = *(marker = ++p); + if (yych == 'D') + goto yy252; + if (yych != 'd') + goto yy250; + yy252: + yych = *++p; + if (yych == 'A') + goto yy254; + if (yych == 'a') + goto yy254; + yy253: + p = marker; + if (yyaccept == 0) { + goto yy250; + } else { + goto yy258; + } + yy254: + yych = *++p; + if (yych == 'T') + goto yy255; + if (yych != 't') + goto yy253; + yy255: + yych = *++p; + if (yych == 'A') + goto yy256; + if (yych != 'a') + goto yy253; + yy256: yych = *++p; if (yych != '[') - goto yy231; - yy316: - ++p; - yych = *p; + goto yy253; + yy257: + yyaccept = 1; + yych = *(marker = ++p); if (yybm[0 + yych] & 128) { - goto yy316; + goto yy257; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= 0x00) - goto yy231; - if (yych >= '^') - goto yy231; + goto yy258; + if (yych <= ']') + goto yy259; } else { if (yych <= 0xDF) - goto yy319; + goto yy260; if (yych <= 0xE0) - goto yy320; - goto yy321; + goto yy261; + goto yy262; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy322; + goto yy263; if (yych <= 0xEF) - goto yy321; - goto yy323; + goto yy262; + goto yy264; } else { if (yych <= 0xF3) - goto yy324; + goto yy265; if (yych <= 0xF4) - goto yy325; - goto yy231; + goto yy266; } } - ++p; - yych = *p; + yy258 : { return (bufsize_t)(p - start); } + yy259: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy316; + goto yy257; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= 0x00) - goto yy231; + goto yy253; if (yych <= ']') - goto yy326; - goto yy231; + goto yy267; + goto yy253; } else { if (yych <= 0xDF) - goto yy319; + goto yy260; if (yych <= 0xE0) - goto yy320; - goto yy321; + goto yy261; + goto yy262; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy322; + goto yy263; if (yych <= 0xEF) - goto yy321; - goto yy323; + goto yy262; + goto yy264; } else { if (yych <= 0xF3) - goto yy324; + goto yy265; if (yych <= 0xF4) - goto yy325; - goto yy231; + goto yy266; + goto yy253; } } - yy319: - ++p; - yych = *p; + yy260: + yych = *++p; if (yych <= 0x7F) - goto yy231; + goto yy253; if (yych <= 0xBF) - goto yy316; - goto yy231; - yy320: - ++p; - yych = *p; + goto yy257; + goto yy253; + yy261: + yych = *++p; if (yych <= 0x9F) - goto yy231; + goto yy253; if (yych <= 0xBF) - goto yy319; - goto yy231; - yy321: - ++p; - yych = *p; + goto yy260; + goto yy253; + yy262: + yych = *++p; if (yych <= 0x7F) - goto yy231; + goto yy253; if (yych <= 0xBF) - goto yy319; - goto yy231; - yy322: - ++p; - yych = *p; + goto yy260; + goto yy253; + yy263: + yych = *++p; if (yych <= 0x7F) - goto yy231; + goto yy253; if (yych <= 0x9F) - goto yy319; - goto yy231; - yy323: - ++p; - yych = *p; + goto yy260; + goto yy253; + yy264: + yych = *++p; if (yych <= 0x8F) - goto yy231; + goto yy253; if (yych <= 0xBF) - goto yy321; - goto yy231; - yy324: - ++p; - yych = *p; + goto yy262; + goto yy253; + yy265: + yych = *++p; if (yych <= 0x7F) - goto yy231; + goto yy253; if (yych <= 0xBF) - goto yy321; - goto yy231; - yy325: - ++p; - yych = *p; + goto yy262; + goto yy253; + yy266: + yych = *++p; if (yych <= 0x7F) - goto yy231; + goto yy253; if (yych <= 0x8F) - goto yy321; - goto yy231; - yy326: - ++p; - yych = *p; + goto yy262; + goto yy253; + yy267: + yych = *++p; if (yych <= 0xE0) { if (yych <= '>') { if (yych <= 0x00) - goto yy231; + goto yy253; if (yych <= '=') - goto yy316; - goto yy252; + goto yy257; + goto yy253; } else { if (yych <= 0x7F) - goto yy316; + goto yy257; if (yych <= 0xC1) - goto yy231; + goto yy253; if (yych <= 0xDF) - goto yy319; - goto yy320; + goto yy260; + goto yy261; } } else { if (yych <= 0xEF) { if (yych == 0xED) - goto yy322; - goto yy321; + goto yy263; + goto yy262; } else { if (yych <= 0xF0) - goto yy323; + goto yy264; if (yych <= 0xF3) - goto yy324; + goto yy265; if (yych <= 0xF4) - goto yy325; - goto yy231; + goto yy266; + goto yy253; } } } @@ -6686,216 +6216,220 @@ bufsize_t _scan_html_block_start(const unsigned char *p) { unsigned char yych; yych = *p; if (yych == '<') - goto yy331; + goto yy270; ++p; - yy330 : { return 0; } - yy331: + yy269 : { return 0; } + yy270: yych = *(marker = ++p); switch (yych) { case '!': - goto yy332; + goto yy271; case '/': - goto yy334; + goto yy273; case '?': - goto yy335; + goto yy274; case 'A': case 'a': - goto yy337; + goto yy275; case 'B': case 'b': - goto yy338; + goto yy276; case 'C': case 'c': - goto yy339; + goto yy277; case 'D': case 'd': - goto yy340; + goto yy278; case 'F': case 'f': - goto yy341; + goto yy279; case 'H': case 'h': - goto yy342; + goto yy280; case 'I': case 'i': - goto yy343; + goto yy281; case 'L': case 'l': - goto yy344; + goto yy282; case 'M': case 'm': - goto yy345; + goto yy283; case 'N': case 'n': - goto yy346; + goto yy284; case 'O': case 'o': - goto yy347; + goto yy285; case 'P': case 'p': - goto yy348; + goto yy286; case 'S': case 's': - goto yy349; + goto yy287; case 'T': case 't': - goto yy350; + goto yy288; case 'U': case 'u': - goto yy351; + goto yy289; default: - goto yy330; + goto yy269; } - yy332: + yy271: yych = *++p; - if (yych <= '@') { + if (yych <= 'Z') { if (yych == '-') - goto yy352; + goto yy290; + if (yych >= 'A') + goto yy291; } else { - if (yych <= 'Z') - goto yy353; if (yych <= '[') - goto yy355; + goto yy292; + if (yych <= '`') + goto yy272; + if (yych <= 'z') + goto yy291; } - yy333: + yy272: p = marker; - goto yy330; - yy334: + goto yy269; + yy273: yych = *++p; switch (yych) { case 'A': case 'a': - goto yy337; + goto yy275; case 'B': case 'b': - goto yy338; + goto yy276; case 'C': case 'c': - goto yy339; + goto yy277; case 'D': case 'd': - goto yy340; + goto yy278; case 'F': case 'f': - goto yy341; + goto yy279; case 'H': case 'h': - goto yy342; + goto yy280; case 'I': case 'i': - goto yy343; + goto yy281; case 'L': case 'l': - goto yy344; + goto yy282; case 'M': case 'm': - goto yy345; + goto yy283; case 'N': case 'n': - goto yy346; + goto yy284; case 'O': case 'o': - goto yy347; + goto yy285; case 'P': case 'p': - goto yy356; + goto yy293; case 'S': case 's': - goto yy357; + goto yy294; case 'T': case 't': - goto yy350; + goto yy295; case 'U': case 'u': - goto yy351; + goto yy289; default: - goto yy333; + goto yy272; } - yy335: + yy274: ++p; { return 3; } - yy337: + yy275: yych = *++p; if (yych <= 'S') { if (yych <= 'D') { if (yych <= 'C') - goto yy333; - goto yy358; + goto yy272; + goto yy296; } else { if (yych <= 'Q') - goto yy333; + goto yy272; if (yych <= 'R') - goto yy359; - goto yy360; + goto yy297; + goto yy298; } } else { if (yych <= 'q') { if (yych == 'd') - goto yy358; - goto yy333; + goto yy296; + goto yy272; } else { if (yych <= 'r') - goto yy359; + goto yy297; if (yych <= 's') - goto yy360; - goto yy333; + goto yy298; + goto yy272; } } - yy338: + yy276: yych = *++p; if (yych <= 'O') { if (yych <= 'K') { if (yych == 'A') - goto yy361; - goto yy333; + goto yy299; + goto yy272; } else { if (yych <= 'L') - goto yy362; + goto yy300; if (yych <= 'N') - goto yy333; - goto yy363; + goto yy272; + goto yy301; } } else { if (yych <= 'k') { if (yych == 'a') - goto yy361; - goto yy333; + goto yy299; + goto yy272; } else { if (yych <= 'l') - goto yy362; + goto yy300; if (yych == 'o') - goto yy363; - goto yy333; + goto yy301; + goto yy272; } } - yy339: + yy277: yych = *++p; if (yych <= 'O') { if (yych <= 'D') { if (yych == 'A') - goto yy364; - goto yy333; + goto yy302; + goto yy272; } else { if (yych <= 'E') - goto yy365; + goto yy303; if (yych <= 'N') - goto yy333; - goto yy366; + goto yy272; + goto yy304; } } else { if (yych <= 'd') { if (yych == 'a') - goto yy364; - goto yy333; + goto yy302; + goto yy272; } else { if (yych <= 'e') - goto yy365; + goto yy303; if (yych == 'o') - goto yy366; - goto yy333; + goto yy304; + goto yy272; } } - yy340: + yy278: yych = *++p; switch (yych) { case 'D': @@ -6904,1469 +6438,1541 @@ bufsize_t _scan_html_block_start(const unsigned char *p) { case 'd': case 'l': case 't': - goto yy367; + goto yy305; case 'E': case 'e': - goto yy368; + goto yy306; case 'I': case 'i': - goto yy369; + goto yy307; default: - goto yy333; + goto yy272; } - yy341: + yy279: yych = *++p; if (yych <= 'R') { if (yych <= 'N') { if (yych == 'I') - goto yy370; - goto yy333; + goto yy308; + goto yy272; } else { if (yych <= 'O') - goto yy371; + goto yy309; if (yych <= 'Q') - goto yy333; - goto yy372; + goto yy272; + goto yy310; } } else { if (yych <= 'n') { if (yych == 'i') - goto yy370; - goto yy333; + goto yy308; + goto yy272; } else { if (yych <= 'o') - goto yy371; + goto yy309; if (yych == 'r') - goto yy372; - goto yy333; + goto yy310; + goto yy272; } } - yy342: + yy280: yych = *++p; if (yych <= 'S') { if (yych <= 'D') { if (yych <= '0') - goto yy333; + goto yy272; if (yych <= '6') - goto yy367; - goto yy333; + goto yy305; + goto yy272; } else { if (yych <= 'E') - goto yy373; + goto yy311; if (yych == 'R') - goto yy367; - goto yy333; + goto yy305; + goto yy272; } } else { if (yych <= 'q') { if (yych <= 'T') - goto yy374; + goto yy312; if (yych == 'e') - goto yy373; - goto yy333; + goto yy311; + goto yy272; } else { if (yych <= 'r') - goto yy367; + goto yy305; if (yych == 't') - goto yy374; - goto yy333; + goto yy312; + goto yy272; } } - yy343: + yy281: yych = *++p; if (yych == 'F') - goto yy375; + goto yy313; if (yych == 'f') - goto yy375; - goto yy333; - yy344: + goto yy313; + goto yy272; + yy282: yych = *++p; if (yych <= 'I') { if (yych == 'E') - goto yy376; + goto yy314; if (yych <= 'H') - goto yy333; - goto yy377; + goto yy272; + goto yy315; } else { if (yych <= 'e') { if (yych <= 'd') - goto yy333; - goto yy376; + goto yy272; + goto yy314; } else { if (yych == 'i') - goto yy377; - goto yy333; + goto yy315; + goto yy272; } } - yy345: + yy283: yych = *++p; if (yych <= 'E') { if (yych == 'A') - goto yy378; + goto yy316; if (yych <= 'D') - goto yy333; - goto yy379; + goto yy272; + goto yy317; } else { if (yych <= 'a') { if (yych <= '`') - goto yy333; - goto yy378; + goto yy272; + goto yy316; } else { if (yych == 'e') - goto yy379; - goto yy333; + goto yy317; + goto yy272; } } - yy346: + yy284: yych = *++p; if (yych <= 'O') { if (yych == 'A') - goto yy380; + goto yy318; if (yych <= 'N') - goto yy333; - goto yy381; + goto yy272; + goto yy319; } else { if (yych <= 'a') { if (yych <= '`') - goto yy333; - goto yy380; + goto yy272; + goto yy318; } else { if (yych == 'o') - goto yy381; - goto yy333; + goto yy319; + goto yy272; } } - yy347: + yy285: yych = *++p; if (yych <= 'P') { if (yych == 'L') - goto yy367; + goto yy305; if (yych <= 'O') - goto yy333; - goto yy382; + goto yy272; + goto yy320; } else { if (yych <= 'l') { if (yych <= 'k') - goto yy333; - goto yy367; + goto yy272; + goto yy305; } else { if (yych == 'p') - goto yy382; - goto yy333; + goto yy320; + goto yy272; } } - yy348: + yy286: yych = *++p; if (yych <= '>') { if (yych <= ' ') { if (yych <= 0x08) - goto yy333; + goto yy272; if (yych <= '\r') - goto yy383; + goto yy321; if (yych <= 0x1F) - goto yy333; - goto yy383; + goto yy272; + goto yy321; } else { if (yych == '/') - goto yy385; + goto yy322; if (yych <= '=') - goto yy333; - goto yy383; + goto yy272; + goto yy321; } } else { if (yych <= 'R') { if (yych == 'A') - goto yy386; + goto yy323; if (yych <= 'Q') - goto yy333; - goto yy387; + goto yy272; + goto yy324; } else { if (yych <= 'a') { if (yych <= '`') - goto yy333; - goto yy386; + goto yy272; + goto yy323; } else { if (yych == 'r') - goto yy387; - goto yy333; + goto yy324; + goto yy272; } } } - yy349: + yy287: yych = *++p; switch (yych) { case 'C': case 'c': - goto yy388; + goto yy325; case 'E': case 'e': - goto yy389; + goto yy326; case 'O': case 'o': - goto yy390; + goto yy327; case 'T': case 't': - goto yy391; + goto yy328; case 'U': case 'u': - goto yy392; + goto yy329; default: - goto yy333; + goto yy272; } - yy350: + yy288: yych = *++p; switch (yych) { case 'A': case 'a': - goto yy393; + goto yy330; case 'B': case 'b': - goto yy394; + goto yy331; case 'D': case 'd': - goto yy367; + goto yy305; + case 'E': + case 'e': + goto yy332; case 'F': case 'f': - goto yy395; + goto yy333; case 'H': case 'h': - goto yy396; + goto yy334; case 'I': case 'i': - goto yy397; + goto yy335; case 'R': case 'r': - goto yy398; + goto yy336; default: - goto yy333; + goto yy272; } - yy351: + yy289: yych = *++p; if (yych == 'L') - goto yy367; + goto yy305; if (yych == 'l') - goto yy367; - goto yy333; - yy352: + goto yy305; + goto yy272; + yy290: yych = *++p; if (yych == '-') - goto yy399; - goto yy333; - yy353: + goto yy337; + goto yy272; + yy291: ++p; { return 4; } - yy355: + yy292: yych = *++p; if (yych == 'C') - goto yy401; + goto yy338; if (yych == 'c') - goto yy401; - goto yy333; - yy356: + goto yy338; + goto yy272; + yy293: yych = *++p; if (yych <= '/') { if (yych <= 0x1F) { if (yych <= 0x08) - goto yy333; + goto yy272; if (yych <= '\r') - goto yy383; - goto yy333; + goto yy321; + goto yy272; } else { if (yych <= ' ') - goto yy383; + goto yy321; if (yych <= '.') - goto yy333; - goto yy385; + goto yy272; + goto yy322; } } else { if (yych <= '@') { if (yych == '>') - goto yy383; - goto yy333; + goto yy321; + goto yy272; } else { if (yych <= 'A') - goto yy386; + goto yy323; if (yych == 'a') - goto yy386; - goto yy333; + goto yy323; + goto yy272; } } - yy357: + yy294: yych = *++p; if (yych <= 'U') { if (yych <= 'N') { if (yych == 'E') - goto yy389; - goto yy333; + goto yy326; + goto yy272; } else { if (yych <= 'O') - goto yy390; + goto yy327; if (yych <= 'T') - goto yy333; - goto yy392; + goto yy272; + goto yy329; } } else { if (yych <= 'n') { if (yych == 'e') - goto yy389; - goto yy333; + goto yy326; + goto yy272; } else { if (yych <= 'o') - goto yy390; + goto yy327; if (yych == 'u') - goto yy392; - goto yy333; + goto yy329; + goto yy272; } } - yy358: + yy295: + yych = *++p; + switch (yych) { + case 'A': + case 'a': + goto yy330; + case 'B': + case 'b': + goto yy331; + case 'D': + case 'd': + goto yy305; + case 'F': + case 'f': + goto yy333; + case 'H': + case 'h': + goto yy334; + case 'I': + case 'i': + goto yy335; + case 'R': + case 'r': + goto yy336; + default: + goto yy272; + } + yy296: yych = *++p; if (yych == 'D') - goto yy402; + goto yy339; if (yych == 'd') - goto yy402; - goto yy333; - yy359: + goto yy339; + goto yy272; + yy297: yych = *++p; if (yych == 'T') - goto yy403; + goto yy340; if (yych == 't') - goto yy403; - goto yy333; - yy360: + goto yy340; + goto yy272; + yy298: yych = *++p; if (yych == 'I') - goto yy404; + goto yy341; if (yych == 'i') - goto yy404; - goto yy333; - yy361: + goto yy341; + goto yy272; + yy299: yych = *++p; if (yych == 'S') - goto yy405; + goto yy342; if (yych == 's') - goto yy405; - goto yy333; - yy362: + goto yy342; + goto yy272; + yy300: yych = *++p; if (yych == 'O') - goto yy406; + goto yy343; if (yych == 'o') - goto yy406; - goto yy333; - yy363: + goto yy343; + goto yy272; + yy301: yych = *++p; if (yych == 'D') - goto yy407; + goto yy344; if (yych == 'd') - goto yy407; - goto yy333; - yy364: + goto yy344; + goto yy272; + yy302: yych = *++p; if (yych == 'P') - goto yy408; + goto yy345; if (yych == 'p') - goto yy408; - goto yy333; - yy365: + goto yy345; + goto yy272; + yy303: yych = *++p; if (yych == 'N') - goto yy409; + goto yy346; if (yych == 'n') - goto yy409; - goto yy333; - yy366: + goto yy346; + goto yy272; + yy304: yych = *++p; if (yych == 'L') - goto yy410; + goto yy347; if (yych == 'l') - goto yy410; - goto yy333; - yy367: + goto yy347; + goto yy272; + yy305: yych = *++p; if (yych <= ' ') { if (yych <= 0x08) - goto yy333; + goto yy272; if (yych <= '\r') - goto yy383; + goto yy321; if (yych <= 0x1F) - goto yy333; - goto yy383; + goto yy272; + goto yy321; } else { if (yych <= '/') { if (yych <= '.') - goto yy333; - goto yy385; + goto yy272; + goto yy322; } else { if (yych == '>') - goto yy383; - goto yy333; + goto yy321; + goto yy272; } } - yy368: + yy306: yych = *++p; if (yych == 'T') - goto yy411; + goto yy348; if (yych == 't') - goto yy411; - goto yy333; - yy369: + goto yy348; + goto yy272; + yy307: yych = *++p; if (yych <= 'V') { if (yych <= 'Q') { if (yych == 'A') - goto yy412; - goto yy333; + goto yy349; + goto yy272; } else { if (yych <= 'R') - goto yy367; + goto yy305; if (yych <= 'U') - goto yy333; - goto yy367; + goto yy272; + goto yy305; } } else { if (yych <= 'q') { if (yych == 'a') - goto yy412; - goto yy333; + goto yy349; + goto yy272; } else { if (yych <= 'r') - goto yy367; + goto yy305; if (yych == 'v') - goto yy367; - goto yy333; + goto yy305; + goto yy272; } } - yy370: + yy308: yych = *++p; if (yych <= 'G') { if (yych == 'E') - goto yy413; + goto yy350; if (yych <= 'F') - goto yy333; - goto yy414; + goto yy272; + goto yy351; } else { if (yych <= 'e') { if (yych <= 'd') - goto yy333; - goto yy413; + goto yy272; + goto yy350; } else { if (yych == 'g') - goto yy414; - goto yy333; + goto yy351; + goto yy272; } } - yy371: + yy309: yych = *++p; if (yych <= 'R') { if (yych == 'O') - goto yy409; + goto yy346; if (yych <= 'Q') - goto yy333; - goto yy415; + goto yy272; + goto yy352; } else { if (yych <= 'o') { if (yych <= 'n') - goto yy333; - goto yy409; + goto yy272; + goto yy346; } else { if (yych == 'r') - goto yy415; - goto yy333; + goto yy352; + goto yy272; } } - yy372: + yy310: yych = *++p; if (yych == 'A') - goto yy416; + goto yy353; if (yych == 'a') - goto yy416; - goto yy333; - yy373: + goto yy353; + goto yy272; + yy311: yych = *++p; if (yych == 'A') - goto yy417; + goto yy354; if (yych == 'a') - goto yy417; - goto yy333; - yy374: + goto yy354; + goto yy272; + yy312: yych = *++p; if (yych == 'M') - goto yy351; + goto yy289; if (yych == 'm') - goto yy351; - goto yy333; - yy375: + goto yy289; + goto yy272; + yy313: yych = *++p; if (yych == 'R') - goto yy418; + goto yy355; if (yych == 'r') - goto yy418; - goto yy333; - yy376: + goto yy355; + goto yy272; + yy314: yych = *++p; if (yych == 'G') - goto yy419; + goto yy356; if (yych == 'g') - goto yy419; - goto yy333; - yy377: + goto yy356; + goto yy272; + yy315: yych = *++p; if (yych <= '/') { if (yych <= 0x1F) { if (yych <= 0x08) - goto yy333; + goto yy272; if (yych <= '\r') - goto yy383; - goto yy333; + goto yy321; + goto yy272; } else { if (yych <= ' ') - goto yy383; + goto yy321; if (yych <= '.') - goto yy333; - goto yy385; + goto yy272; + goto yy322; } } else { if (yych <= 'M') { if (yych == '>') - goto yy383; - goto yy333; + goto yy321; + goto yy272; } else { if (yych <= 'N') - goto yy420; + goto yy357; if (yych == 'n') - goto yy420; - goto yy333; + goto yy357; + goto yy272; } } - yy378: + yy316: yych = *++p; if (yych == 'I') - goto yy421; + goto yy358; if (yych == 'i') - goto yy421; - goto yy333; - yy379: + goto yy358; + goto yy272; + yy317: yych = *++p; if (yych == 'N') - goto yy422; + goto yy359; if (yych == 'n') - goto yy422; - goto yy333; - yy380: + goto yy359; + goto yy272; + yy318: yych = *++p; if (yych == 'V') - goto yy367; + goto yy305; if (yych == 'v') - goto yy367; - goto yy333; - yy381: + goto yy305; + goto yy272; + yy319: yych = *++p; if (yych == 'F') - goto yy423; + goto yy360; if (yych == 'f') - goto yy423; - goto yy333; - yy382: + goto yy360; + goto yy272; + yy320: yych = *++p; if (yych == 'T') - goto yy424; + goto yy361; if (yych == 't') - goto yy424; - goto yy333; - yy383: + goto yy361; + goto yy272; + yy321: ++p; { return 6; } - yy385: + yy322: yych = *++p; if (yych == '>') - goto yy383; - goto yy333; - yy386: + goto yy321; + goto yy272; + yy323: yych = *++p; if (yych == 'R') - goto yy425; + goto yy362; if (yych == 'r') - goto yy425; - goto yy333; - yy387: + goto yy362; + goto yy272; + yy324: yych = *++p; if (yych == 'E') - goto yy426; + goto yy363; if (yych == 'e') - goto yy426; - goto yy333; - yy388: + goto yy363; + goto yy272; + yy325: yych = *++p; if (yych == 'R') - goto yy427; + goto yy364; if (yych == 'r') - goto yy427; - goto yy333; - yy389: + goto yy364; + goto yy272; + yy326: yych = *++p; if (yych == 'C') - goto yy408; + goto yy345; if (yych == 'c') - goto yy408; - goto yy333; - yy390: + goto yy345; + goto yy272; + yy327: yych = *++p; if (yych == 'U') - goto yy428; + goto yy365; if (yych == 'u') - goto yy428; - goto yy333; - yy391: + goto yy365; + goto yy272; + yy328: yych = *++p; if (yych == 'Y') - goto yy429; + goto yy366; if (yych == 'y') - goto yy429; - goto yy333; - yy392: + goto yy366; + goto yy272; + yy329: yych = *++p; if (yych == 'M') - goto yy430; + goto yy367; if (yych == 'm') - goto yy430; - goto yy333; - yy393: + goto yy367; + goto yy272; + yy330: yych = *++p; if (yych == 'B') - goto yy431; + goto yy368; if (yych == 'b') - goto yy431; - goto yy333; - yy394: + goto yy368; + goto yy272; + yy331: yych = *++p; if (yych == 'O') - goto yy363; + goto yy301; if (yych == 'o') - goto yy363; - goto yy333; - yy395: + goto yy301; + goto yy272; + yy332: + yych = *++p; + if (yych == 'X') + goto yy369; + if (yych == 'x') + goto yy369; + goto yy272; + yy333: yych = *++p; if (yych == 'O') - goto yy432; + goto yy370; if (yych == 'o') - goto yy432; - goto yy333; - yy396: + goto yy370; + goto yy272; + yy334: yych = *++p; if (yych <= '/') { if (yych <= 0x1F) { if (yych <= 0x08) - goto yy333; + goto yy272; if (yych <= '\r') - goto yy383; - goto yy333; + goto yy321; + goto yy272; } else { if (yych <= ' ') - goto yy383; + goto yy321; if (yych <= '.') - goto yy333; - goto yy385; + goto yy272; + goto yy322; } } else { if (yych <= 'D') { if (yych == '>') - goto yy383; - goto yy333; + goto yy321; + goto yy272; } else { if (yych <= 'E') - goto yy433; + goto yy371; if (yych == 'e') - goto yy433; - goto yy333; + goto yy371; + goto yy272; } } - yy397: + yy335: yych = *++p; if (yych == 'T') - goto yy431; + goto yy368; if (yych == 't') - goto yy431; - goto yy333; - yy398: + goto yy368; + goto yy272; + yy336: yych = *++p; if (yych <= '/') { if (yych <= 0x1F) { if (yych <= 0x08) - goto yy333; + goto yy272; if (yych <= '\r') - goto yy383; - goto yy333; + goto yy321; + goto yy272; } else { if (yych <= ' ') - goto yy383; + goto yy321; if (yych <= '.') - goto yy333; - goto yy385; + goto yy272; + goto yy322; } } else { if (yych <= '@') { if (yych == '>') - goto yy383; - goto yy333; + goto yy321; + goto yy272; } else { if (yych <= 'A') - goto yy434; + goto yy372; if (yych == 'a') - goto yy434; - goto yy333; + goto yy372; + goto yy272; } } - yy399: + yy337: ++p; { return 2; } - yy401: + yy338: yych = *++p; if (yych == 'D') - goto yy435; + goto yy373; if (yych == 'd') - goto yy435; - goto yy333; - yy402: + goto yy373; + goto yy272; + yy339: yych = *++p; if (yych == 'R') - goto yy436; + goto yy374; if (yych == 'r') - goto yy436; - goto yy333; - yy403: + goto yy374; + goto yy272; + yy340: yych = *++p; if (yych == 'I') - goto yy437; + goto yy375; if (yych == 'i') - goto yy437; - goto yy333; - yy404: + goto yy375; + goto yy272; + yy341: yych = *++p; if (yych == 'D') - goto yy438; + goto yy376; if (yych == 'd') - goto yy438; - goto yy333; - yy405: + goto yy376; + goto yy272; + yy342: yych = *++p; if (yych == 'E') - goto yy439; + goto yy377; if (yych == 'e') - goto yy439; - goto yy333; - yy406: + goto yy377; + goto yy272; + yy343: yych = *++p; if (yych == 'C') - goto yy440; + goto yy378; if (yych == 'c') - goto yy440; - goto yy333; - yy407: + goto yy378; + goto yy272; + yy344: yych = *++p; if (yych == 'Y') - goto yy367; + goto yy305; if (yych == 'y') - goto yy367; - goto yy333; - yy408: + goto yy305; + goto yy272; + yy345: yych = *++p; if (yych == 'T') - goto yy441; + goto yy379; if (yych == 't') - goto yy441; - goto yy333; - yy409: + goto yy379; + goto yy272; + yy346: yych = *++p; if (yych == 'T') - goto yy442; + goto yy380; if (yych == 't') - goto yy442; - goto yy333; - yy410: + goto yy380; + goto yy272; + yy347: yych = *++p; if (yych <= '/') { if (yych <= 0x1F) { if (yych <= 0x08) - goto yy333; + goto yy272; if (yych <= '\r') - goto yy383; - goto yy333; + goto yy321; + goto yy272; } else { if (yych <= ' ') - goto yy383; + goto yy321; if (yych <= '.') - goto yy333; - goto yy385; + goto yy272; + goto yy322; } } else { if (yych <= 'F') { if (yych == '>') - goto yy383; - goto yy333; + goto yy321; + goto yy272; } else { if (yych <= 'G') - goto yy443; + goto yy381; if (yych == 'g') - goto yy443; - goto yy333; + goto yy381; + goto yy272; } } - yy411: + yy348: yych = *++p; if (yych == 'A') - goto yy444; + goto yy382; if (yych == 'a') - goto yy444; - goto yy333; - yy412: + goto yy382; + goto yy272; + yy349: yych = *++p; if (yych == 'L') - goto yy445; + goto yy383; if (yych == 'l') - goto yy445; - goto yy333; - yy413: + goto yy383; + goto yy272; + yy350: yych = *++p; if (yych == 'L') - goto yy446; + goto yy384; if (yych == 'l') - goto yy446; - goto yy333; - yy414: + goto yy384; + goto yy272; + yy351: yych = *++p; if (yych <= 'U') { if (yych == 'C') - goto yy447; + goto yy385; if (yych <= 'T') - goto yy333; - goto yy448; + goto yy272; + goto yy386; } else { if (yych <= 'c') { if (yych <= 'b') - goto yy333; - goto yy447; + goto yy272; + goto yy385; } else { if (yych == 'u') - goto yy448; - goto yy333; + goto yy386; + goto yy272; } } - yy415: + yy352: yych = *++p; if (yych == 'M') - goto yy367; + goto yy305; if (yych == 'm') - goto yy367; - goto yy333; - yy416: + goto yy305; + goto yy272; + yy353: yych = *++p; if (yych == 'M') - goto yy449; + goto yy387; if (yych == 'm') - goto yy449; - goto yy333; - yy417: + goto yy387; + goto yy272; + yy354: yych = *++p; if (yych == 'D') - goto yy450; + goto yy388; if (yych == 'd') - goto yy450; - goto yy333; - yy418: + goto yy388; + goto yy272; + yy355: yych = *++p; if (yych == 'A') - goto yy451; + goto yy389; if (yych == 'a') - goto yy451; - goto yy333; - yy419: + goto yy389; + goto yy272; + yy356: yych = *++p; if (yych == 'E') - goto yy452; + goto yy390; if (yych == 'e') - goto yy452; - goto yy333; - yy420: + goto yy390; + goto yy272; + yy357: yych = *++p; if (yych == 'K') - goto yy367; + goto yy305; if (yych == 'k') - goto yy367; - goto yy333; - yy421: + goto yy305; + goto yy272; + yy358: yych = *++p; if (yych == 'N') - goto yy367; + goto yy305; if (yych == 'n') - goto yy367; - goto yy333; - yy422: + goto yy305; + goto yy272; + yy359: yych = *++p; if (yych == 'U') - goto yy453; + goto yy391; if (yych == 'u') - goto yy453; - goto yy333; - yy423: + goto yy391; + goto yy272; + yy360: yych = *++p; if (yych == 'R') - goto yy454; + goto yy392; if (yych == 'r') - goto yy454; - goto yy333; - yy424: + goto yy392; + goto yy272; + yy361: yych = *++p; if (yych <= 'I') { if (yych == 'G') - goto yy443; + goto yy381; if (yych <= 'H') - goto yy333; - goto yy455; + goto yy272; + goto yy393; } else { if (yych <= 'g') { if (yych <= 'f') - goto yy333; - goto yy443; + goto yy272; + goto yy381; } else { if (yych == 'i') - goto yy455; - goto yy333; + goto yy393; + goto yy272; } } - yy425: + yy362: yych = *++p; if (yych == 'A') - goto yy415; + goto yy352; if (yych == 'a') - goto yy415; - goto yy333; - yy426: + goto yy352; + goto yy272; + yy363: yych = *++p; if (yych <= 0x1F) { if (yych <= 0x08) - goto yy333; + goto yy272; if (yych <= '\r') - goto yy456; - goto yy333; + goto yy394; + goto yy272; } else { if (yych <= ' ') - goto yy456; + goto yy394; if (yych == '>') - goto yy456; - goto yy333; + goto yy394; + goto yy272; } - yy427: + yy364: yych = *++p; if (yych == 'I') - goto yy458; + goto yy395; if (yych == 'i') - goto yy458; - goto yy333; - yy428: + goto yy395; + goto yy272; + yy365: yych = *++p; if (yych == 'R') - goto yy459; + goto yy396; if (yych == 'r') - goto yy459; - goto yy333; - yy429: + goto yy396; + goto yy272; + yy366: yych = *++p; if (yych == 'L') - goto yy387; + goto yy324; if (yych == 'l') - goto yy387; - goto yy333; - yy430: + goto yy324; + goto yy272; + yy367: yych = *++p; if (yych == 'M') - goto yy460; + goto yy397; if (yych == 'm') - goto yy460; - goto yy333; - yy431: + goto yy397; + goto yy272; + yy368: yych = *++p; if (yych == 'L') - goto yy438; + goto yy376; if (yych == 'l') - goto yy438; - goto yy333; - yy432: + goto yy376; + goto yy272; + yy369: + yych = *++p; + if (yych == 'T') + goto yy398; + if (yych == 't') + goto yy398; + goto yy272; + yy370: yych = *++p; if (yych == 'O') - goto yy461; + goto yy399; if (yych == 'o') - goto yy461; - goto yy333; - yy433: + goto yy399; + goto yy272; + yy371: yych = *++p; if (yych == 'A') - goto yy462; + goto yy400; if (yych == 'a') - goto yy462; - goto yy333; - yy434: + goto yy400; + goto yy272; + yy372: yych = *++p; if (yych == 'C') - goto yy420; + goto yy357; if (yych == 'c') - goto yy420; - goto yy333; - yy435: + goto yy357; + goto yy272; + yy373: yych = *++p; if (yych == 'A') - goto yy463; + goto yy401; if (yych == 'a') - goto yy463; - goto yy333; - yy436: + goto yy401; + goto yy272; + yy374: yych = *++p; if (yych == 'E') - goto yy464; + goto yy402; if (yych == 'e') - goto yy464; - goto yy333; - yy437: + goto yy402; + goto yy272; + yy375: yych = *++p; if (yych == 'C') - goto yy431; + goto yy368; if (yych == 'c') - goto yy431; - goto yy333; - yy438: + goto yy368; + goto yy272; + yy376: yych = *++p; if (yych == 'E') - goto yy367; + goto yy305; if (yych == 'e') - goto yy367; - goto yy333; - yy439: + goto yy305; + goto yy272; + yy377: yych = *++p; if (yych <= '/') { if (yych <= 0x1F) { if (yych <= 0x08) - goto yy333; + goto yy272; if (yych <= '\r') - goto yy383; - goto yy333; + goto yy321; + goto yy272; } else { if (yych <= ' ') - goto yy383; + goto yy321; if (yych <= '.') - goto yy333; - goto yy385; + goto yy272; + goto yy322; } } else { if (yych <= 'E') { if (yych == '>') - goto yy383; - goto yy333; + goto yy321; + goto yy272; } else { if (yych <= 'F') - goto yy465; + goto yy403; if (yych == 'f') - goto yy465; - goto yy333; + goto yy403; + goto yy272; } } - yy440: + yy378: yych = *++p; if (yych == 'K') - goto yy466; + goto yy404; if (yych == 'k') - goto yy466; - goto yy333; - yy441: + goto yy404; + goto yy272; + yy379: yych = *++p; if (yych == 'I') - goto yy455; + goto yy393; if (yych == 'i') - goto yy455; - goto yy333; - yy442: + goto yy393; + goto yy272; + yy380: yych = *++p; if (yych == 'E') - goto yy467; + goto yy405; if (yych == 'e') - goto yy467; - goto yy333; - yy443: + goto yy405; + goto yy272; + yy381: yych = *++p; if (yych == 'R') - goto yy468; + goto yy406; if (yych == 'r') - goto yy468; - goto yy333; - yy444: + goto yy406; + goto yy272; + yy382: yych = *++p; if (yych == 'I') - goto yy469; + goto yy407; if (yych == 'i') - goto yy469; - goto yy333; - yy445: + goto yy407; + goto yy272; + yy383: yych = *++p; if (yych == 'O') - goto yy470; + goto yy408; if (yych == 'o') - goto yy470; - goto yy333; - yy446: + goto yy408; + goto yy272; + yy384: yych = *++p; if (yych == 'D') - goto yy471; + goto yy409; if (yych == 'd') - goto yy471; - goto yy333; - yy447: + goto yy409; + goto yy272; + yy385: yych = *++p; if (yych == 'A') - goto yy364; + goto yy302; if (yych == 'a') - goto yy364; - goto yy333; - yy448: + goto yy302; + goto yy272; + yy386: yych = *++p; if (yych == 'R') - goto yy438; + goto yy376; if (yych == 'r') - goto yy438; - goto yy333; - yy449: + goto yy376; + goto yy272; + yy387: yych = *++p; if (yych == 'E') - goto yy472; + goto yy410; if (yych == 'e') - goto yy472; - goto yy333; - yy450: + goto yy410; + goto yy272; + yy388: yych = *++p; if (yych <= '/') { if (yych <= 0x1F) { if (yych <= 0x08) - goto yy333; + goto yy272; if (yych <= '\r') - goto yy383; - goto yy333; + goto yy321; + goto yy272; } else { if (yych <= ' ') - goto yy383; + goto yy321; if (yych <= '.') - goto yy333; - goto yy385; + goto yy272; + goto yy322; } } else { if (yych <= 'D') { if (yych == '>') - goto yy383; - goto yy333; + goto yy321; + goto yy272; } else { if (yych <= 'E') - goto yy467; + goto yy405; if (yych == 'e') - goto yy467; - goto yy333; + goto yy405; + goto yy272; } } - yy451: + yy389: yych = *++p; if (yych == 'M') - goto yy438; + goto yy376; if (yych == 'm') - goto yy438; - goto yy333; - yy452: + goto yy376; + goto yy272; + yy390: yych = *++p; if (yych == 'N') - goto yy462; + goto yy400; if (yych == 'n') - goto yy462; - goto yy333; - yy453: + goto yy400; + goto yy272; + yy391: yych = *++p; if (yych <= '/') { if (yych <= 0x1F) { if (yych <= 0x08) - goto yy333; + goto yy272; if (yych <= '\r') - goto yy383; - goto yy333; + goto yy321; + goto yy272; } else { if (yych <= ' ') - goto yy383; + goto yy321; if (yych <= '.') - goto yy333; - goto yy385; + goto yy272; + goto yy322; } } else { if (yych <= 'H') { if (yych == '>') - goto yy383; - goto yy333; + goto yy321; + goto yy272; } else { if (yych <= 'I') - goto yy473; + goto yy411; if (yych == 'i') - goto yy473; - goto yy333; + goto yy411; + goto yy272; } } - yy454: + yy392: yych = *++p; if (yych == 'A') - goto yy474; + goto yy412; if (yych == 'a') - goto yy474; - goto yy333; - yy455: + goto yy412; + goto yy272; + yy393: yych = *++p; if (yych == 'O') - goto yy421; + goto yy358; if (yych == 'o') - goto yy421; - goto yy333; - yy456: + goto yy358; + goto yy272; + yy394: ++p; { return 1; } - yy458: + yy395: yych = *++p; if (yych == 'P') - goto yy475; + goto yy413; if (yych == 'p') - goto yy475; - goto yy333; - yy459: + goto yy413; + goto yy272; + yy396: yych = *++p; if (yych == 'C') - goto yy438; + goto yy376; if (yych == 'c') - goto yy438; - goto yy333; - yy460: + goto yy376; + goto yy272; + yy397: yych = *++p; if (yych == 'A') - goto yy476; + goto yy414; if (yych == 'a') - goto yy476; - goto yy333; - yy461: + goto yy414; + goto yy272; + yy398: + yych = *++p; + if (yych == 'A') + goto yy415; + if (yych == 'a') + goto yy415; + goto yy272; + yy399: yych = *++p; if (yych == 'T') - goto yy367; + goto yy305; if (yych == 't') - goto yy367; - goto yy333; - yy462: + goto yy305; + goto yy272; + yy400: yych = *++p; if (yych == 'D') - goto yy367; + goto yy305; if (yych == 'd') - goto yy367; - goto yy333; - yy463: + goto yy305; + goto yy272; + yy401: yych = *++p; if (yych == 'T') - goto yy477; + goto yy416; if (yych == 't') - goto yy477; - goto yy333; - yy464: + goto yy416; + goto yy272; + yy402: yych = *++p; if (yych == 'S') - goto yy478; + goto yy417; if (yych == 's') - goto yy478; - goto yy333; - yy465: + goto yy417; + goto yy272; + yy403: yych = *++p; if (yych == 'O') - goto yy479; + goto yy418; if (yych == 'o') - goto yy479; - goto yy333; - yy466: + goto yy418; + goto yy272; + yy404: yych = *++p; if (yych == 'Q') - goto yy480; + goto yy419; if (yych == 'q') - goto yy480; - goto yy333; - yy467: + goto yy419; + goto yy272; + yy405: yych = *++p; if (yych == 'R') - goto yy367; + goto yy305; if (yych == 'r') - goto yy367; - goto yy333; - yy468: + goto yy305; + goto yy272; + yy406: yych = *++p; if (yych == 'O') - goto yy481; + goto yy420; if (yych == 'o') - goto yy481; - goto yy333; - yy469: + goto yy420; + goto yy272; + yy407: yych = *++p; if (yych == 'L') - goto yy478; + goto yy417; if (yych == 'l') - goto yy478; - goto yy333; - yy470: + goto yy417; + goto yy272; + yy408: yych = *++p; if (yych == 'G') - goto yy367; + goto yy305; if (yych == 'g') - goto yy367; - goto yy333; - yy471: + goto yy305; + goto yy272; + yy409: yych = *++p; if (yych == 'S') - goto yy482; + goto yy421; if (yych == 's') - goto yy482; - goto yy333; - yy472: + goto yy421; + goto yy272; + yy410: yych = *++p; if (yych <= '/') { if (yych <= 0x1F) { if (yych <= 0x08) - goto yy333; + goto yy272; if (yych <= '\r') - goto yy383; - goto yy333; + goto yy321; + goto yy272; } else { if (yych <= ' ') - goto yy383; + goto yy321; if (yych <= '.') - goto yy333; - goto yy385; + goto yy272; + goto yy322; } } else { if (yych <= 'R') { if (yych == '>') - goto yy383; - goto yy333; + goto yy321; + goto yy272; } else { if (yych <= 'S') - goto yy482; + goto yy421; if (yych == 's') - goto yy482; - goto yy333; + goto yy421; + goto yy272; } } - yy473: + yy411: yych = *++p; if (yych == 'T') - goto yy483; + goto yy422; if (yych == 't') - goto yy483; - goto yy333; - yy474: + goto yy422; + goto yy272; + yy412: yych = *++p; if (yych == 'M') - goto yy484; + goto yy423; if (yych == 'm') - goto yy484; - goto yy333; - yy475: + goto yy423; + goto yy272; + yy413: yych = *++p; if (yych == 'T') - goto yy426; + goto yy363; if (yych == 't') - goto yy426; - goto yy333; - yy476: + goto yy363; + goto yy272; + yy414: yych = *++p; if (yych == 'R') - goto yy407; + goto yy344; if (yych == 'r') - goto yy407; - goto yy333; - yy477: + goto yy344; + goto yy272; + yy415: + yych = *++p; + if (yych == 'R') + goto yy424; + if (yych == 'r') + goto yy424; + goto yy272; + yy416: yych = *++p; if (yych == 'A') - goto yy485; + goto yy425; if (yych == 'a') - goto yy485; - goto yy333; - yy478: + goto yy425; + goto yy272; + yy417: yych = *++p; if (yych == 'S') - goto yy367; - if (yych == 's') - goto yy367; - goto yy333; - yy479: + goto yy305; + if (yych == 's') + goto yy305; + goto yy272; + yy418: yych = *++p; if (yych == 'N') - goto yy461; + goto yy399; if (yych == 'n') - goto yy461; - goto yy333; - yy480: + goto yy399; + goto yy272; + yy419: yych = *++p; if (yych == 'U') - goto yy486; + goto yy426; if (yych == 'u') - goto yy486; - goto yy333; - yy481: + goto yy426; + goto yy272; + yy420: yych = *++p; if (yych == 'U') - goto yy487; + goto yy427; if (yych == 'u') - goto yy487; - goto yy333; - yy482: + goto yy427; + goto yy272; + yy421: yych = *++p; if (yych == 'E') - goto yy461; + goto yy399; if (yych == 'e') - goto yy461; - goto yy333; - yy483: + goto yy399; + goto yy272; + yy422: yych = *++p; if (yych == 'E') - goto yy415; + goto yy352; if (yych == 'e') - goto yy415; - goto yy333; - yy484: + goto yy352; + goto yy272; + yy423: yych = *++p; if (yych == 'E') - goto yy478; + goto yy417; if (yych == 'e') - goto yy478; - goto yy333; - yy485: + goto yy417; + goto yy272; + yy424: + yych = *++p; + if (yych == 'E') + goto yy428; + if (yych == 'e') + goto yy428; + goto yy272; + yy425: yych = *++p; if (yych == '[') - goto yy488; - goto yy333; - yy486: + goto yy429; + goto yy272; + yy426: yych = *++p; if (yych == 'O') - goto yy490; + goto yy430; if (yych == 'o') - goto yy490; - goto yy333; - yy487: + goto yy430; + goto yy272; + yy427: yych = *++p; if (yych == 'P') - goto yy367; + goto yy305; if (yych == 'p') - goto yy367; - goto yy333; - yy488: + goto yy305; + goto yy272; + yy428: + yych = *++p; + if (yych == 'A') + goto yy363; + if (yych == 'a') + goto yy363; + goto yy272; + yy429: ++p; { return 5; } - yy490: - ++p; - if ((yych = *p) == 'T') - goto yy438; + yy430: + yych = *++p; + if (yych == 'T') + goto yy376; if (yych == 't') - goto yy438; - goto yy333; + goto yy376; + goto yy272; } } @@ -8401,591 +8007,557 @@ bufsize_t _scan_html_block_start_7(const unsigned char *p) { }; yych = *p; if (yych == '<') - goto yy495; + goto yy433; ++p; - yy494 : { return 0; } - yy495: + yy432 : { return 0; } + yy433: yyaccept = 0; yych = *(marker = ++p); if (yych <= '@') { if (yych != '/') - goto yy494; + goto yy432; } else { if (yych <= 'Z') - goto yy498; + goto yy435; if (yych <= '`') - goto yy494; + goto yy432; if (yych <= 'z') - goto yy498; - goto yy494; + goto yy435; + goto yy432; } yych = *++p; if (yych <= '@') - goto yy497; + goto yy434; if (yych <= 'Z') - goto yy500; + goto yy436; if (yych <= '`') - goto yy497; + goto yy434; if (yych <= 'z') - goto yy500; - yy497: + goto yy436; + yy434: p = marker; if (yyaccept == 0) { - goto yy494; + goto yy432; } else { - goto yy513; + goto yy443; } - yy498: - ++p; - yych = *p; + yy435: + yych = *++p; if (yybm[0 + yych] & 2) { - goto yy502; + goto yy437; } if (yych <= '=') { if (yych <= '.') { if (yych == '-') - goto yy498; - goto yy497; + goto yy435; + goto yy434; } else { if (yych <= '/') - goto yy504; + goto yy438; if (yych <= '9') - goto yy498; - goto yy497; + goto yy435; + goto yy434; } } else { if (yych <= 'Z') { if (yych <= '>') - goto yy505; + goto yy439; if (yych <= '@') - goto yy497; - goto yy498; + goto yy434; + goto yy435; } else { if (yych <= '`') - goto yy497; + goto yy434; if (yych <= 'z') - goto yy498; - goto yy497; + goto yy435; + goto yy434; } } - yy500: - ++p; - yych = *p; + yy436: + yych = *++p; if (yych <= '/') { if (yych <= 0x1F) { if (yych <= 0x08) - goto yy497; + goto yy434; if (yych <= '\r') - goto yy507; - goto yy497; + goto yy440; + goto yy434; } else { if (yych <= ' ') - goto yy507; + goto yy440; if (yych == '-') - goto yy500; - goto yy497; + goto yy436; + goto yy434; } } else { if (yych <= '@') { if (yych <= '9') - goto yy500; + goto yy436; if (yych == '>') - goto yy505; - goto yy497; + goto yy439; + goto yy434; } else { if (yych <= 'Z') - goto yy500; + goto yy436; if (yych <= '`') - goto yy497; + goto yy434; if (yych <= 'z') - goto yy500; - goto yy497; + goto yy436; + goto yy434; } } - yy502: - ++p; - yych = *p; + yy437: + yych = *++p; if (yybm[0 + yych] & 2) { - goto yy502; + goto yy437; } if (yych <= '>') { if (yych <= '9') { if (yych != '/') - goto yy497; + goto yy434; } else { if (yych <= ':') - goto yy509; + goto yy441; if (yych <= '=') - goto yy497; - goto yy505; + goto yy434; + goto yy439; } } else { if (yych <= '^') { if (yych <= '@') - goto yy497; + goto yy434; if (yych <= 'Z') - goto yy509; - goto yy497; + goto yy441; + goto yy434; } else { if (yych == '`') - goto yy497; + goto yy434; if (yych <= 'z') - goto yy509; - goto yy497; + goto yy441; + goto yy434; } } - yy504: + yy438: yych = *++p; if (yych != '>') - goto yy497; - yy505: - ++p; - yych = *p; + goto yy434; + yy439: + yych = *++p; if (yybm[0 + yych] & 4) { - goto yy505; + goto yy439; } if (yych <= 0x08) - goto yy497; + goto yy434; if (yych <= '\n') - goto yy511; + goto yy442; if (yych <= '\v') - goto yy497; + goto yy434; if (yych <= '\r') - goto yy514; - goto yy497; - yy507: - ++p; - yych = *p; + goto yy444; + goto yy434; + yy440: + yych = *++p; if (yych <= 0x1F) { if (yych <= 0x08) - goto yy497; + goto yy434; if (yych <= '\r') - goto yy507; - goto yy497; + goto yy440; + goto yy434; } else { if (yych <= ' ') - goto yy507; + goto yy440; if (yych == '>') - goto yy505; - goto yy497; + goto yy439; + goto yy434; } - yy509: - ++p; - yych = *p; + yy441: + yych = *++p; if (yybm[0 + yych] & 8) { - goto yy509; + goto yy441; } if (yych <= ',') { if (yych <= '\r') { if (yych <= 0x08) - goto yy497; - goto yy515; + goto yy434; + goto yy445; } else { if (yych == ' ') - goto yy515; - goto yy497; + goto yy445; + goto yy434; } } else { if (yych <= '<') { if (yych <= '/') - goto yy504; - goto yy497; + goto yy438; + goto yy434; } else { if (yych <= '=') - goto yy517; + goto yy446; if (yych <= '>') - goto yy505; - goto yy497; + goto yy439; + goto yy434; } } - yy511: + yy442: yyaccept = 1; - marker = ++p; - yych = *p; + yych = *(marker = ++p); if (yybm[0 + yych] & 4) { - goto yy505; + goto yy439; } if (yych <= 0x08) - goto yy513; + goto yy443; if (yych <= '\n') - goto yy511; + goto yy442; if (yych <= '\v') - goto yy513; + goto yy443; if (yych <= '\r') - goto yy514; - yy513 : { return 7; } - yy514: - yych = *++p; - goto yy513; - yy515: + goto yy444; + yy443 : { return 7; } + yy444: ++p; - yych = *p; + goto yy443; + yy445: + yych = *++p; if (yych <= '<') { if (yych <= ' ') { if (yych <= 0x08) - goto yy497; + goto yy434; if (yych <= '\r') - goto yy515; + goto yy445; if (yych <= 0x1F) - goto yy497; - goto yy515; + goto yy434; + goto yy445; } else { if (yych <= '/') { if (yych <= '.') - goto yy497; - goto yy504; + goto yy434; + goto yy438; } else { if (yych == ':') - goto yy509; - goto yy497; + goto yy441; + goto yy434; } } } else { if (yych <= 'Z') { if (yych <= '=') - goto yy517; + goto yy446; if (yych <= '>') - goto yy505; + goto yy439; if (yych <= '@') - goto yy497; - goto yy509; + goto yy434; + goto yy441; } else { if (yych <= '_') { if (yych <= '^') - goto yy497; - goto yy509; + goto yy434; + goto yy441; } else { if (yych <= '`') - goto yy497; + goto yy434; if (yych <= 'z') - goto yy509; - goto yy497; + goto yy441; + goto yy434; } } } - yy517: - ++p; - yych = *p; + yy446: + yych = *++p; if (yybm[0 + yych] & 32) { - goto yy519; + goto yy447; } if (yych <= 0xE0) { if (yych <= '"') { if (yych <= 0x00) - goto yy497; + goto yy434; if (yych <= ' ') - goto yy517; - goto yy521; + goto yy446; + goto yy448; } else { if (yych <= '\'') - goto yy523; + goto yy449; if (yych <= 0xC1) - goto yy497; + goto yy434; if (yych <= 0xDF) - goto yy525; - goto yy526; + goto yy450; + goto yy451; } } else { if (yych <= 0xEF) { if (yych == 0xED) - goto yy528; - goto yy527; + goto yy453; + goto yy452; } else { if (yych <= 0xF0) - goto yy529; + goto yy454; if (yych <= 0xF3) - goto yy530; + goto yy455; if (yych <= 0xF4) - goto yy531; - goto yy497; + goto yy456; + goto yy434; } } - yy519: - ++p; - yych = *p; + yy447: + yych = *++p; if (yybm[0 + yych] & 32) { - goto yy519; + goto yy447; } if (yych <= 0xE0) { if (yych <= '=') { if (yych <= 0x00) - goto yy497; + goto yy434; if (yych <= ' ') - goto yy502; - goto yy497; + goto yy437; + goto yy434; } else { if (yych <= '>') - goto yy505; + goto yy439; if (yych <= 0xC1) - goto yy497; + goto yy434; if (yych <= 0xDF) - goto yy525; - goto yy526; + goto yy450; + goto yy451; } } else { if (yych <= 0xEF) { if (yych == 0xED) - goto yy528; - goto yy527; + goto yy453; + goto yy452; } else { if (yych <= 0xF0) - goto yy529; + goto yy454; if (yych <= 0xF3) - goto yy530; + goto yy455; if (yych <= 0xF4) - goto yy531; - goto yy497; + goto yy456; + goto yy434; } } - yy521: - ++p; - yych = *p; + yy448: + yych = *++p; if (yybm[0 + yych] & 64) { - goto yy521; + goto yy448; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= 0x00) - goto yy497; + goto yy434; if (yych <= '"') - goto yy532; - goto yy497; + goto yy457; + goto yy434; } else { if (yych <= 0xDF) - goto yy533; + goto yy458; if (yych <= 0xE0) - goto yy534; - goto yy535; + goto yy459; + goto yy460; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy536; + goto yy461; if (yych <= 0xEF) - goto yy535; - goto yy537; + goto yy460; + goto yy462; } else { if (yych <= 0xF3) - goto yy538; + goto yy463; if (yych <= 0xF4) - goto yy539; - goto yy497; + goto yy464; + goto yy434; } } - yy523: - ++p; - yych = *p; + yy449: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy523; + goto yy449; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= 0x00) - goto yy497; + goto yy434; if (yych <= '\'') - goto yy532; - goto yy497; + goto yy457; + goto yy434; } else { if (yych <= 0xDF) - goto yy540; + goto yy465; if (yych <= 0xE0) - goto yy541; - goto yy542; + goto yy466; + goto yy467; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy543; + goto yy468; if (yych <= 0xEF) - goto yy542; - goto yy544; + goto yy467; + goto yy469; } else { if (yych <= 0xF3) - goto yy545; + goto yy470; if (yych <= 0xF4) - goto yy546; - goto yy497; + goto yy471; + goto yy434; } } - yy525: - ++p; - yych = *p; + yy450: + yych = *++p; if (yych <= 0x7F) - goto yy497; + goto yy434; if (yych <= 0xBF) - goto yy519; - goto yy497; - yy526: - ++p; - yych = *p; + goto yy447; + goto yy434; + yy451: + yych = *++p; if (yych <= 0x9F) - goto yy497; + goto yy434; if (yych <= 0xBF) - goto yy525; - goto yy497; - yy527: - ++p; - yych = *p; + goto yy450; + goto yy434; + yy452: + yych = *++p; if (yych <= 0x7F) - goto yy497; + goto yy434; if (yych <= 0xBF) - goto yy525; - goto yy497; - yy528: - ++p; - yych = *p; + goto yy450; + goto yy434; + yy453: + yych = *++p; if (yych <= 0x7F) - goto yy497; + goto yy434; if (yych <= 0x9F) - goto yy525; - goto yy497; - yy529: - ++p; - yych = *p; + goto yy450; + goto yy434; + yy454: + yych = *++p; if (yych <= 0x8F) - goto yy497; - if (yych <= 0xBF) - goto yy527; - goto yy497; - yy530: - ++p; - yych = *p; + goto yy434; + if (yych <= 0xBF) + goto yy452; + goto yy434; + yy455: + yych = *++p; if (yych <= 0x7F) - goto yy497; + goto yy434; if (yych <= 0xBF) - goto yy527; - goto yy497; - yy531: - ++p; - yych = *p; + goto yy452; + goto yy434; + yy456: + yych = *++p; if (yych <= 0x7F) - goto yy497; + goto yy434; if (yych <= 0x8F) - goto yy527; - goto yy497; - yy532: - ++p; - yych = *p; + goto yy452; + goto yy434; + yy457: + yych = *++p; if (yybm[0 + yych] & 2) { - goto yy502; + goto yy437; } if (yych == '/') - goto yy504; + goto yy438; if (yych == '>') - goto yy505; - goto yy497; - yy533: - ++p; - yych = *p; + goto yy439; + goto yy434; + yy458: + yych = *++p; if (yych <= 0x7F) - goto yy497; + goto yy434; if (yych <= 0xBF) - goto yy521; - goto yy497; - yy534: - ++p; - yych = *p; + goto yy448; + goto yy434; + yy459: + yych = *++p; if (yych <= 0x9F) - goto yy497; + goto yy434; if (yych <= 0xBF) - goto yy533; - goto yy497; - yy535: - ++p; - yych = *p; + goto yy458; + goto yy434; + yy460: + yych = *++p; if (yych <= 0x7F) - goto yy497; + goto yy434; if (yych <= 0xBF) - goto yy533; - goto yy497; - yy536: - ++p; - yych = *p; + goto yy458; + goto yy434; + yy461: + yych = *++p; if (yych <= 0x7F) - goto yy497; + goto yy434; if (yych <= 0x9F) - goto yy533; - goto yy497; - yy537: - ++p; - yych = *p; + goto yy458; + goto yy434; + yy462: + yych = *++p; if (yych <= 0x8F) - goto yy497; + goto yy434; if (yych <= 0xBF) - goto yy535; - goto yy497; - yy538: - ++p; - yych = *p; + goto yy460; + goto yy434; + yy463: + yych = *++p; if (yych <= 0x7F) - goto yy497; + goto yy434; if (yych <= 0xBF) - goto yy535; - goto yy497; - yy539: - ++p; - yych = *p; + goto yy460; + goto yy434; + yy464: + yych = *++p; if (yych <= 0x7F) - goto yy497; + goto yy434; if (yych <= 0x8F) - goto yy535; - goto yy497; - yy540: - ++p; - yych = *p; + goto yy460; + goto yy434; + yy465: + yych = *++p; if (yych <= 0x7F) - goto yy497; + goto yy434; if (yych <= 0xBF) - goto yy523; - goto yy497; - yy541: - ++p; - yych = *p; + goto yy449; + goto yy434; + yy466: + yych = *++p; if (yych <= 0x9F) - goto yy497; + goto yy434; if (yych <= 0xBF) - goto yy540; - goto yy497; - yy542: - ++p; - yych = *p; + goto yy465; + goto yy434; + yy467: + yych = *++p; if (yych <= 0x7F) - goto yy497; + goto yy434; if (yych <= 0xBF) - goto yy540; - goto yy497; - yy543: - ++p; - yych = *p; + goto yy465; + goto yy434; + yy468: + yych = *++p; if (yych <= 0x7F) - goto yy497; + goto yy434; if (yych <= 0x9F) - goto yy540; - goto yy497; - yy544: - ++p; - yych = *p; + goto yy465; + goto yy434; + yy469: + yych = *++p; if (yych <= 0x8F) - goto yy497; + goto yy434; if (yych <= 0xBF) - goto yy542; - goto yy497; - yy545: - ++p; - yych = *p; + goto yy467; + goto yy434; + yy470: + yych = *++p; if (yych <= 0x7F) - goto yy497; + goto yy434; if (yych <= 0xBF) - goto yy542; - goto yy497; - yy546: - ++p; - yych = *p; + goto yy467; + goto yy434; + yy471: + yych = *++p; if (yych <= 0x7F) - goto yy497; + goto yy434; if (yych <= 0x8F) - goto yy542; - goto yy497; + goto yy467; + goto yy434; } } @@ -9018,850 +8590,1168 @@ bufsize_t _scan_html_block_end_1(const unsigned char *p) { if (yych <= 0xDF) { if (yych <= ';') { if (yych <= 0x00) - goto yy549; + goto yy473; if (yych != '\n') - goto yy551; + goto yy475; } else { if (yych <= '<') - goto yy552; + goto yy476; if (yych <= 0x7F) - goto yy551; + goto yy475; if (yych >= 0xC2) - goto yy553; + goto yy477; } } else { if (yych <= 0xEF) { if (yych <= 0xE0) - goto yy554; + goto yy478; if (yych == 0xED) - goto yy556; - goto yy555; + goto yy480; + goto yy479; } else { if (yych <= 0xF0) - goto yy557; + goto yy481; if (yych <= 0xF3) - goto yy558; + goto yy482; if (yych <= 0xF4) - goto yy559; + goto yy483; } } - yy549: + yy473: ++p; - yy550 : { return 0; } - yy551: + yy474 : { return 0; } + yy475: yyaccept = 0; yych = *(marker = ++p); if (yych <= '\n') { if (yych <= 0x00) - goto yy550; + goto yy474; if (yych <= '\t') - goto yy561; - goto yy550; + goto yy485; + goto yy474; } else { if (yych <= 0x7F) - goto yy561; + goto yy485; if (yych <= 0xC1) - goto yy550; + goto yy474; if (yych <= 0xF4) - goto yy561; - goto yy550; + goto yy485; + goto yy474; } - yy552: + yy476: yyaccept = 0; yych = *(marker = ++p); if (yych <= '.') { if (yych <= 0x00) - goto yy550; + goto yy474; if (yych == '\n') - goto yy550; - goto yy561; + goto yy474; + goto yy485; } else { if (yych <= 0x7F) { if (yych <= '/') - goto yy572; - goto yy561; + goto yy495; + goto yy485; } else { if (yych <= 0xC1) - goto yy550; + goto yy474; if (yych <= 0xF4) - goto yy561; - goto yy550; + goto yy485; + goto yy474; } } - yy553: + yy477: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy550; + goto yy474; if (yych <= 0xBF) - goto yy560; - goto yy550; - yy554: + goto yy484; + goto yy474; + yy478: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x9F) - goto yy550; + goto yy474; if (yych <= 0xBF) - goto yy565; - goto yy550; - yy555: + goto yy488; + goto yy474; + yy479: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy550; + goto yy474; if (yych <= 0xBF) - goto yy565; - goto yy550; - yy556: + goto yy488; + goto yy474; + yy480: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy550; + goto yy474; if (yych <= 0x9F) - goto yy565; - goto yy550; - yy557: + goto yy488; + goto yy474; + yy481: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x8F) - goto yy550; + goto yy474; if (yych <= 0xBF) - goto yy567; - goto yy550; - yy558: + goto yy490; + goto yy474; + yy482: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy550; + goto yy474; if (yych <= 0xBF) - goto yy567; - goto yy550; - yy559: + goto yy490; + goto yy474; + yy483: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy550; + goto yy474; if (yych <= 0x8F) - goto yy567; - goto yy550; - yy560: - ++p; - yych = *p; - yy561: + goto yy490; + goto yy474; + yy484: + yych = *++p; + yy485: if (yybm[0 + yych] & 64) { - goto yy560; + goto yy484; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= '\n') - goto yy562; + goto yy486; if (yych <= '<') - goto yy563; + goto yy487; } else { if (yych <= 0xDF) - goto yy565; + goto yy488; if (yych <= 0xE0) - goto yy566; - goto yy567; + goto yy489; + goto yy490; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy568; + goto yy491; if (yych <= 0xEF) - goto yy567; - goto yy569; + goto yy490; + goto yy492; } else { if (yych <= 0xF3) - goto yy570; + goto yy493; if (yych <= 0xF4) - goto yy571; + goto yy494; } } - yy562: + yy486: p = marker; if (yyaccept == 0) { - goto yy550; + goto yy474; } else { - goto yy582; + goto yy508; } - yy563: - ++p; - yych = *p; + yy487: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy563; + goto yy487; } if (yych <= 0xDF) { if (yych <= '.') { if (yych <= 0x00) - goto yy562; + goto yy486; if (yych == '\n') - goto yy562; - goto yy560; + goto yy486; + goto yy484; } else { if (yych <= '/') - goto yy572; + goto yy495; if (yych <= 0x7F) - goto yy560; + goto yy484; if (yych <= 0xC1) - goto yy562; + goto yy486; } } else { if (yych <= 0xEF) { if (yych <= 0xE0) - goto yy566; + goto yy489; if (yych == 0xED) - goto yy568; - goto yy567; + goto yy491; + goto yy490; } else { if (yych <= 0xF0) - goto yy569; + goto yy492; if (yych <= 0xF3) - goto yy570; + goto yy493; if (yych <= 0xF4) - goto yy571; - goto yy562; + goto yy494; + goto yy486; } } - yy565: - ++p; - yych = *p; + yy488: + yych = *++p; if (yych <= 0x7F) - goto yy562; + goto yy486; if (yych <= 0xBF) - goto yy560; - goto yy562; - yy566: - ++p; - yych = *p; + goto yy484; + goto yy486; + yy489: + yych = *++p; if (yych <= 0x9F) - goto yy562; + goto yy486; if (yych <= 0xBF) - goto yy565; - goto yy562; - yy567: - ++p; - yych = *p; + goto yy488; + goto yy486; + yy490: + yych = *++p; if (yych <= 0x7F) - goto yy562; + goto yy486; if (yych <= 0xBF) - goto yy565; - goto yy562; - yy568: - ++p; - yych = *p; + goto yy488; + goto yy486; + yy491: + yych = *++p; if (yych <= 0x7F) - goto yy562; + goto yy486; if (yych <= 0x9F) - goto yy565; - goto yy562; - yy569: - ++p; - yych = *p; + goto yy488; + goto yy486; + yy492: + yych = *++p; if (yych <= 0x8F) - goto yy562; + goto yy486; if (yych <= 0xBF) - goto yy567; - goto yy562; - yy570: - ++p; - yych = *p; + goto yy490; + goto yy486; + yy493: + yych = *++p; if (yych <= 0x7F) - goto yy562; + goto yy486; if (yych <= 0xBF) - goto yy567; - goto yy562; - yy571: - ++p; - yych = *p; + goto yy490; + goto yy486; + yy494: + yych = *++p; if (yych <= 0x7F) - goto yy562; + goto yy486; if (yych <= 0x8F) - goto yy567; - goto yy562; - yy572: - ++p; - yych = *p; + goto yy490; + goto yy486; + yy495: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy563; + goto yy487; } if (yych <= 's') { - if (yych <= 'P') { - if (yych <= '\t') { + if (yych <= 'R') { + if (yych <= '\n') { if (yych <= 0x00) - goto yy562; - goto yy560; + goto yy486; + if (yych <= '\t') + goto yy484; + goto yy486; } else { - if (yych <= '\n') - goto yy562; - if (yych <= 'O') - goto yy560; + if (yych != 'P') + goto yy484; } } else { if (yych <= 'o') { - if (yych == 'S') - goto yy574; - goto yy560; + if (yych <= 'S') + goto yy497; + if (yych <= 'T') + goto yy498; + goto yy484; } else { if (yych <= 'p') - goto yy573; + goto yy496; if (yych <= 'r') - goto yy560; - goto yy574; + goto yy484; + goto yy497; } } } else { if (yych <= 0xEC) { if (yych <= 0xC1) { + if (yych <= 't') + goto yy498; if (yych <= 0x7F) - goto yy560; - goto yy562; + goto yy484; + goto yy486; } else { if (yych <= 0xDF) - goto yy565; + goto yy488; if (yych <= 0xE0) - goto yy566; - goto yy567; + goto yy489; + goto yy490; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy568; + goto yy491; if (yych <= 0xEF) - goto yy567; - goto yy569; + goto yy490; + goto yy492; } else { if (yych <= 0xF3) - goto yy570; + goto yy493; if (yych <= 0xF4) - goto yy571; - goto yy562; + goto yy494; + goto yy486; } } } - yy573: - ++p; - yych = *p; + yy496: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy563; + goto yy487; } if (yych <= 0xC1) { if (yych <= 'Q') { if (yych <= 0x00) - goto yy562; + goto yy486; if (yych == '\n') - goto yy562; - goto yy560; + goto yy486; + goto yy484; } else { if (yych <= 'q') { if (yych <= 'R') - goto yy575; - goto yy560; + goto yy499; + goto yy484; } else { if (yych <= 'r') - goto yy575; + goto yy499; if (yych <= 0x7F) - goto yy560; - goto yy562; + goto yy484; + goto yy486; } } } else { if (yych <= 0xED) { if (yych <= 0xDF) - goto yy565; + goto yy488; if (yych <= 0xE0) - goto yy566; + goto yy489; if (yych <= 0xEC) - goto yy567; - goto yy568; + goto yy490; + goto yy491; } else { if (yych <= 0xF0) { if (yych <= 0xEF) - goto yy567; - goto yy569; + goto yy490; + goto yy492; } else { if (yych <= 0xF3) - goto yy570; + goto yy493; if (yych <= 0xF4) - goto yy571; - goto yy562; + goto yy494; + goto yy486; } } } - yy574: - ++p; - yych = *p; + yy497: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy563; + goto yy487; } if (yych <= 't') { if (yych <= 'C') { if (yych <= '\t') { if (yych <= 0x00) - goto yy562; - goto yy560; + goto yy486; + goto yy484; } else { if (yych <= '\n') - goto yy562; + goto yy486; if (yych <= 'B') - goto yy560; - goto yy576; + goto yy484; + goto yy500; } } else { if (yych <= 'b') { if (yych == 'T') - goto yy577; - goto yy560; + goto yy501; + goto yy484; } else { if (yych <= 'c') - goto yy576; + goto yy500; if (yych <= 's') - goto yy560; - goto yy577; + goto yy484; + goto yy501; } } } else { if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= 0x7F) - goto yy560; - goto yy562; + goto yy484; + goto yy486; } else { if (yych <= 0xDF) - goto yy565; + goto yy488; if (yych <= 0xE0) - goto yy566; - goto yy567; + goto yy489; + goto yy490; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy568; + goto yy491; if (yych <= 0xEF) - goto yy567; - goto yy569; + goto yy490; + goto yy492; } else { if (yych <= 0xF3) - goto yy570; + goto yy493; if (yych <= 0xF4) - goto yy571; - goto yy562; + goto yy494; + goto yy486; } } } - yy575: - ++p; - yych = *p; + yy498: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy563; + goto yy487; } if (yych <= 0xC1) { if (yych <= 'D') { if (yych <= 0x00) - goto yy562; + goto yy486; if (yych == '\n') - goto yy562; - goto yy560; + goto yy486; + goto yy484; } else { if (yych <= 'd') { if (yych <= 'E') - goto yy578; - goto yy560; + goto yy502; + goto yy484; } else { if (yych <= 'e') - goto yy578; + goto yy502; if (yych <= 0x7F) - goto yy560; - goto yy562; + goto yy484; + goto yy486; } } } else { if (yych <= 0xED) { if (yych <= 0xDF) - goto yy565; + goto yy488; if (yych <= 0xE0) - goto yy566; + goto yy489; if (yych <= 0xEC) - goto yy567; - goto yy568; + goto yy490; + goto yy491; } else { if (yych <= 0xF0) { if (yych <= 0xEF) - goto yy567; - goto yy569; + goto yy490; + goto yy492; } else { if (yych <= 0xF3) - goto yy570; + goto yy493; if (yych <= 0xF4) - goto yy571; - goto yy562; + goto yy494; + goto yy486; } } } - yy576: - ++p; - yych = *p; + yy499: + yych = *++p; + if (yybm[0 + yych] & 128) { + goto yy487; + } + if (yych <= 0xC1) { + if (yych <= 'D') { + if (yych <= 0x00) + goto yy486; + if (yych == '\n') + goto yy486; + goto yy484; + } else { + if (yych <= 'd') { + if (yych <= 'E') + goto yy503; + goto yy484; + } else { + if (yych <= 'e') + goto yy503; + if (yych <= 0x7F) + goto yy484; + goto yy486; + } + } + } else { + if (yych <= 0xED) { + if (yych <= 0xDF) + goto yy488; + if (yych <= 0xE0) + goto yy489; + if (yych <= 0xEC) + goto yy490; + goto yy491; + } else { + if (yych <= 0xF0) { + if (yych <= 0xEF) + goto yy490; + goto yy492; + } else { + if (yych <= 0xF3) + goto yy493; + if (yych <= 0xF4) + goto yy494; + goto yy486; + } + } + } + yy500: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy563; + goto yy487; } if (yych <= 0xC1) { if (yych <= 'Q') { if (yych <= 0x00) - goto yy562; + goto yy486; if (yych == '\n') - goto yy562; - goto yy560; + goto yy486; + goto yy484; } else { if (yych <= 'q') { if (yych <= 'R') - goto yy579; - goto yy560; + goto yy504; + goto yy484; + } else { + if (yych <= 'r') + goto yy504; + if (yych <= 0x7F) + goto yy484; + goto yy486; + } + } + } else { + if (yych <= 0xED) { + if (yych <= 0xDF) + goto yy488; + if (yych <= 0xE0) + goto yy489; + if (yych <= 0xEC) + goto yy490; + goto yy491; + } else { + if (yych <= 0xF0) { + if (yych <= 0xEF) + goto yy490; + goto yy492; + } else { + if (yych <= 0xF3) + goto yy493; + if (yych <= 0xF4) + goto yy494; + goto yy486; + } + } + } + yy501: + yych = *++p; + if (yybm[0 + yych] & 128) { + goto yy487; + } + if (yych <= 0xC1) { + if (yych <= 'X') { + if (yych <= 0x00) + goto yy486; + if (yych == '\n') + goto yy486; + goto yy484; + } else { + if (yych <= 'x') { + if (yych <= 'Y') + goto yy505; + goto yy484; + } else { + if (yych <= 'y') + goto yy505; + if (yych <= 0x7F) + goto yy484; + goto yy486; + } + } + } else { + if (yych <= 0xED) { + if (yych <= 0xDF) + goto yy488; + if (yych <= 0xE0) + goto yy489; + if (yych <= 0xEC) + goto yy490; + goto yy491; + } else { + if (yych <= 0xF0) { + if (yych <= 0xEF) + goto yy490; + goto yy492; + } else { + if (yych <= 0xF3) + goto yy493; + if (yych <= 0xF4) + goto yy494; + goto yy486; + } + } + } + yy502: + yych = *++p; + if (yybm[0 + yych] & 128) { + goto yy487; + } + if (yych <= 0xC1) { + if (yych <= 'W') { + if (yych <= 0x00) + goto yy486; + if (yych == '\n') + goto yy486; + goto yy484; + } else { + if (yych <= 'w') { + if (yych <= 'X') + goto yy506; + goto yy484; + } else { + if (yych <= 'x') + goto yy506; + if (yych <= 0x7F) + goto yy484; + goto yy486; + } + } + } else { + if (yych <= 0xED) { + if (yych <= 0xDF) + goto yy488; + if (yych <= 0xE0) + goto yy489; + if (yych <= 0xEC) + goto yy490; + goto yy491; + } else { + if (yych <= 0xF0) { + if (yych <= 0xEF) + goto yy490; + goto yy492; + } else { + if (yych <= 0xF3) + goto yy493; + if (yych <= 0xF4) + goto yy494; + goto yy486; + } + } + } + yy503: + yych = *++p; + if (yybm[0 + yych] & 128) { + goto yy487; + } + if (yych <= 0xDF) { + if (yych <= '=') { + if (yych <= 0x00) + goto yy486; + if (yych == '\n') + goto yy486; + goto yy484; + } else { + if (yych <= '>') + goto yy507; + if (yych <= 0x7F) + goto yy484; + if (yych <= 0xC1) + goto yy486; + goto yy488; + } + } else { + if (yych <= 0xEF) { + if (yych <= 0xE0) + goto yy489; + if (yych == 0xED) + goto yy491; + goto yy490; + } else { + if (yych <= 0xF0) + goto yy492; + if (yych <= 0xF3) + goto yy493; + if (yych <= 0xF4) + goto yy494; + goto yy486; + } + } + yy504: + yych = *++p; + if (yybm[0 + yych] & 128) { + goto yy487; + } + if (yych <= 0xC1) { + if (yych <= 'H') { + if (yych <= 0x00) + goto yy486; + if (yych == '\n') + goto yy486; + goto yy484; + } else { + if (yych <= 'h') { + if (yych <= 'I') + goto yy509; + goto yy484; + } else { + if (yych <= 'i') + goto yy509; + if (yych <= 0x7F) + goto yy484; + goto yy486; + } + } + } else { + if (yych <= 0xED) { + if (yych <= 0xDF) + goto yy488; + if (yych <= 0xE0) + goto yy489; + if (yych <= 0xEC) + goto yy490; + goto yy491; + } else { + if (yych <= 0xF0) { + if (yych <= 0xEF) + goto yy490; + goto yy492; + } else { + if (yych <= 0xF3) + goto yy493; + if (yych <= 0xF4) + goto yy494; + goto yy486; + } + } + } + yy505: + yych = *++p; + if (yybm[0 + yych] & 128) { + goto yy487; + } + if (yych <= 0xC1) { + if (yych <= 'K') { + if (yych <= 0x00) + goto yy486; + if (yych == '\n') + goto yy486; + goto yy484; + } else { + if (yych <= 'k') { + if (yych <= 'L') + goto yy499; + goto yy484; + } else { + if (yych <= 'l') + goto yy499; + if (yych <= 0x7F) + goto yy484; + goto yy486; + } + } + } else { + if (yych <= 0xED) { + if (yych <= 0xDF) + goto yy488; + if (yych <= 0xE0) + goto yy489; + if (yych <= 0xEC) + goto yy490; + goto yy491; + } else { + if (yych <= 0xF0) { + if (yych <= 0xEF) + goto yy490; + goto yy492; + } else { + if (yych <= 0xF3) + goto yy493; + if (yych <= 0xF4) + goto yy494; + goto yy486; + } + } + } + yy506: + yych = *++p; + if (yybm[0 + yych] & 128) { + goto yy487; + } + if (yych <= 0xC1) { + if (yych <= 'S') { + if (yych <= 0x00) + goto yy486; + if (yych == '\n') + goto yy486; + goto yy484; + } else { + if (yych <= 's') { + if (yych <= 'T') + goto yy510; + goto yy484; } else { - if (yych <= 'r') - goto yy579; + if (yych <= 't') + goto yy510; if (yych <= 0x7F) - goto yy560; - goto yy562; + goto yy484; + goto yy486; } } } else { if (yych <= 0xED) { if (yych <= 0xDF) - goto yy565; + goto yy488; if (yych <= 0xE0) - goto yy566; + goto yy489; if (yych <= 0xEC) - goto yy567; - goto yy568; + goto yy490; + goto yy491; } else { if (yych <= 0xF0) { if (yych <= 0xEF) - goto yy567; - goto yy569; + goto yy490; + goto yy492; } else { if (yych <= 0xF3) - goto yy570; + goto yy493; if (yych <= 0xF4) - goto yy571; - goto yy562; + goto yy494; + goto yy486; } } } - yy577: - ++p; - yych = *p; + yy507: + yyaccept = 1; + yych = *(marker = ++p); + if (yybm[0 + yych] & 64) { + goto yy484; + } + if (yych <= 0xEC) { + if (yych <= 0xC1) { + if (yych <= '\n') + goto yy508; + if (yych <= '<') + goto yy487; + } else { + if (yych <= 0xDF) + goto yy488; + if (yych <= 0xE0) + goto yy489; + goto yy490; + } + } else { + if (yych <= 0xF0) { + if (yych <= 0xED) + goto yy491; + if (yych <= 0xEF) + goto yy490; + goto yy492; + } else { + if (yych <= 0xF3) + goto yy493; + if (yych <= 0xF4) + goto yy494; + } + } + yy508 : { return (bufsize_t)(p - start); } + yy509: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy563; + goto yy487; } if (yych <= 0xC1) { - if (yych <= 'X') { + if (yych <= 'O') { if (yych <= 0x00) - goto yy562; + goto yy486; if (yych == '\n') - goto yy562; - goto yy560; + goto yy486; + goto yy484; } else { - if (yych <= 'x') { - if (yych <= 'Y') - goto yy580; - goto yy560; + if (yych <= 'o') { + if (yych <= 'P') + goto yy511; + goto yy484; } else { - if (yych <= 'y') - goto yy580; + if (yych <= 'p') + goto yy511; if (yych <= 0x7F) - goto yy560; - goto yy562; + goto yy484; + goto yy486; } } } else { if (yych <= 0xED) { if (yych <= 0xDF) - goto yy565; + goto yy488; if (yych <= 0xE0) - goto yy566; + goto yy489; if (yych <= 0xEC) - goto yy567; - goto yy568; + goto yy490; + goto yy491; } else { if (yych <= 0xF0) { if (yych <= 0xEF) - goto yy567; - goto yy569; + goto yy490; + goto yy492; } else { if (yych <= 0xF3) - goto yy570; + goto yy493; if (yych <= 0xF4) - goto yy571; - goto yy562; + goto yy494; + goto yy486; } } } - yy578: - ++p; - yych = *p; + yy510: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy563; + goto yy487; } - if (yych <= 0xDF) { - if (yych <= '=') { + if (yych <= 0xC1) { + if (yych <= '@') { if (yych <= 0x00) - goto yy562; + goto yy486; if (yych == '\n') - goto yy562; - goto yy560; + goto yy486; + goto yy484; } else { - if (yych <= '>') - goto yy581; - if (yych <= 0x7F) - goto yy560; - if (yych <= 0xC1) - goto yy562; - goto yy565; + if (yych <= '`') { + if (yych <= 'A') + goto yy512; + goto yy484; + } else { + if (yych <= 'a') + goto yy512; + if (yych <= 0x7F) + goto yy484; + goto yy486; + } } } else { - if (yych <= 0xEF) { + if (yych <= 0xED) { + if (yych <= 0xDF) + goto yy488; if (yych <= 0xE0) - goto yy566; - if (yych == 0xED) - goto yy568; - goto yy567; + goto yy489; + if (yych <= 0xEC) + goto yy490; + goto yy491; } else { - if (yych <= 0xF0) - goto yy569; - if (yych <= 0xF3) - goto yy570; - if (yych <= 0xF4) - goto yy571; - goto yy562; + if (yych <= 0xF0) { + if (yych <= 0xEF) + goto yy490; + goto yy492; + } else { + if (yych <= 0xF3) + goto yy493; + if (yych <= 0xF4) + goto yy494; + goto yy486; + } } } - yy579: - ++p; - yych = *p; + yy511: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy563; + goto yy487; } if (yych <= 0xC1) { - if (yych <= 'H') { + if (yych <= 'S') { if (yych <= 0x00) - goto yy562; + goto yy486; if (yych == '\n') - goto yy562; - goto yy560; + goto yy486; + goto yy484; } else { - if (yych <= 'h') { - if (yych <= 'I') - goto yy583; - goto yy560; + if (yych <= 's') { + if (yych <= 'T') + goto yy503; + goto yy484; } else { - if (yych <= 'i') - goto yy583; + if (yych <= 't') + goto yy503; if (yych <= 0x7F) - goto yy560; - goto yy562; + goto yy484; + goto yy486; } } } else { if (yych <= 0xED) { if (yych <= 0xDF) - goto yy565; + goto yy488; if (yych <= 0xE0) - goto yy566; + goto yy489; if (yych <= 0xEC) - goto yy567; - goto yy568; + goto yy490; + goto yy491; } else { if (yych <= 0xF0) { if (yych <= 0xEF) - goto yy567; - goto yy569; + goto yy490; + goto yy492; } else { if (yych <= 0xF3) - goto yy570; + goto yy493; if (yych <= 0xF4) - goto yy571; - goto yy562; + goto yy494; + goto yy486; } } } - yy580: - ++p; - yych = *p; + yy512: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy563; + goto yy487; } if (yych <= 0xC1) { - if (yych <= 'K') { + if (yych <= 'Q') { if (yych <= 0x00) - goto yy562; + goto yy486; if (yych == '\n') - goto yy562; - goto yy560; + goto yy486; + goto yy484; } else { - if (yych <= 'k') { - if (yych <= 'L') - goto yy575; - goto yy560; + if (yych <= 'q') { + if (yych >= 'S') + goto yy484; } else { - if (yych <= 'l') - goto yy575; + if (yych <= 'r') + goto yy513; if (yych <= 0x7F) - goto yy560; - goto yy562; + goto yy484; + goto yy486; } } } else { if (yych <= 0xED) { if (yych <= 0xDF) - goto yy565; + goto yy488; if (yych <= 0xE0) - goto yy566; + goto yy489; if (yych <= 0xEC) - goto yy567; - goto yy568; + goto yy490; + goto yy491; } else { if (yych <= 0xF0) { if (yych <= 0xEF) - goto yy567; - goto yy569; + goto yy490; + goto yy492; } else { if (yych <= 0xF3) - goto yy570; + goto yy493; if (yych <= 0xF4) - goto yy571; - goto yy562; + goto yy494; + goto yy486; } } } - yy581: - yyaccept = 1; - marker = ++p; - yych = *p; - if (yybm[0 + yych] & 64) { - goto yy560; - } - if (yych <= 0xEC) { - if (yych <= 0xC1) { - if (yych <= '\n') - goto yy582; - if (yych <= '<') - goto yy563; - } else { - if (yych <= 0xDF) - goto yy565; - if (yych <= 0xE0) - goto yy566; - goto yy567; - } - } else { - if (yych <= 0xF0) { - if (yych <= 0xED) - goto yy568; - if (yych <= 0xEF) - goto yy567; - goto yy569; - } else { - if (yych <= 0xF3) - goto yy570; - if (yych <= 0xF4) - goto yy571; - } - } - yy582 : { return (bufsize_t)(p - start); } - yy583: - ++p; - yych = *p; + yy513: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy563; + goto yy487; } if (yych <= 0xC1) { - if (yych <= 'O') { + if (yych <= 'D') { if (yych <= 0x00) - goto yy562; + goto yy486; if (yych == '\n') - goto yy562; - goto yy560; + goto yy486; + goto yy484; } else { - if (yych <= 'o') { - if (yych >= 'Q') - goto yy560; + if (yych <= 'd') { + if (yych >= 'F') + goto yy484; } else { - if (yych <= 'p') - goto yy584; + if (yych <= 'e') + goto yy514; if (yych <= 0x7F) - goto yy560; - goto yy562; + goto yy484; + goto yy486; } } } else { if (yych <= 0xED) { if (yych <= 0xDF) - goto yy565; + goto yy488; if (yych <= 0xE0) - goto yy566; + goto yy489; if (yych <= 0xEC) - goto yy567; - goto yy568; + goto yy490; + goto yy491; } else { if (yych <= 0xF0) { if (yych <= 0xEF) - goto yy567; - goto yy569; + goto yy490; + goto yy492; } else { if (yych <= 0xF3) - goto yy570; + goto yy493; if (yych <= 0xF4) - goto yy571; - goto yy562; + goto yy494; + goto yy486; } } } - yy584: - ++p; - yych = *p; + yy514: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy563; + goto yy487; } if (yych <= 0xC1) { - if (yych <= 'S') { + if (yych <= '@') { if (yych <= 0x00) - goto yy562; + goto yy486; if (yych == '\n') - goto yy562; - goto yy560; + goto yy486; + goto yy484; } else { - if (yych <= 's') { - if (yych <= 'T') - goto yy578; - goto yy560; + if (yych <= '`') { + if (yych <= 'A') + goto yy503; + goto yy484; } else { - if (yych <= 't') - goto yy578; + if (yych <= 'a') + goto yy503; if (yych <= 0x7F) - goto yy560; - goto yy562; + goto yy484; + goto yy486; } } } else { if (yych <= 0xED) { if (yych <= 0xDF) - goto yy565; + goto yy488; if (yych <= 0xE0) - goto yy566; + goto yy489; if (yych <= 0xEC) - goto yy567; - goto yy568; + goto yy490; + goto yy491; } else { if (yych <= 0xF0) { if (yych <= 0xEF) - goto yy567; - goto yy569; + goto yy490; + goto yy492; } else { if (yych <= 0xF3) - goto yy570; + goto yy493; if (yych <= 0xF4) - goto yy571; - goto yy562; + goto yy494; + goto yy486; } } } @@ -9897,337 +9787,326 @@ bufsize_t _scan_html_block_end_2(const unsigned char *p) { if (yych <= 0xDF) { if (yych <= ',') { if (yych <= 0x00) - goto yy587; + goto yy516; if (yych != '\n') - goto yy589; + goto yy518; } else { if (yych <= '-') - goto yy590; + goto yy519; if (yych <= 0x7F) - goto yy589; + goto yy518; if (yych >= 0xC2) - goto yy591; + goto yy520; } } else { if (yych <= 0xEF) { if (yych <= 0xE0) - goto yy592; + goto yy521; if (yych == 0xED) - goto yy594; - goto yy593; + goto yy523; + goto yy522; } else { if (yych <= 0xF0) - goto yy595; + goto yy524; if (yych <= 0xF3) - goto yy596; + goto yy525; if (yych <= 0xF4) - goto yy597; + goto yy526; } } - yy587: + yy516: ++p; - yy588 : { return 0; } - yy589: + yy517 : { return 0; } + yy518: yyaccept = 0; yych = *(marker = ++p); if (yych <= '\n') { if (yych <= 0x00) - goto yy588; + goto yy517; if (yych <= '\t') - goto yy599; - goto yy588; + goto yy528; + goto yy517; } else { if (yych <= 0x7F) - goto yy599; + goto yy528; if (yych <= 0xC1) - goto yy588; + goto yy517; if (yych <= 0xF4) - goto yy599; - goto yy588; + goto yy528; + goto yy517; } - yy590: + yy519: yyaccept = 0; yych = *(marker = ++p); if (yybm[0 + yych] & 128) { - goto yy609; + goto yy538; } if (yych <= '\n') { if (yych <= 0x00) - goto yy588; + goto yy517; if (yych <= '\t') - goto yy599; - goto yy588; + goto yy528; + goto yy517; } else { if (yych <= 0x7F) - goto yy599; + goto yy528; if (yych <= 0xC1) - goto yy588; + goto yy517; if (yych <= 0xF4) - goto yy599; - goto yy588; + goto yy528; + goto yy517; } - yy591: + yy520: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy588; + goto yy517; if (yych <= 0xBF) - goto yy598; - goto yy588; - yy592: + goto yy527; + goto yy517; + yy521: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x9F) - goto yy588; + goto yy517; if (yych <= 0xBF) - goto yy602; - goto yy588; - yy593: + goto yy531; + goto yy517; + yy522: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy588; + goto yy517; if (yych <= 0xBF) - goto yy602; - goto yy588; - yy594: + goto yy531; + goto yy517; + yy523: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy588; + goto yy517; if (yych <= 0x9F) - goto yy602; - goto yy588; - yy595: + goto yy531; + goto yy517; + yy524: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x8F) - goto yy588; + goto yy517; if (yych <= 0xBF) - goto yy604; - goto yy588; - yy596: + goto yy533; + goto yy517; + yy525: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy588; + goto yy517; if (yych <= 0xBF) - goto yy604; - goto yy588; - yy597: + goto yy533; + goto yy517; + yy526: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy588; + goto yy517; if (yych <= 0x8F) - goto yy604; - goto yy588; - yy598: - ++p; - yych = *p; - yy599: + goto yy533; + goto yy517; + yy527: + yych = *++p; + yy528: if (yybm[0 + yych] & 64) { - goto yy598; + goto yy527; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= '\n') - goto yy600; + goto yy529; if (yych <= '-') - goto yy601; + goto yy530; } else { if (yych <= 0xDF) - goto yy602; + goto yy531; if (yych <= 0xE0) - goto yy603; - goto yy604; + goto yy532; + goto yy533; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy605; + goto yy534; if (yych <= 0xEF) - goto yy604; - goto yy606; + goto yy533; + goto yy535; } else { if (yych <= 0xF3) - goto yy607; + goto yy536; if (yych <= 0xF4) - goto yy608; + goto yy537; } } - yy600: + yy529: p = marker; if (yyaccept == 0) { - goto yy588; + goto yy517; } else { - goto yy612; + goto yy540; } - yy601: - ++p; - yych = *p; + yy530: + yych = *++p; if (yybm[0 + yych] & 64) { - goto yy598; + goto yy527; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= '\n') - goto yy600; + goto yy529; if (yych <= '-') - goto yy609; - goto yy600; + goto yy538; + goto yy529; } else { if (yych <= 0xDF) - goto yy602; + goto yy531; if (yych <= 0xE0) - goto yy603; - goto yy604; + goto yy532; + goto yy533; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy605; + goto yy534; if (yych <= 0xEF) - goto yy604; - goto yy606; + goto yy533; + goto yy535; } else { if (yych <= 0xF3) - goto yy607; + goto yy536; if (yych <= 0xF4) - goto yy608; - goto yy600; + goto yy537; + goto yy529; } } - yy602: - ++p; - yych = *p; + yy531: + yych = *++p; if (yych <= 0x7F) - goto yy600; + goto yy529; if (yych <= 0xBF) - goto yy598; - goto yy600; - yy603: - ++p; - yych = *p; + goto yy527; + goto yy529; + yy532: + yych = *++p; if (yych <= 0x9F) - goto yy600; + goto yy529; if (yych <= 0xBF) - goto yy602; - goto yy600; - yy604: - ++p; - yych = *p; + goto yy531; + goto yy529; + yy533: + yych = *++p; if (yych <= 0x7F) - goto yy600; + goto yy529; if (yych <= 0xBF) - goto yy602; - goto yy600; - yy605: - ++p; - yych = *p; + goto yy531; + goto yy529; + yy534: + yych = *++p; if (yych <= 0x7F) - goto yy600; + goto yy529; if (yych <= 0x9F) - goto yy602; - goto yy600; - yy606: - ++p; - yych = *p; + goto yy531; + goto yy529; + yy535: + yych = *++p; if (yych <= 0x8F) - goto yy600; + goto yy529; if (yych <= 0xBF) - goto yy604; - goto yy600; - yy607: - ++p; - yych = *p; + goto yy533; + goto yy529; + yy536: + yych = *++p; if (yych <= 0x7F) - goto yy600; + goto yy529; if (yych <= 0xBF) - goto yy604; - goto yy600; - yy608: - ++p; - yych = *p; + goto yy533; + goto yy529; + yy537: + yych = *++p; if (yych <= 0x7F) - goto yy600; + goto yy529; if (yych <= 0x8F) - goto yy604; - goto yy600; - yy609: - ++p; - yych = *p; + goto yy533; + goto yy529; + yy538: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy609; + goto yy538; } if (yych <= 0xDF) { if (yych <= '=') { if (yych <= 0x00) - goto yy600; + goto yy529; if (yych == '\n') - goto yy600; - goto yy598; + goto yy529; + goto yy527; } else { if (yych <= '>') - goto yy611; + goto yy539; if (yych <= 0x7F) - goto yy598; + goto yy527; if (yych <= 0xC1) - goto yy600; - goto yy602; + goto yy529; + goto yy531; } } else { if (yych <= 0xEF) { if (yych <= 0xE0) - goto yy603; + goto yy532; if (yych == 0xED) - goto yy605; - goto yy604; + goto yy534; + goto yy533; } else { if (yych <= 0xF0) - goto yy606; + goto yy535; if (yych <= 0xF3) - goto yy607; + goto yy536; if (yych <= 0xF4) - goto yy608; - goto yy600; + goto yy537; + goto yy529; } } - yy611: + yy539: yyaccept = 1; - marker = ++p; - yych = *p; + yych = *(marker = ++p); if (yybm[0 + yych] & 64) { - goto yy598; + goto yy527; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= '\n') - goto yy612; + goto yy540; if (yych <= '-') - goto yy601; + goto yy530; } else { if (yych <= 0xDF) - goto yy602; + goto yy531; if (yych <= 0xE0) - goto yy603; - goto yy604; + goto yy532; + goto yy533; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy605; + goto yy534; if (yych <= 0xEF) - goto yy604; - goto yy606; + goto yy533; + goto yy535; } else { if (yych <= 0xF3) - goto yy607; + goto yy536; if (yych <= 0xF4) - goto yy608; + goto yy537; } } - yy612 : { return (bufsize_t)(p - start); } + yy540 : { return (bufsize_t)(p - start); } } } @@ -10260,302 +10139,292 @@ bufsize_t _scan_html_block_end_3(const unsigned char *p) { if (yych <= 0xDF) { if (yych <= '>') { if (yych <= 0x00) - goto yy615; + goto yy542; if (yych != '\n') - goto yy617; + goto yy544; } else { if (yych <= '?') - goto yy618; + goto yy545; if (yych <= 0x7F) - goto yy617; + goto yy544; if (yych >= 0xC2) - goto yy619; + goto yy546; } } else { if (yych <= 0xEF) { if (yych <= 0xE0) - goto yy620; + goto yy547; if (yych == 0xED) - goto yy622; - goto yy621; + goto yy549; + goto yy548; } else { if (yych <= 0xF0) - goto yy623; + goto yy550; if (yych <= 0xF3) - goto yy624; + goto yy551; if (yych <= 0xF4) - goto yy625; + goto yy552; } } - yy615: + yy542: ++p; - yy616 : { return 0; } - yy617: + yy543 : { return 0; } + yy544: yyaccept = 0; yych = *(marker = ++p); if (yych <= '\n') { if (yych <= 0x00) - goto yy616; + goto yy543; if (yych <= '\t') - goto yy627; - goto yy616; + goto yy554; + goto yy543; } else { if (yych <= 0x7F) - goto yy627; + goto yy554; if (yych <= 0xC1) - goto yy616; + goto yy543; if (yych <= 0xF4) - goto yy627; - goto yy616; + goto yy554; + goto yy543; } - yy618: + yy545: yyaccept = 0; yych = *(marker = ++p); if (yych <= '=') { if (yych <= 0x00) - goto yy616; + goto yy543; if (yych == '\n') - goto yy616; - goto yy627; + goto yy543; + goto yy554; } else { if (yych <= 0x7F) { if (yych <= '>') - goto yy638; - goto yy627; + goto yy564; + goto yy554; } else { if (yych <= 0xC1) - goto yy616; + goto yy543; if (yych <= 0xF4) - goto yy627; - goto yy616; + goto yy554; + goto yy543; } } - yy619: + yy546: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy616; + goto yy543; if (yych <= 0xBF) - goto yy626; - goto yy616; - yy620: + goto yy553; + goto yy543; + yy547: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x9F) - goto yy616; + goto yy543; if (yych <= 0xBF) - goto yy631; - goto yy616; - yy621: + goto yy557; + goto yy543; + yy548: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy616; + goto yy543; if (yych <= 0xBF) - goto yy631; - goto yy616; - yy622: + goto yy557; + goto yy543; + yy549: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy616; + goto yy543; if (yych <= 0x9F) - goto yy631; - goto yy616; - yy623: + goto yy557; + goto yy543; + yy550: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x8F) - goto yy616; + goto yy543; if (yych <= 0xBF) - goto yy633; - goto yy616; - yy624: + goto yy559; + goto yy543; + yy551: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy616; + goto yy543; if (yych <= 0xBF) - goto yy633; - goto yy616; - yy625: + goto yy559; + goto yy543; + yy552: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy616; + goto yy543; if (yych <= 0x8F) - goto yy633; - goto yy616; - yy626: - ++p; - yych = *p; - yy627: + goto yy559; + goto yy543; + yy553: + yych = *++p; + yy554: if (yybm[0 + yych] & 64) { - goto yy626; + goto yy553; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= '\n') - goto yy628; + goto yy555; if (yych <= '?') - goto yy629; + goto yy556; } else { if (yych <= 0xDF) - goto yy631; + goto yy557; if (yych <= 0xE0) - goto yy632; - goto yy633; + goto yy558; + goto yy559; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy634; + goto yy560; if (yych <= 0xEF) - goto yy633; - goto yy635; + goto yy559; + goto yy561; } else { if (yych <= 0xF3) - goto yy636; + goto yy562; if (yych <= 0xF4) - goto yy637; + goto yy563; } } - yy628: + yy555: p = marker; if (yyaccept == 0) { - goto yy616; + goto yy543; } else { - goto yy639; + goto yy565; } - yy629: - ++p; - yych = *p; + yy556: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy629; + goto yy556; } if (yych <= 0xDF) { if (yych <= '=') { if (yych <= 0x00) - goto yy628; + goto yy555; if (yych == '\n') - goto yy628; - goto yy626; + goto yy555; + goto yy553; } else { if (yych <= '>') - goto yy638; + goto yy564; if (yych <= 0x7F) - goto yy626; + goto yy553; if (yych <= 0xC1) - goto yy628; + goto yy555; } } else { if (yych <= 0xEF) { if (yych <= 0xE0) - goto yy632; + goto yy558; if (yych == 0xED) - goto yy634; - goto yy633; + goto yy560; + goto yy559; } else { if (yych <= 0xF0) - goto yy635; + goto yy561; if (yych <= 0xF3) - goto yy636; + goto yy562; if (yych <= 0xF4) - goto yy637; - goto yy628; + goto yy563; + goto yy555; } } - yy631: - ++p; - yych = *p; + yy557: + yych = *++p; if (yych <= 0x7F) - goto yy628; + goto yy555; if (yych <= 0xBF) - goto yy626; - goto yy628; - yy632: - ++p; - yych = *p; + goto yy553; + goto yy555; + yy558: + yych = *++p; if (yych <= 0x9F) - goto yy628; + goto yy555; if (yych <= 0xBF) - goto yy631; - goto yy628; - yy633: - ++p; - yych = *p; + goto yy557; + goto yy555; + yy559: + yych = *++p; if (yych <= 0x7F) - goto yy628; + goto yy555; if (yych <= 0xBF) - goto yy631; - goto yy628; - yy634: - ++p; - yych = *p; + goto yy557; + goto yy555; + yy560: + yych = *++p; if (yych <= 0x7F) - goto yy628; + goto yy555; if (yych <= 0x9F) - goto yy631; - goto yy628; - yy635: - ++p; - yych = *p; + goto yy557; + goto yy555; + yy561: + yych = *++p; if (yych <= 0x8F) - goto yy628; + goto yy555; if (yych <= 0xBF) - goto yy633; - goto yy628; - yy636: - ++p; - yych = *p; + goto yy559; + goto yy555; + yy562: + yych = *++p; if (yych <= 0x7F) - goto yy628; + goto yy555; if (yych <= 0xBF) - goto yy633; - goto yy628; - yy637: - ++p; - yych = *p; + goto yy559; + goto yy555; + yy563: + yych = *++p; if (yych <= 0x7F) - goto yy628; + goto yy555; if (yych <= 0x8F) - goto yy633; - goto yy628; - yy638: + goto yy559; + goto yy555; + yy564: yyaccept = 1; - marker = ++p; - yych = *p; + yych = *(marker = ++p); if (yybm[0 + yych] & 64) { - goto yy626; + goto yy553; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= '\n') - goto yy639; + goto yy565; if (yych <= '?') - goto yy629; + goto yy556; } else { if (yych <= 0xDF) - goto yy631; + goto yy557; if (yych <= 0xE0) - goto yy632; - goto yy633; + goto yy558; + goto yy559; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy634; + goto yy560; if (yych <= 0xEF) - goto yy633; - goto yy635; + goto yy559; + goto yy561; } else { if (yych <= 0xF3) - goto yy636; + goto yy562; if (yych <= 0xF4) - goto yy637; + goto yy563; } } - yy639 : { return (bufsize_t)(p - start); } + yy565 : { return (bufsize_t)(p - start); } } } @@ -10590,246 +10459,237 @@ bufsize_t _scan_html_block_end_4(const unsigned char *p) { }; yych = *p; if (yybm[0 + yych] & 64) { - goto yy645; + goto yy570; } if (yych <= 0xE0) { if (yych <= '\n') { if (yych <= 0x00) - goto yy642; + goto yy567; if (yych <= '\t') - goto yy644; + goto yy569; } else { if (yych <= 0x7F) - goto yy644; + goto yy569; if (yych <= 0xC1) - goto yy642; + goto yy567; if (yych <= 0xDF) - goto yy648; - goto yy649; + goto yy572; + goto yy573; } } else { if (yych <= 0xEF) { if (yych == 0xED) - goto yy651; - goto yy650; + goto yy575; + goto yy574; } else { if (yych <= 0xF0) - goto yy652; + goto yy576; if (yych <= 0xF3) - goto yy653; + goto yy577; if (yych <= 0xF4) - goto yy654; + goto yy578; } } - yy642: + yy567: ++p; - yy643 : { return 0; } - yy644: + yy568 : { return 0; } + yy569: yyaccept = 0; yych = *(marker = ++p); if (yych <= '\n') { if (yych <= 0x00) - goto yy643; + goto yy568; if (yych <= '\t') - goto yy656; - goto yy643; + goto yy580; + goto yy568; } else { if (yych <= 0x7F) - goto yy656; + goto yy580; if (yych <= 0xC1) - goto yy643; + goto yy568; if (yych <= 0xF4) - goto yy656; - goto yy643; + goto yy580; + goto yy568; } - yy645: + yy570: yyaccept = 1; - marker = ++p; - yych = *p; + yych = *(marker = ++p); if (yybm[0 + yych] & 128) { - goto yy655; + goto yy579; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= '\n') - goto yy647; + goto yy571; if (yych <= '>') - goto yy645; + goto yy570; } else { if (yych <= 0xDF) - goto yy658; + goto yy582; if (yych <= 0xE0) - goto yy659; - goto yy660; + goto yy583; + goto yy584; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy661; + goto yy585; if (yych <= 0xEF) - goto yy660; - goto yy662; + goto yy584; + goto yy586; } else { if (yych <= 0xF3) - goto yy663; + goto yy587; if (yych <= 0xF4) - goto yy664; + goto yy588; } } - yy647 : { return (bufsize_t)(p - start); } - yy648: + yy571 : { return (bufsize_t)(p - start); } + yy572: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy643; + goto yy568; if (yych <= 0xBF) - goto yy655; - goto yy643; - yy649: + goto yy579; + goto yy568; + yy573: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x9F) - goto yy643; + goto yy568; if (yych <= 0xBF) - goto yy658; - goto yy643; - yy650: + goto yy582; + goto yy568; + yy574: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy643; + goto yy568; if (yych <= 0xBF) - goto yy658; - goto yy643; - yy651: + goto yy582; + goto yy568; + yy575: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy643; + goto yy568; if (yych <= 0x9F) - goto yy658; - goto yy643; - yy652: + goto yy582; + goto yy568; + yy576: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x8F) - goto yy643; + goto yy568; if (yych <= 0xBF) - goto yy660; - goto yy643; - yy653: + goto yy584; + goto yy568; + yy577: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy643; + goto yy568; if (yych <= 0xBF) - goto yy660; - goto yy643; - yy654: + goto yy584; + goto yy568; + yy578: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy643; + goto yy568; if (yych <= 0x8F) - goto yy660; - goto yy643; - yy655: - ++p; - yych = *p; - yy656: + goto yy584; + goto yy568; + yy579: + yych = *++p; + yy580: if (yybm[0 + yych] & 128) { - goto yy655; + goto yy579; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= '\n') - goto yy657; + goto yy581; if (yych <= '>') - goto yy645; + goto yy570; } else { if (yych <= 0xDF) - goto yy658; + goto yy582; if (yych <= 0xE0) - goto yy659; - goto yy660; + goto yy583; + goto yy584; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy661; + goto yy585; if (yych <= 0xEF) - goto yy660; - goto yy662; + goto yy584; + goto yy586; } else { if (yych <= 0xF3) - goto yy663; + goto yy587; if (yych <= 0xF4) - goto yy664; + goto yy588; } } - yy657: + yy581: p = marker; if (yyaccept == 0) { - goto yy643; + goto yy568; } else { - goto yy647; + goto yy571; } - yy658: - ++p; - yych = *p; + yy582: + yych = *++p; if (yych <= 0x7F) - goto yy657; + goto yy581; if (yych <= 0xBF) - goto yy655; - goto yy657; - yy659: - ++p; - yych = *p; + goto yy579; + goto yy581; + yy583: + yych = *++p; if (yych <= 0x9F) - goto yy657; + goto yy581; if (yych <= 0xBF) - goto yy658; - goto yy657; - yy660: - ++p; - yych = *p; + goto yy582; + goto yy581; + yy584: + yych = *++p; if (yych <= 0x7F) - goto yy657; + goto yy581; if (yych <= 0xBF) - goto yy658; - goto yy657; - yy661: - ++p; - yych = *p; + goto yy582; + goto yy581; + yy585: + yych = *++p; if (yych <= 0x7F) - goto yy657; + goto yy581; if (yych <= 0x9F) - goto yy658; - goto yy657; - yy662: - ++p; - yych = *p; + goto yy582; + goto yy581; + yy586: + yych = *++p; if (yych <= 0x8F) - goto yy657; + goto yy581; if (yych <= 0xBF) - goto yy660; - goto yy657; - yy663: - ++p; - yych = *p; + goto yy584; + goto yy581; + yy587: + yych = *++p; if (yych <= 0x7F) - goto yy657; + goto yy581; if (yych <= 0xBF) - goto yy660; - goto yy657; - yy664: - ++p; - yych = *p; + goto yy584; + goto yy581; + yy588: + yych = *++p; if (yych <= 0x7F) - goto yy657; + goto yy581; if (yych <= 0x8F) - goto yy660; - goto yy657; + goto yy584; + goto yy581; } } @@ -10862,337 +10722,326 @@ bufsize_t _scan_html_block_end_5(const unsigned char *p) { if (yych <= 0xDF) { if (yych <= '\\') { if (yych <= 0x00) - goto yy667; + goto yy590; if (yych != '\n') - goto yy669; + goto yy592; } else { if (yych <= ']') - goto yy670; + goto yy593; if (yych <= 0x7F) - goto yy669; + goto yy592; if (yych >= 0xC2) - goto yy671; + goto yy594; } } else { if (yych <= 0xEF) { if (yych <= 0xE0) - goto yy672; + goto yy595; if (yych == 0xED) - goto yy674; - goto yy673; + goto yy597; + goto yy596; } else { if (yych <= 0xF0) - goto yy675; + goto yy598; if (yych <= 0xF3) - goto yy676; + goto yy599; if (yych <= 0xF4) - goto yy677; + goto yy600; } } - yy667: + yy590: ++p; - yy668 : { return 0; } - yy669: + yy591 : { return 0; } + yy592: yyaccept = 0; yych = *(marker = ++p); if (yych <= '\n') { if (yych <= 0x00) - goto yy668; + goto yy591; if (yych <= '\t') - goto yy679; - goto yy668; + goto yy602; + goto yy591; } else { if (yych <= 0x7F) - goto yy679; + goto yy602; if (yych <= 0xC1) - goto yy668; + goto yy591; if (yych <= 0xF4) - goto yy679; - goto yy668; + goto yy602; + goto yy591; } - yy670: + yy593: yyaccept = 0; yych = *(marker = ++p); if (yybm[0 + yych] & 128) { - goto yy689; + goto yy612; } if (yych <= '\n') { if (yych <= 0x00) - goto yy668; + goto yy591; if (yych <= '\t') - goto yy679; - goto yy668; + goto yy602; + goto yy591; } else { if (yych <= 0x7F) - goto yy679; + goto yy602; if (yych <= 0xC1) - goto yy668; + goto yy591; if (yych <= 0xF4) - goto yy679; - goto yy668; + goto yy602; + goto yy591; } - yy671: + yy594: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy668; + goto yy591; if (yych <= 0xBF) - goto yy678; - goto yy668; - yy672: + goto yy601; + goto yy591; + yy595: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x9F) - goto yy668; + goto yy591; if (yych <= 0xBF) - goto yy682; - goto yy668; - yy673: + goto yy605; + goto yy591; + yy596: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy668; + goto yy591; if (yych <= 0xBF) - goto yy682; - goto yy668; - yy674: + goto yy605; + goto yy591; + yy597: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy668; + goto yy591; if (yych <= 0x9F) - goto yy682; - goto yy668; - yy675: + goto yy605; + goto yy591; + yy598: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x8F) - goto yy668; + goto yy591; if (yych <= 0xBF) - goto yy684; - goto yy668; - yy676: + goto yy607; + goto yy591; + yy599: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy668; + goto yy591; if (yych <= 0xBF) - goto yy684; - goto yy668; - yy677: + goto yy607; + goto yy591; + yy600: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x7F) - goto yy668; + goto yy591; if (yych <= 0x8F) - goto yy684; - goto yy668; - yy678: - ++p; - yych = *p; - yy679: + goto yy607; + goto yy591; + yy601: + yych = *++p; + yy602: if (yybm[0 + yych] & 64) { - goto yy678; + goto yy601; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= '\n') - goto yy680; + goto yy603; if (yych <= ']') - goto yy681; + goto yy604; } else { if (yych <= 0xDF) - goto yy682; + goto yy605; if (yych <= 0xE0) - goto yy683; - goto yy684; + goto yy606; + goto yy607; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy685; + goto yy608; if (yych <= 0xEF) - goto yy684; - goto yy686; + goto yy607; + goto yy609; } else { if (yych <= 0xF3) - goto yy687; + goto yy610; if (yych <= 0xF4) - goto yy688; + goto yy611; } } - yy680: + yy603: p = marker; if (yyaccept == 0) { - goto yy668; + goto yy591; } else { - goto yy692; + goto yy614; } - yy681: - ++p; - yych = *p; + yy604: + yych = *++p; if (yybm[0 + yych] & 64) { - goto yy678; + goto yy601; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= '\n') - goto yy680; + goto yy603; if (yych <= ']') - goto yy689; - goto yy680; + goto yy612; + goto yy603; } else { if (yych <= 0xDF) - goto yy682; + goto yy605; if (yych <= 0xE0) - goto yy683; - goto yy684; + goto yy606; + goto yy607; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy685; + goto yy608; if (yych <= 0xEF) - goto yy684; - goto yy686; + goto yy607; + goto yy609; } else { if (yych <= 0xF3) - goto yy687; + goto yy610; if (yych <= 0xF4) - goto yy688; - goto yy680; + goto yy611; + goto yy603; } } - yy682: - ++p; - yych = *p; + yy605: + yych = *++p; if (yych <= 0x7F) - goto yy680; + goto yy603; if (yych <= 0xBF) - goto yy678; - goto yy680; - yy683: - ++p; - yych = *p; + goto yy601; + goto yy603; + yy606: + yych = *++p; if (yych <= 0x9F) - goto yy680; + goto yy603; if (yych <= 0xBF) - goto yy682; - goto yy680; - yy684: - ++p; - yych = *p; + goto yy605; + goto yy603; + yy607: + yych = *++p; if (yych <= 0x7F) - goto yy680; + goto yy603; if (yych <= 0xBF) - goto yy682; - goto yy680; - yy685: - ++p; - yych = *p; + goto yy605; + goto yy603; + yy608: + yych = *++p; if (yych <= 0x7F) - goto yy680; + goto yy603; if (yych <= 0x9F) - goto yy682; - goto yy680; - yy686: - ++p; - yych = *p; + goto yy605; + goto yy603; + yy609: + yych = *++p; if (yych <= 0x8F) - goto yy680; + goto yy603; if (yych <= 0xBF) - goto yy684; - goto yy680; - yy687: - ++p; - yych = *p; + goto yy607; + goto yy603; + yy610: + yych = *++p; if (yych <= 0x7F) - goto yy680; + goto yy603; if (yych <= 0xBF) - goto yy684; - goto yy680; - yy688: - ++p; - yych = *p; + goto yy607; + goto yy603; + yy611: + yych = *++p; if (yych <= 0x7F) - goto yy680; + goto yy603; if (yych <= 0x8F) - goto yy684; - goto yy680; - yy689: - ++p; - yych = *p; + goto yy607; + goto yy603; + yy612: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy689; + goto yy612; } if (yych <= 0xDF) { if (yych <= '=') { if (yych <= 0x00) - goto yy680; + goto yy603; if (yych == '\n') - goto yy680; - goto yy678; + goto yy603; + goto yy601; } else { if (yych <= '>') - goto yy691; + goto yy613; if (yych <= 0x7F) - goto yy678; + goto yy601; if (yych <= 0xC1) - goto yy680; - goto yy682; + goto yy603; + goto yy605; } } else { if (yych <= 0xEF) { if (yych <= 0xE0) - goto yy683; + goto yy606; if (yych == 0xED) - goto yy685; - goto yy684; + goto yy608; + goto yy607; } else { if (yych <= 0xF0) - goto yy686; + goto yy609; if (yych <= 0xF3) - goto yy687; + goto yy610; if (yych <= 0xF4) - goto yy688; - goto yy680; + goto yy611; + goto yy603; } } - yy691: + yy613: yyaccept = 1; - marker = ++p; - yych = *p; + yych = *(marker = ++p); if (yybm[0 + yych] & 64) { - goto yy678; + goto yy601; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= '\n') - goto yy692; + goto yy614; if (yych <= ']') - goto yy681; + goto yy604; } else { if (yych <= 0xDF) - goto yy682; + goto yy605; if (yych <= 0xE0) - goto yy683; - goto yy684; + goto yy606; + goto yy607; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy685; + goto yy608; if (yych <= 0xEF) - goto yy684; - goto yy686; + goto yy607; + goto yy609; } else { if (yych <= 0xF3) - goto yy687; + goto yy610; if (yych <= 0xF4) - goto yy688; + goto yy611; } } - yy692 : { return (bufsize_t)(p - start); } + yy614 : { return (bufsize_t)(p - start); } } } @@ -11230,563 +11079,533 @@ bufsize_t _scan_link_title(const unsigned char *p) { yych = *p; if (yych <= '&') { if (yych == '"') - goto yy697; + goto yy617; } else { if (yych <= '\'') - goto yy698; + goto yy618; if (yych <= '(') - goto yy699; + goto yy619; } ++p; - yy696 : { return 0; } - yy697: + yy616 : { return 0; } + yy617: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x00) - goto yy696; + goto yy616; if (yych <= 0x7F) - goto yy701; + goto yy621; if (yych <= 0xC1) - goto yy696; + goto yy616; if (yych <= 0xF4) - goto yy701; - goto yy696; - yy698: + goto yy621; + goto yy616; + yy618: yyaccept = 0; yych = *(marker = ++p); if (yych <= 0x00) - goto yy696; + goto yy616; if (yych <= 0x7F) - goto yy715; + goto yy634; if (yych <= 0xC1) - goto yy696; + goto yy616; if (yych <= 0xF4) - goto yy715; - goto yy696; - yy699: + goto yy634; + goto yy616; + yy619: yyaccept = 0; yych = *(marker = ++p); if (yych <= '(') { if (yych <= 0x00) - goto yy696; + goto yy616; if (yych <= '\'') - goto yy728; - goto yy696; + goto yy646; + goto yy616; } else { if (yych <= 0x7F) - goto yy728; + goto yy646; if (yych <= 0xC1) - goto yy696; + goto yy616; if (yych <= 0xF4) - goto yy728; - goto yy696; + goto yy646; + goto yy616; } - yy700: - ++p; - yych = *p; - yy701: + yy620: + yych = *++p; + yy621: if (yybm[0 + yych] & 16) { - goto yy700; + goto yy620; } if (yych <= 0xE0) { if (yych <= '\\') { if (yych <= 0x00) - goto yy702; + goto yy622; if (yych <= '"') - goto yy703; - goto yy705; + goto yy623; + goto yy625; } else { if (yych <= 0xC1) - goto yy702; + goto yy622; if (yych <= 0xDF) - goto yy707; - goto yy708; + goto yy626; + goto yy627; } } else { if (yych <= 0xEF) { if (yych == 0xED) - goto yy710; - goto yy709; + goto yy629; + goto yy628; } else { if (yych <= 0xF0) - goto yy711; + goto yy630; if (yych <= 0xF3) - goto yy712; + goto yy631; if (yych <= 0xF4) - goto yy713; + goto yy632; } } - yy702: + yy622: p = marker; if (yyaccept <= 1) { if (yyaccept == 0) { - goto yy696; + goto yy616; } else { - goto yy704; + goto yy624; } } else { if (yyaccept == 2) { - goto yy717; + goto yy636; } else { - goto yy730; + goto yy648; } } - yy703: - ++p; - yy704 : { return (bufsize_t)(p - start); } - yy705: + yy623: ++p; - yych = *p; + yy624 : { return (bufsize_t)(p - start); } + yy625: + yych = *++p; if (yybm[0 + yych] & 16) { - goto yy700; + goto yy620; } if (yych <= 0xE0) { if (yych <= '\\') { if (yych <= 0x00) - goto yy702; + goto yy622; if (yych <= '"') - goto yy740; - goto yy705; + goto yy657; + goto yy625; } else { if (yych <= 0xC1) - goto yy702; + goto yy622; if (yych >= 0xE0) - goto yy708; + goto yy627; } } else { if (yych <= 0xEF) { if (yych == 0xED) - goto yy710; - goto yy709; + goto yy629; + goto yy628; } else { if (yych <= 0xF0) - goto yy711; + goto yy630; if (yych <= 0xF3) - goto yy712; + goto yy631; if (yych <= 0xF4) - goto yy713; - goto yy702; + goto yy632; + goto yy622; } } - yy707: - ++p; - yych = *p; + yy626: + yych = *++p; if (yych <= 0x7F) - goto yy702; + goto yy622; if (yych <= 0xBF) - goto yy700; - goto yy702; - yy708: - ++p; - yych = *p; + goto yy620; + goto yy622; + yy627: + yych = *++p; if (yych <= 0x9F) - goto yy702; + goto yy622; if (yych <= 0xBF) - goto yy707; - goto yy702; - yy709: - ++p; - yych = *p; + goto yy626; + goto yy622; + yy628: + yych = *++p; if (yych <= 0x7F) - goto yy702; + goto yy622; if (yych <= 0xBF) - goto yy707; - goto yy702; - yy710: - ++p; - yych = *p; + goto yy626; + goto yy622; + yy629: + yych = *++p; if (yych <= 0x7F) - goto yy702; + goto yy622; if (yych <= 0x9F) - goto yy707; - goto yy702; - yy711: - ++p; - yych = *p; + goto yy626; + goto yy622; + yy630: + yych = *++p; if (yych <= 0x8F) - goto yy702; + goto yy622; if (yych <= 0xBF) - goto yy709; - goto yy702; - yy712: - ++p; - yych = *p; + goto yy628; + goto yy622; + yy631: + yych = *++p; if (yych <= 0x7F) - goto yy702; + goto yy622; if (yych <= 0xBF) - goto yy709; - goto yy702; - yy713: - ++p; - yych = *p; + goto yy628; + goto yy622; + yy632: + yych = *++p; if (yych <= 0x7F) - goto yy702; + goto yy622; if (yych <= 0x8F) - goto yy709; - goto yy702; - yy714: - ++p; - yych = *p; - yy715: + goto yy628; + goto yy622; + yy633: + yych = *++p; + yy634: if (yybm[0 + yych] & 64) { - goto yy714; + goto yy633; } if (yych <= 0xE0) { if (yych <= '\\') { if (yych <= 0x00) - goto yy702; + goto yy622; if (yych >= '(') - goto yy718; + goto yy637; } else { if (yych <= 0xC1) - goto yy702; + goto yy622; if (yych <= 0xDF) - goto yy720; - goto yy721; + goto yy638; + goto yy639; } } else { if (yych <= 0xEF) { if (yych == 0xED) - goto yy723; - goto yy722; + goto yy641; + goto yy640; } else { if (yych <= 0xF0) - goto yy724; + goto yy642; if (yych <= 0xF3) - goto yy725; + goto yy643; if (yych <= 0xF4) - goto yy726; - goto yy702; + goto yy644; + goto yy622; } } - yy716: - ++p; - yy717 : { return (bufsize_t)(p - start); } - yy718: + yy635: ++p; - yych = *p; + yy636 : { return (bufsize_t)(p - start); } + yy637: + yych = *++p; if (yybm[0 + yych] & 64) { - goto yy714; + goto yy633; } if (yych <= 0xE0) { if (yych <= '\\') { if (yych <= 0x00) - goto yy702; + goto yy622; if (yych <= '\'') - goto yy741; - goto yy718; + goto yy658; + goto yy637; } else { if (yych <= 0xC1) - goto yy702; + goto yy622; if (yych >= 0xE0) - goto yy721; + goto yy639; } } else { if (yych <= 0xEF) { if (yych == 0xED) - goto yy723; - goto yy722; + goto yy641; + goto yy640; } else { if (yych <= 0xF0) - goto yy724; + goto yy642; if (yych <= 0xF3) - goto yy725; + goto yy643; if (yych <= 0xF4) - goto yy726; - goto yy702; + goto yy644; + goto yy622; } } - yy720: - ++p; - yych = *p; + yy638: + yych = *++p; if (yych <= 0x7F) - goto yy702; + goto yy622; if (yych <= 0xBF) - goto yy714; - goto yy702; - yy721: - ++p; - yych = *p; + goto yy633; + goto yy622; + yy639: + yych = *++p; if (yych <= 0x9F) - goto yy702; + goto yy622; if (yych <= 0xBF) - goto yy720; - goto yy702; - yy722: - ++p; - yych = *p; + goto yy638; + goto yy622; + yy640: + yych = *++p; if (yych <= 0x7F) - goto yy702; + goto yy622; if (yych <= 0xBF) - goto yy720; - goto yy702; - yy723: - ++p; - yych = *p; + goto yy638; + goto yy622; + yy641: + yych = *++p; if (yych <= 0x7F) - goto yy702; + goto yy622; if (yych <= 0x9F) - goto yy720; - goto yy702; - yy724: - ++p; - yych = *p; + goto yy638; + goto yy622; + yy642: + yych = *++p; if (yych <= 0x8F) - goto yy702; + goto yy622; if (yych <= 0xBF) - goto yy722; - goto yy702; - yy725: - ++p; - yych = *p; + goto yy640; + goto yy622; + yy643: + yych = *++p; if (yych <= 0x7F) - goto yy702; + goto yy622; if (yych <= 0xBF) - goto yy722; - goto yy702; - yy726: - ++p; - yych = *p; + goto yy640; + goto yy622; + yy644: + yych = *++p; if (yych <= 0x7F) - goto yy702; + goto yy622; if (yych <= 0x8F) - goto yy722; - goto yy702; - yy727: - ++p; - yych = *p; - yy728: + goto yy640; + goto yy622; + yy645: + yych = *++p; + yy646: if (yybm[0 + yych] & 128) { - goto yy727; + goto yy645; } if (yych <= 0xE0) { if (yych <= '\\') { if (yych <= '(') - goto yy702; + goto yy622; if (yych >= '*') - goto yy731; + goto yy649; } else { if (yych <= 0xC1) - goto yy702; + goto yy622; if (yych <= 0xDF) - goto yy733; - goto yy734; + goto yy650; + goto yy651; } } else { if (yych <= 0xEF) { if (yych == 0xED) - goto yy736; - goto yy735; + goto yy653; + goto yy652; } else { if (yych <= 0xF0) - goto yy737; + goto yy654; if (yych <= 0xF3) - goto yy738; + goto yy655; if (yych <= 0xF4) - goto yy739; - goto yy702; + goto yy656; + goto yy622; } } - yy729: - ++p; - yy730 : { return (bufsize_t)(p - start); } - yy731: + yy647: ++p; - yych = *p; + yy648 : { return (bufsize_t)(p - start); } + yy649: + yych = *++p; if (yych <= 0xDF) { if (yych <= '[') { if (yych <= 0x00) - goto yy702; + goto yy622; if (yych == ')') - goto yy742; - goto yy727; + goto yy659; + goto yy645; } else { if (yych <= '\\') - goto yy731; + goto yy649; if (yych <= 0x7F) - goto yy727; + goto yy645; if (yych <= 0xC1) - goto yy702; + goto yy622; } } else { if (yych <= 0xEF) { if (yych <= 0xE0) - goto yy734; + goto yy651; if (yych == 0xED) - goto yy736; - goto yy735; + goto yy653; + goto yy652; } else { if (yych <= 0xF0) - goto yy737; + goto yy654; if (yych <= 0xF3) - goto yy738; + goto yy655; if (yych <= 0xF4) - goto yy739; - goto yy702; + goto yy656; + goto yy622; } } - yy733: - ++p; - yych = *p; + yy650: + yych = *++p; if (yych <= 0x7F) - goto yy702; + goto yy622; if (yych <= 0xBF) - goto yy727; - goto yy702; - yy734: - ++p; - yych = *p; + goto yy645; + goto yy622; + yy651: + yych = *++p; if (yych <= 0x9F) - goto yy702; + goto yy622; if (yych <= 0xBF) - goto yy733; - goto yy702; - yy735: - ++p; - yych = *p; + goto yy650; + goto yy622; + yy652: + yych = *++p; if (yych <= 0x7F) - goto yy702; + goto yy622; if (yych <= 0xBF) - goto yy733; - goto yy702; - yy736: - ++p; - yych = *p; + goto yy650; + goto yy622; + yy653: + yych = *++p; if (yych <= 0x7F) - goto yy702; + goto yy622; if (yych <= 0x9F) - goto yy733; - goto yy702; - yy737: - ++p; - yych = *p; + goto yy650; + goto yy622; + yy654: + yych = *++p; if (yych <= 0x8F) - goto yy702; + goto yy622; if (yych <= 0xBF) - goto yy735; - goto yy702; - yy738: - ++p; - yych = *p; + goto yy652; + goto yy622; + yy655: + yych = *++p; if (yych <= 0x7F) - goto yy702; + goto yy622; if (yych <= 0xBF) - goto yy735; - goto yy702; - yy739: - ++p; - yych = *p; + goto yy652; + goto yy622; + yy656: + yych = *++p; if (yych <= 0x7F) - goto yy702; + goto yy622; if (yych <= 0x8F) - goto yy735; - goto yy702; - yy740: + goto yy652; + goto yy622; + yy657: yyaccept = 1; - marker = ++p; - yych = *p; + yych = *(marker = ++p); if (yybm[0 + yych] & 16) { - goto yy700; + goto yy620; } if (yych <= 0xE0) { if (yych <= '\\') { if (yych <= 0x00) - goto yy704; + goto yy624; if (yych <= '"') - goto yy703; - goto yy705; + goto yy623; + goto yy625; } else { if (yych <= 0xC1) - goto yy704; + goto yy624; if (yych <= 0xDF) - goto yy707; - goto yy708; + goto yy626; + goto yy627; } } else { if (yych <= 0xEF) { if (yych == 0xED) - goto yy710; - goto yy709; + goto yy629; + goto yy628; } else { if (yych <= 0xF0) - goto yy711; + goto yy630; if (yych <= 0xF3) - goto yy712; + goto yy631; if (yych <= 0xF4) - goto yy713; - goto yy704; + goto yy632; + goto yy624; } } - yy741: + yy658: yyaccept = 2; - marker = ++p; - yych = *p; + yych = *(marker = ++p); if (yybm[0 + yych] & 64) { - goto yy714; + goto yy633; } if (yych <= 0xE0) { if (yych <= '\\') { if (yych <= 0x00) - goto yy717; + goto yy636; if (yych <= '\'') - goto yy716; - goto yy718; + goto yy635; + goto yy637; } else { if (yych <= 0xC1) - goto yy717; + goto yy636; if (yych <= 0xDF) - goto yy720; - goto yy721; + goto yy638; + goto yy639; } } else { if (yych <= 0xEF) { if (yych == 0xED) - goto yy723; - goto yy722; + goto yy641; + goto yy640; } else { if (yych <= 0xF0) - goto yy724; + goto yy642; if (yych <= 0xF3) - goto yy725; + goto yy643; if (yych <= 0xF4) - goto yy726; - goto yy717; + goto yy644; + goto yy636; } } - yy742: + yy659: yyaccept = 3; - marker = ++p; - yych = *p; + yych = *(marker = ++p); if (yybm[0 + yych] & 128) { - goto yy727; + goto yy645; } if (yych <= 0xE0) { if (yych <= '\\') { if (yych <= '(') - goto yy730; + goto yy648; if (yych <= ')') - goto yy729; - goto yy731; + goto yy647; + goto yy649; } else { if (yych <= 0xC1) - goto yy730; + goto yy648; if (yych <= 0xDF) - goto yy733; - goto yy734; + goto yy650; + goto yy651; } } else { if (yych <= 0xEF) { if (yych == 0xED) - goto yy736; - goto yy735; + goto yy653; + goto yy652; } else { if (yych <= 0xF0) - goto yy737; + goto yy654; if (yych <= 0xF3) - goto yy738; + goto yy655; if (yych <= 0xF4) - goto yy739; - goto yy730; + goto yy656; + goto yy648; } } } @@ -11815,15 +11634,14 @@ bufsize_t _scan_spacechars(const unsigned char *p) { }; yych = *p; if (yybm[0 + yych] & 128) { - goto yy747; + goto yy661; } ++p; { return 0; } - yy747: - ++p; - yych = *p; + yy661: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy747; + goto yy661; } { return (bufsize_t)(p - start); } } @@ -11852,116 +11670,115 @@ bufsize_t _scan_atx_heading_start(const unsigned char *p) { }; yych = *p; if (yych == '#') - goto yy754; + goto yy664; ++p; - yy753 : { return 0; } - yy754: + yy663 : { return 0; } + yy664: yych = *(marker = ++p); if (yybm[0 + yych] & 128) { - goto yy755; + goto yy665; } if (yych <= '\f') { if (yych <= 0x08) - goto yy753; + goto yy663; if (yych <= '\n') - goto yy758; - goto yy753; + goto yy667; + goto yy663; } else { if (yych <= '\r') - goto yy758; + goto yy667; if (yych == '#') - goto yy759; - goto yy753; + goto yy668; + goto yy663; } - yy755: - ++p; - yych = *p; + yy665: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy755; + goto yy665; } - yy757 : { return (bufsize_t)(p - start); } - yy758: - yych = *++p; - goto yy757; - yy759: + yy666 : { return (bufsize_t)(p - start); } + yy667: + ++p; + goto yy666; + yy668: yych = *++p; if (yybm[0 + yych] & 128) { - goto yy755; + goto yy665; } if (yych <= '\f') { if (yych <= 0x08) - goto yy760; + goto yy669; if (yych <= '\n') - goto yy758; + goto yy667; } else { if (yych <= '\r') - goto yy758; + goto yy667; if (yych == '#') - goto yy761; + goto yy670; } - yy760: + yy669: p = marker; - goto yy753; - yy761: + goto yy663; + yy670: yych = *++p; if (yybm[0 + yych] & 128) { - goto yy755; + goto yy665; } if (yych <= '\f') { if (yych <= 0x08) - goto yy760; + goto yy669; if (yych <= '\n') - goto yy758; - goto yy760; + goto yy667; + goto yy669; } else { if (yych <= '\r') - goto yy758; + goto yy667; if (yych != '#') - goto yy760; + goto yy669; } yych = *++p; if (yybm[0 + yych] & 128) { - goto yy755; + goto yy665; } if (yych <= '\f') { if (yych <= 0x08) - goto yy760; + goto yy669; if (yych <= '\n') - goto yy758; - goto yy760; + goto yy667; + goto yy669; } else { if (yych <= '\r') - goto yy758; + goto yy667; if (yych != '#') - goto yy760; + goto yy669; } yych = *++p; if (yybm[0 + yych] & 128) { - goto yy755; + goto yy665; } if (yych <= '\f') { if (yych <= 0x08) - goto yy760; + goto yy669; if (yych <= '\n') - goto yy758; - goto yy760; + goto yy667; + goto yy669; } else { if (yych <= '\r') - goto yy758; + goto yy667; if (yych != '#') - goto yy760; + goto yy669; } - ++p; - if (yybm[0 + (yych = *p)] & 128) { - goto yy755; + yych = *++p; + if (yybm[0 + yych] & 128) { + goto yy665; } if (yych <= 0x08) - goto yy760; + goto yy669; if (yych <= '\n') - goto yy758; + goto yy667; if (yych == '\r') - goto yy758; - goto yy760; + goto yy667; + goto yy669; } } @@ -11988,126 +11805,122 @@ bufsize_t _scan_setext_heading_line(const unsigned char *p) { }; yych = *p; if (yych == '-') - goto yy769; + goto yy673; if (yych == '=') - goto yy770; + goto yy674; ++p; - yy768 : { return 0; } - yy769: + yy672 : { return 0; } + yy673: yych = *(marker = ++p); if (yybm[0 + yych] & 64) { - goto yy776; + goto yy679; } if (yych <= '\f') { if (yych <= 0x08) - goto yy768; + goto yy672; if (yych <= '\n') - goto yy772; - goto yy768; + goto yy676; + goto yy672; } else { if (yych <= '\r') - goto yy772; + goto yy676; if (yych == ' ') - goto yy772; - goto yy768; + goto yy676; + goto yy672; } - yy770: + yy674: yych = *(marker = ++p); if (yybm[0 + yych] & 128) { - goto yy782; + goto yy683; } if (yych <= '\f') { if (yych <= 0x08) - goto yy768; + goto yy672; if (yych <= '\n') - goto yy779; - goto yy768; + goto yy681; + goto yy672; } else { if (yych <= '\r') - goto yy779; + goto yy681; if (yych == ' ') - goto yy779; - goto yy768; + goto yy681; + goto yy672; } - yy771: - ++p; - yych = *p; - yy772: + yy675: + yych = *++p; + yy676: if (yybm[0 + yych] & 32) { - goto yy771; + goto yy675; } if (yych <= 0x08) - goto yy773; + goto yy677; if (yych <= '\n') - goto yy774; + goto yy678; if (yych == '\r') - goto yy774; - yy773: + goto yy678; + yy677: p = marker; - goto yy768; - yy774: + goto yy672; + yy678: ++p; { return 2; } - yy776: - ++p; - yych = *p; + yy679: + yych = *++p; if (yybm[0 + yych] & 32) { - goto yy771; + goto yy675; } if (yych <= '\f') { if (yych <= 0x08) - goto yy773; + goto yy677; if (yych <= '\n') - goto yy774; - goto yy773; + goto yy678; + goto yy677; } else { if (yych <= '\r') - goto yy774; + goto yy678; if (yych == '-') - goto yy776; - goto yy773; + goto yy679; + goto yy677; } - yy778: - ++p; - yych = *p; - yy779: + yy680: + yych = *++p; + yy681: if (yych <= '\f') { if (yych <= 0x08) - goto yy773; + goto yy677; if (yych <= '\t') - goto yy778; + goto yy680; if (yych >= '\v') - goto yy773; + goto yy677; } else { if (yych <= '\r') - goto yy780; + goto yy682; if (yych == ' ') - goto yy778; - goto yy773; + goto yy680; + goto yy677; } - yy780: + yy682: ++p; { return 1; } - yy782: - ++p; - yych = *p; + yy683: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy782; + goto yy683; } if (yych <= '\f') { if (yych <= 0x08) - goto yy773; + goto yy677; if (yych <= '\t') - goto yy778; + goto yy680; if (yych <= '\n') - goto yy780; - goto yy773; + goto yy682; + goto yy677; } else { if (yych <= '\r') - goto yy780; + goto yy682; if (yych == ' ') - goto yy778; - goto yy773; + goto yy680; + goto yy677; } } } @@ -12142,299 +11955,321 @@ bufsize_t _scan_open_code_fence(const unsigned char *p) { }; yych = *p; if (yych == '`') - goto yy788; + goto yy686; if (yych == '~') - goto yy789; + goto yy687; ++p; - yy787 : { return 0; } - yy788: + yy685 : { return 0; } + yy686: yych = *(marker = ++p); if (yych == '`') - goto yy790; - goto yy787; - yy789: + goto yy688; + goto yy685; + yy687: yych = *(marker = ++p); if (yych == '~') - goto yy792; - goto yy787; - yy790: + goto yy690; + goto yy685; + yy688: yych = *++p; if (yybm[0 + yych] & 16) { - goto yy793; + goto yy691; } - yy791: + yy689: p = marker; - goto yy787; - yy792: + goto yy685; + yy690: yych = *++p; if (yybm[0 + yych] & 32) { - goto yy795; + goto yy692; } - goto yy791; - yy793: - ++p; - yych = *p; - marker = p; - if (yybm[0 + yych] & 64) { - goto yy797; + goto yy689; + yy691: + yych = *++p; + if (yybm[0 + yych] & 16) { + goto yy691; } - if (yych <= 0xE0) { - if (yych <= '`') { + if (yych <= 0xDF) { + if (yych <= '\f') { if (yych <= 0x00) - goto yy791; - if (yych <= '\r') - goto yy799; - goto yy793; + goto yy689; + if (yych == '\n') { + marker = p; + goto yy694; + } + marker = p; + goto yy693; } else { + if (yych <= '\r') { + marker = p; + goto yy694; + } + if (yych <= 0x7F) { + marker = p; + goto yy693; + } if (yych <= 0xC1) - goto yy791; - if (yych <= 0xDF) - goto yy801; - goto yy802; + goto yy689; + marker = p; + goto yy695; } } else { if (yych <= 0xEF) { - if (yych == 0xED) - goto yy804; - goto yy803; + if (yych <= 0xE0) { + marker = p; + goto yy696; + } + if (yych == 0xED) { + marker = p; + goto yy698; + } + marker = p; + goto yy697; } else { - if (yych <= 0xF0) - goto yy805; - if (yych <= 0xF3) - goto yy806; - if (yych <= 0xF4) - goto yy807; - goto yy791; + if (yych <= 0xF0) { + marker = p; + goto yy699; + } + if (yych <= 0xF3) { + marker = p; + goto yy700; + } + if (yych <= 0xF4) { + marker = p; + goto yy701; + } + goto yy689; } } - yy795: - ++p; - yych = *p; - marker = p; + yy692: + yych = *++p; if (yybm[0 + yych] & 32) { - goto yy795; + goto yy692; } if (yych <= 0xDF) { if (yych <= '\f') { if (yych <= 0x00) - goto yy791; - if (yych == '\n') - goto yy810; - goto yy808; + goto yy689; + if (yych == '\n') { + marker = p; + goto yy703; + } + marker = p; + goto yy702; } else { - if (yych <= '\r') - goto yy810; - if (yych <= 0x7F) - goto yy808; + if (yych <= '\r') { + marker = p; + goto yy703; + } + if (yych <= 0x7F) { + marker = p; + goto yy702; + } if (yych <= 0xC1) - goto yy791; - goto yy812; + goto yy689; + marker = p; + goto yy704; } } else { if (yych <= 0xEF) { - if (yych <= 0xE0) - goto yy813; - if (yych == 0xED) - goto yy815; - goto yy814; + if (yych <= 0xE0) { + marker = p; + goto yy705; + } + if (yych == 0xED) { + marker = p; + goto yy707; + } + marker = p; + goto yy706; } else { - if (yych <= 0xF0) - goto yy816; - if (yych <= 0xF3) - goto yy817; - if (yych <= 0xF4) - goto yy818; - goto yy791; + if (yych <= 0xF0) { + marker = p; + goto yy708; + } + if (yych <= 0xF3) { + marker = p; + goto yy709; + } + if (yych <= 0xF4) { + marker = p; + goto yy710; + } + goto yy689; } } - yy797: - ++p; - yych = *p; + yy693: + yych = *++p; if (yybm[0 + yych] & 64) { - goto yy797; + goto yy693; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= 0x00) - goto yy791; + goto yy689; if (yych >= 0x0E) - goto yy791; + goto yy689; } else { if (yych <= 0xDF) - goto yy801; + goto yy695; if (yych <= 0xE0) - goto yy802; - goto yy803; + goto yy696; + goto yy697; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy804; + goto yy698; if (yych <= 0xEF) - goto yy803; - goto yy805; + goto yy697; + goto yy699; } else { if (yych <= 0xF3) - goto yy806; + goto yy700; if (yych <= 0xF4) - goto yy807; - goto yy791; + goto yy701; + goto yy689; } } - yy799: + yy694: ++p; p = marker; { return (bufsize_t)(p - start); } - yy801: - ++p; - yych = *p; + yy695: + yych = *++p; if (yych <= 0x7F) - goto yy791; + goto yy689; if (yych <= 0xBF) - goto yy797; - goto yy791; - yy802: - ++p; - yych = *p; + goto yy693; + goto yy689; + yy696: + yych = *++p; if (yych <= 0x9F) - goto yy791; + goto yy689; if (yych <= 0xBF) - goto yy801; - goto yy791; - yy803: - ++p; - yych = *p; + goto yy695; + goto yy689; + yy697: + yych = *++p; if (yych <= 0x7F) - goto yy791; + goto yy689; if (yych <= 0xBF) - goto yy801; - goto yy791; - yy804: - ++p; - yych = *p; + goto yy695; + goto yy689; + yy698: + yych = *++p; if (yych <= 0x7F) - goto yy791; + goto yy689; if (yych <= 0x9F) - goto yy801; - goto yy791; - yy805: - ++p; - yych = *p; + goto yy695; + goto yy689; + yy699: + yych = *++p; if (yych <= 0x8F) - goto yy791; + goto yy689; if (yych <= 0xBF) - goto yy803; - goto yy791; - yy806: - ++p; - yych = *p; + goto yy697; + goto yy689; + yy700: + yych = *++p; if (yych <= 0x7F) - goto yy791; + goto yy689; if (yych <= 0xBF) - goto yy803; - goto yy791; - yy807: - ++p; - yych = *p; + goto yy697; + goto yy689; + yy701: + yych = *++p; if (yych <= 0x7F) - goto yy791; + goto yy689; if (yych <= 0x8F) - goto yy803; - goto yy791; - yy808: - ++p; - yych = *p; + goto yy697; + goto yy689; + yy702: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy808; + goto yy702; } if (yych <= 0xEC) { if (yych <= 0xC1) { if (yych <= 0x00) - goto yy791; + goto yy689; if (yych >= 0x0E) - goto yy791; + goto yy689; } else { if (yych <= 0xDF) - goto yy812; + goto yy704; if (yych <= 0xE0) - goto yy813; - goto yy814; + goto yy705; + goto yy706; } } else { if (yych <= 0xF0) { if (yych <= 0xED) - goto yy815; + goto yy707; if (yych <= 0xEF) - goto yy814; - goto yy816; + goto yy706; + goto yy708; } else { if (yych <= 0xF3) - goto yy817; + goto yy709; if (yych <= 0xF4) - goto yy818; - goto yy791; + goto yy710; + goto yy689; } } - yy810: + yy703: ++p; p = marker; { return (bufsize_t)(p - start); } - yy812: - ++p; - yych = *p; + yy704: + yych = *++p; if (yych <= 0x7F) - goto yy791; + goto yy689; if (yych <= 0xBF) - goto yy808; - goto yy791; - yy813: - ++p; - yych = *p; + goto yy702; + goto yy689; + yy705: + yych = *++p; if (yych <= 0x9F) - goto yy791; + goto yy689; if (yych <= 0xBF) - goto yy812; - goto yy791; - yy814: - ++p; - yych = *p; + goto yy704; + goto yy689; + yy706: + yych = *++p; if (yych <= 0x7F) - goto yy791; + goto yy689; if (yych <= 0xBF) - goto yy812; - goto yy791; - yy815: - ++p; - yych = *p; + goto yy704; + goto yy689; + yy707: + yych = *++p; if (yych <= 0x7F) - goto yy791; + goto yy689; if (yych <= 0x9F) - goto yy812; - goto yy791; - yy816: - ++p; - yych = *p; + goto yy704; + goto yy689; + yy708: + yych = *++p; if (yych <= 0x8F) - goto yy791; + goto yy689; if (yych <= 0xBF) - goto yy814; - goto yy791; - yy817: - ++p; - yych = *p; + goto yy706; + goto yy689; + yy709: + yych = *++p; if (yych <= 0x7F) - goto yy791; + goto yy689; if (yych <= 0xBF) - goto yy814; - goto yy791; - yy818: - ++p; - yych = *p; + goto yy706; + goto yy689; + yy710: + yych = *++p; if (yych <= 0x7F) - goto yy791; + goto yy689; if (yych <= 0x8F) - goto yy814; - goto yy791; + goto yy706; + goto yy689; } } @@ -12461,111 +12296,123 @@ bufsize_t _scan_close_code_fence(const unsigned char *p) { }; yych = *p; if (yych == '`') - goto yy823; + goto yy713; if (yych == '~') - goto yy824; + goto yy714; ++p; - yy822 : { return 0; } - yy823: + yy712 : { return 0; } + yy713: yych = *(marker = ++p); if (yych == '`') - goto yy825; - goto yy822; - yy824: + goto yy715; + goto yy712; + yy714: yych = *(marker = ++p); if (yych == '~') - goto yy827; - goto yy822; - yy825: + goto yy717; + goto yy712; + yy715: yych = *++p; if (yybm[0 + yych] & 32) { - goto yy828; + goto yy718; } - yy826: + yy716: p = marker; - goto yy822; - yy827: + goto yy712; + yy717: yych = *++p; if (yybm[0 + yych] & 64) { - goto yy830; + goto yy719; } - goto yy826; - yy828: - ++p; - yych = *p; - marker = p; - if (yybm[0 + yych] & 128) { - goto yy832; + goto yy716; + yy718: + yych = *++p; + if (yybm[0 + yych] & 32) { + goto yy718; } if (yych <= '\f') { if (yych <= 0x08) - goto yy826; - if (yych <= '\n') - goto yy834; - goto yy826; + goto yy716; + if (yych <= '\t') { + marker = p; + goto yy720; + } + if (yych <= '\n') { + marker = p; + goto yy721; + } + goto yy716; } else { - if (yych <= '\r') - goto yy834; - if (yych == '`') - goto yy828; - goto yy826; + if (yych <= '\r') { + marker = p; + goto yy721; + } + if (yych == ' ') { + marker = p; + goto yy720; + } + goto yy716; } - yy830: - ++p; - yych = *p; - marker = p; + yy719: + yych = *++p; if (yybm[0 + yych] & 64) { - goto yy830; + goto yy719; } if (yych <= '\f') { if (yych <= 0x08) - goto yy826; - if (yych <= '\t') - goto yy836; - if (yych <= '\n') - goto yy838; - goto yy826; + goto yy716; + if (yych <= '\t') { + marker = p; + goto yy722; + } + if (yych <= '\n') { + marker = p; + goto yy723; + } + goto yy716; } else { - if (yych <= '\r') - goto yy838; - if (yych == ' ') - goto yy836; - goto yy826; + if (yych <= '\r') { + marker = p; + goto yy723; + } + if (yych == ' ') { + marker = p; + goto yy722; + } + goto yy716; } - yy832: - ++p; - yych = *p; + yy720: + yych = *++p; if (yybm[0 + yych] & 128) { - goto yy832; + goto yy720; } if (yych <= 0x08) - goto yy826; + goto yy716; if (yych <= '\n') - goto yy834; + goto yy721; if (yych != '\r') - goto yy826; - yy834: + goto yy716; + yy721: ++p; p = marker; { return (bufsize_t)(p - start); } - yy836: - ++p; - yych = *p; + yy722: + yych = *++p; if (yych <= '\f') { if (yych <= 0x08) - goto yy826; + goto yy716; if (yych <= '\t') - goto yy836; + goto yy722; if (yych >= '\v') - goto yy826; + goto yy716; } else { if (yych <= '\r') - goto yy838; + goto yy723; if (yych == ' ') - goto yy836; - goto yy826; + goto yy722; + goto yy716; } - yy838: + yy723: ++p; p = marker; { return (bufsize_t)(p - start); } @@ -12582,890 +12429,890 @@ bufsize_t _scan_entity(const unsigned char *p) { unsigned char yych; yych = *p; if (yych == '&') - goto yy844; + goto yy726; ++p; - yy843 : { return 0; } - yy844: + yy725 : { return 0; } + yy726: yych = *(marker = ++p); if (yych <= '@') { if (yych != '#') - goto yy843; + goto yy725; } else { if (yych <= 'Z') - goto yy847; + goto yy728; if (yych <= '`') - goto yy843; + goto yy725; if (yych <= 'z') - goto yy847; - goto yy843; + goto yy728; + goto yy725; } yych = *++p; if (yych <= 'W') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy848; + goto yy729; } else { if (yych <= 'X') - goto yy849; + goto yy730; if (yych == 'x') - goto yy849; + goto yy730; } - yy846: + yy727: p = marker; - goto yy843; - yy847: + goto yy725; + yy728: yych = *++p; if (yych <= '@') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy850; - goto yy846; + goto yy731; + goto yy727; } else { if (yych <= 'Z') - goto yy850; + goto yy731; if (yych <= '`') - goto yy846; + goto yy727; if (yych <= 'z') - goto yy850; - goto yy846; + goto yy731; + goto yy727; } - yy848: + yy729: yych = *++p; if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy851; + goto yy732; if (yych == ';') - goto yy852; - goto yy846; - yy849: + goto yy733; + goto yy727; + yy730: yych = *++p; if (yych <= '@') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy854; - goto yy846; + goto yy734; + goto yy727; } else { if (yych <= 'F') - goto yy854; + goto yy734; if (yych <= '`') - goto yy846; + goto yy727; if (yych <= 'f') - goto yy854; - goto yy846; + goto yy734; + goto yy727; } - yy850: + yy731: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy855; + goto yy735; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; - goto yy855; + goto yy727; + goto yy735; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych <= 'z') - goto yy855; - goto yy846; + goto yy735; + goto yy727; } } - yy851: + yy732: yych = *++p; if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy856; + goto yy736; if (yych != ';') - goto yy846; - yy852: + goto yy727; + yy733: ++p; { return (bufsize_t)(p - start); } - yy854: + yy734: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy857; + goto yy737; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'F') { if (yych <= '@') - goto yy846; - goto yy857; + goto yy727; + goto yy737; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych <= 'f') - goto yy857; - goto yy846; + goto yy737; + goto yy727; } } - yy855: + yy735: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy858; + goto yy738; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; - goto yy858; + goto yy727; + goto yy738; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych <= 'z') - goto yy858; - goto yy846; + goto yy738; + goto yy727; } } - yy856: + yy736: yych = *++p; if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy859; + goto yy739; if (yych == ';') - goto yy852; - goto yy846; - yy857: + goto yy733; + goto yy727; + yy737: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy860; + goto yy740; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'F') { if (yych <= '@') - goto yy846; - goto yy860; + goto yy727; + goto yy740; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych <= 'f') - goto yy860; - goto yy846; + goto yy740; + goto yy727; } } - yy858: + yy738: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy861; + goto yy741; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; - goto yy861; + goto yy727; + goto yy741; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych <= 'z') - goto yy861; - goto yy846; + goto yy741; + goto yy727; } } - yy859: + yy739: yych = *++p; if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy862; + goto yy742; if (yych == ';') - goto yy852; - goto yy846; - yy860: + goto yy733; + goto yy727; + yy740: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy863; + goto yy743; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'F') { if (yych <= '@') - goto yy846; - goto yy863; + goto yy727; + goto yy743; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych <= 'f') - goto yy863; - goto yy846; + goto yy743; + goto yy727; } } - yy861: + yy741: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy864; + goto yy744; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; - goto yy864; + goto yy727; + goto yy744; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych <= 'z') - goto yy864; - goto yy846; + goto yy744; + goto yy727; } } - yy862: + yy742: yych = *++p; if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy865; + goto yy745; if (yych == ';') - goto yy852; - goto yy846; - yy863: + goto yy733; + goto yy727; + yy743: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy866; + goto yy746; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'F') { if (yych <= '@') - goto yy846; - goto yy866; + goto yy727; + goto yy746; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych <= 'f') - goto yy866; - goto yy846; + goto yy746; + goto yy727; } } - yy864: + yy744: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy867; + goto yy747; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; - goto yy867; + goto yy727; + goto yy747; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych <= 'z') - goto yy867; - goto yy846; + goto yy747; + goto yy727; } } - yy865: + yy745: yych = *++p; if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy868; + goto yy748; if (yych == ';') - goto yy852; - goto yy846; - yy866: + goto yy733; + goto yy727; + yy746: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy868; + goto yy748; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'F') { if (yych <= '@') - goto yy846; - goto yy868; + goto yy727; + goto yy748; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych <= 'f') - goto yy868; - goto yy846; + goto yy748; + goto yy727; } } - yy867: + yy747: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy869; + goto yy749; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; - goto yy869; + goto yy727; + goto yy749; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych <= 'z') - goto yy869; - goto yy846; + goto yy749; + goto yy727; } } - yy868: + yy748: yych = *++p; if (yych == ';') - goto yy852; - goto yy846; - yy869: + goto yy733; + goto yy727; + yy749: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy870; + goto yy750; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy870: + yy750: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy871; + goto yy751; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy871: + yy751: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy872; + goto yy752; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy872: + yy752: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy873; + goto yy753; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy873: + yy753: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy874; + goto yy754; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy874: + yy754: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy875; + goto yy755; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy875: + yy755: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy876; + goto yy756; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy876: + yy756: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy877; + goto yy757; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy877: + yy757: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy878; + goto yy758; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy878: + yy758: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy879; + goto yy759; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy879: + yy759: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy880; + goto yy760; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy880: + yy760: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy881; + goto yy761; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy881: + yy761: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy882; + goto yy762; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy882: + yy762: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy883; + goto yy763; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy883: + yy763: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy884; + goto yy764; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy884: + yy764: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy885; + goto yy765; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy885: + yy765: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy886; + goto yy766; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy886: + yy766: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy887; + goto yy767; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy887: + yy767: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy888; + goto yy768; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy888: + yy768: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy889; + goto yy769; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy889: + yy769: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy890; + goto yy770; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy890: + yy770: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy891; + goto yy771; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy891: + yy771: yych = *++p; if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy892; + goto yy772; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; + goto yy727; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych >= '{') - goto yy846; + goto yy727; } } - yy892: - ++p; - if ((yych = *p) <= ';') { + yy772: + yych = *++p; + if (yych <= ';') { if (yych <= '/') - goto yy846; + goto yy727; if (yych <= '9') - goto yy868; + goto yy748; if (yych <= ':') - goto yy846; - goto yy852; + goto yy727; + goto yy733; } else { if (yych <= 'Z') { if (yych <= '@') - goto yy846; - goto yy868; + goto yy727; + goto yy748; } else { if (yych <= '`') - goto yy846; + goto yy727; if (yych <= 'z') - goto yy868; - goto yy846; + goto yy748; + goto yy727; } } } @@ -13484,304 +13331,304 @@ bufsize_t _scan_dangerous_url(const unsigned char *p) { if (yych <= 'V') { if (yych <= 'F') { if (yych == 'D') - goto yy897; + goto yy775; if (yych >= 'F') - goto yy898; + goto yy776; } else { if (yych == 'J') - goto yy899; + goto yy777; if (yych >= 'V') - goto yy900; + goto yy778; } } else { if (yych <= 'f') { if (yych == 'd') - goto yy897; + goto yy775; if (yych >= 'f') - goto yy898; + goto yy776; } else { if (yych <= 'j') { if (yych >= 'j') - goto yy899; + goto yy777; } else { if (yych == 'v') - goto yy900; + goto yy778; } } } ++p; - yy896 : { return 0; } - yy897: + yy774 : { return 0; } + yy775: yyaccept = 0; yych = *(marker = ++p); if (yych == 'A') - goto yy901; + goto yy779; if (yych == 'a') - goto yy901; - goto yy896; - yy898: + goto yy779; + goto yy774; + yy776: yyaccept = 0; yych = *(marker = ++p); if (yych == 'I') - goto yy903; + goto yy781; if (yych == 'i') - goto yy903; - goto yy896; - yy899: + goto yy781; + goto yy774; + yy777: yyaccept = 0; yych = *(marker = ++p); if (yych == 'A') - goto yy904; + goto yy782; if (yych == 'a') - goto yy904; - goto yy896; - yy900: + goto yy782; + goto yy774; + yy778: yyaccept = 0; yych = *(marker = ++p); if (yych == 'B') - goto yy905; + goto yy783; if (yych == 'b') - goto yy905; - goto yy896; - yy901: + goto yy783; + goto yy774; + yy779: yych = *++p; if (yych == 'T') - goto yy906; + goto yy784; if (yych == 't') - goto yy906; - yy902: + goto yy784; + yy780: p = marker; if (yyaccept == 0) { - goto yy896; + goto yy774; } else { - goto yy914; + goto yy792; } - yy903: + yy781: yych = *++p; if (yych == 'L') - goto yy907; + goto yy785; if (yych == 'l') - goto yy907; - goto yy902; - yy904: + goto yy785; + goto yy780; + yy782: yych = *++p; if (yych == 'V') - goto yy908; + goto yy786; if (yych == 'v') - goto yy908; - goto yy902; - yy905: + goto yy786; + goto yy780; + yy783: yych = *++p; if (yych == 'S') - goto yy909; + goto yy787; if (yych == 's') - goto yy909; - goto yy902; - yy906: + goto yy787; + goto yy780; + yy784: yych = *++p; if (yych == 'A') - goto yy910; + goto yy788; if (yych == 'a') - goto yy910; - goto yy902; - yy907: + goto yy788; + goto yy780; + yy785: yych = *++p; if (yych == 'E') - goto yy911; + goto yy789; if (yych == 'e') - goto yy911; - goto yy902; - yy908: + goto yy789; + goto yy780; + yy786: yych = *++p; if (yych == 'A') - goto yy905; + goto yy783; if (yych == 'a') - goto yy905; - goto yy902; - yy909: + goto yy783; + goto yy780; + yy787: yych = *++p; if (yych == 'C') - goto yy912; + goto yy790; if (yych == 'c') - goto yy912; - goto yy902; - yy910: + goto yy790; + goto yy780; + yy788: yych = *++p; if (yych == ':') - goto yy913; - goto yy902; - yy911: + goto yy791; + goto yy780; + yy789: yych = *++p; if (yych == ':') - goto yy915; - goto yy902; - yy912: + goto yy793; + goto yy780; + yy790: yych = *++p; if (yych == 'R') - goto yy916; + goto yy794; if (yych == 'r') - goto yy916; - goto yy902; - yy913: + goto yy794; + goto yy780; + yy791: yyaccept = 1; yych = *(marker = ++p); if (yych == 'I') - goto yy917; + goto yy795; if (yych == 'i') - goto yy917; - yy914 : { return (bufsize_t)(p - start); } - yy915: - yych = *++p; - goto yy914; - yy916: + goto yy795; + yy792 : { return (bufsize_t)(p - start); } + yy793: + ++p; + goto yy792; + yy794: yych = *++p; if (yych == 'I') - goto yy918; + goto yy796; if (yych == 'i') - goto yy918; - goto yy902; - yy917: + goto yy796; + goto yy780; + yy795: yych = *++p; if (yych == 'M') - goto yy919; + goto yy797; if (yych == 'm') - goto yy919; - goto yy902; - yy918: + goto yy797; + goto yy780; + yy796: yych = *++p; if (yych == 'P') - goto yy920; + goto yy798; if (yych == 'p') - goto yy920; - goto yy902; - yy919: + goto yy798; + goto yy780; + yy797: yych = *++p; if (yych == 'A') - goto yy921; + goto yy799; if (yych == 'a') - goto yy921; - goto yy902; - yy920: + goto yy799; + goto yy780; + yy798: yych = *++p; if (yych == 'T') - goto yy911; + goto yy789; if (yych == 't') - goto yy911; - goto yy902; - yy921: + goto yy789; + goto yy780; + yy799: yych = *++p; if (yych == 'G') - goto yy922; + goto yy800; if (yych != 'g') - goto yy902; - yy922: + goto yy780; + yy800: yych = *++p; if (yych == 'E') - goto yy923; + goto yy801; if (yych != 'e') - goto yy902; - yy923: + goto yy780; + yy801: yych = *++p; if (yych != '/') - goto yy902; + goto yy780; yych = *++p; if (yych <= 'W') { if (yych <= 'J') { if (yych == 'G') - goto yy925; + goto yy802; if (yych <= 'I') - goto yy902; - goto yy926; + goto yy780; + goto yy803; } else { if (yych == 'P') - goto yy927; + goto yy804; if (yych <= 'V') - goto yy902; - goto yy928; + goto yy780; + goto yy805; } } else { if (yych <= 'j') { if (yych == 'g') - goto yy925; + goto yy802; if (yych <= 'i') - goto yy902; - goto yy926; + goto yy780; + goto yy803; } else { if (yych <= 'p') { if (yych <= 'o') - goto yy902; - goto yy927; + goto yy780; + goto yy804; } else { if (yych == 'w') - goto yy928; - goto yy902; + goto yy805; + goto yy780; } } } - yy925: + yy802: yych = *++p; if (yych == 'I') - goto yy929; + goto yy806; if (yych == 'i') - goto yy929; - goto yy902; - yy926: + goto yy806; + goto yy780; + yy803: yych = *++p; if (yych == 'P') - goto yy930; + goto yy807; if (yych == 'p') - goto yy930; - goto yy902; - yy927: + goto yy807; + goto yy780; + yy804: yych = *++p; if (yych == 'N') - goto yy931; + goto yy808; if (yych == 'n') - goto yy931; - goto yy902; - yy928: + goto yy808; + goto yy780; + yy805: yych = *++p; if (yych == 'E') - goto yy932; + goto yy809; if (yych == 'e') - goto yy932; - goto yy902; - yy929: + goto yy809; + goto yy780; + yy806: yych = *++p; if (yych == 'F') - goto yy933; + goto yy810; if (yych == 'f') - goto yy933; - goto yy902; - yy930: + goto yy810; + goto yy780; + yy807: yych = *++p; if (yych == 'E') - goto yy931; + goto yy808; if (yych != 'e') - goto yy902; - yy931: + goto yy780; + yy808: yych = *++p; if (yych == 'G') - goto yy933; + goto yy810; if (yych == 'g') - goto yy933; - goto yy902; - yy932: + goto yy810; + goto yy780; + yy809: yych = *++p; if (yych == 'B') - goto yy935; + goto yy811; if (yych == 'b') - goto yy935; - goto yy902; - yy933: + goto yy811; + goto yy780; + yy810: ++p; { return 0; } - yy935: - ++p; - if ((yych = *p) == 'P') - goto yy933; + yy811: + yych = *++p; + if (yych == 'P') + goto yy810; if (yych == 'p') - goto yy933; - goto yy902; + goto yy810; + goto yy780; } } diff --git a/cbits/scanners.h b/cbits/scanners.h index bcb5fe8..92f654d 100644 --- a/cbits/scanners.h +++ b/cbits/scanners.h @@ -11,6 +11,10 @@ bufsize_t _scan_scheme(const unsigned char *p); bufsize_t _scan_autolink_uri(const unsigned char *p); bufsize_t _scan_autolink_email(const unsigned char *p); bufsize_t _scan_html_tag(const unsigned char *p); +bufsize_t _scan_html_comment(const unsigned char *p); +bufsize_t _scan_html_pi(const unsigned char *p); +bufsize_t _scan_html_declaration(const unsigned char *p); +bufsize_t _scan_html_cdata(const unsigned char *p); bufsize_t _scan_html_block_start(const unsigned char *p); bufsize_t _scan_html_block_start_7(const unsigned char *p); bufsize_t _scan_html_block_end_1(const unsigned char *p); @@ -31,6 +35,10 @@ bufsize_t _scan_dangerous_url(const unsigned char *p); #define scan_autolink_uri(c, n) _scan_at(&_scan_autolink_uri, c, n) #define scan_autolink_email(c, n) _scan_at(&_scan_autolink_email, c, n) #define scan_html_tag(c, n) _scan_at(&_scan_html_tag, c, n) +#define scan_html_comment(c, n) _scan_at(&_scan_html_comment, c, n) +#define scan_html_pi(c, n) _scan_at(&_scan_html_pi, c, n) +#define scan_html_declaration(c, n) _scan_at(&_scan_html_declaration, c, n) +#define scan_html_cdata(c, n) _scan_at(&_scan_html_cdata, c, n) #define scan_html_block_start(c, n) _scan_at(&_scan_html_block_start, c, n) #define scan_html_block_start_7(c, n) _scan_at(&_scan_html_block_start_7, c, n) #define scan_html_block_end_1(c, n) _scan_at(&_scan_html_block_end_1, c, n) diff --git a/cbits/xml.c b/cbits/xml.c index 48674cc..45589b9 100644 --- a/cbits/xml.c +++ b/cbits/xml.c @@ -7,15 +7,74 @@ #include "cmark.h" #include "node.h" #include "buffer.h" -#include "houdini.h" #define BUFFER_SIZE 100 +#define MAX_INDENT 40 // Functions to convert cmark_nodes to XML strings. -static void escape_xml(cmark_strbuf *dest, const unsigned char *source, - bufsize_t length) { - houdini_escape_html0(dest, source, length, 0); +// C0 control characters, U+FFFE and U+FFF aren't allowed in XML. +static const char XML_ESCAPE_TABLE[256] = { + /* 0x00 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, + /* 0x10 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + /* 0x20 */ 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 5, 0, + /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* 0xA0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* 0xB0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, + /* 0xC0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* 0xD0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* 0xE0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* 0xF0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + +// U+FFFD Replacement Character encoded in UTF-8 +#define UTF8_REPL "\xEF\xBF\xBD" + +static const char *XML_ESCAPES[] = { + "", UTF8_REPL, """, "&", "<", ">" +}; + +static void escape_xml(cmark_strbuf *ob, const unsigned char *src, + bufsize_t size) { + bufsize_t i = 0, org, esc = 0; + + while (i < size) { + org = i; + while (i < size && (esc = XML_ESCAPE_TABLE[src[i]]) == 0) + i++; + + if (i > org) + cmark_strbuf_put(ob, src + org, i - org); + + if (i >= size) + break; + + if (esc == 9) { + // To replace U+FFFE and U+FFFF with U+FFFD, only the last byte has to + // be changed. + // We know that src[i] is 0xBE or 0xBF. + if (i >= 2 && src[i-2] == 0xEF && src[i-1] == 0xBF) { + cmark_strbuf_putc(ob, 0xBD); + } else { + cmark_strbuf_putc(ob, src[i]); + } + } else { + cmark_strbuf_puts(ob, XML_ESCAPES[esc]); + } + + i++; + } +} + +static void escape_xml_str(cmark_strbuf *dest, const unsigned char *source) { + if (source) + escape_xml(dest, source, strlen((char *)source)); } struct render_state { @@ -25,7 +84,7 @@ struct render_state { static CMARK_INLINE void indent(struct render_state *state) { int i; - for (i = 0; i < state->indent; i++) { + for (i = 0; i < state->indent && i < MAX_INDENT; i++) { cmark_strbuf_putc(state->xml, ' '); } } @@ -61,7 +120,7 @@ static int S_render_node(cmark_node *node, cmark_event_type ev_type, case CMARK_NODE_HTML_BLOCK: case CMARK_NODE_HTML_INLINE: cmark_strbuf_puts(xml, " xml:space=\"preserve\">"); - escape_xml(xml, node->as.literal.data, node->as.literal.len); + escape_xml(xml, node->data, node->len); cmark_strbuf_puts(xml, "as.code.info.len > 0) { + if (node->as.code.info) { cmark_strbuf_puts(xml, " info=\""); - escape_xml(xml, node->as.code.info.data, node->as.code.info.len); + escape_xml_str(xml, node->as.code.info); cmark_strbuf_putc(xml, '"'); } cmark_strbuf_puts(xml, " xml:space=\"preserve\">"); - escape_xml(xml, node->as.code.literal.data, node->as.code.literal.len); + escape_xml(xml, node->data, node->len); cmark_strbuf_puts(xml, "as.custom.on_enter.data, - node->as.custom.on_enter.len); + escape_xml_str(xml, node->as.custom.on_enter); cmark_strbuf_putc(xml, '"'); cmark_strbuf_puts(xml, " on_exit=\""); - escape_xml(xml, node->as.custom.on_exit.data, - node->as.custom.on_exit.len); + escape_xml_str(xml, node->as.custom.on_exit); cmark_strbuf_putc(xml, '"'); break; case CMARK_NODE_LINK: case CMARK_NODE_IMAGE: cmark_strbuf_puts(xml, " destination=\""); - escape_xml(xml, node->as.link.url.data, node->as.link.url.len); - cmark_strbuf_putc(xml, '"'); - cmark_strbuf_puts(xml, " title=\""); - escape_xml(xml, node->as.link.title.data, node->as.link.title.len); + escape_xml_str(xml, node->as.link.url); cmark_strbuf_putc(xml, '"'); + if (node->as.link.title) { + cmark_strbuf_puts(xml, " title=\""); + escape_xml_str(xml, node->as.link.title); + cmark_strbuf_putc(xml, '"'); + } break; default: break; @@ -149,7 +208,7 @@ static int S_render_node(cmark_node *node, cmark_event_type ev_type, char *cmark_render_xml(cmark_node *root, int options) { char *result; - cmark_strbuf xml = CMARK_BUF_INIT(cmark_node_mem(root)); + cmark_strbuf xml = CMARK_BUF_INIT(root->mem); cmark_event_type ev_type; cmark_node *cur; struct render_state state = {&xml, 0}; From dc6f8955c7b9ee3297948ba41221b02101f2facb Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 8 Jul 2023 09:15:07 -0700 Subject: [PATCH 4/9] Bump version to 0.6.1. --- cmark.cabal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmark.cabal b/cmark.cabal index b88e463..fa54cd5 100644 --- a/cmark.cabal +++ b/cmark.cabal @@ -1,12 +1,12 @@ name: cmark -version: 0.6 +version: 0.6.1 synopsis: Fast, accurate CommonMark (Markdown) parser and renderer description: This package provides Haskell bindings for , the reference parser for , a fully specified variant of Markdown. It includes sources for - libcmark (0.29.0) and does not require prior installation of the + libcmark (0.30.3) and does not require prior installation of the C library. homepage: https://github.com/jgm/cmark-hs From be997f8c64b2ef47f269b7fee19c51e44d7fdbc2 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 8 Jul 2023 09:16:20 -0700 Subject: [PATCH 5/9] Update changelog. --- changelog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/changelog b/changelog index 705ac92..1312e2b 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,8 @@ +cmark 0.7 (08 Jul 2023) + + * Update to cmark 0.30.3. + * Allow text 2. + cmark 0.6 (08 Apr 2019) * Update to cmark 0.29.0. From f6e36091b3d641f441deeb30edd45e789c07ddb5 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 8 Jul 2023 10:02:08 -0700 Subject: [PATCH 6/9] Remove benchmark. --- Makefile | 8 +- bench/bench-cmark.hs | 36 --- bench/full-sample.md | 726 ------------------------------------------- bench/sample.md | 284 ----------------- cmark.cabal | 13 - 5 files changed, 1 insertion(+), 1066 deletions(-) delete mode 100644 bench/bench-cmark.hs delete mode 100644 bench/full-sample.md delete mode 100644 bench/sample.md diff --git a/Makefile b/Makefile index d59fa1e..ee16e10 100644 --- a/Makefile +++ b/Makefile @@ -16,12 +16,6 @@ install: clean: cabal clean -bench: - cabal configure --enable-benchmarks && \ - cabal install --only-dependencies && \ - cabal build && \ - cabal bench - update-c-sources: $(C_SOURCES) cbits/config.h: $(CMARK_DIR)/build/src/config.h @@ -36,4 +30,4 @@ cbits/cmark_version.h: $(CMARK_DIR)/build/src/cmark_version.h cbits/%: $(CMARK_DIR)/src/% cp $< $@ -.PHONY: build prep install test clean bench update-cmark +.PHONY: build prep install test clean update-cmark diff --git a/bench/bench-cmark.hs b/bench/bench-cmark.hs deleted file mode 100644 index acb6983..0000000 --- a/bench/bench-cmark.hs +++ /dev/null @@ -1,36 +0,0 @@ -import qualified Cheapskate as Cheapskate -import qualified Cheapskate.Html as CheapskateHtml -import qualified CMark as CMark -import qualified Text.Sundown.Html.Text as Sundown -import qualified Text.Discount as Discount -import qualified Text.Blaze.Html.Renderer.Text as Blaze -import qualified Text.Markdown as Markdown -import Data.Text (Text) -import Data.Text as T -import Data.Text.Lazy (fromChunks, toChunks) -import Data.Text.IO as T -import Criterion.Main -import Criterion.Monad -import System.Environment (getArgs) - -main :: IO () -main = do - sample <- T.readFile "bench/sample.md" - defaultMain [ - mkBench "cheapskate" (T.concat . toChunks . Blaze.renderHtml . CheapskateHtml.renderDoc . Cheapskate.markdown Cheapskate.def) sample - , mkBench "discount" (Discount.parseMarkdownUtf8 []) sample - , mkBench "markdown" (T.concat . toChunks . Blaze.renderHtml . Markdown.markdown Markdown.def . fromChunks . (:[])) sample - , mkBench "cmark" (CMark.commonmarkToHtml []) sample - ] - --- Note: when full-sample.md rather than sample.md is used markdown --- hangs (> 1 minute). - --- even with sample.md, sundown gives this error --- , mkBench "sundown" (Sundown.renderHtml Sundown.noExtensions Sundown.noHtmlModes False Nothing) sample --- bench-cmark(50437,0x7fff7bfbe310) malloc: *** error for object 0x7ffde3d00928: incorrect checksum for freed object - object was probably modified after being freed. --- *** set a breakpoint in malloc_error_break to debug - -mkBench :: String -> (Text -> Text) -> Text -> Benchmark -mkBench name converter inp = - bench name $ nf converter inp diff --git a/bench/full-sample.md b/bench/full-sample.md deleted file mode 100644 index a138d1a..0000000 --- a/bench/full-sample.md +++ /dev/null @@ -1,726 +0,0 @@ -CommonMark -========== - -CommonMark is a rationalized version of Markdown syntax, -with a [spec][the spec] and BSD3-licensed reference -implementations in C and JavaScript. - -[Try it now!](http://spec.commonmark.org/dingus.html) - -The implementations -------------------- - -The C implementation provides both a shared library (`libcmark`) and a -standalone program `cmark` that converts CommonMark to HTML. It is -written in standard C99 and has no library dependencies. The parser is -very fast (see [benchmarks](benchmarks.md)). - -It is easy to use `libcmark` in python, lua, ruby, and other dynamic -languages: see the `wrappers/` subdirectory for some simple examples. - -The JavaScript implementation provides both an NPM package and a -single JavaScript file, with no dependencies, that can be linked into -an HTML page. For further information, see the -[README in the js directory](js/README.md). - -**A note on security:** -Neither implementation attempts to sanitize link attributes or -raw HTML. If you use these libraries in applications that accept -untrusted user input, you must run the output through an HTML -sanitizer to protect against -[XSS attacks](http://en.wikipedia.org/wiki/Cross-site_scripting). - -Installing (C) --------------- - -Building the C program (`cmark`) and shared library (`libcmark`) -requires [cmake]. If you modify `scanners.re`, then you will also -need [re2c], which is used to generate `scanners.c` from -`scanners.re`. We have included a pre-generated `scanners.c` in -the repository to reduce build dependencies. - -If you have GNU make, you can simply `make`, `make test`, and `make -install`. This calls [cmake] to create a `Makefile` in the `build` -directory, then uses that `Makefile` to create the executable and -library. The binaries can be found in `build/src`. - -For a more portable method, you can use [cmake] manually. [cmake] knows -how to create build environments for many build systems. For example, -on FreeBSD: - - mkdir build - cd build - cmake .. # optionally: -DCMAKE_INSTALL_PREFIX=path - make # executable will be created as build/src/cmark - make test - make install - -Or, to create Xcode project files on OSX: - - mkdir build - cd build - cmake -G Xcode .. - make - make test - make install - -The GNU Makefile also provides a few other targets for developers. -To run a benchmark: - - make bench - -To run a "fuzz test" against ten long randomly generated inputs: - - make fuzztest - -To run a test for memory leaks using `valgrind`: - - make leakcheck - -To reformat source code using `astyle`: - - make astyle - -To make a release tarball and zip archive: - - make archive - - -Compiling for Windows ---------------------- - -To compile with MSVC and NMAKE: - - nmake - -You can cross-compile a Windows binary and dll on linux if you have the -`mingw32` compiler: - - make mingw - -The binaries will be in `build-mingw/windows/bin`. - -Installing (JavaScript) ------------------------ - -The JavaScript library can be installed through `npm`: - - npm install commonmark - -This includes a command-line converter called `commonmark`. - -If you want to use it in a client application, you can fetch -a pre-built copy of `commonmark.js` from -. - -For further information, see the -[README in the js directory](js/README.md). - -The spec --------- - -[The spec] contains over 500 embedded examples which serve as conformance -tests. To run the tests using an executable `$PROG`: - - python3 test/spec_tests.py --program $PROG - -If you want to extract the raw test data from the spec without -actually running the tests, you can do: - - python3 test/spec_tests.py --dump-tests - -and you'll get all the tests in JSON format. - -[The spec]: http://spec.commonmark.org/0.13/ - -The source of [the spec] is `spec.txt`. This is basically a Markdown -file, with code examples written in a shorthand form: - - . - Markdown source - . - expected HTML output - . - -To build an HTML version of the spec, do `make spec.html`. To build a -PDF version, do `make spec.pdf`. (Creating a PDF requires [pandoc] -and a LaTeX installation. Creating the HTML version requires only -`libcmark` and `python3`.) - -The spec is written from the point of view of the human writer, not -the computer reader. It is not an algorithm---an English translation of -a computer program---but a declarative description of what counts as a block -quote, a code block, and each of the other structural elements that can -make up a Markdown document. - -Because John Gruber's [canonical syntax -description](http://daringfireball.net/projects/markdown/syntax) leaves -many aspects of the syntax undetermined, writing a precise spec requires -making a large number of decisions, many of them somewhat arbitrary. -In making them, we have appealed to existing conventions and -considerations of simplicity, readability, expressive power, and -consistency. We have tried to ensure that "normal" documents in the many -incompatible existing implementations of Markdown will render, as far as -possible, as their authors intended. And we have tried to make the rules -for different elements work together harmoniously. In places where -different decisions could have been made (for example, the rules -governing list indentation), we have explained the rationale for -my choices. In a few cases, we have departed slightly from the canonical -syntax description, in ways that we think further the goals of Markdown -as stated in that description. - -For the most part, we have limited ourselves to the basic elements -described in Gruber's canonical syntax description, eschewing extensions -like footnotes and definition lists. It is important to get the core -right before considering such things. However, we have included a visible -syntax for line breaks and fenced code blocks. - -Differences from original Markdown ----------------------------------- - -There are only a few places where this spec says things that contradict -the canonical syntax description: - -- It allows all punctuation symbols to be backslash-escaped, - not just the symbols with special meanings in Markdown. We found - that it was just too hard to remember which symbols could be - escaped. - -- It introduces an alternative syntax for hard line - breaks, a backslash at the end of the line, supplementing the - two-spaces-at-the-end-of-line rule. This is motivated by persistent - complaints about the “invisible” nature of the two-space rule. - -- Link syntax has been made a bit more predictable (in a - backwards-compatible way). For example, `Markdown.pl` allows single - quotes around a title in inline links, but not in reference links. - This kind of difference is really hard for users to remember, so the - spec allows single quotes in both contexts. - -- The rule for HTML blocks differs, though in most real cases it - shouldn't make a difference. (See the section on HTML Blocks - for details.) The spec's proposal makes it easy to include Markdown - inside HTML block-level tags, if you want to, but also allows you to - exclude this. It is also makes parsing much easier, avoiding - expensive backtracking. - -- It does not collapse adjacent bird-track blocks into a single - blockquote: - - > this is two - - > blockquotes - - > this is a single - > - > blockquote with two paragraphs - -- Rules for content in lists differ in a few respects, though (as with - HTML blocks), most lists in existing documents should render as - intended. There is some discussion of the choice points and - differences in the subsection of List Items entitled Motivation. - We think that the spec's proposal does better than any existing - implementation in rendering lists the way a human writer or reader - would intuitively understand them. (We could give numerous examples - of perfectly natural looking lists that nearly every existing - implementation flubs up.) - -- The spec stipulates that two blank lines break out of all list - contexts. This is an attempt to deal with issues that often come up - when someone wants to have two adjacent lists, or a list followed by - an indented code block. - -- Changing bullet characters, or changing from bullets to numbers or - vice versa, starts a new list. We think that is almost always going - to be the writer's intent. - -- The number that begins an ordered list item may be followed by - either `.` or `)`. Changing the delimiter style starts a new - list. - -- The start number of an ordered list is significant. - -- Fenced code blocks are supported, delimited by either - backticks (```` ``` ```` or tildes (` ~~~ `). - -Contributing ------------- - -There is a [forum for discussing -CommonMark](http://talk.commonmark.org); you should use it instead of -github issues for questions and possibly open-ended discussions. -Use the [github issue tracker](http://github.com/jgm/CommonMark/issues) -only for simple, clear, actionable issues. - -Authors -------- - -The spec was written by John MacFarlane, drawing on - -- his experience writing and maintaining Markdown implementations in several - languages, including the first Markdown parser not based on regular - expression substitutions ([pandoc](http://github.com/jgm/pandoc)) and - the first markdown parsers based on PEG grammars - ([peg-markdown](http://github.com/jgm/peg-markdown), - [lunamark](http://github.com/jgm/lunamark)) -- a detailed examination of the differences between existing Markdown - implementations using [BabelMark 2](http://johnmacfarlane.net/babelmark2/), - and -- extensive discussions with David Greenspan, Jeff Atwood, Vicent - Marti, Neil Williams, and Benjamin Dumke-von der Ehe. - -John MacFarlane was also responsible for the original versions of the -C and JavaScript implementations. The block parsing algorithm was -worked out together with David Greenspan. Vicent Marti -optimized the C implementation for performance, increasing its speed -tenfold. Kārlis Gaņģis helped work out a better parsing algorithm -for links and emphasis, eliminating several worst-case performance -issues. Nick Wellnhofer contributed many improvements, including -most of the C library's API and its test harness. Vitaly Puzrin -has offered much good advice about the JavaScript implementation. - -[cmake]: http://www.cmake.org/download/ -[pandoc]: http://johnmacfarlane.net/pandoc/ -[re2c]: http://re2c.org - -> the simple example of a blockquote -> the simple example of a blockquote -> the simple example of a blockquote -> the simple example of a blockquote -... continuation -... continuation -... continuation -... continuation - -empty blockquote: - -> -> -> -> - ->>>>>> deeply nested blockquote ->>>>> deeply nested blockquote ->>>> deeply nested blockquote ->>> deeply nested blockquote ->> deeply nested blockquote -> deeply nested blockquote - -> deeply nested blockquote ->> deeply nested blockquote ->>> deeply nested blockquote ->>>> deeply nested blockquote ->>>>> deeply nested blockquote ->>>>>> deeply nested blockquote - - an - example - - of - - - - a code - block - - -``````````text -an -example -``` -of - - -a fenced -``` -code -block -`````````` - -# heading -### heading -##### heading - -# heading # -### heading ### -##### heading \#\#\#\#\###### - -############ not a heading - - * * * * * - - - - - - - - - ________ - - - ************************* text - -
- -blah blah - -
- - - - - -
- **test** -
- - - - - - - - - -
- - test - -
- - - -heading ---- - -heading -=================================== - -not a heading ------------------------------------ text - - tidy - - bullet - - list - - - - loose - - - bullet - - - list - - - 0. ordered - 1. list - 2. example - - - - - - - - - - - - - 1. - 2. - 3. - - - - an example -of a list item - with a continuation - - this part is inside the list - - this part is just a paragraph - - - 1. test - - test - 1. test - - test - - -111111111111111111111111111111111111111111. is this a valid bullet? - - - _________________________ - - - this - - is - - a - - long - - loose - - list - - - with - - some - - tidy - - - list - - items - - in - - - between - - _________________________ - - - this - - is - - a - - deeply - - nested - - bullet - - list - - - 1. this - 2. is - 3. a - 4. deeply - 5. nested - 6. unordered - 7. list - - - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - - 6 - - 5 - - 4 - - 3 - - 2 - - 1 - - - - - - - - - - - - deeply-nested one-element item - -[1] [2] [3] [1] [2] [3] - -[looooooooooooooooooooooooooooooooooooooooooooooooooong label] - - [1]: - [2]: http://something.example.com/foo/bar 'test' - [3]: - http://foo/bar - [ looooooooooooooooooooooooooooooooooooooooooooooooooong label ]: - 111 - 'test' - [[[[[[[[[[[[[[[[[[[[ this should not slow down anything ]]]]]]]]]]]]]]]]]]]]: q - (as long as it is not referenced anywhere) - - [[[[[[[[[[[[[[[[[[[[]: this is not a valid reference -[[[[[[[foo]]]]]]] - -[[[[[[[foo]]]]]]]: bar -[[[[[[foo]]]]]]: bar -[[[[[foo]]]]]: bar -[[[[foo]]]]: bar -[[[foo]]]: bar -[[foo]]: bar -[foo]: bar - -[*[*[*[*[foo]*]*]*]*] - -[*[*[*[*[foo]*]*]*]*]: bar -[*[*[*[foo]*]*]*]: bar -[*[*[foo]*]*]: bar -[*[foo]*]: bar -[foo]: bar -closed (valid) autolinks: - - - - - - -these are not autolinks: - - -`lots`of`backticks` - -``i``wonder``how``this``will``be``parsed`` -*this* *is* *your* *basic* *boring* *emphasis* - -_this_ _is_ _your_ _basic_ _boring_ _emphasis_ - -**this** **is** **your** **basic** **boring** **emphasis** -*this *is *a *bunch* of* nested* emphases* - -__this __is __a __bunch__ of__ nested__ emphases__ - -***this ***is ***a ***bunch*** of*** nested*** emphases*** -*this *is *a *worst *case *for *em *backtracking - -__this __is __a __worst __case __for __em __backtracking - -***this ***is ***a ***worst ***case ***for ***em ***backtracking -entities: - -  & © Æ Ď ¾ ℋ ⅆ ∲ - -# Ӓ Ϡ � - -non-entities: - -&18900987654321234567890; &1234567890098765432123456789009876543212345678987654; - -&qwertyuioppoiuytrewqwer; &oiuytrewqwertyuioiuytrewqwertyuioytrewqwertyuiiuytri; - -\t\e\s\t\i\n\g \e\s\c\a\p\e \s\e\q\u\e\n\c\e\s - -\!\\\"\#\$\%\&\'\(\)\*\+\,\.\/\:\;\<\=\>\? - -\@ \[ \] \^ \_ \` \{ \| \} \~ \- \' - -\ -\\ -\\\ -\\\\ -\\\\\ - -\ \ \ \ - -Taking commonmark tests from the spec for benchmarking here: - -
- - - - - - - -<33> <__> - - - - - -foo - -foo - -foo - -foo - -foo &<]]> - - - - - - -Valid links: - - [this is a link]() - [this is a link]() - [this is a link](http://something.example.com/foo/bar 'test') - ![this is an image]() - ![this is an image]() - ![this is an image](http://something.example.com/foo/bar 'test') - - [escape test](<\>\>\>\>\>\>\>\>\>\>\>\>\>\>> '\'\'\'\'\'\'\'\'\'\'\'\'\'\'') - [escape test \]\]\]\]\]\]\]\]\]\]\]\]\]\]\]\]](\)\)\)\)\)\)\)\)\)\)\)\)\)\)) - -Invalid links: - - [this is not a link - - [this is not a link]( - - [this is not a link](http://something.example.com/foo/bar 'test' - - [this is not a link]((((((((((((((((((((((((((((((((((((((((((((((( - - [this is not a link]((((((((((()))))))))) (((((((((())))))))))) -Valid links: - -[[[[[[[[](test)](test)](test)](test)](test)](test)](test)] - -[ [[[[[[[[[[[[[[[[[[ [](test) ]]]]]]]]]]]]]]]]]] ](test) - -Invalid links: - -[[[[[[[[[ - -[ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ - -![![![![![![![![![![![![![![![![![![![![![![![![![![![![![![![![![![![![![![ - -this\ -should\ -be\ -separated\ -by\ -newlines - -this -should -be -separated -by -newlines -too - -this -should -not -be -separated -by -newlines - -Lorem ipsum dolor sit amet, __consectetur__ adipiscing elit. Cras imperdiet nec erat ac condimentum. Nulla vel rutrum ligula. Sed hendrerit interdum orci a posuere. Vivamus ut velit aliquet, mollis purus eget, iaculis nisl. Proin posuere malesuada ante. Proin auctor orci eros, ac molestie lorem dictum nec. Vestibulum sit amet erat est. Morbi luctus sed elit ac luctus. Proin blandit, enim vitae egestas posuere, neque elit ultricies dui, vel mattis nibh enim ac lorem. Maecenas molestie nisl sit amet velit dictum lobortis. Aliquam erat volutpat. - -Vivamus sagittis, diam in [vehicula](https://github.com/markdown-it/markdown-it) lobortis, sapien arcu mattis erat, vel aliquet sem urna et risus. Ut feugiat sapien vitae mi elementum laoreet. Suspendisse potenti. Aliquam erat nisl, aliquam pretium libero aliquet, sagittis eleifend nunc. In hac habitasse platea dictumst. Integer turpis augue, tincidunt dignissim mauris id, rhoncus dapibus purus. Maecenas et enim odio. Nullam massa metus, varius quis vehicula sed, pharetra mollis erat. In quis viverra velit. Vivamus placerat, est nec hendrerit varius, enim dui hendrerit magna, ut pulvinar nibh lorem vel lacus. Mauris a orci iaculis, hendrerit eros sed, gravida leo. In dictum mauris vel augue varius, ac ullamcorper nisl ornare. In eu posuere velit, ac fermentum arcu. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nullam sed malesuada leo, at interdum elit. - -Nullam ut tincidunt nunc. [Pellentesque][1] metus lacus, commodo eget justo ut, rutrum varius nunc. Sed non rhoncus risus. Morbi sodales gravida pulvinar. Duis malesuada, odio volutpat elementum vulputate, massa magna scelerisque ante, et accumsan tellus nunc in sem. Donec mattis arcu et velit aliquet, non sagittis justo vestibulum. Suspendisse volutpat felis lectus, nec consequat ipsum mattis id. Donec dapibus vehicula facilisis. In tincidunt mi nisi, nec faucibus tortor euismod nec. Suspendisse ante ligula, aliquet vitae libero eu, vulputate dapibus libero. Sed bibendum, sapien at posuere interdum, libero est sollicitudin magna, ac gravida tellus purus eu ipsum. Proin ut quam arcu. - -Suspendisse potenti. Donec ante velit, ornare at augue quis, tristique laoreet sem. Etiam in ipsum elit. Nullam cursus dolor sit amet nulla feugiat tristique. Phasellus ac tellus tincidunt, imperdiet purus eget, ullamcorper ipsum. Cras eu tincidunt sem. Nullam sed dapibus magna. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In id venenatis tortor. In consectetur sollicitudin pharetra. Etiam convallis nisi nunc, et aliquam turpis viverra sit amet. Maecenas faucibus sodales tortor. Suspendisse lobortis mi eu leo viverra volutpat. Pellentesque velit ante, vehicula sodales congue ut, elementum a urna. Cras tempor, ipsum eget luctus rhoncus, arcu ligula fermentum urna, vulputate pharetra enim enim non libero. - -Proin diam quam, elementum in eleifend id, elementum et metus. Cras in justo consequat justo semper ultrices. Sed dignissim lectus a ante mollis, nec vulputate ante molestie. Proin in porta nunc. Etiam pulvinar turpis sed velit porttitor, vel adipiscing velit fringilla. Cras ac tellus vitae purus pharetra tincidunt. Sed cursus aliquet aliquet. Cras eleifend commodo malesuada. In turpis turpis, ullamcorper ut tincidunt a, ullamcorper a nunc. Etiam luctus tellus ac dapibus gravida. Ut nec lacus laoreet neque ullamcorper volutpat. - -Nunc et leo erat. Aenean mattis ultrices lorem, eget adipiscing dolor ultricies eu. In hac habitasse platea dictumst. Vivamus cursus feugiat sapien quis aliquam. Mauris quam libero, porta vel volutpat ut, blandit a purus. Vivamus vestibulum dui vel tortor molestie, sit amet feugiat sem commodo. Nulla facilisi. Sed molestie arcu eget tellus vestibulum tristique. - -[1]: https://github.com/markdown-it - -this is a test for tab expansion, be careful not to replace them with spaces - -1 4444 -22 333 -333 22 -4444 1 - - - tab-indented line - space-indented line - tab-indented line - - -a lot of spaces in between here - -a lot of tabs in between here - diff --git a/bench/sample.md b/bench/sample.md deleted file mode 100644 index 57b268a..0000000 --- a/bench/sample.md +++ /dev/null @@ -1,284 +0,0 @@ -CommonMark -========== - -CommonMark is a rationalized version of Markdown syntax, -with a [spec][the spec] and BSD3-licensed reference -implementations in C and JavaScript. - -[Try it now!](http://spec.commonmark.org/dingus.html) - -The implementations -------------------- - -The C implementation provides both a shared library (`libcmark`) and a -standalone program `cmark` that converts CommonMark to HTML. It is -written in standard C99 and has no library dependencies. The parser is -very fast (see [benchmarks](benchmarks.md)). - -It is easy to use `libcmark` in python, lua, ruby, and other dynamic -languages: see the `wrappers/` subdirectory for some simple examples. - -The JavaScript implementation provides both an NPM package and a -single JavaScript file, with no dependencies, that can be linked into -an HTML page. For further information, see the -[README in the js directory](js/README.md). - -**A note on security:** -Neither implementation attempts to sanitize link attributes or -raw HTML. If you use these libraries in applications that accept -untrusted user input, you must run the output through an HTML -sanitizer to protect against -[XSS attacks](http://en.wikipedia.org/wiki/Cross-site_scripting). - -Installing (C) --------------- - -Building the C program (`cmark`) and shared library (`libcmark`) -requires [cmake]. If you modify `scanners.re`, then you will also -need [re2c], which is used to generate `scanners.c` from -`scanners.re`. We have included a pre-generated `scanners.c` in -the repository to reduce build dependencies. - -If you have GNU make, you can simply `make`, `make test`, and `make -install`. This calls [cmake] to create a `Makefile` in the `build` -directory, then uses that `Makefile` to create the executable and -library. The binaries can be found in `build/src`. - -For a more portable method, you can use [cmake] manually. [cmake] knows -how to create build environments for many build systems. For example, -on FreeBSD: - - mkdir build - cd build - cmake .. # optionally: -DCMAKE_INSTALL_PREFIX=path - make # executable will be created as build/src/cmark - make test - make install - -Or, to create Xcode project files on OSX: - - mkdir build - cd build - cmake -G Xcode .. - make - make test - make install - -The GNU Makefile also provides a few other targets for developers. -To run a benchmark: - - make bench - -To run a "fuzz test" against ten long randomly generated inputs: - - make fuzztest - -To run a test for memory leaks using `valgrind`: - - make leakcheck - -To reformat source code using `astyle`: - - make astyle - -To make a release tarball and zip archive: - - make archive - - -Compiling for Windows ---------------------- - -To compile with MSVC and NMAKE: - - nmake - -You can cross-compile a Windows binary and dll on linux if you have the -`mingw32` compiler: - - make mingw - -The binaries will be in `build-mingw/windows/bin`. - -Installing (JavaScript) ------------------------ - -The JavaScript library can be installed through `npm`: - - npm install commonmark - -This includes a command-line converter called `commonmark`. - -If you want to use it in a client application, you can fetch -a pre-built copy of `commonmark.js` from -. - -For further information, see the -[README in the js directory](js/README.md). - -The spec --------- - -[The spec] contains over 500 embedded examples which serve as conformance -tests. To run the tests using an executable `$PROG`: - - python3 test/spec_tests.py --program $PROG - -If you want to extract the raw test data from the spec without -actually running the tests, you can do: - - python3 test/spec_tests.py --dump-tests - -and you'll get all the tests in JSON format. - -[The spec]: http://spec.commonmark.org/0.13/ - -The source of [the spec] is `spec.txt`. This is basically a Markdown -file, with code examples written in a shorthand form: - - . - Markdown source - . - expected HTML output - . - -To build an HTML version of the spec, do `make spec.html`. To build a -PDF version, do `make spec.pdf`. (Creating a PDF requires [pandoc] -and a LaTeX installation. Creating the HTML version requires only -`libcmark` and `python3`.) - -The spec is written from the point of view of the human writer, not -the computer reader. It is not an algorithm---an English translation of -a computer program---but a declarative description of what counts as a block -quote, a code block, and each of the other structural elements that can -make up a Markdown document. - -Because John Gruber's [canonical syntax -description](http://daringfireball.net/projects/markdown/syntax) leaves -many aspects of the syntax undetermined, writing a precise spec requires -making a large number of decisions, many of them somewhat arbitrary. -In making them, we have appealed to existing conventions and -considerations of simplicity, readability, expressive power, and -consistency. We have tried to ensure that "normal" documents in the many -incompatible existing implementations of Markdown will render, as far as -possible, as their authors intended. And we have tried to make the rules -for different elements work together harmoniously. In places where -different decisions could have been made (for example, the rules -governing list indentation), we have explained the rationale for -my choices. In a few cases, we have departed slightly from the canonical -syntax description, in ways that we think further the goals of Markdown -as stated in that description. - -For the most part, we have limited ourselves to the basic elements -described in Gruber's canonical syntax description, eschewing extensions -like footnotes and definition lists. It is important to get the core -right before considering such things. However, we have included a visible -syntax for line breaks and fenced code blocks. - -Differences from original Markdown ----------------------------------- - -There are only a few places where this spec says things that contradict -the canonical syntax description: - -- It allows all punctuation symbols to be backslash-escaped, - not just the symbols with special meanings in Markdown. We found - that it was just too hard to remember which symbols could be - escaped. - -- It introduces an alternative syntax for hard line - breaks, a backslash at the end of the line, supplementing the - two-spaces-at-the-end-of-line rule. This is motivated by persistent - complaints about the “invisible” nature of the two-space rule. - -- Link syntax has been made a bit more predictable (in a - backwards-compatible way). For example, `Markdown.pl` allows single - quotes around a title in inline links, but not in reference links. - This kind of difference is really hard for users to remember, so the - spec allows single quotes in both contexts. - -- The rule for HTML blocks differs, though in most real cases it - shouldn't make a difference. (See the section on HTML Blocks - for details.) The spec's proposal makes it easy to include Markdown - inside HTML block-level tags, if you want to, but also allows you to - exclude this. It is also makes parsing much easier, avoiding - expensive backtracking. - -- It does not collapse adjacent bird-track blocks into a single - blockquote: - - > this is two - - > blockquotes - - > this is a single - > - > blockquote with two paragraphs - -- Rules for content in lists differ in a few respects, though (as with - HTML blocks), most lists in existing documents should render as - intended. There is some discussion of the choice points and - differences in the subsection of List Items entitled Motivation. - We think that the spec's proposal does better than any existing - implementation in rendering lists the way a human writer or reader - would intuitively understand them. (We could give numerous examples - of perfectly natural looking lists that nearly every existing - implementation flubs up.) - -- The spec stipulates that two blank lines break out of all list - contexts. This is an attempt to deal with issues that often come up - when someone wants to have two adjacent lists, or a list followed by - an indented code block. - -- Changing bullet characters, or changing from bullets to numbers or - vice versa, starts a new list. We think that is almost always going - to be the writer's intent. - -- The number that begins an ordered list item may be followed by - either `.` or `)`. Changing the delimiter style starts a new - list. - -- The start number of an ordered list is significant. - -- Fenced code blocks are supported, delimited by either - backticks (```` ``` ```` or tildes (` ~~~ `). - -Contributing ------------- - -There is a [forum for discussing -CommonMark](http://talk.commonmark.org); you should use it instead of -github issues for questions and possibly open-ended discussions. -Use the [github issue tracker](http://github.com/jgm/CommonMark/issues) -only for simple, clear, actionable issues. - -Authors -------- - -The spec was written by John MacFarlane, drawing on - -- his experience writing and maintaining Markdown implementations in several - languages, including the first Markdown parser not based on regular - expression substitutions ([pandoc](http://github.com/jgm/pandoc)) and - the first markdown parsers based on PEG grammars - ([peg-markdown](http://github.com/jgm/peg-markdown), - [lunamark](http://github.com/jgm/lunamark)) -- a detailed examination of the differences between existing Markdown - implementations using [BabelMark 2](http://johnmacfarlane.net/babelmark2/), - and -- extensive discussions with David Greenspan, Jeff Atwood, Vicent - Marti, Neil Williams, and Benjamin Dumke-von der Ehe. - -John MacFarlane was also responsible for the original versions of the -C and JavaScript implementations. The block parsing algorithm was -worked out together with David Greenspan. Vicent Marti -optimized the C implementation for performance, increasing its speed -tenfold. Kārlis Gaņģis helped work out a better parsing algorithm -for links and emphasis, eliminating several worst-case performance -issues. Nick Wellnhofer contributed many improvements, including -most of the C library's API and its test harness. Vitaly Puzrin -has offered much good advice about the JavaScript implementation. - -[cmake]: http://www.cmake.org/download/ -[pandoc]: http://johnmacfarlane.net/pandoc/ -[re2c]: http://re2c.org diff --git a/cmark.cabal b/cmark.cabal index fa54cd5..207d065 100644 --- a/cmark.cabal +++ b/cmark.cabal @@ -86,19 +86,6 @@ library cbits/xml.c cbits/render.c -benchmark bench-cmark - type: exitcode-stdio-1.0 - hs-source-dirs: bench - main-is: bench-cmark.hs - build-depends: base, text, cmark, criterion, - sundown >= 0.6 && < 0.7, - cheapskate >= 0.1 && < 0.2, - markdown >= 0.1 && < 0.2, - discount >= 0.1 && < 0.2, - blaze-html >= 0.7 && < 0.10 - ghc-options: -O2 - default-language: Haskell2010 - Test-Suite test-cmark type: exitcode-stdio-1.0 main-is: test-cmark.hs From 39bc382cdddc28d0731fe739a472740bea4d6cdf Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 8 Jul 2023 10:07:22 -0700 Subject: [PATCH 7/9] Removed two benchmark files from extra-source-files. --- cmark.cabal | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmark.cabal b/cmark.cabal index 207d065..4eee09a 100644 --- a/cmark.cabal +++ b/cmark.cabal @@ -39,8 +39,6 @@ extra-source-files: README.md cbits/scanners.h cbits/case_fold_switch.inc cbits/entities.inc - bench/sample.md - bench/full-sample.md cabal-version: 1.14 Source-repository head From b7fc95166c011944395c3c72161bdc346d512358 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 8 Jul 2023 10:07:46 -0700 Subject: [PATCH 8/9] Update changelog. --- changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog b/changelog index 1312e2b..87f0810 100644 --- a/changelog +++ b/changelog @@ -2,6 +2,7 @@ cmark 0.7 (08 Jul 2023) * Update to cmark 0.30.3. * Allow text 2. + * Remove benchmark suite. cmark 0.6 (08 Apr 2019) From 46275c463a756961dd35665beeff993741b9f729 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 26 Dec 2023 16:03:46 -0800 Subject: [PATCH 9/9] Allow text 2.1. --- cmark.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmark.cabal b/cmark.cabal index 4eee09a..95568e4 100644 --- a/cmark.cabal +++ b/cmark.cabal @@ -52,7 +52,7 @@ flag pkgconfig library exposed-modules: CMark build-depends: base >=4.5 && < 5.0, - text >= 1.0 && < 2.1, + text >= 1.0 && < 2.2, bytestring if impl(ghc < 7.6) build-depends: ghc-prim >= 0.2