diff --git a/gen/com/mwplugin/MediaWikiLexer.java b/gen/com/mwplugin/MediaWikiLexer.java index 0426ebd..d393c1a 100644 --- a/gen/com/mwplugin/MediaWikiLexer.java +++ b/gen/com/mwplugin/MediaWikiLexer.java @@ -36,7 +36,7 @@ public class MediaWikiLexer implements FlexLexer { /** * Translates characters to character classes * Chosen bits are [11, 6, 4] - * Total runtime size is 13504 bytes + * Total runtime size is 13632 bytes */ public static int ZZ_CMAP(int ch) { return ZZ_CMAP_A[(ZZ_CMAP_Y[(ZZ_CMAP_Z[ch>>10]<<6)|((ch>>4)&0x3f)]<<4)|(ch&0xf)]; @@ -52,85 +52,87 @@ public static int ZZ_CMAP(int ch) { /* The ZZ_CMAP_Y table has 2752 entries */ static final char ZZ_CMAP_Y[] = zzUnpackCMap( - "\1\0\1\1\1\2\1\3\1\4\1\5\1\6\1\7\2\1\1\10\1\11\1\12\1\13\1\12\1\13\34\12\1"+ - "\14\1\15\1\16\10\1\1\17\1\20\1\12\1\21\4\12\1\22\10\12\1\23\12\12\1\24\1\12"+ - "\1\25\1\24\1\12\1\26\4\1\1\12\1\27\1\30\2\1\2\12\1\27\1\1\1\31\1\24\5\12\1"+ - "\32\1\33\1\34\1\1\1\35\1\12\1\1\1\36\5\12\1\37\1\40\1\41\1\12\1\27\1\42\1"+ - "\12\1\43\1\44\1\1\1\12\1\45\4\1\1\12\1\46\4\1\1\47\2\12\1\50\1\1\1\51\1\15"+ - "\1\24\1\52\1\53\1\54\1\55\1\56\1\57\2\15\1\60\1\53\1\54\1\61\1\1\1\62\1\1"+ - "\1\63\1\64\1\21\1\54\1\65\1\1\1\66\1\15\1\67\1\70\1\53\1\54\1\65\1\1\1\57"+ - "\1\15\1\40\1\71\1\72\1\73\1\74\1\1\1\66\2\1\1\75\1\35\1\54\1\50\1\1\1\76\1"+ - "\15\1\1\1\75\1\35\1\54\1\77\1\1\1\56\1\15\1\100\1\75\1\35\1\12\1\101\1\56"+ - "\1\102\1\15\1\41\1\103\1\104\1\12\1\105\1\106\3\1\1\24\2\12\1\107\1\106\3"+ - "\1\1\110\1\111\1\112\1\113\1\114\1\115\2\1\1\66\3\1\1\116\1\12\1\117\1\1\1"+ - "\120\7\1\2\12\1\27\1\102\1\1\1\121\1\122\1\123\1\124\1\1\2\12\1\125\2\12\1"+ - "\126\24\12\1\127\1\130\2\12\1\127\2\12\1\131\1\132\1\13\3\12\1\132\3\12\1"+ - "\27\2\1\1\12\1\1\5\12\1\133\1\24\45\12\1\134\1\12\1\24\1\27\4\12\1\27\1\135"+ - "\1\136\1\15\1\12\1\15\1\12\1\15\1\136\1\66\3\12\1\137\1\1\1\140\4\1\5\12\1"+ - "\26\2\12\1\141\4\12\1\37\1\12\1\142\3\1\1\12\1\143\1\46\2\12\1\144\1\12\1"+ - "\74\3\1\1\12\1\106\3\12\1\46\4\1\1\145\5\1\1\103\2\12\1\137\1\146\3\1\1\147"+ - "\1\12\1\150\1\41\2\12\1\37\1\1\2\12\1\137\1\1\1\36\1\41\1\12\1\143\6\1\1\151"+ - "\1\152\14\12\4\1\21\12\1\133\2\12\1\133\1\153\1\12\1\143\3\12\1\154\1\155"+ - "\1\156\1\117\1\155\7\1\1\157\1\1\1\117\6\1\1\160\1\161\1\162\1\163\1\164\3"+ - "\1\1\165\147\1\2\12\1\142\2\12\1\142\10\12\1\166\1\167\2\12\1\125\3\12\1\170"+ - "\1\1\1\12\1\106\4\171\4\1\1\102\35\1\1\172\2\1\1\173\1\24\4\12\1\174\1\24"+ - "\4\12\1\126\1\103\1\12\1\143\1\24\4\12\1\142\1\1\1\12\1\27\3\1\1\12\40\1\133"+ - "\12\1\37\4\1\135\12\1\37\2\1\10\12\1\117\4\1\2\12\1\143\20\12\1\117\1\12\1"+ - "\175\1\1\2\12\1\142\1\102\1\12\1\143\4\12\1\37\2\1\1\176\1\177\5\12\1\200"+ - "\1\12\1\143\1\26\3\1\1\176\1\201\1\12\1\30\1\1\3\12\1\137\1\177\2\12\1\137"+ - "\3\1\1\202\1\41\1\12\1\37\1\12\1\106\1\1\1\12\1\117\1\47\2\12\1\30\1\102\1"+ - "\1\1\203\1\204\2\12\1\45\1\1\1\205\1\1\1\12\1\206\3\12\1\207\1\210\1\211\1"+ - "\27\1\63\1\212\1\213\1\171\2\12\1\126\1\37\7\12\1\30\1\1\72\12\1\137\1\12"+ - "\1\214\2\12\1\144\20\1\26\12\1\143\6\12\1\74\2\1\1\106\1\215\1\54\1\216\1"+ - "\217\6\12\1\15\1\1\1\147\25\12\1\143\1\1\4\12\1\177\2\12\1\26\2\1\1\144\7"+ - "\1\1\203\7\12\1\117\2\1\1\24\1\27\1\24\1\27\1\220\4\12\1\142\1\221\1\222\2"+ - "\1\1\223\1\12\1\13\1\224\2\143\2\1\7\12\1\27\30\1\1\12\1\117\3\12\1\66\2\1"+ - "\2\12\1\1\1\12\1\225\2\12\1\37\1\12\1\143\2\12\1\226\3\1\11\12\1\143\6\1\2"+ - "\12\1\26\3\12\1\137\11\1\23\12\1\106\1\12\1\37\1\26\11\1\1\227\2\12\1\230"+ - "\1\12\1\37\1\12\1\106\1\12\1\142\4\1\1\12\1\231\1\12\1\37\1\12\1\74\4\1\3"+ - "\12\1\232\4\1\1\66\1\233\1\12\1\137\2\1\1\12\1\117\1\12\1\117\2\1\1\116\1"+ - "\12\1\46\1\1\3\12\1\37\1\12\1\37\1\12\1\30\1\12\1\15\6\1\4\12\1\45\3\1\3\12"+ - "\1\30\3\12\1\30\60\1\1\147\2\12\1\26\4\1\1\147\2\12\2\1\1\12\1\45\1\1\1\147"+ - "\1\12\1\106\2\1\2\12\1\234\1\147\2\12\1\30\1\235\1\236\2\1\1\12\1\21\1\144"+ - "\5\1\1\237\1\240\1\45\2\12\1\142\2\1\1\70\1\53\1\54\1\65\1\1\1\241\1\15\21"+ - "\1\3\12\1\1\1\242\13\1\2\12\1\142\2\1\1\243\2\1\3\12\1\1\1\244\3\1\2\12\1"+ - "\27\5\1\1\12\1\74\30\1\4\12\1\1\1\102\34\1\3\12\1\45\20\1\71\12\1\74\16\1"+ - "\14\12\1\137\53\1\2\12\1\142\75\1\44\12\1\106\33\1\43\12\1\45\1\12\1\142\7"+ - "\1\1\12\1\143\1\1\3\12\1\1\1\137\1\1\1\147\1\245\1\12\67\1\4\12\1\46\1\66"+ - "\3\1\1\147\6\1\1\15\77\1\6\12\1\27\1\117\1\45\1\74\66\1\5\12\1\203\3\12\1"+ - "\136\1\246\1\247\1\250\3\12\1\251\1\252\1\12\1\253\1\254\1\35\24\12\1\255"+ - "\1\12\1\35\1\126\1\12\1\126\1\12\1\203\1\12\1\203\1\142\1\12\1\142\1\12\1"+ - "\54\1\12\1\54\1\12\1\205\3\1\14\12\1\46\123\1\1\250\1\12\1\256\1\257\1\260"+ - "\1\261\1\262\1\263\1\264\1\144\1\265\1\144\24\1\55\12\1\106\2\1\103\12\1\46"+ - "\15\12\1\143\150\12\1\15\25\1\41\12\1\143\36\1"); - - /* The ZZ_CMAP_A table has 2912 entries */ + "\1\0\1\1\1\2\1\3\1\4\1\5\1\6\1\7\2\1\1\10\1\11\1\12\1\13\1\12\1\14\34\12\1"+ + "\15\1\16\1\17\10\1\1\20\1\21\1\12\1\22\4\12\1\23\10\12\1\24\12\12\1\25\1\12"+ + "\1\26\1\25\1\12\1\27\4\1\1\12\1\30\1\31\2\1\2\12\1\30\1\1\1\32\1\25\5\12\1"+ + "\33\1\34\1\35\1\1\1\36\1\12\1\1\1\37\5\12\1\40\1\41\1\42\1\12\1\30\1\43\1"+ + "\12\1\44\1\45\1\1\1\12\1\46\4\1\1\12\1\47\4\1\1\50\2\12\1\51\1\1\1\52\1\16"+ + "\1\25\1\53\1\54\1\55\1\56\1\57\1\60\2\16\1\61\1\54\1\55\1\62\1\1\1\63\1\1"+ + "\1\64\1\65\1\22\1\55\1\66\1\1\1\67\1\16\1\70\1\71\1\54\1\55\1\66\1\1\1\60"+ + "\1\16\1\41\1\72\1\73\1\74\1\75\1\1\1\67\2\1\1\76\1\36\1\55\1\51\1\1\1\77\1"+ + "\16\1\1\1\76\1\36\1\55\1\100\1\1\1\57\1\16\1\101\1\76\1\36\1\12\1\102\1\57"+ + "\1\103\1\16\1\42\1\104\1\105\1\12\1\106\1\107\3\1\1\25\2\12\1\110\1\107\3"+ + "\1\1\111\1\112\1\113\1\114\1\115\1\116\2\1\1\67\3\1\1\117\1\12\1\120\1\1\1"+ + "\121\7\1\2\12\1\30\1\103\1\1\1\122\1\123\1\124\1\125\1\1\2\12\1\126\2\12\1"+ + "\127\24\12\1\130\1\131\2\12\1\130\2\12\1\132\1\133\1\14\3\12\1\133\3\12\1"+ + "\30\2\1\1\12\1\1\5\12\1\134\1\25\45\12\1\135\1\12\1\25\1\30\4\12\1\30\1\136"+ + "\1\137\1\16\1\12\1\16\1\12\1\16\1\137\1\67\3\12\1\140\1\1\1\141\4\1\5\12\1"+ + "\27\2\12\1\142\4\12\1\40\1\12\1\143\3\1\1\12\1\144\1\47\2\12\1\145\1\12\1"+ + "\75\3\1\1\12\1\107\3\12\1\47\4\1\1\146\5\1\1\104\2\12\1\140\1\147\3\1\1\150"+ + "\1\12\1\151\1\42\2\12\1\40\1\1\2\12\1\140\1\1\1\37\1\42\1\12\1\144\6\1\1\152"+ + "\1\153\14\12\4\1\21\12\1\134\2\12\1\134\1\154\1\12\1\144\3\12\1\155\1\156"+ + "\1\157\1\120\1\156\1\1\1\160\1\161\4\1\1\162\1\1\1\120\6\1\1\163\1\164\1\165"+ + "\1\166\1\167\3\1\1\170\10\1\1\171\136\1\2\12\1\143\2\12\1\143\10\12\1\172"+ + "\1\173\2\12\1\126\3\12\1\174\1\1\1\12\1\107\4\175\4\1\1\103\35\1\1\176\2\1"+ + "\1\177\1\25\4\12\1\200\1\25\4\12\1\127\1\104\1\12\1\144\1\25\4\12\1\143\1"+ + "\1\1\12\1\30\3\1\1\12\40\1\133\12\1\40\4\1\135\12\1\40\2\1\10\12\1\120\4\1"+ + "\2\12\1\144\20\12\1\120\1\12\1\201\1\1\2\12\1\143\1\103\1\12\1\144\4\12\1"+ + "\40\2\1\1\202\1\203\5\12\1\204\1\12\1\144\1\27\3\1\1\202\1\205\1\12\1\31\1"+ + "\1\3\12\1\140\1\203\2\12\1\140\3\1\1\206\1\42\1\12\1\40\1\12\1\107\1\1\1\12"+ + "\1\120\1\50\2\12\1\31\1\103\1\1\1\207\1\210\2\12\1\46\1\1\1\211\1\1\1\12\1"+ + "\212\3\12\1\213\1\214\1\215\1\30\1\64\1\216\1\217\1\175\2\12\1\127\1\40\7"+ + "\12\1\31\1\1\72\12\1\140\1\12\1\220\2\12\1\145\20\1\26\12\1\144\6\12\1\75"+ + "\2\1\1\107\1\221\1\55\1\222\1\223\6\12\1\16\1\1\1\150\25\12\1\144\1\1\4\12"+ + "\1\203\2\12\1\27\2\1\1\145\7\1\1\207\7\12\1\120\2\1\1\25\1\30\1\25\1\30\1"+ + "\224\4\12\1\143\1\225\1\226\2\1\1\227\1\12\1\14\1\230\2\144\2\1\7\12\1\30"+ + "\30\1\1\12\1\120\3\12\1\67\2\1\2\12\1\1\1\12\1\231\2\12\1\40\1\12\1\144\2"+ + "\12\1\232\3\1\11\12\1\144\6\1\2\12\1\27\3\12\1\140\11\1\23\12\1\107\1\12\1"+ + "\40\1\27\11\1\1\233\2\12\1\234\1\12\1\40\1\12\1\107\1\12\1\143\4\1\1\12\1"+ + "\235\1\12\1\40\1\12\1\75\4\1\3\12\1\236\4\1\1\67\1\237\1\12\1\140\2\1\1\12"+ + "\1\120\1\12\1\120\2\1\1\117\1\12\1\47\1\1\3\12\1\40\1\12\1\40\1\12\1\31\1"+ + "\12\1\16\6\1\4\12\1\46\3\1\3\12\1\31\3\12\1\31\60\1\1\150\2\12\1\27\4\1\1"+ + "\150\2\12\2\1\1\12\1\46\1\1\1\150\1\12\1\107\2\1\2\12\1\240\1\150\2\12\1\31"+ + "\1\241\1\242\2\1\1\12\1\22\1\145\5\1\1\243\1\244\1\46\2\12\1\143\2\1\1\71"+ + "\1\54\1\55\1\66\1\1\1\245\1\16\21\1\3\12\1\1\1\246\13\1\2\12\1\143\2\1\1\247"+ + "\2\1\3\12\1\1\1\250\3\1\2\12\1\30\5\1\1\12\1\75\30\1\4\12\1\1\1\103\34\1\3"+ + "\12\1\46\20\1\71\12\1\75\16\1\14\12\1\140\53\1\2\12\1\143\75\1\44\12\1\107"+ + "\33\1\43\12\1\46\1\12\1\143\7\1\1\12\1\144\1\1\3\12\1\1\1\140\1\1\1\150\1"+ + "\251\1\12\67\1\4\12\1\47\1\67\3\1\1\150\6\1\1\16\77\1\6\12\1\30\1\120\1\46"+ + "\1\75\66\1\5\12\1\207\3\12\1\137\1\252\1\253\1\254\3\12\1\255\1\256\1\12\1"+ + "\257\1\260\1\36\24\12\1\261\1\12\1\36\1\127\1\12\1\127\1\12\1\207\1\12\1\207"+ + "\1\143\1\12\1\143\1\12\1\55\1\12\1\55\1\12\1\211\3\1\14\12\1\47\123\1\1\254"+ + "\1\12\1\262\1\263\1\264\1\265\1\266\1\267\1\270\1\145\1\271\1\145\24\1\55"+ + "\12\1\107\2\1\103\12\1\47\15\12\1\144\150\12\1\16\25\1\41\12\1\144\36\1"); + + /* The ZZ_CMAP_A table has 2976 entries */ static final char ZZ_CMAP_A[] = zzUnpackCMap( - "\11\0\1\6\1\1\2\0\1\1\22\0\1\31\1\14\1\32\3\0\1\27\1\17\3\0\1\11\1\0\1\10"+ - "\1\0\1\23\12\5\2\0\1\15\1\24\1\16\2\0\32\4\1\25\1\0\1\26\1\0\1\30\1\0\4\3"+ - "\1\21\1\22\13\3\1\20\10\3\1\13\1\7\1\12\14\0\1\2\12\0\1\2\4\0\1\2\5\0\27\2"+ - "\1\0\12\2\4\0\14\2\16\0\5\2\7\0\1\2\1\0\1\2\1\0\5\2\1\0\2\2\2\0\4\2\1\0\1"+ - "\2\6\0\1\2\1\0\3\2\1\0\1\2\1\0\4\2\1\0\23\2\1\0\13\2\10\0\6\2\1\0\26\2\2\0"+ - "\1\2\6\0\10\2\10\0\13\2\5\0\3\2\33\0\6\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\1\0\4\2\3\0\2\2\11"+ + "\0\10\2\1\0\1\2\1\0\1\2\1\0\1\2\1\0\6\2\1\0\7\2\1\0\1\2\3\0\3\2\1\0\7\2\3"+ + "\0\4\2\2\0\6\2\4\0\1\7\2\0\2\7\3\0\2\7\2\0\2\7\2\0\1\7\1\0\1\7\3\0\1\7\12"+ + "\0\1\2\15\0\1\2\2\0\1\2\4\0\1\2\2\0\12\2\1\0\1\2\3\0\5\2\6\0\1\2\1\0\1\2\1"+ + "\0\1\2\1\0\4\2\1\0\13\2\2\0\4\2\5\0\5\2\4\0\1\2\4\0\2\2\15\0\1\7\15\0\5\2"+ + "\6\0\4\2\3\0\2\2\14\0\10\2\7\0\10\2\1\0\7\2\2\0\2\7\2\0\2\2\5\0\4\7\1\0\5"+ "\2\5\0\2\2\3\0\7\2\6\0\3\2\12\0\2\2\13\0\11\2\2\0\27\2\2\0\7\2\1\0\3\2\1\0"+ "\4\2\1\0\4\2\2\0\6\2\3\0\1\2\1\0\1\2\2\0\5\2\1\0\12\2\12\0\5\2\1\0\3\2\1\0"+ "\10\2\4\0\7\2\3\0\1\2\3\0\2\2\1\0\1\2\3\0\2\2\2\0\5\2\2\0\1\2\1\0\1\2\30\0"+ @@ -154,14 +156,15 @@ public static int ZZ_CMAP(int ch) { private static final String ZZ_ACTION_PACKED_0 = "\1\0\1\1\1\2\1\3\1\4\1\5\1\6\1\7"+ - "\1\10\4\1\1\11\1\12\2\1\1\13\1\14\1\15"+ - "\1\16\1\17\1\20\1\21\1\22\1\23\1\24\1\25"+ - "\1\0\1\26\1\27\1\30\1\31\3\0\1\32\1\33"+ - "\1\34\1\35\1\36\1\37\3\0\1\40\1\41\1\42"+ - "\1\43\2\0\1\44\1\45\1\0\1\46\1\47\1\50"; + "\1\10\1\11\1\10\2\1\1\10\1\12\1\13\2\10"+ + "\1\14\1\15\1\16\1\17\1\20\1\21\1\22\1\23"+ + "\1\24\1\25\1\26\1\0\1\27\1\30\1\31\1\32"+ + "\4\0\1\33\1\34\1\35\1\36\1\37\1\40\5\0"+ + "\1\41\1\42\1\43\1\44\4\0\1\45\1\46\3\0"+ + "\1\47\1\50\1\51\7\0\1\52\1\53"; private static int [] zzUnpackAction() { - int [] result = new int[57]; + int [] result = new int[74]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; @@ -186,17 +189,19 @@ private static int zzUnpackAction(String packed, int offset, int [] result) { private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\33\0\33\0\33\0\33\0\33\0\33\0\33"+ - "\0\66\0\121\0\154\0\207\0\242\0\275\0\33\0\330"+ - "\0\363\0\u010e\0\u0129\0\u0144\0\33\0\33\0\33\0\33"+ - "\0\33\0\33\0\33\0\33\0\u015f\0\33\0\33\0\33"+ - "\0\33\0\u017a\0\u0195\0\u01b0\0\u01cb\0\33\0\u01e6\0\33"+ - "\0\33\0\33\0\u0201\0\u021c\0\u0237\0\u0252\0\u026d\0\33"+ - "\0\u0288\0\u02a3\0\u02be\0\u02d9\0\33\0\u02f4\0\33\0\33"+ - "\0\33"; + "\0\0\0\40\0\40\0\40\0\40\0\40\0\40\0\40"+ + "\0\40\0\100\0\140\0\200\0\240\0\300\0\340\0\40"+ + "\0\u0100\0\u0120\0\u0140\0\u0160\0\u0180\0\40\0\40\0\40"+ + "\0\40\0\40\0\40\0\40\0\40\0\u01a0\0\40\0\40"+ + "\0\40\0\40\0\u01c0\0\u01e0\0\u0200\0\u0220\0\u0240\0\40"+ + "\0\u0260\0\40\0\40\0\40\0\u0280\0\u02a0\0\u02c0\0\u02e0"+ + "\0\u0300\0\u0320\0\u0340\0\40\0\u0360\0\u0380\0\u03a0\0\u03c0"+ + "\0\u03e0\0\u0400\0\40\0\u0420\0\u0440\0\u0460\0\40\0\40"+ + "\0\40\0\u0480\0\u04a0\0\u04c0\0\u04e0\0\u0500\0\u0520\0\u0540"+ + "\0\40\0\40"; private static int [] zzUnpackRowMap() { - int [] result = new int[57]; + int [] result = new int[74]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; @@ -220,20 +225,24 @@ private static int zzUnpackRowMap(String packed, int offset, int [] result) { private static final String ZZ_TRANS_PACKED_0 = "\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11"+ - "\1\12\1\2\1\13\1\14\1\15\1\16\1\17\1\20"+ - "\3\5\1\21\1\22\1\23\1\24\1\25\1\26\1\27"+ - "\1\30\42\0\1\31\1\32\1\33\1\34\30\0\1\35"+ - "\34\0\1\36\27\0\1\37\3\0\1\40\33\0\1\41"+ - "\32\0\1\42\3\0\1\43\2\0\1\44\26\0\1\45"+ - "\31\0\1\46\40\0\1\47\33\0\1\50\33\0\1\51"+ - "\22\0\1\52\24\0\1\53\43\0\1\54\31\0\1\55"+ - "\31\0\1\56\37\0\1\57\16\0\1\60\44\0\1\61"+ - "\31\0\1\62\30\0\1\63\37\0\1\64\24\0\1\65"+ - "\36\0\1\66\27\0\1\67\37\0\1\70\24\0\1\71"+ - "\14\0"; + "\1\12\1\13\1\11\1\14\1\15\1\16\1\17\1\20"+ + "\1\21\3\5\1\22\4\5\1\23\1\24\1\25\1\26"+ + "\1\27\1\30\1\31\50\0\1\32\1\33\1\34\1\35"+ + "\35\0\1\36\41\0\1\37\34\0\1\40\3\0\1\41"+ + "\40\0\1\42\37\0\1\43\3\0\1\44\2\0\1\45"+ + "\1\46\32\0\1\47\36\0\1\50\51\0\1\51\40\0"+ + "\1\52\40\0\1\53\23\0\1\54\31\0\1\55\50\0"+ + "\1\56\36\0\1\57\3\0\1\60\40\0\1\61\31\0"+ + "\1\62\50\0\1\63\17\0\1\64\51\0\1\65\36\0"+ + "\1\66\43\0\1\67\40\0\1\70\30\0\1\71\50\0"+ + "\1\72\25\0\1\73\43\0\1\74\43\0\1\75\37\0"+ + "\1\76\30\0\1\77\50\0\1\100\25\0\1\101\47\0"+ + "\1\102\32\0\1\103\37\0\1\104\36\0\1\105\37\0"+ + "\1\106\46\0\1\107\37\0\1\110\26\0\1\111\37\0"+ + "\1\112\20\0"; private static int [] zzUnpackTrans() { - int [] result = new int[783]; + int [] result = new int[1376]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; @@ -271,12 +280,12 @@ private static int zzUnpackTrans(String packed, int offset, int [] result) { private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\1\0\7\11\6\1\1\11\5\1\10\11\1\0\4\11"+ - "\3\0\1\1\1\11\1\1\3\11\3\0\2\1\1\11"+ - "\1\1\2\0\1\1\1\11\1\0\3\11"; + "\1\0\10\11\6\1\1\11\5\1\10\11\1\0\4\11"+ + "\4\0\1\1\1\11\1\1\3\11\5\0\2\1\1\11"+ + "\1\1\4\0\1\1\1\11\3\0\3\11\7\0\2\11"; private static int [] zzUnpackAttribute() { - int [] result = new int[57]; + int [] result = new int[74]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; @@ -584,163 +593,175 @@ else if (zzAtEOF) { case 1: { return com.intellij.psi.TokenType.BAD_CHARACTER; } - case 41: break; + case 44: break; case 2: { return newline; } - case 42: break; + case 45: break; case 3: { return otherletter; } - case 43: break; + case 46: break; case 4: { return lcaseletter; } - case 44: break; + case 47: break; case 5: { return ucaseletter; } - case 45: break; + case 48: break; case 6: { return decimaldigit; } - case 46: break; + case 49: break; case 7: { return tab; } - case 47: break; + case 50: break; case 8: - { return pipe; + { return symboltoken; } - case 48: break; + case 51: break; case 9: - { return unescapedlessthan; + { return pipe; } - case 49: break; + case 52: break; case 10: - { return unescapedgreaterthan; + { return unescapedlessthan; } - case 50: break; + case 53: break; case 11: - { return equals; + { return unescapedgreaterthan; } - case 51: break; + case 54: break; case 12: - { return openbracket; + { return equals; } - case 52: break; + case 55: break; case 13: - { return closebracket; + { return openbracket; } - case 53: break; + case 56: break; case 14: - { return unescapedampersand; + { return closebracket; } - case 54: break; + case 57: break; case 15: - { return underscore; + { return unescapedampersand; } - case 55: break; + case 58: break; case 16: - { return space; + { return underscore; } - case 56: break; + case 59: break; case 17: - { return doublequote; + { return space; } - case 57: break; + case 60: break; case 18: - { return doublepipe; + { return doublequote; } - case 58: break; + case 61: break; case 19: - { return tablesectionstart; + { return doublepipe; } - case 59: break; + case 62: break; case 20: - { return tablesectionstartcaptionable; + { return pipedash; } - case 60: break; + case 63: break; case 21: - { return tableend; + { return pipeplus; } - case 61: break; + case 64: break; case 22: - { return curlyclose2; + { return pipeclosecurly; } - case 62: break; + case 65: break; case 23: - { return tablestart; + { return curlyclose2; } - case 63: break; + case 66: break; case 24: - { return curlyopen2; + { return tablestart; } - case 64: break; + case 67: break; case 25: - { return tableheaderdoubledelimiter; + { return curlyopen2; } - case 65: break; + case 68: break; case 26: - { return quote2; + { return tableheaderdoubledelimiter; } - case 66: break; + case 69: break; case 27: - { return htmltagselfclose; + { return quote2; } - case 67: break; + case 70: break; case 28: - { return equals2; + { return htmltagselfclose; } - case 68: break; + case 71: break; case 29: - { return openbracket2; + { return equals2; } - case 69: break; + case 72: break; case 30: - { return closebracket2; + { return openbracket2; } - case 70: break; + case 73: break; case 31: - { return htmlcommentclose; + { return closebracket2; } - case 71: break; + case 74: break; case 32: - { return quote3; + { return htmlcommentclose; } - case 72: break; + case 75: break; case 33: - { return equals3; + { return quote3; } - case 73: break; + case 76: break; case 34: - { return htmlcommentopen; + { return equals3; } - case 74: break; + case 77: break; case 35: - { return refopen; + { return htmlcommentopen; } - case 75: break; + case 78: break; case 36: - { return equals4; + { return refopen; } - case 76: break; + case 79: break; case 37: - { return refopencomplete; + { return equals4; } - case 77: break; + case 80: break; case 38: - { return quote5; + { return refopencomplete; } - case 78: break; + case 81: break; case 39: - { return equals5; + { return quote5; } - case 79: break; + case 82: break; case 40: + { return equals5; + } + case 83: break; + case 41: { return refclose; } - case 80: break; + case 84: break; + case 42: + { return galleryopen; + } + case 85: break; + case 43: + { return galleryclose; + } + case 86: break; default: zzScanError(ZZ_NO_MATCH); } diff --git a/gen/com/mwplugin/parser/MediaWikiParser.java b/gen/com/mwplugin/parser/MediaWikiParser.java index 739f965..d65cdb1 100644 --- a/gen/com/mwplugin/parser/MediaWikiParser.java +++ b/gen/com/mwplugin/parser/MediaWikiParser.java @@ -38,6 +38,9 @@ else if (t == WHITESPACES) { else if (t == ALL_INLINE_ELEMENTS) { r = consumeToken(b, all_inline_elements); } + else if (t == ALL_INLINE_ELEMENTS_INCLUDING_PIPE) { + r = consumeToken(b, all_inline_elements_including_pipe); + } else if (t == ANY_SUPPORTED_UNICODE_CHARACTER) { r = consumeToken(b, any_supported_unicode_character); } @@ -723,6 +726,23 @@ public static boolean all_inline_elements(PsiBuilder b, int l) { return r; } + /* ********************************************************** */ + // letter|symbol|decimaldigit|whitespace-char|inline-element|special-block|"|" + public static boolean all_inline_elements_including_pipe(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "all_inline_elements_including_pipe")) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, ALL_INLINE_ELEMENTS_INCLUDING_PIPE, ""); + r = letter(b, l + 1); + if (!r) r = symbol(b, l + 1); + if (!r) r = consumeToken(b, decimaldigit); + if (!r) r = whitespace_char(b, l + 1); + if (!r) r = inline_element(b, l + 1); + if (!r) r = special_block(b, l + 1); + if (!r) r = consumeToken(b, pipe); + exit_section_(b, l, m, r, false, null); + return r; + } + /* ********************************************************** */ // letter public static boolean any_supported_unicode_character(PsiBuilder b, int l) { @@ -1051,7 +1071,7 @@ public static boolean category_namespace(PsiBuilder b, int l) { } /* ********************************************************** */ - // ((!tableheaderdoubledelimiter !doublepipe !(newline whitespace? (tablesectionstart | tablesectionstartcaptionable))) (!(newline whitespace? "|}")) !(newline whitespace? "|") (!(newline whitespace? "!")) all-inline-elements)* + // ((!tableheaderdoubledelimiter !doublepipe !(newline whitespace? (pipedash | pipeplus))) (!(newline whitespace? "|}")) !(newline whitespace? "|") (!(newline whitespace? "!")) all-inline-elements)* public static boolean cell_content(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "cell_content")) return false; Marker m = enter_section_(b, l, _NONE_, CELL_CONTENT, ""); @@ -1065,7 +1085,7 @@ public static boolean cell_content(PsiBuilder b, int l) { return true; } - // (!tableheaderdoubledelimiter !doublepipe !(newline whitespace? (tablesectionstart | tablesectionstartcaptionable))) (!(newline whitespace? "|}")) !(newline whitespace? "|") (!(newline whitespace? "!")) all-inline-elements + // (!tableheaderdoubledelimiter !doublepipe !(newline whitespace? (pipedash | pipeplus))) (!(newline whitespace? "|}")) !(newline whitespace? "|") (!(newline whitespace? "!")) all-inline-elements private static boolean cell_content_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "cell_content_0")) return false; boolean r; @@ -1079,7 +1099,7 @@ private static boolean cell_content_0(PsiBuilder b, int l) { return r; } - // !tableheaderdoubledelimiter !doublepipe !(newline whitespace? (tablesectionstart | tablesectionstartcaptionable)) + // !tableheaderdoubledelimiter !doublepipe !(newline whitespace? (pipedash | pipeplus)) private static boolean cell_content_0_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "cell_content_0_0")) return false; boolean r; @@ -1111,7 +1131,7 @@ private static boolean cell_content_0_0_1(PsiBuilder b, int l) { return r; } - // !(newline whitespace? (tablesectionstart | tablesectionstartcaptionable)) + // !(newline whitespace? (pipedash | pipeplus)) private static boolean cell_content_0_0_2(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "cell_content_0_0_2")) return false; boolean r; @@ -1121,7 +1141,7 @@ private static boolean cell_content_0_0_2(PsiBuilder b, int l) { return r; } - // newline whitespace? (tablesectionstart | tablesectionstartcaptionable) + // newline whitespace? (pipedash | pipeplus) private static boolean cell_content_0_0_2_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "cell_content_0_0_2_0")) return false; boolean r; @@ -1140,13 +1160,13 @@ private static boolean cell_content_0_0_2_0_1(PsiBuilder b, int l) { return true; } - // tablesectionstart | tablesectionstartcaptionable + // pipedash | pipeplus private static boolean cell_content_0_0_2_0_2(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "cell_content_0_0_2_0_2")) return false; boolean r; Marker m = enter_section_(b); - r = consumeToken(b, tablesectionstart); - if (!r) r = consumeToken(b, tablesectionstartcaptionable); + r = consumeToken(b, pipedash); + if (!r) r = consumeToken(b, pipeplus); exit_section_(b, m, null, r); return r; } @@ -1168,7 +1188,7 @@ private static boolean cell_content_0_1_0(PsiBuilder b, int l) { Marker m = enter_section_(b); r = consumeToken(b, newline); r = r && cell_content_0_1_0_1(b, l + 1); - r = r && consumeToken(b, tableend); + r = r && consumeToken(b, pipeclosecurly); exit_section_(b, m, null, r); return r; } @@ -1450,7 +1470,7 @@ private static boolean enumerated_item_1_0(PsiBuilder b, int l) { } /* ********************************************************** */ - // openbracket url whitespace? (inline-element)* closebracket + // openbracket url whitespace? (all-inline-elements-including-pipe)* closebracket public static boolean external_link(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "external_link")) return false; if (!nextTokenIs(b, openbracket)) return false; @@ -1472,7 +1492,7 @@ private static boolean external_link_2(PsiBuilder b, int l) { return true; } - // (inline-element)* + // (all-inline-elements-including-pipe)* private static boolean external_link_3(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "external_link_3")) return false; int c = current_position_(b); @@ -1484,12 +1504,12 @@ private static boolean external_link_3(PsiBuilder b, int l) { return true; } - // (inline-element) + // (all-inline-elements-including-pipe) private static boolean external_link_3_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "external_link_3_0")) return false; boolean r; Marker m = enter_section_(b); - r = inline_element(b, l + 1); + r = all_inline_elements_including_pipe(b, l + 1); exit_section_(b, m, null, r); return r; } @@ -1527,7 +1547,7 @@ public static boolean formatted_text(PsiBuilder b, int l) { } /* ********************************************************** */ - // "!"|"$"|"%"|"&"|"("")"|"*"|","|"-"|"."|":"|";"|"<"|"@"|"["|"]"|"^"|"_"|"`"|"{"|"|"|"}"|"~"|letter|decimaldigit|"–"|"'"|"/"|template-block + // "!"|"$"|"%"|"&"|"("|")"|"*"|","|"-"|"."|":"|";"|"<"|"@"|"["|"]"|"^"|"_"|"`"|"{"|"|"|"}"|"~"|letter|decimaldigit|"–"|"'"|"/"|template-block|"?" public static boolean friendly_ref_link_char(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "friendly_ref_link_char")) return false; boolean r; @@ -1536,7 +1556,8 @@ public static boolean friendly_ref_link_char(PsiBuilder b, int l) { if (!r) r = consumeToken(b, "$"); if (!r) r = consumeToken(b, "%"); if (!r) r = consumeToken(b, unescapedampersand); - if (!r) r = friendly_ref_link_char_4(b, l + 1); + if (!r) r = consumeToken(b, "("); + if (!r) r = consumeToken(b, ")"); if (!r) r = consumeToken(b, "*"); if (!r) r = consumeToken(b, ","); if (!r) r = consumeToken(b, "-"); @@ -1560,34 +1581,25 @@ public static boolean friendly_ref_link_char(PsiBuilder b, int l) { if (!r) r = consumeToken(b, "'"); if (!r) r = consumeToken(b, "/"); if (!r) r = template_block(b, l + 1); + if (!r) r = consumeToken(b, "?"); exit_section_(b, l, m, r, false, null); return r; } - // "("")" - private static boolean friendly_ref_link_char_4(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "friendly_ref_link_char_4")) return false; - boolean r; - Marker m = enter_section_(b); - r = consumeToken(b, "("); - r = r && consumeToken(b, ")"); - exit_section_(b, m, null, r); - return r; - } - /* ********************************************************** */ - // "" newline? gallery-image (newline? gallery-image)* newline? "" + // galleryopen newline? gallery-image (newline? gallery-image)* newline? galleryclose public static boolean gallery_block(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "gallery_block")) return false; + if (!nextTokenIs(b, galleryopen)) return false; boolean r; - Marker m = enter_section_(b, l, _NONE_, GALLERY_BLOCK, ""); - r = consumeToken(b, ""); + Marker m = enter_section_(b); + r = consumeToken(b, galleryopen); r = r && gallery_block_1(b, l + 1); r = r && gallery_image(b, l + 1); r = r && gallery_block_3(b, l + 1); r = r && gallery_block_4(b, l + 1); - r = r && consumeToken(b, ""); - exit_section_(b, l, m, r, false, null); + r = r && consumeToken(b, galleryclose); + exit_section_(b, m, GALLERY_BLOCK, r); return r; } @@ -1813,7 +1825,7 @@ private static boolean html_closing_tag_1(PsiBuilder b, int l) { } /* ********************************************************** */ - // htmlcommentopen whitespace? all-inline-elements* whitespace? htmlcommentclose + // htmlcommentopen whitespace? all-inline-elements-including-pipe* whitespace? htmlcommentclose public static boolean html_comment(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "html_comment")) return false; if (!nextTokenIs(b, htmlcommentopen)) return false; @@ -1835,12 +1847,12 @@ private static boolean html_comment_1(PsiBuilder b, int l) { return true; } - // all-inline-elements* + // all-inline-elements-including-pipe* private static boolean html_comment_2(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "html_comment_2")) return false; int c = current_position_(b); while (true) { - if (!all_inline_elements(b, l + 1)) break; + if (!all_inline_elements_including_pipe(b, l + 1)) break; if (!empty_element_parsed_guard_(b, "html_comment_2", c)) break; c = current_position_(b); } @@ -2189,7 +2201,13 @@ public static boolean image_align_right(PsiBuilder b, int l) { // "png"| // "svg"| // "gif"| - // "bmp" + // "bmp"| + // "JPG"| + // "JPEG"| + // "PNG"| + // "SVG"| + // "GIF"| + // "BMP" public static boolean image_extension(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "image_extension")) return false; boolean r; @@ -2200,6 +2218,12 @@ public static boolean image_extension(PsiBuilder b, int l) { if (!r) r = consumeToken(b, "svg"); if (!r) r = consumeToken(b, "gif"); if (!r) r = consumeToken(b, "bmp"); + if (!r) r = consumeToken(b, "JPG"); + if (!r) r = consumeToken(b, "JPEG"); + if (!r) r = consumeToken(b, "PNG"); + if (!r) r = consumeToken(b, "SVG"); + if (!r) r = consumeToken(b, "GIF"); + if (!r) r = consumeToken(b, "BMP"); exit_section_(b, l, m, r, false, null); return r; } @@ -2317,18 +2341,42 @@ public static boolean image_mode_parameter(PsiBuilder b, int l) { } /* ********************************************************** */ - // page-name "." image-extension + // interwiki-prefix (letter|decimal-number|symbol|whitespace)* public static boolean image_name(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "image_name")) return false; boolean r; Marker m = enter_section_(b, l, _NONE_, IMAGE_NAME, ""); - r = page_name(b, l + 1); - r = r && consumeToken(b, "."); - r = r && image_extension(b, l + 1); + r = interwiki_prefix(b, l + 1); + r = r && image_name_1(b, l + 1); exit_section_(b, l, m, r, false, null); return r; } + // (letter|decimal-number|symbol|whitespace)* + private static boolean image_name_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "image_name_1")) return false; + int c = current_position_(b); + while (true) { + if (!image_name_1_0(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "image_name_1", c)) break; + c = current_position_(b); + } + return true; + } + + // letter|decimal-number|symbol|whitespace + private static boolean image_name_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "image_name_1_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = letter(b, l + 1); + if (!r) r = decimal_number(b, l + 1); + if (!r) r = symbol(b, l + 1); + if (!r) r = whitespace(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + /* ********************************************************** */ // image-mode-parameter| // image-size-parameter| @@ -2585,13 +2633,13 @@ private static boolean indent_item_1_0(PsiBuilder b, int l) { } /* ********************************************************** */ - // html-tag | + // gallery-block | + // html-tag | // url| // category-link | // link | // magic-link | // image-inline | - // gallery-block | // media-inline | // text-with-formatting | // template-block @@ -2599,13 +2647,13 @@ public static boolean inline_element(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "inline_element")) return false; boolean r; Marker m = enter_section_(b, l, _NONE_, INLINE_ELEMENT, ""); - r = html_tag(b, l + 1); + r = gallery_block(b, l + 1); + if (!r) r = html_tag(b, l + 1); if (!r) r = url(b, l + 1); if (!r) r = category_link(b, l + 1); if (!r) r = link(b, l + 1); if (!r) r = magic_link(b, l + 1); if (!r) r = image_inline(b, l + 1); - if (!r) r = gallery_block(b, l + 1); if (!r) r = media_inline(b, l + 1); if (!r) r = text_with_formatting(b, l + 1); if (!r) r = template_block(b, l + 1); @@ -2839,13 +2887,14 @@ private static boolean internal_link_unassigned_property_1(PsiBuilder b, int l) } /* ********************************************************** */ - // "Wikipedia"|"File" + // "Wikipedia"|"File"|"Image" public static boolean interwiki(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "interwiki")) return false; boolean r; Marker m = enter_section_(b, l, _NONE_, INTERWIKI, ""); r = consumeToken(b, "Wikipedia"); if (!r) r = consumeToken(b, "File"); + if (!r) r = consumeToken(b, "Image"); exit_section_(b, l, m, r, false, null); return r; } @@ -4076,7 +4125,7 @@ public static boolean paragraph(PsiBuilder b, int l) { } /* ********************************************************** */ - // paragraph (EOF | newline? special-block-and-more | newline paragraph-and-more | (tablesectionstart | tablesectionstartcaptionable))? + // paragraph (EOF | newline? special-block-and-more | newline paragraph-and-more | (pipedash | pipeplus))? public static boolean paragraph_and_more(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "paragraph_and_more")) return false; boolean r; @@ -4087,14 +4136,14 @@ public static boolean paragraph_and_more(PsiBuilder b, int l) { return r; } - // (EOF | newline? special-block-and-more | newline paragraph-and-more | (tablesectionstart | tablesectionstartcaptionable))? + // (EOF | newline? special-block-and-more | newline paragraph-and-more | (pipedash | pipeplus))? private static boolean paragraph_and_more_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "paragraph_and_more_1")) return false; paragraph_and_more_1_0(b, l + 1); return true; } - // EOF | newline? special-block-and-more | newline paragraph-and-more | (tablesectionstart | tablesectionstartcaptionable) + // EOF | newline? special-block-and-more | newline paragraph-and-more | (pipedash | pipeplus) private static boolean paragraph_and_more_1_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "paragraph_and_more_1_0")) return false; boolean r; @@ -4136,13 +4185,13 @@ private static boolean paragraph_and_more_1_0_2(PsiBuilder b, int l) { return r; } - // tablesectionstart | tablesectionstartcaptionable + // pipedash | pipeplus private static boolean paragraph_and_more_1_0_3(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "paragraph_and_more_1_0_3")) return false; boolean r; Marker m = enter_section_(b); - r = consumeToken(b, tablesectionstart); - if (!r) r = consumeToken(b, tablesectionstartcaptionable); + r = consumeToken(b, pipedash); + if (!r) r = consumeToken(b, pipeplus); exit_section_(b, m, null, r); return r; } @@ -4787,53 +4836,21 @@ public static boolean sub_page_separator(PsiBuilder b, int l) { /* ********************************************************** */ // html-unsafe-symbol| // underscore| - // "."| - // ","| - // "("|")"|"-"|":"|"#"|"/"|"'"|";"|"|"|"–"|doublequote|"!"|"%"|"?"|"_"|"—"|"+"|"$"|"~"|"·"|"’"|equals|"†"|"½"|"*"|"@"|"−"|"‘"|"^"|"ᴥ"|"•"|"…"|"`"|tableheaderdoubledelimiter|"“"|"”"|htmltagselfclose + // symboltoken| + // doublequote| + // equals| + // tableheaderdoubledelimiter| + // htmltagselfclose public static boolean symbol(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "symbol")) return false; boolean r; Marker m = enter_section_(b, l, _NONE_, SYMBOL, ""); r = html_unsafe_symbol(b, l + 1); if (!r) r = consumeToken(b, underscore); - if (!r) r = consumeToken(b, "."); - if (!r) r = consumeToken(b, ","); - if (!r) r = consumeToken(b, "("); - if (!r) r = consumeToken(b, ")"); - if (!r) r = consumeToken(b, "-"); - if (!r) r = consumeToken(b, ":"); - if (!r) r = consumeToken(b, "#"); - if (!r) r = consumeToken(b, "/"); - if (!r) r = consumeToken(b, "'"); - if (!r) r = consumeToken(b, ";"); - if (!r) r = consumeToken(b, pipe); - if (!r) r = consumeToken(b, "–"); + if (!r) r = consumeToken(b, symboltoken); if (!r) r = consumeToken(b, doublequote); - if (!r) r = consumeToken(b, "!"); - if (!r) r = consumeToken(b, "%"); - if (!r) r = consumeToken(b, "?"); - if (!r) r = consumeToken(b, underscore); - if (!r) r = consumeToken(b, "—"); - if (!r) r = consumeToken(b, "+"); - if (!r) r = consumeToken(b, "$"); - if (!r) r = consumeToken(b, "~"); - if (!r) r = consumeToken(b, "·"); - if (!r) r = consumeToken(b, "’"); if (!r) r = consumeToken(b, equals); - if (!r) r = consumeToken(b, "†"); - if (!r) r = consumeToken(b, "½"); - if (!r) r = consumeToken(b, "*"); - if (!r) r = consumeToken(b, "@"); - if (!r) r = consumeToken(b, "−"); - if (!r) r = consumeToken(b, "‘"); - if (!r) r = consumeToken(b, "^"); - if (!r) r = consumeToken(b, "ᴥ"); - if (!r) r = consumeToken(b, "•"); - if (!r) r = consumeToken(b, "…"); - if (!r) r = consumeToken(b, "`"); if (!r) r = consumeToken(b, tableheaderdoubledelimiter); - if (!r) r = consumeToken(b, "“"); - if (!r) r = consumeToken(b, "”"); if (!r) r = consumeToken(b, htmltagselfclose); exit_section_(b, l, m, r, false, null); return r; @@ -5073,13 +5090,13 @@ public static boolean table_cell_double_delimited_start(PsiBuilder b, int l) { } /* ********************************************************** */ - // tableend + // pipeclosecurly public static boolean table_end(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "table_end")) return false; - if (!nextTokenIs(b, tableend)) return false; + if (!nextTokenIs(b, pipeclosecurly)) return false; boolean r; Marker m = enter_section_(b); - r = consumeToken(b, tableend); + r = consumeToken(b, pipeclosecurly); exit_section_(b, m, TABLE_END, r); return r; } @@ -5232,14 +5249,14 @@ public static boolean table_row_start(PsiBuilder b, int l) { } /* ********************************************************** */ - // tablesectionstart | tablesectionstartcaptionable + // pipedash | pipeplus public static boolean table_section_start(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "table_section_start")) return false; - if (!nextTokenIs(b, "", tablesectionstart, tablesectionstartcaptionable)) return false; + if (!nextTokenIs(b, "
", pipedash, pipeplus)) return false; boolean r; Marker m = enter_section_(b, l, _NONE_, TABLE_SECTION_START, "
"); - r = consumeToken(b, tablesectionstart); - if (!r) r = consumeToken(b, tablesectionstartcaptionable); + r = consumeToken(b, pipedash); + if (!r) r = consumeToken(b, pipeplus); exit_section_(b, l, m, r, false, null); return r; } @@ -5257,7 +5274,7 @@ public static boolean table_start(PsiBuilder b, int l) { } /* ********************************************************** */ - // template-block-start template-name whitespace? newline* ("|" whitespace? (template-property-named|template-property-unassigned)? whitespace? newline* noparse-block?)* template-block-end + // template-block-start template-name whitespace? newline* (("|"|doublepipe|pipedash|pipeplus) whitespace? (template-property-named|template-property-unassigned)? whitespace? newline* noparse-block?)* (template-block-end|pipeclosecurly "}") public static boolean template_block(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "template_block")) return false; if (!nextTokenIs(b, curlyopen2)) return false; @@ -5268,7 +5285,7 @@ public static boolean template_block(PsiBuilder b, int l) { r = r && template_block_2(b, l + 1); r = r && template_block_3(b, l + 1); r = r && template_block_4(b, l + 1); - r = r && template_block_end(b, l + 1); + r = r && template_block_5(b, l + 1); exit_section_(b, m, TEMPLATE_BLOCK, r); return r; } @@ -5292,7 +5309,7 @@ private static boolean template_block_3(PsiBuilder b, int l) { return true; } - // ("|" whitespace? (template-property-named|template-property-unassigned)? whitespace? newline* noparse-block?)* + // (("|"|doublepipe|pipedash|pipeplus) whitespace? (template-property-named|template-property-unassigned)? whitespace? newline* noparse-block?)* private static boolean template_block_4(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "template_block_4")) return false; int c = current_position_(b); @@ -5304,12 +5321,12 @@ private static boolean template_block_4(PsiBuilder b, int l) { return true; } - // "|" whitespace? (template-property-named|template-property-unassigned)? whitespace? newline* noparse-block? + // ("|"|doublepipe|pipedash|pipeplus) whitespace? (template-property-named|template-property-unassigned)? whitespace? newline* noparse-block? private static boolean template_block_4_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "template_block_4_0")) return false; boolean r; Marker m = enter_section_(b); - r = consumeToken(b, pipe); + r = template_block_4_0_0(b, l + 1); r = r && template_block_4_0_1(b, l + 1); r = r && template_block_4_0_2(b, l + 1); r = r && template_block_4_0_3(b, l + 1); @@ -5319,6 +5336,19 @@ private static boolean template_block_4_0(PsiBuilder b, int l) { return r; } + // "|"|doublepipe|pipedash|pipeplus + private static boolean template_block_4_0_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "template_block_4_0_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, pipe); + if (!r) r = consumeToken(b, doublepipe); + if (!r) r = consumeToken(b, pipedash); + if (!r) r = consumeToken(b, pipeplus); + exit_section_(b, m, null, r); + return r; + } + // whitespace? private static boolean template_block_4_0_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "template_block_4_0_1")) return false; @@ -5370,6 +5400,28 @@ private static boolean template_block_4_0_5(PsiBuilder b, int l) { return true; } + // template-block-end|pipeclosecurly "}" + private static boolean template_block_5(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "template_block_5")) return false; + boolean r; + Marker m = enter_section_(b); + r = template_block_end(b, l + 1); + if (!r) r = template_block_5_1(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + // pipeclosecurly "}" + private static boolean template_block_5_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "template_block_5_1")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, pipeclosecurly); + r = r && consumeToken(b, "}"); + exit_section_(b, m, null, r); + return r; + } + /* ********************************************************** */ // "}}" public static boolean template_block_end(PsiBuilder b, int l) { diff --git a/gen/com/mwplugin/psi/MediaWikiTypes.java b/gen/com/mwplugin/psi/MediaWikiTypes.java index 244aa98..7540eb2 100644 --- a/gen/com/mwplugin/psi/MediaWikiTypes.java +++ b/gen/com/mwplugin/psi/MediaWikiTypes.java @@ -9,6 +9,7 @@ public interface MediaWikiTypes { IElementType ALL_INLINE_ELEMENTS = new MediaWikiElementType("ALL_INLINE_ELEMENTS"); + IElementType ALL_INLINE_ELEMENTS_INCLUDING_PIPE = new MediaWikiElementType("ALL_INLINE_ELEMENTS_INCLUDING_PIPE"); IElementType ANY_SUPPORTED_UNICODE_CHARACTER = new MediaWikiElementType("ANY_SUPPORTED_UNICODE_CHARACTER"); IElementType ARTICLE = new MediaWikiElementType("ARTICLE"); IElementType ARTICLE_LINK = new MediaWikiElementType("ARTICLE_LINK"); @@ -207,6 +208,7 @@ public interface MediaWikiTypes { IElementType WIKI_MARKUP_CHARACTERS = new MediaWikiElementType("WIKI_MARKUP_CHARACTERS"); IElementType all_inline_elements = new MediaWikiTokenType("all_inline_elements"); + IElementType all_inline_elements_including_pipe = new MediaWikiTokenType("all_inline_elements_including_pipe"); IElementType any_supported_unicode_character = new MediaWikiTokenType("any_supported_unicode_character"); IElementType article_link = new MediaWikiTokenType("article_link"); IElementType article_title = new MediaWikiTokenType("article_title"); @@ -247,6 +249,8 @@ public interface MediaWikiTypes { IElementType friendly_ref_link_char = new MediaWikiTokenType("friendly_ref_link_char"); IElementType gallery_block = new MediaWikiTokenType("gallery_block"); IElementType gallery_image = new MediaWikiTokenType("gallery_image"); + IElementType galleryclose = new MediaWikiTokenType(""); + IElementType galleryopen = new MediaWikiTokenType(""); IElementType hex_digit = new MediaWikiTokenType("hex_digit"); IElementType hex_number = new MediaWikiTokenType("hex_number"); IElementType horizontal_rule = new MediaWikiTokenType("horizontal_rule"); @@ -340,6 +344,9 @@ public interface MediaWikiTypes { IElementType page_name = new MediaWikiTokenType("page_name"); IElementType paragraph_and_more = new MediaWikiTokenType("paragraph_and_more"); IElementType pipe = new MediaWikiTokenType("|"); + IElementType pipeclosecurly = new MediaWikiTokenType("|}"); + IElementType pipedash = new MediaWikiTokenType("|-"); + IElementType pipeplus = new MediaWikiTokenType("|+"); IElementType plain_text = new MediaWikiTokenType("plain_text"); IElementType pmid_number = new MediaWikiTokenType("pmid_number"); IElementType pre_block = new MediaWikiTokenType("pre_block"); @@ -371,6 +378,7 @@ public interface MediaWikiTypes { IElementType special_block_and_more = new MediaWikiTokenType("special_block_and_more"); IElementType sub_page = new MediaWikiTokenType("sub_page"); IElementType sub_page_separator = new MediaWikiTokenType("sub_page_separator"); + IElementType symboltoken = new MediaWikiTokenType("symboltoken"); IElementType tab = new MediaWikiTokenType("TAB"); IElementType table_block = new MediaWikiTokenType("table_block"); IElementType table_cell = new MediaWikiTokenType("table_cell"); @@ -386,10 +394,7 @@ public interface MediaWikiTypes { IElementType table_row_start = new MediaWikiTokenType("table_row_start"); IElementType table_section_start = new MediaWikiTokenType("table_section_start"); IElementType table_start = new MediaWikiTokenType("table_start"); - IElementType tableend = new MediaWikiTokenType("|}"); IElementType tableheaderdoubledelimiter = new MediaWikiTokenType("!!"); - IElementType tablesectionstart = new MediaWikiTokenType("|-"); - IElementType tablesectionstartcaptionable = new MediaWikiTokenType("|+"); IElementType tablestart = new MediaWikiTokenType("{|"); IElementType template_block = new MediaWikiTokenType("template_block"); IElementType template_block_end = new MediaWikiTokenType("template_block_end"); @@ -424,6 +429,9 @@ public static PsiElement createElement(ASTNode node) { if (type == ALL_INLINE_ELEMENTS) { return new MediaWikiAllInlineElementsImpl(node); } + else if (type == ALL_INLINE_ELEMENTS_INCLUDING_PIPE) { + return new MediaWikiAllInlineElementsIncludingPipeImpl(node); + } else if (type == ANY_SUPPORTED_UNICODE_CHARACTER) { return new MediaWikiAnySupportedUnicodeCharacterImpl(node); } diff --git a/gen/com/mwplugin/psi/MediaWikiVisitor.java b/gen/com/mwplugin/psi/MediaWikiVisitor.java index b392b4f..5d183d4 100644 --- a/gen/com/mwplugin/psi/MediaWikiVisitor.java +++ b/gen/com/mwplugin/psi/MediaWikiVisitor.java @@ -27,6 +27,10 @@ public void visitAllInlineElements(@NotNull MediaWikiAllInlineElements o) { visitPsiElement(o); } + public void visitAllInlineElementsIncludingPipe(@NotNull MediaWikiAllInlineElementsIncludingPipe o) { + visitPsiElement(o); + } + public void visitAnySupportedUnicodeCharacter(@NotNull MediaWikiAnySupportedUnicodeCharacter o) { visitIMediaWikiNamedElement(o); } diff --git a/out/production/wikimedia/com/mwplugin/MediaWikiAnnotator.class b/out/production/wikimedia/com/mwplugin/MediaWikiAnnotator.class index 00da16a..4058735 100644 Binary files a/out/production/wikimedia/com/mwplugin/MediaWikiAnnotator.class and b/out/production/wikimedia/com/mwplugin/MediaWikiAnnotator.class differ diff --git a/out/production/wikimedia/com/mwplugin/MediaWikiLexer.class b/out/production/wikimedia/com/mwplugin/MediaWikiLexer.class index 27ba3bf..bd92e2b 100644 Binary files a/out/production/wikimedia/com/mwplugin/MediaWikiLexer.class and b/out/production/wikimedia/com/mwplugin/MediaWikiLexer.class differ diff --git a/out/production/wikimedia/com/mwplugin/MediaWikiUtil.class b/out/production/wikimedia/com/mwplugin/MediaWikiUtil.class index 9ba6c65..71a3ad5 100644 Binary files a/out/production/wikimedia/com/mwplugin/MediaWikiUtil.class and b/out/production/wikimedia/com/mwplugin/MediaWikiUtil.class differ diff --git a/out/production/wikimedia/com/mwplugin/mediawiki.bnf b/out/production/wikimedia/com/mwplugin/mediawiki.bnf index 85ac2fc..1f9434d 100644 --- a/out/production/wikimedia/com/mwplugin/mediawiki.bnf +++ b/out/production/wikimedia/com/mwplugin/mediawiki.bnf @@ -23,13 +23,15 @@ tokens = [ // space='regexp:\s+' // comment='regexp://.*' - tablesectionstart = "|-" - tablesectionstartcaptionable = "|+" + galleryopen = "" + galleryclose = "" + pipedash = "|-" + pipeplus = "|+" quote5 = "'''''" quote3 = "'''" quote2 = "''" tablestart = "{|" - tableend = "|}" + pipeclosecurly = "|}" tableheaderdoubledelimiter = "!!" doublepipe = "||" htmlcommentopen = "