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 Saturday, December 1, 2007 at 1:00:09 PM.
0006: // Edit at your own risk.
0007: // ===========================================================================
0008:
0009: package xtc.lang.c;
0010:
0011: import xtc.util.Pair;
0012:
0013: import xtc.tree.Node;
0014:
0015: import xtc.typical.Analyzer;
0016: import xtc.typical.Primitives;
0017: import xtc.typical.Tuple;
0018:
0019: /** Helper functionality for C. */
0020: public class CSupport {
0021: static final Primitives.Map<CTypes.type, Node> map$212 = new Primitives.Map<CTypes.type, Node>();
0022: static final Primitives.Nth<CTypes.type> nth$489 = new Primitives.Nth<CTypes.type>();
0023: static final Primitives.Append<Object> append$973 = new Primitives.Append<Object>();
0024: static final Primitives.Exists<CTypes.type> exists$1017 = new Primitives.Exists<CTypes.type>();
0025: static final Primitives.Tail<CTypes.type> tail$1214 = new Primitives.Tail<CTypes.type>();
0026: static final Primitives.Head<CTypes.type> head$1215 = new Primitives.Head<CTypes.type>();
0027: static final Primitives.Union<CTypes.qualifier> union$1507 = new Primitives.Union<CTypes.qualifier>();
0028: static final Primitives.Append<CTypes.type> append$1526 = new Primitives.Append<CTypes.type>();
0029: static final Primitives.Append<CTypes.label_record> append$1539 = new Primitives.Append<CTypes.label_record>();
0030: static final Primitives.Union<CTypes.label_record> union$2013 = new Primitives.Union<CTypes.label_record>();
0031: static final Primitives.Head<Node> head$2143 = new Primitives.Head<Node>();
0032:
0033: static final boolean match$1(Node m) {
0034: return null != m && m.hasName("PrimaryIdentifier")
0035: && m.size() == 1;
0036: }
0037:
0038: static final boolean match$5(Node m) {
0039: return null != m && m.hasName("SimpleDeclarator")
0040: && m.size() == 1;
0041: }
0042:
0043: static final boolean match$9(Node m) {
0044: return null != m && m.hasName("PointerDeclarator")
0045: && m.size() == 2;
0046: }
0047:
0048: static final boolean match$13(Node m) {
0049: return null != m && m.hasName("ArrayDeclarator")
0050: && m.size() == 3;
0051: }
0052:
0053: static final boolean match$17(Node m) {
0054: return null != m && m.hasName("FunctionDeclarator")
0055: && m.size() == 2;
0056: }
0057:
0058: static final boolean match$21(Node m) {
0059: return null != m && m.hasName("Enumerator") && m.size() == 2;
0060: }
0061:
0062: static final boolean match$25(Node m) {
0063: return null != m && m.hasName("TypedefName") && m.size() == 1;
0064: }
0065:
0066: static final boolean match$29(Node m) {
0067: return null != m
0068: && m.hasName("LabeledStatement")
0069: && m.size() == 2
0070: && (null != m.getGeneric(0)
0071: && m.getGeneric(0).hasName("NamedLabel") && m
0072: .getGeneric(0).size() == 2);
0073: }
0074:
0075: static final boolean match$33(Node m) {
0076: return null != m && m.hasName("NamedLabel") && m.size() == 2;
0077: }
0078:
0079: static final boolean match$37(Node m) {
0080: return null != m && m.hasName("LabelAddressExpression")
0081: && m.size() == 1;
0082: }
0083:
0084: static final boolean match$41(Node m) {
0085: return null != m && m.hasName("DefaultLabel");
0086: }
0087:
0088: static final boolean match$45(Node m) {
0089: return null != m
0090: && m.hasName("GotoStatement")
0091: && m.size() == 2
0092: && (null != m.getGeneric(1)
0093: && m.getGeneric(1).hasName("PrimaryIdentifier") && m
0094: .getGeneric(1).size() == 1);
0095: }
0096:
0097: static final boolean match$49(Node m) {
0098: return null != m && m.hasName("StructureTypeReference")
0099: && m.size() == 2;
0100: }
0101:
0102: static final boolean match$53(Node m) {
0103: return null != m && m.hasName("UnionTypeReference")
0104: && m.size() == 2;
0105: }
0106:
0107: static final boolean match$57(Node m) {
0108: return null != m && m.hasName("EnumerationTypeDefinition")
0109: && m.size() == 4;
0110: }
0111:
0112: static final boolean match$61(Node m) {
0113: return null != m && m.hasName("EnumerationTypeReference")
0114: && m.size() == 2;
0115: }
0116:
0117: static final boolean match$65(Node m) {
0118: return null != m && m.hasName("AttributedDeclarator")
0119: && m.size() == 3;
0120: }
0121:
0122: static final boolean match$69(Node m) {
0123: return null != m && m.hasName("IndirectComponentSelection")
0124: && m.size() == 2;
0125: }
0126:
0127: public static final Analyzer.NodeMatch nodeMatch$75 = new Analyzer.NodeMatch() {
0128: public Boolean apply(Node m) {
0129: return (null != m && m.hasName("FunctionDefinition"));
0130: }
0131: };
0132:
0133: public static final Analyzer.NodeMatch nodeMatch$77 = new Analyzer.NodeMatch() {
0134: public Boolean apply(Node m) {
0135: return (null != m && m.hasName("ParameterTypeList"));
0136: }
0137: };
0138:
0139: static final boolean match$78(Node m) {
0140: return null != m
0141: && m.hasName("FunctionDeclarator")
0142: && m.size() == 2
0143: && (null != m.getGeneric(0)
0144: && m.getGeneric(0).hasName("SimpleDeclarator") && m
0145: .getGeneric(0).size() == 1);
0146: }
0147:
0148: static final boolean match$79(Node m) {
0149: return null != m && m.hasName("FunctionDefinition")
0150: && m.size() == 5;
0151: }
0152:
0153: static final boolean match$81(Node m) {
0154: return null != m
0155: && m.hasName("ForStatement")
0156: && m.size() == 4
0157: && (null != m.getGeneric(0) && m.getGeneric(0).hasName(
0158: "Declaration"));
0159: }
0160:
0161: static final boolean match$82(Node m) {
0162: return null != m && m.hasName("ForStatement") && m.size() == 4;
0163: }
0164:
0165: static final boolean match$83(Node m) {
0166: return null != m && m.hasName("CompoundStatement");
0167: }
0168:
0169: public static final Analyzer.NodeMatch nodeMatch$86 = new Analyzer.NodeMatch() {
0170: public Boolean apply(Node m) {
0171: return (null != m && m.hasName("Unsigned"));
0172: }
0173: };
0174:
0175: public static final Analyzer.NodeMatch nodeMatch$88 = new Analyzer.NodeMatch() {
0176: public Boolean apply(Node m) {
0177: return (null != m && m.hasName("Long"));
0178: }
0179: };
0180:
0181: public static final Analyzer.NodeMatch nodeMatch$91 = new Analyzer.NodeMatch() {
0182: public Boolean apply(Node m) {
0183: return (null != m && m.hasName("Int"));
0184: }
0185: };
0186:
0187: public static final Analyzer.NodeMatch nodeMatch$96 = new Analyzer.NodeMatch() {
0188: public Boolean apply(Node m) {
0189: return (null != m && m.hasName("Signed"));
0190: }
0191: };
0192:
0193: public static final Analyzer.NodeMatch nodeMatch$111 = new Analyzer.NodeMatch() {
0194: public Boolean apply(Node m) {
0195: return (null != m && m.hasName("Short"));
0196: }
0197: };
0198:
0199: public static final Analyzer.NodeMatch nodeMatch$118 = new Analyzer.NodeMatch() {
0200: public Boolean apply(Node m) {
0201: return (null != m && m.hasName("Double"));
0202: }
0203: };
0204:
0205: public static final Analyzer.NodeMatch nodeMatch$120 = new Analyzer.NodeMatch() {
0206: public Boolean apply(Node m) {
0207: return (null != m && m.hasName("Complex"));
0208: }
0209: };
0210:
0211: public static final Analyzer.NodeMatch nodeMatch$134 = new Analyzer.NodeMatch() {
0212: public Boolean apply(Node m) {
0213: return (null != m && m.hasName("Char"));
0214: }
0215: };
0216:
0217: public static final Analyzer.NodeMatch nodeMatch$138 = new Analyzer.NodeMatch() {
0218: public Boolean apply(Node m) {
0219: return (null != m && m.hasName("Float"));
0220: }
0221: };
0222:
0223: public static final Analyzer.NodeMatch nodeMatch$159 = new Analyzer.NodeMatch() {
0224: public Boolean apply(Node m) {
0225: return (null != m && m.hasName("VoidTypeSpecifier"));
0226: }
0227: };
0228:
0229: public static final Analyzer.NodeMatch nodeMatch$165 = new Analyzer.NodeMatch() {
0230: public Boolean apply(Node m) {
0231: return (null != m && m.hasName("Bool"));
0232: }
0233: };
0234:
0235: public static final Analyzer.NodeMatch nodeMatch$167 = new Analyzer.NodeMatch() {
0236: public Boolean apply(Node m) {
0237: return (null != m && m.hasName("VarArgListSpecifier"));
0238: }
0239: };
0240:
0241: public static final Analyzer.NodeMatch nodeMatch$169 = new Analyzer.NodeMatch() {
0242: public Boolean apply(Node m) {
0243: return (null != m && m.hasName("StructureTypeDefinition"));
0244: }
0245: };
0246:
0247: public static final Analyzer.NodeMatch nodeMatch$172 = new Analyzer.NodeMatch() {
0248: public Boolean apply(Node m) {
0249: return (null != m && m.hasName("StructureTypeReference"));
0250: }
0251: };
0252:
0253: public static final Analyzer.NodeMatch nodeMatch$175 = new Analyzer.NodeMatch() {
0254: public Boolean apply(Node m) {
0255: return (null != m && m.hasName("UnionTypeDefinition"));
0256: }
0257: };
0258:
0259: public static final Analyzer.NodeMatch nodeMatch$178 = new Analyzer.NodeMatch() {
0260: public Boolean apply(Node m) {
0261: return (null != m && m.hasName("UnionTypeReference"));
0262: }
0263: };
0264:
0265: public static final Analyzer.NodeMatch nodeMatch$181 = new Analyzer.NodeMatch() {
0266: public Boolean apply(Node m) {
0267: return (null != m && m.hasName("EnumerationTypeDefinition"));
0268: }
0269: };
0270:
0271: public static final Analyzer.NodeMatch nodeMatch$184 = new Analyzer.NodeMatch() {
0272: public Boolean apply(Node m) {
0273: return (null != m && m.hasName("EnumerationTypeReference"));
0274: }
0275: };
0276:
0277: public static final Analyzer.NodeMatch nodeMatch$187 = new Analyzer.NodeMatch() {
0278: public Boolean apply(Node m) {
0279: return (null != m && m.hasName("TypedefName"));
0280: }
0281: };
0282:
0283: public static final Analyzer.NodeMatch nodeMatch$190 = new Analyzer.NodeMatch() {
0284: public Boolean apply(Node m) {
0285: return (null != m && m.hasName("TypeofSpecifier"));
0286: }
0287: };
0288:
0289: public static final Analyzer.NodeMatch nodeMatch$193 = new Analyzer.NodeMatch() {
0290: public Boolean apply(Node m) {
0291: return (null != m && m.hasName("ExternSpecifier"));
0292: }
0293: };
0294:
0295: public static final Analyzer.NodeMatch nodeMatch$195 = new Analyzer.NodeMatch() {
0296: public Boolean apply(Node m) {
0297: return (null != m && m.hasName("RegisterSpecifier"));
0298: }
0299: };
0300:
0301: public static final Analyzer.NodeMatch nodeMatch$197 = new Analyzer.NodeMatch() {
0302: public Boolean apply(Node m) {
0303: return (null != m && m.hasName("StaticSpecifier"));
0304: }
0305: };
0306:
0307: public static final Analyzer.NodeMatch nodeMatch$199 = new Analyzer.NodeMatch() {
0308: public Boolean apply(Node m) {
0309: return (null != m && m.hasName("TypedefSpecifier"));
0310: }
0311: };
0312:
0313: public static final Analyzer.NodeMatch nodeMatch$201 = new Analyzer.NodeMatch() {
0314: public Boolean apply(Node m) {
0315: return (null != m && m.hasName("AutoSpecifier"));
0316: }
0317: };
0318:
0319: public static final Analyzer.NodeMatch nodeMatch$203 = new Analyzer.NodeMatch() {
0320: public Boolean apply(Node m) {
0321: return (null != m && m.hasName("ConstantQualifier"));
0322: }
0323: };
0324:
0325: public static final Analyzer.NodeMatch nodeMatch$205 = new Analyzer.NodeMatch() {
0326: public Boolean apply(Node m) {
0327: return (null != m && m.hasName("VolatileQualifier"));
0328: }
0329: };
0330:
0331: public static final Analyzer.NodeMatch nodeMatch$207 = new Analyzer.NodeMatch() {
0332: public Boolean apply(Node m) {
0333: return (null != m && m.hasName("RestrictQualifier"));
0334: }
0335: };
0336:
0337: public static final Analyzer.NodeMatch nodeMatch$209 = new Analyzer.NodeMatch() {
0338: public Boolean apply(Node m) {
0339: return (null != m && m.hasName("FunctionSpecifier"));
0340: }
0341: };
0342:
0343: static final boolean match$211(Node m) {
0344: return null != m && m.hasName("TranslationUnit")
0345: && m.size() >= 0;
0346: }
0347:
0348: static final boolean match$218(Node m) {
0349: return null != m && m.hasName("Declaration") && m.size() == 3;
0350: }
0351:
0352: static final boolean match$224(Node m) {
0353: return null != m && m.hasName("DeclarationList")
0354: && m.size() >= 0;
0355: }
0356:
0357: static final boolean match$244(Node m) {
0358: return null != m && m.hasName("EmptyDefinition");
0359: }
0360:
0361: static final boolean match$248(Node m) {
0362: return null != m && m.hasName("AssemblyDefinition");
0363: }
0364:
0365: static final boolean match$254(Node m) {
0366: return null != m && m.hasName("DeclarationSpecifiers")
0367: && m.size() >= 0;
0368: }
0369:
0370: static final boolean match$263(Node m) {
0371: return null != m
0372: && m.hasName("EnumerationTypeDefinition")
0373: && m.size() == 4
0374: && (null != m.getGeneric(2) && m.getGeneric(2).hasName(
0375: "EnumeratorList"));
0376: }
0377:
0378: static final boolean match$265(Node m) {
0379: return null != m && m.hasName("EnumeratorList")
0380: && m.size() >= 0;
0381: }
0382:
0383: static final boolean match$291(Node m) {
0384: return null != m && m.hasName("StructureTypeDefinition")
0385: && m.size() == 4;
0386: }
0387:
0388: public static final Analyzer.NodeMatch nodeMatch$293 = new Analyzer.NodeMatch() {
0389: public Boolean apply(Node m) {
0390: return (null != m && m.hasName("StructureDeclarationList"));
0391: }
0392: };
0393:
0394: static final boolean match$295(CTypes.raw_type<?> m) {
0395: return null != m && m.isListT();
0396: }
0397:
0398: static final boolean match$298(CTypes.raw_type<?> m) {
0399: return null != m && m.isStructT();
0400: }
0401:
0402: public static final Analyzer.NodeMatch nodeMatch$301 = new Analyzer.NodeMatch() {
0403: public Boolean apply(Node m) {
0404: return (null != m && m.hasName("ParameterDeclaration"));
0405: }
0406: };
0407:
0408: static final boolean match$319(Node m) {
0409: return null != m && m.hasName("UnionTypeDefinition")
0410: && m.size() == 4;
0411: }
0412:
0413: static final boolean match$347(Node m) {
0414: return null != m && m.hasName("TypeofSpecifier")
0415: && m.size() == 1;
0416: }
0417:
0418: static final boolean match$349(Node m) {
0419: return null != m && m.hasName("TypeName");
0420: }
0421:
0422: static final boolean match$374(Node m) {
0423: return null != m && m.hasName("InitializedDeclaratorList")
0424: && m.size() >= 0;
0425: }
0426:
0427: static final boolean match$383(Pair<Node> m) {
0428: return null != m && ((Pair) m).isEmpty();
0429: }
0430:
0431: static final boolean match$387(Node m) {
0432: return null != m && m.hasName("InitializedDeclarator")
0433: && m.size() == 5;
0434: }
0435:
0436: static final boolean match$402(Node m) {
0437: return null != m && m.hasName("IdentifierList")
0438: && m.size() >= 0;
0439: }
0440:
0441: static final boolean match$408(CTypes.raw_type<?> m) {
0442: return null != m && m.isVoidT();
0443: }
0444:
0445: static final boolean match$438(Node m) {
0446: return null != m
0447: && m.hasName("ArrayDeclarator")
0448: && m.size() == 3
0449: && (null != m.getGeneric(1) && m.getGeneric(1).hasName(
0450: "ArrayQualifierList"));
0451: }
0452:
0453: static final boolean match$440(Node m) {
0454: return null != m && m.hasName("ArrayQualifierList")
0455: && m.size() >= 0;
0456: }
0457:
0458: public static final Analyzer.NodeMatch nodeMatch$462 = new Analyzer.NodeMatch() {
0459: public Boolean apply(Node m) {
0460: return (null != m && m.hasName("StructureDeclaration"));
0461: }
0462: };
0463:
0464: static final boolean match$471(Node m) {
0465: return null != m && m.hasName("BitField") && m.size() == 4;
0466: }
0467:
0468: static final boolean match$480(Node m) {
0469: return null != m && m.hasName("EmptyStatement");
0470: }
0471:
0472: static final boolean match$484(Node m) {
0473: return null != m && m.hasName("ExpressionStatement")
0474: && m.size() == 1;
0475: }
0476:
0477: static final boolean match$488(Node m) {
0478: return null != m && m.hasName("CompoundStatement")
0479: && m.size() >= 0;
0480: }
0481:
0482: static final boolean match$493(Node m) {
0483: return null != m && m.hasName("IfElseStatement")
0484: && m.size() == 3;
0485: }
0486:
0487: static final boolean match$497(Node m) {
0488: return null != m && m.hasName("IfStatement") && m.size() == 2;
0489: }
0490:
0491: static final boolean match$501(Node m) {
0492: return null != m && m.hasName("WhileStatement")
0493: && m.size() == 2;
0494: }
0495:
0496: static final boolean match$505(Node m) {
0497: return null != m && m.hasName("DoStatement") && m.size() == 2;
0498: }
0499:
0500: static final boolean match$509(Node m) {
0501: return null != m && m.hasName("SwitchStatement")
0502: && m.size() == 2;
0503: }
0504:
0505: static final boolean match$517(Node m) {
0506: return null != m && m.hasName("BreakStatement");
0507: }
0508:
0509: static final boolean match$521(Node m) {
0510: return null != m && m.hasName("ContinueStatement");
0511: }
0512:
0513: static final boolean match$525(Node m) {
0514: return null != m
0515: && m.hasName("GotoStatement")
0516: && m.size() == 2
0517: && (null != m.getGeneric(1) && m.getGeneric(1).hasName(
0518: "PrimaryIdentifier"));
0519: }
0520:
0521: static final boolean match$547(Node m) {
0522: return null != m && m.hasName("GotoStatement") && m.size() == 2;
0523: }
0524:
0525: static final boolean match$551(Node m) {
0526: return null != m && m.hasName("LabeledStatement")
0527: && m.size() == 2;
0528: }
0529:
0530: static final boolean match$555(Node m) {
0531: return null != m && m.hasName("AssemblyStatement");
0532: }
0533:
0534: static final boolean match$559(Node m) {
0535: return null != m && m.hasName("ReturnStatement")
0536: && m.size() == 1;
0537: }
0538:
0539: static final boolean match$597(Node m) {
0540: return null != m && m.hasName("CommaExpression")
0541: && m.size() == 2;
0542: }
0543:
0544: static final boolean match$601(Node m) {
0545: return null != m && m.hasName("AssignmentExpression")
0546: && m.size() == 3;
0547: }
0548:
0549: static final boolean match$609(Node m) {
0550: return null != m && m.hasName("ConditionalExpression")
0551: && m.size() == 3;
0552: }
0553:
0554: static final boolean match$613(Node m) {
0555: return null != m && m.hasName("LogicalAndExpression")
0556: && m.size() == 2;
0557: }
0558:
0559: static final boolean match$617(Node m) {
0560: return null != m && m.hasName("LogicalOrExpression")
0561: && m.size() == 2;
0562: }
0563:
0564: static final boolean match$621(Node m) {
0565: return null != m && m.hasName("LogicalNegationExpression")
0566: && m.size() == 1;
0567: }
0568:
0569: static final boolean match$625(Node m) {
0570: return null != m && m.hasName("BitwiseOrExpression")
0571: && m.size() == 2;
0572: }
0573:
0574: static final boolean match$629(Node m) {
0575: return null != m && m.hasName("BitwiseAndExpression")
0576: && m.size() == 2;
0577: }
0578:
0579: static final boolean match$633(Node m) {
0580: return null != m && m.hasName("BitwiseXorExpression")
0581: && m.size() == 2;
0582: }
0583:
0584: static final boolean match$637(Node m) {
0585: return null != m && m.hasName("BitwiseNegationExpression")
0586: && m.size() == 1;
0587: }
0588:
0589: static final boolean match$641(Node m) {
0590: return null != m && m.hasName("EqualityExpression")
0591: && m.size() == 3;
0592: }
0593:
0594: static final boolean match$645(Node m) {
0595: return null != m && m.hasName("RelationalExpression")
0596: && m.size() == 3;
0597: }
0598:
0599: static final boolean match$649(Node m) {
0600: return null != m && m.hasName("ShiftExpression")
0601: && m.size() == 3 && "<<".equals(m.getString(1));
0602: }
0603:
0604: static final boolean match$653(Node m) {
0605: return null != m && m.hasName("ShiftExpression")
0606: && m.size() == 3 && ">>".equals(m.getString(1));
0607: }
0608:
0609: static final boolean match$657(Node m) {
0610: return null != m && m.hasName("AdditiveExpression")
0611: && m.size() == 3;
0612: }
0613:
0614: static final boolean match$665(Node m) {
0615: return null != m && m.hasName("MultiplicativeExpression")
0616: && m.size() == 3;
0617: }
0618:
0619: public static final Analyzer.NodeMatch nodeMatch$668 = new Analyzer.NodeMatch() {
0620: public Boolean apply(Node m) {
0621: return (null != m && m.hasName("InitializedDeclarator"));
0622: }
0623: };
0624:
0625: static final boolean match$718(Node m) {
0626: return null != m && m.hasName("SizeofExpression")
0627: && m.size() == 1;
0628: }
0629:
0630: static final boolean match$740(Node m) {
0631: return null != m && m.hasName("AlignofExpression")
0632: && m.size() == 1;
0633: }
0634:
0635: static final boolean match$762(Node m) {
0636: return null != m && m.hasName("UnaryPlusExpression")
0637: && m.size() == 1;
0638: }
0639:
0640: static final boolean match$766(Node m) {
0641: return null != m && m.hasName("UnaryMinusExpression")
0642: && m.size() == 1;
0643: }
0644:
0645: static final boolean match$770(Node m) {
0646: return null != m && m.hasName("AddressExpression")
0647: && m.size() == 1;
0648: }
0649:
0650: static final boolean match$772(Node m) {
0651: return null != m && m.hasName("IndirectionExpression")
0652: && m.size() == 1;
0653: }
0654:
0655: static final boolean match$776(Node m) {
0656: return null != m && m.hasName("SubscriptExpression")
0657: && m.size() == 2;
0658: }
0659:
0660: static final boolean match$808(Node m) {
0661: return null != m && m.hasName("PreincrementExpression")
0662: && m.size() == 1;
0663: }
0664:
0665: static final boolean match$812(Node m) {
0666: return null != m && m.hasName("PredecrementExpression")
0667: && m.size() == 1;
0668: }
0669:
0670: static final boolean match$816(Node m) {
0671: return null != m && m.hasName("ExtensionExpression")
0672: && m.size() == 1;
0673: }
0674:
0675: static final boolean match$820(Node m) {
0676: return null != m && m.hasName("PostdecrementExpression")
0677: && m.size() == 1;
0678: }
0679:
0680: static final boolean match$824(Node m) {
0681: return null != m && m.hasName("PostincrementExpression")
0682: && m.size() == 1;
0683: }
0684:
0685: static final boolean match$828(Node m) {
0686: return null != m && m.hasName("StatementAsExpression")
0687: && m.size() == 1;
0688: }
0689:
0690: static final boolean match$832(Node m) {
0691: return null != m && m.hasName("CastExpression")
0692: && m.size() == 2;
0693: }
0694:
0695: static final boolean match$834(Node m) {
0696: return null != m && m.hasName("InitializerList");
0697: }
0698:
0699: static final boolean match$858(Node m) {
0700: return null != m && m.hasName("OffsetOfExpression")
0701: && m.size() == 2;
0702: }
0703:
0704: static final boolean match$862(Node m) {
0705: return null != m && m.hasName("FunctionCall") && m.size() == 2;
0706: }
0707:
0708: static final boolean match$864(Node m) {
0709: return null != m && m.hasName("PrimaryIdentifier");
0710: }
0711:
0712: static final boolean match$873(Node m) {
0713: return null != m && m.hasName("ExpressionList")
0714: && m.size() >= 0;
0715: }
0716:
0717: static final boolean match$902(Node m) {
0718: return null != m && m.hasName("DirectComponentSelection")
0719: && m.size() == 2;
0720: }
0721:
0722: static final boolean match$905(CTypes.raw_type<?> m) {
0723: return null != m && m.isUnionT();
0724: }
0725:
0726: static final boolean match$926(Node m) {
0727: return null != m && m.hasName("CompoundLiteral")
0728: && m.size() == 2;
0729: }
0730:
0731: static final boolean match$930(Node m) {
0732: return null != m && m.hasName("VariableArgumentAccess")
0733: && m.size() == 2;
0734: }
0735:
0736: static final boolean match$940(Node m) {
0737: return null != m && m.hasName("FloatingConstant")
0738: && m.size() == 1;
0739: }
0740:
0741: static final boolean match$944(Node m) {
0742: return null != m && m.hasName("StringConstant")
0743: && m.size() >= 0;
0744: }
0745:
0746: static final boolean match$948(Node m) {
0747: return null != m && m.hasName("CharacterConstant")
0748: && m.size() == 1;
0749: }
0750:
0751: static final boolean match$952(Node m) {
0752: return null != m && m.hasName("IntegerConstant")
0753: && m.size() == 1;
0754: }
0755:
0756: static final boolean match$961(Node m) {
0757: return null != m && m.hasName("StructureDeclarationList")
0758: && m.size() >= 0;
0759: }
0760:
0761: static final boolean match$970(Pair<?> m) {
0762: return null != m && ((Pair) m).isEmpty();
0763: }
0764:
0765: static final boolean match$971(Pair<?> m) {
0766: return m.size() == 1;
0767: }
0768:
0769: static final boolean match$976(Node m) {
0770: return null != m && m.hasName("TypeName") && m.size() == 2;
0771: }
0772:
0773: static final boolean match$985(Node m) {
0774: return null != m
0775: && m.hasName("Pointer")
0776: && m.size() == 2
0777: && (null != m.getGeneric(0)
0778: && m.getGeneric(0).hasName("TypeQualifierList") && m
0779: .getGeneric(0).size() >= 0)
0780: && null == m.getGeneric(1);
0781: }
0782:
0783: static final boolean match$989(Node m) {
0784: return null != m
0785: && m.hasName("Pointer")
0786: && m.size() == 2
0787: && (null != m.getGeneric(0) && m.getGeneric(0).hasName(
0788: "TypeQualifierList"));
0789: }
0790:
0791: static final boolean match$991(Node m) {
0792: return null != m && m.hasName("TypeQualifierList")
0793: && m.size() >= 0;
0794: }
0795:
0796: static final boolean match$1016(Node m) {
0797: return null != m
0798: && m.hasName("ParameterTypeList")
0799: && m.size() == 2
0800: && (null != m.getGeneric(0) && m.getGeneric(0).hasName(
0801: "ParameterList"));
0802: }
0803:
0804: static final boolean match$1019(Node m) {
0805: return null != m && m.hasName("ParameterList") && m.size() >= 0;
0806: }
0807:
0808: static final boolean match$1044(Node m) {
0809: return null != m && m.hasName("CaseLabel") && m.size() >= 1;
0810: }
0811:
0812: static final boolean match$1058(Node m) {
0813: return null != m && m.hasName("StructureDeclaration")
0814: && m.size() == 3;
0815: }
0816:
0817: static final boolean match$1073(Node m) {
0818: return null != m && m.hasName("StructureDeclaratorList")
0819: && m.size() >= 0;
0820: }
0821:
0822: static final boolean match$1086(Node m) {
0823: return null != m && m.hasName("SpecifierQualifierList")
0824: && m.size() >= 0;
0825: }
0826:
0827: static final boolean match$1095(Node m) {
0828: return null != m && m.hasName("AbstractDeclarator")
0829: && m.size() == 2;
0830: }
0831:
0832: static final boolean match$1104(Node m) {
0833: return null != m && m.hasName("ParameterDeclaration")
0834: && m.size() == 3;
0835: }
0836:
0837: static final boolean match$1106(Node m) {
0838: return null != m && m.hasName("AbstractDeclarator");
0839: }
0840:
0841: static final boolean match$1149(Node m) {
0842: return null != m && m.hasName("DirectAbstractDeclarator")
0843: && m.size() == 3;
0844: }
0845:
0846: static final boolean match$1161(Node m) {
0847: return null != m && m.hasName("AttributedAbstractDeclarator")
0848: && m.size() == 2;
0849: }
0850:
0851: public static final Analyzer.NodeMatch nodeMatch$1192 = new Analyzer.NodeMatch() {
0852: public Boolean apply(Node m) {
0853: return (null != m && m.hasName("DoStatement"));
0854: }
0855: };
0856:
0857: public static final Analyzer.NodeMatch nodeMatch$1194 = new Analyzer.NodeMatch() {
0858: public Boolean apply(Node m) {
0859: return (null != m && m.hasName("WhileStatement"));
0860: }
0861: };
0862:
0863: public static final Analyzer.NodeMatch nodeMatch$1196 = new Analyzer.NodeMatch() {
0864: public Boolean apply(Node m) {
0865: return (null != m && m.hasName("ForStatement"));
0866: }
0867: };
0868:
0869: public static final Analyzer.NodeMatch nodeMatch$1198 = new Analyzer.NodeMatch() {
0870: public Boolean apply(Node m) {
0871: return (null != m && m.hasName("SwitchStatement"));
0872: }
0873: };
0874:
0875: public static final Analyzer.NodeMatch nodeMatch$1208 = new Analyzer.NodeMatch() {
0876: public Boolean apply(Node m) {
0877: return (null != m && m.hasName("CompoundStatement"));
0878: }
0879: };
0880:
0881: static final boolean match$1212(Pair<CTypes.type> m) {
0882: return null != m && ((Pair) m).isEmpty();
0883: }
0884:
0885: static final boolean match$1218(Pair<String> m) {
0886: return null != m && ((Pair) m).isEmpty();
0887: }
0888:
0889: static final boolean match$1222(Pair<CTypes.label_record> m) {
0890: return null != m && ((Pair) m).isEmpty();
0891: }
0892:
0893: static final boolean match$1226(Node m) {
0894: return null != m && m.hasName("VariableLength");
0895: }
0896:
0897: static final boolean match$1237(CTypes.valueType m) {
0898: return null != m && m.isIValue();
0899: }
0900:
0901: static final boolean match$1238(CTypes.valueType m) {
0902: return null != m && m.isFValue();
0903: }
0904:
0905: static final boolean match$1241(
0906: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
0907: return null != m && m.size() == 2
0908: && (null != m.get1() && m.get1().isStructT())
0909: && (null != m.get2() && m.get2().isStructT());
0910: }
0911:
0912: static final boolean match$1242(
0913: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
0914: return null != m && m.size() == 2
0915: && (null != m.get1() && m.get1().isUnionT())
0916: && (null != m.get2() && m.get2().isUnionT());
0917: }
0918:
0919: static final boolean match$1243(
0920: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
0921: return null != m && m.size() == 2
0922: && (null != m.get1() && m.get1().isPointerType())
0923: && (null != m.get2() && m.get2().isPointerType());
0924: }
0925:
0926: static final boolean match$1244(
0927: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
0928: return null != m && m.size() == 2
0929: && (null != m.get1() && m.get1().isFunctionT())
0930: && (null != m.get2() && m.get2().isFunctionT());
0931: }
0932:
0933: static final boolean match$1247(CTypes.raw_type<?> m) {
0934: return null != m && m.isPointerType();
0935: }
0936:
0937: static final boolean match$1248(CTypes.raw_type<?> m) {
0938: return null != m && m.isArrayT();
0939: }
0940:
0941: static final boolean match$1274(CTypes.raw_type<?> m) {
0942: return null != m && m.isMemberT();
0943: }
0944:
0945: static final boolean match$1281(CTypes.raw_type<?> m) {
0946: return null != m && m.isFunctionT();
0947: }
0948:
0949: static final boolean match$1291(CTypes.storageClass m) {
0950: return null != m && m.isExternS();
0951: }
0952:
0953: static final boolean match$1292(CTypes.storageClass m) {
0954: return null != m && m.isStaticS();
0955: }
0956:
0957: static final boolean match$1295(CTypes.storageClass m) {
0958: return null != m && m.isAutoS();
0959: }
0960:
0961: static final boolean match$1298(CTypes.storageClass m) {
0962: return null != m && m.isRegisterS();
0963: }
0964:
0965: static final boolean match$1301(CTypes.storageClass m) {
0966: return null != m && m.isTypedefS();
0967: }
0968:
0969: static final boolean match$1310(CTypes.raw_type<?> m) {
0970: return null != m && m.isCharT();
0971: }
0972:
0973: static final boolean match$1311(CTypes.raw_type<?> m) {
0974: return null != m && m.isUCharT();
0975: }
0976:
0977: static final boolean match$1312(CTypes.raw_type<?> m) {
0978: return null != m && m.isSCharT();
0979: }
0980:
0981: static final boolean match$1313(CTypes.raw_type<?> m) {
0982: return null != m && m.isBoolT();
0983: }
0984:
0985: static final boolean match$1314(CTypes.raw_type<?> m) {
0986: return null != m && m.isShortT();
0987: }
0988:
0989: static final boolean match$1315(CTypes.raw_type<?> m) {
0990: return null != m && m.isUShortT();
0991: }
0992:
0993: static final boolean match$1316(CTypes.raw_type<?> m) {
0994: return null != m && m.isUIntT();
0995: }
0996:
0997: static final boolean match$1317(CTypes.raw_type<?> m) {
0998: return null != m && m.isIntT();
0999: }
1000:
1001: static final boolean match$1318(CTypes.raw_type<?> m) {
1002: return null != m && m.isULongT();
1003: }
1004:
1005: static final boolean match$1319(CTypes.raw_type<?> m) {
1006: return null != m && m.isLongT();
1007: }
1008:
1009: static final boolean match$1320(CTypes.raw_type<?> m) {
1010: return null != m && m.isULongLongT();
1011: }
1012:
1013: static final boolean match$1321(CTypes.raw_type<?> m) {
1014: return null != m && m.isLongLongT();
1015: }
1016:
1017: static final boolean match$1322(CTypes.raw_type<?> m) {
1018: return null != m && m.isBitfieldT();
1019: }
1020:
1021: static final boolean match$1323(CTypes.raw_type<?> m) {
1022: return null != m && m.isEnumT();
1023: }
1024:
1025: static final boolean match$1335(CTypes.raw_type<?> m) {
1026: return null != m && m.isFloatT();
1027: }
1028:
1029: static final boolean match$1336(CTypes.raw_type<?> m) {
1030: return null != m && m.isDoubleT();
1031: }
1032:
1033: static final boolean match$1337(CTypes.raw_type<?> m) {
1034: return null != m && m.isLongDoubleT();
1035: }
1036:
1037: static final boolean match$1340(CTypes.raw_type<?> m) {
1038: return null != m && m.isFloatComplexT();
1039: }
1040:
1041: static final boolean match$1341(CTypes.raw_type<?> m) {
1042: return null != m && m.isDoubleComplexT();
1043: }
1044:
1045: static final boolean match$1342(CTypes.raw_type<?> m) {
1046: return null != m && m.isLongDoubleComplexT();
1047: }
1048:
1049: static final boolean match$1343(CTypes.raw_type<?> m) {
1050: return null != m && m.isComplexT();
1051: }
1052:
1053: static final boolean match$1359(CTypes.arraySize m) {
1054: return null != m && m.isFixed();
1055: }
1056:
1057: static final boolean match$1397(CTypes.arraySize m) {
1058: return null != m && m.isIncomplete();
1059: }
1060:
1061: static final boolean match$1436(
1062: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
1063: return null != m && m.size() == 2
1064: && (null != m.get1() && m.get1().isArrayT())
1065: && (null != m.get2() && m.get2().isArrayT());
1066: }
1067:
1068: static final boolean match$1438(
1069: Tuple.T2<CTypes.arraySize, CTypes.arraySize> m) {
1070: return null != m && m.size() == 2
1071: && (null != m.get1() && m.get1().isVarLength())
1072: && (null != m.get2() && m.get2().isVarLength());
1073: }
1074:
1075: static final boolean match$1439(
1076: Tuple.T2<CTypes.arraySize, CTypes.arraySize> m) {
1077: return null != m && m.size() == 2
1078: && (null != m.get1() && m.get1().isFixed())
1079: && (null != m.get2() && m.get2().isFixed());
1080: }
1081:
1082: static final boolean match$1440(
1083: Tuple.T2<CTypes.arraySize, CTypes.arraySize> m) {
1084: return null != m && m.size() == 2
1085: && (null != m.get1() && m.get1().isFixed());
1086: }
1087:
1088: static final boolean match$1441(
1089: Tuple.T2<CTypes.arraySize, CTypes.arraySize> m) {
1090: return null != m && m.size() == 2
1091: && (null != m.get2() && m.get2().isFixed());
1092: }
1093:
1094: static final boolean match$1481(
1095: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
1096: return null != m && m.size() == 2
1097: && (null != m.get1() && m.get1().isULongLongT());
1098: }
1099:
1100: static final boolean match$1482(
1101: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
1102: return null != m && m.size() == 2
1103: && (null != m.get2() && m.get2().isULongLongT());
1104: }
1105:
1106: static final boolean match$1483(
1107: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
1108: return null != m && m.size() == 2
1109: && (null != m.get1() && m.get1().isLongLongT());
1110: }
1111:
1112: static final boolean match$1484(
1113: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
1114: return null != m && m.size() == 2
1115: && (null != m.get2() && m.get2().isLongLongT());
1116: }
1117:
1118: static final boolean match$1485(
1119: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
1120: return null != m && m.size() == 2
1121: && (null != m.get1() && m.get1().isULongT());
1122: }
1123:
1124: static final boolean match$1486(
1125: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
1126: return null != m && m.size() == 2
1127: && (null != m.get2() && m.get2().isULongT());
1128: }
1129:
1130: static final boolean match$1487(
1131: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
1132: return null != m && m.size() == 2
1133: && (null != m.get1() && m.get1().isLongT());
1134: }
1135:
1136: static final boolean match$1488(
1137: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
1138: return null != m && m.size() == 2
1139: && (null != m.get2() && m.get2().isLongT());
1140: }
1141:
1142: static final boolean match$1489(
1143: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
1144: return null != m && m.size() == 2
1145: && (null != m.get1() && m.get1().isUIntT());
1146: }
1147:
1148: static final boolean match$1490(
1149: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
1150: return null != m && m.size() == 2
1151: && (null != m.get2() && m.get2().isUIntT());
1152: }
1153:
1154: static final boolean match$1491(
1155: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
1156: return null != m && m.size() == 2
1157: && (null != m.get1() && m.get1().isIntT());
1158: }
1159:
1160: static final boolean match$1492(
1161: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
1162: return null != m && m.size() == 2
1163: && (null != m.get2() && m.get2().isIntT());
1164: }
1165:
1166: static final boolean match$1493(
1167: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
1168: return null != m && m.size() == 2
1169: && (null != m.get1() && m.get1().isUShortT());
1170: }
1171:
1172: static final boolean match$1494(
1173: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
1174: return null != m && m.size() == 2
1175: && (null != m.get2() && m.get2().isUShortT());
1176: }
1177:
1178: static final boolean match$1495(
1179: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
1180: return null != m && m.size() == 2
1181: && (null != m.get1() && m.get1().isShortT());
1182: }
1183:
1184: static final boolean match$1496(
1185: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
1186: return null != m && m.size() == 2
1187: && (null != m.get2() && m.get2().isShortT());
1188: }
1189:
1190: static final boolean match$1497(
1191: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
1192: return null != m && m.size() == 2
1193: && (null != m.get1() && m.get1().isCharT());
1194: }
1195:
1196: static final boolean match$1498(
1197: Tuple.T2<CTypes.raw_type<?>, CTypes.raw_type<?>> m) {
1198: return null != m && m.size() == 2
1199: && (null != m.get2() && m.get2().isCharT());
1200: }
1201:
1202: static final boolean match$1660(Node m) {
1203: return null != m && m.hasName("ShiftExpression")
1204: && m.size() == 3;
1205: }
1206:
1207: static final boolean match$1680(Node m) {
1208: return null != m
1209: && m.hasName("FunctionCall")
1210: && m.size() == 2
1211: && (null != m.getGeneric(1) && m.getGeneric(1).hasName(
1212: "ExpressionList"));
1213: }
1214:
1215: static final boolean match$1702(Node m) {
1216: return null != m && m.hasName("InitializerList")
1217: && m.size() >= 0;
1218: }
1219:
1220: static final boolean match$1827(Node m) {
1221: return null != m
1222: && m.hasName("Declaration")
1223: && m.size() == 3
1224: && (null != m.getGeneric(2)
1225: && m.getGeneric(2).hasName(
1226: "InitializedDeclaratorList") && m
1227: .getGeneric(2).size() >= 0);
1228: }
1229:
1230: static final boolean match$1858(Node m) {
1231: return null != m && m.hasName("InitializerListEntry")
1232: && m.size() == 2;
1233: }
1234:
1235: static final boolean match$1867(Node m) {
1236: return null != m && m.hasName("Declaration");
1237: }
1238:
1239: static final boolean match$1871(Node m) {
1240: return null != m && m.hasName("FunctionDefinition");
1241: }
1242:
1243: static final boolean match$1888(Node m) {
1244: return null != m && m.hasName("ExpressionStatement");
1245: }
1246:
1247: static final boolean match$1896(Node m) {
1248: return null != m && m.hasName("IfElseStatement");
1249: }
1250:
1251: static final boolean match$1900(Node m) {
1252: return null != m && m.hasName("IfStatement");
1253: }
1254:
1255: static final boolean match$1904(Node m) {
1256: return null != m && m.hasName("WhileStatement");
1257: }
1258:
1259: static final boolean match$1908(Node m) {
1260: return null != m && m.hasName("DoStatement");
1261: }
1262:
1263: static final boolean match$1912(Node m) {
1264: return null != m && m.hasName("ForStatement");
1265: }
1266:
1267: static final boolean match$1916(Node m) {
1268: return null != m && m.hasName("SwitchStatement");
1269: }
1270:
1271: static final boolean match$1920(Node m) {
1272: return null != m && m.hasName("LabeledStatement");
1273: }
1274:
1275: static final boolean match$1932(Node m) {
1276: return null != m && m.hasName("ReturnStatement");
1277: }
1278:
1279: static final boolean match$1936(Node m) {
1280: return null != m && m.hasName("GotoStatement");
1281: }
1282:
1283: static final boolean match$1953(Node m) {
1284: return null != m && m.hasName("InitializedDeclaratorList");
1285: }
1286:
1287: static final boolean match$1962(Node m) {
1288: return null != m && m.hasName("InitializedDeclarator");
1289: }
1290:
1291: static final boolean match$1971(Node m) {
1292: return null != m && m.hasName("InitializerListEntry");
1293: }
1294:
1295: static final boolean match$2021(Node m) {
1296: return null != m
1297: && m.hasName("LabeledStatement")
1298: && m.size() == 2
1299: && (null != m.getGeneric(0) && m.getGeneric(0).hasName(
1300: "NamedLabel"));
1301: }
1302:
1303: static final boolean match$2068(Node m) {
1304: return null != m && m.hasName("LocalLabelDeclaration")
1305: && m.size() >= 0;
1306: }
1307:
1308: static final boolean match$2145(Node m) {
1309: return null != m && m.hasName("Designation") && m.size() >= 0;
1310: }
1311:
1312: static final boolean match$2149(Node m) {
1313: return null != m && m.hasName("ObsoleteArrayDesignation")
1314: && m.size() >= 2;
1315: }
1316:
1317: static final boolean match$2153(Node m) {
1318: return null != m && m.hasName("ObsoleteFieldDesignation")
1319: && m.size() == 1;
1320: }
1321:
1322: static final boolean match$2162(Node m) {
1323: return null != m
1324: && m.hasName("Designator")
1325: && m.size() >= 2
1326: && ".".equals(m.getString(0))
1327: && (null != m.getGeneric(1)
1328: && m.getGeneric(1).hasName("PrimaryIdentifier") && m
1329: .getGeneric(1).size() == 1);
1330: }
1331:
1332: static final boolean match$2166(Node m) {
1333: return null != m && m.hasName("Designator") && m.size() >= 2
1334: && "[".equals(m.getString(0));
1335: }
1336:
1337: static final boolean match$2192(Node m) {
1338: return null != m
1339: && m.hasName("InitializerListEntry")
1340: && m.size() == 2
1341: && (null != m.getGeneric(1) && m.getGeneric(1).hasName(
1342: "InitializerList"));
1343: }
1344:
1345: private CSupport() {
1346: }
1347: }
|