0001: // ===========================================================================
0002: // This file has been generated by
0003: // Typical, version 1.13.2,
0004: // (C) 2004-2007 Robert Grimm and New York University,
0005: // on Thursday, November 29, 2007 at 11:36:01 PM.
0006: // Edit at your own risk.
0007: // ===========================================================================
0008:
0009: package xtc.typical;
0010:
0011: import xtc.util.Pair;
0012:
0013: import xtc.tree.Node;
0014:
0015: /** Helper functionality for Typical. */
0016: public class TypicalSupport {
0017: static final Primitives.Head<TypicalTypes.raw_type<?>> head$98 = new Primitives.Head<TypicalTypes.raw_type<?>>();
0018: static final Primitives.Tail<TypicalTypes.raw_type<?>> tail$99 = new Primitives.Tail<TypicalTypes.raw_type<?>>();
0019: static final Primitives.Append<Node> append$127 = new Primitives.Append<Node>();
0020: static final Primitives.Map<Object, Node> map$128 = new Primitives.Map<Object, Node>();
0021: static final Primitives.Map<TypicalTypes.raw_type<?>, Node> map$129 = new Primitives.Map<TypicalTypes.raw_type<?>, Node>();
0022: static final Primitives.Exists<TypicalTypes.raw_type<?>> exists$184 = new Primitives.Exists<TypicalTypes.raw_type<?>>();
0023: static final Primitives.FoldLeft<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> foldl$222 = new Primitives.FoldLeft<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>>();
0024: static final Primitives.Tail<Node> tail$278 = new Primitives.Tail<Node>();
0025: static final Primitives.Head<Node> head$279 = new Primitives.Head<Node>();
0026: static final Primitives.Append<String> append$297 = new Primitives.Append<String>();
0027: static final Primitives.Union<String> union$313 = new Primitives.Union<String>();
0028: static final Primitives.Exists<TypicalTypes.entry> exists$2386 = new Primitives.Exists<TypicalTypes.entry>();
0029: static final Primitives.Nth<Node> nth$2401 = new Primitives.Nth<Node>();
0030: static final Primitives.Append<TypicalTypes.entry> append$3249 = new Primitives.Append<TypicalTypes.entry>();
0031: static final Primitives.Map<Object, TypicalTypes.entry> map$3295 = new Primitives.Map<Object, TypicalTypes.entry>();
0032: static final Primitives.Map<String, Node> map$3892 = new Primitives.Map<String, Node>();
0033: static final Primitives.Append<Object> append$3920 = new Primitives.Append<Object>();
0034: static final Primitives.Map<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> map$3983 = new Primitives.Map<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>>();
0035: static final Primitives.Map<Object, TypicalTypes.nodeRec> map$4017 = new Primitives.Map<Object, TypicalTypes.nodeRec>();
0036: static final Primitives.Union<TypicalTypes.call> union$4023 = new Primitives.Union<TypicalTypes.call>();
0037: static final Primitives.Union<Pair<String>> union$4217 = new Primitives.Union<Pair<String>>();
0038: static final Primitives.Append<Pair<String>> append$4222 = new Primitives.Append<Pair<String>>();
0039: static final Primitives.Map<TypicalTypes.raw_type<?>, String> map$4244 = new Primitives.Map<TypicalTypes.raw_type<?>, String>();
0040: static final Primitives.Union<Node> union$4303 = new Primitives.Union<Node>();
0041: static final Primitives.Map<Object, String> map$4307 = new Primitives.Map<Object, String>();
0042: static final Primitives.Append<TypicalTypes.patternRecord> append$4735 = new Primitives.Append<TypicalTypes.patternRecord>();
0043: static final Primitives.Head<TypicalTypes.patternRecord> head$4913 = new Primitives.Head<TypicalTypes.patternRecord>();
0044: static final Primitives.Tail<TypicalTypes.patternRecord> tail$4914 = new Primitives.Tail<TypicalTypes.patternRecord>();
0045: static final Primitives.Append<Pair<TypicalTypes.patternRecord>> append$4995 = new Primitives.Append<Pair<TypicalTypes.patternRecord>>();
0046: static final Primitives.Append<TypicalTypes.constr> append$5000 = new Primitives.Append<TypicalTypes.constr>();
0047: static final Primitives.Append<TypicalTypes.pattern> append$5027 = new Primitives.Append<TypicalTypes.pattern>();
0048: static final Primitives.Head<Pair<TypicalTypes.patternRecord>> head$5055 = new Primitives.Head<Pair<TypicalTypes.patternRecord>>();
0049: static final Primitives.Head<TypicalTypes.pattern> head$5134 = new Primitives.Head<TypicalTypes.pattern>();
0050: static final Primitives.Tail<TypicalTypes.pattern> tail$5135 = new Primitives.Tail<TypicalTypes.pattern>();
0051: static final Primitives.Head<TypicalTypes.constr> head$5200 = new Primitives.Head<TypicalTypes.constr>();
0052:
0053: static final boolean match$1(Node m) {
0054: return null != m && m.hasName("UpperID") && m.size() == 1;
0055: }
0056:
0057: static final boolean match$5(Node m) {
0058: return null != m && m.hasName("TypeConstructorPattern")
0059: && m.size() >= 1;
0060: }
0061:
0062: static final boolean match$9(Node m) {
0063: return null != m && m.hasName("TupleConstructor")
0064: && m.size() >= 1;
0065: }
0066:
0067: static final boolean match$13(Node m) {
0068: return null != m && m.hasName("TypeConstructor")
0069: && m.size() == 2;
0070: }
0071:
0072: static final boolean match$17(Node m) {
0073: return null != m && m.hasName("PolyTypeConstructor")
0074: && m.size() == 2;
0075: }
0076:
0077: static final boolean match$21(Node m) {
0078: return null != m && m.hasName("TypeDefinition")
0079: && m.size() == 3;
0080: }
0081:
0082: static final boolean match$25(Node m) {
0083: return null != m && m.hasName("ConstructedType")
0084: && m.size() == 2;
0085: }
0086:
0087: static final boolean match$29(Node m) {
0088: return null != m && m.hasName("UserDefinedType")
0089: && m.size() == 1;
0090: }
0091:
0092: static final boolean match$33(Node m) {
0093: return null != m && m.hasName("AttributeDefinition")
0094: && m.size() == 2;
0095: }
0096:
0097: static final boolean match$37(Node m) {
0098: return null != m && m.hasName("EqualAttributeDefinition")
0099: && m.size() == 2;
0100: }
0101:
0102: static final boolean match$41(Node m) {
0103: return null != m && m.hasName("FieldType") && m.size() == 2;
0104: }
0105:
0106: static final boolean match$45(Node m) {
0107: return null != m && m.hasName("FieldAssignment")
0108: && m.size() == 2;
0109: }
0110:
0111: static final boolean match$49(Node m) {
0112: return null != m && m.hasName("FieldExpression")
0113: && m.size() == 2;
0114: }
0115:
0116: static final boolean match$53(Node m) {
0117: return null != m
0118: && m.hasName("FieldPattern")
0119: && m.size() == 2
0120: && (null != m.getGeneric(0)
0121: && m.getGeneric(0).hasName("LowerID") && m
0122: .getGeneric(0).size() == 1);
0123: }
0124:
0125: static final boolean match$57(Node m) {
0126: return null != m && m.hasName("AsPattern") && m.size() == 2;
0127: }
0128:
0129: static final boolean match$61(Node m) {
0130: return null != m && m.hasName("LowerID") && m.size() == 1;
0131: }
0132:
0133: static final boolean match$65(Node m) {
0134: return null != m && m.hasName("Variable") && m.size() == 1;
0135: }
0136:
0137: static final boolean match$69(Node m) {
0138: return null != m && m.hasName("Parameter") && m.size() == 2;
0139: }
0140:
0141: static final boolean match$73(Node m) {
0142: return null != m && m.hasName("ValueDefinition")
0143: && m.size() == 3;
0144: }
0145:
0146: static final boolean match$77(Node m) {
0147: return null != m && m.hasName("NameSpaceStructure")
0148: && m.size() == 3;
0149: }
0150:
0151: static final boolean match$83(Node m) {
0152: return null != m && m.hasName("LetExpression") && m.size() == 2;
0153: }
0154:
0155: static final boolean match$84(Node m) {
0156: return null != m && m.hasName("PatternMatch") && m.size() == 2;
0157: }
0158:
0159: static final boolean match$87(TypicalTypes.raw_type<?> m) {
0160: return null != m && m.isBoolT();
0161: }
0162:
0163: static final boolean match$88(TypicalTypes.raw_type<?> m) {
0164: return null != m && m.isIntT();
0165: }
0166:
0167: static final boolean match$89(TypicalTypes.raw_type<?> m) {
0168: return null != m && m.isFloat32T();
0169: }
0170:
0171: static final boolean match$90(TypicalTypes.raw_type<?> m) {
0172: return null != m && m.isFloat64T();
0173: }
0174:
0175: static final boolean match$91(TypicalTypes.raw_type<?> m) {
0176: return null != m && m.isStringT();
0177: }
0178:
0179: static final boolean match$92(TypicalTypes.raw_type<?> m) {
0180: return null != m && m.isWildcardT();
0181: }
0182:
0183: static final boolean match$93(TypicalTypes.raw_type<?> m) {
0184: return null != m && m.isAnyT();
0185: }
0186:
0187: static final boolean match$94(TypicalTypes.raw_type<?> m) {
0188: return null != m && m.isConstructorT();
0189: }
0190:
0191: static final boolean match$95(TypicalTypes.raw_type<?> m) {
0192: return null != m && m.isTypeName();
0193: }
0194:
0195: static final boolean match$96(TypicalTypes.raw_type<?> m) {
0196: return null != m && m.isFieldT();
0197: }
0198:
0199: static final boolean match$97(TypicalTypes.raw_type<?> m) {
0200: return null != m && m.isFunctionT();
0201: }
0202:
0203: static final boolean match$100(TypicalTypes.raw_type<?> m) {
0204: return null != m && m.isVariantT();
0205: }
0206:
0207: static final boolean match$107(TypicalTypes.raw_type<?> m) {
0208: return null != m && m.isRecordT();
0209: }
0210:
0211: static final boolean match$114(TypicalTypes.raw_type<?> m) {
0212: return null != m && m.isTupleT();
0213: }
0214:
0215: static final boolean match$115(TypicalTypes.raw_type<?> m) {
0216: return null != m && m.isConstructedT();
0217: }
0218:
0219: static final boolean match$116(TypicalTypes.raw_type<?> m) {
0220: return null != m && m.isPairOfType();
0221: }
0222:
0223: static final boolean match$117(TypicalTypes.raw_type<?> m) {
0224: return null != m && m.isVariableT();
0225: }
0226:
0227: static final boolean match$118(TypicalTypes.raw_type<?> m) {
0228: return null != m && m.isPolyVariantT();
0229: }
0230:
0231: static final boolean match$119(TypicalTypes.raw_type<?> m) {
0232: return null != m && m.isNodeTypeT();
0233: }
0234:
0235: static final boolean match$122(Pair<TypicalTypes.raw_type<?>> m) {
0236: return null != m && ((Pair) m).isEmpty();
0237: }
0238:
0239: static final boolean match$126(Node m) {
0240: return null != m && m.hasName("Module") && m.size() >= 1;
0241: }
0242:
0243: static final boolean match$147(Node m) {
0244: return null != m && m.hasName("EqualityDefinition")
0245: && m.size() >= 1;
0246: }
0247:
0248: static final boolean match$153(Node m) {
0249: return null != m && m.hasName("EqualStructure")
0250: && m.size() >= 2;
0251: }
0252:
0253: static final boolean match$155(TypicalTypes.raw_type<?> m) {
0254: return null != m && m.isConstructorT()
0255: && "raw_type".equals(m.getTuple().get1());
0256: }
0257:
0258: static final boolean match$183(Node m) {
0259: return null != m && m.hasName("RecordDeclaration")
0260: && m.size() >= 0;
0261: }
0262:
0263: static final boolean match$192(Node m) {
0264: return null != m && m.hasName("VariantDeclaration")
0265: && m.size() >= 0;
0266: }
0267:
0268: static final boolean match$200(Node m) {
0269: return null != m && m.hasName("PolyVariantDeclaration")
0270: && m.size() >= 0;
0271: }
0272:
0273: static final boolean match$216(Node m) {
0274: return null != m && m.hasName("ScopeDefinition")
0275: && m.size() == 1;
0276: }
0277:
0278: static final boolean match$220(Node m) {
0279: return null != m && m.hasName("NameSpaceDefinition")
0280: && m.size() >= 0;
0281: }
0282:
0283: static final boolean match$235(TypicalTypes.raw_type<?> m) {
0284: return null != m
0285: && m.isTupleT()
0286: && (null != m.getTuple().get1() && ((Pair) m.getTuple()
0287: .get1()).isEmpty());
0288: }
0289:
0290: static final boolean match$245(Node m) {
0291: return null != m && m.hasName("Parameters") && m.size() >= 0;
0292: }
0293:
0294: static final boolean match$255(Node m) {
0295: return null != m && m.hasName("MatchExpression")
0296: && m.size() == 2;
0297: }
0298:
0299: static final boolean match$269(Node m) {
0300: return null != m && m.hasName("PatternMatching")
0301: && m.size() >= 0;
0302: }
0303:
0304: static final boolean match$277(Node m) {
0305: return null != m && m.hasName("Patterns") && m.size() >= 0;
0306: }
0307:
0308: static final boolean match$283(Node m) {
0309: return null != m && m.hasName("TuplePattern") && m.size() >= 0;
0310: }
0311:
0312: static final boolean match$287(Node m) {
0313: return null != m && m.hasName("WhenPattern") && m.size() == 2;
0314: }
0315:
0316: static final boolean match$306(Node m) {
0317: return null != m && m.hasName("TypedPattern") && m.size() == 2;
0318: }
0319:
0320: static final boolean match$312(Node m) {
0321: return null != m && m.hasName("ConsPattern") && m.size() == 2;
0322: }
0323:
0324: static final boolean match$321(Node m) {
0325: return null != m && m.hasName("ListPattern") && m.size() >= 0;
0326: }
0327:
0328: static final boolean match$323(Pair<Node> m) {
0329: return null != m && ((Pair) m).isEmpty();
0330: }
0331:
0332: static final boolean match$339(Node m) {
0333: return null != m && m.hasName("RecordPattern") && m.size() >= 0;
0334: }
0335:
0336: static final boolean match$363(Node m) {
0337: return null != m && m.hasName("FieldPattern") && m.size() == 2;
0338: }
0339:
0340: static final boolean match$387(Pair<Node> m) {
0341: return m.size() == 1
0342: && (null != m.get(0)
0343: && m.get(0).hasName("PatternParameters") && m
0344: .get(0).size() >= 0);
0345: }
0346:
0347: static final boolean match$422(Pair<Node> m) {
0348: return m.size() == 1
0349: && (null != m.get(0) && m.get(0).hasName("WildCard"));
0350: }
0351:
0352: static final boolean match$479(Node m) {
0353: return null != m && m.hasName("TupleLiteral") && m.size() >= 0;
0354: }
0355:
0356: static final boolean match$483(Node m) {
0357: return null != m && m.hasName("LogicalOrExpression")
0358: && m.size() == 2;
0359: }
0360:
0361: static final boolean match$491(Node m) {
0362: return null != m && m.hasName("LogicalAndExpression")
0363: && m.size() == 2;
0364: }
0365:
0366: static final boolean match$499(Node m) {
0367: return null != m && m.hasName("EqualityExpression")
0368: && m.size() == 3;
0369: }
0370:
0371: static final boolean match$505(Node m) {
0372: return null != m && m.hasName("RelationalExpression")
0373: && m.size() == 3;
0374: }
0375:
0376: static final boolean match$553(Node m) {
0377: return null != m && m.hasName("AdditiveExpression")
0378: && m.size() == 3;
0379: }
0380:
0381: static final boolean match$609(Node m) {
0382: return null != m && m.hasName("MultiplicativeExpression")
0383: && m.size() == 3;
0384: }
0385:
0386: static final boolean match$665(Node m) {
0387: return null != m && m.hasName("ConcatenationExpression")
0388: && m.size() == 3;
0389: }
0390:
0391: static final boolean match$673(Node m) {
0392: return null != m && m.hasName("ConsExpression")
0393: && m.size() == 2;
0394: }
0395:
0396: static final boolean match$679(Node m) {
0397: return null != m && m.hasName("FunctionApplication")
0398: && m.size() >= 0;
0399: }
0400:
0401: static final boolean match$681(Pair<Node> m) {
0402: return m.size() == 3;
0403: }
0404:
0405: static final boolean match$686(Pair<Node> m) {
0406: return m.size() == 2;
0407: }
0408:
0409: static final boolean match$689(Pair<Node> m) {
0410: return m.size() == 3
0411: && (null != m.get(2) && m.get(2).hasName("ErrorClause"));
0412: }
0413:
0414: static final boolean match$692(Node m) {
0415: return null != m && m.hasName("ErrorClause") && m.size() == 3;
0416: }
0417:
0418: static final boolean match$714(Pair<Node> m) {
0419: return m.size() == 2
0420: && (null != m.get(1) && m.get(1).hasName("ErrorClause"));
0421: }
0422:
0423: static final boolean match$737(Pair<Node> m) {
0424: return m.size() == 2
0425: && (null != m.get(1) && m.get(1).hasName("LowerID"));
0426: }
0427:
0428: static final boolean match$742(Pair<Node> m) {
0429: return m.size() == 1;
0430: }
0431:
0432: static final boolean match$2267(Node m) {
0433: return null != m && m.hasName("PredicateExpression")
0434: && m.size() == 2;
0435: }
0436:
0437: static final boolean match$2273(Node m) {
0438: return null != m && m.hasName("PredicateArgument")
0439: && m.size() == 1;
0440: }
0441:
0442: static final boolean match$2379(Node m) {
0443: return null != m && m.hasName("LogicalNegationExpression")
0444: && m.size() == 1;
0445: }
0446:
0447: static final boolean match$2390(Node m) {
0448: return null != m && m.hasName("FunctionExpression")
0449: && m.size() == 1;
0450: }
0451:
0452: static final boolean match$2400(Node m) {
0453: return null != m && m.hasName("RequireExpression")
0454: && m.size() >= 0;
0455: }
0456:
0457: static final boolean match$2405(Node m) {
0458: return null != m && m.hasName("RequireArgs") && m.size() == 4;
0459: }
0460:
0461: static final boolean match$2415(Node m) {
0462: return null != m && m.hasName("GuardExpression")
0463: && m.size() == 2;
0464: }
0465:
0466: static final boolean match$2427(Node m) {
0467: return null != m && m.hasName("AssertClause") && m.size() == 2;
0468: }
0469:
0470: static final boolean match$2509(Node m) {
0471: return null != m && m.hasName("RecordExpression")
0472: && m.size() >= 0;
0473: }
0474:
0475: static final boolean match$2527(Node m) {
0476: return null != m
0477: && m.hasName("WithExpression")
0478: && m.size() == 1
0479: && (null != m.getGeneric(0) && m.getGeneric(0).hasName(
0480: "Bottom"));
0481: }
0482:
0483: static final boolean match$2537(Node m) {
0484: return null != m && m.hasName("WithExpression")
0485: && m.size() == 1;
0486: }
0487:
0488: static final boolean match$2795(Node m) {
0489: return null != m && m.hasName("IfExpression") && m.size() == 2;
0490: }
0491:
0492: static final boolean match$2801(Node m) {
0493: return null != m && m.hasName("IfElseExpression")
0494: && m.size() == 3;
0495: }
0496:
0497: static final boolean match$2809(Node m) {
0498: return null != m && m.hasName("ListLiteral") && m.size() >= 0;
0499: }
0500:
0501: public static final Analyzer.NodeMatch nodeMatch$2813 = new Analyzer.NodeMatch() {
0502: public Boolean apply(Node m) {
0503: return (null != m && m.hasName("ScopeDefinition"));
0504: }
0505: };
0506:
0507: static final boolean match$2828(Node m) {
0508: return null != m && m.hasName("ReduceExpression")
0509: && m.size() == 3;
0510: }
0511:
0512: static final boolean match$2838(Node m) {
0513: return null != m && m.hasName("ReduceOptions") && m.size() >= 0;
0514: }
0515:
0516: static final boolean match$2856(Node m) {
0517: return null != m && m.hasName("TypeVariable") && m.size() == 1;
0518: }
0519:
0520: static final boolean match$2860(Node m) {
0521: return null != m && m.hasName("ConstraintType")
0522: && m.size() == 1;
0523: }
0524:
0525: static final boolean match$2864(Node m) {
0526: return null != m && m.hasName("PolyVariantType")
0527: && m.size() >= 0;
0528: }
0529:
0530: static final boolean match$2868(Node m) {
0531: return null != m && m.hasName("TupleType") && m.size() >= 0;
0532: }
0533:
0534: static final boolean match$2884(Node m) {
0535: return null != m && m.hasName("AliasedType") && m.size() == 2;
0536: }
0537:
0538: static final boolean match$2888(Node m) {
0539: return null != m && m.hasName("FunctionType") && m.size() == 2;
0540: }
0541:
0542: static final boolean match$2910(Node m) {
0543: return null != m && m.hasName("NaryConstructedType")
0544: && m.size() == 2;
0545: }
0546:
0547: static final boolean match$2914(Node m) {
0548: return null != m && m.hasName("Bottom");
0549: }
0550:
0551: static final boolean match$2918(Node m) {
0552: return null != m && m.hasName("BottomPattern");
0553: }
0554:
0555: static final boolean match$2922(Node m) {
0556: return null != m && m.hasName("WildCard");
0557: }
0558:
0559: static final boolean match$2926(Node m) {
0560: return null != m && m.hasName("AnyType");
0561: }
0562:
0563: static final boolean match$2930(Node m) {
0564: return null != m && m.hasName("StringLiteral");
0565: }
0566:
0567: static final boolean match$2934(Node m) {
0568: return null != m && m.hasName("StringType");
0569: }
0570:
0571: static final boolean match$2938(Node m) {
0572: return null != m && m.hasName("IntegerLiteral");
0573: }
0574:
0575: static final boolean match$2942(Node m) {
0576: return null != m && m.hasName("IntType");
0577: }
0578:
0579: static final boolean match$2946(Node m) {
0580: return null != m && m.hasName("BooleanLiteral");
0581: }
0582:
0583: static final boolean match$2950(Node m) {
0584: return null != m && m.hasName("BooleanType");
0585: }
0586:
0587: static final boolean match$2954(Node m) {
0588: return null != m && m.hasName("FloatingLiteral");
0589: }
0590:
0591: static final boolean match$2958(Node m) {
0592: return null != m && m.hasName("Float64");
0593: }
0594:
0595: static final boolean match$2962(Node m) {
0596: return null != m && m.hasName("Float32");
0597: }
0598:
0599: static final boolean match$2971(
0600: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0601: return null != m && m.size() == 2
0602: && (null != m.get1() && m.get1().isWildcardT());
0603: }
0604:
0605: static final boolean match$2972(
0606: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0607: return null != m && m.size() == 2
0608: && (null != m.get2() && m.get2().isWildcardT());
0609: }
0610:
0611: static final boolean match$2973(
0612: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0613: return null != m && m.size() == 2
0614: && (null != m.get1() && m.get1().isBoolT())
0615: && (null != m.get2() && m.get2().isBoolT());
0616: }
0617:
0618: static final boolean match$2974(
0619: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0620: return null != m && m.size() == 2
0621: && (null != m.get1() && m.get1().isIntT())
0622: && (null != m.get2() && m.get2().isIntT());
0623: }
0624:
0625: static final boolean match$2975(
0626: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0627: return null != m && m.size() == 2
0628: && (null != m.get1() && m.get1().isStringT())
0629: && (null != m.get2() && m.get2().isStringT());
0630: }
0631:
0632: static final boolean match$2976(
0633: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0634: return null != m && m.size() == 2
0635: && (null != m.get1() && m.get1().isFloat32T())
0636: && (null != m.get2() && m.get2().isFloat32T());
0637: }
0638:
0639: static final boolean match$2977(
0640: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0641: return null != m && m.size() == 2
0642: && (null != m.get1() && m.get1().isFloat64T())
0643: && (null != m.get2() && m.get2().isFloat64T());
0644: }
0645:
0646: static final boolean match$2978(
0647: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0648: return null != m && m.size() == 2
0649: && (null != m.get1() && m.get1().isNodeTypeT())
0650: && (null != m.get2() && m.get2().isNodeTypeT());
0651: }
0652:
0653: static final boolean match$2979(
0654: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0655: return null != m && m.size() == 2
0656: && (null != m.get1() && m.get1().isStringT())
0657: && (null != m.get2() && m.get2().isAnyT());
0658: }
0659:
0660: static final boolean match$2980(
0661: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0662: return null != m && m.size() == 2
0663: && (null != m.get1() && m.get1().isAnyT())
0664: && (null != m.get2() && m.get2().isStringT());
0665: }
0666:
0667: static final boolean match$2981(
0668: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0669: return null != m && m.size() == 2
0670: && (null != m.get1() && m.get1().isAnyT());
0671: }
0672:
0673: static final boolean match$2982(
0674: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0675: return null != m && m.size() == 2
0676: && (null != m.get2() && m.get2().isAnyT());
0677: }
0678:
0679: static final boolean match$2983(
0680: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0681: return null != m && m.size() == 2
0682: && (null != m.get1() && m.get1().isNodeTypeT());
0683: }
0684:
0685: static final boolean match$2984(
0686: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0687: return null != m && m.size() == 2
0688: && (null != m.get2() && m.get2().isNodeTypeT());
0689: }
0690:
0691: static final boolean match$2985(
0692: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0693: return null != m && m.size() == 2
0694: && (null != m.get1() && m.get1().isTypeName())
0695: && (null != m.get2() && m.get2().isTypeName());
0696: }
0697:
0698: static final boolean match$2986(
0699: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0700: return null != m && m.size() == 2
0701: && (null != m.get1() && m.get1().isTypeName());
0702: }
0703:
0704: static final boolean match$2987(
0705: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0706: return null != m && m.size() == 2
0707: && (null != m.get2() && m.get2().isTypeName());
0708: }
0709:
0710: static final boolean match$2988(
0711: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0712: return null != m && m.size() == 2
0713: && (null != m.get1() && m.get1().isVariableT())
0714: && (null != m.get2() && m.get2().isVariableT());
0715: }
0716:
0717: static final boolean match$2989(
0718: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0719: return null != m && m.size() == 2
0720: && (null != m.get1() && m.get1().isVariableT());
0721: }
0722:
0723: static final boolean match$2990(
0724: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0725: return null != m && m.size() == 2
0726: && (null != m.get2() && m.get2().isVariableT());
0727: }
0728:
0729: static final boolean match$2991(
0730: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0731: return null != m && m.size() == 2
0732: && (null != m.get1() && m.get1().isPairOfType())
0733: && (null != m.get2() && m.get2().isPairOfType());
0734: }
0735:
0736: static final boolean match$2992(
0737: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0738: return null != m && m.size() == 2
0739: && (null != m.get1() && m.get1().isFieldT())
0740: && (null != m.get2() && m.get2().isFieldT());
0741: }
0742:
0743: static final boolean match$2993(
0744: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0745: return null != m && m.size() == 2
0746: && (null != m.get1() && m.get1().isFieldT());
0747: }
0748:
0749: static final boolean match$2994(
0750: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0751: return null != m && m.size() == 2
0752: && (null != m.get2() && m.get2().isFieldT());
0753: }
0754:
0755: static final boolean match$2995(
0756: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0757: return null != m && m.size() == 2
0758: && (null != m.get1() && m.get1().isRecordT())
0759: && (null != m.get2() && m.get2().isRecordT());
0760: }
0761:
0762: static final boolean match$2996(
0763: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0764: return null != m && m.size() == 2
0765: && (null != m.get1() && m.get1().isTupleT())
0766: && (null != m.get2() && m.get2().isTupleT());
0767: }
0768:
0769: static final boolean match$2997(
0770: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0771: return null != m && m.size() == 2
0772: && (null != m.get1() && m.get1().isConstructedT())
0773: && (null != m.get2() && m.get2().isConstructedT());
0774: }
0775:
0776: static final boolean match$2998(
0777: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0778: return null != m
0779: && m.size() == 2
0780: && (null != m.get1() && m.get1().isConstructedT() && "var"
0781: .equals(m.get1().getTuple().get2()));
0782: }
0783:
0784: static final boolean match$2999(
0785: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0786: return null != m
0787: && m.size() == 2
0788: && (null != m.get2() && m.get2().isConstructedT() && "var"
0789: .equals(m.get2().getTuple().get2()));
0790: }
0791:
0792: static final boolean match$3000(
0793: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0794: return null != m && m.size() == 2
0795: && (null != m.get1() && m.get1().isPolyVariantT());
0796: }
0797:
0798: static final boolean match$3001(
0799: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0800: return null != m && m.size() == 2
0801: && (null != m.get2() && m.get2().isPolyVariantT());
0802: }
0803:
0804: static final boolean match$3002(
0805: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0806: return null != m && m.size() == 2
0807: && (null != m.get1() && m.get1().isVariantT())
0808: && (null != m.get2() && m.get2().isVariantT());
0809: }
0810:
0811: static final boolean match$3004(
0812: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0813: return null != m && m.size() == 2
0814: && (null != m.get1() && m.get1().isConstructorT())
0815: && (null != m.get2() && m.get2().isConstructorT());
0816: }
0817:
0818: static final boolean match$3009(
0819: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0820: return null != m && m.size() == 2
0821: && (null != m.get1() && m.get1().isVariantT())
0822: && (null != m.get2() && m.get2().isConstructorT());
0823: }
0824:
0825: static final boolean match$3016(
0826: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0827: return null != m && m.size() == 2
0828: && (null != m.get1() && m.get1().isConstructorT())
0829: && (null != m.get2() && m.get2().isVariantT());
0830: }
0831:
0832: static final boolean match$3018(
0833: Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> m) {
0834: return null != m && m.size() == 2
0835: && (null != m.get1() && m.get1().isFunctionT())
0836: && (null != m.get2() && m.get2().isFunctionT());
0837: }
0838:
0839: static final boolean match$3072(Node m) {
0840: return null != m && m.hasName("TypeDefinition");
0841: }
0842:
0843: static final boolean match$3084(Node m) {
0844: return null != m && m.hasName("AttributeDefinition");
0845: }
0846:
0847: static final boolean match$3088(Node m) {
0848: return null != m && m.hasName("EqualAttributeDefinition");
0849: }
0850:
0851: static final boolean match$3114(Node m) {
0852: return null != m && m.hasName("ScopeDefinition");
0853: }
0854:
0855: static final boolean match$3118(Node m) {
0856: return null != m && m.hasName("NameSpaceDefinition");
0857: }
0858:
0859: static final boolean match$3163(Pair<TypicalTypes.call> m) {
0860: return null != m && ((Pair) m).isEmpty();
0861: }
0862:
0863: static final boolean match$3230(Pair<String> m) {
0864: return null != m && ((Pair) m).isEmpty();
0865: }
0866:
0867: static final boolean match$3238(Node m) {
0868: return null != m && m.hasName("PolyVariantDeclaration");
0869: }
0870:
0871: static final boolean match$3252(Pair<TypicalTypes.entry> m) {
0872: return null != m && ((Pair) m).isEmpty();
0873: }
0874:
0875: static final boolean match$3256(Node m) {
0876: return null != m && m.hasName("LetBinding") && m.size() == 2;
0877: }
0878:
0879: static final boolean match$3258(Node m) {
0880: return null != m
0881: && m.hasName("TypedPattern")
0882: && m.size() == 2
0883: && (null != m.getGeneric(0) && m.getGeneric(0).hasName(
0884: "Variable"));
0885: }
0886:
0887: static final boolean match$3314(TypicalTypes.raw_type<?> m) {
0888: return null != m && m.isConstructedT()
0889: && "var".equals(m.getTuple().get2());
0890: }
0891:
0892: static final boolean match$3322(TypicalTypes.raw_type<?> m) {
0893: return null != m && m.isConstructedT()
0894: && "list".equals(m.getTuple().get2());
0895: }
0896:
0897: static final boolean match$3352(TypicalTypes.raw_type<?> m) {
0898: return null != m && m.isStringList();
0899: }
0900:
0901: static final boolean match$3397(Node m) {
0902: return null != m && m.hasName("TypeParameters")
0903: && m.size() >= 0;
0904: }
0905:
0906: static final boolean match$3401(Node m) {
0907: return null != m && m.hasName("NaryType") && m.size() >= 0;
0908: }
0909:
0910: static final boolean match$3405(Node m) {
0911: return null != m && m.hasName("Arguments") && m.size() >= 0;
0912: }
0913:
0914: static final boolean match$3413(Node m) {
0915: return null != m && m.hasName("LetBindings") && m.size() >= 0;
0916: }
0917:
0918: static final boolean match$3417(Node m) {
0919: return null != m
0920: && m.hasName("PatternMatch")
0921: && m.size() == 2
0922: && (null != m.getGeneric(0)
0923: && m.getGeneric(0).hasName("Patterns") && m
0924: .getGeneric(0).size() >= 0);
0925: }
0926:
0927: static final boolean match$3474(Node m) {
0928: return null != m && m.hasName("PatternParameters")
0929: && m.size() >= 0;
0930: }
0931:
0932: static final boolean match$3911(TypicalTypes.raw_type<?> m) {
0933: return null != m && m.isStringName();
0934: }
0935:
0936: static final boolean match$3917(Pair<?> m) {
0937: return null != m && ((Pair) m).isEmpty();
0938: }
0939:
0940: static final boolean match$3918(Pair<?> m) {
0941: return m.size() == 1;
0942: }
0943:
0944: static final boolean match$3939(TypicalTypes.raw_type<?> m) {
0945: return null != m && m.isVariableT()
0946: && Boolean.TRUE.equals(m.getTuple().get2());
0947: }
0948:
0949: static final boolean match$4144(Pair<Node> m) {
0950: return m.size() == 2
0951: && (null != m.get(1) && m.get(1).hasName("Arguments"));
0952: }
0953:
0954: static final boolean match$4145(Pair<Node> m) {
0955: return m.size() == 3
0956: && (null != m.get(0) && m.get(0).hasName("UpperID"))
0957: && (null != m.get(1) && m.get(1).hasName("LowerID"))
0958: && (null != m.get(2) && m.get(2).hasName("Arguments") && m
0959: .get(2).size() >= 0);
0960: }
0961:
0962: static final boolean match$4225(Pair<Pair<String>> m) {
0963: return null != m && ((Pair) m).isEmpty();
0964: }
0965:
0966: static final boolean match$4317(Pair<String> m) {
0967: return m.size() == 1;
0968: }
0969:
0970: static final boolean match$4577(Node m) {
0971: return null != m && m.hasName("Variable");
0972: }
0973:
0974: static final boolean match$4581(Node m) {
0975: return null != m && m.hasName("MessageTag");
0976: }
0977:
0978: static final boolean match$4585(Node m) {
0979: return null != m && m.hasName("ReduceOptions");
0980: }
0981:
0982: static final boolean match$4589(Node m) {
0983: return null != m && m.hasName("LowerID");
0984: }
0985:
0986: static final boolean match$4593(Node m) {
0987: return null != m && m.hasName("UpperID");
0988: }
0989:
0990: static final boolean match$4597(Node m) {
0991: return null != m && m.hasName("UserDefinedType");
0992: }
0993:
0994: static final boolean match$4601(Node m) {
0995: return null != m && m.hasName("TypeVariable");
0996: }
0997:
0998: static final boolean match$4686(Node m) {
0999: return null != m && m.hasName("StringLiteral") && m.size() == 1;
1000: }
1001:
1002: static final boolean match$4690(Node m) {
1003: return null != m && m.hasName("IntegerLiteral")
1004: && m.size() == 1;
1005: }
1006:
1007: static final boolean match$4694(Node m) {
1008: return null != m && m.hasName("FloatingLiteral")
1009: && m.size() == 1;
1010: }
1011:
1012: static final boolean match$4698(Node m) {
1013: return null != m && m.hasName("BooleanLiteral")
1014: && m.size() == 1;
1015: }
1016:
1017: static final boolean match$4711(Pair<TypicalTypes.patternRecord> m) {
1018: return null != m && ((Pair) m).isEmpty();
1019: }
1020:
1021: static final boolean match$4742(TypicalTypes.pattern m) {
1022: return null != m && m.isWildCardPattern();
1023: }
1024:
1025: static final boolean match$4744(TypicalTypes.pattern m) {
1026: return null != m && m.isVariablePattern();
1027: }
1028:
1029: static final boolean match$4745(TypicalTypes.pattern m) {
1030: return null != m && m.isBotPattern();
1031: }
1032:
1033: static final boolean match$4752(TypicalTypes.pattern m) {
1034: return null != m && m.isConstantPattern();
1035: }
1036:
1037: static final boolean match$4756(
1038: Tuple.T2<TypicalTypes.value, TypicalTypes.value> m) {
1039: return null != m && m.size() == 2
1040: && (null != m.get1() && m.get1().isStringValue())
1041: && (null != m.get2() && m.get2().isStringValue());
1042: }
1043:
1044: static final boolean match$4757(
1045: Tuple.T2<TypicalTypes.value, TypicalTypes.value> m) {
1046: return null != m && m.size() == 2
1047: && (null != m.get1() && m.get1().isFloatValue())
1048: && (null != m.get2() && m.get2().isFloatValue());
1049: }
1050:
1051: static final boolean match$4758(
1052: Tuple.T2<TypicalTypes.value, TypicalTypes.value> m) {
1053: return null != m && m.size() == 2
1054: && (null != m.get1() && m.get1().isIntValue())
1055: && (null != m.get2() && m.get2().isIntValue());
1056: }
1057:
1058: static final boolean match$4759(
1059: Tuple.T2<TypicalTypes.value, TypicalTypes.value> m) {
1060: return null != m && m.size() == 2
1061: && (null != m.get1() && m.get1().isBoolValue())
1062: && (null != m.get2() && m.get2().isBoolValue());
1063: }
1064:
1065: static final boolean match$4783(TypicalTypes.pattern m) {
1066: return null != m && m.isTupPattern();
1067: }
1068:
1069: static final boolean match$4790(TypicalTypes.pattern m) {
1070: return null != m && m.isConstructorPattern();
1071: }
1072:
1073: static final boolean match$4797(TypicalTypes.pattern m) {
1074: return null != m && m.isEmptyPattern();
1075: }
1076:
1077: static final boolean match$4804(TypicalTypes.pattern m) {
1078: return null != m && m.isPairPattern();
1079: }
1080:
1081: static final boolean match$4811(TypicalTypes.pattern m) {
1082: return null != m && m.isRecPattern();
1083: }
1084:
1085: static final boolean match$4818(TypicalTypes.pattern m) {
1086: return null != m && m.isRecFieldPattern();
1087: }
1088:
1089: static final boolean match$4917(
1090: Tuple.T2<TypicalTypes.pattern, TypicalTypes.pattern> m) {
1091: return null != m && m.size() == 2
1092: && (null != m.get1() && m.get1().isVariablePattern())
1093: && (null != m.get2() && m.get2().isVariablePattern());
1094: }
1095:
1096: static final boolean match$4918(
1097: Tuple.T2<TypicalTypes.pattern, TypicalTypes.pattern> m) {
1098: return null != m && m.size() == 2
1099: && (null != m.get1() && m.get1().isBotPattern())
1100: && (null != m.get2() && m.get2().isBotPattern());
1101: }
1102:
1103: static final boolean match$4919(
1104: Tuple.T2<TypicalTypes.pattern, TypicalTypes.pattern> m) {
1105: return null != m && m.size() == 2
1106: && (null != m.get1() && m.get1().isConstantPattern())
1107: && (null != m.get2() && m.get2().isConstantPattern());
1108: }
1109:
1110: static final boolean match$4932(
1111: Tuple.T2<TypicalTypes.pattern, TypicalTypes.pattern> m) {
1112: return null != m && m.size() == 2
1113: && (null != m.get1() && m.get1().isTupPattern())
1114: && (null != m.get2() && m.get2().isTupPattern());
1115: }
1116:
1117: static final boolean match$4933(
1118: Tuple.T2<TypicalTypes.pattern, TypicalTypes.pattern> m) {
1119: return null != m
1120: && m.size() == 2
1121: && (null != m.get1() && m.get1().isConstructorPattern())
1122: && (null != m.get2() && m.get2().isConstructorPattern());
1123: }
1124:
1125: static final boolean match$4998(
1126: Pair<Pair<TypicalTypes.patternRecord>> m) {
1127: return null != m && ((Pair) m).isEmpty();
1128: }
1129:
1130: static final boolean match$5021(TypicalTypes.result m) {
1131: return null != m && m.isNone();
1132: }
1133:
1134: static final boolean match$5022(TypicalTypes.result m) {
1135: return null != m && m.isSome();
1136: }
1137:
1138: static final boolean match$5030(Pair<TypicalTypes.constr> m) {
1139: return null != m && ((Pair) m).isEmpty();
1140: }
1141:
1142: static final boolean match$5033(TypicalTypes.constr m) {
1143: return null != m && m.isWildConstr();
1144: }
1145:
1146: static final boolean match$5061(TypicalTypes.constr m) {
1147: return null != m && m.isBotConstr();
1148: }
1149:
1150: static final boolean match$5063(TypicalTypes.constr m) {
1151: return null != m && m.isConst();
1152: }
1153:
1154: static final boolean match$5064(TypicalTypes.constr m) {
1155: return null != m && m.isEmptyConstr();
1156: }
1157:
1158: static final boolean match$5065(TypicalTypes.constr m) {
1159: return null != m && m.isRecordConstr();
1160: }
1161:
1162: static final boolean match$5066(TypicalTypes.constr m) {
1163: return null != m && m.isTupleConstr();
1164: }
1165:
1166: static final boolean match$5073(TypicalTypes.constr m) {
1167: return null != m && m.isPairConstr();
1168: }
1169:
1170: static final boolean match$5080(TypicalTypes.constr m) {
1171: return null != m && m.isCConstr();
1172: }
1173:
1174: static final boolean match$5141(Pair<TypicalTypes.pattern> m) {
1175: return null != m && ((Pair) m).isEmpty();
1176: }
1177:
1178: static final boolean match$5171(TypicalTypes.value m) {
1179: return null != m && m.isBoolValue();
1180: }
1181:
1182: static final boolean match$5225(TypicalTypes.value m) {
1183: return null != m && m.isIntValue();
1184: }
1185:
1186: static final boolean match$5226(TypicalTypes.value m) {
1187: return null != m && m.isFloatValue();
1188: }
1189:
1190: static final boolean match$5227(TypicalTypes.value m) {
1191: return null != m && m.isStringValue();
1192: }
1193:
1194: static final boolean match$5313(Pair<TypicalTypes.pattern> m) {
1195: return m.size() == 1;
1196: }
1197:
1198: static final boolean match$5318(Pair<TypicalTypes.patternRecord> m) {
1199: return m.size() == 1;
1200: }
1201:
1202: private TypicalSupport() {
1203: }
1204: }
|