File size: 3,171 Bytes
7ab4270 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
code`block`FunctionDecl`FunctionDeclRec`ForStmt`ForStmtRec`DoStmt`DoStmtRec`WhileStmt`WhileStmtRec`IfStmt`IfStmtRec`SwitchStmt`SwitchStmtRec`countBlocks`countBlocksRec`countCondition`countVariable`countLiteral`IntegerLiteral`StringLiteral`IfStmt`ForStmt`WhileStmt`DoStmt`SwitchStmt`countLoop`VarDecl`DeclRefExpr`DeclStmt`countDecl`countPointer`writeFunction`CallExpr`BinaryOperator`UnaryOperator`CompoundAssignOperator`countOperand`ArraySubscriptE`RealFaultLocation
int main() {`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0
int n;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`0`0`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0
vector<string> Al(11);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`2`1`1`0`0`0`0`0`0`1`2`1`4`1`0`1`0`1`0`1`0`0
Al[0] = "ABSINTH", Al[1] = "BEER", Al[2] = "BRANDY", Al[3] = "CHAMPAGNE", Al[4] =`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`5`9`5`4`0`0`0`0`0`0`0`15`0`15`0`0`0`10`0`0`10`0`0
"GIN", Al[5] = "RUM", Al[6] = "SAKE", Al[7] = "TEQUILA", Al[8] =`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`4`8`4`4`0`0`0`0`0`0`0`12`0`12`0`0`0`0`0`0`0`0`0
"VODKA", Al[9] = "WHISKEY", Al[10] = "WINE";`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`2`5`2`3`0`0`0`0`0`0`0`6`0`6`0`0`0`0`0`0`0`0`0
string temp;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`0`0`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0
stringstream ss;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`0`0`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0
int age , c2 = 0;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`1`1`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`1
bool ok=0;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`1`1`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0
For(i,0,n)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`3`1`1`0`0`1`0`0`0`1`1`3`1`5`0`0`0`1`1`0`2`0`0
cin >> temp;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`0`0`0`0
if (temp[0] >= '0' && temp[0] <= '9') {`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`3`2`4`2`0`1`0`0`0`0`0`0`4`0`4`0`0`0`3`0`0`3`0`0
ok=0;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`3`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`1
ss << temp, ss >> age, ss.clear();`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`3`5`0`0`0`0`0`0`0`0`0`0`7`0`7`0`0`0`2`0`0`2`0`0
if (age < 18)`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`4`1`1`1`0`1`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0
c2++,ok=1;`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`4`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`2`1`0`3`0`1
else if(find(all(Al),temp)!=Al.end()&&!ok) c2++ , ok=1;`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`8`0`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`1`1`0`0`1`0`0
cout_int(c2);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`7`2`1`1`0`0`0`0`0`0`0`8`0`8`0`0`1`2`2`0`4`0`0
|