Support first/last fhirpath expressions

Additional test to ensure that type casting is to a supported property type.
This commit is contained in:
Brian Postlethwaite 2024-07-15 17:07:35 +10:00
Родитель c15d4c9e39
Коммит fec48a5902
4 изменённых файлов: 144 добавлений и 132 удалений

Просмотреть файл

@ -516,6 +516,14 @@ public class CrossVersionMapCollection
else
{
var sw = new StructureDefinitionWalker(sdCastType, sourceResolver);
// Check that the type being attempted is among the types in the actual property
if (!tpV?.Element?.Current?.Type.Any(t => t.Code == source.TypeIdentifier) == true)
{
string msg = $"Type `{typeName}` is not a valid cast for `{source.Identifier}` in {group.Name} at @{source.Line}:{source.Column}";
ReportIssue(issues, msg, OperationOutcome.IssueType.Duplicate);
}
tpV = new PropertyOrTypeDetails
{
Resolver = sourceResolver,

Просмотреть файл

@ -135,8 +135,8 @@ upperBound
;
qualifiedIdentifier
: (ID | IDENTIFIER | 'imports' | 'source' | 'target' | 'group' | 'prefix' | 'map' | 'uses' | 'let' | 'types' | 'extends' | 'where' | 'check' | 'alias' | 'div' | 'contains' | 'as' | 'is')
('.' (ID | IDENTIFIER | 'imports' | 'source' | 'target' | 'group' | 'prefix' | 'map' | 'uses' | 'let' | 'types' | 'extends' | 'where' | 'check' | 'alias' | 'div' | 'contains' | 'as' | 'is'))*
: (ID | IDENTIFIER | 'imports' | 'source' | 'target' | 'group' | 'prefix' | 'map' | 'uses' | 'let' | 'types' | 'extends' | 'where' | 'check' | 'alias' | 'div' | 'contains' | 'as' | 'is' | 'first' | 'last' )
('.' (ID | IDENTIFIER | 'imports' | 'source' | 'target' | 'group' | 'prefix' | 'map' | 'uses' | 'let' | 'types' | 'extends' | 'where' | 'check' | 'alias' | 'div' | 'contains' | 'as' | 'is' | 'first' | 'last'))*
// : identifier ('.' identifier '[x]'?)*
;

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1428,7 +1428,7 @@ public partial class FmlMappingParser : Parser {
State = 239;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 2164739366672L) != 0) || _la==ID || _la==IDENTIFIER) {
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 2166081543952L) != 0) || _la==ID || _la==IDENTIFIER) {
{
{
State = 236;
@ -2267,7 +2267,7 @@ public partial class FmlMappingParser : Parser {
{
State = 326;
_la = TokenStream.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 2164739366672L) != 0) || _la==ID || _la==IDENTIFIER) ) {
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 2166081543952L) != 0) || _la==ID || _la==IDENTIFIER) ) {
ErrorHandler.RecoverInline(this);
}
else {
@ -2285,7 +2285,7 @@ public partial class FmlMappingParser : Parser {
Match(T__40);
State = 328;
_la = TokenStream.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 2164739366672L) != 0) || _la==ID || _la==IDENTIFIER) ) {
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 2166081543952L) != 0) || _la==ID || _la==IDENTIFIER) ) {
ErrorHandler.RecoverInline(this);
}
else {
@ -3582,6 +3582,8 @@ public partial class FmlMappingParser : Parser {
case T__18:
case T__22:
case T__25:
case T__27:
case T__29:
case T__34:
case T__35:
case T__36:
@ -3990,6 +3992,8 @@ public partial class FmlMappingParser : Parser {
case T__17:
case T__22:
case T__25:
case T__27:
case T__29:
case T__34:
case T__35:
case T__36:
@ -4351,7 +4355,7 @@ public partial class FmlMappingParser : Parser {
State = 500;
ErrorHandler.Sync(this);
_la = TokenStream.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 565114693312336L) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & 8588886031L) != 0)) {
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 565116035489616L) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & 8588886031L) != 0)) {
{
State = 499;
fpParamList();
@ -5097,131 +5101,131 @@ public partial class FmlMappingParser : Parser {
22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,
70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,0,21,2,0,94,94,97,98,
1,0,97,98,1,0,94,96,1,0,12,15,2,0,12,12,14,14,1,0,23,24,1,0,28,32,2,0,
34,34,93,93,9,0,4,4,8,12,14,14,16,16,18,18,23,23,26,26,35,40,94,95,3,0,
28,28,30,30,45,46,2,0,6,6,49,49,3,0,34,34,38,38,50,51,3,0,6,6,49,49,52,
52,1,0,54,57,2,0,5,5,58,60,2,0,39,39,61,61,1,0,63,64,2,0,11,11,40,40,1,
0,92,93,1,0,70,77,1,0,78,85,569,0,105,1,0,0,0,2,142,1,0,0,0,4,157,1,0,
0,0,6,162,1,0,0,0,8,166,1,0,0,0,10,170,1,0,0,0,12,174,1,0,0,0,14,176,1,
0,0,0,16,181,1,0,0,0,18,188,1,0,0,0,20,190,1,0,0,0,22,192,1,0,0,0,24,194,
1,0,0,0,26,203,1,0,0,0,28,209,1,0,0,0,30,220,1,0,0,0,32,230,1,0,0,0,34,
235,1,0,0,0,36,244,1,0,0,0,38,248,1,0,0,0,40,251,1,0,0,0,42,265,1,0,0,
0,44,267,1,0,0,0,46,285,1,0,0,0,48,287,1,0,0,0,50,312,1,0,0,0,52,320,1,
0,0,0,54,324,1,0,0,0,56,326,1,0,0,0,58,334,1,0,0,0,60,339,1,0,0,0,62,342,
1,0,0,0,64,345,1,0,0,0,66,350,1,0,0,0,68,355,1,0,0,0,70,370,1,0,0,0,72,
397,1,0,0,0,74,406,1,0,0,0,76,408,1,0,0,0,78,415,1,0,0,0,80,425,1,0,0,
0,82,431,1,0,0,0,84,483,1,0,0,0,86,490,1,0,0,0,88,492,1,0,0,0,90,497,1,
0,0,0,92,504,1,0,0,0,94,512,1,0,0,0,96,514,1,0,0,0,98,526,1,0,0,0,100,
534,1,0,0,0,102,104,3,16,8,0,103,102,1,0,0,0,104,107,1,0,0,0,105,106,1,
0,0,0,105,103,1,0,0,0,106,111,1,0,0,0,107,105,1,0,0,0,108,110,3,2,1,0,
109,108,1,0,0,0,110,113,1,0,0,0,111,112,1,0,0,0,111,109,1,0,0,0,112,115,
1,0,0,0,113,111,1,0,0,0,114,116,3,14,7,0,115,114,1,0,0,0,115,116,1,0,0,
0,116,120,1,0,0,0,117,119,3,24,12,0,118,117,1,0,0,0,119,122,1,0,0,0,120,
121,1,0,0,0,120,118,1,0,0,0,121,126,1,0,0,0,122,120,1,0,0,0,123,125,3,
70,35,0,124,123,1,0,0,0,125,128,1,0,0,0,126,127,1,0,0,0,126,124,1,0,0,
0,127,132,1,0,0,0,128,126,1,0,0,0,129,131,3,26,13,0,130,129,1,0,0,0,131,
134,1,0,0,0,132,133,1,0,0,0,132,130,1,0,0,0,133,136,1,0,0,0,134,132,1,
0,0,0,135,137,3,28,14,0,136,135,1,0,0,0,137,138,1,0,0,0,138,136,1,0,0,
0,138,139,1,0,0,0,139,140,1,0,0,0,140,141,5,0,0,1,141,1,1,0,0,0,142,143,
5,1,0,0,143,144,3,20,10,0,144,146,5,2,0,0,145,147,3,4,2,0,146,145,1,0,
0,0,147,148,1,0,0,0,148,146,1,0,0,0,148,149,1,0,0,0,149,151,1,0,0,0,150,
152,3,6,3,0,151,150,1,0,0,0,152,153,1,0,0,0,153,151,1,0,0,0,153,154,1,
0,0,0,154,155,1,0,0,0,155,156,5,3,0,0,156,3,1,0,0,0,157,158,5,4,0,0,158,
159,5,94,0,0,159,160,5,5,0,0,160,161,3,20,10,0,161,5,1,0,0,0,162,163,3,
8,4,0,163,164,5,6,0,0,164,165,3,10,5,0,165,7,1,0,0,0,166,167,5,94,0,0,
167,168,5,7,0,0,168,169,3,12,6,0,169,9,1,0,0,0,170,171,5,94,0,0,171,172,
5,7,0,0,172,173,3,12,6,0,173,11,1,0,0,0,174,175,7,0,0,0,175,13,1,0,0,0,
176,177,5,8,0,0,177,178,3,20,10,0,178,179,5,5,0,0,179,180,3,22,11,0,180,
15,1,0,0,0,181,182,5,102,0,0,182,183,3,56,28,0,183,186,5,5,0,0,184,187,
3,98,49,0,185,187,3,18,9,0,186,184,1,0,0,0,186,185,1,0,0,0,186,187,1,0,
0,0,187,17,1,0,0,0,188,189,5,99,0,0,189,19,1,0,0,0,190,191,7,1,0,0,191,
21,1,0,0,0,192,193,7,2,0,0,193,23,1,0,0,0,194,195,5,9,0,0,195,198,3,20,
10,0,196,197,5,10,0,0,197,199,3,22,11,0,198,196,1,0,0,0,198,199,1,0,0,
0,199,200,1,0,0,0,200,201,5,11,0,0,201,202,7,3,0,0,202,25,1,0,0,0,203,
204,5,16,0,0,204,205,5,94,0,0,205,206,5,5,0,0,206,207,3,82,41,0,207,208,
5,17,0,0,208,27,1,0,0,0,209,210,5,18,0,0,210,211,5,94,0,0,211,213,3,30,
15,0,212,214,3,38,19,0,213,212,1,0,0,0,213,214,1,0,0,0,214,216,1,0,0,0,
215,217,3,36,18,0,216,215,1,0,0,0,216,217,1,0,0,0,217,218,1,0,0,0,218,
219,3,34,17,0,219,29,1,0,0,0,220,221,5,19,0,0,221,224,3,32,16,0,222,223,
5,20,0,0,223,225,3,32,16,0,224,222,1,0,0,0,225,226,1,0,0,0,226,224,1,0,
0,0,226,227,1,0,0,0,227,228,1,0,0,0,228,229,5,21,0,0,229,31,1,0,0,0,230,
231,7,4,0,0,231,233,5,94,0,0,232,234,3,40,20,0,233,232,1,0,0,0,233,234,
1,0,0,0,234,33,1,0,0,0,235,239,5,2,0,0,236,238,3,42,21,0,237,236,1,0,0,
0,238,241,1,0,0,0,239,237,1,0,0,0,239,240,1,0,0,0,240,242,1,0,0,0,241,
239,1,0,0,0,242,243,5,3,0,0,243,35,1,0,0,0,244,245,5,22,0,0,245,246,7,
5,0,0,246,247,5,25,0,0,247,37,1,0,0,0,248,249,5,26,0,0,249,250,5,94,0,
0,250,39,1,0,0,0,251,252,5,7,0,0,252,253,3,22,11,0,253,41,1,0,0,0,254,
255,3,56,28,0,255,256,5,27,0,0,256,258,3,56,28,0,257,259,3,46,23,0,258,
257,1,0,0,0,258,259,1,0,0,0,259,260,1,0,0,0,260,261,5,17,0,0,261,266,1,
0,0,0,262,263,3,44,22,0,263,264,5,17,0,0,264,266,1,0,0,0,265,254,1,0,0,
0,265,262,1,0,0,0,266,43,1,0,0,0,267,272,3,48,24,0,268,269,5,20,0,0,269,
271,3,48,24,0,270,268,1,0,0,0,271,274,1,0,0,0,272,270,1,0,0,0,272,273,
1,0,0,0,273,277,1,0,0,0,274,272,1,0,0,0,275,276,5,27,0,0,276,278,3,50,
25,0,277,275,1,0,0,0,277,278,1,0,0,0,278,280,1,0,0,0,279,281,3,68,34,0,
280,279,1,0,0,0,280,281,1,0,0,0,281,283,1,0,0,0,282,284,3,46,23,0,283,
282,1,0,0,0,283,284,1,0,0,0,284,45,1,0,0,0,285,286,5,98,0,0,286,47,1,0,
0,0,287,289,3,56,28,0,288,290,3,40,20,0,289,288,1,0,0,0,289,290,1,0,0,
0,290,292,1,0,0,0,291,293,3,52,26,0,292,291,1,0,0,0,292,293,1,0,0,0,293,
295,1,0,0,0,294,296,3,58,29,0,295,294,1,0,0,0,295,296,1,0,0,0,296,298,
1,0,0,0,297,299,7,6,0,0,298,297,1,0,0,0,298,299,1,0,0,0,299,301,1,0,0,
0,300,302,3,60,30,0,301,300,1,0,0,0,301,302,1,0,0,0,302,304,1,0,0,0,303,
305,3,62,31,0,304,303,1,0,0,0,304,305,1,0,0,0,305,307,1,0,0,0,306,308,
3,64,32,0,307,306,1,0,0,0,307,308,1,0,0,0,308,310,1,0,0,0,309,311,3,66,
33,0,310,309,1,0,0,0,310,311,1,0,0,0,311,49,1,0,0,0,312,317,3,72,36,0,
313,314,5,20,0,0,314,316,3,72,36,0,315,313,1,0,0,0,316,319,1,0,0,0,317,
315,1,0,0,0,317,318,1,0,0,0,318,51,1,0,0,0,319,317,1,0,0,0,320,321,5,93,
0,0,321,322,5,33,0,0,322,323,3,54,27,0,323,53,1,0,0,0,324,325,7,7,0,0,
325,55,1,0,0,0,326,331,7,8,0,0,327,328,5,41,0,0,328,330,7,8,0,0,329,327,
1,0,0,0,330,333,1,0,0,0,331,329,1,0,0,0,331,332,1,0,0,0,332,57,1,0,0,0,
333,331,1,0,0,0,334,335,5,42,0,0,335,336,5,19,0,0,336,337,3,82,41,0,337,
338,5,21,0,0,338,59,1,0,0,0,339,340,5,11,0,0,340,341,3,22,11,0,341,61,
1,0,0,0,342,343,5,36,0,0,343,344,3,82,41,0,344,63,1,0,0,0,345,346,5,37,
0,0,346,347,5,19,0,0,347,348,3,82,41,0,348,349,5,21,0,0,349,65,1,0,0,0,
350,351,5,43,0,0,351,352,5,19,0,0,352,353,3,82,41,0,353,354,5,21,0,0,354,
67,1,0,0,0,355,368,5,44,0,0,356,361,3,76,38,0,357,358,5,20,0,0,358,360,
3,76,38,0,359,357,1,0,0,0,360,363,1,0,0,0,361,359,1,0,0,0,361,362,1,0,
0,0,362,365,1,0,0,0,363,361,1,0,0,0,364,366,3,34,17,0,365,364,1,0,0,0,
365,366,1,0,0,0,366,369,1,0,0,0,367,369,3,34,17,0,368,356,1,0,0,0,368,
367,1,0,0,0,369,69,1,0,0,0,370,371,5,35,0,0,371,372,3,20,10,0,372,71,1,
0,0,0,373,376,3,56,28,0,374,375,5,5,0,0,375,377,3,74,37,0,376,374,1,0,
0,0,376,377,1,0,0,0,377,379,1,0,0,0,378,380,3,60,30,0,379,378,1,0,0,0,
379,380,1,0,0,0,380,382,1,0,0,0,381,383,7,9,0,0,382,381,1,0,0,0,382,383,
1,0,0,0,383,398,1,0,0,0,384,385,5,19,0,0,385,386,3,82,41,0,386,388,5,21,
0,0,387,389,3,60,30,0,388,387,1,0,0,0,388,389,1,0,0,0,389,391,1,0,0,0,
390,392,7,9,0,0,391,390,1,0,0,0,391,392,1,0,0,0,392,398,1,0,0,0,393,395,
3,76,38,0,394,396,3,60,30,0,395,394,1,0,0,0,395,396,1,0,0,0,396,398,1,
0,0,0,397,373,1,0,0,0,397,384,1,0,0,0,397,393,1,0,0,0,398,73,1,0,0,0,399,
407,3,98,49,0,400,407,3,56,28,0,401,407,3,76,38,0,402,403,5,19,0,0,403,
404,3,82,41,0,404,405,5,21,0,0,405,407,1,0,0,0,406,399,1,0,0,0,406,400,
1,0,0,0,406,401,1,0,0,0,406,402,1,0,0,0,407,75,1,0,0,0,408,409,3,22,11,
0,409,411,5,19,0,0,410,412,3,78,39,0,411,410,1,0,0,0,411,412,1,0,0,0,412,
413,1,0,0,0,413,414,5,21,0,0,414,77,1,0,0,0,415,420,3,80,40,0,416,417,
5,20,0,0,417,419,3,80,40,0,418,416,1,0,0,0,419,422,1,0,0,0,420,418,1,0,
0,0,420,421,1,0,0,0,421,79,1,0,0,0,422,420,1,0,0,0,423,426,3,98,49,0,424,
426,5,94,0,0,425,423,1,0,0,0,425,424,1,0,0,0,426,81,1,0,0,0,427,428,6,
41,-1,0,428,432,3,84,42,0,429,430,7,10,0,0,430,432,3,82,41,11,431,427,
1,0,0,0,431,429,1,0,0,0,432,473,1,0,0,0,433,434,10,10,0,0,434,435,7,11,
0,0,435,472,3,82,41,11,436,437,10,9,0,0,437,438,7,12,0,0,438,472,3,82,
41,10,439,440,10,7,0,0,440,441,5,53,0,0,441,472,3,82,41,8,442,443,10,6,
0,0,443,444,7,13,0,0,444,472,3,82,41,7,445,446,10,5,0,0,446,447,7,14,0,
0,447,472,3,82,41,6,448,449,10,4,0,0,449,450,7,15,0,0,450,472,3,82,41,
5,451,452,10,3,0,0,452,453,5,62,0,0,453,472,3,82,41,4,454,455,10,2,0,0,
455,456,7,16,0,0,456,472,3,82,41,3,457,458,10,1,0,0,458,459,5,65,0,0,459,
472,3,82,41,2,460,461,10,13,0,0,461,462,5,41,0,0,462,472,3,86,43,0,463,
464,10,12,0,0,464,465,5,47,0,0,465,466,3,82,41,0,466,467,5,48,0,0,467,
472,1,0,0,0,468,469,10,8,0,0,469,470,7,17,0,0,470,472,3,94,47,0,471,433,
1,0,0,0,471,436,1,0,0,0,471,439,1,0,0,0,471,442,1,0,0,0,471,445,1,0,0,
0,471,448,1,0,0,0,471,451,1,0,0,0,471,454,1,0,0,0,471,457,1,0,0,0,471,
460,1,0,0,0,471,463,1,0,0,0,471,468,1,0,0,0,472,475,1,0,0,0,473,471,1,
0,0,0,473,474,1,0,0,0,474,83,1,0,0,0,475,473,1,0,0,0,476,484,3,86,43,0,
477,484,3,98,49,0,478,484,3,88,44,0,479,480,5,19,0,0,480,481,3,82,41,0,
481,482,5,21,0,0,482,484,1,0,0,0,483,476,1,0,0,0,483,477,1,0,0,0,483,478,
1,0,0,0,483,479,1,0,0,0,484,85,1,0,0,0,485,491,3,90,45,0,486,491,3,22,
11,0,487,491,5,66,0,0,488,491,5,67,0,0,489,491,5,68,0,0,490,485,1,0,0,
0,490,486,1,0,0,0,490,487,1,0,0,0,490,488,1,0,0,0,490,489,1,0,0,0,491,
87,1,0,0,0,492,495,5,69,0,0,493,496,3,22,11,0,494,496,5,97,0,0,495,493,
1,0,0,0,495,494,1,0,0,0,496,89,1,0,0,0,497,498,3,56,28,0,498,500,5,19,
0,0,499,501,3,92,46,0,500,499,1,0,0,0,500,501,1,0,0,0,501,502,1,0,0,0,
502,503,5,21,0,0,503,91,1,0,0,0,504,509,3,82,41,0,505,506,5,20,0,0,506,
34,34,93,93,11,0,4,4,8,12,14,14,16,16,18,18,23,23,26,26,28,28,30,30,35,
40,94,95,3,0,28,28,30,30,45,46,2,0,6,6,49,49,3,0,34,34,38,38,50,51,3,0,
6,6,49,49,52,52,1,0,54,57,2,0,5,5,58,60,2,0,39,39,61,61,1,0,63,64,2,0,
11,11,40,40,1,0,92,93,1,0,70,77,1,0,78,85,569,0,105,1,0,0,0,2,142,1,0,
0,0,4,157,1,0,0,0,6,162,1,0,0,0,8,166,1,0,0,0,10,170,1,0,0,0,12,174,1,
0,0,0,14,176,1,0,0,0,16,181,1,0,0,0,18,188,1,0,0,0,20,190,1,0,0,0,22,192,
1,0,0,0,24,194,1,0,0,0,26,203,1,0,0,0,28,209,1,0,0,0,30,220,1,0,0,0,32,
230,1,0,0,0,34,235,1,0,0,0,36,244,1,0,0,0,38,248,1,0,0,0,40,251,1,0,0,
0,42,265,1,0,0,0,44,267,1,0,0,0,46,285,1,0,0,0,48,287,1,0,0,0,50,312,1,
0,0,0,52,320,1,0,0,0,54,324,1,0,0,0,56,326,1,0,0,0,58,334,1,0,0,0,60,339,
1,0,0,0,62,342,1,0,0,0,64,345,1,0,0,0,66,350,1,0,0,0,68,355,1,0,0,0,70,
370,1,0,0,0,72,397,1,0,0,0,74,406,1,0,0,0,76,408,1,0,0,0,78,415,1,0,0,
0,80,425,1,0,0,0,82,431,1,0,0,0,84,483,1,0,0,0,86,490,1,0,0,0,88,492,1,
0,0,0,90,497,1,0,0,0,92,504,1,0,0,0,94,512,1,0,0,0,96,514,1,0,0,0,98,526,
1,0,0,0,100,534,1,0,0,0,102,104,3,16,8,0,103,102,1,0,0,0,104,107,1,0,0,
0,105,106,1,0,0,0,105,103,1,0,0,0,106,111,1,0,0,0,107,105,1,0,0,0,108,
110,3,2,1,0,109,108,1,0,0,0,110,113,1,0,0,0,111,112,1,0,0,0,111,109,1,
0,0,0,112,115,1,0,0,0,113,111,1,0,0,0,114,116,3,14,7,0,115,114,1,0,0,0,
115,116,1,0,0,0,116,120,1,0,0,0,117,119,3,24,12,0,118,117,1,0,0,0,119,
122,1,0,0,0,120,121,1,0,0,0,120,118,1,0,0,0,121,126,1,0,0,0,122,120,1,
0,0,0,123,125,3,70,35,0,124,123,1,0,0,0,125,128,1,0,0,0,126,127,1,0,0,
0,126,124,1,0,0,0,127,132,1,0,0,0,128,126,1,0,0,0,129,131,3,26,13,0,130,
129,1,0,0,0,131,134,1,0,0,0,132,133,1,0,0,0,132,130,1,0,0,0,133,136,1,
0,0,0,134,132,1,0,0,0,135,137,3,28,14,0,136,135,1,0,0,0,137,138,1,0,0,
0,138,136,1,0,0,0,138,139,1,0,0,0,139,140,1,0,0,0,140,141,5,0,0,1,141,
1,1,0,0,0,142,143,5,1,0,0,143,144,3,20,10,0,144,146,5,2,0,0,145,147,3,
4,2,0,146,145,1,0,0,0,147,148,1,0,0,0,148,146,1,0,0,0,148,149,1,0,0,0,
149,151,1,0,0,0,150,152,3,6,3,0,151,150,1,0,0,0,152,153,1,0,0,0,153,151,
1,0,0,0,153,154,1,0,0,0,154,155,1,0,0,0,155,156,5,3,0,0,156,3,1,0,0,0,
157,158,5,4,0,0,158,159,5,94,0,0,159,160,5,5,0,0,160,161,3,20,10,0,161,
5,1,0,0,0,162,163,3,8,4,0,163,164,5,6,0,0,164,165,3,10,5,0,165,7,1,0,0,
0,166,167,5,94,0,0,167,168,5,7,0,0,168,169,3,12,6,0,169,9,1,0,0,0,170,
171,5,94,0,0,171,172,5,7,0,0,172,173,3,12,6,0,173,11,1,0,0,0,174,175,7,
0,0,0,175,13,1,0,0,0,176,177,5,8,0,0,177,178,3,20,10,0,178,179,5,5,0,0,
179,180,3,22,11,0,180,15,1,0,0,0,181,182,5,102,0,0,182,183,3,56,28,0,183,
186,5,5,0,0,184,187,3,98,49,0,185,187,3,18,9,0,186,184,1,0,0,0,186,185,
1,0,0,0,186,187,1,0,0,0,187,17,1,0,0,0,188,189,5,99,0,0,189,19,1,0,0,0,
190,191,7,1,0,0,191,21,1,0,0,0,192,193,7,2,0,0,193,23,1,0,0,0,194,195,
5,9,0,0,195,198,3,20,10,0,196,197,5,10,0,0,197,199,3,22,11,0,198,196,1,
0,0,0,198,199,1,0,0,0,199,200,1,0,0,0,200,201,5,11,0,0,201,202,7,3,0,0,
202,25,1,0,0,0,203,204,5,16,0,0,204,205,5,94,0,0,205,206,5,5,0,0,206,207,
3,82,41,0,207,208,5,17,0,0,208,27,1,0,0,0,209,210,5,18,0,0,210,211,5,94,
0,0,211,213,3,30,15,0,212,214,3,38,19,0,213,212,1,0,0,0,213,214,1,0,0,
0,214,216,1,0,0,0,215,217,3,36,18,0,216,215,1,0,0,0,216,217,1,0,0,0,217,
218,1,0,0,0,218,219,3,34,17,0,219,29,1,0,0,0,220,221,5,19,0,0,221,224,
3,32,16,0,222,223,5,20,0,0,223,225,3,32,16,0,224,222,1,0,0,0,225,226,1,
0,0,0,226,224,1,0,0,0,226,227,1,0,0,0,227,228,1,0,0,0,228,229,5,21,0,0,
229,31,1,0,0,0,230,231,7,4,0,0,231,233,5,94,0,0,232,234,3,40,20,0,233,
232,1,0,0,0,233,234,1,0,0,0,234,33,1,0,0,0,235,239,5,2,0,0,236,238,3,42,
21,0,237,236,1,0,0,0,238,241,1,0,0,0,239,237,1,0,0,0,239,240,1,0,0,0,240,
242,1,0,0,0,241,239,1,0,0,0,242,243,5,3,0,0,243,35,1,0,0,0,244,245,5,22,
0,0,245,246,7,5,0,0,246,247,5,25,0,0,247,37,1,0,0,0,248,249,5,26,0,0,249,
250,5,94,0,0,250,39,1,0,0,0,251,252,5,7,0,0,252,253,3,22,11,0,253,41,1,
0,0,0,254,255,3,56,28,0,255,256,5,27,0,0,256,258,3,56,28,0,257,259,3,46,
23,0,258,257,1,0,0,0,258,259,1,0,0,0,259,260,1,0,0,0,260,261,5,17,0,0,
261,266,1,0,0,0,262,263,3,44,22,0,263,264,5,17,0,0,264,266,1,0,0,0,265,
254,1,0,0,0,265,262,1,0,0,0,266,43,1,0,0,0,267,272,3,48,24,0,268,269,5,
20,0,0,269,271,3,48,24,0,270,268,1,0,0,0,271,274,1,0,0,0,272,270,1,0,0,
0,272,273,1,0,0,0,273,277,1,0,0,0,274,272,1,0,0,0,275,276,5,27,0,0,276,
278,3,50,25,0,277,275,1,0,0,0,277,278,1,0,0,0,278,280,1,0,0,0,279,281,
3,68,34,0,280,279,1,0,0,0,280,281,1,0,0,0,281,283,1,0,0,0,282,284,3,46,
23,0,283,282,1,0,0,0,283,284,1,0,0,0,284,45,1,0,0,0,285,286,5,98,0,0,286,
47,1,0,0,0,287,289,3,56,28,0,288,290,3,40,20,0,289,288,1,0,0,0,289,290,
1,0,0,0,290,292,1,0,0,0,291,293,3,52,26,0,292,291,1,0,0,0,292,293,1,0,
0,0,293,295,1,0,0,0,294,296,3,58,29,0,295,294,1,0,0,0,295,296,1,0,0,0,
296,298,1,0,0,0,297,299,7,6,0,0,298,297,1,0,0,0,298,299,1,0,0,0,299,301,
1,0,0,0,300,302,3,60,30,0,301,300,1,0,0,0,301,302,1,0,0,0,302,304,1,0,
0,0,303,305,3,62,31,0,304,303,1,0,0,0,304,305,1,0,0,0,305,307,1,0,0,0,
306,308,3,64,32,0,307,306,1,0,0,0,307,308,1,0,0,0,308,310,1,0,0,0,309,
311,3,66,33,0,310,309,1,0,0,0,310,311,1,0,0,0,311,49,1,0,0,0,312,317,3,
72,36,0,313,314,5,20,0,0,314,316,3,72,36,0,315,313,1,0,0,0,316,319,1,0,
0,0,317,315,1,0,0,0,317,318,1,0,0,0,318,51,1,0,0,0,319,317,1,0,0,0,320,
321,5,93,0,0,321,322,5,33,0,0,322,323,3,54,27,0,323,53,1,0,0,0,324,325,
7,7,0,0,325,55,1,0,0,0,326,331,7,8,0,0,327,328,5,41,0,0,328,330,7,8,0,
0,329,327,1,0,0,0,330,333,1,0,0,0,331,329,1,0,0,0,331,332,1,0,0,0,332,
57,1,0,0,0,333,331,1,0,0,0,334,335,5,42,0,0,335,336,5,19,0,0,336,337,3,
82,41,0,337,338,5,21,0,0,338,59,1,0,0,0,339,340,5,11,0,0,340,341,3,22,
11,0,341,61,1,0,0,0,342,343,5,36,0,0,343,344,3,82,41,0,344,63,1,0,0,0,
345,346,5,37,0,0,346,347,5,19,0,0,347,348,3,82,41,0,348,349,5,21,0,0,349,
65,1,0,0,0,350,351,5,43,0,0,351,352,5,19,0,0,352,353,3,82,41,0,353,354,
5,21,0,0,354,67,1,0,0,0,355,368,5,44,0,0,356,361,3,76,38,0,357,358,5,20,
0,0,358,360,3,76,38,0,359,357,1,0,0,0,360,363,1,0,0,0,361,359,1,0,0,0,
361,362,1,0,0,0,362,365,1,0,0,0,363,361,1,0,0,0,364,366,3,34,17,0,365,
364,1,0,0,0,365,366,1,0,0,0,366,369,1,0,0,0,367,369,3,34,17,0,368,356,
1,0,0,0,368,367,1,0,0,0,369,69,1,0,0,0,370,371,5,35,0,0,371,372,3,20,10,
0,372,71,1,0,0,0,373,376,3,56,28,0,374,375,5,5,0,0,375,377,3,74,37,0,376,
374,1,0,0,0,376,377,1,0,0,0,377,379,1,0,0,0,378,380,3,60,30,0,379,378,
1,0,0,0,379,380,1,0,0,0,380,382,1,0,0,0,381,383,7,9,0,0,382,381,1,0,0,
0,382,383,1,0,0,0,383,398,1,0,0,0,384,385,5,19,0,0,385,386,3,82,41,0,386,
388,5,21,0,0,387,389,3,60,30,0,388,387,1,0,0,0,388,389,1,0,0,0,389,391,
1,0,0,0,390,392,7,9,0,0,391,390,1,0,0,0,391,392,1,0,0,0,392,398,1,0,0,
0,393,395,3,76,38,0,394,396,3,60,30,0,395,394,1,0,0,0,395,396,1,0,0,0,
396,398,1,0,0,0,397,373,1,0,0,0,397,384,1,0,0,0,397,393,1,0,0,0,398,73,
1,0,0,0,399,407,3,98,49,0,400,407,3,56,28,0,401,407,3,76,38,0,402,403,
5,19,0,0,403,404,3,82,41,0,404,405,5,21,0,0,405,407,1,0,0,0,406,399,1,
0,0,0,406,400,1,0,0,0,406,401,1,0,0,0,406,402,1,0,0,0,407,75,1,0,0,0,408,
409,3,22,11,0,409,411,5,19,0,0,410,412,3,78,39,0,411,410,1,0,0,0,411,412,
1,0,0,0,412,413,1,0,0,0,413,414,5,21,0,0,414,77,1,0,0,0,415,420,3,80,40,
0,416,417,5,20,0,0,417,419,3,80,40,0,418,416,1,0,0,0,419,422,1,0,0,0,420,
418,1,0,0,0,420,421,1,0,0,0,421,79,1,0,0,0,422,420,1,0,0,0,423,426,3,98,
49,0,424,426,5,94,0,0,425,423,1,0,0,0,425,424,1,0,0,0,426,81,1,0,0,0,427,
428,6,41,-1,0,428,432,3,84,42,0,429,430,7,10,0,0,430,432,3,82,41,11,431,
427,1,0,0,0,431,429,1,0,0,0,432,473,1,0,0,0,433,434,10,10,0,0,434,435,
7,11,0,0,435,472,3,82,41,11,436,437,10,9,0,0,437,438,7,12,0,0,438,472,
3,82,41,10,439,440,10,7,0,0,440,441,5,53,0,0,441,472,3,82,41,8,442,443,
10,6,0,0,443,444,7,13,0,0,444,472,3,82,41,7,445,446,10,5,0,0,446,447,7,
14,0,0,447,472,3,82,41,6,448,449,10,4,0,0,449,450,7,15,0,0,450,472,3,82,
41,5,451,452,10,3,0,0,452,453,5,62,0,0,453,472,3,82,41,4,454,455,10,2,
0,0,455,456,7,16,0,0,456,472,3,82,41,3,457,458,10,1,0,0,458,459,5,65,0,
0,459,472,3,82,41,2,460,461,10,13,0,0,461,462,5,41,0,0,462,472,3,86,43,
0,463,464,10,12,0,0,464,465,5,47,0,0,465,466,3,82,41,0,466,467,5,48,0,
0,467,472,1,0,0,0,468,469,10,8,0,0,469,470,7,17,0,0,470,472,3,94,47,0,
471,433,1,0,0,0,471,436,1,0,0,0,471,439,1,0,0,0,471,442,1,0,0,0,471,445,
1,0,0,0,471,448,1,0,0,0,471,451,1,0,0,0,471,454,1,0,0,0,471,457,1,0,0,
0,471,460,1,0,0,0,471,463,1,0,0,0,471,468,1,0,0,0,472,475,1,0,0,0,473,
471,1,0,0,0,473,474,1,0,0,0,474,83,1,0,0,0,475,473,1,0,0,0,476,484,3,86,
43,0,477,484,3,98,49,0,478,484,3,88,44,0,479,480,5,19,0,0,480,481,3,82,
41,0,481,482,5,21,0,0,482,484,1,0,0,0,483,476,1,0,0,0,483,477,1,0,0,0,
483,478,1,0,0,0,483,479,1,0,0,0,484,85,1,0,0,0,485,491,3,90,45,0,486,491,
3,22,11,0,487,491,5,66,0,0,488,491,5,67,0,0,489,491,5,68,0,0,490,485,1,
0,0,0,490,486,1,0,0,0,490,487,1,0,0,0,490,488,1,0,0,0,490,489,1,0,0,0,
491,87,1,0,0,0,492,495,5,69,0,0,493,496,3,22,11,0,494,496,5,97,0,0,495,
493,1,0,0,0,495,494,1,0,0,0,496,89,1,0,0,0,497,498,3,56,28,0,498,500,5,
19,0,0,499,501,3,92,46,0,500,499,1,0,0,0,500,501,1,0,0,0,501,502,1,0,0,
0,502,503,5,21,0,0,503,91,1,0,0,0,504,509,3,82,41,0,505,506,5,20,0,0,506,
508,3,82,41,0,507,505,1,0,0,0,508,511,1,0,0,0,509,507,1,0,0,0,509,510,
1,0,0,0,510,93,1,0,0,0,511,509,1,0,0,0,512,513,3,56,28,0,513,95,1,0,0,
0,514,515,5,94,0,0,515,97,1,0,0,0,516,527,5,86,0,0,517,527,5,87,0,0,518,