]> granicus.if.org Git - multimarkdown/commitdiff
ADDED: Improve fuzz testing for parser; CHANGED: Alter parsing of definition lists...
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Tue, 7 Feb 2017 02:18:47 +0000 (21:18 -0500)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Tue, 7 Feb 2017 02:18:47 +0000 (21:18 -0500)
src/html.c
src/libMultiMarkdown.h
src/mmd.c
src/parser.c
src/parser.out
src/parser.y
test/parser_test.y

index 3502da2d017ff19dceec067ae305a04f56fb0193..54dc05381b610af10d0b7134944293010cda894f 100644 (file)
@@ -328,18 +328,24 @@ void mmd_export_token_html(DString * out, const char * source, token * t, size_t
                        print("</dd>");
                        scratch->padded = 0;
                        break;
-               case BLOCK_DEFINITION_GROUP:
-                       mmd_export_token_tree_html(out, source, t->child, t->start + offset, scratch);
-                       break;                  
                case BLOCK_DEFLIST:
                        pad(out, 2, scratch);
-                       print("<dl>\n");
+
+                       // Group consecutive definition lists into a single list.
+                       // lemon's LALR(1) parser can't properly handle this (to my understanding).
+
+                       if (!(t->prev && t->prev->prev && (t->prev->prev->type == BLOCK_DEFLIST)))
+                               print("<dl>\n");
+       
                        scratch->padded = 2;
 
                        mmd_export_token_tree_html(out, source, t->child, t->start + offset, scratch);
                        pad(out, 1, scratch);
-                       print("</dl>");
-                       scratch->padded = 0;
+
+                       if (!(t->next && t->next->next && (t->next->next->type == BLOCK_DEFLIST)))
+                               print("</dl>\n");
+
+                       scratch->padded = 1;
                        break;
                case BLOCK_CODE_FENCED:
                case BLOCK_CODE_INDENTED:
index 43f2c2a713142764a4a35063d0760d5936937030..aace3a662c51fe17ab5596905b42e11a2b6342a8 100644 (file)
@@ -114,7 +114,6 @@ enum token_types {
        BLOCK_CODE_INDENTED,
        BLOCK_DEFLIST,
        BLOCK_DEFINITION,
-       BLOCK_DEFINITION_GROUP,
        BLOCK_DEF_CITATION,
        BLOCK_DEF_FOOTNOTE,
        BLOCK_DEF_LINK,
index b499db2367f629835f62657e27bd73f71fee0788..3a2ff4c46056dbbf35a2d5cd82a53f34ade957b0 100644 (file)
--- a/src/mmd.c
+++ b/src/mmd.c
@@ -842,7 +842,6 @@ void mmd_pair_tokens_in_block(token * block, token_pair_engine * e, stack * s) {
                case BLOCK_BLOCKQUOTE:
                case BLOCK_DEFLIST:
                case BLOCK_DEFINITION:
-               case BLOCK_DEFINITION_GROUP:
                case BLOCK_DEF_CITATION:
                case BLOCK_DEF_FOOTNOTE:
                case BLOCK_DEF_LINK:
@@ -912,7 +911,6 @@ void mmd_assign_ambidextrous_tokens_in_block(mmd_engine * e, token * block, cons
                        case BLOCK_BLOCKQUOTE:
                        case BLOCK_DEFLIST:
                        case BLOCK_DEFINITION:
-                       case BLOCK_DEFINITION_GROUP:
                        case BLOCK_H1:
                        case BLOCK_H2:
                        case BLOCK_H3:
@@ -1416,11 +1414,14 @@ void strip_line_tokens_from_metadata(mmd_engine * e, token * metadata) {
 }
 
 
-void strip_line_tokens_from_defgroup(mmd_engine * e, token * group) {
-       token * walker = group->child;
+void strip_line_tokens_from_deflist(mmd_engine * e, token * deflist) {
+       token * walker = deflist->child;
 
        while (walker) {
                switch (walker->type) {
+                       case LINE_EMPTY:
+                               walker->type = TEXT_EMPTY;
+                               break;
                        case LINE_PLAIN:
                                walker->type = BLOCK_TERM;
                        case BLOCK_TERM:
@@ -1434,23 +1435,6 @@ void strip_line_tokens_from_defgroup(mmd_engine * e, token * group) {
 }
 
 
-void strip_line_tokens_from_deflist(mmd_engine * e, token * deflist) {
-       token * walker = deflist->child;
-
-       while (walker) {
-               switch (walker->type) {
-                       case LINE_EMPTY:
-                               walker->type = TEXT_EMPTY;
-                               break;
-                       case BLOCK_DEFINITION_GROUP:
-                               strip_line_tokens_from_defgroup(e, walker);
-                               break;
-               }
-               walker = walker->next;
-       }
-}
-
-
 void strip_line_tokens_from_table(mmd_engine * e, token * table) {
        token * walker = table->child;
 
index ef2833781e610bc0adad5ad5f093af577ff2c9b2..b7740ea1936c25451eea18fc7a8ad4f7d0496b1a 100644 (file)
@@ -92,7 +92,7 @@
 #endif
 /************* Begin control #defines *****************************************/
 #define YYCODETYPE unsigned char
-#define YYNOCODE 70
+#define YYNOCODE 69
 #define YYACTIONTYPE unsigned short int
 #define ParseTOKENTYPE  token * 
 typedef union {
@@ -107,16 +107,16 @@ typedef union {
 #define ParseARG_FETCH  mmd_engine * engine  = yypParser->engine 
 #define ParseARG_STORE yypParser->engine  = engine 
 #define YYFALLBACK 1
-#define YYNSTATE             51
-#define YYNRULE              110
-#define YY_MAX_SHIFT         50
-#define YY_MIN_SHIFTREDUCE   116
-#define YY_MAX_SHIFTREDUCE   225
-#define YY_MIN_REDUCE        226
-#define YY_MAX_REDUCE        335
-#define YY_ERROR_ACTION      336
-#define YY_ACCEPT_ACTION     337
-#define YY_NO_ACTION         338
+#define YYNSTATE             47
+#define YYNRULE              109
+#define YY_MAX_SHIFT         46
+#define YY_MIN_SHIFTREDUCE   111
+#define YY_MAX_SHIFTREDUCE   219
+#define YY_MIN_REDUCE        220
+#define YY_MAX_REDUCE        328
+#define YY_ERROR_ACTION      329
+#define YY_ACCEPT_ACTION     330
+#define YY_NO_ACTION         331
 /************* End control #defines *******************************************/
 
 /* Define the yytestcase() macro to be a no-op if is not already defined
@@ -188,29 +188,28 @@ typedef union {
 **  yy_default[]       Default action for each state.
 **
 *********** Begin parsing tables **********************************************/
-#define YY_ACTTAB_COUNT (207)
+#define YY_ACTTAB_COUNT (197)
 static const YYACTIONTYPE yy_action[] = {
- /*     0 */   226,   25,  143,  143,  196,  197,  208,   16,  121,  122,
- /*    10 */   123,  124,  125,  126,  132,   17,    5,    4,    3,    2,
- /*    20 */    18,   15,   14,  139,  198,   13,   25,   35,   35,  196,
- /*    30 */   197,  208,   16,  121,  122,  123,  124,  125,  126,  132,
- /*    40 */    17,    5,    4,    3,    2,   18,   15,   14,  139,  198,
- /*    50 */    13,  337,    1,  118,   31,   12,   49,   43,   41,  130,
- /*    60 */   131,  133,  134,  135,  136,  137,  138,   40,   46,   23,
- /*    70 */    23,   12,   32,   32,   43,  202,   41,  208,   11,   47,
- /*    80 */    33,   33,  222,   44,   24,   36,   36,  201,   40,  117,
- /*    90 */    31,   12,   49,   43,   41,  130,  131,  133,  134,  135,
- /*   100 */   136,  137,  138,   40,  221,   37,   37,   12,   34,   48,
- /*   110 */    43,  192,   41,   34,   11,   47,  198,  192,  182,  181,
- /*   120 */     6,    6,  217,   34,   40,    7,    7,   19,   34,   19,
- /*   130 */    38,   38,   21,   34,   21,    8,    8,   34,  198,  179,
- /*   140 */     9,    9,   26,  218,   26,  217,  142,   28,   34,   28,
- /*   150 */   142,   30,   20,  174,   20,   34,   22,   25,   22,  196,
- /*   160 */   197,  142,  208,  177,  217,   34,  218,   27,  142,   27,
- /*   170 */   146,  196,  197,  214,   29,  142,   29,  215,  165,  195,
- /*   180 */   144,   10,  175,   46,  164,  218,  157,   45,   45,   39,
- /*   190 */    39,  144,   42,   42,  160,    4,  161,    5,  165,  152,
- /*   200 */   147,  225,   50,  185,  144,  165,  188,
+ /*     0 */   220,   23,  138,  138,  189,  190,  202,   15,  116,  117,
+ /*    10 */   118,  119,  120,  121,  127,   16,    5,    4,    3,    2,
+ /*    20 */    17,   14,   13,  134,  191,   12,   23,   33,   33,  189,
+ /*    30 */   190,  202,   15,  116,  117,  118,  119,  120,  121,  127,
+ /*    40 */    16,    5,    4,    3,    2,   17,   14,   13,  134,  191,
+ /*    50 */    12,  330,    1,  113,   29,   11,   45,   40,   38,  125,
+ /*    60 */   126,  128,  129,  130,  131,  132,  133,  135,   43,   22,
+ /*    70 */    22,   11,   30,   30,   40,  217,   38,  202,   10,   44,
+ /*    80 */   112,   29,   11,   45,   40,   38,  125,  126,  128,  129,
+ /*    90 */   130,  131,  132,  133,  135,   32,   32,  216,   11,   32,
+ /*   100 */   208,   40,  191,   38,  209,   10,   44,    6,    6,  137,
+ /*   110 */    32,    7,    7,   32,   18,   19,   18,   19,   20,  185,
+ /*   120 */    20,  212,    8,    8,   32,    9,    9,   32,   32,   24,
+ /*   130 */   174,   24,   26,   41,   26,  212,  185,  137,  212,  172,
+ /*   140 */   137,  137,  213,   21,  160,   21,   25,   27,   25,   27,
+ /*   150 */   189,  190,   32,  170,  189,  190,  213,  191,   28,  213,
+ /*   160 */    31,   31,  156,   34,   34,  195,   35,   35,   36,   36,
+ /*   170 */   188,   43,  159,  152,  139,   37,   37,  194,   42,   42,
+ /*   180 */   155,   39,   39,    4,  160,  176,  169,  141,  137,    5,
+ /*   190 */   219,  142,  147,  139,   46,  178,  181,
 };
 static const YYCODETYPE yy_lookahead[] = {
  /*     0 */     0,    1,   47,   48,    4,    5,    6,    7,    8,    9,
@@ -221,50 +220,47 @@ static const YYCODETYPE yy_lookahead[] = {
  /*    50 */    25,   28,   29,   30,   31,   32,   33,   34,   35,   36,
  /*    60 */    37,   38,   39,   40,   41,   42,   43,   44,   56,   57,
  /*    70 */    58,   48,   61,   62,   51,    3,   53,    6,   55,   56,
- /*    80 */    61,   62,    3,   26,   31,   59,   60,   15,   65,   30,
- /*    90 */    31,   32,   33,   34,   35,   36,   37,   38,   39,   40,
- /*   100 */    41,   42,   43,   44,   25,   49,   50,   48,   33,   56,
- /*   110 */    51,    3,   53,   33,   55,   56,   24,    3,   65,   64,
- /*   120 */    45,   46,    3,   33,   65,   45,   46,   52,   33,   54,
- /*   130 */    45,   46,   52,   33,   54,   45,   46,   33,   24,   62,
- /*   140 */    45,   46,   52,   24,   54,    3,   46,   52,   33,   54,
- /*   150 */    46,   48,   52,   60,   54,   33,   52,    1,   54,    4,
- /*   160 */     5,   46,    6,   21,    3,   33,   24,   52,   46,   54,
- /*   170 */    50,    4,    5,    3,   52,   46,   54,    7,    6,   24,
- /*   180 */    24,   33,   21,   56,   57,   24,   54,   66,   67,   45,
- /*   190 */    46,   24,   45,   46,    2,   17,   24,   16,    6,   53,
- /*   200 */    51,    3,   68,   67,   24,    6,    3,
+ /*    80 */    30,   31,   32,   33,   34,   35,   36,   37,   38,   39,
+ /*    90 */    40,   41,   42,   43,   44,   33,   33,   25,   48,   33,
+ /*   100 */     3,   51,   24,   53,    7,   55,   56,   45,   46,   46,
+ /*   110 */    33,   45,   46,   33,   52,   52,   54,   54,   52,    3,
+ /*   120 */    54,    3,   45,   46,   33,   45,   46,   33,   33,   52,
+ /*   130 */    62,   54,   52,   26,   54,    3,    3,   46,    3,   21,
+ /*   140 */    46,   46,   24,   52,    6,   54,   52,   52,   54,   54,
+ /*   150 */     4,    5,   33,   21,    4,    5,   24,   24,   48,   24,
+ /*   160 */    61,   62,   24,   59,   60,    3,   49,   50,   45,   46,
+ /*   170 */    24,   56,   57,   54,   24,   45,   46,   15,   65,   66,
+ /*   180 */     2,   45,   46,   17,    6,   64,   60,   50,   46,   16,
+ /*   190 */     3,   51,   53,   24,   67,   66,    3,
 };
-#define YY_SHIFT_USE_DFLT (207)
-#define YY_SHIFT_COUNT    (50)
+#define YY_SHIFT_USE_DFLT (197)
+#define YY_SHIFT_COUNT    (46)
 #define YY_SHIFT_MIN      (0)
-#define YY_SHIFT_MAX      (203)
+#define YY_SHIFT_MAX      (193)
 static const unsigned char yy_shift_ofst[] = {
- /*     0 */    25,    0,  114,  114,  114,  114,  114,  114,  114,  114,
- /*    10 */   156,   71,  155,   79,  119,  119,  170,   72,  108,   92,
- /*    20 */    92,   92,   92,   71,   57,  108,   92,   92,   92,   92,
- /*    30 */   108,   57,  142,  161,  167,   79,  170,   72,  108,  108,
- /*    40 */    92,  178,  108,  181,  198,   57,  172,  192,  199,  180,
- /*    50 */   203,
+ /*     0 */    25,    0,  133,  133,  133,  133,  133,  133,  133,  133,
+ /*    10 */    71,  146,   72,  135,  135,   97,  162,  116,   78,   78,
+ /*    20 */    78,   78,   71,  116,   78,   78,   78,   78,  116,  107,
+ /*    30 */   118,  132,  150,   72,   97,  162,  116,  116,  166,  116,
+ /*    40 */   173,  187,  107,  138,  178,  169,  193,
 };
 #define YY_REDUCE_USE_DFLT (-46)
-#define YY_REDUCE_COUNT (45)
+#define YY_REDUCE_COUNT (42)
 #define YY_REDUCE_MIN   (-45)
-#define YY_REDUCE_MAX   (149)
+#define YY_REDUCE_MAX   (142)
 static const short yy_reduce_ofst[] = {
- /*     0 */    23,   59,   75,   80,   90,   95,  100,  104,  115,  122,
- /*    10 */    53,   12,  -45,  -36,   11,   19,   26,   56,   85,  132,
- /*    20 */   132,  132,  132,  127,  121,  144,  132,  132,  132,  132,
- /*    30 */   147,  121,   77,   77,  103,   55,   93,  120,  129,  129,
- /*    40 */   148,  146,  129,  149,  134,  136,
+ /*     0 */    23,   50,   62,   66,   77,   80,   63,   91,   94,   95,
+ /*    10 */    12,  -45,  -36,   11,   99,  104,  117,  123,  119,  119,
+ /*    20 */   119,  119,  115,  130,  119,  119,  119,  119,  136,  113,
+ /*    30 */    68,   68,  110,  121,  126,  137,  142,  142,  139,  142,
+ /*    40 */   140,  127,  129,
 };
 static const YYACTIONTYPE yy_default[] = {
- /*     0 */   336,  336,  320,  319,  266,  261,  280,  277,  264,  259,
- /*    10 */   293,  336,  230,  329,  336,  336,  322,  309,  321,  281,
- /*    20 */   279,  278,  276,  273,  336,  300,  265,  263,  260,  258,
- /*    30 */   269,  229,  288,  286,  316,  290,  283,  255,  282,  251,
- /*    40 */   250,  239,  268,  238,  297,  294,  272,  299,  299,  237,
- /*    50 */   296,
+ /*     0 */   329,  329,  313,  312,  260,  255,  274,  271,  258,  253,
+ /*    10 */   309,  224,  323,  320,  320,  315,  301,  314,  275,  273,
+ /*    20 */   272,  270,  267,  292,  259,  257,  254,  252,  263,  223,
+ /*    30 */   282,  280,  308,  284,  277,  249,  276,  245,  233,  262,
+ /*    40 */   232,  289,  286,  266,  291,  231,  288,
 };
 /********** End of lemon-generated parsing tables *****************************/
 
@@ -408,8 +404,7 @@ static const char *const yyTokenName[] = {
   "cont_blocks",   "item_enumerated",  "cont_block",    "table_header",
   "table_rows",    "table_section",  "table_body",    "html_block_lines",
   "html_block_line",  "fenced_lines",  "fenced_line",   "meta_lines",  
-  "meta_line",     "definition",    "defs",          "def",         
-  "def_lines",   
+  "meta_line",     "defs",          "def",           "def_lines",   
 };
 #endif /* NDEBUG */
 
@@ -483,50 +478,49 @@ static const char *const yyRuleName[] = {
  /*  63 */ "fenced_lines ::= fenced_lines fenced_line",
  /*  64 */ "meta_block ::= LINE_META meta_lines",
  /*  65 */ "meta_lines ::= meta_lines meta_line",
- /*  66 */ "definition_block ::= definition_block empty definition",
- /*  67 */ "definition_block ::= definition_block empty",
- /*  68 */ "definition ::= para defs",
- /*  69 */ "defs ::= defs def",
- /*  70 */ "def ::= LINE_DEFINITION def_lines",
- /*  71 */ "def ::= LINE_DEFINITION",
- /*  72 */ "def_lines ::= def_lines LINE_CONTINUATION",
- /*  73 */ "para ::= table_rows",
- /*  74 */ "para ::= LINE_PLAIN",
- /*  75 */ "para_lines ::= para_line",
- /*  76 */ "para_line ::= LINE_CONTINUATION",
- /*  77 */ "indented_code ::= indented_line",
- /*  78 */ "code_line ::= indented_line",
- /*  79 */ "code_line ::= LINE_EMPTY",
- /*  80 */ "indented_line ::= LINE_INDENTED_TAB",
- /*  81 */ "indented_line ::= LINE_INDENTED_SPACE",
- /*  82 */ "empty ::= LINE_EMPTY",
- /*  83 */ "blockquote ::= LINE_BLOCKQUOTE",
- /*  84 */ "quote_lines ::= quote_line",
- /*  85 */ "quote_line ::= LINE_BLOCKQUOTE",
- /*  86 */ "quote_line ::= LINE_CONTINUATION",
- /*  87 */ "list_bulleted ::= item_bulleted",
- /*  88 */ "list_enumerated ::= item_enumerated",
- /*  89 */ "cont_blocks ::= cont_block",
- /*  90 */ "cont_block ::= empty",
- /*  91 */ "table_body ::= table_section",
- /*  92 */ "table_rows ::= LINE_TABLE",
- /*  93 */ "def_citation ::= LINE_DEF_CITATION",
- /*  94 */ "def_footnote ::= LINE_DEF_FOOTNOTE",
- /*  95 */ "def_link ::= LINE_DEF_LINK",
- /*  96 */ "html_block ::= LINE_HTML",
- /*  97 */ "html_block_lines ::= html_block_line",
- /*  98 */ "html_block_line ::= LINE_CONTINUATION",
- /*  99 */ "html_block_line ::= LINE_HTML",
- /* 100 */ "fenced_lines ::= fenced_line",
+ /*  66 */ "definition_block ::= para defs",
+ /*  67 */ "defs ::= defs def",
+ /*  68 */ "def ::= LINE_DEFINITION def_lines",
+ /*  69 */ "def ::= LINE_DEFINITION",
+ /*  70 */ "def_lines ::= def_lines LINE_CONTINUATION",
+ /*  71 */ "para ::= table_rows",
+ /*  72 */ "para ::= LINE_PLAIN",
+ /*  73 */ "para_lines ::= para_line",
+ /*  74 */ "para_line ::= LINE_CONTINUATION",
+ /*  75 */ "indented_code ::= indented_line",
+ /*  76 */ "code_line ::= indented_line",
+ /*  77 */ "code_line ::= LINE_EMPTY",
+ /*  78 */ "indented_line ::= LINE_INDENTED_TAB",
+ /*  79 */ "indented_line ::= LINE_INDENTED_SPACE",
+ /*  80 */ "empty ::= LINE_EMPTY",
+ /*  81 */ "blockquote ::= LINE_BLOCKQUOTE",
+ /*  82 */ "quote_lines ::= quote_line",
+ /*  83 */ "quote_line ::= LINE_BLOCKQUOTE",
+ /*  84 */ "quote_line ::= LINE_CONTINUATION",
+ /*  85 */ "list_bulleted ::= item_bulleted",
+ /*  86 */ "list_enumerated ::= item_enumerated",
+ /*  87 */ "cont_blocks ::= cont_block",
+ /*  88 */ "cont_block ::= empty",
+ /*  89 */ "table ::= table_header",
+ /*  90 */ "table_body ::= table_section",
+ /*  91 */ "table_rows ::= LINE_TABLE",
+ /*  92 */ "def_citation ::= LINE_DEF_CITATION",
+ /*  93 */ "def_footnote ::= LINE_DEF_FOOTNOTE",
+ /*  94 */ "def_link ::= LINE_DEF_LINK",
+ /*  95 */ "html_block ::= LINE_HTML",
+ /*  96 */ "html_block_lines ::= html_block_line",
+ /*  97 */ "html_block_line ::= LINE_CONTINUATION",
+ /*  98 */ "html_block_line ::= LINE_HTML",
+ /*  99 */ "fenced_lines ::= fenced_line",
+ /* 100 */ "fenced_lines ::=",
  /* 101 */ "fenced_line ::= LINE_CONTINUATION",
  /* 102 */ "fenced_line ::= LINE_EMPTY",
  /* 103 */ "meta_block ::= LINE_META",
  /* 104 */ "meta_lines ::= meta_line",
  /* 105 */ "meta_line ::= LINE_META",
  /* 106 */ "meta_line ::= LINE_CONTINUATION",
- /* 107 */ "definition_block ::= definition",
- /* 108 */ "defs ::= def",
- /* 109 */ "def_lines ::= LINE_CONTINUATION",
+ /* 107 */ "defs ::= def",
+ /* 108 */ "def_lines ::= LINE_CONTINUATION",
 };
 #endif /* NDEBUG */
 
@@ -941,13 +935,11 @@ static const struct {
   { 61, 2 },
   { 43, 2 },
   { 63, 2 },
-  { 44, 3 },
   { 44, 2 },
   { 65, 2 },
   { 66, 2 },
+  { 66, 1 },
   { 67, 2 },
-  { 67, 1 },
-  { 68, 2 },
   { 31, 1 },
   { 31, 1 },
   { 45, 1 },
@@ -966,6 +958,7 @@ static const struct {
   { 35, 1 },
   { 52, 1 },
   { 54, 1 },
+  { 37, 1 },
   { 58, 1 },
   { 56, 1 },
   { 38, 1 },
@@ -976,15 +969,15 @@ static const struct {
   { 60, 1 },
   { 60, 1 },
   { 61, 1 },
+  { 61, 0 },
   { 62, 1 },
   { 62, 1 },
   { 43, 1 },
   { 63, 1 },
   { 64, 1 },
   { 64, 1 },
-  { 44, 1 },
-  { 66, 1 },
-  { 68, 1 },
+  { 65, 1 },
+  { 67, 1 },
 };
 
 static void yy_accept(yyParser*);  /* Forward Declaration */
@@ -1185,9 +1178,8 @@ static void yy_reduce(
       case 63: /* fenced_lines ::= fenced_lines fenced_line */ yytestcase(yyruleno==63);
       case 64: /* meta_block ::= LINE_META meta_lines */ yytestcase(yyruleno==64);
       case 65: /* meta_lines ::= meta_lines meta_line */ yytestcase(yyruleno==65);
-      case 67: /* definition_block ::= definition_block empty */ yytestcase(yyruleno==67);
-      case 69: /* defs ::= defs def */ yytestcase(yyruleno==69);
-      case 72: /* def_lines ::= def_lines LINE_CONTINUATION */ yytestcase(yyruleno==72);
+      case 67: /* defs ::= defs def */ yytestcase(yyruleno==67);
+      case 70: /* def_lines ::= def_lines LINE_CONTINUATION */ yytestcase(yyruleno==70);
 { yylhsminor.yy0 = yymsp[-1].minor.yy0; token_chain_append(yymsp[-1].minor.yy0, yymsp[0].minor.yy0); }
   yymsp[-1].minor.yy0 = yylhsminor.yy0;
         break;
@@ -1236,7 +1228,6 @@ static void yy_reduce(
         break;
       case 50: /* def_citation ::= LINE_DEF_CITATION para_lines cont_blocks */
       case 53: /* def_footnote ::= LINE_DEF_FOOTNOTE para_lines cont_blocks */ yytestcase(yyruleno==53);
-      case 66: /* definition_block ::= definition_block empty definition */ yytestcase(yyruleno==66);
 { 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[-2].minor.yy0 = yylhsminor.yy0;
         break;
@@ -1245,59 +1236,60 @@ static void yy_reduce(
 { 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[0].minor.yy0->child->type = CODE_FENCE; }
   yymsp[-2].minor.yy0 = yylhsminor.yy0;
         break;
-      case 68: /* definition ::= para defs */
-{ yylhsminor.yy0 = token_new_parent(yymsp[-1].minor.yy0, BLOCK_DEFINITION_GROUP); token_chain_append(yymsp[-1].minor.yy0, yymsp[0].minor.yy0); yymsp[-1].minor.yy0->type = BLOCK_TERM; }
+      case 66: /* 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 70: /* def ::= LINE_DEFINITION def_lines */
+      case 68: /* def ::= LINE_DEFINITION def_lines */
 { yylhsminor.yy0 = token_new_parent(yymsp[-1].minor.yy0, BLOCK_DEFINITION); token_chain_append(yymsp[-1].minor.yy0, yymsp[0].minor.yy0); }
   yymsp[-1].minor.yy0 = yylhsminor.yy0;
         break;
-      case 71: /* def ::= LINE_DEFINITION */
+      case 69: /* def ::= LINE_DEFINITION */
 { yylhsminor.yy0 = token_new_parent(yymsp[0].minor.yy0, BLOCK_DEFINITION); }
   yymsp[0].minor.yy0 = yylhsminor.yy0;
         break;
-      case 73: /* para ::= table_rows */
+      case 71: /* para ::= table_rows */
 { yylhsminor.yy0 = yymsp[0].minor.yy0; }
   yymsp[0].minor.yy0 = yylhsminor.yy0;
         break;
       default:
-      /* (74) para ::= LINE_PLAIN */ yytestcase(yyruleno==74);
-      /* (75) para_lines ::= para_line (OPTIMIZED OUT) */ assert(yyruleno!=75);
-      /* (76) para_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==76);
-      /* (77) indented_code ::= indented_line (OPTIMIZED OUT) */ assert(yyruleno!=77);
-      /* (78) code_line ::= indented_line (OPTIMIZED OUT) */ assert(yyruleno!=78);
-      /* (79) code_line ::= LINE_EMPTY */ yytestcase(yyruleno==79);
-      /* (80) indented_line ::= LINE_INDENTED_TAB */ yytestcase(yyruleno==80);
-      /* (81) indented_line ::= LINE_INDENTED_SPACE */ yytestcase(yyruleno==81);
-      /* (82) empty ::= LINE_EMPTY */ yytestcase(yyruleno==82);
-      /* (83) blockquote ::= LINE_BLOCKQUOTE */ yytestcase(yyruleno==83);
-      /* (84) quote_lines ::= quote_line (OPTIMIZED OUT) */ assert(yyruleno!=84);
-      /* (85) quote_line ::= LINE_BLOCKQUOTE */ yytestcase(yyruleno==85);
-      /* (86) quote_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==86);
-      /* (87) list_bulleted ::= item_bulleted (OPTIMIZED OUT) */ assert(yyruleno!=87);
-      /* (88) list_enumerated ::= item_enumerated (OPTIMIZED OUT) */ assert(yyruleno!=88);
-      /* (89) cont_blocks ::= cont_block (OPTIMIZED OUT) */ assert(yyruleno!=89);
-      /* (90) cont_block ::= empty */ yytestcase(yyruleno==90);
-      /* (91) table_body ::= table_section (OPTIMIZED OUT) */ assert(yyruleno!=91);
-      /* (92) table_rows ::= LINE_TABLE */ yytestcase(yyruleno==92);
-      /* (93) def_citation ::= LINE_DEF_CITATION */ yytestcase(yyruleno==93);
-      /* (94) def_footnote ::= LINE_DEF_FOOTNOTE */ yytestcase(yyruleno==94);
-      /* (95) def_link ::= LINE_DEF_LINK */ yytestcase(yyruleno==95);
-      /* (96) html_block ::= LINE_HTML */ yytestcase(yyruleno==96);
-      /* (97) html_block_lines ::= html_block_line (OPTIMIZED OUT) */ assert(yyruleno!=97);
-      /* (98) html_block_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==98);
-      /* (99) html_block_line ::= LINE_HTML */ yytestcase(yyruleno==99);
-      /* (100) fenced_lines ::= fenced_line (OPTIMIZED OUT) */ assert(yyruleno!=100);
+      /* (72) para ::= LINE_PLAIN */ yytestcase(yyruleno==72);
+      /* (73) para_lines ::= para_line (OPTIMIZED OUT) */ assert(yyruleno!=73);
+      /* (74) para_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==74);
+      /* (75) indented_code ::= indented_line (OPTIMIZED OUT) */ assert(yyruleno!=75);
+      /* (76) code_line ::= indented_line (OPTIMIZED OUT) */ assert(yyruleno!=76);
+      /* (77) code_line ::= LINE_EMPTY */ yytestcase(yyruleno==77);
+      /* (78) indented_line ::= LINE_INDENTED_TAB */ yytestcase(yyruleno==78);
+      /* (79) indented_line ::= LINE_INDENTED_SPACE */ yytestcase(yyruleno==79);
+      /* (80) empty ::= LINE_EMPTY */ yytestcase(yyruleno==80);
+      /* (81) blockquote ::= LINE_BLOCKQUOTE */ yytestcase(yyruleno==81);
+      /* (82) quote_lines ::= quote_line (OPTIMIZED OUT) */ assert(yyruleno!=82);
+      /* (83) quote_line ::= LINE_BLOCKQUOTE */ yytestcase(yyruleno==83);
+      /* (84) quote_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==84);
+      /* (85) list_bulleted ::= item_bulleted (OPTIMIZED OUT) */ assert(yyruleno!=85);
+      /* (86) list_enumerated ::= item_enumerated (OPTIMIZED OUT) */ assert(yyruleno!=86);
+      /* (87) cont_blocks ::= cont_block (OPTIMIZED OUT) */ assert(yyruleno!=87);
+      /* (88) cont_block ::= empty */ yytestcase(yyruleno==88);
+      /* (89) table ::= table_header */ yytestcase(yyruleno==89);
+      /* (90) table_body ::= table_section (OPTIMIZED OUT) */ assert(yyruleno!=90);
+      /* (91) table_rows ::= LINE_TABLE */ yytestcase(yyruleno==91);
+      /* (92) def_citation ::= LINE_DEF_CITATION */ yytestcase(yyruleno==92);
+      /* (93) def_footnote ::= LINE_DEF_FOOTNOTE */ yytestcase(yyruleno==93);
+      /* (94) def_link ::= LINE_DEF_LINK */ yytestcase(yyruleno==94);
+      /* (95) html_block ::= LINE_HTML */ yytestcase(yyruleno==95);
+      /* (96) html_block_lines ::= html_block_line (OPTIMIZED OUT) */ assert(yyruleno!=96);
+      /* (97) html_block_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==97);
+      /* (98) html_block_line ::= LINE_HTML */ yytestcase(yyruleno==98);
+      /* (99) fenced_lines ::= fenced_line (OPTIMIZED OUT) */ assert(yyruleno!=99);
+      /* (100) fenced_lines ::= */ yytestcase(yyruleno==100);
       /* (101) fenced_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==101);
       /* (102) fenced_line ::= LINE_EMPTY */ yytestcase(yyruleno==102);
       /* (103) meta_block ::= LINE_META */ yytestcase(yyruleno==103);
       /* (104) meta_lines ::= meta_line (OPTIMIZED OUT) */ assert(yyruleno!=104);
       /* (105) meta_line ::= LINE_META */ yytestcase(yyruleno==105);
       /* (106) meta_line ::= LINE_CONTINUATION */ yytestcase(yyruleno==106);
-      /* (107) definition_block ::= definition (OPTIMIZED OUT) */ assert(yyruleno!=107);
-      /* (108) defs ::= def (OPTIMIZED OUT) */ assert(yyruleno!=108);
-      /* (109) def_lines ::= LINE_CONTINUATION */ yytestcase(yyruleno==109);
+      /* (107) defs ::= def (OPTIMIZED OUT) */ assert(yyruleno!=107);
+      /* (108) def_lines ::= LINE_CONTINUATION */ yytestcase(yyruleno==108);
         break;
 /********** End reduce actions ************************************************/
   };
index 1d60a650ef19d37b1d8b40b3269fb7ea2f6bfd37..9d215991aa516e29077f8a9328d8851bae4edfff 100644 (file)
@@ -48,6 +48,7 @@ State 0:
           item_enumerated ::= * LINE_LIST_ENUMERATED
           table_header ::= * table_rows LINE_TABLE_SEPARATOR
           table ::= * table_header table_body
+          table ::= * table_header
           table_rows ::= * table_rows LINE_TABLE
           table_rows ::= * LINE_TABLE
           def_citation ::= * LINE_DEF_CITATION para_lines cont_blocks
@@ -68,17 +69,14 @@ State 0:
           fenced_block ::= * LINE_FENCE_BACKTICK_START fenced_lines
           meta_block ::= * LINE_META meta_lines
           meta_block ::= * LINE_META
-          definition_block ::= * definition_block empty definition
-          definition_block ::= * definition_block empty
-          definition_block ::= * definition
-          definition ::= * para defs
+          definition_block ::= * para defs
           para ::= * table_rows
 
-                    LINE_PLAIN shift        25     
-             LINE_INDENTED_TAB shift-reduce 80     indented_line ::= LINE_INDENTED_TAB
-           LINE_INDENTED_SPACE shift-reduce 81     indented_line ::= LINE_INDENTED_SPACE
-                    LINE_TABLE shift-reduce 92     table_rows ::= LINE_TABLE
-                     LINE_HTML shift        16     
+                    LINE_PLAIN shift        23     
+             LINE_INDENTED_TAB shift-reduce 78     indented_line ::= LINE_INDENTED_TAB
+           LINE_INDENTED_SPACE shift-reduce 79     indented_line ::= LINE_INDENTED_SPACE
+                    LINE_TABLE shift-reduce 91     table_rows ::= LINE_TABLE
+                     LINE_HTML shift        15     
                     LINE_ATX_1 shift-reduce 5      block ::= LINE_ATX_1
                     LINE_ATX_2 shift-reduce 6      block ::= LINE_ATX_2
                     LINE_ATX_3 shift-reduce 7      block ::= LINE_ATX_3
@@ -86,25 +84,25 @@ State 0:
                     LINE_ATX_5 shift-reduce 9      block ::= LINE_ATX_5
                     LINE_ATX_6 shift-reduce 10     block ::= LINE_ATX_6
                        LINE_HR shift-reduce 16     block ::= LINE_HR
-               LINE_BLOCKQUOTE shift        17     
+               LINE_BLOCKQUOTE shift        16     
             LINE_LIST_BULLETED shift        5      
           LINE_LIST_ENUMERATED shift        4      
              LINE_DEF_CITATION shift        3      
              LINE_DEF_FOOTNOTE shift        2      
-                 LINE_DEF_LINK shift        18     
-           LINE_FENCE_BACKTICK shift        15     
-     LINE_FENCE_BACKTICK_START shift        14     
+                 LINE_DEF_LINK shift        17     
+           LINE_FENCE_BACKTICK shift        14     
+     LINE_FENCE_BACKTICK_START shift        13     
                       LINE_TOC shift-reduce 23     block ::= LINE_TOC
-                    LINE_EMPTY shift-reduce 82     empty ::= LINE_EMPTY
-                     LINE_META shift        13     
+                    LINE_EMPTY shift-reduce 80     empty ::= LINE_EMPTY
+                     LINE_META shift        12     
                            doc accept
                         blocks shift        1      
                          block shift-reduce 2      blocks ::= block
-                          para shift        31     
-                 indented_code shift        12     
-                         empty shift        49     
-                 list_bulleted shift        43     
-               list_enumerated shift        41     
+                          para shift        29     
+                 indented_code shift        11     
+                         empty shift        45     
+                 list_bulleted shift        40     
+               list_enumerated shift        38     
                     blockquote shift-reduce 14     block ::= blockquote
                          table shift-reduce 15     block ::= table
                   def_citation shift-reduce 17     block ::= def_citation
@@ -113,13 +111,12 @@ State 0:
                     html_block shift-reduce 20     block ::= html_block
                   fenced_block shift-reduce 21     block ::= fenced_block
                     meta_block shift-reduce 22     block ::= meta_block
-              definition_block shift        40     
-                 indented_line shift        12       /* because indented_line==indented_code */
-                 item_bulleted shift        43       /* because item_bulleted==list_bulleted */
-               item_enumerated shift        41       /* because item_enumerated==list_enumerated */
-                  table_header shift        11     
-                    table_rows shift        47     
-                    definition shift        40       /* because definition==definition_block */
+              definition_block shift-reduce 24     block ::= definition_block
+                 indented_line shift        11       /* because indented_line==indented_code */
+                 item_bulleted shift        40       /* because item_bulleted==list_bulleted */
+               item_enumerated shift        38       /* because item_enumerated==list_enumerated */
+                  table_header shift        10     
+                    table_rows shift        44     
 
 State 1:
       (0) doc ::= blocks *
@@ -170,6 +167,7 @@ State 1:
           item_enumerated ::= * LINE_LIST_ENUMERATED
           table_header ::= * table_rows LINE_TABLE_SEPARATOR
           table ::= * table_header table_body
+          table ::= * table_header
           table_rows ::= * table_rows LINE_TABLE
           table_rows ::= * LINE_TABLE
           def_citation ::= * LINE_DEF_CITATION para_lines cont_blocks
@@ -190,18 +188,15 @@ State 1:
           fenced_block ::= * LINE_FENCE_BACKTICK_START fenced_lines
           meta_block ::= * LINE_META meta_lines
           meta_block ::= * LINE_META
-          definition_block ::= * definition_block empty definition
-          definition_block ::= * definition_block empty
-          definition_block ::= * definition
-          definition ::= * para defs
+          definition_block ::= * para defs
           para ::= * table_rows
 
                              $ reduce       0      doc ::= blocks
-                    LINE_PLAIN shift        25     
-             LINE_INDENTED_TAB shift-reduce 80     indented_line ::= LINE_INDENTED_TAB
-           LINE_INDENTED_SPACE shift-reduce 81     indented_line ::= LINE_INDENTED_SPACE
-                    LINE_TABLE shift-reduce 92     table_rows ::= LINE_TABLE
-                     LINE_HTML shift        16     
+                    LINE_PLAIN shift        23     
+             LINE_INDENTED_TAB shift-reduce 78     indented_line ::= LINE_INDENTED_TAB
+           LINE_INDENTED_SPACE shift-reduce 79     indented_line ::= LINE_INDENTED_SPACE
+                    LINE_TABLE shift-reduce 91     table_rows ::= LINE_TABLE
+                     LINE_HTML shift        15     
                     LINE_ATX_1 shift-reduce 5      block ::= LINE_ATX_1
                     LINE_ATX_2 shift-reduce 6      block ::= LINE_ATX_2
                     LINE_ATX_3 shift-reduce 7      block ::= LINE_ATX_3
@@ -209,23 +204,23 @@ State 1:
                     LINE_ATX_5 shift-reduce 9      block ::= LINE_ATX_5
                     LINE_ATX_6 shift-reduce 10     block ::= LINE_ATX_6
                        LINE_HR shift-reduce 16     block ::= LINE_HR
-               LINE_BLOCKQUOTE shift        17     
+               LINE_BLOCKQUOTE shift        16     
             LINE_LIST_BULLETED shift        5      
           LINE_LIST_ENUMERATED shift        4      
              LINE_DEF_CITATION shift        3      
              LINE_DEF_FOOTNOTE shift        2      
-                 LINE_DEF_LINK shift        18     
-           LINE_FENCE_BACKTICK shift        15     
-     LINE_FENCE_BACKTICK_START shift        14     
+                 LINE_DEF_LINK shift        17     
+           LINE_FENCE_BACKTICK shift        14     
+     LINE_FENCE_BACKTICK_START shift        13     
                       LINE_TOC shift-reduce 23     block ::= LINE_TOC
-                    LINE_EMPTY shift-reduce 82     empty ::= LINE_EMPTY
-                     LINE_META shift        13     
+                    LINE_EMPTY shift-reduce 80     empty ::= LINE_EMPTY
+                     LINE_META shift        12     
                          block shift-reduce 1      blocks ::= blocks block
-                          para shift        31     
-                 indented_code shift        12     
-                         empty shift        49     
-                 list_bulleted shift        43     
-               list_enumerated shift        41     
+                          para shift        29     
+                 indented_code shift        11     
+                         empty shift        45     
+                 list_bulleted shift        40     
+               list_enumerated shift        38     
                     blockquote shift-reduce 14     block ::= blockquote
                          table shift-reduce 15     block ::= table
                   def_citation shift-reduce 17     block ::= def_citation
@@ -234,13 +229,12 @@ State 1:
                     html_block shift-reduce 20     block ::= html_block
                   fenced_block shift-reduce 21     block ::= fenced_block
                     meta_block shift-reduce 22     block ::= meta_block
-              definition_block shift        40     
-                 indented_line shift        12       /* because indented_line==indented_code */
-                 item_bulleted shift        43       /* because item_bulleted==list_bulleted */
-               item_enumerated shift        41       /* because item_enumerated==list_enumerated */
-                  table_header shift        11     
-                    table_rows shift        47     
-                    definition shift        40       /* because definition==definition_block */
+              definition_block shift-reduce 24     block ::= definition_block
+                 indented_line shift        11       /* because indented_line==indented_code */
+                 item_bulleted shift        40       /* because item_bulleted==list_bulleted */
+               item_enumerated shift        38       /* because item_enumerated==list_enumerated */
+                  table_header shift        10     
+                    table_rows shift        44     
 
 State 2:
           para_lines ::= * para_lines para_line
@@ -256,17 +250,17 @@ State 2:
           def_footnote ::= LINE_DEF_FOOTNOTE * para_lines cont_blocks
           def_footnote ::= LINE_DEF_FOOTNOTE * para_lines
           def_footnote ::= LINE_DEF_FOOTNOTE * cont_blocks
-     (94) def_footnote ::= LINE_DEF_FOOTNOTE *
+     (93) def_footnote ::= LINE_DEF_FOOTNOTE *
 
-             LINE_CONTINUATION shift-reduce 76     para_line ::= LINE_CONTINUATION
-                    LINE_EMPTY shift-reduce 82     empty ::= LINE_EMPTY
-                    LINE_EMPTY reduce       94      ** Parsing conflict **
-                         empty shift        34     
+             LINE_CONTINUATION shift-reduce 74     para_line ::= LINE_CONTINUATION
+                    LINE_EMPTY shift-reduce 80     empty ::= LINE_EMPTY
+                    LINE_EMPTY reduce       93      ** Parsing conflict **
+                         empty shift        32     
                     para_lines shift        6      
                      para_line shift        6        /* because para_line==para_lines */
-                   cont_blocks shift        19     
-                    cont_block shift        19       /* because cont_block==cont_blocks */
-                     {default} reduce       94     def_footnote ::= LINE_DEF_FOOTNOTE
+                   cont_blocks shift        18     
+                    cont_block shift        18       /* because cont_block==cont_blocks */
+                     {default} reduce       93     def_footnote ::= LINE_DEF_FOOTNOTE
 
 State 3:
           para_lines ::= * para_lines para_line
@@ -282,17 +276,17 @@ State 3:
           def_citation ::= LINE_DEF_CITATION * para_lines cont_blocks
           def_citation ::= LINE_DEF_CITATION * para_lines
           def_citation ::= LINE_DEF_CITATION * cont_blocks
-     (93) def_citation ::= LINE_DEF_CITATION *
+     (92) def_citation ::= LINE_DEF_CITATION *
 
-             LINE_CONTINUATION shift-reduce 76     para_line ::= LINE_CONTINUATION
-                    LINE_EMPTY shift-reduce 82     empty ::= LINE_EMPTY
-                    LINE_EMPTY reduce       93      ** Parsing conflict **
-                         empty shift        34     
+             LINE_CONTINUATION shift-reduce 74     para_line ::= LINE_CONTINUATION
+                    LINE_EMPTY shift-reduce 80     empty ::= LINE_EMPTY
+                    LINE_EMPTY reduce       92      ** Parsing conflict **
+                         empty shift        32     
                     para_lines shift        7      
                      para_line shift        7        /* because para_line==para_lines */
-                   cont_blocks shift        21     
-                    cont_block shift        21       /* because cont_block==cont_blocks */
-                     {default} reduce       93     def_citation ::= LINE_DEF_CITATION
+                   cont_blocks shift        20     
+                    cont_block shift        20       /* because cont_block==cont_blocks */
+                     {default} reduce       92     def_citation ::= LINE_DEF_CITATION
 
 State 4:
           para_lines ::= * para_lines para_line
@@ -310,14 +304,14 @@ State 4:
           cont_block ::= * empty indented_line
           cont_block ::= * empty
 
-             LINE_CONTINUATION shift-reduce 76     para_line ::= LINE_CONTINUATION
-                    LINE_EMPTY shift-reduce 82     empty ::= LINE_EMPTY
+             LINE_CONTINUATION shift-reduce 74     para_line ::= LINE_CONTINUATION
+                    LINE_EMPTY shift-reduce 80     empty ::= LINE_EMPTY
                     LINE_EMPTY reduce       40      ** Parsing conflict **
-                         empty shift        34     
+                         empty shift        32     
                     para_lines shift        8      
                      para_line shift        8        /* because para_line==para_lines */
-                   cont_blocks shift        26     
-                    cont_block shift        26       /* because cont_block==cont_blocks */
+                   cont_blocks shift        24     
+                    cont_block shift        24       /* because cont_block==cont_blocks */
                      {default} reduce       40     item_enumerated ::= LINE_LIST_ENUMERATED
 
 State 5:
@@ -336,14 +330,14 @@ State 5:
           cont_block ::= * empty indented_line
           cont_block ::= * empty
 
-             LINE_CONTINUATION shift-reduce 76     para_line ::= LINE_CONTINUATION
-                    LINE_EMPTY shift-reduce 82     empty ::= LINE_EMPTY
+             LINE_CONTINUATION shift-reduce 74     para_line ::= LINE_CONTINUATION
+                    LINE_EMPTY shift-reduce 80     empty ::= LINE_EMPTY
                     LINE_EMPTY reduce       35      ** Parsing conflict **
-                         empty shift        34     
+                         empty shift        32     
                     para_lines shift        9      
                      para_line shift        9        /* because para_line==para_lines */
-                   cont_blocks shift        28     
-                    cont_block shift        28       /* because cont_block==cont_blocks */
+                   cont_blocks shift        26     
+                    cont_block shift        26       /* because cont_block==cont_blocks */
                      {default} reduce       35     item_bulleted ::= LINE_LIST_BULLETED
 
 State 6:
@@ -359,13 +353,13 @@ State 6:
           def_footnote ::= LINE_DEF_FOOTNOTE para_lines * cont_blocks
      (54) def_footnote ::= LINE_DEF_FOOTNOTE para_lines *
 
-             LINE_CONTINUATION shift-reduce 76     para_line ::= LINE_CONTINUATION
-                    LINE_EMPTY shift-reduce 82     empty ::= LINE_EMPTY
+             LINE_CONTINUATION shift-reduce 74     para_line ::= LINE_CONTINUATION
+                    LINE_EMPTY shift-reduce 80     empty ::= LINE_EMPTY
                     LINE_EMPTY reduce       54      ** Parsing conflict **
-                         empty shift        34     
+                         empty shift        32     
                      para_line shift-reduce 26     para_lines ::= para_lines para_line
-                   cont_blocks shift        20     
-                    cont_block shift        20       /* because cont_block==cont_blocks */
+                   cont_blocks shift        19     
+                    cont_block shift        19       /* because cont_block==cont_blocks */
                      {default} reduce       54     def_footnote ::= LINE_DEF_FOOTNOTE para_lines
 
 State 7:
@@ -381,13 +375,13 @@ State 7:
           def_citation ::= LINE_DEF_CITATION para_lines * cont_blocks
      (51) def_citation ::= LINE_DEF_CITATION para_lines *
 
-             LINE_CONTINUATION shift-reduce 76     para_line ::= LINE_CONTINUATION
-                    LINE_EMPTY shift-reduce 82     empty ::= LINE_EMPTY
+             LINE_CONTINUATION shift-reduce 74     para_line ::= LINE_CONTINUATION
+                    LINE_EMPTY shift-reduce 80     empty ::= LINE_EMPTY
                     LINE_EMPTY reduce       51      ** Parsing conflict **
-                         empty shift        34     
+                         empty shift        32     
                      para_line shift-reduce 26     para_lines ::= para_lines para_line
-                   cont_blocks shift        22     
-                    cont_block shift        22       /* because cont_block==cont_blocks */
+                   cont_blocks shift        21     
+                    cont_block shift        21       /* because cont_block==cont_blocks */
                      {default} reduce       51     def_citation ::= LINE_DEF_CITATION para_lines
 
 State 8:
@@ -403,13 +397,13 @@ State 8:
           cont_block ::= * empty indented_line
           cont_block ::= * empty
 
-             LINE_CONTINUATION shift-reduce 76     para_line ::= LINE_CONTINUATION
-                    LINE_EMPTY shift-reduce 82     empty ::= LINE_EMPTY
+             LINE_CONTINUATION shift-reduce 74     para_line ::= LINE_CONTINUATION
+                    LINE_EMPTY shift-reduce 80     empty ::= LINE_EMPTY
                     LINE_EMPTY reduce       38      ** Parsing conflict **
-                         empty shift        34     
+                         empty shift        32     
                      para_line shift-reduce 26     para_lines ::= para_lines para_line
-                   cont_blocks shift        27     
-                    cont_block shift        27       /* because cont_block==cont_blocks */
+                   cont_blocks shift        25     
+                    cont_block shift        25       /* because cont_block==cont_blocks */
                      {default} reduce       38     item_enumerated ::= LINE_LIST_ENUMERATED para_lines
 
 State 9:
@@ -425,52 +419,33 @@ State 9:
           cont_block ::= * empty indented_line
           cont_block ::= * empty
 
-             LINE_CONTINUATION shift-reduce 76     para_line ::= LINE_CONTINUATION
-                    LINE_EMPTY shift-reduce 82     empty ::= LINE_EMPTY
+             LINE_CONTINUATION shift-reduce 74     para_line ::= LINE_CONTINUATION
+                    LINE_EMPTY shift-reduce 80     empty ::= LINE_EMPTY
                     LINE_EMPTY reduce       33      ** Parsing conflict **
-                         empty shift        34     
+                         empty shift        32     
                      para_line shift-reduce 26     para_lines ::= para_lines para_line
-                   cont_blocks shift        29     
-                    cont_block shift        29       /* because cont_block==cont_blocks */
+                   cont_blocks shift        27     
+                    cont_block shift        27       /* because cont_block==cont_blocks */
                      {default} reduce       33     item_bulleted ::= LINE_LIST_BULLETED para_lines
 
 State 10:
-          para ::= * LINE_PLAIN para_lines
-          para ::= * LINE_PLAIN
-          empty ::= empty * LINE_EMPTY
-          table_rows ::= * table_rows LINE_TABLE
-          table_rows ::= * LINE_TABLE
-          definition_block ::= definition_block empty * definition
-     (67) definition_block ::= definition_block empty *
-          definition ::= * para defs
-          para ::= * table_rows
-
-                    LINE_PLAIN shift        25     
-                    LINE_PLAIN reduce       67      ** Parsing conflict **
-                    LINE_TABLE shift-reduce 92     table_rows ::= LINE_TABLE
-                    LINE_TABLE reduce       67      ** Parsing conflict **
-                    LINE_EMPTY shift-reduce 28     empty ::= empty LINE_EMPTY
-                    LINE_EMPTY reduce       67      ** Parsing conflict **
-                          para shift        24     
-                    table_rows shift        48     
-                    definition shift-reduce 66     definition_block ::= definition_block empty definition
-                     {default} reduce       67     definition_block ::= definition_block empty
-
-State 11:
           table_section ::= * table_rows LINE_EMPTY
           table_section ::= * table_rows
           table ::= table_header * table_body
+     (89) table ::= table_header *
           table_body ::= * table_body table_section
           table_body ::= * table_section
           table_rows ::= * table_rows LINE_TABLE
           table_rows ::= * LINE_TABLE
 
-                    LINE_TABLE shift-reduce 92     table_rows ::= LINE_TABLE
-                    table_rows shift        46     
-                 table_section shift        23       /* because table_section==table_body */
-                    table_body shift        23     
+                    LINE_TABLE shift-reduce 91     table_rows ::= LINE_TABLE
+                    LINE_TABLE reduce       89      ** Parsing conflict **
+                    table_rows shift        43     
+                 table_section shift        22       /* because table_section==table_body */
+                    table_body shift        22     
+                     {default} reduce       89     table ::= table_header
 
-State 12:
+State 11:
       (4) block ::= indented_code *
           indented_code ::= indented_code * code_line
           code_line ::= * indented_line
@@ -478,17 +453,17 @@ State 12:
           indented_line ::= * LINE_INDENTED_TAB
           indented_line ::= * LINE_INDENTED_SPACE
 
-             LINE_INDENTED_TAB shift-reduce 80     indented_line ::= LINE_INDENTED_TAB
+             LINE_INDENTED_TAB shift-reduce 78     indented_line ::= LINE_INDENTED_TAB
              LINE_INDENTED_TAB reduce       4       ** Parsing conflict **
-           LINE_INDENTED_SPACE shift-reduce 81     indented_line ::= LINE_INDENTED_SPACE
+           LINE_INDENTED_SPACE shift-reduce 79     indented_line ::= LINE_INDENTED_SPACE
            LINE_INDENTED_SPACE reduce       4       ** Parsing conflict **
-                    LINE_EMPTY shift-reduce 79     code_line ::= LINE_EMPTY
+                    LINE_EMPTY shift-reduce 77     code_line ::= LINE_EMPTY
                     LINE_EMPTY reduce       4       ** Parsing conflict **
                      code_line shift-reduce 27     indented_code ::= indented_code code_line
                  indented_line shift-reduce 27     indented_code ::= indented_code code_line  /* because indented_line==code_line */
                      {default} reduce       4      block ::= indented_code
 
-State 13:
+State 12:
           meta_block ::= LINE_META * meta_lines
     (103) meta_block ::= LINE_META *
           meta_lines ::= * meta_lines meta_line
@@ -499,79 +474,87 @@ State 13:
              LINE_CONTINUATION shift-reduce 106    meta_line ::= LINE_CONTINUATION
                      LINE_META shift-reduce 105    meta_line ::= LINE_META
                      LINE_META reduce       103     ** Parsing conflict **
-                    meta_lines shift        35     
-                     meta_line shift        35       /* because meta_line==meta_lines */
+                    meta_lines shift        33     
+                     meta_line shift        33       /* because meta_line==meta_lines */
                      {default} reduce       103    meta_block ::= LINE_META
 
-State 14:
+State 13:
           fenced_block ::= LINE_FENCE_BACKTICK_START * fenced_lines LINE_FENCE_BACKTICK
           fenced_block ::= LINE_FENCE_BACKTICK_START * fenced_lines
           fenced_lines ::= * fenced_lines fenced_line
           fenced_lines ::= * fenced_line
+    (100) fenced_lines ::= *
           fenced_line ::= * LINE_CONTINUATION
           fenced_line ::= * LINE_EMPTY
 
              LINE_CONTINUATION shift-reduce 101    fenced_line ::= LINE_CONTINUATION
+             LINE_CONTINUATION reduce       100     ** Parsing conflict **
                     LINE_EMPTY shift-reduce 102    fenced_line ::= LINE_EMPTY
-                  fenced_lines shift        32     
-                   fenced_line shift        32       /* because fenced_line==fenced_lines */
+                    LINE_EMPTY reduce       100     ** Parsing conflict **
+                  fenced_lines shift        30     
+                   fenced_line shift        30       /* because fenced_line==fenced_lines */
+                     {default} reduce       100    fenced_lines ::=
 
-State 15:
+State 14:
           fenced_block ::= LINE_FENCE_BACKTICK * fenced_lines LINE_FENCE_BACKTICK
           fenced_block ::= LINE_FENCE_BACKTICK * fenced_lines
           fenced_lines ::= * fenced_lines fenced_line
           fenced_lines ::= * fenced_line
+    (100) fenced_lines ::= *
           fenced_line ::= * LINE_CONTINUATION
           fenced_line ::= * LINE_EMPTY
 
              LINE_CONTINUATION shift-reduce 101    fenced_line ::= LINE_CONTINUATION
+             LINE_CONTINUATION reduce       100     ** Parsing conflict **
                     LINE_EMPTY shift-reduce 102    fenced_line ::= LINE_EMPTY
-                  fenced_lines shift        33     
-                   fenced_line shift        33       /* because fenced_line==fenced_lines */
+                    LINE_EMPTY reduce       100     ** Parsing conflict **
+                  fenced_lines shift        31     
+                   fenced_line shift        31       /* because fenced_line==fenced_lines */
+                     {default} reduce       100    fenced_lines ::=
 
-State 16:
+State 15:
           html_block ::= LINE_HTML * html_block_lines
-     (96) html_block ::= LINE_HTML *
+     (95) html_block ::= LINE_HTML *
           html_block_lines ::= * html_block_lines html_block_line
           html_block_lines ::= * html_block_line
           html_block_line ::= * LINE_CONTINUATION
           html_block_line ::= * LINE_HTML
 
-             LINE_CONTINUATION shift-reduce 98     html_block_line ::= LINE_CONTINUATION
-                     LINE_HTML shift-reduce 99     html_block_line ::= LINE_HTML
-                     LINE_HTML reduce       96      ** Parsing conflict **
-              html_block_lines shift        36     
-               html_block_line shift        36       /* because html_block_line==html_block_lines */
-                     {default} reduce       96     html_block ::= LINE_HTML
+             LINE_CONTINUATION shift-reduce 97     html_block_line ::= LINE_CONTINUATION
+                     LINE_HTML shift-reduce 98     html_block_line ::= LINE_HTML
+                     LINE_HTML reduce       95      ** Parsing conflict **
+              html_block_lines shift        34     
+               html_block_line shift        34       /* because html_block_line==html_block_lines */
+                     {default} reduce       95     html_block ::= LINE_HTML
 
-State 17:
+State 16:
           blockquote ::= LINE_BLOCKQUOTE * quote_lines
-     (83) blockquote ::= LINE_BLOCKQUOTE *
+     (81) blockquote ::= LINE_BLOCKQUOTE *
           quote_lines ::= * quote_lines quote_line
           quote_lines ::= * quote_line
           quote_line ::= * LINE_BLOCKQUOTE
           quote_line ::= * LINE_CONTINUATION
 
-             LINE_CONTINUATION shift-reduce 86     quote_line ::= LINE_CONTINUATION
-               LINE_BLOCKQUOTE shift-reduce 85     quote_line ::= LINE_BLOCKQUOTE
-               LINE_BLOCKQUOTE reduce       83      ** Parsing conflict **
-                   quote_lines shift        37     
-                    quote_line shift        37       /* because quote_line==quote_lines */
-                     {default} reduce       83     blockquote ::= LINE_BLOCKQUOTE
+             LINE_CONTINUATION shift-reduce 84     quote_line ::= LINE_CONTINUATION
+               LINE_BLOCKQUOTE shift-reduce 83     quote_line ::= LINE_BLOCKQUOTE
+               LINE_BLOCKQUOTE reduce       81      ** Parsing conflict **
+                   quote_lines shift        35     
+                    quote_line shift        35       /* because quote_line==quote_lines */
+                     {default} reduce       81     blockquote ::= LINE_BLOCKQUOTE
 
-State 18:
+State 17:
           para_lines ::= * para_lines para_line
           para_lines ::= * para_line
           para_line ::= * LINE_CONTINUATION
           def_link ::= LINE_DEF_LINK * para_lines
-     (95) def_link ::= LINE_DEF_LINK *
+     (94) def_link ::= LINE_DEF_LINK *
 
-             LINE_CONTINUATION shift-reduce 76     para_line ::= LINE_CONTINUATION
-                    para_lines shift        38     
-                     para_line shift        38       /* because para_line==para_lines */
-                     {default} reduce       95     def_link ::= LINE_DEF_LINK
+             LINE_CONTINUATION shift-reduce 74     para_line ::= LINE_CONTINUATION
+                    para_lines shift        36     
+                     para_line shift        36       /* because para_line==para_lines */
+                     {default} reduce       94     def_link ::= LINE_DEF_LINK
 
-State 19:
+State 18:
           empty ::= * empty LINE_EMPTY
           empty ::= * LINE_EMPTY
           cont_blocks ::= cont_blocks * cont_block
@@ -580,13 +563,13 @@ State 19:
           cont_block ::= * empty
      (55) def_footnote ::= LINE_DEF_FOOTNOTE cont_blocks *
 
-                    LINE_EMPTY shift-reduce 82     empty ::= LINE_EMPTY
+                    LINE_EMPTY shift-reduce 80     empty ::= LINE_EMPTY
                     LINE_EMPTY reduce       55      ** Parsing conflict **
-                         empty shift        34     
+                         empty shift        32     
                     cont_block shift-reduce 41     cont_blocks ::= cont_blocks cont_block
                      {default} reduce       55     def_footnote ::= LINE_DEF_FOOTNOTE cont_blocks
 
-State 20:
+State 19:
           empty ::= * empty LINE_EMPTY
           empty ::= * LINE_EMPTY
           cont_blocks ::= cont_blocks * cont_block
@@ -595,13 +578,13 @@ State 20:
           cont_block ::= * empty
      (53) def_footnote ::= LINE_DEF_FOOTNOTE para_lines cont_blocks *
 
-                    LINE_EMPTY shift-reduce 82     empty ::= LINE_EMPTY
+                    LINE_EMPTY shift-reduce 80     empty ::= LINE_EMPTY
                     LINE_EMPTY reduce       53      ** Parsing conflict **
-                         empty shift        34     
+                         empty shift        32     
                     cont_block shift-reduce 41     cont_blocks ::= cont_blocks cont_block
                      {default} reduce       53     def_footnote ::= LINE_DEF_FOOTNOTE para_lines cont_blocks
 
-State 21:
+State 20:
           empty ::= * empty LINE_EMPTY
           empty ::= * LINE_EMPTY
           cont_blocks ::= cont_blocks * cont_block
@@ -610,13 +593,13 @@ State 21:
           cont_block ::= * empty
      (52) def_citation ::= LINE_DEF_CITATION cont_blocks *
 
-                    LINE_EMPTY shift-reduce 82     empty ::= LINE_EMPTY
+                    LINE_EMPTY shift-reduce 80     empty ::= LINE_EMPTY
                     LINE_EMPTY reduce       52      ** Parsing conflict **
-                         empty shift        34     
+                         empty shift        32     
                     cont_block shift-reduce 41     cont_blocks ::= cont_blocks cont_block
                      {default} reduce       52     def_citation ::= LINE_DEF_CITATION cont_blocks
 
-State 22:
+State 21:
           empty ::= * empty LINE_EMPTY
           empty ::= * LINE_EMPTY
           cont_blocks ::= cont_blocks * cont_block
@@ -625,13 +608,13 @@ State 22:
           cont_block ::= * empty
      (50) def_citation ::= LINE_DEF_CITATION para_lines cont_blocks *
 
-                    LINE_EMPTY shift-reduce 82     empty ::= LINE_EMPTY
+                    LINE_EMPTY shift-reduce 80     empty ::= LINE_EMPTY
                     LINE_EMPTY reduce       50      ** Parsing conflict **
-                         empty shift        34     
+                         empty shift        32     
                     cont_block shift-reduce 41     cont_blocks ::= cont_blocks cont_block
                      {default} reduce       50     def_citation ::= LINE_DEF_CITATION para_lines cont_blocks
 
-State 23:
+State 22:
           table_section ::= * table_rows LINE_EMPTY
           table_section ::= * table_rows
      (47) table ::= table_header table_body *
@@ -639,36 +622,25 @@ State 23:
           table_rows ::= * table_rows LINE_TABLE
           table_rows ::= * LINE_TABLE
 
-                    LINE_TABLE shift-reduce 92     table_rows ::= LINE_TABLE
+                    LINE_TABLE shift-reduce 91     table_rows ::= LINE_TABLE
                     LINE_TABLE reduce       47      ** Parsing conflict **
-                    table_rows shift        46     
+                    table_rows shift        43     
                  table_section shift-reduce 48     table_body ::= table_body table_section
                      {default} reduce       47     table ::= table_header table_body
 
-State 24:
-          definition ::= para * defs
-          defs ::= * defs def
-          defs ::= * def
-          def ::= * LINE_DEFINITION def_lines
-          def ::= * LINE_DEFINITION
-
-               LINE_DEFINITION shift        44     
-                          defs shift        45     
-                           def shift        45       /* because def==defs */
-
-State 25:
+State 23:
           para ::= LINE_PLAIN * para_lines
-     (74) para ::= LINE_PLAIN *
+     (72) para ::= LINE_PLAIN *
           para_lines ::= * para_lines para_line
           para_lines ::= * para_line
           para_line ::= * LINE_CONTINUATION
 
-             LINE_CONTINUATION shift-reduce 76     para_line ::= LINE_CONTINUATION
-                    para_lines shift        39     
-                     para_line shift        39       /* because para_line==para_lines */
-                     {default} reduce       74     para ::= LINE_PLAIN
+             LINE_CONTINUATION shift-reduce 74     para_line ::= LINE_CONTINUATION
+                    para_lines shift        37     
+                     para_line shift        37       /* because para_line==para_lines */
+                     {default} reduce       72     para ::= LINE_PLAIN
 
-State 26:
+State 24:
           empty ::= * empty LINE_EMPTY
           empty ::= * LINE_EMPTY
      (39) item_enumerated ::= LINE_LIST_ENUMERATED cont_blocks *
@@ -677,13 +649,13 @@ State 26:
           cont_block ::= * empty indented_line
           cont_block ::= * empty
 
-                    LINE_EMPTY shift-reduce 82     empty ::= LINE_EMPTY
+                    LINE_EMPTY shift-reduce 80     empty ::= LINE_EMPTY
                     LINE_EMPTY reduce       39      ** Parsing conflict **
-                         empty shift        34     
+                         empty shift        32     
                     cont_block shift-reduce 41     cont_blocks ::= cont_blocks cont_block
                      {default} reduce       39     item_enumerated ::= LINE_LIST_ENUMERATED cont_blocks
 
-State 27:
+State 25:
           empty ::= * empty LINE_EMPTY
           empty ::= * LINE_EMPTY
      (37) item_enumerated ::= LINE_LIST_ENUMERATED para_lines cont_blocks *
@@ -692,13 +664,13 @@ State 27:
           cont_block ::= * empty indented_line
           cont_block ::= * empty
 
-                    LINE_EMPTY shift-reduce 82     empty ::= LINE_EMPTY
+                    LINE_EMPTY shift-reduce 80     empty ::= LINE_EMPTY
                     LINE_EMPTY reduce       37      ** Parsing conflict **
-                         empty shift        34     
+                         empty shift        32     
                     cont_block shift-reduce 41     cont_blocks ::= cont_blocks cont_block
                      {default} reduce       37     item_enumerated ::= LINE_LIST_ENUMERATED para_lines cont_blocks
 
-State 28:
+State 26:
           empty ::= * empty LINE_EMPTY
           empty ::= * LINE_EMPTY
      (34) item_bulleted ::= LINE_LIST_BULLETED cont_blocks *
@@ -707,13 +679,13 @@ State 28:
           cont_block ::= * empty indented_line
           cont_block ::= * empty
 
-                    LINE_EMPTY shift-reduce 82     empty ::= LINE_EMPTY
+                    LINE_EMPTY shift-reduce 80     empty ::= LINE_EMPTY
                     LINE_EMPTY reduce       34      ** Parsing conflict **
-                         empty shift        34     
+                         empty shift        32     
                     cont_block shift-reduce 41     cont_blocks ::= cont_blocks cont_block
                      {default} reduce       34     item_bulleted ::= LINE_LIST_BULLETED cont_blocks
 
-State 29:
+State 27:
           empty ::= * empty LINE_EMPTY
           empty ::= * LINE_EMPTY
      (32) item_bulleted ::= LINE_LIST_BULLETED para_lines cont_blocks *
@@ -722,38 +694,38 @@ State 29:
           cont_block ::= * empty indented_line
           cont_block ::= * empty
 
-                    LINE_EMPTY shift-reduce 82     empty ::= LINE_EMPTY
+                    LINE_EMPTY shift-reduce 80     empty ::= LINE_EMPTY
                     LINE_EMPTY reduce       32      ** Parsing conflict **
-                         empty shift        34     
+                         empty shift        32     
                     cont_block shift-reduce 41     cont_blocks ::= cont_blocks cont_block
                      {default} reduce       32     item_bulleted ::= LINE_LIST_BULLETED para_lines cont_blocks
 
-State 30:
+State 28:
           para_lines ::= * para_lines para_line
           para_lines ::= * para_line
           para_line ::= * LINE_CONTINUATION
           cont_block ::= empty indented_line * para_lines
      (43) cont_block ::= empty indented_line *
 
-             LINE_CONTINUATION shift-reduce 76     para_line ::= LINE_CONTINUATION
-                    para_lines shift        42     
-                     para_line shift        42       /* because para_line==para_lines */
+             LINE_CONTINUATION shift-reduce 74     para_line ::= LINE_CONTINUATION
+                    para_lines shift        39     
+                     para_line shift        39       /* because para_line==para_lines */
                      {default} reduce       43     cont_block ::= empty indented_line
 
-State 31:
+State 29:
       (3) block ::= para *
-          definition ::= para * defs
+          definition_block ::= para * defs
           defs ::= * defs def
           defs ::= * def
           def ::= * LINE_DEFINITION def_lines
           def ::= * LINE_DEFINITION
 
-               LINE_DEFINITION shift        44     
-                          defs shift        45     
-                           def shift        45       /* because def==defs */
+               LINE_DEFINITION shift        41     
+                          defs shift        42     
+                           def shift        42       /* because def==defs */
                      {default} reduce       3      block ::= para
 
-State 32:
+State 30:
           fenced_block ::= LINE_FENCE_BACKTICK_START fenced_lines * LINE_FENCE_BACKTICK
      (62) fenced_block ::= LINE_FENCE_BACKTICK_START fenced_lines *
           fenced_lines ::= fenced_lines * fenced_line
@@ -768,7 +740,7 @@ State 32:
                    fenced_line shift-reduce 63     fenced_lines ::= fenced_lines fenced_line
                      {default} reduce       62     fenced_block ::= LINE_FENCE_BACKTICK_START fenced_lines
 
-State 33:
+State 31:
           fenced_block ::= LINE_FENCE_BACKTICK fenced_lines * LINE_FENCE_BACKTICK
      (60) fenced_block ::= LINE_FENCE_BACKTICK fenced_lines *
           fenced_lines ::= fenced_lines * fenced_line
@@ -783,24 +755,24 @@ State 33:
                    fenced_line shift-reduce 63     fenced_lines ::= fenced_lines fenced_line
                      {default} reduce       60     fenced_block ::= LINE_FENCE_BACKTICK fenced_lines
 
-State 34:
+State 32:
           indented_line ::= * LINE_INDENTED_TAB
           indented_line ::= * LINE_INDENTED_SPACE
           empty ::= empty * LINE_EMPTY
           cont_block ::= empty * indented_line para_lines
           cont_block ::= empty * indented_line
-     (90) cont_block ::= empty *
+     (88) cont_block ::= empty *
 
-             LINE_INDENTED_TAB shift-reduce 80     indented_line ::= LINE_INDENTED_TAB
-             LINE_INDENTED_TAB reduce       90      ** Parsing conflict **
-           LINE_INDENTED_SPACE shift-reduce 81     indented_line ::= LINE_INDENTED_SPACE
-           LINE_INDENTED_SPACE reduce       90      ** Parsing conflict **
+             LINE_INDENTED_TAB shift-reduce 78     indented_line ::= LINE_INDENTED_TAB
+             LINE_INDENTED_TAB reduce       88      ** Parsing conflict **
+           LINE_INDENTED_SPACE shift-reduce 79     indented_line ::= LINE_INDENTED_SPACE
+           LINE_INDENTED_SPACE reduce       88      ** Parsing conflict **
                     LINE_EMPTY shift-reduce 28     empty ::= empty LINE_EMPTY
-                    LINE_EMPTY reduce       90      ** Parsing conflict **
-                 indented_line shift        30     
-                     {default} reduce       90     cont_block ::= empty
+                    LINE_EMPTY reduce       88      ** Parsing conflict **
+                 indented_line shift        28     
+                     {default} reduce       88     cont_block ::= empty
 
-State 35:
+State 33:
      (64) meta_block ::= LINE_META meta_lines *
           meta_lines ::= meta_lines * meta_line
           meta_line ::= * LINE_META
@@ -812,61 +784,49 @@ State 35:
                      meta_line shift-reduce 65     meta_lines ::= meta_lines meta_line
                      {default} reduce       64     meta_block ::= LINE_META meta_lines
 
-State 36:
+State 34:
      (57) html_block ::= LINE_HTML html_block_lines *
           html_block_lines ::= html_block_lines * html_block_line
           html_block_line ::= * LINE_CONTINUATION
           html_block_line ::= * LINE_HTML
 
-             LINE_CONTINUATION shift-reduce 98     html_block_line ::= LINE_CONTINUATION
-                     LINE_HTML shift-reduce 99     html_block_line ::= LINE_HTML
+             LINE_CONTINUATION shift-reduce 97     html_block_line ::= LINE_CONTINUATION
+                     LINE_HTML shift-reduce 98     html_block_line ::= LINE_HTML
                      LINE_HTML reduce       57      ** Parsing conflict **
                html_block_line shift-reduce 58     html_block_lines ::= html_block_lines html_block_line
                      {default} reduce       57     html_block ::= LINE_HTML html_block_lines
 
-State 37:
+State 35:
      (29) blockquote ::= LINE_BLOCKQUOTE quote_lines *
           quote_lines ::= quote_lines * quote_line
           quote_line ::= * LINE_BLOCKQUOTE
           quote_line ::= * LINE_CONTINUATION
 
-             LINE_CONTINUATION shift-reduce 86     quote_line ::= LINE_CONTINUATION
-               LINE_BLOCKQUOTE shift-reduce 85     quote_line ::= LINE_BLOCKQUOTE
+             LINE_CONTINUATION shift-reduce 84     quote_line ::= LINE_CONTINUATION
+               LINE_BLOCKQUOTE shift-reduce 83     quote_line ::= LINE_BLOCKQUOTE
                LINE_BLOCKQUOTE reduce       29      ** Parsing conflict **
                     quote_line shift-reduce 30     quote_lines ::= quote_lines quote_line
                      {default} reduce       29     blockquote ::= LINE_BLOCKQUOTE quote_lines
 
-State 38:
+State 36:
           para_lines ::= para_lines * para_line
           para_line ::= * LINE_CONTINUATION
      (56) def_link ::= LINE_DEF_LINK para_lines *
 
-             LINE_CONTINUATION shift-reduce 76     para_line ::= LINE_CONTINUATION
+             LINE_CONTINUATION shift-reduce 74     para_line ::= LINE_CONTINUATION
                      para_line shift-reduce 26     para_lines ::= para_lines para_line
                      {default} reduce       56     def_link ::= LINE_DEF_LINK para_lines
 
-State 39:
+State 37:
      (25) para ::= LINE_PLAIN para_lines *
           para_lines ::= para_lines * para_line
           para_line ::= * LINE_CONTINUATION
 
-             LINE_CONTINUATION shift-reduce 76     para_line ::= LINE_CONTINUATION
+             LINE_CONTINUATION shift-reduce 74     para_line ::= LINE_CONTINUATION
                      para_line shift-reduce 26     para_lines ::= para_lines para_line
                      {default} reduce       25     para ::= LINE_PLAIN para_lines
 
-State 40:
-     (24) block ::= definition_block *
-          empty ::= * empty LINE_EMPTY
-          empty ::= * LINE_EMPTY
-          definition_block ::= definition_block * empty definition
-          definition_block ::= definition_block * empty
-
-                    LINE_EMPTY shift-reduce 82     empty ::= LINE_EMPTY
-                    LINE_EMPTY reduce       24      ** Parsing conflict **
-                         empty shift        10     
-                     {default} reduce       24     block ::= definition_block
-
-State 41:
+State 38:
      (13) block ::= list_enumerated *
           list_enumerated ::= list_enumerated * item_enumerated
           item_enumerated ::= * LINE_LIST_ENUMERATED para_lines cont_blocks
@@ -879,16 +839,16 @@ State 41:
                item_enumerated shift-reduce 36     list_enumerated ::= list_enumerated item_enumerated
                      {default} reduce       13     block ::= list_enumerated
 
-State 42:
+State 39:
           para_lines ::= para_lines * para_line
           para_line ::= * LINE_CONTINUATION
      (42) cont_block ::= empty indented_line para_lines *
 
-             LINE_CONTINUATION shift-reduce 76     para_line ::= LINE_CONTINUATION
+             LINE_CONTINUATION shift-reduce 74     para_line ::= LINE_CONTINUATION
                      para_line shift-reduce 26     para_lines ::= para_lines para_line
                      {default} reduce       42     cont_block ::= empty indented_line para_lines
 
-State 43:
+State 40:
      (12) block ::= list_bulleted *
           list_bulleted ::= list_bulleted * item_bulleted
           item_bulleted ::= * LINE_LIST_BULLETED para_lines cont_blocks
@@ -901,27 +861,27 @@ State 43:
                  item_bulleted shift-reduce 31     list_bulleted ::= list_bulleted item_bulleted
                      {default} reduce       12     block ::= list_bulleted
 
-State 44:
+State 41:
           def ::= LINE_DEFINITION * def_lines
-     (71) def ::= LINE_DEFINITION *
+     (69) def ::= LINE_DEFINITION *
           def_lines ::= * def_lines LINE_CONTINUATION
           def_lines ::= * LINE_CONTINUATION
 
-             LINE_CONTINUATION shift-reduce 109    def_lines ::= LINE_CONTINUATION
-                     def_lines shift        50     
-                     {default} reduce       71     def ::= LINE_DEFINITION
+             LINE_CONTINUATION shift-reduce 108    def_lines ::= LINE_CONTINUATION
+                     def_lines shift        46     
+                     {default} reduce       69     def ::= LINE_DEFINITION
 
-State 45:
-     (68) definition ::= para defs *
+State 42:
+     (66) definition_block ::= para defs *
           defs ::= defs * def
           def ::= * LINE_DEFINITION def_lines
           def ::= * LINE_DEFINITION
 
-               LINE_DEFINITION shift        44     
-                           def shift-reduce 69     defs ::= defs def
-                     {default} reduce       68     definition ::= para defs
+               LINE_DEFINITION shift        41     
+                           def shift-reduce 67     defs ::= defs def
+                     {default} reduce       66     definition_block ::= para defs
 
-State 46:
+State 43:
           table_section ::= table_rows * LINE_EMPTY
      (46) table_section ::= table_rows *
           table_rows ::= table_rows * LINE_TABLE
@@ -932,24 +892,17 @@ State 46:
                     LINE_EMPTY reduce       46      ** Parsing conflict **
                      {default} reduce       46     table_section ::= table_rows
 
-State 47:
+State 44:
           table_header ::= table_rows * LINE_TABLE_SEPARATOR
           table_rows ::= table_rows * LINE_TABLE
-     (73) para ::= table_rows *
+     (71) para ::= table_rows *
 
           LINE_TABLE_SEPARATOR shift-reduce 44     table_header ::= table_rows LINE_TABLE_SEPARATOR
                     LINE_TABLE shift-reduce 49     table_rows ::= table_rows LINE_TABLE
-                    LINE_TABLE reduce       73      ** Parsing conflict **
-                     {default} reduce       73     para ::= table_rows
-
-State 48:
-          table_rows ::= table_rows * LINE_TABLE
-     (73) para ::= table_rows *
+                    LINE_TABLE reduce       71      ** Parsing conflict **
+                     {default} reduce       71     para ::= table_rows
 
-                    LINE_TABLE shift-reduce 49     table_rows ::= table_rows LINE_TABLE
-                     {default} reduce       73     para ::= table_rows
-
-State 49:
+State 45:
      (11) block ::= empty *
           empty ::= empty * LINE_EMPTY
 
@@ -957,12 +910,12 @@ State 49:
                     LINE_EMPTY reduce       11      ** Parsing conflict **
                      {default} reduce       11     block ::= empty
 
-State 50:
-     (70) def ::= LINE_DEFINITION def_lines *
+State 46:
+     (68) def ::= LINE_DEFINITION def_lines *
           def_lines ::= def_lines * LINE_CONTINUATION
 
-             LINE_CONTINUATION shift-reduce 72     def_lines ::= def_lines LINE_CONTINUATION
-                     {default} reduce       70     def ::= LINE_DEFINITION def_lines
+             LINE_CONTINUATION shift-reduce 70     def_lines ::= def_lines LINE_CONTINUATION
+                     {default} reduce       68     def ::= LINE_DEFINITION def_lines
 
 ----------------------------------------------------
 Symbols:
@@ -1027,11 +980,10 @@ Symbols:
    58: table_body: LINE_TABLE
    59: html_block_lines: LINE_CONTINUATION LINE_HTML
    60: html_block_line: LINE_CONTINUATION LINE_HTML
-   61: fenced_lines: LINE_CONTINUATION LINE_EMPTY
+   61: fenced_lines: <lambda> LINE_CONTINUATION LINE_EMPTY
    62: fenced_line: LINE_CONTINUATION LINE_EMPTY
    63: meta_lines: LINE_CONTINUATION LINE_META
    64: meta_line: LINE_CONTINUATION LINE_META
-   65: definition: LINE_PLAIN LINE_TABLE
-   66: defs: LINE_DEFINITION
-   67: def: LINE_DEFINITION
-   68: def_lines: LINE_CONTINUATION
+   65: defs: LINE_DEFINITION
+   66: def: LINE_DEFINITION
+   67: def_lines: LINE_CONTINUATION
index d7dc2b1bb5890b54cdabdb9ddf068ddcee51244e..53728df750ab89f8b635182bdf5579bf7b8d2f32 100644 (file)
@@ -172,8 +172,10 @@ table_section(A)   ::= table_rows(B).                                                      { A = token_new_parent(B, BLOCK_TABLE_
 
 
 table(A)                       ::= table_header(B) table_body(C).                      { A = B; token_chain_append(B, C); }
+table                          ::= table_header.
 
 table_body(A)          ::= table_body(B) table_section(C).                     { A = B; token_chain_append(B, C); }
+//table_body(A)                ::= table_body(B) error.                                        { A = B; }
 table_body                     ::= table_section.
 
 table_rows(A)          ::= table_rows(B) LINE_TABLE(C).                        { A = B; token_chain_append(B, C); }
@@ -211,6 +213,7 @@ fenced_block(A)             ::= LINE_FENCE_BACKTICK_START(B) fenced_lines(C).                                                       { A = B
 
 fenced_lines(A)                ::= fenced_lines(B) fenced_line(C).                     { A = B; token_chain_append(B, C); }
 fenced_lines           ::= fenced_line.
+fenced_lines           ::= .
 
 fenced_line                    ::= LINE_CONTINUATION.
 fenced_line                    ::= LINE_EMPTY.
@@ -225,11 +228,10 @@ meta_lines                        ::= meta_line.
 meta_line                      ::= LINE_META.
 meta_line                      ::= LINE_CONTINUATION.
 
-definition_block(A)    ::= definition_block(B) empty(C) definition(D).         { A = B; token_chain_append(B, C); token_chain_append(B, D); }
-definition_block(A)    ::= definition_block(B) empty(C).                               { A = B; token_chain_append(B, C); }
-definition_block       ::= definition.
-
-definition(A)          ::= para(B) defs(C).                                            { A = token_new_parent(B, BLOCK_DEFINITION_GROUP); token_chain_append(B, C); B->type = BLOCK_TERM; }
+// Lemon's LALR(1) parser can't properly allow for detecting consecutive definition blocks and concatenating them,
+// because 'para defs para' could be the beginning of the next definition, OR the next regular para.
+// We have to bundle them when exporting, if desired.
+definition_block(A)    ::= para(B) defs(C).                                            { A = B; token_chain_append(B, C); B->type = BLOCK_TERM; }
 
 defs(A)                                ::= defs(B) def(C).                                                     { A = B; token_chain_append(B, C); }
 defs                           ::= def.
index a460a9a263c7a9e50758f6bdec67b7ca21e764e8..519d7b806ba25bd872afa4d8a1fb5a2539d460e3 100644 (file)
@@ -122,8 +122,8 @@ cont_block ::= empty indented_line para_lines.
 cont_block ::= empty indented_line.
 table_header ::= table_rows LINE_TABLE_SEPARATOR.
 table_section ::= table_rows LINE_EMPTY.
-table_section ::= table_rows.
 table ::= table_header table_body.
+table ::= table_header.
 table_body ::= table_body table_section.
 table_rows ::= table_rows LINE_TABLE.
 def_citation ::= LINE_DEF_CITATION para_lines cont_blocks.
@@ -140,10 +140,15 @@ fenced_block ::= LINE_FENCE_BACKTICK fenced_lines.
 fenced_block ::= LINE_FENCE_BACKTICK_START fenced_lines LINE_FENCE_BACKTICK.
 fenced_block ::= LINE_FENCE_BACKTICK_START fenced_lines.
 fenced_lines ::= fenced_lines fenced_line.
+fenced_lines ::= .
 meta_block ::= LINE_META meta_lines.
 meta_lines ::= meta_lines meta_line.
-definition_block ::= definition_block empty definition.
-definition_block ::= definition_block empty.
+definition_block ::= para defs.
+defs ::= defs def.
+def ::= LINE_DEFINITION def_lines.
+def ::= LINE_DEFINITION.
+def_lines ::= def_lines LINE_CONTINUATION.
+para ::= table_rows.
 para ::= LINE_PLAIN.
 para_lines ::= para_line.
 para_line ::= LINE_CONTINUATION.
@@ -173,22 +178,12 @@ html_block_line ::= LINE_HTML.
 fenced_lines ::= fenced_line.
 fenced_line ::= LINE_CONTINUATION.
 fenced_line ::= LINE_EMPTY.
-fenced_line ::= .
 meta_block ::= LINE_META.
 meta_lines ::= meta_line.
 meta_line ::= LINE_META.
 meta_line ::= LINE_CONTINUATION.
-definition_block ::= definition.
-definition ::= para defs.
-defs ::= defs def.
 defs ::= def.
-def ::= LINE_DEFINITION def_lines.
-def ::= LINE_DEFINITION.
-def_lines ::= def_lines LINE_CONTINUATION.
 def_lines ::= LINE_CONTINUATION.
-para ::= table_rows.
-para ::= defs.
-para ::= table_header.
 
 
 
@@ -280,6 +275,8 @@ int main(int argc, char** argv) {
                }
        }
 
+//     return(0);
+
        fprintf(stderr, "\nQuad line tests\n");
 
        i = 0;