From: Fletcher T. Penney Date: Wed, 8 Feb 2017 19:43:09 +0000 (-0500) Subject: ADDED: Support distinction between 3 and 5 backticks in fenced code blocks X-Git-Tag: 0.1.3a^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4112624a64cd6d73c090b558889ddb94be0f2fcd;p=multimarkdown ADDED: Support distinction between 3 and 5 backticks in fenced code blocks --- diff --git a/src/html.c b/src/html.c index 12cc378..e2e1659 100644 --- a/src/html.c +++ b/src/html.c @@ -1269,7 +1269,8 @@ void mmd_export_token_html_raw(DString * out, const char * source, token * t, si print("""); break; case CODE_FENCE: - t->next->type = TEXT_EMPTY; + if (t->next) + t->next->type = TEXT_EMPTY; case TEXT_EMPTY: break; default: diff --git a/src/mmd.c b/src/mmd.c index 12c6caa..7cbf85d 100644 --- a/src/mmd.c +++ b/src/mmd.c @@ -326,12 +326,32 @@ void mmd_assign_line_type(mmd_engine * e, token * line) { } scan_len = scan_fence_end(&source[line->child->start]); if (scan_len) { - line->type = LINE_FENCE_BACKTICK; + switch (line->child->len) { + case 3: + line->type = LINE_FENCE_BACKTICK_3; + break; + case 4: + line->type = LINE_FENCE_BACKTICK_4; + break; + default: + line->type = LINE_FENCE_BACKTICK_5; + break; + } break; } else { scan_len = scan_fence_start(&source[line->child->start]); if (scan_len) { - line->type = LINE_FENCE_BACKTICK_START; + switch (line->child->len) { + case 3: + line->type = LINE_FENCE_BACKTICK_START_3; + break; + case 4: + line->type = LINE_FENCE_BACKTICK_START_4; + break; + default: + line->type = LINE_FENCE_BACKTICK_START_5; + break; + } break; } } diff --git a/src/parser.c b/src/parser.c index 92bf3a8..8354f6d 100644 --- a/src/parser.c +++ b/src/parser.c @@ -92,7 +92,7 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned char -#define YYNOCODE 69 +#define YYNOCODE 77 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE token * typedef union { @@ -107,16 +107,16 @@ typedef union { #define ParseARG_FETCH mmd_engine * engine = yypParser->engine #define ParseARG_STORE yypParser->engine = engine #define YYFALLBACK 1 -#define YYNSTATE 39 -#define YYNRULE 104 -#define YY_MAX_SHIFT 38 -#define YY_MIN_SHIFTREDUCE 106 -#define YY_MAX_SHIFTREDUCE 209 -#define YY_MIN_REDUCE 210 -#define YY_MAX_REDUCE 313 -#define YY_ERROR_ACTION 314 -#define YY_ACCEPT_ACTION 315 -#define YY_NO_ACTION 316 +#define YYNSTATE 41 +#define YYNRULE 123 +#define YY_MAX_SHIFT 40 +#define YY_MIN_SHIFTREDUCE 125 +#define YY_MAX_SHIFTREDUCE 247 +#define YY_MIN_REDUCE 248 +#define YY_MAX_REDUCE 370 +#define YY_ERROR_ACTION 371 +#define YY_ACCEPT_ACTION 372 +#define YY_NO_ACTION 373 /************* End control #defines *******************************************/ /* Define the yytestcase() macro to be a no-op if is not already defined @@ -188,78 +188,88 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (208) +#define YY_ACTTAB_COUNT (248) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 315, 1, 108, 28, 118, 119, 120, 121, 38, 123, - /* 10 */ 27, 25, 35, 33, 26, 18, 130, 37, 166, 12, - /* 20 */ 12, 25, 175, 176, 172, 208, 30, 30, 23, 204, - /* 30 */ 37, 35, 33, 169, 7, 187, 36, 4, 13, 13, - /* 40 */ 210, 14, 208, 145, 175, 176, 204, 193, 109, 110, - /* 50 */ 111, 112, 113, 114, 115, 180, 6, 5, 3, 2, - /* 60 */ 15, 189, 190, 116, 4, 187, 199, 14, 208, 147, - /* 70 */ 175, 176, 204, 193, 109, 110, 111, 112, 113, 114, - /* 80 */ 115, 180, 6, 5, 3, 2, 15, 189, 190, 116, - /* 90 */ 4, 187, 199, 107, 28, 118, 119, 120, 121, 38, - /* 100 */ 123, 27, 25, 35, 33, 26, 18, 130, 32, 32, - /* 110 */ 175, 176, 25, 29, 29, 172, 24, 30, 30, 23, - /* 120 */ 31, 31, 35, 33, 24, 7, 182, 36, 132, 13, - /* 130 */ 13, 150, 24, 9, 9, 16, 16, 187, 181, 139, - /* 140 */ 139, 9, 9, 16, 16, 34, 34, 138, 138, 24, - /* 150 */ 8, 37, 8, 12, 12, 161, 24, 21, 9, 9, - /* 160 */ 16, 16, 24, 149, 143, 143, 131, 17, 17, 24, - /* 170 */ 137, 10, 10, 19, 19, 191, 157, 24, 11, 11, - /* 180 */ 20, 20, 208, 152, 201, 148, 204, 131, 22, 22, - /* 190 */ 194, 164, 131, 146, 195, 165, 5, 192, 142, 156, - /* 200 */ 6, 151, 165, 145, 212, 167, 212, 200, + /* 0 */ 248, 14, 246, 219, 207, 208, 242, 231, 128, 129, + /* 10 */ 130, 131, 132, 133, 134, 212, 6, 5, 3, 2, + /* 20 */ 15, 31, 31, 135, 4, 219, 221, 224, 227, 222, + /* 30 */ 225, 228, 237, 14, 246, 4, 207, 208, 242, 231, + /* 40 */ 128, 129, 130, 131, 132, 133, 134, 212, 6, 5, + /* 50 */ 3, 2, 15, 33, 33, 135, 4, 219, 221, 224, + /* 60 */ 227, 222, 225, 228, 237, 372, 1, 127, 30, 137, + /* 70 */ 138, 139, 140, 40, 142, 29, 27, 37, 35, 28, + /* 80 */ 18, 149, 39, 198, 12, 12, 27, 39, 34, 34, + /* 90 */ 201, 32, 32, 25, 204, 24, 23, 175, 37, 35, + /* 100 */ 229, 7, 171, 38, 168, 13, 13, 126, 30, 137, + /* 110 */ 138, 139, 140, 40, 142, 29, 27, 37, 35, 28, + /* 120 */ 18, 149, 230, 165, 166, 167, 27, 207, 208, 21, + /* 130 */ 246, 32, 32, 25, 242, 24, 23, 214, 37, 35, + /* 140 */ 232, 7, 26, 38, 233, 13, 13, 181, 164, 213, + /* 150 */ 26, 9, 9, 16, 16, 207, 208, 158, 158, 9, + /* 160 */ 9, 16, 16, 26, 229, 157, 157, 8, 39, 8, + /* 170 */ 12, 12, 9, 9, 16, 16, 182, 229, 162, 162, + /* 180 */ 36, 36, 193, 204, 26, 180, 230, 176, 178, 174, + /* 190 */ 177, 179, 156, 10, 10, 19, 19, 26, 189, 230, + /* 200 */ 172, 169, 170, 173, 26, 219, 11, 11, 20, 20, + /* 210 */ 26, 184, 26, 246, 150, 17, 17, 242, 239, 196, + /* 220 */ 150, 22, 22, 197, 151, 150, 161, 5, 188, 6, + /* 230 */ 183, 197, 164, 250, 250, 250, 199, 250, 250, 250, + /* 240 */ 250, 250, 250, 250, 250, 250, 250, 238, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - /* 10 */ 38, 39, 40, 41, 42, 43, 44, 64, 65, 66, - /* 20 */ 67, 49, 4, 5, 3, 2, 54, 55, 56, 6, - /* 30 */ 64, 59, 60, 67, 62, 25, 64, 24, 66, 67, - /* 40 */ 0, 1, 2, 25, 4, 5, 6, 7, 8, 9, - /* 50 */ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - /* 60 */ 20, 21, 22, 23, 24, 25, 26, 1, 2, 57, - /* 70 */ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - /* 80 */ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - /* 90 */ 24, 25, 26, 30, 31, 32, 33, 34, 35, 36, - /* 100 */ 37, 38, 39, 40, 41, 42, 43, 44, 54, 55, - /* 110 */ 4, 5, 49, 45, 46, 3, 36, 54, 55, 56, - /* 120 */ 45, 46, 59, 60, 36, 62, 3, 64, 48, 66, - /* 130 */ 67, 25, 36, 45, 46, 47, 48, 25, 15, 51, - /* 140 */ 52, 45, 46, 47, 48, 45, 46, 51, 52, 36, - /* 150 */ 63, 64, 65, 66, 67, 61, 36, 49, 45, 46, - /* 160 */ 47, 48, 36, 49, 51, 52, 46, 47, 48, 36, - /* 170 */ 53, 45, 46, 47, 48, 3, 50, 36, 45, 46, - /* 180 */ 47, 48, 2, 50, 3, 58, 6, 46, 47, 48, - /* 190 */ 3, 2, 46, 21, 7, 6, 17, 25, 55, 60, - /* 200 */ 16, 59, 6, 25, 68, 25, 68, 26, + /* 0 */ 0, 1, 2, 25, 4, 5, 6, 7, 8, 9, + /* 10 */ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + /* 20 */ 20, 51, 52, 23, 24, 25, 26, 27, 28, 29, + /* 30 */ 30, 31, 32, 1, 2, 24, 4, 5, 6, 7, + /* 40 */ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + /* 50 */ 18, 19, 20, 51, 52, 23, 24, 25, 26, 27, + /* 60 */ 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, + /* 70 */ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + /* 80 */ 49, 50, 72, 73, 74, 75, 55, 72, 60, 61, + /* 90 */ 75, 60, 61, 62, 3, 64, 65, 63, 67, 68, + /* 100 */ 3, 70, 63, 72, 63, 74, 75, 36, 37, 38, + /* 110 */ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + /* 120 */ 49, 50, 25, 26, 27, 28, 55, 4, 5, 55, + /* 130 */ 2, 60, 61, 62, 6, 64, 65, 3, 67, 68, + /* 140 */ 3, 70, 42, 72, 7, 74, 75, 55, 25, 15, + /* 150 */ 42, 51, 52, 53, 54, 4, 5, 57, 58, 51, + /* 160 */ 52, 53, 54, 42, 3, 57, 58, 71, 72, 73, + /* 170 */ 74, 75, 51, 52, 53, 54, 25, 3, 57, 58, + /* 180 */ 51, 52, 69, 3, 42, 66, 25, 26, 27, 28, + /* 190 */ 29, 30, 59, 51, 52, 53, 54, 42, 56, 25, + /* 200 */ 26, 27, 28, 29, 42, 25, 51, 52, 53, 54, + /* 210 */ 42, 56, 42, 2, 52, 53, 54, 6, 3, 2, + /* 220 */ 52, 53, 54, 6, 54, 52, 61, 17, 68, 16, + /* 230 */ 67, 6, 25, 76, 76, 76, 25, 76, 76, 76, + /* 240 */ 76, 76, 76, 76, 76, 76, 76, 32, }; -#define YY_SHIFT_USE_DFLT (208) -#define YY_SHIFT_COUNT (38) -#define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (196) -static const unsigned char yy_shift_ofst[] = { - /* 0 */ 66, 40, 112, 112, 112, 112, 112, 23, 23, 112, - /* 10 */ 112, 112, 180, 23, 21, 21, 10, 10, 13, 10, - /* 20 */ 10, 21, 10, 172, 18, 106, 181, 187, 123, 21, - /* 30 */ 13, 21, 13, 179, 21, 184, 189, 196, 178, +#define YY_SHIFT_USE_DFLT (248) +#define YY_SHIFT_COUNT (40) +#define YY_SHIFT_MIN (-22) +#define YY_SHIFT_MAX (225) +static const short yy_shift_ofst[] = { + /* 0 */ 32, 0, 180, 180, 180, 180, 180, 128, 128, 180, + /* 10 */ 180, 180, 211, 128, 91, 91, -22, -22, 11, -22, + /* 20 */ -22, 91, -22, 161, 174, 97, 123, 151, 215, 137, + /* 30 */ 134, 91, 11, 91, 11, 210, 91, 213, 217, 225, + /* 40 */ 207, }; -#define YY_REDUCE_USE_DFLT (-48) -#define YY_REDUCE_COUNT (35) -#define YY_REDUCE_MIN (-47) -#define YY_REDUCE_MAX (146) +#define YY_REDUCE_USE_DFLT (-31) +#define YY_REDUCE_COUNT (37) +#define YY_REDUCE_MIN (-30) +#define YY_REDUCE_MAX (173) static const short yy_reduce_ofst[] = { - /* 0 */ -28, 63, 88, 96, 113, 126, 133, 87, -47, 120, - /* 10 */ 141, 141, -34, -34, 68, 75, 80, 80, 54, 80, - /* 20 */ 80, 100, 80, 12, 108, 114, 94, 127, 117, 146, - /* 30 */ 143, 146, 143, 139, 146, 142, + /* 0 */ 31, 71, 100, 108, 121, 142, 155, 96, 10, 162, + /* 10 */ 168, 168, 15, 15, -30, 2, 170, 170, 28, 170, + /* 20 */ 170, 129, 170, 34, 39, 41, 74, 92, 113, 119, + /* 30 */ 133, 173, 165, 173, 165, 160, 173, 163, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 314, 314, 288, 287, 248, 264, 259, 307, 267, 281, - /* 10 */ 262, 257, 272, 274, 306, 289, 283, 240, 233, 263, - /* 20 */ 258, 238, 239, 292, 278, 229, 232, 228, 221, 266, - /* 30 */ 313, 244, 245, 231, 237, 230, 311, 311, 226, + /* 0 */ 371, 371, 339, 338, 286, 315, 310, 364, 318, 332, + /* 10 */ 313, 308, 323, 325, 363, 340, 334, 278, 271, 314, + /* 20 */ 309, 276, 277, 349, 346, 343, 329, 267, 270, 266, + /* 30 */ 259, 317, 370, 282, 283, 269, 275, 268, 368, 368, + /* 40 */ 264, }; /********** End of lemon-generated parsing tables *****************************/ @@ -393,15 +403,17 @@ static const char *const yyTokenName[] = { "LINE_ATX_5", "LINE_ATX_6", "LINE_HR", "LINE_BLOCKQUOTE", "LINE_LIST_BULLETED", "LINE_LIST_ENUMERATED", "LINE_DEF_CITATION", "LINE_DEF_FOOTNOTE", "LINE_DEF_LINK", "LINE_FENCE_BACKTICK", "LINE_FENCE_BACKTICK_START", "LINE_TOC", - "LINE_DEFINITION", "LINE_EMPTY", "LINE_META", "error", - "doc", "blocks", "block", "blockquote", - "def_citation", "def_footnote", "def_link", "definition_block", - "empty", "fenced_block", "html_block", "indented_code", - "list_bullet", "list_enum", "meta_block", "para", - "table", "chunk", "chunk_line", "nested_chunks", - "nested_chunk", "indented_line", "ext_chunk", "opt_ext_chunk", - "tail", "quote_line", "defs", "def", - "fenced", "fenced_line", "html_line", "item_bullet", + "LINE_DEFINITION", "LINE_EMPTY", "LINE_FENCE_BACKTICK_3", "LINE_FENCE_BACKTICK_4", + "LINE_FENCE_BACKTICK_5", "LINE_FENCE_BACKTICK_START_3", "LINE_FENCE_BACKTICK_START_4", "LINE_FENCE_BACKTICK_START_5", + "LINE_META", "error", "doc", "blocks", + "block", "blockquote", "def_citation", "def_footnote", + "def_link", "definition_block", "empty", "fenced_block", + "html_block", "indented_code", "list_bullet", "list_enum", + "meta_block", "para", "table", "chunk", + "chunk_line", "nested_chunks", "nested_chunk", "indented_line", + "ext_chunk", "opt_ext_chunk", "tail", "quote_line", + "defs", "def", "fenced_3", "fenced_line", + "fenced_4", "fenced_5", "html_line", "item_bullet", "item_enum", "meta_line", "table_header", "table_body", "header_rows", "table_section", "all_rows", "row", }; @@ -451,70 +463,89 @@ static const char *const yyRuleName[] = { /* 37 */ "def ::= LINE_DEFINITION tail", /* 38 */ "def ::= LINE_DEFINITION", /* 39 */ "empty ::= empty LINE_EMPTY", - /* 40 */ "fenced_block ::= fenced LINE_FENCE_BACKTICK", - /* 41 */ "fenced ::= fenced fenced_line", - /* 42 */ "html_block ::= html_block html_line", - /* 43 */ "indented_code ::= indented_code indented_line", - /* 44 */ "indented_code ::= indented_code LINE_EMPTY", - /* 45 */ "list_bullet ::= list_bullet item_bullet", - /* 46 */ "item_bullet ::= LINE_LIST_BULLETED ext_chunk", - /* 47 */ "item_bullet ::= LINE_LIST_BULLETED chunk", - /* 48 */ "item_bullet ::= LINE_LIST_BULLETED nested_chunks", - /* 49 */ "item_bullet ::= LINE_LIST_BULLETED", - /* 50 */ "list_enum ::= list_enum item_enum", - /* 51 */ "item_enum ::= LINE_LIST_ENUMERATED ext_chunk", - /* 52 */ "item_enum ::= LINE_LIST_ENUMERATED chunk", - /* 53 */ "item_enum ::= LINE_LIST_ENUMERATED nested_chunks", - /* 54 */ "item_enum ::= LINE_LIST_ENUMERATED", - /* 55 */ "meta_block ::= meta_block meta_line", - /* 56 */ "para ::= LINE_PLAIN chunk", - /* 57 */ "table ::= table_header table_body", - /* 58 */ "table_header ::= header_rows LINE_TABLE_SEPARATOR", - /* 59 */ "header_rows ::= header_rows LINE_TABLE", - /* 60 */ "table_body ::= table_body table_section", - /* 61 */ "table_section ::= all_rows LINE_EMPTY", - /* 62 */ "table_section ::= all_rows", - /* 63 */ "all_rows ::= all_rows row", - /* 64 */ "para ::= all_rows", - /* 65 */ "chunk ::= chunk_line", - /* 66 */ "chunk_line ::= LINE_CONTINUATION", - /* 67 */ "nested_chunks ::= nested_chunk", - /* 68 */ "nested_chunk ::= empty", - /* 69 */ "indented_line ::= LINE_INDENTED_TAB", - /* 70 */ "indented_line ::= LINE_INDENTED_SPACE", - /* 71 */ "opt_ext_chunk ::= chunk", - /* 72 */ "tail ::= opt_ext_chunk", - /* 73 */ "tail ::= nested_chunks", - /* 74 */ "blockquote ::= LINE_BLOCKQUOTE", - /* 75 */ "quote_line ::= LINE_BLOCKQUOTE", - /* 76 */ "quote_line ::= LINE_CONTINUATION", - /* 77 */ "def_citation ::= LINE_DEF_CITATION", - /* 78 */ "def_footnote ::= LINE_DEF_FOOTNOTE", - /* 79 */ "def_link ::= LINE_DEF_LINK", - /* 80 */ "defs ::= def", - /* 81 */ "empty ::= LINE_EMPTY", - /* 82 */ "fenced_block ::= fenced", - /* 83 */ "fenced ::= LINE_FENCE_BACKTICK", - /* 84 */ "fenced ::= LINE_FENCE_BACKTICK_START", - /* 85 */ "fenced_line ::= LINE_CONTINUATION", - /* 86 */ "fenced_line ::= LINE_EMPTY", - /* 87 */ "html_block ::= LINE_HTML", - /* 88 */ "html_line ::= LINE_CONTINUATION", - /* 89 */ "html_line ::= LINE_HTML", - /* 90 */ "indented_code ::= indented_line", - /* 91 */ "list_bullet ::= item_bullet", - /* 92 */ "list_enum ::= item_enum", - /* 93 */ "meta_block ::= LINE_META", - /* 94 */ "meta_line ::= LINE_META", - /* 95 */ "meta_line ::= LINE_CONTINUATION", - /* 96 */ "para ::= LINE_PLAIN", - /* 97 */ "table ::= table_header", - /* 98 */ "header_rows ::= LINE_TABLE", - /* 99 */ "table_body ::= table_section", - /* 100 */ "all_rows ::= row", - /* 101 */ "row ::= header_rows", - /* 102 */ "row ::= LINE_TABLE_SEPARATOR", - /* 103 */ "para ::= defs", + /* 40 */ "fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_3", + /* 41 */ "fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_4", + /* 42 */ "fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_5", + /* 43 */ "fenced_3 ::= fenced_3 fenced_line", + /* 44 */ "fenced_block ::= fenced_4 LINE_FENCE_BACKTICK_4", + /* 45 */ "fenced_block ::= fenced_4 LINE_FENCE_BACKTICK_5", + /* 46 */ "fenced_4 ::= fenced_4 fenced_line", + /* 47 */ "fenced_4 ::= fenced_4 LINE_FENCE_BACKTICK_3", + /* 48 */ "fenced_4 ::= fenced_4 LINE_FENCE_BACKTICK_START_3", + /* 49 */ "fenced_block ::= fenced_5 LINE_FENCE_BACKTICK_5", + /* 50 */ "fenced_5 ::= fenced_5 fenced_line", + /* 51 */ "fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_3", + /* 52 */ "fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_START_3", + /* 53 */ "fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_4", + /* 54 */ "fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_START_4", + /* 55 */ "html_block ::= html_block html_line", + /* 56 */ "indented_code ::= indented_code indented_line", + /* 57 */ "indented_code ::= indented_code LINE_EMPTY", + /* 58 */ "list_bullet ::= list_bullet item_bullet", + /* 59 */ "item_bullet ::= LINE_LIST_BULLETED ext_chunk", + /* 60 */ "item_bullet ::= LINE_LIST_BULLETED chunk", + /* 61 */ "item_bullet ::= LINE_LIST_BULLETED nested_chunks", + /* 62 */ "item_bullet ::= LINE_LIST_BULLETED", + /* 63 */ "list_enum ::= list_enum item_enum", + /* 64 */ "item_enum ::= LINE_LIST_ENUMERATED ext_chunk", + /* 65 */ "item_enum ::= LINE_LIST_ENUMERATED chunk", + /* 66 */ "item_enum ::= LINE_LIST_ENUMERATED nested_chunks", + /* 67 */ "item_enum ::= LINE_LIST_ENUMERATED", + /* 68 */ "meta_block ::= meta_block meta_line", + /* 69 */ "para ::= LINE_PLAIN chunk", + /* 70 */ "table ::= table_header table_body", + /* 71 */ "table_header ::= header_rows LINE_TABLE_SEPARATOR", + /* 72 */ "header_rows ::= header_rows LINE_TABLE", + /* 73 */ "table_body ::= table_body table_section", + /* 74 */ "table_section ::= all_rows LINE_EMPTY", + /* 75 */ "table_section ::= all_rows", + /* 76 */ "all_rows ::= all_rows row", + /* 77 */ "para ::= all_rows", + /* 78 */ "chunk ::= chunk_line", + /* 79 */ "chunk_line ::= LINE_CONTINUATION", + /* 80 */ "nested_chunks ::= nested_chunk", + /* 81 */ "nested_chunk ::= empty", + /* 82 */ "indented_line ::= LINE_INDENTED_TAB", + /* 83 */ "indented_line ::= LINE_INDENTED_SPACE", + /* 84 */ "opt_ext_chunk ::= chunk", + /* 85 */ "tail ::= opt_ext_chunk", + /* 86 */ "tail ::= nested_chunks", + /* 87 */ "blockquote ::= LINE_BLOCKQUOTE", + /* 88 */ "quote_line ::= LINE_BLOCKQUOTE", + /* 89 */ "quote_line ::= LINE_CONTINUATION", + /* 90 */ "def_citation ::= LINE_DEF_CITATION", + /* 91 */ "def_footnote ::= LINE_DEF_FOOTNOTE", + /* 92 */ "def_link ::= LINE_DEF_LINK", + /* 93 */ "defs ::= def", + /* 94 */ "empty ::= LINE_EMPTY", + /* 95 */ "fenced_block ::= fenced_3", + /* 96 */ "fenced_3 ::= LINE_FENCE_BACKTICK_3", + /* 97 */ "fenced_3 ::= LINE_FENCE_BACKTICK_START_3", + /* 98 */ "fenced_block ::= fenced_4", + /* 99 */ "fenced_4 ::= LINE_FENCE_BACKTICK_4", + /* 100 */ "fenced_4 ::= LINE_FENCE_BACKTICK_START_4", + /* 101 */ "fenced_block ::= fenced_5", + /* 102 */ "fenced_5 ::= LINE_FENCE_BACKTICK_5", + /* 103 */ "fenced_5 ::= LINE_FENCE_BACKTICK_START_5", + /* 104 */ "fenced_line ::= LINE_CONTINUATION", + /* 105 */ "fenced_line ::= LINE_EMPTY", + /* 106 */ "html_block ::= LINE_HTML", + /* 107 */ "html_line ::= LINE_CONTINUATION", + /* 108 */ "html_line ::= LINE_HTML", + /* 109 */ "indented_code ::= indented_line", + /* 110 */ "list_bullet ::= item_bullet", + /* 111 */ "list_enum ::= item_enum", + /* 112 */ "meta_block ::= LINE_META", + /* 113 */ "meta_line ::= LINE_META", + /* 114 */ "meta_line ::= LINE_CONTINUATION", + /* 115 */ "para ::= LINE_PLAIN", + /* 116 */ "table ::= table_header", + /* 117 */ "header_rows ::= LINE_TABLE", + /* 118 */ "table_body ::= table_section", + /* 119 */ "all_rows ::= row", + /* 120 */ "row ::= header_rows", + /* 121 */ "row ::= LINE_TABLE_SEPARATOR", + /* 122 */ "para ::= defs", }; #endif /* NDEBUG */ @@ -863,110 +894,129 @@ static const struct { YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ unsigned char nrhs; /* Number of right-hand side symbols in the rule */ } yyRuleInfo[] = { - { 28, 1 }, - { 29, 2 }, - { 29, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 30, 1 }, - { 45, 2 }, - { 47, 2 }, - { 48, 3 }, - { 48, 2 }, - { 50, 2 }, - { 51, 2 }, - { 31, 2 }, - { 32, 2 }, - { 33, 2 }, - { 34, 2 }, + { 34, 1 }, { 35, 2 }, + { 35, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 36, 1 }, + { 51, 2 }, + { 53, 2 }, + { 54, 3 }, { 54, 2 }, - { 55, 2 }, - { 55, 1 }, - { 36, 2 }, - { 37, 2 }, { 56, 2 }, + { 57, 2 }, + { 37, 2 }, { 38, 2 }, { 39, 2 }, - { 39, 2 }, { 40, 2 }, - { 59, 2 }, - { 59, 2 }, - { 59, 2 }, - { 59, 1 }, { 41, 2 }, { 60, 2 }, - { 60, 2 }, - { 60, 2 }, - { 60, 1 }, + { 61, 2 }, + { 61, 1 }, { 42, 2 }, { 43, 2 }, - { 44, 2 }, + { 43, 2 }, + { 43, 2 }, { 62, 2 }, + { 43, 2 }, + { 43, 2 }, { 64, 2 }, - { 63, 2 }, + { 64, 2 }, + { 64, 2 }, + { 43, 2 }, { 65, 2 }, - { 65, 1 }, - { 66, 2 }, - { 43, 1 }, - { 45, 1 }, - { 46, 1 }, - { 47, 1 }, - { 48, 1 }, - { 49, 1 }, + { 65, 2 }, + { 65, 2 }, + { 65, 2 }, + { 65, 2 }, + { 44, 2 }, + { 45, 2 }, + { 45, 2 }, + { 46, 2 }, + { 67, 2 }, + { 67, 2 }, + { 67, 2 }, + { 67, 1 }, + { 47, 2 }, + { 68, 2 }, + { 68, 2 }, + { 68, 2 }, + { 68, 1 }, + { 48, 2 }, + { 49, 2 }, + { 50, 2 }, + { 70, 2 }, + { 72, 2 }, + { 71, 2 }, + { 73, 2 }, + { 73, 1 }, + { 74, 2 }, { 49, 1 }, { 51, 1 }, { 52, 1 }, - { 52, 1 }, - { 31, 1 }, { 53, 1 }, - { 53, 1 }, - { 32, 1 }, - { 33, 1 }, - { 34, 1 }, { 54, 1 }, - { 36, 1 }, - { 37, 1 }, - { 56, 1 }, - { 56, 1 }, - { 57, 1 }, + { 55, 1 }, + { 55, 1 }, { 57, 1 }, - { 38, 1 }, { 58, 1 }, { 58, 1 }, + { 37, 1 }, + { 59, 1 }, + { 59, 1 }, + { 38, 1 }, { 39, 1 }, { 40, 1 }, - { 41, 1 }, + { 60, 1 }, { 42, 1 }, - { 61, 1 }, - { 61, 1 }, { 43, 1 }, - { 44, 1 }, + { 62, 1 }, + { 62, 1 }, + { 43, 1 }, + { 64, 1 }, { 64, 1 }, + { 43, 1 }, + { 65, 1 }, + { 65, 1 }, { 63, 1 }, + { 63, 1 }, + { 44, 1 }, { 66, 1 }, - { 67, 1 }, - { 67, 1 }, - { 43, 1 }, + { 66, 1 }, + { 45, 1 }, + { 46, 1 }, + { 47, 1 }, + { 48, 1 }, + { 69, 1 }, + { 69, 1 }, + { 49, 1 }, + { 50, 1 }, + { 72, 1 }, + { 71, 1 }, + { 74, 1 }, + { 75, 1 }, + { 75, 1 }, + { 49, 1 }, }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -1153,18 +1203,26 @@ static void yy_reduce( case 34: /* def_link ::= LINE_DEF_LINK chunk */ yytestcase(yyruleno==34); case 36: /* defs ::= defs def */ yytestcase(yyruleno==36); case 39: /* empty ::= empty LINE_EMPTY */ yytestcase(yyruleno==39); - case 41: /* fenced ::= fenced fenced_line */ yytestcase(yyruleno==41); - case 42: /* html_block ::= html_block html_line */ yytestcase(yyruleno==42); - case 43: /* indented_code ::= indented_code indented_line */ yytestcase(yyruleno==43); - case 44: /* indented_code ::= indented_code LINE_EMPTY */ yytestcase(yyruleno==44); - case 45: /* list_bullet ::= list_bullet item_bullet */ yytestcase(yyruleno==45); - case 50: /* list_enum ::= list_enum item_enum */ yytestcase(yyruleno==50); - case 55: /* meta_block ::= meta_block meta_line */ yytestcase(yyruleno==55); - case 56: /* para ::= LINE_PLAIN chunk */ yytestcase(yyruleno==56); - case 57: /* table ::= table_header table_body */ yytestcase(yyruleno==57); - case 59: /* header_rows ::= header_rows LINE_TABLE */ yytestcase(yyruleno==59); - case 60: /* table_body ::= table_body table_section */ yytestcase(yyruleno==60); - case 63: /* all_rows ::= all_rows row */ yytestcase(yyruleno==63); + case 43: /* fenced_3 ::= fenced_3 fenced_line */ yytestcase(yyruleno==43); + case 46: /* fenced_4 ::= fenced_4 fenced_line */ yytestcase(yyruleno==46); + case 47: /* fenced_4 ::= fenced_4 LINE_FENCE_BACKTICK_3 */ yytestcase(yyruleno==47); + case 48: /* fenced_4 ::= fenced_4 LINE_FENCE_BACKTICK_START_3 */ yytestcase(yyruleno==48); + case 50: /* fenced_5 ::= fenced_5 fenced_line */ yytestcase(yyruleno==50); + case 51: /* fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_3 */ yytestcase(yyruleno==51); + case 52: /* fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_START_3 */ yytestcase(yyruleno==52); + case 53: /* fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_4 */ yytestcase(yyruleno==53); + case 54: /* fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_START_4 */ yytestcase(yyruleno==54); + case 55: /* html_block ::= html_block html_line */ yytestcase(yyruleno==55); + case 56: /* indented_code ::= indented_code indented_line */ yytestcase(yyruleno==56); + case 57: /* indented_code ::= indented_code LINE_EMPTY */ yytestcase(yyruleno==57); + case 58: /* list_bullet ::= list_bullet item_bullet */ yytestcase(yyruleno==58); + case 63: /* list_enum ::= list_enum item_enum */ yytestcase(yyruleno==63); + case 68: /* meta_block ::= meta_block meta_line */ yytestcase(yyruleno==68); + case 69: /* para ::= LINE_PLAIN chunk */ yytestcase(yyruleno==69); + case 70: /* table ::= table_header table_body */ yytestcase(yyruleno==70); + case 72: /* header_rows ::= header_rows LINE_TABLE */ yytestcase(yyruleno==72); + case 73: /* table_body ::= table_body table_section */ yytestcase(yyruleno==73); + case 76: /* all_rows ::= all_rows row */ yytestcase(yyruleno==76); { yylhsminor.yy0 = yymsp[-1].minor.yy0; token_chain_append(yymsp[-1].minor.yy0, yymsp[0].minor.yy0); } yymsp[-1].minor.yy0 = yylhsminor.yy0; break; @@ -1188,83 +1246,94 @@ static void yy_reduce( { yylhsminor.yy0 = token_new_parent(yymsp[0].minor.yy0, BLOCK_DEFINITION); } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 40: /* fenced_block ::= fenced LINE_FENCE_BACKTICK */ + case 40: /* fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_3 */ + case 41: /* fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_4 */ yytestcase(yyruleno==41); + case 42: /* fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_5 */ yytestcase(yyruleno==42); + case 44: /* fenced_block ::= fenced_4 LINE_FENCE_BACKTICK_4 */ yytestcase(yyruleno==44); + case 45: /* fenced_block ::= fenced_4 LINE_FENCE_BACKTICK_5 */ yytestcase(yyruleno==45); + case 49: /* fenced_block ::= fenced_5 LINE_FENCE_BACKTICK_5 */ yytestcase(yyruleno==49); { yylhsminor.yy0 = yymsp[-1].minor.yy0; token_chain_append(yymsp[-1].minor.yy0, yymsp[0].minor.yy0); yymsp[0].minor.yy0->child->type = CODE_FENCE; } yymsp[-1].minor.yy0 = yylhsminor.yy0; break; - case 46: /* item_bullet ::= LINE_LIST_BULLETED ext_chunk */ - case 48: /* item_bullet ::= LINE_LIST_BULLETED nested_chunks */ yytestcase(yyruleno==48); - case 51: /* item_enum ::= LINE_LIST_ENUMERATED ext_chunk */ yytestcase(yyruleno==51); - case 53: /* item_enum ::= LINE_LIST_ENUMERATED nested_chunks */ yytestcase(yyruleno==53); + case 59: /* item_bullet ::= LINE_LIST_BULLETED ext_chunk */ + case 61: /* item_bullet ::= LINE_LIST_BULLETED nested_chunks */ yytestcase(yyruleno==61); + case 64: /* item_enum ::= LINE_LIST_ENUMERATED ext_chunk */ yytestcase(yyruleno==64); + case 66: /* item_enum ::= LINE_LIST_ENUMERATED nested_chunks */ yytestcase(yyruleno==66); { yylhsminor.yy0 = token_new_parent(yymsp[-1].minor.yy0, BLOCK_LIST_ITEM); token_chain_append(yymsp[-1].minor.yy0, yymsp[0].minor.yy0); recursive_parse_list_item(engine, yylhsminor.yy0); } yymsp[-1].minor.yy0 = yylhsminor.yy0; break; - case 47: /* item_bullet ::= LINE_LIST_BULLETED chunk */ - case 52: /* item_enum ::= LINE_LIST_ENUMERATED chunk */ yytestcase(yyruleno==52); + case 60: /* item_bullet ::= LINE_LIST_BULLETED chunk */ + case 65: /* item_enum ::= LINE_LIST_ENUMERATED chunk */ yytestcase(yyruleno==65); { yylhsminor.yy0 = token_new_parent(yymsp[-1].minor.yy0, BLOCK_LIST_ITEM_TIGHT); token_chain_append(yymsp[-1].minor.yy0, yymsp[0].minor.yy0); recursive_parse_list_item(engine, yylhsminor.yy0); } yymsp[-1].minor.yy0 = yylhsminor.yy0; break; - case 49: /* item_bullet ::= LINE_LIST_BULLETED */ - case 54: /* item_enum ::= LINE_LIST_ENUMERATED */ yytestcase(yyruleno==54); + case 62: /* item_bullet ::= LINE_LIST_BULLETED */ + case 67: /* item_enum ::= LINE_LIST_ENUMERATED */ yytestcase(yyruleno==67); { yylhsminor.yy0 = token_new_parent(yymsp[0].minor.yy0, BLOCK_LIST_ITEM_TIGHT); } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 58: /* table_header ::= header_rows LINE_TABLE_SEPARATOR */ + case 71: /* table_header ::= header_rows LINE_TABLE_SEPARATOR */ { yylhsminor.yy0 = token_new_parent(yymsp[-1].minor.yy0, BLOCK_TABLE_HEADER); token_chain_append(yymsp[-1].minor.yy0, yymsp[0].minor.yy0); } yymsp[-1].minor.yy0 = yylhsminor.yy0; break; - case 61: /* table_section ::= all_rows LINE_EMPTY */ + case 74: /* table_section ::= all_rows LINE_EMPTY */ { yylhsminor.yy0 = token_new_parent(yymsp[-1].minor.yy0, BLOCK_TABLE_SECTION); token_chain_append(yymsp[-1].minor.yy0, yymsp[0].minor.yy0); } yymsp[-1].minor.yy0 = yylhsminor.yy0; break; - case 62: /* table_section ::= all_rows */ + case 75: /* table_section ::= all_rows */ { yylhsminor.yy0 = token_new_parent(yymsp[0].minor.yy0, BLOCK_TABLE_SECTION); } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 64: /* para ::= all_rows */ + case 77: /* para ::= all_rows */ { yylhsminor.yy0 = yymsp[0].minor.yy0; } yymsp[0].minor.yy0 = yylhsminor.yy0; break; default: - /* (65) chunk ::= chunk_line (OPTIMIZED OUT) */ assert(yyruleno!=65); - /* (66) chunk_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==66); - /* (67) nested_chunks ::= nested_chunk (OPTIMIZED OUT) */ assert(yyruleno!=67); - /* (68) nested_chunk ::= empty */ yytestcase(yyruleno==68); - /* (69) indented_line ::= LINE_INDENTED_TAB */ yytestcase(yyruleno==69); - /* (70) indented_line ::= LINE_INDENTED_SPACE */ yytestcase(yyruleno==70); - /* (71) opt_ext_chunk ::= chunk */ yytestcase(yyruleno==71); - /* (72) tail ::= opt_ext_chunk (OPTIMIZED OUT) */ assert(yyruleno!=72); - /* (73) tail ::= nested_chunks */ yytestcase(yyruleno==73); - /* (74) blockquote ::= LINE_BLOCKQUOTE */ yytestcase(yyruleno==74); - /* (75) quote_line ::= LINE_BLOCKQUOTE */ yytestcase(yyruleno==75); - /* (76) quote_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==76); - /* (77) def_citation ::= LINE_DEF_CITATION */ yytestcase(yyruleno==77); - /* (78) def_footnote ::= LINE_DEF_FOOTNOTE */ yytestcase(yyruleno==78); - /* (79) def_link ::= LINE_DEF_LINK */ yytestcase(yyruleno==79); - /* (80) defs ::= def (OPTIMIZED OUT) */ assert(yyruleno!=80); - /* (81) empty ::= LINE_EMPTY */ yytestcase(yyruleno==81); - /* (82) fenced_block ::= fenced */ yytestcase(yyruleno==82); - /* (83) fenced ::= LINE_FENCE_BACKTICK */ yytestcase(yyruleno==83); - /* (84) fenced ::= LINE_FENCE_BACKTICK_START */ yytestcase(yyruleno==84); - /* (85) fenced_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==85); - /* (86) fenced_line ::= LINE_EMPTY */ yytestcase(yyruleno==86); - /* (87) html_block ::= LINE_HTML */ yytestcase(yyruleno==87); - /* (88) html_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==88); - /* (89) html_line ::= LINE_HTML */ yytestcase(yyruleno==89); - /* (90) indented_code ::= indented_line (OPTIMIZED OUT) */ assert(yyruleno!=90); - /* (91) list_bullet ::= item_bullet (OPTIMIZED OUT) */ assert(yyruleno!=91); - /* (92) list_enum ::= item_enum (OPTIMIZED OUT) */ assert(yyruleno!=92); - /* (93) meta_block ::= LINE_META */ yytestcase(yyruleno==93); - /* (94) meta_line ::= LINE_META */ yytestcase(yyruleno==94); - /* (95) meta_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==95); - /* (96) para ::= LINE_PLAIN */ yytestcase(yyruleno==96); - /* (97) table ::= table_header */ yytestcase(yyruleno==97); - /* (98) header_rows ::= LINE_TABLE */ yytestcase(yyruleno==98); - /* (99) table_body ::= table_section (OPTIMIZED OUT) */ assert(yyruleno!=99); - /* (100) all_rows ::= row (OPTIMIZED OUT) */ assert(yyruleno!=100); - /* (101) row ::= header_rows */ yytestcase(yyruleno==101); - /* (102) row ::= LINE_TABLE_SEPARATOR */ yytestcase(yyruleno==102); - /* (103) para ::= defs */ yytestcase(yyruleno==103); + /* (78) chunk ::= chunk_line (OPTIMIZED OUT) */ assert(yyruleno!=78); + /* (79) chunk_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==79); + /* (80) nested_chunks ::= nested_chunk (OPTIMIZED OUT) */ assert(yyruleno!=80); + /* (81) nested_chunk ::= empty */ yytestcase(yyruleno==81); + /* (82) indented_line ::= LINE_INDENTED_TAB */ yytestcase(yyruleno==82); + /* (83) indented_line ::= LINE_INDENTED_SPACE */ yytestcase(yyruleno==83); + /* (84) opt_ext_chunk ::= chunk */ yytestcase(yyruleno==84); + /* (85) tail ::= opt_ext_chunk (OPTIMIZED OUT) */ assert(yyruleno!=85); + /* (86) tail ::= nested_chunks */ yytestcase(yyruleno==86); + /* (87) blockquote ::= LINE_BLOCKQUOTE */ yytestcase(yyruleno==87); + /* (88) quote_line ::= LINE_BLOCKQUOTE */ yytestcase(yyruleno==88); + /* (89) quote_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==89); + /* (90) def_citation ::= LINE_DEF_CITATION */ yytestcase(yyruleno==90); + /* (91) def_footnote ::= LINE_DEF_FOOTNOTE */ yytestcase(yyruleno==91); + /* (92) def_link ::= LINE_DEF_LINK */ yytestcase(yyruleno==92); + /* (93) defs ::= def (OPTIMIZED OUT) */ assert(yyruleno!=93); + /* (94) empty ::= LINE_EMPTY */ yytestcase(yyruleno==94); + /* (95) fenced_block ::= fenced_3 */ yytestcase(yyruleno==95); + /* (96) fenced_3 ::= LINE_FENCE_BACKTICK_3 */ yytestcase(yyruleno==96); + /* (97) fenced_3 ::= LINE_FENCE_BACKTICK_START_3 */ yytestcase(yyruleno==97); + /* (98) fenced_block ::= fenced_4 */ yytestcase(yyruleno==98); + /* (99) fenced_4 ::= LINE_FENCE_BACKTICK_4 */ yytestcase(yyruleno==99); + /* (100) fenced_4 ::= LINE_FENCE_BACKTICK_START_4 */ yytestcase(yyruleno==100); + /* (101) fenced_block ::= fenced_5 */ yytestcase(yyruleno==101); + /* (102) fenced_5 ::= LINE_FENCE_BACKTICK_5 */ yytestcase(yyruleno==102); + /* (103) fenced_5 ::= LINE_FENCE_BACKTICK_START_5 */ yytestcase(yyruleno==103); + /* (104) fenced_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==104); + /* (105) fenced_line ::= LINE_EMPTY */ yytestcase(yyruleno==105); + /* (106) html_block ::= LINE_HTML */ yytestcase(yyruleno==106); + /* (107) html_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==107); + /* (108) html_line ::= LINE_HTML */ yytestcase(yyruleno==108); + /* (109) indented_code ::= indented_line (OPTIMIZED OUT) */ assert(yyruleno!=109); + /* (110) list_bullet ::= item_bullet (OPTIMIZED OUT) */ assert(yyruleno!=110); + /* (111) list_enum ::= item_enum (OPTIMIZED OUT) */ assert(yyruleno!=111); + /* (112) meta_block ::= LINE_META */ yytestcase(yyruleno==112); + /* (113) meta_line ::= LINE_META */ yytestcase(yyruleno==113); + /* (114) meta_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==114); + /* (115) para ::= LINE_PLAIN */ yytestcase(yyruleno==115); + /* (116) table ::= table_header */ yytestcase(yyruleno==116); + /* (117) header_rows ::= LINE_TABLE */ yytestcase(yyruleno==117); + /* (118) table_body ::= table_section (OPTIMIZED OUT) */ assert(yyruleno!=118); + /* (119) all_rows ::= row (OPTIMIZED OUT) */ assert(yyruleno!=119); + /* (120) row ::= header_rows */ yytestcase(yyruleno==120); + /* (121) row ::= LINE_TABLE_SEPARATOR */ yytestcase(yyruleno==121); + /* (122) para ::= defs */ yytestcase(yyruleno==122); break; /********** End reduce actions ************************************************/ }; diff --git a/src/parser.h b/src/parser.h index 0be9004..a779d8f 100644 --- a/src/parser.h +++ b/src/parser.h @@ -23,4 +23,10 @@ #define LINE_TOC 23 #define LINE_DEFINITION 24 #define LINE_EMPTY 25 -#define LINE_META 26 +#define LINE_FENCE_BACKTICK_3 26 +#define LINE_FENCE_BACKTICK_4 27 +#define LINE_FENCE_BACKTICK_5 28 +#define LINE_FENCE_BACKTICK_START_3 29 +#define LINE_FENCE_BACKTICK_START_4 30 +#define LINE_FENCE_BACKTICK_START_5 31 +#define LINE_META 32 diff --git a/src/parser.out b/src/parser.out index 7048871..91a32b3 100644 --- a/src/parser.out +++ b/src/parser.out @@ -41,11 +41,30 @@ State 0: def ::= * LINE_DEFINITION empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - fenced_block ::= * fenced LINE_FENCE_BACKTICK - fenced_block ::= * fenced - fenced ::= * fenced fenced_line - fenced ::= * LINE_FENCE_BACKTICK - fenced ::= * LINE_FENCE_BACKTICK_START + fenced_block ::= * fenced_3 LINE_FENCE_BACKTICK_3 + fenced_block ::= * fenced_3 LINE_FENCE_BACKTICK_4 + fenced_block ::= * fenced_3 LINE_FENCE_BACKTICK_5 + fenced_block ::= * fenced_3 + fenced_3 ::= * fenced_3 fenced_line + fenced_3 ::= * LINE_FENCE_BACKTICK_3 + fenced_3 ::= * LINE_FENCE_BACKTICK_START_3 + fenced_block ::= * fenced_4 LINE_FENCE_BACKTICK_4 + fenced_block ::= * fenced_4 LINE_FENCE_BACKTICK_5 + fenced_block ::= * fenced_4 + fenced_4 ::= * fenced_4 fenced_line + fenced_4 ::= * fenced_4 LINE_FENCE_BACKTICK_3 + fenced_4 ::= * fenced_4 LINE_FENCE_BACKTICK_START_3 + fenced_4 ::= * LINE_FENCE_BACKTICK_4 + fenced_4 ::= * LINE_FENCE_BACKTICK_START_4 + fenced_block ::= * fenced_5 LINE_FENCE_BACKTICK_5 + fenced_block ::= * fenced_5 + fenced_5 ::= * fenced_5 fenced_line + fenced_5 ::= * fenced_5 LINE_FENCE_BACKTICK_3 + fenced_5 ::= * fenced_5 LINE_FENCE_BACKTICK_START_3 + fenced_5 ::= * fenced_5 LINE_FENCE_BACKTICK_4 + fenced_5 ::= * fenced_5 LINE_FENCE_BACKTICK_START_4 + fenced_5 ::= * LINE_FENCE_BACKTICK_5 + fenced_5 ::= * LINE_FENCE_BACKTICK_START_5 html_block ::= * html_block html_line html_block ::= * LINE_HTML indented_code ::= * indented_code indented_line @@ -80,11 +99,11 @@ State 0: para ::= * defs LINE_PLAIN shift 14 - LINE_TABLE_SEPARATOR shift-reduce 102 row ::= LINE_TABLE_SEPARATOR - LINE_INDENTED_TAB shift-reduce 69 indented_line ::= LINE_INDENTED_TAB - LINE_INDENTED_SPACE shift-reduce 70 indented_line ::= LINE_INDENTED_SPACE - LINE_TABLE shift-reduce 98 header_rows ::= LINE_TABLE - LINE_HTML shift-reduce 87 html_block ::= LINE_HTML + LINE_TABLE_SEPARATOR shift-reduce 121 row ::= LINE_TABLE_SEPARATOR + LINE_INDENTED_TAB shift-reduce 82 indented_line ::= LINE_INDENTED_TAB + LINE_INDENTED_SPACE shift-reduce 83 indented_line ::= LINE_INDENTED_SPACE + LINE_TABLE shift-reduce 117 header_rows ::= LINE_TABLE + LINE_HTML shift-reduce 106 html_block ::= LINE_HTML LINE_ATX_1 shift-reduce 3 block ::= LINE_ATX_1 LINE_ATX_2 shift-reduce 4 block ::= LINE_ATX_2 LINE_ATX_3 shift-reduce 5 block ::= LINE_ATX_3 @@ -92,43 +111,49 @@ State 0: LINE_ATX_5 shift-reduce 7 block ::= LINE_ATX_5 LINE_ATX_6 shift-reduce 8 block ::= LINE_ATX_6 LINE_HR shift-reduce 9 block ::= LINE_HR - LINE_BLOCKQUOTE shift-reduce 74 blockquote ::= LINE_BLOCKQUOTE + LINE_BLOCKQUOTE shift-reduce 87 blockquote ::= LINE_BLOCKQUOTE LINE_LIST_BULLETED shift 6 LINE_LIST_ENUMERATED shift 5 LINE_DEF_CITATION shift 3 LINE_DEF_FOOTNOTE shift 2 LINE_DEF_LINK shift 15 - LINE_FENCE_BACKTICK shift-reduce 83 fenced ::= LINE_FENCE_BACKTICK - LINE_FENCE_BACKTICK_START shift-reduce 84 fenced ::= LINE_FENCE_BACKTICK_START LINE_TOC shift-reduce 10 block ::= LINE_TOC LINE_DEFINITION shift 4 - LINE_EMPTY shift-reduce 81 empty ::= LINE_EMPTY - LINE_META shift-reduce 93 meta_block ::= LINE_META + LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY + LINE_FENCE_BACKTICK_3 shift-reduce 96 fenced_3 ::= LINE_FENCE_BACKTICK_3 + LINE_FENCE_BACKTICK_4 shift-reduce 99 fenced_4 ::= LINE_FENCE_BACKTICK_4 + LINE_FENCE_BACKTICK_5 shift-reduce 102 fenced_5 ::= LINE_FENCE_BACKTICK_5 + LINE_FENCE_BACKTICK_START_3 shift-reduce 97 fenced_3 ::= LINE_FENCE_BACKTICK_START_3 + LINE_FENCE_BACKTICK_START_4 shift-reduce 100 fenced_4 ::= LINE_FENCE_BACKTICK_START_4 + LINE_FENCE_BACKTICK_START_5 shift-reduce 103 fenced_5 ::= LINE_FENCE_BACKTICK_START_5 + LINE_META shift-reduce 112 meta_block ::= LINE_META doc accept blocks shift 1 block shift-reduce 2 blocks ::= block - blockquote shift 28 + blockquote shift 30 def_citation shift-reduce 12 block ::= def_citation def_footnote shift-reduce 13 block ::= def_footnote def_link shift-reduce 14 block ::= def_link definition_block shift-reduce 15 block ::= definition_block - empty shift 38 + empty shift 40 fenced_block shift-reduce 17 block ::= fenced_block - html_block shift 27 - indented_code shift 25 - list_bullet shift 35 - list_enum shift 33 - meta_block shift 26 + html_block shift 29 + indented_code shift 27 + list_bullet shift 37 + list_enum shift 35 + meta_block shift 28 para shift 18 table shift-reduce 24 block ::= table - indented_line shift 25 /* because indented_line==indented_code */ - defs shift 30 - def shift 30 /* because def==defs */ - fenced shift 23 - item_bullet shift 35 /* because item_bullet==list_bullet */ - item_enum shift 33 /* because item_enum==list_enum */ + indented_line shift 27 /* because indented_line==indented_code */ + defs shift 32 + def shift 32 /* because def==defs */ + fenced_3 shift 25 + fenced_4 shift 24 + fenced_5 shift 23 + item_bullet shift 37 /* because item_bullet==list_bullet */ + item_enum shift 35 /* because item_enum==list_enum */ table_header shift 7 - header_rows shift 36 + header_rows shift 38 all_rows shift 13 row shift 13 /* because row==all_rows */ @@ -174,11 +199,30 @@ State 1: def ::= * LINE_DEFINITION empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - fenced_block ::= * fenced LINE_FENCE_BACKTICK - fenced_block ::= * fenced - fenced ::= * fenced fenced_line - fenced ::= * LINE_FENCE_BACKTICK - fenced ::= * LINE_FENCE_BACKTICK_START + fenced_block ::= * fenced_3 LINE_FENCE_BACKTICK_3 + fenced_block ::= * fenced_3 LINE_FENCE_BACKTICK_4 + fenced_block ::= * fenced_3 LINE_FENCE_BACKTICK_5 + fenced_block ::= * fenced_3 + fenced_3 ::= * fenced_3 fenced_line + fenced_3 ::= * LINE_FENCE_BACKTICK_3 + fenced_3 ::= * LINE_FENCE_BACKTICK_START_3 + fenced_block ::= * fenced_4 LINE_FENCE_BACKTICK_4 + fenced_block ::= * fenced_4 LINE_FENCE_BACKTICK_5 + fenced_block ::= * fenced_4 + fenced_4 ::= * fenced_4 fenced_line + fenced_4 ::= * fenced_4 LINE_FENCE_BACKTICK_3 + fenced_4 ::= * fenced_4 LINE_FENCE_BACKTICK_START_3 + fenced_4 ::= * LINE_FENCE_BACKTICK_4 + fenced_4 ::= * LINE_FENCE_BACKTICK_START_4 + fenced_block ::= * fenced_5 LINE_FENCE_BACKTICK_5 + fenced_block ::= * fenced_5 + fenced_5 ::= * fenced_5 fenced_line + fenced_5 ::= * fenced_5 LINE_FENCE_BACKTICK_3 + fenced_5 ::= * fenced_5 LINE_FENCE_BACKTICK_START_3 + fenced_5 ::= * fenced_5 LINE_FENCE_BACKTICK_4 + fenced_5 ::= * fenced_5 LINE_FENCE_BACKTICK_START_4 + fenced_5 ::= * LINE_FENCE_BACKTICK_5 + fenced_5 ::= * LINE_FENCE_BACKTICK_START_5 html_block ::= * html_block html_line html_block ::= * LINE_HTML indented_code ::= * indented_code indented_line @@ -214,11 +258,11 @@ State 1: $ reduce 0 doc ::= blocks LINE_PLAIN shift 14 - LINE_TABLE_SEPARATOR shift-reduce 102 row ::= LINE_TABLE_SEPARATOR - LINE_INDENTED_TAB shift-reduce 69 indented_line ::= LINE_INDENTED_TAB - LINE_INDENTED_SPACE shift-reduce 70 indented_line ::= LINE_INDENTED_SPACE - LINE_TABLE shift-reduce 98 header_rows ::= LINE_TABLE - LINE_HTML shift-reduce 87 html_block ::= LINE_HTML + LINE_TABLE_SEPARATOR shift-reduce 121 row ::= LINE_TABLE_SEPARATOR + LINE_INDENTED_TAB shift-reduce 82 indented_line ::= LINE_INDENTED_TAB + LINE_INDENTED_SPACE shift-reduce 83 indented_line ::= LINE_INDENTED_SPACE + LINE_TABLE shift-reduce 117 header_rows ::= LINE_TABLE + LINE_HTML shift-reduce 106 html_block ::= LINE_HTML LINE_ATX_1 shift-reduce 3 block ::= LINE_ATX_1 LINE_ATX_2 shift-reduce 4 block ::= LINE_ATX_2 LINE_ATX_3 shift-reduce 5 block ::= LINE_ATX_3 @@ -226,41 +270,47 @@ State 1: LINE_ATX_5 shift-reduce 7 block ::= LINE_ATX_5 LINE_ATX_6 shift-reduce 8 block ::= LINE_ATX_6 LINE_HR shift-reduce 9 block ::= LINE_HR - LINE_BLOCKQUOTE shift-reduce 74 blockquote ::= LINE_BLOCKQUOTE + LINE_BLOCKQUOTE shift-reduce 87 blockquote ::= LINE_BLOCKQUOTE LINE_LIST_BULLETED shift 6 LINE_LIST_ENUMERATED shift 5 LINE_DEF_CITATION shift 3 LINE_DEF_FOOTNOTE shift 2 LINE_DEF_LINK shift 15 - LINE_FENCE_BACKTICK shift-reduce 83 fenced ::= LINE_FENCE_BACKTICK - LINE_FENCE_BACKTICK_START shift-reduce 84 fenced ::= LINE_FENCE_BACKTICK_START LINE_TOC shift-reduce 10 block ::= LINE_TOC LINE_DEFINITION shift 4 - LINE_EMPTY shift-reduce 81 empty ::= LINE_EMPTY - LINE_META shift-reduce 93 meta_block ::= LINE_META + LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY + LINE_FENCE_BACKTICK_3 shift-reduce 96 fenced_3 ::= LINE_FENCE_BACKTICK_3 + LINE_FENCE_BACKTICK_4 shift-reduce 99 fenced_4 ::= LINE_FENCE_BACKTICK_4 + LINE_FENCE_BACKTICK_5 shift-reduce 102 fenced_5 ::= LINE_FENCE_BACKTICK_5 + LINE_FENCE_BACKTICK_START_3 shift-reduce 97 fenced_3 ::= LINE_FENCE_BACKTICK_START_3 + LINE_FENCE_BACKTICK_START_4 shift-reduce 100 fenced_4 ::= LINE_FENCE_BACKTICK_START_4 + LINE_FENCE_BACKTICK_START_5 shift-reduce 103 fenced_5 ::= LINE_FENCE_BACKTICK_START_5 + LINE_META shift-reduce 112 meta_block ::= LINE_META block shift-reduce 1 blocks ::= blocks block - blockquote shift 28 + blockquote shift 30 def_citation shift-reduce 12 block ::= def_citation def_footnote shift-reduce 13 block ::= def_footnote def_link shift-reduce 14 block ::= def_link definition_block shift-reduce 15 block ::= definition_block - empty shift 38 + empty shift 40 fenced_block shift-reduce 17 block ::= fenced_block - html_block shift 27 - indented_code shift 25 - list_bullet shift 35 - list_enum shift 33 - meta_block shift 26 + html_block shift 29 + indented_code shift 27 + list_bullet shift 37 + list_enum shift 35 + meta_block shift 28 para shift 18 table shift-reduce 24 block ::= table - indented_line shift 25 /* because indented_line==indented_code */ - defs shift 30 - def shift 30 /* because def==defs */ - fenced shift 23 - item_bullet shift 35 /* because item_bullet==list_bullet */ - item_enum shift 33 /* because item_enum==list_enum */ + indented_line shift 27 /* because indented_line==indented_code */ + defs shift 32 + def shift 32 /* because def==defs */ + fenced_3 shift 25 + fenced_4 shift 24 + fenced_5 shift 23 + item_bullet shift 37 /* because item_bullet==list_bullet */ + item_enum shift 35 /* because item_enum==list_enum */ table_header shift 7 - header_rows shift 36 + header_rows shift 38 all_rows shift 13 row shift 13 /* because row==all_rows */ @@ -278,21 +328,21 @@ State 2: tail ::= * opt_ext_chunk tail ::= * nested_chunks def_footnote ::= LINE_DEF_FOOTNOTE * tail - (78) def_footnote ::= LINE_DEF_FOOTNOTE * + (91) def_footnote ::= LINE_DEF_FOOTNOTE * empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - LINE_CONTINUATION shift-reduce 66 chunk_line ::= LINE_CONTINUATION - LINE_EMPTY shift-reduce 81 empty ::= LINE_EMPTY - LINE_EMPTY reduce 78 ** Parsing conflict ** - empty shift 24 + LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY + LINE_EMPTY reduce 91 ** Parsing conflict ** + empty shift 26 chunk shift 9 chunk_line shift 9 /* because chunk_line==chunk */ nested_chunks shift 16 nested_chunk shift 16 /* because nested_chunk==nested_chunks */ opt_ext_chunk shift-reduce 33 def_footnote ::= LINE_DEF_FOOTNOTE tail /* because opt_ext_chunk==tail */ tail shift-reduce 33 def_footnote ::= LINE_DEF_FOOTNOTE tail - {default} reduce 78 def_footnote ::= LINE_DEF_FOOTNOTE + {default} reduce 91 def_footnote ::= LINE_DEF_FOOTNOTE State 3: chunk ::= * chunk chunk_line @@ -308,21 +358,21 @@ State 3: tail ::= * opt_ext_chunk tail ::= * nested_chunks def_citation ::= LINE_DEF_CITATION * tail - (77) def_citation ::= LINE_DEF_CITATION * + (90) def_citation ::= LINE_DEF_CITATION * empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - LINE_CONTINUATION shift-reduce 66 chunk_line ::= LINE_CONTINUATION - LINE_EMPTY shift-reduce 81 empty ::= LINE_EMPTY - LINE_EMPTY reduce 77 ** Parsing conflict ** - empty shift 24 + LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY + LINE_EMPTY reduce 90 ** Parsing conflict ** + empty shift 26 chunk shift 9 chunk_line shift 9 /* because chunk_line==chunk */ nested_chunks shift 16 nested_chunk shift 16 /* because nested_chunk==nested_chunks */ opt_ext_chunk shift-reduce 32 def_citation ::= LINE_DEF_CITATION tail /* because opt_ext_chunk==tail */ tail shift-reduce 32 def_citation ::= LINE_DEF_CITATION tail - {default} reduce 77 def_citation ::= LINE_DEF_CITATION + {default} reduce 90 def_citation ::= LINE_DEF_CITATION State 4: chunk ::= * chunk chunk_line @@ -342,10 +392,10 @@ State 4: empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - LINE_CONTINUATION shift-reduce 66 chunk_line ::= LINE_CONTINUATION - LINE_EMPTY shift-reduce 81 empty ::= LINE_EMPTY + LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY LINE_EMPTY reduce 38 ** Parsing conflict ** - empty shift 24 + empty shift 26 chunk shift 9 chunk_line shift 9 /* because chunk_line==chunk */ nested_chunks shift 16 @@ -369,18 +419,18 @@ State 5: item_enum ::= LINE_LIST_ENUMERATED * ext_chunk item_enum ::= LINE_LIST_ENUMERATED * chunk item_enum ::= LINE_LIST_ENUMERATED * nested_chunks - (54) item_enum ::= LINE_LIST_ENUMERATED * + (67) item_enum ::= LINE_LIST_ENUMERATED * - LINE_CONTINUATION shift-reduce 66 chunk_line ::= LINE_CONTINUATION - LINE_EMPTY shift-reduce 81 empty ::= LINE_EMPTY - LINE_EMPTY reduce 54 ** Parsing conflict ** - empty shift 24 + LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY + LINE_EMPTY reduce 67 ** Parsing conflict ** + empty shift 26 chunk shift 10 chunk_line shift 10 /* because chunk_line==chunk */ nested_chunks shift 19 nested_chunk shift 19 /* because nested_chunk==nested_chunks */ - ext_chunk shift-reduce 51 item_enum ::= LINE_LIST_ENUMERATED ext_chunk - {default} reduce 54 item_enum ::= LINE_LIST_ENUMERATED + ext_chunk shift-reduce 64 item_enum ::= LINE_LIST_ENUMERATED ext_chunk + {default} reduce 67 item_enum ::= LINE_LIST_ENUMERATED State 6: chunk ::= * chunk chunk_line @@ -397,22 +447,22 @@ State 6: item_bullet ::= LINE_LIST_BULLETED * ext_chunk item_bullet ::= LINE_LIST_BULLETED * chunk item_bullet ::= LINE_LIST_BULLETED * nested_chunks - (49) item_bullet ::= LINE_LIST_BULLETED * + (62) item_bullet ::= LINE_LIST_BULLETED * - LINE_CONTINUATION shift-reduce 66 chunk_line ::= LINE_CONTINUATION - LINE_EMPTY shift-reduce 81 empty ::= LINE_EMPTY - LINE_EMPTY reduce 49 ** Parsing conflict ** - empty shift 24 + LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY + LINE_EMPTY reduce 62 ** Parsing conflict ** + empty shift 26 chunk shift 11 chunk_line shift 11 /* because chunk_line==chunk */ nested_chunks shift 20 nested_chunk shift 20 /* because nested_chunk==nested_chunks */ - ext_chunk shift-reduce 46 item_bullet ::= LINE_LIST_BULLETED ext_chunk - {default} reduce 49 item_bullet ::= LINE_LIST_BULLETED + ext_chunk shift-reduce 59 item_bullet ::= LINE_LIST_BULLETED ext_chunk + {default} reduce 62 item_bullet ::= LINE_LIST_BULLETED State 7: table ::= table_header * table_body - (97) table ::= table_header * + (116) table ::= table_header * header_rows ::= * header_rows LINE_TABLE header_rows ::= * LINE_TABLE table_body ::= * table_body table_section @@ -424,19 +474,19 @@ State 7: row ::= * header_rows row ::= * LINE_TABLE_SEPARATOR - LINE_TABLE_SEPARATOR shift-reduce 102 row ::= LINE_TABLE_SEPARATOR - LINE_TABLE_SEPARATOR reduce 97 ** Parsing conflict ** - LINE_TABLE shift-reduce 98 header_rows ::= LINE_TABLE - LINE_TABLE reduce 97 ** Parsing conflict ** + LINE_TABLE_SEPARATOR shift-reduce 121 row ::= LINE_TABLE_SEPARATOR + LINE_TABLE_SEPARATOR reduce 116 ** Parsing conflict ** + LINE_TABLE shift-reduce 117 header_rows ::= LINE_TABLE + LINE_TABLE reduce 116 ** Parsing conflict ** table_body shift 8 - header_rows shift 37 + header_rows shift 39 table_section shift 8 /* because table_section==table_body */ all_rows shift 12 row shift 12 /* because row==all_rows */ - {default} reduce 97 table ::= table_header + {default} reduce 116 table ::= table_header State 8: - (57) table ::= table_header table_body * + (70) table ::= table_header table_body * header_rows ::= * header_rows LINE_TABLE header_rows ::= * LINE_TABLE table_body ::= table_body * table_section @@ -447,15 +497,15 @@ State 8: row ::= * header_rows row ::= * LINE_TABLE_SEPARATOR - LINE_TABLE_SEPARATOR shift-reduce 102 row ::= LINE_TABLE_SEPARATOR - LINE_TABLE_SEPARATOR reduce 57 ** Parsing conflict ** - LINE_TABLE shift-reduce 98 header_rows ::= LINE_TABLE - LINE_TABLE reduce 57 ** Parsing conflict ** - header_rows shift 37 - table_section shift-reduce 60 table_body ::= table_body table_section + LINE_TABLE_SEPARATOR shift-reduce 121 row ::= LINE_TABLE_SEPARATOR + LINE_TABLE_SEPARATOR reduce 70 ** Parsing conflict ** + LINE_TABLE shift-reduce 117 header_rows ::= LINE_TABLE + LINE_TABLE reduce 70 ** Parsing conflict ** + header_rows shift 39 + table_section shift-reduce 73 table_body ::= table_body table_section all_rows shift 12 row shift 12 /* because row==all_rows */ - {default} reduce 57 table ::= table_header table_body + {default} reduce 70 table ::= table_header table_body State 9: chunk ::= chunk * chunk_line @@ -466,18 +516,18 @@ State 9: nested_chunk ::= * empty indented_line nested_chunk ::= * empty opt_ext_chunk ::= chunk * nested_chunks - (71) opt_ext_chunk ::= chunk * + (84) opt_ext_chunk ::= chunk * empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - LINE_CONTINUATION shift-reduce 66 chunk_line ::= LINE_CONTINUATION - LINE_EMPTY shift-reduce 81 empty ::= LINE_EMPTY - LINE_EMPTY reduce 71 ** Parsing conflict ** - empty shift 24 + LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY + LINE_EMPTY reduce 84 ** Parsing conflict ** + empty shift 26 chunk_line shift-reduce 25 chunk ::= chunk chunk_line nested_chunks shift 17 nested_chunk shift 17 /* because nested_chunk==nested_chunks */ - {default} reduce 71 opt_ext_chunk ::= chunk + {default} reduce 84 opt_ext_chunk ::= chunk State 10: chunk ::= chunk * chunk_line @@ -490,16 +540,16 @@ State 10: ext_chunk ::= chunk * nested_chunks empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - (52) item_enum ::= LINE_LIST_ENUMERATED chunk * + (65) item_enum ::= LINE_LIST_ENUMERATED chunk * - LINE_CONTINUATION shift-reduce 66 chunk_line ::= LINE_CONTINUATION - LINE_EMPTY shift-reduce 81 empty ::= LINE_EMPTY - LINE_EMPTY reduce 52 ** Parsing conflict ** - empty shift 24 + LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY + LINE_EMPTY reduce 65 ** Parsing conflict ** + empty shift 26 chunk_line shift-reduce 25 chunk ::= chunk chunk_line nested_chunks shift 22 nested_chunk shift 22 /* because nested_chunk==nested_chunks */ - {default} reduce 52 item_enum ::= LINE_LIST_ENUMERATED chunk + {default} reduce 65 item_enum ::= LINE_LIST_ENUMERATED chunk State 11: chunk ::= chunk * chunk_line @@ -512,35 +562,35 @@ State 11: ext_chunk ::= chunk * nested_chunks empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - (47) item_bullet ::= LINE_LIST_BULLETED chunk * + (60) item_bullet ::= LINE_LIST_BULLETED chunk * - LINE_CONTINUATION shift-reduce 66 chunk_line ::= LINE_CONTINUATION - LINE_EMPTY shift-reduce 81 empty ::= LINE_EMPTY - LINE_EMPTY reduce 47 ** Parsing conflict ** - empty shift 24 + LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY + LINE_EMPTY reduce 60 ** Parsing conflict ** + empty shift 26 chunk_line shift-reduce 25 chunk ::= chunk chunk_line nested_chunks shift 22 nested_chunk shift 22 /* because nested_chunk==nested_chunks */ - {default} reduce 47 item_bullet ::= LINE_LIST_BULLETED chunk + {default} reduce 60 item_bullet ::= LINE_LIST_BULLETED chunk State 12: header_rows ::= * header_rows LINE_TABLE header_rows ::= * LINE_TABLE table_section ::= all_rows * LINE_EMPTY - (62) table_section ::= all_rows * + (75) table_section ::= all_rows * all_rows ::= all_rows * row row ::= * header_rows row ::= * LINE_TABLE_SEPARATOR - LINE_TABLE_SEPARATOR shift-reduce 102 row ::= LINE_TABLE_SEPARATOR - LINE_TABLE_SEPARATOR reduce 62 ** Parsing conflict ** - LINE_TABLE shift-reduce 98 header_rows ::= LINE_TABLE - LINE_TABLE reduce 62 ** Parsing conflict ** - LINE_EMPTY shift-reduce 61 table_section ::= all_rows LINE_EMPTY - LINE_EMPTY reduce 62 ** Parsing conflict ** - header_rows shift 37 - row shift-reduce 63 all_rows ::= all_rows row - {default} reduce 62 table_section ::= all_rows + LINE_TABLE_SEPARATOR shift-reduce 121 row ::= LINE_TABLE_SEPARATOR + LINE_TABLE_SEPARATOR reduce 75 ** Parsing conflict ** + LINE_TABLE shift-reduce 117 header_rows ::= LINE_TABLE + LINE_TABLE reduce 75 ** Parsing conflict ** + LINE_EMPTY shift-reduce 74 table_section ::= all_rows LINE_EMPTY + LINE_EMPTY reduce 75 ** Parsing conflict ** + header_rows shift 39 + row shift-reduce 76 all_rows ::= all_rows row + {default} reduce 75 table_section ::= all_rows State 13: header_rows ::= * header_rows LINE_TABLE @@ -548,54 +598,54 @@ State 13: all_rows ::= all_rows * row row ::= * header_rows row ::= * LINE_TABLE_SEPARATOR - (64) para ::= all_rows * + (77) para ::= all_rows * - LINE_TABLE_SEPARATOR shift-reduce 102 row ::= LINE_TABLE_SEPARATOR - LINE_TABLE_SEPARATOR reduce 64 ** Parsing conflict ** - LINE_TABLE shift-reduce 98 header_rows ::= LINE_TABLE - LINE_TABLE reduce 64 ** Parsing conflict ** - header_rows shift 37 - row shift-reduce 63 all_rows ::= all_rows row - {default} reduce 64 para ::= all_rows + LINE_TABLE_SEPARATOR shift-reduce 121 row ::= LINE_TABLE_SEPARATOR + LINE_TABLE_SEPARATOR reduce 77 ** Parsing conflict ** + LINE_TABLE shift-reduce 117 header_rows ::= LINE_TABLE + LINE_TABLE reduce 77 ** Parsing conflict ** + header_rows shift 39 + row shift-reduce 76 all_rows ::= all_rows row + {default} reduce 77 para ::= all_rows State 14: chunk ::= * chunk chunk_line chunk ::= * chunk_line chunk_line ::= * LINE_CONTINUATION para ::= LINE_PLAIN * chunk - (96) para ::= LINE_PLAIN * + (115) para ::= LINE_PLAIN * - LINE_CONTINUATION shift-reduce 66 chunk_line ::= LINE_CONTINUATION - chunk shift 29 - chunk_line shift 29 /* because chunk_line==chunk */ - {default} reduce 96 para ::= LINE_PLAIN + LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION + chunk shift 31 + chunk_line shift 31 /* because chunk_line==chunk */ + {default} reduce 115 para ::= LINE_PLAIN State 15: chunk ::= * chunk chunk_line chunk ::= * chunk_line chunk_line ::= * LINE_CONTINUATION def_link ::= LINE_DEF_LINK * chunk - (79) def_link ::= LINE_DEF_LINK * + (92) def_link ::= LINE_DEF_LINK * - LINE_CONTINUATION shift-reduce 66 chunk_line ::= LINE_CONTINUATION - chunk shift 31 - chunk_line shift 31 /* because chunk_line==chunk */ - {default} reduce 79 def_link ::= LINE_DEF_LINK + LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION + chunk shift 33 + chunk_line shift 33 /* because chunk_line==chunk */ + {default} reduce 92 def_link ::= LINE_DEF_LINK State 16: nested_chunks ::= nested_chunks * nested_chunk nested_chunk ::= * empty indented_line chunk nested_chunk ::= * empty indented_line nested_chunk ::= * empty - (73) tail ::= nested_chunks * + (86) tail ::= nested_chunks * empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - LINE_EMPTY shift-reduce 81 empty ::= LINE_EMPTY - LINE_EMPTY reduce 73 ** Parsing conflict ** - empty shift 24 + LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY + LINE_EMPTY reduce 86 ** Parsing conflict ** + empty shift 26 nested_chunk shift-reduce 26 nested_chunks ::= nested_chunks nested_chunk - {default} reduce 73 tail ::= nested_chunks + {default} reduce 86 tail ::= nested_chunks State 17: nested_chunks ::= nested_chunks * nested_chunk @@ -606,9 +656,9 @@ State 17: empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - LINE_EMPTY shift-reduce 81 empty ::= LINE_EMPTY + LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY LINE_EMPTY reduce 30 ** Parsing conflict ** - empty shift 24 + empty shift 26 nested_chunk shift-reduce 26 nested_chunks ::= nested_chunks nested_chunk {default} reduce 30 opt_ext_chunk ::= chunk nested_chunks @@ -622,8 +672,8 @@ State 18: LINE_DEFINITION shift 4 LINE_DEFINITION reduce 23 ** Parsing conflict ** - defs shift 32 - def shift 32 /* because def==defs */ + defs shift 34 + def shift 34 /* because def==defs */ {default} reduce 23 block ::= para State 19: @@ -633,13 +683,13 @@ State 19: nested_chunk ::= * empty empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - (53) item_enum ::= LINE_LIST_ENUMERATED nested_chunks * + (66) item_enum ::= LINE_LIST_ENUMERATED nested_chunks * - LINE_EMPTY shift-reduce 81 empty ::= LINE_EMPTY - LINE_EMPTY reduce 53 ** Parsing conflict ** - empty shift 24 + LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY + LINE_EMPTY reduce 66 ** Parsing conflict ** + empty shift 26 nested_chunk shift-reduce 26 nested_chunks ::= nested_chunks nested_chunk - {default} reduce 53 item_enum ::= LINE_LIST_ENUMERATED nested_chunks + {default} reduce 66 item_enum ::= LINE_LIST_ENUMERATED nested_chunks State 20: nested_chunks ::= nested_chunks * nested_chunk @@ -648,13 +698,13 @@ State 20: nested_chunk ::= * empty empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - (48) item_bullet ::= LINE_LIST_BULLETED nested_chunks * + (61) item_bullet ::= LINE_LIST_BULLETED nested_chunks * - LINE_EMPTY shift-reduce 81 empty ::= LINE_EMPTY - LINE_EMPTY reduce 48 ** Parsing conflict ** - empty shift 24 + LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY + LINE_EMPTY reduce 61 ** Parsing conflict ** + empty shift 26 nested_chunk shift-reduce 26 nested_chunks ::= nested_chunks nested_chunk - {default} reduce 48 item_bullet ::= LINE_LIST_BULLETED nested_chunks + {default} reduce 61 item_bullet ::= LINE_LIST_BULLETED nested_chunks State 21: chunk ::= * chunk chunk_line @@ -663,9 +713,9 @@ State 21: nested_chunk ::= empty indented_line * chunk (28) nested_chunk ::= empty indented_line * - LINE_CONTINUATION shift-reduce 66 chunk_line ::= LINE_CONTINUATION - chunk shift 34 - chunk_line shift 34 /* because chunk_line==chunk */ + LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION + chunk shift 36 + chunk_line shift 36 /* because chunk_line==chunk */ {default} reduce 28 nested_chunk ::= empty indented_line State 22: @@ -677,126 +727,183 @@ State 22: empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - LINE_EMPTY shift-reduce 81 empty ::= LINE_EMPTY + LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY LINE_EMPTY reduce 29 ** Parsing conflict ** - empty shift 24 + empty shift 26 nested_chunk shift-reduce 26 nested_chunks ::= nested_chunks nested_chunk {default} reduce 29 ext_chunk ::= chunk nested_chunks State 23: - fenced_block ::= fenced * LINE_FENCE_BACKTICK - (82) fenced_block ::= fenced * - fenced ::= fenced * fenced_line + fenced_block ::= fenced_5 * LINE_FENCE_BACKTICK_5 + (101) fenced_block ::= fenced_5 * + fenced_5 ::= fenced_5 * fenced_line + fenced_5 ::= fenced_5 * LINE_FENCE_BACKTICK_3 + fenced_5 ::= fenced_5 * LINE_FENCE_BACKTICK_START_3 + fenced_5 ::= fenced_5 * LINE_FENCE_BACKTICK_4 + fenced_5 ::= fenced_5 * LINE_FENCE_BACKTICK_START_4 fenced_line ::= * LINE_CONTINUATION fenced_line ::= * LINE_EMPTY - LINE_CONTINUATION shift-reduce 85 fenced_line ::= LINE_CONTINUATION - LINE_FENCE_BACKTICK shift-reduce 40 fenced_block ::= fenced LINE_FENCE_BACKTICK - LINE_FENCE_BACKTICK reduce 82 ** Parsing conflict ** - LINE_EMPTY shift-reduce 86 fenced_line ::= LINE_EMPTY - LINE_EMPTY reduce 82 ** Parsing conflict ** - fenced_line shift-reduce 41 fenced ::= fenced fenced_line - {default} reduce 82 fenced_block ::= fenced + LINE_CONTINUATION shift-reduce 104 fenced_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 105 fenced_line ::= LINE_EMPTY + LINE_EMPTY reduce 101 ** Parsing conflict ** + LINE_FENCE_BACKTICK_3 shift-reduce 51 fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_3 + LINE_FENCE_BACKTICK_3 reduce 101 ** Parsing conflict ** + LINE_FENCE_BACKTICK_4 shift-reduce 53 fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_4 + LINE_FENCE_BACKTICK_4 reduce 101 ** Parsing conflict ** + LINE_FENCE_BACKTICK_5 shift-reduce 49 fenced_block ::= fenced_5 LINE_FENCE_BACKTICK_5 + LINE_FENCE_BACKTICK_5 reduce 101 ** Parsing conflict ** + LINE_FENCE_BACKTICK_START_3 shift-reduce 52 fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_START_3 + LINE_FENCE_BACKTICK_START_3 reduce 101 ** Parsing conflict ** + LINE_FENCE_BACKTICK_START_4 shift-reduce 54 fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_START_4 + LINE_FENCE_BACKTICK_START_4 reduce 101 ** Parsing conflict ** + fenced_line shift-reduce 50 fenced_5 ::= fenced_5 fenced_line + {default} reduce 101 fenced_block ::= fenced_5 State 24: + fenced_block ::= fenced_4 * LINE_FENCE_BACKTICK_4 + fenced_block ::= fenced_4 * LINE_FENCE_BACKTICK_5 + (98) fenced_block ::= fenced_4 * + fenced_4 ::= fenced_4 * fenced_line + fenced_4 ::= fenced_4 * LINE_FENCE_BACKTICK_3 + fenced_4 ::= fenced_4 * LINE_FENCE_BACKTICK_START_3 + fenced_line ::= * LINE_CONTINUATION + fenced_line ::= * LINE_EMPTY + + LINE_CONTINUATION shift-reduce 104 fenced_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 105 fenced_line ::= LINE_EMPTY + LINE_EMPTY reduce 98 ** Parsing conflict ** + LINE_FENCE_BACKTICK_3 shift-reduce 47 fenced_4 ::= fenced_4 LINE_FENCE_BACKTICK_3 + LINE_FENCE_BACKTICK_3 reduce 98 ** Parsing conflict ** + LINE_FENCE_BACKTICK_4 shift-reduce 44 fenced_block ::= fenced_4 LINE_FENCE_BACKTICK_4 + LINE_FENCE_BACKTICK_4 reduce 98 ** Parsing conflict ** + LINE_FENCE_BACKTICK_5 shift-reduce 45 fenced_block ::= fenced_4 LINE_FENCE_BACKTICK_5 + LINE_FENCE_BACKTICK_5 reduce 98 ** Parsing conflict ** + LINE_FENCE_BACKTICK_START_3 shift-reduce 48 fenced_4 ::= fenced_4 LINE_FENCE_BACKTICK_START_3 + LINE_FENCE_BACKTICK_START_3 reduce 98 ** Parsing conflict ** + fenced_line shift-reduce 46 fenced_4 ::= fenced_4 fenced_line + {default} reduce 98 fenced_block ::= fenced_4 + +State 25: + fenced_block ::= fenced_3 * LINE_FENCE_BACKTICK_3 + fenced_block ::= fenced_3 * LINE_FENCE_BACKTICK_4 + fenced_block ::= fenced_3 * LINE_FENCE_BACKTICK_5 + (95) fenced_block ::= fenced_3 * + fenced_3 ::= fenced_3 * fenced_line + fenced_line ::= * LINE_CONTINUATION + fenced_line ::= * LINE_EMPTY + + LINE_CONTINUATION shift-reduce 104 fenced_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 105 fenced_line ::= LINE_EMPTY + LINE_EMPTY reduce 95 ** Parsing conflict ** + LINE_FENCE_BACKTICK_3 shift-reduce 40 fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_3 + LINE_FENCE_BACKTICK_3 reduce 95 ** Parsing conflict ** + LINE_FENCE_BACKTICK_4 shift-reduce 41 fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_4 + LINE_FENCE_BACKTICK_4 reduce 95 ** Parsing conflict ** + LINE_FENCE_BACKTICK_5 shift-reduce 42 fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_5 + LINE_FENCE_BACKTICK_5 reduce 95 ** Parsing conflict ** + fenced_line shift-reduce 43 fenced_3 ::= fenced_3 fenced_line + {default} reduce 95 fenced_block ::= fenced_3 + +State 26: nested_chunk ::= empty * indented_line chunk nested_chunk ::= empty * indented_line - (68) nested_chunk ::= empty * + (81) nested_chunk ::= empty * indented_line ::= * LINE_INDENTED_TAB indented_line ::= * LINE_INDENTED_SPACE empty ::= empty * LINE_EMPTY - LINE_INDENTED_TAB shift-reduce 69 indented_line ::= LINE_INDENTED_TAB - LINE_INDENTED_TAB reduce 68 ** Parsing conflict ** - LINE_INDENTED_SPACE shift-reduce 70 indented_line ::= LINE_INDENTED_SPACE - LINE_INDENTED_SPACE reduce 68 ** Parsing conflict ** + LINE_INDENTED_TAB shift-reduce 82 indented_line ::= LINE_INDENTED_TAB + LINE_INDENTED_TAB reduce 81 ** Parsing conflict ** + LINE_INDENTED_SPACE shift-reduce 83 indented_line ::= LINE_INDENTED_SPACE + LINE_INDENTED_SPACE reduce 81 ** Parsing conflict ** LINE_EMPTY shift-reduce 39 empty ::= empty LINE_EMPTY - LINE_EMPTY reduce 68 ** Parsing conflict ** + LINE_EMPTY reduce 81 ** Parsing conflict ** indented_line shift 21 - {default} reduce 68 nested_chunk ::= empty + {default} reduce 81 nested_chunk ::= empty -State 25: +State 27: (19) block ::= indented_code * indented_line ::= * LINE_INDENTED_TAB indented_line ::= * LINE_INDENTED_SPACE indented_code ::= indented_code * indented_line indented_code ::= indented_code * LINE_EMPTY - LINE_INDENTED_TAB shift-reduce 69 indented_line ::= LINE_INDENTED_TAB + LINE_INDENTED_TAB shift-reduce 82 indented_line ::= LINE_INDENTED_TAB LINE_INDENTED_TAB reduce 19 ** Parsing conflict ** - LINE_INDENTED_SPACE shift-reduce 70 indented_line ::= LINE_INDENTED_SPACE + LINE_INDENTED_SPACE shift-reduce 83 indented_line ::= LINE_INDENTED_SPACE LINE_INDENTED_SPACE reduce 19 ** Parsing conflict ** - LINE_EMPTY shift-reduce 44 indented_code ::= indented_code LINE_EMPTY + LINE_EMPTY shift-reduce 57 indented_code ::= indented_code LINE_EMPTY LINE_EMPTY reduce 19 ** Parsing conflict ** - indented_line shift-reduce 43 indented_code ::= indented_code indented_line + indented_line shift-reduce 56 indented_code ::= indented_code indented_line {default} reduce 19 block ::= indented_code -State 26: +State 28: (22) block ::= meta_block * meta_block ::= meta_block * meta_line meta_line ::= * LINE_META meta_line ::= * LINE_CONTINUATION - LINE_CONTINUATION shift-reduce 95 meta_line ::= LINE_CONTINUATION - LINE_META shift-reduce 94 meta_line ::= LINE_META + LINE_CONTINUATION shift-reduce 114 meta_line ::= LINE_CONTINUATION + LINE_META shift-reduce 113 meta_line ::= LINE_META LINE_META reduce 22 ** Parsing conflict ** - meta_line shift-reduce 55 meta_block ::= meta_block meta_line + meta_line shift-reduce 68 meta_block ::= meta_block meta_line {default} reduce 22 block ::= meta_block -State 27: +State 29: (18) block ::= html_block * html_block ::= html_block * html_line html_line ::= * LINE_CONTINUATION html_line ::= * LINE_HTML - LINE_CONTINUATION shift-reduce 88 html_line ::= LINE_CONTINUATION - LINE_HTML shift-reduce 89 html_line ::= LINE_HTML + LINE_CONTINUATION shift-reduce 107 html_line ::= LINE_CONTINUATION + LINE_HTML shift-reduce 108 html_line ::= LINE_HTML LINE_HTML reduce 18 ** Parsing conflict ** - html_line shift-reduce 42 html_block ::= html_block html_line + html_line shift-reduce 55 html_block ::= html_block html_line {default} reduce 18 block ::= html_block -State 28: +State 30: (11) block ::= blockquote * blockquote ::= blockquote * quote_line quote_line ::= * LINE_BLOCKQUOTE quote_line ::= * LINE_CONTINUATION - LINE_CONTINUATION shift-reduce 76 quote_line ::= LINE_CONTINUATION - LINE_BLOCKQUOTE shift-reduce 75 quote_line ::= LINE_BLOCKQUOTE + LINE_CONTINUATION shift-reduce 89 quote_line ::= LINE_CONTINUATION + LINE_BLOCKQUOTE shift-reduce 88 quote_line ::= LINE_BLOCKQUOTE LINE_BLOCKQUOTE reduce 11 ** Parsing conflict ** quote_line shift-reduce 31 blockquote ::= blockquote quote_line {default} reduce 11 block ::= blockquote -State 29: +State 31: chunk ::= chunk * chunk_line chunk_line ::= * LINE_CONTINUATION - (56) para ::= LINE_PLAIN chunk * + (69) para ::= LINE_PLAIN chunk * - LINE_CONTINUATION shift-reduce 66 chunk_line ::= LINE_CONTINUATION + LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION chunk_line shift-reduce 25 chunk ::= chunk chunk_line - {default} reduce 56 para ::= LINE_PLAIN chunk + {default} reduce 69 para ::= LINE_PLAIN chunk -State 30: +State 32: defs ::= defs * def def ::= * LINE_DEFINITION tail def ::= * LINE_DEFINITION - (103) para ::= defs * + (122) para ::= defs * LINE_DEFINITION shift 4 - LINE_DEFINITION reduce 103 ** Parsing conflict ** + LINE_DEFINITION reduce 122 ** Parsing conflict ** def shift-reduce 36 defs ::= defs def - {default} reduce 103 para ::= defs + {default} reduce 122 para ::= defs -State 31: +State 33: chunk ::= chunk * chunk_line chunk_line ::= * LINE_CONTINUATION (34) def_link ::= LINE_DEF_LINK chunk * - LINE_CONTINUATION shift-reduce 66 chunk_line ::= LINE_CONTINUATION + LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION chunk_line shift-reduce 25 chunk ::= chunk chunk_line {default} reduce 34 def_link ::= LINE_DEF_LINK chunk -State 32: +State 34: (35) definition_block ::= para defs * defs ::= defs * def def ::= * LINE_DEFINITION tail @@ -807,7 +914,7 @@ State 32: def shift-reduce 36 defs ::= defs def {default} reduce 35 definition_block ::= para defs -State 33: +State 35: (21) block ::= list_enum * list_enum ::= list_enum * item_enum item_enum ::= * LINE_LIST_ENUMERATED ext_chunk @@ -817,19 +924,19 @@ State 33: LINE_LIST_ENUMERATED shift 5 LINE_LIST_ENUMERATED reduce 21 ** Parsing conflict ** - item_enum shift-reduce 50 list_enum ::= list_enum item_enum + item_enum shift-reduce 63 list_enum ::= list_enum item_enum {default} reduce 21 block ::= list_enum -State 34: +State 36: chunk ::= chunk * chunk_line chunk_line ::= * LINE_CONTINUATION (27) nested_chunk ::= empty indented_line chunk * - LINE_CONTINUATION shift-reduce 66 chunk_line ::= LINE_CONTINUATION + LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION chunk_line shift-reduce 25 chunk ::= chunk chunk_line {default} reduce 27 nested_chunk ::= empty indented_line chunk -State 35: +State 37: (20) block ::= list_bullet * list_bullet ::= list_bullet * item_bullet item_bullet ::= * LINE_LIST_BULLETED ext_chunk @@ -839,29 +946,29 @@ State 35: LINE_LIST_BULLETED shift 6 LINE_LIST_BULLETED reduce 20 ** Parsing conflict ** - item_bullet shift-reduce 45 list_bullet ::= list_bullet item_bullet + item_bullet shift-reduce 58 list_bullet ::= list_bullet item_bullet {default} reduce 20 block ::= list_bullet -State 36: +State 38: table_header ::= header_rows * LINE_TABLE_SEPARATOR header_rows ::= header_rows * LINE_TABLE - (101) row ::= header_rows * + (120) row ::= header_rows * - LINE_TABLE_SEPARATOR shift-reduce 58 table_header ::= header_rows LINE_TABLE_SEPARATOR - LINE_TABLE_SEPARATOR reduce 101 ** Parsing conflict ** - LINE_TABLE shift-reduce 59 header_rows ::= header_rows LINE_TABLE - LINE_TABLE reduce 101 ** Parsing conflict ** - {default} reduce 101 row ::= header_rows + LINE_TABLE_SEPARATOR shift-reduce 71 table_header ::= header_rows LINE_TABLE_SEPARATOR + LINE_TABLE_SEPARATOR reduce 120 ** Parsing conflict ** + LINE_TABLE shift-reduce 72 header_rows ::= header_rows LINE_TABLE + LINE_TABLE reduce 120 ** Parsing conflict ** + {default} reduce 120 row ::= header_rows -State 37: +State 39: header_rows ::= header_rows * LINE_TABLE - (101) row ::= header_rows * + (120) row ::= header_rows * - LINE_TABLE shift-reduce 59 header_rows ::= header_rows LINE_TABLE - LINE_TABLE reduce 101 ** Parsing conflict ** - {default} reduce 101 row ::= header_rows + LINE_TABLE shift-reduce 72 header_rows ::= header_rows LINE_TABLE + LINE_TABLE reduce 120 ** Parsing conflict ** + {default} reduce 120 row ::= header_rows -State 38: +State 40: (16) block ::= empty * empty ::= empty * LINE_EMPTY @@ -897,45 +1004,53 @@ Symbols: 23: LINE_TOC 24: LINE_DEFINITION 25: LINE_EMPTY - 26: LINE_META - 27: error: - 28: doc: LINE_PLAIN LINE_TABLE_SEPARATOR LINE_INDENTED_TAB LINE_INDENTED_SPACE LINE_TABLE LINE_HTML LINE_ATX_1 LINE_ATX_2 LINE_ATX_3 LINE_ATX_4 LINE_ATX_5 LINE_ATX_6 LINE_HR LINE_BLOCKQUOTE LINE_LIST_BULLETED LINE_LIST_ENUMERATED LINE_DEF_CITATION LINE_DEF_FOOTNOTE LINE_DEF_LINK LINE_FENCE_BACKTICK LINE_FENCE_BACKTICK_START LINE_TOC LINE_DEFINITION LINE_EMPTY LINE_META - 29: blocks: LINE_PLAIN LINE_TABLE_SEPARATOR LINE_INDENTED_TAB LINE_INDENTED_SPACE LINE_TABLE LINE_HTML LINE_ATX_1 LINE_ATX_2 LINE_ATX_3 LINE_ATX_4 LINE_ATX_5 LINE_ATX_6 LINE_HR LINE_BLOCKQUOTE LINE_LIST_BULLETED LINE_LIST_ENUMERATED LINE_DEF_CITATION LINE_DEF_FOOTNOTE LINE_DEF_LINK LINE_FENCE_BACKTICK LINE_FENCE_BACKTICK_START LINE_TOC LINE_DEFINITION LINE_EMPTY LINE_META - 30: block: LINE_PLAIN LINE_TABLE_SEPARATOR LINE_INDENTED_TAB LINE_INDENTED_SPACE LINE_TABLE LINE_HTML LINE_ATX_1 LINE_ATX_2 LINE_ATX_3 LINE_ATX_4 LINE_ATX_5 LINE_ATX_6 LINE_HR LINE_BLOCKQUOTE LINE_LIST_BULLETED LINE_LIST_ENUMERATED LINE_DEF_CITATION LINE_DEF_FOOTNOTE LINE_DEF_LINK LINE_FENCE_BACKTICK LINE_FENCE_BACKTICK_START LINE_TOC LINE_DEFINITION LINE_EMPTY LINE_META - 31: blockquote: LINE_BLOCKQUOTE - 32: def_citation: LINE_DEF_CITATION - 33: def_footnote: LINE_DEF_FOOTNOTE - 34: def_link: LINE_DEF_LINK - 35: definition_block: LINE_PLAIN LINE_TABLE_SEPARATOR LINE_TABLE LINE_DEFINITION - 36: empty: LINE_EMPTY - 37: fenced_block: LINE_FENCE_BACKTICK LINE_FENCE_BACKTICK_START - 38: html_block: LINE_HTML - 39: indented_code: LINE_INDENTED_TAB LINE_INDENTED_SPACE - 40: list_bullet: LINE_LIST_BULLETED - 41: list_enum: LINE_LIST_ENUMERATED - 42: meta_block: LINE_META - 43: para: LINE_PLAIN LINE_TABLE_SEPARATOR LINE_TABLE LINE_DEFINITION - 44: table: LINE_TABLE - 45: chunk: LINE_CONTINUATION - 46: chunk_line: LINE_CONTINUATION - 47: nested_chunks: LINE_EMPTY - 48: nested_chunk: LINE_EMPTY - 49: indented_line: LINE_INDENTED_TAB LINE_INDENTED_SPACE - 50: ext_chunk: LINE_CONTINUATION - 51: opt_ext_chunk: LINE_CONTINUATION - 52: tail: LINE_CONTINUATION LINE_EMPTY - 53: quote_line: LINE_CONTINUATION LINE_BLOCKQUOTE - 54: defs: LINE_DEFINITION - 55: def: LINE_DEFINITION - 56: fenced: LINE_FENCE_BACKTICK LINE_FENCE_BACKTICK_START - 57: fenced_line: LINE_CONTINUATION LINE_EMPTY - 58: html_line: LINE_CONTINUATION LINE_HTML - 59: item_bullet: LINE_LIST_BULLETED - 60: item_enum: LINE_LIST_ENUMERATED - 61: meta_line: LINE_CONTINUATION LINE_META - 62: table_header: LINE_TABLE - 63: table_body: LINE_TABLE_SEPARATOR LINE_TABLE - 64: header_rows: LINE_TABLE - 65: table_section: LINE_TABLE_SEPARATOR LINE_TABLE - 66: all_rows: LINE_TABLE_SEPARATOR LINE_TABLE - 67: row: LINE_TABLE_SEPARATOR LINE_TABLE + 26: LINE_FENCE_BACKTICK_3 + 27: LINE_FENCE_BACKTICK_4 + 28: LINE_FENCE_BACKTICK_5 + 29: LINE_FENCE_BACKTICK_START_3 + 30: LINE_FENCE_BACKTICK_START_4 + 31: LINE_FENCE_BACKTICK_START_5 + 32: LINE_META + 33: error: + 34: doc: LINE_PLAIN LINE_TABLE_SEPARATOR LINE_INDENTED_TAB LINE_INDENTED_SPACE LINE_TABLE LINE_HTML LINE_ATX_1 LINE_ATX_2 LINE_ATX_3 LINE_ATX_4 LINE_ATX_5 LINE_ATX_6 LINE_HR LINE_BLOCKQUOTE LINE_LIST_BULLETED LINE_LIST_ENUMERATED LINE_DEF_CITATION LINE_DEF_FOOTNOTE LINE_DEF_LINK LINE_TOC LINE_DEFINITION LINE_EMPTY LINE_FENCE_BACKTICK_3 LINE_FENCE_BACKTICK_4 LINE_FENCE_BACKTICK_5 LINE_FENCE_BACKTICK_START_3 LINE_FENCE_BACKTICK_START_4 LINE_FENCE_BACKTICK_START_5 LINE_META + 35: blocks: LINE_PLAIN LINE_TABLE_SEPARATOR LINE_INDENTED_TAB LINE_INDENTED_SPACE LINE_TABLE LINE_HTML LINE_ATX_1 LINE_ATX_2 LINE_ATX_3 LINE_ATX_4 LINE_ATX_5 LINE_ATX_6 LINE_HR LINE_BLOCKQUOTE LINE_LIST_BULLETED LINE_LIST_ENUMERATED LINE_DEF_CITATION LINE_DEF_FOOTNOTE LINE_DEF_LINK LINE_TOC LINE_DEFINITION LINE_EMPTY LINE_FENCE_BACKTICK_3 LINE_FENCE_BACKTICK_4 LINE_FENCE_BACKTICK_5 LINE_FENCE_BACKTICK_START_3 LINE_FENCE_BACKTICK_START_4 LINE_FENCE_BACKTICK_START_5 LINE_META + 36: block: LINE_PLAIN LINE_TABLE_SEPARATOR LINE_INDENTED_TAB LINE_INDENTED_SPACE LINE_TABLE LINE_HTML LINE_ATX_1 LINE_ATX_2 LINE_ATX_3 LINE_ATX_4 LINE_ATX_5 LINE_ATX_6 LINE_HR LINE_BLOCKQUOTE LINE_LIST_BULLETED LINE_LIST_ENUMERATED LINE_DEF_CITATION LINE_DEF_FOOTNOTE LINE_DEF_LINK LINE_TOC LINE_DEFINITION LINE_EMPTY LINE_FENCE_BACKTICK_3 LINE_FENCE_BACKTICK_4 LINE_FENCE_BACKTICK_5 LINE_FENCE_BACKTICK_START_3 LINE_FENCE_BACKTICK_START_4 LINE_FENCE_BACKTICK_START_5 LINE_META + 37: blockquote: LINE_BLOCKQUOTE + 38: def_citation: LINE_DEF_CITATION + 39: def_footnote: LINE_DEF_FOOTNOTE + 40: def_link: LINE_DEF_LINK + 41: definition_block: LINE_PLAIN LINE_TABLE_SEPARATOR LINE_TABLE LINE_DEFINITION + 42: empty: LINE_EMPTY + 43: fenced_block: LINE_FENCE_BACKTICK_3 LINE_FENCE_BACKTICK_4 LINE_FENCE_BACKTICK_5 LINE_FENCE_BACKTICK_START_3 LINE_FENCE_BACKTICK_START_4 LINE_FENCE_BACKTICK_START_5 + 44: html_block: LINE_HTML + 45: indented_code: LINE_INDENTED_TAB LINE_INDENTED_SPACE + 46: list_bullet: LINE_LIST_BULLETED + 47: list_enum: LINE_LIST_ENUMERATED + 48: meta_block: LINE_META + 49: para: LINE_PLAIN LINE_TABLE_SEPARATOR LINE_TABLE LINE_DEFINITION + 50: table: LINE_TABLE + 51: chunk: LINE_CONTINUATION + 52: chunk_line: LINE_CONTINUATION + 53: nested_chunks: LINE_EMPTY + 54: nested_chunk: LINE_EMPTY + 55: indented_line: LINE_INDENTED_TAB LINE_INDENTED_SPACE + 56: ext_chunk: LINE_CONTINUATION + 57: opt_ext_chunk: LINE_CONTINUATION + 58: tail: LINE_CONTINUATION LINE_EMPTY + 59: quote_line: LINE_CONTINUATION LINE_BLOCKQUOTE + 60: defs: LINE_DEFINITION + 61: def: LINE_DEFINITION + 62: fenced_3: LINE_FENCE_BACKTICK_3 LINE_FENCE_BACKTICK_START_3 + 63: fenced_line: LINE_CONTINUATION LINE_EMPTY + 64: fenced_4: LINE_FENCE_BACKTICK_4 LINE_FENCE_BACKTICK_START_4 + 65: fenced_5: LINE_FENCE_BACKTICK_5 LINE_FENCE_BACKTICK_START_5 + 66: html_line: LINE_CONTINUATION LINE_HTML + 67: item_bullet: LINE_LIST_BULLETED + 68: item_enum: LINE_LIST_ENUMERATED + 69: meta_line: LINE_CONTINUATION LINE_META + 70: table_header: LINE_TABLE + 71: table_body: LINE_TABLE_SEPARATOR LINE_TABLE + 72: header_rows: LINE_TABLE + 73: table_section: LINE_TABLE_SEPARATOR LINE_TABLE + 74: all_rows: LINE_TABLE_SEPARATOR LINE_TABLE + 75: row: LINE_TABLE_SEPARATOR LINE_TABLE diff --git a/src/parser.y b/src/parser.y index ac81ac9..1608845 100644 --- a/src/parser.y +++ b/src/parser.y @@ -211,12 +211,38 @@ empty ::= LINE_EMPTY. // Fenced code blocks -fenced_block(A) ::= fenced(B) LINE_FENCE_BACKTICK(C). { A = B; token_chain_append(B, C); C->child->type = CODE_FENCE; } -fenced_block ::= fenced. -fenced(A) ::= fenced(B) fenced_line(C). { A = B; token_chain_append(B, C); } -fenced ::= LINE_FENCE_BACKTICK. -fenced ::= LINE_FENCE_BACKTICK_START. +fenced_block(A) ::= fenced_3(B) LINE_FENCE_BACKTICK_3(C). { A = B; token_chain_append(B, C); C->child->type = CODE_FENCE; } +fenced_block(A) ::= fenced_3(B) LINE_FENCE_BACKTICK_4(C). { A = B; token_chain_append(B, C); C->child->type = CODE_FENCE; } +fenced_block(A) ::= fenced_3(B) LINE_FENCE_BACKTICK_5(C). { A = B; token_chain_append(B, C); C->child->type = CODE_FENCE; } +fenced_block ::= fenced_3. + +fenced_3(A) ::= fenced_3(B) fenced_line(C). { A = B; token_chain_append(B, C); } +fenced_3 ::= LINE_FENCE_BACKTICK_3. +fenced_3 ::= LINE_FENCE_BACKTICK_START_3. + + +fenced_block(A) ::= fenced_4(B) LINE_FENCE_BACKTICK_4(C). { A = B; token_chain_append(B, C); C->child->type = CODE_FENCE; } +fenced_block(A) ::= fenced_4(B) LINE_FENCE_BACKTICK_5(C). { A = B; token_chain_append(B, C); C->child->type = CODE_FENCE; } +fenced_block ::= fenced_4. + +fenced_4(A) ::= fenced_4(B) fenced_line(C). { A = B; token_chain_append(B, C); } +fenced_4(A) ::= fenced_4(B) LINE_FENCE_BACKTICK_3(C). { A = B; token_chain_append(B, C); } +fenced_4(A) ::= fenced_4(B) LINE_FENCE_BACKTICK_START_3(C). { A = B; token_chain_append(B, C); } +fenced_4 ::= LINE_FENCE_BACKTICK_4. +fenced_4 ::= LINE_FENCE_BACKTICK_START_4. + + +fenced_block(A) ::= fenced_5(B) LINE_FENCE_BACKTICK_5(C). { A = B; token_chain_append(B, C); C->child->type = CODE_FENCE; } +fenced_block ::= fenced_5. + +fenced_5(A) ::= fenced_5(B) fenced_line(C). { A = B; token_chain_append(B, C); } +fenced_5(A) ::= fenced_5(B) LINE_FENCE_BACKTICK_3(C). { A = B; token_chain_append(B, C); } +fenced_5(A) ::= fenced_5(B) LINE_FENCE_BACKTICK_START_3(C). { A = B; token_chain_append(B, C); } +fenced_5(A) ::= fenced_5(B) LINE_FENCE_BACKTICK_4(C). { A = B; token_chain_append(B, C); } +fenced_5(A) ::= fenced_5(B) LINE_FENCE_BACKTICK_START_4(C). { A = B; token_chain_append(B, C); } +fenced_5 ::= LINE_FENCE_BACKTICK_5. +fenced_5 ::= LINE_FENCE_BACKTICK_START_5. fenced_line ::= LINE_CONTINUATION. fenced_line ::= LINE_EMPTY. diff --git a/src/scanners.c b/src/scanners.c index 779d9dc..465de7e 100644 --- a/src/scanners.c +++ b/src/scanners.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.14.3 on Tue Feb 7 20:44:00 2017 */ +/* Generated by re2c 0.14.3 on Wed Feb 8 13:01:12 2017 */ /** MultiMarkdown 6 -- Lightweight markup processor to produce HTML, LaTeX, and more. @@ -3742,11 +3742,11 @@ yy193: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy197; - case '\n': goto yy199; - case '\r': goto yy201; + case '\n': goto yy201; + case '\r': goto yy202; case '"': goto yy290; case '\'': goto yy292; case '(': goto yy294; @@ -3757,243 +3757,245 @@ yy195: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy197; - case '\n': goto yy199; - case '\r': goto yy201; - case '"': goto yy202; - case '\'': goto yy204; - case '(': goto yy206; + case '\n': goto yy201; + case '\r': goto yy202; + case '"': goto yy203; + case '\'': goto yy205; + case '(': goto yy207; default: goto yy195; } yy197: ++c; yych = *c; switch (yych) { + case 0x00: goto yy199; case '\t': case ' ': goto yy197; - case '\n': goto yy199; - case '\r': goto yy201; - case '"': goto yy218; - case '\'': goto yy220; - case '(': goto yy222; + case '\n': goto yy201; + case '\r': goto yy202; + case '"': goto yy219; + case '\'': goto yy221; + case '(': goto yy223; default: goto yy186; } yy199: + ++c; +yy200: + { return (size_t)( c - start ); } +yy201: yyaccept = 1; yych = *(marker = ++c); switch (yych) { - case '"': goto yy218; - case '\'': goto yy220; - case '(': goto yy222; + case '"': goto yy219; + case '\'': goto yy221; + case '(': goto yy223; default: goto yy200; } -yy200: - { return (size_t)( c - start ); } -yy201: +yy202: yyaccept = 1; yych = *(marker = ++c); switch (yych) { - case '\n': goto yy199; - case '"': goto yy218; - case '\'': goto yy220; - case '(': goto yy222; + case '\n': goto yy201; + case '"': goto yy219; + case '\'': goto yy221; + case '(': goto yy223; default: goto yy200; } -yy202: +yy203: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy288; - case '\n': goto yy199; - case '\r': goto yy201; + case '\n': goto yy201; + case '\r': goto yy202; case '"': goto yy276; case '\'': goto yy266; - case '(': goto yy210; - default: goto yy202; + case '(': goto yy211; + default: goto yy203; } -yy204: +yy205: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy286; - case '\n': goto yy199; - case '\r': goto yy201; + case '\n': goto yy201; + case '\r': goto yy202; case '"': goto yy266; case '\'': goto yy228; - case '(': goto yy212; - default: goto yy204; + case '(': goto yy213; + default: goto yy205; } -yy206: +yy207: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': - case ' ': goto yy208; - case '\n': goto yy199; - case '\r': goto yy201; - case '"': goto yy210; - case '\'': goto yy212; - case ')': goto yy214; - default: goto yy206; + case ' ': goto yy209; + case '\n': goto yy201; + case '\r': goto yy202; + case '"': goto yy211; + case '\'': goto yy213; + case ')': goto yy215; + default: goto yy207; } -yy208: +yy209: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': - case ' ': goto yy208; - case '\n': goto yy199; - case '\r': goto yy201; + case ' ': goto yy209; + case '\n': goto yy201; + case '\r': goto yy202; case '"': goto yy256; case '\'': goto yy240; - case ')': goto yy224; - default: goto yy222; + case ')': goto yy225; + default: goto yy223; } -yy210: +yy211: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy278; - case '\n': goto yy199; - case '\r': goto yy201; + case '\n': goto yy201; + case '\r': goto yy202; case '"': goto yy280; case '\'': goto yy232; case ')': goto yy276; - default: goto yy210; + default: goto yy211; } -yy212: +yy213: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy230; - case '\n': goto yy199; - case '\r': goto yy201; + case '\n': goto yy201; + case '\r': goto yy202; case '"': goto yy232; case '\'': goto yy234; case ')': goto yy228; - default: goto yy212; + default: goto yy213; } -yy214: +yy215: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': - case ' ': goto yy215; - case '\n': goto yy199; - case '\r': goto yy217; - case '"': goto yy202; - case '\'': goto yy204; - case '(': goto yy206; + case ' ': goto yy216; + case '\n': goto yy201; + case '\r': goto yy218; + case '"': goto yy203; + case '\'': goto yy205; + case '(': goto yy207; default: goto yy195; } -yy215: +yy216: ++c; yych = *c; switch (yych) { + case 0x00: goto yy199; case '\t': - case ' ': goto yy215; - case '\n': goto yy199; - case '\r': goto yy217; - case '"': goto yy218; - case '\'': goto yy220; - case '(': goto yy222; + case ' ': goto yy216; + case '\n': goto yy201; + case '\r': goto yy218; + case '"': goto yy219; + case '\'': goto yy221; + case '(': goto yy223; default: goto yy186; } -yy217: +yy218: yyaccept = 1; yych = *(marker = ++c); switch (yych) { - case '\n': goto yy199; - case '"': goto yy218; - case '\'': goto yy220; - case '(': goto yy222; + case '\n': goto yy201; + case '"': goto yy219; + case '\'': goto yy221; + case '(': goto yy223; default: goto yy200; } -yy218: +yy219: ++c; yych = *c; switch (yych) { case 0x00: case '\n': case '\r': goto yy186; - case '"': goto yy224; - default: goto yy218; + case '"': goto yy225; + default: goto yy219; } -yy220: +yy221: ++c; yych = *c; switch (yych) { case 0x00: case '\n': case '\r': goto yy186; - case '\'': goto yy224; - default: goto yy220; + case '\'': goto yy225; + default: goto yy221; } -yy222: +yy223: ++c; yych = *c; switch (yych) { case 0x00: case '\n': case '\r': goto yy186; - case ')': goto yy224; - default: goto yy222; + case ')': goto yy225; + default: goto yy223; } -yy224: +yy225: ++c; yych = *c; switch (yych) { + case 0x00: + case '\n': goto yy199; case '\t': - case ' ': goto yy224; - case '\n': goto yy226; + case ' ': goto yy225; case '\r': goto yy227; default: goto yy186; } -yy226: - yych = *++c; - goto yy200; yy227: yych = *++c; switch (yych) { - case '\n': goto yy226; + case '\n': goto yy199; default: goto yy200; } yy228: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy274; - case '\n': goto yy199; - case '\r': goto yy217; + case '\n': goto yy201; + case '\r': goto yy218; case '"': goto yy266; case '\'': goto yy228; - case '(': goto yy212; - default: goto yy204; + case '(': goto yy213; + default: goto yy205; } yy230: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy230; - case '\n': goto yy199; - case '\r': goto yy201; + case '\n': goto yy201; + case '\r': goto yy202; case '"': goto yy242; case '\'': goto yy244; case ')': goto yy238; @@ -4003,11 +4005,11 @@ yy232: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy260; - case '\n': goto yy199; - case '\r': goto yy201; + case '\n': goto yy201; + case '\r': goto yy202; case '"': case '\'': goto yy258; case ')': goto yy262; @@ -4017,25 +4019,25 @@ yy234: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy236; - case '\n': goto yy199; - case '\r': goto yy217; + case '\n': goto yy201; + case '\r': goto yy218; case '"': goto yy232; case '\'': goto yy234; case ')': goto yy228; - default: goto yy212; + default: goto yy213; } yy236: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy236; - case '\n': goto yy199; - case '\r': goto yy217; + case '\n': goto yy201; + case '\r': goto yy218; case '"': goto yy242; case '\'': goto yy244; case ')': goto yy238; @@ -4045,13 +4047,13 @@ yy238: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: + case '\n': goto yy199; case '\t': case ' ': goto yy238; - case '\n': goto yy226; case '\r': goto yy227; - case '\'': goto yy224; - default: goto yy220; + case '\'': goto yy225; + default: goto yy221; } yy240: ++c; @@ -4080,10 +4082,10 @@ yy244: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: + case '\n': goto yy199; case '\t': case ' ': goto yy244; - case '\n': goto yy226; case '\r': goto yy227; case '\'': goto yy246; case ')': goto yy238; @@ -4093,22 +4095,22 @@ yy246: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: + case '\n': goto yy199; case '\t': case ' ': goto yy246; - case '\n': goto yy226; case '\r': goto yy227; - case ')': goto yy224; - default: goto yy222; + case ')': goto yy225; + default: goto yy223; } yy248: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: + case '\n': goto yy199; case '\t': case ' ': goto yy248; - case '\n': goto yy226; case '\r': goto yy227; case '"': goto yy246; case ')': goto yy252; @@ -4118,10 +4120,10 @@ yy250: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: + case '\n': goto yy199; case '\t': case ' ': goto yy250; - case '\n': goto yy226; case '\r': goto yy227; case '"': goto yy238; case '\'': goto yy252; @@ -4131,13 +4133,13 @@ yy252: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: + case '\n': goto yy199; case '\t': case ' ': goto yy252; - case '\n': goto yy226; case '\r': goto yy227; - case '"': goto yy224; - default: goto yy218; + case '"': goto yy225; + default: goto yy219; } yy254: ++c; @@ -4165,11 +4167,11 @@ yy258: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy272; - case '\n': goto yy199; - case '\r': goto yy217; + case '\n': goto yy201; + case '\r': goto yy218; case '"': case '\'': goto yy258; case ')': goto yy262; @@ -4179,11 +4181,11 @@ yy260: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy260; - case '\n': goto yy199; - case '\r': goto yy201; + case '\n': goto yy201; + case '\r': goto yy202; case '"': case '\'': goto yy270; case ')': goto yy250; @@ -4193,11 +4195,11 @@ yy262: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy264; - case '\n': goto yy199; - case '\r': goto yy217; + case '\n': goto yy201; + case '\r': goto yy218; case '"': case '\'': goto yy262; case '(': goto yy232; @@ -4207,11 +4209,11 @@ yy264: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy264; - case '\n': goto yy199; - case '\r': goto yy217; + case '\n': goto yy201; + case '\r': goto yy218; case '"': case '\'': goto yy250; case '(': goto yy242; @@ -4221,11 +4223,11 @@ yy266: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy268; - case '\n': goto yy199; - case '\r': goto yy201; + case '\n': goto yy201; + case '\r': goto yy202; case '"': case '\'': goto yy262; case '(': goto yy232; @@ -4235,11 +4237,11 @@ yy268: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy268; - case '\n': goto yy199; - case '\r': goto yy201; + case '\n': goto yy201; + case '\r': goto yy202; case '"': case '\'': goto yy250; case '(': goto yy242; @@ -4249,10 +4251,10 @@ yy270: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: + case '\n': goto yy199; case '\t': case ' ': goto yy270; - case '\n': goto yy226; case '\r': goto yy227; case '"': goto yy244; case '\'': goto yy248; @@ -4263,11 +4265,11 @@ yy272: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy272; - case '\n': goto yy199; - case '\r': goto yy217; + case '\n': goto yy201; + case '\r': goto yy218; case '"': case '\'': goto yy270; case ')': goto yy250; @@ -4277,39 +4279,39 @@ yy274: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy274; - case '\n': goto yy199; - case '\r': goto yy217; + case '\n': goto yy201; + case '\r': goto yy218; case '"': goto yy254; case '\'': goto yy238; case '(': goto yy240; - default: goto yy220; + default: goto yy221; } yy276: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy284; - case '\n': goto yy199; - case '\r': goto yy217; + case '\n': goto yy201; + case '\r': goto yy218; case '"': goto yy276; case '\'': goto yy266; - case '(': goto yy210; - default: goto yy202; + case '(': goto yy211; + default: goto yy203; } yy278: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy278; - case '\n': goto yy199; - case '\r': goto yy201; + case '\n': goto yy201; + case '\r': goto yy202; case '"': goto yy248; case '\'': goto yy242; case ')': goto yy252; @@ -4319,25 +4321,25 @@ yy280: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy282; - case '\n': goto yy199; - case '\r': goto yy217; + case '\n': goto yy201; + case '\r': goto yy218; case '"': goto yy280; case '\'': goto yy232; case ')': goto yy276; - default: goto yy210; + default: goto yy211; } yy282: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy282; - case '\n': goto yy199; - case '\r': goto yy217; + case '\n': goto yy201; + case '\r': goto yy218; case '"': goto yy248; case '\'': goto yy242; case ')': goto yy252; @@ -4347,128 +4349,128 @@ yy284: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy284; - case '\n': goto yy199; - case '\r': goto yy217; + case '\n': goto yy201; + case '\r': goto yy218; case '"': goto yy252; case '\'': goto yy254; case '(': goto yy256; - default: goto yy218; + default: goto yy219; } yy286: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy286; - case '\n': goto yy199; - case '\r': goto yy201; + case '\n': goto yy201; + case '\r': goto yy202; case '"': goto yy254; case '\'': goto yy238; case '(': goto yy240; - default: goto yy220; + default: goto yy221; } yy288: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy288; - case '\n': goto yy199; - case '\r': goto yy201; + case '\n': goto yy201; + case '\r': goto yy202; case '"': goto yy252; case '\'': goto yy254; case '(': goto yy256; - default: goto yy218; + default: goto yy219; } yy290: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy288; - case '\n': goto yy199; - case '\r': goto yy201; + case '\n': goto yy201; + case '\r': goto yy202; case '"': goto yy313; case '\'': goto yy311; case '(': goto yy296; - case '>': goto yy202; + case '>': goto yy203; default: goto yy290; } yy292: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy286; - case '\n': goto yy199; - case '\r': goto yy201; + case '\n': goto yy201; + case '\r': goto yy202; case '"': goto yy311; case '\'': goto yy301; case '(': goto yy298; - case '>': goto yy204; + case '>': goto yy205; default: goto yy292; } yy294: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': - case ' ': goto yy208; - case '\n': goto yy199; - case '\r': goto yy201; + case ' ': goto yy209; + case '\n': goto yy201; + case '\r': goto yy202; case '"': goto yy296; case '\'': goto yy298; case ')': goto yy300; - case '>': goto yy206; + case '>': goto yy207; default: goto yy294; } yy296: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy278; - case '\n': goto yy199; - case '\r': goto yy201; + case '\n': goto yy201; + case '\r': goto yy202; case '"': goto yy315; case '\'': goto yy303; case ')': goto yy313; - case '>': goto yy210; + case '>': goto yy211; default: goto yy296; } yy298: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy230; - case '\n': goto yy199; - case '\r': goto yy201; + case '\n': goto yy201; + case '\r': goto yy202; case '"': goto yy303; case '\'': goto yy305; case ')': goto yy301; - case '>': goto yy212; + case '>': goto yy213; default: goto yy298; } yy300: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': - case ' ': goto yy215; - case '\n': goto yy199; - case '\r': goto yy217; + case ' ': goto yy216; + case '\n': goto yy201; + case '\r': goto yy218; case '"': goto yy290; case '\'': goto yy292; case '(': goto yy294; @@ -4479,26 +4481,26 @@ yy301: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy274; - case '\n': goto yy199; - case '\r': goto yy217; + case '\n': goto yy201; + case '\r': goto yy218; case '"': goto yy311; case '\'': goto yy301; case '(': goto yy298; - case '>': goto yy204; + case '>': goto yy205; default: goto yy292; } yy303: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy260; - case '\n': goto yy199; - case '\r': goto yy201; + case '\n': goto yy201; + case '\r': goto yy202; case '"': case '\'': goto yy307; case ')': goto yy309; @@ -4509,26 +4511,26 @@ yy305: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy236; - case '\n': goto yy199; - case '\r': goto yy217; + case '\n': goto yy201; + case '\r': goto yy218; case '"': goto yy303; case '\'': goto yy305; case ')': goto yy301; - case '>': goto yy212; + case '>': goto yy213; default: goto yy298; } yy307: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy272; - case '\n': goto yy199; - case '\r': goto yy217; + case '\n': goto yy201; + case '\r': goto yy218; case '"': case '\'': goto yy307; case ')': goto yy309; @@ -4539,11 +4541,11 @@ yy309: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy264; - case '\n': goto yy199; - case '\r': goto yy217; + case '\n': goto yy201; + case '\r': goto yy218; case '"': case '\'': goto yy309; case '(': goto yy303; @@ -4554,11 +4556,11 @@ yy311: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy268; - case '\n': goto yy199; - case '\r': goto yy201; + case '\n': goto yy201; + case '\r': goto yy202; case '"': case '\'': goto yy309; case '(': goto yy303; @@ -4569,30 +4571,30 @@ yy313: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy284; - case '\n': goto yy199; - case '\r': goto yy217; + case '\n': goto yy201; + case '\r': goto yy218; case '"': goto yy313; case '\'': goto yy311; case '(': goto yy296; - case '>': goto yy202; + case '>': goto yy203; default: goto yy290; } yy315: ++c; yych = *c; switch (yych) { - case 0x00: goto yy186; + case 0x00: goto yy199; case '\t': case ' ': goto yy282; - case '\n': goto yy199; - case '\r': goto yy217; + case '\n': goto yy201; + case '\r': goto yy218; case '"': goto yy315; case '\'': goto yy303; case ')': goto yy313; - case '>': goto yy210; + case '>': goto yy211; default: goto yy296; } yy317: @@ -8335,6 +8337,7 @@ yy589: yy591: yych = *++c; switch (yych) { + case 0x00: case '\n': goto yy594; case '\r': goto yy596; default: goto yy588; @@ -8344,9 +8347,9 @@ yy592: yych = *c; switch (yych) { case 0x00: - case '\'': goto yy588; case '\n': goto yy594; case '\r': goto yy596; + case '\'': goto yy588; case '`': goto yy589; case '~': goto yy592; default: goto yy591; @@ -8437,9 +8440,10 @@ yy608: ++c; yych = *c; switch (yych) { + case 0x00: + case '\n': goto yy612; case '\t': case ' ': goto yy610; - case '\n': goto yy612; case '\r': goto yy614; case '`': case '~': goto yy608; @@ -8449,9 +8453,10 @@ yy610: ++c; yych = *c; switch (yych) { + case 0x00: + case '\n': goto yy612; case '\t': case ' ': goto yy610; - case '\n': goto yy612; case '\r': goto yy614; default: goto yy607; } @@ -8757,16 +8762,16 @@ yy626: yy628: yych = *++c; switch (yych) { + case 0x00: case '\n': case '\r': goto yy625; - default: goto yy630; + default: goto yy629; } yy629: ++c; yych = *c; -yy630: switch (yych) { - case 0x00: goto yy625; + case 0x00: case '\n': goto yy631; case '\r': goto yy633; default: goto yy629; @@ -9065,6 +9070,7 @@ yy658: yy659: yych = *(marker = ++c); switch (yych) { + case 0x00: case '\t': case '\n': case '\r': @@ -9095,6 +9101,8 @@ yy662: ++c; yych = *c; switch (yych) { + case 0x00: + case '\n': goto yy667; case '\t': case ' ': case '+': @@ -9102,7 +9110,6 @@ yy662: case ':': case '=': case '|': goto yy662; - case '\n': goto yy667; case '\r': goto yy669; default: goto yy664; } @@ -9137,6 +9144,8 @@ yy670: yych = *c; yy671: switch (yych) { + case 0x00: + case '\n': goto yy667; case '\t': case ' ': case '+': @@ -9144,7 +9153,6 @@ yy671: case ':': case '=': case '|': goto yy670; - case '\n': goto yy667; case '\r': goto yy669; default: goto yy664; } @@ -9222,10 +9230,11 @@ yy683: yych = *c; yy684: switch (yych) { - case '\t': - case ' ': goto yy683; + case 0x00: case '\n': case '|': goto yy685; + case '\t': + case ' ': goto yy683; case '\r': goto yy687; default: goto yy680; } @@ -9243,10 +9252,11 @@ yy688: ++c; yych = *c; switch (yych) { - case '\t': - case ' ': goto yy688; + case 0x00: case '\n': case '|': goto yy690; + case '\t': + case ' ': goto yy688; case '\r': goto yy692; default: goto yy680; } @@ -9264,10 +9274,11 @@ yy693: ++c; yych = *c; switch (yych) { - case '\t': - case ' ': goto yy695; + case 0x00: case '\n': case '|': goto yy697; + case '\t': + case ' ': goto yy695; case '\r': goto yy699; case '+': goto yy701; case '-': @@ -9279,10 +9290,11 @@ yy695: ++c; yych = *c; switch (yych) { - case '\t': - case ' ': goto yy695; + case 0x00: case '\n': case '|': goto yy697; + case '\t': + case ' ': goto yy695; case '\r': goto yy699; default: goto yy680; } @@ -9306,10 +9318,11 @@ yy701: ++c; yych = *c; switch (yych) { - case '\t': - case ' ': goto yy701; + case 0x00: case '\n': case '|': goto yy703; + case '\t': + case ' ': goto yy701; case '\r': goto yy705; default: goto yy680; } @@ -9327,10 +9340,11 @@ yy706: ++c; yych = *c; switch (yych) { - case '\t': - case ' ': goto yy706; + case 0x00: case '\n': case '|': goto yy713; + case '\t': + case ' ': goto yy706; case '\r': goto yy715; default: goto yy680; } @@ -9339,10 +9353,11 @@ yy708: yych = *c; yy709: switch (yych) { - case '\t': - case ' ': goto yy708; + case 0x00: case '\n': case '|': goto yy710; + case '\t': + case ' ': goto yy708; case '\r': goto yy712; default: goto yy680; } diff --git a/src/scanners.re b/src/scanners.re index f4cedae..d8d7039 100644 --- a/src/scanners.re +++ b/src/scanners.re @@ -69,6 +69,7 @@ sp = [ \t]*; spnl = sp (nl sp)?; non_indent = ' '{0,3}; + nl_eof = nl | '\x00'; email = 'mailto:'? [-A-Za-z0-9+_./!%~$]+ '@' [^ \t\n\r\x00>]+; @@ -96,7 +97,7 @@ destination = ('<' [^ \t\n\r\x00>]* '>') | [^ \t\n\r\x00]+; - ref_link_no_attributes = non_indent '[' label ']' ':' spnl destination sp (nl | (nl? (title) sp) nl); + ref_link_no_attributes = non_indent '[' label ']' ':' spnl destination sp (nl_eof | (nl? (title) sp) nl_eof); tag_name = [A-Za-z] [A-Za-z0-9\-]*; @@ -127,27 +128,27 @@ html_block = '<' '/'? block_tag attributes? '/'? '>'; - fence_start = non_indent [`~]{3,} [^`'\n\r\x00] nl; + fence_start = non_indent [`~]{3,} [^`'\n\r\x00] nl_eof; - fence_end = non_indent [`~]{3,} sp nl; + fence_end = non_indent [`~]{3,} sp nl_eof; meta_key = [A-Za-z0-9] [A-Za-z0-9_ -\.]*; meta_value = [^\n\r\x00]+; - meta_line = meta_key sp ':' meta_value nl; // meta_line can't match url above + meta_line = meta_key sp ':' meta_value nl_eof; // meta_line can't match url above definition = non_indent ':' sp [^\n\r\x00]; - table_separator = (('|' [:\-= \t|+]*) | ([:\-= \t+]+ '|' [:\-= \t|+]*)) nl; + table_separator = (('|' [:\-= \t|+]*) | ([:\-= \t+]+ '|' [:\-= \t|+]*)) nl_eof; align = [\-=]+; - align_left = sp ':' align sp ('|' | nl); - align_right = sp align ':' sp ('|' | nl); - align_center = sp ':' align ':' sp ('|' | nl); - align_wrap_left = sp ':' align '+' sp ('|' | nl); - align_wrap_right = sp align ':' '+' sp ('|' | nl); - align_wrap_center = sp ':' align ':' '+' sp ('|' | nl); + align_left = sp ':' align sp ('|' | nl_eof); + align_right = sp align ':' sp ('|' | nl_eof); + align_center = sp ':' align ':' sp ('|' | nl_eof); + align_wrap_left = sp ':' align '+' sp ('|' | nl_eof); + align_wrap_right = sp align ':' '+' sp ('|' | nl_eof); + align_wrap_center = sp ':' align ':' '+' sp ('|' | nl_eof); */ diff --git a/test/parser_test.y b/test/parser_test.y index c121b71..0040564 100644 --- a/test/parser_test.y +++ b/test/parser_test.y @@ -117,8 +117,21 @@ defs ::= defs def. def ::= LINE_DEFINITION tail. def ::= LINE_DEFINITION. empty ::= empty LINE_EMPTY. -fenced_block ::= fenced LINE_FENCE_BACKTICK. -fenced ::= fenced fenced_line. +fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_3. +fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_4. +fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_5. +fenced_3 ::= fenced_3 fenced_line. +fenced_block ::= fenced_4 LINE_FENCE_BACKTICK_4. +fenced_block ::= fenced_4 LINE_FENCE_BACKTICK_5. +fenced_4 ::= fenced_4 fenced_line. +fenced_4 ::= fenced_4 LINE_FENCE_BACKTICK_3. +fenced_4 ::= fenced_4 LINE_FENCE_BACKTICK_START_3. +fenced_block ::= fenced_5 LINE_FENCE_BACKTICK_5. +fenced_5 ::= fenced_5 fenced_line. +fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_3. +fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_START_3. +fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_4. +fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_START_4. html_block ::= html_block html_line. indented_code ::= indented_code indented_line. indented_code ::= indented_code LINE_EMPTY. @@ -159,9 +172,15 @@ def_footnote ::= LINE_DEF_FOOTNOTE. def_link ::= LINE_DEF_LINK. defs ::= def. empty ::= LINE_EMPTY. -fenced_block ::= fenced. -fenced ::= LINE_FENCE_BACKTICK. -fenced ::= LINE_FENCE_BACKTICK_START. +fenced_block ::= fenced_3. +fenced_3 ::= LINE_FENCE_BACKTICK_3. +fenced_3 ::= LINE_FENCE_BACKTICK_START_3. +fenced_block ::= fenced_4. +fenced_4 ::= LINE_FENCE_BACKTICK_4. +fenced_4 ::= LINE_FENCE_BACKTICK_START_4. +fenced_block ::= fenced_5. +fenced_5 ::= LINE_FENCE_BACKTICK_5. +fenced_5 ::= LINE_FENCE_BACKTICK_START_5. fenced_line ::= LINE_CONTINUATION. fenced_line ::= LINE_EMPTY. html_block ::= LINE_HTML. @@ -198,7 +217,7 @@ para ::= defs. void ParseFree(); void ParseTrace(); - #define kMaxToken 26 + #define kMaxToken 32 int i,j,k,l,m, n; diff --git a/tests/MMD6Tests/Advanced Fenced Code Blocks.html b/tests/MMD6Tests/Advanced Fenced Code Blocks.html new file mode 100644 index 0000000..77c0b4f --- /dev/null +++ b/tests/MMD6Tests/Advanced Fenced Code Blocks.html @@ -0,0 +1,38 @@ +

foo *2*

+ +
foo *3*
+
+ +
foo *4*
+
+ +
foo *5*
+
+ +
foo *6*
+
+ +

5

+ +
``
+foo *3*
+``
+
+ +
```
+foo *4*
+```
+
+ +
````
+foo *5*
+````
+
+ +
+ +

foo 6

+ +
+ +

10

diff --git a/tests/MMD6Tests/Advanced Fenced Code Blocks.htmlc b/tests/MMD6Tests/Advanced Fenced Code Blocks.htmlc new file mode 100644 index 0000000..550fea0 --- /dev/null +++ b/tests/MMD6Tests/Advanced Fenced Code Blocks.htmlc @@ -0,0 +1,29 @@ +

foo *2*

+ +

foo *3*

+ +

foo *4*

+ +

foo *5*

+ +

foo *6*

+ +

5

+ +

`` +foo *3* +``

+ +

``` +foo *4* +```

+ +

```` +foo *5* +````

+ +

````` +foo *6* +`````

+ +

10

diff --git a/tests/MMD6Tests/Advanced Fenced Code Blocks.text b/tests/MMD6Tests/Advanced Fenced Code Blocks.text new file mode 100644 index 0000000..d8324ab --- /dev/null +++ b/tests/MMD6Tests/Advanced Fenced Code Blocks.text @@ -0,0 +1,47 @@ +`` +foo *2* +`` + +``` +foo *3* +``` + +```` +foo *4* +```` + +````` +foo *5* +````` + +`````` +foo *6* +`````` + +5 + +``` +`` +foo *3* +`` +``` + +```` +``` +foo *4* +``` +```` + +````` +```` +foo *5* +```` +````` + +`````` +````` +foo *6* +````` +`````` + +10