RUBY-19105: allow block sequences right under sequence items

This commit is contained in:
Valentin Fondaratov
2017-02-27 14:33:43 +03:00
parent b7f4c1ddb0
commit c27b4e2432
7 changed files with 279 additions and 220 deletions
@@ -36,7 +36,7 @@ public class _YAMLLexer implements FlexLexer, YAMLTokenTypes {
* l is of the form l = 2*k, k a non negative integer
*/
private static final int ZZ_LEXSTATE[] = {
0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5
0, 0, 1, 1, 2, 2, 0, 0, 3, 3, 4, 4
};
/**
@@ -75,9 +75,9 @@ public class _YAMLLexer implements FlexLexer, YAMLTokenTypes {
private static final int [] ZZ_ACTION = zzUnpackAction();
private static final String ZZ_ACTION_PACKED_0 =
"\16\0\1\1\1\2\1\3\1\4\1\5\1\2\1\6"+
"\15\0\1\1\1\2\1\3\1\4\1\5\1\2\1\6"+
"\1\7\1\10\2\2\1\11\1\12\4\2\1\13\1\2"+
"\1\1\1\4\2\2\1\11\1\2\1\1\1\4\5\2"+
"\1\1\1\4\2\2\1\11\1\2\1\1\1\4\4\2"+
"\1\1\1\4\2\2\1\14\1\15\1\16\10\0\1\1"+
"\1\0\1\17\1\0\2\20\2\21\2\22\6\0\1\23"+
"\2\0\1\24\1\0\2\25\4\0\2\26\1\0\1\1"+
@@ -88,7 +88,7 @@ public class _YAMLLexer implements FlexLexer, YAMLTokenTypes {
"\3\0\2\1\1\0\4\1\1\0\1\1\2\0\1\1";
private static int [] zzUnpackAction() {
int [] result = new int[170];
int [] result = new int[168];
int offset = 0;
offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
return result;
@@ -114,30 +114,29 @@ public class _YAMLLexer implements FlexLexer, YAMLTokenTypes {
private static final String ZZ_ROWMAP_PACKED_0 =
"\0\0\0\34\0\70\0\124\0\160\0\214\0\250\0\304"+
"\0\340\0\374\0\u0118\0\u0134\0\u0150\0\u016c\0\u0188\0\u01a4"+
"\0\u01a4\0\u01c0\0\u01dc\0\u01f8\0\u01a4\0\u0214\0\u01a4\0\u0230"+
"\0\u024c\0\u0268\0\u01a4\0\u0284\0\u02a0\0\u02bc\0\u02d8\0\u01a4"+
"\0\340\0\374\0\u0118\0\u0134\0\u0150\0\u016c\0\u0188\0\u0188"+
"\0\u01a4\0\u01c0\0\u01dc\0\u0188\0\u01f8\0\u0188\0\u0214\0\u0230"+
"\0\u024c\0\u0188\0\u0268\0\u0284\0\u02a0\0\u02bc\0\u0188\0\u02d8"+
"\0\u02f4\0\u0310\0\u032c\0\u0348\0\u0364\0\u0380\0\u039c\0\u03b8"+
"\0\u03d4\0\u03f0\0\u03d4\0\u040c\0\u0428\0\u01c0\0\u0444\0\u0460"+
"\0\u047c\0\u0460\0\u0498\0\u01a4\0\u04b4\0\u04d0\0\u01a4\0\u04ec"+
"\0\u0508\0\u0524\0\u0540\0\u055c\0\u0578\0\u0594\0\u05b0\0\u05cc"+
"\0\u0188\0\u01a4\0\u05e8\0\u01a4\0\u0604\0\u01a4\0\u0620\0\u063c"+
"\0\u0658\0\u0674\0\u02a0\0\u040c\0\u0690\0\u06ac\0\u02bc\0\u0428"+
"\0\u06c8\0\u06e4\0\u01a4\0\u0700\0\u071c\0\u0738\0\u0754\0\u0770"+
"\0\u01a4\0\u078c\0\u07a8\0\u07c4\0\u07e0\0\u07fc\0\u0310\0\u0818"+
"\0\u0834\0\u0850\0\u086c\0\u03d4\0\u03b8\0\u0888\0\u01a4\0\u08a4"+
"\0\u08c0\0\u08dc\0\u0460\0\u0444\0\u01a4\0\u08f8\0\u0914\0\u0930"+
"\0\u08f8\0\u094c\0\u0968\0\u0984\0\u0524\0\u09a0\0\u09bc\0\u055c"+
"\0\u01a4\0\u01a4\0\u09d8\0\u09f4\0\u0a10\0\u0a2c\0\u01a4\0\u0a48"+
"\0\u0a64\0\u0a80\0\u01a4\0\u0a9c\0\u0ab8\0\u0ad4\0\u0af0\0\u0b0c"+
"\0\u0b28\0\u0b44\0\u0b60\0\u0b7c\0\u0b98\0\u0bb4\0\u0bd0\0\u0bec"+
"\0\u09f4\0\u0c08\0\u0c24\0\u0c40\0\u0c5c\0\u0c78\0\u0c94\0\u0cb0"+
"\0\u0ccc\0\u0ce8\0\u0d04\0\u0ab8\0\u0d20\0\u0d3c\0\u0d58\0\u0d74"+
"\0\u0b60\0\u0d90\0\u0dac\0\u0dc8\0\u0de4\0\u0e00\0\u0e1c\0\u0c78"+
"\0\u0e38\0\u0e54";
"\0\u03d4\0\u03b8\0\u03f0\0\u040c\0\u0428\0\u0444\0\u0460\0\u0444"+
"\0\u047c\0\u0188\0\u0498\0\u04b4\0\u0188\0\u04d0\0\u04ec\0\u0508"+
"\0\u0524\0\u0540\0\u055c\0\u0578\0\u0594\0\u05b0\0\u016c\0\u0188"+
"\0\u05cc\0\u0188\0\u05e8\0\u0188\0\u0604\0\u0620\0\u063c\0\u0658"+
"\0\u0284\0\u03f0\0\u0674\0\u0690\0\u02a0\0\u040c\0\u06ac\0\u06c8"+
"\0\u0188\0\u06e4\0\u0700\0\u071c\0\u0738\0\u0754\0\u0188\0\u0770"+
"\0\u078c\0\u07a8\0\u07c4\0\u07e0\0\u02f4\0\u07fc\0\u0818\0\u0834"+
"\0\u0850\0\u03b8\0\u039c\0\u086c\0\u0188\0\u0888\0\u08a4\0\u08c0"+
"\0\u0444\0\u0428\0\u0188\0\u08dc\0\u08f8\0\u0914\0\u08dc\0\u0930"+
"\0\u094c\0\u0968\0\u0508\0\u0984\0\u09a0\0\u0540\0\u0188\0\u0188"+
"\0\u09bc\0\u09d8\0\u09f4\0\u0a10\0\u0188\0\u0a2c\0\u0a48\0\u0a64"+
"\0\u0188\0\u0a80\0\u0a9c\0\u0ab8\0\u0ad4\0\u0af0\0\u0b0c\0\u0b28"+
"\0\u0b44\0\u0b60\0\u0b7c\0\u0b98\0\u0bb4\0\u0bd0\0\u09d8\0\u0bec"+
"\0\u0c08\0\u0c24\0\u0c40\0\u0c5c\0\u0c78\0\u0c94\0\u0cb0\0\u0ccc"+
"\0\u0ce8\0\u0a9c\0\u0d04\0\u0d20\0\u0d3c\0\u0d58\0\u0b44\0\u0d74"+
"\0\u0d90\0\u0dac\0\u0dc8\0\u0de4\0\u0e00\0\u0c5c\0\u0e1c\0\u0e38";
private static int [] zzUnpackRowMap() {
int [] result = new int[170];
int [] result = new int[168];
int offset = 0;
offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
return result;
@@ -160,183 +159,179 @@ public class _YAMLLexer implements FlexLexer, YAMLTokenTypes {
private static final int [] ZZ_TRANS = zzUnpackTrans();
private static final String ZZ_TRANS_PACKED_0 =
"\1\17\2\20\1\21\1\22\1\23\1\24\1\25\1\26"+
"\1\27\1\30\1\26\1\31\1\32\1\33\1\34\1\17"+
"\1\35\1\36\3\17\1\20\1\37\1\17\1\40\1\17"+
"\1\41\1\42\2\20\1\21\1\43\1\23\1\44\1\25"+
"\1\26\1\27\1\45\1\26\1\20\1\46\1\33\1\47"+
"\1\42\1\35\1\36\3\42\1\20\1\37\1\42\1\40"+
"\1\42\1\20\1\50\2\20\1\21\1\51\1\23\1\52"+
"\1\25\1\26\1\27\1\53\1\26\1\31\1\32\1\33"+
"\1\34\1\50\1\54\1\55\3\50\1\20\1\37\1\50"+
"\1\40\1\50\1\41\1\17\2\20\1\21\1\22\1\23"+
"\1\24\1\25\1\26\1\27\1\56\1\26\1\31\1\32"+
"\1\33\1\34\1\17\1\35\1\36\3\17\1\20\1\37"+
"\1\17\1\40\1\17\1\41\1\57\2\20\1\21\1\60"+
"\1\23\1\61\1\25\1\26\1\27\1\62\1\26\1\31"+
"\1\46\1\33\1\47\1\57\1\54\1\55\3\57\1\20"+
"\1\37\1\57\1\40\1\57\1\41\7\63\1\64\1\65"+
"\2\63\1\65\20\63\27\0\1\66\13\0\1\67\1\70"+
"\2\0\1\70\20\0\1\71\3\0\1\72\1\0\1\72"+
"\3\0\1\72\5\0\1\71\2\0\3\71\2\0\1\71"+
"\1\0\1\71\2\0\1\67\1\0\1\67\3\0\3\67"+
"\1\0\1\67\1\0\2\67\12\0\1\67\2\0\1\73"+
"\3\0\1\74\1\0\1\74\3\0\1\74\5\0\1\73"+
"\2\0\3\73\2\0\1\73\1\0\1\73\2\0\1\67"+
"\5\0\2\67\2\0\1\67\34\0\1\75\52\0\1\75"+
"\1\76\1\0\3\76\1\77\1\100\1\0\1\101\2\76"+
"\1\101\20\76\34\0\1\17\1\0\5\17\2\0\2\17"+
"\1\0\20\17\7\23\1\0\24\23\1\17\1\0\5\17"+
"\1\102\1\103\2\17\1\103\20\17\10\0\1\26\2\0"+
"\1\26\20\0\1\17\1\0\5\17\1\104\1\105\2\17"+
"\1\105\20\17\7\0\1\106\1\107\1\0\1\110\1\107"+
"\16\0\1\110\16\0\1\111\33\0\1\112\16\0\7\113"+
"\1\114\10\113\1\115\1\116\12\113\7\117\1\120\12\117"+
"\1\121\11\117\4\0\3\122\1\123\1\124\1\0\1\125"+
"\1\124\3\0\1\126\2\0\1\122\2\125\2\122\1\127"+
"\1\130\1\0\1\122\10\0\1\131\1\132\1\0\1\133"+
"\1\132\16\0\1\133\1\0\1\134\1\0\1\134\1\135"+
"\1\134\1\135\1\136\1\0\1\137\1\135\1\134\1\137"+
"\1\134\2\135\12\134\1\135\2\134\1\42\1\0\1\42"+
"\1\0\3\42\3\0\1\42\1\0\1\42\2\0\12\42"+
"\1\0\3\42\1\0\1\42\1\0\3\42\1\102\1\103"+
"\1\0\1\42\1\103\1\42\2\0\12\42\1\0\3\42"+
"\1\0\1\42\1\0\3\42\1\104\1\105\1\0\1\42"+
"\1\105\1\42\2\0\12\42\1\0\2\42\15\0\1\140"+
"\33\0\1\141\16\0\1\142\1\0\3\142\1\143\1\144"+
"\1\0\1\145\2\142\1\145\20\142\1\50\1\0\5\50"+
"\2\0\2\50\1\0\21\50\1\0\5\50\1\102\1\103"+
"\2\50\1\103\20\50\20\114\1\146\1\147\12\114\22\120"+
"\1\150\11\120\1\151\1\0\1\151\1\152\1\151\1\152"+
"\1\153\1\0\1\154\1\152\1\151\1\154\1\151\2\152"+
"\12\151\1\152\2\151\1\57\1\0\1\57\1\0\3\57"+
"\3\0\1\57\1\0\1\57\2\0\12\57\1\0\3\57"+
"\1\0\1\57\1\0\3\57\1\102\1\103\1\0\1\57"+
"\1\103\1\57\2\0\12\57\1\0\2\57\7\63\1\0"+
"\24\63\7\0\1\155\1\65\2\0\1\65\24\0\3\156"+
"\3\0\1\157\4\0\1\160\2\0\1\156\2\157\2\156"+
"\1\161\1\162\1\0\1\156\11\0\1\70\2\0\1\70"+
"\20\0\1\163\1\0\1\163\1\164\1\163\1\164\1\165"+
"\1\0\1\71\1\164\1\163\1\71\1\163\2\164\12\163"+
"\1\164\2\163\1\71\1\0\1\71\1\0\3\71\3\0"+
"\1\71\1\0\1\71\2\0\12\71\1\0\2\71\1\166"+
"\1\0\3\166\1\167\1\170\1\0\1\73\2\166\1\73"+
"\20\166\1\73\1\0\5\73\2\0\2\73\1\0\20\73"+
"\12\0\1\171\17\0\1\171\1\0\1\76\1\0\4\76"+
"\1\100\1\0\1\101\2\76\1\101\20\76\5\0\1\17"+
"\26\0\1\17\1\172\5\17\2\172\2\17\1\172\20\17"+
"\10\0\1\103\2\0\1\103\30\0\1\105\2\0\1\105"+
"\30\0\1\107\2\0\1\107\27\0\1\106\1\107\2\0"+
"\1\107\20\0\5\173\1\0\1\173\1\0\1\173\3\0"+
"\1\173\2\0\12\173\1\0\2\173\1\174\3\112\1\175"+
"\1\112\1\175\1\0\2\112\1\175\3\112\1\176\1\112"+
"\1\174\2\112\3\174\2\112\1\174\1\112\1\174\1\112"+
"\7\113\1\114\24\113\6\0\1\177\33\0\1\177\13\0"+
"\1\117\15\0\3\122\1\123\1\124\1\0\1\122\1\124"+
"\3\0\1\126\2\0\5\122\3\0\1\122\11\0\1\124"+
"\2\0\1\124\24\0\3\122\1\123\1\124\1\0\1\125"+
"\1\124\3\0\1\126\2\0\1\122\2\125\2\122\1\127"+
"\2\0\1\122\24\0\1\200\14\0\3\122\3\0\1\122"+
"\4\0\1\126\2\0\5\122\3\0\1\122\4\0\4\201"+
"\2\0\2\201\4\0\1\202\2\0\6\201\1\0\2\201"+
"\11\0\1\132\2\0\1\132\27\0\1\131\1\132\2\0"+
"\1\132\20\0\1\134\1\0\1\134\1\135\2\134\1\136"+
"\1\0\1\137\1\135\1\134\1\137\1\134\2\135\12\134"+
"\1\135\2\134\5\0\1\42\26\0\1\42\1\203\1\42"+
"\1\203\3\42\3\203\1\42\1\203\1\42\2\203\12\42"+
"\1\203\2\42\5\204\1\0\1\204\1\0\1\204\3\0"+
"\1\204\2\0\12\204\1\0\2\204\1\205\3\141\1\206"+
"\1\141\1\206\1\0\2\141\1\206\3\141\1\207\1\141"+
"\1\205\2\141\3\205\2\141\1\205\1\141\1\205\1\141"+
"\1\142\1\0\4\142\1\144\1\0\1\145\2\142\1\145"+
"\20\142\5\0\1\50\26\0\34\114\22\0\1\120\11\0"+
"\1\151\1\0\1\151\1\152\2\151\1\153\1\0\1\154"+
"\1\152\1\151\1\154\1\151\2\152\12\151\1\152\2\151"+
"\5\0\1\57\32\0\3\156\3\0\1\156\4\0\1\160"+
"\2\0\5\156\3\0\1\156\5\0\3\156\3\0\1\157"+
"\4\0\1\160\2\0\1\156\2\157\2\156\1\161\2\0"+
"\1\156\24\0\1\210\13\0\4\211\2\0\2\211\4\0"+
"\1\212\2\0\6\211\1\0\2\211\1\0\1\163\1\0"+
"\1\163\1\164\2\163\1\165\1\0\1\71\1\164\1\163"+
"\1\71\1\163\2\164\12\163\1\164\2\163\5\0\1\71"+
"\26\0\1\166\1\0\4\166\1\170\1\0\1\73\2\166"+
"\1\73\20\166\5\0\1\73\26\0\1\213\3\173\1\214"+
"\1\0\1\144\1\0\1\173\1\0\1\214\1\173\2\0"+
"\1\215\1\173\1\213\2\173\3\213\2\173\1\213\1\0"+
"\1\213\1\173\1\216\1\112\2\216\1\217\1\220\1\175"+
"\1\0\1\221\1\216\1\217\1\221\2\216\1\222\15\216"+
"\1\174\1\112\2\174\1\217\1\174\1\217\1\0\1\112"+
"\1\174\1\217\1\112\2\174\1\223\15\174\1\50\3\0"+
"\1\144\1\0\1\144\3\0\1\144\5\0\1\50\2\0"+
"\3\50\2\0\1\50\1\0\1\50\24\0\1\122\13\0"+
"\4\201\2\0\2\201\1\0\1\224\2\0\1\202\2\0"+
"\6\201\1\0\2\201\24\0\1\225\10\0\1\226\3\204"+
"\1\227\1\0\1\153\1\0\1\204\1\0\1\227\1\204"+
"\2\0\1\230\1\204\1\226\2\204\3\226\2\204\1\226"+
"\1\0\1\226\1\204\1\231\1\141\1\231\1\232\1\233"+
"\1\232\1\206\1\0\1\234\1\232\1\233\1\234\1\231"+
"\1\232\1\235\12\231\1\232\2\231\1\205\1\141\1\205"+
"\1\141\1\233\1\205\1\233\1\0\2\141\1\233\1\141"+
"\1\205\1\141\1\207\12\205\1\141\2\205\1\57\3\0"+
"\1\153\1\0\1\153\3\0\1\153\5\0\1\57\2\0"+
"\3\57\2\0\1\57\1\0\1\57\24\0\1\156\13\0"+
"\4\211\2\0\2\211\1\0\1\171\2\0\1\212\2\0"+
"\6\211\1\0\2\211\24\0\1\236\10\0\1\237\1\173"+
"\2\237\1\240\1\143\1\144\1\0\1\241\1\142\1\240"+
"\1\241\2\142\1\242\12\237\1\142\2\237\1\213\1\173"+
"\2\213\1\240\1\50\1\243\1\0\1\173\1\50\1\240"+
"\1\173\2\50\1\244\12\213\1\50\2\213\1\50\3\0"+
"\1\144\1\0\1\144\3\0\1\144\3\0\1\176\1\0"+
"\1\50\2\0\3\50\2\0\1\50\1\0\1\50\1\0"+
"\1\216\1\112\2\216\1\217\1\216\1\175\1\0\1\221"+
"\1\216\1\217\1\221\2\216\1\222\16\216\1\112\2\216"+
"\1\217\1\216\1\217\1\0\1\221\1\216\1\217\1\221"+
"\2\216\1\222\15\216\1\174\3\112\1\175\1\174\1\175"+
"\1\0\2\112\1\175\3\112\1\176\1\112\1\174\2\112"+
"\3\174\2\112\1\174\1\112\1\174\1\112\1\142\1\0"+
"\2\142\1\243\1\142\1\144\1\0\1\145\1\142\1\243"+
"\1\145\21\142\1\0\2\142\1\243\1\143\1\144\1\0"+
"\1\145\1\142\1\243\1\145\20\142\7\0\1\123\1\124"+
"\2\0\1\124\43\0\1\201\10\0\1\245\1\204\1\245"+
"\1\246\1\247\1\152\1\153\1\0\1\250\1\152\1\247"+
"\1\250\1\151\1\152\1\251\12\245\1\152\2\245\1\226"+
"\1\204\1\226\1\204\1\247\1\57\1\252\1\0\1\204"+
"\1\0\1\247\1\204\1\57\1\0\1\230\12\226\1\0"+
"\2\226\1\57\3\0\1\153\1\0\1\153\3\0\1\153"+
"\3\0\1\207\1\0\1\57\2\0\3\57\2\0\1\57"+
"\1\0\1\57\1\0\1\231\1\141\1\231\1\232\1\233"+
"\1\231\1\206\1\0\1\234\1\232\1\233\1\234\1\231"+
"\1\232\1\235\12\231\1\232\2\231\1\205\3\141\1\206"+
"\1\205\1\206\1\0\2\141\1\206\3\141\1\207\1\141"+
"\1\205\2\141\3\205\2\141\1\205\1\141\1\205\1\141"+
"\1\231\1\141\1\231\1\232\1\233\1\231\1\233\1\0"+
"\1\234\1\232\1\233\1\234\1\231\1\232\1\235\12\231"+
"\1\232\2\231\1\57\3\0\1\153\1\57\1\153\3\0"+
"\1\153\5\0\1\57\2\0\3\57\2\0\1\57\1\0"+
"\1\57\24\0\1\211\10\0\1\237\1\173\2\237\1\240"+
"\1\142\1\144\1\0\1\241\1\142\1\240\1\241\2\142"+
"\1\242\12\237\1\142\3\237\1\173\2\237\1\240\1\142"+
"\1\243\1\0\1\241\1\142\1\240\1\241\2\142\1\242"+
"\12\237\1\142\2\237\1\142\1\0\2\142\1\243\1\142"+
"\1\144\1\0\1\145\1\142\1\243\1\145\2\142\1\222"+
"\16\142\1\0\4\142\1\243\1\0\1\145\2\142\1\145"+
"\21\142\1\0\2\142\1\243\1\143\1\144\1\0\1\145"+
"\1\142\1\243\1\145\2\142\1\222\15\142\1\245\1\204"+
"\1\245\1\246\1\247\1\151\1\153\1\0\1\250\1\152"+
"\1\247\1\250\1\151\1\152\1\251\12\245\1\152\2\245"+
"\1\226\3\204\1\227\1\57\1\153\1\0\1\204\1\0"+
"\1\227\1\204\2\0\1\230\1\204\1\226\2\204\3\226"+
"\2\204\1\226\1\0\1\226\1\204\1\245\1\204\1\245"+
"\1\246\1\247\1\151\1\252\1\0\1\250\1\152\1\247"+
"\1\250\1\151\1\152\1\251\12\245\1\152\2\245\1\57"+
"\3\0\1\153\1\57\1\153\3\0\1\153\3\0\1\207"+
"\1\0\1\57\2\0\3\57\2\0\1\57\1\0\1\57"+
"\1\0\1\151\1\0\1\151\1\152\2\151\1\252\1\0"+
"\1\154\1\152\1\151\1\154\1\151\2\152\12\151\1\152"+
"\2\151";
"\1\16\2\17\1\20\1\21\1\22\1\23\1\24\1\25"+
"\1\26\1\27\1\25\1\30\1\31\1\32\1\33\1\16"+
"\1\34\1\35\3\16\1\17\1\36\1\16\1\37\1\16"+
"\1\40\1\41\2\17\1\20\1\42\1\22\1\43\1\24"+
"\1\25\1\26\1\44\1\25\1\17\1\45\1\32\1\46"+
"\1\41\1\34\1\35\3\41\1\17\1\36\1\41\1\37"+
"\1\41\1\17\1\47\2\17\1\20\1\50\1\22\1\51"+
"\1\24\1\25\1\26\1\52\1\25\1\30\1\31\1\32"+
"\1\33\1\47\1\53\1\54\3\47\1\17\1\36\1\47"+
"\1\37\1\47\1\40\1\55\2\17\1\20\1\56\1\22"+
"\1\57\1\24\1\25\1\26\1\60\1\25\1\30\1\45"+
"\1\32\1\46\1\55\1\53\1\54\3\55\1\17\1\36"+
"\1\55\1\37\1\55\1\40\7\61\1\62\1\63\2\61"+
"\1\63\20\61\27\0\1\64\13\0\1\65\1\66\2\0"+
"\1\66\20\0\1\67\3\0\1\70\1\0\1\70\3\0"+
"\1\70\5\0\1\67\2\0\3\67\2\0\1\67\1\0"+
"\1\67\2\0\1\65\1\0\1\65\3\0\3\65\1\0"+
"\1\65\1\0\2\65\12\0\1\65\2\0\1\71\3\0"+
"\1\72\1\0\1\72\3\0\1\72\5\0\1\71\2\0"+
"\3\71\2\0\1\71\1\0\1\71\2\0\1\65\5\0"+
"\2\65\2\0\1\65\34\0\1\73\52\0\1\73\1\74"+
"\1\0\3\74\1\75\1\76\1\0\1\77\2\74\1\77"+
"\20\74\34\0\1\16\1\0\5\16\2\0\2\16\1\0"+
"\20\16\7\22\1\0\24\22\1\16\1\0\5\16\1\100"+
"\1\101\2\16\1\101\20\16\10\0\1\25\2\0\1\25"+
"\20\0\1\16\1\0\5\16\1\102\1\103\2\16\1\103"+
"\20\16\7\0\1\104\1\105\1\0\1\106\1\105\16\0"+
"\1\106\16\0\1\107\33\0\1\110\16\0\7\111\1\112"+
"\10\111\1\113\1\114\12\111\7\115\1\116\12\115\1\117"+
"\11\115\4\0\3\120\1\121\1\122\1\0\1\123\1\122"+
"\3\0\1\124\2\0\1\120\2\123\2\120\1\125\1\126"+
"\1\0\1\120\10\0\1\127\1\130\1\0\1\131\1\130"+
"\16\0\1\131\1\0\1\132\1\0\1\132\1\133\1\132"+
"\1\133\1\134\1\0\1\135\1\133\1\132\1\135\1\132"+
"\2\133\12\132\1\133\2\132\1\41\1\0\1\41\1\0"+
"\3\41\3\0\1\41\1\0\1\41\2\0\12\41\1\0"+
"\3\41\1\0\1\41\1\0\3\41\1\100\1\101\1\0"+
"\1\41\1\101\1\41\2\0\12\41\1\0\3\41\1\0"+
"\1\41\1\0\3\41\1\102\1\103\1\0\1\41\1\103"+
"\1\41\2\0\12\41\1\0\2\41\15\0\1\136\33\0"+
"\1\137\16\0\1\140\1\0\3\140\1\141\1\142\1\0"+
"\1\143\2\140\1\143\20\140\1\47\1\0\5\47\2\0"+
"\2\47\1\0\21\47\1\0\5\47\1\100\1\101\2\47"+
"\1\101\20\47\20\112\1\144\1\145\12\112\22\116\1\146"+
"\11\116\1\147\1\0\1\147\1\150\1\147\1\150\1\151"+
"\1\0\1\152\1\150\1\147\1\152\1\147\2\150\12\147"+
"\1\150\2\147\1\55\1\0\1\55\1\0\3\55\3\0"+
"\1\55\1\0\1\55\2\0\12\55\1\0\3\55\1\0"+
"\1\55\1\0\3\55\1\100\1\101\1\0\1\55\1\101"+
"\1\55\2\0\12\55\1\0\2\55\7\61\1\0\24\61"+
"\7\0\1\153\1\63\2\0\1\63\24\0\3\154\3\0"+
"\1\155\4\0\1\156\2\0\1\154\2\155\2\154\1\157"+
"\1\160\1\0\1\154\11\0\1\66\2\0\1\66\20\0"+
"\1\161\1\0\1\161\1\162\1\161\1\162\1\163\1\0"+
"\1\67\1\162\1\161\1\67\1\161\2\162\12\161\1\162"+
"\2\161\1\67\1\0\1\67\1\0\3\67\3\0\1\67"+
"\1\0\1\67\2\0\12\67\1\0\2\67\1\164\1\0"+
"\3\164\1\165\1\166\1\0\1\71\2\164\1\71\20\164"+
"\1\71\1\0\5\71\2\0\2\71\1\0\20\71\12\0"+
"\1\167\17\0\1\167\1\0\1\74\1\0\4\74\1\76"+
"\1\0\1\77\2\74\1\77\20\74\5\0\1\16\26\0"+
"\1\16\1\170\5\16\2\170\2\16\1\170\20\16\10\0"+
"\1\101\2\0\1\101\30\0\1\103\2\0\1\103\30\0"+
"\1\105\2\0\1\105\27\0\1\104\1\105\2\0\1\105"+
"\20\0\5\171\1\0\1\171\1\0\1\171\3\0\1\171"+
"\2\0\12\171\1\0\2\171\1\172\3\110\1\173\1\110"+
"\1\173\1\0\2\110\1\173\3\110\1\174\1\110\1\172"+
"\2\110\3\172\2\110\1\172\1\110\1\172\1\110\7\111"+
"\1\112\24\111\6\0\1\175\33\0\1\175\13\0\1\115"+
"\15\0\3\120\1\121\1\122\1\0\1\120\1\122\3\0"+
"\1\124\2\0\5\120\3\0\1\120\11\0\1\122\2\0"+
"\1\122\24\0\3\120\1\121\1\122\1\0\1\123\1\122"+
"\3\0\1\124\2\0\1\120\2\123\2\120\1\125\2\0"+
"\1\120\24\0\1\176\14\0\3\120\3\0\1\120\4\0"+
"\1\124\2\0\5\120\3\0\1\120\4\0\4\177\2\0"+
"\2\177\4\0\1\200\2\0\6\177\1\0\2\177\11\0"+
"\1\130\2\0\1\130\27\0\1\127\1\130\2\0\1\130"+
"\20\0\1\132\1\0\1\132\1\133\2\132\1\134\1\0"+
"\1\135\1\133\1\132\1\135\1\132\2\133\12\132\1\133"+
"\2\132\5\0\1\41\26\0\1\41\1\201\1\41\1\201"+
"\3\41\3\201\1\41\1\201\1\41\2\201\12\41\1\201"+
"\2\41\5\202\1\0\1\202\1\0\1\202\3\0\1\202"+
"\2\0\12\202\1\0\2\202\1\203\3\137\1\204\1\137"+
"\1\204\1\0\2\137\1\204\3\137\1\205\1\137\1\203"+
"\2\137\3\203\2\137\1\203\1\137\1\203\1\137\1\140"+
"\1\0\4\140\1\142\1\0\1\143\2\140\1\143\20\140"+
"\5\0\1\47\26\0\34\112\22\0\1\116\11\0\1\147"+
"\1\0\1\147\1\150\2\147\1\151\1\0\1\152\1\150"+
"\1\147\1\152\1\147\2\150\12\147\1\150\2\147\5\0"+
"\1\55\32\0\3\154\3\0\1\154\4\0\1\156\2\0"+
"\5\154\3\0\1\154\5\0\3\154\3\0\1\155\4\0"+
"\1\156\2\0\1\154\2\155\2\154\1\157\2\0\1\154"+
"\24\0\1\206\13\0\4\207\2\0\2\207\4\0\1\210"+
"\2\0\6\207\1\0\2\207\1\0\1\161\1\0\1\161"+
"\1\162\2\161\1\163\1\0\1\67\1\162\1\161\1\67"+
"\1\161\2\162\12\161\1\162\2\161\5\0\1\67\26\0"+
"\1\164\1\0\4\164\1\166\1\0\1\71\2\164\1\71"+
"\20\164\5\0\1\71\26\0\1\211\3\171\1\212\1\0"+
"\1\142\1\0\1\171\1\0\1\212\1\171\2\0\1\213"+
"\1\171\1\211\2\171\3\211\2\171\1\211\1\0\1\211"+
"\1\171\1\214\1\110\2\214\1\215\1\216\1\173\1\0"+
"\1\217\1\214\1\215\1\217\2\214\1\220\15\214\1\172"+
"\1\110\2\172\1\215\1\172\1\215\1\0\1\110\1\172"+
"\1\215\1\110\2\172\1\221\15\172\1\47\3\0\1\142"+
"\1\0\1\142\3\0\1\142\5\0\1\47\2\0\3\47"+
"\2\0\1\47\1\0\1\47\24\0\1\120\13\0\4\177"+
"\2\0\2\177\1\0\1\222\2\0\1\200\2\0\6\177"+
"\1\0\2\177\24\0\1\223\10\0\1\224\3\202\1\225"+
"\1\0\1\151\1\0\1\202\1\0\1\225\1\202\2\0"+
"\1\226\1\202\1\224\2\202\3\224\2\202\1\224\1\0"+
"\1\224\1\202\1\227\1\137\1\227\1\230\1\231\1\230"+
"\1\204\1\0\1\232\1\230\1\231\1\232\1\227\1\230"+
"\1\233\12\227\1\230\2\227\1\203\1\137\1\203\1\137"+
"\1\231\1\203\1\231\1\0\2\137\1\231\1\137\1\203"+
"\1\137\1\205\12\203\1\137\2\203\1\55\3\0\1\151"+
"\1\0\1\151\3\0\1\151\5\0\1\55\2\0\3\55"+
"\2\0\1\55\1\0\1\55\24\0\1\154\13\0\4\207"+
"\2\0\2\207\1\0\1\167\2\0\1\210\2\0\6\207"+
"\1\0\2\207\24\0\1\234\10\0\1\235\1\171\2\235"+
"\1\236\1\141\1\142\1\0\1\237\1\140\1\236\1\237"+
"\2\140\1\240\12\235\1\140\2\235\1\211\1\171\2\211"+
"\1\236\1\47\1\241\1\0\1\171\1\47\1\236\1\171"+
"\2\47\1\242\12\211\1\47\2\211\1\47\3\0\1\142"+
"\1\0\1\142\3\0\1\142\3\0\1\174\1\0\1\47"+
"\2\0\3\47\2\0\1\47\1\0\1\47\1\0\1\214"+
"\1\110\2\214\1\215\1\214\1\173\1\0\1\217\1\214"+
"\1\215\1\217\2\214\1\220\16\214\1\110\2\214\1\215"+
"\1\214\1\215\1\0\1\217\1\214\1\215\1\217\2\214"+
"\1\220\15\214\1\172\3\110\1\173\1\172\1\173\1\0"+
"\2\110\1\173\3\110\1\174\1\110\1\172\2\110\3\172"+
"\2\110\1\172\1\110\1\172\1\110\1\140\1\0\2\140"+
"\1\241\1\140\1\142\1\0\1\143\1\140\1\241\1\143"+
"\21\140\1\0\2\140\1\241\1\141\1\142\1\0\1\143"+
"\1\140\1\241\1\143\20\140\7\0\1\121\1\122\2\0"+
"\1\122\43\0\1\177\10\0\1\243\1\202\1\243\1\244"+
"\1\245\1\150\1\151\1\0\1\246\1\150\1\245\1\246"+
"\1\147\1\150\1\247\12\243\1\150\2\243\1\224\1\202"+
"\1\224\1\202\1\245\1\55\1\250\1\0\1\202\1\0"+
"\1\245\1\202\1\55\1\0\1\226\12\224\1\0\2\224"+
"\1\55\3\0\1\151\1\0\1\151\3\0\1\151\3\0"+
"\1\205\1\0\1\55\2\0\3\55\2\0\1\55\1\0"+
"\1\55\1\0\1\227\1\137\1\227\1\230\1\231\1\227"+
"\1\204\1\0\1\232\1\230\1\231\1\232\1\227\1\230"+
"\1\233\12\227\1\230\2\227\1\203\3\137\1\204\1\203"+
"\1\204\1\0\2\137\1\204\3\137\1\205\1\137\1\203"+
"\2\137\3\203\2\137\1\203\1\137\1\203\1\137\1\227"+
"\1\137\1\227\1\230\1\231\1\227\1\231\1\0\1\232"+
"\1\230\1\231\1\232\1\227\1\230\1\233\12\227\1\230"+
"\2\227\1\55\3\0\1\151\1\55\1\151\3\0\1\151"+
"\5\0\1\55\2\0\3\55\2\0\1\55\1\0\1\55"+
"\24\0\1\207\10\0\1\235\1\171\2\235\1\236\1\140"+
"\1\142\1\0\1\237\1\140\1\236\1\237\2\140\1\240"+
"\12\235\1\140\3\235\1\171\2\235\1\236\1\140\1\241"+
"\1\0\1\237\1\140\1\236\1\237\2\140\1\240\12\235"+
"\1\140\2\235\1\140\1\0\2\140\1\241\1\140\1\142"+
"\1\0\1\143\1\140\1\241\1\143\2\140\1\220\16\140"+
"\1\0\4\140\1\241\1\0\1\143\2\140\1\143\21\140"+
"\1\0\2\140\1\241\1\141\1\142\1\0\1\143\1\140"+
"\1\241\1\143\2\140\1\220\15\140\1\243\1\202\1\243"+
"\1\244\1\245\1\147\1\151\1\0\1\246\1\150\1\245"+
"\1\246\1\147\1\150\1\247\12\243\1\150\2\243\1\224"+
"\3\202\1\225\1\55\1\151\1\0\1\202\1\0\1\225"+
"\1\202\2\0\1\226\1\202\1\224\2\202\3\224\2\202"+
"\1\224\1\0\1\224\1\202\1\243\1\202\1\243\1\244"+
"\1\245\1\147\1\250\1\0\1\246\1\150\1\245\1\246"+
"\1\147\1\150\1\247\12\243\1\150\2\243\1\55\3\0"+
"\1\151\1\55\1\151\3\0\1\151\3\0\1\205\1\0"+
"\1\55\2\0\3\55\2\0\1\55\1\0\1\55\1\0"+
"\1\147\1\0\1\147\1\150\2\147\1\250\1\0\1\152"+
"\1\150\1\147\1\152\1\147\2\150\12\147\1\150\2\147";
private static int [] zzUnpackTrans() {
int [] result = new int[3696];
int [] result = new int[3668];
int offset = 0;
offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
return result;
@@ -374,8 +369,8 @@ public class _YAMLLexer implements FlexLexer, YAMLTokenTypes {
private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
private static final String ZZ_ATTRIBUTE_PACKED_0 =
"\16\0\1\1\2\11\3\1\1\11\1\1\1\11\3\1"+
"\1\11\4\1\1\11\23\1\1\11\2\1\1\11\1\1"+
"\15\0\1\1\2\11\3\1\1\11\1\1\1\11\3\1"+
"\1\11\4\1\1\11\22\1\1\11\2\1\1\11\1\1"+
"\4\0\2\1\1\0\1\1\1\0\1\11\1\1\1\11"+
"\1\1\1\11\1\1\6\0\1\1\2\0\1\1\1\0"+
"\1\11\1\1\4\0\1\11\1\1\1\0\1\1\1\0"+
@@ -387,7 +382,7 @@ public class _YAMLLexer implements FlexLexer, YAMLTokenTypes {
"\2\0\1\1";
private static int [] zzUnpackAttribute() {
int [] result = new int[170];
int [] result = new int[168];
int offset = 0;
offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
return result;
@@ -905,7 +900,7 @@ public class _YAMLLexer implements FlexLexer, YAMLTokenTypes {
case 43: break;
case 18:
// general lookahead, find correct zzMarkedPos
{ int zzFState = 12;
{ int zzFState = 11;
int zzFPos = zzStartRead;
if (zzFin.length <= zzBufferL.length()) { zzFin = new boolean[zzBufferL.length()+1]; }
boolean zzFinL[] = zzFin;
@@ -920,7 +915,7 @@ public class _YAMLLexer implements FlexLexer, YAMLTokenTypes {
zzFinL[zzFPos++] = false;
}
zzFState = 7;
zzFState = 6;
zzFPos = zzMarkedPos;
while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) {
zzInput = Character.codePointBefore(zzBufferL, zzFPos/*, zzStartRead*/);
@@ -945,7 +940,7 @@ public class _YAMLLexer implements FlexLexer, YAMLTokenTypes {
case 46: break;
case 21:
// general lookahead, find correct zzMarkedPos
{ int zzFState = 6;
{ int zzFState = 5;
int zzFPos = zzStartRead;
if (zzFin.length <= zzBufferL.length()) { zzFin = new boolean[zzBufferL.length()+1]; }
boolean zzFinL[] = zzFin;
@@ -960,7 +955,7 @@ public class _YAMLLexer implements FlexLexer, YAMLTokenTypes {
zzFinL[zzFPos++] = false;
}
zzFState = 7;
zzFState = 6;
zzFPos = zzMarkedPos;
while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) {
zzInput = Character.codePointBefore(zzBufferL, zzFPos/*, zzStartRead*/);
@@ -974,7 +969,7 @@ public class _YAMLLexer implements FlexLexer, YAMLTokenTypes {
case 47: break;
case 22:
// general lookahead, find correct zzMarkedPos
{ int zzFState = 13;
{ int zzFState = 12;
int zzFPos = zzStartRead;
if (zzFin.length <= zzBufferL.length()) { zzFin = new boolean[zzBufferL.length()+1]; }
boolean zzFinL[] = zzFin;
@@ -989,7 +984,7 @@ public class _YAMLLexer implements FlexLexer, YAMLTokenTypes {
zzFinL[zzFPos++] = false;
}
zzFState = 7;
zzFState = 6;
zzFPos = zzMarkedPos;
while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) {
zzInput = Character.codePointBefore(zzBufferL, zzFPos/*, zzStartRead*/);
@@ -1013,7 +1008,7 @@ public class _YAMLLexer implements FlexLexer, YAMLTokenTypes {
case 49: break;
case 24:
// general lookahead, find correct zzMarkedPos
{ int zzFState = 10;
{ int zzFState = 9;
int zzFPos = zzStartRead;
if (zzFin.length <= zzBufferL.length()) { zzFin = new boolean[zzBufferL.length()+1]; }
boolean zzFinL[] = zzFin;
@@ -1028,7 +1023,7 @@ public class _YAMLLexer implements FlexLexer, YAMLTokenTypes {
zzFinL[zzFPos++] = false;
}
zzFState = 11;
zzFState = 10;
zzFPos = zzMarkedPos;
while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) {
zzInput = Character.codePointBefore(zzBufferL, zzFPos/*, zzStartRead*/);
@@ -1047,7 +1042,7 @@ public class _YAMLLexer implements FlexLexer, YAMLTokenTypes {
case 51: break;
case 26:
// general lookahead, find correct zzMarkedPos
{ int zzFState = 8;
{ int zzFState = 7;
int zzFPos = zzStartRead;
if (zzFin.length <= zzBufferL.length()) { zzFin = new boolean[zzBufferL.length()+1]; }
boolean zzFinL[] = zzFin;
@@ -1062,7 +1057,7 @@ public class _YAMLLexer implements FlexLexer, YAMLTokenTypes {
zzFinL[zzFPos++] = false;
}
zzFState = 9;
zzFState = 8;
zzFPos = zzMarkedPos;
while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) {
zzInput = Character.codePointBefore(zzBufferL, zzFPos/*, zzStartRead*/);
@@ -260,6 +260,10 @@ C_NS_TAG_PROPERTY = {C_VERBATIM_TAG} | {C_NS_SHORTHAND_TAG} | {C_NON_SPECIFIC_TA
return tokenOrForbidden(TEXT);
}
}
<YYINITIAL, BRACES, VALUE_OR_KEY> {
"-" / ({WHITE_SPACE} | {EOL}) { yyBegin(VALUE_OR_KEY);
return SEQUENCE_MARKER; }
@@ -161,6 +161,10 @@ public class YAMLLexerTest extends LexerTestCase {
doTest();
}
public void testRuby19105() throws Throwable {
doTest();
}
public void testEmptyMultiline() throws Throwable {
doTest();
}
@@ -204,7 +208,7 @@ public class YAMLLexerTest extends LexerTestCase {
public void testSingleQuotedEscapes() {
doTest();
}
public void testUnicodeNewlines() {
doTest();
}
@@ -0,0 +1,12 @@
- ('-')
whitespace (' ')
- ('-')
whitespace (' ')
scalar key ('Ref:')
whitespace (' ')
text ('hostedZoneName')
Eol ('\n')
indent (' ')
- ('-')
whitespace (' ')
text ('a')
@@ -0,0 +1,2 @@
- - Ref: hostedZoneName
- a
@@ -135,6 +135,13 @@ public class YAMLParserTest extends ParsingTestCase {
"bar: \"baz\"");
}
public void testRuby19105() throws Throwable {
doCodeTest("'Fn::Join':\n" +
" - ''\n" +
" - - Ref: hostedZoneName\n" +
" - a");
}
public void testRuby15345() throws IOException {
doCodeTest("- !qualified.class.name\n" +
" propertyOne: bla bla\n" +
@@ -176,7 +183,7 @@ public class YAMLParserTest extends ParsingTestCase {
public void testStringWithTag() throws IOException {
doCodeTest("foo: ! \"tratata\"");
}
public void testIncompleteKeyWithWhitespace() throws IOException {
doCodeTest("logging:\n" +
" config:\n" +
@@ -201,23 +208,23 @@ public class YAMLParserTest extends ParsingTestCase {
public void testAnsibleRoleElkMain() {
doTest(true);
}
public void testBlockMapping() {
doTest(true);
}
public void testIncompleteKeyInHierarchy() {
doTest(true);
}
public void testKeyValueWithEmptyLineAhead() {
doTest(true);
}
public void testMultipleDocsWithMappings() {
doTest(true);
}
public void testScalarsWithNewlines() {
doTest(true);
}
@@ -0,0 +1,35 @@
YAML file
YAML document
YAML mapping
YAML key value
PsiElement(scalar key)(''Fn::Join':')
PsiElement(Eol)('\n')
PsiElement(indent)(' ')
YAML sequence
YAML sequence item
PsiElement(-)('-')
PsiWhiteSpace(' ')
YAML quoted text
PsiElement(scalar string)('''')
PsiElement(Eol)('\n')
PsiElement(indent)(' ')
YAML sequence item
PsiElement(-)('-')
PsiWhiteSpace(' ')
YAML sequence
YAML sequence item
PsiElement(-)('-')
PsiWhiteSpace(' ')
YAML mapping
YAML key value
PsiElement(scalar key)('Ref:')
PsiWhiteSpace(' ')
YAML plain scalar text
PsiElement(text)('hostedZoneName')
PsiElement(Eol)('\n')
PsiElement(indent)(' ')
YAML sequence item
PsiElement(-)('-')
PsiWhiteSpace(' ')
YAML plain scalar text
PsiElement(text)('a')