From: Fletcher T. Penney Date: Wed, 29 Mar 2017 21:17:00 +0000 (-0400) Subject: CHANGED: Remove ASCII non-breaking space support from lexer X-Git-Tag: 6.0.3^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6fb330277dee271064dea2f2b604bb3077b2a2d9;p=multimarkdown CHANGED: Remove ASCII non-breaking space support from lexer --- diff --git a/Sources/libMultiMarkdown/lexer.c b/Sources/libMultiMarkdown/lexer.c index d6ed45d..5b51abc 100644 --- a/Sources/libMultiMarkdown/lexer.c +++ b/Sources/libMultiMarkdown/lexer.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.14.3 on Tue Mar 28 08:27:15 2017 */ +/* Generated by re2c 0.14.3 on Wed Mar 29 17:12:29 2017 */ /** MultiMarkdown 6 -- Lightweight markup processor to produce HTML, LaTeX, and more. @@ -83,24 +83,24 @@ int scan(Scanner * s, const char * stop) { yych = *YYCURSOR; switch (yych) { - case '\t': goto yy46; - case '\n': goto yy55; - case '\r': goto yy57; - case ' ': goto yy48; - case '!': goto yy20; - case '"': goto yy29; - case '#': goto yy50; - case '$': goto yy42; - case '%': goto yy52; - case '&': goto yy36; - case '\'': goto yy31; - case '(': goto yy21; - case ')': goto yy23; - case '*': goto yy58; - case '+': goto yy6; - case '-': goto yy8; - case '.': goto yy33; - case '/': goto yy38; + case '\t': goto yy45; + case '\n': goto yy53; + case '\r': goto yy55; + case ' ': goto yy47; + case '!': goto yy18; + case '"': goto yy28; + case '#': goto yy48; + case '$': goto yy41; + case '%': goto yy50; + case '&': goto yy35; + case '\'': goto yy30; + case '(': goto yy20; + case ')': goto yy22; + case '*': goto yy56; + case '+': goto yy4; + case '-': goto yy6; + case '.': goto yy32; + case '/': goto yy37; case '0': case '1': case '2': @@ -110,242 +110,224 @@ int scan(Scanner * s, const char * stop) { case '6': case '7': case '8': - case '9': goto yy54; - case ':': goto yy34; - case '<': goto yy10; - case '=': goto yy14; - case '>': goto yy25; - case '[': goto yy16; - case '\\': goto yy40; - case ']': goto yy18; - case '^': goto yy44; - case '_': goto yy60; - case '`': goto yy62; - case '{': goto yy4; - case '|': goto yy64; - case '}': goto yy27; - case '~': goto yy12; - case 0xA0: goto yy49; - case 0xC3: goto yy2; - default: goto yy66; + case '9': goto yy52; + case ':': goto yy33; + case '<': goto yy8; + case '=': goto yy12; + case '>': goto yy24; + case '[': goto yy14; + case '\\': goto yy39; + case ']': goto yy16; + case '^': goto yy43; + case '_': goto yy58; + case '`': goto yy60; + case '{': goto yy2; + case '|': goto yy62; + case '}': goto yy26; + case '~': goto yy10; + default: goto yy64; } yy2: - ++YYCURSOR; - switch ((yych = *YYCURSOR)) { - case 0xA0: goto yy285; + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch (yych) { + case '+': goto yy266; + case '-': goto yy265; + case '=': goto yy262; + case '>': goto yy264; + case '{': goto yy260; + case '~': goto yy263; default: goto yy3; } yy3: - { goto scan; } + { return TEXT_BRACE_LEFT; } yy4: - yyaccept = 0; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '+': goto yy268; - case '-': goto yy267; - case '=': goto yy264; - case '>': goto yy266; - case '{': goto yy262; - case '~': goto yy265; + case '+': goto yy257; default: goto yy5; } yy5: - { return TEXT_BRACE_LEFT; } + { return PLUS; } yy6: - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - switch (yych) { - case '+': goto yy259; + ++YYCURSOR; + switch ((yych = *YYCURSOR)) { + case '-': goto yy251; default: goto yy7; } yy7: - { return PLUS; } + { return DASH_N; } yy8: - ++YYCURSOR; - switch ((yych = *YYCURSOR)) { - case '-': goto yy253; + yyaccept = 2; + yych = *(YYMARKER = ++YYCURSOR); + switch (yych) { + case '<': goto yy248; default: goto yy9; } yy9: - { return DASH_N; } + { return ANGLE_LEFT; } yy10: - yyaccept = 2; + yyaccept = 3; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '<': goto yy250; + case '>': goto yy244; + case '~': goto yy243; default: goto yy11; } yy11: - { return ANGLE_LEFT; } + { return SUBSCRIPT; } yy12: - yyaccept = 3; + yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '>': goto yy246; - case '~': goto yy245; + case '=': goto yy240; default: goto yy13; } yy13: - { return SUBSCRIPT; } + { return EQUAL; } yy14: - yyaccept = 4; - yych = *(YYMARKER = ++YYCURSOR); - switch (yych) { - case '=': goto yy242; + ++YYCURSOR; + switch ((yych = *YYCURSOR)) { + case '#': goto yy236; + case '%': goto yy230; + case '>': goto yy238; + case '?': goto yy232; + case '^': goto yy234; default: goto yy15; } yy15: - { return EQUAL; } + { return BRACKET_LEFT; } yy16: ++YYCURSOR; - switch ((yych = *YYCURSOR)) { - case '#': goto yy238; - case '%': goto yy232; - case '>': goto yy240; - case '?': goto yy234; - case '^': goto yy236; - default: goto yy17; - } -yy17: - { return BRACKET_LEFT; } + { return BRACKET_RIGHT; } yy18: ++YYCURSOR; - { return BRACKET_RIGHT; } -yy20: - yych = *++YYCURSOR; - switch (yych) { - case '[': goto yy230; - default: goto yy3; + switch ((yych = *YYCURSOR)) { + case '[': goto yy228; + default: goto yy19; } -yy21: +yy19: + { goto scan; } +yy20: ++YYCURSOR; { return PAREN_LEFT; } -yy23: +yy22: ++YYCURSOR; { return PAREN_RIGHT; } -yy25: +yy24: ++YYCURSOR; { return ANGLE_RIGHT; } -yy27: +yy26: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '}': goto yy228; - default: goto yy28; + case '}': goto yy226; + default: goto yy27; } -yy28: +yy27: { return TEXT_BRACE_RIGHT; } -yy29: +yy28: ++YYCURSOR; { return QUOTE_DOUBLE; } -yy31: +yy30: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '\'': goto yy226; - default: goto yy32; + case '\'': goto yy224; + default: goto yy31; } -yy32: +yy31: { return QUOTE_SINGLE; } -yy33: +yy32: yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case ' ': goto yy218; - case '.': goto yy219; - default: goto yy3; + case ' ': goto yy216; + case '.': goto yy217; + default: goto yy19; } -yy34: +yy33: ++YYCURSOR; { return COLON; } -yy36: +yy35: yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { case 'A': - case 'a': goto yy213; - default: goto yy37; + case 'a': goto yy211; + default: goto yy36; } -yy37: +yy36: { return AMPERSAND; } -yy38: +yy37: ++YYCURSOR; { return SLASH; } -yy40: +yy39: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '\n': goto yy136; - case '\r': goto yy138; - case ' ': goto yy141; - case '!': goto yy201; - case '"': goto yy191; - case '#': goto yy171; - case '$': goto yy169; - case '%': goto yy167; - case '&': goto yy155; - case '\'': goto yy189; - case '(': goto yy183; - case ')': goto yy181; - case '*': goto yy147; - case '+': goto yy165; - case ',': goto yy197; - case '-': goto yy163; - case '.': goto yy203; - case '/': goto yy151; - case ':': goto yy193; - case ';': goto yy195; - case '<': goto yy159; - case '=': goto yy161; - case '>': goto yy157; - case '?': goto yy199; - case '@': goto yy153; - case '[': goto yy175; - case '\\': goto yy139; - case ']': goto yy173; - case '^': goto yy149; - case '_': goto yy145; - case '`': goto yy187; - case '{': goto yy179; - case '|': goto yy143; - case '}': goto yy177; - case '~': goto yy185; - default: goto yy41; + 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; } -yy41: +yy40: { return TEXT_BACKSLASH; } -yy42: +yy41: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '$': goto yy134; - default: goto yy43; + case '$': goto yy132; + default: goto yy42; } -yy43: +yy42: { return MATH_DOLLAR_SINGLE; } -yy44: +yy43: ++YYCURSOR; { return SUPERSCRIPT; } -yy46: +yy45: ++YYCURSOR; { return INDENT_TAB; } -yy48: +yy47: YYCTXMARKER = YYCURSOR + 1; yych = *++YYCURSOR; switch (yych) { - case '\t': goto yy121; - case '\n': goto yy55; - case '\r': goto yy133; - case ' ': - case 0xA0: goto yy123; - default: goto yy3; + case '\t': goto yy119; + case '\n': goto yy53; + case '\r': goto yy123; + case ' ': goto yy121; + default: goto yy19; } -yy49: - YYCTXMARKER = YYCURSOR + 1; - yych = *++YYCURSOR; - switch (yych) { - case '\t': goto yy121; - case ' ': - case 0xA0: goto yy123; - default: goto yy3; - } -yy50: +yy48: YYCTXMARKER = YYCURSOR + 1; yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); @@ -353,21 +335,20 @@ yy50: case '\t': case '\n': case '\r': - case ' ': - case 0xA0: goto yy82; - case '#': goto yy80; - default: goto yy51; + case ' ': goto yy80; + case '#': goto yy78; + default: goto yy49; } -yy51: +yy49: { return TEXT_HASH; } -yy52: +yy50: ++YYCURSOR; { return TEXT_PERCENT; } -yy54: +yy52: yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '.': goto yy71; + case '.': goto yy69; case '0': case '1': case '2': @@ -377,86 +358,85 @@ yy54: case '6': case '7': case '8': - case '9': goto yy73; - default: goto yy3; + case '9': goto yy71; + default: goto yy19; } -yy55: +yy53: ++YYCURSOR; -yy56: +yy54: { return TEXT_NL; } -yy57: +yy55: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy55; - default: goto yy56; + case '\n': goto yy53; + default: goto yy54; } -yy58: +yy56: ++YYCURSOR; { return STAR; } -yy60: +yy58: ++YYCURSOR; { return UL; } -yy62: +yy60: ++YYCURSOR; yych = *YYCURSOR; - goto yy70; -yy63: + goto yy68; +yy61: { return BACKTICK; } -yy64: +yy62: ++YYCURSOR; yych = *YYCURSOR; - goto yy68; -yy65: + goto yy66; +yy63: { return PIPE; } -yy66: +yy64: yych = *++YYCURSOR; - goto yy3; -yy67: + goto yy19; +yy65: ++YYCURSOR; yych = *YYCURSOR; -yy68: +yy66: switch (yych) { - case '|': goto yy67; - default: goto yy65; + case '|': goto yy65; + default: goto yy63; } -yy69: +yy67: ++YYCURSOR; yych = *YYCURSOR; -yy70: +yy68: switch (yych) { - case '`': goto yy69; - default: goto yy63; + case '`': goto yy67; + default: goto yy61; } -yy71: +yy69: YYCTXMARKER = YYCURSOR + 1; yych = *++YYCURSOR; switch (yych) { case '\t': - case ' ': - case 0xA0: goto yy78; - case '\n': goto yy75; - case '\r': goto yy77; - default: goto yy72; + case ' ': goto yy76; + case '\n': goto yy73; + case '\r': goto yy75; + default: goto yy70; } -yy72: +yy70: YYCURSOR = YYMARKER; switch (yyaccept) { - case 0: goto yy5; - case 1: goto yy7; - case 2: goto yy11; - case 3: goto yy13; - case 4: goto yy15; - case 5: goto yy3; - case 6: goto yy37; - case 7: goto yy51; - case 8: goto yy130; - default: goto yy263; + case 0: goto yy3; + case 1: goto yy5; + case 2: goto yy9; + case 3: goto yy11; + case 4: goto yy13; + case 5: goto yy19; + case 6: goto yy36; + case 7: goto yy49; + case 8: goto yy129; + default: goto yy261; } -yy73: +yy71: ++YYCURSOR; yych = *YYCURSOR; switch (yych) { - case '.': goto yy71; + case '.': goto yy69; case '0': case '1': case '2': @@ -466,323 +446,310 @@ yy73: case '6': case '7': case '8': - case '9': goto yy73; - default: goto yy72; + case '9': goto yy71; + default: goto yy70; } -yy75: +yy73: ++YYCURSOR; -yy76: +yy74: YYCURSOR = YYCTXMARKER; { return TEXT_NUMBER_POSS_LIST; } -yy77: +yy75: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy75; - default: goto yy76; + case '\n': goto yy73; + default: goto yy74; } -yy78: +yy76: ++YYCURSOR; yych = *YYCURSOR; switch (yych) { case '\t': - case ' ': - case 0xA0: goto yy78; - default: goto yy76; + case ' ': goto yy76; + default: goto yy74; } -yy80: +yy78: YYCTXMARKER = YYCURSOR + 1; yych = *++YYCURSOR; switch (yych) { case '\t': case '\n': case '\r': - case ' ': - case 0xA0: goto yy88; - case '#': goto yy93; - default: goto yy72; + case ' ': goto yy86; + case '#': goto yy91; + default: goto yy70; } -yy81: +yy79: ++YYCURSOR; yych = *YYCURSOR; -yy82: +yy80: switch (yych) { case '\t': - case ' ': - case 0xA0: goto yy81; - case '\n': goto yy84; - case '\r': goto yy86; - default: goto yy83; + case ' ': goto yy79; + case '\n': goto yy82; + case '\r': goto yy84; + default: goto yy81; } -yy83: +yy81: { return HASH1; } -yy84: +yy82: ++YYCURSOR; -yy85: +yy83: YYCURSOR = YYCTXMARKER; { return HASH1; } -yy86: +yy84: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy84; - default: goto yy85; + case '\n': goto yy82; + default: goto yy83; } -yy87: +yy85: ++YYCURSOR; yych = *YYCURSOR; -yy88: +yy86: switch (yych) { case '\t': - case ' ': - case 0xA0: goto yy87; - case '\n': goto yy90; - case '\r': goto yy92; - default: goto yy89; + case ' ': goto yy85; + case '\n': goto yy88; + case '\r': goto yy90; + default: goto yy87; } -yy89: +yy87: { return HASH2; } -yy90: +yy88: ++YYCURSOR; -yy91: +yy89: YYCURSOR = YYCTXMARKER; { return HASH2; } -yy92: +yy90: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy90; - default: goto yy91; + case '\n': goto yy88; + default: goto yy89; } -yy93: +yy91: YYCTXMARKER = YYCURSOR + 1; yych = *++YYCURSOR; switch (yych) { case '\t': case '\n': case '\r': - case ' ': - case 0xA0: goto yy96; - case '#': goto yy94; - default: goto yy72; + case ' ': goto yy94; + case '#': goto yy92; + default: goto yy70; } -yy94: +yy92: YYCTXMARKER = YYCURSOR + 1; yych = *++YYCURSOR; switch (yych) { case '\t': case '\n': case '\r': - case ' ': - case 0xA0: goto yy102; - case '#': goto yy107; - default: goto yy72; + case ' ': goto yy100; + case '#': goto yy105; + default: goto yy70; } -yy95: +yy93: ++YYCURSOR; yych = *YYCURSOR; -yy96: +yy94: switch (yych) { case '\t': - case ' ': - case 0xA0: goto yy95; - case '\n': goto yy98; - case '\r': goto yy100; - default: goto yy97; + case ' ': goto yy93; + case '\n': goto yy96; + case '\r': goto yy98; + default: goto yy95; } -yy97: +yy95: { return HASH3; } -yy98: +yy96: ++YYCURSOR; -yy99: +yy97: YYCURSOR = YYCTXMARKER; { return HASH3; } -yy100: +yy98: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy98; - default: goto yy99; + case '\n': goto yy96; + default: goto yy97; } -yy101: +yy99: ++YYCURSOR; yych = *YYCURSOR; -yy102: +yy100: switch (yych) { case '\t': - case ' ': - case 0xA0: goto yy101; - case '\n': goto yy104; - case '\r': goto yy106; - default: goto yy103; + case ' ': goto yy99; + case '\n': goto yy102; + case '\r': goto yy104; + default: goto yy101; } -yy103: +yy101: { return HASH4; } -yy104: +yy102: ++YYCURSOR; -yy105: +yy103: YYCURSOR = YYCTXMARKER; { return HASH4; } -yy106: +yy104: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy104; - default: goto yy105; + case '\n': goto yy102; + default: goto yy103; } -yy107: +yy105: YYCTXMARKER = YYCURSOR + 1; yych = *++YYCURSOR; switch (yych) { case '\t': case '\n': case '\r': - case ' ': - case 0xA0: goto yy110; - case '#': goto yy108; - default: goto yy72; + case ' ': goto yy108; + case '#': goto yy106; + default: goto yy70; } -yy108: +yy106: YYCTXMARKER = YYCURSOR + 1; yych = *++YYCURSOR; switch (yych) { case '\t': case '\n': case '\r': - case ' ': - case 0xA0: goto yy116; - default: goto yy72; + case ' ': goto yy114; + default: goto yy70; } -yy109: +yy107: ++YYCURSOR; yych = *YYCURSOR; -yy110: +yy108: switch (yych) { case '\t': - case ' ': - case 0xA0: goto yy109; - case '\n': goto yy112; - case '\r': goto yy114; - default: goto yy111; + case ' ': goto yy107; + case '\n': goto yy110; + case '\r': goto yy112; + default: goto yy109; } -yy111: +yy109: { return HASH5; } -yy112: +yy110: ++YYCURSOR; -yy113: +yy111: YYCURSOR = YYCTXMARKER; { return HASH5; } -yy114: +yy112: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy112; - default: goto yy113; + case '\n': goto yy110; + default: goto yy111; } -yy115: +yy113: ++YYCURSOR; yych = *YYCURSOR; -yy116: +yy114: switch (yych) { case '\t': - case ' ': - case 0xA0: goto yy115; - case '\n': goto yy118; - case '\r': goto yy120; - default: goto yy117; + case ' ': goto yy113; + case '\n': goto yy116; + case '\r': goto yy118; + default: goto yy115; } -yy117: +yy115: { return HASH6; } -yy118: +yy116: ++YYCURSOR; -yy119: +yy117: YYCURSOR = YYCTXMARKER; { return HASH6; } -yy120: +yy118: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy118; - default: goto yy119; + case '\n': goto yy116; + default: goto yy117; } -yy121: +yy119: ++YYCURSOR; YYCURSOR = YYCTXMARKER; { return NON_INDENT_SPACE; } -yy123: +yy121: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '\n': goto yy126; - case '\r': goto yy128; - case ' ': - case 0xA0: goto yy125; - default: goto yy124; + case '\n': goto yy125; + case '\r': goto yy127; + case ' ': goto yy124; + default: goto yy122; } -yy124: +yy122: { return NON_INDENT_SPACE; } -yy125: +yy123: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy126; - case '\r': goto yy128; - case ' ': - case 0xA0: goto yy129; - default: goto yy124; + case '\n': goto yy53; + default: goto yy54; } -yy126: +yy124: + yych = *++YYCURSOR; + switch (yych) { + case '\n': goto yy125; + case '\r': goto yy127; + case ' ': goto yy128; + default: goto yy122; + } +yy125: ++YYCURSOR; -yy127: +yy126: { return TEXT_LINEBREAK; } -yy128: +yy127: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy126; - default: goto yy127; + case '\n': goto yy125; + default: goto yy126; } -yy129: +yy128: yyaccept = 8; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case '\n': goto yy126; - case '\r': goto yy128; - case ' ': - case 0xA0: goto yy131; - default: goto yy130; + case '\n': goto yy125; + case '\r': goto yy127; + case ' ': goto yy130; + default: goto yy129; } -yy130: +yy129: { return INDENT_SPACE; } -yy131: +yy130: ++YYCURSOR; yych = *YYCURSOR; switch (yych) { - case '\n': goto yy126; - case '\r': goto yy128; - case ' ': - case 0xA0: goto yy131; - default: goto yy72; + case '\n': goto yy125; + case '\r': goto yy127; + case ' ': goto yy130; + default: goto yy70; } -yy133: - yych = *++YYCURSOR; - switch (yych) { - case '\n': goto yy55; - default: goto yy56; - } -yy134: +yy132: ++YYCURSOR; { return MATH_DOLLAR_DOUBLE; } -yy136: +yy134: ++YYCURSOR; -yy137: +yy135: { return TEXT_LINEBREAK; } -yy138: +yy136: yych = *++YYCURSOR; switch (yych) { - case '\n': goto yy136; - default: goto yy137; + case '\n': goto yy134; + default: goto yy135; } -yy139: +yy137: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '(': goto yy205; - case ')': goto yy207; - case '[': goto yy209; - case ']': goto yy211; - default: goto yy140; + case '(': goto yy203; + case ')': goto yy205; + case '[': goto yy207; + case ']': goto yy209; + default: goto yy138; } -yy140: +yy138: + { return ESCAPED_CHARACTER; } +yy139: + ++YYCURSOR; { return ESCAPED_CHARACTER; } yy141: ++YYCURSOR; @@ -878,235 +845,229 @@ yy201: ++YYCURSOR; { return ESCAPED_CHARACTER; } yy203: - ++YYCURSOR; - { return ESCAPED_CHARACTER; } -yy205: ++YYCURSOR; { return MATH_PAREN_OPEN; } -yy207: +yy205: ++YYCURSOR; { return MATH_PAREN_CLOSE; } -yy209: +yy207: ++YYCURSOR; { return MATH_BRACKET_OPEN; } -yy211: +yy209: ++YYCURSOR; { return MATH_BRACKET_CLOSE; } -yy213: +yy211: yych = *++YYCURSOR; switch (yych) { case 'M': - case 'm': goto yy214; - default: goto yy72; + case 'm': goto yy212; + default: goto yy70; } -yy214: +yy212: yych = *++YYCURSOR; switch (yych) { case 'P': - case 'p': goto yy215; - default: goto yy72; + case 'p': goto yy213; + default: goto yy70; } -yy215: +yy213: yych = *++YYCURSOR; switch (yych) { - case ';': goto yy216; - default: goto yy72; + case ';': goto yy214; + default: goto yy70; } -yy216: +yy214: ++YYCURSOR; { return AMPERSAND_LONG; } -yy218: +yy216: yych = *++YYCURSOR; switch (yych) { - case '.': goto yy222; - default: goto yy72; + case '.': goto yy220; + default: goto yy70; } -yy219: +yy217: yych = *++YYCURSOR; switch (yych) { - case '.': goto yy220; - default: goto yy72; + case '.': goto yy218; + default: goto yy70; } -yy220: +yy218: ++YYCURSOR; { return ELLIPSIS; } -yy222: +yy220: yych = *++YYCURSOR; switch (yych) { - case ' ': goto yy223; - default: goto yy72; + case ' ': goto yy221; + default: goto yy70; } -yy223: +yy221: yych = *++YYCURSOR; switch (yych) { - case '.': goto yy224; - default: goto yy72; + case '.': goto yy222; + default: goto yy70; } -yy224: +yy222: ++YYCURSOR; { return ELLIPSIS; } -yy226: +yy224: ++YYCURSOR; { return QUOTE_RIGHT_ALT; } -yy228: +yy226: ++YYCURSOR; { return BRACE_DOUBLE_RIGHT; } -yy230: +yy228: ++YYCURSOR; { return BRACKET_IMAGE_LEFT; } -yy232: +yy230: ++YYCURSOR; { return BRACKET_VARIABLE_LEFT; } -yy234: +yy232: ++YYCURSOR; { return BRACKET_GLOSSARY_LEFT; } -yy236: +yy234: ++YYCURSOR; { return BRACKET_FOOTNOTE_LEFT; } -yy238: +yy236: ++YYCURSOR; { return BRACKET_CITATION_LEFT; } -yy240: +yy238: ++YYCURSOR; { return BRACKET_ABBREVIATION_LEFT; } -yy242: +yy240: yych = *++YYCURSOR; switch (yych) { - case '}': goto yy243; - default: goto yy72; + case '}': goto yy241; + default: goto yy70; } -yy243: +yy241: ++YYCURSOR; { return CRITIC_HI_CLOSE; } -yy245: +yy243: yych = *++YYCURSOR; switch (yych) { - case '}': goto yy248; - default: goto yy72; + case '}': goto yy246; + default: goto yy70; } -yy246: +yy244: ++YYCURSOR; { return CRITIC_SUB_DIV; } -yy248: +yy246: ++YYCURSOR; { return CRITIC_SUB_CLOSE; } -yy250: +yy248: yych = *++YYCURSOR; switch (yych) { - case '}': goto yy251; - default: goto yy72; + case '}': goto yy249; + default: goto yy70; } -yy251: +yy249: ++YYCURSOR; { return CRITIC_COM_CLOSE; } -yy253: +yy251: ++YYCURSOR; switch ((yych = *YYCURSOR)) { - case '-': goto yy257; - case '}': goto yy255; - default: goto yy254; + case '-': goto yy255; + case '}': goto yy253; + default: goto yy252; } -yy254: +yy252: { return DASH_N; } -yy255: +yy253: ++YYCURSOR; { return CRITIC_DEL_CLOSE; } -yy257: +yy255: ++YYCURSOR; { return DASH_M; } -yy259: +yy257: yych = *++YYCURSOR; switch (yych) { - case '}': goto yy260; - default: goto yy72; + case '}': goto yy258; + default: goto yy70; } -yy260: +yy258: ++YYCURSOR; { return CRITIC_ADD_CLOSE; } -yy262: +yy260: yyaccept = 9; yych = *(YYMARKER = ++YYCURSOR); switch (yych) { - case 'T': goto yy279; - default: goto yy263; + case 'T': goto yy277; + default: goto yy261; } -yy263: +yy261: { return BRACE_DOUBLE_LEFT; } -yy264: +yy262: yych = *++YYCURSOR; switch (yych) { - case '=': goto yy277; - default: goto yy72; + case '=': goto yy275; + default: goto yy70; } -yy265: +yy263: yych = *++YYCURSOR; switch (yych) { - case '~': goto yy275; - default: goto yy72; + case '~': goto yy273; + default: goto yy70; } -yy266: +yy264: yych = *++YYCURSOR; switch (yych) { - case '>': goto yy273; - default: goto yy72; + case '>': goto yy271; + default: goto yy70; } -yy267: +yy265: yych = *++YYCURSOR; switch (yych) { - case '-': goto yy271; - default: goto yy72; + case '-': goto yy269; + default: goto yy70; } -yy268: +yy266: yych = *++YYCURSOR; switch (yych) { - case '+': goto yy269; - default: goto yy72; + case '+': goto yy267; + default: goto yy70; } -yy269: +yy267: ++YYCURSOR; { return CRITIC_ADD_OPEN; } -yy271: +yy269: ++YYCURSOR; { return CRITIC_DEL_OPEN; } -yy273: +yy271: ++YYCURSOR; { return CRITIC_COM_OPEN; } -yy275: +yy273: ++YYCURSOR; { return CRITIC_SUB_OPEN; } -yy277: +yy275: ++YYCURSOR; { return CRITIC_HI_OPEN; } -yy279: +yy277: yych = *++YYCURSOR; switch (yych) { - case 'O': goto yy280; - default: goto yy72; + case 'O': goto yy278; + default: goto yy70; } -yy280: +yy278: yych = *++YYCURSOR; switch (yych) { - case 'C': goto yy281; - default: goto yy72; + case 'C': goto yy279; + default: goto yy70; } -yy281: +yy279: yych = *++YYCURSOR; switch (yych) { - case '}': goto yy282; - default: goto yy72; + case '}': goto yy280; + default: goto yy70; } -yy282: +yy280: yych = *++YYCURSOR; switch (yych) { - case '}': goto yy283; - default: goto yy72; + case '}': goto yy281; + default: goto yy70; } -yy283: +yy281: ++YYCURSOR; { return TOC; } -yy285: - ++YYCURSOR; - { return TEXT_PLAIN; } } } diff --git a/Sources/libMultiMarkdown/lexer.re b/Sources/libMultiMarkdown/lexer.re index 44fd265..df5dcac 100644 --- a/Sources/libMultiMarkdown/lexer.re +++ b/Sources/libMultiMarkdown/lexer.re @@ -79,21 +79,21 @@ int scan(Scanner * s, const char * stop) { re2c:yyfill:enable = 0; NL = "\r\n" | '\n' | '\r'; - WS = [ \t\240]; // Whitespace from char_lookup.c + WS = [ \t]; // Whitespace from char_lookup.c SP = WS+; SPNL = WS* NL; INDENT_TAB = '\t'; - INDENT_SPACE = [ \240]{4}; - NON_INDENT_SPACE = [ \240]{2,3}; + INDENT_SPACE = [ ]{4}; + NON_INDENT_SPACE = [ ]{2,3}; - TEXT_LINEBREAK = [ \240]{2,} NL; + TEXT_LINEBREAK = [ ]{2,} NL; // The order of these seems to matter // Don't split `à` character - '\303' '\240' { return TEXT_PLAIN; } + //'\303' '\240' { return TEXT_PLAIN; } "{{TOC}}" { return TOC; } @@ -229,7 +229,7 @@ int scan(Scanner * s, const char * stop) { ' '? NL { return TEXT_NL; } NON_INDENT_SPACE { return NON_INDENT_SPACE; } - [ \240] / '\t' { return NON_INDENT_SPACE; } + [ ] / '\t' { return NON_INDENT_SPACE; } "*" { return STAR; } "+" { return PLUS; }