From: Fletcher T. Penney Date: Thu, 9 Feb 2017 01:28:39 +0000 (-0500) Subject: ADDED: Support Setext headers X-Git-Tag: 0.1.3a^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c7d8bd42b22e5aa47aa927838135c32aa01aa5f;p=multimarkdown ADDED: Support Setext headers --- diff --git a/README.md b/README.md index 40a6a35..15d01d3 100644 --- a/README.md +++ b/README.md @@ -366,13 +366,17 @@ MultiMarkdown v6 is mostly about making a better MMD parser, but it will likely involve a few changes to the MultiMarkdown language itself. -1. I am thinking about removing Setext headers from the language. I almost +1. {--I am thinking about removing Setext headers from the language. I almost never use them, much preferring to use ATX style headers (`# foo #`). Additionally, I have never liked the fact that Setext headers allow the meaning of a line to be completely changed by the following line. It makes the parsing slightly more difficult on a technical level (requiring some backtracking at times). I'm not 100% certain on this, but right now I believe -it's the only Markdown feature that doesn't exist in MMD 6 yet. +it's the only Markdown feature that doesn't exist in MMD 6 yet.--}{++I decided +to go ahead and implement Setext headers, as it can be done with the new +parser without backtracking. One difference with older versions of MMD, as +well as Markdown itself, is that a setext header can consist of more than one +line to be included in the header.++} 2. Whitespace is not allowed between the text brackets and label brackets in reference links, images, footnotes, etc. For example `[foo] [bar]` will no diff --git a/src/html.c b/src/html.c index dd11e49..c016fd9 100644 --- a/src/html.c +++ b/src/html.c @@ -523,6 +523,34 @@ void mmd_export_token_html(DString * out, const char * source, token * t, size_t } scratch->padded = 0; break; + case BLOCK_SETEXT_1: + pad(out, 2, scratch); + temp_short = 1; + if (scratch->extensions & EXT_NO_LABELS) { + printf("", temp_short + scratch->base_header_level - 1); + } else { + temp_char = label_from_token(source, t); + printf("", temp_short + scratch->base_header_level - 1, temp_char); + free(temp_char); + } + mmd_export_token_tree_html(out, source, t->child, t->start + offset, scratch); + printf("", temp_short + scratch->base_header_level - 1); + scratch->padded = 0; + break; + case BLOCK_SETEXT_2: + pad(out, 2, scratch); + temp_short = 2; + if (scratch->extensions & EXT_NO_LABELS) { + printf("", temp_short + scratch->base_header_level - 1); + } else { + temp_char = label_from_token(source, t); + printf("", temp_short + scratch->base_header_level - 1, temp_char); + free(temp_char); + } + mmd_export_token_tree_html(out, source, t->child, t->start + offset, scratch); + printf("", temp_short + scratch->base_header_level - 1); + scratch->padded = 0; + break; case BLOCK_TABLE: pad(out, 2, scratch); print("\n"); @@ -768,6 +796,9 @@ void mmd_export_token_html(DString * out, const char * source, token * t, size_t case EMPH_STOP: print(""); break; + case EQUAL: + print("="); + break; case ESCAPED_CHARACTER: mmd_print_char_html(out, source[t->start + 1], false); break; diff --git a/src/lexer.c b/src/lexer.c index c34dd71..08f0e51 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.14.3 on Sat Feb 4 13:15:42 2017 */ +/* Generated by re2c 0.14.3 on Wed Feb 8 17:39:07 2017 */ /** MultiMarkdown 6 -- Lightweight markup processor to produce HTML, LaTeX, and more. @@ -84,22 +84,22 @@ int scan(Scanner * s, const char * stop) { yych = *YYCURSOR; switch (yych) { - case '\t': goto yy39; - case '\n': goto yy44; - case '\r': goto yy46; - case ' ': goto yy41; - case '!': goto yy17; - case '"': goto yy25; - case '#': goto yy42; - case '$': goto yy35; - case '&': goto yy32; - case '\'': goto yy27; - case '(': goto yy18; - case ')': goto yy20; - case '*': goto yy47; + case '\t': goto yy40; + case '\n': goto yy45; + case '\r': goto yy47; + case ' ': goto yy42; + case '!': goto yy18; + case '"': goto yy26; + case '#': goto yy43; + case '$': goto yy36; + case '&': goto yy33; + case '\'': goto yy28; + case '(': goto yy19; + case ')': goto yy21; + case '*': goto yy48; case '+': goto yy4; case '-': goto yy6; - case '.': goto yy29; + case '.': goto yy30; case '0': case '1': case '2': @@ -109,33 +109,33 @@ int scan(Scanner * s, const char * stop) { case '6': case '7': case '8': - case '9': goto yy43; - case ':': goto yy30; + case '9': goto yy44; + case ':': goto yy31; case '<': goto yy8; case '=': goto yy12; - case '>': goto yy22; - case '[': goto yy13; - case '\\': goto yy34; - case ']': goto yy15; - case '^': goto yy37; - case '_': goto yy49; - case '`': goto yy51; + case '>': goto yy23; + case '[': goto yy14; + case '\\': goto yy35; + case ']': goto yy16; + case '^': goto yy38; + case '_': goto yy50; + case '`': goto yy52; case '{': goto yy2; - case '|': goto yy53; - case '}': goto yy24; + case '|': goto yy54; + case '}': goto yy25; case '~': goto yy10; - default: goto yy55; + default: goto yy56; } yy2: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '+': goto yy251; - case '-': goto yy250; - case '=': goto yy247; - case '>': goto yy249; - case '{': goto yy245; - case '~': goto yy248; + case '+': goto yy252; + case '-': goto yy251; + case '=': goto yy248; + case '>': goto yy250; + case '{': goto yy246; + case '~': goto yy249; default: goto yy3; } yy3: @@ -144,7 +144,7 @@ yy4: yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '+': goto yy242; + case '+': goto yy243; default: goto yy5; } yy5: @@ -152,7 +152,7 @@ yy5: yy6: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '-': goto yy236; + case '-': goto yy237; default: goto yy7; } yy7: @@ -161,7 +161,7 @@ yy8: yyaccept = 2; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '<': goto yy233; + case '<': goto yy234; default: goto yy9; } yy9: @@ -170,149 +170,151 @@ yy10: yyaccept = 3; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '>': goto yy229; - case '~': goto yy228; + case '>': goto yy230; + case '~': goto yy229; default: goto yy11; } yy11: { return SUBSCRIPT; } yy12: - yyaccept = 0; + yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '=': goto yy225; - default: goto yy3; + case '=': goto yy226; + default: goto yy13; } yy13: + { return EQUAL; } +yy14: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '#': goto yy221; - case '%': goto yy219; - case '^': goto yy223; - default: goto yy14; + case '#': goto yy222; + case '%': goto yy220; + case '^': goto yy224; + default: goto yy15; } -yy14: - { return BRACKET_LEFT; } yy15: + { return BRACKET_LEFT; } +yy16: ++YYCURSOR; { return BRACKET_RIGHT; } -yy17: +yy18: yych = *++YYCURSOR; switch (yych) { - case '[': goto yy217; + case '[': goto yy218; default: goto yy3; } -yy18: +yy19: ++YYCURSOR; { return PAREN_LEFT; } -yy20: +yy21: ++YYCURSOR; { return PAREN_RIGHT; } -yy22: +yy23: ++YYCURSOR; { return ANGLE_RIGHT; } -yy24: +yy25: yych = *++YYCURSOR; switch (yych) { - case '}': goto yy215; + case '}': goto yy216; default: goto yy3; } -yy25: +yy26: ++YYCURSOR; { return QUOTE_DOUBLE; } -yy27: +yy28: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '\'': goto yy213; - default: goto yy28; + case '\'': goto yy214; + default: goto yy29; } -yy28: - { return QUOTE_SINGLE; } yy29: + { return QUOTE_SINGLE; } +yy30: YYCTXMARKER = YYCURSOR + 1; yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '\t': goto yy203; - case '\n': goto yy200; - case '\r': goto yy202; - case ' ': goto yy205; - case '.': goto yy206; + case '\t': goto yy204; + case '\n': goto yy201; + case '\r': goto yy203; + case ' ': goto yy206; + case '.': goto yy207; default: goto yy3; } -yy30: +yy31: ++YYCURSOR; { return COLON; } -yy32: - yyaccept = 4; +yy33: + yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { case 'A': - case 'a': goto yy195; - default: goto yy33; + case 'a': goto yy196; + default: goto yy34; } -yy33: - { return AMPERSAND; } yy34: + { return AMPERSAND; } +yy35: yych = *++YYCURSOR; switch (yych) { - case '!': goto yy183; - case '"': goto yy173; - case '#': goto yy153; - case '$': goto yy151; - case '%': goto yy149; - case '&': goto yy137; - case '\'': goto yy171; - case '(': goto yy165; - case ')': goto yy163; - case '*': goto yy129; - case '+': goto yy147; - case ',': goto yy179; - case '-': goto yy145; - case '.': goto yy185; - case '/': goto yy133; - case ':': goto yy175; - case ';': goto yy177; - case '<': goto yy141; - case '=': goto yy143; - case '>': goto yy139; - case '?': goto yy181; - case '@': goto yy135; - case '[': goto yy157; - case '\\': goto yy123; - case ']': goto yy155; - case '^': goto yy131; - case '_': goto yy127; - case '`': goto yy169; - case '{': goto yy161; - case '|': goto yy125; - case '}': goto yy159; - case '~': goto yy167; + case '!': goto yy184; + case '"': goto yy174; + case '#': goto yy154; + case '$': goto yy152; + case '%': goto yy150; + case '&': goto yy138; + case '\'': goto yy172; + case '(': goto yy166; + case ')': goto yy164; + case '*': goto yy130; + case '+': goto yy148; + case ',': goto yy180; + case '-': goto yy146; + case '.': goto yy186; + case '/': goto yy134; + case ':': goto yy176; + case ';': goto yy178; + case '<': goto yy142; + case '=': goto yy144; + case '>': goto yy140; + case '?': goto yy182; + case '@': goto yy136; + case '[': goto yy158; + case '\\': goto yy124; + case ']': goto yy156; + case '^': goto yy132; + case '_': goto yy128; + case '`': goto yy170; + case '{': goto yy162; + case '|': goto yy126; + case '}': goto yy160; + case '~': goto yy168; default: goto yy3; } -yy35: +yy36: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '$': goto yy121; - default: goto yy36; + case '$': goto yy122; + default: goto yy37; } -yy36: - { return MATH_DOLLAR_SINGLE; } yy37: + { return MATH_DOLLAR_SINGLE; } +yy38: ++YYCURSOR; { return SUPERSCRIPT; } -yy39: +yy40: ++YYCURSOR; { return INDENT_TAB; } -yy41: +yy42: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy44; - case '\r': goto yy112; - case ' ': goto yy110; + case '\n': goto yy45; + case '\r': goto yy113; + case ' ': goto yy111; default: goto yy3; } -yy42: +yy43: YYCTXMARKER = YYCURSOR + 1; yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); @@ -320,16 +322,16 @@ yy42: case '\t': case '\n': case '\r': - case ' ': goto yy71; - case '#': goto yy69; + case ' ': goto yy72; + case '#': goto yy70; default: goto yy3; } -yy43: +yy44: YYCTXMARKER = YYCURSOR + 1; yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '.': goto yy60; + case '.': goto yy61; case '0': case '1': case '2': @@ -339,83 +341,84 @@ yy43: case '6': case '7': case '8': - case '9': goto yy62; + case '9': goto yy63; default: goto yy3; } -yy44: - ++YYCURSOR; yy45: - { return TEXT_NL; } + ++YYCURSOR; yy46: + { return TEXT_NL; } +yy47: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy44; - default: goto yy45; + case '\n': goto yy45; + default: goto yy46; } -yy47: +yy48: ++YYCURSOR; { return STAR; } -yy49: +yy50: ++YYCURSOR; { return UL; } -yy51: +yy52: ++YYCURSOR; yych = *YYCURSOR; - goto yy59; -yy52: - { return BACKTICK; } + goto yy60; yy53: + { return BACKTICK; } +yy54: ++YYCURSOR; yych = *YYCURSOR; - goto yy57; -yy54: - { return PIPE; } + goto yy58; yy55: + { return PIPE; } +yy56: yych = *++YYCURSOR; goto yy3; -yy56: +yy57: ++YYCURSOR; yych = *YYCURSOR; -yy57: +yy58: switch (yych) { - case '|': goto yy56; - default: goto yy54; + case '|': goto yy57; + default: goto yy55; } -yy58: +yy59: ++YYCURSOR; yych = *YYCURSOR; -yy59: +yy60: switch (yych) { - case '`': goto yy58; - default: goto yy52; + case '`': goto yy59; + default: goto yy53; } -yy60: +yy61: yych = *++YYCURSOR; switch (yych) { case '\t': - case ' ': goto yy67; - case '\n': goto yy64; - case '\r': goto yy66; - default: goto yy61; + case ' ': goto yy68; + case '\n': goto yy65; + case '\r': goto yy67; + default: goto yy62; } -yy61: +yy62: YYCURSOR = YYMARKER; switch (yyaccept) { case 0: goto yy3; case 1: goto yy5; case 2: goto yy9; case 3: goto yy11; - case 4: goto yy33; - case 5: goto yy118; - case 6: goto yy201; - default: goto yy246; + case 4: goto yy13; + case 5: goto yy34; + case 6: goto yy119; + case 7: goto yy202; + default: goto yy247; } -yy62: +yy63: YYCTXMARKER = YYCURSOR + 1; ++YYCURSOR; yych = *YYCURSOR; switch (yych) { - case '.': goto yy60; + case '.': goto yy61; case '0': case '1': case '2': @@ -425,624 +428,624 @@ yy62: case '6': case '7': case '8': - case '9': goto yy62; - default: goto yy61; + case '9': goto yy63; + default: goto yy62; } -yy64: - ++YYCURSOR; yy65: + ++YYCURSOR; +yy66: YYCURSOR = YYCTXMARKER; { return TEXT_NUMBER_POSS_LIST; } -yy66: +yy67: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy64; - default: goto yy65; + case '\n': goto yy65; + default: goto yy66; } -yy67: +yy68: ++YYCURSOR; yych = *YYCURSOR; switch (yych) { case '\t': - case ' ': goto yy67; - default: goto yy65; + case ' ': goto yy68; + default: goto yy66; } -yy69: +yy70: YYCTXMARKER = YYCURSOR + 1; yych = *++YYCURSOR; switch (yych) { case '\t': case '\n': case '\r': - case ' ': goto yy77; - case '#': goto yy82; - default: goto yy61; + case ' ': goto yy78; + case '#': goto yy83; + default: goto yy62; } -yy70: +yy71: ++YYCURSOR; yych = *YYCURSOR; -yy71: +yy72: switch (yych) { case '\t': - case ' ': goto yy70; - case '\n': goto yy73; - case '\r': goto yy75; - default: goto yy72; + case ' ': goto yy71; + case '\n': goto yy74; + case '\r': goto yy76; + default: goto yy73; } -yy72: - { return HASH1; } yy73: - ++YYCURSOR; + { return HASH1; } yy74: + ++YYCURSOR; +yy75: YYCURSOR = YYCTXMARKER; { return HASH1; } -yy75: +yy76: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy73; - default: goto yy74; + case '\n': goto yy74; + default: goto yy75; } -yy76: +yy77: ++YYCURSOR; yych = *YYCURSOR; -yy77: +yy78: switch (yych) { case '\t': - case ' ': goto yy76; - case '\n': goto yy79; - case '\r': goto yy81; - default: goto yy78; + case ' ': goto yy77; + case '\n': goto yy80; + case '\r': goto yy82; + default: goto yy79; } -yy78: - { return HASH2; } yy79: - ++YYCURSOR; + { return HASH2; } yy80: + ++YYCURSOR; +yy81: YYCURSOR = YYCTXMARKER; { return HASH2; } -yy81: +yy82: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy79; - default: goto yy80; + case '\n': goto yy80; + default: goto yy81; } -yy82: +yy83: YYCTXMARKER = YYCURSOR + 1; yych = *++YYCURSOR; switch (yych) { case '\t': case '\n': case '\r': - case ' ': goto yy85; - case '#': goto yy83; - default: goto yy61; + case ' ': goto yy86; + case '#': goto yy84; + default: goto yy62; } -yy83: +yy84: YYCTXMARKER = YYCURSOR + 1; yych = *++YYCURSOR; switch (yych) { case '\t': case '\n': case '\r': - case ' ': goto yy91; - case '#': goto yy96; - default: goto yy61; + case ' ': goto yy92; + case '#': goto yy97; + default: goto yy62; } -yy84: +yy85: ++YYCURSOR; yych = *YYCURSOR; -yy85: +yy86: switch (yych) { case '\t': - case ' ': goto yy84; - case '\n': goto yy87; - case '\r': goto yy89; - default: goto yy86; + case ' ': goto yy85; + case '\n': goto yy88; + case '\r': goto yy90; + default: goto yy87; } -yy86: - { return HASH3; } yy87: - ++YYCURSOR; + { return HASH3; } yy88: + ++YYCURSOR; +yy89: YYCURSOR = YYCTXMARKER; { return HASH3; } -yy89: +yy90: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy87; - default: goto yy88; + case '\n': goto yy88; + default: goto yy89; } -yy90: +yy91: ++YYCURSOR; yych = *YYCURSOR; -yy91: +yy92: switch (yych) { case '\t': - case ' ': goto yy90; - case '\n': goto yy93; - case '\r': goto yy95; - default: goto yy92; + case ' ': goto yy91; + case '\n': goto yy94; + case '\r': goto yy96; + default: goto yy93; } -yy92: - { return HASH4; } yy93: - ++YYCURSOR; + { return HASH4; } yy94: + ++YYCURSOR; +yy95: YYCURSOR = YYCTXMARKER; { return HASH4; } -yy95: +yy96: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy93; - default: goto yy94; + case '\n': goto yy94; + default: goto yy95; } -yy96: +yy97: YYCTXMARKER = YYCURSOR + 1; yych = *++YYCURSOR; switch (yych) { case '\t': case '\n': case '\r': - case ' ': goto yy99; - case '#': goto yy97; - default: goto yy61; + case ' ': goto yy100; + case '#': goto yy98; + default: goto yy62; } -yy97: +yy98: YYCTXMARKER = YYCURSOR + 1; yych = *++YYCURSOR; switch (yych) { case '\t': case '\n': case '\r': - case ' ': goto yy105; - default: goto yy61; + case ' ': goto yy106; + default: goto yy62; } -yy98: +yy99: ++YYCURSOR; yych = *YYCURSOR; -yy99: +yy100: switch (yych) { case '\t': - case ' ': goto yy98; - case '\n': goto yy101; - case '\r': goto yy103; - default: goto yy100; + case ' ': goto yy99; + case '\n': goto yy102; + case '\r': goto yy104; + default: goto yy101; } -yy100: - { return HASH5; } yy101: - ++YYCURSOR; + { return HASH5; } yy102: + ++YYCURSOR; +yy103: YYCURSOR = YYCTXMARKER; { return HASH5; } -yy103: +yy104: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy101; - default: goto yy102; + case '\n': goto yy102; + default: goto yy103; } -yy104: +yy105: ++YYCURSOR; yych = *YYCURSOR; -yy105: +yy106: switch (yych) { case '\t': - case ' ': goto yy104; - case '\n': goto yy107; - case '\r': goto yy109; - default: goto yy106; + case ' ': goto yy105; + case '\n': goto yy108; + case '\r': goto yy110; + default: goto yy107; } -yy106: - { return HASH6; } yy107: - ++YYCURSOR; + { return HASH6; } yy108: + ++YYCURSOR; +yy109: YYCURSOR = YYCTXMARKER; { return HASH6; } -yy109: +yy110: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy107; - default: goto yy108; + case '\n': goto yy108; + default: goto yy109; } -yy110: +yy111: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '\n': goto yy114; - case '\r': goto yy116; - case ' ': goto yy113; - default: goto yy111; + case '\n': goto yy115; + case '\r': goto yy117; + case ' ': goto yy114; + default: goto yy112; } -yy111: - { return NON_INDENT_SPACE; } yy112: + { return NON_INDENT_SPACE; } +yy113: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy44; - default: goto yy45; + case '\n': goto yy45; + default: goto yy46; } -yy113: +yy114: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy114; - case '\r': goto yy116; - case ' ': goto yy117; - default: goto yy111; + case '\n': goto yy115; + case '\r': goto yy117; + case ' ': goto yy118; + default: goto yy112; } -yy114: - ++YYCURSOR; yy115: - { return TEXT_LINEBREAK; } + ++YYCURSOR; yy116: + { return TEXT_LINEBREAK; } +yy117: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy114; - default: goto yy115; + case '\n': goto yy115; + default: goto yy116; } -yy117: - yyaccept = 5; +yy118: + yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '\n': goto yy114; - case '\r': goto yy116; - case ' ': goto yy119; - default: goto yy118; + case '\n': goto yy115; + case '\r': goto yy117; + case ' ': goto yy120; + default: goto yy119; } -yy118: - { return INDENT_SPACE; } yy119: + { return INDENT_SPACE; } +yy120: ++YYCURSOR; yych = *YYCURSOR; switch (yych) { - case '\n': goto yy114; - case '\r': goto yy116; - case ' ': goto yy119; - default: goto yy61; + case '\n': goto yy115; + case '\r': goto yy117; + case ' ': goto yy120; + default: goto yy62; } -yy121: +yy122: ++YYCURSOR; { return MATH_DOLLAR_DOUBLE; } -yy123: +yy124: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '(': goto yy187; - case ')': goto yy189; - case '[': goto yy191; - case ']': goto yy193; - default: goto yy124; + case '(': goto yy188; + case ')': goto yy190; + case '[': goto yy192; + case ']': goto yy194; + default: goto yy125; } -yy124: - { return ESCAPED_CHARACTER; } yy125: + { return ESCAPED_CHARACTER; } +yy126: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy127: +yy128: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy129: +yy130: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy131: +yy132: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy133: +yy134: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy135: +yy136: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy137: +yy138: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy139: +yy140: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy141: +yy142: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy143: +yy144: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy145: +yy146: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy147: +yy148: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy149: +yy150: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy151: +yy152: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy153: +yy154: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy155: +yy156: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy157: +yy158: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy159: +yy160: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy161: +yy162: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy163: +yy164: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy165: +yy166: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy167: +yy168: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy169: +yy170: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy171: +yy172: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy173: +yy174: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy175: +yy176: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy177: +yy178: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy179: +yy180: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy181: +yy182: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy183: +yy184: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy185: +yy186: ++YYCURSOR; { return ESCAPED_CHARACTER; } -yy187: +yy188: ++YYCURSOR; { return MATH_PAREN_OPEN; } -yy189: +yy190: ++YYCURSOR; { return MATH_PAREN_CLOSE; } -yy191: +yy192: ++YYCURSOR; { return MATH_BRACKET_OPEN; } -yy193: +yy194: ++YYCURSOR; { return MATH_BRACKET_CLOSE; } -yy195: +yy196: yych = *++YYCURSOR; switch (yych) { case 'M': - case 'm': goto yy196; - default: goto yy61; + case 'm': goto yy197; + default: goto yy62; } -yy196: +yy197: yych = *++YYCURSOR; switch (yych) { case 'P': - case 'p': goto yy197; - default: goto yy61; + case 'p': goto yy198; + default: goto yy62; } -yy197: +yy198: yych = *++YYCURSOR; switch (yych) { - case ';': goto yy198; - default: goto yy61; + case ';': goto yy199; + default: goto yy62; } -yy198: +yy199: ++YYCURSOR; { return AMPERSAND_LONG; } -yy200: - ++YYCURSOR; yy201: + ++YYCURSOR; +yy202: YYCURSOR = YYCTXMARKER; { return TEXT_PERIOD; } -yy202: +yy203: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy200; - default: goto yy201; + case '\n': goto yy201; + default: goto yy202; } -yy203: +yy204: ++YYCURSOR; yych = *YYCURSOR; -yy204: +yy205: switch (yych) { case '\t': - case ' ': goto yy203; - default: goto yy201; + case ' ': goto yy204; + default: goto yy202; } -yy205: - yyaccept = 6; +yy206: + yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '.': goto yy209; - default: goto yy204; + case '.': goto yy210; + default: goto yy205; } -yy206: +yy207: yych = *++YYCURSOR; switch (yych) { - case '.': goto yy207; - default: goto yy61; + case '.': goto yy208; + default: goto yy62; } -yy207: +yy208: ++YYCURSOR; { return ELLIPSIS; } -yy209: +yy210: yych = *++YYCURSOR; switch (yych) { - case ' ': goto yy210; - default: goto yy61; + case ' ': goto yy211; + default: goto yy62; } -yy210: +yy211: yych = *++YYCURSOR; switch (yych) { - case '.': goto yy211; - default: goto yy61; + case '.': goto yy212; + default: goto yy62; } -yy211: +yy212: ++YYCURSOR; { return ELLIPSIS; } -yy213: +yy214: ++YYCURSOR; { return QUOTE_RIGHT_ALT; } -yy215: +yy216: ++YYCURSOR; { return BRACE_DOUBLE_RIGHT; } -yy217: +yy218: ++YYCURSOR; { return BRACKET_IMAGE_LEFT; } -yy219: +yy220: ++YYCURSOR; { return BRACKET_VARIABLE_LEFT; } -yy221: +yy222: ++YYCURSOR; { return BRACKET_CITATION_LEFT; } -yy223: +yy224: ++YYCURSOR; { return BRACKET_FOOTNOTE_LEFT; } -yy225: +yy226: yych = *++YYCURSOR; switch (yych) { - case '}': goto yy226; - default: goto yy61; + case '}': goto yy227; + default: goto yy62; } -yy226: +yy227: ++YYCURSOR; { return CRITIC_HI_CLOSE; } -yy228: +yy229: yych = *++YYCURSOR; switch (yych) { - case '}': goto yy231; - default: goto yy61; + case '}': goto yy232; + default: goto yy62; } -yy229: +yy230: ++YYCURSOR; { return CRITIC_SUB_DIV; } -yy231: +yy232: ++YYCURSOR; { return CRITIC_SUB_CLOSE; } -yy233: +yy234: yych = *++YYCURSOR; switch (yych) { - case '}': goto yy234; - default: goto yy61; + case '}': goto yy235; + default: goto yy62; } -yy234: +yy235: ++YYCURSOR; { return CRITIC_COM_CLOSE; } -yy236: +yy237: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '-': goto yy240; - case '}': goto yy238; - default: goto yy237; + case '-': goto yy241; + case '}': goto yy239; + default: goto yy238; } -yy237: - { return DASH_N; } yy238: + { return DASH_N; } +yy239: ++YYCURSOR; { return CRITIC_DEL_CLOSE; } -yy240: +yy241: ++YYCURSOR; { return DASH_M; } -yy242: +yy243: yych = *++YYCURSOR; switch (yych) { - case '}': goto yy243; - default: goto yy61; + case '}': goto yy244; + default: goto yy62; } -yy243: +yy244: ++YYCURSOR; { return CRITIC_ADD_CLOSE; } -yy245: - yyaccept = 7; +yy246: + yyaccept = 8; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case 'T': goto yy262; - default: goto yy246; + case 'T': goto yy263; + default: goto yy247; } -yy246: - { return BRACE_DOUBLE_LEFT; } yy247: - yych = *++YYCURSOR; - switch (yych) { - case '=': goto yy260; - default: goto yy61; - } + { return BRACE_DOUBLE_LEFT; } yy248: yych = *++YYCURSOR; switch (yych) { - case '~': goto yy258; - default: goto yy61; + case '=': goto yy261; + default: goto yy62; } yy249: yych = *++YYCURSOR; switch (yych) { - case '>': goto yy256; - default: goto yy61; + case '~': goto yy259; + default: goto yy62; } yy250: yych = *++YYCURSOR; switch (yych) { - case '-': goto yy254; - default: goto yy61; + case '>': goto yy257; + default: goto yy62; } yy251: yych = *++YYCURSOR; switch (yych) { - case '+': goto yy252; - default: goto yy61; + case '-': goto yy255; + default: goto yy62; } yy252: + yych = *++YYCURSOR; + switch (yych) { + case '+': goto yy253; + default: goto yy62; + } +yy253: ++YYCURSOR; { return CRITIC_ADD_OPEN; } -yy254: +yy255: ++YYCURSOR; { return CRITIC_DEL_OPEN; } -yy256: +yy257: ++YYCURSOR; { return CRITIC_COM_OPEN; } -yy258: +yy259: ++YYCURSOR; { return CRITIC_SUB_OPEN; } -yy260: +yy261: ++YYCURSOR; { return CRITIC_HI_OPEN; } -yy262: - yych = *++YYCURSOR; - switch (yych) { - case 'O': goto yy263; - default: goto yy61; - } yy263: yych = *++YYCURSOR; switch (yych) { - case 'C': goto yy264; - default: goto yy61; + case 'O': goto yy264; + default: goto yy62; } yy264: yych = *++YYCURSOR; switch (yych) { - case '}': goto yy265; - default: goto yy61; + case 'C': goto yy265; + default: goto yy62; } yy265: yych = *++YYCURSOR; switch (yych) { case '}': goto yy266; - default: goto yy61; + default: goto yy62; } yy266: + yych = *++YYCURSOR; + switch (yych) { + case '}': goto yy267; + default: goto yy62; + } +yy267: ++YYCURSOR; { return TOC; } } diff --git a/src/lexer.re b/src/lexer.re index 6f41c5e..77bed4e 100644 --- a/src/lexer.re +++ b/src/lexer.re @@ -218,6 +218,7 @@ int scan(Scanner * s, const char * stop) { "*" { return STAR; } "+" { return PLUS; } "_" { return UL; } + "=" { return EQUAL; } '`'+ { return BACKTICK; } diff --git a/src/libMultiMarkdown.h b/src/libMultiMarkdown.h index 0e70d30..17d58ea 100644 --- a/src/libMultiMarkdown.h +++ b/src/libMultiMarkdown.h @@ -135,6 +135,8 @@ enum token_types { BLOCK_LIST_ITEM_TIGHT, BLOCK_META, BLOCK_PARA, + BLOCK_SETEXT_1, + BLOCK_SETEXT_2, BLOCK_TABLE, BLOCK_TABLE_HEADER, BLOCK_TABLE_SECTION, @@ -229,6 +231,7 @@ enum token_types { MATH_DOLLAR_SINGLE, MATH_DOLLAR_DOUBLE, + EQUAL, PIPE, PLUS, diff --git a/src/mmd.c b/src/mmd.c index 7cbf85d..08c1b9c 100644 --- a/src/mmd.c +++ b/src/mmd.c @@ -434,8 +434,20 @@ void mmd_assign_line_type(mmd_engine * e, token * line) { break; } break; + case EQUAL: + // Could this be a setext heading marker? + if (scan_setext(&source[line->child->start])) { + line->type = LINE_SETEXT_1; + } else { + line->type = LINE_PLAIN; + } + break; case DASH_N: case DASH_M: + if (scan_setext(&source[line->child->start])) { + line->type = LINE_SETEXT_2; + break; + } case STAR: case UL: // Could this be a horizontal rule? @@ -1590,6 +1602,15 @@ void strip_line_tokens_from_block(mmd_engine * e, token * block) { // Move contents of line directly into the parent block while (l != NULL) { switch (l->type) { + case LINE_SETEXT_1: + case LINE_SETEXT_2: + if ((block->type == BLOCK_SETEXT_1) || + (block->type == BLOCK_SETEXT_2)) { + temp = l->next; + tokens_prune(l, l); + l = temp; + break; + } case LINE_DEFINITION: if (block->type == BLOCK_DEFINITION) { // Remove leading colon diff --git a/src/parser.c b/src/parser.c index 8354f6d..716e038 100644 --- a/src/parser.c +++ b/src/parser.c @@ -92,7 +92,7 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned char -#define YYNOCODE 77 +#define YYNOCODE 81 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE token * typedef union { @@ -108,15 +108,15 @@ typedef union { #define ParseARG_STORE yypParser->engine = engine #define YYFALLBACK 1 #define YYNSTATE 41 -#define YYNRULE 123 +#define YYNRULE 129 #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 +#define YY_MIN_SHIFTREDUCE 131 +#define YY_MAX_SHIFTREDUCE 259 +#define YY_MIN_REDUCE 260 +#define YY_MAX_REDUCE 388 +#define YY_ERROR_ACTION 389 +#define YY_ACCEPT_ACTION 390 +#define YY_NO_ACTION 391 /************* End control #defines *******************************************/ /* Define the yytestcase() macro to be a no-op if is not already defined @@ -188,88 +188,90 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (248) +#define YY_ACTTAB_COUNT (256) static const YYACTIONTYPE yy_action[] = { - /* 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, + /* 0 */ 390, 1, 133, 30, 143, 144, 145, 146, 40, 148, + /* 10 */ 29, 27, 37, 35, 28, 13, 155, 156, 157, 39, + /* 20 */ 208, 12, 12, 27, 34, 34, 214, 258, 32, 32, + /* 30 */ 25, 254, 24, 23, 39, 37, 35, 211, 7, 251, + /* 40 */ 38, 214, 14, 14, 260, 140, 258, 229, 15, 258, + /* 50 */ 254, 217, 218, 254, 243, 134, 135, 136, 137, 138, + /* 60 */ 139, 222, 6, 5, 3, 2, 16, 250, 209, 141, + /* 70 */ 4, 229, 231, 234, 237, 232, 235, 238, 249, 140, + /* 80 */ 31, 31, 15, 258, 229, 217, 218, 254, 243, 134, + /* 90 */ 135, 136, 137, 138, 139, 222, 6, 5, 3, 2, + /* 100 */ 16, 33, 33, 141, 4, 229, 231, 234, 237, 232, + /* 110 */ 235, 238, 249, 132, 30, 143, 144, 145, 146, 40, + /* 120 */ 148, 29, 27, 37, 35, 28, 13, 155, 156, 157, + /* 130 */ 183, 241, 242, 179, 27, 239, 36, 36, 26, 32, + /* 140 */ 32, 25, 201, 24, 23, 21, 37, 35, 189, 7, + /* 150 */ 176, 38, 159, 14, 14, 188, 240, 184, 186, 182, + /* 160 */ 185, 187, 241, 242, 26, 164, 239, 8, 39, 8, + /* 170 */ 12, 12, 158, 4, 224, 9, 9, 17, 17, 217, + /* 180 */ 218, 166, 166, 169, 26, 223, 5, 240, 180, 177, + /* 190 */ 178, 181, 26, 203, 204, 9, 9, 17, 17, 172, + /* 200 */ 196, 165, 165, 9, 9, 17, 17, 241, 242, 170, + /* 210 */ 170, 239, 244, 6, 206, 26, 245, 4, 207, 207, + /* 220 */ 191, 172, 262, 217, 218, 262, 26, 158, 18, 18, + /* 230 */ 262, 262, 240, 173, 174, 175, 26, 10, 10, 19, + /* 240 */ 19, 26, 197, 190, 262, 262, 262, 11, 11, 20, + /* 250 */ 20, 262, 192, 158, 22, 22, }; static const YYCODETYPE yy_lookahead[] = { - /* 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, + /* 0 */ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + /* 10 */ 46, 47, 48, 49, 50, 51, 52, 53, 54, 76, + /* 20 */ 77, 78, 79, 59, 64, 65, 6, 5, 64, 65, + /* 30 */ 66, 9, 68, 69, 76, 71, 72, 79, 74, 6, + /* 40 */ 76, 6, 78, 79, 0, 1, 5, 27, 4, 5, + /* 50 */ 9, 7, 8, 9, 10, 11, 12, 13, 14, 15, + /* 60 */ 16, 17, 18, 19, 20, 21, 22, 34, 27, 25, + /* 70 */ 26, 27, 28, 29, 30, 31, 32, 33, 34, 1, + /* 80 */ 55, 56, 4, 5, 27, 7, 8, 9, 10, 11, + /* 90 */ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + /* 100 */ 22, 55, 56, 25, 26, 27, 28, 29, 30, 31, + /* 110 */ 32, 33, 34, 38, 39, 40, 41, 42, 43, 44, + /* 120 */ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + /* 130 */ 67, 2, 3, 67, 59, 6, 55, 56, 44, 64, + /* 140 */ 65, 66, 73, 68, 69, 59, 71, 72, 59, 74, + /* 150 */ 67, 76, 58, 78, 79, 70, 27, 28, 29, 30, + /* 160 */ 31, 32, 2, 3, 44, 63, 6, 75, 76, 77, + /* 170 */ 78, 79, 56, 26, 6, 55, 56, 57, 58, 7, + /* 180 */ 8, 61, 62, 65, 44, 17, 19, 27, 28, 29, + /* 190 */ 30, 31, 44, 2, 3, 55, 56, 57, 58, 27, + /* 200 */ 72, 61, 62, 55, 56, 57, 58, 2, 3, 61, + /* 210 */ 62, 6, 6, 18, 5, 44, 10, 26, 9, 9, + /* 220 */ 71, 27, 80, 7, 8, 80, 44, 56, 57, 58, + /* 230 */ 80, 80, 27, 28, 29, 30, 44, 55, 56, 57, + /* 240 */ 58, 44, 60, 27, 80, 80, 80, 55, 56, 57, + /* 250 */ 58, 80, 60, 56, 57, 58, }; -#define YY_SHIFT_USE_DFLT (248) +#define YY_SHIFT_USE_DFLT (256) #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_SHIFT_MIN (0) +#define YY_SHIFT_MAX (216) +static const unsigned short int yy_shift_ofst[] = { + /* 0 */ 78, 44, 20, 20, 20, 20, 20, 22, 22, 20, + /* 10 */ 20, 20, 41, 191, 22, 35, 35, 57, 57, 57, + /* 20 */ 57, 35, 57, 129, 160, 205, 172, 216, 33, 206, + /* 30 */ 168, 35, 147, 35, 147, 167, 35, 195, 209, 210, + /* 40 */ 194, }; -#define YY_REDUCE_USE_DFLT (-31) +#define YY_REDUCE_USE_DFLT (-58) #define YY_REDUCE_COUNT (37) -#define YY_REDUCE_MIN (-30) -#define YY_REDUCE_MAX (173) +#define YY_REDUCE_MIN (-57) +#define YY_REDUCE_MAX (197) static const short yy_reduce_ofst[] = { - /* 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, + /* 0 */ -36, 75, 120, 140, 148, 182, 192, 92, -57, 171, + /* 10 */ 197, 197, -42, -40, -42, 25, 46, 94, 94, 94, + /* 20 */ 94, 81, 94, 63, 66, 83, 86, 89, 69, 85, + /* 30 */ 102, 116, 118, 116, 118, 128, 116, 149, }; static const YYACTIONTYPE yy_default[] = { - /* 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, + /* 0 */ 389, 389, 355, 354, 300, 329, 324, 382, 334, 348, + /* 10 */ 327, 322, 339, 283, 341, 381, 356, 350, 292, 328, + /* 20 */ 323, 290, 291, 365, 362, 359, 345, 279, 282, 278, + /* 30 */ 271, 331, 388, 296, 297, 281, 289, 280, 386, 386, + /* 40 */ 276, }; /********** End of lemon-generated parsing tables *****************************/ @@ -290,28 +292,30 @@ static const YYACTIONTYPE yy_default[] = { #ifdef YYFALLBACK static const YYCODETYPE yyFallback[] = { 0, /* $ => nothing */ - 3, /* LINE_PLAIN => LINE_CONTINUATION */ - 1, /* LINE_TABLE_SEPARATOR => LINE_PLAIN */ + 10, /* LINE_HR => LINE_HTML */ + 1, /* LINE_SETEXT_1 => LINE_HR */ + 1, /* LINE_SETEXT_2 => LINE_HR */ + 6, /* LINE_PLAIN => LINE_CONTINUATION */ + 4, /* LINE_TABLE_SEPARATOR => LINE_PLAIN */ 0, /* LINE_CONTINUATION => nothing */ - 3, /* LINE_INDENTED_TAB => LINE_CONTINUATION */ - 3, /* LINE_INDENTED_SPACE => LINE_CONTINUATION */ - 3, /* LINE_TABLE => LINE_CONTINUATION */ + 6, /* LINE_INDENTED_TAB => LINE_CONTINUATION */ + 6, /* LINE_INDENTED_SPACE => LINE_CONTINUATION */ + 6, /* LINE_TABLE => LINE_CONTINUATION */ 0, /* LINE_HTML => nothing */ - 7, /* LINE_ATX_1 => LINE_HTML */ - 7, /* LINE_ATX_2 => LINE_HTML */ - 7, /* LINE_ATX_3 => LINE_HTML */ - 7, /* LINE_ATX_4 => LINE_HTML */ - 7, /* LINE_ATX_5 => LINE_HTML */ - 7, /* LINE_ATX_6 => LINE_HTML */ - 7, /* LINE_HR => LINE_HTML */ - 7, /* LINE_BLOCKQUOTE => LINE_HTML */ - 7, /* LINE_LIST_BULLETED => LINE_HTML */ - 7, /* LINE_LIST_ENUMERATED => LINE_HTML */ - 7, /* LINE_DEF_CITATION => LINE_HTML */ - 7, /* LINE_DEF_FOOTNOTE => LINE_HTML */ - 7, /* LINE_DEF_LINK => LINE_HTML */ - 7, /* LINE_FENCE_BACKTICK => LINE_HTML */ - 7, /* LINE_FENCE_BACKTICK_START => LINE_HTML */ + 10, /* LINE_ATX_1 => LINE_HTML */ + 10, /* LINE_ATX_2 => LINE_HTML */ + 10, /* LINE_ATX_3 => LINE_HTML */ + 10, /* LINE_ATX_4 => LINE_HTML */ + 10, /* LINE_ATX_5 => LINE_HTML */ + 10, /* LINE_ATX_6 => LINE_HTML */ + 10, /* LINE_BLOCKQUOTE => LINE_HTML */ + 10, /* LINE_LIST_BULLETED => LINE_HTML */ + 10, /* LINE_LIST_ENUMERATED => LINE_HTML */ + 10, /* LINE_DEF_CITATION => LINE_HTML */ + 10, /* LINE_DEF_FOOTNOTE => LINE_HTML */ + 10, /* LINE_DEF_LINK => LINE_HTML */ + 10, /* LINE_FENCE_BACKTICK => LINE_HTML */ + 10, /* LINE_FENCE_BACKTICK_START => LINE_HTML */ }; #endif /* YYFALLBACK */ @@ -397,19 +401,20 @@ void ParseTrace(FILE *TraceFILE, char *zTracePrompt){ /* For tracing shifts, the names of all terminals and nonterminals ** are required. The following table supplies these names */ static const char *const yyTokenName[] = { - "$", "LINE_PLAIN", "LINE_TABLE_SEPARATOR", "LINE_CONTINUATION", - "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_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", + "$", "LINE_HR", "LINE_SETEXT_1", "LINE_SETEXT_2", + "LINE_PLAIN", "LINE_TABLE_SEPARATOR", "LINE_CONTINUATION", "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_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_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", + "setext_1", "setext_2", "table", "chunk", "chunk_line", "nested_chunks", "nested_chunk", "indented_line", "ext_chunk", "opt_ext_chunk", "tail", "quote_line", "defs", "def", "fenced_3", "fenced_line", @@ -447,105 +452,111 @@ static const char *const yyRuleName[] = { /* 21 */ "block ::= list_enum", /* 22 */ "block ::= meta_block", /* 23 */ "block ::= para", - /* 24 */ "block ::= table", - /* 25 */ "chunk ::= chunk chunk_line", - /* 26 */ "nested_chunks ::= nested_chunks nested_chunk", - /* 27 */ "nested_chunk ::= empty indented_line chunk", - /* 28 */ "nested_chunk ::= empty indented_line", - /* 29 */ "ext_chunk ::= chunk nested_chunks", - /* 30 */ "opt_ext_chunk ::= chunk nested_chunks", - /* 31 */ "blockquote ::= blockquote quote_line", - /* 32 */ "def_citation ::= LINE_DEF_CITATION tail", - /* 33 */ "def_footnote ::= LINE_DEF_FOOTNOTE tail", - /* 34 */ "def_link ::= LINE_DEF_LINK chunk", - /* 35 */ "definition_block ::= para defs", - /* 36 */ "defs ::= defs def", - /* 37 */ "def ::= LINE_DEFINITION tail", - /* 38 */ "def ::= LINE_DEFINITION", - /* 39 */ "empty ::= empty LINE_EMPTY", - /* 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", + /* 24 */ "block ::= setext_1", + /* 25 */ "block ::= setext_2", + /* 26 */ "block ::= table", + /* 27 */ "chunk ::= chunk chunk_line", + /* 28 */ "nested_chunks ::= nested_chunks nested_chunk", + /* 29 */ "nested_chunk ::= empty indented_line chunk", + /* 30 */ "nested_chunk ::= empty indented_line", + /* 31 */ "ext_chunk ::= chunk nested_chunks", + /* 32 */ "opt_ext_chunk ::= chunk nested_chunks", + /* 33 */ "blockquote ::= blockquote quote_line", + /* 34 */ "def_citation ::= LINE_DEF_CITATION tail", + /* 35 */ "def_footnote ::= LINE_DEF_FOOTNOTE tail", + /* 36 */ "def_link ::= LINE_DEF_LINK chunk", + /* 37 */ "definition_block ::= para defs", + /* 38 */ "defs ::= defs def", + /* 39 */ "def ::= LINE_DEFINITION tail", + /* 40 */ "def ::= LINE_DEFINITION", + /* 41 */ "empty ::= empty LINE_EMPTY", + /* 42 */ "fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_3", + /* 43 */ "fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_4", + /* 44 */ "fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_5", + /* 45 */ "fenced_3 ::= fenced_3 fenced_line", + /* 46 */ "fenced_block ::= fenced_4 LINE_FENCE_BACKTICK_4", + /* 47 */ "fenced_block ::= fenced_4 LINE_FENCE_BACKTICK_5", + /* 48 */ "fenced_4 ::= fenced_4 fenced_line", + /* 49 */ "fenced_4 ::= fenced_4 LINE_FENCE_BACKTICK_3", + /* 50 */ "fenced_4 ::= fenced_4 LINE_FENCE_BACKTICK_START_3", + /* 51 */ "fenced_block ::= fenced_5 LINE_FENCE_BACKTICK_5", + /* 52 */ "fenced_5 ::= fenced_5 fenced_line", + /* 53 */ "fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_3", + /* 54 */ "fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_START_3", + /* 55 */ "fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_4", + /* 56 */ "fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_START_4", + /* 57 */ "html_block ::= html_block html_line", + /* 58 */ "indented_code ::= indented_code indented_line", + /* 59 */ "indented_code ::= indented_code LINE_EMPTY", + /* 60 */ "list_bullet ::= list_bullet item_bullet", + /* 61 */ "item_bullet ::= LINE_LIST_BULLETED ext_chunk", + /* 62 */ "item_bullet ::= LINE_LIST_BULLETED chunk", + /* 63 */ "item_bullet ::= LINE_LIST_BULLETED nested_chunks", + /* 64 */ "item_bullet ::= LINE_LIST_BULLETED", + /* 65 */ "list_enum ::= list_enum item_enum", + /* 66 */ "item_enum ::= LINE_LIST_ENUMERATED ext_chunk", + /* 67 */ "item_enum ::= LINE_LIST_ENUMERATED chunk", + /* 68 */ "item_enum ::= LINE_LIST_ENUMERATED nested_chunks", + /* 69 */ "item_enum ::= LINE_LIST_ENUMERATED", + /* 70 */ "meta_block ::= meta_block meta_line", + /* 71 */ "para ::= LINE_PLAIN chunk", + /* 72 */ "setext_1 ::= para LINE_SETEXT_1", + /* 73 */ "setext_2 ::= para LINE_SETEXT_2", + /* 74 */ "table ::= table_header table_body", + /* 75 */ "table_header ::= header_rows LINE_TABLE_SEPARATOR", + /* 76 */ "header_rows ::= header_rows LINE_TABLE", + /* 77 */ "table_body ::= table_body table_section", + /* 78 */ "table_section ::= all_rows LINE_EMPTY", + /* 79 */ "table_section ::= all_rows", + /* 80 */ "all_rows ::= all_rows row", + /* 81 */ "para ::= all_rows", + /* 82 */ "chunk ::= chunk_line", + /* 83 */ "chunk_line ::= LINE_CONTINUATION", + /* 84 */ "nested_chunks ::= nested_chunk", + /* 85 */ "nested_chunk ::= empty", + /* 86 */ "indented_line ::= LINE_INDENTED_TAB", + /* 87 */ "indented_line ::= LINE_INDENTED_SPACE", + /* 88 */ "opt_ext_chunk ::= chunk", + /* 89 */ "tail ::= opt_ext_chunk", + /* 90 */ "tail ::= nested_chunks", + /* 91 */ "blockquote ::= LINE_BLOCKQUOTE", + /* 92 */ "quote_line ::= LINE_BLOCKQUOTE", + /* 93 */ "quote_line ::= LINE_CONTINUATION", + /* 94 */ "def_citation ::= LINE_DEF_CITATION", + /* 95 */ "def_footnote ::= LINE_DEF_FOOTNOTE", + /* 96 */ "def_link ::= LINE_DEF_LINK", + /* 97 */ "defs ::= def", + /* 98 */ "empty ::= LINE_EMPTY", + /* 99 */ "fenced_block ::= fenced_3", + /* 100 */ "fenced_3 ::= LINE_FENCE_BACKTICK_3", + /* 101 */ "fenced_3 ::= LINE_FENCE_BACKTICK_START_3", + /* 102 */ "fenced_block ::= fenced_4", + /* 103 */ "fenced_4 ::= LINE_FENCE_BACKTICK_4", + /* 104 */ "fenced_4 ::= LINE_FENCE_BACKTICK_START_4", + /* 105 */ "fenced_block ::= fenced_5", + /* 106 */ "fenced_5 ::= LINE_FENCE_BACKTICK_5", + /* 107 */ "fenced_5 ::= LINE_FENCE_BACKTICK_START_5", + /* 108 */ "fenced_line ::= LINE_CONTINUATION", + /* 109 */ "fenced_line ::= LINE_EMPTY", + /* 110 */ "fenced_line ::= LINE_SETEXT_1", + /* 111 */ "fenced_line ::= LINE_SETEXT_2", + /* 112 */ "html_block ::= LINE_HTML", + /* 113 */ "html_line ::= LINE_CONTINUATION", + /* 114 */ "html_line ::= LINE_HTML", + /* 115 */ "indented_code ::= indented_line", + /* 116 */ "list_bullet ::= item_bullet", + /* 117 */ "list_enum ::= item_enum", + /* 118 */ "meta_block ::= LINE_META", + /* 119 */ "meta_line ::= LINE_META", + /* 120 */ "meta_line ::= LINE_CONTINUATION", + /* 121 */ "para ::= LINE_PLAIN", + /* 122 */ "table ::= table_header", + /* 123 */ "header_rows ::= LINE_TABLE", + /* 124 */ "table_body ::= table_section", + /* 125 */ "all_rows ::= row", + /* 126 */ "row ::= header_rows", + /* 127 */ "row ::= LINE_TABLE_SEPARATOR", + /* 128 */ "para ::= defs", }; #endif /* NDEBUG */ @@ -894,129 +905,135 @@ 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[] = { - { 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 }, - { 56, 2 }, - { 57, 2 }, { 37, 2 }, - { 38, 2 }, + { 37, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 38, 1 }, + { 55, 2 }, + { 57, 2 }, + { 58, 3 }, + { 58, 2 }, + { 60, 2 }, + { 61, 2 }, { 39, 2 }, { 40, 2 }, { 41, 2 }, - { 60, 2 }, - { 61, 2 }, - { 61, 1 }, { 42, 2 }, { 43, 2 }, - { 43, 2 }, - { 43, 2 }, - { 62, 2 }, - { 43, 2 }, - { 43, 2 }, { 64, 2 }, - { 64, 2 }, - { 64, 2 }, - { 43, 2 }, - { 65, 2 }, - { 65, 2 }, - { 65, 2 }, - { 65, 2 }, { 65, 2 }, + { 65, 1 }, { 44, 2 }, { 45, 2 }, { 45, 2 }, - { 46, 2 }, - { 67, 2 }, - { 67, 2 }, - { 67, 2 }, - { 67, 1 }, - { 47, 2 }, + { 45, 2 }, + { 66, 2 }, + { 45, 2 }, + { 45, 2 }, { 68, 2 }, { 68, 2 }, { 68, 2 }, - { 68, 1 }, + { 45, 2 }, + { 69, 2 }, + { 69, 2 }, + { 69, 2 }, + { 69, 2 }, + { 69, 2 }, + { 46, 2 }, + { 47, 2 }, + { 47, 2 }, { 48, 2 }, + { 71, 2 }, + { 71, 2 }, + { 71, 2 }, + { 71, 1 }, { 49, 2 }, - { 50, 2 }, - { 70, 2 }, { 72, 2 }, - { 71, 2 }, - { 73, 2 }, - { 73, 1 }, + { 72, 2 }, + { 72, 2 }, + { 72, 1 }, + { 50, 2 }, + { 51, 2 }, + { 52, 2 }, + { 53, 2 }, + { 54, 2 }, { 74, 2 }, - { 49, 1 }, + { 76, 2 }, + { 75, 2 }, + { 77, 2 }, + { 77, 1 }, + { 78, 2 }, { 51, 1 }, - { 52, 1 }, - { 53, 1 }, - { 54, 1 }, - { 55, 1 }, { 55, 1 }, + { 56, 1 }, { 57, 1 }, { 58, 1 }, - { 58, 1 }, - { 37, 1 }, { 59, 1 }, { 59, 1 }, - { 38, 1 }, - { 39, 1 }, - { 40, 1 }, - { 60, 1 }, - { 42, 1 }, - { 43, 1 }, + { 61, 1 }, { 62, 1 }, { 62, 1 }, - { 43, 1 }, - { 64, 1 }, - { 64, 1 }, - { 43, 1 }, - { 65, 1 }, - { 65, 1 }, + { 39, 1 }, { 63, 1 }, { 63, 1 }, + { 40, 1 }, + { 41, 1 }, + { 42, 1 }, + { 64, 1 }, { 44, 1 }, + { 45, 1 }, { 66, 1 }, { 66, 1 }, { 45, 1 }, + { 68, 1 }, + { 68, 1 }, + { 45, 1 }, + { 69, 1 }, + { 69, 1 }, + { 67, 1 }, + { 67, 1 }, + { 67, 1 }, + { 67, 1 }, { 46, 1 }, + { 70, 1 }, + { 70, 1 }, { 47, 1 }, { 48, 1 }, - { 69, 1 }, - { 69, 1 }, { 49, 1 }, { 50, 1 }, - { 72, 1 }, - { 71, 1 }, - { 74, 1 }, - { 75, 1 }, + { 73, 1 }, + { 73, 1 }, + { 51, 1 }, + { 54, 1 }, + { 76, 1 }, { 75, 1 }, - { 49, 1 }, + { 78, 1 }, + { 79, 1 }, + { 79, 1 }, + { 51, 1 }, }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -1189,151 +1206,163 @@ static void yy_reduce( { yylhsminor.yy0 = token_new_parent(yymsp[0].minor.yy0, BLOCK_PARA); is_para_html(engine, yylhsminor.yy0); } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 24: /* block ::= table */ + case 24: /* block ::= setext_1 */ +{ yylhsminor.yy0 = token_new_parent(yymsp[0].minor.yy0, BLOCK_SETEXT_1); } + yymsp[0].minor.yy0 = yylhsminor.yy0; + break; + case 25: /* block ::= setext_2 */ +{ yylhsminor.yy0 = token_new_parent(yymsp[0].minor.yy0, BLOCK_SETEXT_2); } + yymsp[0].minor.yy0 = yylhsminor.yy0; + break; + case 26: /* block ::= table */ { yylhsminor.yy0 = token_new_parent(yymsp[0].minor.yy0, BLOCK_TABLE); } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 25: /* chunk ::= chunk chunk_line */ - case 26: /* nested_chunks ::= nested_chunks nested_chunk */ yytestcase(yyruleno==26); - case 29: /* ext_chunk ::= chunk nested_chunks */ yytestcase(yyruleno==29); - case 30: /* opt_ext_chunk ::= chunk nested_chunks */ yytestcase(yyruleno==30); - case 31: /* blockquote ::= blockquote quote_line */ yytestcase(yyruleno==31); - case 32: /* def_citation ::= LINE_DEF_CITATION tail */ yytestcase(yyruleno==32); - case 33: /* def_footnote ::= LINE_DEF_FOOTNOTE tail */ yytestcase(yyruleno==33); - 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 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); + case 27: /* chunk ::= chunk chunk_line */ + case 28: /* nested_chunks ::= nested_chunks nested_chunk */ yytestcase(yyruleno==28); + case 31: /* ext_chunk ::= chunk nested_chunks */ yytestcase(yyruleno==31); + case 32: /* opt_ext_chunk ::= chunk nested_chunks */ yytestcase(yyruleno==32); + case 33: /* blockquote ::= blockquote quote_line */ yytestcase(yyruleno==33); + case 34: /* def_citation ::= LINE_DEF_CITATION tail */ yytestcase(yyruleno==34); + case 35: /* def_footnote ::= LINE_DEF_FOOTNOTE tail */ yytestcase(yyruleno==35); + case 36: /* def_link ::= LINE_DEF_LINK chunk */ yytestcase(yyruleno==36); + case 38: /* defs ::= defs def */ yytestcase(yyruleno==38); + case 41: /* empty ::= empty LINE_EMPTY */ yytestcase(yyruleno==41); + case 45: /* fenced_3 ::= fenced_3 fenced_line */ yytestcase(yyruleno==45); + case 48: /* fenced_4 ::= fenced_4 fenced_line */ yytestcase(yyruleno==48); + case 49: /* fenced_4 ::= fenced_4 LINE_FENCE_BACKTICK_3 */ yytestcase(yyruleno==49); + case 50: /* fenced_4 ::= fenced_4 LINE_FENCE_BACKTICK_START_3 */ yytestcase(yyruleno==50); + case 52: /* fenced_5 ::= fenced_5 fenced_line */ yytestcase(yyruleno==52); + case 53: /* fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_3 */ yytestcase(yyruleno==53); + case 54: /* fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_START_3 */ yytestcase(yyruleno==54); + case 55: /* fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_4 */ yytestcase(yyruleno==55); + case 56: /* fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_START_4 */ yytestcase(yyruleno==56); + case 57: /* html_block ::= html_block html_line */ yytestcase(yyruleno==57); + case 58: /* indented_code ::= indented_code indented_line */ yytestcase(yyruleno==58); + case 59: /* indented_code ::= indented_code LINE_EMPTY */ yytestcase(yyruleno==59); + case 60: /* list_bullet ::= list_bullet item_bullet */ yytestcase(yyruleno==60); + case 65: /* list_enum ::= list_enum item_enum */ yytestcase(yyruleno==65); + case 70: /* meta_block ::= meta_block meta_line */ yytestcase(yyruleno==70); + case 71: /* para ::= LINE_PLAIN chunk */ yytestcase(yyruleno==71); + case 72: /* setext_1 ::= para LINE_SETEXT_1 */ yytestcase(yyruleno==72); + case 73: /* setext_2 ::= para LINE_SETEXT_2 */ yytestcase(yyruleno==73); + case 74: /* table ::= table_header table_body */ yytestcase(yyruleno==74); + case 76: /* header_rows ::= header_rows LINE_TABLE */ yytestcase(yyruleno==76); + case 77: /* table_body ::= table_body table_section */ yytestcase(yyruleno==77); + case 80: /* all_rows ::= all_rows row */ yytestcase(yyruleno==80); { yylhsminor.yy0 = yymsp[-1].minor.yy0; token_chain_append(yymsp[-1].minor.yy0, yymsp[0].minor.yy0); } yymsp[-1].minor.yy0 = yylhsminor.yy0; break; - case 27: /* nested_chunk ::= empty indented_line chunk */ + case 29: /* nested_chunk ::= empty indented_line chunk */ { yylhsminor.yy0 = yymsp[-2].minor.yy0; token_chain_append(yymsp[-2].minor.yy0, yymsp[-1].minor.yy0); token_chain_append(yymsp[-2].minor.yy0, yymsp[0].minor.yy0); yymsp[-1].minor.yy0->type = LINE_CONTINUATION; } yymsp[-2].minor.yy0 = yylhsminor.yy0; break; - case 28: /* nested_chunk ::= empty indented_line */ + case 30: /* nested_chunk ::= empty indented_line */ { yylhsminor.yy0 = yymsp[-1].minor.yy0; token_chain_append(yymsp[-1].minor.yy0, yymsp[0].minor.yy0); yymsp[0].minor.yy0->type = LINE_CONTINUATION; } yymsp[-1].minor.yy0 = yylhsminor.yy0; break; - case 35: /* definition_block ::= para defs */ + case 37: /* definition_block ::= para defs */ { yylhsminor.yy0 = yymsp[-1].minor.yy0; token_chain_append(yymsp[-1].minor.yy0, yymsp[0].minor.yy0); yymsp[-1].minor.yy0->type = BLOCK_TERM; } yymsp[-1].minor.yy0 = yylhsminor.yy0; break; - case 37: /* def ::= LINE_DEFINITION tail */ + case 39: /* def ::= LINE_DEFINITION tail */ { yylhsminor.yy0 = token_new_parent(yymsp[-1].minor.yy0, BLOCK_DEFINITION); token_chain_append(yymsp[-1].minor.yy0, yymsp[0].minor.yy0); recursive_parse_indent(engine, yylhsminor.yy0); } yymsp[-1].minor.yy0 = yylhsminor.yy0; break; - case 38: /* def ::= LINE_DEFINITION */ + case 40: /* def ::= LINE_DEFINITION */ { yylhsminor.yy0 = token_new_parent(yymsp[0].minor.yy0, BLOCK_DEFINITION); } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - 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); + case 42: /* fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_3 */ + case 43: /* fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_4 */ yytestcase(yyruleno==43); + case 44: /* fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_5 */ yytestcase(yyruleno==44); + case 46: /* fenced_block ::= fenced_4 LINE_FENCE_BACKTICK_4 */ yytestcase(yyruleno==46); + case 47: /* fenced_block ::= fenced_4 LINE_FENCE_BACKTICK_5 */ yytestcase(yyruleno==47); + case 51: /* fenced_block ::= fenced_5 LINE_FENCE_BACKTICK_5 */ yytestcase(yyruleno==51); { 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 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); + case 61: /* item_bullet ::= LINE_LIST_BULLETED ext_chunk */ + case 63: /* item_bullet ::= LINE_LIST_BULLETED nested_chunks */ yytestcase(yyruleno==63); + case 66: /* item_enum ::= LINE_LIST_ENUMERATED ext_chunk */ yytestcase(yyruleno==66); + case 68: /* item_enum ::= LINE_LIST_ENUMERATED nested_chunks */ yytestcase(yyruleno==68); { 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 60: /* item_bullet ::= LINE_LIST_BULLETED chunk */ - case 65: /* item_enum ::= LINE_LIST_ENUMERATED chunk */ yytestcase(yyruleno==65); + case 62: /* item_bullet ::= LINE_LIST_BULLETED chunk */ + case 67: /* item_enum ::= LINE_LIST_ENUMERATED chunk */ yytestcase(yyruleno==67); { 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 62: /* item_bullet ::= LINE_LIST_BULLETED */ - case 67: /* item_enum ::= LINE_LIST_ENUMERATED */ yytestcase(yyruleno==67); + case 64: /* item_bullet ::= LINE_LIST_BULLETED */ + case 69: /* item_enum ::= LINE_LIST_ENUMERATED */ yytestcase(yyruleno==69); { yylhsminor.yy0 = token_new_parent(yymsp[0].minor.yy0, BLOCK_LIST_ITEM_TIGHT); } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 71: /* table_header ::= header_rows LINE_TABLE_SEPARATOR */ + case 75: /* 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 74: /* table_section ::= all_rows LINE_EMPTY */ + case 78: /* 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 75: /* table_section ::= all_rows */ + case 79: /* table_section ::= all_rows */ { yylhsminor.yy0 = token_new_parent(yymsp[0].minor.yy0, BLOCK_TABLE_SECTION); } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 77: /* para ::= all_rows */ + case 81: /* para ::= all_rows */ { yylhsminor.yy0 = yymsp[0].minor.yy0; } yymsp[0].minor.yy0 = yylhsminor.yy0; break; default: - /* (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); + /* (82) chunk ::= chunk_line (OPTIMIZED OUT) */ assert(yyruleno!=82); + /* (83) chunk_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==83); + /* (84) nested_chunks ::= nested_chunk (OPTIMIZED OUT) */ assert(yyruleno!=84); + /* (85) nested_chunk ::= empty */ yytestcase(yyruleno==85); + /* (86) indented_line ::= LINE_INDENTED_TAB */ yytestcase(yyruleno==86); + /* (87) indented_line ::= LINE_INDENTED_SPACE */ yytestcase(yyruleno==87); + /* (88) opt_ext_chunk ::= chunk */ yytestcase(yyruleno==88); + /* (89) tail ::= opt_ext_chunk (OPTIMIZED OUT) */ assert(yyruleno!=89); + /* (90) tail ::= nested_chunks */ yytestcase(yyruleno==90); + /* (91) blockquote ::= LINE_BLOCKQUOTE */ yytestcase(yyruleno==91); + /* (92) quote_line ::= LINE_BLOCKQUOTE */ yytestcase(yyruleno==92); + /* (93) quote_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==93); + /* (94) def_citation ::= LINE_DEF_CITATION */ yytestcase(yyruleno==94); + /* (95) def_footnote ::= LINE_DEF_FOOTNOTE */ yytestcase(yyruleno==95); + /* (96) def_link ::= LINE_DEF_LINK */ yytestcase(yyruleno==96); + /* (97) defs ::= def (OPTIMIZED OUT) */ assert(yyruleno!=97); + /* (98) empty ::= LINE_EMPTY */ yytestcase(yyruleno==98); + /* (99) fenced_block ::= fenced_3 */ yytestcase(yyruleno==99); + /* (100) fenced_3 ::= LINE_FENCE_BACKTICK_3 */ yytestcase(yyruleno==100); + /* (101) fenced_3 ::= LINE_FENCE_BACKTICK_START_3 */ yytestcase(yyruleno==101); + /* (102) fenced_block ::= fenced_4 */ yytestcase(yyruleno==102); + /* (103) fenced_4 ::= LINE_FENCE_BACKTICK_4 */ yytestcase(yyruleno==103); + /* (104) fenced_4 ::= LINE_FENCE_BACKTICK_START_4 */ yytestcase(yyruleno==104); + /* (105) fenced_block ::= fenced_5 */ yytestcase(yyruleno==105); + /* (106) fenced_5 ::= LINE_FENCE_BACKTICK_5 */ yytestcase(yyruleno==106); + /* (107) fenced_5 ::= LINE_FENCE_BACKTICK_START_5 */ yytestcase(yyruleno==107); + /* (108) fenced_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==108); + /* (109) fenced_line ::= LINE_EMPTY */ yytestcase(yyruleno==109); + /* (110) fenced_line ::= LINE_SETEXT_1 */ yytestcase(yyruleno==110); + /* (111) fenced_line ::= LINE_SETEXT_2 */ yytestcase(yyruleno==111); + /* (112) html_block ::= LINE_HTML */ yytestcase(yyruleno==112); + /* (113) html_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==113); + /* (114) html_line ::= LINE_HTML */ yytestcase(yyruleno==114); + /* (115) indented_code ::= indented_line (OPTIMIZED OUT) */ assert(yyruleno!=115); + /* (116) list_bullet ::= item_bullet (OPTIMIZED OUT) */ assert(yyruleno!=116); + /* (117) list_enum ::= item_enum (OPTIMIZED OUT) */ assert(yyruleno!=117); + /* (118) meta_block ::= LINE_META */ yytestcase(yyruleno==118); + /* (119) meta_line ::= LINE_META */ yytestcase(yyruleno==119); + /* (120) meta_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==120); + /* (121) para ::= LINE_PLAIN */ yytestcase(yyruleno==121); + /* (122) table ::= table_header */ yytestcase(yyruleno==122); + /* (123) header_rows ::= LINE_TABLE */ yytestcase(yyruleno==123); + /* (124) table_body ::= table_section (OPTIMIZED OUT) */ assert(yyruleno!=124); + /* (125) all_rows ::= row (OPTIMIZED OUT) */ assert(yyruleno!=125); + /* (126) row ::= header_rows */ yytestcase(yyruleno==126); + /* (127) row ::= LINE_TABLE_SEPARATOR */ yytestcase(yyruleno==127); + /* (128) para ::= defs */ yytestcase(yyruleno==128); break; /********** End reduce actions ************************************************/ }; diff --git a/src/parser.h b/src/parser.h index a779d8f..3d6d5e0 100644 --- a/src/parser.h +++ b/src/parser.h @@ -1,32 +1,34 @@ -#define LINE_PLAIN 1 -#define LINE_TABLE_SEPARATOR 2 -#define LINE_CONTINUATION 3 -#define LINE_INDENTED_TAB 4 -#define LINE_INDENTED_SPACE 5 -#define LINE_TABLE 6 -#define LINE_HTML 7 -#define LINE_ATX_1 8 -#define LINE_ATX_2 9 -#define LINE_ATX_3 10 -#define LINE_ATX_4 11 -#define LINE_ATX_5 12 -#define LINE_ATX_6 13 -#define LINE_HR 14 -#define LINE_BLOCKQUOTE 15 -#define LINE_LIST_BULLETED 16 -#define LINE_LIST_ENUMERATED 17 -#define LINE_DEF_CITATION 18 -#define LINE_DEF_FOOTNOTE 19 -#define LINE_DEF_LINK 20 -#define LINE_FENCE_BACKTICK 21 -#define LINE_FENCE_BACKTICK_START 22 -#define LINE_TOC 23 -#define LINE_DEFINITION 24 -#define LINE_EMPTY 25 -#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 +#define LINE_HR 1 +#define LINE_SETEXT_1 2 +#define LINE_SETEXT_2 3 +#define LINE_PLAIN 4 +#define LINE_TABLE_SEPARATOR 5 +#define LINE_CONTINUATION 6 +#define LINE_INDENTED_TAB 7 +#define LINE_INDENTED_SPACE 8 +#define LINE_TABLE 9 +#define LINE_HTML 10 +#define LINE_ATX_1 11 +#define LINE_ATX_2 12 +#define LINE_ATX_3 13 +#define LINE_ATX_4 14 +#define LINE_ATX_5 15 +#define LINE_ATX_6 16 +#define LINE_BLOCKQUOTE 17 +#define LINE_LIST_BULLETED 18 +#define LINE_LIST_ENUMERATED 19 +#define LINE_DEF_CITATION 20 +#define LINE_DEF_FOOTNOTE 21 +#define LINE_DEF_LINK 22 +#define LINE_FENCE_BACKTICK 23 +#define LINE_FENCE_BACKTICK_START 24 +#define LINE_TOC 25 +#define LINE_DEFINITION 26 +#define LINE_EMPTY 27 +#define LINE_FENCE_BACKTICK_3 28 +#define LINE_FENCE_BACKTICK_4 29 +#define LINE_FENCE_BACKTICK_5 30 +#define LINE_FENCE_BACKTICK_START_3 31 +#define LINE_FENCE_BACKTICK_START_4 32 +#define LINE_FENCE_BACKTICK_START_5 33 +#define LINE_META 34 diff --git a/src/parser.out b/src/parser.out index 91a32b3..23e970c 100644 --- a/src/parser.out +++ b/src/parser.out @@ -23,6 +23,8 @@ State 0: block ::= * list_enum block ::= * meta_block block ::= * para + block ::= * setext_1 + block ::= * setext_2 block ::= * table indented_line ::= * LINE_INDENTED_TAB indented_line ::= * LINE_INDENTED_SPACE @@ -86,6 +88,8 @@ State 0: meta_block ::= * LINE_META para ::= * LINE_PLAIN chunk para ::= * LINE_PLAIN + setext_1 ::= * para LINE_SETEXT_1 + setext_2 ::= * para LINE_SETEXT_2 table ::= * table_header table_body table ::= * table_header table_header ::= * header_rows LINE_TABLE_SEPARATOR @@ -98,35 +102,35 @@ State 0: para ::= * all_rows para ::= * defs - LINE_PLAIN shift 14 - 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_HR shift-reduce 9 block ::= LINE_HR + LINE_PLAIN shift 15 + LINE_TABLE_SEPARATOR shift-reduce 127 row ::= LINE_TABLE_SEPARATOR + LINE_INDENTED_TAB shift-reduce 86 indented_line ::= LINE_INDENTED_TAB + LINE_INDENTED_SPACE shift-reduce 87 indented_line ::= LINE_INDENTED_SPACE + LINE_TABLE shift-reduce 123 header_rows ::= LINE_TABLE + LINE_HTML shift-reduce 112 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 LINE_ATX_4 shift-reduce 6 block ::= LINE_ATX_4 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 87 blockquote ::= LINE_BLOCKQUOTE + LINE_BLOCKQUOTE shift-reduce 91 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_DEF_LINK shift 16 LINE_TOC shift-reduce 10 block ::= LINE_TOC LINE_DEFINITION shift 4 - 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 + LINE_EMPTY shift-reduce 98 empty ::= LINE_EMPTY + LINE_FENCE_BACKTICK_3 shift-reduce 100 fenced_3 ::= LINE_FENCE_BACKTICK_3 + LINE_FENCE_BACKTICK_4 shift-reduce 103 fenced_4 ::= LINE_FENCE_BACKTICK_4 + LINE_FENCE_BACKTICK_5 shift-reduce 106 fenced_5 ::= LINE_FENCE_BACKTICK_5 + LINE_FENCE_BACKTICK_START_3 shift-reduce 101 fenced_3 ::= LINE_FENCE_BACKTICK_START_3 + LINE_FENCE_BACKTICK_START_4 shift-reduce 104 fenced_4 ::= LINE_FENCE_BACKTICK_START_4 + LINE_FENCE_BACKTICK_START_5 shift-reduce 107 fenced_5 ::= LINE_FENCE_BACKTICK_START_5 + LINE_META shift-reduce 118 meta_block ::= LINE_META doc accept blocks shift 1 block shift-reduce 2 blocks ::= block @@ -142,8 +146,10 @@ State 0: list_bullet shift 37 list_enum shift 35 meta_block shift 28 - para shift 18 - table shift-reduce 24 block ::= table + para shift 13 + setext_1 shift-reduce 24 block ::= setext_1 + setext_2 shift-reduce 25 block ::= setext_2 + table shift-reduce 26 block ::= table indented_line shift 27 /* because indented_line==indented_code */ defs shift 32 def shift 32 /* because def==defs */ @@ -154,8 +160,8 @@ State 0: item_enum shift 35 /* because item_enum==list_enum */ table_header shift 7 header_rows shift 38 - all_rows shift 13 - row shift 13 /* because row==all_rows */ + all_rows shift 14 + row shift 14 /* because row==all_rows */ State 1: (0) doc ::= blocks * @@ -181,6 +187,8 @@ State 1: block ::= * list_enum block ::= * meta_block block ::= * para + block ::= * setext_1 + block ::= * setext_2 block ::= * table indented_line ::= * LINE_INDENTED_TAB indented_line ::= * LINE_INDENTED_SPACE @@ -244,6 +252,8 @@ State 1: meta_block ::= * LINE_META para ::= * LINE_PLAIN chunk para ::= * LINE_PLAIN + setext_1 ::= * para LINE_SETEXT_1 + setext_2 ::= * para LINE_SETEXT_2 table ::= * table_header table_body table ::= * table_header table_header ::= * header_rows LINE_TABLE_SEPARATOR @@ -257,35 +267,35 @@ State 1: para ::= * defs $ reduce 0 doc ::= blocks - LINE_PLAIN shift 14 - 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_HR shift-reduce 9 block ::= LINE_HR + LINE_PLAIN shift 15 + LINE_TABLE_SEPARATOR shift-reduce 127 row ::= LINE_TABLE_SEPARATOR + LINE_INDENTED_TAB shift-reduce 86 indented_line ::= LINE_INDENTED_TAB + LINE_INDENTED_SPACE shift-reduce 87 indented_line ::= LINE_INDENTED_SPACE + LINE_TABLE shift-reduce 123 header_rows ::= LINE_TABLE + LINE_HTML shift-reduce 112 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 LINE_ATX_4 shift-reduce 6 block ::= LINE_ATX_4 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 87 blockquote ::= LINE_BLOCKQUOTE + LINE_BLOCKQUOTE shift-reduce 91 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_DEF_LINK shift 16 LINE_TOC shift-reduce 10 block ::= LINE_TOC LINE_DEFINITION shift 4 - 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 + LINE_EMPTY shift-reduce 98 empty ::= LINE_EMPTY + LINE_FENCE_BACKTICK_3 shift-reduce 100 fenced_3 ::= LINE_FENCE_BACKTICK_3 + LINE_FENCE_BACKTICK_4 shift-reduce 103 fenced_4 ::= LINE_FENCE_BACKTICK_4 + LINE_FENCE_BACKTICK_5 shift-reduce 106 fenced_5 ::= LINE_FENCE_BACKTICK_5 + LINE_FENCE_BACKTICK_START_3 shift-reduce 101 fenced_3 ::= LINE_FENCE_BACKTICK_START_3 + LINE_FENCE_BACKTICK_START_4 shift-reduce 104 fenced_4 ::= LINE_FENCE_BACKTICK_START_4 + LINE_FENCE_BACKTICK_START_5 shift-reduce 107 fenced_5 ::= LINE_FENCE_BACKTICK_START_5 + LINE_META shift-reduce 118 meta_block ::= LINE_META block shift-reduce 1 blocks ::= blocks block blockquote shift 30 def_citation shift-reduce 12 block ::= def_citation @@ -299,8 +309,10 @@ State 1: list_bullet shift 37 list_enum shift 35 meta_block shift 28 - para shift 18 - table shift-reduce 24 block ::= table + para shift 13 + setext_1 shift-reduce 24 block ::= setext_1 + setext_2 shift-reduce 25 block ::= setext_2 + table shift-reduce 26 block ::= table indented_line shift 27 /* because indented_line==indented_code */ defs shift 32 def shift 32 /* because def==defs */ @@ -311,8 +323,8 @@ State 1: item_enum shift 35 /* because item_enum==list_enum */ table_header shift 7 header_rows shift 38 - all_rows shift 13 - row shift 13 /* because row==all_rows */ + all_rows shift 14 + row shift 14 /* because row==all_rows */ State 2: chunk ::= * chunk chunk_line @@ -328,21 +340,21 @@ State 2: tail ::= * opt_ext_chunk tail ::= * nested_chunks def_footnote ::= LINE_DEF_FOOTNOTE * tail - (91) def_footnote ::= LINE_DEF_FOOTNOTE * + (95) def_footnote ::= LINE_DEF_FOOTNOTE * empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION - LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY - LINE_EMPTY reduce 91 ** Parsing conflict ** + LINE_CONTINUATION shift-reduce 83 chunk_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 98 empty ::= LINE_EMPTY + LINE_EMPTY reduce 95 ** 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 91 def_footnote ::= LINE_DEF_FOOTNOTE + nested_chunks shift 17 + nested_chunk shift 17 /* because nested_chunk==nested_chunks */ + opt_ext_chunk shift-reduce 35 def_footnote ::= LINE_DEF_FOOTNOTE tail /* because opt_ext_chunk==tail */ + tail shift-reduce 35 def_footnote ::= LINE_DEF_FOOTNOTE tail + {default} reduce 95 def_footnote ::= LINE_DEF_FOOTNOTE State 3: chunk ::= * chunk chunk_line @@ -358,21 +370,21 @@ State 3: tail ::= * opt_ext_chunk tail ::= * nested_chunks def_citation ::= LINE_DEF_CITATION * tail - (90) def_citation ::= LINE_DEF_CITATION * + (94) def_citation ::= LINE_DEF_CITATION * empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION - LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY - LINE_EMPTY reduce 90 ** Parsing conflict ** + LINE_CONTINUATION shift-reduce 83 chunk_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 98 empty ::= LINE_EMPTY + LINE_EMPTY reduce 94 ** 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 90 def_citation ::= LINE_DEF_CITATION + nested_chunks shift 17 + nested_chunk shift 17 /* because nested_chunk==nested_chunks */ + opt_ext_chunk shift-reduce 34 def_citation ::= LINE_DEF_CITATION tail /* because opt_ext_chunk==tail */ + tail shift-reduce 34 def_citation ::= LINE_DEF_CITATION tail + {default} reduce 94 def_citation ::= LINE_DEF_CITATION State 4: chunk ::= * chunk chunk_line @@ -388,21 +400,21 @@ State 4: tail ::= * opt_ext_chunk tail ::= * nested_chunks def ::= LINE_DEFINITION * tail - (38) def ::= LINE_DEFINITION * + (40) def ::= LINE_DEFINITION * empty ::= * empty LINE_EMPTY 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 ** + LINE_CONTINUATION shift-reduce 83 chunk_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 98 empty ::= LINE_EMPTY + LINE_EMPTY reduce 40 ** 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 37 def ::= LINE_DEFINITION tail /* because opt_ext_chunk==tail */ - tail shift-reduce 37 def ::= LINE_DEFINITION tail - {default} reduce 38 def ::= LINE_DEFINITION + nested_chunks shift 17 + nested_chunk shift 17 /* because nested_chunk==nested_chunks */ + opt_ext_chunk shift-reduce 39 def ::= LINE_DEFINITION tail /* because opt_ext_chunk==tail */ + tail shift-reduce 39 def ::= LINE_DEFINITION tail + {default} reduce 40 def ::= LINE_DEFINITION State 5: chunk ::= * chunk chunk_line @@ -419,18 +431,18 @@ State 5: item_enum ::= LINE_LIST_ENUMERATED * ext_chunk item_enum ::= LINE_LIST_ENUMERATED * chunk item_enum ::= LINE_LIST_ENUMERATED * nested_chunks - (67) item_enum ::= LINE_LIST_ENUMERATED * + (69) item_enum ::= LINE_LIST_ENUMERATED * - LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION - LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY - LINE_EMPTY reduce 67 ** Parsing conflict ** + LINE_CONTINUATION shift-reduce 83 chunk_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 98 empty ::= LINE_EMPTY + LINE_EMPTY reduce 69 ** 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 64 item_enum ::= LINE_LIST_ENUMERATED ext_chunk - {default} reduce 67 item_enum ::= LINE_LIST_ENUMERATED + ext_chunk shift-reduce 66 item_enum ::= LINE_LIST_ENUMERATED ext_chunk + {default} reduce 69 item_enum ::= LINE_LIST_ENUMERATED State 6: chunk ::= * chunk chunk_line @@ -447,22 +459,22 @@ State 6: item_bullet ::= LINE_LIST_BULLETED * ext_chunk item_bullet ::= LINE_LIST_BULLETED * chunk item_bullet ::= LINE_LIST_BULLETED * nested_chunks - (62) item_bullet ::= LINE_LIST_BULLETED * + (64) item_bullet ::= LINE_LIST_BULLETED * - LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION - LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY - LINE_EMPTY reduce 62 ** Parsing conflict ** + LINE_CONTINUATION shift-reduce 83 chunk_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 98 empty ::= LINE_EMPTY + LINE_EMPTY reduce 64 ** 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 59 item_bullet ::= LINE_LIST_BULLETED ext_chunk - {default} reduce 62 item_bullet ::= LINE_LIST_BULLETED + ext_chunk shift-reduce 61 item_bullet ::= LINE_LIST_BULLETED ext_chunk + {default} reduce 64 item_bullet ::= LINE_LIST_BULLETED State 7: table ::= table_header * table_body - (116) table ::= table_header * + (122) table ::= table_header * header_rows ::= * header_rows LINE_TABLE header_rows ::= * LINE_TABLE table_body ::= * table_body table_section @@ -474,19 +486,19 @@ State 7: row ::= * header_rows row ::= * LINE_TABLE_SEPARATOR - 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 ** + LINE_TABLE_SEPARATOR shift-reduce 127 row ::= LINE_TABLE_SEPARATOR + LINE_TABLE_SEPARATOR reduce 122 ** Parsing conflict ** + LINE_TABLE shift-reduce 123 header_rows ::= LINE_TABLE + LINE_TABLE reduce 122 ** Parsing conflict ** table_body shift 8 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 116 table ::= table_header + {default} reduce 122 table ::= table_header State 8: - (70) table ::= table_header table_body * + (74) table ::= table_header table_body * header_rows ::= * header_rows LINE_TABLE header_rows ::= * LINE_TABLE table_body ::= table_body * table_section @@ -497,15 +509,15 @@ State 8: row ::= * header_rows row ::= * LINE_TABLE_SEPARATOR - 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 ** + LINE_TABLE_SEPARATOR shift-reduce 127 row ::= LINE_TABLE_SEPARATOR + LINE_TABLE_SEPARATOR reduce 74 ** Parsing conflict ** + LINE_TABLE shift-reduce 123 header_rows ::= LINE_TABLE + LINE_TABLE reduce 74 ** Parsing conflict ** header_rows shift 39 - table_section shift-reduce 73 table_body ::= table_body table_section + table_section shift-reduce 77 table_body ::= table_body table_section all_rows shift 12 row shift 12 /* because row==all_rows */ - {default} reduce 70 table ::= table_header table_body + {default} reduce 74 table ::= table_header table_body State 9: chunk ::= chunk * chunk_line @@ -516,18 +528,18 @@ State 9: nested_chunk ::= * empty indented_line nested_chunk ::= * empty opt_ext_chunk ::= chunk * nested_chunks - (84) opt_ext_chunk ::= chunk * + (88) opt_ext_chunk ::= chunk * empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION - LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY - LINE_EMPTY reduce 84 ** Parsing conflict ** + LINE_CONTINUATION shift-reduce 83 chunk_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 98 empty ::= LINE_EMPTY + LINE_EMPTY reduce 88 ** 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 84 opt_ext_chunk ::= chunk + chunk_line shift-reduce 27 chunk ::= chunk chunk_line + nested_chunks shift 18 + nested_chunk shift 18 /* because nested_chunk==nested_chunks */ + {default} reduce 88 opt_ext_chunk ::= chunk State 10: chunk ::= chunk * chunk_line @@ -540,16 +552,16 @@ State 10: ext_chunk ::= chunk * nested_chunks empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - (65) item_enum ::= LINE_LIST_ENUMERATED chunk * + (67) item_enum ::= LINE_LIST_ENUMERATED chunk * - LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION - LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY - LINE_EMPTY reduce 65 ** Parsing conflict ** + LINE_CONTINUATION shift-reduce 83 chunk_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 98 empty ::= LINE_EMPTY + LINE_EMPTY reduce 67 ** Parsing conflict ** empty shift 26 - chunk_line shift-reduce 25 chunk ::= chunk chunk_line + chunk_line shift-reduce 27 chunk ::= chunk chunk_line nested_chunks shift 22 nested_chunk shift 22 /* because nested_chunk==nested_chunks */ - {default} reduce 65 item_enum ::= LINE_LIST_ENUMERATED chunk + {default} reduce 67 item_enum ::= LINE_LIST_ENUMERATED chunk State 11: chunk ::= chunk * chunk_line @@ -562,119 +574,123 @@ State 11: ext_chunk ::= chunk * nested_chunks empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - (60) item_bullet ::= LINE_LIST_BULLETED chunk * + (62) item_bullet ::= LINE_LIST_BULLETED chunk * - LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION - LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY - LINE_EMPTY reduce 60 ** Parsing conflict ** + LINE_CONTINUATION shift-reduce 83 chunk_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 98 empty ::= LINE_EMPTY + LINE_EMPTY reduce 62 ** Parsing conflict ** empty shift 26 - chunk_line shift-reduce 25 chunk ::= chunk chunk_line + chunk_line shift-reduce 27 chunk ::= chunk chunk_line nested_chunks shift 22 nested_chunk shift 22 /* because nested_chunk==nested_chunks */ - {default} reduce 60 item_bullet ::= LINE_LIST_BULLETED chunk + {default} reduce 62 item_bullet ::= LINE_LIST_BULLETED chunk State 12: header_rows ::= * header_rows LINE_TABLE header_rows ::= * LINE_TABLE table_section ::= all_rows * LINE_EMPTY - (75) table_section ::= all_rows * + (79) table_section ::= all_rows * all_rows ::= all_rows * row row ::= * header_rows row ::= * LINE_TABLE_SEPARATOR - 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 ** + LINE_TABLE_SEPARATOR shift-reduce 127 row ::= LINE_TABLE_SEPARATOR + LINE_TABLE_SEPARATOR reduce 79 ** Parsing conflict ** + LINE_TABLE shift-reduce 123 header_rows ::= LINE_TABLE + LINE_TABLE reduce 79 ** Parsing conflict ** + LINE_EMPTY shift-reduce 78 table_section ::= all_rows LINE_EMPTY + LINE_EMPTY reduce 79 ** Parsing conflict ** header_rows shift 39 - row shift-reduce 76 all_rows ::= all_rows row - {default} reduce 75 table_section ::= all_rows + row shift-reduce 80 all_rows ::= all_rows row + {default} reduce 79 table_section ::= all_rows State 13: + (23) block ::= para * + definition_block ::= para * defs + defs ::= * defs def + defs ::= * def + def ::= * LINE_DEFINITION tail + def ::= * LINE_DEFINITION + setext_1 ::= para * LINE_SETEXT_1 + setext_2 ::= para * LINE_SETEXT_2 + + LINE_SETEXT_1 shift-reduce 72 setext_1 ::= para LINE_SETEXT_1 + LINE_SETEXT_2 shift-reduce 73 setext_2 ::= para LINE_SETEXT_2 + LINE_DEFINITION shift 4 + LINE_DEFINITION reduce 23 ** Parsing conflict ** + defs shift 34 + def shift 34 /* because def==defs */ + {default} reduce 23 block ::= para + +State 14: header_rows ::= * header_rows LINE_TABLE header_rows ::= * LINE_TABLE all_rows ::= all_rows * row row ::= * header_rows row ::= * LINE_TABLE_SEPARATOR - (77) para ::= all_rows * + (81) 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 ** + LINE_TABLE_SEPARATOR shift-reduce 127 row ::= LINE_TABLE_SEPARATOR + LINE_TABLE_SEPARATOR reduce 81 ** Parsing conflict ** + LINE_TABLE shift-reduce 123 header_rows ::= LINE_TABLE + LINE_TABLE reduce 81 ** Parsing conflict ** header_rows shift 39 - row shift-reduce 76 all_rows ::= all_rows row - {default} reduce 77 para ::= all_rows + row shift-reduce 80 all_rows ::= all_rows row + {default} reduce 81 para ::= all_rows -State 14: +State 15: chunk ::= * chunk chunk_line chunk ::= * chunk_line chunk_line ::= * LINE_CONTINUATION para ::= LINE_PLAIN * chunk - (115) para ::= LINE_PLAIN * + (121) para ::= LINE_PLAIN * - LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION + LINE_CONTINUATION shift-reduce 83 chunk_line ::= LINE_CONTINUATION chunk shift 31 chunk_line shift 31 /* because chunk_line==chunk */ - {default} reduce 115 para ::= LINE_PLAIN + {default} reduce 121 para ::= LINE_PLAIN -State 15: +State 16: chunk ::= * chunk chunk_line chunk ::= * chunk_line chunk_line ::= * LINE_CONTINUATION def_link ::= LINE_DEF_LINK * chunk - (92) def_link ::= LINE_DEF_LINK * + (96) def_link ::= LINE_DEF_LINK * - LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION + LINE_CONTINUATION shift-reduce 83 chunk_line ::= LINE_CONTINUATION chunk shift 33 chunk_line shift 33 /* because chunk_line==chunk */ - {default} reduce 92 def_link ::= LINE_DEF_LINK + {default} reduce 96 def_link ::= LINE_DEF_LINK -State 16: +State 17: nested_chunks ::= nested_chunks * nested_chunk nested_chunk ::= * empty indented_line chunk nested_chunk ::= * empty indented_line nested_chunk ::= * empty - (86) tail ::= nested_chunks * + (90) tail ::= nested_chunks * empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY - LINE_EMPTY reduce 86 ** Parsing conflict ** + LINE_EMPTY shift-reduce 98 empty ::= LINE_EMPTY + LINE_EMPTY reduce 90 ** Parsing conflict ** empty shift 26 - nested_chunk shift-reduce 26 nested_chunks ::= nested_chunks nested_chunk - {default} reduce 86 tail ::= nested_chunks + nested_chunk shift-reduce 28 nested_chunks ::= nested_chunks nested_chunk + {default} reduce 90 tail ::= nested_chunks -State 17: +State 18: nested_chunks ::= nested_chunks * nested_chunk nested_chunk ::= * empty indented_line chunk nested_chunk ::= * empty indented_line nested_chunk ::= * empty - (30) opt_ext_chunk ::= chunk nested_chunks * + (32) opt_ext_chunk ::= chunk nested_chunks * empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY - LINE_EMPTY reduce 30 ** Parsing conflict ** + LINE_EMPTY shift-reduce 98 empty ::= LINE_EMPTY + LINE_EMPTY reduce 32 ** Parsing conflict ** empty shift 26 - nested_chunk shift-reduce 26 nested_chunks ::= nested_chunks nested_chunk - {default} reduce 30 opt_ext_chunk ::= chunk nested_chunks - -State 18: - (23) block ::= para * - definition_block ::= para * defs - defs ::= * defs def - defs ::= * def - def ::= * LINE_DEFINITION tail - def ::= * LINE_DEFINITION - - LINE_DEFINITION shift 4 - LINE_DEFINITION reduce 23 ** Parsing conflict ** - defs shift 34 - def shift 34 /* because def==defs */ - {default} reduce 23 block ::= para + nested_chunk shift-reduce 28 nested_chunks ::= nested_chunks nested_chunk + {default} reduce 32 opt_ext_chunk ::= chunk nested_chunks State 19: nested_chunks ::= nested_chunks * nested_chunk @@ -683,13 +699,13 @@ State 19: nested_chunk ::= * empty empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - (66) item_enum ::= LINE_LIST_ENUMERATED nested_chunks * + (68) item_enum ::= LINE_LIST_ENUMERATED nested_chunks * - LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY - LINE_EMPTY reduce 66 ** Parsing conflict ** + LINE_EMPTY shift-reduce 98 empty ::= LINE_EMPTY + LINE_EMPTY reduce 68 ** Parsing conflict ** empty shift 26 - nested_chunk shift-reduce 26 nested_chunks ::= nested_chunks nested_chunk - {default} reduce 66 item_enum ::= LINE_LIST_ENUMERATED nested_chunks + nested_chunk shift-reduce 28 nested_chunks ::= nested_chunks nested_chunk + {default} reduce 68 item_enum ::= LINE_LIST_ENUMERATED nested_chunks State 20: nested_chunks ::= nested_chunks * nested_chunk @@ -698,44 +714,44 @@ State 20: nested_chunk ::= * empty empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - (61) item_bullet ::= LINE_LIST_BULLETED nested_chunks * + (63) item_bullet ::= LINE_LIST_BULLETED nested_chunks * - LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY - LINE_EMPTY reduce 61 ** Parsing conflict ** + LINE_EMPTY shift-reduce 98 empty ::= LINE_EMPTY + LINE_EMPTY reduce 63 ** Parsing conflict ** empty shift 26 - nested_chunk shift-reduce 26 nested_chunks ::= nested_chunks nested_chunk - {default} reduce 61 item_bullet ::= LINE_LIST_BULLETED nested_chunks + nested_chunk shift-reduce 28 nested_chunks ::= nested_chunks nested_chunk + {default} reduce 63 item_bullet ::= LINE_LIST_BULLETED nested_chunks State 21: chunk ::= * chunk chunk_line chunk ::= * chunk_line chunk_line ::= * LINE_CONTINUATION nested_chunk ::= empty indented_line * chunk - (28) nested_chunk ::= empty indented_line * + (30) nested_chunk ::= empty indented_line * - LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION + LINE_CONTINUATION shift-reduce 83 chunk_line ::= LINE_CONTINUATION chunk shift 36 chunk_line shift 36 /* because chunk_line==chunk */ - {default} reduce 28 nested_chunk ::= empty indented_line + {default} reduce 30 nested_chunk ::= empty indented_line State 22: nested_chunks ::= nested_chunks * nested_chunk nested_chunk ::= * empty indented_line chunk nested_chunk ::= * empty indented_line nested_chunk ::= * empty - (29) ext_chunk ::= chunk nested_chunks * + (31) ext_chunk ::= chunk nested_chunks * empty ::= * empty LINE_EMPTY empty ::= * LINE_EMPTY - LINE_EMPTY shift-reduce 94 empty ::= LINE_EMPTY - LINE_EMPTY reduce 29 ** Parsing conflict ** + LINE_EMPTY shift-reduce 98 empty ::= LINE_EMPTY + LINE_EMPTY reduce 31 ** Parsing conflict ** empty shift 26 - nested_chunk shift-reduce 26 nested_chunks ::= nested_chunks nested_chunk - {default} reduce 29 ext_chunk ::= chunk nested_chunks + nested_chunk shift-reduce 28 nested_chunks ::= nested_chunks nested_chunk + {default} reduce 31 ext_chunk ::= chunk nested_chunks State 23: fenced_block ::= fenced_5 * LINE_FENCE_BACKTICK_5 - (101) fenced_block ::= fenced_5 * + (105) 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 @@ -743,84 +759,96 @@ State 23: fenced_5 ::= fenced_5 * LINE_FENCE_BACKTICK_START_4 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 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 + fenced_line ::= * LINE_SETEXT_1 + fenced_line ::= * LINE_SETEXT_2 + + LINE_SETEXT_1 shift-reduce 110 fenced_line ::= LINE_SETEXT_1 + LINE_SETEXT_2 shift-reduce 111 fenced_line ::= LINE_SETEXT_2 + LINE_CONTINUATION shift-reduce 108 fenced_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 109 fenced_line ::= LINE_EMPTY + LINE_EMPTY reduce 105 ** Parsing conflict ** + LINE_FENCE_BACKTICK_3 shift-reduce 53 fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_3 + LINE_FENCE_BACKTICK_3 reduce 105 ** Parsing conflict ** + LINE_FENCE_BACKTICK_4 shift-reduce 55 fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_4 + LINE_FENCE_BACKTICK_4 reduce 105 ** Parsing conflict ** + LINE_FENCE_BACKTICK_5 shift-reduce 51 fenced_block ::= fenced_5 LINE_FENCE_BACKTICK_5 + LINE_FENCE_BACKTICK_5 reduce 105 ** Parsing conflict ** + LINE_FENCE_BACKTICK_START_3 shift-reduce 54 fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_START_3 + LINE_FENCE_BACKTICK_START_3 reduce 105 ** Parsing conflict ** + LINE_FENCE_BACKTICK_START_4 shift-reduce 56 fenced_5 ::= fenced_5 LINE_FENCE_BACKTICK_START_4 + LINE_FENCE_BACKTICK_START_4 reduce 105 ** Parsing conflict ** + fenced_line shift-reduce 52 fenced_5 ::= fenced_5 fenced_line + {default} reduce 105 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 * + (102) 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 + fenced_line ::= * LINE_SETEXT_1 + fenced_line ::= * LINE_SETEXT_2 + + LINE_SETEXT_1 shift-reduce 110 fenced_line ::= LINE_SETEXT_1 + LINE_SETEXT_2 shift-reduce 111 fenced_line ::= LINE_SETEXT_2 + LINE_CONTINUATION shift-reduce 108 fenced_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 109 fenced_line ::= LINE_EMPTY + LINE_EMPTY reduce 102 ** Parsing conflict ** + LINE_FENCE_BACKTICK_3 shift-reduce 49 fenced_4 ::= fenced_4 LINE_FENCE_BACKTICK_3 + LINE_FENCE_BACKTICK_3 reduce 102 ** Parsing conflict ** + LINE_FENCE_BACKTICK_4 shift-reduce 46 fenced_block ::= fenced_4 LINE_FENCE_BACKTICK_4 + LINE_FENCE_BACKTICK_4 reduce 102 ** Parsing conflict ** + LINE_FENCE_BACKTICK_5 shift-reduce 47 fenced_block ::= fenced_4 LINE_FENCE_BACKTICK_5 + LINE_FENCE_BACKTICK_5 reduce 102 ** Parsing conflict ** + LINE_FENCE_BACKTICK_START_3 shift-reduce 50 fenced_4 ::= fenced_4 LINE_FENCE_BACKTICK_START_3 + LINE_FENCE_BACKTICK_START_3 reduce 102 ** Parsing conflict ** + fenced_line shift-reduce 48 fenced_4 ::= fenced_4 fenced_line + {default} reduce 102 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 * + (99) 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 + fenced_line ::= * LINE_SETEXT_1 + fenced_line ::= * LINE_SETEXT_2 + + LINE_SETEXT_1 shift-reduce 110 fenced_line ::= LINE_SETEXT_1 + LINE_SETEXT_2 shift-reduce 111 fenced_line ::= LINE_SETEXT_2 + LINE_CONTINUATION shift-reduce 108 fenced_line ::= LINE_CONTINUATION + LINE_EMPTY shift-reduce 109 fenced_line ::= LINE_EMPTY + LINE_EMPTY reduce 99 ** Parsing conflict ** + LINE_FENCE_BACKTICK_3 shift-reduce 42 fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_3 + LINE_FENCE_BACKTICK_3 reduce 99 ** Parsing conflict ** + LINE_FENCE_BACKTICK_4 shift-reduce 43 fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_4 + LINE_FENCE_BACKTICK_4 reduce 99 ** Parsing conflict ** + LINE_FENCE_BACKTICK_5 shift-reduce 44 fenced_block ::= fenced_3 LINE_FENCE_BACKTICK_5 + LINE_FENCE_BACKTICK_5 reduce 99 ** Parsing conflict ** + fenced_line shift-reduce 45 fenced_3 ::= fenced_3 fenced_line + {default} reduce 99 fenced_block ::= fenced_3 State 26: nested_chunk ::= empty * indented_line chunk nested_chunk ::= empty * indented_line - (81) nested_chunk ::= empty * + (85) nested_chunk ::= empty * indented_line ::= * LINE_INDENTED_TAB indented_line ::= * LINE_INDENTED_SPACE empty ::= empty * LINE_EMPTY - 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 81 ** Parsing conflict ** + LINE_INDENTED_TAB shift-reduce 86 indented_line ::= LINE_INDENTED_TAB + LINE_INDENTED_TAB reduce 85 ** Parsing conflict ** + LINE_INDENTED_SPACE shift-reduce 87 indented_line ::= LINE_INDENTED_SPACE + LINE_INDENTED_SPACE reduce 85 ** Parsing conflict ** + LINE_EMPTY shift-reduce 41 empty ::= empty LINE_EMPTY + LINE_EMPTY reduce 85 ** Parsing conflict ** indented_line shift 21 - {default} reduce 81 nested_chunk ::= empty + {default} reduce 85 nested_chunk ::= empty State 27: (19) block ::= indented_code * @@ -829,13 +857,13 @@ State 27: indented_code ::= indented_code * indented_line indented_code ::= indented_code * LINE_EMPTY - LINE_INDENTED_TAB shift-reduce 82 indented_line ::= LINE_INDENTED_TAB + LINE_INDENTED_TAB shift-reduce 86 indented_line ::= LINE_INDENTED_TAB LINE_INDENTED_TAB reduce 19 ** Parsing conflict ** - LINE_INDENTED_SPACE shift-reduce 83 indented_line ::= LINE_INDENTED_SPACE + LINE_INDENTED_SPACE shift-reduce 87 indented_line ::= LINE_INDENTED_SPACE LINE_INDENTED_SPACE reduce 19 ** Parsing conflict ** - LINE_EMPTY shift-reduce 57 indented_code ::= indented_code LINE_EMPTY + LINE_EMPTY shift-reduce 59 indented_code ::= indented_code LINE_EMPTY LINE_EMPTY reduce 19 ** Parsing conflict ** - indented_line shift-reduce 56 indented_code ::= indented_code indented_line + indented_line shift-reduce 58 indented_code ::= indented_code indented_line {default} reduce 19 block ::= indented_code State 28: @@ -844,10 +872,10 @@ State 28: meta_line ::= * LINE_META meta_line ::= * LINE_CONTINUATION - LINE_CONTINUATION shift-reduce 114 meta_line ::= LINE_CONTINUATION - LINE_META shift-reduce 113 meta_line ::= LINE_META + LINE_CONTINUATION shift-reduce 120 meta_line ::= LINE_CONTINUATION + LINE_META shift-reduce 119 meta_line ::= LINE_META LINE_META reduce 22 ** Parsing conflict ** - meta_line shift-reduce 68 meta_block ::= meta_block meta_line + meta_line shift-reduce 70 meta_block ::= meta_block meta_line {default} reduce 22 block ::= meta_block State 29: @@ -856,10 +884,10 @@ State 29: html_line ::= * LINE_CONTINUATION html_line ::= * LINE_HTML - LINE_CONTINUATION shift-reduce 107 html_line ::= LINE_CONTINUATION - LINE_HTML shift-reduce 108 html_line ::= LINE_HTML + LINE_CONTINUATION shift-reduce 113 html_line ::= LINE_CONTINUATION + LINE_HTML shift-reduce 114 html_line ::= LINE_HTML LINE_HTML reduce 18 ** Parsing conflict ** - html_line shift-reduce 55 html_block ::= html_block html_line + html_line shift-reduce 57 html_block ::= html_block html_line {default} reduce 18 block ::= html_block State 30: @@ -868,51 +896,51 @@ State 30: quote_line ::= * LINE_BLOCKQUOTE quote_line ::= * LINE_CONTINUATION - LINE_CONTINUATION shift-reduce 89 quote_line ::= LINE_CONTINUATION - LINE_BLOCKQUOTE shift-reduce 88 quote_line ::= LINE_BLOCKQUOTE + LINE_CONTINUATION shift-reduce 93 quote_line ::= LINE_CONTINUATION + LINE_BLOCKQUOTE shift-reduce 92 quote_line ::= LINE_BLOCKQUOTE LINE_BLOCKQUOTE reduce 11 ** Parsing conflict ** - quote_line shift-reduce 31 blockquote ::= blockquote quote_line + quote_line shift-reduce 33 blockquote ::= blockquote quote_line {default} reduce 11 block ::= blockquote State 31: chunk ::= chunk * chunk_line chunk_line ::= * LINE_CONTINUATION - (69) para ::= LINE_PLAIN chunk * + (71) para ::= LINE_PLAIN chunk * - LINE_CONTINUATION shift-reduce 79 chunk_line ::= LINE_CONTINUATION - chunk_line shift-reduce 25 chunk ::= chunk chunk_line - {default} reduce 69 para ::= LINE_PLAIN chunk + LINE_CONTINUATION shift-reduce 83 chunk_line ::= LINE_CONTINUATION + chunk_line shift-reduce 27 chunk ::= chunk chunk_line + {default} reduce 71 para ::= LINE_PLAIN chunk State 32: defs ::= defs * def def ::= * LINE_DEFINITION tail def ::= * LINE_DEFINITION - (122) para ::= defs * + (128) para ::= defs * LINE_DEFINITION shift 4 - LINE_DEFINITION reduce 122 ** Parsing conflict ** - def shift-reduce 36 defs ::= defs def - {default} reduce 122 para ::= defs + LINE_DEFINITION reduce 128 ** Parsing conflict ** + def shift-reduce 38 defs ::= defs def + {default} reduce 128 para ::= defs State 33: chunk ::= chunk * chunk_line chunk_line ::= * LINE_CONTINUATION - (34) def_link ::= LINE_DEF_LINK chunk * + (36) def_link ::= LINE_DEF_LINK chunk * - 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 + LINE_CONTINUATION shift-reduce 83 chunk_line ::= LINE_CONTINUATION + chunk_line shift-reduce 27 chunk ::= chunk chunk_line + {default} reduce 36 def_link ::= LINE_DEF_LINK chunk State 34: - (35) definition_block ::= para defs * + (37) definition_block ::= para defs * defs ::= defs * def def ::= * LINE_DEFINITION tail def ::= * LINE_DEFINITION LINE_DEFINITION shift 4 - LINE_DEFINITION reduce 35 ** Parsing conflict ** - def shift-reduce 36 defs ::= defs def - {default} reduce 35 definition_block ::= para defs + LINE_DEFINITION reduce 37 ** Parsing conflict ** + def shift-reduce 38 defs ::= defs def + {default} reduce 37 definition_block ::= para defs State 35: (21) block ::= list_enum * @@ -924,17 +952,17 @@ State 35: LINE_LIST_ENUMERATED shift 5 LINE_LIST_ENUMERATED reduce 21 ** Parsing conflict ** - item_enum shift-reduce 63 list_enum ::= list_enum item_enum + item_enum shift-reduce 65 list_enum ::= list_enum item_enum {default} reduce 21 block ::= list_enum State 36: chunk ::= chunk * chunk_line chunk_line ::= * LINE_CONTINUATION - (27) nested_chunk ::= empty indented_line chunk * + (29) nested_chunk ::= empty indented_line chunk * - 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 + LINE_CONTINUATION shift-reduce 83 chunk_line ::= LINE_CONTINUATION + chunk_line shift-reduce 27 chunk ::= chunk chunk_line + {default} reduce 29 nested_chunk ::= empty indented_line chunk State 37: (20) block ::= list_bullet * @@ -946,111 +974,115 @@ State 37: LINE_LIST_BULLETED shift 6 LINE_LIST_BULLETED reduce 20 ** Parsing conflict ** - item_bullet shift-reduce 58 list_bullet ::= list_bullet item_bullet + item_bullet shift-reduce 60 list_bullet ::= list_bullet item_bullet {default} reduce 20 block ::= list_bullet State 38: table_header ::= header_rows * LINE_TABLE_SEPARATOR header_rows ::= header_rows * LINE_TABLE - (120) row ::= header_rows * + (126) 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 + LINE_TABLE_SEPARATOR shift-reduce 75 table_header ::= header_rows LINE_TABLE_SEPARATOR + LINE_TABLE_SEPARATOR reduce 126 ** Parsing conflict ** + LINE_TABLE shift-reduce 76 header_rows ::= header_rows LINE_TABLE + LINE_TABLE reduce 126 ** Parsing conflict ** + {default} reduce 126 row ::= header_rows State 39: header_rows ::= header_rows * LINE_TABLE - (120) row ::= header_rows * + (126) 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 + LINE_TABLE shift-reduce 76 header_rows ::= header_rows LINE_TABLE + LINE_TABLE reduce 126 ** Parsing conflict ** + {default} reduce 126 row ::= header_rows State 40: (16) block ::= empty * empty ::= empty * LINE_EMPTY - LINE_EMPTY shift-reduce 39 empty ::= empty LINE_EMPTY + LINE_EMPTY shift-reduce 41 empty ::= empty LINE_EMPTY LINE_EMPTY reduce 16 ** Parsing conflict ** {default} reduce 16 block ::= empty ---------------------------------------------------- Symbols: 0: $: - 1: LINE_PLAIN - 2: LINE_TABLE_SEPARATOR - 3: LINE_CONTINUATION - 4: LINE_INDENTED_TAB - 5: LINE_INDENTED_SPACE - 6: LINE_TABLE - 7: LINE_HTML - 8: LINE_ATX_1 - 9: LINE_ATX_2 - 10: LINE_ATX_3 - 11: LINE_ATX_4 - 12: LINE_ATX_5 - 13: LINE_ATX_6 - 14: LINE_HR - 15: LINE_BLOCKQUOTE - 16: LINE_LIST_BULLETED - 17: LINE_LIST_ENUMERATED - 18: LINE_DEF_CITATION - 19: LINE_DEF_FOOTNOTE - 20: LINE_DEF_LINK - 21: LINE_FENCE_BACKTICK - 22: LINE_FENCE_BACKTICK_START - 23: LINE_TOC - 24: LINE_DEFINITION - 25: LINE_EMPTY - 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 + 1: LINE_HR + 2: LINE_SETEXT_1 + 3: LINE_SETEXT_2 + 4: LINE_PLAIN + 5: LINE_TABLE_SEPARATOR + 6: LINE_CONTINUATION + 7: LINE_INDENTED_TAB + 8: LINE_INDENTED_SPACE + 9: LINE_TABLE + 10: LINE_HTML + 11: LINE_ATX_1 + 12: LINE_ATX_2 + 13: LINE_ATX_3 + 14: LINE_ATX_4 + 15: LINE_ATX_5 + 16: LINE_ATX_6 + 17: LINE_BLOCKQUOTE + 18: LINE_LIST_BULLETED + 19: LINE_LIST_ENUMERATED + 20: LINE_DEF_CITATION + 21: LINE_DEF_FOOTNOTE + 22: LINE_DEF_LINK + 23: LINE_FENCE_BACKTICK + 24: LINE_FENCE_BACKTICK_START + 25: LINE_TOC + 26: LINE_DEFINITION + 27: LINE_EMPTY + 28: LINE_FENCE_BACKTICK_3 + 29: LINE_FENCE_BACKTICK_4 + 30: LINE_FENCE_BACKTICK_5 + 31: LINE_FENCE_BACKTICK_START_3 + 32: LINE_FENCE_BACKTICK_START_4 + 33: LINE_FENCE_BACKTICK_START_5 + 34: LINE_META + 35: error: + 36: doc: LINE_HR 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_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: blocks: LINE_HR 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_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 + 38: block: LINE_HR 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_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 + 39: blockquote: LINE_BLOCKQUOTE + 40: def_citation: LINE_DEF_CITATION + 41: def_footnote: LINE_DEF_FOOTNOTE + 42: def_link: LINE_DEF_LINK + 43: definition_block: LINE_PLAIN LINE_TABLE_SEPARATOR LINE_TABLE LINE_DEFINITION + 44: empty: LINE_EMPTY + 45: 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 + 46: html_block: LINE_HTML + 47: indented_code: LINE_INDENTED_TAB LINE_INDENTED_SPACE + 48: list_bullet: LINE_LIST_BULLETED + 49: list_enum: LINE_LIST_ENUMERATED + 50: meta_block: LINE_META + 51: para: LINE_PLAIN LINE_TABLE_SEPARATOR LINE_TABLE LINE_DEFINITION + 52: setext_1: LINE_PLAIN LINE_TABLE_SEPARATOR LINE_TABLE LINE_DEFINITION + 53: setext_2: LINE_PLAIN LINE_TABLE_SEPARATOR LINE_TABLE LINE_DEFINITION + 54: table: LINE_TABLE + 55: chunk: LINE_CONTINUATION + 56: chunk_line: LINE_CONTINUATION + 57: nested_chunks: LINE_EMPTY + 58: nested_chunk: LINE_EMPTY + 59: indented_line: LINE_INDENTED_TAB LINE_INDENTED_SPACE + 60: ext_chunk: LINE_CONTINUATION + 61: opt_ext_chunk: LINE_CONTINUATION + 62: tail: LINE_CONTINUATION LINE_EMPTY + 63: quote_line: LINE_CONTINUATION LINE_BLOCKQUOTE + 64: defs: LINE_DEFINITION + 65: def: LINE_DEFINITION + 66: fenced_3: LINE_FENCE_BACKTICK_3 LINE_FENCE_BACKTICK_START_3 + 67: fenced_line: LINE_SETEXT_1 LINE_SETEXT_2 LINE_CONTINUATION LINE_EMPTY + 68: fenced_4: LINE_FENCE_BACKTICK_4 LINE_FENCE_BACKTICK_START_4 + 69: fenced_5: LINE_FENCE_BACKTICK_5 LINE_FENCE_BACKTICK_START_5 + 70: html_line: LINE_CONTINUATION LINE_HTML + 71: item_bullet: LINE_LIST_BULLETED + 72: item_enum: LINE_LIST_ENUMERATED + 73: meta_line: LINE_CONTINUATION LINE_META + 74: table_header: LINE_TABLE + 75: table_body: LINE_TABLE_SEPARATOR LINE_TABLE + 76: header_rows: LINE_TABLE + 77: table_section: LINE_TABLE_SEPARATOR LINE_TABLE + 78: all_rows: LINE_TABLE_SEPARATOR LINE_TABLE + 79: row: LINE_TABLE_SEPARATOR LINE_TABLE diff --git a/src/parser.y b/src/parser.y index 1608845..b9ed5ea 100644 --- a/src/parser.y +++ b/src/parser.y @@ -62,7 +62,9 @@ %extra_argument { mmd_engine * engine } -%fallback LINE_PLAIN LINE_TABLE_SEPARATOR . +%fallback LINE_HR LINE_SETEXT_1 LINE_SETEXT_2. + +%fallback LINE_PLAIN LINE_TABLE_SEPARATOR. %fallback LINE_CONTINUATION LINE_PLAIN LINE_INDENTED_TAB LINE_INDENTED_SPACE LINE_TABLE. @@ -121,6 +123,8 @@ block(A) ::= list_bullet(B). { A = token_new_parent(B, BLOCK_LIST_BULLETED); block(A) ::= list_enum(B). { A = token_new_parent(B, BLOCK_LIST_ENUMERATED); is_list_loose(A); } block(A) ::= meta_block(B). { A = token_new_parent(B, BLOCK_META); } block(A) ::= para(B). { A = token_new_parent(B, BLOCK_PARA); is_para_html(engine, A); } +block(A) ::= setext_1(B). { A = token_new_parent(B, BLOCK_SETEXT_1); } +block(A) ::= setext_2(B). { A = token_new_parent(B, BLOCK_SETEXT_2); } block(A) ::= table(B). { A = token_new_parent(B, BLOCK_TABLE); } @@ -246,6 +250,8 @@ fenced_5 ::= LINE_FENCE_BACKTICK_START_5. fenced_line ::= LINE_CONTINUATION. fenced_line ::= LINE_EMPTY. +fenced_line ::= LINE_SETEXT_1. +fenced_line ::= LINE_SETEXT_2. // HTML @@ -295,6 +301,11 @@ para(A) ::= LINE_PLAIN(B) chunk(C). { A = B; token_chain_append(B, C); } para ::= LINE_PLAIN. +// Setext headers +setext_1(A) ::= para(B) LINE_SETEXT_1(C). { A = B; token_chain_append(B, C); } +setext_2(A) ::= para(B) LINE_SETEXT_2(C). { A = B; token_chain_append(B, C); } + + // Tables table(A) ::= table_header(B) table_body(C). { A = B; token_chain_append(B, C); } table ::= table_header. diff --git a/src/scanners.c b/src/scanners.c index 465de7e..b32ff93 100644 --- a/src/scanners.c +++ b/src/scanners.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.14.3 on Wed Feb 8 13:01:12 2017 */ +/* Generated by re2c 0.14.3 on Wed Feb 8 17:26:41 2017 */ /** MultiMarkdown 6 -- Lightweight markup processor to produce HTML, LaTeX, and more. @@ -9465,6 +9465,121 @@ yy729: } +size_t scan_setext(const char * c) { + const char * marker = NULL; + const char * start = c; + + +{ + char yych; + yych = *c; + switch (yych) { + case '\n': goto yy732; + case ' ': goto yy733; + case '-': goto yy735; + case '=': goto yy734; + default: goto yy736; + } +yy732: + { return 0; } +yy733: + yych = *(marker = ++c); + switch (yych) { + case ' ': goto yy748; + case '-': goto yy749; + case '=': goto yy750; + default: goto yy732; + } +yy734: + yych = *(marker = ++c); + switch (yych) { + case '=': goto yy743; + default: goto yy732; + } +yy735: + yych = *(marker = ++c); + switch (yych) { + case '-': goto yy737; + default: goto yy732; + } +yy736: + yych = *++c; + goto yy732; +yy737: + ++c; + yych = *c; + switch (yych) { + case 0x00: + case '\n': goto yy740; + case '\r': goto yy742; + case '-': goto yy737; + default: goto yy739; + } +yy739: + c = marker; + goto yy732; +yy740: + ++c; +yy741: + { return (size_t)( c - start ); } +yy742: + yych = *++c; + switch (yych) { + case '\n': goto yy740; + default: goto yy741; + } +yy743: + ++c; + yych = *c; + switch (yych) { + case 0x00: + case '\n': goto yy745; + case '\r': goto yy747; + case '=': goto yy743; + default: goto yy739; + } +yy745: + ++c; +yy746: + { return (size_t)( c - start ); } +yy747: + yych = *++c; + switch (yych) { + case '\n': goto yy745; + default: goto yy746; + } +yy748: + yych = *++c; + switch (yych) { + case ' ': goto yy751; + case '-': goto yy749; + case '=': goto yy750; + default: goto yy739; + } +yy749: + yych = *++c; + switch (yych) { + case '-': goto yy737; + default: goto yy739; + } +yy750: + yych = *++c; + switch (yych) { + case '=': goto yy743; + default: goto yy739; + } +yy751: + ++c; + switch ((yych = *c)) { + case '-': goto yy749; + case '=': goto yy750; + default: goto yy739; + } +} + +} + + #ifdef TEST void Test_scan_url(CuTest* tc) { int url_len; diff --git a/src/scanners.h b/src/scanners.h index e285db4..d952f72 100644 --- a/src/scanners.h +++ b/src/scanners.h @@ -87,6 +87,7 @@ size_t scan_ref_citation(const char * c); size_t scan_ref_foot(const char * c); size_t scan_ref_link(const char * c); size_t scan_ref_link_no_attributes(const char * c); +size_t scan_setext(const char * c); size_t scan_spnl(const char * c); size_t scan_table_separator(const char * c); size_t scan_url(const char * c); diff --git a/src/scanners.re b/src/scanners.re index d8d7039..e89366f 100644 --- a/src/scanners.re +++ b/src/scanners.re @@ -150,6 +150,9 @@ align_wrap_right = sp align ':' '+' sp ('|' | nl_eof); align_wrap_center = sp ':' align ':' '+' sp ('|' | nl_eof); + setext_1 = non_indent '='{2,} nl_eof; + + setext_2 = non_indent '-'{2,} nl_eof; */ @@ -399,6 +402,18 @@ size_t scan_destination(const char * c) { } +size_t scan_setext(const char * c) { + const char * marker = NULL; + const char * start = c; + +/*!re2c + setext_1 { return (size_t)( c - start ); } + setext_2 { return (size_t)( c - start ); } + .? { return 0; } +*/ +} + + #ifdef TEST void Test_scan_url(CuTest* tc) { int url_len; diff --git a/src/writer.c b/src/writer.c index a66bd88..810b136 100644 --- a/src/writer.c +++ b/src/writer.c @@ -738,7 +738,7 @@ char * url_accept(const char * source, token ** remainder, bool validate) { first = *remainder; // Grab parts for URL - while (token_chain_accept_multiple(remainder, 5, AMPERSAND, COLON, TEXT_PERIOD, TEXT_PLAIN, UL)); + while (token_chain_accept_multiple(remainder, 6, AMPERSAND, COLON, EQUAL, TEXT_PERIOD, TEXT_PLAIN, UL)); last = (*remainder)->prev; diff --git a/templates/README.md.in b/templates/README.md.in index d4365ee..dd2d772 100644 --- a/templates/README.md.in +++ b/templates/README.md.in @@ -366,13 +366,17 @@ MultiMarkdown v6 is mostly about making a better MMD parser, but it will likely involve a few changes to the MultiMarkdown language itself. -1. I am thinking about removing Setext headers from the language. I almost +1. {--I am thinking about removing Setext headers from the language. I almost never use them, much preferring to use ATX style headers (`# foo #`). Additionally, I have never liked the fact that Setext headers allow the meaning of a line to be completely changed by the following line. It makes the parsing slightly more difficult on a technical level (requiring some backtracking at times). I'm not 100% certain on this, but right now I believe -it's the only Markdown feature that doesn't exist in MMD 6 yet. +it's the only Markdown feature that doesn't exist in MMD 6 yet.--}{++I decided +to go ahead and implement Setext headers, as it can be done with the new +parser without backtracking. One difference with older versions of MMD, as +well as Markdown itself, is that a setext header can consist of more than one +line to be included in the header.++} 2. Whitespace is not allowed between the text brackets and label brackets in reference links, images, footnotes, etc. For example `[foo] [bar]` will no diff --git a/test/parser_test.y b/test/parser_test.y index 0040564..46af54b 100644 --- a/test/parser_test.y +++ b/test/parser_test.y @@ -67,7 +67,8 @@ // Manually copy fallbacks from `parser.y` here -//%fallback LINE_PLAIN LINE_TABLE_SEPARATOR LINE_DEFINITION. +%fallback LINE_HR LINE_SETEXT_1 LINE_SETEXT_2. + %fallback LINE_PLAIN LINE_TABLE_SEPARATOR. %fallback LINE_CONTINUATION LINE_PLAIN LINE_INDENTED_TAB LINE_INDENTED_SPACE LINE_TABLE. @@ -101,6 +102,8 @@ block ::= list_bullet. block ::= list_enum. block ::= meta_block. block ::= para. +block ::= setext_1. +block ::= setext_2. block ::= table. chunk ::= chunk chunk_line. nested_chunks ::= nested_chunks nested_chunk. @@ -147,6 +150,8 @@ item_enum ::= LINE_LIST_ENUMERATED nested_chunks. item_enum ::= LINE_LIST_ENUMERATED. meta_block ::= meta_block meta_line. para ::= LINE_PLAIN chunk. +setext_1 ::= para LINE_SETEXT_1. +setext_2 ::= para LINE_SETEXT_2. table ::= table_header table_body. table_header ::= header_rows LINE_TABLE_SEPARATOR. header_rows ::= header_rows LINE_TABLE. @@ -183,6 +188,8 @@ fenced_5 ::= LINE_FENCE_BACKTICK_5. fenced_5 ::= LINE_FENCE_BACKTICK_START_5. fenced_line ::= LINE_CONTINUATION. fenced_line ::= LINE_EMPTY. +fenced_line ::= LINE_SETEXT_1. +fenced_line ::= LINE_SETEXT_2. html_block ::= LINE_HTML. html_line ::= LINE_CONTINUATION. html_line ::= LINE_HTML. @@ -210,6 +217,7 @@ para ::= defs. #include #include #include + #include "parser_test.h" // Basic parser function declarations void * ParseAlloc(); @@ -217,7 +225,7 @@ para ::= defs. void ParseFree(); void ParseTrace(); - #define kMaxToken 32 + #define kMaxToken 34 int i,j,k,l,m, n; @@ -241,7 +249,10 @@ int main(int argc, char** argv) { for (i = 1; i <= kMaxToken; ++i) { - + // LINE_CONTINUATION can't be the first line + if (i == LINE_CONTINUATION) + break; + Parse(pParser, i, NULL); Parse(pParser, 0, NULL); @@ -257,6 +268,9 @@ int main(int argc, char** argv) { for (i = 1; i <= kMaxToken; ++i) { + // LINE_CONTINUATION can't be the first line + if (i == LINE_CONTINUATION) + break; for (j = 1; j <= kMaxToken; ++j) { @@ -277,6 +291,9 @@ int main(int argc, char** argv) { for (i = 1; i <= kMaxToken; ++i) { + // LINE_CONTINUATION can't be the first line + if (i == LINE_CONTINUATION) + break; for (j = 1; j <= kMaxToken; ++j) { @@ -303,6 +320,9 @@ int main(int argc, char** argv) { for (i = 1; i <= kMaxToken; ++i) { + // LINE_CONTINUATION can't be the first line + if (i == LINE_CONTINUATION) + break; for (j = 1; j <= kMaxToken; ++j) { @@ -333,6 +353,9 @@ int main(int argc, char** argv) { for (i = 1; i <= kMaxToken; ++i) { + // LINE_CONTINUATION can't be the first line + if (i == LINE_CONTINUATION) + break; for (j = 1; j <= kMaxToken; ++j) { @@ -370,6 +393,10 @@ int main(int argc, char** argv) { for (i = 1; i <= kMaxToken; ++i) { + // LINE_CONTINUATION can't be the first line + if (i == LINE_CONTINUATION) + break; + fprintf(stderr, "%d\n", i); for (j = 1; j <= kMaxToken; ++j) { diff --git a/tests/MMD6Tests/Setext Headers.html b/tests/MMD6Tests/Setext Headers.html new file mode 100644 index 0000000..f01493c --- /dev/null +++ b/tests/MMD6Tests/Setext Headers.html @@ -0,0 +1,27 @@ +

foo bar

+ +

foo bar

+ +

foo +bar

+ +

foo +bar

+ +

foo

+ +

bar

+ +

5

+ +

foo

+ +

bar

+ +
foo
+====
+
+ +
+ +
diff --git a/tests/MMD6Tests/Setext Headers.htmlc b/tests/MMD6Tests/Setext Headers.htmlc new file mode 100644 index 0000000..561a409 --- /dev/null +++ b/tests/MMD6Tests/Setext Headers.htmlc @@ -0,0 +1,28 @@ +

foo bar

+ +

foo bar

+ +

foo +bar

+ +

foo +bar

+ +

foo

+ +

bar

+ +

5

+ +

foo

+ +

bar

+ +

```` +foo

+ +

````

+ +
+ +
diff --git a/tests/MMD6Tests/Setext Headers.text b/tests/MMD6Tests/Setext Headers.text new file mode 100644 index 0000000..747dd57 --- /dev/null +++ b/tests/MMD6Tests/Setext Headers.text @@ -0,0 +1,33 @@ +foo bar +======= + +foo bar +------- + +foo +bar +=== + +foo +bar +--- + +foo +=== +bar + +5 + +foo +--- +bar + + +```` +foo +==== +```` + +==== + +----