From: Fletcher T. Penney Date: Tue, 14 Mar 2017 14:24:26 +0000 (-0400) Subject: FIXED: Lex space followed by tab as space, not text X-Git-Tag: 6.0.0-rc1^2~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3963b3ec58fb792e43833696493f69ce6596289e;p=multimarkdown FIXED: Lex space followed by tab as space, not text --- diff --git a/Sources/libMultiMarkdown/lexer.c b/Sources/libMultiMarkdown/lexer.c index 9622db5..d2c41cc 100644 --- a/Sources/libMultiMarkdown/lexer.c +++ b/Sources/libMultiMarkdown/lexer.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.14.3 on Fri Mar 10 13:21:57 2017 */ +/* Generated by re2c 0.14.3 on Tue Mar 14 10:21:05 2017 */ /** MultiMarkdown 6 -- Lightweight markup processor to produce HTML, LaTeX, and more. @@ -132,12 +132,12 @@ yy2: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '+': goto yy264; - case '-': goto yy263; - case '=': goto yy260; - case '>': goto yy262; - case '{': goto yy258; - case '~': goto yy261; + case '+': goto yy266; + case '-': goto yy265; + case '=': goto yy262; + case '>': goto yy264; + case '{': goto yy260; + case '~': goto yy263; default: goto yy3; } yy3: @@ -146,7 +146,7 @@ yy4: yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '+': goto yy255; + case '+': goto yy257; default: goto yy5; } yy5: @@ -154,7 +154,7 @@ yy5: yy6: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '-': goto yy249; + case '-': goto yy251; default: goto yy7; } yy7: @@ -163,7 +163,7 @@ yy8: yyaccept = 2; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '<': goto yy246; + case '<': goto yy248; default: goto yy9; } yy9: @@ -172,8 +172,8 @@ yy10: yyaccept = 3; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '>': goto yy242; - case '~': goto yy241; + case '>': goto yy244; + case '~': goto yy243; default: goto yy11; } yy11: @@ -182,7 +182,7 @@ yy12: yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '=': goto yy238; + case '=': goto yy240; default: goto yy13; } yy13: @@ -190,11 +190,11 @@ yy13: yy14: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '#': goto yy234; - case '%': goto yy228; - case '>': goto yy236; - case '?': goto yy230; - case '^': goto yy232; + case '#': goto yy236; + case '%': goto yy230; + case '>': goto yy238; + case '?': goto yy232; + case '^': goto yy234; default: goto yy15; } yy15: @@ -205,7 +205,7 @@ yy16: yy18: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '[': goto yy226; + case '[': goto yy228; default: goto yy19; } yy19: @@ -222,7 +222,7 @@ yy24: yy26: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '}': goto yy224; + case '}': goto yy226; default: goto yy27; } yy27: @@ -233,7 +233,7 @@ yy28: yy30: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '\'': goto yy222; + case '\'': goto yy224; default: goto yy31; } yy31: @@ -242,8 +242,8 @@ yy32: yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case ' ': goto yy214; - case '.': goto yy215; + case ' ': goto yy216; + case '.': goto yy217; default: goto yy19; } yy33: @@ -254,7 +254,7 @@ yy35: yych = *(YYMARKER = ++YYCURSOR); switch (yych) { case 'A': - case 'a': goto yy209; + case 'a': goto yy211; default: goto yy36; } yy36: @@ -265,41 +265,41 @@ yy37: yy39: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '\n': goto yy132; - case '\r': goto yy134; - case ' ': goto yy137; - case '!': goto yy197; - case '"': goto yy187; - case '#': goto yy167; - case '$': goto yy165; - case '%': goto yy163; - case '&': goto yy151; - case '\'': goto yy185; - case '(': goto yy179; - case ')': goto yy177; - case '*': goto yy143; - case '+': goto yy161; - case ',': goto yy193; - case '-': goto yy159; - case '.': goto yy199; - case '/': goto yy147; - case ':': goto yy189; - case ';': goto yy191; - case '<': goto yy155; - case '=': goto yy157; - case '>': goto yy153; - case '?': goto yy195; - case '@': goto yy149; - case '[': goto yy171; - case '\\': goto yy135; - case ']': goto yy169; - case '^': goto yy145; - case '_': goto yy141; - case '`': goto yy183; - case '{': goto yy175; - case '|': goto yy139; - case '}': goto yy173; - case '~': goto yy181; + case '\n': goto yy134; + case '\r': goto yy136; + case ' ': goto yy139; + case '!': goto yy199; + case '"': goto yy189; + case '#': goto yy169; + case '$': goto yy167; + case '%': goto yy165; + case '&': goto yy153; + case '\'': goto yy187; + case '(': goto yy181; + case ')': goto yy179; + case '*': goto yy145; + case '+': goto yy163; + case ',': goto yy195; + case '-': goto yy161; + case '.': goto yy201; + case '/': goto yy149; + case ':': goto yy191; + case ';': goto yy193; + case '<': goto yy157; + case '=': goto yy159; + case '>': goto yy155; + case '?': goto yy197; + case '@': goto yy151; + case '[': goto yy173; + case '\\': goto yy137; + case ']': goto yy171; + case '^': goto yy147; + case '_': goto yy143; + case '`': goto yy185; + case '{': goto yy177; + case '|': goto yy141; + case '}': goto yy175; + case '~': goto yy183; default: goto yy40; } yy40: @@ -307,7 +307,7 @@ yy40: yy41: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '$': goto yy130; + case '$': goto yy132; default: goto yy42; } yy42: @@ -319,11 +319,13 @@ yy45: ++YYCURSOR; { return INDENT_TAB; } yy47: + YYCTXMARKER = YYCURSOR + 1; yych = *++YYCURSOR; switch (yych) { + case '\t': goto yy119; case '\n': goto yy53; - case '\r': goto yy121; - case ' ': goto yy119; + case '\r': goto yy123; + case ' ': goto yy121; default: goto yy19; } yy48: @@ -428,8 +430,8 @@ yy70: case 5: goto yy19; case 6: goto yy36; case 7: goto yy49; - case 8: goto yy127; - default: goto yy259; + case 8: goto yy129; + default: goto yy261; } yy71: ++YYCURSOR; @@ -666,85 +668,86 @@ yy118: default: goto yy117; } yy119: + ++YYCURSOR; + YYCURSOR = YYCTXMARKER; + { return NON_INDENT_SPACE; } +yy121: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '\n': goto yy123; - case '\r': goto yy125; - case ' ': goto yy122; - default: goto yy120; + case '\n': goto yy125; + case '\r': goto yy127; + case ' ': goto yy124; + default: goto yy122; } -yy120: +yy122: { return NON_INDENT_SPACE; } -yy121: +yy123: yych = *++YYCURSOR; switch (yych) { case '\n': goto yy53; default: goto yy54; } -yy122: +yy124: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy123; - case '\r': goto yy125; - case ' ': goto yy126; - default: goto yy120; + case '\n': goto yy125; + case '\r': goto yy127; + case ' ': goto yy128; + default: goto yy122; } -yy123: +yy125: ++YYCURSOR; -yy124: +yy126: { return TEXT_LINEBREAK; } -yy125: +yy127: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy123; - default: goto yy124; + case '\n': goto yy125; + default: goto yy126; } -yy126: +yy128: yyaccept = 8; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '\n': goto yy123; - case '\r': goto yy125; - case ' ': goto yy128; - default: goto yy127; + case '\n': goto yy125; + case '\r': goto yy127; + case ' ': goto yy130; + default: goto yy129; } -yy127: +yy129: { return INDENT_SPACE; } -yy128: +yy130: ++YYCURSOR; yych = *YYCURSOR; switch (yych) { - case '\n': goto yy123; - case '\r': goto yy125; - case ' ': goto yy128; + case '\n': goto yy125; + case '\r': goto yy127; + case ' ': goto yy130; default: goto yy70; } -yy130: +yy132: ++YYCURSOR; { return MATH_DOLLAR_DOUBLE; } -yy132: +yy134: ++YYCURSOR; -yy133: +yy135: { return TEXT_LINEBREAK; } -yy134: +yy136: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy132; - default: goto yy133; + case '\n': goto yy134; + default: goto yy135; } -yy135: +yy137: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '(': goto yy201; - case ')': goto yy203; - case '[': goto yy205; - case ']': goto yy207; - default: goto yy136; + case '(': goto yy203; + case ')': goto yy205; + case '[': goto yy207; + case ']': goto yy209; + default: goto yy138; } -yy136: - { return ESCAPED_CHARACTER; } -yy137: - ++YYCURSOR; +yy138: { return ESCAPED_CHARACTER; } yy139: ++YYCURSOR; @@ -841,226 +844,229 @@ yy199: { return ESCAPED_CHARACTER; } yy201: ++YYCURSOR; - { return MATH_PAREN_OPEN; } + { return ESCAPED_CHARACTER; } yy203: ++YYCURSOR; - { return MATH_PAREN_CLOSE; } + { return MATH_PAREN_OPEN; } yy205: ++YYCURSOR; - { return MATH_BRACKET_OPEN; } + { return MATH_PAREN_CLOSE; } yy207: ++YYCURSOR; - { return MATH_BRACKET_CLOSE; } + { return MATH_BRACKET_OPEN; } yy209: + ++YYCURSOR; + { return MATH_BRACKET_CLOSE; } +yy211: yych = *++YYCURSOR; switch (yych) { case 'M': - case 'm': goto yy210; + case 'm': goto yy212; default: goto yy70; } -yy210: +yy212: yych = *++YYCURSOR; switch (yych) { case 'P': - case 'p': goto yy211; + case 'p': goto yy213; default: goto yy70; } -yy211: +yy213: yych = *++YYCURSOR; switch (yych) { - case ';': goto yy212; + case ';': goto yy214; default: goto yy70; } -yy212: +yy214: ++YYCURSOR; { return AMPERSAND_LONG; } -yy214: +yy216: yych = *++YYCURSOR; switch (yych) { - case '.': goto yy218; + case '.': goto yy220; default: goto yy70; } -yy215: +yy217: yych = *++YYCURSOR; switch (yych) { - case '.': goto yy216; + case '.': goto yy218; default: goto yy70; } -yy216: +yy218: ++YYCURSOR; { return ELLIPSIS; } -yy218: +yy220: yych = *++YYCURSOR; switch (yych) { - case ' ': goto yy219; + case ' ': goto yy221; default: goto yy70; } -yy219: +yy221: yych = *++YYCURSOR; switch (yych) { - case '.': goto yy220; + case '.': goto yy222; default: goto yy70; } -yy220: +yy222: ++YYCURSOR; { return ELLIPSIS; } -yy222: +yy224: ++YYCURSOR; { return QUOTE_RIGHT_ALT; } -yy224: +yy226: ++YYCURSOR; { return BRACE_DOUBLE_RIGHT; } -yy226: +yy228: ++YYCURSOR; { return BRACKET_IMAGE_LEFT; } -yy228: +yy230: ++YYCURSOR; { return BRACKET_VARIABLE_LEFT; } -yy230: +yy232: ++YYCURSOR; { return BRACKET_GLOSSARY_LEFT; } -yy232: +yy234: ++YYCURSOR; { return BRACKET_FOOTNOTE_LEFT; } -yy234: +yy236: ++YYCURSOR; { return BRACKET_CITATION_LEFT; } -yy236: +yy238: ++YYCURSOR; { return BRACKET_ABBREVIATION_LEFT; } -yy238: +yy240: yych = *++YYCURSOR; switch (yych) { - case '}': goto yy239; + case '}': goto yy241; default: goto yy70; } -yy239: +yy241: ++YYCURSOR; { return CRITIC_HI_CLOSE; } -yy241: +yy243: yych = *++YYCURSOR; switch (yych) { - case '}': goto yy244; + case '}': goto yy246; default: goto yy70; } -yy242: +yy244: ++YYCURSOR; { return CRITIC_SUB_DIV; } -yy244: +yy246: ++YYCURSOR; { return CRITIC_SUB_CLOSE; } -yy246: +yy248: yych = *++YYCURSOR; switch (yych) { - case '}': goto yy247; + case '}': goto yy249; default: goto yy70; } -yy247: +yy249: ++YYCURSOR; { return CRITIC_COM_CLOSE; } -yy249: +yy251: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '-': goto yy253; - case '}': goto yy251; - default: goto yy250; + case '-': goto yy255; + case '}': goto yy253; + default: goto yy252; } -yy250: +yy252: { return DASH_N; } -yy251: +yy253: ++YYCURSOR; { return CRITIC_DEL_CLOSE; } -yy253: +yy255: ++YYCURSOR; { return DASH_M; } -yy255: +yy257: yych = *++YYCURSOR; switch (yych) { - case '}': goto yy256; + case '}': goto yy258; default: goto yy70; } -yy256: +yy258: ++YYCURSOR; { return CRITIC_ADD_CLOSE; } -yy258: +yy260: yyaccept = 9; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case 'T': goto yy275; - default: goto yy259; + case 'T': goto yy277; + default: goto yy261; } -yy259: +yy261: { return BRACE_DOUBLE_LEFT; } -yy260: +yy262: yych = *++YYCURSOR; switch (yych) { - case '=': goto yy273; + case '=': goto yy275; default: goto yy70; } -yy261: +yy263: yych = *++YYCURSOR; switch (yych) { - case '~': goto yy271; + case '~': goto yy273; default: goto yy70; } -yy262: +yy264: yych = *++YYCURSOR; switch (yych) { - case '>': goto yy269; + case '>': goto yy271; default: goto yy70; } -yy263: +yy265: yych = *++YYCURSOR; switch (yych) { - case '-': goto yy267; + case '-': goto yy269; default: goto yy70; } -yy264: +yy266: yych = *++YYCURSOR; switch (yych) { - case '+': goto yy265; + case '+': goto yy267; default: goto yy70; } -yy265: +yy267: ++YYCURSOR; { return CRITIC_ADD_OPEN; } -yy267: +yy269: ++YYCURSOR; { return CRITIC_DEL_OPEN; } -yy269: +yy271: ++YYCURSOR; { return CRITIC_COM_OPEN; } -yy271: +yy273: ++YYCURSOR; { return CRITIC_SUB_OPEN; } -yy273: +yy275: ++YYCURSOR; { return CRITIC_HI_OPEN; } -yy275: +yy277: yych = *++YYCURSOR; switch (yych) { - case 'O': goto yy276; + case 'O': goto yy278; default: goto yy70; } -yy276: +yy278: yych = *++YYCURSOR; switch (yych) { - case 'C': goto yy277; + case 'C': goto yy279; default: goto yy70; } -yy277: +yy279: yych = *++YYCURSOR; switch (yych) { - case '}': goto yy278; + case '}': goto yy280; default: goto yy70; } -yy278: +yy280: yych = *++YYCURSOR; switch (yych) { - case '}': goto yy279; + case '}': goto yy281; default: goto yy70; } -yy279: +yy281: ++YYCURSOR; { return TOC; } } diff --git a/Sources/libMultiMarkdown/lexer.re b/Sources/libMultiMarkdown/lexer.re index 9648f66..cba2e0a 100644 --- a/Sources/libMultiMarkdown/lexer.re +++ b/Sources/libMultiMarkdown/lexer.re @@ -226,6 +226,7 @@ int scan(Scanner * s, const char * stop) { ' '? NL { return TEXT_NL; } NON_INDENT_SPACE { return NON_INDENT_SPACE; } + ' ' / '\t' { return NON_INDENT_SPACE; } "*" { return STAR; } "+" { return PLUS; }