Changeset 16 for branches/t3e-tools/t3q/src/org/etsi
- Timestamp:
- 08/06/10 16:40:42 (14 years ago)
- Location:
- branches/t3e-tools/t3q/src/org/etsi/t3q
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/t3e-tools/t3q/src/org/etsi/t3q/T3Q.java
r7 r16 247 247 248 248 if (T3Q.activeProfile.isStatShowSummary()) { 249 System.out.println("Brief statistics summary of occur ences in message classes:");249 System.out.println("Brief statistics summary of occurrences in message classes:"); 250 250 for (MessageClass m : MessageClass.values()) { 251 251 System.out.println("\t" + m.getDescription() + " : " -
branches/t3e-tools/t3q/src/org/etsi/t3q/config/QualityCheckProfile.java
r7 r16 72 72 private TTCN3FormatterParameters formattingParameters = new TTCN3FormatterParameters(); 73 73 74 private RealtimeExtensionConfig realtimeExtensionConfig = new RealtimeExtensionConfig(); 75 76 public RealtimeExtensionConfig getRealtimeExtensionConfig() { 77 return realtimeExtensionConfig; 78 } 79 80 public void setRealtimeExtensionConfig( 81 RealtimeExtensionConfig realtimeExtensionConfig) { 82 this.realtimeExtensionConfig = realtimeExtensionConfig; 83 } 84 74 85 public String getLogFormatRegExp() { 75 86 return logFormatRegExp; -
branches/t3e-tools/t3q/src/org/etsi/t3q/exceptions/TTCN3ParserException.java
r7 r16 7 7 public TTCN3ParserException(String message) { 8 8 super("TTCN-3 Parser Exception: " + message); //TODO: add tree dump 9 //TODO: add origins 9 10 } 10 11 -
branches/t3e-tools/t3q/src/org/etsi/t3q/visitor/AbstractVisitor.java
r7 r16 770 770 public ContinueStatus visitXOR(LocationAST node) throws TTCN3BehaviorException {return ContinueStatus.getInstance(true,true);} 771 771 public ContinueStatus visitXOR4B(LocationAST node) throws TTCN3BehaviorException {return ContinueStatus.getInstance(true,true);} 772 public ContinueStatus visitNowOperation(LocationAST node) throws TTCN3BehaviorException {return ContinueStatus.getInstance(true,true);} 773 public ContinueStatus visitWaitStatement(LocationAST node) throws TTCN3BehaviorException {return ContinueStatus.getInstance(true,true);} 774 public ContinueStatus visitTimestampSpec(LocationAST node) throws TTCN3BehaviorException {return ContinueStatus.getInstance(true,true);} 775 public ContinueStatus visitREALTIME(LocationAST node) throws TTCN3BehaviorException {return ContinueStatus.getInstance(true,true);} 776 public ContinueStatus visitNOW(LocationAST node) throws TTCN3BehaviorException {return ContinueStatus.getInstance(true,true);} 777 public ContinueStatus visitWAIT(LocationAST node) throws TTCN3BehaviorException {return ContinueStatus.getInstance(true,true);} 778 public ContinueStatus visitSTEPSIZE(LocationAST node) throws TTCN3BehaviorException {return ContinueStatus.getInstance(true,true);} 779 public ContinueStatus visitTIMESTAMP(LocationAST node) throws TTCN3BehaviorException {return ContinueStatus.getInstance(true,true);} 780 public ContinueStatus visitCONT(LocationAST node) throws TTCN3BehaviorException {return ContinueStatus.getInstance(true,true);} 781 public ContinueStatus visitPAR(LocationAST node) throws TTCN3BehaviorException {return ContinueStatus.getInstance(true,true);} 782 public ContinueStatus visitSEQ(LocationAST node) throws TTCN3BehaviorException {return ContinueStatus.getInstance(true,true);} 772 783 public ContinueStatus visitWS(LocationAST node) throws TTCN3BehaviorException {return ContinueStatus.getInstance(true,true);} 773 784 public ContinueStatus visitSL_COMMENT(LocationAST node) throws TTCN3BehaviorException {return ContinueStatus.getInstance(true,true);} … … 3106 3117 case TTCN3ParserTokenTypes.XOR4B: 3107 3118 continueStatus=visitXOR4B(node); 3119 return continueStatus; 3120 case TTCN3ParserTokenTypes.NowOperation: 3121 continueStatus=visitNowOperation(node); 3122 return continueStatus; 3123 case TTCN3ParserTokenTypes.WaitStatement: 3124 continueStatus=visitWaitStatement(node); 3125 return continueStatus; 3126 case TTCN3ParserTokenTypes.TimestampSpec: 3127 continueStatus=visitTimestampSpec(node); 3128 return continueStatus; 3129 case TTCN3ParserTokenTypes.REALTIME: 3130 continueStatus=visitREALTIME(node); 3131 return continueStatus; 3132 case TTCN3ParserTokenTypes.NOW: 3133 continueStatus=visitNOW(node); 3134 return continueStatus; 3135 case TTCN3ParserTokenTypes.WAIT: 3136 continueStatus=visitWAIT(node); 3137 return continueStatus; 3138 case TTCN3ParserTokenTypes.STEPSIZE: 3139 continueStatus=visitSTEPSIZE(node); 3140 return continueStatus; 3141 case TTCN3ParserTokenTypes.TIMESTAMP: 3142 continueStatus=visitTIMESTAMP(node); 3143 return continueStatus; 3144 case TTCN3ParserTokenTypes.CONT: 3145 continueStatus=visitCONT(node); 3146 return continueStatus; 3147 case TTCN3ParserTokenTypes.PAR: 3148 continueStatus=visitPAR(node); 3149 return continueStatus; 3150 case TTCN3ParserTokenTypes.SEQ: 3151 continueStatus=visitSEQ(node); 3108 3152 return continueStatus; 3109 3153 case TTCN3ParserTokenTypes.WS: -
branches/t3e-tools/t3q/src/org/etsi/t3q/visitor/QualityChecker.java
r12 r16 2458 2458 } 2459 2459 2460 2461 //TODO: temporary duplicate of the above 2462 //- above needs refactoring 2463 //- this needs to be separated in a realtime checker 2464 public void checkWaitStatementPrecededByLog(LocationAST node) { 2465 // TODO: no more function statement or defs 2466 // TODO: fixed issue with statement blocks 2467 2468 // Fixed: currently based on SetLocalVerdict node, 2469 // consider starting at the fail or inconc node instead, checking 2470 // whether it is 2471 // within a set verdict context and proceed from there 2472 // fix: it is specific to the set verdict and not to inconc or fail 2473 // alone 2474 2475 boolean problemOccured = false; 2476 LocationAST parentNode = LocationAST.resolveParentsUntilType(node, 2477 new int[] { TTCN3ParserTokenTypes.FunctionStatement }); 2478 if (parentNode == null) { 2479 this.getLoggingInterface().logFix(node.getLine(), 2480 node.getEndLine(), 2481 MessageClass.LOGGING, 2482 "Cannot resolve the parent node", 2483 "5.4, " + MiscTools.getMethodName()); 2484 return; 2485 } 2486 2487 int functionStatementOrDefsVisitedCount = visitor.getFunctionStatementOrDefNodes() 2488 .size(); 2489 if (parentNode == visitor.getFunctionStatementOrDefNodes() 2490 .get(functionStatementOrDefsVisitedCount - 1)) { 2491 2492 int i = functionStatementOrDefsVisitedCount - 2; 2493 if (i >= 0) { 2494 LocationAST next = null; 2495 // skip semicolons 2496 next = visitor.getFunctionStatementOrDefNodes() 2497 .get(i) 2498 .getNextSibling(); 2499 2500 while ((next != null) 2501 && (next.getType() == TTCN3ParserTokenTypes.SemiColon)) { 2502 next = next.getNextSibling(); 2503 } 2504 2505 if (next == parentNode) { 2506 LocationAST resultNode = (LocationAST) ASTUtil.findChild(visitor.getFunctionStatementOrDefNodes() 2507 .get(i), 2508 TTCN3ParserTokenTypes.LogStatement); 2509 if (resultNode == null) { 2510 problemOccured = true; 2511 } 2512 } else { 2513 problemOccured = true; 2514 } 2515 } else { 2516 problemOccured = true; 2517 } 2518 } 2519 2520 if (problemOccured) { 2521 this.getLoggingInterface() 2522 .logWarning(node.getLine(), 2523 node.getEndLine(), 2524 MessageClass.LOGGING, 2525 "No log statement precedes a wait statement!", 2526 "RT.X.X, " + MiscTools.getMethodName()); 2527 } 2528 } 2529 2460 2530 // ------------------------------------------------------------------------------------------- 2461 2531 -
branches/t3e-tools/t3q/src/org/etsi/t3q/visitor/T3QVisitor.java
r7 r16 27 27 checker.stringLevelChecks(this.getFilename()); 28 28 } 29 30 //TODO: temporary addition 31 public ContinueStatus visitWaitStatement(LocationAST node) 32 throws TTCN3BehaviorException { 33 if (T3Q.activeProfile.getRealtimeExtensionConfig().isCheckWaitStatementPrecededByLog()) { 34 checker.checkWaitStatementPrecededByLog(node); 35 } 36 return ContinueStatus.getInstance(true, true); 37 } 38 39 40 public ContinueStatus visitIdentifier(LocationAST node) 41 throws TTCN3BehaviorException { 42 return ContinueStatus.getInstance(true, true); 43 } 29 44 30 45 public ContinueStatus visitTTCN3Module(LocationAST node) … … 33 48 checker.checkModuleSize(node); 34 49 } 35 50 // String output = ""; 51 // System.out.println(LocationAST.dumpTree(node,1,output)); 36 52 return ContinueStatus.getInstance(true, true); 37 53 }
Note: See TracChangeset
for help on using the changeset viewer.